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

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

Issue 596393004: Add AX attribute for input type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move TextInputType to AXNodeObject Created 6 years, 3 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 | « Source/core/accessibility/AXNodeObject.h ('k') | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXNodeObject.cpp
diff --git a/Source/core/accessibility/AXNodeObject.cpp b/Source/core/accessibility/AXNodeObject.cpp
index 34c1230cd4d494dc4864058f43f7edffccbb22fe..957705226bc274955751a9512f20a57e42c00f2c 100644
--- a/Source/core/accessibility/AXNodeObject.cpp
+++ b/Source/core/accessibility/AXNodeObject.cpp
@@ -1041,6 +1041,20 @@ String AXNodeObject::stringValue() const
return String();
}
+
+const AtomicString& AXNodeObject::textInputType() const
+{
+ Node* node = this->node();
+ if (!isHTMLInputElement(node))
+ return nullAtom;
+
+ HTMLInputElement& input = toHTMLInputElement(*node);
+ if (input.type() == InputTypeNames::tel || input.type() == InputTypeNames::url
dglazkov 2014/10/01 04:37:11 Should this just be input.isTextField()?
je_julie(Not used) 2014/10/01 04:53:52 I'm referencing to implementation from FireFox for
dmazzoni 2014/10/01 05:22:57 I think isTextField is probably more correct. Sear
+ || input.type() == InputTypeNames::email || input.type() == InputTypeNames::search)
+ return input.type();
+ return nullAtom;
+}
+
String AXNodeObject::ariaDescribedByAttribute() const
{
WillBeHeapVector<RawPtrWillBeMember<Element> > elements;
« no previous file with comments | « Source/core/accessibility/AXNodeObject.h ('k') | Source/core/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698