Changeset 148225 in webkit


Ignore:
Timestamp:
Apr 11, 2013 12:56:36 PM (11 years ago)
Author:
zhajiang@rim.com
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 <zhajiang@rim.com>.
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):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r148119 r148225  
    23212321    // If the load state is none then we haven't actually got anything yet, but we need to layout
    23222322    // the entire page so that the user sees the entire page (unrendered) instead of just part of it.
    2323     if (m_loadState == None)
     2323    // If the load state is Provisional, it is possible that absoluteVisibleOverflowSize() and
     2324    // contentsSize() are based on the old page and cause inconsistent fixedLayoutSize, so layout the
     2325    // new page based on the defaultLayoutSize as well.
     2326    if (m_loadState == None || m_loadState == Provisional)
    23242327        return IntSize(defaultLayoutWidth, defaultLayoutHeight);
    23252328
  • trunk/Source/WebKit/blackberry/ChangeLog

    r148192 r148225  
     12013-04-11  Jacky Jiang  <zhajiang@rim.com>
     2
     3        [BlackBerry] Initial scale changes depending on the order of page navigations
     4        https://bugs.webkit.org/show_bug.cgi?id=114448
     5
     6        Reviewed by Rob Buis.
     7
     8        PR: 323941
     9        During page transitions, absoluteVisibleOverflowSize() and contentsSize()
     10        in fixedLayoutSize() were based on the old page when we just started or
     11        committed provisinal load. In that case, fixedLayoutSize() is very old
     12        page dependent and can cause inconsistent behaviors. For example, if
     13        the old page contents width is 4000, we will get DEFAULT_MAX_LAYOUT_WIDTH 1024
     14        as the new page's fixedLayoutSize; however, we will get 768 if we
     15        navigate to the new page directly.
     16        To fix that, return default layout size if the page doesn't have
     17        virtual viewport and m_loadState is Provisional.
     18
     19        * Api/WebPage.cpp:
     20        (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
     21
    1222013-04-11  Arvid Nilsson  <anilsson@rim.com>
    223
Note: See TracChangeset for help on using the changeset viewer.