| 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 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 if (isPaginated) { | 2536 if (isPaginated) { |
| 2537 LayoutBlockFlow* childBlockFlow = childBox->isLayoutBlockFlow() ? to
LayoutBlockFlow(childBox) : nullptr; | 2537 LayoutBlockFlow* childBlockFlow = childBox->isLayoutBlockFlow() ? to
LayoutBlockFlow(childBox) : nullptr; |
| 2538 // The first piece of content inside the child may have set a strut
during layout. | 2538 // The first piece of content inside the child may have set a strut
during layout. |
| 2539 LayoutUnit strut = childBlockFlow ? childBlockFlow->paginationStrutP
ropagatedFromChild() : LayoutUnit(); | 2539 LayoutUnit strut = childBlockFlow ? childBlockFlow->paginationStrutP
ropagatedFromChild() : LayoutUnit(); |
| 2540 if (!strut) { | 2540 if (!strut) { |
| 2541 // Otherwise, if we are unsplittable and don't fit, move to the
next page or column | 2541 // Otherwise, if we are unsplittable and don't fit, move to the
next page or column |
| 2542 // if that helps the situation. | 2542 // if that helps the situation. |
| 2543 strut = adjustForUnsplittableChild(*childBox, floatLogicalLocati
on.y()) - floatLogicalLocation.y(); | 2543 strut = adjustForUnsplittableChild(*childBox, floatLogicalLocati
on.y()) - floatLogicalLocation.y(); |
| 2544 } | 2544 } |
| 2545 | 2545 |
| 2546 floatingObject.setPaginationStrut(strut); | |
| 2547 childBox->setPaginationStrut(strut); | 2546 childBox->setPaginationStrut(strut); |
| 2548 if (strut) { | 2547 if (strut) { |
| 2549 floatLogicalLocation = computeLogicalLocationForFloat(floatingOb
ject, floatLogicalLocation.y() + strut); | 2548 floatLogicalLocation = computeLogicalLocationForFloat(floatingOb
ject, floatLogicalLocation.y() + strut); |
| 2550 setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x())
; | 2549 setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x())
; |
| 2551 | 2550 |
| 2552 setLogicalLeftForChild(*childBox, floatLogicalLocation.x() + chi
ldLogicalLeftMargin); | 2551 setLogicalLeftForChild(*childBox, floatLogicalLocation.x() + chi
ldLogicalLeftMargin); |
| 2553 setLogicalTopForChild(*childBox, floatLogicalLocation.y() + marg
inBeforeForChild(*childBox)); | 2552 setLogicalTopForChild(*childBox, floatLogicalLocation.y() + marg
inBeforeForChild(*childBox)); |
| 2554 | 2553 |
| 2555 if (childBox->isLayoutBlock()) | 2554 if (childBox->isLayoutBlock()) |
| 2556 childBox->setChildNeedsLayout(MarkOnlyThis); | 2555 childBox->setChildNeedsLayout(MarkOnlyThis); |
| (...skipping 473 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. | 3029 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. |
| 3031 GlyphOverflowAndFallbackFontsMap textBoxDataMap; | 3030 GlyphOverflowAndFallbackFontsMap textBoxDataMap; |
| 3032 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { | 3031 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { |
| 3033 RootInlineBox* box = *it; | 3032 RootInlineBox* box = *it; |
| 3034 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); | 3033 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); |
| 3035 } | 3034 } |
| 3036 return childrenOverflowChanged; | 3035 return childrenOverflowChanged; |
| 3037 } | 3036 } |
| 3038 | 3037 |
| 3039 } // namespace blink | 3038 } // namespace blink |
| OLD | NEW |