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

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

Issue 339903005: Use HTMLMediaElement's helpers for the video fullscreen button (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | 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 c5455e7c3d2dbedbe003bcd67d0cc97e03436059..3bec1c9f638747f1230b65f128a49036c57b2fb3 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -32,7 +32,6 @@
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/DOMTokenList.h"
-#include "core/dom/FullscreenElementStack.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/MouseEvent.h"
#include "core/frame/LocalFrame.h"
@@ -492,10 +491,10 @@ PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> MediaControlFullscre
void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
{
if (event->type() == EventTypeNames::click) {
- if (FullscreenElementStack::isActiveFullScreenElement(mediaElement()))
- FullscreenElementStack::from(document()).webkitCancelFullScreen();
+ if (mediaElement().isFullscreen())
+ mediaElement().exitFullscreen();
else
- FullscreenElementStack::from(document()).requestFullScreenForElement(mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement);
+ mediaElement().enterFullscreen();
event->setDefaultHandled();
}
HTMLInputElement::defaultEventHandler(event);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698