Closed Bug 1655285 Opened 4 years ago Closed 4 years ago

Return an "Intel" User-Agent string on ARM64 macOS

Categories

(Core :: Networking: HTTP, defect, P3)

ARM64
macOS
defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- fixed
firefox78 --- wontfix
firefox79 --- wontfix
firefox80 --- wontfix
firefox81 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Safari returns an "Intel" User-Agent string (and "MacIntel" navigator.platform) on ARM64 macOS (presumably for web compat) and on iPadOS (so sites serve desktop page layouts). We should follow Safari's lead for Firefox on ARM64 macOS.

Safari User-Agent string on ARM64 macOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15

Safari User-Agent string on iPadOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15

Dragana, Stephen, and gcp:

  1. Which Bugzilla component do you think this bug belongs in: "Networking: HTTP", "Widget: Cocoa", or something like "DOM: Core & HTML"?
  2. Who is an appropriate code reviewer for these User-Agent string changes for macOS Big Sur and ARM64?
Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(gpascutto)
Flags: needinfo?(dd.mozilla)

Safari returns an "Intel" User-Agent string (and "MacIntel" navigator.platform) on ARM64 macOS (presumably for web compat) and on iPadOS (so sites serve desktop page layouts). We should follow Safari's lead for Firefox on ARM64 macOS.

Note that I do not have an Apple Silicon DTK so I have not personally tested this change on ARM64 macOS. Based on visual inspection of our User-Agent string code, I expect Firefox's current User-Agent string on ARM64 macOS is "Mozilla/5.0 (Macintosh; Mac OS X 10.16; rv:80.0) Gecko/20100101 Firefox/80.0" (and navigator.oscpu is " Mac OS X 10.16"). Note the missing "Intel" and extra space before "Mac OS X".

Example webcompat breakage even in mozilla-central: the Octane JS benchmark assumes Firefox's macOS navigator.platform will never return any values other than "MacIntel" or "MacPPC":

https://searchfox.org/mozilla-central/rev/dcd9c2d2bc19d96d487825eb70c2333a4d60994e/js/src/octane/gbemu-part1.js#659-669

Depends on D84911

Safari returns version "10_16" on macOS Big Sur, not "11_0", presumably for web compat. We should follow Safari's lead for Firefox on Big Sur.

Note that I do not have macOS Big Sur installed so I have not personally tested whether nsCocoaFeatures::macOSVersionMajor() and macOSVersionMinor() return "10.16" or "11.0"!

Depends on D84912

I think most UA discussions involve the DOM team, maybe hsivonen? Or if not them, they can probably forward to the right person.

Flags: needinfo?(gpascutto) → needinfo?(hsivonen)
Flags: needinfo?(spohl.mozilla.bugs)

Henri is away. Olli, can you please comment first? Thank you.

Flags: needinfo?(hsivonen) → needinfo?(bugs)

Commented on phab

Flags: needinfo?(bugs)
Flags: needinfo?(dd.mozilla)
Attachment #9166090 - Attachment is obsolete: true
Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/736689ad9285
Part 1: Remove dead code for Mac PPC User-Agent string. r=necko-reviewers,smaug,dragana
https://hg.mozilla.org/integration/autoland/rev/b9e60a11e10a
Part 2: Return an "Intel" User-Agent string on ARM64 macOS. r=smaug
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

(In reply to Gian-Carlo Pascutto [:gcp] from comment #5)

I think most UA discussions involve the DOM team, maybe hsivonen?

Looks good to me. Thanks.

There's a request to uplift this change to ESR 78 in bug 1679929

See Also: → 1871595
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: