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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 } | 380 } |
381 if (ancestor->spannerPlaceholder()) { | 381 if (ancestor->spannerPlaceholder()) { |
382 // FIXME: do we want to support nested spanners in a different way?
The outer spanner | 382 // FIXME: do we want to support nested spanners in a different way?
The outer spanner |
383 // has already broken out from the columns to become sized by the mu
lticol container, | 383 // has already broken out from the columns to become sized by the mu
lticol container, |
384 // which may be good enough for the inner spanner. But margins, bord
ers, padding and | 384 // which may be good enough for the inner spanner. But margins, bord
ers, padding and |
385 // explicit widths on the outer spanner, or on any children between
the outer and inner | 385 // explicit widths on the outer spanner, or on any children between
the outer and inner |
386 // spanner, will affect the width of the inner spanner this way, whi
ch might be | 386 // spanner, will affect the width of the inner spanner this way, whi
ch might be |
387 // undesirable. The spec has nothing to say on the matter. | 387 // undesirable. The spec has nothing to say on the matter. |
388 return false; // Ignore nested spanners. | 388 return false; // Ignore nested spanners. |
389 } | 389 } |
| 390 if (ancestor->isFloatingOrOutOfFlowPositioned()) { |
| 391 // TODO(mstensho): It could actually be nice to support this (althou
gh the usefulness is |
| 392 // probably very limited), but currently our column balancing algori
thm gets confused |
| 393 // when a spanner is inside a float, because a float's position isn'
t always known until |
| 394 // after layout. Similarly for absolutely positioned boxes. |
| 395 return false; |
| 396 } |
390 if (ancestor->isUnsplittableForPagination()) | 397 if (ancestor->isUnsplittableForPagination()) |
391 return false; | 398 return false; |
392 } | 399 } |
393 ASSERT_NOT_REACHED(); | 400 ASSERT_NOT_REACHED(); |
394 return false; | 401 return false; |
395 } | 402 } |
396 | 403 |
397 void LayoutMultiColumnFlowThread::addRegionToThread(LayoutMultiColumnSet* column
Set) | 404 void LayoutMultiColumnFlowThread::addRegionToThread(LayoutMultiColumnSet* column
Set) |
398 { | 405 { |
399 if (LayoutMultiColumnSet* nextSet = columnSet->nextSiblingMultiColumnSet())
{ | 406 if (LayoutMultiColumnSet* nextSet = columnSet->nextSiblingMultiColumnSet())
{ |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 } | 682 } |
676 | 683 |
677 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const | 684 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const |
678 { | 685 { |
679 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) | 686 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) |
680 return columnSet->pageLogicalHeight(); | 687 return columnSet->pageLogicalHeight(); |
681 return false; | 688 return false; |
682 } | 689 } |
683 | 690 |
684 } | 691 } |
OLD | NEW |