[Webkit-unassigned] [Bug 175728] Web Inspector: Create experimental Layers tab
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 23 11:14:44 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=175728
--- Comment #10 from Ross Kirsling <ross.kirsling at sony.com> ---
(In reply to Devin Rousso from comment #8)
> Comment on attachment 318641 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=318641&action=review
>
> > Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js:34
> > + WI.layerTreeManager.addEventListener(WI.LayerTreeManager.Event.LayerTreeDidChange, this._layerTreeDidChange, this);
>
> This listener needs to be removed when the ContentView is closed().
>
> Additionally, this event is going to be firing whenever the view is not
> visible. It might be better to move the add/remove of this event listener
> to shown()/hidden(). As far as I understand, layout() should be called when
> shown() gets called, so you're already going to redraw anyways.
>
> > Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js:36
> > + this._layersChangedWhileHidden = false;
>
> Along the lines of the previous comment, moving the event listener to
> shown()/hidden() will remove the need for this variable.
These are actually brand-new changes from after WIP Patch #4, and serve to address two issues that I was facing with the shown()/hidden() approach (which you reviewed at that time).
Issue #1 is that a Dirty layout() doesn't occur when a tab is restored from a previous inspector session. Issue #2 is that LayerTreeDidChange would be ignored if we get a new document while a different inspector tab is being viewed and then return to Layers. _layersChangedWhileHidden fixes both of these issues.
I can certainly add a removeEventListener in closed() if you'd like. The reason I didn't is because it seems like most View classes that call addEventListener from the constructor do not bother to call removeEventListener (presumably due to implicit destruction in JS).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170823/667c6f03/attachment.html>
More information about the webkit-unassigned
mailing list