Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h |
| diff --git a/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fcd7513b9b8ebecbdfd56da007cc9acebab8b163 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.h |
| @@ -0,0 +1,51 @@ |
| +// 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 StylePropertyMap_h |
| +#define StylePropertyMap_h |
| + |
| +#include "bindings/core/v8/Iterable.h" |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "bindings/core/v8/UnionTypesCore.h" |
| +#include "core/CSSPropertyNames.h" |
| +#include "core/CoreExport.h" |
| +#include "core/css/cssom/StyleValue.h" |
| + |
| +namespace blink { |
| + |
| +class ExceptionState; |
| + |
| +class CORE_EXPORT StylePropertyMap : public GarbageCollectedFinalized<StylePropertyMap>, public ScriptWrappable, public PairIterable<String, StyleValueOrStyleValueSequence> { |
| + WTF_MAKE_NONCOPYABLE(StylePropertyMap); |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + // Accessors. |
| + StyleValue* get(const String& propertyName); |
| + HeapVector<StyleValue*> getAll(const String& propertyName); |
|
Timothy Loh
2016/01/19 05:30:46
Is the code generator expecting HeapVector<StyleVa
meade_UTC10
2016/01/20 03:39:34
Nope, it's not. I can't remember why I made it lik
|
| + bool has(const String& propertyName); |
| + |
| + virtual StyleValue* get(CSSPropertyID) = 0; |
| + virtual HeapVector<StyleValue*> getAll(CSSPropertyID) = 0; |
| + virtual bool has(CSSPropertyID) = 0; |
| + |
| + virtual Vector<String> getProperties() = 0; |
| + |
| + // Modifiers. |
| + void set(const String& propertyName, StyleValueOrStyleValueSequenceOrString& item, ExceptionState&); |
| + void append(const String& propertyName, StyleValueOrStyleValueSequenceOrString& item, ExceptionState&); |
| + void remove(const String& propertyName, ExceptionState&); |
| + |
| + virtual void set(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& item, ExceptionState&) = 0; |
| + virtual void append(CSSPropertyID, StyleValueOrStyleValueSequenceOrString& item, ExceptionState&) = 0; |
| + virtual void remove(CSSPropertyID, ExceptionState&) = 0; |
| + |
| + DEFINE_INLINE_VIRTUAL_TRACE() { } |
| + |
| +protected: |
| + StylePropertyMap() {} |
|
Timothy Loh
2016/01/19 05:30:46
{ } is more common (at least be consistent with ab
meade_UTC10
2016/01/20 03:39:34
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |