OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
11 * modify it under the terms of the GNU Library General Public | 11 * modify it under the terms of the GNU Library General Public |
12 * License as published by the Free Software Foundation; either | 12 * License as published by the Free Software Foundation; either |
13 * version 2 of the License, or (at your option) any later version. | 13 * version 2 of the License, or (at your option) any later version. |
14 * | 14 * |
15 * This library is distributed in the hope that it will be useful, | 15 * This library is distributed in the hope that it will be useful, |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 * Library General Public License for more details. | 18 * Library General Public License for more details. |
19 * | 19 * |
20 * You should have received a copy of the GNU Library General Public License | 20 * You should have received a copy of the GNU Library General Public License |
21 * along with this library; see the file COPYING.LIB. If not, write to | 21 * along with this library; see the file COPYING.LIB. If not, write to |
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 * Boston, MA 02110-1301, USA. | 23 * Boston, MA 02110-1301, USA. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef LayoutTableCol_h | 26 #ifndef LayoutTableCol_h |
27 #define LayoutTableCol_h | 27 #define LayoutTableCol_h |
28 | 28 |
29 #include "core/rendering/RenderBox.h" | 29 #include "core/layout/LayoutBox.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 class LayoutTable; | 33 class LayoutTable; |
34 class LayoutTableCell; | 34 class LayoutTableCell; |
35 | 35 |
36 class LayoutTableCol final : public RenderBox { | 36 class LayoutTableCol final : public LayoutBox { |
37 public: | 37 public: |
38 explicit LayoutTableCol(Element*); | 38 explicit LayoutTableCol(Element*); |
39 | 39 |
40 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } | 40 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } |
41 | 41 |
42 // If you have a LayoutTableCol, use firstChild or lastChild instead. | 42 // If you have a LayoutTableCol, use firstChild or lastChild instead. |
43 void slowFirstChild() const = delete; | 43 void slowFirstChild() const = delete; |
44 void slowLastChild() const = delete; | 44 void slowLastChild() const = delete; |
45 | 45 |
46 const LayoutObjectChildList* children() const { return &m_children; } | 46 const LayoutObjectChildList* children() const { return &m_children; } |
(...skipping 29 matching lines...) Expand all Loading... |
76 const BorderValue& borderAdjoiningCellStartBorder(const LayoutTableCell*) co
nst; | 76 const BorderValue& borderAdjoiningCellStartBorder(const LayoutTableCell*) co
nst; |
77 const BorderValue& borderAdjoiningCellEndBorder(const LayoutTableCell*) cons
t; | 77 const BorderValue& borderAdjoiningCellEndBorder(const LayoutTableCell*) cons
t; |
78 const BorderValue& borderAdjoiningCellBefore(const LayoutTableCell*) const; | 78 const BorderValue& borderAdjoiningCellBefore(const LayoutTableCell*) const; |
79 const BorderValue& borderAdjoiningCellAfter(const LayoutTableCell*) const; | 79 const BorderValue& borderAdjoiningCellAfter(const LayoutTableCell*) const; |
80 | 80 |
81 private: | 81 private: |
82 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } | 82 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } |
83 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } | 83 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } |
84 | 84 |
85 virtual const char* renderName() const override { return "LayoutTableCol"; } | 85 virtual const char* renderName() const override { return "LayoutTableCol"; } |
86 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutTableCol || RenderBox::isOfType(type); } | 86 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutTableCol || LayoutBox::isOfType(type); } |
87 virtual void updateFromElement() override; | 87 virtual void updateFromElement() override; |
88 virtual void computePreferredLogicalWidths() override { ASSERT_NOT_REACHED()
; } | 88 virtual void computePreferredLogicalWidths() override { ASSERT_NOT_REACHED()
; } |
89 | 89 |
90 virtual void insertedIntoTree() override; | 90 virtual void insertedIntoTree() override; |
91 virtual void willBeRemovedFromTree() override; | 91 virtual void willBeRemovedFromTree() override; |
92 | 92 |
93 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid
e; | 93 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid
e; |
94 virtual bool canHaveChildren() const override; | 94 virtual bool canHaveChildren() const override; |
95 virtual LayerType layerTypeRequired() const override { return NoLayer; } | 95 virtual LayerType layerTypeRequired() const override { return NoLayer; } |
96 | 96 |
97 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const
override; | 97 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const
override; |
98 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; | 98 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; |
99 | 99 |
100 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov
erride; | 100 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov
erride; |
101 | 101 |
102 LayoutTable* table() const; | 102 LayoutTable* table() const; |
103 | 103 |
104 LayoutObjectChildList m_children; | 104 LayoutObjectChildList m_children; |
105 unsigned m_span; | 105 unsigned m_span; |
106 }; | 106 }; |
107 | 107 |
108 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCol, isLayoutTableCol()); | 108 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCol, isLayoutTableCol()); |
109 | 109 |
110 } | 110 } |
111 | 111 |
112 #endif | 112 #endif |
OLD | NEW |