iOS WebKitLegacy should match WebKit2's viewport behavior
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jul 2015 07:36:19 +0000 (07:36 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jul 2015 07:36:19 +0000 (07:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146540
<rdar://problem/20574017>

Reviewed by Dan Bernstein.

A number of changes have been made to WebKit2's viewport behavior
to make it possible to scale "responsive" sites that misbehave (lay out
in a non-responsive way).

* History/WebHistoryItem.mm:
* History/WebHistoryItemPrivate.h:
Add the plumbing required to implement these new behaviors in WebKit1.

* WebKit.iOS.exp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186223 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ios/ChangeLog
Source/WebKit/ios/WebKit.iOS.exp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/History/WebHistoryItem.mm
Source/WebKit/mac/History/WebHistoryItemPrivate.h

index 73ba39d..f29bee1 100644 (file)
@@ -1,3 +1,13 @@
+2015-07-02  Timothy Horton  <timothy_horton@apple.com>
+
+        iOS WebKitLegacy should match WebKit2's viewport behavior
+        https://bugs.webkit.org/show_bug.cgi?id=146540
+        <rdar://problem/20574017>
+
+        Reviewed by Dan Bernstein.
+
+        * WebKit.iOS.exp:
+
 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
 
         Unreviewed, attempt to fix the iOS build after r185968.
index 8345a45..0844ad7 100644 (file)
@@ -21,6 +21,7 @@ _WebViewportInitialScaleKey
 _WebViewportMaximumScaleKey
 _WebViewportMinimumScaleKey
 _WebViewportUserScalableKey
+_WebViewportShrinkToFitKey
 _WebViewportWidthKey
 
 # So that we can use the MemoryMeasure class in MobileSafari
index d10deea..8cf7175 100644 (file)
@@ -1,3 +1,19 @@
+2015-07-02  Timothy Horton  <timothy_horton@apple.com>
+
+        iOS WebKitLegacy should match WebKit2's viewport behavior
+        https://bugs.webkit.org/show_bug.cgi?id=146540
+        <rdar://problem/20574017>
+
+        Reviewed by Dan Bernstein.
+
+        A number of changes have been made to WebKit2's viewport behavior
+        to make it possible to scale "responsive" sites that misbehave (lay out
+        in a non-responsive way).
+
+        * History/WebHistoryItem.mm:
+        * History/WebHistoryItemPrivate.h:
+        Add the plumbing required to implement these new behaviors in WebKit1.
+
 2015-07-01  Dean Jackson  <dino@apple.com>
 
         Disable the experimental WebGL2 implementation
index 2a4ddc5..d227022 100644 (file)
@@ -62,6 +62,7 @@ NSString *WebViewportInitialScaleKey = @"initial-scale";
 NSString *WebViewportMinimumScaleKey = @"minimum-scale";
 NSString *WebViewportMaximumScaleKey = @"maximum-scale";
 NSString *WebViewportUserScalableKey = @"user-scalable";
+NSString *WebViewportShrinkToFitKey  = @"shrink-to-fit";
 NSString *WebViewportWidthKey        = @"width";
 NSString *WebViewportHeightKey       = @"height";
 
@@ -613,6 +614,7 @@ WebHistoryItem *kit(HistoryItem* item)
     [argumentsDictionary setObject:[NSNumber numberWithFloat:viewportArguments.width] forKey:WebViewportWidthKey];
     [argumentsDictionary setObject:[NSNumber numberWithFloat:viewportArguments.height] forKey:WebViewportHeightKey];
     [argumentsDictionary setObject:[NSNumber numberWithFloat:viewportArguments.userZoom] forKey:WebViewportUserScalableKey];
+    [argumentsDictionary setObject:[NSNumber numberWithFloat:viewportArguments.shrinkToFit] forKey:WebViewportShrinkToFitKey];
     return argumentsDictionary;
 }
 
@@ -625,6 +627,7 @@ WebHistoryItem *kit(HistoryItem* item)
     viewportArguments.width = [[arguments objectForKey:WebViewportWidthKey] floatValue];
     viewportArguments.height = [[arguments objectForKey:WebViewportHeightKey] floatValue];
     viewportArguments.userZoom = [[arguments objectForKey:WebViewportUserScalableKey] floatValue];
+    viewportArguments.shrinkToFit = [[arguments objectForKey:WebViewportShrinkToFitKey] floatValue];
     core(_private)->setViewportArguments(viewportArguments);
 }
 
index eecaca4..be53378 100644 (file)
@@ -33,6 +33,7 @@ extern NSString *WebViewportInitialScaleKey;
 extern NSString *WebViewportMinimumScaleKey;
 extern NSString *WebViewportMaximumScaleKey;
 extern NSString *WebViewportUserScalableKey;
+extern NSString *WebViewportShrinkToFitKey;
 extern NSString *WebViewportWidthKey;
 extern NSString *WebViewportHeightKey;
 #endif