Summary: Unfocusing / Focusing inspector window should not change ContentView Steps to Reproduce: 1. Inspect any page 2. Show Debugger Tab 3. Select a few different resources in sidebar 4. Click outside Inspector Window 5. Click back inside Inspector Window => Resource unexpectedly changed to the previous resource Notes: - This is almost certainly a regression.
<rdar://problem/28479562>
This is being caused by the tree getting the focus, and reselecting the previously selected tree element.
Created attachment 289860 [details] Patch
Comment on attachment 289860 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289860&action=review > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:654 > + previousSelectedTreeElement = previousSelectedTreeElement.traverseNextTreeElement(skipUnrevealed, this); If we are iterating forwards, then you should use a new variable name. I got confused. > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:-660 > - deselectedElement.treeOutline[WebInspector.NavigationSidebarPanel.PreviousSelectedTreeElementSymbol] = deselectedElement; It would be helpful to explain in the changelog why this is wrong. Is is because deselectedElement is null when the window gets focus?
Created attachment 289881 [details] Patch
Comment on attachment 289881 [details] Patch r=me
Comment on attachment 289881 [details] Patch Clearing flags on attachment: 289881 Committed r206442: <http://trac.webkit.org/changeset/206442>
All reviewed patches have been landed. Closing bug.