mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Backed out changeset 72c3990fdf3a (bug 1902570) for causing mass failures @ ClearOnShutdown.h. CLOSED TREE
This commit is contained in:
parent
55bcf96f0a
commit
d14f8c92c5
@ -293,7 +293,3 @@ static const char* kBaseFonts[] = {
|
||||
"Zapf Dingbats",
|
||||
"Zapfino",
|
||||
};
|
||||
|
||||
static const char* kBaseFonts_13_Higher[] = {
|
||||
"Stix Two Math",
|
||||
};
|
||||
|
@ -3,7 +3,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
#include <algorithm>
|
||||
@ -153,7 +152,6 @@ void gfxSingleFaceMacFontFamily::ReadOtherFamilyNames(
|
||||
|
||||
gfxMacPlatformFontList::gfxMacPlatformFontList() : CoreTextFontList() {
|
||||
CheckFamilyList(kBaseFonts);
|
||||
CheckFamilyList(kBaseFonts_13_Higher);
|
||||
|
||||
// cache this in a static variable so that gfxMacFontFamily objects
|
||||
// don't have to repeatedly look it up
|
||||
@ -164,19 +162,6 @@ gfxMacPlatformFontList::gfxMacPlatformFontList() : CoreTextFontList() {
|
||||
gfxFontUtils::GetPrefsFontList("font.single-face-list", mSingleFaceFonts);
|
||||
}
|
||||
|
||||
using Device = nsIGfxInfo::FontVisibilityDeviceDetermination;
|
||||
Device GetFontVisibilityDevice() {
|
||||
static Device fontVisibilityDevice = Device::Unassigned;
|
||||
if (fontVisibilityDevice == Device::Unassigned) {
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
||||
NS_ENSURE_SUCCESS(
|
||||
gfxInfo->GetFontVisibilityDetermination(&fontVisibilityDevice),
|
||||
Device::MacOS_Unknown);
|
||||
}
|
||||
|
||||
return fontVisibilityDevice;
|
||||
}
|
||||
|
||||
FontVisibility gfxMacPlatformFontList::GetVisibilityForFamily(
|
||||
const nsACString& aName) const {
|
||||
if (aName[0] == '.' || aName.LowerCaseEqualsLiteral("lastresort")) {
|
||||
@ -185,10 +170,6 @@ FontVisibility gfxMacPlatformFontList::GetVisibilityForFamily(
|
||||
if (FamilyInList(aName, kBaseFonts)) {
|
||||
return FontVisibility::Base;
|
||||
}
|
||||
if (GetFontVisibilityDevice() == Device::MacOS_13_plus &&
|
||||
FamilyInList(aName, kBaseFonts_13_Higher)) {
|
||||
return FontVisibility::Base;
|
||||
}
|
||||
#ifdef MOZ_BUNDLED_FONTS
|
||||
if (mBundledFamilies.Contains(aName)) {
|
||||
return FontVisibility::Base;
|
||||
@ -203,11 +184,6 @@ gfxMacPlatformFontList::GetFilteredPlatformFontLists() {
|
||||
|
||||
fontLists.AppendElement(std::make_pair(kBaseFonts, std::size(kBaseFonts)));
|
||||
|
||||
if (GetFontVisibilityDevice() == Device::MacOS_13_plus) {
|
||||
fontLists.AppendElement(
|
||||
std::make_pair(kBaseFonts_13_Higher, std::size(kBaseFonts_13_Higher)));
|
||||
}
|
||||
|
||||
return fontLists;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "js/PropertyAndElement.h" // JS_SetElement, JS_SetProperty
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsIPropertyBag2.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsVersionComparator.h"
|
||||
@ -51,10 +50,6 @@
|
||||
# include "AndroidBuild.h"
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
# include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla;
|
||||
using mozilla::MutexAutoLock;
|
||||
@ -1763,19 +1758,8 @@ std::pair<Device, nsString>* GfxInfoBase::GetFontVisibilityDeterminationPair() {
|
||||
}
|
||||
|
||||
#elif defined(XP_MACOSX)
|
||||
ret->first = Device::MacOS_Unknown;
|
||||
ret->first = Device::MacOS_Platform;
|
||||
ret->second.AppendASCII("macOS Platform");
|
||||
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
int bugfix = 0;
|
||||
nsCocoaFeatures::GetSystemVersion(major, minor, bugfix);
|
||||
if (major == 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret->first = major >= 13 ? Device::MacOS_13_plus : Device::MacOS_sub_13;
|
||||
ret->second.AppendPrintf("macOS %d.%d.%d", major, minor, bugfix);
|
||||
#elif defined(XP_WIN)
|
||||
ret->first = Device::Windows_Platform;
|
||||
ret->second.AppendASCII("Windows Platform");
|
||||
|
@ -47,7 +47,7 @@ interface nsIGfxInfo : nsISupports
|
||||
Unassigned = 0,
|
||||
Unknown_Platform = 1,
|
||||
Windows_Platform = 2,
|
||||
MacOS_Unknown = 3,
|
||||
MacOS_Platform = 3,
|
||||
Android_Unknown_Release_Version = 4,
|
||||
Android_Unknown_Peloton = 5,
|
||||
Android_Unknown_vbox = 6,
|
||||
@ -63,9 +63,7 @@ interface nsIGfxInfo : nsISupports
|
||||
Linux_Ubuntu_22 = 16,
|
||||
Linux_Fedora_any = 17,
|
||||
Linux_Fedora_38 = 18,
|
||||
Linux_Fedora_39 = 19,
|
||||
MacOS_13_plus = 20,
|
||||
MacOS_sub_13 = 21
|
||||
Linux_Fedora_39 = 19
|
||||
};
|
||||
readonly attribute nsIGfxInfo_FontVisibilityDeviceDetermination fontVisibilityDetermination;
|
||||
readonly attribute AString fontVisibilityDeterminationStr;
|
||||
|
Loading…
Reference in New Issue
Block a user