зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1696407: Don't use GDI font table loading for DWrite when win32k lockdown is enabled. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D107488
This commit is contained in:
Родитель
c07664d701
Коммит
a205d49f42
|
@ -18,6 +18,7 @@
|
|||
#include "mozilla/Sprintf.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/WindowsProcessMitigations.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
|
@ -968,6 +969,12 @@ gfxFontEntry* gfxDWriteFontList::MakePlatformFont(
|
|||
return entry.release();
|
||||
}
|
||||
|
||||
bool gfxDWriteFontList::UseGDIFontTableAccess() const {
|
||||
// Using GDI font table access for DWrite is controlled by a pref, but also we
|
||||
// must be able to make win32k calls.
|
||||
return mGDIFontTableAccess && !IsWin32kLockedDown();
|
||||
}
|
||||
|
||||
static void GetPostScriptNameFromNameTable(IDWriteFontFace* aFace,
|
||||
nsCString& aName) {
|
||||
const auto kNAME =
|
||||
|
|
|
@ -406,7 +406,7 @@ class gfxDWriteFontList final : public gfxPlatformFontList {
|
|||
uint32_t aLength) override;
|
||||
|
||||
IDWriteGdiInterop* GetGDIInterop() { return mGDIInterop; }
|
||||
bool UseGDIFontTableAccess() { return mGDIFontTableAccess; }
|
||||
bool UseGDIFontTableAccess() const;
|
||||
|
||||
bool FindAndAddFamilies(mozilla::StyleGenericFontFamily aGeneric,
|
||||
const nsACString& aFamily,
|
||||
|
|
Загрузка…
Ссылка в новой задаче