RESOLVED FIXED195978
Web Inspector: Navigating to resource sometimes shows different resource
https://bugs.webkit.org/show_bug.cgi?id=195978
Summary Web Inspector: Navigating to resource sometimes shows different resource
Nikita Vasilyev
Reported 2019-03-19 17:26:53 PDT
Created attachment 365269 [details] [Video] Bug Steps: 1. Navigate to https://stackoverflow.com 2. Press Command-Shift-C and inspect some element 3. In the styles sidebar, click on "primary.css" link of one of the CSS rules. Expected: Resources tab shows "primary.css". Actual: Resources tab shows some other resource (the one selected by default?).
Attachments
[Video] Bug (4.72 MB, video/quicktime)
2019-03-19 17:26 PDT, Nikita Vasilyev
no flags
WIP (2.10 KB, patch)
2019-04-16 17:43 PDT, Nikita Vasilyev
nvasilyev: review-
nvasilyev: commit-queue-
Patch (3.87 KB, patch)
2019-04-16 19:25 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2019-03-19 17:27:11 PDT
Nikita Vasilyev
Comment 2 2019-04-16 16:59:06 PDT
I added console.trace inside of WI.ContentViewContainer.prototype.showContentView. When clicking on "SpreadsheetCSSStyleDeclarationSection.css" link in the styles sidebar, GeneralStyleDetailsSidebarPanel.css got selected instead. [Log] Trace: showContentView – "SpreadsheetCSSStyleDeclarationSection.css" showContentView (ContentViewContainer.js:90) showRepresentedObject (ContentBrowserTabContentView.js:231) tabChanged (Main.js:1331) showRepresentedObject (Main.js:1338) showSourceCode (Main.js:1380) showSourceCodeLocation (Main.js:1385) showSourceCodeLocation (Main.js:2869) showSourceCodeLocation [Log] Trace: showContentView – "GeneralStyleDetailsSidebarPanel.css" showContentView (ContentViewContainer.js:90) showDefaultContentViewForTreeElement (NavigationSidebarPanel.js:201:83) _checkElementsForPendingViewStateCookie (NavigationSidebarPanel.js:723) _treeElementAddedOrChanged (NavigationSidebarPanel.js:618) dispatch (Object.js:165) dispatchEventToListeners (Object.js:172) insertChild (TreeOutline.js:348) _insertChildTreeElement (FolderizedTreeElement.js:248) _addTreeElement (FolderizedTreeElement.js:218) addChildForRepresentedObject (FolderizedTreeElement.js:105) onpopulate (FrameTreeElement.js:167) expand (TreeElement.js:407) _attach (TreeElement.js:287) insertChild (TreeOutline.js:345) _mainFrameMainResourceDidChange (ResourceSidebarPanel.js:290) initialLayout (ResourceSidebarPanel.js:201) _layoutSubtree (View.js:283) _visitViewTreeForLayout (View.js:386) (showContentView was actually called 8 times (!), but these two items above are relevant to this bug.)
Nikita Vasilyev
Comment 3 2019-04-16 17:32:03 PDT
This could've regressed in https://trac.webkit.org/changeset/217750/webkit, because this is where _mainFrameMainResourceDidChange was moved to initialLayout. I'm not certain because simply undoing the patch breaks other things now.
Nikita Vasilyev
Comment 4 2019-04-16 17:43:47 PDT
Created attachment 367596 [details] WIP This could be the right solution. I'm looking if it breaks anything.
Nikita Vasilyev
Comment 5 2019-04-16 19:25:42 PDT
WebKit Commit Bot
Comment 6 2019-04-17 16:47:22 PDT
Comment on attachment 367600 [details] Patch Clearing flags on attachment: 367600 Committed r244412: <https://trac.webkit.org/changeset/244412>
WebKit Commit Bot
Comment 7 2019-04-17 16:47:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.