Bug 688085 - Remove IDL method nsIFontEnumerator::UpdateFontList; just call gfxPlatform directly from widget/windows code where needed. r=m_kato

Differential Revision: https://phabricator.services.mozilla.com/D170328
This commit is contained in:
Jonathan Kew 2023-02-23 21:45:12 +00:00
Родитель d1c5009e61
Коммит aeec9224a6
3 изменённых файлов: 1 добавлений и 24 удалений

Просмотреть файл

@ -62,12 +62,6 @@ interface nsIFontEnumerator : nsISupports
*/
wstring getDefaultFont(in string aLangGroup, in string aGeneric);
/**
* update the global font list
* return true if font list is changed
*/
boolean updateFontList();
/**
* get the standard family name on the system from given family
* @param aName family name which may be alias

Просмотреть файл

@ -213,13 +213,6 @@ nsThebesFontEnumerator::GetDefaultFont(const char* aLangGroup,
return NS_OK;
}
NS_IMETHODIMP
nsThebesFontEnumerator::UpdateFontList(bool* _retval) {
gfxPlatform::GetPlatform()->UpdateFontList();
*_retval = false; // always return false for now
return NS_OK;
}
NS_IMETHODIMP
nsThebesFontEnumerator::GetStandardFamilyName(const char16_t* aName,
char16_t** aResult) {

Просмотреть файл

@ -5257,18 +5257,8 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam,
break;
}
nsresult rv;
bool didChange = false;
// update the global font list
nsCOMPtr<nsIFontEnumerator> fontEnum =
do_GetService("@mozilla.org/gfx/fontenumerator;1", &rv);
if (NS_SUCCEEDED(rv)) {
fontEnum->UpdateFontList(&didChange);
if (didChange) {
gfxPlatform::ForceGlobalReflow(gfxPlatform::NeedsReframe::Yes);
}
} // if (NS_SUCCEEDED(rv))
gfxPlatform::GetPlatform()->UpdateFontList();
} break;
case WM_SETTINGCHANGE: {