Remove DCHECK from NGPhysicalBoxFragment::PositionForPoint().
We *should* indeed consider moving the code for handling hits outside of atomic inlines, but NGPhysicalBoxFragment::PositionForPoint() isn't the right place for it. If we have an inline-block with a child text node that overflows it, and we hit such overflowing text, we'll perform NGPhysicalBoxFragment::PositionForPoint() directly on the inline block (from HitTestResult::GetPosition()), even if it's the text that we hit. We cannot require that we are within the border box of the inline-block in such cases. This check needs to be performed before entering non-atomic inline children - probably in NGInlineCursor::PositionForPointInChild(). At some point, that code should stop calling LayoutObject::PositionForPoint(), and rather call NGPhysicalBoxFragment::PositionForPoint(). That would be a good time to clean up this. Bug: 1155948 Change-Id: I0391f87d4bbf97c7cdd6a15ab2648aefa2d2abbc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577199Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#834365}
Showing
Please register or sign in to comment