Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: Source/core/layout/LayoutTableSection.h

Issue 1231363003: Fix virtual/override/final usage in Source/core/layout/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutTableRow.h ('k') | Source/core/layout/LayoutTestHelper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 unsigned m_start; 62 unsigned m_start;
63 unsigned m_end; 63 unsigned m_end;
64 }; 64 };
65 65
66 class LayoutTableCell; 66 class LayoutTableCell;
67 class LayoutTableRow; 67 class LayoutTableRow;
68 68
69 class CORE_EXPORT LayoutTableSection final : public LayoutBox { 69 class CORE_EXPORT LayoutTableSection final : public LayoutBox {
70 public: 70 public:
71 LayoutTableSection(Element*); 71 LayoutTableSection(Element*);
72 virtual ~LayoutTableSection(); 72 ~LayoutTableSection() override;
73 73
74 LayoutTableRow* firstRow() const; 74 LayoutTableRow* firstRow() const;
75 LayoutTableRow* lastRow() const; 75 LayoutTableRow* lastRow() const;
76 76
77 const LayoutObjectChildList* children() const { return &m_children; } 77 const LayoutObjectChildList* children() const { return &m_children; }
78 LayoutObjectChildList* children() { return &m_children; } 78 LayoutObjectChildList* children() { return &m_children; }
79 79
80 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = nullp tr) override; 80 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride;
81 81
82 virtual int firstLineBoxBaseline() const override; 82 int firstLineBoxBaseline() const override;
83 83
84 void addCell(LayoutTableCell*, LayoutTableRow*); 84 void addCell(LayoutTableCell*, LayoutTableRow*);
85 85
86 int calcRowLogicalHeight(); 86 int calcRowLogicalHeight();
87 void layoutRows(); 87 void layoutRows();
88 void computeOverflowFromCells(); 88 void computeOverflowFromCells();
89 89
90 LayoutTable* table() const { return toLayoutTable(parent()); } 90 LayoutTable* table() const { return toLayoutTable(parent()); }
91 91
92 typedef Vector<LayoutTableCell*, 2> SpanningLayoutTableCells; 92 typedef Vector<LayoutTableCell*, 2> SpanningLayoutTableCells;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void removeCachedCollapsedBorders(const LayoutTableCell*); 212 void removeCachedCollapsedBorders(const LayoutTableCell*);
213 bool setCachedCollapsedBorder(const LayoutTableCell*, CollapsedBorderSide, c onst CollapsedBorderValue&); 213 bool setCachedCollapsedBorder(const LayoutTableCell*, CollapsedBorderSide, c onst CollapsedBorderValue&);
214 const CollapsedBorderValue& cachedCollapsedBorder(const LayoutTableCell*, Co llapsedBorderSide) const; 214 const CollapsedBorderValue& cachedCollapsedBorder(const LayoutTableCell*, Co llapsedBorderSide) const;
215 215
216 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo gical height. 216 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo gical height.
217 // FIXME: We may want to introduce a structure holding the in-flux layout in formation. 217 // FIXME: We may want to introduce a structure holding the in-flux layout in formation.
218 int distributeExtraLogicalHeightToRows(int extraLogicalHeight); 218 int distributeExtraLogicalHeightToRows(int extraLogicalHeight);
219 219
220 static LayoutTableSection* createAnonymousWithParent(const LayoutObject*); 220 static LayoutTableSection* createAnonymousWithParent(const LayoutObject*);
221 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override 221 LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* parent) cons t override
222 { 222 {
223 return createAnonymousWithParent(parent); 223 return createAnonymousWithParent(parent);
224 } 224 }
225 225
226 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 226 void paint(const PaintInfo&, const LayoutPoint&) override;
227 227
228 // Flip the rect so it aligns with the coordinates used by the rowPos and co lumnPos vectors. 228 // Flip the rect so it aligns with the coordinates used by the rowPos and co lumnPos vectors.
229 LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const; 229 LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const;
230 230
231 CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const; 231 CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const;
232 CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const; 232 CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const;
233 HashSet<LayoutTableCell*>& overflowingCells() { return m_overflowingCells; } 233 HashSet<LayoutTableCell*>& overflowingCells() { return m_overflowingCells; }
234 bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; } 234 bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; }
235 235
236 virtual const char* name() const override { return "LayoutTableSection"; } 236 const char* name() const override { return "LayoutTableSection"; }
237 237
238 protected: 238 protected:
239 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; 239 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
240 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo ntainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; 240 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
241 241
242 private: 242 private:
243 virtual LayoutObjectChildList* virtualChildren() override { return children( ); } 243 LayoutObjectChildList* virtualChildren() override { return children(); }
244 virtual const LayoutObjectChildList* virtualChildren() const override { retu rn children(); } 244 const LayoutObjectChildList* virtualChildren() const override { return child ren(); }
245 245
246 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectTableSection || LayoutBox::isOfType(type); } 246 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectTableSection || LayoutBox::isOfType(type); }
247 247
248 virtual void willBeRemovedFromTree() override; 248 void willBeRemovedFromTree() override;
249 249
250 virtual void layout() override; 250 void layout() override;
251 251
252 virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) overrid e; 252 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override;
253 253
254 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowLayoutOb ject ? table()->vBorderSpacing() : 0; } 254 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowLayoutOb ject ? table()->vBorderSpacing() : 0; }
255 255
256 void ensureRows(unsigned); 256 void ensureRows(unsigned);
257 257
258 bool rowHasOnlySpanningCells(unsigned); 258 bool rowHasOnlySpanningCells(unsigned);
259 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, int&, unsigned, unsi gned&, Vector<int>&); 259 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, int&, unsigned, unsi gned&, Vector<int>&);
260 void updateRowsHeightHavingOnlySpanningCells(LayoutTableCell*, struct Spanni ngRowsHeight&, unsigned&, Vector<int>&); 260 void updateRowsHeightHavingOnlySpanningCells(LayoutTableCell*, struct Spanni ngRowsHeight&, unsigned&, Vector<int>&);
261 261
262 void populateSpanningRowsHeightFromCell(LayoutTableCell*, struct SpanningRow sHeight&); 262 void populateSpanningRowsHeightFromCell(LayoutTableCell*, struct SpanningRow sHeight&);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // It is held at LayoutTableSection level to spare memory consumption by tab le cells. 314 // It is held at LayoutTableSection level to spare memory consumption by tab le cells.
315 using CellsCollapsedBordersMap = HashMap<pair<const LayoutTableCell*, int>, CollapsedBorderValue>; 315 using CellsCollapsedBordersMap = HashMap<pair<const LayoutTableCell*, int>, CollapsedBorderValue>;
316 CellsCollapsedBordersMap m_cellsCollapsedBorders; 316 CellsCollapsedBordersMap m_cellsCollapsedBorders;
317 }; 317 };
318 318
319 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 319 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
320 320
321 } // namespace blink 321 } // namespace blink
322 322
323 #endif // LayoutTableSection_h 323 #endif // LayoutTableSection_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTableRow.h ('k') | Source/core/layout/LayoutTestHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698