the ridiculous 1024 limit on the span values.
* khtml/html/html_tableimpl.cpp:
(HTMLTableCellElementImpl::parseHTMLAttribute):
* khtml/rendering/render_table.cpp:
(RenderTableCell::collapsedBottomBorder):
* khtml/rendering/render_table.h:
(khtml::RenderTableCell::colSpan):
(khtml::RenderTableCell::setColSpan):
(khtml::RenderTableCell::rowSpan):
(khtml::RenderTableCell::setRowSpan):
(khtml::RenderTableCol::span):
(khtml::RenderTableCol::setSpan):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8217
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-12-14 David Hyatt <hyatt@apple.com>
+
+ Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them. Remove
+ the ridiculous 1024 limit on the span values.
+
+ * khtml/html/html_tableimpl.cpp:
+ (HTMLTableCellElementImpl::parseHTMLAttribute):
+ * khtml/rendering/render_table.cpp:
+ (RenderTableCell::collapsedBottomBorder):
+ * khtml/rendering/render_table.h:
+ (khtml::RenderTableCell::colSpan):
+ (khtml::RenderTableCell::setColSpan):
+ (khtml::RenderTableCell::rowSpan):
+ (khtml::RenderTableCell::setRowSpan):
+ (khtml::RenderTableCol::span):
+ (khtml::RenderTableCol::setSpan):
+
2004-12-14 David Hyatt <hyatt@apple.com>
Make sure <col> and <colgroup> can have spans updated dynamically as well.
switch(attr->id())
{
case ATTR_ROWSPAN:
- // ###
rSpan = !attr->isNull() ? attr->value().toInt() : 1;
- // limit this to something not causing an overflow with short int
- if (rSpan < 1 || rSpan > 1024) rSpan = 1;
+ if (rSpan < 1) rSpan = 1;
if (renderer() && renderer()->isTableCell())
static_cast<RenderTableCell*>(renderer())->updateFromElement();
break;
case ATTR_COLSPAN:
- // ###
cSpan = !attr->isNull() ? attr->value().toInt() : 1;
- // limit this to something not causing an overflow with short int
- if (cSpan < 1 || cSpan > 1024) cSpan = 1;
+ if (cSpan < 1) cSpan = 1;
if (renderer() && renderer()->isTableCell())
static_cast<RenderTableCell*>(renderer())->updateFromElement();
break;
// Now check row groups.
RenderObject* currSection = parent()->parent();
- if (row()+rowSpan() >= static_cast<RenderTableSection*>(currSection)->numRows()) {
+ if (row() + rowSpan() >= static_cast<RenderTableSection*>(currSection)->numRows()) {
// (5) Our row group's bottom border.
result = compareBorders(result, CollapsedBorderValue(&currSection->style()->borderBottom(), BROWGROUP));
if (!result.exists()) return result;
long cellIndex() const { return 0; }
void setCellIndex( long ) { }
- unsigned short colSpan() const { return cSpan; }
- void setColSpan( unsigned short c ) { cSpan = c; }
+ int colSpan() const { return cSpan; }
+ void setColSpan(int c) { cSpan = c; }
- unsigned short rowSpan() const { return rSpan; }
- void setRowSpan( unsigned short r ) { rSpan = r; }
+ int rowSpan() const { return rSpan; }
+ void setRowSpan(int r) { rSpan = r; }
int col() const { return _col; }
void setCol(int col) { _col = col; }
int _row;
int _col;
- ushort rSpan;
- ushort cSpan;
+ int rSpan;
+ int cSpan;
int _topExtra : 31;
bool nWrap : 1;
int _bottomExtra : 31;
virtual const char *renderName() const { return "RenderTableCol"; }
- long span() const { return _span; }
- void setSpan( long s ) { _span = s; }
+ int span() const { return _span; }
+ void setSpan(int s) { _span = s; }
virtual void addChild(RenderObject *child, RenderObject *beforeChild = 0);
#endif
protected:
- short _span;
+ int _span;
};
};