Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LayoutNG] Fix 1px failure in WebFrameTest
Unit tests WebFrameTest.MoveRangeSelectionExtent and MoveRangeSelectionExtentCannotCollapse currently fail with LayoutNG on Mac due to a 1px rounding difference when calculating caret rects (InlineTextBox::PositionForOffset() vs. NGPhysicalTextFragment::InlinePositionForOffset()). As the legacy caret rect rounding process is already very artificial, it's not worthy recovering exactly the same process in NG. Hence, this patch simply tweaks hit test coordinates in the unit tests to make them pass with LayoutNG. Bug: 591099 Change-Id: Ia0eb2ecdde0eb593ac72e010822e780720b930da Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612118 Commit-Queue: Emil A Eklund <eae@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#659853}
- Loading branch information