mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 23:57:31 +09:00
Issue #1905 - Part 4c - Follow Firefox and Safari in reporting "Intel" for Mac ARM64 devices. Based on Mozilla bug 1655285.
This commit is contained in:
parent
7e63a3f440
commit
95f1786bb4
2 changed files with 11 additions and 3 deletions
|
|
@ -1408,9 +1408,8 @@ Navigator::GetPlatform(nsAString& aPlatform, bool aUsePrefOverriddenValue)
|
||||||
aPlatform.AssignLiteral("Win32");
|
aPlatform.AssignLiteral("Win32");
|
||||||
#elif defined(XP_MACOSX) && defined(__ppc__)
|
#elif defined(XP_MACOSX) && defined(__ppc__)
|
||||||
aPlatform.AssignLiteral("MacPPC");
|
aPlatform.AssignLiteral("MacPPC");
|
||||||
#elif defined(XP_MACOSX) && defined(__i386__)
|
#elif defined(XP_MACOSX)
|
||||||
aPlatform.AssignLiteral("MacIntel");
|
// Always return "MacIntel", even on ARM64 macOS like Safari does.
|
||||||
#elif defined(XP_MACOSX) && defined(__x86_64__)
|
|
||||||
aPlatform.AssignLiteral("MacIntel");
|
aPlatform.AssignLiteral("MacIntel");
|
||||||
#else
|
#else
|
||||||
// XXX Communicator uses compiled-in build-time string defines
|
// XXX Communicator uses compiled-in build-time string defines
|
||||||
|
|
|
||||||
|
|
@ -825,6 +825,15 @@ nsHttpHandler::InitUserAgentComponents()
|
||||||
PR_smprintf_free(buf);
|
PR_smprintf_free(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#elif defined (XP_MACOSX)
|
||||||
|
#if defined(__ppc__)
|
||||||
|
mOscpu.AssignLiteral("PPC Mac OS X");
|
||||||
|
#else
|
||||||
|
mOscpu.AssignLiteral("Intel Mac OS X");
|
||||||
|
#endif
|
||||||
|
SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor();
|
||||||
|
SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor();
|
||||||
|
mOscpu += nsPrintfCString(" %d.%d", majorVersion, minorVersion);
|
||||||
#elif defined (XP_UNIX)
|
#elif defined (XP_UNIX)
|
||||||
struct utsname name;
|
struct utsname name;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue