Title: [157294] trunk/Source/WebCore
Revision
157294
Author
[email protected]
Date
2013-10-10 23:41:50 -0700 (Thu, 10 Oct 2013)

Log Message

Make EventPath private to EventDispatcher.cpp
https://bugs.webkit.org/show_bug.cgi?id=122638

Reviewed by Darin Adler.

Move the declaration of EventPath into EventDispatcher.cpp since EventPath is only used in this file.
Also make EventDispatcher a namespace since it is never instantiated since r157250.

* dom/EventDispatcher.cpp:
(WebCore::EventPath::isEmpty):
(WebCore::EventPath::size):
(WebCore::EventPath::contextAt):
(WebCore::EventPath::lastContextIfExists):
* dom/EventDispatcher.h:
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willDispatchEvent):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157293 => 157294)


--- trunk/Source/WebCore/ChangeLog	2013-10-11 06:37:33 UTC (rev 157293)
+++ trunk/Source/WebCore/ChangeLog	2013-10-11 06:41:50 UTC (rev 157294)
@@ -1,3 +1,22 @@
+2013-10-10  Ryosuke Niwa  <[email protected]>
+
+        Make EventPath private to EventDispatcher.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=122638
+
+        Reviewed by Darin Adler.
+
+        Move the declaration of EventPath into EventDispatcher.cpp since EventPath is only used in this file.
+        Also make EventDispatcher a namespace since it is never instantiated since r157250.
+
+        * dom/EventDispatcher.cpp:
+        (WebCore::EventPath::isEmpty):
+        (WebCore::EventPath::size):
+        (WebCore::EventPath::contextAt):
+        (WebCore::EventPath::lastContextIfExists):
+        * dom/EventDispatcher.h:
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::willDispatchEvent):
+
 2013-10-10  Santosh Mahto  <[email protected]>
 
         contentEditable with "position:relative" paragraphs is buggy

Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (157293 => 157294)


--- trunk/Source/WebCore/dom/EventDispatcher.cpp	2013-10-11 06:37:33 UTC (rev 157293)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp	2013-10-11 06:41:50 UTC (rev 157294)
@@ -83,6 +83,29 @@
     return true;
 }
 
+class EventPath {
+public:
+    EventPath(Node& origin, Event&);
+
+    bool isEmpty() const { return m_path.isEmpty(); }
+    size_t size() const { return m_path.size(); }
+    const EventContext& contextAt(size_t i) const { return *m_path[i]; }
+    EventContext& contextAt(size_t i) { return *m_path[i]; }
+
+#if ENABLE(TOUCH_EVENTS)
+    void updateTouchLists(const TouchEvent&);
+#endif
+    void setRelatedTarget(EventTarget&);
+
+    bool hasEventListeners(const AtomicString& eventType) const;
+
+    EventContext* lastContextIfExists() { return m_path.isEmpty() ? 0 : m_path.last().get(); }
+
+private:
+    Vector<std::unique_ptr<EventContext>, 32> m_path;
+    RefPtr<Node> m_origin;
+};
+
 inline EventTarget& eventTargetRespectingTargetRules(Node& referenceNode)
 {
     if (referenceNode.isPseudoElement()) {

Modified: trunk/Source/WebCore/dom/EventDispatcher.h (157293 => 157294)


--- trunk/Source/WebCore/dom/EventDispatcher.h	2013-10-11 06:37:33 UTC (rev 157293)
+++ trunk/Source/WebCore/dom/EventDispatcher.h	2013-10-11 06:41:50 UTC (rev 157294)
@@ -28,60 +28,22 @@
 
 #include "SimulatedClickOptions.h"
 #include <wtf/Forward.h>
-#include <wtf/HashMap.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/Vector.h>
 
 namespace WebCore {
 
 class Element;
 class Event;
-class EventContext;
-class EventTarget;
-class FrameView;
 class Node;
-class PlatformKeyboardEvent;
-class PlatformMouseEvent;
-class ShadowRoot;
-class TouchEvent;
-class TreeScope;
-struct InputElementClickState;
 
-enum EventDispatchContinuation {
-    ContinueDispatching,
-    DoneDispatching
-};
+namespace EventDispatcher {
 
-class EventPath {
-public:
-    EventPath(Node& origin, Event&);
+bool dispatchEvent(Node*, PassRefPtr<Event>);
+void dispatchScopedEvent(Node&, PassRefPtr<Event>);
+void dispatchSimulatedClick(Element*, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions);
 
-    bool isEmpty() const { return m_path.isEmpty(); }
-    size_t size() const { return m_path.size(); }
-    const EventContext& contextAt(size_t i) const { return *m_path[i]; }
-    EventContext& contextAt(size_t i) { return *m_path[i]; }
-
-#if ENABLE(TOUCH_EVENTS)
-    void updateTouchLists(const TouchEvent&);
-#endif
-    void setRelatedTarget(EventTarget&);
-
-    bool hasEventListeners(const AtomicString& eventType) const;
-
-    EventContext* lastContextIfExists() { return m_path.isEmpty() ? 0 : m_path.last().get(); }
-
-private:
-    Vector<std::unique_ptr<EventContext>, 32> m_path;
-    RefPtr<Node> m_origin;
 };
 
-class EventDispatcher {
-public:
-    static bool dispatchEvent(Node*, PassRefPtr<Event>);
-    static void dispatchScopedEvent(Node&, PassRefPtr<Event>);
-    static void dispatchSimulatedClick(Element*, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions);
-};
-
 }
 
 #endif

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (157293 => 157294)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2013-10-11 06:37:33 UTC (rev 157293)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2013-10-11 06:41:50 UTC (rev 157294)
@@ -55,7 +55,6 @@
 class Database;
 class Document;
 class Element;
-class EventPath;
 class DocumentLoader;
 class DocumentStyleSheetCollection;
 class DeviceOrientationData;
@@ -893,7 +892,6 @@
     UNUSED_PARAM(event);
     UNUSED_PARAM(window);
     UNUSED_PARAM(node);
-    UNUSED_PARAM(eventPath);
 #endif
     return InspectorInstrumentationCookie();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to