Index: Source/core/svg/SVGTests.cpp |
diff --git a/Source/core/svg/SVGTests.cpp b/Source/core/svg/SVGTests.cpp |
index 41b64a2174258587f6a5366b027f58ccaaf8fe3b..fda18cfbee180dbb8c49533aed58127867c6fcef 100644 |
--- a/Source/core/svg/SVGTests.cpp |
+++ b/Source/core/svg/SVGTests.cpp |
@@ -156,10 +156,9 @@ bool SVGTests::handleAttributeChange(SVGElement* targetElement, const QualifiedN |
return true; |
bool valid = targetElement->isValid(); |
- bool attached = targetElement->attached(); |
- if (valid && !attached && targetElement->parentNode()->attached()) |
- targetElement->attach(); |
- else if (!valid && attached) |
+ if (valid && !targetElement->attached() && targetElement->parentNode()->attached()) |
+ targetElement->lazyAttach(); |
+ else if (!valid && targetElement->attached()) |
targetElement->detach(); |
return true; |