OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |