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

Unified Diff: views/controls/label.cc

Issue 1616004: Fix Regression for Accessible Names (Closed)
Patch Set: Created 10 years, 9 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: views/controls/label.cc
diff --git a/views/controls/label.cc b/views/controls/label.cc
index 16b1802409aba52cddef291c32d1f764965d3ed8..19060f694a9d10d9efbd5ff559492c5d354c8d8a 100644
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -119,6 +119,7 @@ void Label::SetText(const std::wstring& text) {
text_ = text;
url_set_ = false;
text_size_valid_ = false;
+ SetAccessibleName(text);
SchedulePaint();
}
@@ -251,12 +252,6 @@ bool Label::GetAccessibleRole(AccessibilityTypes::Role* role) {
return true;
}
-bool Label::GetAccessibleName(std::wstring* name) {
- DCHECK(name);
- *name = GetText();
- return !name->empty();
-}
-
bool Label::GetAccessibleState(AccessibilityTypes::State* state) {
DCHECK(state);

Powered by Google App Engine
This is Rietveld 408576698