summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLVideoElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLVideoElement.cpp')
-rw-r--r--WebCore/html/HTMLVideoElement.cpp37
1 files changed, 33 insertions, 4 deletions
diff --git a/WebCore/html/HTMLVideoElement.cpp b/WebCore/html/HTMLVideoElement.cpp
index 1fae354..be8f884 100644
--- a/WebCore/html/HTMLVideoElement.cpp
+++ b/WebCore/html/HTMLVideoElement.cpp
@@ -33,6 +33,7 @@
#include "CSSHelper.h"
#include "CSSPropertyNames.h"
#include "Document.h"
+#include "ExceptionCode.h"
#include "HTMLImageLoader.h"
#include "HTMLNames.h"
#include "MappedAttribute.h"
@@ -197,8 +198,6 @@ void HTMLVideoElement::updatePosterImage()
void HTMLVideoElement::paint(GraphicsContext* context, const IntRect& destRect)
{
- // FIXME: We should also be able to paint the poster image.
-
MediaPlayer* player = HTMLMediaElement::player();
if (!player)
return;
@@ -209,8 +208,6 @@ void HTMLVideoElement::paint(GraphicsContext* context, const IntRect& destRect)
void HTMLVideoElement::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& destRect)
{
- // FIXME: We should also be able to paint the poster image.
-
MediaPlayer* player = HTMLMediaElement::player();
if (!player)
return;
@@ -227,5 +224,37 @@ bool HTMLVideoElement::hasAvailableVideoFrame() const
return m_player->hasAvailableVideoFrame();
}
+void HTMLVideoElement::webkitEnterFullScreen(bool isUserGesture, ExceptionCode& ec)
+{
+ if (m_isFullscreen)
+ return;
+
+ // Generate an exception if this isn't called in response to a user gesture, or if the
+ // element does not support fullscreen.
+ if (!isUserGesture || !supportsFullscreen()) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+
+ enterFullscreen();
+}
+
+void HTMLVideoElement::webkitExitFullScreen()
+{
+ if (m_isFullscreen)
+ exitFullscreen();
+}
+
+bool HTMLVideoElement::webkitSupportsFullscreen()
+{
+ return supportsFullscreen();
+}
+
+bool HTMLVideoElement::webkitDisplayingFullscreen()
+{
+ return m_isFullscreen;
+}
+
+
}
#endif