Changeset 127628 in webkit


Ignore:
Timestamp:
Sep 5, 2012 12:17:30 PM (12 years ago)
Author:
leoyang@rim.com
Message:

[BlackBerry] Rotation and then reload causes less sized webpage (PR 190469)
https://bugs.webkit.org/show_bug.cgi?id=95870

Reviewed by George Staikos.
Reviewed internally by Jacky Jiang.

Use the new zoom to fit scale if the page was zoomed to fit initial scale
When a page is reloaded the layout size may be changed. So the contents
size on which the initial scale depends may be changed. Use the new initial
scale in this case to make sure the page will be zoomed to correct scale.

  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r127600 r127628  
     12012-09-05  Leo Yang  <leoyang@rim.com>
     2
     3        [BlackBerry] Rotation and then reload causes less sized webpage (PR 190469)
     4        https://bugs.webkit.org/show_bug.cgi?id=95870
     5
     6        Reviewed by George Staikos.
     7        Reviewed internally by Jacky Jiang.
     8
     9        Use the new zoom to fit scale if the page was zoomed to fit initial scale
     10        When a page is reloaded the layout size may be changed. So the contents
     11        size on which the initial scale depends may be changed. Use the new initial
     12        scale in this case to make sure the page will be zoomed to correct scale.
     13
     14        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     15        (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
     16
    1172012-09-05  Robin Cao  <robin.cao@torchmobile.com.cn>
    218
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r127489 r127628  
    10771077    m_webPagePrivate->m_maximumScale = viewState.maximumScale;
    10781078    m_webPagePrivate->m_userScalable = viewState.isUserScalable;
     1079
    10791080    // Also, try to keep the users zoom if any.
    10801081    double scale = viewState.scale;
     1082
     1083    // If it was zoomToFitScale use the new zoomToFitScale because
     1084    // the new one may be different to the old one due to contents
     1085    // size change (e.g. after reloaded).
     1086    if (viewState.isZoomToFitScale)
     1087        scale = m_webPagePrivate->zoomToFitScale();
     1088
    10811089    bool shouldReflowBlock = viewState.shouldReflowBlock;
    10821090    if (m_webPagePrivate->m_userPerformedManualZoom) {
Note: See TracChangeset for help on using the changeset viewer.