Chromium Code Reviews| Index: content/browser/renderer_host/render_view_host.cc |
| diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc |
| index ab0ce6d23f64f9ee510787c6bb60f74f9ec52da2..f47d1c8728a16a10ff6a69ff8f3b41554f552b08 100644 |
| --- a/content/browser/renderer_host/render_view_host.cc |
| +++ b/content/browser/renderer_host/render_view_host.cc |
| @@ -1397,13 +1397,17 @@ void RenderViewHost::OnAccessibilityNotifications( |
| for (unsigned i = 0; i < params.size(); i++) { |
| const ViewHostMsg_AccessibilityNotification_Params& param = params[i]; |
| - if (param.notification_type == ViewHostMsg_AccEvent::LOAD_COMPLETE && |
| + if ((param.notification_type == ViewHostMsg_AccEvent::LAYOUT_COMPLETE || |
| + param.notification_type == ViewHostMsg_AccEvent::LOAD_COMPLETE) && |
| save_accessibility_tree_for_testing_) { |
|
dmazzoni
2011/12/10 06:27:36
I just realized that there's no reason to go throu
David Tseng
2011/12/12 01:23:57
I'd like to keep this as is to avoid any possible
|
| accessibility_tree_ = param.acc_tree; |
| - content::NotificationService::current()->Notify( |
| - content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, |
| - content::Source<RenderViewHost>(this), |
| - content::NotificationService::NoDetails()); |
| + |
| + // Only notify for non-blank pages. |
| + if (accessibility_tree_.children.size() > 0) |
| + content::NotificationService::current()->Notify( |
| + content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, |
| + content::Source<RenderViewHost>(this), |
| + content::NotificationService::NoDetails()); |
| } |
| } |
| } |