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

Changeset 187330 in webkit


Ignore:
Timestamp:
Jul 24, 2015, 12:54:58 AM (11 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r187286. rdar://problem/21953359

Location:
branches/safari-601.1-branch/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-601.1-branch/Source/WebKit2/ChangeLog

    r187327 r187330  
     12015-07-24  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r187286. rdar://problem/21953359
     4
     5    2015-07-23  Zalan Bujtas  <zalan@apple.com>
     6
     7            [iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.
     8            https://bugs.webkit.org/show_bug.cgi?id=147251
     9            rdar://problem/21953359
     10
     11            Calling zoomToRect() should result in essentially the same zoom scale as if we
     12            called setZoomScale with the new page scale factor.
     13
     14            Reviewed by Benjamin Poulain.
     15
     16            * UIProcess/API/Cocoa/WKWebView.mm:
     17            (-[WKWebView _didCommitLayerTree:]):
     18
    1192015-07-24  Matthew Hanson  <matthew_hanson@apple.com>
    220
  • branches/safari-601.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r187320 r187330  
    968968            if (!oldUnobscuredContentRect.isEmpty() && oldUnobscuredContentRect.y() < 1) {
    969969                CGFloat relativeHorizontalPosition = oldUnobscuredContentRect.x() / oldUnobscuredContentRect.width();
    970                 CGPoint newTopLeft = [self _adjustedContentOffset: { relativeHorizontalPosition * newContentSize.width, 0 }];
     970                CGPoint newTopLeft = { relativeHorizontalPosition * newContentSize.width, 0 };
    971971                CGSize scrollViewSize = [_scrollView bounds].size;
    972                 CGSize rectToZoomSize = CGSizeMake(scrollViewSize.width * newPageScaleFactor, scrollViewSize.height * newPageScaleFactor);
     972                CGSize rectToZoomSize = CGSizeMake(scrollViewSize.width / newPageScaleFactor, scrollViewSize.height / newPageScaleFactor);
    973973                [_scrollView zoomToRect: { newTopLeft, rectToZoomSize } animated:NO];
     974                ASSERT(areEssentiallyEqualAsFloat(newPageScaleFactor, contentZoomScale(self)));
    974975            } else
    975976                [_scrollView setZoomScale:newPageScaleFactor];
Note: See TracChangeset for help on using the changeset viewer.