⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 124288 in webkit


Ignore:
Timestamp:
Jul 31, 2012, 7:55:55 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

[chromium]Upstream WebViewImpl:StartPageScaleAnimation changes for Chrome for Android
https://bugs.webkit.org/show_bug.cgi?id=92698

Patch by Yusuf Ozuysal <yusufo@google.com> on 2012-07-31
Reviewed by Adam Barth.

Enforce the maximum and minimum scroll positions after the scale has changed.

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::startPageScaleAnimation):

  • src/WebViewImpl.h:

(WebViewImpl):

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

Legend:

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

    r124283 r124288  
     12012-07-31  Yusuf Ozuysal  <yusufo@google.com>
     2
     3        [chromium]Upstream WebViewImpl:StartPageScaleAnimation changes for Chrome for Android
     4        https://bugs.webkit.org/show_bug.cgi?id=92698
     5
     6        Reviewed by Adam Barth.
     7
     8        Enforce the maximum and minimum scroll positions after the scale has changed.
     9
     10        * src/WebViewImpl.cpp:
     11        (WebKit::WebViewImpl::startPageScaleAnimation):
     12        * src/WebViewImpl.h:
     13        (WebViewImpl):
     14
    1152012-07-31  Terry Anderson  <tdanderson@chromium.org>
    216
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r124252 r124288  
    779779}
    780780
    781 void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor, float newScale, double durationInSeconds)
    782 {
    783     if (!m_layerTreeView.isNull())
    784         m_layerTreeView.startPageScaleAnimation(scroll, useAnchor, newScale, durationInSeconds);
     781void WebViewImpl::startPageScaleAnimation(const IntPoint& targetPosition, bool useAnchor, float newScale, double durationInSeconds)
     782{
     783    if (m_layerTreeView.isNull())
     784        return;
     785
     786    IntPoint clampedPoint = targetPosition;
     787    if (!useAnchor)
     788        clampedPoint = clampOffsetAtScale(targetPosition, newScale);
     789
     790    if (!durationInSeconds && !useAnchor) {
     791        setPageScaleFactor(newScale, clampedPoint);
     792        return;
     793    }
     794
     795    m_layerTreeView.startPageScaleAnimation(targetPosition, useAnchor, newScale, durationInSeconds);
    785796}
    786797#endif
Note: See TracChangeset for help on using the changeset viewer.