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

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

Issue 1328923002: Avoid stack overflow triggered by out-of-band layout of flexbox child. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test. The previous one started to pass, because of https://codereview.chromium.org/129593300… Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutFlowThread.h ('k') | no next file » | 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) 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; 173 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const;
174 174
175 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st override; 175 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st override;
176 176
177 LayoutMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const final; 177 LayoutMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const final;
178 178
179 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&); 179 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&);
180 180
181 bool isInInitialLayoutPass() const { return !m_inBalancingPass; } 181 bool isInInitialLayoutPass() const { return !m_inBalancingPass; }
182 182
183 // Skip past a column spanner during flow thread layout. Spanners are not la id out inside the
184 // flow thread, since the flow thread is not in a spanner's containing block chain (since the
185 // containing block is the multicol container).
186 void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread);
187
183 bool recalculateColumnHeights(); 188 bool recalculateColumnHeights();
184 189
185 void columnRuleStyleDidChange(); 190 void columnRuleStyleDidChange();
186 191
187 // Remove the spanner placeholder and return true if the specified object is no longer a valid spanner. 192 // Remove the spanner placeholder and return true if the specified object is no longer a valid spanner.
188 bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowT hread); 193 bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowT hread);
189 194
190 LayoutMultiColumnFlowThread* enclosingFlowThread() const; 195 LayoutMultiColumnFlowThread* enclosingFlowThread() const;
191 LayoutUnit blockOffsetInEnclosingFlowThread() const { ASSERT(enclosingFlowTh read()); return m_blockOffsetInEnclosingFlowThread; } 196 LayoutUnit blockOffsetInEnclosingFlowThread() const { ASSERT(enclosingFlowTh read()); return m_blockOffsetInEnclosingFlowThread; }
192 197
(...skipping 15 matching lines...) Expand all
208 213
209 private: 214 private:
210 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const; 215 void calculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const;
211 void createAndInsertMultiColumnSet(LayoutBox* insertBefore = nullptr); 216 void createAndInsertMultiColumnSet(LayoutBox* insertBefore = nullptr);
212 void createAndInsertSpannerPlaceholder(LayoutBox* spannerObjectInFlowThread, LayoutObject* insertedBeforeInFlowThread); 217 void createAndInsertSpannerPlaceholder(LayoutBox* spannerObjectInFlowThread, LayoutObject* insertedBeforeInFlowThread);
213 void destroySpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder*); 218 void destroySpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder*);
214 virtual bool descendantIsValidColumnSpanner(LayoutObject* descendant) const; 219 virtual bool descendantIsValidColumnSpanner(LayoutObject* descendant) const;
215 220
216 void addColumnSetToThread(LayoutMultiColumnSet*) override; 221 void addColumnSetToThread(LayoutMultiColumnSet*) override;
217 void willBeRemovedFromTree() override; 222 void willBeRemovedFromTree() override;
218 void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread) overri de;
219 void flowThreadDescendantWasInserted(LayoutObject*) final; 223 void flowThreadDescendantWasInserted(LayoutObject*) final;
220 void flowThreadDescendantWillBeRemoved(LayoutObject*) final; 224 void flowThreadDescendantWillBeRemoved(LayoutObject*) final;
221 void flowThreadDescendantStyleWillChange(LayoutObject*, StyleDifference, con st ComputedStyle& newStyle) override; 225 void flowThreadDescendantStyleWillChange(LayoutObject*, StyleDifference, con st ComputedStyle& newStyle) override;
222 void flowThreadDescendantStyleDidChange(LayoutObject*, StyleDifference, cons t ComputedStyle& oldStyle) override; 226 void flowThreadDescendantStyleDidChange(LayoutObject*, StyleDifference, cons t ComputedStyle& oldStyle) override;
223 void computePreferredLogicalWidths() override; 227 void computePreferredLogicalWidths() override;
224 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L ogicalExtentComputedValues&) const override; 228 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L ogicalExtentComputedValues&) const override;
225 void updateLogicalWidth() override; 229 void updateLogicalWidth() override;
226 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) override; 230 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) override;
227 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight) overri de; 231 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight) overri de;
228 bool addForcedColumnBreak(LayoutUnit, LayoutObject* breakChild, bool isBefor e, LayoutUnit* offsetBreakAdjustment = nullptr) override; 232 bool addForcedColumnBreak(LayoutUnit, LayoutObject* breakChild, bool isBefor e, LayoutUnit* offsetBreakAdjustment = nullptr) override;
(...skipping 16 matching lines...) Expand all
245 bool m_isBeingEvacuated; 249 bool m_isBeingEvacuated;
246 }; 250 };
247 251
248 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because isMultiColumnFlowThr ead() is defined in 252 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because isMultiColumnFlowThr ead() is defined in
249 // LayoutFlowThread, not in LayoutObject. 253 // LayoutFlowThread, not in LayoutObject.
250 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object- >isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread()); 254 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object- >isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread());
251 255
252 } // namespace blink 256 } // namespace blink
253 257
254 #endif // LayoutMultiColumnFlowThread_h 258 #endif // LayoutMultiColumnFlowThread_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698