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

Unified Diff: Source/core/events/EventPath.cpp

Issue 1305733002: Fix for calculation of event.path for closed mode shadow root (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comment update Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/events/EventPath.cpp
diff --git a/Source/core/events/EventPath.cpp b/Source/core/events/EventPath.cpp
index bfdee9e9f1a18e49ec985885eb6e375d6fec6501..996b520162fac270a75855add8ed09e18d5b0026 100644
--- a/Source/core/events/EventPath.cpp
+++ b/Source/core/events/EventPath.cpp
@@ -166,7 +166,8 @@ void EventPath::calculateTreeScopePrePostOrderNumbers()
TreeScopeEventContext* rootTree = 0;
for (const auto& treeScopeEventContext : m_treeScopeEventContexts) {
// Use olderShadowRootOrParentTreeScope here for parent-child relationships.
- // See the definition of trees of trees in the Shado DOM spec: http://w3c.github.io/webcomponents/spec/shadow/
+ // See the definition of trees of trees in the Shadow DOM spec:
+ // http://w3c.github.io/webcomponents/spec/shadow/
TreeScope* parent = treeScopeEventContext.get()->treeScope().olderShadowRootOrParentTreeScope();
if (!parent) {
ASSERT(!rootTree);
@@ -177,7 +178,7 @@ void EventPath::calculateTreeScopePrePostOrderNumbers()
treeScopeEventContextMap.find(parent)->value->addChild(*treeScopeEventContext.get());
}
ASSERT(rootTree);
- rootTree->calculatePrePostOrderNumber(0);
+ rootTree->calculateTreeOrderAndFindClosedTrees(0, nullptr);
}
TreeScopeEventContext* EventPath::ensureTreeScopeEventContext(Node* currentTarget, TreeScope* treeScope, TreeScopeEventContextMap& treeScopeEventContextMap)

Powered by Google App Engine
This is Rietveld 408576698