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, 2013 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv
ed. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void increaseEnd() { ++m_end; } | 56 void increaseEnd() { ++m_end; } |
57 | 57 |
58 private: | 58 private: |
59 unsigned m_start; | 59 unsigned m_start; |
60 unsigned m_end; | 60 unsigned m_end; |
61 }; | 61 }; |
62 | 62 |
63 class RenderTableCell; | 63 class RenderTableCell; |
64 class RenderTableRow; | 64 class RenderTableRow; |
65 | 65 |
66 class RenderTableSection FINAL : public RenderBox { | 66 class RenderTableSection final : public RenderBox { |
67 public: | 67 public: |
68 RenderTableSection(Element*); | 68 RenderTableSection(Element*); |
69 virtual ~RenderTableSection(); | 69 virtual ~RenderTableSection(); |
70 virtual void trace(Visitor*) OVERRIDE; | 70 virtual void trace(Visitor*) override; |
71 | 71 |
72 RenderTableRow* firstRow() const; | 72 RenderTableRow* firstRow() const; |
73 RenderTableRow* lastRow() const; | 73 RenderTableRow* lastRow() const; |
74 | 74 |
75 const RenderObjectChildList* children() const { return &m_children; } | 75 const RenderObjectChildList* children() const { return &m_children; } |
76 RenderObjectChildList* children() { return &m_children; } | 76 RenderObjectChildList* children() { return &m_children; } |
77 | 77 |
78 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) OV
ERRIDE; | 78 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) ov
erride; |
79 | 79 |
80 virtual int firstLineBoxBaseline() const OVERRIDE; | 80 virtual int firstLineBoxBaseline() const override; |
81 | 81 |
82 void addCell(RenderTableCell*, RenderTableRow* row); | 82 void addCell(RenderTableCell*, RenderTableRow* row); |
83 | 83 |
84 int calcRowLogicalHeight(); | 84 int calcRowLogicalHeight(); |
85 void layoutRows(); | 85 void layoutRows(); |
86 void computeOverflowFromCells(); | 86 void computeOverflowFromCells(); |
87 | 87 |
88 RenderTable* table() const { return toRenderTable(parent()); } | 88 RenderTable* table() const { return toRenderTable(parent()); } |
89 | 89 |
90 typedef WillBeHeapVector<RawPtrWillBeMember<RenderTableCell>, 2> SpanningRen
derTableCells; | 90 typedef WillBeHeapVector<RawPtrWillBeMember<RenderTableCell>, 2> SpanningRen
derTableCells; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 void removeCachedCollapsedBorders(const RenderTableCell*); | 214 void removeCachedCollapsedBorders(const RenderTableCell*); |
215 void setCachedCollapsedBorder(const RenderTableCell*, CollapsedBorderSide, C
ollapsedBorderValue); | 215 void setCachedCollapsedBorder(const RenderTableCell*, CollapsedBorderSide, C
ollapsedBorderValue); |
216 CollapsedBorderValue& cachedCollapsedBorder(const RenderTableCell*, Collapse
dBorderSide); | 216 CollapsedBorderValue& cachedCollapsedBorder(const RenderTableCell*, Collapse
dBorderSide); |
217 | 217 |
218 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo
gical height. | 218 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo
gical height. |
219 // FIXME: We may want to introduce a structure holding the in-flux layout in
formation. | 219 // FIXME: We may want to introduce a structure holding the in-flux layout in
formation. |
220 int distributeExtraLogicalHeightToRows(int extraLogicalHeight); | 220 int distributeExtraLogicalHeightToRows(int extraLogicalHeight); |
221 | 221 |
222 static RenderTableSection* createAnonymousWithParentRenderer(const RenderObj
ect*); | 222 static RenderTableSection* createAnonymousWithParentRenderer(const RenderObj
ect*); |
223 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare
nt) const OVERRIDE | 223 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare
nt) const override |
224 { | 224 { |
225 return createAnonymousWithParentRenderer(parent); | 225 return createAnonymousWithParentRenderer(parent); |
226 } | 226 } |
227 | 227 |
228 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 228 virtual void paint(PaintInfo&, const LayoutPoint&) override; |
229 | 229 |
230 // Flip the rect so it aligns with the coordinates used by the rowPos and co
lumnPos vectors. | 230 // Flip the rect so it aligns with the coordinates used by the rowPos and co
lumnPos vectors. |
231 LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const; | 231 LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const; |
232 | 232 |
233 CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const; | 233 CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const; |
234 CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const; | 234 CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const; |
235 WillBeHeapHashSet<RawPtrWillBeMember<RenderTableCell> >& overflowingCells()
{ return m_overflowingCells; } | 235 WillBeHeapHashSet<RawPtrWillBeMember<RenderTableCell> >& overflowingCells()
{ return m_overflowingCells; } |
236 bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; } | 236 bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; } |
237 | 237 |
238 protected: | 238 protected: |
239 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 239 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
240 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; | 240 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; |
241 | 241 |
242 private: | 242 private: |
243 virtual RenderObjectChildList* virtualChildren() OVERRIDE { return children(
); } | 243 virtual RenderObjectChildList* virtualChildren() override { return children(
); } |
244 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE { retu
rn children(); } | 244 virtual const RenderObjectChildList* virtualChildren() const override { retu
rn children(); } |
245 | 245 |
246 virtual const char* renderName() const OVERRIDE { return (isAnonymous() || i
sPseudoElement()) ? "RenderTableSection (anonymous)" : "RenderTableSection"; } | 246 virtual const char* renderName() const override { return (isAnonymous() || i
sPseudoElement()) ? "RenderTableSection (anonymous)" : "RenderTableSection"; } |
247 | 247 |
248 virtual bool isTableSection() const OVERRIDE { return true; } | 248 virtual bool isTableSection() const override { return true; } |
249 | 249 |
250 virtual void willBeRemovedFromTree() OVERRIDE; | 250 virtual void willBeRemovedFromTree() override; |
251 | 251 |
252 virtual void layout() OVERRIDE; | 252 virtual void layout() override; |
253 | 253 |
254 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE; | 254 virtual void paintObject(PaintInfo&, const LayoutPoint&) override; |
255 | 255 |
256 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 256 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; |
257 | 257 |
258 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowRenderer
? table()->vBorderSpacing() : 0; } | 258 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowRenderer
? table()->vBorderSpacing() : 0; } |
259 | 259 |
260 void ensureRows(unsigned); | 260 void ensureRows(unsigned); |
261 | 261 |
262 bool rowHasOnlySpanningCells(unsigned); | 262 bool rowHasOnlySpanningCells(unsigned); |
263 unsigned calcRowHeightHavingOnlySpanningCells(unsigned); | 263 unsigned calcRowHeightHavingOnlySpanningCells(unsigned); |
264 void updateRowsHeightHavingOnlySpanningCells(RenderTableCell*, struct Spanni
ngRowsHeight&); | 264 void updateRowsHeightHavingOnlySpanningCells(RenderTableCell*, struct Spanni
ngRowsHeight&); |
265 bool isHeightNeededForRowHavingOnlySpanningCells(unsigned); | 265 bool isHeightNeededForRowHavingOnlySpanningCells(unsigned); |
266 | 266 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 static const bool needsDestruction = false; | 331 static const bool needsDestruction = false; |
332 }; | 332 }; |
333 template<> struct VectorTraits<blink::RenderTableSection::RowStruct> : VectorTra
itsBase<blink::RenderTableSection::RowStruct> { | 333 template<> struct VectorTraits<blink::RenderTableSection::RowStruct> : VectorTra
itsBase<blink::RenderTableSection::RowStruct> { |
334 static const bool needsDestruction = false; | 334 static const bool needsDestruction = false; |
335 }; | 335 }; |
336 #endif | 336 #endif |
337 | 337 |
338 } | 338 } |
339 | 339 |
340 #endif // RenderTableSection_h | 340 #endif // RenderTableSection_h |
OLD | NEW |