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

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

Issue 1684533002: Rename "tree of trees" to "composed tree". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 m_nodeEventContexts.reserveCapacity(nodesInPath.size()); 151 m_nodeEventContexts.reserveCapacity(nodesInPath.size());
152 for (Node* nodeInPath : nodesInPath) { 152 for (Node* nodeInPath : nodesInPath) {
153 m_nodeEventContexts.append(NodeEventContext(nodeInPath, eventTargetRespe ctingTargetRules(*nodeInPath))); 153 m_nodeEventContexts.append(NodeEventContext(nodeInPath, eventTargetRespe ctingTargetRules(*nodeInPath)));
154 } 154 }
155 } 155 }
156 156
157 void EventPath::calculateTreeOrderAndSetNearestAncestorClosedTree() 157 void EventPath::calculateTreeOrderAndSetNearestAncestorClosedTree()
158 { 158 {
159 // Precondition: 159 // Precondition:
160 // - TreeScopes in m_treeScopeEventContexts must be *connected* in the sam e tree of trees. 160 // - TreeScopes in m_treeScopeEventContexts must be *connected* in the sam e composed tree.
161 // - The root tree must be included. 161 // - The root tree must be included.
162 WillBeHeapHashMap<RawPtrWillBeMember<const TreeScope>, RawPtrWillBeMember<Tr eeScopeEventContext>> treeScopeEventContextMap; 162 WillBeHeapHashMap<RawPtrWillBeMember<const TreeScope>, RawPtrWillBeMember<Tr eeScopeEventContext>> treeScopeEventContextMap;
163 for (const auto& treeScopeEventContext : m_treeScopeEventContexts) 163 for (const auto& treeScopeEventContext : m_treeScopeEventContexts)
164 treeScopeEventContextMap.add(&treeScopeEventContext->treeScope(), treeSc opeEventContext.get()); 164 treeScopeEventContextMap.add(&treeScopeEventContext->treeScope(), treeSc opeEventContext.get());
165 TreeScopeEventContext* rootTree = nullptr; 165 TreeScopeEventContext* rootTree = nullptr;
166 for (const auto& treeScopeEventContext : m_treeScopeEventContexts) { 166 for (const auto& treeScopeEventContext : m_treeScopeEventContexts) {
167 // Use olderShadowRootOrParentTreeScope here for parent-child relationsh ips. 167 // Use olderShadowRootOrParentTreeScope here for parent-child relationsh ips.
168 // See the definition of trees of trees in the Shadow DOM spec: 168 // See the definition of trees of trees in the Shadow DOM spec:
169 // http://w3c.github.io/webcomponents/spec/shadow/ 169 // http://w3c.github.io/webcomponents/spec/shadow/
170 TreeScope* parent = treeScopeEventContext.get()->treeScope().olderShadow RootOrParentTreeScope(); 170 TreeScope* parent = treeScopeEventContext.get()->treeScope().olderShadow RootOrParentTreeScope();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 #if ENABLE(OILPAN) 379 #if ENABLE(OILPAN)
380 visitor->trace(m_nodeEventContexts); 380 visitor->trace(m_nodeEventContexts);
381 visitor->trace(m_node); 381 visitor->trace(m_node);
382 visitor->trace(m_event); 382 visitor->trace(m_event);
383 visitor->trace(m_treeScopeEventContexts); 383 visitor->trace(m_treeScopeEventContexts);
384 visitor->trace(m_windowEventContext); 384 visitor->trace(m_windowEventContext);
385 #endif 385 #endif
386 } 386 }
387 387
388 } // namespace blink 388 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698