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

Unified Diff: third_party/WebKit/Source/core/dom/Fullscreen.h

Issue 2021513002: Move willEnterFullscreen to WebRemoteFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about user gestures 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_frame_proxy.cc ('k') | third_party/WebKit/Source/core/dom/Fullscreen.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Fullscreen.h
diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.h b/third_party/WebKit/Source/core/dom/Fullscreen.h
index 9761c4fea2205bd6afc79f296517ba7a32934f89..a624c20a86c31f2f39313727198a5d3e1a00207b 100644
--- a/third_party/WebKit/Source/core/dom/Fullscreen.h
+++ b/third_party/WebKit/Source/core/dom/Fullscreen.h
@@ -67,7 +67,10 @@ public:
PrefixedRequest,
};
- void requestFullscreen(Element&, RequestType);
+ // |forCrossProcessAncestor| is used in OOPIF scenarios and is set to true
+ // when fullscreen is requested for an out-of-process descendant element.
+ void requestFullscreen(Element&, RequestType, bool forCrossProcessAncestor = false);
+
static void fullyExitFullscreen(Document&);
void exitFullscreen();
@@ -80,8 +83,8 @@ public:
// for its (local) iframe container and make sure to also set the
// ContainsFullScreenElement flag on it (so that it gains the
// -webkit-full-screen-ancestor style).
- void didEnterFullScreenForElement(Element*, bool isAncestorOfFullscreenElement);
- void didExitFullScreenForElement(bool isAncestorOfFullscreenElement);
+ void didEnterFullScreenForElement(Element*);
+ void didExitFullScreenForElement();
void setFullScreenLayoutObject(LayoutFullScreen*);
LayoutFullScreen* fullScreenLayoutObject() const { return m_fullScreenLayoutObject; }
@@ -89,6 +92,10 @@ public:
void elementRemoved(Element&);
+ // Returns true if the current fullscreen element stack corresponds to a
+ // container for an actual fullscreen element in an out-of-process iframe.
+ bool forCrossProcessAncestor() { return m_forCrossProcessAncestor; }
+
// Mozilla API
Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement.get(); }
@@ -119,6 +126,17 @@ private:
HeapDeque<Member<Event>> m_eventQueue;
LayoutRect m_savedPlaceholderFrameRect;
RefPtr<ComputedStyle> m_savedPlaceholderComputedStyle;
+
+ // TODO(alexmos, dcheng): Currently, this assumes that if fullscreen was
+ // entered for an element in an out-of-process iframe, then it's not
+ // possible to re-enter fullscreen for a different element in this
+ // document, since that requires a user gesture, which can't be obtained
+ // since nothing in this document is visible, and since user gestures can't
+ // be forwarded across processes. However, the latter assumption could
+ // change if https://crbug.com/161068 is fixed so that cross-process
+ // postMessage can carry user gestures. If that happens, this should be
+ // moved to be part of |m_fullScreenElementStack|.
+ bool m_forCrossProcessAncestor;
};
inline bool Fullscreen::isActiveFullScreenElement(const Element& element)
« no previous file with comments | « content/renderer/render_frame_proxy.cc ('k') | third_party/WebKit/Source/core/dom/Fullscreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698