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 ComputedStylePropertyMap_h | 5 #ifndef ComputedStylePropertyMap_h |
6 #define ComputedStylePropertyMap_h | 6 #define ComputedStylePropertyMap_h |
7 | 7 |
8 #include "core/css/CSSComputedStyleDeclaration.h" | 8 #include "core/css/CSSComputedStyleDeclaration.h" |
9 #include "core/css/cssom/ImmutableStylePropertyMap.h" | 9 #include "core/css/cssom/ImmutableStylePropertyMap.h" |
10 #include "core/dom/Node.h" | 10 #include "core/dom/Node.h" |
(...skipping 14 matching lines...) Expand all Loading... | |
25 | 25 |
26 public: | 26 public: |
27 static ComputedStylePropertyMap* create(Node* node, | 27 static ComputedStylePropertyMap* create(Node* node, |
28 const String& pseudoElement) { | 28 const String& pseudoElement) { |
29 return new ComputedStylePropertyMap(node, pseudoElement); | 29 return new ComputedStylePropertyMap(node, pseudoElement); |
30 } | 30 } |
31 | 31 |
32 Vector<String> getProperties() override; | 32 Vector<String> getProperties() override; |
33 | 33 |
34 DEFINE_INLINE_VIRTUAL_TRACE() { | 34 DEFINE_INLINE_VIRTUAL_TRACE() { |
35 visitor->trace(m_computedStyleDeclaration); | |
36 visitor->trace(m_node); | 35 visitor->trace(m_node); |
37 ImmutableStylePropertyMap::trace(visitor); | 36 ImmutableStylePropertyMap::trace(visitor); |
38 } | 37 } |
39 | 38 |
40 private: | 39 private: |
41 Node* node() const; | 40 Node* node() const; |
42 | 41 |
43 protected: | 42 protected: |
44 ComputedStylePropertyMap(Node* node, const String& pseudoElement = String()) | 43 ComputedStylePropertyMap(Node* node, const String& pseudoElement = String()) |
45 : ImmutableStylePropertyMap(), | 44 : ImmutableStylePropertyMap(), |
46 m_computedStyleDeclaration( | |
47 CSSComputedStyleDeclaration::create(node, false, pseudoElement)), | |
48 m_pseudoId(CSSSelector::parsePseudoId(pseudoElement)), | 45 m_pseudoId(CSSSelector::parsePseudoId(pseudoElement)), |
49 m_node(node) {} | 46 m_node(node) {} |
50 | 47 |
51 CSSStyleValueVector getAllInternal(CSSPropertyID) override; | 48 CSSStyleValueVector getAllInternal(CSSPropertyID) override; |
52 CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override; | 49 CSSStyleValueVector getAllInternal(String customPropertyName) override; |
53 | 50 |
54 HeapVector<StylePropertyMapEntry> getIterationEntries() override { | 51 HeapVector<StylePropertyMapEntry> getIterationEntries() override { |
55 return HeapVector<StylePropertyMapEntry>(); | 52 return HeapVector<StylePropertyMapEntry>(); |
56 } | 53 } |
57 | 54 |
58 Member<CSSComputedStyleDeclaration> m_computedStyleDeclaration; | |
59 PseudoId m_pseudoId; | 55 PseudoId m_pseudoId; |
meade_UTC10
2017/03/02 00:16:59
I think these members should be private; if you mo
| |
60 Member<Node> m_node; | 56 Member<Node> m_node; |
61 }; | 57 }; |
62 | 58 |
63 } // namespace blink | 59 } // namespace blink |
64 | 60 |
65 #endif | 61 #endif |
OLD | NEW |