| Index: Source/core/html/HTMLVideoElement.cpp
|
| diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
|
| index 3cc8b3d6c64828ca37e946a7e8259ca623eae76f..4399b983af84cec75bae3b7ce0fd9b34920bb424 100644
|
| --- a/Source/core/html/HTMLVideoElement.cpp
|
| +++ b/Source/core/html/HTMLVideoElement.cpp
|
| @@ -121,6 +121,17 @@ void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicStr
|
| HTMLMediaElement::parseAttribute(name, value);
|
| }
|
|
|
| +bool HTMLVideoElement::supportsFullscreen() const
|
| +{
|
| + if (!document().page())
|
| + return false;
|
| +
|
| + if (!player())
|
| + return false;
|
| +
|
| + return true;
|
| +}
|
| +
|
| unsigned HTMLVideoElement::videoWidth() const
|
| {
|
| if (!player())
|
| @@ -197,6 +208,35 @@ bool HTMLVideoElement::hasAvailableVideoFrame() const
|
| return player()->hasVideo() && player()->readyState() >= MediaPlayer::HaveCurrentData;
|
| }
|
|
|
| +void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState)
|
| +{
|
| + if (isFullscreen())
|
| + return;
|
| +
|
| + if (!supportsFullscreen()) {
|
| + exceptionState.throwDOMException(InvalidStateError, "This element does not support fullscreen mode.");
|
| + return;
|
| + }
|
| +
|
| + enterFullscreen();
|
| +}
|
| +
|
| +void HTMLVideoElement::webkitExitFullscreen()
|
| +{
|
| + if (isFullscreen())
|
| + exitFullscreen();
|
| +}
|
| +
|
| +bool HTMLVideoElement::webkitSupportsFullscreen()
|
| +{
|
| + return supportsFullscreen();
|
| +}
|
| +
|
| +bool HTMLVideoElement::webkitDisplayingFullscreen()
|
| +{
|
| + return isFullscreen();
|
| +}
|
| +
|
| void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument)
|
| {
|
| if (m_imageLoader)
|
|
|