Make hit testing after ::after content works correctly
This patch changes |NGInlineCursor::PositionForPointInInlineBox()| to ignore pseudo element and layout generated text, e.g. ellipsis, and style generated text, "content" in ::before/::after, to handle clicking right of content of ::after correctly. Before this patch, |closest_child_before| (point) holds fragment item for value of CSS "content" in |PositionForPointInInlineBox()|, then |PositionForPointInInlineBox()| returns null position because style generated text is not DOM position. After this patch, |closest_child_because| (point) holds fragment item for last layout object having non-null |GetNode()| before pseudo element ::after. Bug: 1164974 Change-Id: Iaba2f0807c345b13463b956e009b730449121096 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627242 Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#843942}
Showing
Please register or sign in to comment