| Index: Source/WebCore/svg/SVGTests.cpp
|
| ===================================================================
|
| --- Source/WebCore/svg/SVGTests.cpp (revision 127636)
|
| +++ Source/WebCore/svg/SVGTests.cpp (working copy)
|
| @@ -155,11 +155,14 @@
|
| return false;
|
| if (!targetElement->inDocument())
|
| return true;
|
| +
|
| bool valid = targetElement->isValid();
|
| - if (valid && !targetElement->attached())
|
| + bool attached = targetElement->attached();
|
| + if (valid && !attached && targetElement->parentNode()->attached())
|
| targetElement->attach();
|
| - if (!valid && targetElement->attached())
|
| + else if (!valid && attached)
|
| targetElement->detach();
|
| +
|
| return true;
|
| }
|
|
|
|
|