Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1885259 - Make
AutoPointerEventTargetUpdater
work without event…
… target frame r=edgar,dom-core The crash occurs when `PointerEventHandler::DispatchPointerFromMouseOrTouch` dispatches a pointer event for `eTouchStart`. In this case, `aFrame` of the constructor of `AutoPointerEventTargetUpdater` is set to the primary frame of the event target content [1][2] and the event target may have no frame because touch targets are considered by `TouchManager` before dispatching `ePointerDown` [3][4][5]. Therefore, we should make it take event target content for the case of no event target frame. I tried to reproduce the crash with removing the target or making the target `display:contents` at first `pointerdown` or `touchstart` of multi-touch, but I couldn't reproduce the crash. Therefore, this patch does not contain new tests. 1. https://searchfox.org/mozilla-central/rev/109bb25545f0d2df31954dc0a9afbf30d900b6bb/dom/events/PointerEventHandler.cpp#694,701 2. https://searchfox.org/mozilla-central/rev/109bb25545f0d2df31954dc0a9afbf30d900b6bb/layout/base/PresShell.cpp#8319,8341 3. https://searchfox.org/mozilla-central/rev/109bb25545f0d2df31954dc0a9afbf30d900b6bb/layout/base/TouchManager.cpp#115 4. https://searchfox.org/mozilla-central/rev/109bb25545f0d2df31954dc0a9afbf30d900b6bb/layout/base/PresShell.cpp#7400 5. https://searchfox.org/mozilla-central/rev/109bb25545f0d2df31954dc0a9afbf30d900b6bb/layout/base/PresShell.cpp#7198 Differential Revision: https://phabricator.services.mozilla.com/D204632
- Loading branch information