From 0617145a89917ae7735fe1c9538688ab9a577df5 Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Fri, 30 Jul 2010 10:46:49 +0100 Subject: Merge WebKit at r64264 : Initial merge by git. Change-Id: Ic42bef02efef8217a0f84c47176a9c617c28d1f1 --- WebCore/inspector/front-end/ScriptsPanel.js | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'WebCore/inspector/front-end/ScriptsPanel.js') diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js index 7a1a4d5..dff4853 100644 --- a/WebCore/inspector/front-end/ScriptsPanel.js +++ b/WebCore/inspector/front-end/ScriptsPanel.js @@ -104,10 +104,10 @@ WebInspector.ScriptsPanel = function() this.sidebarButtonsElement.appendChild(this.stepOutButton); this.toggleBreakpointsButton = new WebInspector.StatusBarButton("", "toggle-breakpoints"); - this.toggleBreakpointsButton.addEventListener("click", this._toggleBreakpointsClicked.bind(this), false); + this.toggleBreakpointsButton.addEventListener("click", this.toggleBreakpointsClicked.bind(this), false); this.sidebarButtonsElement.appendChild(this.toggleBreakpointsButton.element); // Breakpoints should be activated by default, so emulate a click to toggle on. - this._toggleBreakpointsClicked(); + this.toggleBreakpointsClicked(); this.debuggerStatusElement = document.createElement("div"); this.debuggerStatusElement.id = "scripts-debugger-status"; @@ -164,7 +164,7 @@ WebInspector.ScriptsPanel = function() this._pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scripts-pause-on-exceptions-status-bar-item", 3); this._pauseOnExceptionButton.addEventListener("click", this._togglePauseOnExceptions.bind(this), false); this._pauseOnExceptionButton.state = WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions; - this._pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.\nClick to Pause on all exceptions."); + this._pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.\nClick to Pause on all exceptions."); this._registerShortcuts(); @@ -219,7 +219,7 @@ WebInspector.ScriptsPanel.prototype = { delete this._attachDebuggerWhenShown; } }, - + hide: function() { if (this.visibleView) @@ -278,7 +278,7 @@ WebInspector.ScriptsPanel.prototype = { // Remove script from the files list. script.filesSelectOption.parentElement.removeChild(script.filesSelectOption); - + // Move breakpoints to the resource's frame. if (script._scriptView) { var sourceFrame = script._scriptView.sourceFrame; @@ -296,9 +296,6 @@ WebInspector.ScriptsPanel.prototype = { { var breakpoint = event.data; - if (!this.breakpointsActivated) - this._toggleBreakpointsClicked(); - var sourceFrame; if (breakpoint.url) { var resource = WebInspector.resourceURLMap[breakpoint.url]; @@ -540,7 +537,7 @@ WebInspector.ScriptsPanel.prototype = { this._showScriptOrResource(scriptOrResource, {line: line, shouldHighlightLine: true}); }, - _scriptOrResourceForURLAndLine: function(url, line) + _scriptOrResourceForURLAndLine: function(url, line) { var scriptWithMatchingUrl = null; for (var sourceID in this._sourceIDMap) { @@ -612,8 +609,7 @@ WebInspector.ScriptsPanel.prototype = { _showScriptOrResource: function(scriptOrResource, options) { // options = {line:, shouldHighlightLine:, fromBackForwardAction:, initialLoad:} - if (!options) - options = {}; + options = options || {}; if (!scriptOrResource) return; @@ -695,7 +691,7 @@ WebInspector.ScriptsPanel.prototype = { return; this._resourceForURLInFilesSelect[script.resource.url] = script.resource; } - + var displayName = script.sourceURL ? WebInspector.displayNameForURL(script.sourceURL) : WebInspector.UIString("(program)"); var select = this.filesSelectElement; @@ -814,7 +810,7 @@ WebInspector.ScriptsPanel.prototype = { this.resize(); }, - + updatePauseOnExceptionsState: function(pauseOnExceptionsState) { if (pauseOnExceptionsState == WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions) @@ -973,7 +969,7 @@ WebInspector.ScriptsPanel.prototype = { InspectorBackend.stepOutOfFunction(); }, - _toggleBreakpointsClicked: function() + toggleBreakpointsClicked: function() { this.toggleBreakpointsButton.toggled = !this.toggleBreakpointsButton.toggled; if (this.toggleBreakpointsButton.toggled) { -- cgit v1.1