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

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

Issue 19096009: Use isHTMLTextAreaElement and toHTMLTextAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 5 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 | « no previous file | Source/core/accessibility/AccessibilityRenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AccessibilityNodeObject.cpp
diff --git a/Source/core/accessibility/AccessibilityNodeObject.cpp b/Source/core/accessibility/AccessibilityNodeObject.cpp
index 5f5ba91c626143af94a7682236c33295c465a8ab..ec36ae78dd2c6abee8db42b27610e4545c904a6c 100644
--- a/Source/core/accessibility/AccessibilityNodeObject.cpp
+++ b/Source/core/accessibility/AccessibilityNodeObject.cpp
@@ -201,7 +201,7 @@ AccessibilityRole AccessibilityNodeObject::determineAccessibilityRole()
HTMLSelectElement* selectElement = toHTMLSelectElement(node());
return selectElement->multiple() ? ListBoxRole : PopUpButtonRole;
}
- if (node()->hasTagName(textareaTag))
+ if (isHTMLTextAreaElement(node()))
return TextAreaRole;
if (headingLevel())
return HeadingRole;
@@ -582,7 +582,7 @@ bool AccessibilityNodeObject::isNativeTextControl() const
if (!node)
return false;
- if (node->hasTagName(textareaTag))
+ if (isHTMLTextAreaElement(node))
return true;
if (node->hasTagName(inputTag)) {
@@ -697,7 +697,7 @@ bool AccessibilityNodeObject::isReadOnly() const
if (!node)
return true;
- if (node->hasTagName(textareaTag))
+ if (isHTMLTextAreaElement(node))
return toHTMLFormControlElement(node)->isReadOnly();
if (node->hasTagName(inputTag)) {
@@ -831,7 +831,7 @@ String AccessibilityNodeObject::text() const
if (!node)
return String();
- if (isNativeTextControl() && (node->hasTagName(textareaTag) || node->hasTagName(inputTag)))
+ if (isNativeTextControl() && (isHTMLTextAreaElement(node) || node->hasTagName(inputTag)))
return toHTMLTextFormControlElement(node)->value();
if (!node->isElementNode())
« no previous file with comments | « no previous file | Source/core/accessibility/AccessibilityRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698