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

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

Issue 813473004: Introducing new API placeHolder() to expose placeholder attribute on MAC (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/modules/accessibility/AXNodeObject.cpp
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
index c6d89e66e6aa230d378bf8a292a074ba5d8674b2..846c9a432f0f383640b781b1777bf9a10605a63e 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -965,6 +965,15 @@ String AXNodeObject::ariaAutoComplete() const
return String();
}
+String AXNodeObject::placeHolder() const
+{
+ if (node() && (isHTMLInputElement(*node()) || isHTMLTextAreaElement(*node()))) {
+ if (hasAttribute(placeholderAttr))
aboxhall 2014/12/18 04:17:54 This should be something like: HTMLInputElement*
+ return getAttribute(placeholderAttr);
+ }
+ return String();
+}
+
String AXNodeObject::text() const
{
// If this is a user defined static text, use the accessible name computation.

Powered by Google App Engine
This is Rietveld 408576698