[wpt-sync] Sync PR 13344 - [LayoutNG] Correct getClientRects for inlines in vertical-rl.

RESOLVED FIXED in Firefox 64

Status

()

enhancement
P4
normal
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: wptsync, Unassigned)

Tracking

unspecified
mozilla64
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

(Whiteboard: [wptsync downstream], )

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:
>  [LayoutNG] Correct getClientRects for inlines in vertical-rl.
>  
>  In LayoutInline::GenerateLineBoxRects(), when collecting rectangles, for
>  each rectangle, we need to flip its block axis offset, to make it
>  relative to the block-start of the container, because this is what's
>  expected by the callback.
>  
>  GenerateLineBoxRects() is used to implement Element.getClientRects()
>  (among other things). Added a test that used to fail with LayoutNG,
>  since this obviously lacked test coverage.
>  
>  Also had to fix LayoutText::AbsoluteQuadsForRange(), or
>  fast/writing-mode/flipped-blocks-text-map-local-to-container.html
>  would regress. It used to pass because getClientRects for a text node
>  and getClientRects for an inline (separate code paths) had the same bug.
>  
>  Also had to update NGPhysicalBoxFragment::AddSelfOutlineRects(). Now
>  that GenerateLineBoxRects() (called from LayoutInline::AddOutlineRects())
>  behaves consistently and always produces rectangles with the block offset
>  relative to the block-start of the container (rather than physical top or
>  left for NG), we need to flip vertical-rl rects to become purely physical
>  on our own.
>  
>  Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
>  Change-Id: I6a5d6ab6012c20b3a2fd943cb9cd3c6ee53bf052
>  
>  Reviewed-on: https://chromium-review.googlesource.com/1257917
>  WPT-Export-Revision: 7fa312a60cd47e8ecf258f8c265631646a44b541
Component: web-platform-tests → DOM: CSS Object Model
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Ran 1 tests
PASS   : 1
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/59b93f033ae0
[wpt PR 13344] - [LayoutNG] Correct getClientRects for inlines in vertical-rl., a=testonly
https://hg.mozilla.org/mozilla-central/rev/59b93f033ae0
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.