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

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

Issue 1897443002: Load inline text boxes for focused element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Force re-serialization when focus changes Created 4 years, 7 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
« no previous file with comments | « content/renderer/accessibility/blink_ax_tree_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer_accessibility.h" 5 #include "content/renderer/accessibility/renderer_accessibility.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // will update it. 192 // will update it.
193 // TODO(dmazzoni): remove this as soon as 193 // TODO(dmazzoni): remove this as soon as
194 // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed. 194 // https://bugs.webkit.org/show_bug.cgi?id=73460 is fixed.
195 last_scroll_offset_ = scroll_offset; 195 last_scroll_offset_ = scroll_offset;
196 if (!obj.equals(document.accessibilityObject())) { 196 if (!obj.equals(document.accessibilityObject())) {
197 HandleAXEvent(document.accessibilityObject(), 197 HandleAXEvent(document.accessibilityObject(),
198 ui::AX_EVENT_LAYOUT_COMPLETE); 198 ui::AX_EVENT_LAYOUT_COMPLETE);
199 } 199 }
200 } 200 }
201 201
202 #if defined(OS_ANDROID)
203 // Force the newly focused node to be re-serialized so we include its
204 // inline text boxes.
205 if (event == ui::AX_EVENT_FOCUS)
206 serializer_.DeleteClientSubtree(obj);
207 #endif
208
202 // Add the accessibility object to our cache and ensure it's valid. 209 // Add the accessibility object to our cache and ensure it's valid.
203 AccessibilityHostMsg_EventParams acc_event; 210 AccessibilityHostMsg_EventParams acc_event;
204 acc_event.id = obj.axID(); 211 acc_event.id = obj.axID();
205 acc_event.event_type = event; 212 acc_event.event_type = event;
206 213
207 // Discard duplicate accessibility events. 214 // Discard duplicate accessibility events.
208 for (uint32_t i = 0; i < pending_events_.size(); ++i) { 215 for (uint32_t i = 0; i < pending_events_.size(); ++i) {
209 if (pending_events_[i].id == acc_event.id && 216 if (pending_events_[i].id == acc_event.id &&
210 pending_events_[i].event_type == acc_event.event_type) { 217 pending_events_[i].event_type == acc_event.event_type) {
211 return; 218 return;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 #ifndef NDEBUG 602 #ifndef NDEBUG
596 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id; 603 LOG(WARNING) << "ShowContextMenu on invalid object id " << acc_obj_id;
597 #endif 604 #endif
598 return; 605 return;
599 } 606 }
600 607
601 obj.showContextMenu(); 608 obj.showContextMenu();
602 } 609 }
603 610
604 } // namespace content 611 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/accessibility/blink_ax_tree_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698