| Summary: | REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||
| Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Nikita Vasilyev
2019-04-05 19:52:50 PDT
It seems like there's logic in-place. However, it has been broken for years and maybe never even worked.
GeneralStyleDetailsSidebarPanel.js:
visibilityDidChange()
{
super.visibilityDidChange();
if (!this._panel)
return;
if (!this.visible) { // <-- NEVER PASSES!
this._panel.hidden();
return;
}
this._updateNoForcedPseudoClassesScrollOffset();
this._panel.shown();
this._panel.markAsNeedsRefresh(this.domNode);
}
So, what is this `visible` property and why is it always false there.
SidebarPanel.js:
get visible()
{
return this.selected && this.parentSidebar && !this.parentSidebar.collapsed;
}
Okay, the sidebar panel has to be selected to be visible.
Sidebar.js:
set selectedSidebarPanel(sidebarPanelOrIdentifierOrIndex)
{
var sidebarPanel = this.findSidebarPanel(sidebarPanelOrIdentifierOrIndex);
if (this._selectedSidebarPanel === sidebarPanel)
return;
if (this._selectedSidebarPanel) {
if (this._selectedSidebarPanel.visible) {
this._selectedSidebarPanel.hidden();
this._selectedSidebarPanel.visibilityDidChange(); // <-- `visible` is true because `selected` hasn't been set to false yet!
}
this._selectedSidebarPanel.selected = false;
}
Actually, this regressed 6 months ago in https://trac.webkit.org/changeset/237196/webkit. Created attachment 366895 [details]
Patch
Comment on attachment 366895 [details] Patch Clearing flags on attachment: 366895 Committed r243964: <https://trac.webkit.org/changeset/243964> All reviewed patches have been landed. Closing bug. |