Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1636 RootInlineBox* last = nullptr; | 1636 RootInlineBox* last = nullptr; |
| 1637 RootInlineBox* firstLineBoxWithBreakAndClearance = 0; | 1637 RootInlineBox* firstLineBoxWithBreakAndClearance = 0; |
| 1638 | 1638 |
| 1639 // FIXME: This entire float-checking block needs to be broken into a new fun ction. | 1639 // FIXME: This entire float-checking block needs to be broken into a new fun ction. |
| 1640 if (!layoutState.isFullLayout()) { | 1640 if (!layoutState.isFullLayout()) { |
| 1641 // Paginate all of the clean lines. | 1641 // Paginate all of the clean lines. |
| 1642 bool paginated = view()->layoutState() && view()->layoutState()->isPagin ated(); | 1642 bool paginated = view()->layoutState() && view()->layoutState()->isPagin ated(); |
| 1643 LayoutUnit paginationDelta; | 1643 LayoutUnit paginationDelta; |
| 1644 for (curr = firstRootBox(); curr && !curr->isDirty(); curr = curr->nextR ootBox()) { | 1644 for (curr = firstRootBox(); curr && !curr->isDirty(); curr = curr->nextR ootBox()) { |
| 1645 if (paginated) { | 1645 if (paginated) { |
| 1646 // If a cell's row wants to avoid straddling page breaks then we always need to layout all | |
| 1647 // the content in the cell at once. | |
| 1648 if (isTableCell() && toLayoutBox(parent())->getPaginationBreakab ility() != AllowAnyBreaks) { | |
|
mstensho (USE GERRIT)
2016/03/29 09:57:46
This piece of code isn't covered by any test, it s
rhogan
2016/03/29 19:04:36
No - but it is covered by one of my printing tests
rhogan
2016/04/03 14:56:41
Now covered by fast/multicol/cell-doesnt-fit-on-pa
| |
| 1649 layoutState.markForFullLayout(); | |
| 1650 break; | |
| 1651 } | |
| 1646 paginationDelta -= curr->paginationStrut(); | 1652 paginationDelta -= curr->paginationStrut(); |
| 1647 adjustLinePositionForPagination(*curr, paginationDelta); | 1653 adjustLinePositionForPagination(*curr, paginationDelta); |
| 1648 if (paginationDelta) { | 1654 if (paginationDelta) { |
| 1649 if (containsFloats() || !layoutState.floats().isEmpty()) { | 1655 if (containsFloats() || !layoutState.floats().isEmpty()) { |
| 1650 // FIXME: Do better eventually. For now if we ever shif t because of pagination and floats are present just go to a full layout. | 1656 // FIXME: Do better eventually. For now if we ever shif t because of pagination and floats are present just go to a full layout. |
| 1651 layoutState.markForFullLayout(); | 1657 layoutState.markForFullLayout(); |
| 1652 break; | 1658 break; |
| 1653 } | 1659 } |
| 1654 | 1660 |
| 1655 layoutState.updatePaintInvalidationRangeFromBox(curr, pagina tionDelta); | 1661 layoutState.updatePaintInvalidationRangeFromBox(curr, pagina tionDelta); |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2107 if (!line || !line->isFirstLineStyle()) | 2113 if (!line || !line->isFirstLineStyle()) |
| 2108 return reason; | 2114 return reason; |
| 2109 // It's the RootInlineBox that paints the ::first-line background. Note that since it may be | 2115 // It's the RootInlineBox that paints the ::first-line background. Note that since it may be |
| 2110 // expensive to figure out if the first line is affected by any ::first-line selectors at all, | 2116 // expensive to figure out if the first line is affected by any ::first-line selectors at all, |
| 2111 // we just invalidate it unconditionally, since that's typically cheaper. | 2117 // we just invalidate it unconditionally, since that's typically cheaper. |
| 2112 invalidateDisplayItemClient(*line); | 2118 invalidateDisplayItemClient(*line); |
| 2113 return reason; | 2119 return reason; |
| 2114 } | 2120 } |
| 2115 | 2121 |
| 2116 } // namespace blink | 2122 } // namespace blink |
| OLD | NEW |