Changeset 83577 in webkit
- Timestamp:
- Apr 12, 2011 4:38:11 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83575 r83577 1 2011-04-12 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: REGRESSION: Most resources in the Network panel show a blank panel when clicked. 6 https://bugs.webkit.org/show_bug.cgi?id=58273 7 8 * inspector/debugger/source-frame-expected.txt: 9 * inspector/debugger/source-frame.html: 10 1 11 2011-04-12 Pavel Feldman <pfeldman@google.com> 2 12 -
trunk/LayoutTests/inspector/debugger/source-frame-expected.txt
r79553 r83577 10 10 Running: testConsoleMessage 11 11 Message text: source-frame.html:10test error message 12 13 Running: testShowResource 12 14 Debugger was disabled. 13 15 -
trunk/LayoutTests/inspector/debugger/source-frame.html
r80356 r83577 42 42 next(); 43 43 } 44 }, 45 46 function testShowResource(next) 47 { 48 WebInspector.showPanel("network"); 49 50 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "show", didShowSourceFrame); 51 var resources = WebInspector.resourceTreeModel._resourcesByURL; 52 for (var url in resources) { 53 if (url.indexOf("debugger-test.js") !== -1) { 54 WebInspector.panels.network._showResource(resources[url], 1); 55 break; 56 } 57 } 58 59 function didShowSourceFrame() 60 { 61 next(); 62 } 44 63 } 45 64 ]); -
trunk/Source/WebCore/ChangeLog
r83576 r83577 1 2011-04-12 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: REGRESSION: Most resources in the Network panel show a blank panel when clicked. 6 https://bugs.webkit.org/show_bug.cgi?id=58273 7 8 * inspector/front-end/SourceFrame.js: 9 (WebInspector.SourceFrame): 10 (WebInspector.SourceFrame.prototype.get visible): 11 (WebInspector.SourceFrame.prototype.set visible): 12 (WebInspector.SourceFrame.prototype.show): 13 (WebInspector.SourceFrame.prototype.hide): 14 (WebInspector.SourceFrame.prototype.detach): 15 (WebInspector.SourceFrame.prototype._ensureContentLoaded): 16 (WebInspector.SourceFrame.prototype.markDiff): 17 (WebInspector.SourceFrame.prototype.addMessage): 18 (WebInspector.SourceFrame.prototype.clearMessages): 19 (WebInspector.SourceFrame.prototype.get scrollTop): 20 (WebInspector.SourceFrame.prototype.set scrollTop): 21 (WebInspector.SourceFrame.prototype.highlightLine): 22 (WebInspector.SourceFrame.prototype._clearLineHighlight): 23 (WebInspector.SourceFrame.prototype._initializeTextViewer): 24 (WebInspector.SourceFrame.prototype.performSearch): 25 (WebInspector.SourceFrame.prototype.searchCanceled): 26 (WebInspector.SourceFrame.prototype._jumpToSearchResult): 27 (WebInspector.SourceFrame.prototype.setExecutionLine): 28 (WebInspector.SourceFrame.prototype.clearExecutionLine): 29 (WebInspector.SourceFrame.prototype.resize): 30 1 31 2011-04-12 Pavel Feldman <pfeldman@google.com> 2 32 -
trunk/Source/WebCore/inspector/front-end/SourceFrame.js
r83438 r83577 39 39 this._textModel.replaceTabsWithSpaces = true; 40 40 41 this._textViewer = new WebInspector.TextViewer(this._textModel, WebInspector.platform, this._url, this); 42 this._visible = false; 43 41 44 this._currentSearchResultIndex = -1; 42 45 this._searchResults = []; … … 56 59 57 60 WebInspector.SourceFrame.prototype = { 61 get visible() 62 { 63 return this._textViewer.visible; 64 }, 65 66 set visible(x) 67 { 68 this._textViewer.visible = x; 69 }, 58 70 59 71 show: function(parentElement) 60 72 { 61 this._parentElement = parentElement;62 63 73 this._ensureContentLoaded(); 64 74 65 if (this._textViewer) { 75 this._textViewer.show(parentElement); 76 this._textViewer.resize(); 77 78 if (this.loaded) { 66 79 if (this._scrollTop) 67 80 this._textViewer.scrollTop = this._scrollTop; 68 81 if (this._scrollLeft) 69 82 this._textViewer.scrollLeft = this._scrollLeft; 70 this._textViewer.show(parentElement);71 this._textViewer.resize();72 83 } 73 84 }, … … 75 86 hide: function() 76 87 { 77 delete this._parentElement; 78 79 if (this._textViewer) { 88 if (this.loaded) { 80 89 this._scrollTop = this._textViewer.scrollTop; 81 90 this._scrollLeft = this._textViewer.scrollLeft; 82 91 this._textViewer.freeCachedElements(); 83 this._textViewer.hide();84 } 85 92 } 93 94 this._textViewer.hide(); 86 95 this._hidePopup(); 87 96 this._clearLineHighlight(); … … 90 99 detach: function() 91 100 { 92 delete this._parentElement; 93 94 if (this._textViewer) 95 this._textViewer.detach(); 101 this._textViewer.detach(); 96 102 }, 97 103 … … 115 121 if (!this._contentRequested) { 116 122 this._contentRequested = true; 117 this._requestContent(this._ createTextViewer.bind(this));123 this._requestContent(this._initializeTextViewer.bind(this)); 118 124 } 119 125 }, … … 126 132 markDiff: function(diffData) 127 133 { 128 if (this._diffLines && this. _textViewer)134 if (this._diffLines && this.loaded) 129 135 this._removeDiffDecorations(); 130 136 131 137 this._diffLines = diffData; 132 if (this. _textViewer)138 if (this.loaded) 133 139 this._updateDiffDecorations(); 134 140 }, … … 137 143 { 138 144 this._messages.push(msg); 139 if (this. _textViewer)145 if (this.loaded) 140 146 this.addMessageToSource(msg.line - 1, msg); 141 147 }, … … 151 157 this._rowMessages = {}; 152 158 this._messageBubbles = {}; 153 if (this._textViewer) 154 159 160 this._textViewer.resize(); 155 161 }, 156 162 … … 162 168 get scrollTop() 163 169 { 164 return this. _textViewer? this._textViewer.scrollTop : this._scrollTop;170 return this.loaded ? this._textViewer.scrollTop : this._scrollTop; 165 171 }, 166 172 … … 168 174 { 169 175 this._scrollTop = scrollTop; 170 if (this. _textViewer)176 if (this.loaded) 171 177 this._textViewer.scrollTop = scrollTop; 172 178 }, … … 174 180 highlightLine: function(line) 175 181 { 176 if (this. _textViewer)182 if (this.loaded) 177 183 this._textViewer.highlightLine(line); 178 184 else … … 182 188 _clearLineHighlight: function() 183 189 { 184 if (this. _textViewer)190 if (this.loaded) 185 191 this._textViewer.clearLineHighlight(); 186 192 else … … 284 290 }, 285 291 286 _createTextViewer: function(mimeType, content) 287 { 292 _initializeTextViewer: function(mimeType, content) 293 { 294 this._textViewer.mimeType = mimeType; 295 288 296 this._content = content; 289 297 this._textModel.setText(null, content); 290 291 this._textViewer = new WebInspector.TextViewer(this._textModel, WebInspector.platform, this._url, this);292 298 293 299 var element = this._textViewer.element; … … 303 309 this._textViewer.beginUpdates(); 304 310 305 this._textViewer.mimeType = mimeType;306 311 this._setTextViewerDecorations(); 307 312 … … 367 372 } 368 373 369 if (this. _textViewer)374 if (this.loaded) 370 375 doFindSearchMatches.call(this, query); 371 376 else … … 378 383 { 379 384 delete this._delayedFindSearchMatches; 380 if (!this. _textViewer)385 if (!this.loaded) 381 386 return; 382 387 … … 418 423 _jumpToSearchResult: function(index) 419 424 { 420 if (!this. _textViewer|| !this._searchResults.length)425 if (!this.loaded || !this._searchResults.length) 421 426 return; 422 427 this._currentSearchResultIndex = (index + this._searchResults.length) % this._searchResults.length; … … 459 464 { 460 465 this._executionLineNumber = lineNumber; 461 if (this. _textViewer) {466 if (this.loaded) { 462 467 this._textViewer.addDecoration(lineNumber, "webkit-execution-line"); 463 468 if (!skipRevealLine) … … 468 473 clearExecutionLine: function() 469 474 { 470 if (this. _textViewer)475 if (this.loaded) 471 476 this._textViewer.removeDecoration(this._executionLineNumber, "webkit-execution-line"); 472 477 delete this._executionLineNumber; … … 864 869 resize: function() 865 870 { 866 if (this._textViewer) 867 this._textViewer.resize(); 871 this._textViewer.resize(); 868 872 }, 869 873
Note: See TracChangeset
for help on using the changeset viewer.