| Index: third_party/WebKit/Source/core/css/cssom/CSSLengthValue.h
|
| diff --git a/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.h b/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.h
|
| index 2b1118773ae026db31e438d4dc1615e550a2238c..9916c41f6c11597121d82c0ab27c28aa27690b7c 100644
|
| --- a/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.h
|
| +++ b/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.h
|
| @@ -18,6 +18,20 @@ class CORE_EXPORT CSSLengthValue : public CSSStyleValue {
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| public:
|
| + static const int kNumSupportedUnits = 15;
|
| +
|
| + static CSSLengthValue* from(const String& cssText, ExceptionState&);
|
| + static CSSLengthValue* from(double value,
|
| + const String& typeStr,
|
| + ExceptionState&);
|
| + static CSSLengthValue* from(const CSSCalcDictionary&, ExceptionState&);
|
| +
|
| + static bool isSupportedLengthUnit(CSSPrimitiveValue::UnitType unit) {
|
| + return (CSSPrimitiveValue::isLength(unit) ||
|
| + unit == CSSPrimitiveValue::UnitType::Percentage) &&
|
| + unit != CSSPrimitiveValue::UnitType::QuirkyEms &&
|
| + unit != CSSPrimitiveValue::UnitType::UserUnits;
|
| + }
|
| static CSSPrimitiveValue::UnitType unitFromName(const String& name);
|
| static CSSLengthValue* fromCSSValue(const CSSPrimitiveValue&);
|
|
|
| @@ -28,28 +42,13 @@ class CORE_EXPORT CSSLengthValue : public CSSStyleValue {
|
|
|
| virtual bool containsPercent() const = 0;
|
|
|
| - static CSSLengthValue* from(const String& cssText, ExceptionState&);
|
| - static CSSLengthValue* from(double value,
|
| - const String& typeStr,
|
| - ExceptionState&);
|
| - static CSSLengthValue* from(const CSSCalcDictionary&, ExceptionState&);
|
| -
|
| protected:
|
| - static const int kNumSupportedUnits = 15;
|
| -
|
| CSSLengthValue() {}
|
|
|
| virtual CSSLengthValue* addInternal(const CSSLengthValue* other);
|
| virtual CSSLengthValue* subtractInternal(const CSSLengthValue* other);
|
| virtual CSSLengthValue* multiplyInternal(double);
|
| virtual CSSLengthValue* divideInternal(double);
|
| -
|
| - static bool isSupportedLengthUnit(CSSPrimitiveValue::UnitType unit) {
|
| - return (CSSPrimitiveValue::isLength(unit) ||
|
| - unit == CSSPrimitiveValue::UnitType::Percentage) &&
|
| - unit != CSSPrimitiveValue::UnitType::QuirkyEms &&
|
| - unit != CSSPrimitiveValue::UnitType::UserUnits;
|
| - }
|
| };
|
|
|
| DEFINE_TYPE_CASTS(CSSLengthValue,
|
|
|