Changeset 268569 in webkit


Ignore:
Timestamp:
Oct 15, 2020 6:39:03 PM (4 years ago)
Author:
timothy_horton@apple.com
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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r268567 r268569  
     12020-10-15  Tim Horton  <timothy_horton@apple.com>
     2
     3        iPhone apps and iPad apps linked before iOS 13 running on macOS get desktop UA unexpectedly
     4        https://bugs.webkit.org/show_bug.cgi?id=217798
     5        <rdar://problem/70254509>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * UIProcess/ios/WebPageProxyIOS.mm:
     10        (WebKit::desktopClassBrowsingRecommended):
     11        Share more of the code with iOS, for compatibility and consistency's sake:
     12        iOS apps running on macOS should use the mobile UA if they are iPhone-only,
     13        or if they were linked on an SDK earlier than iOS 13. This matches their
     14        behavior on iPad.
     15
    1162020-10-15  Per Arne Vollan  <pvollan@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r268290 r268569  
    14491449    dispatch_once(&onceToken, ^{
    14501450#if PLATFORM(MACCATALYST)
    1451         UNUSED_PARAM(ignoreSafeguards);
    1452         shouldRecommendDesktopClassBrowsing = true;
     1451        shouldRecommendDesktopClassBrowsing = desktopClassBrowsingSupported();
    14531452#else
    14541453        // While desktop-class browsing is supported on all iPad models, it is not recommended for iPad mini.
    14551454        auto screenClass = MGGetSInt32Answer(kMGQMainScreenClass, MGScreenClassPad2);
    14561455        shouldRecommendDesktopClassBrowsing = screenClass != MGScreenClassPad3 && screenClass != MGScreenClassPad4 && desktopClassBrowsingSupported();
     1456#endif
    14571457        if (ignoreSafeguards == IgnoreAppCompatibilitySafeguards::No && !linkedOnOrAfter(WebCore::SDKVersion::FirstWithModernCompabilityModeByDefault)) {
    14581458            // 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
     
    14601460            shouldRecommendDesktopClassBrowsing = false;
    14611461        }
    1462 #endif
    14631462    });
    14641463    return shouldRecommendDesktopClassBrowsing;
Note: See TracChangeset for help on using the changeset viewer.