Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1041)

Unified Diff: Source/core/svg/SVGPatternElement.cpp

Issue 166573003: Port ParentNode API to ElementTraversal (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/TypingCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/editing/TypingCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698