Closed Bug 1213324 Opened 4 years ago Closed 4 years ago

[APZ] wheel events on subframe scrollbars target the wrong frame

Categories

(Core :: Panning and Zooming, defect)

44 Branch
Unspecified
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
e10s - ---
firefox44 --- fixed

People

(Reporter: alice0775, Assigned: dvander)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

+++ 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
Attached file another testcase
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?
Flags: needinfo?(tnikkel)
Attached patch speculative fix (obsolete) — Splinter Review
This seems to fix the problem, assuming that it's the solution we want.
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
Summary: [APZ] scrollbars on subframes do not work → [APZ] wheel events on subframe scrollbars target the wrong frame
Attached patch fixSplinter Review
Cleaned up to avoid d-t-c regions for overlay scrollbars, and added a test case.
Attachment #8672840 - Attachment is obsolete: true
Flags: needinfo?(tnikkel)
Attachment #8672960 - Flags: review?(tnikkel)
Comment on attachment 8672960 [details] [diff] [review]
fix

Thanks for writing a test.
Attachment #8672960 - Flags: review?(tnikkel) → review+
Blocks: 1216488
https://hg.mozilla.org/mozilla-central/rev/da38bd42a863
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.