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

Unified Diff: third_party/WebKit/Source/core/css/cssom/LengthValue.h

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps
Patch Set: Fix windows maybe Created 4 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
Index: third_party/WebKit/Source/core/css/cssom/LengthValue.h
diff --git a/third_party/WebKit/Source/core/css/cssom/LengthValue.h b/third_party/WebKit/Source/core/css/cssom/LengthValue.h
index dbf2763a894796ae2f9296de4cc905255e9c7a13..333024a0e14a52bebcaa28df2f315d21a4a97c02 100644
--- a/third_party/WebKit/Source/core/css/cssom/LengthValue.h
+++ b/third_party/WebKit/Source/core/css/cssom/LengthValue.h
@@ -30,6 +30,8 @@ public:
static LengthValue* fromDictionary(const CalcDictionary&, ExceptionState&);
protected:
+ static const int kNumSupportedUnits = 15;
+
LengthValue() {}
virtual LengthValue* addInternal(const LengthValue* other, ExceptionState&);
@@ -43,10 +45,17 @@ protected:
&& unit != CSSPrimitiveValue::UnitType::QuirkyEms
&& unit != CSSPrimitiveValue::UnitType::UserUnits;
}
-
- static const int kNumSupportedUnits = 15;
};
+#define DEFINE_LENGTH_TYPE_CASTS(argumentType) \
+ DEFINE_TYPE_CASTS(LengthValue, argumentType, value, \
+ (value->type() == StyleValue::StyleValueType::SimpleLengthType \
+ || value->type() == StyleValue::StyleValueType::CalcLengthType), \
+ (value.type() == StyleValue::StyleValueType::SimpleLengthType \
+ || value.type() == StyleValue::StyleValueType::CalcLengthType))
+
+DEFINE_LENGTH_TYPE_CASTS(StyleValue);
+
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698