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 ImmutableStylePropertyMap_h | 5 #ifndef ImmutableStylePropertyMap_h |
6 #define ImmutableStylePropertyMap_h | 6 #define ImmutableStylePropertyMap_h |
7 | 7 |
8 #include "core/css/cssom/StylePropertyMap.h" | 8 #include "core/css/cssom/StylePropertyMap.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
| 11 namespace cssom { |
11 | 12 |
12 class CORE_EXPORT ImmutableStylePropertyMap : public StylePropertyMap { | 13 class CORE_EXPORT ImmutableStylePropertyMap : public StylePropertyMap { |
13 WTF_MAKE_NONCOPYABLE(ImmutableStylePropertyMap); | 14 WTF_MAKE_NONCOPYABLE(ImmutableStylePropertyMap); |
14 public: | 15 public: |
15 void set(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Excep
tionState& exceptionState) override | 16 void set(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Excep
tionState& exceptionState) override |
16 { | 17 { |
17 exceptionState.throwTypeError("This StylePropertyMap is immutable."); | 18 exceptionState.throwTypeError("This StylePropertyMap is immutable."); |
18 } | 19 } |
19 | 20 |
20 void append(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Ex
ceptionState& exceptionState) override | 21 void append(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Ex
ceptionState& exceptionState) override |
21 { | 22 { |
22 exceptionState.throwTypeError("This StylePropertyMap is immutable."); | 23 exceptionState.throwTypeError("This StylePropertyMap is immutable."); |
23 } | 24 } |
24 | 25 |
25 void remove(CSSPropertyID, ExceptionState& exceptionState) override | 26 void remove(CSSPropertyID, ExceptionState& exceptionState) override |
26 { | 27 { |
27 exceptionState.throwTypeError("This StylePropertyMap is immutable."); | 28 exceptionState.throwTypeError("This StylePropertyMap is immutable."); |
28 } | 29 } |
29 | 30 |
30 protected: | 31 protected: |
31 ImmutableStylePropertyMap() = default; | 32 ImmutableStylePropertyMap() = default; |
32 }; | 33 }; |
33 | 34 |
| 35 } // namespace cssom |
34 } // namespace blink | 36 } // namespace blink |
35 | 37 |
| 38 |
36 #endif | 39 #endif |
OLD | NEW |