Changeset 117966 in webkit
- Timestamp:
- May 22, 2012 6:55:10 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117963 r117966 1 2012-05-22 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: [regression] dynamically created script tab is bound to the document resource. 4 https://bugs.webkit.org/show_bug.cgi?id=87119 5 6 Reviewed by Vsevolod Vlasov. 7 8 * inspector/debugger/dynamic-script-tag-expected.txt: Added. 9 * inspector/debugger/dynamic-script-tag.html: Added. 10 1 11 2012-05-22 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r117965 r117966 1 2012-05-22 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: [regression] dynamically created script tab is bound to the document resource. 4 https://bugs.webkit.org/show_bug.cgi?id=87119 5 6 Reviewed by Vsevolod Vlasov. 7 8 Test: inspector/debugger/dynamic-script-tag.html 9 10 * inspector/front-end/BreakpointManager.js: 11 (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger.didSetBreakpoint): 12 (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger): 13 * inspector/front-end/DebuggerModel.js: 14 (WebInspector.DebuggerModel.prototype.rawLocationToUILocation): 15 * inspector/front-end/ResourceScriptMapping.js: 16 (WebInspector.ResourceScriptMapping.prototype.addScript): 17 (WebInspector.ResourceScriptMapping.prototype._shouldBindScriptToContentProvider): 18 * inspector/front-end/Script.js: 19 (WebInspector.Script.prototype.rawLocationToUILocation): 20 (WebInspector.Script.Location.prototype.update): 21 1 22 2012-05-22 Vsevolod Vlasov <vsevik@chromium.org> 2 23 -
trunk/Source/WebCore/inspector/front-end/BreakpointManager.js
r116846 r117966 382 382 for (var i = 0; i < locations.length; ++i) { 383 383 var script = this._breakpointManager._debuggerModel.scriptForId(locations[i].scriptId); 384 var uiLocation = script.rawLocationToUILocation(locations[i] );384 var uiLocation = script.rawLocationToUILocation(locations[i].lineNumber, locations[i].columnNumber); 385 385 if (this._breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber)) { 386 386 // location clash -
trunk/Source/WebCore/inspector/front-end/DebuggerModel.js
r117277 r117966 536 536 if (!script) 537 537 return null; 538 return script.rawLocationToUILocation(rawLocation );538 return script.rawLocationToUILocation(rawLocation.lineNumber, rawLocation.columnNumber); 539 539 } 540 540 } -
trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js
r117600 r117966 94 94 if (resource && resource.request && !resource.request.finished) 95 95 resource = null; 96 // Only bind inline and standalone scripts. 97 if (resource && !this._shouldBindScriptToContentProvider(script, resource)) 98 resource = null; 96 99 if (!resource) { 97 100 // When there is no resource, lookup in-flight requests. 98 101 request = WebInspector.networkManager.inflightRequestForURL(script.sourceURL); 102 // Only bind inline and standalone scripts. 103 if (request && !this._shouldBindScriptToContentProvider(script, request)) 104 request = null; 99 105 } 100 106 } … … 124 130 125 131 /** 132 * @param {WebInspector.Script} script 133 * @param {WebInspector.ContentProvider} contentProvider 134 * @return {boolean} 135 */ 136 _shouldBindScriptToContentProvider: function(script, contentProvider) 137 { 138 if (script.isInlineScript()) 139 return contentProvider.contentType() === WebInspector.resourceTypes.Document; 140 return contentProvider.contentType() === WebInspector.resourceTypes.Script; 141 }, 142 143 /** 126 144 * @param {WebInspector.Event} event 127 145 */ -
trunk/Source/WebCore/inspector/front-end/Script.js
r117600 r117966 168 168 169 169 /** 170 * @param {DebuggerAgent.Location} rawLocation 170 * @param {number} lineNumber 171 * @param {number=} columnNumber 171 172 * @return {WebInspector.UILocation} 172 173 */ 173 rawLocationToUILocation: function(rawLocation) 174 { 175 console.assert(rawLocation.scriptId === this.scriptId); 176 var uiLocation = this._sourceMapping.rawLocationToUILocation(rawLocation); 174 rawLocationToUILocation: function(lineNumber, columnNumber) 175 { 176 var uiLocation = this._sourceMapping.rawLocationToUILocation(new WebInspector.DebuggerModel.Location(this, lineNumber, columnNumber || 0)); 177 177 return uiLocation.uiSourceCode.overrideLocation(uiLocation); 178 178 }, … … 220 220 update: function() 221 221 { 222 var uiLocation = this._script.rawLocationToUILocation(this._rawLocation );222 var uiLocation = this._script.rawLocationToUILocation(this._rawLocation.lineNumber, this._rawLocation.columnNumber); 223 223 if (uiLocation) { 224 224 var uiSourceCode = uiLocation.uiSourceCode;
Note: See TracChangeset
for help on using the changeset viewer.