Skip to content

Commit

Permalink
Revised GDI code to counter new absolute references to the DirectWrit…
Browse files Browse the repository at this point in the history
…e font manager. Furthermore, some secrity measures are suspended on Windows 2000 pending review.
  • Loading branch information
win32ss committed Feb 28, 2024
1 parent 48275c7 commit 88b52e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion base/files/file_util_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ bool PreReadFile(const FilePath& file_path,

bool PreventExecuteMapping(const FilePath& path) {
if (!base::FeatureList::IsEnabled(
features::kEnforceNoExecutableFileHandles)) {
features::kEnforceNoExecutableFileHandles) || base::win::GetVersion() == base::win::Version::PRE_XP) {
return true;
}

Expand Down
5 changes: 4 additions & 1 deletion skia/ext/font_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#endif

#if BUILDFLAG(IS_WIN)
#include "base/command_line.h"
#include "third_party/skia/include/ports/SkTypeface_win.h"
#endif

Expand Down Expand Up @@ -68,7 +69,9 @@ static sk_sp<SkFontMgr> fontmgr_factory() {
base::ComponentContextForProcess()->svc()->Connect(provider.NewRequest());
return SkFontMgr_New_Fuchsia(std::move(provider));
#elif BUILDFLAG(IS_WIN)
return SkFontMgr_New_DirectWrite();
if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-direct-write"))
return SkFontMgr_New_GDI();
return SkFontMgr_New_DirectWrite() ? SkFontMgr_New_DirectWrite() : SkFontMgr_New_GDI();
#elif defined(SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE)
return SkFontMgr_New_Custom_Empty();
#else
Expand Down
2 changes: 1 addition & 1 deletion third_party/pdfium
Submodule pdfium updated from 4c4f9a to e59756
2 changes: 1 addition & 1 deletion third_party/skia
Submodule skia updated from c6835e to 833427

0 comments on commit 88b52e3

Please sign in to comment.