2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public License
20 * along with this library; see the file COPYING.LIB. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
25 #ifndef RenderTableRow_h
26 #define RenderTableRow_h
28 #include "RenderTableSection.h"
32 class RenderTableRow : public RenderBox {
34 explicit RenderTableRow(Node*);
36 const RenderObjectChildList* children() const { return &m_children; }
37 RenderObjectChildList* children() { return &m_children; }
39 RenderTableSection* section() const { return toRenderTableSection(parent()); }
40 RenderTable* table() const { return toRenderTable(parent()->parent()); }
42 void updateBeforeAndAfterContent();
45 virtual RenderObjectChildList* virtualChildren() { return children(); }
46 virtual const RenderObjectChildList* virtualChildren() const { return children(); }
48 virtual const char* renderName() const { return isAnonymous() ? "RenderTableRow (anonymous)" : "RenderTableRow"; }
50 virtual bool isTableRow() const { return true; }
52 virtual void willBeDestroyed();
54 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
55 virtual void layout();
56 virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
57 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
59 // The only time rows get a layer is when they have transparency.
60 virtual bool requiresLayer() const { return isTransparent() || hasOverflowClip() || hasTransform() || hasMask() || hasFilter(); }
62 virtual void paint(PaintInfo&, const LayoutPoint&);
64 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
66 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
68 RenderObjectChildList m_children;
71 inline RenderTableRow* toRenderTableRow(RenderObject* object)
73 ASSERT(!object || object->isTableRow());
74 return static_cast<RenderTableRow*>(object);
77 inline const RenderTableRow* toRenderTableRow(const RenderObject* object)
79 ASSERT(!object || object->isTableRow());
80 return static_cast<const RenderTableRow*>(object);
83 // This will catch anyone doing an unnecessary cast.
84 void toRenderTableRow(const RenderTableRow*);
86 } // namespace WebCore
88 #endif // RenderTableRow_h