Get rid of Node::preDispatchEventHandler and Node::postDispatchEventHandler
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Oct 2013 06:50:54 +0000 (06:50 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Oct 2013 06:50:54 +0000 (06:50 +0000)
commit783a3afc7abb2b309a8180b1de439c86e0e6946b
tree3e2c10bfb42e815544926410db499ce24e9a6f6e
parent1e8c18c15a8210bd48465559ad2f985d4ed6423f
Get rid of Node::preDispatchEventHandler and Node::postDispatchEventHandler
https://bugs.webkit.org/show_bug.cgi?id=122144

Reviewed by Darin Adler.

Get rid of pre/post event dispatch callbacks preDispatchEventHandler and postDispatchEventHandler since
the former was only called by HTMLMediaElement and HTMLInputElement and the latter was only called by
HTMLInputElement.

Explicitly call HTMLMediaElement's willDispatchFullScreenChangeEvent in fullScreenChangeDelayTimerFired
of Document since this is the only place that fires the fullscreenchange event.

Also add an explicit call to willDispatchEvent and didDispatchClickEvent in EventDispatcher::dispatch.
This also allows us to stack-allocate InputElementClickHandlingState instead of having willDispatchEvent
heap-allocate it and pass it around as void*.

* WebCore.order:
* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
* dom/Document.h:
* dom/EventContext.cpp:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::callWillDispatchEventOnInputElement):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::willDispatchClick):
* html/CheckboxInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::willDispatchEvent):
(WebCore::HTMLInputElement::didDispatchClickEvent):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::willDispatchFullScreenChangeEvent): Renamed from preDispatchEventHandler.
* html/HTMLTextFormControlElement.h:
* html/InputType.cpp:
(WebCore::InputType::willDispatchClick):
* html/InputType.h:
* html/RadioInputType.cpp:
(WebCore::RadioInputType::willDispatchClick):
* html/RadioInputType.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.order
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/EventDispatcher.h
Source/WebCore/html/CheckboxInputType.cpp
Source/WebCore/html/CheckboxInputType.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/RadioInputType.h