18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 1997 Martin Jones (mjones@kde.org) 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1997 Torben Weis (weis@kde.org) 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1998 Waldo Bastian (bastian@kde.org) 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1999 Lars Knoll (knoll@kde.org) 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1999 Antti Koivisto (koivisto@kde.org) 70bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * This library is free software; you can redistribute it and/or 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modify it under the terms of the GNU Library General Public 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * License as published by the Free Software Foundation; either 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * version 2 of the License, or (at your option) any later version. 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * This library is distributed in the hope that it will be useful, 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * but WITHOUT ANY WARRANTY; without even the implied warranty of 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Library General Public License for more details. 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * You should have received a copy of the GNU Library General Public License 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * along with this library; see the file COPYING.LIB. If not, write to 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Boston, MA 02110-1301, USA. 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef RenderTableRow_h 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define RenderTableRow_h 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "RenderTableSection.h" 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 328f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qianclass RenderTableRow : public RenderBox { 338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectpublic: 34a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch explicit RenderTableRow(Node*); 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 368f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian const RenderObjectChildList* children() const { return &m_children; } 378f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian RenderObjectChildList* children() { return &m_children; } 388f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 390bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch RenderTableSection* section() const { return toRenderTableSection(parent()); } 400bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch RenderTable* table() const { return toRenderTable(parent()->parent()); } 41635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 422daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch void updateBeforeAndAfterContent(); 432daae5fd11344eaa88a0d92b0f6d65f8d2255c00Ben Murdoch 44635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Projectprivate: 450bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch virtual RenderObjectChildList* virtualChildren() { return children(); } 460bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch virtual const RenderObjectChildList* virtualChildren() const { return children(); } 470bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual const char* renderName() const { return isAnonymous() ? "RenderTableRow (anonymous)" : "RenderTableRow"; } 498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool isTableRow() const { return true; } 518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void destroy(); 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0); 558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void layout(); 568f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer); 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // The only time rows get a layer is when they have transparency. 608f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian virtual bool requiresLayer() const { return isTransparent() || hasOverflowClip() || hasTransform() || hasMask(); } 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void paint(PaintInfo&, int tx, int ty); 638f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian 64635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); 658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 668f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); 672bde8e466a4451c7319e3a072d118917957d6554Steve Block virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 698f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian RenderObjectChildList m_children; 708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}; 718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 720bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochinline RenderTableRow* toRenderTableRow(RenderObject* object) 730bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch{ 740bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch ASSERT(!object || object->isTableRow()); 750bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch return static_cast<RenderTableRow*>(object); 760bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch} 770bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 780bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochinline const RenderTableRow* toRenderTableRow(const RenderObject* object) 790bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch{ 800bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch ASSERT(!object || object->isTableRow()); 810bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch return static_cast<const RenderTableRow*>(object); 820bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch} 830bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 840bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch// This will catch anyone doing an unnecessary cast. 850bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdochvoid toRenderTableRow(const RenderTableRow*); 860bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch 878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} // namespace WebCore 888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif // RenderTableRow_h 90