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..7ca300278ac23fc02a0ed6d269633dea3a54bbe9 |
| --- /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" |
| +#include "wtf/Allocator.h" |
| + |
| +namespace blink { |
| + |
| +class WindowGetComputedStyle { |
| + STATIC_ONLY(WindowGetComputedStyle); |
| +public: |
| + static StylePropertyMap* getComputedStyleMap(const DOMWindow&, Element* elt, const String& pseudoElt) |
| + { |
| + ASSERT(elt); |
|
Timothy Loh
2016/03/31 06:59:25
Not sure about this, what happens if you use null?
meade_UTC10
2016/04/04 03:32:41
Done. FWIW, this was pretty much copied from here:
|
| + RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleDeclaration = CSSComputedStyleDeclaration::create(elt, false, pseudoElt); |
| + return ComputedStylePropertyMap::create(computedStyleDeclaration); |
| + } |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WindowGetComputedStyle_h |