Closed Bug 1854475 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42098 - Revert "[anchor-position] Support margin properties in position fallback"

Categories

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

task

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Revert "[anchor-position] Support margin properties in position fallback"

This reverts commit 502912cd04e83f9d1ce1d8df50fc9778b57207e0.

Reason for revert: causing https://crbug.com/1485377

Original change's description:

[anchor-position] Support margin properties in position fallback

This patch makes margin properties (except margin-trim) allowed in a
@position-fallback rule, so that different fallback positions can use
different margins.

There's also some changes to getComputedStyle() implementation to
make it return the used margin values from fallback styles. To do so,
we unconditionally obtain the result from a LayoutBox if the current
object is a box. Since the result is available only after layout, this
patch also changes all margin properties on boxes to be layout
dependent, regardless of the computed margin values.

Note: This causes some rounding differences, as the result from
LayoutBox, which is the actual layout precision, has a fixed-point
precision of 1/64 px. Therefore, some tests are rebaselined.

Bug: 1475317
Change-Id: I4a3e242ceb04413db5348770b5cb666a54a1c9e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4819910
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Sami Kyöstilä \<skyostil@chromium.org>
Commit-Queue: Xiaocheng Hu \<xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1190240}

Bug: 1475317, 1485377
Change-Id: Ieb200c75919ad7ad67745519791fcb9473c24e9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4881060
Reviewed-by: Sami Kyöstilä \<skyostil@chromium.org>
Commit-Queue: Xiaocheng Hu \<xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1199388}

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

CI Results

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

Total 1 tests and 47 subtests

Status Summary

Firefox

OK : 1
FAIL: 47

Chrome

OK : 1
PASS: 42
FAIL: 5

Safari

OK : 1
FAIL: 47

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-anchor-position/at-fallback-position-allowed-declarations.html [wpt.fyi]
    • top: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • bottom: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • left: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • right: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset-block-start: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset-block-end: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset-inline-start: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset-inline-end: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset-block: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset-inline: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • width: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • height: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • block-size: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inline-size: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • min-width: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • min-height: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • min-block-size: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • min-inline-size: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • max-width: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • max-height: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • max-block-size: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • max-inline-size: 1px is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • justify-content: normal is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • align-content: normal is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • justify-items: normal is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • align-items: normal is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • justify-self: normal is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • align-self: normal is allowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • --custom: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • margin-left: 1px is disallowed in @fallback-position: FAIL (Chrome: FAIL, Safari: FAIL)
    • margin-right: 1px is disallowed in @fallback-position: FAIL (Chrome: FAIL, Safari: FAIL)
    • margin-top: 1px is disallowed in @fallback-position: FAIL (Chrome: FAIL, Safari: FAIL)
    • margin-bottom: 1px is disallowed in @fallback-position: FAIL (Chrome: FAIL, Safari: FAIL)
    • margin: 1px is disallowed in @fallback-position: FAIL (Chrome: FAIL, Safari: FAIL)
    • font-size: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • border-width: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • padding: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • display: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • position: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • float: 1px is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • top: revert is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • top: revert-layer is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset: revert is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset: revert-layer is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • top: 1px !important is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
    • inset: 1px !important is disallowed in @fallback-position: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by csabou@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/cf14e12c4aa3 [wpt PR 42098] - Revert "[anchor-position] Support margin properties in position fallback", a=testonly https://hg.mozilla.org/mozilla-central/rev/bac0c378e350 [wpt PR 42098] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.