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

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

Issue 1849653003: Implement ComputedStylePropertyMap for Typed OM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps-inline
Patch Set: sync to head Created 4 years, 7 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
new file mode 100644
index 0000000000000000000000000000000000000000..4c1e97a027b7adb4eb21426c39e05a3401db276d
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h
@@ -0,0 +1,44 @@
+// Copyright 2016 the Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ComputedStylePropertyMap_h
+#define ComputedStylePropertyMap_h
+
+#include "core/css/CSSComputedStyleDeclaration.h"
+#include "core/css/cssom/ImmutableStylePropertyMap.h"
+
+namespace blink {
+
+class CORE_EXPORT ComputedStylePropertyMap : public ImmutableStylePropertyMap {
+ WTF_MAKE_NONCOPYABLE(ComputedStylePropertyMap);
+
+public:
+ static ComputedStylePropertyMap* create(CSSComputedStyleDeclaration* computedStyleDeclaration)
+ {
+ return new ComputedStylePropertyMap(computedStyleDeclaration);
+ }
+
+ StyleValueVector getAll(CSSPropertyID) override;
+ bool has(CSSPropertyID) override;
+ Vector<String> getProperties() override;
+
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_computedStyleDeclaration);
+ ImmutableStylePropertyMap::trace(visitor);
+ }
+
+protected:
+ ComputedStylePropertyMap(CSSComputedStyleDeclaration* computedStyleDeclaration)
+ : ImmutableStylePropertyMap()
+ , m_computedStyleDeclaration(computedStyleDeclaration) { }
+
+ IterationSource* startIteration(ScriptState*, ExceptionState&) override { return nullptr; }
+
+ Member<CSSStyleDeclaration> m_computedStyleDeclaration;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698