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

Unified Diff: PerformanceTests/Events/EventsDispatchingInDeeplyNestedShadowTrees.html

Issue 182683002: Lazy evaluation of event.path by numbering TreeScopes in DFS order for later O(1) queries (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more renaming Created 6 years, 9 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
« no previous file with comments | « no previous file | Source/core/events/Event.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/Events/EventsDispatchingInDeeplyNestedShadowTrees.html
diff --git a/PerformanceTests/Events/EventsDispatchingInShadowTrees.html b/PerformanceTests/Events/EventsDispatchingInDeeplyNestedShadowTrees.html
similarity index 71%
copy from PerformanceTests/Events/EventsDispatchingInShadowTrees.html
copy to PerformanceTests/Events/EventsDispatchingInDeeplyNestedShadowTrees.html
index 01eaeb68617b49a3b76837298fc4210ca184ae96..16fc9dd134f3000e967d158cd2efda507280c5f4 100644
--- a/PerformanceTests/Events/EventsDispatchingInShadowTrees.html
+++ b/PerformanceTests/Events/EventsDispatchingInDeeplyNestedShadowTrees.html
@@ -4,9 +4,9 @@
<script type="text/javascript" src="../resources/runner.js"></script>
</head>
<body>
-<div id="root"></div>
+<div id="root"><div id="child1"></div><div id="child2"></div></div>
<script>
-function createTreeOfTrees(root, depth, branch, eachTreeHeight)
+function createTreeOfTrees(root, depth, eachTreeHeight)
{
var node = root;
var i;
@@ -17,12 +17,10 @@ function createTreeOfTrees(root, depth, branch, eachTreeHeight)
}
if (depth == 1)
return;
- for (i = 0; i < branch; ++i) {
- var child = document.createElement('div');
- node.appendChild(child);
- var shadowRoot = child.webkitCreateShadowRoot();
- createTreeOfTrees(shadowRoot, depth - 1, branch, eachTreeHeight);
- }
+ var child = document.createElement('div');
+ node.appendChild(child);
+ var shadowRoot = child.webkitCreateShadowRoot();
+ createTreeOfTrees(shadowRoot, depth - 1, eachTreeHeight);
}
function leftMostLeaf(root)
@@ -46,7 +44,8 @@ function rightMostLeaf(root)
}
var root = document.getElementById('root');
-createTreeOfTrees(root, 10, 2, 50);
+createTreeOfTrees(document.getElementById('child1'), 200, 50);
+createTreeOfTrees(document.getElementById('child2'), 200, 50);
var leaf1 = leftMostLeaf(root);
var leaf2 = rightMostLeaf(root);
« no previous file with comments | « no previous file | Source/core/events/Event.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698