Changeset 84492 in webkit
- Timestamp:
- Apr 21, 2011 6:46:56 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84490 r84492 1 2011-04-21 Pavel Feldman <pfeldman@google.com> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: implement Go To Line for network panel. 6 https://bugs.webkit.org/show_bug.cgi?id=59090 7 8 * inspector/front-end/GoToLineDialog.js: 9 (WebInspector.GoToLineDialog.prototype._highlightSelectedLine): 10 * inspector/front-end/NetworkItemView.js: 11 (WebInspector.NetworkItemView.prototype._tabSelected): 12 (WebInspector.NetworkItemView.prototype._installHighlightSupport): 13 * inspector/front-end/NetworkPanel.js: 14 (WebInspector.NetworkPanel): 15 * inspector/front-end/TabbedPane.js: 16 (WebInspector.TabbedPane.prototype.appendTab): 17 (WebInspector.TabbedPane.prototype.selectTab): 18 * inspector/front-end/TextViewer.js: 19 (WebInspector.TextViewer.prototype.highlightLine): 20 1 21 2011-04-21 Nikolas Zimmermann <nzimmermann@rim.com> 2 22 -
trunk/Source/WebCore/inspector/front-end/GoToLineDialog.js
r84484 r84492 46 46 this._input.setAttribute("type", "text"); 47 47 this._input.setAttribute("size", 6); 48 var linesCount = view.textModel.linesCount;49 if (linesCount)50 this._input.setAttribute("title", WebInspector.UIString("1 - %d", linesCount));51 48 var blurHandler = this._onBlur.bind(this); 52 49 this._input.addEventListener("blur", blurHandler, false); … … 132 129 var value = this._input.value; 133 130 var lineNumber = parseInt(value, 10) - 1; 134 if (!isNaN(lineNumber) && lineNumber >= 0) { 135 lineNumber = Math.min(lineNumber, this._view.textModel.linesCount - 1); 131 if (!isNaN(lineNumber) && lineNumber >= 0) 136 132 this._view.highlightLine(lineNumber); 137 }138 133 } 139 134 }; -
trunk/Source/WebCore/inspector/front-end/NetworkItemView.js
r81878 r84492 90 90 _tabSelected: function(event) 91 91 { 92 WebInspector.settings.resourceViewTab = event.data.tabId; 92 if (event.data.isUserGesture) 93 WebInspector.settings.resourceViewTab = event.data.tabId; 94 this._installHighlightSupport(event.data.view); 95 }, 96 97 _installHighlightSupport: function(view) 98 { 99 if (typeof view.highlightLine === "function") 100 this.highlightLine = view.highlightLine.bind(view); 101 else 102 delete this.highlightLine; 93 103 }, 94 104 -
trunk/Source/WebCore/inspector/front-end/NetworkPanel.js
r84484 r84492 85 85 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceFinished, this._onResourceUpdated, this); 86 86 WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.FrameCommittedLoad, this._onFrameCommitLoad, this); 87 88 this.registerShortcuts(); 87 89 } 88 90 -
trunk/Source/WebCore/inspector/front-end/TabbedPane.js
r72655 r84492 48 48 this._contentElement.appendChild(view.element); 49 49 50 this._tabs[id] = { tabElement: tabElement, view: view } 50 this._tabs[id] = { tabElement: tabElement, view: view }; 51 51 }, 52 52 … … 64 64 this._showTab(tab); 65 65 this._currentTab = tab; 66 if (userGesture) { 67 var event = {tabId: id}; 68 this.dispatchEventToListeners("tab-selected", event); 69 } 66 var event = {tabId: id, view: tab.view, isUserGesture: userGesture}; 67 this.dispatchEventToListeners("tab-selected", event); 70 68 return true; 71 69 }, -
trunk/Source/WebCore/inspector/front-end/TextViewer.js
r84136 r84492 109 109 highlightLine: function(lineNumber) 110 110 { 111 lineNumber = Math.min(lineNumber, this._textModel.linesCount - 1); 111 112 this._mainPanel.highlightLine(lineNumber); 112 113 },
Note: See TracChangeset
for help on using the changeset viewer.