Scroll hit testing broken in Gecko profiler arrow panel
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox72 | --- | unaffected |
firefox73 | --- | unaffected |
firefox74 | --- | disabled |
firefox75 | --- | fixed |
People
(Reporter: mstange, Assigned: kats)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Steps to reproduce:
- Make sure WebRender is enabled.
- Go to https://perfht.ml/2Opit9q
- Click the button at the top that says "Firefox (74.0) Intel Mac OS X 10.15"
- Scroll in the arrow panel.
Expected results:
The panel contents should scroll.
Actual results:
The elements underneath the panel are scrolled instead.
Comment 1•5 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=776c7e62ea269631d808ec6020bbe9cc486398e8&tochange=473309c218b720f2d606d491e44f853e79115aac
Comment 3•5 years ago
|
||
That's some action-at-a-distance. My understanding from comment 0 is that bug 1526725 just made the wheel event not go through the main thread, and that unveiled a webrender hit-testing regression. But let me know if that's off.
Comment 4•5 years ago
|
||
Yeah, same on Linux.
Comment 6•5 years ago
|
||
Reproduced the issue on Windows 10 x64 and Ubuntu 18.04.3 LTS using Firefox Nightly 74.0a1 (2020-02-06).
Latest Beta and Release versions are not affected on Windows 10 and Ubuntu 18.04.3 LTS. Likewise for all Firefox versions on Mac 10.14.
Will add the according flags.
Updated•5 years ago
|
Comment 7•5 years ago
|
||
(In reply to Alice0775 White from comment #1)
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=776c7e62ea269631d808ec6020bbe9cc486398e8&tochange=473309c218b720f2d606d491e44f853e79115aac
Alice, would mind testing in 74 beta to see if this issue is held to nightly or rolling out?
Comment 8•5 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #7)
(In reply to Alice0775 White from comment #1)
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=776c7e62ea269631d808ec6020bbe9cc486398e8&tochange=473309c218b720f2d606d491e44f853e79115aacAlice, would mind testing in 74 beta to see if this issue is held to nightly or rolling out?
I can not reproduce on Firefox74.0beta2 Windows10 with WebRender.
I can still reproduce Nightly75.0a1(20200212093201) Windows10 with WebRender.
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Kats, feel free to take a look at this if you have cycles to do so.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Here's a reduced test case of the problem. Not quite the same problem - instead of scrolling the larger scrollframe under the small one, it just doesn't scroll anything. But the underlying problem is the same here compared to the gecko profiler original page.
The problem is that the scrollframe being targeted is inside an element with a filter, and so is an "inactive" scrollframe. The display list generates a "hoisted" nsDisplayScrollInfoLayer
item via this codepath. This nsDisplayScrollInfoLayer
item is completely ignored from WR's point of view, because nsDisplayScrollInfoLayer
doesn't have a CreateWebRenderCommands implementation and so WR doesn't ever find out about this inactive scrollframe. So when WR does the hit test, it just goes to whatever is underneath instead.
I have a patch that implements CreateWebRenderCommands
on the nsDisplayScrollInfoLayer
by using basically the same hit-test info that goes on the corresponding nsDisplayCompositorHitTestInfo item, and that seems to fix the problem. Still need to do a try push and write a proper test.
I also have a vague recollection that cases where we generate a blob we should be doing this which should tell WR to delegate to the main-thread hit-test, but maybe we're not hitting this codepath?
Assignee | ||
Comment 11•5 years ago
|
||
Try push looks ok (with the fix). Need to clean up the new test still.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #10)
I also have a vague recollection that cases where we generate a blob we should be doing this which should tell WR to delegate to the main-thread hit-test, but maybe we're not hitting this codepath?
I checked and we indeed are not hitting that codepath for this scenario.
Assignee | ||
Comment 12•5 years ago
|
||
Assignee | ||
Comment 13•5 years ago
|
||
In some cases (such as the case from this bug) the display list contains a
"hoisted" scrollinfo display item, which indicates the presence of a scroller
inside an inactive layer subtree (e.g. a div with certain kinds of filters).
The scrollinfo display item is "hoisted" outside the display list subtree so
that it doesn't get flattened away inside the inactive subtree. That display
item then causes the compositor hit-test regions to updated appropriately so
that APZ knows about the scrollframe inside the flattened content. This in turn
allows APZ to request main-thread scrolling for that scrollframe when input
events are directed to it.
With the WebRender codepath, the information represented by the hoisted
scrollinfo display item was being lost instead of being propagated to the
compositor. This was because the mechanism used for information propagation is
different (WebRender commands vs layers EventRegions). This patch ensures that
the scrollinfo display items also generate appropriate WebRender commands so
that the information is not lost, and WR knows about the scrollframe inside
the flattened content.
The patch includes:
- A code movement in nsGfxScrolllFrame.cpp so that necessary information can
be provided to the nsDisplayScrollInfoLayer constructor - Updates to nsDisplayScrollInfoLayer members to store the necessary information
- Addition of nsDisplayScrollInfoLayer::CreateWebRenderCommands which propagates
the information to the WR display list - A test to exercise the changes.
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•