[wpt-sync] Sync PR 28476 - Include custom properties on computed CSSStyleDeclaration
Categories
(Core :: DOM: CSS Object Model, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox90 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 28476 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/28476
Details from upstream follow.
b'Anders Hartvoll Ruud <andruud@chromium.org>' wrote:
Include custom properties on computed CSSStyleDeclaration
Since we need a "stable" list of custom properties for length()
and item(), and we also need not-abysmal performance when calling
those functions, this CL caches a vector with the variables names
on ComputedStyle itself.In CSSComputedStyleDeclaration::item(), we check if the incoming
index is in the range of the standard properties, and if so return
the appropriate one. Otherwise, we're in the variable range (which
is defined per spec to appear after the standard properties), and
we'll fetch the list of variable names.Unfortunately the inclusion of custom properties requires a clean
style, which means length()/item() now updates style/layout as needed.
This might cause performance regressions, but I don't see a way around
this.Note: ComputedStyle::StyleInheritedVariables/NonInheritedVariables
were changed to return const pointers, as to not "leak mutability",
which would have made it hard to invalidate the cache. (Nothing
requires those return values to be non-const after StyleCascade
anyway).Note: ComputedStyle::GetVariableNames() has pretty good test coverage
in ComputedStyleTest already. Added a couple of new ones that target
cache invalidation.Fixed: 949807
Change-Id: I6b181af5c4f025c4fd433de0a6ca221055c16693
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2822260
Commit-Queue: Anders Hartvoll Ruud \<andruud@chromium.org>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#872446}
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
CI Results
Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 2 subtests
Status Summary
Firefox
OK : 1
FAIL : 2
ERROR: 1
Chrome
OK : 2
PASS : 6
FAIL : 3
Safari
OK : 1
FAIL : 2
ERROR: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/css/css-typed-om/the-stylepropertymap/computed/computed.tentative.html: ERROR [GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt] (Chrome: OK, Safari: ERROR)
/css/cssom/cssstyledeclaration-registered-custom-properties.html
Registered custom properties are included in CSSComputedStyleDeclaration: FAIL (Chrome: FAIL, Safari: FAIL)
Only relevant custom properties are included: FAIL (Chrome: FAIL, Safari: FAIL)
Tests Disabled in Gecko Infrastructure
/css/css-typed-om/the-stylepropertymap/computed/computed.tentative.html: ERROR [GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt] (Chrome: OK, Safari: ERROR)
Comment 4•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4bc07eb6d697
https://hg.mozilla.org/mozilla-central/rev/75d77c813120
Description
•