Closed Bug 1824172 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 39165 - [anchor-position] Stop adjusting ComputedStyle for anchor queries

Categories

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

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

[anchor-position] Stop adjusting ComputedStyle for anchor queries

anchor() and anchor-size() should be invalid on other elements.
This patch changes the ensuring of this to used value time instead
of computed value time, so that they still cascade as normal.

This is ensured by making the property getters protected on ComputedStyleBase, which forces all callers (with a few exceptions)
to use the new ComputedStyle::UsedFoo() getters.

The exceptions are the new friend classes in ComputedStyle:

  • LengthPropertyFunctions: this class is for animations only,
    and animations should use the original computed value.
  • StyleResolverTest: for convenience in unit tests

The downside is that we now create a copy of the Length object
when accessing these properties. MotionMark result suggests that
this has no performance impact.

Bug: 1382151
Change-Id: Ie1a8dcfeed92b79161f99fccec8d41b4e4115738
Reviewed-on: https://chromium-review.googlesource.com/4363721
WPT-Export-Revision: eb1598d63e4b8c353f67ea2a8ccff91002016fec

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 1 tests and 4 subtests

Status Summary

Firefox

OK : 1
FAIL: 4

Chrome

OK : 1
FAIL: 4

Safari

OK : 1
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f0ab2c974521 [wpt PR 39165] - [anchor-position] Stop adjusting ComputedStyle for anchor queries, a=testonly https://hg.mozilla.org/integration/autoland/rev/d03ec43be82b [wpt PR 39165] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.