summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderTextControl.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-05-11 18:35:50 +0100
committerBen Murdoch <benm@google.com>2010-05-14 10:23:05 +0100
commit21939df44de1705786c545cd1bf519d47250322d (patch)
treeef56c310f5c0cdc379c2abb2e212308a3281ce20 /WebCore/rendering/RenderTextControl.cpp
parent4ff1d8891d520763f17675827154340c7c740f90 (diff)
downloadexternal_webkit-21939df44de1705786c545cd1bf519d47250322d.zip
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.gz
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.bz2
Merge Webkit at r58956: Initial merge by Git.
Change-Id: I1d9fb60ea2c3f2ddc04c17a871acdb39353be228
Diffstat (limited to 'WebCore/rendering/RenderTextControl.cpp')
-rw-r--r--WebCore/rendering/RenderTextControl.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp
index 5e19362..1e80ff0 100644
--- a/WebCore/rendering/RenderTextControl.cpp
+++ b/WebCore/rendering/RenderTextControl.cpp
@@ -151,13 +151,12 @@ void RenderTextControl::createSubtreeIfNeeded(TextControlInnerElement* innerBloc
int RenderTextControl::textBlockHeight() const
{
- return height() - paddingTop() - paddingBottom() - borderTop() - borderBottom();
+ return height() - borderAndPaddingHeight();
}
int RenderTextControl::textBlockWidth() const
{
- return width() - paddingLeft() - paddingRight() - borderLeft() - borderRight()
- - m_innerText->renderBox()->paddingLeft() - m_innerText->renderBox()->paddingRight();
+ return width() - borderAndPaddingWidth() - m_innerText->renderBox()->paddingLeft() - m_innerText->renderBox()->paddingRight();
}
void RenderTextControl::updateFromElement()
@@ -410,7 +409,7 @@ void RenderTextControl::calcHeight()
m_innerText->renderBox()->marginTop() + m_innerText->renderBox()->marginBottom());
adjustControlHeightBasedOnLineHeight(m_innerText->renderer()->lineHeight(true, true));
- setHeight(height() + paddingTop() + paddingBottom() + borderTop() + borderBottom());
+ setHeight(height() + borderAndPaddingHeight());
// We are able to have a horizontal scrollbar if the overflow style is scroll, or if its auto and there's no word wrap.
if (style()->overflowX() == OSCROLL || (style()->overflowX() == OAUTO && m_innerText->renderer()->style()->wordWrap() == NormalWordWrap))
@@ -434,13 +433,6 @@ void RenderTextControl::forwardEvent(Event* event)
m_innerText->defaultEventHandler(event);
}
-IntRect RenderTextControl::controlClipRect(int tx, int ty) const
-{
- IntRect clipRect = contentBoxRect();
- clipRect.move(tx, ty);
- return clipRect;
-}
-
static const char* fontFamiliesWithInvalidCharWidth[] = {
"American Typewriter",
"Arial Hebrew",
@@ -541,7 +533,7 @@ void RenderTextControl::calcPrefWidths()
m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
}
- int toAdd = paddingLeft() + paddingRight() + borderLeft() + borderRight();
+ int toAdd = borderAndPaddingWidth();
m_minPrefWidth += toAdd;
m_maxPrefWidth += toAdd;