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

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

Issue 2312293003: [CSSTypedOM] Computed StylePropertyMap use ComputedStyle for Lengths (Closed)
Patch Set: Fixed unit test Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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..c2784a4556b7792e83c86fa0df870af2b1fd2248 100644
--- a/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h
+++ b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h
@@ -6,7 +6,10 @@
#define ComputedStylePropertyMap_h
#include "core/css/CSSComputedStyleDeclaration.h"
+#include "core/css/ComputedStyleCSSValueMapping.h"
#include "core/css/cssom/ImmutableStylePropertyMap.h"
+#include "core/dom/Node.h"
+#include "core/layout/LayoutObject.h"
namespace blink {
@@ -14,9 +17,9 @@ class CORE_EXPORT ComputedStylePropertyMap : public ImmutableStylePropertyMap {
WTF_MAKE_NONCOPYABLE(ComputedStylePropertyMap);
public:
- static ComputedStylePropertyMap* create(CSSComputedStyleDeclaration* computedStyleDeclaration)
+ static ComputedStylePropertyMap* create(CSSComputedStyleDeclaration* computedStyleDeclaration, Node* node)
{
- return new ComputedStylePropertyMap(computedStyleDeclaration);
+ return new ComputedStylePropertyMap(computedStyleDeclaration, node);
}
Vector<String> getProperties() override;
@@ -24,13 +27,15 @@ public:
DEFINE_INLINE_VIRTUAL_TRACE()
{
visitor->trace(m_computedStyleDeclaration);
+ visitor->trace(m_node);
ImmutableStylePropertyMap::trace(visitor);
}
protected:
- ComputedStylePropertyMap(CSSComputedStyleDeclaration* computedStyleDeclaration)
+ ComputedStylePropertyMap(CSSComputedStyleDeclaration* computedStyleDeclaration, Node* node)
: ImmutableStylePropertyMap()
- , m_computedStyleDeclaration(computedStyleDeclaration) { }
+ , m_computedStyleDeclaration(computedStyleDeclaration)
+ , m_node(node) { }
CSSStyleValueVector getAllInternal(CSSPropertyID) override;
CSSStyleValueVector getAllInternal(AtomicString customPropertyName) override;
@@ -38,6 +43,7 @@ protected:
HeapVector<StylePropertyMapEntry> getIterationEntries() override { return HeapVector<StylePropertyMapEntry>(); }
Member<CSSStyleDeclaration> m_computedStyleDeclaration;
+ Member<Node> m_node;
meade_UTC10 2016/09/09 01:56:27 Do we really need both the node and the computed S
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698