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

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

Issue 2695093007: [Typed CSSOM] Get computed values for custom properties
Patch Set: Fix unregistered props and registered but unset props Created 3 years, 9 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/ImmutableStylePropertyMap.h" 9 #include "core/css/cssom/ImmutableStylePropertyMap.h"
10 #include "core/dom/Node.h" 10 #include "core/dom/Node.h"
(...skipping 21 matching lines...) Expand all
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); 35 visitor->trace(m_computedStyleDeclaration);
36 visitor->trace(m_node); 36 visitor->trace(m_node);
37 ImmutableStylePropertyMap::trace(visitor); 37 ImmutableStylePropertyMap::trace(visitor);
38 } 38 }
39 39
40 private: 40 private:
41 Node* node() const; 41 Node* node() const;
42 const ComputedStyle* updateStyle() const;
42 43
43 protected: 44 protected:
44 ComputedStylePropertyMap(Node* node, const String& pseudoElement = String()) 45 ComputedStylePropertyMap(Node* node, const String& pseudoElement = String())
45 : ImmutableStylePropertyMap(), 46 : ImmutableStylePropertyMap(),
46 m_computedStyleDeclaration( 47 m_computedStyleDeclaration(
47 CSSComputedStyleDeclaration::create(node, false, pseudoElement)), 48 CSSComputedStyleDeclaration::create(node, false, pseudoElement)),
48 m_pseudoId(CSSSelector::parsePseudoId(pseudoElement)), 49 m_pseudoId(CSSSelector::parsePseudoId(pseudoElement)),
49 m_node(node) {} 50 m_node(node) {}
50 51
51 CSSStyleValueVector getAllInternal(CSSPropertyID) override; 52 CSSStyleValueVector getAllInternal(CSSPropertyID) override;
52 CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override; 53 CSSStyleValueVector getAllInternal(AtomicString customPropertyName,
54 ExceptionState&) override;
53 55
54 HeapVector<StylePropertyMapEntry> getIterationEntries() override { 56 HeapVector<StylePropertyMapEntry> getIterationEntries() override {
55 return HeapVector<StylePropertyMapEntry>(); 57 return HeapVector<StylePropertyMapEntry>();
56 } 58 }
57 59
58 Member<CSSComputedStyleDeclaration> m_computedStyleDeclaration; 60 Member<CSSComputedStyleDeclaration> m_computedStyleDeclaration;
59 PseudoId m_pseudoId; 61 PseudoId m_pseudoId;
60 Member<Node> m_node; 62 Member<Node> m_node;
61 }; 63 };
62 64
63 } // namespace blink 65 } // namespace blink
64 66
65 #endif 67 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698