Closed Bug 1536366 Opened 7 months ago Closed 7 months ago

TouchManager::PreHandleEvent() should be called by PresShell::EventHandler::PrepareToDispatchEvent() rather than PresShell::EventHandler::HandleEventWithCurrentEventInfo()

Categories

(Core :: User events and focus handling, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

The only caller of TouchManager::PreHandleEvent() is PresShell::EventHandler::HandleEventWithCurrentEventInfo() and that it will be guaranteed that the event is always trusted event, by bug 1536353. Therefore, PresShell::EventHandler::HandleEventWithCurrentEventInfo() does not need to call it directly, instead, PresShell::EventHandler::PrepareToDispatchEvent() should do it.

Priority: -- → P3

The only caller of TouchManager::PreHandleEvent() is
PresShell::EventHandler::HandleEventWithCurrentEventInfo() which is guaranteed
that it never handles untrused event by bug 1536353. Therefore, we can make
PresShell::EventHandler::PrepareToDispatchEvent() call it instead. That's
better place from the point of view of semantics and making
PresShell::EventHandler::PrepareToDispatchEvent() simpler.

Note that this may cause changing the score of a telemetry probe,
"INPUT_EVENT_QUEUED_APZ_TOUCH_MOVE_MS" because it will include the time of
the runtime cost of TouchManager::PreHandleEvent() when the event is an
eTouchMove event and handled by APZ. However, this was expired in 60.
So, we don't meet any changes with this patch actually.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/c972f777f759
Make PresShell::EventHandler::PrepareToDispatchEvent() call TouchManager::PreHandleEvent() instead of PresShell::EventHandler::HandleEventWithCurrentEventInfo() r=smaug
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.