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

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

Issue 600773002: Notify in console when an API fails because it needs to be invoked on user action. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed requestPointerLock related changes. Created 6 years, 3 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 | « LayoutTests/media/video-prefixed-fullscreen-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Fullscreen.cpp
diff --git a/Source/core/dom/Fullscreen.cpp b/Source/core/dom/Fullscreen.cpp
index 64b67a512ecf0eaffa02f3a1ab79bd769c43df31..69d008ebfa1c9e9ba7f85cdccef142fe476b5298 100644
--- a/Source/core/dom/Fullscreen.cpp
+++ b/Source/core/dom/Fullscreen.cpp
@@ -231,8 +231,13 @@ void Fullscreen::requestFullscreen(Element& element, RequestType requestType)
// An algorithm is allowed to show a pop-up if, in the task in which the algorithm is running, either:
// - an activation behavior is currently being processed whose click event was trusted, or
// - the event listener for a trusted click event is being handled.
- if (!UserGestureIndicator::processingUserGesture())
+ if (!UserGestureIndicator::processingUserGesture()) {
+ String message = ExceptionMessages::failedToExecute("requestFullScreen",
+ "Element", "API can only be initiated by a user gesture.");
+ document()->executionContext()->addConsoleMessage(
+ ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message));
break;
+ }
// Fullscreen is not supported.
if (!fullscreenIsSupported(element.document(), element))
« no previous file with comments | « LayoutTests/media/video-prefixed-fullscreen-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698