| 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; |
| 43 | 46 |
| 44 dict->SetString("internalRole", ui::ToString(node.GetData().role)); | 47 dict->SetString("internalRole", ui::ToString(node.GetData().role)); |
| 45 | 48 |
| 46 gfx::Rect bounds = gfx::ToEnclosingRect(node.GetData().location); | 49 gfx::Rect bounds = gfx::ToEnclosingRect(node.GetData().location); |
| 47 dict->SetInteger("boundsX", bounds.x()); | 50 dict->SetInteger("boundsX", bounds.x()); |
| 48 dict->SetInteger("boundsY", bounds.y()); | 51 dict->SetInteger("boundsY", bounds.y()); |
| 49 dict->SetInteger("boundsWidth", bounds.width()); | 52 dict->SetInteger("boundsWidth", bounds.width()); |
| 50 dict->SetInteger("boundsHeight", bounds.height()); | 53 dict->SetInteger("boundsHeight", bounds.height()); |
| 51 | 54 |
| 52 gfx::Rect page_bounds = node.GetPageBoundsRect(); | 55 gfx::Rect page_bounds = node.GetPageBoundsRect(); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 239 |
| 237 const std::string AccessibilityTreeFormatterBlink::GetAllowString() { | 240 const std::string AccessibilityTreeFormatterBlink::GetAllowString() { |
| 238 return "@BLINK-ALLOW:"; | 241 return "@BLINK-ALLOW:"; |
| 239 } | 242 } |
| 240 | 243 |
| 241 const std::string AccessibilityTreeFormatterBlink::GetDenyString() { | 244 const std::string AccessibilityTreeFormatterBlink::GetDenyString() { |
| 242 return "@BLINK-DENY:"; | 245 return "@BLINK-DENY:"; |
| 243 } | 246 } |
| 244 | 247 |
| 245 } // namespace content | 248 } // namespace content |
| OLD | NEW |