Closed Bug 1213324 Opened 7 years ago Closed 7 years ago
[APZ] wheel events on subframe scrollbars target the wrong frame
+++ This bug was initially created as a clone of Bug #1190112 +++ Build Identifier: https://hg.mozilla.org/mozilla-central/rev/d01dd42e654b8735d86f9e7c723cc869a3b56798 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0 ID:20151009030230 Steps To Reproduce: 1. Open http://xxsionxx.blog17.fc2.com/ or testcase attachment 8642106 [details] of Bug 1190112 2. Scroll down to the middle of page 3. Attempt to scroll element at the left side of page mouse over scrollbar and turn mouse wheel 4. Attempt to scroll the other element mouse over scrollbar and turn mouse wheel 5. Repeat step4 Actual Results: Sometomes not scroll the element. It seems transaction scroll timeout is broken Expected Results: these element should scroll properly Bug 1190112 did not fix the problem. It works when disable APZ
Steps to reproduce 1. Open the another testcase 2. Try scroll by mouse wheel on scrollbar (not on thunb) Actual Results: Page would not scroll Expected Results: Page should scroll Disable APZ (layers.async-pan-zoom.enabled = false) fixes the problem.
Summary: [APZ] overflow: auto/scroll; would not scroll on scrollber by mouse wheel when apz enabled on certain condition → [APZ] overflow: auto/scroll; would not scroll on scrollber by mouse wheel when apz enabled with enabled APZ
Yup, I can reproduce this on the attached test case.
Assignee: nobody → dvander
Status: NEW → ASSIGNED
This looks like a separate problem from bug 1190112. Our layer tree looks like this: PaintedLayer (viewport) ContainerLayer (vscrollbar thumb) PaintedLayer (vscrollbar thumb) PaintedLayer (subframe) The scrollbars are painted into the viewport layer, and non-root-content-document scrollbars are not layerized (except for the thumb). The subframe's layer does not include its scrollbars in its event regions, so a wheel event on the scrollbar track scrolls the viewport instead (which in this case, does nothing since the body's overflow:auto eats the viewport's scroll range). A wheel event over the thumb does work, however, since nsSliderFrame happens to add a touch event listener which creates a d-t-c region. It seems like to fix this, we will need to include d-t-c regions for inactive subframes' scrollbars. For active subframes, I guess we could either: (1) Always layerize the scrollbars. (2) Add hit regions for the scrollbars (but this would probably require another layer?) (3) Always add a d-t-c region for the scrollbars. Unless I'm missing something... tn, thoughts?
This seems to fix the problem, assuming that it's the solution we want.
7 years ago
Summary: [APZ] overflow: auto/scroll; would not scroll on scrollber by mouse wheel when apz enabled with enabled APZ → [APZ] scrollbars on subframes do not work
7 years ago
Summary: [APZ] scrollbars on subframes do not work → [APZ] wheel events on subframe scrollbars target the wrong frame
Cleaned up to avoid d-t-c regions for overlay scrollbars, and added a test case.
Comment on attachment 8672960 [details] [diff] [review] fix Thanks for writing a test.
Attachment #8672960 - Flags: review?(tnikkel) → review+
You need to log in before you can comment on or make changes to this bug.