diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-21 22:59:45 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-21 22:59:45 +0000 |
commit | 090b98d8ea1c8c5099a6ff010d39ccf6088e9ed1 (patch) | |
tree | e0795c9ad392bffe1bb7e9bd1dc7fb29a4f3f882 | |
parent | 921cd0cc14715c394d4429d8f5e520a8933fee15 (diff) | |
download | chromium_src-090b98d8ea1c8c5099a6ff010d39ccf6088e9ed1.zip chromium_src-090b98d8ea1c8c5099a6ff010d39ccf6088e9ed1.tar.gz chromium_src-090b98d8ea1c8c5099a6ff010d39ccf6088e9ed1.tar.bz2 |
Temporary disabling accessibility in the renderer to work-around bug 1432077 which causes a crasher on tablet PCs (which for some reason issue WM_GETOBJECT messages).
Once that bug is fixed (John is currently working on it), then we can reenable it.
BUG=1432077
Review URL: http://codereview.chromium.org/7823
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3697 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/render_widget_host_view_win.cc | 6 | ||||
-rw-r--r-- | chrome/browser/render_widget_host_view_win.h | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/render_widget_host_view_win.cc b/chrome/browser/render_widget_host_view_win.cc index eef290f..6d60b5d 100644 --- a/chrome/browser/render_widget_host_view_win.cc +++ b/chrome/browser/render_widget_host_view_win.cc @@ -78,6 +78,8 @@ RenderWidgetHostViewWin::RenderWidgetHostViewWin( parent_hwnd_(NULL), is_loading_(false) { render_widget_host_->set_view(this); + renderer_accessible_ = + CommandLine().HasSwitch(switches::kEnableRendererAccessibility); } RenderWidgetHostViewWin::~RenderWidgetHostViewWin() { @@ -800,6 +802,10 @@ LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT, WPARAM, LPARAM, LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { LRESULT reference_result = static_cast<LRESULT>(0L); + // TODO(jcampan): http://b/issue?id=1432077 Disabling accessibility in the + // renderer is a temporary work-around until that bug is fixed. + if (!renderer_accessible_) + return reference_result; // Accessibility readers will send an OBJID_CLIENT message. if (OBJID_CLIENT == lparam) { diff --git a/chrome/browser/render_widget_host_view_win.h b/chrome/browser/render_widget_host_view_win.h index 9db04ce..c47ca74 100644 --- a/chrome/browser/render_widget_host_view_win.h +++ b/chrome/browser/render_widget_host_view_win.h @@ -259,6 +259,11 @@ class RenderWidgetHostViewWin : // value returns true for is_null() if we are not recording whiteout times. TimeTicks whiteout_start_time_; + // Whether the renderer is made accessible. + // TODO(jcampan): http://b/issue?id=1432077 This is a temporary work-around + // until that bug is fixed. + bool renderer_accessible_; + DISALLOW_EVIL_CONSTRUCTORS(RenderWidgetHostViewWin); }; diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index b751d3b..cafb6f1 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -341,5 +341,9 @@ const wchar_t kIncognito[] = L"incognito"; // operations. const wchar_t kUseNewSafeBrowsing[] = L"new-safe-browsing"; +// Turns on the accessibility in the renderer. Off by default until +// http://b/issue?id=1432077 is fixed. +const wchar_t kEnableRendererAccessibility[] = L"enable-renderer-accessibility"; + } // namespace switches diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index b252e49..9e99a80 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -133,6 +133,8 @@ extern const wchar_t kEnableGreasemonkey[]; extern const wchar_t kIncognito[]; extern const wchar_t kUseNewSafeBrowsing[]; +extern const wchar_t kEnableRendererAccessibility[]; + } // namespace switches #endif // CHROME_COMMON_CHROME_SWITCHES_H__ |