Closed Bug 1143518 Opened 10 years ago Closed 10 years ago

Remove the TryCapture codepath for touch events

Categories

(Core :: DOM: Content Processes, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

TabParent has the notion of an "event capturer" which was added a long time ago. This allows the widget code to dispatch touchmove events (and only touchmove events) directly to a child process and avoid having the events go through the main-process event dispatch flow. This, as far as I know, was done purely for performance reasons, to allow lower-latency scrolling. Now that the events go through APZ without touching the main thread, we have even better perf characteristics, and the event capturer stuff can be removed. It still provides some small perf benefit, but to balance that out it involves some hacky state management which is error-prone and has led to bugs/assertion failures. Also, this short-circuiting of touchmove events means that any window-level touchmove listeners in the main process do not get triggered when the events are going to a child process. touchstart and touchend listeners window-level listeners in the main process *do* get triggered, which is even worse because the listeners get an inconsistent view of the events. Eliminating the event capturer path will fix that. I have bug 1116579 on file for reimplementing this direct-dispatch-to-child behaviour in a more APZ-friendly way but I'd like to defer finishing it up and landing it until we can see some measurable benefit from it.
Attachment #8577810 - Flags: review?(bugs)
Comment on attachment 8577810 [details] [diff] [review] Remove TryCapture and friends If we can get rid of this horrible hack without significant perf regression, great!
Attachment #8577810 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: