Closed Bug 1041451 Opened 10 years ago Closed 10 years ago

Still receive long tap up event even though long tap event is handled.

Categories

(Core :: Panning and Zooming, defect)

33 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox32 --- unaffected
firefox33 --- affected
firefox34 --- affected

People

(Reporter: mtseng, Assigned: mtseng)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

Consider follow sequence

     TouchStart----------->FireLongTap-------------->TouchEnd


TouchStart would start a new touch block and then +1 to mTouchBlockBalance.

Next, long tap would be fired. Long tap also start a new touch block.
When content received long tap, it will call SendContentReceivedTouch().
So that, chrome will minus 1 to mTouchBlockBalance. mTouchBlockBalance is 0 now which mean the touch block created by TouchStart is end here.

Next, Touch end fired and call SendContentReceivedTouch() again. chrome minus 1 to mTouchBlockBalance again. Right now balance is -1 so it will find next touch block. This touch block is created by long tap.

So I found that defaultPrevent doesn't send to correct touch block. The defaultPrevent generate by long tap event send to touch block that is created by TouchStart and vice versa. So long tap up event still fire even though long tap is handled.
Attached patch bug1041451 v1 (obsolete) — Splinter Review
If we have pending response in RecvHandleLongTap, submit this response first. So that we can end touch block which is generated by TouchStart.
Assignee: nobody → mtseng
Status: NEW → ASSIGNED
Attachment #8459489 - Flags: review?(bugmail.mozilla)
Comment on attachment 8459489 [details] [diff] [review]
bug1041451 v1

Review of attachment 8459489 [details] [diff] [review]:
-----------------------------------------------------------------

Good catch, thanks for tracking that down! I'd like to see two changes to this patch though. One is to pull this block out into a helper method:

void TabChild::SendPendingTouchPreventedResponse(bool aPreventDefault) {
  if (mPendingTouchPreventedResponse) {
...
}

and then call this helper method from RecvHandleLongTap and also from the TOUCH_MOVE handler in RecvRealTouchEvent.

The second change is to move this code higher up in RecvHandleLongTap, to before the dispatch of the contextmenu event. With those two changes it should be good but I'd like to see the updated patch for review.
Attachment #8459489 - Flags: review?(bugmail.mozilla) → review-
Blocks: apz-state
Keywords: regression
Version: unspecified → 33 Branch
Attached patch bug1041451 v2 (obsolete) — Splinter Review
Thanks for review! I have updated patch to address comment.
Attachment #8459489 - Attachment is obsolete: true
Attachment #8459974 - Flags: review?(bugmail.mozilla)
Comment on attachment 8459974 [details] [diff] [review]
bug1041451 v2

Review of attachment 8459974 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks!
Attachment #8459974 - Flags: review?(bugmail.mozilla) → review+
try run looks good, ready for check-in.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c452b1384965
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: