Changeset 187286 in webkit
- Timestamp:
- Jul 23, 2015, 9:16:02 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebView.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r187282 r187286 1 2015-07-23 Zalan Bujtas <zalan@apple.com> 2 3 [iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner. 4 https://bugs.webkit.org/show_bug.cgi?id=147251 5 rdar://problem/21953359 6 7 Calling zoomToRect() should result in essentially the same zoom scale as if we 8 called setZoomScale with the new page scale factor. 9 10 Reviewed by Benjamin Poulain. 11 12 * UIProcess/API/Cocoa/WKWebView.mm: 13 (-[WKWebView _didCommitLayerTree:]): 14 1 15 2015-07-23 Matthew Daiter <mdaiter@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r187272 r187286 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.