[LayoutNG] Fix selection issue when ending in legacy object
Previously HitTestResult::LocalPoint() is in pure physical coordinates if the result is produced by LayoutNG, while is in flipped physical coordinates produced by Legacy. We tried to use it as pure physical in LayoutNG and flipped in Legacy in PositionForPoint, but failed when it is passed between Legacy and LayoutNG, especially in the case when it's passed through LayoutObject hierarchy where is unclear about the Legacy and LayoutNG boundary. This CL makes HitTestResult::LocalPoint() always in flipped physical coordinates, and let LayoutObject::PositionForPoint() always accept flipped physical coordinates (including LayoutNG objects), and flip the point when needed. This CL is temporary because future CLs will change HitTestResult::LocalPoint() and LayoutObject::PositionForPoint() always physica, but those CLs are too big to fix the bug in M76. Bug: 966731 Change-Id: I19e0cd392d2a92bd0f5467c6fc816dfa86f94933 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1643911 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#666428}
Showing
Please register or sign in to comment