Title: [148225] trunk/Source/WebKit/blackberry
Revision
148225
Author
[email protected]
Date
2013-04-11 12:56:36 -0700 (Thu, 11 Apr 2013)

Log Message

[BlackBerry] Initial scale changes depending on the order of page navigations
https://bugs.webkit.org/show_bug.cgi?id=114448

Patch by Jacky Jiang <[email protected]>.
Reviewed by Rob Buis.

PR: 323941
During page transitions, absoluteVisibleOverflowSize() and contentsSize()
in fixedLayoutSize() were based on the old page when we just started or
committed provisinal load. In that case, fixedLayoutSize() is very old
page dependent and can cause inconsistent behaviors. For example, if
the old page contents width is 4000, we will get DEFAULT_MAX_LAYOUT_WIDTH 1024
as the new page's fixedLayoutSize; however, we will get 768 if we
navigate to the new page directly.
To fix that, return default layout size if the page doesn't have
virtual viewport and m_loadState is Provisional.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (148224 => 148225)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-04-11 19:37:22 UTC (rev 148224)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-04-11 19:56:36 UTC (rev 148225)
@@ -2320,7 +2320,10 @@
 
     // If the load state is none then we haven't actually got anything yet, but we need to layout
     // the entire page so that the user sees the entire page (unrendered) instead of just part of it.
-    if (m_loadState == None)
+    // If the load state is Provisional, it is possible that absoluteVisibleOverflowSize() and
+    // contentsSize() are based on the old page and cause inconsistent fixedLayoutSize, so layout the
+    // new page based on the defaultLayoutSize as well.
+    if (m_loadState == None || m_loadState == Provisional)
         return IntSize(defaultLayoutWidth, defaultLayoutHeight);
 
     if (m_viewMode == FixedDesktop) {

Modified: trunk/Source/WebKit/blackberry/ChangeLog (148224 => 148225)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-04-11 19:37:22 UTC (rev 148224)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-04-11 19:56:36 UTC (rev 148225)
@@ -1,3 +1,24 @@
+2013-04-11  Jacky Jiang  <[email protected]>
+
+        [BlackBerry] Initial scale changes depending on the order of page navigations
+        https://bugs.webkit.org/show_bug.cgi?id=114448
+
+        Reviewed by Rob Buis.
+
+        PR: 323941
+        During page transitions, absoluteVisibleOverflowSize() and contentsSize()
+        in fixedLayoutSize() were based on the old page when we just started or
+        committed provisinal load. In that case, fixedLayoutSize() is very old
+        page dependent and can cause inconsistent behaviors. For example, if
+        the old page contents width is 4000, we will get DEFAULT_MAX_LAYOUT_WIDTH 1024
+        as the new page's fixedLayoutSize; however, we will get 768 if we
+        navigate to the new page directly.
+        To fix that, return default layout size if the page doesn't have
+        virtual viewport and m_loadState is Provisional.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
+
 2013-04-11  Arvid Nilsson  <[email protected]>
 
         [BlackBerry] LayerTexture refactoring
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to