| 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 if (lineLogicalOffset > block.borderAndPaddingBefore()) | 811 if (lineLogicalOffset > block.borderAndPaddingBefore()) |
| 812 return false; | 812 return false; |
| 813 | 813 |
| 814 LayoutUnit lineHeight = lineBox.lineBottomWithLeading() - lineBox.lineTo
pWithLeading(); | 814 LayoutUnit lineHeight = lineBox.lineBottomWithLeading() - lineBox.lineTo
pWithLeading(); |
| 815 LayoutUnit totalLogicalHeight = lineHeight + lineLogicalOffset.clampNega
tiveToZero(); | 815 LayoutUnit totalLogicalHeight = lineHeight + lineLogicalOffset.clampNega
tiveToZero(); |
| 816 // It's rather pointless to break before the block if the current line i
sn't going to | 816 // It's rather pointless to break before the block if the current line i
sn't going to |
| 817 // fit in the same column or page, so check that as well. | 817 // fit in the same column or page, so check that as well. |
| 818 if (totalLogicalHeight > pageLogicalHeight) | 818 if (totalLogicalHeight > pageLogicalHeight) |
| 819 return false; | 819 return false; |
| 820 } else { | 820 } else { |
| 821 if (block.style()->hasAutoOrphans() || lineIndex > block.style()->orphan
s()) | 821 if (lineIndex > block.style()->orphans()) |
| 822 return false; | 822 return false; |
| 823 | 823 |
| 824 // Not enough orphans here. Push the entire block to the next column / p
age as an attempt to | 824 // Not enough orphans here. Push the entire block to the next column / p
age as an attempt to |
| 825 // better satisfy the orphans requirement. | 825 // better satisfy the orphans requirement. |
| 826 // | 826 // |
| 827 // Note that we should ideally check if the first line in the block is f
lush with the | 827 // Note that we should ideally check if the first line in the block is f
lush with the |
| 828 // content edge of the block here, because if it isn't, we should break
at the class "C" | 828 // content edge of the block here, because if it isn't, we should break
at the class "C" |
| 829 // break point in front of the first line, rather than before the entire
block. | 829 // break point in front of the first line, rather than before the entire
block. |
| 830 } | 830 } |
| 831 return block.allowsPaginationStrut(); | 831 return block.allowsPaginationStrut(); |
| (...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. | 3040 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. |
| 3041 GlyphOverflowAndFallbackFontsMap textBoxDataMap; | 3041 GlyphOverflowAndFallbackFontsMap textBoxDataMap; |
| 3042 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { | 3042 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { |
| 3043 RootInlineBox* box = *it; | 3043 RootInlineBox* box = *it; |
| 3044 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); | 3044 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); |
| 3045 } | 3045 } |
| 3046 return childrenOverflowChanged; | 3046 return childrenOverflowChanged; |
| 3047 } | 3047 } |
| 3048 | 3048 |
| 3049 } // namespace blink | 3049 } // namespace blink |
| OLD | NEW |