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

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

Issue 1489663003: column-span:all in nested multicol requires re-insertion of fragmentainer groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 17 matching lines...) Expand all
28 #define LayoutMultiColumnFlowThread_h 28 #define LayoutMultiColumnFlowThread_h
29 29
30 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
31 #include "core/layout/LayoutFlowThread.h" 31 #include "core/layout/LayoutFlowThread.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class LayoutMultiColumnSet; 35 class LayoutMultiColumnSet;
36 class LayoutMultiColumnSpannerPlaceholder; 36 class LayoutMultiColumnSpannerPlaceholder;
37 37
38 enum BalancedColumnHeightCalculation { GuessFromFlowThreadPortion, StretchBySpac eShortage };
39
40 // Flow thread implementation for CSS multicol. This will be inserted as an anon ymous child block of 38 // Flow thread implementation for CSS multicol. This will be inserted as an anon ymous child block of
41 // the actual multicol container (i.e. the LayoutBlockFlow whose style computes to non-auto 39 // the actual multicol container (i.e. the LayoutBlockFlow whose style computes to non-auto
42 // column-count and/or column-width). LayoutMultiColumnFlowThread is the heart o f the multicol 40 // column-count and/or column-width). LayoutMultiColumnFlowThread is the heart o f the multicol
43 // implementation, and there is only one instance per multicol container. Child content of the 41 // implementation, and there is only one instance per multicol container. Child content of the
44 // multicol container is parented into the flow thread at the time of layoutObje ct insertion. 42 // multicol container is parented into the flow thread at the time of layoutObje ct insertion.
45 // 43 //
46 // Apart from this flow thread child, the multicol container will also have Layo utMultiColumnSet 44 // Apart from this flow thread child, the multicol container will also have Layo utMultiColumnSet
47 // children, which are used to position the columns visually. The flow thread is in charge 45 // children, which are used to position the columns visually. The flow thread is in charge
48 // of layout, and, after having calculated the column width, it lays out content as if everything 46 // of layout, and, after having calculated the column width, it lays out content as if everything
49 // were in one tall single column, except that there will typically be some amou nt of blank space 47 // were in one tall single column, except that there will typically be some amou nt of blank space
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool isPageLogicalHeightKnown() const final; 170 bool isPageLogicalHeightKnown() const final;
173 171
174 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; 172 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const;
175 173
176 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st override; 174 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st override;
177 175
178 LayoutMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const final; 176 LayoutMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const final;
179 177
180 void layoutColumns(SubtreeLayoutScope&); 178 void layoutColumns(SubtreeLayoutScope&);
181 179
182 bool isInInitialLayoutPass() const { return !m_inBalancingPass; }
183
184 // Skip past a column spanner during flow thread layout. Spanners are not la id out inside the 180 // Skip past a column spanner during flow thread layout. Spanners are not la id out inside the
185 // flow thread, since the flow thread is not in a spanner's containing block chain (since the 181 // flow thread, since the flow thread is not in a spanner's containing block chain (since the
186 // containing block is the multicol container). 182 // containing block is the multicol container).
187 void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread); 183 void skipColumnSpanner(LayoutBox*, LayoutUnit logicalTopInFlowThread);
188 184
189 bool recalculateColumnHeights(); 185 bool recalculateColumnHeights();
190 186
191 void columnRuleStyleDidChange(); 187 void columnRuleStyleDidChange();
192 188
193 // Remove the spanner placeholder and return true if the specified object is no longer a valid spanner. 189 // Remove the spanner placeholder and return true if the specified object is no longer a valid spanner.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 bool m_isBeingEvacuated; 244 bool m_isBeingEvacuated;
249 }; 245 };
250 246
251 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because isMultiColumnFlowThr ead() is defined in 247 // Cannot use DEFINE_LAYOUT_OBJECT_TYPE_CASTS here, because isMultiColumnFlowThr ead() is defined in
252 // LayoutFlowThread, not in LayoutObject. 248 // LayoutFlowThread, not in LayoutObject.
253 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object- >isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread()); 249 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, LayoutFlowThread, object, object- >isLayoutMultiColumnFlowThread(), object.isLayoutMultiColumnFlowThread());
254 250
255 } // namespace blink 251 } // namespace blink
256 252
257 #endif // LayoutMultiColumnFlowThread_h 253 #endif // LayoutMultiColumnFlowThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698