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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 bool columnHeightsChanged() const { return m_columnHeightsChanged; } | 253 bool columnHeightsChanged() const { return m_columnHeightsChanged; } |
254 void setColumnHeightsChanged() { m_columnHeightsChanged = true; } | 254 void setColumnHeightsChanged() { m_columnHeightsChanged = true; } |
255 | 255 |
256 void columnRuleStyleDidChange(); | 256 void columnRuleStyleDidChange(); |
257 | 257 |
258 // Remove the spanner placeholder and return true if the specified object is | 258 // Remove the spanner placeholder and return true if the specified object is |
259 // no longer a valid spanner. | 259 // no longer a valid spanner. |
260 bool removeSpannerPlaceholderIfNoLongerValid( | 260 bool removeSpannerPlaceholderIfNoLongerValid( |
261 LayoutBox* spannerObjectInFlowThread); | 261 LayoutBox* spannerObjectInFlowThread); |
262 | 262 |
| 263 // Search mode when looking for an enclosing fragmentation context. |
| 264 enum AncestorSearchConstraint { |
| 265 // No constraints. Sometimes we just want to find all enclosing |
| 266 // fragmentation contexts, e.g. to calculate the accumulated visual |
| 267 // translation. |
| 268 AnyAncestor, |
| 269 |
| 270 // Consider fragmentation contexts that are strictly unbreakable (seen from |
| 271 // the outside) to be isolated from the rest, so that such fragmentation |
| 272 // contexts don't participate in fragmentation of enclosing fragmentation |
| 273 // contexts, apart from taking up space and otherwise being completely |
| 274 // unbreakable. This is typically what we want to do during layout. |
| 275 IsolateUnbreakableContainers, |
| 276 }; |
263 LayoutMultiColumnFlowThread* enclosingFlowThread() const; | 277 LayoutMultiColumnFlowThread* enclosingFlowThread() const; |
264 FragmentationContext* enclosingFragmentationContext() const; | 278 FragmentationContext* enclosingFragmentationContext( |
| 279 AncestorSearchConstraint = IsolateUnbreakableContainers) const; |
265 LayoutUnit blockOffsetInEnclosingFragmentationContext() const { | 280 LayoutUnit blockOffsetInEnclosingFragmentationContext() const { |
266 ASSERT(enclosingFragmentationContext()); | 281 DCHECK(enclosingFragmentationContext(AnyAncestor)); |
267 return m_blockOffsetInEnclosingFragmentationContext; | 282 return m_blockOffsetInEnclosingFragmentationContext; |
268 } | 283 } |
269 | 284 |
270 // If we've run out of columns in the last fragmentainer group (column row), | 285 // If we've run out of columns in the last fragmentainer group (column row), |
271 // we have to insert another fragmentainer group in order to hold more | 286 // we have to insert another fragmentainer group in order to hold more |
272 // columns. This means that we're moving to the next outer column (in the | 287 // columns. This means that we're moving to the next outer column (in the |
273 // enclosing fragmentation context). | 288 // enclosing fragmentation context). |
274 void appendNewFragmentainerGroupIfNeeded(LayoutUnit offsetInFlowThread, | 289 void appendNewFragmentainerGroupIfNeeded(LayoutUnit offsetInFlowThread, |
275 PageBoundaryRule); | 290 PageBoundaryRule); |
276 | 291 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // LayoutObject. | 384 // LayoutObject. |
370 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, | 385 DEFINE_TYPE_CASTS(LayoutMultiColumnFlowThread, |
371 LayoutFlowThread, | 386 LayoutFlowThread, |
372 object, | 387 object, |
373 object->isLayoutMultiColumnFlowThread(), | 388 object->isLayoutMultiColumnFlowThread(), |
374 object.isLayoutMultiColumnFlowThread()); | 389 object.isLayoutMultiColumnFlowThread()); |
375 | 390 |
376 } // namespace blink | 391 } // namespace blink |
377 | 392 |
378 #endif // LayoutMultiColumnFlowThread_h | 393 #endif // LayoutMultiColumnFlowThread_h |
OLD | NEW |