Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Issue 1227363006: Virtualize EventDispatchMediator creation and cleanup calling. (Closed)

Created:
5 years, 5 months ago by dtapuska
Modified:
5 years, 5 months ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis, Rick Byers
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Virtualize EventDispatchMediator creation and cleanup calling. Create a virtual on Event that allows the creation of the mediator. This avoids the if... if... if conditions in the dispatchEventInternal in Node.cpp; we reduce from invoking a bunch of virtuals down to just invoking one. The mediator doesn't need to be passed into the scoped event anymore; use this same construct to create the mediator. Collapse all EventDispatcher::dispathEvent calls that are passed in a mediator to calling dispathEvent directly. This is done so that the trusted event will be set correctly based on these calls. This has a side effect of forcing the mediator to be created correctly for the events from javascript. For example new FocusEvent("focus", {relatedTarget: document.body }) would have ended up creating the default EventDispatcher mediator. Now it correctly creates a FocusEventMediator. Collapse 4 types of FocusEventMediators to 1; they all did the exact same thing in different class names. Make WheelEventMediator creation pattern consistent with the other mediators. Introduce isTrusted temporarily on MouseEvent. There was already synthetic mouse behaviour when creating the mediator; collapse this into the isTrusted support. The field & methods on MouseEvent will be removed when the Event.isTrusted support is landed. BUG=334015 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198997

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add TODO and rename variable #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -142 lines) Patch
M Source/core/dom/Element.cpp View 1 chunk +4 lines, -6 lines 0 comments Download
M Source/core/dom/Node.h View 1 2 2 chunks +0 lines, -3 lines 0 comments Download
M Source/core/dom/Node.cpp View 4 chunks +10 lines, -30 lines 0 comments Download
M Source/core/events/Event.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/Event.cpp View 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/events/FocusEvent.h View 2 chunks +2 lines, -27 lines 0 comments Download
M Source/core/events/FocusEvent.cpp View 2 chunks +5 lines, -48 lines 0 comments Download
M Source/core/events/GestureEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/GestureEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/KeyboardEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/KeyboardEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/MouseEvent.h View 1 3 chunks +10 lines, -5 lines 0 comments Download
M Source/core/events/MouseEvent.cpp View 1 7 chunks +17 lines, -5 lines 0 comments Download
M Source/core/events/PointerEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/PointerEvent.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/TouchEvent.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/events/TouchEvent.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/events/WheelEvent.h View 3 chunks +7 lines, -2 lines 0 comments Download
M Source/core/events/WheelEvent.cpp View 2 chunks +23 lines, -13 lines 0 comments Download
M Source/core/input/EventHandler.cpp View 3 chunks +3 lines, -3 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 8 (2 generated)
dtapuska
5 years, 5 months ago (2015-07-14 16:03:41 UTC) #2
tkent
>Introduce isTrusted temporarily on MouseEvent. There was already synthetic > mouse behaviour when creating the ...
5 years, 5 months ago (2015-07-15 00:09:16 UTC) #3
dtapuska
TODO has been added as well. https://codereview.chromium.org/1227363006/diff/1/Source/core/events/MouseEvent.h File Source/core/events/MouseEvent.h (right): https://codereview.chromium.org/1227363006/diff/1/Source/core/events/MouseEvent.h#newcode120 Source/core/events/MouseEvent.h:120: unsigned m_trusted : ...
5 years, 5 months ago (2015-07-15 01:46:17 UTC) #4
tkent
lgtm
5 years, 5 months ago (2015-07-16 01:55:44 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1227363006/40001
5 years, 5 months ago (2015-07-16 01:55:54 UTC) #7
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 01:59:23 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198997

Powered by Google App Engine
This is Rietveld 408576698