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

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

Issue 2774753004: Add SVGFitToViewBox::hasValidViewBox helper (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp b/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
index c95abef1808ca0b4bdc542036e951430663343ea..087de52c808cfabb39218658c1ba1f042deb6571 100644
--- a/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
@@ -162,8 +162,7 @@ static void setPatternAttributes(const SVGPatternElement* element,
if (!attributes.hasHeight() && element->height()->isSpecified())
attributes.setHeight(element->height()->currentValue());
- if (!attributes.hasViewBox() && element->viewBox()->isSpecified() &&
- element->viewBox()->currentValue()->isValid())
+ if (!attributes.hasViewBox() && element->hasValidViewBox())
attributes.setViewBox(element->viewBox()->currentValue()->value());
if (!attributes.hasPreserveAspectRatio() &&
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp ('k') | third_party/WebKit/Source/core/svg/SVGSVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698