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

Side by Side Diff: LayoutTests/fast/dom/shadow/resources/shadow-dom.js

Issue 216123005: Don't expose WebKitShadowRoot constructor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reset results to fix end of line Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/shadow-root-js-api.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function createShadowRoot() 1 function createShadowRoot()
2 { 2 {
3 var children = Array.prototype.slice.call(arguments); 3 var children = Array.prototype.slice.call(arguments);
4 if ((children[0] instanceof Object) && !(children[0] instanceof Node)) 4 if ((children[0] instanceof Object) && !(children[0] instanceof Node))
5 return {'isShadowRoot': true, 5 return {'isShadowRoot': true,
6 'attributes': children[0], 6 'attributes': children[0],
7 'children': children.slice(1)}; 7 'children': children.slice(1)};
8 return {'isShadowRoot': true, 8 return {'isShadowRoot': true,
9 'children': children}; 9 'children': children};
10 } 10 }
(...skipping 23 matching lines...) Expand all
34 return element; 34 return element;
35 } 35 }
36 36
37 function isShadowHost(node) 37 function isShadowHost(node)
38 { 38 {
39 return window.internals.oldestShadowRoot(node); 39 return window.internals.oldestShadowRoot(node);
40 } 40 }
41 41
42 function isShadowRoot(node) 42 function isShadowRoot(node)
43 { 43 {
44 return node instanceof window.WebKitShadowRoot; 44 return node instanceof window.ShadowRoot;
45 } 45 }
46 46
47 function isIframeElement(element) 47 function isIframeElement(element)
48 { 48 {
49 return element && element.nodeName == 'IFRAME'; 49 return element && element.nodeName == 'IFRAME';
50 } 50 }
51 51
52 // You can spefify youngerShadowRoot by consecutive slashes. 52 // You can spefify youngerShadowRoot by consecutive slashes.
53 // See LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root.html for act ual usages. 53 // See LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root.html for act ual usages.
54 function getNodeInTreeOfTrees(path) 54 function getNodeInTreeOfTrees(path)
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 debug('Traverse in backward.'); 230 debug('Traverse in backward.');
231 showComposedShadowTreeByTraversingInBackward(node); 231 showComposedShadowTreeByTraversingInBackward(node);
232 232
233 debug(''); 233 debug('');
234 } 234 }
235 235
236 function showNextNode(node) { 236 function showNextNode(node) {
237 var next = internals.nextNodeByWalker(node); 237 var next = internals.nextNodeByWalker(node);
238 debug('Next node of [' + dumpNode(node) + '] is [' + dumpNode(next) + ']'); 238 debug('Next node of [' + dumpNode(node) + '] is [' + dumpNode(next) + ']');
239 } 239 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/shadow-root-js-api.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698