Commit 7a4748f9 authored by tonikitoo@webkit.org's avatar tonikitoo@webkit.org

[BlackBerry] browser video player fullscreen mode (portrait) - out of...

[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 <agomes@rim.com>

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5df75cc3
2012-06-02 Antonio Gomes <agomes@rim.com>
[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 <haizhang@rim.com>
[BlackBerry] Fix the return value checking in SelectPopupClient
......
......@@ -737,6 +737,14 @@ void ChromeClientBlackBerry::exitFullScreenForElement(WebCore::Element* element)
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)
......
......@@ -130,6 +130,7 @@ public:
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*);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment