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

Unified Diff: Source/core/accessibility/AccessibilityRenderObject.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 | « Source/core/accessibility/AccessibilityNodeObject.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AccessibilityRenderObject.cpp
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp
index bb5bf1e4d3c2090368419956975866ec0701fa2e..094a0d10824aa27c95c8393380b37bcf5e2b0515 100644
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp
@@ -1776,8 +1776,6 @@ void AccessibilityRenderObject::setValue(const String& string)
{
if (!m_renderer || !m_renderer->node() || !m_renderer->node()->isElementNode())
return;
- Element* element = toElement(m_renderer->node());
-
if (!m_renderer->isBoxModelObject())
return;
RenderBoxModelObject* renderer = toRenderBoxModelObject(m_renderer);
@@ -1785,10 +1783,10 @@ void AccessibilityRenderObject::setValue(const String& string)
// FIXME: Do we want to do anything here for ARIA textboxes?
if (renderer->isTextField()) {
// FIXME: This is not safe! Other elements could have a TextField renderer.
- toHTMLInputElement(element)->setValue(string);
+ toHTMLInputElement(m_renderer->node())->setValue(string);
} else if (renderer->isTextArea()) {
// FIXME: This is not safe! Other elements could have a TextArea renderer.
- static_cast<HTMLTextAreaElement*>(element)->setValue(string);
+ toHTMLTextAreaElement(m_renderer->node())->setValue(string);
}
}
« no previous file with comments | « Source/core/accessibility/AccessibilityNodeObject.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698