Closed
Bug 1467861
Opened 7 years ago
Closed 7 years ago
[wpt-sync] Sync PR 11420 - CSS Typed OM: Proper types for custom props during iteration.
Categories
(Core :: DOM: CSS Object Model, enhancement, P4)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla63
| Tracking | Status | |
|---|---|---|
| firefox63 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 11420 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/11420
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
> CSS Typed OM: Proper types for custom props during iteration.
>
> Currently, you get CSSUnparsedValues when iterating entries on the
> .computedStyleMap(), even for properties which are registered with a
> type. However, if you do .computedStyleMap().get(...) with a registered
> property, you _do_ get the correct type.
>
> This is because ComputedStyleCSSValueMapping::Get properly looks up the
> typed values on the ComputedStyle, but ::GetVariables does not; instead it
> directly returns the CSSVariableData for everything, regardless of
> registrations.
>
> This patch changes the behavior of iteration to use the same code path
> as .get(). This ensures that we either create a CSSCustomProperty-
> Declaration on the fly for unregistered properties, or we re-use the
> existing (and typed) CSSValue for registered properties.
>
> Note: I initially wanted to do a nested iterator thing here, but dropped
> it because we would anyway need a temp HashSet to avoid potential
> duplicates from the StyleInheritedVariables-root.
>
> Note: One caller of GetVariables() just wants the size. It's possibly a
> little overkill to create entire HashMap just to count something,
> but I don't want to resolve that here in the same patch.
>
> R=futhark@chromium.org, haraken@chromium.org
>
> Bug: 850072
> Change-Id: I64bfb3cc22a377cf956420a9e64d47ca3daac1e2
> Reviewed-on: https://chromium-review.googlesource.com/1090848
> Reviewed-by: Rune Lillesveen <futhark@chromium.org>
> Commit-Queue: Anders Ruud <andruud@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#565605}
>
| Assignee | ||
Updated•7 years ago
|
Component: web-platform-tests → DOM: CSS Object Model
Product: Testing → Core
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=99f5caf00ab3cc8ed1f530a7f7d9cbdd28d078ac
| Assignee | ||
Comment 3•7 years ago
|
||
Ran 1 tests and 5 subtests
OK : 1
PASS : 5
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/84a6bcf40bef
[wpt PR 11420] - CSS Typed OM: Proper types for custom props during iteration., a=testonly
Comment 5•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•