Title: [187286] trunk/Source/WebKit2
- Revision
- 187286
- Author
- [email protected]
- Date
- 2015-07-23 21:16:02 -0700 (Thu, 23 Jul 2015)
Log Message
[iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.
https://bugs.webkit.org/show_bug.cgi?id=147251
rdar://problem/21953359
Calling zoomToRect() should result in essentially the same zoom scale as if we
called setZoomScale with the new page scale factor.
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (187285 => 187286)
--- trunk/Source/WebKit2/ChangeLog 2015-07-24 02:48:32 UTC (rev 187285)
+++ trunk/Source/WebKit2/ChangeLog 2015-07-24 04:16:02 UTC (rev 187286)
@@ -1,3 +1,17 @@
+2015-07-23 Zalan Bujtas <[email protected]>
+
+ [iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.
+ https://bugs.webkit.org/show_bug.cgi?id=147251
+ rdar://problem/21953359
+
+ Calling zoomToRect() should result in essentially the same zoom scale as if we
+ called setZoomScale with the new page scale factor.
+
+ Reviewed by Benjamin Poulain.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _didCommitLayerTree:]):
+
2015-07-23 Matthew Daiter <[email protected]>
Linking WebKit2 to be able to grab media sources from a UID
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (187285 => 187286)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-07-24 02:48:32 UTC (rev 187285)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-07-24 04:16:02 UTC (rev 187286)
@@ -967,10 +967,11 @@
WebCore::FloatRect oldUnobscuredContentRect = _page->unobscuredContentRect();
if (!oldUnobscuredContentRect.isEmpty() && oldUnobscuredContentRect.y() < 1) {
CGFloat relativeHorizontalPosition = oldUnobscuredContentRect.x() / oldUnobscuredContentRect.width();
- CGPoint newTopLeft = [self _adjustedContentOffset: { relativeHorizontalPosition * newContentSize.width, 0 }];
+ CGPoint newTopLeft = { relativeHorizontalPosition * newContentSize.width, 0 };
CGSize scrollViewSize = [_scrollView bounds].size;
- CGSize rectToZoomSize = CGSizeMake(scrollViewSize.width * newPageScaleFactor, scrollViewSize.height * newPageScaleFactor);
+ CGSize rectToZoomSize = CGSizeMake(scrollViewSize.width / newPageScaleFactor, scrollViewSize.height / newPageScaleFactor);
[_scrollView zoomToRect: { newTopLeft, rectToZoomSize } animated:NO];
+ ASSERT(areEssentiallyEqualAsFloat(newPageScaleFactor, contentZoomScale(self)));
} else
[_scrollView setZoomScale:newPageScaleFactor];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes