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