Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: content/renderer/accessibility/render_accessibility_impl.cc

Issue 2953363002: Updates table-like objects when cells are added or removed. (Closed)
Patch Set: Updates table-like objects when cell IDs are added or removed. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/accessibility/render_accessibility_impl.h" 5 #include "content/renderer/accessibility/render_accessibility_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 } 255 }
256 256
257 #if defined(OS_ANDROID) 257 #if defined(OS_ANDROID)
258 // Force the newly focused node to be re-serialized so we include its 258 // Force the newly focused node to be re-serialized so we include its
259 // inline text boxes. 259 // inline text boxes.
260 if (event == ui::AX_EVENT_FOCUS) 260 if (event == ui::AX_EVENT_FOCUS)
261 serializer_.DeleteClientSubtree(obj); 261 serializer_.DeleteClientSubtree(obj);
262 #endif 262 #endif
263 263
264 // If some cell IDs have been added or removed, we need to update the whole
265 // table.
266 if (obj.Role() == blink::kWebAXRoleRow &&
267 event == ui::AX_EVENT_CHILDREN_CHANGED) {
268 WebAXObject table_like_object = obj.ParentObject();
269 if (!table_like_object.IsDetached()) {
270 serializer_.DeleteClientSubtree(table_like_object);
271 HandleAXEvent(table_like_object, ui::AX_EVENT_CHILDREN_CHANGED);
272 }
273 }
274
264 // Add the accessibility object to our cache and ensure it's valid. 275 // Add the accessibility object to our cache and ensure it's valid.
265 AccessibilityHostMsg_EventParams acc_event; 276 AccessibilityHostMsg_EventParams acc_event;
266 acc_event.id = obj.AxID(); 277 acc_event.id = obj.AxID();
267 acc_event.event_type = event; 278 acc_event.event_type = event;
268 279
269 if (blink::WebUserGestureIndicator::IsProcessingUserGesture()) 280 if (blink::WebUserGestureIndicator::IsProcessingUserGesture())
270 acc_event.event_from = ui::AX_EVENT_FROM_USER; 281 acc_event.event_from = ui::AX_EVENT_FROM_USER;
271 else if (during_action_) 282 else if (during_action_)
272 acc_event.event_from = ui::AX_EVENT_FROM_ACTION; 283 acc_event.event_from = ui::AX_EVENT_FROM_ACTION;
273 else 284 else
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 730
720 const WebDocument& document = GetMainDocument(); 731 const WebDocument& document = GetMainDocument();
721 if (document.IsNull()) 732 if (document.IsNull())
722 return; 733 return;
723 734
724 WebAXObject::FromWebDocument(document).ScrollToMakeVisibleWithSubFocus( 735 WebAXObject::FromWebDocument(document).ScrollToMakeVisibleWithSubFocus(
725 WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height())); 736 WebRect(bounds.x(), bounds.y(), bounds.width(), bounds.height()));
726 } 737 }
727 738
728 } // namespace content 739 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698