[BlackBerry] User viewport arguments are not respected

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

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-06-07
Reviewed by Antonio Gomes.

RIM PR #163767

Fixed by applying the user supplied viewport arguments if the page
specifies default viewport arguments (i.e. the page has no viewport
meta tag).

If the user didn't supply any viewport arguments either, the behaviour
is the same as before the patch, the caller will successfully reset to
default viewport arguments.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8d9b735a
......@@ -3411,7 +3411,12 @@ void WebPagePrivate::dispatchViewportPropertiesDidChange(const ViewportArguments
if (arguments == m_viewportArguments)
return;
m_viewportArguments = arguments;
// If the caller is trying to reset to default arguments, use the user supplied ones instead.
static const ViewportArguments defaultViewportArguments;
if (arguments == defaultViewportArguments)
m_viewportArguments = m_userViewportArguments;
else
m_viewportArguments = arguments;
// 0 width or height in viewport arguments makes no sense, and results in a very large initial scale.
// In real world, a 0 width or height is usually caused by a syntax error in "content" field of viewport
......
2012-06-07 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] User viewport arguments are not respected
https://bugs.webkit.org/show_bug.cgi?id=88530
Reviewed by Antonio Gomes.
RIM PR #163767
Fixed by applying the user supplied viewport arguments if the page
specifies default viewport arguments (i.e. the page has no viewport
meta tag).
If the user didn't supply any viewport arguments either, the behaviour
is the same as before the patch, the caller will successfully reset to
default viewport arguments.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
2012-06-07 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Allow WebPageCompositor to blend a transparent web page
......
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