Rename EventDispatchMediator::dispatchEvent to mediateAndDispatchEvent
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Oct 2013 20:58:51 +0000 (20:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Oct 2013 20:58:51 +0000 (20:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122522

Reviewed by Darin Adler.

Renamed EventDispatchMediator::dispatchEvent to EventDispatchMediator::mediateAndDispatchEvent
to make the future refactoring easier.

* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEventDispatchMediator::mediateAndDispatchEvent):
* Modules/indieui/UIRequestEvent.h:
* dom/EventDispatchMediator.cpp:
(WebCore::EventDispatchMediator::mediateAndDispatchEvent):
* dom/EventDispatchMediator.h:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/FocusEvent.cpp:
(WebCore::FocusEventDispatchMediator::mediateAndDispatchEvent):
(WebCore::BlurEventDispatchMediator::mediateAndDispatchEvent):
(WebCore::FocusInEventDispatchMediator::mediateAndDispatchEvent):
(WebCore::FocusOutEventDispatchMediator::mediateAndDispatchEvent):
* dom/FocusEvent.h:
* dom/GestureEvent.cpp:
(WebCore::GestureEventDispatchMediator::mediateAndDispatchEvent):
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEventDispatchMediator::mediateAndDispatchEvent):
* dom/KeyboardEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent):
* dom/MouseEvent.h:
* dom/TouchEvent.cpp:
(WebCore::TouchEventDispatchMediator::mediateAndDispatchEvent):
* dom/TouchEvent.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEventDispatchMediator::mediateAndDispatchEvent):
* dom/WheelEvent.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157136 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indieui/UIRequestEvent.cpp
Source/WebCore/Modules/indieui/UIRequestEvent.h
Source/WebCore/dom/EventDispatchMediator.cpp
Source/WebCore/dom/EventDispatchMediator.h
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/FocusEvent.cpp
Source/WebCore/dom/FocusEvent.h
Source/WebCore/dom/GestureEvent.cpp
Source/WebCore/dom/GestureEvent.h
Source/WebCore/dom/KeyboardEvent.cpp
Source/WebCore/dom/KeyboardEvent.h
Source/WebCore/dom/MouseEvent.cpp
Source/WebCore/dom/MouseEvent.h
Source/WebCore/dom/TouchEvent.cpp
Source/WebCore/dom/TouchEvent.h
Source/WebCore/dom/WheelEvent.cpp
Source/WebCore/dom/WheelEvent.h

index b650ae7..7b29222 100644 (file)
@@ -1,3 +1,43 @@
+2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Rename EventDispatchMediator::dispatchEvent to mediateAndDispatchEvent
+        https://bugs.webkit.org/show_bug.cgi?id=122522
+
+        Reviewed by Darin Adler.
+
+        Renamed EventDispatchMediator::dispatchEvent to EventDispatchMediator::mediateAndDispatchEvent
+        to make the future refactoring easier.
+
+        * Modules/indieui/UIRequestEvent.cpp:
+        (WebCore::UIRequestEventDispatchMediator::mediateAndDispatchEvent):
+        * Modules/indieui/UIRequestEvent.h:
+        * dom/EventDispatchMediator.cpp:
+        (WebCore::EventDispatchMediator::mediateAndDispatchEvent):
+        * dom/EventDispatchMediator.h:
+        * dom/EventDispatcher.cpp:
+        (WebCore::EventDispatcher::dispatchEvent):
+        * dom/FocusEvent.cpp:
+        (WebCore::FocusEventDispatchMediator::mediateAndDispatchEvent):
+        (WebCore::BlurEventDispatchMediator::mediateAndDispatchEvent):
+        (WebCore::FocusInEventDispatchMediator::mediateAndDispatchEvent):
+        (WebCore::FocusOutEventDispatchMediator::mediateAndDispatchEvent):
+        * dom/FocusEvent.h:
+        * dom/GestureEvent.cpp:
+        (WebCore::GestureEventDispatchMediator::mediateAndDispatchEvent):
+        * dom/GestureEvent.h:
+        * dom/KeyboardEvent.cpp:
+        (WebCore::KeyboardEventDispatchMediator::mediateAndDispatchEvent):
+        * dom/KeyboardEvent.h:
+        * dom/MouseEvent.cpp:
+        (WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent):
+        * dom/MouseEvent.h:
+        * dom/TouchEvent.cpp:
+        (WebCore::TouchEventDispatchMediator::mediateAndDispatchEvent):
+        * dom/TouchEvent.h:
+        * dom/WheelEvent.cpp:
+        (WebCore::WheelEventDispatchMediator::mediateAndDispatchEvent):
+        * dom/WheelEvent.h:
+
 2013-10-08  Brent Fulgham  <bfulgham@apple.com>
 
         [MathML] Use of floating point floor/ceil on LayoutUnits seems wrong
