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

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

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
diff --git a/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad09e86374109f51cce0933a802c8ece65cc7529
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.h
@@ -0,0 +1,43 @@
+// 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 InlineStylePropertyMap_h
+#define InlineStylePropertyMap_h
+
+#include "core/css/cssom/MutableStylePropertyMap.h"
+#include "core/dom/Element.h"
+
+namespace blink {
+
+typedef HeapVector<Member<StyleValue>> StyleValueVector;
+typedef HeapHashMap<CSSPropertyID, StyleValueVector> StyleVectorMap;
+
+class CORE_EXPORT InlineStylePropertyMap final : public MutableStylePropertyMap {
+ WTF_MAKE_NONCOPYABLE(InlineStylePropertyMap);
+public:
+ explicit InlineStylePropertyMap(Element* ownerElement)
+ : m_ownerElement(ownerElement) { }
+
+ StyleValue* get(CSSPropertyID) override;
+ StyleValueVector getAll(CSSPropertyID) override;
+ bool has(CSSPropertyID) override;
+ Vector<String> getProperties() override;
+
+ void set(CSSPropertyID, StyleValueOrStyleValueSequenceOrString&, ExceptionState&) override;
+ void append(CSSPropertyID, StyleValueOrStyleValueSequenceOrString&, ExceptionState&) override;
+ void remove(CSSPropertyID, ExceptionState&) override;
+
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_ownerElement);
+ MutableStylePropertyMap::trace(visitor);
+ }
+
+private:
+ Member<Element> m_ownerElement;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698