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

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

Issue 196793021: Ignore MediaController in the video fullscreen button logic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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/MediaControllerInterface.h ('k') | Source/core/html/shadow/MediaControls.cpp » ('j') | 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 b456762cd14d900ec8c5a3ec31c30680fb9b465d..11a87ad90852e57c05e4e348eb7bec87bf1d63c7 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -38,7 +38,6 @@
#include "core/events/MouseEvent.h"
#include "core/events/ThreadLocalEventNames.h"
#include "core/frame/LocalFrame.h"
-#include "core/frame/Settings.h"
#include "core/html/HTMLVideoElement.h"
#include "core/html/shadow/MediaControls.h"
#include "core/html/track/TextTrack.h"
@@ -588,19 +587,10 @@ PassRefPtr<MediaControlFullscreenButtonElement> MediaControlFullscreenButtonElem
void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
{
if (event->type() == EventTypeNames::click) {
- // Only use the new full screen API if the fullScreenEnabled setting has
- // been explicitly enabled. Otherwise, use the old fullscreen API. This
- // allows apps which embed a WebView to retain the existing full screen
- // video implementation without requiring them to implement their own full
- // screen behavior.
- if (document().settings() && document().settings()->fullScreenEnabled()) {
- if (FullscreenElementStack::isActiveFullScreenElement(&mediaElement()))
- FullscreenElementStack::from(document()).webkitCancelFullScreen();
- else
- FullscreenElementStack::from(document()).requestFullScreenForElement(&mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement);
- } else {
- mediaControllerInterface().enterFullscreen();
- }
+ if (FullscreenElementStack::isActiveFullScreenElement(&mediaElement()))
+ FullscreenElementStack::from(document()).webkitCancelFullScreen();
+ else
+ FullscreenElementStack::from(document()).requestFullScreenForElement(&mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement);
event->setDefaultHandled();
}
HTMLInputElement::defaultEventHandler(event);
« no previous file with comments | « Source/core/html/MediaControllerInterface.h ('k') | Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698