[css-pseudo] Fix hit-testing for nested ::marker
Since r731964, if you clicked a ::marker originated by a ::before or ::after, and you read the 'path' property of the event, the first node in the array might be the ::before or ::after pseudo-element. Actually it was fine if you clicked the contents (text or image) of the ::marker. But it's possible to make the ::marker taller than its contents by setting a big 'line-height'. Then you could click inside the ::marker but outside its contents, and reproduce the problem. That was wrong, as described in pseudo_element.h, > Pseudo element are not allowed to be the inner node for hit testing. This patch fixes it by making PseudoElement::InnerNodeForHitTesting iterate ancestors until it finds one which is not a pseudo-element. Bug: 1048000, 457718 TEST=external/wpt/css/css-pseudo/marker-hit-testing.html Some checks fail in legacy because the marker ignores 'line-height'. Change-Id: I7bed7d0824638b0c7f4b63a744a3ca4978285445 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2030973Reviewed-by:Rune Lillesveen <futhark@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/master@{#737720}
Showing
Please register or sign in to comment