index ff4ea4b..a9bb4c1 100644 (file)
@@ -89,7 +89,7 @@ UIRequestEvent* UIRequestEventDispatchMediator::event() const
     return static_cast<UIRequestEvent*>(EventDispatchMediator::event());
 }
 
-bool UIRequestEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool UIRequestEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     dispatcher->dispatch();
     return event()->defaultHandled() || event()->defaultPrevented();
index bb0e92e..ef827a0 100644 (file)
@@ -75,7 +75,7 @@ private:
     
     UIRequestEvent* event() const;
     
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
     
 } // namespace WebCore
index a3ca4c8..8075e69 100644 (file)
@@ -48,7 +48,7 @@ EventDispatchMediator::EventDispatchMediator(PassRefPtr<Event> event)
 {
 }
 
-bool EventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool EventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     ASSERT(m_event.get() == dispatcher->event());
     return dispatcher->dispatch();
index c334348..9650557 100644 (file)
@@ -45,7 +45,7 @@ class EventDispatchMediator : public RefCounted<EventDispatchMediator> {
 public:
     static PassRefPtr<EventDispatchMediator> create(PassRefPtr<Event>);
     virtual ~EventDispatchMediator() { };
-    virtual bool dispatchEvent(EventDispatcher*) const;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const;
     Event* event() const { return m_event.get(); };
 
 protected:
index 5c8b26c..978933a 100644 (file)
@@ -49,7 +49,7 @@ bool EventDispatcher::dispatchEvent(Node* node, PassRefPtr<EventDispatchMediator
     if (!mediator->event())
         return true;
     EventDispatcher dispatcher(node, mediator->event());
-    return mediator->dispatchEvent(&dispatcher);
+    return mediator->mediateAndDispatchEvent(&dispatcher);
 }
 
 EventDispatcher::EventDispatcher(Node* node, PassRefPtr<Event> event)
index ddb91ce..ee20f7a 100644 (file)
@@ -75,10 +75,10 @@ FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtr<FocusEvent> fo
 {
 }
 
-bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool FocusEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->eventPath());
-    return EventDispatchMediator::dispatchEvent(dispatcher);
+    return EventDispatchMediator::mediateAndDispatchEvent(dispatcher);
 }
 
 PassRefPtr<BlurEventDispatchMediator> BlurEventDispatchMediator::create(PassRefPtr<FocusEvent> focusEvent)
@@ -91,10 +91,10 @@ BlurEventDispatchMediator::BlurEventDispatchMediator(PassRefPtr<FocusEvent> focu
 {
 }
 
-bool BlurEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool BlurEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->eventPath());
-    return EventDispatchMediator::dispatchEvent(dispatcher);
+    return EventDispatchMediator::mediateAndDispatchEvent(dispatcher);
 }
 
 PassRefPtr<FocusInEventDispatchMediator> FocusInEventDispatchMediator::create(PassRefPtr<FocusEvent> focusEvent)
@@ -107,10 +107,10 @@ FocusInEventDispatchMediator::FocusInEventDispatchMediator(PassRefPtr<FocusEvent
 {
 }
 
-bool FocusInEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool FocusInEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->eventPath());
-    return EventDispatchMediator::dispatchEvent(dispatcher);
+    return EventDispatchMediator::mediateAndDispatchEvent(dispatcher);
 }
 
 PassRefPtr<FocusOutEventDispatchMediator> FocusOutEventDispatchMediator::create(PassRefPtr<FocusEvent> focusEvent)
@@ -123,10 +123,10 @@ FocusOutEventDispatchMediator::FocusOutEventDispatchMediator(PassRefPtr<FocusEve
 {
 }
 
-bool FocusOutEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool FocusOutEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->eventPath());
-    return EventDispatchMediator::dispatchEvent(dispatcher);
+    return EventDispatchMediator::mediateAndDispatchEvent(dispatcher);
 }
 
 } // namespace WebCore
