зеркало из https://github.com/electron/electron.git
Code Cleanup
This commit is contained in:
Родитель
0df21afcdf
Коммит
6fdf40b038
|
@ -138,7 +138,7 @@ NativeWindowViews::NativeWindowViews(
|
|||
menu_bar_visible_(false),
|
||||
menu_bar_alt_pressed_(false),
|
||||
#if defined(OS_WIN)
|
||||
enabled_a11y_support_(false),
|
||||
checked_for_a11y_support_(false),
|
||||
thick_frame_(true),
|
||||
#endif
|
||||
keyboard_event_handler_(new views::UnhandledKeyboardEventHandler),
|
||||
|
|
|
@ -233,9 +233,6 @@ class NativeWindowViews : public NativeWindow,
|
|||
// Memoized version of a11y check
|
||||
bool checked_for_a11y_support_;
|
||||
|
||||
// If true we have enabled a11y
|
||||
bool enabled_a11y_support_;
|
||||
|
||||
// Whether to show the WS_THICKFRAME style.
|
||||
bool thick_frame_;
|
||||
|
||||
|
|
|
@ -92,14 +92,14 @@ bool NativeWindowViews::PreHandleMSG(
|
|||
// accessibility object.
|
||||
case WM_GETOBJECT: {
|
||||
const DWORD obj_id = static_cast<DWORD>(l_param);
|
||||
if (checked_for_a11y_support_) return false;
|
||||
|
||||
checked_for_a11y_support_ = true;
|
||||
|
||||
if (obj_id != OBJID_CLIENT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checked_for_a11y_support_) return false;
|
||||
checked_for_a11y_support_ = true;
|
||||
|
||||
UINT screenReader = 0;
|
||||
SystemParametersInfo(SPI_GETSCREENREADER, 0, &screenReader, 0);
|
||||
if (!screenReader || !UiaClientsAreListening()) {
|
||||
|
@ -109,7 +109,6 @@ bool NativeWindowViews::PreHandleMSG(
|
|||
const auto axState = content::BrowserAccessibilityState::GetInstance();
|
||||
if (axState && !axState->IsAccessibleBrowser()) {
|
||||
axState->OnScreenReaderDetected();
|
||||
enabled_a11y_support_ = true;
|
||||
Browser::Get()->OnAccessibilitySupportChanged();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче