Commit c59ad194 authored by timothy@apple.com's avatar timothy@apple.com

Fixes: Bug 19679: iframes with a height of 32,768px or greater do not layout correctly

WebCore:

2008-06-19  Timothy Hatcher  <timothy@apple.com>

        Changed all lineHeight, baselinePosition and verticalPositionHint
        calls to return int instead of short. The short was overflowing
        when a value greater than 32,767 was encountered.

        Fixes: iframes with a height of 32,768px or greater do not layout correctly
        https://bugs.webkit.org/show_bug.cgi?id=19679

        Reviewed by Dave Hyatt.

        Test: fast/css/line-height-overflow.html

        * rendering/RenderBR.cpp:
        (WebCore::RenderBR::baselinePosition):
        * rendering/RenderBR.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::lineHeight):
        * rendering/RenderBlock.h:
        * rendering/RenderFlow.cpp:
        * rendering/RenderFlow.h:
        * rendering/RenderListBox.cpp:
        * rendering/RenderListBox.h:
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::lineHeight):
        * rendering/RenderListMarker.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::verticalPositionHint):
        * rendering/RenderObject.h:
        (WebCore::):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::lineHeight):
        * rendering/RenderPath.h:
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::lineHeight):
        * rendering/RenderReplaced.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::lineHeight):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGHiddenContainer.cpp:
        (WebCore::RenderSVGHiddenContainer::lineHeight):
        * rendering/RenderSVGHiddenContainer.h:
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::lineHeight):
        * rendering/RenderSVGRoot.h:
        * rendering/RenderSlider.cpp:
        * rendering/RenderSlider.h:
        * rendering/RenderTableCell.cpp:
        * rendering/RenderTableCell.h:
        * rendering/RenderTableCol.h:
        * rendering/RenderTableRow.h:
        * rendering/RenderTableSection.h:
        * rendering/RenderText.cpp:
        * rendering/RenderText.h:
        * rendering/RenderTextControl.cpp:
        * rendering/RenderTextControl.h:
        * rendering/RenderTheme.cpp:
        * rendering/RenderTheme.h:
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        * rendering/RenderThemeSafari.cpp:
        * rendering/RenderThemeSafari.h:

LayoutTests:

2008-06-19  Timothy Hatcher  <timothy@apple.com>

        Test for: iframes with a height of 32,768px or greater do not layout correctly
        https://bugs.webkit.org/show_bug.cgi?id=19679

        Reviewed by Dave Hyatt.

        * fast/css/line-height-overflow.html: Added.
        * platform/mac/fast/css/line-height-overflow-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9f7cc0e3
