[webkit-changes] [WebKit/WebKit] c0bc71: Move iPadMini UA overrides to Quirks.cpp
Karl Dubost
noreply at github.com
Wed Feb 14 09:34:59 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c0bc71135b421a7ed16cd9b2e76c47a4954f806a
https://github.com/WebKit/WebKit/commit/c0bc71135b421a7ed16cd9b2e76c47a4954f806a
Author: Karl Dubost <karlcow at apple.com>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Log Message:
-----------
Move iPadMini UA overrides to Quirks.cpp
https://bugs.webkit.org/show_bug.cgi?id=269335
rdar://122920694
Reviewed by Wenson Hsieh.
Currently the iPad UA override are handled in
Source/WebKit/UIProcess/iOS/WebPageProxyIOS.mm
The Quirks are usually handled in Source/WebCore/page/Quirks.cpp
It creates two separate places for checking the domain names when
there's a website with a need for a specific treatment.
Moving the domain name check in the same place than the rest of the
Quirks will make it easier for people new to code to understand all
the deviation from the normal behavior.
It doesn't change the current behavior. So when a domain name is matching
the userAgent will be set to RecommendDesktopClassBrowsingForRequest::No
which is basically the iPadOS (aka iPad mini) user agent.
Note that this will not solve the needsQuirk check.
It requires a bigger refactor for checking if Quirks are active or not.
It should be a good next step.
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsIpadMiniUserAgent const):
* Source/WebCore/page/Quirks.h:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::desktopClassBrowsingRecommendedForRequest):
Canonical link: https://commits.webkit.org/274631@main
More information about the webkit-changes
mailing list