[wpt-sync] Sync PR 28312 - Avoid calling RecalcLayoutOverflow() in Document::UpdateStyle() always
Categories
(Core :: Layout: Scrolling and Overflow, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 28312 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/28312
Details from upstream follow.
b'Manuel Rego Casasnovas <rego@igalia.com>' wrote:
Avoid calling RecalcLayoutOverflow() in Document::UpdateStyle() always
We can avoid calling RecalcLayoutOverflow() in Document::UpdateStyle()
if the tree is marked as needing layout, as the layout itself
will compute it.
However we cannot reuse the cached LayoutResult if the element needs
to recalc layout overflow.This adds new tests that do two different things:
- Add/remove an element to the DOM. Which causes the tree to be marked
as needing layout.- Change a transform. Which marks things for layout overflow recalc.
So when Document::UpdateStyle() is called, we skip the call
to RecalcLayoutOverflow() (because it's marked for layout),
and then during layout we don't reuse the cached layout result
(because it's marked for recalc layout overflow),
otherwise we would get wrong results.TEST=external/wpt/css/css-overflow/scrollable-overflow-transform-dynamic-004.html
TEST=external/wpt/css/css-overflow/scrollable-overflow-transform-dynamic-005.htmlChange-Id: I6784339b37c142c724ae553be1ca1fd9bd77b234
Reviewed-on: https://chromium-review.googlesource.com/2795105
WPT-Export-Revision: 4b3f058adaf22534dfe20cc543ff96b591217720
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•3 years ago
|
Description
•