Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: third_party/WebKit/Source/core/events/EventPath.h

Issue 2384403002: Dispatch synthetic events even when target and relatedTarget are identical (Closed)
Patch Set: fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 private: 86 private:
87 EventPath(); 87 EventPath();
88 88
89 void initialize(); 89 void initialize();
90 void calculatePath(); 90 void calculatePath();
91 void calculateAdjustedTargets(); 91 void calculateAdjustedTargets();
92 void calculateTreeOrderAndSetNearestAncestorClosedTree(); 92 void calculateTreeOrderAndSetNearestAncestorClosedTree();
93 93
94 bool shouldStopEventPath(EventTarget& currentTarget,
95 EventTarget& currentRelatedTarget,
96 const Node& target);
97
94 void shrink(size_t newSize) { 98 void shrink(size_t newSize) {
95 DCHECK(!m_windowEventContext); 99 DCHECK(!m_windowEventContext);
96 m_nodeEventContexts.shrink(newSize); 100 m_nodeEventContexts.shrink(newSize);
97 } 101 }
98 102
99 void retargetRelatedTarget(const Node& relatedTargetNode); 103 void retargetRelatedTarget(const Node& relatedTargetNode);
100 104
101 void shrinkForRelatedTarget(const Node& target, const Node& relatedTarget); 105 void shrinkForRelatedTarget(const Node& target);
102 106
103 void adjustTouchList(const TouchList*, 107 void adjustTouchList(const TouchList*,
104 HeapVector<Member<TouchList>> adjustedTouchList, 108 HeapVector<Member<TouchList>> adjustedTouchList,
105 const HeapVector<Member<TreeScope>>& treeScopes); 109 const HeapVector<Member<TreeScope>>& treeScopes);
106 110
107 using TreeScopeEventContextMap = 111 using TreeScopeEventContextMap =
108 HeapHashMap<Member<TreeScope>, Member<TreeScopeEventContext>>; 112 HeapHashMap<Member<TreeScope>, Member<TreeScopeEventContext>>;
109 TreeScopeEventContext* ensureTreeScopeEventContext(Node* currentTarget, 113 TreeScopeEventContext* ensureTreeScopeEventContext(Node* currentTarget,
110 TreeScope*, 114 TreeScope*,
111 TreeScopeEventContextMap&); 115 TreeScopeEventContextMap&);
(...skipping 10 matching lines...) Expand all
122 HeapVector<NodeEventContext> m_nodeEventContexts; 126 HeapVector<NodeEventContext> m_nodeEventContexts;
123 Member<Node> m_node; 127 Member<Node> m_node;
124 Member<Event> m_event; 128 Member<Event> m_event;
125 HeapVector<Member<TreeScopeEventContext>> m_treeScopeEventContexts; 129 HeapVector<Member<TreeScopeEventContext>> m_treeScopeEventContexts;
126 Member<WindowEventContext> m_windowEventContext; 130 Member<WindowEventContext> m_windowEventContext;
127 }; 131 };
128 132
129 } // namespace blink 133 } // namespace blink
130 134
131 #endif 135 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698