| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 // If the child moved, we have to invalidate its paint as well as any floati
ng/positioned | 719 // If the child moved, we have to invalidate its paint as well as any floati
ng/positioned |
| 720 // descendants. An exception is if we need a layout. In this case, we know w
e're going to | 720 // descendants. An exception is if we need a layout. In this case, we know w
e're going to |
| 721 // invalidate our paint (and the child) anyway. | 721 // invalidate our paint (and the child) anyway. |
| 722 if (!selfNeedsLayout() && (childOffset.width() || childOffset.height())) | 722 if (!selfNeedsLayout() && (childOffset.width() || childOffset.height())) |
| 723 child.invalidatePaintForOverhangingFloats(true); | 723 child.invalidatePaintForOverhangingFloats(true); |
| 724 | 724 |
| 725 if (paginated) { | 725 if (paginated) { |
| 726 // Keep track of the break-after value of the child, so that it can be j
oined with the | 726 // Keep track of the break-after value of the child, so that it can be j
oined with the |
| 727 // break-before value of the next in-flow object at the next class A bre
ak point. | 727 // break-before value of the next in-flow object at the next class A bre
ak point. |
| 728 layoutInfo.setPreviousBreakAfterValue(child.breakAfter()); | 728 layoutInfo.setPreviousBreakAfterValue(child.breakAfter()); |
| 729 |
| 730 paginatedContentWasLaidOut(child.logicalBottom()); |
| 729 } | 731 } |
| 730 | 732 |
| 731 if (child.isLayoutMultiColumnSpannerPlaceholder()) { | 733 if (child.isLayoutMultiColumnSpannerPlaceholder()) { |
| 732 // The actual column-span:all element is positioned by this placeholder
child. | 734 // The actual column-span:all element is positioned by this placeholder
child. |
| 733 positionSpannerDescendant(toLayoutMultiColumnSpannerPlaceholder(child)); | 735 positionSpannerDescendant(toLayoutMultiColumnSpannerPlaceholder(child)); |
| 734 } | 736 } |
| 735 } | 737 } |
| 736 | 738 |
| 737 LayoutUnit LayoutBlockFlow::adjustBlockChildForPagination(LayoutUnit logicalTop,
LayoutBox& child, BlockChildrenLayoutInfo& layoutInfo, bool atBeforeSideOfBlock
) | 739 LayoutUnit LayoutBlockFlow::adjustBlockChildForPagination(LayoutUnit logicalTop,
LayoutBox& child, BlockChildrenLayoutInfo& layoutInfo, bool atBeforeSideOfBlock
) |
| 738 { | 740 { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 paginationStrut += logicalTop + marginBeforeIfFloating(); | 782 paginationStrut += logicalTop + marginBeforeIfFloating(); |
| 781 setPaginationStrutPropagatedFromChild(paginationStrut); | 783 setPaginationStrutPropagatedFromChild(paginationStrut); |
| 782 if (childBlockFlow) | 784 if (childBlockFlow) |
| 783 childBlockFlow->setPaginationStrutPropagatedFromChild(LayoutUnit
()); | 785 childBlockFlow->setPaginationStrutPropagatedFromChild(LayoutUnit
()); |
| 784 } else { | 786 } else { |
| 785 child.setPaginationStrut(paginationStrut); | 787 child.setPaginationStrut(paginationStrut); |
| 786 newLogicalTop += paginationStrut; | 788 newLogicalTop += paginationStrut; |
| 787 } | 789 } |
| 788 } | 790 } |
| 789 | 791 |
| 790 paginatedContentWasLaidOut(newLogicalTop + child.logicalHeight()); | |
| 791 | |
| 792 // Similar to how we apply clearance. Go ahead and boost height() to be the
place where we're going to position the child. | 792 // Similar to how we apply clearance. Go ahead and boost height() to be the
place where we're going to position the child. |
| 793 setLogicalHeight(logicalHeight() + (newLogicalTop - logicalTop)); | 793 setLogicalHeight(logicalHeight() + (newLogicalTop - logicalTop)); |
| 794 | 794 |
| 795 // Return the final adjusted logical top. | 795 // Return the final adjusted logical top. |
| 796 return newLogicalTop; | 796 return newLogicalTop; |
| 797 } | 797 } |
| 798 | 798 |
| 799 static bool shouldSetStrutOnBlock(const LayoutBlockFlow& block, const RootInline
Box& lineBox, LayoutUnit lineLogicalOffset, int lineIndex, LayoutUnit pageLogica
lHeight) | 799 static bool shouldSetStrutOnBlock(const LayoutBlockFlow& block, const RootInline
Box& lineBox, LayoutUnit lineLogicalOffset, int lineIndex, LayoutUnit pageLogica
lHeight) |
| 800 { | 800 { |
| 801 bool wantsStrutOnBlock = false; | 801 bool wantsStrutOnBlock = false; |
| (...skipping 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3030 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. | 3030 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. |
| 3031 GlyphOverflowAndFallbackFontsMap textBoxDataMap; | 3031 GlyphOverflowAndFallbackFontsMap textBoxDataMap; |
| 3032 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { | 3032 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { |
| 3033 RootInlineBox* box = *it; | 3033 RootInlineBox* box = *it; |
| 3034 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); | 3034 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); |
| 3035 } | 3035 } |
| 3036 return childrenOverflowChanged; | 3036 return childrenOverflowChanged; |
| 3037 } | 3037 } |
| 3038 | 3038 |
| 3039 } // namespace blink | 3039 } // namespace blink |
| OLD | NEW |