Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h

Issue 1815643002: Introduce DocumentOrShadowRoot Mixin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@debug
Patch Set: fix typo Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.idl ('k') | third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698