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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Find the column that contains the given block offset, and return the tran slation needed to 113 // Find the column that contains the given block offset, and return the tran slation needed to
114 // get from flow thread coordinates to visual coordinates. 114 // get from flow thread coordinates to visual coordinates.
115 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; 115 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const;
116 116
117 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st; 117 LayoutPoint visualPointToFlowThreadPoint(const LayoutPoint& visualPoint) con st;
118 118
119 // (Re-)calculate the column height if it's auto. This is first and foremost needed by sets that 119 // (Re-)calculate the column height if it's auto. This is first and foremost needed by sets that
120 // are to balance the column height, but even when it isn't to be balanced, this is necessary if 120 // are to balance the column height, but even when it isn't to be balanced, this is necessary if
121 // the multicol container's height is constrained. 121 // the multicol container's height is constrained.
122 bool recalculateColumnHeight(BalancedColumnHeightCalculation); 122 bool recalculateColumnHeight();
123 123
124 // Reset previously calculated column height. Will mark for layout if needed . 124 // Reset previously calculated column height. Will mark for layout if needed .
125 void resetColumnHeight(); 125 void resetColumnHeight();
126 126
127 void storeOldPosition() { m_oldLogicalTop = logicalTop(); }
128 bool isInitialHeightCalculated() const { return m_initialHeightCalculated; }
129
127 // Layout of flow thread content that's to be rendered inside this column se t begins. This 130 // Layout of flow thread content that's to be rendered inside this column se t begins. This
128 // happens at the beginning of flow thread layout, and when advancing from a previous column set 131 // happens at the beginning of flow thread layout, and when advancing from a previous column set
129 // or spanner to this one. 132 // or spanner to this one.
130 void beginFlow(LayoutUnit offsetInFlowThread); 133 void beginFlow(LayoutUnit offsetInFlowThread);
131 134
132 // 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
133 // 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
134 // set or spanner. 137 // set or spanner.
135 void endFlow(LayoutUnit offsetInFlowThread); 138 void endFlow(LayoutUnit offsetInFlowThread);
136 139
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 MultiColumnFragmentainerGroupList m_fragmentainerGroups; 177 MultiColumnFragmentainerGroupList m_fragmentainerGroups;
175 LayoutFlowThread* m_flowThread; 178 LayoutFlowThread* m_flowThread;
176 179
177 // Height of the tallest piece of unbreakable content. This is the minimum c olumn logical height 180 // Height of the tallest piece of unbreakable content. This is the minimum c olumn logical height
178 // required to avoid fragmentation where it shouldn't occur (inside unbreaka ble content, between 181 // required to avoid fragmentation where it shouldn't occur (inside unbreaka ble content, between
179 // orphans and widows, etc.). We only store this so that outer fragmentation contexts (if any) 182 // orphans and widows, etc.). We only store this so that outer fragmentation contexts (if any)
180 // can query this when calculating their own minimum. Note that we don't sto re this value in 183 // can query this when calculating their own minimum. Note that we don't sto re this value in
181 // every fragmentainer group (but rather here, in the column set), since we only need the 184 // every fragmentainer group (but rather here, in the column set), since we only need the
182 // largest one among them. 185 // largest one among them.
183 LayoutUnit m_tallestUnbreakableLogicalHeight; 186 LayoutUnit m_tallestUnbreakableLogicalHeight;
187
188 // Logical top in previous layout pass.
189 LayoutUnit m_oldLogicalTop;
190
191 bool m_initialHeightCalculated;
184 }; 192 };
185 193
186 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); 194 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet());
187 195
188 } // namespace blink 196 } // namespace blink
189 197
190 #endif // LayoutMultiColumnSet_h 198 #endif // LayoutMultiColumnSet_h
191 199
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698