index 6d602d6..ad8a392 100644 (file)
@@ -82,7 +82,7 @@ public:
 private:
     explicit FocusEventDispatchMediator(PassRefPtr<FocusEvent>);
     FocusEvent* event() const { return static_cast<FocusEvent*>(EventDispatchMediator::event()); }
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 class BlurEventDispatchMediator : public EventDispatchMediator {
@@ -91,7 +91,7 @@ public:
 private:
     explicit BlurEventDispatchMediator(PassRefPtr<FocusEvent>);
     FocusEvent* event() const { return static_cast<FocusEvent*>(EventDispatchMediator::event()); }
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 class FocusInEventDispatchMediator : public EventDispatchMediator {
@@ -100,7 +100,7 @@ public:
 private:
     explicit FocusInEventDispatchMediator(PassRefPtr<FocusEvent>);
     FocusEvent* event() const { return static_cast<FocusEvent*>(EventDispatchMediator::event()); }
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 class FocusOutEventDispatchMediator : public EventDispatchMediator {
@@ -109,7 +109,7 @@ public:
 private:
     explicit FocusOutEventDispatchMediator(PassRefPtr<FocusEvent>);
     FocusEvent* event() const { return static_cast<FocusEvent*>(EventDispatchMediator::event()); }
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 } // namespace WebCore
index 17a25e9..47502f0 100644 (file)
@@ -115,7 +115,7 @@ GestureEvent* GestureEventDispatchMediator::event() const
     return static_cast<GestureEvent*>(EventDispatchMediator::event());
 }
 
-bool GestureEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool GestureEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     if (isDisabledFormControl(dispatcher->node()))
         return true;
index fae99a3..fb0d2bd 100644 (file)
@@ -73,7 +73,7 @@ private:
 
     GestureEvent* event() const;
 
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 } // namespace WebCore
index 0fd6082..d722d57 100644 (file)
@@ -223,10 +223,10 @@ KeyboardEventDispatchMediator::KeyboardEventDispatchMediator(PassRefPtr<Keyboard
 {
 }
 
-bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool KeyboardEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     // Make sure not to return true if we already took default action while handling the event.
-    return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->defaultHandled();
+    return EventDispatchMediator::mediateAndDispatchEvent(dispatcher) && !event()->defaultHandled();
 }
 
 } // namespace WebCore
index 004b36e..38442be 100644 (file)
@@ -133,7 +133,7 @@ public:
     static PassRefPtr<KeyboardEventDispatchMediator> create(PassRefPtr<KeyboardEvent>);
 private:
     explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>);
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 } // namespace WebCore
index f4a49cb..a1ec1f0 100644 (file)
@@ -296,7 +296,7 @@ MouseEvent* MouseEventDispatchMediator::event() const
     return static_cast<MouseEvent*>(EventDispatchMediator::event());
 }
 
-bool MouseEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool MouseEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     if (isSyntheticMouseEvent()) {
         EventRetargeter::adjustForMouseEvent(dispatcher->node(), *event(),  dispatcher->eventPath());
index 4d2c50b..ac9751f 100644 (file)
@@ -142,7 +142,7 @@ private:
     explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>, MouseEventType);
     MouseEvent* event() const;
 
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
     bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMouseEvent; }
     MouseEventType m_mouseEventType;
 };
index b600327..a94a885 100644 (file)
@@ -117,7 +117,7 @@ TouchEvent* TouchEventDispatchMediator::event() const
     return static_cast<TouchEvent*>(EventDispatchMediator::event());
 }
 
-bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool TouchEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     EventRetargeter::adjustForTouchEvent(dispatcher->node(), *event(), dispatcher->eventPath());
     return dispatcher->dispatch();
index e85471f..fc9ec33 100644 (file)
@@ -102,7 +102,7 @@ public:
 private:
     explicit TouchEventDispatchMediator(PassRefPtr<TouchEvent>);
     TouchEvent* event() const;
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 inline TouchEvent* toTouchEvent(Event* event)
index 221b54b..2fb52f6 100644 (file)
@@ -150,10 +150,10 @@ WheelEvent* WheelEventDispatchMediator::event() const
     return static_cast<WheelEvent*>(EventDispatchMediator::event());
 }
 
-bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
+bool WheelEventDispatchMediator::mediateAndDispatchEvent(EventDispatcher* dispatcher) const
 {
     ASSERT(event());
-    return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->defaultHandled();
+    return EventDispatchMediator::mediateAndDispatchEvent(dispatcher) && !event()->defaultHandled();
 }
 
 } // namespace WebCore
index 0068da2..aa7a1a5 100644 (file)
@@ -117,7 +117,7 @@ public:
 private:
     WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractView>);
     WheelEvent* event() const;
-    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
+    virtual bool mediateAndDispatchEvent(EventDispatcher*) const OVERRIDE;
 };
 
 } // namespace WebCore