Handle atomic inlines correctly in NG PositionForPoint().
When an atomic inline is the closest element, but we're not *inside* it, we shouldn't look for stuff inside it, either. (Note that the change here in LayoutBlock::PositionForPoint() will make us enter PositionForPointIfOutsideAtomicInlineLevel() also for (inline) tables, since the atomic inline check has been moved before the table check. This doesn't make much of a difference, though, since LayoutBox::PositionForPoint() already has special code for tables, which does pretty much exactly the same as PositionForPointIfOutsideAtomicInlineLevel()). The test included here used to fail with LayoutNGFullPositionForPoint enabled, in the inline-flex case, but also in the inline-table case, if LayoutNGTable is enabled in addition. This also fixes GranularityStrategyTest.UpdateExtentWithNullPositionForCharacter and GranularityStrategyTest.UpdateExtentWithNullPositionForDirectional on Android and Windows (when LayoutNGFullPositionForPoint is enabled). Bug: 1150362 Change-Id: Ied71317aaaa8e380600461436ee979a56b5a4584 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2552866 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#831026}
Showing
Please register or sign in to comment