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

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

Issue 1162453002: [svg2] Make SVGLength wrap a CSSPrimitiveValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review fixes Created 5 years, 7 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: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index d3924445a7863e4ee0a37735d14486443e53d536..6c82f9dfa8c2fc7f99652ab898693e582c88786c 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -647,17 +647,17 @@ FloatSize SVGSVGElement::currentViewportSize() const
bool SVGSVGElement::hasIntrinsicWidth() const
{
- return width()->currentValue()->unitType() != LengthTypePercentage;
+ return width()->currentValue()->primitiveType() != CSSPrimitiveValue::CSS_PERCENTAGE;
}
bool SVGSVGElement::hasIntrinsicHeight() const
{
- return height()->currentValue()->unitType() != LengthTypePercentage;
+ return height()->currentValue()->primitiveType() != CSSPrimitiveValue::CSS_PERCENTAGE;
}
Length SVGSVGElement::intrinsicWidth() const
{
- if (width()->currentValue()->unitType() == LengthTypePercentage)
+ if (width()->currentValue()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
return Length(0, Fixed);
SVGLengthContext lengthContext(this);
@@ -666,7 +666,7 @@ Length SVGSVGElement::intrinsicWidth() const
Length SVGSVGElement::intrinsicHeight() const
{
- if (height()->currentValue()->unitType() == LengthTypePercentage)
+ if (height()->currentValue()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
return Length(0, Fixed);
SVGLengthContext lengthContext(this);

Powered by Google App Engine
This is Rietveld 408576698