Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h

Issue 2791193004: [Typed CSSOM] New design for computed styles which includes custom properties (Closed)
Patch Set: tidy up Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/StylePropertyMapReadonly.h" 9 #include "core/css/cssom/StylePropertyMapReadonly.h"
10 #include "core/dom/Node.h" 10 #include "core/dom/Node.h"
(...skipping 14 matching lines...) Expand all
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 StylePropertyMapReadonly::trace(visitor); 36 StylePropertyMapReadonly::trace(visitor);
38 } 37 }
39 38
40 private:
41 Node* node() const;
42
43 protected: 39 protected:
44 ComputedStylePropertyMap(Node* node, const String& pseudoElement = String()) 40 ComputedStylePropertyMap(Node* node, const String& pseudoElement = String())
45 : StylePropertyMapReadonly(), 41 : StylePropertyMapReadonly(),
46 m_computedStyleDeclaration(
47 CSSComputedStyleDeclaration::create(node, false, pseudoElement)),
48 m_pseudoId(CSSSelector::parsePseudoId(pseudoElement)), 42 m_pseudoId(CSSSelector::parsePseudoId(pseudoElement)),
49 m_node(node) {} 43 m_node(node) {}
50 44
51 CSSStyleValueVector getAllInternal(CSSPropertyID) override; 45 CSSStyleValueVector getAllInternal(CSSPropertyID) override;
52 CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override; 46 CSSStyleValueVector getAllInternal(AtomicString customPropertyName,
47 ExceptionState&) override;
53 48
54 HeapVector<StylePropertyMapEntry> getIterationEntries() override { 49 HeapVector<StylePropertyMapEntry> getIterationEntries() override {
55 return HeapVector<StylePropertyMapEntry>(); 50 return HeapVector<StylePropertyMapEntry>();
56 } 51 }
57 52
58 Member<CSSComputedStyleDeclaration> m_computedStyleDeclaration;
59 PseudoId m_pseudoId; 53 PseudoId m_pseudoId;
60 Member<Node> m_node; 54 Member<Node> m_node;
55
56 private:
57 Node* styledNode() const;
58 const ComputedStyle* updateStyle() const;
61 }; 59 };
62 60
63 } // namespace blink 61 } // namespace blink
64 62
65 #endif 63 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698