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

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

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps
Patch Set: Update tests 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/CSSOMTypes.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h b/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h
new file mode 100644
index 0000000000000000000000000000000000000000..4845c1bf6223658edf6263c80fd4f50d67434611
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE fil
+
+#ifndef CSSOMTypes_h
+#define CSSOMTypes_h
+
+#include "core/CSSPropertyNames.h"
+#include "core/css/cssom/StyleValue.h"
+
+namespace blink {
+
+class CSSOMTypes {
+ STATIC_ONLY(CSSOMTypes);
+
+public:
+ static bool propertyCanTake(CSSPropertyID id, StyleValue::StyleValueType type)
Timothy Loh 2016/02/09 07:29:32 I don't think the inputs here are sufficient (e.g.
meade_UTC10 2016/02/10 05:55:39 Keyword is also a StyleValueType. Moved functions
Timothy Loh 2016/02/15 04:41:53 But we need to verify that we're passing in a sane
meade_UTC10 2016/02/16 04:26:50 Ah, I see. Done.
+ {
+ switch (id) {
+ case CSSPropertyHeight:
+ case CSSPropertyWidth:
+ case CSSPropertyMinHeight:
+ case CSSPropertyMinWidth:
+ case CSSPropertyMaxHeight:
+ case CSSPropertyMaxWidth:
+ case CSSPropertyBackgroundPosition:
+ case CSSPropertyBackgroundPositionY:
+ return type == StyleValue::SimpleLengthType || type == StyleValue::CalcLengthType;
+ default:
+ return false;
+ }
+ }
+
+ static bool propertySupportsMultiple(CSSPropertyID id)
+ {
+ return false;
+ }
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698