Open Bug 1923513 Opened 27 days ago Updated 2 hours ago

fission hit testing incorrect with clip-path on top.

Categories

(Core :: Web Painting, defect, P2)

defect

Tracking

()

People

(Reporter: emilio, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

Attachments

(2 files)

Test-case would be in bug 1911251 comment 5. Here's with an added background and no opacity just to confirm the clip-path clips everything:

data:text/html,<div style="position: absolute;left: 0px;top: 0px;width: 100%; height: 100%; z-index: 100; clip-path: polygon(0px 0px, 100% 0px, 100% 0%, 0px 0%); background-color: red;"></div><iframe src="http://techno-barje.fr/fission/input"></iframe>

It seems we're not dealing with clip-path polygon regions at all in APZ? This case is even more egregious because everything ends up clipped, so the absolute-positioned element shouldn't be hittable at all.

As for why was that page doing something like that... I don't know?

Same test-case with same-origin frame (works):

data:text/html,<div style="position: absolute;left: 0px;top: 0px;width: 100%; height: 100%; z-index: 100; clip-path: polygon(0px 0px, 100% 0px, 100% 0%, 0px 0%); background-color: red;"></div><iframe srcdoc="<input type=text>"></iframe>

Oh, actually test-case in comment 0 works, so the opacity: 0 is needed after all. Maybe we're optimizing out the opacity: 0 incorrectly somehow?

Actual test-cases. Fission:

data:text/html,<div style="position: absolute;left: 0px;top: 0px;width: 100%; height: 100%; z-index: 100; clip-path: polygon(0px 0px, 100% 0px, 100% 0%, 0px 0%); opacity: 0;"></div><iframe src="http://techno-barje.fr/fission/input"></iframe>

Non-fission:

data:text/html,<div style="position: absolute;left: 0px;top: 0px;width: 100%; height: 100%; z-index: 100; clip-path: polygon(0px 0px, 100% 0px, 100% 0%, 0px 0%); opacity: 0;"></div><iframe srcdoc="<input type=text>"></iframe>

The severity field is not set for this bug.
:botond, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(botond)
See Also: → 1901000

Marking as S2 because this blocks an S2.

Severity: -- → S2
Flags: needinfo?(botond)
Priority: -- → P2

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

Oh, actually test-case in comment 0 works, so the opacity: 0 is needed after all. Maybe we're optimizing out the opacity: 0 incorrectly somehow?

Interestingly, if I remove the background-color: red; from the test case in comment 0, such that there is neither a background color nor an opacity, the bug still reproduces.

Attached some display list dumps. The main difference seems to be that in the working case (with background-color), the WebRender display list contains more detailed information related to the clip-path, which allows accurate hit testing to happen in the compositor.

Component: Panning and Zooming → Web Painting

(In reply to Botond Ballo [:botond] from comment #7)

in the working case (with background-color), the WebRender display list contains more detailed information related to the clip-path, which allows accurate hit testing to happen in the compositor.

Specifically, in the working case we get an ImageMaskClip WebRender display item created here. In the broken case we don't get there because we early exit here.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: