mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 1696717 - Constify the dom fullscreen code a bit. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D107362
This commit is contained in:
parent
6283dfa76c
commit
d5a1f6115c
@ -14175,7 +14175,7 @@ Element* Document::GetTopLayerTop() {
|
||||
return element;
|
||||
}
|
||||
|
||||
Element* Document::GetUnretargetedFullScreenElement() {
|
||||
Element* Document::GetUnretargetedFullScreenElement() const {
|
||||
for (const nsWeakPtr& weakPtr : Reversed(mTopLayer)) {
|
||||
nsCOMPtr<Element> element(do_QueryReferent(weakPtr));
|
||||
// Per spec, the fullscreen element is the topmost element in the document’s
|
||||
|
@ -3395,8 +3395,8 @@ class Document : public nsINode,
|
||||
|
||||
Element* GetTopLayerTop();
|
||||
// Return the fullscreen element in the top layer
|
||||
Element* GetUnretargetedFullScreenElement();
|
||||
bool Fullscreen() { return !!GetFullscreenElement(); }
|
||||
Element* GetUnretargetedFullScreenElement() const;
|
||||
bool Fullscreen() const { return !!GetUnretargetedFullScreenElement(); }
|
||||
already_AddRefed<Promise> ExitFullscreen(ErrorResult&);
|
||||
void ExitPointerLock() { PointerLockManager::Unlock(this); }
|
||||
void GetFgColor(nsAString& aFgColor);
|
||||
|
@ -313,7 +313,7 @@ Element* DocumentOrShadowRoot::GetPointerLockElement() {
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
Element* DocumentOrShadowRoot::GetFullscreenElement() {
|
||||
Element* DocumentOrShadowRoot::GetFullscreenElement() const {
|
||||
if (!AsNode().IsInComposedDoc()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class DocumentOrShadowRoot {
|
||||
~DocumentOrShadowRoot();
|
||||
|
||||
Element* GetPointerLockElement();
|
||||
Element* GetFullscreenElement();
|
||||
Element* GetFullscreenElement() const;
|
||||
|
||||
Element* ElementFromPoint(float aX, float aY);
|
||||
nsINode* NodeFromPoint(float aX, float aY);
|
||||
|
Loading…
Reference in New Issue
Block a user