Title: [187330] branches/safari-601.1-branch/Source/WebKit2
Revision
187330
Author
[email protected]
Date
2015-07-24 00:54:58 -0700 (Fri, 24 Jul 2015)

Log Message

Merge r187286. rdar://problem/21953359

Modified Paths

Diff

Modified: branches/safari-601.1-branch/Source/WebKit2/ChangeLog (187329 => 187330)


--- branches/safari-601.1-branch/Source/WebKit2/ChangeLog	2015-07-24 07:54:56 UTC (rev 187329)
+++ branches/safari-601.1-branch/Source/WebKit2/ChangeLog	2015-07-24 07:54:58 UTC (rev 187330)
@@ -1,5 +1,23 @@
 2015-07-24  Matthew Hanson  <[email protected]>
 
+        Merge r187286. rdar://problem/21953359
+
+    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-24  Matthew Hanson  <[email protected]>
+
         Merge r187267. rdar://problem/21664211
 
     2015-07-23  Enrica Casucci  <[email protected]>

Modified: branches/safari-601.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (187329 => 187330)


--- branches/safari-601.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-07-24 07:54:56 UTC (rev 187329)
+++ branches/safari-601.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2015-07-24 07:54:58 UTC (rev 187330)
@@ -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

Reply via email to