[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:27:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 06d98f5b930bc2460674eb41f0815de87ff2548a
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 26 23:10:44 2004 +0000
Convert render object widths from short to int. There was a bug on this, but I can't find it in Radar.
Reviewed by john
* khtml/rendering/render_applet.cpp:
(RenderApplet::intrinsicWidth):
(RenderEmptyApplet::intrinsicWidth):
* khtml/rendering/render_applet.h:
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::calcMinMaxWidth):
(khtml::RenderBlock::calcInlineMinMaxWidth):
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::contentWidth):
(RenderBox::width):
(RenderBox::containingBlockWidth):
(RenderBox::calcReplacedWidth):
(RenderBox::setStaticX):
* khtml/rendering/render_box.h:
(khtml::RenderBox::minWidth):
(khtml::RenderBox::maxWidth):
* khtml/rendering/render_br.h:
(khtml::RenderBR::minWidth):
(khtml::RenderBR::maxWidth):
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::layout):
* khtml/rendering/render_flexbox.cpp:
(khtml::RenderFlexibleBox::calcMinMaxWidth):
* khtml/rendering/render_frames.cpp:
(RenderPart::intrinsicWidth):
(RenderPartObject::layout):
* khtml/rendering/render_frames.h:
* khtml/rendering/render_image.cpp:
(RenderImage::layout):
(RenderImage::calcReplacedWidth):
* khtml/rendering/render_image.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::width):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::scrollWidth):
* khtml/rendering/render_layer.h:
(khtml::RenderLayer::width):
(khtml::RenderLayer::setWidth):
(khtml::RenderLayer::scrollXOffset):
* khtml/rendering/render_line.h:
(khtml::InlineBox::setWidth):
(khtml::InlineBox::width):
(khtml::InlineBox::setXPos):
(khtml::InlineBox::xPos):
* khtml/rendering/render_object.cpp:
(RenderObject::containingBlockWidth):
* khtml/rendering/render_object.h:
(khtml::RenderObject::setStaticX):
(khtml::RenderObject::contentWidth):
(khtml::RenderObject::intrinsicWidth):
(khtml::RenderObject::width):
(khtml::RenderObject::offsetWidth):
(khtml::RenderObject::minWidth):
(khtml::RenderObject::maxWidth):
* khtml/rendering/render_replaced.h:
(khtml::RenderReplaced::intrinsicWidth):
* khtml/rendering/render_table.cpp:
(RenderTable::calcWidth):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth):
(RenderText::width):
* khtml/rendering/render_text.h:
(khtml::RenderText::minWidth):
(khtml::RenderText::maxWidth):
* khtml/rendering/table_layout.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 717acf5..6a3e916 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,78 @@
+2004-02-26 David Hyatt <hyatt at apple.com>
+
+ Convert render object widths from short to int. There was a bug on this, but I can't find it in Radar.
+
+ Reviewed by john
+
+ * khtml/rendering/render_applet.cpp:
+ (RenderApplet::intrinsicWidth):
+ (RenderEmptyApplet::intrinsicWidth):
+ * khtml/rendering/render_applet.h:
+ * khtml/rendering/render_block.cpp:
+ (khtml::RenderBlock::calcMinMaxWidth):
+ (khtml::RenderBlock::calcInlineMinMaxWidth):
+ * khtml/rendering/render_block.h:
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::contentWidth):
+ (RenderBox::width):
+ (RenderBox::containingBlockWidth):
+ (RenderBox::calcReplacedWidth):
+ (RenderBox::setStaticX):
+ * khtml/rendering/render_box.h:
+ (khtml::RenderBox::minWidth):
+ (khtml::RenderBox::maxWidth):
+ * khtml/rendering/render_br.h:
+ (khtml::RenderBR::minWidth):
+ (khtml::RenderBR::maxWidth):
+ * khtml/rendering/render_canvas.cpp:
+ (RenderCanvas::layout):
+ * khtml/rendering/render_flexbox.cpp:
+ (khtml::RenderFlexibleBox::calcMinMaxWidth):
+ * khtml/rendering/render_frames.cpp:
+ (RenderPart::intrinsicWidth):
+ (RenderPartObject::layout):
+ * khtml/rendering/render_frames.h:
+ * khtml/rendering/render_image.cpp:
+ (RenderImage::layout):
+ (RenderImage::calcReplacedWidth):
+ * khtml/rendering/render_image.h:
+ * khtml/rendering/render_inline.cpp:
+ (RenderInline::width):
+ * khtml/rendering/render_inline.h:
+ * khtml/rendering/render_layer.cpp:
+ (RenderLayer::scrollWidth):
+ * khtml/rendering/render_layer.h:
+ (khtml::RenderLayer::width):
+ (khtml::RenderLayer::setWidth):
+ (khtml::RenderLayer::scrollXOffset):
+ * khtml/rendering/render_line.h:
+ (khtml::InlineBox::setWidth):
+ (khtml::InlineBox::width):
+ (khtml::InlineBox::setXPos):
+ (khtml::InlineBox::xPos):
+ * khtml/rendering/render_object.cpp:
+ (RenderObject::containingBlockWidth):
+ * khtml/rendering/render_object.h:
+ (khtml::RenderObject::setStaticX):
+ (khtml::RenderObject::contentWidth):
+ (khtml::RenderObject::intrinsicWidth):
+ (khtml::RenderObject::width):
+ (khtml::RenderObject::offsetWidth):
+ (khtml::RenderObject::minWidth):
+ (khtml::RenderObject::maxWidth):
+ * khtml/rendering/render_replaced.h:
+ (khtml::RenderReplaced::intrinsicWidth):
+ * khtml/rendering/render_table.cpp:
+ (RenderTable::calcWidth):
+ * khtml/rendering/render_table.h:
+ * khtml/rendering/render_text.cpp:
+ (RenderText::trimmedMinMaxWidth):
+ (RenderText::width):
+ * khtml/rendering/render_text.h:
+ (khtml::RenderText::minWidth):
+ (khtml::RenderText::maxWidth):
+ * khtml/rendering/table_layout.cpp:
+
2004-02-26 Trey Matteson <trey at apple.com>
3566668 - REGRESSION (125-128): autofill of popup lists is broken
diff --git a/WebCore/khtml/rendering/render_applet.cpp b/WebCore/khtml/rendering/render_applet.cpp
index 756e1bc..fee3107 100644
--- a/WebCore/khtml/rendering/render_applet.cpp
+++ b/WebCore/khtml/rendering/render_applet.cpp
@@ -70,7 +70,7 @@ RenderApplet::~RenderApplet()
{
}
-short RenderApplet::intrinsicWidth() const
+int RenderApplet::intrinsicWidth() const
{
int rval = 150;
@@ -192,7 +192,7 @@ RenderEmptyApplet::RenderEmptyApplet(DOM::NodeImpl* node)
#endif
}
-short RenderEmptyApplet::intrinsicWidth() const
+int RenderEmptyApplet::intrinsicWidth() const
{
return (m_widget ? m_widget->sizeHint().width() : 150);
}
diff --git a/WebCore/khtml/rendering/render_applet.h b/WebCore/khtml/rendering/render_applet.h
index d492ba7..67d3715 100644
--- a/WebCore/khtml/rendering/render_applet.h
+++ b/WebCore/khtml/rendering/render_applet.h
@@ -49,7 +49,7 @@ public:
#endif
virtual void layout();
- virtual short intrinsicWidth() const;
+ virtual int intrinsicWidth() const;
virtual int intrinsicHeight() const;
virtual bool isApplet() const { return true; }
@@ -72,7 +72,7 @@ public:
virtual const char *renderName() const { return "RenderEmptyApplet"; }
- virtual short intrinsicWidth() const;
+ virtual int intrinsicWidth() const;
virtual int intrinsicHeight() const;
virtual void layout();
};
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 38e51fd..b565490 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -1614,7 +1614,7 @@ RenderBlock::rightRelOffset(int y, int fixedOffset, bool applyTextIndent,
return right;
}
-unsigned short
+int
RenderBlock::lineWidth(int y) const
{
//kdDebug( 6040 ) << "lineWidth(" << y << ")=" << rightOffset(y) - leftOffset(y) << endl;
@@ -2038,19 +2038,19 @@ void RenderBlock::calcMinMaxWidth()
if (style()->width().isFixed() && style()->width().value > 0) {
if (isTableCell())
- m_maxWidth = KMAX(m_minWidth,short(style()->width().value));
+ m_maxWidth = KMAX(m_minWidth, style()->width().value);
else
- m_minWidth = m_maxWidth = short(style()->width().value);
+ m_minWidth = m_maxWidth = style()->width().value;
}
if (style()->minWidth().isFixed() && style()->minWidth().value > 0) {
- m_maxWidth = KMAX(m_maxWidth, short(style()->minWidth().value));
- m_minWidth = KMAX(m_minWidth, short(style()->minWidth().value));
+ m_maxWidth = KMAX(m_maxWidth, style()->minWidth().value);
+ m_minWidth = KMAX(m_minWidth, style()->minWidth().value);
}
if (style()->maxWidth().isFixed() && style()->maxWidth().value != UNDEFINED) {
- m_maxWidth = KMIN(m_maxWidth, short(style()->maxWidth().value));
- m_minWidth = KMIN(m_minWidth, short(style()->maxWidth().value));
+ m_maxWidth = KMIN(m_maxWidth, style()->maxWidth().value);
+ m_minWidth = KMIN(m_minWidth, style()->maxWidth().value);
}
int toAdd = 0;
@@ -2229,8 +2229,8 @@ void RenderBlock::calcInlineMinMaxWidth()
// the width of the last non-breakable run and use that to start a new line
// (unless we end in whitespace).
RenderStyle* cstyle = child->style();
- short childMin = 0;
- short childMax = 0;
+ int childMin = 0;
+ int childMax = 0;
if (!child->isText()) {
// Case (1) and (2). Inline replaced and inline flow elements.
@@ -2311,9 +2311,9 @@ void RenderBlock::calcInlineMinMaxWidth()
// then they shouldn't be considered in the breakable char
// check.
bool hasBreakableChar, hasBreak;
- short beginMin, endMin;
+ int beginMin, endMin;
bool beginWS, endWS;
- short beginMax, endMax;
+ int beginMax, endMax;
t->trimmedMinMaxWidth(beginMin, beginWS, endMin, endWS, hasBreakableChar,
hasBreak, beginMax, endMax,
childMin, childMax, stripFrontSpaces);
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index 49d73e2..3a61df7 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -148,7 +148,7 @@ public:
inline int leftBottom();
inline int rightBottom();
- virtual unsigned short lineWidth(int y) const;
+ virtual int lineWidth(int y) const;
virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
@@ -219,8 +219,8 @@ protected:
RenderObject* node;
int startY;
int endY;
- short left;
- short width;
+ int left;
+ int width;
Type type : 1; // left or right aligned
bool noPaint : 1;
};
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index a3f9cb4..fe17d7b 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -136,9 +136,9 @@ void RenderBox::detach()
layer->detach(arena);
}
-short RenderBox::contentWidth() const
+int RenderBox::contentWidth() const
{
- short w = m_width - borderLeft() - borderRight();
+ int w = m_width - borderLeft() - borderRight();
w -= paddingLeft() + paddingRight();
if (style()->scrollsOverflow() && m_layer)
@@ -167,7 +167,7 @@ void RenderBox::setPos( int xPos, int yPos )
m_x = xPos; m_y = yPos;
}
-short RenderBox::width() const
+int RenderBox::width() const
{
return m_width;
}
@@ -506,7 +506,7 @@ QRect RenderBox::getClipRect(int tx, int ty)
return cr;
}
-short RenderBox::containingBlockWidth() const
+int RenderBox::containingBlockWidth() const
{
RenderBlock* cb = containingBlock();
if (!cb)
@@ -958,7 +958,7 @@ void RenderBox::calcHeight()
}
}
-short RenderBox::calcReplacedWidth() const
+int RenderBox::calcReplacedWidth() const
{
int width = calcReplacedWidthUsing(Width);
int minW = calcReplacedWidthUsing(MinWidth);
@@ -1081,7 +1081,7 @@ void RenderBox::calcVerticalMargins()
m_marginBottom = bm.minWidth(cw);
}
-void RenderBox::setStaticX(short staticX)
+void RenderBox::setStaticX(int staticX)
{
m_staticX = staticX;
}
diff --git a/WebCore/khtml/rendering/render_box.h b/WebCore/khtml/rendering/render_box.h
index 9dbd94e..a2130a5 100644
--- a/WebCore/khtml/rendering/render_box.h
+++ b/WebCore/khtml/rendering/render_box.h
@@ -52,10 +52,10 @@ public:
virtual void detach();
- virtual short minWidth() const { return m_minWidth; }
- virtual short maxWidth() const { return m_maxWidth; }
+ virtual int minWidth() const { return m_minWidth; }
+ virtual int maxWidth() const { return m_maxWidth; }
- virtual short contentWidth() const;
+ virtual int contentWidth() const;
virtual int contentHeight() const;
virtual bool absolutePosition(int &xPos, int &yPos, bool f = false);
@@ -64,7 +64,7 @@ public:
virtual int xPos() const { return m_x; }
virtual int yPos() const { return m_y; }
- virtual short width() const;
+ virtual int width() const;
virtual int height() const;
virtual short marginTop() const { return m_marginTop; }
@@ -101,7 +101,7 @@ public:
virtual void repaintDuringLayoutIfMoved(int oldX, int oldY);
- virtual short containingBlockWidth() const;
+ virtual int containingBlockWidth() const;
virtual void calcWidth();
virtual void calcHeight();
@@ -110,7 +110,7 @@ public:
int calcReplacedWidthUsing(WidthType widthType) const;
int calcReplacedHeightUsing(HeightType heightType) const;
- virtual short calcReplacedWidth() const;
+ virtual int calcReplacedWidth() const;
virtual int calcReplacedHeight() const;
virtual int availableHeight() const;
@@ -128,7 +128,7 @@ public:
int _tx, int _ty, int w, int height,
int bleft, int bright);
- virtual void setStaticX(short staticX);
+ virtual void setStaticX(int staticX);
virtual void setStaticY(int staticY);
protected:
@@ -152,8 +152,8 @@ protected:
int m_y;
- short m_x;
- short m_width;
+ int m_x;
+ int m_width;
short m_marginTop;
short m_marginBottom;
@@ -165,14 +165,14 @@ protected:
* the minimum width the element needs, to be able to render
* it's content without clipping
*/
- short m_minWidth;
+ int m_minWidth;
/* The maximum width the element can fill horizontally
* ( = the width of the element with line breaking disabled)
*/
- short m_maxWidth;
+ int m_maxWidth;
// Cached normal flow values for absolute positioned elements with static left/top values.
- short m_staticX;
+ int m_staticX;
int m_staticY;
// A pointer to our layer if we have one. Currently only positioned elements
diff --git a/WebCore/khtml/rendering/render_br.h b/WebCore/khtml/rendering/render_br.h
index decaf29..2426821 100644
--- a/WebCore/khtml/rendering/render_br.h
+++ b/WebCore/khtml/rendering/render_br.h
@@ -50,8 +50,8 @@ public:
// overrides
virtual InlineBox* createInlineBox(bool, bool, bool isOnlyRun = false);
virtual void calcMinMaxWidth() {}
- virtual short minWidth() const { return 0; }
- virtual short maxWidth() const { return 0; }
+ virtual int minWidth() const { return 0; }
+ virtual int maxWidth() const { return 0; }
virtual int xPos() const { return m_x; }
virtual int yPos() const { return m_y; }
diff --git a/WebCore/khtml/rendering/render_canvas.cpp b/WebCore/khtml/rendering/render_canvas.cpp
index 5d04945..89de8ba 100644
--- a/WebCore/khtml/rendering/render_canvas.cpp
+++ b/WebCore/khtml/rendering/render_canvas.cpp
@@ -179,7 +179,7 @@ void RenderCanvas::layout()
#endif
layer()->setHeight(kMax(doch, m_height));
- layer()->setWidth(kMax((short)docw, m_width));
+ layer()->setWidth(kMax(docw, m_width));
setNeedsLayout(false);
}
diff --git a/WebCore/khtml/rendering/render_flexbox.cpp b/WebCore/khtml/rendering/render_flexbox.cpp
index a67c750..47e70e9 100644
--- a/WebCore/khtml/rendering/render_flexbox.cpp
+++ b/WebCore/khtml/rendering/render_flexbox.cpp
@@ -219,16 +219,16 @@ void RenderFlexibleBox::calcMinMaxWidth()
if(m_maxWidth < m_minWidth) m_maxWidth = m_minWidth;
if (style()->width().isFixed() && style()->width().value > 0)
- m_minWidth = m_maxWidth = short(style()->width().value);
+ m_minWidth = m_maxWidth = style()->width().value;
if (style()->minWidth().isFixed() && style()->minWidth().value > 0) {
- m_maxWidth = KMAX(m_maxWidth, short(style()->minWidth().value));
- m_minWidth = KMAX(m_minWidth, short(style()->minWidth().value));
+ m_maxWidth = KMAX(m_maxWidth, style()->minWidth().value);
+ m_minWidth = KMAX(m_minWidth, style()->minWidth().value);
}
if (style()->maxWidth().isFixed() && style()->maxWidth().value != UNDEFINED) {
- m_maxWidth = KMIN(m_maxWidth, short(style()->maxWidth().value));
- m_minWidth = KMIN(m_minWidth, short(style()->maxWidth().value));
+ m_maxWidth = KMIN(m_maxWidth, style()->maxWidth().value);
+ m_minWidth = KMIN(m_minWidth, style()->maxWidth().value);
}
int toAdd = borderLeft() + borderRight() + paddingLeft() + paddingRight();
diff --git a/WebCore/khtml/rendering/render_frames.cpp b/WebCore/khtml/rendering/render_frames.cpp
index 7bbf8d9..0c4a25b 100644
--- a/WebCore/khtml/rendering/render_frames.cpp
+++ b/WebCore/khtml/rendering/render_frames.cpp
@@ -603,7 +603,7 @@ bool RenderPart::partLoadingErrorNotify(khtml::ChildFrame *, const KURL& , const
return false;
}
-short RenderPart::intrinsicWidth() const
+int RenderPart::intrinsicWidth() const
{
// KDE may need a non-zero width here, although this will mess up pages (e.g., thinker.org).
#if APPLE_CHANGES
@@ -923,7 +923,7 @@ void RenderPartObject::layout( )
KHTMLAssert( minMaxKnown() );
#if !APPLE_CHANGES
- short m_oldwidth = m_width;
+ int m_oldwidth = m_width;
int m_oldheight = m_height;
#endif
diff --git a/WebCore/khtml/rendering/render_frames.h b/WebCore/khtml/rendering/render_frames.h
index 4e15eb4..6ff9a20 100644
--- a/WebCore/khtml/rendering/render_frames.h
+++ b/WebCore/khtml/rendering/render_frames.h
@@ -118,7 +118,7 @@ public:
*/
virtual bool partLoadingErrorNotify( khtml::ChildFrame *childFrame, const KURL& url, const QString& serviceType );
- virtual short intrinsicWidth() const;
+ virtual int intrinsicWidth() const;
virtual int intrinsicHeight() const;
public slots:
diff --git a/WebCore/khtml/rendering/render_image.cpp b/WebCore/khtml/rendering/render_image.cpp
index 587cf16..719296f 100644
--- a/WebCore/khtml/rendering/render_image.cpp
+++ b/WebCore/khtml/rendering/render_image.cpp
@@ -417,7 +417,7 @@ void RenderImage::layout()
if (checkForRepaint)
oldBounds = getAbsoluteRepaintRect();
- short oldwidth = m_width;
+ int oldwidth = m_width;
int oldheight = m_height;
// minimum height
@@ -590,7 +590,7 @@ bool RenderImage::isHeightSpecified() const
return false;
}
-short RenderImage::calcReplacedWidth() const
+int RenderImage::calcReplacedWidth() const
{
// If height is specified and not width, preserve aspect ratio.
if (isHeightSpecified() && !isWidthSpecified()) {
diff --git a/WebCore/khtml/rendering/render_image.h b/WebCore/khtml/rendering/render_image.h
index 3788759..2482474 100644
--- a/WebCore/khtml/rendering/render_image.h
+++ b/WebCore/khtml/rendering/render_image.h
@@ -70,7 +70,7 @@ public:
virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty,
HitTestAction hitTestAction = HitTestAll, bool inside=false);
- virtual short calcReplacedWidth() const;
+ virtual int calcReplacedWidth() const;
virtual int calcReplacedHeight() const;
virtual void detach();
diff --git a/WebCore/khtml/rendering/render_inline.cpp b/WebCore/khtml/rendering/render_inline.cpp
index 1afade3..1b8e1ac 100644
--- a/WebCore/khtml/rendering/render_inline.cpp
+++ b/WebCore/khtml/rendering/render_inline.cpp
@@ -467,11 +467,11 @@ bool RenderInline::requiresLayer() {
return isRoot() || isRelPositioned() || style()->opacity() < 1.0f;
}
-short RenderInline::width() const
+int RenderInline::width() const
{
// Return the width of the minimal left side and the maximal right side.
- short leftSide = 0;
- short rightSide = 0;
+ int leftSide = 0;
+ int rightSide = 0;
for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
if (curr == firstLineBox() || curr->xPos() < leftSide)
leftSide = curr->xPos();
diff --git a/WebCore/khtml/rendering/render_inline.h b/WebCore/khtml/rendering/render_inline.h
index c430e71..eeb47bd 100644
--- a/WebCore/khtml/rendering/render_inline.h
+++ b/WebCore/khtml/rendering/render_inline.h
@@ -63,7 +63,7 @@ public:
// overrides RenderObject
virtual bool requiresLayer();
- virtual short width() const;
+ virtual int width() const;
virtual int height() const;
// used to calculate offsetWidth/Height. Overridden by inlines (render_flow) to return
diff --git a/WebCore/khtml/rendering/render_layer.cpp b/WebCore/khtml/rendering/render_layer.cpp
index 8a70622..6556eef 100644
--- a/WebCore/khtml/rendering/render_layer.cpp
+++ b/WebCore/khtml/rendering/render_layer.cpp
@@ -585,7 +585,7 @@ RenderLayer::positionScrollbars(const QRect& absBounds)
#define LINE_STEP 10
#define PAGE_KEEP 40
-short RenderLayer::scrollWidth()
+int RenderLayer::scrollWidth()
{
if (m_scrollDimensionsDirty)
computeScrollDimensions();
diff --git a/WebCore/khtml/rendering/render_layer.h b/WebCore/khtml/rendering/render_layer.h
index f9ae4aa..3c355bf 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -163,13 +163,13 @@ public:
int xPos() const { return m_x; }
int yPos() const { return m_y; }
- short width() const { return m_width; }
+ int width() const { return m_width; }
int height() const { return m_height; }
- void setWidth(short w) { m_width = w; }
+ void setWidth(int w) { m_width = w; }
void setHeight(int h) { m_height = h; }
- short scrollWidth();
+ int scrollWidth();
int scrollHeight();
void setPos( int xPos, int yPos ) {
@@ -180,7 +180,7 @@ public:
// Scrolling methods for layers that can scroll their overflow.
void scrollOffset(int& x, int& y);
void subtractScrollOffset(int& x, int& y);
- short scrollXOffset() { return m_scrollX; }
+ int scrollXOffset() { return m_scrollX; }
int scrollYOffset() { return m_scrollY; }
void scrollToOffset(int x, int y, bool updateScrollbars = true, bool repaint = true);
void scrollToXOffset(int x) { scrollToOffset(x, m_scrollY); }
@@ -293,19 +293,19 @@ protected:
int m_relY;
// Our (x,y) coordinates are in our parent layer's coordinate space.
- short m_x;
+ int m_x;
int m_y;
// The layer's width/height
- short m_width;
+ int m_width;
int m_height;
// Our scroll offsets if the view is scrolled.
- short m_scrollX;
+ int m_scrollX;
int m_scrollY;
// The width/height of our scrolled area.
- short m_scrollWidth;
+ int m_scrollWidth;
int m_scrollHeight;
// For layers with overflow, we have a pair of scrollbars.
diff --git a/WebCore/khtml/rendering/render_line.h b/WebCore/khtml/rendering/render_line.h
index 5cc07a5..b85c4a0 100644
--- a/WebCore/khtml/rendering/render_line.h
+++ b/WebCore/khtml/rendering/render_line.h
@@ -97,11 +97,11 @@ public:
RootInlineBox* root();
- void setWidth(short w) { m_width = w; }
- short width() { return m_width; }
+ void setWidth(int w) { m_width = w; }
+ int width() { return m_width; }
- void setXPos(short x) { m_x = x; }
- short xPos() { return m_x; }
+ void setXPos(int x) { m_x = x; }
+ int xPos() { return m_x; }
void setYPos(int y) { m_y = y; }
int yPos() { return m_y; }
@@ -129,9 +129,9 @@ public: // FIXME: Would like to make this protected, but methods are accessing t
// members over in the part.
RenderObject* m_object;
- short m_x;
+ int m_x;
int m_y;
- short m_width;
+ int m_width;
int m_height;
int m_baseline;
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 2cfac79..7afaa14 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -558,7 +558,7 @@ RenderObject* RenderObject::offsetParent() const
// More IE extensions. clientWidth and clientHeight represent the interior of an object
// excluding border and scrollbar.
-short
+int
RenderObject::clientWidth() const
{
return width() - borderLeft() - borderRight() -
@@ -574,7 +574,7 @@ RenderObject::clientHeight() const
// scrollWidth/scrollHeight will be the same as clientWidth/clientHeight unless the
// object has overflow:hidden/scroll/auto specified and also has overflow.
-short
+int
RenderObject::scrollWidth() const
{
return (style()->hidesOverflow() && layer()) ? layer()->scrollWidth() : overflowWidth();
@@ -693,7 +693,7 @@ RenderBlock* RenderObject::containingBlock() const
return static_cast<RenderBlock*>(o);
}
-short RenderObject::containingBlockWidth() const
+int RenderObject::containingBlockWidth() const
{
// ###
return containingBlock()->contentWidth();
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 4c287cb..5ac2664 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -162,7 +162,7 @@ public:
// to determine its position.
bool hasStaticX() const;
bool hasStaticY() const;
- virtual void setStaticX(short staticX) {};
+ virtual void setStaticX(int staticX) {};
virtual void setStaticY(int staticY) {};
// RenderObject tree manipulation
@@ -479,16 +479,16 @@ public:
RenderBlock *containingBlock() const;
// return just the width of the containing block
- virtual short containingBlockWidth() const;
+ virtual int containingBlockWidth() const;
// return just the height of the containing block
virtual int containingBlockHeight() const;
// size of the content area (box size minus padding/border)
- virtual short contentWidth() const { return 0; }
+ virtual int contentWidth() const { return 0; }
virtual int contentHeight() const { return 0; }
// intrinsic extend of replaced elements. undefined otherwise
- virtual short intrinsicWidth() const { return 0; }
+ virtual int intrinsicWidth() const { return 0; }
virtual int intrinsicHeight() const { return 0; }
// relative to parent node
@@ -503,7 +503,7 @@ public:
virtual bool absolutePosition(int &/*xPos*/, int &/*yPos*/, bool fixed = false);
// width and height are without margins but include paddings and borders
- virtual short width() const { return 0; }
+ virtual int width() const { return 0; }
virtual int height() const { return 0; }
// The height of a block when you include normal flow overflow spillage out of the bottom
@@ -516,7 +516,7 @@ public:
// IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines (render_flow)
// to return the remaining width on a given line (and the height of a single line). -dwh
- virtual short offsetWidth() const { return width(); }
+ virtual int offsetWidth() const { return width(); }
virtual int offsetHeight() const { return height(); }
// IE exxtensions. Also supported by Gecko. We override in render flow to get the
@@ -527,12 +527,12 @@ public:
// More IE extensions. clientWidth and clientHeight represent the interior of an object
// excluding border and scrollbar.
- short clientWidth() const;
+ int clientWidth() const;
int clientHeight() const;
// scrollWidth/scrollHeight will be the same as clientWidth/clientHeight unless the
// object has overflow:hidden/scroll/auto specified and also has overflow.
- short scrollWidth() const;
+ int scrollWidth() const;
int scrollHeight() const;
// The following seven functions are used to implement collapsing margins.
@@ -595,8 +595,8 @@ public:
virtual void addFocusRingRects(QPainter *painter, int _tx, int _ty);
#endif
- virtual short minWidth() const { return 0; }
- virtual short maxWidth() const { return 0; }
+ virtual int minWidth() const { return 0; }
+ virtual int maxWidth() const { return 0; }
RenderStyle* style() const { return m_style; }
RenderStyle* style( bool firstLine ) const;
diff --git a/WebCore/khtml/rendering/render_replaced.h b/WebCore/khtml/rendering/render_replaced.h
index 9c80ce7..0d44853 100644
--- a/WebCore/khtml/rendering/render_replaced.h
+++ b/WebCore/khtml/rendering/render_replaced.h
@@ -44,7 +44,7 @@ public:
bool shouldPaint(PaintInfo& i, int& _tx, int& _ty);
virtual void paint(PaintInfo& i, int _tx, int _ty) = 0;
- virtual short intrinsicWidth() const { return m_intrinsicWidth; }
+ virtual int intrinsicWidth() const { return m_intrinsicWidth; }
virtual int intrinsicHeight() const { return m_intrinsicHeight; }
void setIntrinsicWidth(int w) { m_intrinsicWidth = w; }
@@ -56,8 +56,8 @@ public:
virtual long caretMaxOffset() const;
private:
- short m_intrinsicWidth;
- short m_intrinsicHeight;
+ int m_intrinsicWidth;
+ int m_intrinsicHeight;
};
diff --git a/WebCore/khtml/rendering/render_table.cpp b/WebCore/khtml/rendering/render_table.cpp
index 13df08b..2f271fc 100644
--- a/WebCore/khtml/rendering/render_table.cpp
+++ b/WebCore/khtml/rendering/render_table.cpp
@@ -209,13 +209,13 @@ void RenderTable::calcWidth()
marginTotal += style()->marginRight().width(availableWidth);
// Subtract out our margins to get the available content width.
- int availContentWidth = KMAX(0, availableWidth - marginTotal);
+ int availContentWidth = kMax(0, availableWidth - marginTotal);
// Ensure we aren't bigger than our max width or smaller than our min width.
- m_width = KMIN(short(availContentWidth),m_maxWidth);
+ m_width = kMin(availContentWidth, m_maxWidth);
}
- m_width = KMAX(m_width, m_minWidth);
+ m_width = kMax(m_width, m_minWidth);
// Finally, with our true width determined, compute our margins for real.
m_marginRight = 0;
diff --git a/WebCore/khtml/rendering/render_table.h b/WebCore/khtml/rendering/render_table.h
index 5ed4b08..9d61074 100644
--- a/WebCore/khtml/rendering/render_table.h
+++ b/WebCore/khtml/rendering/render_table.h
@@ -131,7 +131,7 @@ public:
width = WidthUndefined;
}
ushort span;
- ushort width; // the calculated position of the column
+ uint width; // the calculated position of the column
};
QMemArray<int> columnPos;
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 6bde190..9f89a54 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -927,11 +927,11 @@ inline int RenderText::widthFromCache(const Font *f, int start, int len) const
#endif
-void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
- short& endMinW, bool& endWS,
+void RenderText::trimmedMinMaxWidth(int& beginMinW, bool& beginWS,
+ int& endMinW, bool& endWS,
bool& hasBreakableChar, bool& hasBreak,
- short& beginMaxW, short& endMaxW,
- short& minW, short& maxW, bool& stripFrontSpaces)
+ int& beginMaxW, int& endMaxW,
+ int& minW, int& maxW, bool& stripFrontSpaces)
{
bool isPre = style()->whiteSpace() == PRE;
if (isPre)
@@ -1373,7 +1373,7 @@ unsigned int RenderText::width(unsigned int from, unsigned int len, const Font *
return w;
}
-short RenderText::width() const
+int RenderText::width() const
{
int w;
int minx = 100000000;
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index 02fc1a6..3f92db1 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -157,7 +157,7 @@ public:
virtual unsigned int width(unsigned int from, unsigned int len, const Font *f) const;
virtual unsigned int width(unsigned int from, unsigned int len, bool firstLine = false) const;
- virtual short width() const;
+ virtual int width() const;
virtual int height() const;
// height of the contents (without paddings, margins and borders)
@@ -166,13 +166,13 @@ public:
// overrides
virtual void calcMinMaxWidth();
- virtual short minWidth() const { return m_minWidth; }
- virtual short maxWidth() const { return m_maxWidth; }
- virtual void trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
- short& endMinW, bool& endWS,
+ virtual int minWidth() const { return m_minWidth; }
+ virtual int maxWidth() const { return m_maxWidth; }
+ virtual void trimmedMinMaxWidth(int& beginMinW, bool& beginWS,
+ int& endMinW, bool& endWS,
bool& hasBreakableChar, bool& hasBreak,
- short& beginMaxW, short& endMaxW,
- short& minW, short& maxW, bool& stripFrontSpaces);
+ int& beginMaxW, int& endMaxW,
+ int& minW, int& maxW, bool& stripFrontSpaces);
bool containsOnlyWhitespace(unsigned int from, unsigned int len) const;
@@ -233,10 +233,10 @@ protected: // members
InlineTextBox* m_firstTextBox;
InlineTextBox* m_lastTextBox;
- short m_minWidth;
- short m_maxWidth;
- short m_beginMinWidth;
- short m_endMinWidth;
+ int m_minWidth;
+ int m_maxWidth;
+ int m_beginMinWidth;
+ int m_endMinWidth;
SelectionState m_selectionState : 3 ;
bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.
diff --git a/WebCore/khtml/rendering/table_layout.cpp b/WebCore/khtml/rendering/table_layout.cpp
index 55a0fe3..c73c98a 100644
--- a/WebCore/khtml/rendering/table_layout.cpp
+++ b/WebCore/khtml/rendering/table_layout.cpp
@@ -52,7 +52,7 @@ using namespace khtml;
1. A column element with a value other than 'auto' for the 'width'
property sets the width for that column.
- 2.Otherwise, a cell in the first row with a value other than
+ 2. Otherwise, a cell in the first row with a value other than
'auto' for the 'width' property sets the width for that column. If
the cell spans more than one column, the width is divided over the
columns.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list