Skip to content
Permalink
Browse files
[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):

Canonical link: https://commits.webkit.org/105996@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Antonio Gomes committed Jun 2, 2012
1 parent 34173de commit 3ec4bdfd05eb3290907f4db1d60074cab9cec175
Showing 3 changed files with 33 additions and 0 deletions.
@@ -1,3 +1,27 @@
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 @@ class ChromeClientBlackBerry : public ChromeClient {
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*);

0 comments on commit 3ec4bdf

Please sign in to comment.