Index: third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js |
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js b/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js |
index f4f0a65bb7f9b56bb041e794ca0ad01b5487a00d..3dc2490e444ea2620f1df22c3872abbd8e76e216 100644 |
--- a/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js |
+++ b/third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js |
@@ -1,17 +1,17 @@ |
function removeWhiteSpaceOnlyTextNodes(node) |
{ |
- for (var i = 0; i < node.childNodes.length; i++) { |
- var child = node.childNodes[i]; |
- if (child.nodeType === Node.TEXT_NODE && child.nodeValue.trim().length == 0) { |
- node.removeChild(child); |
- i--; |
- } else if (child.nodeType === Node.ELEMENT_NODE || child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { |
- removeWhiteSpaceOnlyTextNodes(child); |
- } |
- } |
- if (node.shadowRoot) { |
- removeWhiteSpaceOnlyTextNodes(node.shadowRoot); |
+ for (var i = 0; i < node.childNodes.length; i++) { |
+ var child = node.childNodes[i]; |
+ if (child.nodeType === Node.TEXT_NODE && child.nodeValue.trim().length == 0) { |
+ node.removeChild(child); |
+ i--; |
+ } else if (child.nodeType === Node.ELEMENT_NODE || child.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { |
+ removeWhiteSpaceOnlyTextNodes(child); |
} |
+ } |
+ if (node.shadowRoot) { |
+ removeWhiteSpaceOnlyTextNodes(node.shadowRoot); |
+ } |
} |
function convertTemplatesToShadowRootsWithin(node) { |