Index: Source/core/accessibility/AXObject.cpp |
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp |
index 1b68e94a7fbcf98e1e814eefba9b4962f64e4a8b..f6fe5786a6758029fecb4499757a64bce70d4457 100644 |
--- a/Source/core/accessibility/AXObject.cpp |
+++ b/Source/core/accessibility/AXObject.cpp |
@@ -29,6 +29,7 @@ |
#include "config.h" |
#include "core/accessibility/AXObject.h" |
+#include "core/InputTypeNames.h" |
#include "core/accessibility/AXObjectCache.h" |
#include "core/dom/NodeTraversal.h" |
#include "core/editing/VisibleUnits.h" |
@@ -630,6 +631,25 @@ const AtomicString& AXObject::getAttribute(const QualifiedName& attribute) const |
return element->fastGetAttribute(attribute); |
} |
+const AtomicString& AXObject::textInputType() const |
dmazzoni
2014/09/26 15:17:26
This looks great, but please move it to AXNodeObje
je_julie(Not used)
2014/09/27 09:05:46
Thanks. I'll update it.
On 2014/09/26 15:17:26, dm
|
+{ |
+ Node* elementNode = node(); |
+ if (!elementNode) |
+ return nullAtom; |
+ |
+ if (!elementNode->isElementNode() ||!isHTMLInputElement(*elementNode)) |
dmazzoni
2014/09/26 15:17:26
nit: space between || and !
je_julie(Not used)
2014/09/27 09:05:46
Thanks, I'll update it.
On 2014/09/26 15:17:26, dm
|
+ return nullAtom; |
+ |
+ Element* element = toElement(elementNode); |
+ const AtomicString& value = element->fastGetAttribute(typeAttr); |
+ |
+ if (equalIgnoringCase(value, InputTypeNames::tel) || equalIgnoringCase(value, InputTypeNames::url) |
+ || equalIgnoringCase(value, InputTypeNames::email) || equalIgnoringCase(value, InputTypeNames::search)) |
+ return value; |
+ |
+ return nullAtom; |
+} |
+ |
bool AXObject::press() const |
{ |
Element* actionElem = actionElement(); |