summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderTextControlMultiLine.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebCore/rendering/RenderTextControlMultiLine.cpp
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebCore/rendering/RenderTextControlMultiLine.cpp')
-rw-r--r--Source/WebCore/rendering/RenderTextControlMultiLine.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/WebCore/rendering/RenderTextControlMultiLine.cpp b/Source/WebCore/rendering/RenderTextControlMultiLine.cpp
index f40994326..9a121c614 100644
--- a/Source/WebCore/rendering/RenderTextControlMultiLine.cpp
+++ b/Source/WebCore/rendering/RenderTextControlMultiLine.cpp
@@ -32,15 +32,15 @@
namespace WebCore {
-RenderTextControlMultiLine::RenderTextControlMultiLine(Node* node)
- : RenderTextControl(node)
+RenderTextControlMultiLine::RenderTextControlMultiLine(Element* element)
+ : RenderTextControl(element)
{
}
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)
@@ -65,15 +65,15 @@ float RenderTextControlMultiLine::getAvgCharWidth(AtomicString family)
return RenderTextControl::getAvgCharWidth(family);
}
-LayoutUnit RenderTextControlMultiLine::preferredContentWidth(float charWidth) const
+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::computeControlHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const
+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
@@ -104,7 +104,7 @@ RenderObject* RenderTextControlMultiLine::layoutSpecialExcludedChild(bool relayo
if (!placeholderRenderer->isBox())
return placeholderRenderer;
RenderBox* placeholderBox = toRenderBox(placeholderRenderer);
- placeholderBox->style()->setWidth(Length(contentWidth() - placeholderBox->borderAndPaddingWidth(), Fixed));
+ placeholderBox->style()->setLogicalWidth(Length(contentLogicalWidth() - placeholderBox->borderAndPaddingLogicalWidth(), Fixed));
placeholderBox->layoutIfNeeded();
placeholderBox->setX(borderLeft() + paddingLeft());
placeholderBox->setY(borderTop() + paddingTop());