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

Unified Diff: components/test_runner/web_ax_object_proxy.cc

Issue 2169273004: Switch all LayoutTests to use new accessibility relative bounding box API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix absolute bounds in AXInlineTextBox::elementRect Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/accessibility/bounds-calc.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/web_ax_object_proxy.cc
diff --git a/components/test_runner/web_ax_object_proxy.cc b/components/test_runner/web_ax_object_proxy.cc
index 1e3de2563968680d7a3af6a0e8e3fd6e3b93531e..574110daf0cb3aa18c8d5d4b1541f4c17082311e 100644
--- a/components/test_runner/web_ax_object_proxy.cc
+++ b/components/test_runner/web_ax_object_proxy.cc
@@ -351,7 +351,9 @@ blink::WebRect BoundsForCharacter(const blink::WebAXObject& object,
end += name.length();
if (characterIndex < start || characterIndex >= end)
continue;
- blink::WebRect inline_text_box_rect = inline_text_box.boundingBoxRect();
+
+ blink::WebFloatRect inline_text_box_rect = BoundsForObject(inline_text_box);
+
int localIndex = characterIndex - start;
blink::WebVector<int> character_offsets;
inline_text_box.characterOffsets(character_offsets);
@@ -732,22 +734,22 @@ std::string WebAXObjectProxy::Language() {
int WebAXObjectProxy::X() {
accessibility_object_.updateLayoutAndCheckValidity();
- return accessibility_object_.boundingBoxRect().x;
+ return BoundsForObject(accessibility_object_).x;
}
int WebAXObjectProxy::Y() {
accessibility_object_.updateLayoutAndCheckValidity();
- return accessibility_object_.boundingBoxRect().y;
+ return BoundsForObject(accessibility_object_).y;
}
int WebAXObjectProxy::Width() {
accessibility_object_.updateLayoutAndCheckValidity();
- return accessibility_object_.boundingBoxRect().width;
+ return BoundsForObject(accessibility_object_).width;
}
int WebAXObjectProxy::Height() {
accessibility_object_.updateLayoutAndCheckValidity();
- return accessibility_object_.boundingBoxRect().height;
+ return BoundsForObject(accessibility_object_).height;
}
int WebAXObjectProxy::IntValue() {
@@ -1354,18 +1356,22 @@ int WebAXObjectProxy::ScrollY() {
}
float WebAXObjectProxy::BoundsX() {
+ accessibility_object_.updateLayoutAndCheckValidity();
return BoundsForObject(accessibility_object_).x;
}
float WebAXObjectProxy::BoundsY() {
+ accessibility_object_.updateLayoutAndCheckValidity();
return BoundsForObject(accessibility_object_).y;
}
float WebAXObjectProxy::BoundsWidth() {
+ accessibility_object_.updateLayoutAndCheckValidity();
return BoundsForObject(accessibility_object_).width;
}
float WebAXObjectProxy::BoundsHeight() {
+ accessibility_object_.updateLayoutAndCheckValidity();
return BoundsForObject(accessibility_object_).height;
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/accessibility/bounds-calc.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698