Closed Bug 1631732 Opened 4 months ago Closed 3 months ago

[wpt-sync] Sync PR 23135 - [@property] Determine the registration

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 23135 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/23135
Details from upstream follow.

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[@property] Determine the registration

The current behavior for dealing with multiple registrations on the
same custom property was highly temporary, and not based on any spec.
The spec has since been updated to describe how it should work:
in short, registrations originating from CSS.registerProperty are
stored independently from those originating from @property, and
CSS.registerProperty-registrations (if present) win over @property-
registrations.

Changes in this CL:

  • Separates storage for CSS.registerProperty-registrations
    (registered_properties_) and @property-registrations
    (declared_properties_). The old code put @property registrations
    in the same map as CSS.registerProperty-registrations, and only
    if no registration exited already. (Meaning for example that the
    first @property seen would win---opposite of how it's spec'd to
    work now).
  • Determines the registration [1] correctly. I.e. first checks the
    the CSS.registerProperty-registrations, and the @property ones.
  • Adds an iterator which yields the currently active registrations
    across both registration types. (I wanted to do this separately,
    but initial values won't work properly without it, and there's a
    test that relies heavily on that being functional).

Note that it's not explicitly stated in the spec that the storage for
the two registration types shall be separate, but that is the
background for the current spec text on the subject. The rationale is
that it makes it easier to reason about which registration is the
current one when @property rules can appear and disappear via JS.
It's also expected that CSS.unregisterProperty will be added in the
future, making the situation even more unstable.

[1] https://drafts.css-houdini.org/css-properties-values-api-1/#determining-registration

Bug: 973830
Change-Id: I69b48629034b333ebed5d374f943d08b39579334
Reviewed-on: https://chromium-review.googlesource.com/2157071
WPT-Export-Revision: bdb73dce5d94834156b6a5202f4205d8dafaa905

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 13 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 60 tests

Status Summary

Firefox

PASS : 59
ERROR: 1

Chrome

OK : 1
PASS : 2
FAIL : 3

Safari

ERROR: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-properties-values-api/determine-registration.html: ERROR (Chrome: OK, Safari: ERROR)

CI Results

Ran 13 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 60 tests

Status Summary

Firefox

PASS : 59
ERROR: 1

Chrome

OK : 1
PASS : 2
FAIL : 3

Safari

ERROR: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-properties-values-api/determine-registration.html: ERROR (Chrome: OK, Safari: ERROR)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f60c9938cf2
[wpt PR 23135] - [@property] Determine the registration, a=testonly
https://hg.mozilla.org/integration/autoland/rev/fd93207f2bda
[wpt PR 23135] - Update wpt metadata, a=testonly
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/11570b6989c7
[wpt PR 23135] - [@property] Determine the registration, a=testonly
https://hg.mozilla.org/integration/autoland/rev/1b2a09e3b472
[wpt PR 23135] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.