Title: [117511] trunk/Source/WebKit/blackberry
Revision
117511
Author
zhaji...@rim.com
Date
2012-05-17 16:19:04 -0700 (Thu, 17 May 2012)

Log Message

[BlackBerry] www.thestar.com/iphone Viewport Weirdness
https://bugs.webkit.org/show_bug.cgi?id=86756

Reviewed by George Staikos.

PR 156710
On high DPI devices, the virtual viewport size of this page was smaller
than screen size. During the refreshing of the page, we reset the scale
when the state was Committed, then layouted and rendered contents based
on the virtual viewport size and default scale 1, which caused a small
size thumbnail before we restored the previous view state.
Fixed it by keeping the previous scale, user scalable and
m_userViewportArguments during the Committed state of refreshing.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (117510 => 117511)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-05-17 23:11:20 UTC (rev 117510)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-05-17 23:19:04 UTC (rev 117511)
@@ -891,8 +891,12 @@
                 m_virtualViewportWidth = m_webSettings->viewportWidth();
                 m_virtualViewportHeight = m_defaultLayoutSize.height();
             }
-            // Check if we have already process the meta viewport tag, this only happens on history navigation
-            if (!m_didRestoreFromPageCache) {
+            // Check if we have already process the meta viewport tag, this only happens on history navigation.
+            // Refreshing should keep these previous values as well.
+            FrameLoadType frameLoadType = FrameLoadTypeStandard;
+            if (m_mainFrame && m_mainFrame->loader())
+                frameLoadType = m_mainFrame->loader()->loadType();
+            if (!m_didRestoreFromPageCache && !(frameLoadType == FrameLoadTypeReload || frameLoadType == FrameLoadTypeReloadFromOrigin)) {
                 m_viewportArguments = ViewportArguments();
 
                 // At the moment we commit a new load, set the viewport arguments

Modified: trunk/Source/WebKit/blackberry/ChangeLog (117510 => 117511)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-05-17 23:11:20 UTC (rev 117510)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-05-17 23:19:04 UTC (rev 117511)
@@ -1,3 +1,22 @@
+2012-05-17  Jacky Jiang  <zhaji...@rim.com>
+
+        [BlackBerry] www.thestar.com/iphone Viewport Weirdness
+        https://bugs.webkit.org/show_bug.cgi?id=86756
+
+        Reviewed by George Staikos.
+
+        PR 156710
+        On high DPI devices, the virtual viewport size of this page was smaller
+        than screen size. During the refreshing of the page, we reset the scale
+        when the state was Committed, then layouted and rendered contents based
+        on the virtual viewport size and default scale 1, which caused a small
+        size thumbnail before we restored the previous view state.
+        Fixed it by keeping the previous scale, user scalable and
+        m_userViewportArguments during the Committed state of refreshing.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+
 2012-05-17  Mike Fenton  <mifen...@rim.com>
 
         [BlackBerry] Cleanup headers in SelectionHandler.cpp
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to