[BlackBerry] The Page's deviceScaleFactor() is not being properly maintained

https://bugs.webkit.org/show_bug.cgi?id=87817

Patch by Max Feil <mfeil@rim.com> on 2012-05-29
Reviewed by Antonio Gomes.

This bug fix in WebKit/blackberry is needed by the changes for
fullscreen media control sizing in WebCore (bug 87551). The sizing
of controls depends on the page's deviceScaleFactor(), which was
not being maintained properly due to errors in logic. Viewport
changes from non-default to default were being erroneously
thrown out. Also, when the viewport did change back to default
the deviceScaleFactor was not being updated.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
(BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 679dda06
......@@ -3358,8 +3358,10 @@ void WebPage::resetVirtualViewportOnCommitted(bool reset)
IntSize WebPagePrivate::recomputeVirtualViewportFromViewportArguments()
{
static const ViewportArguments defaultViewportArguments;
if (m_viewportArguments == defaultViewportArguments)
if (m_viewportArguments == defaultViewportArguments) {
m_page->setDeviceScaleFactor(1.0);
return IntSize();
}
int desktopWidth = defaultMaxLayoutSize().width();
int deviceWidth = Platform::Graphics::Screen::primaryScreen()->width();
......@@ -3397,8 +3399,7 @@ void WebPagePrivate::didReceiveTouchEventMode(TouchEventMode mode)
void WebPagePrivate::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments)
{
static ViewportArguments defaultViewportArguments;
if (arguments == defaultViewportArguments)
if (arguments == m_viewportArguments)
return;
m_viewportArguments = arguments;
......
2012-05-29 Max Feil <mfeil@rim.com>
[BlackBerry] The Page's deviceScaleFactor() is not being properly maintained
https://bugs.webkit.org/show_bug.cgi?id=87817
Reviewed by Antonio Gomes.
This bug fix in WebKit/blackberry is needed by the changes for
fullscreen media control sizing in WebCore (bug 87551). The sizing
of controls depends on the page's deviceScaleFactor(), which was
not being maintained properly due to errors in logic. Viewport
changes from non-default to default were being erroneously
thrown out. Also, when the viewport did change back to default
the deviceScaleFactor was not being updated.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
(BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
2012-05-29 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] WebOverlay build fixes and bug fixes
......
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