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

Unified Diff: Source/core/rendering/HitTestResult.cpp

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/page/EventHandler.cpp ('k') | Source/core/rendering/RenderButton.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/HitTestResult.cpp
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp
index 384e6ddb4c82bec90a37491eea82a6b5e0cb85e8..af9c7c551c5a183e199db49bc4f559836dd3bd71 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -245,7 +245,7 @@ String HitTestResult::altDisplayString() const
}
if (m_innerNonSharedNode->hasTagName(inputTag)) {
- HTMLInputElement* input = static_cast<HTMLInputElement*>(m_innerNonSharedNode.get());
+ HTMLInputElement* input = toHTMLInputElement(m_innerNonSharedNode.get());
return displayString(input->alt(), m_innerNonSharedNode.get());
}
@@ -375,7 +375,7 @@ bool HitTestResult::isContentEditable() const
return true;
if (m_innerNonSharedNode->hasTagName(inputTag))
- return static_cast<HTMLInputElement*>(m_innerNonSharedNode.get())->isTextField();
+ return toHTMLInputElement(m_innerNonSharedNode.get())->isTextField();
return m_innerNonSharedNode->rendererIsEditable();
}
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/rendering/RenderButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698