Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.h |
| diff --git a/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.h b/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..166547e42af22cfc0eef0bf37349ad9562b3ab42 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/css/cssom/WindowGetComputedStyle.h |
| @@ -0,0 +1,28 @@ |
| +// 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 WindowGetComputedStyle_h |
| +#define WindowGetComputedStyle_h |
| + |
| +#include "core/css/CSSComputedStyleDeclaration.h" |
| +#include "core/css/cssom/ComputedStylePropertyMap.h" |
| +#include "core/dom/Document.h" |
|
Timothy Loh
2016/04/15 04:16:08
do we need Document and Allocator?
meade_UTC10
2016/04/27 05:53:56
We dont...copy pasta error. Fixed.
|
| +#include "wtf/Allocator.h" |
| + |
| +namespace blink { |
| + |
| +class WindowGetComputedStyle { |
| + STATIC_ONLY(WindowGetComputedStyle); |
| +public: |
| + static StylePropertyMap* getComputedStyleMap(const DOMWindow&, Element* element, const String& pseudoElement) |
| + { |
| + ASSERT(element); |
| + CSSComputedStyleDeclaration* computedStyleDeclaration = CSSComputedStyleDeclaration::create(element, false, pseudoElement); |
| + return ComputedStylePropertyMap::create(computedStyleDeclaration); |
| + } |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WindowGetComputedStyle_h |