Index: Source/core/svg/SVGPatternElement.cpp |
diff --git a/Source/core/svg/SVGPatternElement.cpp b/Source/core/svg/SVGPatternElement.cpp |
index 0a3bb400dc493e942e9be1fcd7d79c5522ab8f29..095c2f6663997158b957a7f3a9c5daaf89637b8c 100644 |
--- a/Source/core/svg/SVGPatternElement.cpp |
+++ b/Source/core/svg/SVGPatternElement.cpp |
@@ -24,6 +24,7 @@ |
#include "core/svg/SVGPatternElement.h" |
#include "XLinkNames.h" |
+#include "core/dom/ElementTraversal.h" |
#include "core/rendering/svg/RenderSVGResourcePattern.h" |
#include "core/svg/PatternAttributes.h" |
#include "core/svg/SVGElementInstance.h" |
@@ -199,7 +200,7 @@ static void setPatternAttributes(const SVGPatternElement* element, PatternAttrib |
attributes.setPatternTransform(transform); |
} |
- if (!attributes.hasPatternContentElement() && element->childElementCount()) |
+ if (!attributes.hasPatternContentElement() && ElementTraversal::firstWithin(*element)) |
attributes.setPatternContentElement(element); |
} |