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

Unified Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 1058783006: Remove the allowfullscreen exemption for the video-specific fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistent quotes Created 5 years, 8 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 | « Source/core/html/HTMLVideoElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControlElements.cpp
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index f64e0c885a218012531856eae13dab7a3929a1cc..c66ef9e0741eaa2fc9ac05c002b2042be9c8fdac 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -33,6 +33,7 @@
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "core/InputTypeNames.h"
#include "core/dom/DOMTokenList.h"
+#include "core/dom/Fullscreen.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/MouseEvent.h"
#include "core/frame/LocalFrame.h"
@@ -512,10 +513,11 @@ PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> MediaControlFullscre
void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
{
if (event->type() == EventTypeNames::click) {
+ Fullscreen& fullscreen = Fullscreen::from(document());
if (mediaElement().isFullscreen())
- mediaElement().exitFullscreen();
+ fullscreen.exitFullscreen();
else
- mediaElement().enterFullscreen();
+ fullscreen.requestFullscreen(mediaElement(), Fullscreen::InternalVideoRequest);
event->setDefaultHandled();
}
HTMLInputElement::defaultEventHandler(event);
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698