OLD | NEW |
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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 LayoutBox& box = toLayoutBox(*object); | 1184 LayoutBox& box = toLayoutBox(*object); |
1185 if (s_couldContainSpanners) { | 1185 if (s_couldContainSpanners) { |
1186 // Remove all spanners (turn them into regular column content), as we can | 1186 // Remove all spanners (turn them into regular column content), as we can |
1187 // no longer contain them. | 1187 // no longer contain them. |
1188 if (box.isColumnSpanAll()) { | 1188 if (box.isColumnSpanAll()) { |
1189 destroySpannerPlaceholder(box.spannerPlaceholder()); | 1189 destroySpannerPlaceholder(box.spannerPlaceholder()); |
1190 continue; | 1190 continue; |
1191 } | 1191 } |
1192 } else if (descendantIsValidColumnSpanner(object)) { | 1192 } else if (descendantIsValidColumnSpanner(object)) { |
1193 // We can now contain spanners, and we found a candidate. Turn it into a | 1193 // We can now contain spanners, and we found a candidate. Turn it into a |
1194 // spanner. | 1194 // spanner, if it's not already one. We have to check if it's already a |
1195 createAndInsertSpannerPlaceholder( | 1195 // spanner, because in some cases we incorrectly think that we need to |
1196 &box, nextInPreOrderAfterChildrenSkippingOutOfFlow(this, &box)); | 1196 // toggle spanners. One known case is when some ancestor changes |
| 1197 // writing-mode (which is an inherited property). Writing mode roots |
| 1198 // establish block formatting context (which means that there can be no |
| 1199 // column spanners inside). When changing the style on one object in the |
| 1200 // tree at a time, we're going to see writing mode roots that are not |
| 1201 // going to remain writing mode roots when all objects have been updated |
| 1202 // (because then all will have got the same writing mode). |
| 1203 if (!box.isColumnSpanAll()) { |
| 1204 createAndInsertSpannerPlaceholder( |
| 1205 &box, nextInPreOrderAfterChildrenSkippingOutOfFlow(this, &box)); |
| 1206 } |
1197 continue; | 1207 continue; |
1198 } | 1208 } |
1199 walkChildren = canContainSpannerInParentFragmentationContext(box); | 1209 walkChildren = canContainSpannerInParentFragmentationContext(box); |
1200 } | 1210 } |
1201 } | 1211 } |
1202 | 1212 |
1203 void LayoutMultiColumnFlowThread::computePreferredLogicalWidths() { | 1213 void LayoutMultiColumnFlowThread::computePreferredLogicalWidths() { |
1204 LayoutFlowThread::computePreferredLogicalWidths(); | 1214 LayoutFlowThread::computePreferredLogicalWidths(); |
1205 | 1215 |
1206 // The min/max intrinsic widths calculated really tell how much space elements | 1216 // The min/max intrinsic widths calculated really tell how much space elements |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 const { | 1334 const { |
1325 return MultiColumnLayoutState(m_lastSetWorkedOn); | 1335 return MultiColumnLayoutState(m_lastSetWorkedOn); |
1326 } | 1336 } |
1327 | 1337 |
1328 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( | 1338 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( |
1329 const MultiColumnLayoutState& state) { | 1339 const MultiColumnLayoutState& state) { |
1330 m_lastSetWorkedOn = state.columnSet(); | 1340 m_lastSetWorkedOn = state.columnSet(); |
1331 } | 1341 } |
1332 | 1342 |
1333 } // namespace blink | 1343 } // namespace blink |
OLD | NEW |