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

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

Issue 1181483005: Avoid stretching the parent of a column spanner. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update unit tests that used to test the container stretching mechanism Created 5 years, 6 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 private: 192 private:
193 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const; 193 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const;
194 void createAndInsertMultiColumnSet(LayoutBox* insertBefore = nullptr); 194 void createAndInsertMultiColumnSet(LayoutBox* insertBefore = nullptr);
195 void createAndInsertSpannerPlaceholder(LayoutBox* spannerObjectInFlowThread, LayoutObject* insertedBeforeInFlowThread); 195 void createAndInsertSpannerPlaceholder(LayoutBox* spannerObjectInFlowThread, LayoutObject* insertedBeforeInFlowThread);
196 void destroySpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder*); 196 void destroySpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder*);
197 virtual bool descendantIsValidColumnSpanner(LayoutObject* descendant) const; 197 virtual bool descendantIsValidColumnSpanner(LayoutObject* descendant) const;
198 198
199 virtual void addColumnSetToThread(LayoutMultiColumnSet*) override; 199 virtual void addColumnSetToThread(LayoutMultiColumnSet*) override;
200 virtual void willBeRemovedFromTree() override; 200 virtual void willBeRemovedFromTree() override;
201 virtual LayoutUnit skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlow Thread) override; 201 virtual void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread ) override;
202 virtual void flowThreadDescendantWasInserted(LayoutObject*) final; 202 virtual void flowThreadDescendantWasInserted(LayoutObject*) final;
203 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) final; 203 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) final;
204 virtual void flowThreadDescendantStyleWillChange(LayoutObject*, StyleDiffere nce, const ComputedStyle& newStyle) override; 204 virtual void flowThreadDescendantStyleWillChange(LayoutObject*, StyleDiffere nce, const ComputedStyle& newStyle) override;
205 virtual void flowThreadDescendantStyleDidChange(LayoutObject*, StyleDifferen ce, const ComputedStyle& oldStyle) override; 205 virtual void flowThreadDescendantStyleDidChange(LayoutObject*, StyleDifferen ce, const ComputedStyle& oldStyle) override;
206 virtual void computePreferredLogicalWidths() override; 206 virtual void computePreferredLogicalWidths() override;
207 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 207 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override;
208 virtual void updateLogicalWidth() override; 208 virtual void updateLogicalWidth() override;
209 virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) overr ide; 209 virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) overr ide;
210 virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight ) override; 210 virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight ) override;
211 virtual bool addForcedColumnBreak(LayoutUnit, LayoutObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = nullptr) override; 211 virtual bool addForcedColumnBreak(LayoutUnit, LayoutObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = nullptr) override;
212 virtual bool isPageLogicalHeightKnown() const override; 212 virtual bool isPageLogicalHeightKnown() const override;
213 213
214 // The last set we worked on. It's not to be used as the "current set". The concept of a 214 // The last set we worked on. It's not to be used as the "current set". The concept of a
215 // "current set" is difficult, since layout may jump back and forth in the t ree, due to wrong 215 // "current set" is difficult, since layout may jump back and forth in the t ree, due to wrong
216 // top location estimates (due to e.g. margin collapsing), and possibly for other reasons. 216 // top location estimates (due to e.g. margin collapsing), and possibly for other reasons.
217 LayoutMultiColumnSet* m_lastSetWorkedOn; 217 LayoutMultiColumnSet* m_lastSetWorkedOn;
218 218
219 unsigned m_columnCount; // The used value of column-count 219 unsigned m_columnCount; // The used value of column-count
220 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto. 220 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto.
221 bool m_inBalancingPass; // Set when relayouting for column balancing. 221 bool m_inBalancingPass; // Set when relayouting for column balancing.
222 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t he column set heights after layout. 222 bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate t he column set heights after layout.
223 bool m_progressionIsInline; // Always true for regular multicol. False for p aged-y overflow. 223 bool m_progressionIsInline; // Always true for regular multicol. False for p aged-y overflow.
224 bool m_isBeingEvacuated; 224 bool m_isBeingEvacuated;
225 }; 225 };
226 226
227 } // namespace blink 227 } // namespace blink
228 228
229 #endif // LayoutMultiColumnFlowThread_h 229 #endif // LayoutMultiColumnFlowThread_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutFlowThread.h ('k') | Source/core/layout/LayoutMultiColumnFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698