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

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: incorporating comments 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
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXNodeObject.cpp
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
index e9445935c010a82c94d42c682a509a8d913ff829..f60bf63eb7f89e91d50400f4fcd0b0aaa64cd718 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -967,6 +967,21 @@ String AXNodeObject::ariaAutoComplete() const
return String();
}
+String AXNodeObject::placeholder() const
+{
+ String placeholder;
+ if (node()) {
+ if (isHTMLInputElement(*node())) {
+ HTMLInputElement* inputElement = toHTMLInputElement(node());
+ placeholder = inputElement->strippedPlaceholder();
+ } else if (isHTMLTextAreaElement(*node())) {
+ HTMLTextAreaElement* textAreaElement = toHTMLTextAreaElement(node());
+ placeholder = textAreaElement->strippedPlaceholder();
+ }
+ }
+ return placeholder;
+}
+
String AXNodeObject::text() const
{
// If this is a user defined static text, use the accessible name computation.
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698