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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ba9663d9a3e2923abbdb88b6ad0045ba4be8be3b |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 the chromium authors. All rights reserved. |
|
Timothy Loh
2016/04/15 04:16:07
capitalisation
meade_UTC10
2016/04/27 05:53:56
Done.
|
| +// 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 CSSStyleDeclaration; |
|
Timothy Loh
2016/04/15 04:16:07
probably not needed since you include CSSComputedS
meade_UTC10
2016/04/27 05:53:56
Removed.
|
| +class Element; |
|
Timothy Loh
2016/04/15 04:16:07
unused?
meade_UTC10
2016/04/27 05:53:56
Removed.
|
| + |
| +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 |