| 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 || | 406 if (!src.nextOnLine().isDetached()) { |
| 407 dst->role == ui::AX_ROLE_LINE_BREAK || | 407 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID, src.nextOnLine().axID()); |
| 408 dst->role == ui::AX_ROLE_INLINE_TEXT_BOX) { | 408 } |
| 409 if (!src.nextOnLine().isDetached()) { | |
| 410 dst->AddIntAttribute(ui::AX_ATTR_NEXT_ON_LINE_ID, | |
| 411 src.nextOnLine().axID()); | |
| 412 } | |
| 413 | 409 |
| 414 if (!src.previousOnLine().isDetached()) { | 410 if (!src.previousOnLine().isDetached()) { |
| 415 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, | 411 dst->AddIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, |
| 416 src.previousOnLine().axID()); | 412 src.previousOnLine().axID()); |
| 417 } | |
| 418 } | 413 } |
| 419 | 414 |
| 420 if (!src.ariaActiveDescendant().isDetached()) { | 415 if (!src.ariaActiveDescendant().isDetached()) { |
| 421 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, | 416 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, |
| 422 src.ariaActiveDescendant().axID()); | 417 src.ariaActiveDescendant().axID()); |
| 423 } | 418 } |
| 424 | 419 |
| 425 if (!src.url().isEmpty()) | 420 if (!src.url().isEmpty()) |
| 426 dst->AddStringAttribute(ui::AX_ATTR_URL, src.url().string().utf8()); | 421 dst->AddStringAttribute(ui::AX_ATTR_URL, src.url().string().utf8()); |
| 427 | 422 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 } | 649 } |
| 655 } | 650 } |
| 656 | 651 |
| 657 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 652 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 658 if (render_frame_ && render_frame_->GetWebFrame()) | 653 if (render_frame_ && render_frame_->GetWebFrame()) |
| 659 return render_frame_->GetWebFrame()->document(); | 654 return render_frame_->GetWebFrame()->document(); |
| 660 return WebDocument(); | 655 return WebDocument(); |
| 661 } | 656 } |
| 662 | 657 |
| 663 } // namespace content | 658 } // namespace content |
| OLD | NEW |