Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / events / EventPath.h
index ea0f1dc..89cab51 100644 (file)
@@ -33,7 +33,7 @@
 #include "wtf/HashMap.h"
 #include "wtf/Vector.h"
 
-namespace WebCore {
+namespace blink {
 
 class Event;
 class EventTarget;
@@ -47,7 +47,7 @@ enum EventDispatchBehavior {
     StayInsideShadowDOM
 };
 
-class EventPath : public NoBaseWillBeGarbageCollectedFinalized<EventPath> {
+class EventPath FINAL : public NoBaseWillBeGarbageCollected<EventPath> {
 public:
     explicit EventPath(Event*);
     explicit EventPath(Node*);
@@ -55,7 +55,7 @@ public:
 
     NodeEventContext& operator[](size_t index) { return m_nodeEventContexts[index]; }
     const NodeEventContext& operator[](size_t index) const { return m_nodeEventContexts[index]; }
-    const NodeEventContext& last() const { return m_nodeEventContexts[size() - 1]; }
+    NodeEventContext& last() { return m_nodeEventContexts[size() - 1]; }
 
     bool isEmpty() const { return m_nodeEventContexts.isEmpty(); }
     size_t size() const { return m_nodeEventContexts.size(); }
@@ -81,24 +81,24 @@ private:
     void shrink(size_t newSize) { m_nodeEventContexts.shrink(newSize); }
     void shrinkIfNeeded(const Node* target, const EventTarget* relatedTarget);
 
-    void adjustTouchList(const Node*, const TouchList*, WillBeHeapVector<RawPtrWillBeMember<TouchList> > adjustedTouchList, const Vector<TreeScope*>& treeScopes);
+    void adjustTouchList(const Node*, const TouchList*, WillBeHeapVector<RawPtrWillBeMember<TouchList> > adjustedTouchList, const WillBeHeapVector<RawPtrWillBeMember<TreeScope> >& treeScopes);
 
-    typedef HashMap<TreeScope*, RefPtr<TreeScopeEventContext> > TreeScopeEventContextMap;
+    typedef WillBeHeapHashMap<RawPtrWillBeMember<TreeScope>, RefPtrWillBeMember<TreeScopeEventContext> > TreeScopeEventContextMap;
     TreeScopeEventContext* ensureTreeScopeEventContext(Node* currentTarget, TreeScope*, TreeScopeEventContextMap&);
 
-    typedef HashMap<TreeScope*, EventTarget*> RelatedTargetMap;
+    typedef WillBeHeapHashMap<RawPtrWillBeMember<TreeScope>, RawPtrWillBeMember<EventTarget> > RelatedTargetMap;
 
     static void buildRelatedNodeMap(const Node*, RelatedTargetMap&);
     static EventTarget* findRelatedNode(TreeScope*, RelatedTargetMap&);
 
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
     static void checkReachability(TreeScope&, TouchList&);
 #endif
 
-    Vector<NodeEventContext, 64> m_nodeEventContexts;
-    Node* m_node;
+    WillBeHeapVector<NodeEventContext, 64> m_nodeEventContexts;
+    RawPtrWillBeMember<Node> m_node;
     RawPtrWillBeMember<Event> m_event;
-    Vector<RefPtr<TreeScopeEventContext> > m_treeScopeEventContexts;
+    WillBeHeapVector<RefPtrWillBeMember<TreeScopeEventContext> > m_treeScopeEventContexts;
 };
 
 } // namespace