OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "content/browser/accessibility/accessibility_tree_formatter_blink.h" | 9 #include "content/browser/accessibility/accessibility_tree_formatter_blink.h" |
10 #include "ui/gfx/geometry/rect_conversions.h" | 10 #include "ui/gfx/geometry/rect_conversions.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 if (node.HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) | 33 if (node.HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) |
34 return node.PlatformGetChild(i); | 34 return node.PlatformGetChild(i); |
35 else | 35 else |
36 return node.InternalGetChild(i); | 36 return node.InternalGetChild(i); |
37 } | 37 } |
38 | 38 |
39 void AccessibilityTreeFormatterBlink::AddProperties( | 39 void AccessibilityTreeFormatterBlink::AddProperties( |
40 const BrowserAccessibility& node, | 40 const BrowserAccessibility& node, |
41 base::DictionaryValue* dict) { | 41 base::DictionaryValue* dict) { |
42 dict->SetInteger("id", node.GetId()); | 42 dict->SetInteger("id", node.GetId()); |
43 auto lines = node.GetLineStartOffsets(); | |
44 for (auto& l : lines) | |
45 DLOG(ERROR) << "Nektar: ui::ToString(node.GetData().role)" << l; | |
46 | 43 |
47 dict->SetString("internalRole", ui::ToString(node.GetData().role)); | 44 dict->SetString("internalRole", ui::ToString(node.GetData().role)); |
48 | 45 |
49 gfx::Rect bounds = gfx::ToEnclosingRect(node.GetData().location); | 46 gfx::Rect bounds = gfx::ToEnclosingRect(node.GetData().location); |
50 dict->SetInteger("boundsX", bounds.x()); | 47 dict->SetInteger("boundsX", bounds.x()); |
51 dict->SetInteger("boundsY", bounds.y()); | 48 dict->SetInteger("boundsY", bounds.y()); |
52 dict->SetInteger("boundsWidth", bounds.width()); | 49 dict->SetInteger("boundsWidth", bounds.width()); |
53 dict->SetInteger("boundsHeight", bounds.height()); | 50 dict->SetInteger("boundsHeight", bounds.height()); |
54 | 51 |
55 gfx::Rect page_bounds = node.GetPageBoundsRect(); | 52 gfx::Rect page_bounds = node.GetPageBoundsRect(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 236 |
240 const std::string AccessibilityTreeFormatterBlink::GetAllowString() { | 237 const std::string AccessibilityTreeFormatterBlink::GetAllowString() { |
241 return "@BLINK-ALLOW:"; | 238 return "@BLINK-ALLOW:"; |
242 } | 239 } |
243 | 240 |
244 const std::string AccessibilityTreeFormatterBlink::GetDenyString() { | 241 const std::string AccessibilityTreeFormatterBlink::GetDenyString() { |
245 return "@BLINK-DENY:"; | 242 return "@BLINK-DENY:"; |
246 } | 243 } |
247 | 244 |
248 } // namespace content | 245 } // namespace content |
OLD | NEW |