Closed Bug 931504 Opened 11 years ago Closed 11 years ago

Fire touchcancel for everytouch point the apz consumes

Categories

(Core Graveyard :: Widget: WinRT, defect)

26 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(1 file, 1 obsolete file)

This fixes a bug where occasionally touch will stop working for content. In the current code, we fire off touchcancels if the apz starts consuming event using the touch list in mTouches. But since this is generated in the async callback touch points might have been removed from mTouches before the touchcancel touch list is generated. The side effect of this bug is that sometimes the touchcancel event didn't have any touch points in it's array, and this threw off the code in presshell that tracks touch points. Which in turn borked touch for the rest of the browser session since touch points were left in gCaptureTouchList across touch blocks. These changes make sure that every touch point sent to presshell and subsequently consumed by the apz receives a corresponding touch cancel.
Attached patch fix v.1 (obsolete) — Splinter Review
Assignee: nobody → jmathies
Attachment #822939 - Flags: review?(tabraldes)
Attached patch fix v.1Splinter Review
- fix a comment typo.
Attachment #822939 - Attachment is obsolete: true
Attachment #822939 - Flags: review?(tabraldes)
Attachment #822940 - Flags: review?(tabraldes)
Comment on attachment 822940 [details] [diff] [review] fix v.1 Review of attachment 822940 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/windows/winrt/MetroInput.cpp @@ +1282,5 @@ > + } > + mCanceledIds.AppendElement(id); > + if (!touchEvent) { > + touchEvent = new WidgetTouchEvent(true, NS_TOUCH_CANCEL, mWidget.Get()); > + } nit: This would look prettier to me if we set touchEvent before the loop, then only dispatched it if its 'touches' member was non-zero length.
Attachment #822940 - Flags: review?(tabraldes) → review+
Blocks: 928200
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Depends on: 934750
No longer depends on: 934750
OS: Windows 8 Metro → Windows 8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: