Closed Bug 2025618 Opened 2 months ago Closed 1 month ago

[wpt-sync] Sync PR 58417 - layout: Fix static position of abspos nested within a block-in-inline

Categories

(Core :: Layout: Positioned, task, P4)

task

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

vinayak sharma <vinayaks0111@gmail.com> wrote:

layout: Fix static position of abspos nested within a block-in-inline

Fixes incorrect static positioning of absolutely positioned elements nested within a block that has margin-top inside an inline element.
Added two lines of code to AnonymousBlockBox::layout_into_line_items in components/layout/flow/inline/mod.rs:

  • We snapshot the current positioning_context_length before laying out the block.
  • We call adjust_static_position_of_hoisted_fragments on the positioning_context after the block fragment is placed by the state.

Testing:
Tested the fix using the manual reproduction HTML provided in the issue, Also ran the existing WPT tests in tests/wpt/tests/css/css-position/ to ensure there are no regressions.

Fixes: #<!-- nolink -->42890

Reviewed in servo/servo#43084

Component: web-platform-tests → Layout: Positioned
Product: Testing → Core

CI Results

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

Total 339 tests

Status Summary

Firefox

OK : 104
PASS: 1[GitHub] 10[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 1321[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 1488[Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] 1495[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 1501[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 124[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 169[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 171[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 181[Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

  • /css/css-position/fixed-z-index-blend.html [wpt.fyi]: PASS [Gecko-linux2404-64-debug, Gecko-linux2404-64-opt], SKIP [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d87b4f048b3f https://hg.mozilla.org/integration/autoland/rev/90919e568173 [wpt PR 58417] - layout: Fix static position of abspos nested within a block-in-inline, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
You need to log in before you can comment on or make changes to this bug.