Closed Bug 1644956 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 24105 - [WIP] [LayoutNG] Move relative position calculation into NG.

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ian Kilpatrick <ikilpatrick@chromium.org> wrote:

[WIP] [LayoutNG] Move relative position calculation into NG.

This patch moves the relative position calculation into NG. Previously
we needed to manually account for the relative position of an object
in may different places, overflow calculation, geometry APIs etc.

This patch directly updates the child's offset (relative to its parent)
to directly incorporate this additional offset.

This calculation occurs within the NGBoxFragmentBuilder, and if an
object is placed by LayoutNG...
...LayoutBoxModelObject::RelativePositionOffset returns an empty offset.

This fixes a few small issues where previously we didn't resolve
percentages against the correct available size when contained within
an anonymous block.

Change-Id: I2c623b02cc5a4605d310596f5c60353a21236bff
Reviewed-on: https://chromium-review.googlesource.com/2214608
WPT-Export-Revision: 049292c9b27019e4e4963dd185d1866e4e9c2b75

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

CI Results

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

Total 5 tests

Status Summary

Firefox

PASS: 4
FAIL: 1

Chrome

PASS: 3
FAIL: 2

Safari

PASS: 3
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/css/css-position/position-relative-005.html: FAIL

New Tests That Don't Pass

/css/css-position/position-relative-005.html: FAIL (Chrome: PASS, Safari: PASS)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/742d39e63882
[wpt PR 24105] - [LayoutNG] Move relative position calculation into NG., a=testonly
https://hg.mozilla.org/integration/autoland/rev/085c189ce1dd
[wpt PR 24105] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.