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()) | |
dmazzoni
2015/01/05 09:15:16
nit: add { } because the block has multiple lines
| |
292 dst->AddStringAttribute(ui::AX_ATTR_PLACEHOLDER, | |
293 UTF16ToUTF8(src.placeholder())); | |
291 if (src.keyboardShortcut().length()) { | 294 if (src.keyboardShortcut().length()) { |
292 dst->AddStringAttribute(ui::AX_ATTR_SHORTCUT, | 295 dst->AddStringAttribute(ui::AX_ATTR_SHORTCUT, |
293 UTF16ToUTF8(src.keyboardShortcut())); | 296 UTF16ToUTF8(src.keyboardShortcut())); |
294 } | 297 } |
295 if (!src.titleUIElement().isDetached()) { | 298 if (!src.titleUIElement().isDetached()) { |
296 dst->AddIntAttribute(ui::AX_ATTR_TITLE_UI_ELEMENT, | 299 dst->AddIntAttribute(ui::AX_ATTR_TITLE_UI_ELEMENT, |
297 src.titleUIElement().axID()); | 300 src.titleUIElement().axID()); |
298 } | 301 } |
299 if (!src.ariaActiveDescendant().isDetached()) { | 302 if (!src.ariaActiveDescendant().isDetached()) { |
300 dst->AddIntAttribute(ui::AX_ATTR_ACTIVEDESCENDANT_ID, | 303 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); | 572 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
570 } | 573 } |
571 | 574 |
572 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 575 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
573 if (render_frame_ && render_frame_->GetWebFrame()) | 576 if (render_frame_ && render_frame_->GetWebFrame()) |
574 return render_frame_->GetWebFrame()->document(); | 577 return render_frame_->GetWebFrame()->document(); |
575 return WebDocument(); | 578 return WebDocument(); |
576 } | 579 } |
577 | 580 |
578 } // namespace content | 581 } // namespace content |
OLD | NEW |