[wpt-sync] Sync PR 33929 - Avoiding writing layout-modified ComputedStyle back to Node
Categories
(Core :: Layout: Tables, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 33929 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/33929
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
Avoiding writing layout-modified ComputedStyle back to Node
The base-computed-style-optimization expects that the cached base
style (as produced by StyleResolver) is the same style we would get
if we produced the style from scratch. However, this assumption does
not hold for certain legacy LayoutObjects, where the ComputedStyle
is modified outside of style recalc, during DidStyleChange,.Writing that modified ComputedStyle back to the Node also a
correctness issue: we end up with the wrong output from
getComputedStyle.This CL changes non-TextAutoSizer calls of
SetModifiedStyleOutsideStyleRecalc (writes ComputedStyle back to
Node), to just SetStyle (does not write ComputedStyle back to Node).In order to ensure that we don't skip a critical DidStyleChange call,
we force ApplyStyleChanges::kYes during Element::RecalcOwnStyle, if
the LayoutObject::SetStyle happens on a relevant legacy LayoutObject
under the conditions that would require a style-fixup in
DidStyleChange. Duplicating those conditions there is not ideal, but
that problem will automatically go away once the legacy code is
removed.Fixed: 1307976
Change-Id: I8461c9d53e6e316f1bcd8a0002640b56b4cf0f87
Reviewed-on: https://chromium-review.googlesource.com/3620574
WPT-Export-Revision: 62383a4355272f308785debc8085587b606d34bf
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Safari on GitHub CI
Total 2 tests and 5 subtests
Status Summary
Safari
OK
: 2
PASS
: 5
FAIL
: 1
Description
•