Closed Bug 1653673 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 24648 - Reland "[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

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Ian Kilpatrick <ikilpatrick@chromium.org> wrote:

Reland "[LayoutNG] Move relative position calculation into NG."

This reverts commit d73ae868f77e2589c7a563147722c9771bc91717.

The issue which caused the bot failures was due to a difference in
logic between 32bit, and 64bit arch. See:
https://chromium-review.googlesource.com/c/chromium/src/+/2304143

This patch has remained unchanged except for part which landed before
to fix another unrelated issue. See:
https://chromium-review.googlesource.com/c/chromium/src/+/2304659

Original change's description:

Revert "[LayoutNG] Move relative position calculation into NG."

This reverts commit 27880cb4012f7a84f7921c1bc3f023211eb032ea.

Reason for revert:

Suspect of blink_web_tests failures in a lot of bots, like this one:

https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Win10/70261

Unexpected Failures:

  • fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html
  • fast/css/relative-positioned-block-nested-with-inline-parent.html
  • paint/invalidation/compositing/composited-float-under-composited-inline-individual.html
  • paint/invalidation/compositing/composited-float-under-composited-inline.html
  • paint/invalidation/compositing/stacked-float-under-composited-inline.html

Original change's description:

[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 many 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.

Bug: 1070822, 1058690
Change-Id: I2c623b02cc5a4605d310596f5c60353a21236bff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214608
Commit-Queue: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Xianzhu Wang \<wangxianzhu@chromium.org>
Reviewed-by: Morten Stenshorne \<mstensho@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787991}

TBR=yosin@chromium.org,wangxianzhu@chromium.org,kojii@chromium.org,ikilpatrick@chromium.org,yosin@google.com,mstensho@chromium.org

Change-Id: I5ca67701222509693d3020fa068c279cef39ecbb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1070822, 1058690
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2296628
Reviewed-by: Jian Li \<jianli@chromium.org>
Commit-Queue: Jian Li \<jianli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788228}

Bug: 1070822, 1058690
Change-Id: I85a51c06d47c9eb451e8e7b77418913e288b7758

Reviewed-on: https://chromium-review.googlesource.com/2300667
WPT-Export-Revision: 6aa0751bf6e28c251b18146913b07dcfe53d9004

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/96cd7f47000f
[wpt PR 24648] - Reland "[LayoutNG] Move relative position calculation into NG.", a=testonly
https://hg.mozilla.org/integration/autoland/rev/d417aace1bdd
[wpt PR 24648] - 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.