Index: Source/core/svg/SVGUseElement.cpp |
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp |
index b06be2073e5b0bf249f9c0576f698273628218d7..e09dee851555d76646936aa787de80eea3a8bc51 100644 |
--- a/Source/core/svg/SVGUseElement.cpp |
+++ b/Source/core/svg/SVGUseElement.cpp |
@@ -666,18 +666,18 @@ bool SVGUseElement::hasCycleUseReferencing(SVGUseElement* use, SVGElementInstanc |
return false; |
} |
-static inline void removeDisallowedElementsFromSubtree(Element* subtree) |
+static inline void removeDisallowedElementsFromSubtree(Element& subtree) |
{ |
- ASSERT(!subtree->inDocument()); |
+ ASSERT(!subtree.inDocument()); |
Element* element = ElementTraversal::firstWithin(subtree); |
while (element) { |
if (isDisallowedElement(element)) { |
- Element* next = ElementTraversal::nextSkippingChildren(*element, subtree); |
+ Element* next = ElementTraversal::nextSkippingChildren(*element, &subtree); |
// The subtree is not in document so this won't generate events that could mutate the tree. |
element->parentNode()->removeChild(element); |
element = next; |
} else { |
- element = ElementTraversal::next(*element, subtree); |
+ element = ElementTraversal::next(*element, &subtree); |
} |
} |
} |
@@ -696,7 +696,7 @@ void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ |
// Though if there are disallowed elements in the subtree, we have to remove them. |
// For instance: <use> on <g> containing <foreignObject> (indirect case). |
if (subtreeContainsDisallowedElement(newChild.get())) |
- removeDisallowedElementsFromSubtree(newChild.get()); |
+ removeDisallowedElementsFromSubtree(*newChild); |
userAgentShadowRoot()->appendChild(newChild.release()); |
} |
@@ -741,7 +741,7 @@ void SVGUseElement::expandUseElementsInShadowTree(Node* element) |
// Though if there are disallowed elements in the subtree, we have to remove them. |
// For instance: <use> on <g> containing <foreignObject> (indirect case). |
if (subtreeContainsDisallowedElement(cloneParent.get())) |
- removeDisallowedElementsFromSubtree(cloneParent.get()); |
+ removeDisallowedElementsFromSubtree(*cloneParent); |
RefPtr<Node> replacingElement(cloneParent.get()); |
@@ -787,7 +787,7 @@ void SVGUseElement::expandSymbolElementsInShadowTree(Node* element) |
// Though if there are disallowed elements in the subtree, we have to remove them. |
// For instance: <use> on <g> containing <foreignObject> (indirect case). |
if (subtreeContainsDisallowedElement(svgElement.get())) |
- removeDisallowedElementsFromSubtree(svgElement.get()); |
+ removeDisallowedElementsFromSubtree(*svgElement); |
RefPtr<Node> replacingElement(svgElement.get()); |