summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-22 18:11:09 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-22 18:11:09 +0000
commitd6bc65a1da688bf34833e5df7954a1e697efa8fe (patch)
treeb337f1b93d43075e38bbc17871231c4af198068b
parent241db35515f6c071080905592296db9679629b06 (diff)
downloadchromium_src-d6bc65a1da688bf34833e5df7954a1e697efa8fe.zip
chromium_src-d6bc65a1da688bf34833e5df7954a1e697efa8fe.tar.gz
chromium_src-d6bc65a1da688bf34833e5df7954a1e697efa8fe.tar.bz2
Win Aura accessibility fixes.
Expose correct role for omnibox. Catch null web_contents_ in WebView. Only check AccessibleWebViewRegistry when the id is outside of the range used by views. BUG=175156 Review URL: https://chromiumcodereview.appspot.com/14365004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195554 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc1
-rw-r--r--ui/views/accessibility/native_view_accessibility_win.cc14
-rw-r--r--ui/views/controls/webview/webview.cc2
3 files changed, 10 insertions, 7 deletions
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index e2f4142..138c835 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -209,6 +209,7 @@ void OmniboxViewViews::OnGestureEvent(ui::GestureEvent* event) {
void OmniboxViewViews::GetAccessibleState(ui::AccessibleViewState* state) {
location_bar_view_->GetAccessibleState(state);
+ state->role = ui::AccessibilityTypes::ROLE_TEXT;
}
void OmniboxViewViews::OnBoundsChanged(const gfx::Rect& previous_bounds) {
diff --git a/ui/views/accessibility/native_view_accessibility_win.cc b/ui/views/accessibility/native_view_accessibility_win.cc
index a9031b3c..865215f 100644
--- a/ui/views/accessibility/native_view_accessibility_win.cc
+++ b/ui/views/accessibility/native_view_accessibility_win.cc
@@ -376,13 +376,13 @@ STDMETHODIMP NativeViewAccessibilityWin::get_accChild(VARIANT var_child,
int view_storage_id = view_storage_ids_[view_storage_id_index];
ViewStorage* view_storage = ViewStorage::GetInstance();
child_view = view_storage->RetrieveView(view_storage_id);
- }
-
- *disp_child = AccessibleWebViewRegistry::GetInstance()->
- GetAccessibleFromWebView(view_, child_id);
- if (*disp_child) {
- (*disp_child)->AddRef();
- return S_OK;
+ } else {
+ *disp_child = AccessibleWebViewRegistry::GetInstance()->
+ GetAccessibleFromWebView(view_, child_id);
+ if (*disp_child) {
+ (*disp_child)->AddRef();
+ return S_OK;
+ }
}
}
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index ec1c4f0..5d8d74b 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -190,6 +190,8 @@ void WebView::WebContentsFocused(content::WebContents* web_contents) {
gfx::NativeViewAccessible WebView::AccessibleObjectFromChildId(long child_id) {
#if defined(OS_WIN) && defined(USE_AURA)
+ if (!web_contents_)
+ return NULL;
content::RenderWidgetHostView* host_view =
web_contents_->GetRenderWidgetHostView();
if (host_view)