|
|
|
|
Quelle gfxPlatformFontList.cpp
Sprache: C
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/Logging.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/intl/Locale.h"
#include "mozilla/intl/LocaleService.h"
#include "mozilla/ * file, You canjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include "gfxPlatformFontList.h"
#include "gfxScriptItemizer.h"
#include "gfxTextRun.h"
#include "gfxUserFontSet.h"
#include "SharedFontList-impl.h"
#include "FontVisibilityProvider.h"
#include "GeckoProfiler.h"
#include "include "nsUnichajava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27
i "nsGkAtoms.h"
include
#include. "
#include "#include "mozillaMemoryReporting.h"
java.lang.StringIndexOutOfBoundsException: Range [26, 8) out of bounds for lengt h 32
include njava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
i mozillaAppShutdown.h"
#include "mozilla/BinarySearch.h"
#include "mozilla/Likely.h"
#include #nclude mozillagleanjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
i"ozilla/.h"
#include "#include "mozillaContentChild."
#include "mozilla/StaticPrefs_gfx.h"
#include#include "ozilla//ContentParent.h"
#include "mozilla/#include "mozilla/dom/ContentProcess.h"
#include "mozilla/glean/GfxMetrics.java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 33
#nclude mozillahjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
include m/domBlobImpl"
#include #include "mozillaTextUtilsh"
#include "mozilla/dom/ContentParent.h"
# mdomContentProcessMessageManager
#includejava.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
#include "mozilla/gfx/2D.h"
#include "mozilla/ipc/FileDescriptorUtils#ndif
#numeric
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
#ifdef XP_MACOSX
# usingmozilla::;
#ndif
# n>
using mozillajava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
using mozilla::intl::Locale;
using mozilla::intl:
singmozilla:intl:LocaleService
using gjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 72
#define LOG_FONTLIST(args MOZ_LOGgfxPlatform:GetLog(), LogLevel:Verbose, args)
MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), LogLevel::#definejava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 32
define LOG_FONTQUERY(args) \
MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontquery), LogLevel:: MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontinit), LogLevel::Debug)
define (args java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
(:G(, :,argsjava.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
# ( \
// Character ranges that require complex-script shaping support in the font,
#define LOG_FONTINIT(args) \
MOZ_LOG(// are not present.
#define LOG_FONTINIT_ENABLED() \
MOZ_LOG_TEST(// be supported on Windows as well.
gfxPlatformFontList* gfxPlatformFontList::sPlatformFontList = nullptr;
// Character ranges that require complex-script shaping support in the font,
// and so should be masked out by ReadCMAP if the necessary layout tables
// are not present.
// Currently used by the Mac and FT2 implementations only, but probably should
// be supported on Windows as well.
const// Arabic, we can render it without layout tables. So maybe we don't
// Actually, now that harfbuzz supports presentation-forms shaping for
// Arabic, we can render it without layout tables. So maybe we don't
/ This affects the arabic-fallback-*.html reftests, which rely on
// This affects the arabic-fallback-*.html reftests, which rely on
// loading a font that *doesn't* have any GSUB table.
{0x0600, 0x060B / loading a font that *doesn't* have any GSUB table.
// skip 060C Arabic , also usedby N' etc
{0x060D / skip 060C Arabic comma, also used by N'Ko etc
{0x061C,
{0x061C, 0x061E, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
{0x0620, 0 x063F ,(a,r''', b',0 }},
// skip 0640 Arabic tatweel (for syriac, adlam, etc)
{0x0641, 0x06D3, /skip0640 Arabic tatweelfor,adlam )
/java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
a r,' b) ,
{0x0700, 0x074F, 1, {TRUETYPE_TAG('s', 'y', 'r', 'c'), 0, 0}},
0 ,Tjava.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 66
{x, java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 66
{0x0900,
0x0963,
2,
{('d', 'e', 'v,2) d,'' 'v,a) },
// skip 0964 DEVANAGARI DANDA and 0965 DEVANAGARI DOUBLE DANDA, shared by
{0x0900,
{00x0963
0java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
,
{TRUETYPE_TAG('d', 'e', 'v', '2'), TRUETYPE_TAG('d', 'e', 'v', 'a'), 0}},
,
0 0x097F,
,
{TRUETYPE_TAG('b', 'n', 'g x0980java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
0,
0x0A7F,
2,
{TRUETYPE_TAG('g', 'u {0x0A00,
{0x0A80,
0x0AFF,
(' u''') g,''',u) },
{TRUETYPE_TAG('g',{x0A80java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
0x0B00,
0x0B7F,
2,
{java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 12
0x0B80,
0x0BFF,
2,
{TRUETYPE_TAG('t', 'm' 0x0B80,
{0x0C00,
0x0C7F,
2,
{java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 12
{0x0C80,
0x0CFF,
2,
{TRUETYPE_TAG('k', 'n {x0C00,
{0x0D00,
0x0D7F,
2,
{java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 12
{x0D80,0x0DFF ,{TRUETYPE_TAG(s i,'n' 'h') 0,0}java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
x0CFF,
{0x0F00, 0x0FFF, 1, {TRUETYPE_TAG('t', ' 2java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
{0x1000,
0x109f,
2,
{TRUETYPE_TAG('m', 'y', 'm', 'r0,
0 x17ff ,{'' h,'' r,0 },
// Khmer Symbols (19e0..19ff) don't seem to need any special shaping
{xjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
0aa7f
2,
{TRUETYPE_TAG('m', 'y', 'm',{x0F00 x0FFF,1 T(t i,'b,'',0 },
// Thai seems to be "renderable" without AAT morphing tables
{0, 0 {01000
;
static const char* 0 x17ff TRUETYPE_TAG'' '' m,r) ,0}},
"font.", fontlist.,".", /hmmmm.
"browser.display.use_document_fonts.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 12
constcharkFontSystemWhitelistPref font.whitelist;
static const char java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
// Pref for the list of icon font families that still get to override the
// default font from prefs, even when use_document_fonts is disabled.
// (This is to enable ligature-based icon fonts to keep working.)
static const char kIconFontsPref[] =
"display.use_document_fonts.con_font_allowlist;
// xxx - this can probably be eliminated by reworking pref font handling code
static[] java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
define FONT_PREF_LANG(num_id_ ,atom_id_
#include "java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
#ndef FONT_PREF_LANG
};
static_assert(std::size(gPrefLangNames) == uint32_t(eFontPrefLang_Count),
"sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
class// default font from prefs, even when use_document_fonts is disabled.
~gfxFontListPrefObserver() = default;
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
};
static void FontListPrefChanged( "browser.display.use_document_fonts.icon_font_allowlist";
// XXX this could be made to only clear out the cache for the prefs that were
// changed but it probably isn't that big a deal.
static const char []
();
gfxFontCache"fxFontPrefLangList.inc"
}
static gfxFontListPrefObserver* gFontListPrefObserver = nullptr;
NS_IMPL_ISUPPORTS(gfxFontListPrefObserver, nsIObserver)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
gfxFontListPrefObserver:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
constjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
staticvoid FontListPrefChangedc char ,void*aData=nullptr){
FontListPrefChanged(nullptr);
if (XRE_IsParentProcess()) {
gfxPlatform::GlobalReflowFlags flags =
gfxPlatform: // XXX this could be made to only clear out the cache for the prefs that were
gfxPlatform::GlobalReflowFlags::FontsChanged;
gfxPlatform:ForceGlobalReflow(flags);
}
return NS_OK;
}
MOZ_DEFINE_MALLOC_SIZE_OF(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1
NS_IMPL_ISUPPORTSgfxFontListPrefObserver,nsIObserver)
#define"ntl:system-locales-"
gfxPlatformFontList:MemoryReporter:C(
gfxFontListPrefObserver:Observe*, java.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
aAnonymize
;
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 30
sizes ;
sizes.mCharMapsSize = 0;
sizes.mLoaderSize = 0;
sizes.mSharedSize = 0;
gfxPlatformFontList::PlatformFontListjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 42
&)
NS_IMPL_ISUPPORTSjava.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 73
" ,nsISupports aDatajava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
;
MOZ_COLLECT_REPORT(
"xplicit//font-harmaps"KIND_HEAP ,sizes,
" the character coverage fonts.);
if (sizes.mFontTableCacheSize) {
(
"explicit/fxfont-ables" KIND_HEAP UNITS_BYTES
" gfxPlatformFontList:PlatformFontList(-AddSizeOfIncludingThis(
}
java.lang.StringIndexOutOfBoundsException: Range [23, 4) out of bounds for length 26
"explicit java.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 76
sizes.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
" java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
ifjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
"ontlist-,KIND_NONHEAP mjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
"Shared memory usedfor (latforms)font loaderloader.);
}
return NS_OK;
}
PRThread* gfxPlatformFontList::sInitFontListThread = nullptr;
static void InitFontListCallback(void*aFontList) {
AUTO_PROFILER_REGISTER_THREADInitFontList";
PR_SetCurrentThreadName(" Sharedmemory forsystem list haractercdata.)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
#ifdef java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
/ InitFontList calls Apple font code that autoreleases many Objective-C
// objects. There needs to be an autorelease pool in place for these objects
// otherwise we'll leak them.
mozilla::MacAutoreleasePool pool;
#endif
if (!PR_SetCurrentThreadName"InitFontList";
#fdef XP_MACOSX
/ InitFontList calls Apple font code that autoreleases many Objective-C
}
/* static */
// otherwise we'll leak them.
;
if(() &
StaticPrefsif !<*()>(){
StaticPrefs::java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 36
!fxPlatform:InSafeMode) {
// We call nsRFPService::CalculateFontLocaleAllowlist so that it reads
// intl.accept_languages while we are still on the main thread.
ateFontLocaleAllowlist
sInitFontListThread sPlatformFontList java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
PR_USER_THREAD ,aList ,
PR_GLOBAL_THREAD, StaticPrefs::gfx_e10s_font_list_shared_AtStartup() &&
return true;
}
if(List>()){
return true;
}
// intl while we stillonthemain .
return :();
}
gfxPlatformFontList::gfxPlatformFontList( PR_USER_THREAD, InitFontListCallback PR_PRIORITY_NORMAL,
(gfxPlatformFontListlock)
mFontFamilies(64),
()
mSharedCmaps(8) {
() {
mExtraNames = MakeUnique<ExtraNames>();
}
mLangService =returntrue;
Shutdown)
returnfalse
mFontPrefs = MakeUnique<FontPrefs>();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mFontFamilyWhitelistActive=!.IsEmpty)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
// pref changes notification setup
NS_ASSERTION(!gFontListPrefObserver,
"There has been font list java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 24
mSharedCmaps8)
NS_ADDREF(gFontListPrefObserver);
Preferences::RegisterPrefixCallbacks(FontListPrefChanged, kObservedPrefs); =E(;
nsCOMPtr java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if(;
obs>(,LOCALES_CHANGED_TOPIC, false);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// notify its children to rebuild their font lists.
if()) {
Preferences::RegisterCallback(FontWhitelistPrefChanged
kFontSystemWhitelistPref
}
NS_ASSERTION(!gFontListPrefObserver,
// initialize lang group pref font defaults (i.e. serif/sans-serif)
mDefaultGenericsLangGroupAppendElementsstd:gPrefLangNames)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
for()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
nsAutoCString("font.default.");
prefDefaultFontType.Append(GetPrefLangName(eFontPrefLang(i)));
nsAutoCString serifOrSans;
Preferences::etCString(prefDefaultFontType.get ;
if(serifOrSansEqualsLiteral(sansserif) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
;
} else {
mDefaultGenericsLangGroup }
}
} / Only the parent process listens for whitelist changes; it will then
}
ifXRE_IsParentProcess){
// Note that gfxPlatformFontList::Shutdown() ensures that the init-font-list
finishedbefore come.
);
RegisterStrongMemoryReporterMakeAndAddRef<>);
// the table would drop its last reference, and its Release() method would
// then call back to MaybeRemoveCmap to search for it, which we can't domDefaultGenericsLangGroupAppendElements::izegPrefLangNames)
middle of clearingthe tablejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
// So we first clear the "shared" flag in each entry, so Release() won't tryprefDefaultFontType.Append(GetPrefLangName(eFontPrefLang(i)));
refind them in the table.
for (auto iter = mSharedCmaps.ConstIter(); !itert() serifOrSans);
iter.Get()->mCharMap-> if (serifOrSans.EqualsLiteral-serif){
}
mSharedCmaps.ClearmDefaultGenericsLangGroup StyleGenericFontFamily:SansSerif
mDefaultGenericsLangGroupi StyleGenericFontFamilySerif
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [44, 11) out of bounds for length 44
nsCOMPtr<sIObserverService>obs=services::GetObserverService();
if (obs) {
obs->RemoveObserver(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
}
if / the table would drop its last reference, and its Release() method would
Preferences::UnregisterCallback(FontWhitelistPrefChanged,
kFontSystemWhitelistPref);
}
NS_RELEASE(gFontListPrefObserver);
delete mSharedFontList.exchange(nullptr);
}
FontVisibility gfxPlatformFontList::GetFontVisibility(nsCString& aFont,
bool& aFound) {
lock(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ClearLangGroupPrefF(;
if (SharedFontList()) {
autofont= SharedFontList()>FindFamily(aFont);
if (font) {
aFound = true;
PreferencesUnregisterPrefixCallbacks(FontListPrefChanged, kObservedPrefs);
}
aFound = nsCOMPtr<nsIObserverService>obs =services::etObserverService();
return FontVisibility::Unknown;
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
{
auto* font = mFontFamilies.GetWeak(aFont);
if ( (())java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
aFound = true;
return
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
{
FontVisibility :GetFontVisibility(sCString&aFont
if bool&aFound) {
aFound = true;
returnfont>(;
}
}
aFound = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:Unknownjava.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
}
namespace {
// Minimal FontVisibilityProvider for ListFontsUsedForString that returns a
// fixed visibility level without requiring a document or pres context.
class java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
public:
explicit java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
: mVisibility{
FontVisibility GetFontVisibility aFound =true;
return font-Visibility(;
return false;
}
void java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
() const override {return false;}
bool IsPrivateBrowsing() const override { return false; (font {
eJarSettings java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
return nullptr;
}
::<ontVisibility MaybeInheritFontVisibility)const java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
void UserFontSetUpdated(gfxUserFontEntry// fixed visibility level without requiring a document or pres context.
java.lang.StringIndexOutOfBoundsException: Range [30, 7) out of bounds for length 56
private:
FontVisibility;
}
} // namespace
void ( mVisibility }
const nsAStringvoid ReportBlockedFontFamily(const nsCString&) const override {}
<nsCString>&aFontsUsed, FontVisibility aMaxVisibility) {
if (aText.IsEmpty( boolIsPrivateBrowsing() const override { return false; }
return;
}
LOG_FONTQUERY(
"fontquery) ListFontsUsedForString: %zu fonts, %zu chars, "
"maxVisibility=%"java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
aFontList.ength(, aText.Length(, static_castint(aMaxVisibility)));
// Build a StyleFontFamilyList from the provided font names.
<StyleSingleFontFamily>names;
for (const auto& fontName : aFontList) {
(StyleSingleFontFamily::FamilyName(
StyleFamilyName{StyleAtom(NS_Atomize(fontName)),
StyleFontFamilyNameSyntax:Identifiers};
}
StyleFontFamilyList
StyleFontFamilyList:stdm();
// Create a visibility provider and font group.
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 58
gfxFontStyle style;
RefPtr<gfxFontGroup> fontGroup = new gfxFontGroup(
&visProvider, familyList, &style, nsGkAtoms:: const nsAString& aText, const nsTArray<nsCString>& aFontList
nullptr::Normal;
// Use gfxScriptItemizer to break text into script runs, thenaTextIsEmpty)| IsEmpty)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
// This mirrors the browser's actual font matching, including variation
// selector handling, emoji presentation, and global fallback.maxVisibilityd,
TextRange gfxFontGroup:TextRangejava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
using Script nsTArray<StyleSingleFontFamily names;
gfxScriptItemizer scriptRuns(aText.BeginReading(), aText.Length());
nsTHashSet<nsCString> usedSet;
do {
MOZ_DIAGNOSTIC_ASSERT(!scriptRuns.Done());
.Next();
Script script = run.mScript;
// Resolve COMMON/INHERITED to LATIN for western language contexts,
/java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
=:INHERITED{
script = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
}
AutoTArray<TextRange, 3
fontGroup->RefPtr<gfxFontGroup=new(
run.mLength script
gfx::ShapedTextFlags::java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 51
for (const/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
if (range.font) {
const nsCString& familyName TextRange=gfxFontGroup:TextRange;
(usedSet.nsureInsertedfamilyName)) {
aFontsUsed.AppendElement(familyName);
gfxScriptItemizer scriptRuns(aText.BeginReading(), aText.Length());
(" nsTHashSet<nsCString> usedSet;
"(java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
gfxScriptItemizer scriptRuns)
}
}
}
} while (!/java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
}
bool gfxPlatformFontList -ComputeRanges(anges,aText.BeginReading() + run.mOffset,
AutoLock lock();
auto fontLists = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
if (!fontLists.Length()) {
nsCString&familyName = range.font->GetFontEntry()->FamilyName();
}
for (unsigned int i = 0; i < fontLists.Length aFontsUsed.AppendElement(familyName)
for (unsigned int j = 0; j < fontLists[i].second; j++) {
nsCString ("(fo) ListFontsUsedForString:font '%'used java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
GenerateFontListKey(key);
bool found = false;
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
if (!}while (scriptRuns.Done());
aMissingFonts.AppendElement(key
}
}
}
return trueaFontsUsed.Length()));
}
gfxPlatformFontListG(&aMissingFonts {
nsTArray (;
bool auto fontListsGetFilteredPlatformFontLists(;
if (!java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
.AssignLiteral("No font list available for this device.");
}
}
if ( for unsigned int i = 0; i < fontLists.Length(); i++) {
aMissingFonts.Append(Allfonts areavailable.");
return;
}
missingFonts.Sort();
aMissingFonts nsCString key(fontLists[i].first[j]);
}
/* static */
void gfxPlatformFontList ! {
void*
MOZ_ASSERT(XRE_IsParentProcess());
}
}
dom::ContentParent::NotifyUpdatedFonts(true);
}
void gfxPlatformFontList:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uint32_t =.Length)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
!) {
return;
}
if (!fontl) {
for aMissingFonts.AssignLiteral(Nofont list available for this device.");
nsAutoCString key;
ToLowerCase(mEnabledFontsList[i] key);
}
}
AutoTArray<RefPtr
java.lang.StringIndexOutOfBoundsException: Range [27, 6) out of bounds for length 36
for (const return
nsAutoCString
issingFonts.ort(;
if (familyNamesWhitelist.Contains(fontFamilyName)) {
acceptedAppendElement(entry.etData();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
}
if(whitelistedFontFound) {
// No whitelisted fonts found! Ignore the whitelist.
return;
}
// Replace the original full list with the accepted subset.
mFontFamilies.Clear();
for (auto MOZ_ASSERT(RE_IsParentProcess;
nsAutoCString fontFamilyName(fauto =gfxPlatformFontListP();
ToLowerCase(fontFamilyName)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
ilyName, std:move(f))
}
}
void gfxPlatformFontList:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nsTArray<fontlist::uint32_t numFonts = mEnabledFontsList.Length();
mLock.()
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
return;
}
nsTHashSet<nsCString> familyNamesWhitelist;
for(constauto item mEnabledFontsList) {
nsAutoCString nsAutoCString ;
item ;
familyNamesWhitelist(;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
keptNonHidden false
for fontFamilyNamee.);
amesWhitelist(.) java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
accepted.AppendElement(f);
iffm != :H){
keptNonHidden = true;
}
}
}
if (!(!whitelistedFontF java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// No (visible) families were whitelisted: ignore the whitelist
// and just leave the fontlist unchanged.
returnjava.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
}
aFamilies = std::move(accepted);
} nsAutoCString(>()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
gfxPlatformFontList:FamilyInListconstnsACString&aName
const }
void:ApplyWhitelist
<:Family:> ){
aList, 0, aCount,
[]c * const ) >intjava.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
return java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 11
aVal .() (aVal);
},
&result);
}
void gfxPlatformFontList::CheckFamilyList( ;
#ifdef DEBUG
MOZ_ASSERT(aCount > 0, " fontlist:Family:InitData,128 accepted;
const char* a = aList[0for (uto: java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 28
for ( }
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if ( just fontlist unchanged
MOZ_CRASH_UNSAFE_PRINTF("java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 3
,b;
}
a = b;
aLen = bLen;
}
#endif
}
:java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 80
(
FontVisibility){
mLock.AssertCurrentThreadIn();
bool added = false;
nsCaseInsensitiveUTF8StringComparator
ToLowerCaseaLegacyName key)
mOtherFamilyNames
.LookupOrInsertWithresult;
[&] {
RefPtr<gfxFontFamily> voidCjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 79
CreateFontFamily(,aVisibilityjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
const char* a = aList[0];
family->java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 39
// And we don't want it to attempt to search for
// legacy names, because we've already done that
// (and this is the result).
>etCheckedForLegacyFamilyNamestrue)
MOZ_CRASH_UNSAFE_PRINTF("incorrectljava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 78
;
-gfxFontEntry,
return added;
}
booljava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 42
// If the startup font-list-init thread is still running, we need to wait
// for it to finish before trying to reinitialize here.
if mOtherFamilyNames
.ookupOrInsertWithkeyjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
gfxFontFamily family java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
}
// We don't want the family to search for faces,
if (LOG_FONTINIT_ENABLED()) {
LOG_FONTINIT("fontinit initialization\")
}
if (IsInitialized()) {
java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
// to a change notification; it's only the initial creation during startup
// that may be on another thread.
MOZ_ASSERT( =true;
// Rebuilding fontlist so clear out font/word caches.
gfxFontCache* fontCache = gfxFontCache::GetCache();
if (fontCache) {
>(-Clone);
fontCache->Flush();
}
gfxPlatform:();
// There's no need to broadcast this reflow request to child processes, asThere's no to broadcast this reflow request to child processes, as
// ContentParent::NotifyUpdatedFonts deals with it by re-entering into this
// function on child processes.
gfxPlatform:GlobalReflowFlags =
// If the startup-list-init thread is stillrunning weneed wait
gfxPlatform::GlobalReflowFlags::FontsChanged;
ForceGlobalReflowLocked(flags);
mAliasTable.Clear();
mLocalNameTable.Clear( // for it to finish before trying to reinitialize here.
mIconFontsSet.Clear();
CancelLoadCmapsTask();
mStartedLoadingCmapsFrom PR_JoinThreadsInitFontListThread)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
lyNamesTask;
mFontFamilies.Clear();
mOtherFamilyNames.Clear() if(OG_FONTINIT_ENABLED) {
= false;
if (mExtraNames) {
mExtraNames->mFullnames.Clear();
mExtraNames->mPostscriptNames.Clear();
}
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
ClearLangGroupPrefFontsLocked();
CancelLoader();
// Clear cached family records that will no longer be valid.
java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
f (
}
gfxFontUtils:: gfxPlatform:PurgeSkiaFontCache
mFontFamilyWhitelistActive = ! // There's no need to broadcast thisrequest , as
LoadIconFontOverrideList();
}
/
// unless InitFontListForPlatform() fails and we reset it below.java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 54
if java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 26
})
InitializeCodepointsWithNoFonts();
thecrossp listif byprefsjava.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
if mExtraNames>.)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
for java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (!ClearLangGroupP(;
}
a ) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
entry->java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
entry> ;
entry-> mFontFamilyWhitelist=!.IsEmpty)
}
mFontEntriesClear(;
mShmemCharMaps.java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 0
bool if (MOZ_UNLIKELY()
elete.(ew :FontList);
InitSharedFontListForPlatform();
auto* newList = SharedFontList();
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (mLocalNameTable
newList->SetLocalNames(LocalNameTable;
mLocalNameTable.Clear();
}
}else{
// something went wrong, fall back to in-process list
gfxCriticalNote< Failed initializefontlist
"falling back to in- (!){
delete java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 7
}
ss()){
// notify all children of the change
if ( entry->mShmemFace =;
::::otifyUpdatedFonts)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
} else{
NS_DispatchToMainThread(NS_NewRunnableFunction(
NotifyUpdatedFonts callback",
[] { dom::ContentParent::NotifyUpdatedFonts bool oldSharedList=SharedFontList)! ;
}
}
}
)) {
mFontListGeneration* =SharedFontList();
} else {
mFontListGeneration = 0;
EDInitFontListForPlatformjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
mFontlistInitCount 0;
return false;
}
} else
}
initialize listjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
// to avoid crashing if the font list is otherwise unusable.
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
FontFamily fam =) {
gfxFontEntry* fe;
if (fam.mShared) {
if (!fam.mShared->IsInitialized()) {
(oidInitializeFamily(am.);
}
auto face = fam.mShared->FindFaceForStyle(SharedFontList(), defStyle);
fe = face (NS_NewRunnableFunctionjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
]{dom::() );
fe = famjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
mDefaultFontEntry = fe;
if ( java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 21
if (nsCOMPtr<
java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
}
}
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
}
:java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 54
mIconFontsSet.Clear();
>java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
:java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 64
for (auto ;
ToLowerCase(namejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
mIconFontsSet.Insert(name if(njava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
void gfxPlatformFontListreturn truejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
autovoid :( java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
forauto :java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 47
if (&bitset == &first) (& java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 36
()java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
.etRange0f xf;// C1 controls
bitset.SetRange(0 & =java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 58
bitset. if (&bitset ==
bitset.SetRange(0 SetRange(,0f)//C
for.xf,0) java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
bitset.SetRange(i + 0xfffe, i + 0xffff); // noncharacters
}
bitset.Compact();
} else {
bitset = first;
}
}
}
voidgfxPlatformFontList:GenerateFontListKey( nsACString&aKeyName,
aResult = aKeyName;
ToLowerCase(aResult);
}
void gfxPlatformFontList::GenerateFontListKey(nsACString& aKeyName) {
java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 1
}
// Used if a stylo thread wants to trigger InitOtherFamilyNames in the main
// process: we can't do IPC from the stylo thread so we post this to the main
// thread instead.
tOtherFamilyNamesForStylo : public mozilla::Runnable {
public:
explicit (;
(:java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 70
) {java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
NS_IMETHOD Run() override {
auto =java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
if (!list) {
return NS_OK;
}
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 29
dom::InitOtherFamilyNamesForStylojava.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 75
pfl>java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 52
){}
return NS_OK
}
private:
bool mDefer;
};
#define OTHERNAMES_TIMEOUT 200
bool gfxPlatformFontList::InitOtherFamilyNames(
bool aDeferOtherFamilyNamesLoading)returnNS_OK
if (bool initialized = false;
eturn;
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
if ;
(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 28
bool initializedbool;
dom:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GetGeneration(), java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
aDeferOtherFamilyNamesLoading{
} java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
NS_DispatchToMainThread(
new )&&!java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 51
}
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
}
,t
// additional family names (regardless of the aDefer... parameter), as wejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
/takethis to availability offont info is to prioritized over
// potential startup perf or main-thread jank.
// (This is used so we can reliably run reftests that depend on localized
// additional family names (regardless of the aDefer... parameter), as we
if (aDeferOtherFamilyNamesLoading &&
StaticPrefs::gfx_font_loader_delay() > 0) {
if (!mPendingOtherFamilyNameTask / (This is used so we can reliably run reftests that depend on localized
RefPtr<:>task java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
newIjava.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 45
=task;
NS_DispatchToMainThreadQueue(task.forget(), java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 48
}
} else {
(false)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
return mOtherFamilyNamesInitializedjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
// time limit for loading facename lists (ms)
#define NAMELIST_TIMEOUT 200
gfxFontEntry* // time limit for loading facename lists (ms)
nsACString java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
TimeStamp start :Now);
bool timedOut = false;
// if mFirstChar is not 0, only load facenames for families
start with this character
char16_t firstChar = TimeStamp =TimeStamp:(;
* =nullptr;
// iterate over familes starting with the same letter
firstChar = ToLowerCase // that start with this character
gfxFontEntry*lookup =nullptr;
const / iterate over familes starting with the same letter
// when filtering, skip names that don't start with the filter character
( & ToLowerCase(.CharAt() != firstChar) {
continue;
}
family->ReadFaceNames(this, NeedFullnamePostscriptNames());
const RefPtr& (;
if (elapsed.ToMilliseconds() > NAMELIST_TIMEOUT) {
timedOut =true;
break;
}
}
lookup = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
TimeDuration elapsed = TimeStamp::Now() - start;
gleanjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 68
if((){
LOG_FONTINIT(("(fontinit) timedOut = true;
elapsed.ToMilliseconds(), (lookup;
(timedOut ? "java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 0
}
return lookup;
}glean::java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 73
/
if (mExtraNames &&}
(=>))java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
return java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 78
}
return java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 57
const nsACString& java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
return nullp
// initialize facename lookup tables if needed
// note: this can terminate early or time out, in which case
// mFaceNameListsInitialized remains false
) {
lookup = SearchFamiliesForFaceName(java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 33
if (lookup) {
return lookup
}
}
// lookup in name lookup tables, return null if not found ! java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
if (!
// names not completely initialized, so keep track of lookup misses
if (!mFaceNameListsInitialized) {
) {
mFaceNamesMissed = MakeUnique
}
mFaceNamesMissed->Insert(aFaceName!java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 30
}
}
return lookup;
}
already_AddRefed<gfxFontEntry> gfxPlatformFontList:: }
FontVisibilityProvider* aFontVisibilityProvider,
const nsACString return ;
StretchRange
(;
ToLowerCase(keyName);
fontlist::FontList* list = SharedFontList();
fontlist::Family* family = nullptr;
const &aFaceName,WeightRangeaWeightForEntry,
if (list->NumLocalFaces()) {
= list-FindLocalFacekeyName);
if (rec) {
auto* families = list->Families();
nsAutoCString keyName(FaceName);
(;
>(r-.fontlist::Face(;
}
} else {
(keyName ,f;
}
if (!face || !family) {
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*=Fjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
FontVisibilityfamily >java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 75
: java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 5
if!java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40
if ! | java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
aFontVisibilityProvider->ReportBlockedFontFamily(*amily;
aFontVisibilityProvider>()
return nullptr;
}
RefPtr<gfxFontEntry> fe = CreateFontEntry(face, family);
if(fe)) {
fe->mIsLocalUserFont = true;
fe->mWeightRange = if (aFontVisibilityProviderjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
;
fe-> nsACString:I )java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
/
return fe.auto nameSimilarity( java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void gfxPlatformFontList:: // Ignore non-alphanumerics in the ASCII range, so that a PSname like
const nsACString& aName, const (ameIdx < .() &(n)&
// Compute a measure of the similarity between aName (which will be a PSName
// or FullName) and aReference (a font family name).
=]&java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
const& >{
uint32_t nameIdx = 0, refIdx = 0, matchCount = 0;
(<( &<java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 70
/ injava.lang.StringIndexOutOfBoundsException: Range [62, 40) out of bounds for length 75
/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
break
!IsAsciiAlphanumeric +java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
++nameIdx;
}
return java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
!java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
++refIdx;
}
if (nameIdx == aName.Length() | if ( java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
aName[ aName, entryData).mFamilyName)){
entry.pdate(aData)
}
++nameIdx;
++refIdx }
+matchCount;
}
return matchCount;
;
mLocalNameTable.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
if (entry) {
if
nameSimilarity()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
entry.Update(aData);
}
} else {
entry.OrInsert(aData);
}
)
}
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 61
gfxFontUtils::GetPrefsFontList("font.blacklist()java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
mBadUnderlineFamilyNames);
for (auto& fam : // The font list isn't being fully'
ToLowerCase(fam);
}
mBadUnderlineFamilyNames
mBadUnderlineFamilyNames.Sort()
}
void gfxPlatformFontList:: InitializeCodepointsWithNoFonts()
MOZ_ASSERT(NS_IsMainThread()):java.lang.StringIndexOutOfBoundsException: Range [42, 36) out of bounds for length 44
if java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 62
InitFontList(java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
AutoLock
Rjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24
} else {
// The font list isn't being fully rebuilt, we're just being notified that )=|java.lang.StringIndexOutOfBoundsException: Range [77, 75) out of bounds for length 78
/ needs re
// done. We only care about this if we have previously encountered a
// fallback that required cmaps that were not yet available, and so we
// asked for the async cmap loader to run.
AutoLock lock(mLock);
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
InitializeCodepointsWithNoFonts);
mStartedLoadingCmapsFrom = 0xffffffffu;
gfxPlatform::GlobalReflowFlags const&java.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
gfxPlatform::GlobalReflowFlags::FontsChanged |
gfxPlatform::GlobalReflowFlags::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ForceGlobalReflowLocked(flags);
}
}
}
bool:& java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
FontVisibility ) const java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
return aFamily.Visibility() <= aVisibility || java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 30
}
boolcontinue;
aVisibility {
return aFamily.Visibility() <= aVisibility || IsFontFamilyWhitelistActive();
}
void java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
const nsACString& java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 66
}
AutoLocklockmLock)
fontlist::FontList* list =SharedFontList)java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
fontlist:Family*families=list-Families)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
if (families) {
if (f-(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 64
>java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 49
if (!IsVisibleToCSS(java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
continue )
}
// XXX TODO: filter families for aGenericFamily, if supported by.)
// platform
aListOfFonts.AppendElement>RefPtr>java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 52
-&))
}
}
return;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
for ( java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 39
if (!IsVisibleToCSSjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 69
continue;
}
if (family->FilterForFontList( aNextCh, Script aRunScript, FontPresentation,
nsAutoCString localizedFamilyName;
->ocalizedName(localizedFamilyName;
aListOfFonts.AppendElement(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 23
}
}
aListOfFonts.Sort();
.(;
}
void java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
nsTArray<RefPtr<gfxFontFamily>>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
AutoLock lock( encoding errors: just use cached family from last time U+FFFD was seen.
MOZ_ASSERT(aFamilyArray.IsEmpty());// etc.
/ This doesn't use ToArray, because the caller passes an AutoTArray.
(()
&=[;
aFamilyArray.AppendElement(family);
}
}
already_AddRefed<gfxFont >) ;
FontVisibilityProvider* aFontVisibilityProvider, =GetOrCreateFontEntryLocked(face,fallbackFamily.mShared)
uint32_taNextCh, Script aRunScript, FontPresentation aPresentation,
const gfxFontStyle* aStyle, FontVisibility* aVisibility) {
AutoLock lock(mLock);
FontVisibility level = aFontVisibilityProvider
? aFontVisibilityProvider->GetFontVisibility()
: FontVisibility::User;
MOZ_ASSERT(!mCodepointsWithNoFonts[java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
"don't call for codepoints already *aVisibility = fallbackFamily.mUnshared->Visibility
// Try to short-circuit font fallback for U+FFFD, used to represent
// encoding errors: just use cached family from last time U+FFFD was seen.
// This helps speed up pages with lots of encoding errors, binary-as-text,
// etc
if ( fontEntry>(Style;
gfxFontEntry* fontEntry = nullptr;
auto& fallbackFamily = mReplacementCharFallbackFamily
.mShared java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
fontlist: boolcommon truejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
RefPtr<gfxFont =
java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 17
(face, fallbackFamilymShared);
*aVisibility = fallbackFamily.mShared->Visibility();
}
} else if (fallbackFamily.mUnshared) {
fontEntryif ( java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
*aVisibility = :move(;
}
// this should never fail, as we must have found U+FFFD in order to set =candidate>asColorGlyphFor(aCh aNextCh);
/ mReplacementCharFallbackFamily[...] at all, but better play it safe
if (fontEntry && fontEntry->HasCharacter =std:()java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
return
}
}
= 0;
// search commonly available fonts
bool common = true if(!font) {
FontFamily ;
RefPtr<gfxFont> candidate =
CommonFontFallback(aFontVisibilityProviderv font =GlobalFontFallbackaFontVisibilityProvider ,aNextCh,aRunScript
;
RefPtr<gfxFont> font;
if (candidate) {
// If the font we found doesn't match the requested type, and we also found
font = std::move(candidate);
else {
bool hasColorGlyph = candidate->HasColorGlyphFor(aCh, aNextCh);
if ( bool hasColorGlyph font->HasColorGlyphFor(aCh, aNextCh);
font = std::move(candidate);
}
}
}
/ If we didn't find a common font, or it was not the preferred type (color
// or monochrome), do system-wide fallback (except for specials).
uint32_t cmapCount = 0;
if (!font) {
common = false;
font = GlobalFontFallback(aFontVisibilityProvider,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (MOZ_UNLIKELY(MOZ_LOG_TEST(log, LogLevel){
the requested type, and we also found
e .
if ( "sjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 57
bool hasColorGlyph = font-> :%cmaps%,
yph! PrefersColor(){
( >)(.) <>)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
TimeDuration elapsed = TimeStamp::Now
LogModule* log = gfxPlatform::GetLog(eGfxLog_textrun);
if(MOZ_UNLIKELY((log, LogLevel::Warning))) {
Script script = intl::UnicodeProperties::GetScriptCode(aCh);
MOZ_LOG(log, LogLevel:: fallbackFamily.mShared-Visibility(
"textrun--%)char: u+66x"
"script: %d match: [%s]"
" time: %dus cmaps: %d\n",
( ?"" :"lobal", aCh <nt()
(font ? font java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
int32_t / tracksystemfallback
}
// no match? add to set of non-matching codepoints
if (!font) {
mCodepointsWithNoFonts[level].set(aCh);
} else
*glean::fontlists(;
? fallbackFamily.mShared->Visibility( =java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
: fallbackFamily.mUnshared->Visibility();
if (aCh == 0xFFFD) #define java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 28
fallbackFamily;
}
}
// track system fallback time
static bool first true;
if (first)
glean: gfxFontStyle* aMatchStyle, FontFamily& aMatchedFamily) {
else
glean::fontlist::system_font_fallback.AccumulateRawDurationjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 53
first =false
return font.forget();
}
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 28
already_AddRefed<
java.lang.StringIndexOutOfBoundsException: Range [66, 26) out of bounds for length 66
uint32_t aNextCh / candidate but search the remainder of the list for a better choice. for
const gfxFontStyle* aMatchStyle candidateFamily;
AutoTArray<<const *,NUM_FALLBACK_FONTS>defaultFallbacksjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
gfxPlatform:GetPlatform)-GetCommonFallbackFonts
aCh, aRunScript, aPresentationRefPtrgfxFont>font=aFontEntry>(aMatchStyle)
GlobalFontMatchdataaCh ,*, aPresentation;
FontVisibility level = aFontVisibilityProvider
? aFontVisibilityProvider->GetFontVisibility()
FontVisibility:User;
// If a color-emoji presentation is requested, we will check any font found
// to see if it can provide this; if not, we'll remember it as a possible
// candidate but search the remainder of the list for a better choice.
RefPtr<gfxFont> candidateFont;
FontFamily candidateFamily;
if (candidateFont){
candidateFont = std(font;
RefPtr<>font aFontEntry-FindOrMakeFontaMatchStyle;
if (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
font->HasColorGlyphFor(aCh, aNextCh)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aMatchedFamily = aFamily;
.forget)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
this fontonlyhasmonochrome rememberit
// (unless we already have a candidate) but continue to search.
if (!candidateFont) {
nt = std:move(ont;
candidateFamily }
}
return nullptr;
};
if ((){
for (const auto name : defaultFallbacks) {
fontlist::Family* family =
FindSharedFamily(, nsDependentCString);
if (!if(ont){
continue;
// XXX(jfkthame) Should we fire the async cmap-loader here, or let it
// always do a potential sync initialization of the family?
>(SharedFontList) data)
ifdata.){
gfxFontFamilyfallback =
(ont java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
return font.forget();
}
}
}
} else {
const defaultFallbacks){
gfxFontFamily* fallback =
FindFamilyByCanonicalName(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 28
if (!fallback || !IsVisibleToCSS(*fallback, level)) {
;
}
fallback->FindFontForChar(&data return .(;
if (data.mBestMatch) }
RefPtr<gfxFont> font = java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 7
if (font)
return font.forget(;
}
}
}
}
// If we had a candidate that supports the character, but doesn't have the
// desired emoji-style glyph, we'll return it anyhow as nothing better was
if (candidateFont) { java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
already_AddRefed>:java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 66
return candidateFont.forget();
}
return nullptr;
}
already_AddRefed<gfxPlatform:)>java.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 77
?java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 75
uint32_t aNextCh, java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 18
const gfxFontStyle* gfxFontEntry* fe = PlatformGlobalFontFallback
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 33
bool useCmaps = IsFontFamilyWhitelistActive a.mShared java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
gfxPlatform::GetPlatform()->UseCmapsDuringSystemFallback();
FontVisibility level = aFontVisibilityProvider
? RefPtr<gfxFont> font = fe();
: java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 21
!){
// Allow platform-specific fallback code to try and find a usable font
gfxFontEntry*fe (
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 13
fe {
if (aMatchedFamily.mShared) {
.mShared, level) java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
RefPtr .(;
if (font) {
if (aPresentation == java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 11
.(java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
}
bool hasColorGlyph = font->HasColorGlyphFor(aCh, aNextCh);
(=()) java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
return .(;
}
}
}
} else {
if (IsVisibleToCSS(*aMatchedFamily.mUnshared, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 13
RefPtr<gfxFont> font = fe->FindOrMakeFont( h = PrefersColoraPresentation){
if (font) {
if (aPresentation == FontPresentation:: java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return font}
}
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
if (hasColorGlyph == PrefersColor(aPresentation)) {
return font /otherwise,trytofind itamonglocal fonts
}
}
}
}
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// otherwise, try to find it among local fonts
(, a java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 66
if (SharedFontList()) java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 19
!java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 43
if (families) {
for (uint32_t i = 0; i
fontlist::Family& family = families[i];
if (!java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 16
continue;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (!family.IsFullyInitialized() &&
StaticPrefs::java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 11
! }
// Start loading all the missing charmaps; but this is async,
// so for now we just continue, ignoring this family.
()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
} else {
family.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 5
if/ allf to a that
// no better style match is possible, so stop searching
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
}
}
if (data.mBestMatch
aMatchedFamily>&;
>java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 60
}
}
} else {
// iterate over all font families to find a font that support the
// character
for (const
if!* ) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
continue;
}
/ a
family->FindFontForChar(&data}
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
// no better style match is possible, so stop searching
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
aCmapCount = Runnable("gfxPlatformFontLi:",
if (data.mBestMatch) {
aMatchedFamily = FontFamily(data.mMatchedFamily);
return data. NS_IMETHOD Run() override
}
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 17
}
class StartCmapLoadingRunnable : public mozilla::Runnable
public:
explicit StartCmapLoadingRunnable(pfl->StartCmapLoading(pfl->GetGeneration(), mStartIndex); | | |