diff options
| author | Kristian Monsen <kristianm@google.com> | 2010-07-30 10:46:49 +0100 |
|---|---|---|
| committer | Kristian Monsen <kristianm@google.com> | 2010-08-04 13:01:34 +0100 |
| commit | 0617145a89917ae7735fe1c9538688ab9a577df5 (patch) | |
| tree | 56206078694427c37ed7bdf27eb5221398b833c0 /WebCore/inspector/front-end/ScriptsPanel.js | |
| parent | ef1adcdfc805d4d13103f6f15cc5b4d96828a60f (diff) | |
| download | external_webkit-0617145a89917ae7735fe1c9538688ab9a577df5.zip external_webkit-0617145a89917ae7735fe1c9538688ab9a577df5.tar.gz external_webkit-0617145a89917ae7735fe1c9538688ab9a577df5.tar.bz2 | |
Merge WebKit at r64264 : Initial merge by git.
Change-Id: Ic42bef02efef8217a0f84c47176a9c617c28d1f1
Diffstat (limited to 'WebCore/inspector/front-end/ScriptsPanel.js')
| -rw-r--r-- | WebCore/inspector/front-end/ScriptsPanel.js | 24 |
1 files changed, 10 insertions, 14 deletions
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) { |
