Changeset 183375 in webkit
- Timestamp:
- Apr 26, 2015, 6:24:37 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r183352 r183375 1 2015-04-26 Timothy Hatcher <timothy@apple.com> 2 3 Web Inspector: Don't use treeElement.revealAndSelect when showing a default content view 4 https://bugs.webkit.org/show_bug.cgi?id=144239 5 6 Using revealAndSelect will end up calling WebInspector.showRepresentedObject. That is not bad 7 is most cases, but if the select tab supports the same represented object, it can end up showing 8 the content view in the wrong tab. 9 10 Reviewed by Darin Adler. 11 12 * UserInterface/Views/ContentBrowserTabContentView.js: 13 (WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar): 14 * UserInterface/Views/DebuggerSidebarPanel.js: 15 (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): 16 * UserInterface/Views/NavigationSidebarPanel.js: 17 (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement): 18 (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie): 19 (WebInspector.NavigationSidebarPanel): 20 (WebInspector.NavigationSidebarPanel.prototype.showContentViewForCurrentSelection): Deleted. 21 * UserInterface/Views/ResourceSidebarPanel.js: 22 (WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView): 23 (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): 24 (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): 25 (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): 26 1 27 2015-04-26 Jono Wells <jonowells@apple.com> 2 28 -
trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js
r183324 r183375 257 257 258 258 if (treeElement) 259 treeElement.revealAndSelect(true, false, false, true);259 treeElement.revealAndSelect(true, false, true, true); 260 260 else if (this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement) 261 261 this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement.deselect(true); -
trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
r183331 r183375 185 185 while (currentTreeElement && !currentTreeElement.root) { 186 186 if (currentTreeElement instanceof WebInspector.ResourceTreeElement || currentTreeElement instanceof WebInspector.ScriptTreeElement) { 187 currentTreeElement.revealAndSelect();187 this.showDefaultContentViewForTreeElement(currentTreeElement); 188 188 return; 189 189 } -
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js
r183331 r183375 174 174 } 175 175 176 showContentViewForCurrentSelection() 177 { 178 // Reselect the selected tree element to cause the content view to be shown as well. <rdar://problem/10854727> 179 var selectedTreeElement = this._contentTreeOutline.selectedTreeElement; 180 if (selectedTreeElement) 181 selectedTreeElement.select(); 176 showDefaultContentViewForTreeElement(treeElement) 177 { 178 console.assert(treeElement); 179 console.assert(treeElement.representedObject); 180 if (!treeElement || !treeElement.representedObject) 181 return; 182 this.contentBrowser.showContentViewForRepresentedObject(treeElement.representedObject); 183 treeElement.revealAndSelect(true, false, true, true); 182 184 } 183 185 … … 689 691 690 692 if (matchedElement) { 691 matchedElement.revealAndSelect();693 this.showDefaultContentViewForTreeElement(matchedElement); 692 694 693 695 delete this._pendingViewStateCookie; -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
r183339 r183375 86 86 var firstTreeElement = this.contentTreeOutline.children[0]; 87 87 if (firstTreeElement) 88 firstTreeElement.revealAndSelect();88 this.showDefaultContentViewForTreeElement(firstTreeElement); 89 89 } 90 90 … … 185 185 if (!treeElement) 186 186 treeElement = this._mainFrameTreeElement; 187 t reeElement.revealAndSelect(true, false, !!currentContentView, true);187 this.showDefaultContentViewForTreeElement(treeElement); 188 188 } 189 189 } … … 221 221 // NOTE: This selection, during provisional loading, won't be saved, so it is 222 222 // safe to do and not-clobber cookie restoration. 223 this. _mainFrameTreeElement.revealAndSelect(true, false);223 this.showDefaultContentViewForTreeElement(this._mainFrameTreeElement); 224 224 } 225 225 }
Note:
See TracChangeset
for help on using the changeset viewer.