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

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

Issue 1925043002: Clean up ShadowRootRareData, ShadowRoot and SlotAssignment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed Created 4 years, 7 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DocumentOrShadowRoot_h 5 #ifndef DocumentOrShadowRoot_h
6 #define DocumentOrShadowRoot_h 6 #define DocumentOrShadowRoot_h
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/shadow/ShadowRoot.h" 9 #include "core/dom/shadow/ShadowRoot.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class DocumentOrShadowRoot { 13 class DocumentOrShadowRoot {
14 public: 14 public:
15 static Element* activeElement(Document& document) 15 static Element* activeElement(Document& document)
16 { 16 {
17 return document.activeElement(); 17 return document.activeElement();
18 } 18 }
19 19
20 static Element* activeElement(ShadowRoot& shadowRoot) 20 static Element* activeElement(ShadowRoot& shadowRoot)
21 { 21 {
22 return shadowRoot.activeElement(); 22 return shadowRoot.activeElement();
23 } 23 }
24 24
25 static StyleSheetList* styleSheets(Document& document) 25 static StyleSheetList* styleSheets(Document& document)
26 { 26 {
27 return document.styleSheets(); 27 return &document.styleSheets();
28 } 28 }
29 29
30 static StyleSheetList* styleSheets(ShadowRoot& shadowRoot) 30 static StyleSheetList* styleSheets(ShadowRoot& shadowRoot)
31 { 31 {
32 return shadowRoot.styleSheets(); 32 return &shadowRoot.styleSheets();
33 } 33 }
34 34
35 static DOMSelection* getSelection(TreeScope& treeScope) 35 static DOMSelection* getSelection(TreeScope& treeScope)
36 { 36 {
37 return treeScope.getSelection(); 37 return treeScope.getSelection();
38 } 38 }
39 39
40 static Element* elementFromPoint(TreeScope& treeScope, int x, int y) 40 static Element* elementFromPoint(TreeScope& treeScope, int x, int y)
41 { 41 {
42 return treeScope.elementFromPoint(x, y); 42 return treeScope.elementFromPoint(x, y);
43 } 43 }
44 44
45 static HeapVector<Member<Element>> elementsFromPoint(TreeScope& treeScope, i nt x, int y) 45 static HeapVector<Member<Element>> elementsFromPoint(TreeScope& treeScope, i nt x, int y)
46 { 46 {
47 return treeScope.elementsFromPoint(x, y); 47 return treeScope.elementsFromPoint(x, y);
48 } 48 }
49 }; 49 };
50 50
51 } // namespace blink 51 } // namespace blink
52 52
53 #endif // DocumentOrShadowRoot_h 53 #endif // DocumentOrShadowRoot_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698