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

Side by Side Diff: Source/core/layout/LayoutMultiColumnSet.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class CORE_EXPORT LayoutMultiColumnSet : public LayoutBlockFlow { 61 class CORE_EXPORT LayoutMultiColumnSet : public LayoutBlockFlow {
62 public: 62 public:
63 static LayoutMultiColumnSet* createAnonymous(LayoutFlowThread&, const Comput edStyle& parentStyle); 63 static LayoutMultiColumnSet* createAnonymous(LayoutFlowThread&, const Comput edStyle& parentStyle);
64 64
65 const MultiColumnFragmentainerGroup& firstFragmentainerGroup() const { retur n m_fragmentainerGroups.first(); } 65 const MultiColumnFragmentainerGroup& firstFragmentainerGroup() const { retur n m_fragmentainerGroups.first(); }
66 const MultiColumnFragmentainerGroup& lastFragmentainerGroup() const { return m_fragmentainerGroups.last(); } 66 const MultiColumnFragmentainerGroup& lastFragmentainerGroup() const { return m_fragmentainerGroups.last(); }
67 MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(LayoutUn it); 67 MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(LayoutUn it);
68 const MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(La youtUnit) const; 68 const MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(La youtUnit) const;
69 const MultiColumnFragmentainerGroup& fragmentainerGroupAtVisualPoint(const L ayoutPoint&) const; 69 const MultiColumnFragmentainerGroup& fragmentainerGroupAtVisualPoint(const L ayoutPoint&) const;
70 70
71 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutMultiColumnSet || LayoutBlockFlow::isOfType(type); } 71 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectLayoutMultiColumnSet || LayoutBlockFlow::isOfType(type); }
72 virtual bool canHaveChildren() const override final { return false; } 72 bool canHaveChildren() const final { return false; }
73 73
74 // Return the width and height of a single column or page in the set. 74 // Return the width and height of a single column or page in the set.
75 LayoutUnit pageLogicalWidth() const { return flowThread()->logicalWidth(); } 75 LayoutUnit pageLogicalWidth() const { return flowThread()->logicalWidth(); }
76 LayoutUnit pageLogicalHeight() const; 76 LayoutUnit pageLogicalHeight() const;
77 77
78 LayoutFlowThread* flowThread() const { return m_flowThread; } 78 LayoutFlowThread* flowThread() const { return m_flowThread; }
79 79
80 LayoutBlockFlow* multiColumnBlockFlow() const { return toLayoutBlockFlow(par ent()); } 80 LayoutBlockFlow* multiColumnBlockFlow() const { return toLayoutBlockFlow(par ent()); }
81 LayoutMultiColumnFlowThread* multiColumnFlowThread() const 81 LayoutMultiColumnFlowThread* multiColumnFlowThread() const
82 { 82 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Layout of flow thread content that was to be rendered inside this column set has 135 // Layout of flow thread content that was to be rendered inside this column set has
136 // finished. This happens at end of flow thread layout, and when advancing t o the next column 136 // finished. This happens at end of flow thread layout, and when advancing t o the next column
137 // set or spanner. 137 // set or spanner.
138 void endFlow(LayoutUnit offsetInFlowThread); 138 void endFlow(LayoutUnit offsetInFlowThread);
139 139
140 // Expand this set's flow thread portion rectangle to contain all trailing f low thread 140 // Expand this set's flow thread portion rectangle to contain all trailing f low thread
141 // overflow. Only to be called on the last set. 141 // overflow. Only to be called on the last set.
142 void expandToEncompassFlowThreadContentsIfNeeded(); 142 void expandToEncompassFlowThreadContentsIfNeeded();
143 143
144 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override final; 144 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const final;
145 145
146 void attachToFlowThread(); 146 void attachToFlowThread();
147 void detachFromFlowThread(); 147 void detachFromFlowThread();
148 148
149 // The top of the page nearest to the specified block offset. All in flowthr ead coordinates. 149 // The top of the page nearest to the specified block offset. All in flowthr ead coordinates.
150 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; 150 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
151 151
152 void collectLayerFragments(DeprecatedPaintLayerFragments&, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect); 152 void collectLayerFragments(DeprecatedPaintLayerFragments&, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect);
153 153
154 LayoutUnit columnGap() const; 154 LayoutUnit columnGap() const;
155 155
156 // The "CSS actual" value of column-count. This includes overflowing columns , if any. 156 // The "CSS actual" value of column-count. This includes overflowing columns , if any.
157 unsigned actualColumnCount() const; 157 unsigned actualColumnCount() const;
158 158
159 virtual const char* name() const override { return "LayoutMultiColumnSet"; } 159 const char* name() const override { return "LayoutMultiColumnSet"; }
160 160
161 protected: 161 protected:
162 LayoutMultiColumnSet(LayoutFlowThread*); 162 LayoutMultiColumnSet(LayoutFlowThread*);
163 163
164 private: 164 private:
165 virtual void insertedIntoTree() override final; 165 void insertedIntoTree() final;
166 virtual void willBeRemovedFromTree() override final; 166 void willBeRemovedFromTree() final;
167 167
168 virtual bool isSelfCollapsingBlock() const override { return false; } 168 bool isSelfCollapsingBlock() const override { return false; }
169 169
170 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 170 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L ogicalExtentComputedValues&) const override;
171 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; 171 PositionWithAffinity positionForPoint(const LayoutPoint&) override;
172 172
173 virtual void paintObject(const PaintInfo&, const LayoutPoint& paintOffset) o verride; 173 void paintObject(const PaintInfo&, const LayoutPoint& paintOffset) override;
174 174
175 virtual void addOverflowFromChildren() override; 175 void addOverflowFromChildren() override;
176 176
177 MultiColumnFragmentainerGroupList m_fragmentainerGroups; 177 MultiColumnFragmentainerGroupList m_fragmentainerGroups;
178 LayoutFlowThread* m_flowThread; 178 LayoutFlowThread* m_flowThread;
179 }; 179 };
180 180
181 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); 181 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet());
182 182
183 } // namespace blink 183 } // namespace blink
184 184
185 #endif // LayoutMultiColumnSet_h 185 #endif // LayoutMultiColumnSet_h
186 186
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | Source/core/layout/LayoutMultiColumnSpannerPlaceholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698