The `WI.View` layout system works from a top-down approach, meaning that parents call `layout()` before their children, which can sometimes prevent the parent from querying for values on the child (e.g. `WI.Table` rows or `WI.DataGrid` nodes) as they don't get created until the child calls `layout()`. Inside `WI.View.prototype._layoutSubtree`, we recursively iterate over the entire subtree rooted at the parent and call `layout()` for each view encountered. Since this entire operation is synchronous, we can add an `afterLayout` function that gets called at the end of `WI.View.prototype._layoutSubtree`, meaning that it will get called after all children have `layout()`.
Created attachment 353662 [details] Patch
Comment on attachment 353662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353662&action=review r=me > LayoutTests/ChangeLog:10 > + (TestPage.registerInitializer.WI.TestView.prototype.afterLayout): Added. r=me. Overall this looks good! I'm not sure about the method name though; what about didLayout, or didLayoutSubtree?
Created attachment 353673 [details] Patch
Comment on attachment 353673 [details] Patch Clearing flags on attachment: 353673 Committed r237720: <https://trac.webkit.org/changeset/237720>
All reviewed patches have been landed. Closing bug.
<rdar://problem/45752633>