Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h |
| diff --git a/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h |
| index 0d0ea8891710f37187b9785beb61dcebf0e38a54..08c4ff086985edf54bbc5ff70401ac0082225474 100644 |
| --- a/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h |
| +++ b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h |
| @@ -7,6 +7,8 @@ |
| #include "core/css/CSSComputedStyleDeclaration.h" |
| #include "core/css/cssom/ImmutableStylePropertyMap.h" |
| +#include "core/dom/Node.h" |
| +#include "core/layout/LayoutObject.h" |
| namespace blink { |
| @@ -14,9 +16,9 @@ class CORE_EXPORT ComputedStylePropertyMap : public ImmutableStylePropertyMap { |
| WTF_MAKE_NONCOPYABLE(ComputedStylePropertyMap); |
| public: |
| - static ComputedStylePropertyMap* create(CSSComputedStyleDeclaration* computedStyleDeclaration) |
| + static ComputedStylePropertyMap* create(Node* node, const String& pseudoElement) |
| { |
| - return new ComputedStylePropertyMap(computedStyleDeclaration); |
| + return new ComputedStylePropertyMap(node, pseudoElement); |
| } |
| Vector<String> getProperties() override; |
| @@ -24,13 +26,14 @@ public: |
| DEFINE_INLINE_VIRTUAL_TRACE() |
| { |
| visitor->trace(m_computedStyleDeclaration); |
| + visitor->trace(m_node); |
| ImmutableStylePropertyMap::trace(visitor); |
| } |
| protected: |
| - ComputedStylePropertyMap(CSSComputedStyleDeclaration* computedStyleDeclaration) |
| + ComputedStylePropertyMap(Node* node, const String& pseudoElement = String()) |
| : ImmutableStylePropertyMap() |
| - , m_computedStyleDeclaration(computedStyleDeclaration) { } |
| + , m_node(node) { m_computedStyleDeclaration = CSSComputedStyleDeclaration::create(node, false, pseudoElement); } |
|
meade_UTC10
2016/09/22 05:34:35
Nit: It'd be nice to put this on a new line, or yo
rjwright
2016/09/23 04:50:04
Done.
|
| CSSStyleValueVector getAllInternal(CSSPropertyID) override; |
| CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override; |
| @@ -38,6 +41,7 @@ protected: |
| HeapVector<StylePropertyMapEntry> getIterationEntries() override { return HeapVector<StylePropertyMapEntry>(); } |
| Member<CSSStyleDeclaration> m_computedStyleDeclaration; |
| + Member<Node> m_node; |
| }; |
| } // namespace blink |