summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderTextControl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderTextControl.cpp')
-rw-r--r--WebCore/rendering/RenderTextControl.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp
index e66e4ed..f48081b 100644
--- a/WebCore/rendering/RenderTextControl.cpp
+++ b/WebCore/rendering/RenderTextControl.cpp
@@ -401,7 +401,7 @@ int RenderTextControl::scrollbarThickness() const
return ScrollbarTheme::nativeTheme()->scrollbarThickness();
}
-void RenderTextControl::calcHeight()
+void RenderTextControl::computeLogicalHeight()
{
setHeight(m_innerText->renderBox()->borderTop() + m_innerText->renderBox()->borderBottom() +
m_innerText->renderBox()->paddingTop() + m_innerText->renderBox()->paddingBottom() +
@@ -414,7 +414,7 @@ void RenderTextControl::calcHeight()
if (style()->overflowX() == OSCROLL || (style()->overflowX() == OAUTO && m_innerText->renderer()->style()->wordWrap() == NormalWordWrap))
setHeight(height() + scrollbarThickness());
- RenderBlock::calcHeight();
+ RenderBlock::computeLogicalHeight();
}
void RenderTextControl::hitInnerTextElement(HitTestResult& result, int xPos, int yPos, int tx, int ty)
@@ -504,40 +504,40 @@ float RenderTextControl::scaleEmToUnits(int x) const
return roundf(style()->font().size() * x / unitsPerEm);
}
-void RenderTextControl::calcPrefWidths()
+void RenderTextControl::computePreferredLogicalWidths()
{
- ASSERT(prefWidthsDirty());
+ ASSERT(preferredLogicalWidthsDirty());
- m_minPrefWidth = 0;
- m_maxPrefWidth = 0;
+ m_minPreferredLogicalWidth = 0;
+ m_maxPreferredLogicalWidth = 0;
if (style()->width().isFixed() && style()->width().value() > 0)
- m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
else {
// Use average character width. Matches IE.
AtomicString family = style()->font().family().family();
- m_maxPrefWidth = preferredContentWidth(getAvgCharWidth(family)) + m_innerText->renderBox()->paddingLeft() + m_innerText->renderBox()->paddingRight();
+ m_maxPreferredLogicalWidth = preferredContentWidth(getAvgCharWidth(family)) + m_innerText->renderBox()->paddingLeft() + m_innerText->renderBox()->paddingRight();
}
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
- m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
- m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
} else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
- m_minPrefWidth = 0;
+ m_minPreferredLogicalWidth = 0;
else
- m_minPrefWidth = m_maxPrefWidth;
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
- m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
- m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
}
int toAdd = borderAndPaddingWidth();
- m_minPrefWidth += toAdd;
- m_maxPrefWidth += toAdd;
+ m_minPreferredLogicalWidth += toAdd;
+ m_maxPreferredLogicalWidth += toAdd;
- setPrefWidthsDirty(false);
+ setPreferredLogicalWidthsDirty(false);
}
void RenderTextControl::selectionChanged(bool userTriggered)