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

Unified Diff: components/test_runner/web_ax_object_proxy.cc

Issue 2492083002: Implement aria-placeholder (Closed)
Patch Set: Rebaseline android placeholder test Created 4 years, 1 month 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
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 8ab655ff78921a80191dcac3dac7599e09e44dbd..8429f20cdfefa571a1067f958fc221674d641150 100644
--- a/components/test_runner/web_ax_object_proxy.cc
+++ b/components/test_runner/web_ax_object_proxy.cc
@@ -666,6 +666,7 @@ WebAXObjectProxy::GetObjectTemplateBuilder(v8::Isolate* isolate) {
.SetMethod("nameElementAtIndex", &WebAXObjectProxy::NameElementAtIndex)
.SetProperty("description", &WebAXObjectProxy::Description)
.SetProperty("descriptionFrom", &WebAXObjectProxy::DescriptionFrom)
+ .SetProperty("placeholder", &WebAXObjectProxy::Placeholder)
.SetProperty("misspellingsCount", &WebAXObjectProxy::MisspellingsCount)
.SetMethod("descriptionElementCount",
&WebAXObjectProxy::DescriptionElementCount)
@@ -674,12 +675,9 @@ WebAXObjectProxy::GetObjectTemplateBuilder(v8::Isolate* isolate) {
//
// NEW bounding rect calculation - low-level interface
//
- .SetMethod("offsetContainer",
- &WebAXObjectProxy::OffsetContainer)
- .SetMethod("boundsInContainerX",
- &WebAXObjectProxy::BoundsInContainerX)
- .SetMethod("boundsInContainerY",
- &WebAXObjectProxy::BoundsInContainerY)
+ .SetMethod("offsetContainer", &WebAXObjectProxy::OffsetContainer)
+ .SetMethod("boundsInContainerX", &WebAXObjectProxy::BoundsInContainerX)
+ .SetMethod("boundsInContainerY", &WebAXObjectProxy::BoundsInContainerY)
.SetMethod("boundsInContainerWidth",
&WebAXObjectProxy::BoundsInContainerWidth)
.SetMethod("boundsInContainerHeight",
@@ -1552,8 +1550,6 @@ std::string WebAXObjectProxy::DescriptionFrom() {
return "attribute";
case blink::WebAXDescriptionFromContents:
return "contents";
- case blink::WebAXDescriptionFromPlaceholder:
- return "placeholder";
case blink::WebAXDescriptionFromRelatedElement:
return "relatedElement";
}
@@ -1562,6 +1558,14 @@ std::string WebAXObjectProxy::DescriptionFrom() {
return std::string();
}
+std::string WebAXObjectProxy::Placeholder() {
+ accessibility_object_.updateLayoutAndCheckValidity();
+ blink::WebAXNameFrom nameFrom;
+ blink::WebVector<blink::WebAXObject> nameObjects;
+ accessibility_object_.name(nameFrom, nameObjects);
+ return accessibility_object_.placeholder(nameFrom).utf8();
+}
+
int WebAXObjectProxy::MisspellingsCount() {
accessibility_object_.updateLayoutAndCheckValidity();
return GetMisspellings(accessibility_object_).size();
« no previous file with comments | « components/test_runner/web_ax_object_proxy.h ('k') | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698