Closed
Bug 1145084
Opened 10 years ago
Closed 9 years ago
When touch-action is enabled, ensure the APZ doesn't wait forever for the SetAllowedTouchBehavior notification
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file, 2 obsolete files)
9.45 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
Spinoff from bug 1144112 comment 13.
The APZ code waits until it has necessary information about an input block before processing that input block. When the touch-action pref is enabled, one of the things it waits for is the allowed touch behaviors for the block. Unlike the preventDefault status, there is no timeout on the wait for allowed touch behaviors, which means that APZ is effectively blocked on the main thread in this scenario. We should make this wait subject to the same timeout that we use for preventDefault status, and process the input block after that timeout even if we don't have the information.
Updated•10 years ago
|
Whiteboard: [gfx-noted]
Assignee | ||
Comment 1•10 years ago
|
||
This is more important to do now that bug 1166347 is turning on touch-action on Nightly.
Assignee: nobody → bugmail.mozilla
Assignee | ||
Comment 2•9 years ago
|
||
It took a bunch of hacking to get all the gtests passing with the touch-action pref defaulting to true and to false (which is the current state, and that I'd like to maintain). I want to try to clean this up further by reducing the number of places we explicitly have to pump the delayed tasks.
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8611385 -
Attachment is obsolete: true
Attachment #8613576 -
Flags: review?(botond)
Comment 4•9 years ago
|
||
Comment on attachment 8613576 [details] [diff] [review]
Patch
Review of attachment 8613576 [details] [diff] [review]:
-----------------------------------------------------------------
If I'm understanding this patch correctly, it's re-using the timeout used for the ContentReceivedInputBlock response, for SetAllowedTouchBehavior as well.
- Perhaps this is worth a mention in the APZ docs?
- We seem to be leaving mAllowedTouchBehaviors empty if the timeout is triggered.
Based on how the TouchActionAllows*() methods are written, this will allow
panning but nor pinch-zoom or double-tap-zoom. Is this what we want?
::: gfx/layers/apz/src/InputBlockState.cpp
@@ -459,5 @@
> if (!CancelableBlockState::IsReadyForHandling()) {
> return false;
> }
>
> - // TODO: for long-tap blocks we probably don't need the touch behaviour?
Have we decided that we do need the touch behaviour for long-tap blocks?
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #4)
> Comment on attachment 8613576 [details] [diff] [review]
> Patch
>
> Review of attachment 8613576 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> If I'm understanding this patch correctly, it's re-using the timeout used
> for the ContentReceivedInputBlock response, for SetAllowedTouchBehavior as
> well.
Yes.
>
> - Perhaps this is worth a mention in the APZ docs?
Good point, I will update those.
> - We seem to be leaving mAllowedTouchBehaviors empty if the timeout is
> triggered.
> Based on how the TouchActionAllows*() methods are written, this will
> allow
> panning but nor pinch-zoom or double-tap-zoom. Is this what we want?
It should allow all the behaviours if mAllowedTouchBehaviors is empty. TouchActionAllowsPinchZoom and TouchActionAllowsDoubleTapZoom default to returning true if mAllowedTouchBehaviors is empty.
> ::: gfx/layers/apz/src/InputBlockState.cpp
> > - // TODO: for long-tap blocks we probably don't need the touch behaviour?
>
> Have we decided that we do need the touch behaviour for long-tap blocks?
The code should be copying the touch behaviors from the "current block" at the time it injects the long-tap block, so it'll just inherit those touch behaviors. As far as I could tell we don't need to do anything further for this "TODO", so I removed it.
Assignee | ||
Comment 6•9 years ago
|
||
Docs slightly updated. Turns out the existing description of the handling of input events near the bottom of the doc already reflected the changes I'm making in this bug (i.e. the docs were wrong before with respect to touch-action, but with the changes in this bug they are correct).
Attachment #8613576 -
Attachment is obsolete: true
Attachment #8613576 -
Flags: review?(botond)
Attachment #8613691 -
Flags: review?(botond)
Comment 7•9 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
> > - We seem to be leaving mAllowedTouchBehaviors empty if the timeout is
> > triggered.
> > Based on how the TouchActionAllows*() methods are written, this will
> > allow
> > panning but nor pinch-zoom or double-tap-zoom. Is this what we want?
>
> It should allow all the behaviours if mAllowedTouchBehaviors is empty.
> TouchActionAllowsPinchZoom and TouchActionAllowsDoubleTapZoom default to
> returning true if mAllowedTouchBehaviors is empty.
Doh! Misread that, apologies.
Comment 8•9 years ago
|
||
Comment on attachment 8613691 [details] [diff] [review]
Patch v2
Review of attachment 8613691 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8613691 -
Flags: review?(botond) → review+
Comment 10•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•