Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 || | |
|
dmazzoni
2016/04/22 21:43:38
It wasn't my intent for "next on line" and "previo
| |
| 407 dst->role == ui::AX_ROLE_LINE_BREAK || | |
| 408 dst->role == ui::AX_ROLE_INLINE_TEXT_BOX) { | |
| 409 if (!src.nextOnLine().isDetached()) | |
| 410 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID, | |
| 411 src.nextOnLine().axID()); | |
| 412 | |
| 413 if (!src.previousOnLine().isDetached()) { | |
| 414 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, | |
| 415 src.previousOnLine().axID()); | |
| 416 } | |
| 417 } | |
| 418 | |
| 406 if (!src.ariaActiveDescendant().isDetached()) { | 419 if (!src.ariaActiveDescendant().isDetached()) { |
| 407 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, | 420 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, |
| 408 src.ariaActiveDescendant().axID()); | 421 src.ariaActiveDescendant().axID()); |
| 409 } | 422 } |
| 410 | 423 |
| 411 if (!src.url().isEmpty()) | 424 if (!src.url().isEmpty()) |
| 412 dst->AddStringAttribute(ui::AX_ATTR_URL, src.url().string().utf8()); | 425 dst->AddStringAttribute(ui::AX_ATTR_URL, src.url().string().utf8()); |
| 413 | 426 |
| 414 if (dst->role == ui::AX_ROLE_HEADING) | 427 if (dst->role == ui::AX_ROLE_HEADING) |
| 415 dst->AddIntAttribute(ui::AX_ATTR_HIERARCHICAL_LEVEL, src.headingLevel()); | 428 dst->AddIntAttribute(ui::AX_ATTR_HIERARCHICAL_LEVEL, src.headingLevel()); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 640 } | 653 } |
| 641 } | 654 } |
| 642 | 655 |
| 643 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 656 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 644 if (render_frame_ && render_frame_->GetWebFrame()) | 657 if (render_frame_ && render_frame_->GetWebFrame()) |
| 645 return render_frame_->GetWebFrame()->document(); | 658 return render_frame_->GetWebFrame()->document(); |
| 646 return WebDocument(); | 659 return WebDocument(); |
| 647 } | 660 } |
| 648 | 661 |
| 649 } // namespace content | 662 } // namespace content |
| OLD | NEW |