| 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 // This method needs to behave correctly in the following situations: | 604 // This method needs to behave correctly in the following situations: |
| 605 // - When the descendant doesn't have a spanner placeholder but should have
one (return true) | 605 // - When the descendant doesn't have a spanner placeholder but should have
one (return true) |
| 606 // - When the descendant doesn't have a spanner placeholder and still should
not have one (return false) | 606 // - When the descendant doesn't have a spanner placeholder and still should
not have one (return false) |
| 607 // - When the descendant has a spanner placeholder but should no longer have
one (return false) | 607 // - When the descendant has a spanner placeholder but should no longer have
one (return false) |
| 608 // - When the descendant has a spanner placeholder and should still have one
(return true) | 608 // - When the descendant has a spanner placeholder and should still have one
(return true) |
| 609 | 609 |
| 610 // We assume that we're inside the flow thread. This function is not to be c
alled otherwise. | 610 // We assume that we're inside the flow thread. This function is not to be c
alled otherwise. |
| 611 ASSERT(descendant->isDescendantOf(this)); | 611 ASSERT(descendant->isDescendantOf(this)); |
| 612 | 612 |
| 613 // The spec says that column-span only applies to in-flow block-level elemen
ts. | 613 // The spec says that column-span only applies to in-flow block-level elemen
ts. |
| 614 if (descendant->style()->columnSpan() != ColumnSpanAll || !descendant->isBox
() || descendant->isInline() || descendant->isFloatingOrOutOfFlowPositioned()) | 614 if (descendant->style()->getColumnSpan() != ColumnSpanAll || !descendant->is
Box() || descendant->isInline() || descendant->isFloatingOrOutOfFlowPositioned()
) |
| 615 return false; | 615 return false; |
| 616 | 616 |
| 617 if (!descendant->containingBlock()->isLayoutBlockFlow()) { | 617 if (!descendant->containingBlock()->isLayoutBlockFlow()) { |
| 618 // Needs to be in a block-flow container, and not e.g. a table. | 618 // Needs to be in a block-flow container, and not e.g. a table. |
| 619 return false; | 619 return false; |
| 620 } | 620 } |
| 621 | 621 |
| 622 // This looks like a spanner, but if we're inside something unbreakable or s
omething that | 622 // This looks like a spanner, but if we're inside something unbreakable or s
omething that |
| 623 // establishes a new formatting context, it's not to be treated as one. | 623 // establishes a new formatting context, it's not to be treated as one. |
| 624 for (LayoutBox* ancestor = toLayoutBox(descendant)->parentBox(); ancestor; a
ncestor = ancestor->containingBlock()) { | 624 for (LayoutBox* ancestor = toLayoutBox(descendant)->parentBox(); ancestor; a
ncestor = ancestor->containingBlock()) { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 } | 975 } |
| 976 if (canContainSpannerInParentFragmentationContext(*object)) | 976 if (canContainSpannerInParentFragmentationContext(*object)) |
| 977 next = object->nextInPreOrder(&root); | 977 next = object->nextInPreOrder(&root); |
| 978 else | 978 else |
| 979 next = object->nextInPreOrderAfterChildren(&root); | 979 next = object->nextInPreOrderAfterChildren(&root); |
| 980 } | 980 } |
| 981 return true; | 981 return true; |
| 982 } | 982 } |
| 983 | 983 |
| 984 } // namespace blink | 984 } // namespace blink |
| OLD | NEW |