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)
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

index 5feaaa3..c44d0d7 100644 (file)
@@ -1,5 +1,52 @@
 2013-10-02  Ryosuke Niwa  <rniwa@webkit.org>
 
+        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:
+
+2013-10-02  Ryosuke Niwa  <rniwa@webkit.org>
+
         Update binding test results after r156808 for r156769.
 
         * bindings/scripts/test/JS/JSattribute.cpp:
index 0092f55..2b02a00 100644 (file)
@@ -1323,7 +1323,6 @@ __ZN7WebCore5Event9setTargetEN3WTF10PassRefPtrINS_11EventTargetEEE
 __ZN7WebCore5Event14receivedTargetEv
 __ZN7WebCore18WindowEventContextC1EPNS_5EventEN3WTF10PassRefPtrINS_4NodeEEEPKNS_12EventContextE
 __ZN7WebCore18WindowEventContextC2EPNS_5EventEN3WTF10PassRefPtrINS_4NodeEEEPKNS_12EventContextE
-__ZN7WebCore4Node23preDispatchEventHandlerEPNS_5EventE
 __ZN7WebCore18WindowEventContext17handleLocalEventsEPNS_5EventE
 __ZN7WebCore4Node16derefEventTargetEv
 __ZN7WebCore11EventTarget18fireEventListenersEPNS_5EventE
@@ -9899,8 +9898,6 @@ __ZN7WebCore40jsDocumentPrototypeFunctionQuerySelectorEPN3JSC9ExecStateE
 __ZN7WebCore5TimerINS_17GenericEventQueueEE5firedEv
 __ZN7WebCore17GenericEventQueue10timerFiredEPNS_5TimerIS0_EE
 __ZN7WebCore16HTMLMediaElement13dispatchEventEN3WTF10PassRefPtrINS_5EventEEE
-__ZN7WebCore16HTMLMediaElement23preDispatchEventHandlerEPNS_5EventE
-__ZN7WebCore16HTMLMediaElement19defaultEventHandlerEPNS_5EventE
 __ZN7WebCore16parseHTMLIntegerERKN3WTF6StringERi
 __ZN7WebCore7Element21setTabIndexExplicitlyEs
 __ZN7WebCore18TextFieldInputType24readonlyAttributeChangedEv
index 449c3dc..3b60199 100644 (file)
@@ -85,6 +85,7 @@
 #include "HTMLHeadElement.h"
 #include "HTMLIFrameElement.h"
 #include "HTMLLinkElement.h"
+#include "HTMLMediaElement.h"
 #include "HTMLNameCollection.h"
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
@@ -5387,11 +5388,11 @@ void Document::fullScreenChangeDelayTimerFired(Timer<Document>*)
     m_fullScreenChangeEventTargetQueue.swap(changeQueue);
     Deque<RefPtr<Node> > errorQueue;
     m_fullScreenErrorEventTargetQueue.swap(errorQueue);
-    dispatchFullScreenChangeOrErrorEvent(changeQueue, eventNames().webkitfullscreenchangeEvent);
-    dispatchFullScreenChangeOrErrorEvent(errorQueue, eventNames().webkitfullscreenerrorEvent);
+    dispatchFullScreenChangeOrErrorEvent(changeQueue, eventNames().webkitfullscreenchangeEvent, /* shouldNotifyMediaElement */ true);
+    dispatchFullScreenChangeOrErrorEvent(errorQueue, eventNames().webkitfullscreenerrorEvent, /* shouldNotifyMediaElement */ false);
 }
 