2008-06-20 Timothy Hatcher <timothy@apple.com>
Test for: iframes with a height of 32,768px or greater do not layout correctly
https://bugs.webkit.org/show_bug.cgi?id=19679
Reviewed by Dave Hyatt.
* fast/css/line-height-overflow.html: Added.
* platform/mac/fast/css/line-height-overflow-expected.txt: Added.
2008-06-20 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
You should see a large green block below that is 32,768px tall. No red should be visible.<br>
<div style="height: 32768px; background-color: red">
<iframe style="height: 32768px; width: 100%; background-color: green; border: none"></iframe>
</div>
layer at (0,0) size 785x32802
RenderView at (0,0) size 785x600
layer at (0,0) size 785x32802
RenderBlock {HTML} at (0,0) size 785x32802
RenderBody {BODY} at (8,8) size 769x32786
RenderBlock (anonymous) at (0,0) size 769x18
RenderText {#text} at (0,0) size 559x18
text run at (0,0) width 559: "You should see a large green block below that is 32,768px tall. No red should be visible."
RenderBR {BR} at (559,14) size 0x0
RenderBlock {DIV} at (0,18) size 769x32768 [bgcolor=#FF0000]
RenderPartObject {IFRAME} at (0,0) size 769x32768 [bgcolor=#008000]
layer at (0,0) size 769x32768
RenderView at (0,0) size 769x32768
layer at (0,0) size 769x32768
RenderBlock {HTML} at (0,0) size 769x32768
RenderBody {BODY} at (8,8) size 753x32752
RenderText {#text} at (0,0) size 0x0
2008-06-20 Timothy Hatcher <timothy@apple.com>
Changed all lineHeight, baselinePosition and verticalPositionHint
calls to return int instead of short. The short was overflowing
when a value greater than 32,767 was encountered.
Fixes: iframes with a height of 32,768px or greater do not layout correctly
https://bugs.webkit.org/show_bug.cgi?id=19679
Reviewed by Dave Hyatt.
Test: fast/css/line-height-overflow.html
* rendering/RenderBR.cpp:
(WebCore::RenderBR::baselinePosition):
* rendering/RenderBR.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight):
* rendering/RenderBlock.h:
* rendering/RenderFlow.cpp:
* rendering/RenderFlow.h:
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::lineHeight):
* rendering/RenderListMarker.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::verticalPositionHint):
* rendering/RenderObject.h:
(WebCore::):
* rendering/RenderPath.cpp:
(WebCore::RenderPath::lineHeight):
* rendering/RenderPath.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::lineHeight):
* rendering/RenderReplaced.h:
* rendering/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::lineHeight):
* rendering/RenderSVGContainer.h:
* rendering/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::lineHeight):
* rendering/RenderSVGHiddenContainer.h:
* rendering/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::lineHeight):
* rendering/RenderSVGRoot.h:
* rendering/RenderSlider.cpp:
* rendering/RenderSlider.h:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTextControl.cpp:
* rendering/RenderTextControl.h:
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
* rendering/RenderThemeSafari.cpp:
* rendering/RenderThemeSafari.h:
2008-06-20 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
......@@ -49,14 +49,14 @@ InlineBox* RenderBR::createInlineBox(bool makePlaceholder, bool isRootLineBox, b
return box;
}
short RenderBR::baselinePosition(bool firstLine, bool isRootLineBox) const
int RenderBR::baselinePosition(bool firstLine, bool isRootLineBox) const
{
if (firstTextBox() && !firstTextBox()->isText())
return 0;
return RenderText::baselinePosition(firstLine, isRootLineBox);
}
short RenderBR::lineHeight(bool firstLine, bool isRootLineBox) const
int RenderBR::lineHeight(bool firstLine, bool isRootLineBox) const
{
if (firstTextBox() && !firstTextBox()->isText())
return 0;
......
......@@ -45,8 +45,8 @@ public:
virtual unsigned width(unsigned /*from*/, unsigned /*len*/, const Font&, int /*xpos*/) const { return 0; }
virtual unsigned width(unsigned /*from*/, unsigned /*len*/, int /*xpos*/, bool /*firstLine = false*/) const { return 0; }
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual short baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual void setStyle(RenderStyle*);
// overrides
......@@ -61,7 +61,7 @@ public:
virtual VisiblePosition positionForCoordinates(int x, int y);
private:
mutable short m_lineHeight;
mutable int m_lineHeight;
};
} // namespace WebCore
......
......@@ -4052,18 +4052,18 @@ bool RenderBlock::hasLineIfEmpty() const
element()->isShadowNode() && element()->shadowParentNode()->hasTagName(inputTag));
}
short RenderBlock::lineHeight(bool b, bool isRootLineBox) const
int RenderBlock::lineHeight(bool b, bool isRootLineBox) const
{
// Inline blocks are replaced elements. Otherwise, just pass off to
// the base class. If we're being queried as though we're the root line
// box, then the fact that we're an inline-block is irrelevant, and we behave
// just like a block.
if (isReplaced() && !isRootLineBox)
return height()+marginTop()+marginBottom();
return height() + marginTop() + marginBottom();
return RenderFlow::lineHeight(b, isRootLineBox);
}
short RenderBlock::baselinePosition(bool b, bool isRootLineBox) const
int RenderBlock::baselinePosition(bool b, bool isRootLineBox) const
{
// Inline blocks are replaced elements. Otherwise, just pass off to
// the base class. If we're being queried as though we're the root line
......
......@@ -51,8 +51,8 @@ public:
virtual const char* renderName() const;
// These two functions are overridden for inline-block.
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual short baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual bool isRenderBlock() const { return true; }
virtual bool isBlockFlow() const { return (!isInline() || isReplaced()) && !isTable(); }
......
......@@ -310,7 +310,7 @@ void RenderFlow::dirtyLinesFromChangedChild(RenderObject* child)
}
}
short RenderFlow::lineHeight(bool firstLine, bool isRootLineBox) const
int RenderFlow::lineHeight(bool firstLine, bool isRootLineBox) const
{
if (firstLine) {
RenderStyle* s = style(firstLine);
......
......@@ -76,7 +76,7 @@ public:
virtual void dirtyLinesFromChangedChild(RenderObject* child);
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
InlineFlowBox* firstLineBox() const { return m_firstLineBox; }
InlineFlowBox* lastLineBox() const { return m_lastLineBox; }
......@@ -119,7 +119,7 @@ protected:
InlineFlowBox* m_firstLineBox;
InlineFlowBox* m_lastLineBox;
mutable short m_lineHeight;
mutable int m_lineHeight;
// These bitfields are moved here from subclasses to pack them together
// from RenderBlock
......
......@@ -247,7 +247,7 @@ void RenderListBox::calcHeight()
}
}
short RenderListBox::baselinePosition(bool b, bool isRootLineBox) const
int RenderListBox::baselinePosition(bool b, bool isRootLineBox) const
{
return height() + marginTop() + marginBottom() - baselineAdjustment;
}
......
......@@ -62,7 +62,7 @@ public:
virtual bool isScrollable() const;
virtual void calcPrefWidths();
virtual short baselinePosition(bool firstLine, bool isRootLineBox) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox) const;
virtual void calcHeight();
virtual void layout();
......
......@@ -801,14 +801,14 @@ void RenderListMarker::updateMargins()
style()->setMarginRight(Length(marginRight, Fixed));
}
short RenderListMarker::lineHeight(bool, bool) const
int RenderListMarker::lineHeight(bool, bool) const
{
if (!isImage())
return m_listItem->lineHeight(false, true);
return height();
}
short RenderListMarker::baselinePosition(bool, bool) const
int RenderListMarker::baselinePosition(bool, bool) const
{
if (!isImage()) {
const Font& font = style()->font();
......
......@@ -53,8 +53,8 @@ public:
virtual InlineBox* createInlineBox(bool, bool, bool);
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual short baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const;
bool isImage() const;
bool isText() const { return !isImage(); }
......
......@@ -2652,11 +2652,11 @@ bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int /*x*/,
return false;
}
short RenderObject::verticalPositionHint(bool firstLine) const
int RenderObject::verticalPositionHint(bool firstLine) const
{
if (firstLine) // We're only really a first-line style if the document actually uses first-line rules.
firstLine = document()->usesFirstLineRules();
short vpos = m_verticalPosition;
int vpos = m_verticalPosition;
if (m_verticalPosition == PositionUndefined || firstLine) {
vpos = getVerticalPosition(firstLine);
if (!firstLine)
......@@ -2666,7 +2666,7 @@ short RenderObject::verticalPositionHint(bool firstLine) const
return vpos;
}
short RenderObject::getVerticalPosition(bool firstLine) const
int RenderObject::getVerticalPosition(bool firstLine) const
{
if (!isInline())
return 0;
......@@ -2709,7 +2709,7 @@ short RenderObject::getVerticalPosition(bool firstLine) const
return vpos;
}
short RenderObject::lineHeight(bool firstLine, bool /*isRootLineBox*/) const
int RenderObject::lineHeight(bool firstLine, bool /*isRootLineBox*/) const
{
RenderStyle* s = style(firstLine);
......@@ -2726,7 +2726,7 @@ short RenderObject::lineHeight(bool firstLine, bool /*isRootLineBox*/) const
return lh.value();
}
short RenderObject::baselinePosition(bool firstLine, bool isRootLineBox) const
int RenderObject::baselinePosition(bool firstLine, bool isRootLineBox) const
{
const Font& f = style(firstLine)->font();
return f.ascent() + (lineHeight(firstLine, isRootLineBox) - f.height()) / 2;
......
......@@ -105,9 +105,9 @@ enum HitTestAction {
};
enum VerticalPositionHint {
PositionTop = -0x2000,
PositionBottom = 0x2000,
PositionUndefined = 0x1fff
PositionTop = -0x7fffffff,
PositionBottom = 0x7fffffff,
PositionUndefined = static_cast<int>(0x80000000)
};
#if ENABLE(DASHBOARD_SUPPORT)
......@@ -440,12 +440,12 @@ public:
virtual void deleteLineBoxWrapper();
// for discussion of lineHeight see CSS2 spec
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
// for the vertical-align property of inline elements
// the difference between this objects baseline position and the lines baseline position.
virtual short verticalPositionHint(bool firstLine) const;
virtual int verticalPositionHint(bool firstLine) const;
// the offset of baseline from the top of the object.
virtual short baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const;
/*
* Paint the object and its children, clipped by (x|y|w|h).
......@@ -907,7 +907,7 @@ protected:
virtual IntRect viewRect() const;
short getVerticalPosition(bool firstLine) const;
int getVerticalPosition(bool firstLine) const;
void adjustRectForOutlineAndShadow(IntRect&) const;
......@@ -925,7 +925,7 @@ private:
#ifndef NDEBUG
bool m_hasAXObject;
#endif
mutable short m_verticalPosition : 15;
mutable int m_verticalPosition;
bool m_needsLayout : 1;
bool m_needsPositionedMovementLayout :1;
......
......@@ -170,14 +170,14 @@ bool RenderPath::requiresLayer()
return false;
}
short RenderPath::lineHeight(bool b, bool isRootLineBox) const
int RenderPath::lineHeight(bool b, bool isRootLineBox) const
{
return static_cast<short>(relativeBBox(true).height());
return relativeBBox(true).height();
}
short RenderPath::baselinePosition(bool b, bool isRootLineBox) const
int RenderPath::baselinePosition(bool b, bool isRootLineBox) const
{
return static_cast<short>(relativeBBox(true).height());
return relativeBBox(true).height();
}
static inline void fillAndStrokePath(const Path& path, GraphicsContext* context, RenderStyle* style, RenderPath* object)
......
......@@ -64,8 +64,8 @@ public:
virtual void layout();
virtual IntRect absoluteClippedOverflowRect();
virtual bool requiresLayer();
virtual short lineHeight(bool b, bool isRootLineBox = false) const;
virtual short baselinePosition(bool b, bool isRootLineBox = false) const;
virtual int lineHeight(bool b, bool isRootLineBox = false) const;
virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
virtual void paint(PaintInfo&, int parentX, int parentY);
virtual void absoluteRects(Vector<IntRect>&, int tx, int ty, bool topLevel = true);
......
......@@ -186,12 +186,12 @@ void RenderReplaced::calcPrefWidths()
setPrefWidthsDirty(false);
}
short RenderReplaced::lineHeight(bool, bool) const
int RenderReplaced::lineHeight(bool, bool) const
{
return height() + marginTop() + marginBottom();
}
short RenderReplaced::baselinePosition(bool, bool) const
int RenderReplaced::baselinePosition(bool, bool) const
{
return height() + marginTop() + marginBottom();
}
......
......@@ -34,8 +34,8 @@ public:
virtual const char* renderName() const { return "RenderReplaced"; }
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual short baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const;
virtual void calcPrefWidths();
......
......@@ -209,12 +209,12 @@ bool RenderSVGContainer::requiresLayer()
return false;
}
short RenderSVGContainer::lineHeight(bool b, bool isRootLineBox) const
int RenderSVGContainer::lineHeight(bool b, bool isRootLineBox) const
{
return height() + marginTop() + marginBottom();
}
short RenderSVGContainer::baselinePosition(bool b, bool isRootLineBox) const
int RenderSVGContainer::baselinePosition(bool b, bool isRootLineBox) const
{
return height() + marginTop() + marginBottom();
}
......
......@@ -70,8 +70,8 @@ public:
virtual const char* renderName() const { return "RenderSVGContainer"; }
virtual bool requiresLayer();
virtual short lineHeight(bool b, bool isRootLineBox = false) const;
virtual short baselinePosition(bool b, bool isRootLineBox = false) const;
virtual int lineHeight(bool b, bool isRootLineBox = false) const;
virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
......
......@@ -44,12 +44,12 @@ bool RenderSVGHiddenContainer::requiresLayer()
return false;
}
short RenderSVGHiddenContainer::lineHeight(bool b, bool isRootLineBox) const
int RenderSVGHiddenContainer::lineHeight(bool b, bool isRootLineBox) const
{
return 0;
}
short RenderSVGHiddenContainer::baselinePosition(bool b, bool isRootLineBox) const
int RenderSVGHiddenContainer::baselinePosition(bool b, bool isRootLineBox) const
{
return 0;
}
......
......@@ -45,8 +45,8 @@ namespace WebCore {
virtual bool requiresLayer();
virtual short lineHeight(bool b, bool isRootLineBox = false) const;
virtual short baselinePosition(bool b, bool isRootLineBox = false) const;
virtual int lineHeight(bool b, bool isRootLineBox = false) const;
virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
......
......@@ -51,12 +51,12 @@ RenderSVGRoot::~RenderSVGRoot()
{
}
short RenderSVGRoot::lineHeight(bool b, bool isRootLineBox) const
int RenderSVGRoot::lineHeight(bool b, bool isRootLineBox) const
{
return height() + marginTop() + marginBottom();
}
short RenderSVGRoot::baselinePosition(bool b, bool isRootLineBox) const
int RenderSVGRoot::baselinePosition(bool b, bool isRootLineBox) const
{
return height() + marginTop() + marginBottom();
}
......
......@@ -40,8 +40,8 @@ public:
virtual bool isSVGRoot() const { return true; }
virtual const char* renderName() const { return "RenderSVGRoot"; }
virtual short lineHeight(bool b, bool isRootLineBox = false) const;
virtual short baselinePosition(bool b, bool isRootLineBox = false) const;
virtual int lineHeight(bool b, bool isRootLineBox = false) const;
virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
virtual void calcPrefWidths();
virtual void layout();
......
......@@ -129,7 +129,7 @@ RenderSlider::~RenderSlider()
m_thumb->detach();
}
short RenderSlider::baselinePosition(bool b, bool isRootLineBox) const
int RenderSlider::baselinePosition(bool b, bool isRootLineBox) const
{
return height() + marginTop();
}
......
......@@ -39,7 +39,7 @@ namespace WebCore {
virtual const char* renderName() const { return "RenderSlider"; }
virtual bool isSlider() const { return true; }
virtual short baselinePosition( bool, bool ) const;
virtual int baselinePosition( bool, bool ) const;
virtual void calcPrefWidths();
virtual void setStyle(RenderStyle*);
virtual void layout();
......
......@@ -207,7 +207,7 @@ bool RenderTableCell::absolutePosition(int& xPos, int& yPos, bool fixed) const
return result;
}
short RenderTableCell::baselinePosition(bool /*firstLine*/, bool /*isRootLineBox*/) const
int RenderTableCell::baselinePosition(bool /*firstLine*/, bool /*isRootLineBox*/) const
{
RenderObject* o = firstChild();
int offset = paddingTop() + borderTop();
......
......@@ -104,7 +104,7 @@ public:
virtual void computeAbsoluteRepaintRect(IntRect&, bool fixed = false);
virtual bool absolutePosition(int& x, int& y, bool fixed = false) const;
virtual short baselinePosition(bool firstLine = false, bool isRootLineBox = false) const;
virtual int baselinePosition(bool firstLine = false, bool isRootLineBox = false) const;
void setCellTopExtra(int p) { m_topExtra = p; }
void setCellBottomExtra(int p) { m_bottomExtra = p; }
......
......@@ -39,7 +39,7 @@ public:
virtual const char* renderName() const { return "RenderTableCol"; }
virtual bool isTableCol() const { return true; }
virtual short lineHeight(bool) const { return 0; }
virtual int lineHeight(bool) const { return 0; }
virtual void updateFromElement();
virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
......
......@@ -46,7 +46,7 @@ public:
virtual void setStyle(RenderStyle*);
virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const { return 0; }
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const { return 0; }
virtual void position(InlineBox*) { }
virtual void layout();
virtual IntRect absoluteClippedOverflowRect();
......
......@@ -49,7 +49,7 @@ public:
virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const { return 0; }
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const { return 0; }
virtual void position(InlineBox*) { }
void addCell(RenderTableCell*, RenderObject* row);
......
......@@ -939,7 +939,7 @@ int RenderText::height() const
return retval;
}
short RenderText::lineHeight(bool firstLine, bool) const
int RenderText::lineHeight(bool firstLine, bool) const
{
// Always use the interior line height of the parent (e.g., if our parent is an inline block).
return parent()->lineHeight(firstLine, true);
......@@ -1089,7 +1089,7 @@ IntRect RenderText::selectionRect(bool clipToVisibleContent)
return rect;
}
short RenderText::verticalPositionHint(bool firstLine) const
int RenderText::verticalPositionHint(bool firstLine) const
{
if (parent()->isReplaced())
return 0; // Treat inline blocks just like blocks. There can't be any vertical position hint.
......
......@@ -77,7 +77,7 @@ public:
virtual int width() const;
virtual int height() const;
virtual short lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const;
virtual int minPrefWidth() const;
virtual int maxPrefWidth() const;
......@@ -96,7 +96,7 @@ public:
virtual int xPos() const;
virtual int yPos() const;
virtual short verticalPositionHint(bool firstLine) const;
virtual int verticalPositionHint(bool firstLine) const;
void setText(PassRefPtr<StringImpl>, bool force = false);
void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len, bool force = false);
......
......@@ -730,7 +730,7 @@ void RenderTextControl::calcHeight()
RenderBlock::calcHeight();
}
short RenderTextControl::baselinePosition(bool b, bool isRootLineBox) const
int RenderTextControl::baselinePosition(bool b, bool isRootLineBox) const
{
if (m_multiLine)
return height() + marginTop() + marginBottom();
......
......@@ -50,7 +50,7 @@ public:
virtual void setStyle(RenderStyle*);
virtual void updateFromElement();
virtual bool canHaveChildren() const { return false; }
virtual short baselinePosition(bool firstLine, bool isRootLineBox) const;
virtual int baselinePosition(bool firstLine, bool isRootLineBox) const;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
virtual void layout();
virtual bool avoidsFloats() const { return true; }
......
......@@ -309,7 +309,7 @@ Color RenderTheme::inactiveListBoxSelectionForegroundColor() const
return Color(0, 0, 0);
}