| Index: sandbox/win/src/process_mitigations_win32k_interception.cc
|
| diff --git a/sandbox/win/src/process_mitigations_win32k_interception.cc b/sandbox/win/src/process_mitigations_win32k_interception.cc
|
| index ee24fbf434c8e8c6d6c9680e1e71978fe88cd237..297826ab3b166a95af592c3e1127bf501e2b1212 100644
|
| --- a/sandbox/win/src/process_mitigations_win32k_interception.cc
|
| +++ b/sandbox/win/src/process_mitigations_win32k_interception.cc
|
| @@ -25,5 +25,34 @@ ATOM WINAPI TargetRegisterClassW(
|
| return TRUE;
|
| }
|
|
|
| +BOOL WINAPI TargetSystemParametersInfoW(
|
| + SystemParametersInfoWFunction orig_system_parameters_info,
|
| + UINT action,
|
| + UINT ui_param,
|
| + PVOID value,
|
| + UINT win_ini) {
|
| + // The SystemParametersInfo API fails for the following font related
|
| + // parameters in the win32k lockdown mode. We fake the values for
|
| + // SPI_GETFONTSMOOTHING and SPI_GETFONTSMOOTHINGTYPE for now and default to
|
| + // smooth and FE_FONTSMOOTHINGCLEARTYPE for now. This should be ok given that
|
| + // this code only runs on Windows 8 and above.
|
| + // TODO(ananta)
|
| + // Revisit and handle this via browser side IPCs if needed.
|
| + if (action == SPI_GETFONTSMOOTHING) {
|
| + BOOL* smoothing = reinterpret_cast<BOOL*>(value);
|
| + if (smoothing) {
|
| + *smoothing = TRUE;
|
| + return TRUE;
|
| + }
|
| + } else if (action == SPI_GETFONTSMOOTHINGTYPE) {
|
| + UINT* smooth_type = reinterpret_cast<UINT*>(value);
|
| + if (smooth_type) {
|
| + *smooth_type = FE_FONTSMOOTHINGCLEARTYPE;
|
| + return TRUE;
|
| + }
|
| + }
|
| + return orig_system_parameters_info(action, ui_param, value, win_ini);
|
| +}
|
| +
|
| } // namespace sandbox
|
|
|
|
|