Closed Bug 1287142 Opened 8 years ago Closed 8 years ago

Make pointerevent_touch-action-inherit_parent-none_touch-manual.html pass with APZ

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Keywords: correctness, Whiteboard: [gfx-noted])

Attachments

(1 file, 2 obsolete files)

On a windows touch device, the pointerevent_touch-action-inherit_parent-none_touch-manual.html test fails. Note that in order to run this you have to do some fiddling with manifest files and such, it's not run in automation.

The first scroll on the page is correctly prevented, but the second one (after the subframe contents get layerized) is not. Looking at the layer tree, it seems that the no-action region ends up on the layer containing the scrollframe, rather than the layer containing the scrolled contents.
Attached patch Patch (obsolete) — Splinter Review
Attached patch Patch (obsolete) — Splinter Review
This applies on top of the patch from bug 1286957 but is logically independent. The patch works by making sure the touch-action property from the scrollable element is applied to both the scrollframe and the scrolled frame, which I believe is consistent with the spec text:

"Then examine the touch-action property of each element between the hit tested element and the element with the default touch behavior (including both the hit tested element and the element with the default touch behavior)." [1]

The "element with the default touch behaviour" is the scrollable element, and so for elements inside the scrolled frame, the scrollable element should be included. For touches on the scrollable element's outer frame, the scrollable element should be included as the "hit tested element".

[1] https://www.w3.org/TR/pointerevents/#the-touch-action-css-property
Attachment #8771480 - Attachment is obsolete: true
Attachment #8772142 - Flags: review?(tnikkel)
Attachment #8772142 - Flags: review?(tnikkel) → review+
Comment on attachment 8772142 [details] [diff] [review]
Patch

I haven't looked at the other callers of GetTouchActionFromFrame, but would they want this same behaviour (looking at the scroll frame for a scrolled frame)?
The only other caller of GetTouchActionFromFrame is at [1] and that already does it as part of a walk in the frame tree, so it should already be encountering the scrollframe as part of that walk.

[1] http://searchfox.org/mozilla-central/rev/bfcc10319e4e3ce78367fa9bba9316f7eb5248b6/gfx/layers/apz/util/TouchActionHelper.cpp#88
Attached patch Patch v2Splinter Review
Now includes another hunk to avoid calling AddFrame on the same frame twice (see bug 1286957 comment 6).
Attachment #8772142 - Attachment is obsolete: true
Attachment #8772997 - Flags: review?(tnikkel)
Attachment #8772997 - Flags: review?(tnikkel) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/439867de6935
Ensure that the touch-action property on the scrollable element is applied to both the inner and outer scrollframe. r=tnikkel
https://hg.mozilla.org/mozilla-central/rev/439867de6935
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: