Web Inspector: View should automatically layout when it becomes attached to the DOM
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Sep 2017 00:27:38 +0000 (00:27 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Sep 2017 00:27:38 +0000 (00:27 +0000)
commit52a76f62102530ea98e2786750ac2231d5fc89d9
tree7e8442e36d498dc26b841a47707a8d3d35c3db99
parent8ccd1910f5c20cd5fe1331e2b44bf76906147846
Web Inspector: View should automatically layout when it becomes attached to the DOM
https://bugs.webkit.org/show_bug.cgi?id=177189

Reviewed by Devin Rousso.

This guarantees that a layout is always scheduled as soon as a view is
attached to the DOM. Now that nearly all views are created lazily, it
is safe to make this change even without having a visibility concept in
the View class that would prevent layouts for background views.

* UserInterface/Views/View.js:
(WI.View):
Remove `this._needsLayoutWhenAttachedToRoot` flag, which is now implicit.
This was set if a layout was requested before the view had been attached
to the DOM.

(WI.View.prototype.get element):
(WI.View.prototype.get layoutPending):
(WI.View.prototype.get parentView):
(WI.View.prototype.get subviews):
(WI.View.prototype.get isAttached):
(WI.View.prototype.insertSubviewBefore):
(WI.View.prototype.removeSubview):
(WI.View.prototype.removeAllSubviews):
(WI.View.prototype.attached):
(WI.View.prototype.detached):
Hooks for subclasses to define behavior added or removed from the DOM.
(WI.View.prototype._didMoveToParent):
(WI.View.prototype._didMoveToWindow):
(WI.View._scheduleLayoutForView):
(WI.View.prototype.didMoveToWindow): Deleted.
(WI.View.prototype.didMoveToParent): Deleted.
These were only used by View, and have been made private.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/View.js