Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[block-in-inline] Fix hit-testing when inline box is not culled #32997

Merged
merged 1 commit into from Feb 27, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 27, 2022

This patch fixes hit-testing block-in-inline when the inline
box is not culled. This issue was originally reported at
crbug.com/1300205, but also affects crrev.com/c/3486321 for
crbug.com/1301136.

Two logic changes are included:

  1. Hit-testing should ignore opaque inline boxes. The
    |IsOpaque| flag was added in r908729 crrev.com/c/3066831
    because inline boxes that wraps block-in-inline are not
    visible to layout and paint except some paint effects.
  2. r925189 crrev.com/c/3181220 hit-tests block-backgrounds
    while in the foreground phase. This resulted ignoring
    floats, because floats are between foreground and block
    background. https://drafts.csswg.org/css2/#painting-order
    This patch reverts the change.

Note that the change 1 does not apply to list-based hit-
testing. This is needed for:
external/wpt/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
when the inline with block children is not culled (crrev.com/c/3486321).

Bug: 1300205, 1301136
Change-Id: Ie94df6092fe7d50599ab4f985233cf0dfa968efd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489020
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975579}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-3489020 branch 4 times, most recently from d73d674 to b78dc2d Compare February 27, 2022 10:41
This patch fixes hit-testing block-in-inline when the inline
box is not culled. This issue was originally reported at
crbug.com/1300205, but also affects crrev.com/c/3486321 for
crbug.com/1301136.

Two logic changes are included:
1. Hit-testing should ignore opaque inline boxes. The
   |IsOpaque| flag was added in r908729 crrev.com/c/3066831
   because inline boxes that wraps block-in-inline are not
   visible to layout and paint except some paint effects.
2. r925189 crrev.com/c/3181220 hit-tests block-backgrounds
   while in the foreground phase. This resulted ignoring
   floats, because floats are between foreground and block
   background. https://drafts.csswg.org/css2/#painting-order
   This patch reverts the change.

Note that the change 1 does not apply to list-based hit-
testing. This is needed for:
  external/wpt/shadow-dom/DocumentOrShadowRoot-prototype-elementFromPoint.html
when the inline with block children is not culled (crrev.com/c/3486321).

Bug: 1300205, 1301136
Change-Id: Ie94df6092fe7d50599ab4f985233cf0dfa968efd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489020
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975579}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants