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

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: Address feedback 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
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObject.cpp
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp
index 89f6e47099b1cfdc9644fefe8fbceac54b1d5804..69216056d6e90800a94d00a5a620c75906475241 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,15 @@ bool AXObject::isMenuRelated() const
}
}
+bool AXObject::isPasswordFieldAndShouldHideValue() const
+{
+ Settings* settings = document()->settings();
+ if (!settings || settings->accessibilityPasswordValuesEnabled())
+ return false;
+
+ return isPasswordField();
+}
+
bool AXObject::isTextControl() const
{
switch (roleValue()) {
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698