Title: [139629] trunk/Source/WebKit/blackberry
Revision
139629
Author
zhaji...@rim.com
Date
2013-01-14 11:09:44 -0800 (Mon, 14 Jan 2013)

Log Message

[BlackBerry] Zoom is still possible when user-scalable=no
https://bugs.webkit.org/show_bug.cgi?id=106809

Patch by Jacky Jiang <zhaji...@rim.com>.
Reviewed by George Staikos.

PR: 274566
On wordpress.com, the contents were rendered at the width 343 which was
1 css pixel larger than the expected device-width 342 so that we didn't
respect the viewport.
There was a RenderBlock on the page which contained "\n" and an
inline-block. "\n" took 0.78 width and the inline-block took 342 width
and they were unfortunately placed in the same InlineBox which caused
the contents width 1 css pixels larger than the device-width.
Allow the contents width to be 1 css pixel larger and still respect the
viewport in such a special case.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (139628 => 139629)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-01-14 19:04:41 UTC (rev 139628)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-01-14 19:09:44 UTC (rev 139629)
@@ -1699,7 +1699,7 @@
 
 bool WebPagePrivate::respectViewport() const
 {
-    return m_forceRespectViewportArguments || contentsSize().width() <= m_virtualViewportSize.width();
+    return m_forceRespectViewportArguments || contentsSize().width() <= m_virtualViewportSize.width() + 1;
 }
 
 double WebPagePrivate::initialScale() const

Modified: trunk/Source/WebKit/blackberry/ChangeLog (139628 => 139629)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-01-14 19:04:41 UTC (rev 139628)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-01-14 19:09:44 UTC (rev 139629)
@@ -1,3 +1,24 @@
+2013-01-14  Jacky Jiang  <zhaji...@rim.com>
+
+        [BlackBerry] Zoom is still possible when user-scalable=no
+        https://bugs.webkit.org/show_bug.cgi?id=106809
+
+        Reviewed by George Staikos.
+
+        PR: 274566
+        On wordpress.com, the contents were rendered at the width 343 which was
+        1 css pixel larger than the expected device-width 342 so that we didn't
+        respect the viewport.
+        There was a RenderBlock on the page which contained "\n" and an
+        inline-block. "\n" took 0.78 width and the inline-block took 342 width
+        and they were unfortunately placed in the same InlineBox which caused
+        the contents width 1 css pixels larger than the device-width.
+        Allow the contents width to be 1 css pixel larger and still respect the
+        viewport in such a special case.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::respectViewport):
+
 2013-01-13  Xiaobo Wang  <xbw...@torchmobile.com.cn>
 
         [BlackBerry] Add a public function WebPage::isLoading()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to