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

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

Issue 640593002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/[css|rendering|clipboard] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased the patch Created 6 years, 2 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/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderHTMLCanvas.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 18 matching lines...) Expand all
29 #include "core/rendering/OrderIterator.h" 29 #include "core/rendering/OrderIterator.h"
30 #include "core/rendering/RenderBlock.h" 30 #include "core/rendering/RenderBlock.h"
31 #include "core/rendering/style/GridResolvedPosition.h" 31 #include "core/rendering/style/GridResolvedPosition.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 struct GridCoordinate; 35 struct GridCoordinate;
36 struct GridSpan; 36 struct GridSpan;
37 class GridTrack; 37 class GridTrack;
38 38
39 class RenderGrid FINAL : public RenderBlock { 39 class RenderGrid final : public RenderBlock {
40 public: 40 public:
41 RenderGrid(Element*); 41 RenderGrid(Element*);
42 virtual ~RenderGrid(); 42 virtual ~RenderGrid();
43 43
44 virtual const char* renderName() const OVERRIDE; 44 virtual const char* renderName() const override;
45 45
46 virtual void layoutBlock(bool relayoutChildren) OVERRIDE; 46 virtual void layoutBlock(bool relayoutChildren) override;
47 47
48 virtual bool canCollapseAnonymousBlockChild() const OVERRIDE { return false; } 48 virtual bool canCollapseAnonymousBlockChild() const override { return false; }
49 49
50 void dirtyGrid(); 50 void dirtyGrid();
51 51
52 const Vector<LayoutUnit>& columnPositions() const { return m_columnPositions ; } 52 const Vector<LayoutUnit>& columnPositions() const { return m_columnPositions ; }
53 const Vector<LayoutUnit>& rowPositions() const { return m_rowPositions; } 53 const Vector<LayoutUnit>& rowPositions() const { return m_rowPositions; }
54 54
55 typedef Vector<RenderBox*, 1> GridCell; 55 typedef Vector<RenderBox*, 1> GridCell;
56 const GridCell& gridCell(int row, int column) { return m_grid[row][column]; } 56 const GridCell& gridCell(int row, int column) { return m_grid[row][column]; }
57 const Vector<RenderBox*>& itemsOverflowingGridArea() { return m_gridItemsOve rflowingGridArea; } 57 const Vector<RenderBox*>& itemsOverflowingGridArea() { return m_gridItemsOve rflowingGridArea; }
58 int paintIndexForGridItem(const RenderBox* renderBox) { return m_gridItemsIn dexesMap.get(renderBox); } 58 int paintIndexForGridItem(const RenderBox* renderBox) { return m_gridItemsIn dexesMap.get(renderBox); }
59 59
60 bool gridIsDirty() const { return m_gridIsDirty; } 60 bool gridIsDirty() const { return m_gridIsDirty; }
61 61
62 private: 62 private:
63 virtual bool isRenderGrid() const OVERRIDE { return true; } 63 virtual bool isRenderGrid() const override { return true; }
64 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE; 64 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override;
65 virtual void computePreferredLogicalWidths() OVERRIDE; 65 virtual void computePreferredLogicalWidths() override;
66 66
67 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE; 67 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override;
68 void addChildToIndexesMap(RenderBox&); 68 void addChildToIndexesMap(RenderBox&);
69 virtual void removeChild(RenderObject*) OVERRIDE; 69 virtual void removeChild(RenderObject*) override;
70 70
71 virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE; 71 virtual void styleDidChange(StyleDifference, const RenderStyle*) override;
72 72
73 bool explicitGridDidResize(const RenderStyle*) const; 73 bool explicitGridDidResize(const RenderStyle*) const;
74 bool namedGridLinesDefinitionDidChange(const RenderStyle*) const; 74 bool namedGridLinesDefinitionDidChange(const RenderStyle*) const;
75 75
76 class GridIterator; 76 class GridIterator;
77 struct GridSizingData; 77 struct GridSizingData;
78 bool gridElementIsShrinkToFit(); 78 bool gridElementIsShrinkToFit();
79 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &); 79 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &);
80 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &, LayoutUnit& availableLogicalSpace); 80 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData &, LayoutUnit& availableLogicalSpace);
81 LayoutUnit computeUsedBreadthOfMinLength(GridTrackSizingDirection, const Gri dLength&) const; 81 LayoutUnit computeUsedBreadthOfMinLength(GridTrackSizingDirection, const Gri dLength&) const;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 LayoutUnit columnPositionForChild(const RenderBox&) const; 119 LayoutUnit columnPositionForChild(const RenderBox&) const;
120 LayoutUnit startOfRowForChild(const RenderBox& child) const; 120 LayoutUnit startOfRowForChild(const RenderBox& child) const;
121 LayoutUnit endOfRowForChild(const RenderBox& child) const; 121 LayoutUnit endOfRowForChild(const RenderBox& child) const;
122 LayoutUnit centeredRowPositionForChild(const RenderBox&) const; 122 LayoutUnit centeredRowPositionForChild(const RenderBox&) const;
123 LayoutUnit rowPositionForChild(const RenderBox&) const; 123 LayoutUnit rowPositionForChild(const RenderBox&) const;
124 LayoutPoint findChildLogicalPosition(const RenderBox&) const; 124 LayoutPoint findChildLogicalPosition(const RenderBox&) const;
125 GridCoordinate cachedGridCoordinate(const RenderBox&) const; 125 GridCoordinate cachedGridCoordinate(const RenderBox&) const;
126 126
127 LayoutUnit gridAreaBreadthForChild(const RenderBox& child, GridTrackSizingDi rection, const Vector<GridTrack>&) const; 127 LayoutUnit gridAreaBreadthForChild(const RenderBox& child, GridTrackSizingDi rection, const Vector<GridTrack>&) const;
128 128
129 virtual void paintChildren(PaintInfo&, const LayoutPoint&) OVERRIDE; 129 virtual void paintChildren(PaintInfo&, const LayoutPoint&) override;
130 130
131 #if ENABLE(ASSERT) 131 #if ENABLE(ASSERT)
132 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&); 132 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&);
133 #endif 133 #endif
134 134
135 size_t gridItemSpan(const RenderBox&, GridTrackSizingDirection); 135 size_t gridItemSpan(const RenderBox&, GridTrackSizingDirection);
136 136
137 size_t gridColumnCount() const 137 size_t gridColumnCount() const
138 { 138 {
139 ASSERT(!gridIsDirty()); 139 ASSERT(!gridIsDirty());
(...skipping 14 matching lines...) Expand all
154 OrderIterator m_orderIterator; 154 OrderIterator m_orderIterator;
155 Vector<RenderBox*> m_gridItemsOverflowingGridArea; 155 Vector<RenderBox*> m_gridItemsOverflowingGridArea;
156 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; 156 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap;
157 }; 157 };
158 158
159 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); 159 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid());
160 160
161 } // namespace blink 161 } // namespace blink
162 162
163 #endif // RenderGrid_h 163 #endif // RenderGrid_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderHTMLCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698