RESOLVED FIXED 191176
Web Inspector: View: introduce a didLayoutSubtree
https://bugs.webkit.org/show_bug.cgi?id=191176
Summary Web Inspector: View: introduce a didLayoutSubtree
Devin Rousso
Reported 2018-11-01 16:44:29 PDT
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()`.
Attachments
Patch (3.89 KB, patch)
2018-11-01 17:01 PDT, Devin Rousso
no flags
Patch (4.21 KB, patch)
2018-11-01 18:37 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2018-11-01 17:01:18 PDT
Matt Baker
Comment 2 2018-11-01 17:36:08 PDT
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?
Devin Rousso
Comment 3 2018-11-01 18:37:10 PDT
WebKit Commit Bot
Comment 4 2018-11-01 21:12:04 PDT
Comment on attachment 353673 [details] Patch Clearing flags on attachment: 353673 Committed r237720: <https://trac.webkit.org/changeset/237720>
WebKit Commit Bot
Comment 5 2018-11-01 21:12:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-11-01 21:13:18 PDT
Note You need to log in before you can comment on or make changes to this bug.