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

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: Added expectation Created 5 years, 1 month 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 f1a5f4d8af7e2d01413d0b7408ab5ff08c609852..ebcd2f6c5e610bcfdd5b7d26d8d122dd004cb891 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -635,17 +635,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);
@@ -654,7 +654,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);
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698