Changeset 79873 in webkit
- Timestamp:
- Feb 28, 2011 9:29:51 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79872 r79873 1 2011-02-28 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: [REGRESSION] source frame is recreated for each inlined script in document. 6 https://bugs.webkit.org/show_bug.cgi?id=55377 7 8 * inspector/debugger/scripts-panel-expected.txt: 9 * inspector/debugger/scripts-panel.html: 10 1 11 2011-02-28 Csaba Osztrogonác <ossy@webkit.org> 2 12 -
trunk/LayoutTests/inspector/debugger/scripts-panel-expected.txt
r79560 r79873 6 6 7 7 Running: testHistory 8 9 Running: testSourceFramesCount 10 Page reloaded. 8 11 Debugger was disabled. 9 12 -
trunk/LayoutTests/inspector/debugger/scripts-panel.html
r79555 r79873 98 98 99 99 next(); 100 }, 101 102 function testSourceFramesCount(next) 103 { 104 var sourceFrameCount = 0; 105 106 InspectorTest.showScriptSource("scripts-panel.html", didShowScriptSource); 107 108 function didShowScriptSource() 109 { 110 function didCreateSourceFrame() 111 { 112 sourceFrameCount += 1; 113 } 114 InspectorTest.addSniffer(panel, "_createSourceFrame", didCreateSourceFrame, true); 115 InspectorTest.reloadPage(didReload); 116 } 117 118 function didReload() 119 { 120 InspectorTest.assertEquals("scripts-panel.html", select[select.selectedIndex].text); 121 // There should be maximum 2 source frames: first one is the first shown, second one is the last viewed ("scripts-panel.html"). 122 InspectorTest.assertEquals(true, sourceFrameCount <= 2, "too many source frames created after page reload"); 123 next(); 124 } 100 125 } 101 126 ]); 102 127 }; 103 128 129 </script> 130 131 <script> 132 function secondInlinedScriptInPage() 133 { 134 return 0; 135 } 136 </script> 137 138 <script> 139 function thirdInlinedScriptInPage() 140 { 141 return 0; 142 } 143 </script> 144 145 <script> 146 function fourthInlinedScriptInPage() 147 { 148 return 0; 149 } 104 150 </script> 105 151 -
trunk/Source/WebCore/ChangeLog
r79871 r79873 1 2011-02-28 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: [REGRESSION] source frame is recreated for each inlined script in document. 6 https://bugs.webkit.org/show_bug.cgi?id=55377 7 8 * inspector/front-end/ScriptsPanel.js: 9 (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished): 10 (WebInspector.ScriptsPanel.prototype._sourceFrameForSourceName): 11 (WebInspector.ScriptsPanel.prototype._createSourceFrame): 12 (WebInspector.ScriptsPanel.prototype._recreateSourceFrame): 13 1 14 2011-02-28 Patrick Gansterer <paroga@webkit.org> 2 15 -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r79555 r79873 285 285 if (resource.finished) { 286 286 // Resource is finished, bind the script right away. 287 resource._scriptsPendingResourceLoad = [script]; 288 this._resourceLoadingFinished({ target: resource }); 287 script.resource = resource; 288 289 // Add resource url to files select if not already added while debugging inlined scripts. 290 if (!(resource.url in this._sourceNameToFilesSelectOption)) 291 this._addOptionToFilesSelectAndShowSourceFrameIfNeeded(resource.url); 289 292 } else { 290 293 // Resource is not finished, bind the script later. … … 584 587 { 585 588 var sourceFrame = this._sourceNameToSourceFrame[sourceName]; 586 if (sourceFrame) 587 return sourceFrame; 588 589 return sourceFrame || this._createSourceFrame(sourceName); 590 }, 591 592 _createSourceFrame: function(sourceName) 593 { 589 594 var script = this._scriptForSourceName(sourceName); 590 595 var contentProvider; … … 615 620 return; 616 621 617 var newSourceFrame = this._ sourceFrameForSourceName(sourceName)622 var newSourceFrame = this._createSourceFrame(sourceName) 618 623 newSourceFrame.scrollTop = oldSourceFrame.scrollTop; 619 624 this.visibleView = newSourceFrame;
Note: See TracChangeset
for help on using the changeset viewer.