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

Unified Diff: Source/core/svg/SVGLength.h

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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/svg/SVGImageElement.cpp ('k') | Source/core/svg/SVGLengthContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLength.h
diff --git a/Source/core/svg/SVGLength.h b/Source/core/svg/SVGLength.h
index 1571e917931a54aed68332542bc2f02e909a2814..1149da669024311b86af048f50809d87d6a1e5b8 100644
--- a/Source/core/svg/SVGLength.h
+++ b/Source/core/svg/SVGLength.h
@@ -21,13 +21,13 @@
#ifndef SVGLength_h
#define SVGLength_h
+#include "core/css/CSSPrimitiveValue.h"
#include "core/svg/SVGLengthContext.h"
#include "core/svg/properties/SVGProperty.h"
#include "platform/heap/Handle.h"
namespace blink {
-class CSSPrimitiveValue;
class ExceptionState;
class QualifiedName;
@@ -51,6 +51,12 @@ public:
virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String&) const override;
SVGLengthType unitType() const { return static_cast<SVGLengthType>(m_unitType); }
+ CSSPrimitiveValue::UnitType cssUnitTypeQuirk() const
+ {
+ if (m_unitType == LengthTypeNumber)
+ return CSSPrimitiveValue::UnitType::CSS_PX;
+ return static_cast<CSSPrimitiveValue::UnitType>(m_unitType);
+ }
void setUnitType(SVGLengthType);
SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMode); }
« no previous file with comments | « Source/core/svg/SVGImageElement.cpp ('k') | Source/core/svg/SVGLengthContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698