Skip to content

Commit

Permalink
[iOS] Remove User-Agent quirk for facebook.com
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aestes committed Feb 7, 2024
1 parent e3b31c2 commit e8c7841
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 @@ -378,20 +378,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 @@ -4638,9 +4638,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 e8c7841

Please sign in to comment.