OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2014 Google Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... |
41 class NodeEventContext { | 41 class NodeEventContext { |
42 ALLOW_ONLY_INLINE_ALLOCATION(); | 42 ALLOW_ONLY_INLINE_ALLOCATION(); |
43 public: | 43 public: |
44 // FIXME: Use ContainerNode instead of Node. | 44 // FIXME: Use ContainerNode instead of Node. |
45 NodeEventContext(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<EventT
arget> currentTarget); | 45 NodeEventContext(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<EventT
arget> currentTarget); |
46 ~NodeEventContext(); | 46 ~NodeEventContext(); |
47 void trace(Visitor*); | 47 void trace(Visitor*); |
48 | 48 |
49 Node* node() const { return m_node.get(); } | 49 Node* node() const { return m_node.get(); } |
50 | 50 |
51 void setTreeScopeEventContext(PassRefPtr<TreeScopeEventContext> prpTreeScope
EventContext) { m_treeScopeEventContext = prpTreeScopeEventContext; } | 51 void setTreeScopeEventContext(PassRefPtrWillBeRawPtr<TreeScopeEventContext>
prpTreeScopeEventContext) { m_treeScopeEventContext = prpTreeScopeEventContext;
} |
52 TreeScopeEventContext& treeScopeEventContext() { ASSERT(m_treeScopeEventCont
ext); return *m_treeScopeEventContext; } | 52 TreeScopeEventContext& treeScopeEventContext() { ASSERT(m_treeScopeEventCont
ext); return *m_treeScopeEventContext; } |
53 | 53 |
54 EventTarget* target() const { return m_treeScopeEventContext->target(); } | 54 EventTarget* target() const { return m_treeScopeEventContext->target(); } |
55 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related
Target(); } | 55 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related
Target(); } |
56 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex
t->touchEventContext(); } | 56 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex
t->touchEventContext(); } |
57 | 57 |
58 bool currentTargetSameAsTarget() const { return m_currentTarget.get() == tar
get(); } | 58 bool currentTargetSameAsTarget() const { return m_currentTarget.get() == tar
get(); } |
59 void handleLocalEvents(Event*) const; | 59 void handleLocalEvents(Event*) const; |
60 | 60 |
61 private: | 61 private: |
62 RefPtrWillBeMember<Node> m_node; | 62 RefPtrWillBeMember<Node> m_node; |
63 RefPtrWillBeMember<EventTarget> m_currentTarget; | 63 RefPtrWillBeMember<EventTarget> m_currentTarget; |
64 RefPtr<TreeScopeEventContext> m_treeScopeEventContext; | 64 RefPtrWillBeMember<TreeScopeEventContext> m_treeScopeEventContext; |
65 }; | 65 }; |
66 | 66 |
67 } | 67 } |
68 | 68 |
69 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(WebCore::NodeEventContext); | 69 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(WebCore::NodeEventContext); |
70 | 70 |
71 #endif // NodeEventContext_h | 71 #endif // NodeEventContext_h |
OLD | NEW |