-void Document::dispatchFullScreenChangeOrErrorEvent(Deque<RefPtr<Node>>& queue, const AtomicString& eventName)
+void Document::dispatchFullScreenChangeOrErrorEvent(Deque<RefPtr<Node>>& queue, const AtomicString& eventName, bool shouldNotifyMediaElement)
 {
     while (!queue.isEmpty()) {
         RefPtr<Node> node = queue.takeFirst();
@@ -5406,6 +5407,8 @@ void Document::dispatchFullScreenChangeOrErrorEvent(Deque<RefPtr<Node>>& queue,
         if (!node->inDocument())
             queue.append(documentElement());
 
+        if (shouldNotifyMediaElement && isMediaElement(node.get()))
+            toHTMLMediaElement(node.get())->enteredOrExitedFullscreen();
         node->dispatchEvent(Event::create(eventName, true, false));
     }
 }
index 154faf5..6d2f6ff 100644 (file)
@@ -1252,7 +1252,7 @@ private:
     PassRefPtr<HTMLCollection> ensureCachedCollection(CollectionType);
 
 #if ENABLE(FULLSCREEN_API)
-    void dispatchFullScreenChangeOrErrorEvent(Deque<RefPtr<Node>>&, const AtomicString& eventName);
+    void dispatchFullScreenChangeOrErrorEvent(Deque<RefPtr<Node>>&, const AtomicString& eventName, bool shouldNotifyMediaElement);
     void clearFullscreenElementStack();
     void popFullscreenElementStack();
     void pushFullscreenElementStack(Element*);
index bb89944..f5617ce 100644 (file)
@@ -31,6 +31,7 @@
 #include "EventDispatchMediator.h"
 #include "EventRetargeter.h"
 #include "FrameView.h"
+#include "HTMLInputElement.h"
 #include "HTMLMediaElement.h"
 #include "InsertionPoint.h"
 #include "InspectorInstrumentation.h"
@@ -111,12 +112,18 @@ bool EventDispatcher::dispatch()
     WindowEventContext windowEventContext(m_event.get(), m_node.get(), topEventContext());
     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEvent(&m_node->document(), *m_event, windowEventContext.window(), m_node.get(), m_eventPath);
 
-    void* preDispatchEventHandlerResult;
-    if (dispatchEventPreProcess(preDispatchEventHandlerResult) == ContinueDispatching)
-        if (dispatchEventAtCapturing(windowEventContext) == ContinueDispatching)
+    InputElementClickState clickHandlingState;
+    if (isHTMLInputElement(m_node.get()))
+        toHTMLInputElement(m_node.get())->willDispatchEvent(*m_event.get(), clickHandlingState);
+
+    if (!m_event->propagationStopped() && !m_eventPath.isEmpty()) {
+        if (dispatchEventAtCapturing(windowEventContext) == ContinueDispatching) {
             if (dispatchEventAtTarget() == ContinueDispatching)
                 dispatchEventAtBubbling(windowEventContext);
-    dispatchEventPostProcess(preDispatchEventHandlerResult);
+        }
+    }
+
+    dispatchEventPostProcess(clickHandlingState);
 
     // Ensure that after event dispatch, the event's target object is the
     // outermost shadow DOM boundary.
@@ -127,13 +134,6 @@ bool EventDispatcher::dispatch()
     return !m_event->defaultPrevented();
 }
 
-inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess(void*& preDispatchEventHandlerResult)
-{
-    // Give the target node a chance to do some work before DOM event handlers get a crack.
-    preDispatchEventHandlerResult = m_node->preDispatchEventHandler(m_event.get());
-    return (m_eventPath.isEmpty() || m_event->propagationStopped()) ? DoneDispatching : ContinueDispatching;
-}
-
 inline EventDispatchContinuation EventDispatcher::dispatchEventAtCapturing(WindowEventContext& windowEventContext)
 {
     // Trigger capturing event handlers, starting at the top and working our way down.
@@ -183,14 +183,14 @@ inline void EventDispatcher::dispatchEventAtBubbling(WindowEventContext& windowC
     }
 }
 
-inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHandlerResult)
+inline void EventDispatcher::dispatchEventPostProcess(const InputElementClickState& InputElementClickState)
 {
     m_event->setTarget(EventRetargeter::eventTargetRespectingTargetRules(m_node.get()));
     m_event->setCurrentTarget(0);
     m_event->setEventPhase(0);
 
-    // Pass the data from the preDispatchEventHandler to the postDispatchEventHandler.
-    m_node->postDispatchEventHandler(m_event.get(), preDispatchEventHandlerResult);
+    if (InputElementClickState.stateful)
+        toHTMLInputElement(m_node.get())->didDispatchClickEvent(*m_event.get(), InputElementClickState);
 
     // Call default event handlers. While the DOM does have a concept of preventing
     // default handling, the detail of which handlers are called is an internal
index 9c6982c..af952ea 100644 (file)
@@ -45,6 +45,7 @@ class PlatformMouseEvent;
 class ShadowRoot;
 class TreeScope;
 class WindowEventContext;
+struct InputElementClickState;
 
 enum EventDispatchContinuation {
     ContinueDispatching,
@@ -67,11 +68,10 @@ private:
     EventDispatcher(Node*, PassRefPtr<Event>);
     const EventContext* topEventContext();
 
-    EventDispatchContinuation dispatchEventPreProcess(void*& preDispatchEventHandlerResult);
     EventDispatchContinuation dispatchEventAtCapturing(WindowEventContext&);
     EventDispatchContinuation dispatchEventAtTarget();
     void dispatchEventAtBubbling(WindowEventContext&);
-    void dispatchEventPostProcess(void* preDispatchEventHandlerResult);
+    void dispatchEventPostProcess(const InputElementClickState&);
 
     EventPath m_eventPath;
     RefPtr<Node> m_node;
index 8c8cfa2..0ec4d1f 100644 (file)
@@ -68,25 +68,21 @@ void CheckboxInputType::handleKeyupEvent(KeyboardEvent* event)
     dispatchSimulatedClickIfActive(event);
 }
 
-OwnPtr<ClickHandlingState> CheckboxInputType::willDispatchClick()
+void CheckboxInputType::willDispatchClick(InputElementClickState& state)
 {
     // An event handler can use preventDefault or "return false" to reverse the checking we do here.
-    // The ClickHandlingState object contains what we need to undo what we did here in didDispatchClick.
+    // The InputElementClickState object contains what we need to undo what we did here in didDispatchClick.
 
-    OwnPtr<ClickHandlingState> state = adoptPtr(new ClickHandlingState);
+    state.checked = element().checked();
+    state.indeterminate = element().indeterminate();
 
-    state->checked = element().checked();
-    state->indeterminate = element().indeterminate();
-
-    if (state->indeterminate)
+    if (state.indeterminate)
         element().setIndeterminate(false);
 
-    element().setChecked(!state->checked, DispatchChangeEvent);
-
-    return state.release();
+    element().setChecked(!state.checked, DispatchChangeEvent);
 }
 
-void CheckboxInputType::didDispatchClick(Event* event, const ClickHandlingState& state)
+void CheckboxInputType::didDispatchClick(Event* event, const InputElementClickState& state)
 {
     if (event->defaultPrevented() || event->defaultHandled()) {
         element().setIndeterminate(state.indeterminate);
index 7ecbd08..45b3f83 100644 (file)
@@ -45,8 +45,8 @@ private:
     virtual bool valueMissing(const String&) const OVERRIDE;
     virtual String valueMissingText() const OVERRIDE;
     virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE;
-    virtual OwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
-    virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE;
+    virtual void willDispatchClick(InputElementClickState&) OVERRIDE;
+    virtual void didDispatchClick(Event*, const InputElementClickState&) OVERRIDE;
     virtual bool isCheckbox() const OVERRIDE;
     virtual bool supportsIndeterminateAppearance() const OVERRIDE;
 };
index e1a81c5..c04fe02 100644 (file)
@@ -1110,26 +1110,19 @@ void HTMLInputElement::setValueFromRenderer(const String& value)
     setAutofilled(false);
 }
 
-void* HTMLInputElement::preDispatchEventHandler(Event* event)
+void HTMLInputElement::willDispatchEvent(Event& event, InputElementClickState& state)
 {
-    if (event->type() == eventNames().textInputEvent && m_inputType->shouldSubmitImplicitly(event)) {
-        event->stopPropagation();
-        return 0;
+    if (event.type() == eventNames().textInputEvent && m_inputType->shouldSubmitImplicitly(&event))
+        event.stopPropagation();
+    if (event.type() == eventNames().clickEvent && event.isMouseEvent() && toMouseEvent(&event)->button() == LeftButton) {
+        m_inputType->willDispatchClick(state);
+        state.stateful = true;
     }
-    if (event->type() != eventNames().clickEvent)
-        return 0;
-    if (!event->isMouseEvent() || static_cast<MouseEvent*>(event)->button() != LeftButton)
-        return 0;
-    // FIXME: Check whether there are any cases where this actually ends up leaking.
-    return m_inputType->willDispatchClick().leakPtr();
 }
 
-void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreDispatch)
+void HTMLInputElement::didDispatchClickEvent(Event& event, const InputElementClickState& state)
 {
-    OwnPtr<ClickHandlingState> state = adoptPtr(static_cast<ClickHandlingState*>(dataFromPreDispatch));
-    if (!state)
-        return;
-    m_inputType->didDispatchClick(event, *state);
+    m_inputType->didDispatchClick(&event, state);
 }
 
 void HTMLInputElement::defaultEventHandler(Event* evt)
index 7389522..81b0287 100644 (file)
@@ -43,6 +43,18 @@ class URL;
 class ListAttributeTargetObserver;
 struct DateTimeChooserParameters;
 
+struct InputElementClickState {
+    InputElementClickState()
+        : stateful(false)
+        , checked(false)
+        , indeterminate(false)
+    { }
+    bool stateful;
+    bool checked;
+    bool indeterminate;
+    RefPtr<HTMLInputElement> checkedRadioButton;
+};
+
 class HTMLInputElement : public HTMLTextFormControlElement {
 public:
     static PassRefPtr<HTMLInputElement> create(const QualifiedName&, Document&, HTMLFormElement*, bool createdByParser);
@@ -201,6 +213,9 @@ public:
 
     String altText() const;
 
+    void willDispatchEvent(Event&, InputElementClickState&);
+    void didDispatchClickEvent(Event&, const InputElementClickState&);
+
     int maxResults() const { return m_maxResults; }
 
     String defaultValue() const;
@@ -356,9 +371,6 @@ private:
 
     virtual void reset();
 
-    virtual void* preDispatchEventHandler(Event*);
-    virtual void postDispatchEventHandler(Event*, void* dataFromPreDispatch);
-
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     virtual bool isInRange() const;
     virtual bool isOutOfRange() const;
index ad79d8c..c33febc 100644 (file)
@@ -4824,14 +4824,6 @@ void HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured(ReconfigureMod
 
 #endif
 
-void* HTMLMediaElement::preDispatchEventHandler(Event* event)
-{
-    if (event && event->type() == eventNames().webkitfullscreenchangeEvent)
-        configureMediaControls();
-
-    return 0;
-}
-
 void HTMLMediaElement::createMediaPlayer()
 {
 #if ENABLE(WEB_AUDIO)
index 6ea51d9..59feadf 100644 (file)
@@ -383,6 +383,8 @@ public:
 
     virtual bool willRespondToMouseClickEvents() OVERRIDE;
 
+    void enteredOrExitedFullscreen() { configureMediaControls(); }
+
 protected:
     HTMLMediaElement(const QualifiedName&, Document&, bool);
     virtual ~HTMLMediaElement();
@@ -607,8 +609,6 @@ private:
     void prepareMediaFragmentURI();
     void applyMediaFragmentURI();
 
-    virtual void* preDispatchEventHandler(Event*);
-
     void changeNetworkStateFromLoadingToIdle();
 
     void removeBehaviorsRestrictionsAfterFirstUserGesture();
index f882104..47f1e1f 100644 (file)
@@ -682,12 +682,11 @@ bool InputType::canSetValue(const String&)
     return true;
 }
 
-OwnPtr<ClickHandlingState> InputType::willDispatchClick()
+void InputType::willDispatchClick(InputElementClickState&)
 {
-    return nullptr;
 }
 
-void InputType::didDispatchClick(Event*, const ClickHandlingState&)
+void InputType::didDispatchClick(Event*, const InputElementClickState&)
 {
 }
 
index 550c6d1..ea31a0a 100644 (file)
@@ -61,18 +61,10 @@ class Node;
 class RenderArena;
 class RenderStyle;
 class TouchEvent;
+struct InputElementClickState;
 
 typedef int ExceptionCode;
 
-struct ClickHandlingState {
-    WTF_MAKE_FAST_ALLOCATED;
-  
-public:
-    bool checked;
-    bool indeterminate;
-    RefPtr<HTMLInputElement> checkedRadioButton;
-};
-
 // An InputType object represents the type-specific part of an HTMLInputElement.
 // Do not expose instances of InputType and classes derived from it to classes
 // other than HTMLInputElement.
@@ -185,8 +177,8 @@ public:
 
     virtual void handleClickEvent(MouseEvent*);
     virtual void handleMouseDownEvent(MouseEvent*);
-    virtual OwnPtr<ClickHandlingState> willDispatchClick();
-    virtual void didDispatchClick(Event*, const ClickHandlingState&);
+    virtual void willDispatchClick(InputElementClickState&);
+    virtual void didDispatchClick(Event*, const InputElementClickState&);
     virtual void handleDOMActivateEvent(Event*);
     virtual void handleKeydownEvent(KeyboardEvent*);
     virtual void handleKeypressEvent(KeyboardEvent*);
index 2b8e941..0c22416 100644 (file)
@@ -145,33 +145,29 @@ bool RadioInputType::shouldSendChangeEventAfterCheckedChanged()
     return element().checked();
 }
 
-OwnPtr<ClickHandlingState> RadioInputType::willDispatchClick()
+void RadioInputType::willDispatchClick(InputElementClickState& state)
 {
     // An event handler can use preventDefault or "return false" to reverse the selection we do here.
-    // The ClickHandlingState object contains what we need to undo what we did here in didDispatchClick.
+    // The InputElementClickState object contains what we need to undo what we did here in didDispatchClick.
 
     // We want radio groups to end up in sane states, i.e., to have something checked.
     // Therefore if nothing is currently selected, we won't allow the upcoming action to be "undone", since
     // we want some object in the radio group to actually get selected.
 
-    OwnPtr<ClickHandlingState> state = adoptPtr(new ClickHandlingState);
-
-    state->checked = element().checked();
-    state->checkedRadioButton = element().checkedRadioButtonForGroup();
+    state.checked = element().checked();
+    state.checkedRadioButton = element().checkedRadioButtonForGroup();
 
 #if PLATFORM(IOS)
-    state->indeterminate = element().indeterminate();
+    state.indeterminate = element().indeterminate();
 
     if (element().indeterminate())
         element().setIndeterminate(false);
 #endif
 
     element().setChecked(true, DispatchChangeEvent);
-
-    return state.release();
 }
 
-void RadioInputType::didDispatchClick(Event* event, const ClickHandlingState& state)
+void RadioInputType::didDispatchClick(Event* event, const InputElementClickState& state)
 {
     if (event->defaultPrevented() || event->defaultHandled()) {
         // Restore the original selected radio button if possible.
index 05ca102..141bc48 100644 (file)
@@ -49,8 +49,8 @@ private:
     virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE;
     virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
     virtual bool shouldSendChangeEventAfterCheckedChanged() OVERRIDE;
-    virtual OwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
-    virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE;
+    virtual void willDispatchClick(InputElementClickState&) OVERRIDE;
+    virtual void didDispatchClick(Event*, const InputElementClickState&) OVERRIDE;
     virtual bool isRadioButton() const OVERRIDE;
     virtual bool supportsIndeterminateAppearance() const OVERRIDE;
 };