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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2106953005: Mac: Add new accessibility attributes for textfields (and some for all views). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ax-attrs
Patch Set: Typo. Created 4 years, 6 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
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 19e5c2ca689acbd6ab7cc7c045d7ef6bdd536c3e..1f41fb769b5d25e8bd1b67a454f4ef3e2336b1c2 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -913,6 +913,8 @@ void Textfield::GetAccessibleState(ui::AXViewState* state) {
} else {
state->value = text();
}
+ state->placeholder = GetPlaceholderText();
+
const gfx::Range range = GetSelectedRange();
state->selection_start = range.start();
state->selection_end = range.end();

Powered by Google App Engine
This is Rietveld 408576698