Chromium Code Reviews| 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 |