Closed Bug 1674263 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 26333 - [LayoutNG] Use offsets relative to the block flow when using legacy APIs.

Categories

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

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Morten Stenshorne <mstensho@chromium.org>' wrote:

[LayoutNG] Use offsets relative to the block flow when using legacy APIs.

We still use the legacy layout engine APIs when calculating offsets
relative to some ancestor (needed by DOM APIs such as offsetLeft,
offsetTop and getClientRects()). This means that we cannot use offsets
relative to the containing box fragment. We need to make them relative
to the containing LayoutBlockFlow instead, or machineries such as
LayoutObject::MapLocalToAncestor() will fail when in block
fragmentation.

Also fixed an issue in the NG-to-legacy-writeback code. It was wrong for
RTL, since we used the inline-size of the column (rather than that oof
the column set) when converting between logical and physical offsets.
This alone doesn't fix any existing tests, but it is needed by the new
tests added in this CL, and also helps fix a couple of the existing
tests that now pass.

Also move one ContainingBlockFlowFragmentOf() call out of the way (we
get nullptr when block-fragmented). Moved it into paint fragment-specific
code, which was the only code that needed it.

Bug: 829028
Change-Id: Ib19b11ecfdd47cdd77aed41c6935be86004fe166
Reviewed-on: https://chromium-review.googlesource.com/2508590
WPT-Export-Revision: 5a1d5224b5d2ee5ed298584c617ee40bea0b91e8

Component: web-platform-tests → Layout: Columns
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 2 tests and 6 subtests

Status Summary

Firefox

OK : 2
PASS: 12

Chrome

OK : 2
PASS: 6
FAIL: 6

Safari

OK : 2
PASS: 12

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f28ee422a4d5 [wpt PR 26333] - [LayoutNG] Use offsets relative to the block flow when using legacy APIs., a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.