Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter_blink.cc

Issue 2217363002: Use relative bounding boxes throughout Chrome accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from aboxhall Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 dict->SetInteger("id", node.GetId()); 42 dict->SetInteger("id", node.GetId());
43 43
44 dict->SetString("internalRole", ui::ToString(node.GetData().role)); 44 dict->SetString("internalRole", ui::ToString(node.GetData().role));
45 45
46 gfx::Rect bounds = gfx::ToEnclosingRect(node.GetData().location); 46 gfx::Rect bounds = gfx::ToEnclosingRect(node.GetData().location);
47 dict->SetInteger("boundsX", bounds.x()); 47 dict->SetInteger("boundsX", bounds.x());
48 dict->SetInteger("boundsY", bounds.y()); 48 dict->SetInteger("boundsY", bounds.y());
49 dict->SetInteger("boundsWidth", bounds.width()); 49 dict->SetInteger("boundsWidth", bounds.width());
50 dict->SetInteger("boundsHeight", bounds.height()); 50 dict->SetInteger("boundsHeight", bounds.height());
51 51
52 gfx::Rect page_bounds = node.GetLocalBoundsRect(); 52 gfx::Rect page_bounds = node.GetPageBoundsRect();
53 dict->SetInteger("pageBoundsX", page_bounds.x()); 53 dict->SetInteger("pageBoundsX", page_bounds.x());
54 dict->SetInteger("pageBoundsY", page_bounds.y()); 54 dict->SetInteger("pageBoundsY", page_bounds.y());
55 dict->SetInteger("pageBoundsWidth", page_bounds.width()); 55 dict->SetInteger("pageBoundsWidth", page_bounds.width());
56 dict->SetInteger("pageBoundsHeight", page_bounds.height()); 56 dict->SetInteger("pageBoundsHeight", page_bounds.height());
57 57
58 dict->SetBoolean("transform", 58 dict->SetBoolean("transform",
59 node.GetData().transform && 59 node.GetData().transform &&
60 !node.GetData().transform->IsIdentity()); 60 !node.GetData().transform->IsIdentity());
61 61
62 for (int state_index = ui::AX_STATE_NONE; 62 for (int state_index = ui::AX_STATE_NONE;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 const std::string AccessibilityTreeFormatterBlink::GetAllowString() { 237 const std::string AccessibilityTreeFormatterBlink::GetAllowString() {
238 return "@BLINK-ALLOW:"; 238 return "@BLINK-ALLOW:";
239 } 239 }
240 240
241 const std::string AccessibilityTreeFormatterBlink::GetDenyString() { 241 const std::string AccessibilityTreeFormatterBlink::GetDenyString() {
242 return "@BLINK-DENY:"; 242 return "@BLINK-DENY:";
243 } 243 }
244 244
245 } // namespace content 245 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698