Closed Bug 1496219 Opened 2 years ago Closed 2 years ago

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


(Core :: DOM: CSS Object Model, enhancement, P4)




Tracking Status
firefox64 --- fixed


(Reporter:, Unassigned)




(Whiteboard: [wptsync downstream])

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

Details from upstream follow.

Morten Stenshorne <> 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:
>  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
[wpt PR 13344] - [LayoutNG] Correct getClientRects for inlines in vertical-rl., a=testonly
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.