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); |