commit a6cb564e827269dd0bfd19900012955cec40d63a
parent 3ef34f13f0ae4db66f96da5f2d24a4a36a8f66ef
Author: Jonathan Kew <jkew@mozilla.com>
Date: Fri, 14 Nov 2025 10:48:31 +0000
Bug 1979061 - Don't eagerly call FlushUserFontSet() every time a face is added/removed. r=firefox-style-system-reviewers,emilio
AFAICS this isn't really necessary, and becomes extremely expensive when the font set is large.
Differential Revision: https://phabricator.services.mozilla.com/D272550
Diffstat:
2 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp
@@ -223,8 +223,6 @@ bool FontFaceSet::HasRuleFontFace(FontFace* aFontFace) {
#endif
void FontFaceSet::Add(FontFace& aFontFace, ErrorResult& aRv) {
- FlushUserFontSet();
-
FontFaceImpl* fontImpl = aFontFace.GetImpl();
MOZ_ASSERT(fontImpl);
diff --git a/layout/style/FontFaceSetImpl.cpp b/layout/style/FontFaceSetImpl.cpp
@@ -254,8 +254,6 @@ FontFaceSetLoadStatus FontFaceSetImpl::Status() {
bool FontFaceSetImpl::Add(FontFaceImpl* aFontFace, ErrorResult& aRv) {
RecursiveMutexAutoLock lock(mMutex);
- FlushUserFontSet();
-
if (aFontFace->IsInFontFaceSet(this)) {
return false;
}
@@ -288,8 +286,6 @@ bool FontFaceSetImpl::Add(FontFaceImpl* aFontFace, ErrorResult& aRv) {
void FontFaceSetImpl::Clear() {
RecursiveMutexAutoLock lock(mMutex);
- FlushUserFontSet();
-
if (mNonRuleFaces.IsEmpty()) {
return;
}
@@ -308,8 +304,6 @@ void FontFaceSetImpl::Clear() {
bool FontFaceSetImpl::Delete(FontFaceImpl* aFontFace) {
RecursiveMutexAutoLock lock(mMutex);
- FlushUserFontSet();
-
if (aFontFace->HasRule()) {
return false;
}