Title: [268569] trunk/Source/WebKit
Revision
268569
Author
[email protected]
Date
2020-10-15 18:39:03 -0700 (Thu, 15 Oct 2020)

Log Message

iPhone apps and iPad apps linked before iOS 13 running on macOS get desktop UA unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=217798
<rdar://problem/70254509>

Reviewed by Wenson Hsieh.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::desktopClassBrowsingRecommended):
Share more of the code with iOS, for compatibility and consistency's sake:
iOS apps running on macOS should use the mobile UA if they are iPhone-only,
or if they were linked on an SDK earlier than iOS 13. This matches their
behavior on iPad.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (268568 => 268569)


--- trunk/Source/WebKit/ChangeLog	2020-10-16 01:28:44 UTC (rev 268568)
+++ trunk/Source/WebKit/ChangeLog	2020-10-16 01:39:03 UTC (rev 268569)
@@ -1,3 +1,18 @@
+2020-10-15  Tim Horton  <[email protected]>
+
+        iPhone apps and iPad apps linked before iOS 13 running on macOS get desktop UA unexpectedly
+        https://bugs.webkit.org/show_bug.cgi?id=217798
+        <rdar://problem/70254509>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::desktopClassBrowsingRecommended):
+        Share more of the code with iOS, for compatibility and consistency's sake:
+        iOS apps running on macOS should use the mobile UA if they are iPhone-only,
+        or if they were linked on an SDK earlier than iOS 13. This matches their
+        behavior on iPad.
+
 2020-10-15  Per Arne Vollan  <[email protected]>
 
         [macOS] Issue temporary sandbox extension to the Launch Services daemon

Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (268568 => 268569)


--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-10-16 01:28:44 UTC (rev 268568)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-10-16 01:39:03 UTC (rev 268569)
@@ -1448,18 +1448,17 @@
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
 #if PLATFORM(MACCATALYST)
-        UNUSED_PARAM(ignoreSafeguards);
-        shouldRecommendDesktopClassBrowsing = true;
+        shouldRecommendDesktopClassBrowsing = desktopClassBrowsingSupported();
 #else
         // While desktop-class browsing is supported on all iPad models, it is not recommended for iPad mini.
         auto screenClass = MGGetSInt32Answer(kMGQMainScreenClass, MGScreenClassPad2);
         shouldRecommendDesktopClassBrowsing = screenClass != MGScreenClassPad3 && screenClass != MGScreenClassPad4 && desktopClassBrowsingSupported();
+#endif
         if (ignoreSafeguards == IgnoreAppCompatibilitySafeguards::No && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithModernCompabilityModeByDefault)) {
             // Opt out apps that haven't yet built against the iOS 13 SDK to limit any incompatibilities as a result of enabling desktop-class browsing by default in
             // WKWebView on appropriately-sized iPad models.
             shouldRecommendDesktopClassBrowsing = false;
         }
-#endif
     });
     return shouldRecommendDesktopClassBrowsing;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to