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

Unified Diff: Source/core/rendering/RenderTextControlMultiLine.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/rendering/RenderBox.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTextControlMultiLine.cpp
diff --git a/Source/core/rendering/RenderTextControlMultiLine.cpp b/Source/core/rendering/RenderTextControlMultiLine.cpp
index 6da489fbf750b4d9f4ac5f2d36a6bac0dec0d496..8a8887d7651da5031e815ba6c147028981365c91 100644
--- a/Source/core/rendering/RenderTextControlMultiLine.cpp
+++ b/Source/core/rendering/RenderTextControlMultiLine.cpp
@@ -36,7 +36,7 @@ RenderTextControlMultiLine::RenderTextControlMultiLine(HTMLTextAreaElement* elem
RenderTextControlMultiLine::~RenderTextControlMultiLine()
{
if (node() && node()->inDocument())
- static_cast<HTMLTextAreaElement*>(node())->rendererWillBeDestroyed();
+ toHTMLTextAreaElement(node())->rendererWillBeDestroyed();
}
bool RenderTextControlMultiLine::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
@@ -63,13 +63,13 @@ float RenderTextControlMultiLine::getAvgCharWidth(AtomicString family)
LayoutUnit RenderTextControlMultiLine::preferredContentLogicalWidth(float charWidth) const
{
- int factor = static_cast<HTMLTextAreaElement*>(node())->cols();
+ int factor = toHTMLTextAreaElement(node())->cols();
return static_cast<LayoutUnit>(ceilf(charWidth * factor)) + scrollbarThickness();
}
LayoutUnit RenderTextControlMultiLine::computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const
{
- return lineHeight * static_cast<HTMLTextAreaElement*>(node())->rows() + nonContentHeight;
+ return lineHeight * toHTMLTextAreaElement(node())->rows() + nonContentHeight;
}
int RenderTextControlMultiLine::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698