OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CSSUnsupportedStyleValue_h | 5 #ifndef CSSUnsupportedStyleValue_h |
6 #define CSSUnsupportedStyleValue_h | 6 #define CSSUnsupportedStyleValue_h |
7 | 7 |
8 #include "core/css/cssom/CSSStyleValue.h" | 8 #include "core/css/cssom/CSSStyleValue.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 // CSSUnsupportedStyleValue is the internal representation of a base | 12 // CSSUnsupportedStyleValue is the internal representation of a base |
13 // CSSStyleValue that is returned when we do not yet support a CSS Typed OM type | 13 // CSSStyleValue that is returned when we do not yet support a CSS Typed OM type |
14 // for a given CSS Value. | 14 // for a given CSS Value. |
15 class CORE_EXPORT CSSUnsupportedStyleValue final : public CSSStyleValue { | 15 class CORE_EXPORT CSSUnsupportedStyleValue final : public CSSStyleValue { |
16 WTF_MAKE_NONCOPYABLE(CSSUnsupportedStyleValue); | 16 WTF_MAKE_NONCOPYABLE(CSSUnsupportedStyleValue); |
17 | 17 |
18 public: | 18 public: |
19 static CSSUnsupportedStyleValue* Create(const String& css_text) { | 19 static CSSUnsupportedStyleValue* Create(const String& css_text) { |
20 return new CSSUnsupportedStyleValue(css_text); | 20 return new CSSUnsupportedStyleValue(css_text); |
21 } | 21 } |
22 | 22 |
23 StyleValueType GetType() const override { return StyleValueType::kUnknown; } | 23 StyleValueType GetType() const override { |
| 24 return StyleValueType::kUnknownType; |
| 25 } |
24 const CSSValue* ToCSSValue() const override; | 26 const CSSValue* ToCSSValue() const override; |
25 const CSSValue* ToCSSValueWithProperty(CSSPropertyID) const override; | 27 const CSSValue* ToCSSValueWithProperty(CSSPropertyID) const override; |
26 String toString() const override { return css_text_; } | 28 String toString() const override { return css_text_; } |
27 | 29 |
28 private: | 30 private: |
29 CSSUnsupportedStyleValue(const String& css_text) : css_text_(css_text) {} | 31 CSSUnsupportedStyleValue(const String& css_text) : css_text_(css_text) {} |
30 | 32 |
31 String css_text_; | 33 String css_text_; |
32 }; | 34 }; |
33 | 35 |
34 } // namespace blink | 36 } // namespace blink |
35 | 37 |
36 #endif // CSSUnsupportedStyleValue_h | 38 #endif // CSSUnsupportedStyleValue_h |
OLD | NEW |