| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 blink::WebString web_description = src.description( | 335 blink::WebString web_description = src.description( |
| 336 nameFrom, descriptionFrom, descriptionObjects); | 336 nameFrom, descriptionFrom, descriptionObjects); |
| 337 if (!web_description.isEmpty()) { | 337 if (!web_description.isEmpty()) { |
| 338 dst->AddStringAttribute(ui::AX_ATTR_DESCRIPTION, web_description.utf8()); | 338 dst->AddStringAttribute(ui::AX_ATTR_DESCRIPTION, web_description.utf8()); |
| 339 dst->AddIntAttribute(ui::AX_ATTR_DESCRIPTION_FROM, | 339 dst->AddIntAttribute(ui::AX_ATTR_DESCRIPTION_FROM, |
| 340 AXDescriptionFromFromBlink(descriptionFrom)); | 340 AXDescriptionFromFromBlink(descriptionFrom)); |
| 341 AddIntListAttributeFromWebObjects( | 341 AddIntListAttributeFromWebObjects( |
| 342 ui::AX_ATTR_DESCRIBEDBY_IDS, descriptionObjects, dst); | 342 ui::AX_ATTR_DESCRIBEDBY_IDS, descriptionObjects, dst); |
| 343 } | 343 } |
| 344 | 344 |
| 345 blink::WebString web_placeholder = src.placeholder(nameFrom, descriptionFrom); | 345 blink::WebString web_placeholder = src.placeholder(nameFrom); |
| 346 if (!web_placeholder.isEmpty()) | 346 if (!web_placeholder.isEmpty()) |
| 347 dst->AddStringAttribute(ui::AX_ATTR_PLACEHOLDER, web_placeholder.utf8()); | 347 dst->AddStringAttribute(ui::AX_ATTR_PLACEHOLDER, web_placeholder.utf8()); |
| 348 | 348 |
| 349 std::string value; | 349 std::string value; |
| 350 if (src.valueDescription().length()) { | 350 if (src.valueDescription().length()) { |
| 351 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.valueDescription().utf8()); | 351 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.valueDescription().utf8()); |
| 352 } else { | 352 } else { |
| 353 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.stringValue().utf8()); | 353 dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.stringValue().utf8()); |
| 354 } | 354 } |
| 355 | 355 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 return WebAXObject(); | 739 return WebAXObject(); |
| 740 | 740 |
| 741 WebDocument document = render_frame_->GetWebFrame()->document(); | 741 WebDocument document = render_frame_->GetWebFrame()->document(); |
| 742 if (!document.isNull()) | 742 if (!document.isNull()) |
| 743 return document.accessibilityObject(); | 743 return document.accessibilityObject(); |
| 744 | 744 |
| 745 return WebAXObject(); | 745 return WebAXObject(); |
| 746 } | 746 } |
| 747 | 747 |
| 748 } // namespace content | 748 } // namespace content |
| OLD | NEW |