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

Side by Side Diff: Source/core/rendering/RenderTable.h

Issue 129173004: Update rendering classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « Source/core/rendering/RenderSlider.h ('k') | Source/core/rendering/RenderTableCell.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, 2010 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 explicit RenderTable(Element*); 45 explicit RenderTable(Element*);
46 virtual ~RenderTable(); 46 virtual ~RenderTable();
47 47
48 // Per CSS 3 writing-mode: "The first and second values of the 'border-spaci ng' property represent spacing between columns 48 // Per CSS 3 writing-mode: "The first and second values of the 'border-spaci ng' property represent spacing between columns
49 // and rows respectively, not necessarily the horizontal and vertical spacin g respectively". 49 // and rows respectively, not necessarily the horizontal and vertical spacin g respectively".
50 int hBorderSpacing() const { return m_hSpacing; } 50 int hBorderSpacing() const { return m_hSpacing; }
51 int vBorderSpacing() const { return m_vSpacing; } 51 int vBorderSpacing() const { return m_vSpacing; }
52 52
53 bool collapseBorders() const { return style()->borderCollapse(); } 53 bool collapseBorders() const { return style()->borderCollapse(); }
54 54
55 int borderStart() const { return m_borderStart; } 55 virtual int borderStart() const OVERRIDE { return m_borderStart; }
56 int borderEnd() const { return m_borderEnd; } 56 virtual int borderEnd() const OVERRIDE { return m_borderEnd; }
57 int borderBefore() const; 57 virtual int borderBefore() const OVERRIDE;
58 int borderAfter() const; 58 virtual int borderAfter() const OVERRIDE;
59 59
60 int borderLeft() const 60 virtual int borderLeft() const OVERRIDE
61 { 61 {
62 if (style()->isHorizontalWritingMode()) 62 if (style()->isHorizontalWritingMode())
63 return style()->isLeftToRightDirection() ? borderStart() : borderEnd (); 63 return style()->isLeftToRightDirection() ? borderStart() : borderEnd ();
64 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borderBef ore(); 64 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borderBef ore();
65 } 65 }
66 66
67 int borderRight() const 67 virtual int borderRight() const OVERRIDE
68 { 68 {
69 if (style()->isHorizontalWritingMode()) 69 if (style()->isHorizontalWritingMode())
70 return style()->isLeftToRightDirection() ? borderEnd() : borderStart (); 70 return style()->isLeftToRightDirection() ? borderEnd() : borderStart ();
71 return style()->isFlippedBlocksWritingMode() ? borderBefore() : borderAf ter(); 71 return style()->isFlippedBlocksWritingMode() ? borderBefore() : borderAf ter();
72 } 72 }
73 73
74 int borderTop() const 74 virtual int borderTop() const OVERRIDE
75 { 75 {
76 if (style()->isHorizontalWritingMode()) 76 if (style()->isHorizontalWritingMode())
77 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borde rBefore(); 77 return style()->isFlippedBlocksWritingMode() ? borderAfter() : borde rBefore();
78 return style()->isLeftToRightDirection() ? borderStart() : borderEnd(); 78 return style()->isLeftToRightDirection() ? borderStart() : borderEnd();
79 } 79 }
80 80
81 int borderBottom() const 81 virtual int borderBottom() const OVERRIDE
82 { 82 {
83 if (style()->isHorizontalWritingMode()) 83 if (style()->isHorizontalWritingMode())
84 return style()->isFlippedBlocksWritingMode() ? borderBefore() : bord erAfter(); 84 return style()->isFlippedBlocksWritingMode() ? borderBefore() : bord erAfter();
85 return style()->isLeftToRightDirection() ? borderEnd() : borderStart(); 85 return style()->isLeftToRightDirection() ? borderEnd() : borderStart();
86 } 86 }
87 87
88 Color bgColor() const { return resolveColor(CSSPropertyBackgroundColor); } 88 Color bgColor() const { return resolveColor(CSSPropertyBackgroundColor); }
89 89
90 int outerBorderBefore() const; 90 int outerBorderBefore() const;
91 int outerBorderAfter() const; 91 int outerBorderAfter() const;
(...skipping 25 matching lines...) Expand all
117 { 117 {
118 if (style()->isHorizontalWritingMode()) 118 if (style()->isHorizontalWritingMode())
119 return style()->isFlippedBlocksWritingMode() ? outerBorderBefore() : outerBorderAfter(); 119 return style()->isFlippedBlocksWritingMode() ? outerBorderBefore() : outerBorderAfter();
120 return style()->isLeftToRightDirection() ? outerBorderEnd() : outerBorde rStart(); 120 return style()->isLeftToRightDirection() ? outerBorderEnd() : outerBorde rStart();
121 } 121 }
122 122
123 int calcBorderStart() const; 123 int calcBorderStart() const;
124 int calcBorderEnd() const; 124 int calcBorderEnd() const;
125 void recalcBordersInRowDirection(); 125 void recalcBordersInRowDirection();
126 126
127 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0); 127 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) OV ERRIDE;
128 128
129 struct ColumnStruct { 129 struct ColumnStruct {
130 explicit ColumnStruct(unsigned initialSpan = 1) 130 explicit ColumnStruct(unsigned initialSpan = 1)
131 : span(initialSpan) 131 : span(initialSpan)
132 { 132 {
133 } 133 }
134 134
135 unsigned span; 135 unsigned span;
136 }; 136 };
137 137
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 const BorderValue& tableStartBorderAdjoiningCell(const RenderTableCell*) con st; 257 const BorderValue& tableStartBorderAdjoiningCell(const RenderTableCell*) con st;
258 const BorderValue& tableEndBorderAdjoiningCell(const RenderTableCell*) const ; 258 const BorderValue& tableEndBorderAdjoiningCell(const RenderTableCell*) const ;
259 259
260 void addCaption(const RenderTableCaption*); 260 void addCaption(const RenderTableCaption*);
261 void removeCaption(const RenderTableCaption*); 261 void removeCaption(const RenderTableCaption*);
262 void addColumn(const RenderTableCol*); 262 void addColumn(const RenderTableCol*);
263 void removeColumn(const RenderTableCol*); 263 void removeColumn(const RenderTableCol*);
264 264
265 protected: 265 protected:
266 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 266 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
267 virtual void simplifiedNormalFlowLayout(); 267 virtual void simplifiedNormalFlowLayout() OVERRIDE;
268 268
269 private: 269 private:
270 virtual const char* renderName() const { return "RenderTable"; } 270 virtual const char* renderName() const OVERRIDE { return "RenderTable"; }
271 271
272 virtual bool isTable() const { return true; } 272 virtual bool isTable() const OVERRIDE { return true; }
273 273
274 virtual bool avoidsFloats() const { return true; } 274 virtual bool avoidsFloats() const OVERRIDE { return true; }
275 275
276 virtual void paint(PaintInfo&, const LayoutPoint&); 276 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
277 virtual void paintObject(PaintInfo&, const LayoutPoint&); 277 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE;
278 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); 278 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&) OVERRIDE;
279 virtual void paintMask(PaintInfo&, const LayoutPoint&); 279 virtual void paintMask(PaintInfo&, const LayoutPoint&) OVERRIDE;
280 virtual void layout(); 280 virtual void layout() OVERRIDE;
281 virtual bool supportsPartialLayout() const OVERRIDE { return false; } 281 virtual bool supportsPartialLayout() const OVERRIDE { return false; }
282 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth) const OVERRIDE; 282 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth) const OVERRIDE;
283 virtual void computePreferredLogicalWidths() OVERRIDE; 283 virtual void computePreferredLogicalWidths() OVERRIDE;
284 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE; 284 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE;
285 285
286 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE; 286 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE;
287 virtual int firstLineBoxBaseline() const OVERRIDE; 287 virtual int firstLineBoxBaseline() const OVERRIDE;
288 virtual int inlineBlockBaseline(LineDirectionMode) const OVERRIDE; 288 virtual int inlineBlockBaseline(LineDirectionMode) const OVERRIDE;
289 289
290 RenderTableCol* slowColElement(unsigned col, bool* startEdge, bool* endEdge) const; 290 RenderTableCol* slowColElement(unsigned col, bool* startEdge, bool* endEdge) const;
291 291
292 void updateColumnCache() const; 292 void updateColumnCache() const;
293 void invalidateCachedColumns(); 293 void invalidateCachedColumns();
294 294
295 virtual RenderBlock* firstLineBlock() const; 295 virtual RenderBlock* firstLineBlock() const OVERRIDE;
296 virtual void updateFirstLetter(); 296 virtual void updateFirstLetter() OVERRIDE;
297 297
298 virtual void updateLogicalWidth() OVERRIDE; 298 virtual void updateLogicalWidth() OVERRIDE;
299 299
300 LayoutUnit convertStyleLogicalWidthToComputedWidth(const Length& styleLogica lWidth, LayoutUnit availableWidth); 300 LayoutUnit convertStyleLogicalWidthToComputedWidth(const Length& styleLogica lWidth, LayoutUnit availableWidth);
301 LayoutUnit convertStyleLogicalHeightToComputedHeight(const Length& styleLogi calHeight); 301 LayoutUnit convertStyleLogicalHeightToComputedHeight(const Length& styleLogi calHeight);
302 302
303 virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegio n*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize); 303 virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegio n*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize);
304 304
305 virtual void addOverflowFromChildren(); 305 virtual void addOverflowFromChildren() OVERRIDE;
306 306
307 void subtractCaptionRect(LayoutRect&) const; 307 void subtractCaptionRect(LayoutRect&) const;
308 308
309 void recalcCollapsedBorders(); 309 void recalcCollapsedBorders();
310 void recalcSections() const; 310 void recalcSections() const;
311 void layoutCaption(RenderTableCaption*); 311 void layoutCaption(RenderTableCaption*);
312 312
313 void distributeExtraLogicalHeight(int extraLogicalHeight); 313 void distributeExtraLogicalHeight(int extraLogicalHeight);
314 314
315 mutable Vector<int> m_columnPos; 315 mutable Vector<int> m_columnPos;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 if (m_firstBody) 347 if (m_firstBody)
348 return m_firstBody; 348 return m_firstBody;
349 return m_foot; 349 return m_foot;
350 } 350 }
351 351
352 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTable, isTable()); 352 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTable, isTable());
353 353
354 } // namespace WebCore 354 } // namespace WebCore
355 355
356 #endif // RenderTable_h 356 #endif // RenderTable_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderSlider.h ('k') | Source/core/rendering/RenderTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698