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

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

Issue 2340263003: Move Document.fullscreenElement to DocumentOrShadowRoot (Closed)
Patch Set: Style nit Created 4 years, 1 month 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/Fullscreen.h"
9 #include "core/dom/shadow/ShadowRoot.h" 10 #include "core/dom/shadow/ShadowRoot.h"
10 #include "core/frame/UseCounter.h" 11 #include "core/frame/UseCounter.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class DocumentOrShadowRoot { 15 class DocumentOrShadowRoot {
15 public: 16 public:
16 static Element* activeElement(Document& document) { 17 static Element* activeElement(Document& document) {
17 return document.activeElement(); 18 return document.activeElement();
18 } 19 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Document and ShadowRoot. 67 // Document and ShadowRoot.
67 if (!shadowRoot.isV1()) 68 if (!shadowRoot.isV1())
68 return nullptr; 69 return nullptr;
69 UseCounter::count(shadowRoot.document(), 70 UseCounter::count(shadowRoot.document(),
70 UseCounter::ShadowRootPointerLockElement); 71 UseCounter::ShadowRootPointerLockElement);
71 const Element* target = shadowRoot.document().pointerLockElement(); 72 const Element* target = shadowRoot.document().pointerLockElement();
72 if (!target) 73 if (!target)
73 return nullptr; 74 return nullptr;
74 return shadowRoot.adjustedElement(*target); 75 return shadowRoot.adjustedElement(*target);
75 } 76 }
77
78 static Element* fullscreenElement(TreeScope& scope) {
79 return Fullscreen::fullscreenElementForBindingFrom(scope);
80 }
76 }; 81 };
77 82
78 } // namespace blink 83 } // namespace blink
79 84
80 #endif // DocumentOrShadowRoot_h 85 #endif // DocumentOrShadowRoot_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentFullscreen.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