Changeset 248501 in webkit
- Timestamp:
- Aug 10, 2019 3:25:48 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248500 r248501 1 2019-08-10 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 [iOS] Add a quirk for gmail.com messages on iPhone iOS13 4 https://bugs.webkit.org/show_bug.cgi?id=200605 5 6 Reviewed by Maciej Stachowiak. 7 8 Add a quirk which sets the user agent for gmail.com messages on iPhone 9 OS 13 to be iPhone OS 12. This is a workaround for a gmail.com bug till 10 it is fixed. 11 12 * page/Quirks.cpp: 13 (WebCore::Quirks::shouldAvoidUsingIOS13ForGmail const): 14 * page/Quirks.h: 15 * platform/UserAgent.h: 16 * platform/ios/UserAgentIOS.mm: 17 (WebCore::osNameForUserAgent): 18 (WebCore::standardUserAgentWithApplicationName): 19 * platform/mac/UserAgentMac.mm: 20 (WebCore::standardUserAgentWithApplicationName): 21 1 22 2019-08-10 Thibault Saunier <tsaunier@igalia.com> 2 23 -
trunk/Source/WebCore/page/Quirks.cpp
r248499 r248501 37 37 #include "RuntimeEnabledFeatures.h" 38 38 #include "Settings.h" 39 #include "UserAgent.h" 39 40 40 41 namespace WebCore { … … 227 228 228 229 return equalLettersIgnoringASCIICase(m_document->url().host(), "www.youtube.com"); 230 #else 231 return false; 232 #endif 233 } 234 235 bool Quirks::shouldAvoidUsingIOS13ForGmail() const 236 { 237 #if PLATFORM(IOS_FAMILY) 238 if (!needsQuirks()) 239 return false; 240 241 auto& url = m_document->topDocument().url(); 242 return equalLettersIgnoringASCIICase(url.host(), "mail.google.com"); 229 243 #else 230 244 return false; -
trunk/Source/WebCore/page/Quirks.h
r248499 r248501 71 71 72 72 WEBCORE_EXPORT bool needsYouTubeMouseOutQuirk() const; 73 74 WEBCORE_EXPORT bool shouldAvoidUsingIOS13ForGmail() const; 73 75 74 76 bool needsGMailOverflowScrollQuirk() const; -
trunk/Source/WebCore/platform/UserAgent.h
r243525 r248501 33 33 #if PLATFORM(COCOA) 34 34 enum class UserAgentType { Default, Desktop }; 35 WEBCORE_EXPORT String standardUserAgentWithApplicationName(const String& applicationName, UserAgentType = UserAgentType::Default);35 WEBCORE_EXPORT String standardUserAgentWithApplicationName(const String& applicationName, const String& userAgentOSVersion = emptyString(), UserAgentType = UserAgentType::Default); 36 36 37 String systemMarketingVersionForUserAgentString(); 37 WEBCORE_EXPORT String osNameForUserAgent(); 38 WEBCORE_EXPORT String systemMarketingVersionForUserAgentString(); 38 39 #else 39 40 -
trunk/Source/WebCore/platform/ios/UserAgentIOS.mm
r245472 r248501 53 53 } 54 54 55 static inlineString osNameForUserAgent()55 String osNameForUserAgent() 56 56 { 57 57 if (deviceHasIPadCapability() && !isClassicPhone()) … … 80 80 } 81 81 82 String standardUserAgentWithApplicationName(const String& applicationName, UserAgentType type)82 String standardUserAgentWithApplicationName(const String& applicationName, const String& userAgentOSVersion, UserAgentType type) 83 83 { 84 84 if (type == UserAgentType::Desktop) { … … 96 96 } 97 97 98 String osVersion = systemMarketingVersionForUserAgentString();98 String osVersion = userAgentOSVersion.isEmpty() ? systemMarketingVersionForUserAgentString() : userAgentOSVersion; 99 99 String appNameSuffix = applicationName.isEmpty() ? "" : makeString(" ", applicationName); 100 100 -
trunk/Source/WebCore/platform/mac/UserAgentMac.mm
r243525 r248501 33 33 namespace WebCore { 34 34 35 String standardUserAgentWithApplicationName(const String& applicationName, UserAgentType)35 String standardUserAgentWithApplicationName(const String& applicationName, const String&, UserAgentType) 36 36 { 37 37 String osVersion = systemMarketingVersionForUserAgentString(); -
trunk/Source/WebKit/ChangeLog
r248498 r248501 1 2019-08-10 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 [iOS] Add a quirk for gmail.com messages on iPhone iOS13 4 https://bugs.webkit.org/show_bug.cgi?id=200605 5 6 Reviewed by Maciej Stachowiak. 7 8 Use WebPage::platformUserAgent() to add the gmail.com quirk. 9 10 * UIProcess/ios/WebPageProxyIOS.mm: 11 (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies): 12 * WebProcess/WebPage/ios/WebPageIOS.mm: 13 (WebKit::WebPage::platformUserAgent const): 14 1 15 2019-08-10 Tim Horton <timothy_horton@apple.com> 2 16 -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r248338 r248501 1428 1428 if (applicationName.isEmpty()) 1429 1429 applicationName = applicationNameForDesktopUserAgent(); 1430 policies.setCustomUserAgent(standardUserAgentWithApplicationName(applicationName, UserAgentType::Desktop));1430 policies.setCustomUserAgent(standardUserAgentWithApplicationName(applicationName, emptyString(), UserAgentType::Desktop)); 1431 1431 } 1432 1432 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r248447 r248501 124 124 #import <WebCore/TextIndicator.h> 125 125 #import <WebCore/TextIterator.h> 126 #import <WebCore/UserAgent.h> 126 127 #import <WebCore/VisibleUnits.h> 127 128 #import <WebCore/WebEvent.h> … … 3783 3784 String WebPage::platformUserAgent(const URL&) const 3784 3785 { 3786 if (!m_page->settings().needsSiteSpecificQuirks()) 3787 return String(); 3788 3789 auto document = m_mainFrame->coreFrame()->document(); 3790 if (!document) 3791 return String(); 3792 3793 if (document->quirks().shouldAvoidUsingIOS13ForGmail() && osNameForUserAgent() == "iPhone OS" && systemMarketingVersionForUserAgentString() == "13_1") 3794 return standardUserAgentWithApplicationName({ }, "12_1_3"); 3795 3785 3796 return String(); 3786 3797 }
Note: See TracChangeset
for help on using the changeset viewer.