| 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 InlineStylePropertyMap_h | 5 #ifndef InlineStylePropertyMap_h |
| 6 #define InlineStylePropertyMap_h | 6 #define InlineStylePropertyMap_h |
| 7 | 7 |
| 8 #include "core/css/cssom/MutableStylePropertyMap.h" | 8 #include "core/css/cssom/MutableStylePropertyMap.h" |
| 9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 namespace cssom { |
| 12 | 13 |
| 13 class CORE_EXPORT InlineStylePropertyMap final : public MutableStylePropertyMap
{ | 14 class CORE_EXPORT InlineStylePropertyMap final : public MutableStylePropertyMap
{ |
| 14 WTF_MAKE_NONCOPYABLE(InlineStylePropertyMap); | 15 WTF_MAKE_NONCOPYABLE(InlineStylePropertyMap); |
| 15 public: | 16 public: |
| 16 explicit InlineStylePropertyMap(Element* ownerElement) | 17 explicit InlineStylePropertyMap(Element* ownerElement) |
| 17 : m_ownerElement(ownerElement) { } | 18 : m_ownerElement(ownerElement) { } |
| 18 | 19 |
| 19 Vector<String> getProperties() override; | 20 Vector<String> getProperties() override; |
| 20 | 21 |
| 21 void set(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Excep
tionState&) override; | 22 void set(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Excep
tionState&) override; |
| 22 void append(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Ex
ceptionState&) override; | 23 void append(CSSPropertyID, CSSStyleValueOrCSSStyleValueSequenceOrString&, Ex
ceptionState&) override; |
| 23 void remove(CSSPropertyID, ExceptionState&) override; | 24 void remove(CSSPropertyID, ExceptionState&) override; |
| 24 | 25 |
| 25 DEFINE_INLINE_VIRTUAL_TRACE() | 26 DEFINE_INLINE_VIRTUAL_TRACE() |
| 26 { | 27 { |
| 27 visitor->trace(m_ownerElement); | 28 visitor->trace(m_ownerElement); |
| 28 MutableStylePropertyMap::trace(visitor); | 29 MutableStylePropertyMap::trace(visitor); |
| 29 } | 30 } |
| 30 | 31 |
| 31 protected: | 32 protected: |
| 32 CSSStyleValueVector getAllInternal(CSSPropertyID) override; | 33 CSSStyleValueVector getAllInternal(CSSPropertyID) override; |
| 33 CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override
; | 34 CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override
; |
| 34 | 35 |
| 35 HeapVector<StylePropertyMapEntry> getIterationEntries() override; | 36 HeapVector<StylePropertyMapEntry> getIterationEntries() override; |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 Member<Element> m_ownerElement; | 39 Member<Element> m_ownerElement; |
| 39 }; | 40 }; |
| 40 | 41 |
| 42 } // namespace cssom |
| 41 } // namespace blink | 43 } // namespace blink |
| 42 | 44 |
| 45 |
| 43 #endif | 46 #endif |
| OLD | NEW |