diff options
| author | Ben Murdoch <benm@google.com> | 2011-01-06 21:36:31 +0000 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2011-01-07 10:36:05 +0000 |
| commit | 4a156157940f51b91eadd76f6c86f862ec0a1da0 (patch) | |
| tree | ee905fa007e14522848f571215c1054734db9269 /WebCore/inspector/front-end/ScriptsPanel.js | |
| parent | 21d8d81a756ca7e60b5131e5f1006f52799179b0 (diff) | |
| download | external_webkit-4a156157940f51b91eadd76f6c86f862ec0a1da0.zip external_webkit-4a156157940f51b91eadd76f6c86f862ec0a1da0.tar.gz external_webkit-4a156157940f51b91eadd76f6c86f862ec0a1da0.tar.bz2 | |
Merge WebKit at Chromium 9.0.597.55: trivial merge by git
Change-Id: I2c6f2ebc4431d15ac82b5b1a9f08159e1731bc57
Diffstat (limited to 'WebCore/inspector/front-end/ScriptsPanel.js')
| -rw-r--r-- | WebCore/inspector/front-end/ScriptsPanel.js | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js index 0a3c7a9..2a216cc 100644 --- a/WebCore/inspector/front-end/ScriptsPanel.js +++ b/WebCore/inspector/front-end/ScriptsPanel.js @@ -245,6 +245,9 @@ WebInspector.ScriptsPanel.prototype = { // Resource is finished, bind the script right away. resource.addScript(script); this._sourceIDMap[sourceID] = resource; + var view = WebInspector.ResourceManager.existingResourceViewForResource(resource); + if (view && view.sourceFrame) + view.sourceFrame.addScript(script); } else { // Resource is not finished, bind the script later. if (!resource._scriptsPendingResourceLoad) { @@ -306,7 +309,7 @@ WebInspector.ScriptsPanel.prototype = { return Preferences.canEditScriptSource; }, - editScriptSource: function(sourceID, newContent, line, linesCountToShift, commitEditingCallback, cancelEditingCallback) + editScriptSource: function(editData, commitEditingCallback, cancelEditingCallback) { if (!this.canEditScripts()) return; @@ -323,18 +326,19 @@ WebInspector.ScriptsPanel.prototype = { if (callFrames && callFrames.length) this.debuggerPaused(callFrames); } else { - cancelEditingCallback(); + if (cancelEditingCallback) + cancelEditingCallback(); WebInspector.log(newBodyOrErrorMessage, WebInspector.ConsoleMessage.MessageLevel.Warning); } for (var i = 0; i < breakpoints.length; ++i) { var breakpoint = breakpoints[i]; var newLine = breakpoint.line; - if (success && breakpoint.line >= line) - newLine += linesCountToShift; - WebInspector.breakpointManager.setBreakpoint(sourceID, breakpoint.url, newLine, breakpoint.enabled, breakpoint.condition); + if (success && breakpoint.line >= editData.line) + newLine += editData.linesCountToShift; + WebInspector.breakpointManager.setBreakpoint(editData.sourceID, breakpoint.url, newLine, breakpoint.enabled, breakpoint.condition); } }; - InspectorBackend.editScriptSource(sourceID, newContent, mycallback.bind(this)); + InspectorBackend.editScriptSource(editData.sourceID, editData.content, mycallback.bind(this)); }, selectedCallFrameId: function() @@ -1008,7 +1012,11 @@ WebInspector.ScriptsPanel.prototype = { this._shortcuts[shortcut2.key] = handler; section.addAlternateKeys([ shortcut1.name, shortcut2.name ], WebInspector.UIString("Step out")); - shortcut1 = WebInspector.KeyboardShortcut.makeDescriptor("g", platformSpecificModifier); + var isMac = WebInspector.isMac(); + if (isMac) + shortcut1 = WebInspector.KeyboardShortcut.makeDescriptor("l", WebInspector.KeyboardShortcut.Modifiers.Meta); + else + shortcut1 = WebInspector.KeyboardShortcut.makeDescriptor("g", WebInspector.KeyboardShortcut.Modifiers.Ctrl); this._shortcuts[shortcut1.key] = this.showGoToLineDialog.bind(this); section.addAlternateKeys([ shortcut1.name ], WebInspector.UIString("Go to Line")); this.sidebarPanes.callstack.registerShortcuts(section); |
