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); |
} |
} |