Support sending polygonal clip-paths to WebRender and hit-testing them accurately
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: kats, Assigned: bradwerth)
References
(Blocks 2 open bugs)
Details
Attachments
(7 files, 3 obsolete files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Currently if a page has a polygonal clip-path, we return false from SVGIntegrationUtils::UsingSimpleClipPathForFrame
and bail out of creating a complex clip region for WR. Instead, we fall back to creating a mask image.
Then, when we try to do a compositor hit-test on that element, it uses the bounding rect of the mask and can therefore result in incorrect hit results.
With fission this means that the target layersId for a hit-test can be wrong, and the input events can end up getting sent to the wrong process. This can be seen using the test page here - load it in a fission-enabled browser, and mouse over the iframe at the top. Any time you're over the iframe, but outside of the green triangle, it should say the mouse cursor is over the iframe. But with fission enabled it says "parent document" on the entire bounding rect of the green triangle instead, which is incorrect.
Based on a discussion with :jrmuizel today - we should support sending the clip-path information to WR and use it to do precise hit-testing. This will involve:
- changing this line to
return true
- Adding a
case StyleBasicShape::Tag::Polygon:
to this switch statement that encodes theStyleGenericPolygon
contents into a new clip type and sending it to WR - Supporting that new clip type throughout WR wherever needed (intentionally vague because I don't know what all this entails)
- Specifically updating hit_test.rs to do a precise hit-test against the polygon clip
As a result of step 1, we should never hit this line when WR is enabled. And APZ will get correct results when hit-testing against clip-paths, which will make the attached testcase pass.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
Comment on attachment 9185822 [details] [diff] [review]
clippath+fisison+wr testcase
Replacing raw patch with an equivalent phabricator revision, rebased on top of bug 1675378
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Tracking this for M7 (rather than M6c) as polygonal clip-paths seem like an edge case that nightly users are unlikely to run into often.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
Depends on D105396
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D105397
Comment 8•4 years ago
|
||
Brad, there have been patches on this from 18 days ago, but no reviewer is assigned yet. What are the next steps here?
Fission M7 has to be fixed in Fx88 (soft freeze on March 18).
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Neha Kochar [:neha] from comment #8)
Brad, there have been patches on this from 18 days ago, but no reviewer is assigned yet. What are the next steps here?
Fission M7 has to be fixed in Fx88 (soft freeze on March 18).
These are WIP patches that got de-prioritized as I focused on other work. I'll come back to the them in the coming days. They aren't ready for review yet.
Comment 10•4 years ago
|
||
Jeff Muizelaar messaged on slack about this bug and said that polygonal clip-paths work, it’s just hit testing them that’s broken and that the graphics team doesn’t know of any content that actually breaks because of this.
Based on this info, moving this out to M7a (Fx89). Brad, please prioritize this for Fission.
Assignee | ||
Comment 11•4 years ago
|
||
This leaves the actual clipping in draw_clip_batch_list still as a TODO.
Depends on D105548
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 12•4 years ago
|
||
This performs a winding number calculation on the polygon and matches the
result against the fill rule of the supplied polygon.
Depends on D105548
Assignee | ||
Comment 13•4 years ago
|
||
This test was originally written by Kats, but I can't figure out how to
preserve authorship.
Depends on D109946
Assignee | ||
Comment 14•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 15•4 years ago
|
||
Some test failures I'll need to resolve: https://treeherder.mozilla.org/jobs?repo=try&revision=8ce0b27e667664b3f7a56adfb2351ab7de182b5e&selectedTaskRun=DfcGgc5aS0mdavobpFbCSQ.0
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 16•4 years ago
|
||
Assignee | ||
Comment 17•4 years ago
|
||
This test fails in automation, but those failures are difficult to reproduce
in local builds. When attempting to reproduce locally, the whole test sometimes
times out. Isolating specific subtests seems to affect the test outcomes as
well. Splitting the test into pieces seems to be the best way to make failures
in this test more actionable.
Depends on D109947
Assignee | ||
Comment 18•4 years ago
|
||
Depends on D111167
Updated•4 years ago
|
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
Backed out for causing build bustages.
Backout link : https://hg.mozilla.org/integration/autoland/rev/4d65631b94f0695ab1f25f893803bea89accb3bc
Failure log: https://treeherder.mozilla.org/logviewer?job_id=336252149&repo=autoland&lineNumber=13617
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
Backed out 7 changesets (Bug 1675375) for causing webrender lint tidy failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/d1db6e82c992be27bf96839225c5c6ca2e091d7f
Push with failures, failure log.
Comment 23•4 years ago
|
||
Comment 24•4 years ago
|
||
Backed out 7 changesets (Bug 1675375) for causing mochitest plain failures in test_group_hittest-2.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/3734414bbb3d3c9e53ccc4515f65cced1cab17a0
Push with failures, failure log.
Comment 25•4 years ago
|
||
Hey, just a heads up that in bug 1704070 I added a new subtest to test_group_hittest.html
, so the Part 6 patch will need to be rebased across that. Apologies for any inconvenience.
Comment 26•4 years ago
|
||
Comment 27•4 years ago
|
||
Backed out 7 changesets (bug 1675375) for Mochitest failures in gfx/layers/apz/test/mochitest/test_group_hittest-2.html. CLOSED TREE
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=1a2cb51e0573b839f7a2edcd09f9cd54a042e43b
Backout:
https://hg.mozilla.org/integration/autoland/rev/b79bcdd75afa6f8739c162e2873c6f8cd0708092
Comment 28•4 years ago
|
||
Comment 29•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dc7b605c2911
https://hg.mozilla.org/mozilla-central/rev/d4b0a140332c
https://hg.mozilla.org/mozilla-central/rev/06c404b94962
https://hg.mozilla.org/mozilla-central/rev/fa02c774226a
https://hg.mozilla.org/mozilla-central/rev/fb5f5a643fa6
https://hg.mozilla.org/mozilla-central/rev/82cf330340dc
https://hg.mozilla.org/mozilla-central/rev/3da14f29d4d7
Assignee | ||
Updated•4 years ago
|
Description
•