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

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

Issue 1941463002: Removes the restriction placed on the role of the accessibility object when calling the next/previo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/blink_ax_tree_source.h" 5 #include "content/renderer/accessibility/blink_ax_tree_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 if (parent.isNull() || parent.language() != src.language()) 396 if (parent.isNull() || parent.language() != src.language())
397 dst->AddStringAttribute(ui::AX_ATTR_LANGUAGE, src.language().utf8()); 397 dst->AddStringAttribute(ui::AX_ATTR_LANGUAGE, src.language().utf8());
398 } 398 }
399 399
400 if (src.keyboardShortcut().length()) { 400 if (src.keyboardShortcut().length()) {
401 dst->AddStringAttribute( 401 dst->AddStringAttribute(
402 ui::AX_ATTR_SHORTCUT, 402 ui::AX_ATTR_SHORTCUT,
403 src.keyboardShortcut().utf8()); 403 src.keyboardShortcut().utf8());
404 } 404 }
405 405
406 if (dst->role == ui::AX_ROLE_STATIC_TEXT ||
407 dst->role == ui::AX_ROLE_LINE_BREAK ||
408 dst->role == ui::AX_ROLE_INLINE_TEXT_BOX) {
409 if (!src.nextOnLine().isDetached()) { 406 if (!src.nextOnLine().isDetached()) {
dmazzoni 2016/04/29 23:02:14 nit: remove indent
410 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID, 407 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID,
411 src.nextOnLine().axID()); 408 src.nextOnLine().axID());
412 } 409 }
413 410
414 if (!src.previousOnLine().isDetached()) { 411 if (!src.previousOnLine().isDetached()) {
415 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, 412 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID,
416 src.previousOnLine().axID()); 413 src.previousOnLine().axID());
417 } 414 }
418 }
419 415
420 if (!src.ariaActiveDescendant().isDetached()) { 416 if (!src.ariaActiveDescendant().isDetached()) {
421 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, 417 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID,
422 src.ariaActiveDescendant().axID()); 418 src.ariaActiveDescendant().axID());
423 } 419 }
424 420
425 if (!src.url().isEmpty()) 421 if (!src.url().isEmpty())
426 dst->AddStringAttribute(ui::AX_ATTR_URL, src.url().string().utf8()); 422 dst->AddStringAttribute(ui::AX_ATTR_URL, src.url().string().utf8());
427 423
428 if (dst->role == ui::AX_ROLE_HEADING) 424 if (dst->role == ui::AX_ROLE_HEADING)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 } 650 }
655 } 651 }
656 652
657 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 653 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
658 if (render_frame_ && render_frame_->GetWebFrame()) 654 if (render_frame_ && render_frame_->GetWebFrame())
659 return render_frame_->GetWebFrame()->document(); 655 return render_frame_->GetWebFrame()->document();
660 return WebDocument(); 656 return WebDocument();
661 } 657 }
662 658
663 } // namespace content 659 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698