Changeset 187330 in webkit
- Timestamp:
- Jul 24, 2015, 12:54:58 AM (11 years ago)
- Location:
- branches/safari-601.1-branch/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebView.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-601.1-branch/Source/WebKit2/ChangeLog
r187327 r187330 1 2015-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 1 19 2015-07-24 Matthew Hanson <matthew_hanson@apple.com> 2 20 -
branches/safari-601.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r187320 r187330 968 968 if (!oldUnobscuredContentRect.isEmpty() && oldUnobscuredContentRect.y() < 1) { 969 969 CGFloat relativeHorizontalPosition = oldUnobscuredContentRect.x() / oldUnobscuredContentRect.width(); 970 CGPoint newTopLeft = [self _adjustedContentOffset: { relativeHorizontalPosition * newContentSize.width, 0 }];970 CGPoint newTopLeft = { relativeHorizontalPosition * newContentSize.width, 0 }; 971 971 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); 973 973 [_scrollView zoomToRect: { newTopLeft, rectToZoomSize } animated:NO]; 974 ASSERT(areEssentiallyEqualAsFloat(newPageScaleFactor, contentZoomScale(self))); 974 975 } else 975 976 [_scrollView setZoomScale:newPageScaleFactor];
Note:
See TracChangeset
for help on using the changeset viewer.