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

Unified Diff: Source/core/accessibility/AXObject.cpp

Issue 704363004: Add an accessibility setting to expose password values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/core/accessibility/AXObject.cpp
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp
index 89f6e47099b1cfdc9644fefe8fbceac54b1d5804..59ff4d6d60ad959a3cc337c4e9e8caf5ccecc622 100644
--- a/Source/core/accessibility/AXObject.cpp
+++ b/Source/core/accessibility/AXObject.cpp
@@ -34,6 +34,7 @@
#include "core/editing/VisibleUnits.h"
#include "core/editing/htmlediting.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/rendering/RenderListItem.h"
#include "core/rendering/RenderTheme.h"
#include "core/rendering/RenderView.h"
@@ -214,6 +215,18 @@ bool AXObject::isMenuRelated() const
}
}
+bool AXObject::isPasswordFieldAndShouldHideValue() const
+{
+ if (!isPasswordField())
+ return false;
+
+ Settings* settings = document()->settings();
+ if (!settings || settings->accessibilityPasswordValuesEnabled())
+ return false;
+
+ return true;
Mike West 2014/11/07 09:51:28 Nit: This seems slightly more readable if you drop
dmazzoni 2014/11/07 22:33:42 Done.
+}
+
bool AXObject::isTextControl() const
{
switch (roleValue()) {

Powered by Google App Engine
This is Rietveld 408576698