| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 if (src.fontFamily().length()) { | 311 if (src.fontFamily().length()) { |
| 312 WebAXObject parent = src.parentObject(); | 312 WebAXObject parent = src.parentObject(); |
| 313 if (parent.isNull() || parent.fontFamily() != src.fontFamily()) | 313 if (parent.isNull() || parent.fontFamily() != src.fontFamily()) |
| 314 dst->AddStringAttribute(ui::AX_ATTR_FONT_FAMILY, src.fontFamily().utf8()); | 314 dst->AddStringAttribute(ui::AX_ATTR_FONT_FAMILY, src.fontFamily().utf8()); |
| 315 } | 315 } |
| 316 | 316 |
| 317 // Font size is in pixels. | 317 // Font size is in pixels. |
| 318 if (src.fontSize()) | 318 if (src.fontSize()) |
| 319 dst->AddFloatAttribute(ui::AX_ATTR_FONT_SIZE, src.fontSize()); | 319 dst->AddFloatAttribute(ui::AX_ATTR_FONT_SIZE, src.fontSize()); |
| 320 | 320 |
| 321 if (src.ariaCurrentState()) { |
| 322 dst->AddIntAttribute(ui::AX_ATTR_ARIA_CURRENT_STATE, |
| 323 AXAriaCurrentStateFromBlink(src.ariaCurrentState())); |
| 324 } |
| 325 |
| 321 if (src.invalidState()) { | 326 if (src.invalidState()) { |
| 322 dst->AddIntAttribute(ui::AX_ATTR_INVALID_STATE, | 327 dst->AddIntAttribute(ui::AX_ATTR_INVALID_STATE, |
| 323 AXInvalidStateFromBlink(src.invalidState())); | 328 AXInvalidStateFromBlink(src.invalidState())); |
| 324 } | 329 } |
| 325 if (src.invalidState() == blink::WebAXInvalidStateOther && | 330 if (src.invalidState() == blink::WebAXInvalidStateOther && |
| 326 src.ariaInvalidValue().length()) { | 331 src.ariaInvalidValue().length()) { |
| 327 dst->AddStringAttribute( | 332 dst->AddStringAttribute( |
| 328 ui::AX_ATTR_ARIA_INVALID_VALUE, src.ariaInvalidValue().utf8()); | 333 ui::AX_ATTR_ARIA_INVALID_VALUE, src.ariaInvalidValue().utf8()); |
| 329 } | 334 } |
| 330 | 335 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 } | 654 } |
| 650 } | 655 } |
| 651 | 656 |
| 652 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 657 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 653 if (render_frame_ && render_frame_->GetWebFrame()) | 658 if (render_frame_ && render_frame_->GetWebFrame()) |
| 654 return render_frame_->GetWebFrame()->document(); | 659 return render_frame_->GetWebFrame()->document(); |
| 655 return WebDocument(); | 660 return WebDocument(); |
| 656 } | 661 } |
| 657 | 662 |
| 658 } // namespace content | 663 } // namespace content |
| OLD | NEW |