Skip to content

Commit

Permalink
Cherry-pick c710e9d. rdar://121414876
Browse files Browse the repository at this point in the history
    Add Spotify to the desktop class quirks list
    https://bugs.webkit.org/show_bug.cgi?id=268928
    <rdar://121414876>

    Reviewed by Wenson Hsieh and Chris Dumez.

    It is nearly impossible to use the volume control or playback scrubber
    in Spotify in Safari. They don't expect a desktop with touch support.

    Spotify removed the scrubber features on iOS back in 2016 (https://community.spotify.com/t5/iOS-iPhone-iPad/Audio-scrubber-is-gone-in-latest-update-Why/td-p/1311946

    This patch presents Safari to Spotify as a mobile User Agent so that we
    get the best "touch" version of the website.

    * Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
    (WebKit::desktopClassBrowsingRecommendedForRequest):

    Canonical link: https://commits.webkit.org/274268@main

Identifier: 272448.526@safari-7618-branch
  • Loading branch information
brentfulgham authored and Dan Robson committed Feb 12, 2024
1 parent bd932c1 commit 7cd44bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,10 @@ static RecommendDesktopClassBrowsingForRequest desktopClassBrowsingRecommendedFo
if (equalLettersIgnoringASCIICase(host, "roblox.com"_s) || host.endsWithIgnoringASCIICase(".roblox.com"_s))
return RecommendDesktopClassBrowsingForRequest::No;

// FIXME: Remove this quirk when <rdar://122481999> is complete
if (equalLettersIgnoringASCIICase(host, "spotify.com"_s) || host.endsWithIgnoringASCIICase(".spotify.com"_s) || host.endsWithIgnoringASCIICase(".spotifycdn.com"_s))
return RecommendDesktopClassBrowsingForRequest::No;

return RecommendDesktopClassBrowsingForRequest::Auto;
}

Expand Down

0 comments on commit 7cd44bf

Please sign in to comment.