Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef DocumentOrShadowRoot_h | |
| 6 #define DocumentOrShadowRoot_h | |
| 7 | |
| 8 #include "core/dom/Document.h" | |
| 9 #include "core/dom/shadow/ShadowRoot.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class DocumentOrShadowRoot { | |
| 14 public: | |
| 15 static Element* activeElement(Document& document) | |
| 16 { | |
| 17 return document.activeElement(); | |
|
kochi
2016/03/22 03:43:56
Can activeElement() and styleSheets() be a pure vi
hayato
2016/03/22 03:50:08
I did not do it intentionally in this CL. That sho
| |
| 18 } | |
| 19 | |
| 20 static Element* activeElement(ShadowRoot& shadowRoot) | |
| 21 { | |
| 22 return shadowRoot.activeElement(); | |
| 23 } | |
| 24 | |
| 25 static StyleSheetList* styleSheets(Document& document) | |
| 26 { | |
| 27 return document.styleSheets(); | |
| 28 } | |
| 29 | |
| 30 static StyleSheetList* styleSheets(ShadowRoot& shadowRoot) | |
| 31 { | |
| 32 return shadowRoot.styleSheets(); | |
| 33 } | |
| 34 | |
| 35 static DOMSelection* getSelection(TreeScope& treeScope) | |
| 36 { | |
| 37 return treeScope.getSelection(); | |
| 38 } | |
| 39 | |
| 40 static Element* elementFromPoint(TreeScope& treeScope, int x, int y) | |
| 41 { | |
| 42 return treeScope.elementFromPoint(x, y); | |
| 43 } | |
| 44 | |
| 45 static WillBeHeapVector<RawPtrWillBeMember<Element>> elementsFromPoint(TreeS cope& treeScope, int x, int y) | |
| 46 { | |
| 47 return treeScope.elementsFromPoint(x, y); | |
| 48 } | |
| 49 }; | |
| 50 | |
| 51 } // namespace blink | |
| 52 | |
| 53 #endif // DocumentOrShadowRoot_h | |
| OLD | NEW |