#ifndef RenderTableCell_H
#define RenderTableCell_H
#include "RenderTableSection.h"
namespace WebCore {
class RenderTableCell : public RenderBlock {
public:
RenderTableCell(Node*);
virtual void destroy();
virtual const char* renderName() const { return "RenderTableCell"; }
virtual bool isTableCell() const { return true; }
int cellIndex() const { return 0; }
void setCellIndex(int) { }
int colSpan() const { return cSpan; }
void setColSpan(int c) { cSpan = c; }
int rowSpan() const { return rSpan; }
void setRowSpan(int r) { rSpan = r; }
int col() const { return _col; }
void setCol(int col) { _col = col; }
int row() const { return _row; }
void setRow(int r) { _row = r; }
Length styleOrColWidth();
virtual bool requiresLayer();
virtual void calcMinMaxWidth();
virtual void calcWidth();
virtual void setWidth(int);
virtual void setStyle(RenderStyle*);
int borderLeft() const;
int borderRight() const;
int borderTop() const;
int borderBottom() const;
CollapsedBorderValue collapsedLeftBorder(bool rtl) const;
CollapsedBorderValue collapsedRightBorder(bool rtl) const;
CollapsedBorderValue collapsedTopBorder() const;
CollapsedBorderValue collapsedBottomBorder() const;
virtual void collectBorders(DeprecatedValueList<CollapsedBorderValue>&);
virtual void updateFromElement();
virtual void layout();
void setCellTopExtra(int p) { _topExtra = p; }
void setCellBottomExtra(int p) { _bottomExtra = p; }
virtual void paint(PaintInfo& i, int tx, int ty);
void paintCollapsedBorder(GraphicsContext* p, int x, int y, int w, int h);
virtual int yPos() const { return m_y + _topExtra; }
virtual void computeAbsoluteRepaintRect(IntRect&, bool f=false);
virtual bool absolutePosition(int& xPos, int& yPos, bool f = false);
virtual short baselinePosition(bool = false) const;
virtual int borderTopExtra() const { return _topExtra; }
virtual int borderBottomExtra() const { return _bottomExtra; }
RenderTable* table() const { return static_cast<RenderTable*>(parent()->parent()->parent()); }
RenderTableSection* section() const { return static_cast<RenderTableSection*>(parent()->parent()); }
#if !NDEBUG
virtual void dump(TextStream *stream, DeprecatedString ind = "") const;
#endif
void paintBackgroundsBehindCell(PaintInfo&, int tx, int ty, RenderObject* backgroundObject);
protected:
virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
int _row;
int _col;
int rSpan;
int cSpan;
int _topExtra : 31;
bool nWrap : 1;
int _bottomExtra : 31;
bool m_widthChanged : 1;
int m_percentageHeight;
};
}
#endif