| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (object->containingBlock()->flowThreadContainingBlock() == flowThread) { | 132 if (object->containingBlock()->flowThreadContainingBlock() == flowThread) { |
| 133 // This out-of-flow object is still part of the flow thread, because its | 133 // This out-of-flow object is still part of the flow thread, because its |
| 134 // containing block (probably relatively positioned) is part of the flow | 134 // containing block (probably relatively positioned) is part of the flow |
| 135 // thread. | 135 // thread. |
| 136 break; | 136 break; |
| 137 } | 137 } |
| 138 object = object->nextInPreOrderAfterChildren(flowThread); | 138 object = object->nextInPreOrderAfterChildren(flowThread); |
| 139 } | 139 } |
| 140 if (!object) | 140 if (!object) |
| 141 return nullptr; | 141 return nullptr; |
| 142 #if ENABLE(ASSERT) | 142 #if DCHECK_IS_ON() |
| 143 // Make sure that we didn't stumble into an inner multicol container. | 143 // Make sure that we didn't stumble into an inner multicol container. |
| 144 for (LayoutObject* walker = object->parent(); walker && walker != flowThread; | 144 for (LayoutObject* walker = object->parent(); walker && walker != flowThread; |
| 145 walker = walker->parent()) | 145 walker = walker->parent()) |
| 146 ASSERT(!isMultiColumnContainer(*walker)); | 146 ASSERT(!isMultiColumnContainer(*walker)); |
| 147 #endif | 147 #endif |
| 148 return object; | 148 return object; |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Find the previous layout object that has the multicol container in its | 151 // Find the previous layout object that has the multicol container in its |
| 152 // containing block chain, skipping nested multicol containers. | 152 // containing block chain, skipping nested multicol containers. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 181 object = ancestor; | 181 object = ancestor; |
| 182 ASSERT(ancestor->isDescendantOf(flowThread)); | 182 ASSERT(ancestor->isDescendantOf(flowThread)); |
| 183 continue; // Continue on the outside of the inner flow thread. | 183 continue; // Continue on the outside of the inner flow thread. |
| 184 } | 184 } |
| 185 // We're inside something that's out-of-flow. Keep looking upwards and | 185 // We're inside something that's out-of-flow. Keep looking upwards and |
| 186 // backwards in the tree. | 186 // backwards in the tree. |
| 187 object = object->previousInPreOrder(flowThread); | 187 object = object->previousInPreOrder(flowThread); |
| 188 } | 188 } |
| 189 if (!object || object == flowThread) | 189 if (!object || object == flowThread) |
| 190 return nullptr; | 190 return nullptr; |
| 191 #if ENABLE(ASSERT) | 191 #if DCHECK_IS_ON() |
| 192 // Make sure that we didn't stumble into an inner multicol container. | 192 // Make sure that we didn't stumble into an inner multicol container. |
| 193 for (LayoutObject* walker = object->parent(); walker && walker != flowThread; | 193 for (LayoutObject* walker = object->parent(); walker && walker != flowThread; |
| 194 walker = walker->parent()) | 194 walker = walker->parent()) |
| 195 ASSERT(!isMultiColumnContainer(*walker)); | 195 ASSERT(!isMultiColumnContainer(*walker)); |
| 196 #endif | 196 #endif |
| 197 return object; | 197 return object; |
| 198 } | 198 } |
| 199 | 199 |
| 200 static LayoutObject* firstLayoutObjectInSet(LayoutMultiColumnSet* multicolSet) { | 200 static LayoutObject* firstLayoutObjectInSet(LayoutMultiColumnSet* multicolSet) { |
| 201 LayoutBox* sibling = multicolSet->previousSiblingMultiColumnBox(); | 201 LayoutBox* sibling = multicolSet->previousSiblingMultiColumnBox(); |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 const { | 1369 const { |
| 1370 return MultiColumnLayoutState(m_lastSetWorkedOn); | 1370 return MultiColumnLayoutState(m_lastSetWorkedOn); |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( | 1373 void LayoutMultiColumnFlowThread::restoreMultiColumnLayoutState( |
| 1374 const MultiColumnLayoutState& state) { | 1374 const MultiColumnLayoutState& state) { |
| 1375 m_lastSetWorkedOn = state.columnSet(); | 1375 m_lastSetWorkedOn = state.columnSet(); |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 } // namespace blink | 1378 } // namespace blink |
| OLD | NEW |