summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderTableCell.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-08-11 17:01:47 +0100
committerBen Murdoch <benm@google.com>2009-08-11 18:21:02 +0100
commit0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch)
tree2943df35f62d885c89d01063cc528dd73b480fea /WebCore/rendering/RenderTableCell.h
parent7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff)
downloadexternal_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz
external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/rendering/RenderTableCell.h')
-rw-r--r--WebCore/rendering/RenderTableCell.h57
1 files changed, 41 insertions, 16 deletions
diff --git a/WebCore/rendering/RenderTableCell.h b/WebCore/rendering/RenderTableCell.h
index 4b09032..3eccfbd 100644
--- a/WebCore/rendering/RenderTableCell.h
+++ b/WebCore/rendering/RenderTableCell.h
@@ -4,7 +4,7 @@
* (C) 1998 Waldo Bastian (bastian@kde.org)
* (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -33,12 +33,6 @@ class RenderTableCell : public RenderBlock {
public:
RenderTableCell(Node*);
- virtual const char* renderName() const { return isAnonymous() ? "RenderTableCell (anonymous)" : "RenderTableCell"; }
-
- virtual bool isTableCell() const { return true; }
-
- virtual void destroy();
-
// FIXME: need to implement cellIndex
int cellIndex() const { return 0; }
void setCellIndex(int) { }
@@ -54,13 +48,14 @@ public:
int row() const { return m_row; }
void setRow(int row) { m_row = row; }
- RenderTableSection* section() const { return static_cast<RenderTableSection*>(parent()->parent()); }
- RenderTable* table() const { return static_cast<RenderTable*>(parent()->parent()->parent()); }
+ RenderTableSection* section() const { return toRenderTableSection(parent()->parent()); }
+ RenderTable* table() const { return toRenderTable(parent()->parent()->parent()); }
Length styleOrColWidth() const;
- virtual bool requiresLayer() const { return isPositioned() || isTransparent() || hasOverflowClip() || hasTransform() || hasMask() || hasReflection(); }
+ virtual void calcPrefWidths();
+#ifdef MANUAL_MERGE_REQUIRED
virtual void calcPrefWidths();
virtual void calcWidth();
#ifdef ANDROID_LAYOUT
@@ -68,6 +63,8 @@ public:
int getVisibleWidth() { return m_visibleWidth; }
#endif
+#else // MANUAL_MERGE_REQUIRED
+#endif // MANUAL_MERGE_REQUIRED
void updateWidth(int);
int borderLeft() const;
@@ -94,13 +91,8 @@ public:
virtual void layout();
virtual void paint(PaintInfo&, int tx, int ty);
- virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
- virtual void paintMask(PaintInfo& paintInfo, int tx, int ty);
- void paintCollapsedBorder(GraphicsContext*, int x, int y, int w, int h);
- void paintBackgroundsBehindCell(PaintInfo&, int tx, int ty, RenderObject* backgroundObject);
- virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
- virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
+ void paintBackgroundsBehindCell(PaintInfo&, int tx, int ty, RenderObject* backgroundObject);
virtual int baselinePosition(bool firstLine = false, bool isRootLineBox = false) const;
@@ -125,6 +117,24 @@ protected:
virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
private:
+ virtual const char* renderName() const { return isAnonymous() ? "RenderTableCell (anonymous)" : "RenderTableCell"; }
+
+ virtual bool isTableCell() const { return true; }
+
+ virtual void destroy();
+
+ virtual bool requiresLayer() const { return isPositioned() || isTransparent() || hasOverflowClip() || hasTransform() || hasMask() || hasReflection(); }
+
+ virtual void calcWidth();
+
+ virtual void paintBoxDecorations(PaintInfo&, int tx, int ty);
+ virtual void paintMask(PaintInfo&, int tx, int ty);
+
+ virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
+ virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
+
+ void paintCollapsedBorder(GraphicsContext*, int x, int y, int w, int h);
+
int m_row;
int m_column;
int m_rowSpan;
@@ -134,6 +144,21 @@ private:
int m_percentageHeight;
};
+inline RenderTableCell* toRenderTableCell(RenderObject* object)
+{
+ ASSERT(!object || object->isTableCell());
+ return static_cast<RenderTableCell*>(object);
+}
+
+inline const RenderTableCell* toRenderTableCell(const RenderObject* object)
+{
+ ASSERT(!object || object->isTableCell());
+ return static_cast<const RenderTableCell*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderTableCell(const RenderTableCell*);
+
} // namespace WebCore
#endif // RenderTableCell_h