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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 if (src.accessibilityDescription().length()) { | 281 if (src.accessibilityDescription().length()) { |
282 dst->AddStringAttribute(ui::AX_ATTR_DESCRIPTION, | 282 dst->AddStringAttribute(ui::AX_ATTR_DESCRIPTION, |
283 UTF16ToUTF8(src.accessibilityDescription())); | 283 UTF16ToUTF8(src.accessibilityDescription())); |
284 } | 284 } |
285 if (src.hasComputedStyle()) { | 285 if (src.hasComputedStyle()) { |
286 dst->AddStringAttribute(ui::AX_ATTR_DISPLAY, | 286 dst->AddStringAttribute(ui::AX_ATTR_DISPLAY, |
287 UTF16ToUTF8(src.computedStyleDisplay())); | 287 UTF16ToUTF8(src.computedStyleDisplay())); |
288 } | 288 } |
289 if (src.helpText().length()) | 289 if (src.helpText().length()) |
290 dst->AddStringAttribute(ui::AX_ATTR_HELP, UTF16ToUTF8(src.helpText())); | 290 dst->AddStringAttribute(ui::AX_ATTR_HELP, UTF16ToUTF8(src.helpText())); |
| 291 if (src.placeholder().length()) { |
| 292 dst->AddStringAttribute(ui::AX_ATTR_PLACEHOLDER, |
| 293 UTF16ToUTF8(src.placeholder())); |
| 294 } |
291 if (src.keyboardShortcut().length()) { | 295 if (src.keyboardShortcut().length()) { |
292 dst->AddStringAttribute(ui::AX_ATTR_SHORTCUT, | 296 dst->AddStringAttribute(ui::AX_ATTR_SHORTCUT, |
293 UTF16ToUTF8(src.keyboardShortcut())); | 297 UTF16ToUTF8(src.keyboardShortcut())); |
294 } | 298 } |
295 if (!src.titleUIElement().isDetached()) { | 299 if (!src.titleUIElement().isDetached()) { |
296 dst->AddIntAttribute(ui::AX_ATTR_TITLE_UI_ELEMENT, | 300 dst->AddIntAttribute(ui::AX_ATTR_TITLE_UI_ELEMENT, |
297 src.titleUIElement().axID()); | 301 src.titleUIElement().axID()); |
298 } | 302 } |
299 if (!src.ariaActiveDescendant().isDetached()) { | 303 if (!src.ariaActiveDescendant().isDetached()) { |
300 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, | 304 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); | 573 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
570 } | 574 } |
571 | 575 |
572 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 576 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
573 if (render_frame_ && render_frame_->GetWebFrame()) | 577 if (render_frame_ && render_frame_->GetWebFrame()) |
574 return render_frame_->GetWebFrame()->document(); | 578 return render_frame_->GetWebFrame()->document(); |
575 return WebDocument(); | 579 return WebDocument(); |
576 } | 580 } |
577 | 581 |
578 } // namespace content | 582 } // namespace content |
OLD | NEW |