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

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

Issue 551263005: *** DO NOT LAND *** Implement column-span:all without reparenting renderers. Work in progress. (Closed) Base URL: git:blink.git@new-multicol-no-renderer-reparenting
Patch Set: Copy margin properties from a spanner to its spanner set, to simplify code. Created 6 years, 3 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
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 virtual void layout() OVERRIDE; 142 virtual void layout() OVERRIDE;
143 143
144 private: 144 private:
145 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const; 145 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const;
146 virtual bool isDescendantValidColumnSpanner(RenderObject* descendant) const; 146 virtual bool isDescendantValidColumnSpanner(RenderObject* descendant) const;
147 147
148 virtual const char* renderName() const OVERRIDE; 148 virtual const char* renderName() const OVERRIDE;
149 virtual void addRegionToThread(RenderMultiColumnSet*) OVERRIDE; 149 virtual void addRegionToThread(RenderMultiColumnSet*) OVERRIDE;
150 virtual void willBeRemovedFromTree() OVERRIDE; 150 virtual void willBeRemovedFromTree() OVERRIDE;
151 virtual bool hasColumnSpanner(const RenderObject*) const OVERRIDE; 151 virtual bool hasColumnSpanner(const RenderObject*) const OVERRIDE;
152 virtual LayoutUnit spannerLogicalTopAdjustment(RenderBox* renderer, LayoutUn it logicalTop) const OVERRIDE; 152 virtual LayoutUnit enterColumnSpanner(RenderBox*, LayoutUnit logicalTop) OVE RRIDE;
153 virtual void enterColumnSpanner(RenderBox*, LayoutUnit& logicalTop) OVERRIDE ;
154 virtual void leaveColumnSpanner(RenderBox*, LayoutUnit logicalBottom) OVERRI DE; 153 virtual void leaveColumnSpanner(RenderBox*, LayoutUnit logicalBottom) OVERRI DE;
155 virtual void flowThreadDescendantInserted(RenderObject*) OVERRIDE; 154 virtual void flowThreadDescendantInserted(RenderObject*) OVERRIDE;
156 virtual void flowThreadDescendantWillBeRemoved(RenderObject*) OVERRIDE; 155 virtual void flowThreadDescendantWillBeRemoved(RenderObject*) OVERRIDE;
156 virtual void flowThreadDescendantStyleDidChange(RenderObject*) OVERRIDE;
157 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE; 157 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE;
158 virtual void updateLogicalWidth() OVERRIDE; 158 virtual void updateLogicalWidth() OVERRIDE;
159 virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) OVERR IDE; 159 virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) OVERR IDE;
160 virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight ) OVERRIDE; 160 virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight ) OVERRIDE;
161 virtual RenderMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const OVERR IDE; 161 virtual RenderMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const OVERR IDE;
162 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) OVERRIDE; 162 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) OVERRIDE;
163 virtual bool isPageLogicalHeightKnown() const OVERRIDE; 163 virtual bool isPageLogicalHeightKnown() const OVERRIDE;
164 164
165 typedef HashMap<const RenderObject*, RenderMultiColumnSpannerSet*> SpannerMa p; 165 typedef HashMap<const RenderObject*, RenderMultiColumnSpannerSet*> SpannerMa p;
166 SpannerMap m_spannerMap; 166 SpannerMap m_spannerMap;
167 167
168 // The last set we worked on. It's not to be used as the "current set". The concept of a 168 // The last set we worked on. It's not to be used as the "current set". The concept of a
169 // "current set" is difficult, since layout may jump back and forth in the t ree, due to wrong 169 // "current set" is difficult, since layout may jump back and forth in the t ree, due to wrong
170 // top location estimates (due to e.g. margin collapsing), and possibly for other reasons. 170 // top location estimates (due to e.g. margin collapsing), and possibly for other reasons.
171 RenderMultiColumnSet* m_lastSetWorkedOn; 171 RenderMultiColumnSet* m_lastSetWorkedOn;
172 172
173 unsigned m_columnCount; // The used value of column-count 173 unsigned m_columnCount; // The used value of column-count
174 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto. 174 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto.
175 bool m_inBalancingPass; // Set when relayouting for column balancing. 175 bool m_inBalancingPass; // Set when relayouting for column balancing.
176 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t he column set heights after layout. 176 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t he column set heights after layout.
177 bool m_progressionIsInline; // Always true for regular multicol. False for p aged-y overflow. 177 bool m_progressionIsInline; // Always true for regular multicol. False for p aged-y overflow.
178 bool m_beingEvacuated; 178 bool m_beingEvacuated;
179 }; 179 };
180 180
181 } // namespace blink 181 } // namespace blink
182 182
183 #endif // RenderMultiColumnFlowThread_h 183 #endif // RenderMultiColumnFlowThread_h
184 184
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlowThread.h ('k') | Source/core/rendering/RenderMultiColumnFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698