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

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

Issue 2565203002: Add a requestFullscreen variant with a default (prefixed) type (Closed)
Patch Set: Created 4 years 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
Index: third_party/WebKit/Source/core/dom/Fullscreen.cpp
diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.cpp b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
index ce9f4d9eb6ad74df28a9132e97f666b25422695e..9095f989c1615a6a6d51fe42a0be25c91ba58d0a 100644
--- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp
+++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
@@ -317,6 +317,12 @@ void Fullscreen::contextDestroyed() {
}
// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
+void Fullscreen::requestFullscreen(Element& element) {
+ // TODO(foolip): Make RequestType::Unprefixed the default when the unprefixed
+ // API is enabled. https://crbug.com/383813
+ requestFullscreen(element, RequestType::Prefixed, false);
+}
+
void Fullscreen::requestFullscreen(Element& element,
RequestType requestType,
bool forCrossProcessDescendant) {
@@ -724,7 +730,7 @@ void Fullscreen::fullScreenLayoutObjectDestroyed() {
void Fullscreen::enqueueChangeEvent(Document& document,
RequestType requestType) {
Event* event;
- if (requestType == UnprefixedRequest) {
+ if (requestType == RequestType::Unprefixed) {
event = createEvent(EventTypeNames::fullscreenchange, document);
} else {
DCHECK(document.hasFullscreenSupplement());
@@ -742,7 +748,7 @@ void Fullscreen::enqueueChangeEvent(Document& document,
void Fullscreen::enqueueErrorEvent(Element& element, RequestType requestType) {
Event* event;
- if (requestType == UnprefixedRequest)
+ if (requestType == RequestType::Unprefixed)
event = createEvent(EventTypeNames::fullscreenerror, element.document());
else
event = createEvent(EventTypeNames::webkitfullscreenerror, element);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Fullscreen.h ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698