summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:53:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:53:14 +0000
commit7300995d7647085f97dc32643f1eefd0c33c6050 (patch)
tree2b891915a578113eb0f08fa04125fa2844c94c12 /gfx
parentAdding upstream version 125.0.2. (diff)
downloadfirefox-7300995d7647085f97dc32643f1eefd0c33c6050.tar.xz
firefox-7300995d7647085f97dc32643f1eefd0c33c6050.zip
Adding upstream version 125.0.3.upstream/125.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx')
-rw-r--r--gfx/layers/AnimationInfo.cpp14
-rw-r--r--gfx/thebes/gfxPlatformFontList.cpp6
2 files changed, 15 insertions, 5 deletions
diff --git a/gfx/layers/AnimationInfo.cpp b/gfx/layers/AnimationInfo.cpp
index 81d11f672c..ad43fd681f 100644
--- a/gfx/layers/AnimationInfo.cpp
+++ b/gfx/layers/AnimationInfo.cpp
@@ -494,11 +494,15 @@ void AnimationInfo::AddAnimationForProperty(
}
if (aAnimation->Pending()) {
- const TimeStamp readyTime =
- aFrame->PresContext()->RefreshDriver()->MostRecentRefresh(
- /* aEnsureTimerStarted= */ false);
- MOZ_ASSERT(!readyTime.IsNull());
- aAnimation->SetPendingReadyTime(readyTime);
+ TimeStamp readyTime = aAnimation->GetPendingReadyTime();
+ if (readyTime.IsNull()) {
+ // TODO(emilio): This should generally not happen anymore, can we remove
+ // this SetPendingReadyTime call?
+ readyTime = aFrame->PresContext()->RefreshDriver()->MostRecentRefresh(
+ /* aEnsureTimerStarted= */ false);
+ MOZ_ASSERT(!readyTime.IsNull());
+ aAnimation->SetPendingReadyTime(readyTime);
+ }
MaybeStartPendingAnimation(*animation, readyTime);
}
}
diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp
index bc0e123f85..404d291e03 100644
--- a/gfx/thebes/gfxPlatformFontList.cpp
+++ b/gfx/thebes/gfxPlatformFontList.cpp
@@ -2209,6 +2209,12 @@ eFontPrefLang gfxPlatformFontList::GetFontPrefLangFor(const char* aLang) {
if (!nsCRT::strcasecmp(gPrefLangNames[i], aLang)) {
return eFontPrefLang(i);
}
+ // If the pref-lang is a two-character lang tag, try ignoring any trailing
+ // subtags in aLang and see if the base lang matches.
+ if (strlen(gPrefLangNames[i]) == 2 && strlen(aLang) > 3 &&
+ aLang[2] == '-' && !nsCRT::strncasecmp(gPrefLangNames[i], aLang, 2)) {
+ return eFontPrefLang(i);
+ }
}
return eFontPrefLang_Others;
}