Changeset 106395 in webkit


Ignore:
Timestamp:
Jan 31, 2012 2:42:26 PM (12 years ago)
Author:
fsamuel@chromium.org
Message:

[Chromium] ChromeClientImpl::dispatchViewportPropertiesDidChange is repeatedly called in Google News
https://bugs.webkit.org/show_bug.cgi?id=77429

Reviewed by Darin Fisher.

m_webView->isPageScaleFactorSet() is tested in ChromeClientImpl::layoutUpdated, and it is never true,
because WebViewImpl::setPageScaleFactorPreservingScrollOffset is called repeatedly and exits early
and thus never calls WebViewImpl::setPageScaleFactor which sets the flag.

The simplest solution is to simply get rid of the early return in
WebViewImpl::setPageScaleFactorPreservingScrollOffset.

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::setPageScaleFactorPreservingScrollOffset):

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

Legend:

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

    r106394 r106395  
     12012-01-31  Fady Samuel  <fsamuel@chromium.org>
     2
     3        [Chromium] ChromeClientImpl::dispatchViewportPropertiesDidChange is repeatedly called in Google News
     4        https://bugs.webkit.org/show_bug.cgi?id=77429
     5
     6        Reviewed by Darin Fisher.
     7
     8        m_webView->isPageScaleFactorSet() is tested in ChromeClientImpl::layoutUpdated, and it is never true,
     9        because WebViewImpl::setPageScaleFactorPreservingScrollOffset is called repeatedly and exits early
     10        and thus never calls WebViewImpl::setPageScaleFactor which sets the flag.
     11       
     12        The simplest solution is to simply get rid of the early return in
     13        WebViewImpl::setPageScaleFactorPreservingScrollOffset.
     14
     15        * src/WebViewImpl.cpp:
     16        (WebKit::WebViewImpl::setPageScaleFactorPreservingScrollOffset):
     17
    1182012-01-31  Fady Samuel  <fsamuel@chromium.org>
    219
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r106160 r106395  
    20312031    // Pick a scale factor that is within the expected limits
    20322032    scaleFactor = clampPageScaleFactorToLimits(scaleFactor);
    2033     if (scaleFactor == pageScaleFactor())
    2034         return;
    20352033
    20362034    IntPoint scrollOffsetAtNewScale(mainFrame()->scrollOffset().width, mainFrame()->scrollOffset().height);
Note: See TracChangeset for help on using the changeset viewer.