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

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

Issue 1421533006: Make SVGLength wrap a CSSPrimitiveValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index fce14cf46b7e1a0a43f5fcb5ced6709fae88b061..ef466e2f6b1f479297b556a036bde23603c6f1db 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -634,17 +634,17 @@ FloatSize SVGSVGElement::currentViewportSize() const
bool SVGSVGElement::hasIntrinsicWidth() const
{
- return width()->currentValue()->unitType() != LengthTypePercentage;
+ return width()->currentValue()->typeWithCalcResolved() != CSSPrimitiveValue::UnitType::Percentage;
}
bool SVGSVGElement::hasIntrinsicHeight() const
{
- return height()->currentValue()->unitType() != LengthTypePercentage;
+ return height()->currentValue()->typeWithCalcResolved() != CSSPrimitiveValue::UnitType::Percentage;
}
Length SVGSVGElement::intrinsicWidth() const
{
- if (width()->currentValue()->unitType() == LengthTypePercentage)
+ if (width()->currentValue()->typeWithCalcResolved() == CSSPrimitiveValue::UnitType::Percentage)
return Length(0, Fixed);
SVGLengthContext lengthContext(this);
@@ -653,7 +653,7 @@ Length SVGSVGElement::intrinsicWidth() const
Length SVGSVGElement::intrinsicHeight() const
{
- if (height()->currentValue()->unitType() == LengthTypePercentage)
+ if (height()->currentValue()->typeWithCalcResolved() == CSSPrimitiveValue::UnitType::Percentage)
return Length(0, Fixed);
SVGLengthContext lengthContext(this);

Powered by Google App Engine
This is Rietveld 408576698