Title: [167615] trunk/Source/WebKit2
- Revision
- 167615
- Author
- [email protected]
- Date
- 2014-04-21 13:14:05 -0700 (Mon, 21 Apr 2014)
Log Message
[iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
https://bugs.webkit.org/show_bug.cgi?id=131884
Patch by Benjamin Poulain <[email protected]> on 2014-04-21
Reviewed by Darin Adler.
<rdar://problem/16667291>
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
Since we were only changing the minimumScale for the transition, the target scale was affected
by max-scale. This was breaking the transition from portrait to landscale.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (167614 => 167615)
--- trunk/Source/WebKit2/ChangeLog 2014-04-21 20:10:12 UTC (rev 167614)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-21 20:14:05 UTC (rev 167615)
@@ -1,5 +1,20 @@
2014-04-21 Benjamin Poulain <[email protected]>
+ [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
+ https://bugs.webkit.org/show_bug.cgi?id=131884
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/16667291>
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _beginAnimatedResizeWithUpdates:]):
+ It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
+ Since we were only changing the minimumScale for the transition, the target scale was affected
+ by max-scale. This was breaking the transition from portrait to landscale.
+
+2014-04-21 Benjamin Poulain <[email protected]>
+
[iOS][WK2] Make dynamic viewport size update content aware
https://bugs.webkit.org/show_bug.cgi?id=131874
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (167614 => 167615)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-04-21 20:10:12 UTC (rev 167614)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-04-21 20:14:05 UTC (rev 167615)
@@ -1337,6 +1337,7 @@
CGSize contentSizeInContentViewCoordinates = [_contentView bounds].size;
[_scrollView setMinimumZoomScale:std::min(newBounds.size.width / contentSizeInContentViewCoordinates.width, [_scrollView minimumZoomScale])];
+ [_scrollView setMaximumZoomScale:std::max(newBounds.size.width / contentSizeInContentViewCoordinates.width, [_scrollView maximumZoomScale])];
// Compute the new scale to keep the current content width in the scrollview.
CGFloat oldWebViewWidthInContentViewCoordinates = oldBounds.size.width / contentZoomScale(self);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes