[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 18:44:44 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 099ea0f6dfc3ef4bae3573d2b47a789424f8cea6
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 17 03:28:51 2010 +0000

    2010-12-16  Yi Shen  <yi.4.shen at nokia.com>, Tor Arne Vestbo <tor.arne.vestbo at nokia.com>
    
            Reviewed by Eric Carlson.
    
            Provide an interface to require using fullscreen mediaplayer
            https://bugs.webkit.org/show_bug.cgi?id=51133
    
            Add ChromeClient::requiresFullscreenForVideoPlayback to require webkit
            to launch fullscreen video player for playing the html5 video. The
            idea is that a browser vendor can specify this behavior through the
            platform plugin or something else by using this interface.
    
            No new tests because no client implements requiresFullscreenForVideoPlayback yet.
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::updatePlayState):
            (WebCore::HTMLMediaElement::exitFullscreen):
            * page/Chrome.cpp:
            (WebCore::Chrome::requiresFullscreenForVideoPlayback):
            * page/Chrome.h:
            * page/ChromeClient.h:
            (WebCore::ChromeClient::requiresFullscreenForVideoPlayback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 79493c3..fe869ef 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-12-16  Yi Shen  <yi.4.shen at nokia.com>, Tor Arne Vestbo <tor.arne.vestbo at nokia.com>
+
+        Reviewed by Eric Carlson.
+
+        Provide an interface to require using fullscreen mediaplayer
+        https://bugs.webkit.org/show_bug.cgi?id=51133
+
+        Add ChromeClient::requiresFullscreenForVideoPlayback to require webkit
+        to launch fullscreen video player for playing the html5 video. The 
+        idea is that a browser vendor can specify this behavior through the
+        platform plugin or something else by using this interface.
+
+        No new tests because no client implements requiresFullscreenForVideoPlayback yet.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::updatePlayState):
+        (WebCore::HTMLMediaElement::exitFullscreen):
+        * page/Chrome.cpp:
+        (WebCore::Chrome::requiresFullscreenForVideoPlayback):
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::requiresFullscreenForVideoPlayback):
+
 2010-12-16  Steve Block  <steveblock at google.com>
 
         Reviewed by Steve Block.
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index d6e8440..9b56bb8 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -2109,6 +2109,9 @@ void HTMLMediaElement::updatePlayState()
         invalidateCachedTime();
 
         if (playerPaused) {
+            if (document() && document()->page() && document()->page()->chrome()->requiresFullscreenForVideoPlayback() && !m_isFullscreen)
+                enterFullscreen();
+
             // Set rate before calling play in case the rate was set before the media engine was setup.
             // The media engine should just stash the rate since it isn't already playing.
             m_player->setRate(m_playbackRate);
@@ -2424,6 +2427,8 @@ void HTMLMediaElement::exitFullscreen()
     ASSERT(m_isFullscreen);
     m_isFullscreen = false;
     if (document() && document()->page()) {
+        if (document()->page()->chrome()->requiresFullscreenForVideoPlayback())
+            pauseInternal();
         document()->page()->chrome()->client()->exitFullscreenForNode(this);
         scheduleEvent(eventNames().webkitendfullscreenEvent);
     }
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp
index 83d0f85..a801065 100644
--- a/WebCore/page/Chrome.cpp
+++ b/WebCore/page/Chrome.cpp
@@ -521,4 +521,9 @@ void Chrome::showContextMenu()
 }
 #endif
 
+bool Chrome::requiresFullscreenForVideoPlayback()
+{
+    return m_client->requiresFullscreenForVideoPlayback();
+}
+
 } // namespace WebCore
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index c9862ad..93b8c4a 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -149,6 +149,8 @@ namespace WebCore {
 
         void dispatchViewportDataDidChange(const ViewportArguments&) const;
 
+        bool requiresFullscreenForVideoPlayback();
+
 #if PLATFORM(MAC)
         void focusNSView(NSView*);
 #endif
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index d013d1c..3eb48a0 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -256,6 +256,7 @@ namespace WebCore {
         virtual bool supportsFullscreenForNode(const Node*) { return false; }
         virtual void enterFullscreenForNode(Node*) { }
         virtual void exitFullscreenForNode(Node*) { }
+        virtual bool requiresFullscreenForVideoPlayback() { return false; } 
 
 #if ENABLE(FULLSCREEN_API)
         virtual bool supportsFullScreenForElement(const Element*) { return false; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list