Skip to content

Commit

Permalink
Cherry-pick e8c7841. rdar://121813084
Browse files Browse the repository at this point in the history
    [iOS] Remove User-Agent quirk for facebook.com
    https://bugs.webkit.org/show_bug.cgi?id=268841
    rdar://121813084

    Reviewed by Tim Horton.

    The User-Agent quirk for facebook.com is no longer necessary and can be removed.

    * Source/WebCore/page/Quirks.cpp:
    (WebCore::Quirks::shouldAvoidUsingIOS17UserAgentForFacebook const): Deleted.
    * Source/WebCore/page/Quirks.h:
    * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
    (WebKit::WebPage::platformUserAgent const):

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

Identifier: 272448.603@safari-7618-branch
  • Loading branch information
aestes authored and MyahCobbs committed Feb 23, 2024
1 parent 660f02f commit 7f9e099
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
14 changes: 0 additions & 14 deletions Source/WebCore/page/Quirks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,20 +379,6 @@ bool Quirks::shouldAvoidUsingIOS13ForGmail() const
#endif
}

bool Quirks::shouldAvoidUsingIOS17UserAgentForFacebook() const
{
#if PLATFORM(IOS_FAMILY)
if (!needsQuirks())
return false;

if (!m_shouldAvoidUsingIOS17UserAgentForFacebook)
m_shouldAvoidUsingIOS17UserAgentForFacebook = isDomain("facebook.com"_s);
return m_shouldAvoidUsingIOS17UserAgentForFacebook.value();
#else
return false;
#endif
}

void Quirks::updateStorageAccessUserAgentStringQuirks(HashMap<RegistrableDomain, String>&& userAgentStringQuirks)
{
auto& quirks = updatableStorageAccessUserAgentStringQuirks();
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/page/Quirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class Quirks {
WEBCORE_EXPORT bool needsYouTubeMouseOutQuirk() const;

WEBCORE_EXPORT bool shouldAvoidUsingIOS13ForGmail() const;
WEBCORE_EXPORT bool shouldAvoidUsingIOS17UserAgentForFacebook() const;

WEBCORE_EXPORT static void updateStorageAccessUserAgentStringQuirks(HashMap<RegistrableDomain, String>&&);
WEBCORE_EXPORT String storageAccessUserAgentStringQuirkForDomain(const URL&);
Expand Down Expand Up @@ -251,7 +250,6 @@ class Quirks {
mutable std::optional<bool> m_shouldStarBeFeaturePolicyDefaultValueQuirk;
mutable std::optional<bool> m_shouldDisableDataURLPaddingValidation;
mutable std::optional<bool> m_needsDisableDOMPasteAccessQuirk;
mutable std::optional<bool> m_shouldAvoidUsingIOS17UserAgentForFacebook;
mutable std::optional<bool> m_shouldDisableElementFullscreen;

Vector<RegistrableDomain> m_subFrameDomainsForStorageAccessQuirk;
Expand Down
3 changes: 0 additions & 3 deletions Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -4657,9 +4657,6 @@ static bool selectionIsInsideFixedPositionContainer(LocalFrame& frame)
if (osNameForUserAgent() == "iPhone OS"_s) {
if (document->quirks().shouldAvoidUsingIOS13ForGmail())
return standardUserAgentWithApplicationName({ }, "12_1_3"_s);

if (document->quirks().shouldAvoidUsingIOS17UserAgentForFacebook())
return standardUserAgentWithApplicationName({ }, "16_6_1"_s);
}
return String();
}
Expand Down

0 comments on commit 7f9e099

Please sign in to comment.