Title: [119320] trunk/Source/WebKit/blackberry
Revision
119320
Author
[email protected]
Date
2012-06-02 07:52:45 -0700 (Sat, 02 Jun 2012)

Log Message

[BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART I)
https://bugs.webkit.org/show_bug.cgi?id=88019
PR #158266

Reviewed by George Staikos.
Patch by Antonio Gomes <[email protected]>

The way elements go fullscreen with the new FULLSCREEN_API
is that they get cloned and added to an out-of-DOM wrapper
element. The wrapper is a normal fixed position element and
then zoom in/out accordingly to how other layers do: following
WebPage's scale.

When going fullscreen, we have to take the current WebPage scale
into account in order to properly fit the element to the screen,
regardless the web page scale.

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore):
(WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (119319 => 119320)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-06-02 14:48:43 UTC (rev 119319)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-06-02 14:52:45 UTC (rev 119320)
@@ -1,3 +1,27 @@
+2012-06-02  Antonio Gomes  <[email protected]>
+
+        [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART I)
+        https://bugs.webkit.org/show_bug.cgi?id=88019
+        PR #158266
+
+        Reviewed by George Staikos.
+
+        The way elements go fullscreen with the new FULLSCREEN_API
+        is that they get cloned and added to an out-of-DOM wrapper
+        element. The wrapper is a normal fixed position element and
+        then zoom in/out accordingly to how other layers do: following
+        WebPage's scale.
+
+        When going fullscreen, we have to take the current WebPage scale
+        into account in order to properly fit the element to the screen,
+        regardless the web page scale.
+
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore):
+        (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
+        * WebCoreSupport/ChromeClientBlackBerry.h:
+        (ChromeClientBlackBerry):
+
 2012-06-01  Crystal Zhang  <[email protected]>
 
         [BlackBerry] Fix the return value checking in SelectPopupClient

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (119319 => 119320)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2012-06-02 14:48:43 UTC (rev 119319)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2012-06-02 14:52:45 UTC (rev 119320)
@@ -737,6 +737,14 @@
     m_webPagePrivate->exitFullScreenForElement(element);
     element->document()->webkitDidExitFullScreenForElement(element);
 }
+
+void ChromeClientBlackBerry::fullScreenRendererChanged(RenderBox* fullScreenRenderer)
+{
+    // Once we go fullscreen using the new FULLSCREEN_API code path, we have to take into account
+    // our port specific page scaling.
+    if (fullScreenRenderer)
+        fullScreenRenderer->style()->setWidth(Length(100.0 / m_webPagePrivate->currentScale(), Percent));
+}
 #endif
 
 #if ENABLE(WEBGL)

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h (119319 => 119320)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h	2012-06-02 14:48:43 UTC (rev 119319)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h	2012-06-02 14:52:45 UTC (rev 119320)
@@ -130,6 +130,7 @@
     virtual bool supportsFullScreenForElement(const Element*, bool withKeyboard);
     virtual void enterFullScreenForElement(Element*);
     virtual void exitFullScreenForElement(Element*);
+    virtual void fullScreenRendererChanged(RenderBox*);
 #endif
 #if ENABLE(WEBGL)
     virtual void requestWebGLPermission(Frame*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to