Title: [120010] trunk/Source/WebKit/blackberry
Revision
120010
Author
[email protected]
Date
2012-06-11 15:04:07 -0700 (Mon, 11 Jun 2012)

Log Message

[BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not play well with rotation
https://bugs.webkit.org/show_bug.cgi?id=88809

Reviewed by Rob Buis.
Patch by Antonio Gomes <[email protected]>

Adjust the media container dimensions, whenever the FrameView::frameRect
(aka viewport rect) changes

Reviewed internally by Jacky Jiang.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (120009 => 120010)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-06-11 22:03:55 UTC (rev 120009)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-06-11 22:04:07 UTC (rev 120010)
@@ -93,6 +93,9 @@
 #include "PluginView.h"
 #include "RenderLayerBacking.h"
 #include "RenderLayerCompositor.h"
+#if ENABLE(FULLSCREEN_API)
+#include "RenderFullScreen.h"
+#endif
 #include "RenderText.h"
 #include "RenderThemeBlackBerry.h"
 #include "RenderTreeAsText.h"
@@ -1452,6 +1455,19 @@
     if (frameRect != m_mainFrame->view()->frameRect()) {
         m_mainFrame->view()->setFrameRect(frameRect);
         m_mainFrame->view()->adjustViewSize();
+
+#if ENABLE(FULLSCREEN_API)
+        // If we are in fullscreen video mode, and we change the FrameView::viewportRect,
+        // we need to adjust the media container to the new size.
+        if (m_fullscreenVideoNode) {
+            Document* document = m_fullscreenVideoNode->document();
+            ASSERT(document);
+            ASSERT(document->fullScreenRenderer());
+
+            int width = m_mainFrame->view()->visibleContentRect().size().width();
+            document->fullScreenRenderer()->style()->setWidth(Length(width, Fixed));
+        }
+#endif
     }
 
     // We're going to need to send a resize event to _javascript_ because

Modified: trunk/Source/WebKit/blackberry/ChangeLog (120009 => 120010)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-06-11 22:03:55 UTC (rev 120009)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-06-11 22:04:07 UTC (rev 120010)
@@ -1,3 +1,20 @@
+2012-06-11  Antonio Gomes  <[email protected]>
+
+        [BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not play well with rotation
+        https://bugs.webkit.org/show_bug.cgi?id=88809
+
+        Reviewed by Rob Buis.
+
+        Adjust the media container dimensions, whenever the FrameView::frameRect
+        (aka viewport rect) changes
+
+        Reviewed internally by Jacky Jiang.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
+
 2012-06-09  Antonio Gomes  <[email protected]>
 
         [BlackBerry] browser video player fullscreen mode (portrait) does not play well with viewport metatag - Controls are off screen so cannot exit fullscreen

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (120009 => 120010)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2012-06-11 22:03:55 UTC (rev 120009)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2012-06-11 22:04:07 UTC (rev 120010)
@@ -736,9 +736,6 @@
     // Once we go fullscreen using the new FULLSCREEN_API code path, we have to take into account
     // our port specific page scaling.
     if (fullScreenRenderer) {
-        // FIXME: Since we are setting an absolute width value here, it won't work for cases
-        // where we change the viewport size as we go. For example, rotate the device while
-        // in fullscreen mode.
         int width = m_webPagePrivate->m_mainFrame->view()->visibleContentRect().size().width();
         fullScreenRenderer->style()->setWidth(Length(width, Fixed));
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to