RESOLVED FIXED 158069
Web Inspector: sometimes reloading a page with main resource selected will show an empty content view
https://bugs.webkit.org/show_bug.cgi?id=158069
Summary Web Inspector: sometimes reloading a page with main resource selected will sh...
Blaze Burg
Reported 2016-05-25 06:36:55 PDT
STEPS TO REPRODUCE: 0. Go to http://bl.ocks.org/syntagmatic/raw/6c149c08fc9cde682635/iridium-33-debris.html 1. Open Resources tab. 2. Select the main resource (iridium-33-debris.hmtl) 3. Reload with Cmd-R EXPECTED: The main resource tree element is re-selected when available and shows its HTML in editor ACTUAL: A blank content view is shown about 50% of the time. NOTES: Whether it reprouces or not seems related to resource load ordering. Try clearing caches between loads if it doesn't repro.
Attachments
[PATCH] Proposed Fix (4.83 KB, patch)
2016-07-05 18:47 PDT, Joseph Pecoraro
timothy: review+
Joseph Pecoraro
Comment 1 2016-05-25 11:13:20 PDT
I've noticed this too. I think it has to do with a background tab, thinking it is visible, steals the SourceCodeTextEditor from the actual visible tab... I haven't verified this yet though.
Joseph Pecoraro
Comment 2 2016-05-25 11:13:54 PDT
I have that suspicious because I think switching tabs and switching back fixes the issue.
Blaze Burg
Comment 3 2016-05-27 07:18:43 PDT
Ping for import.
Radar WebKit Bug Importer
Comment 4 2016-05-27 07:22:54 PDT
Timothy Hatcher
Comment 5 2016-06-07 10:28:17 PDT
*** Bug 158402 has been marked as a duplicate of this bug. ***
Joseph Pecoraro
Comment 6 2016-07-05 18:47:54 PDT
Created attachment 282834 [details] [PATCH] Proposed Fix This isn't an ideal fix, but it addresses this situation and didn't introduce any regressions with my testing.
Timothy Hatcher
Comment 7 2016-07-05 20:26:50 PDT
Comment on attachment 282834 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=282834&action=review > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:213 > + if (WebInspector.navigationSidebar.selectedSidebarPanel !== this) { Do sidebar panels have a parent property? Could this be if (this.selected) or if (this.parent.selectedSidebarPanel === this)? That would avoid the layer violation.
Timothy Hatcher
Comment 8 2016-07-06 10:53:04 PDT
Comment on attachment 282834 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=282834&action=review >> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:213 >> + if (WebInspector.navigationSidebar.selectedSidebarPanel !== this) { > > Do sidebar panels have a parent property? Could this be if (this.selected) or if (this.parent.selectedSidebarPanel === this)? That would avoid the layer violation. Now that I can look at the code, this should be written as: if (this.selected) Or if (this.parentSidebar.selectedSidebarPanel === this)
Joseph Pecoraro
Comment 9 2016-07-06 13:17:37 PDT
(In reply to comment #8) > Comment on attachment 282834 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282834&action=review > > >> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:213 > >> + if (WebInspector.navigationSidebar.selectedSidebarPanel !== this) { > > > > Do sidebar panels have a parent property? Could this be if (this.selected) or if (this.parent.selectedSidebarPanel === this)? That would avoid the layer violation. > > Now that I can look at the code, this should be written as: > > if (this.selected) Much better!
Joseph Pecoraro
Comment 10 2016-07-06 13:25:17 PDT
Note You need to log in before you can comment on or make changes to this bug.