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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/resources/event-dispatching.js

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip 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
OLDNEW
1 var defaultPaddingSize = 40; 1 var defaultPaddingSize = 40;
2 2
3 function moveMouseOver(element) 3 function moveMouseOver(element)
4 { 4 {
5 if (!window.eventSender || !window.internals) 5 if (!window.eventSender || !window.internals)
6 return; 6 return;
7 7
8 var x = element.offsetLeft + element.offsetWidth / 2; 8 var x = element.offsetLeft + element.offsetWidth / 2;
9 var y; 9 var y;
10 if (element.hasChildNodes() || window.internals.shadowRoot(element)) 10 if (element.hasChildNodes() || window.internals.shadowRoot(element))
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 result += ', '; 114 result += ', ';
115 } 115 }
116 return result; 116 return result;
117 } 117 }
118 118
119 function dumpComposedShadowTree(node, indent) 119 function dumpComposedShadowTree(node, indent)
120 { 120 {
121 indent = indent || ""; 121 indent = indent || "";
122 var output = indent + dumpNode(node) + "\n"; 122 var output = indent + dumpNode(node) + "\n";
123 var child; 123 var child;
124 for (child = internals.firstChildInComposedTree(node); child; child = intern als.nextSiblingInComposedTree(child)) 124 for (child = internals.firstChildInFlatTree(node); child; child = internals. nextSiblingInFlatTree(child))
125 output += dumpComposedShadowTree(child, indent + "\t"); 125 output += dumpComposedShadowTree(child, indent + "\t");
126 return output; 126 return output;
127 } 127 }
128 128
129 function addEventListeners(nodes) 129 function addEventListeners(nodes)
130 { 130 {
131 for (var i = 0; i < nodes.length; ++i) { 131 for (var i = 0; i < nodes.length; ++i) {
132 addEventListenersToNode(getNodeInTreeOfTrees(nodes[i])); 132 addEventListenersToNode(getNodeInTreeOfTrees(nodes[i]));
133 } 133 }
134 } 134 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 getNodeInTreeOfTrees(elementId).dispatchEvent(clickEvent); 182 getNodeInTreeOfTrees(elementId).dispatchEvent(clickEvent);
183 debugDispatchedEvent('click'); 183 debugDispatchedEvent('click');
184 } 184 }
185 185
186 function showSandboxTree() 186 function showSandboxTree()
187 { 187 {
188 var sandbox = document.getElementById('sandbox'); 188 var sandbox = document.getElementById('sandbox');
189 sandbox.offsetLeft; 189 sandbox.offsetLeft;
190 debug('\n\nComposed Shadow Tree will be:\n' + dumpComposedShadowTree(sandbox )); 190 debug('\n\nComposed Shadow Tree will be:\n' + dumpComposedShadowTree(sandbox ));
191 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698