Changeset 86745 in webkit
- Timestamp:
- May 18, 2011 2:45:17 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86744 r86745 1 2011-05-18 Pavel Feldman <pfeldman@google.com> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: do not reveal line -1 when navigating to anchor without line specified. 6 https://bugs.webkit.org/show_bug.cgi?id=60971 7 8 * inspector/front-end/ResourcesPanel.js: 9 (WebInspector.ResourcesPanel.prototype.showAnchorLocation): 10 * inspector/front-end/ScriptsPanel.js: 11 (WebInspector.ScriptsPanel.prototype.showAnchorLocation.): 12 (WebInspector.ScriptsPanel.prototype.showAnchorLocation): 13 * inspector/front-end/inspector.js: 14 (WebInspector._showAnchorLocation): 15 1 16 2011-05-18 Kent Tamura <tkent@chromium.org> 2 17 -
trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js
r86562 r86745 351 351 return; 352 352 } 353 this.showResource(resource, anchor.getAttribute("line_number") - 1); 353 var lineNumber = parseInt(anchor.getAttribute("line_number")); 354 this.showResource(resource, lineNumber !== NaN ? lineNumber - 1 : undefined); 354 355 }, 355 356 -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r86539 r86745 517 517 showAnchorLocation: function(anchor) 518 518 { 519 function didRequestSourceMapping(mapping)520 {521 var lineNumber = mapping.scriptLocationToSourceLine({lineNumber:anchor.getAttribute("line_number") - 1, columnNumber:0});522 this._showSourceLine(sourceFile.id, lineNumber);523 }524 519 var sourceFile = this._presentationModel.sourceFileForScriptURL(anchor.href); 525 sourceFile.requestSourceMapping(didRequestSourceMapping.bind(this)); 520 var anchorLineNumber = parseInt(anchor.getAttribute("line_number")); 521 if (anchorLineNumber !== NaN) { 522 function didRequestSourceMapping(mapping) 523 { 524 var lineNumber = mapping.scriptLocationToSourceLine({ lineNumber: anchorLineNumber - 1, columnNumber: 0 }); 525 this._showSourceLine(sourceFile.id, lineNumber); 526 } 527 sourceFile.requestSourceMapping(didRequestSourceMapping.bind(this)); 528 return; 529 } 530 this._showSourceFrameAndAddToHistory(sourceFile.id); 526 531 }, 527 532 -
trunk/Source/WebCore/inspector/front-end/inspector.js
r86672 r86745 1171 1171 WebInspector._showAnchorLocation = function(anchor) 1172 1172 { 1173 var preferedPanel = this.panels[anchor.getAttribute("preferred_panel") || " resources"];1173 var preferedPanel = this.panels[anchor.getAttribute("preferred_panel") || "scripts"]; 1174 1174 if (WebInspector._showAnchorLocationInPanel(anchor, preferedPanel)) 1175 1175 return true;
Note: See TracChangeset
for help on using the changeset viewer.