Skip to content
  • zhajiang@rim.com's avatar
    [BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom · 6d4fb363
    zhajiang@rim.com authored
    https://bugs.webkit.org/show_bug.cgi?id=91247
    
    Reviewed by Antonio Gomes.
    Patch by Jacky Jiang <zhajiang@rim.com>
    
    PR: 175432
    On yahoo.com, the web page stopped zooming while trying to pinch as
    WebPageClient::resetBitmapZoomScale(double) was being called by
    WebPagePrivate::zoomToInitialScaleOnLoad() after load finished.
    And also yahoo.com was keeping updating layout, which made it really
    bad that zoomToInitialScaleOnLoad() was called many times when load
    finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame.
    As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout()
    happens after load finished, we can move the code to that method and
    set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad()
    instead. In this way, we can ensure that the flag is only enabled when
    dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished
    and get rid of calling zoomToInitialScaleOnLoad() lots of times when
    keeping updating layout in such kind of situation.
    
    Internally reviewed by Arvid Nilsson
    
    * Api/WebPage.cpp:
    (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
    (BlackBerry::WebKit::WebPagePrivate::setLoadState):
    (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
    * Api/WebPage_p.h:
    (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
    (BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished):
    (WebPagePrivate):
    * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
    (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6d4fb363