[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric.carlson at apple.com
eric.carlson at apple.com
Thu Feb 4 21:35:33 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 4159315959226d78ab93db76662fe4cca1a13b01
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Feb 1 20:48:11 2010 +0000
2010-02-01 Eric Carlson <eric.carlson at apple.com>
Reviewed by Adele Peterson.
Fullscreen API should be on HTMLVideoElement
https://bugs.webkit.org/show_bug.cgi?id=34438
Move fullscreen DOM APIs from HTMLMediaElement to HTMLVideoElement.
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::paint): Removed outdated FIXME.
(WebCore::HTMLVideoElement::paintCurrentFrameInContext): Ditto.
(WebCore::HTMLVideoElement::webkitEnterFullScreen): Moved from HTMLMediaElement.
(WebCore::HTMLVideoElement::webkitExitFullScreen): Ditto.
(WebCore::HTMLVideoElement::webkitSupportsFullscreen): Ditto.
(WebCore::HTMLVideoElement::webkitDisplayingFullscreen): Ditto.
* html/HTMLVideoElement.h:
* html/HTMLVideoElement.idl:
2010-02-01 Eric Carlson <eric.carlson at apple.com>
Reviewed by Adele Peterson.
Fullscreen API should be on HTMLVideoElement
https://bugs.webkit.org/show_bug.cgi?id=34438
Update fullscreen tests now that <audio> doesn't have fullscreen API.
* fast/dom/Window/window-properties-expected.txt:
* media/media-fullscreen-inline-expected.txt:
* media/media-fullscreen-not-in-document-expected.txt:
* media/media-fullscreen.js:
(buttonClickHandler):
(canplaythrough):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a639c83..4989f15 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-01 Eric Carlson <eric.carlson at apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Fullscreen API should be on HTMLVideoElement
+ https://bugs.webkit.org/show_bug.cgi?id=34438
+
+ Update fullscreen tests now that <audio> doesn't have fullscreen API.
+
+ * fast/dom/Window/window-properties-expected.txt:
+ * media/media-fullscreen-inline-expected.txt:
+ * media/media-fullscreen-not-in-document-expected.txt:
+ * media/media-fullscreen.js:
+ (buttonClickHandler):
+ (canplaythrough):
+
2010-02-01 Ben Murdoch <benm at google.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/dom/Window/window-properties-expected.txt b/LayoutTests/fast/dom/Window/window-properties-expected.txt
index 1a92ee3..de53c27 100644
--- a/LayoutTests/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-properties-expected.txt
@@ -121,8 +121,6 @@ window.Audio.prototype.setAttribute [function]
window.Audio.prototype.setAttributeNS [function]
window.Audio.prototype.setAttributeNode [function]
window.Audio.prototype.setAttributeNodeNS [function]
-window.Audio.prototype.webkitEnterFullScreen [function]
-window.Audio.prototype.webkitExitFullScreen [function]
window.Audio.prototype.webkitMatchesSelector [function]
window.BeforeLoadEvent [object BeforeLoadEventConstructor]
window.BeforeLoadEvent.prototype [object BeforeLoadEventPrototype]
diff --git a/LayoutTests/media/media-fullscreen-inline-expected.txt b/LayoutTests/media/media-fullscreen-inline-expected.txt
index 7d0f5dc..b1949ac 100644
--- a/LayoutTests/media/media-fullscreen-inline-expected.txt
+++ b/LayoutTests/media/media-fullscreen-inline-expected.txt
@@ -8,13 +8,11 @@ EVENT(loadstart)
EVENT(durationchange)
EVENT(canplaythrough)
* event handler NOT triggered by a user gesture
-EXPECTED (mediaElement.webkitSupportsFullscreen == 'false') OK
-EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK
-TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK
+EXPECTED (mediaElement.webkitSupportsFullscreen == 'undefined') OK
+EXPECTED (mediaElement.webkitDisplayingFullscreen == 'undefined') OK
* clicking on button
EVENT(mouseup)
* event handler triggered by user gesture
-TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK
*** Creating <video> element with "content/silence.mpg" in the document, should NOT support fullscreen because it is an audio-only <video> element
EVENT(loadstart)
diff --git a/LayoutTests/media/media-fullscreen-not-in-document-expected.txt b/LayoutTests/media/media-fullscreen-not-in-document-expected.txt
index f83ebdd..5be194c 100644
--- a/LayoutTests/media/media-fullscreen-not-in-document-expected.txt
+++ b/LayoutTests/media/media-fullscreen-not-in-document-expected.txt
@@ -25,13 +25,11 @@ EVENT(loadstart)
EVENT(durationchange)
EVENT(canplaythrough)
* event handler NOT triggered by a user gesture
-EXPECTED (mediaElement.webkitSupportsFullscreen == 'false') OK
-EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK
-TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK
+EXPECTED (mediaElement.webkitSupportsFullscreen == 'undefined') OK
+EXPECTED (mediaElement.webkitDisplayingFullscreen == 'undefined') OK
* clicking on button
EVENT(mouseup)
* event handler triggered by user gesture
-TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK
END OF TEST
diff --git a/LayoutTests/media/media-fullscreen.js b/LayoutTests/media/media-fullscreen.js
index fde255c..30d7254 100644
--- a/LayoutTests/media/media-fullscreen.js
+++ b/LayoutTests/media/media-fullscreen.js
@@ -1,16 +1,19 @@
function buttonClickHandler()
{
+ var movie = movieInfo.movies[movieInfo.current];
+
consoleWrite("EVENT(mouseup)");
consoleWrite("* event handler triggered by user gesture");
// Try to enter fullscreen in response to a mouse click
- if (movieInfo.movies[movieInfo.current].supportsFS)
+ if (movie.supportsFS)
run("mediaElement.webkitEnterFullScreen()");
else {
- testException("mediaElement.webkitEnterFullScreen()", "DOMException.INVALID_STATE_ERR");
+ if (movie.type == 'video')
+ testException("mediaElement.webkitEnterFullScreen()", "DOMException.INVALID_STATE_ERR");
openNextMovie();
}
}
@@ -41,12 +44,18 @@ function canplaythrough()
consoleWrite("* event handler NOT triggered by a user gesture");
- testExpected("mediaElement.webkitSupportsFullscreen", movie.supportsFS);
- testExpected("mediaElement.webkitDisplayingFullscreen", false);
+ if (movie.type == 'video') {
+ testExpected("mediaElement.webkitSupportsFullscreen", movie.supportsFS);
+ testExpected("mediaElement.webkitDisplayingFullscreen", false);
+ } else {
+ testExpected("mediaElement.webkitSupportsFullscreen", undefined);
+ testExpected("mediaElement.webkitDisplayingFullscreen", undefined);
+ }
// Verify that we get an exception when trying to enter fullscreen since this isn't
// called in response to a user gesture.
- testException("mediaElement.webkitEnterFullScreen()", "DOMException.INVALID_STATE_ERR");
+ if (movie.type == 'video')
+ testException("mediaElement.webkitEnterFullScreen()", "DOMException.INVALID_STATE_ERR");
// Click on the button
if (window.layoutTestController)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f29e0cc..bd064ae 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-02-01 Eric Carlson <eric.carlson at apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Fullscreen API should be on HTMLVideoElement
+ https://bugs.webkit.org/show_bug.cgi?id=34438
+
+ Move fullscreen DOM APIs from HTMLMediaElement to HTMLVideoElement.
+
+ * html/HTMLMediaElement.cpp:
+ * html/HTMLMediaElement.h:
+ * html/HTMLMediaElement.idl:
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::paint): Removed outdated FIXME.
+ (WebCore::HTMLVideoElement::paintCurrentFrameInContext): Ditto.
+ (WebCore::HTMLVideoElement::webkitEnterFullScreen): Moved from HTMLMediaElement.
+ (WebCore::HTMLVideoElement::webkitExitFullScreen): Ditto.
+ (WebCore::HTMLVideoElement::webkitSupportsFullscreen): Ditto.
+ (WebCore::HTMLVideoElement::webkitDisplayingFullscreen): Ditto.
+ * html/HTMLVideoElement.h:
+ * html/HTMLVideoElement.idl:
+
2010-02-01 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index fbd88d6..aad8268 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -1878,37 +1878,6 @@ PlatformMedia HTMLMediaElement::platformMedia() const
return m_player ? m_player->platformMedia() : NoPlatformMedia;
}
-void HTMLMediaElement::webkitEnterFullScreen(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 (!processingUserGesture() || !supportsFullscreen()) {
- ec = INVALID_STATE_ERR;
- return;
- }
-
- enterFullscreen();
-}
-
-void HTMLMediaElement::webkitExitFullScreen()
-{
- if (m_isFullscreen)
- exitFullscreen();
-}
-
-bool HTMLMediaElement::webkitSupportsFullscreen()
-{
- return supportsFullscreen();
-}
-
-bool HTMLMediaElement::webkitDisplayingFullscreen()
-{
- return m_isFullscreen;
-}
-
bool HTMLMediaElement::hasClosedCaptions() const
{
return m_player && m_player->hasClosedCaptions();
diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h
index 68b7ce4..2dd0514 100644
--- a/WebCore/html/HTMLMediaElement.h
+++ b/WebCore/html/HTMLMediaElement.h
@@ -132,12 +132,6 @@ public:
void play();
void pause();
-// fullscreen
- void webkitEnterFullScreen(ExceptionCode&);
- void webkitExitFullScreen();
- bool webkitSupportsFullscreen();
- bool webkitDisplayingFullscreen();
-
// captions
bool webkitHasClosedCaptions() const;
bool webkitClosedCaptionsVisible() const;
@@ -191,6 +185,8 @@ protected:
virtual void willMoveToNewOwnerDocument();
virtual void didMoveToNewOwnerDocument();
+ bool processingUserGesture() const;
+
private: // MediaPlayerClient
virtual void mediaPlayerNetworkStateChanged(MediaPlayer*);
virtual void mediaPlayerReadyStateChanged(MediaPlayer*);
@@ -247,7 +243,6 @@ private:
void prepareForLoad();
- bool processingUserGesture() const;
bool processingMediaPlayerCallback() const { return m_processingMediaPlayerCallback > 0; }
void beginProcessingMediaPlayerCallback() { ++m_processingMediaPlayerCallback; }
void endProcessingMediaPlayerCallback() { ASSERT(m_processingMediaPlayerCallback); --m_processingMediaPlayerCallback; }
diff --git a/WebCore/html/HTMLMediaElement.idl b/WebCore/html/HTMLMediaElement.idl
index 1097e55..865ca5b 100644
--- a/WebCore/html/HTMLMediaElement.idl
+++ b/WebCore/html/HTMLMediaElement.idl
@@ -80,13 +80,6 @@ interface [Conditional=VIDEO] HTMLMediaElement : HTMLElement {
// WebKit extensions
attribute boolean webkitPreservesPitch;
- readonly attribute boolean webkitSupportsFullscreen;
- readonly attribute boolean webkitDisplayingFullscreen;
-
- void webkitEnterFullScreen()
- raises (DOMException);
- void webkitExitFullScreen();
-
readonly attribute boolean webkitHasClosedCaptions;
attribute boolean webkitClosedCaptionsVisible;
};
diff --git a/WebCore/html/HTMLVideoElement.cpp b/WebCore/html/HTMLVideoElement.cpp
index 1fae354..994a829 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(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 (!processingUserGesture() || !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
diff --git a/WebCore/html/HTMLVideoElement.h b/WebCore/html/HTMLVideoElement.h
index 834ec4c..c49ba02 100644
--- a/WebCore/html/HTMLVideoElement.h
+++ b/WebCore/html/HTMLVideoElement.h
@@ -64,6 +64,12 @@ public:
const KURL& poster() const { return m_posterURL; }
void setPoster(const String&);
+// fullscreen
+ void webkitEnterFullScreen(ExceptionCode&);
+ void webkitExitFullScreen();
+ bool webkitSupportsFullscreen();
+ bool webkitDisplayingFullscreen();
+
void updatePosterImage();
bool shouldDisplayPosterImage() const { return m_shouldDisplayPosterImage; }
diff --git a/WebCore/html/HTMLVideoElement.idl b/WebCore/html/HTMLVideoElement.idl
index f43bf82..3d630b6 100644
--- a/WebCore/html/HTMLVideoElement.idl
+++ b/WebCore/html/HTMLVideoElement.idl
@@ -30,5 +30,13 @@ module html {
readonly attribute unsigned long videoWidth;
readonly attribute unsigned long videoHeight;
attribute [ConvertNullToNullString] DOMString poster;
+
+ readonly attribute boolean webkitSupportsFullscreen;
+ readonly attribute boolean webkitDisplayingFullscreen;
+
+ void webkitEnterFullScreen()
+ raises (DOMException);
+ void webkitExitFullScreen();
+
};
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list