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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2881723002: Fix TalkBack feedback for password fields in Android O (Closed)
Patch Set: Address feedback Created 3 years, 7 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 | « content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index 6d0f1d2d18e18ad9e9e894197a3a07c7756fea03..4055cc0f6a41f74732161f509f3870dc98f7fab9 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -1718,8 +1718,7 @@ void LayoutText::SecureText(UChar mask) {
void LayoutText::SetText(PassRefPtr<StringImpl> text, bool force) {
DCHECK(text);
- bool equal = Equal(text_.Impl(), text.Get());
- if (equal && !force)
+ if (!force && Equal(text_.Impl(), text.Get()))
return;
SetTextInternal(std::move(text));
@@ -1732,14 +1731,8 @@ void LayoutText::SetText(PassRefPtr<StringImpl> text, bool force) {
LayoutInvalidationReason::kTextChanged);
known_to_have_no_overflow_and_no_fallback_fonts_ = false;
- // Don't bother updating the AX tree if there's no change. Otherwise, when
- // typing in password fields, we would announce each "dot" twice: once when a
- // character is typed, and second when that character is hidden.
- if (!equal) {
- AXObjectCache* cache = GetDocument().ExistingAXObjectCache();
- if (cache)
- cache->TextChanged(this);
- }
+ if (AXObjectCache* cache = GetDocument().ExistingAXObjectCache())
+ cache->TextChanged(this);
TextAutosizer* text_autosizer = GetDocument().GetTextAutosizer();
if (text_autosizer)
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698