| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/accessibility_node_serializer.h" | 5 #include "content/renderer/accessibility/accessibility_node_serializer.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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 if (dst->role == ui::AX_ROLE_COLOR_WELL) { | 97 if (dst->role == ui::AX_ROLE_COLOR_WELL) { |
| 98 int r, g, b; | 98 int r, g, b; |
| 99 src.colorValue(r, g, b); | 99 src.colorValue(r, g, b); |
| 100 dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE_RED, r); | 100 dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE_RED, r); |
| 101 dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE_GREEN, g); | 101 dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE_GREEN, g); |
| 102 dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE_BLUE, b); | 102 dst->AddIntAttribute(ui::AX_ATTR_COLOR_VALUE_BLUE, b); |
| 103 } | 103 } |
| 104 | 104 |
| 105 if (dst->role == ui::AX_ROLE_INLINE_TEXT_BOX) { | 105 if (dst->role == ui::AX_ROLE_INLINE_TEXT_BOX) { |
| 106 dst->AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION, src.textDirection()); | 106 dst->AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION, |
| 107 AXTextDirectionFromBlink(src.textDirection())); |
| 107 | 108 |
| 108 WebVector<int> src_character_offsets; | 109 WebVector<int> src_character_offsets; |
| 109 src.characterOffsets(src_character_offsets); | 110 src.characterOffsets(src_character_offsets); |
| 110 std::vector<int32> character_offsets; | 111 std::vector<int32> character_offsets; |
| 111 character_offsets.reserve(src_character_offsets.size()); | 112 character_offsets.reserve(src_character_offsets.size()); |
| 112 for (size_t i = 0; i < src_character_offsets.size(); ++i) | 113 for (size_t i = 0; i < src_character_offsets.size(); ++i) |
| 113 character_offsets.push_back(src_character_offsets[i]); | 114 character_offsets.push_back(src_character_offsets[i]); |
| 114 dst->AddIntListAttribute(ui::AX_ATTR_CHARACTER_OFFSETS, character_offsets); | 115 dst->AddIntListAttribute(ui::AX_ATTR_CHARACTER_OFFSETS, character_offsets); |
| 115 | 116 |
| 116 WebVector<int> src_word_starts; | 117 WebVector<int> src_word_starts; |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 WebNode node = parent.node(); | 437 WebNode node = parent.node(); |
| 437 if (!node.isNull() && node.isElementNode()) { | 438 if (!node.isNull() && node.isElementNode()) { |
| 438 WebElement element = node.to<WebElement>(); | 439 WebElement element = node.to<WebElement>(); |
| 439 is_iframe = (element.tagName() == base::ASCIIToUTF16("IFRAME")); | 440 is_iframe = (element.tagName() == base::ASCIIToUTF16("IFRAME")); |
| 440 } | 441 } |
| 441 | 442 |
| 442 return (is_iframe || IsParentUnignoredOf(parent, child)); | 443 return (is_iframe || IsParentUnignoredOf(parent, child)); |
| 443 } | 444 } |
| 444 | 445 |
| 445 } // namespace content | 446 } // namespace content |
| OLD | NEW |