| Summary: | checking for margin-top computed style can trigger ASSERT(!needsLayout()) in RenderBox::hasTrimmedMargin | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sammy Gill <sgill26> | ||||
| Component: | Layout and Rendering | Assignee: | Sammy Gill <sgill26> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Pull request: https://github.com/WebKit/WebKit/pull/12273 Committed 262679@main (beefa0360c1e): <https://commits.webkit.org/262679@main> Reviewed commits have been landed. Closing PR #12273 and removing active labels. |
Created attachment 465720 [details] Testcase Trying to check an element's margin-top property before layout happens can trigger a !needsLayout assert. This is because isLayoutDependent will return false if the flexbox does not have margin-trim specified and would result in calling box->hasTrimmedMargin. Before calling box->hasTrimmedMargin( we should check for the same conditions in the isLayoutDependent code.