Bug 269211
Summary: | Scope the UA override to www.apple.com/apple-events | ||
---|---|---|---|
Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bugs-noreply, mcatanzaro, olivier.blin |
Priority: | P2 | ||
Version: | Safari 17 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://www.apple.com/apple-events/ | ||
Bug Depends on: | 257799 | ||
Bug Blocks: |
Karl Dubost
In Bug 257799 A UA override has been created so users on Epiphany could see the videos on https://www.apple.com/apple-events/.
The UA override to be chrome, targets "apple.com"
This is very broad and it is spilling for other sub domains with unfortunate consequences.
There is an issue opened on rdar://122813652
to encourage https://www.apple.com/apple-events/ to detect properly with canPlay(), Epiphany browsers. This is not resolved yet.
But in the meantime, Michael, would it be possible to scope the UA override to just apple.com/apple-events/ or even wichever JS URL which is currently doing the player selection.
Maybe? https://www.apple.com/v/apple-events/home/ac/built/assets/ac-video/4.8.1-0/ac-video.built.js
To double check.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Olivier Blin
I reported this on rdar://122408473 since this prevented our custom user-agent from being applied on Apple TV+, so I will take a look at this.
My initial idea would be to restrict the quirk to www.apple.com.
https://apple.com/apple-events/ redirects to https://www.apple.com/apple-events/ , so the quirk will apply to both.
This way, tv.apple.com (and its custom subdomains) would not have the quirk enabled.
This is ok after testing both the corporate apple.com website and Apple TV+.
Michael, Karl: do you agree with this?
If so, I'll prepare the PR.
Michael Catanzaro
Sure. Go ahead and do whatever makes things work. That's the point of quirks, after all.
Karl Dubost
https://searchfox.org/wubkat/rev/18019ceed4fbceaa9fcc23b2f36758831b23a155/Source/WebCore/platform/glib/UserAgentQuirks.cpp#167
String domain = url.host().toString();
Note that you could in addition target /apple-events/ by trying to match it in the url.
I wonder if there are other areas breaking because of the current UA override. Not sure.
Olivier Blin
Pull request: https://github.com/WebKit/WebKit/pull/24329
EWS
Committed 274711@main (2d4541ef3929): <https://commits.webkit.org/274711@main>
Reviewed commits have been landed. Closing PR #24329 and removing active labels.