[LayoutNG] Implements Range.getClientRects and getBoundingClientRect
This patch implements Range.getClientRects and getBoundingClientRect by implemeting LayoutText::AbsoluteQuadsForRange, the underlying function to compute quads for a range of text. VisibleUnits and TouchAdjustment are other users of this function. crbug.com/698038 added some logic to clear the quad vector under specific condition for legacy, but the logic is a bit complicated. This patch tries to match to the spec without using the same logic. There may be a need to tweak the logic a little more, but the new logic seems to be more interoperable with Edge/Gecko. Bug: 636993, 755750 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: I5c6323680285a4e03d64109cd5681c788f6a6bbf Reviewed-on: https://chromium-review.googlesource.com/979732Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:
Emil A Eklund <eae@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#546079}
Showing
Please register or sign in to comment