Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1602773005: Respect break-inside:avoid on table rows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 (isTableCell()) {
1647 layoutState.markForFullLayout();
mstensho (USE GERRIT) 2016/02/29 09:46:47 I really hope that we can avoid this.
1648 break;
1649 }
1650
1646 paginationDelta -= curr->paginationStrut(); 1651 paginationDelta -= curr->paginationStrut();
1647 adjustLinePositionForPagination(*curr, paginationDelta); 1652 adjustLinePositionForPagination(*curr, paginationDelta);
1648 if (paginationDelta) { 1653 if (paginationDelta) {
1649 if (containsFloats() || !layoutState.floats().isEmpty()) { 1654 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. 1655 // 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(); 1656 layoutState.markForFullLayout();
1652 break; 1657 break;
1653 } 1658 }
1654 1659
1655 layoutState.updatePaintInvalidationRangeFromBox(curr, pagina tionDelta); 1660 layoutState.updatePaintInvalidationRangeFromBox(curr, pagina tionDelta);
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 if (!line || !line->isFirstLineStyle()) 2112 if (!line || !line->isFirstLineStyle())
2108 return reason; 2113 return reason;
2109 // It's the RootInlineBox that paints the ::first-line background. Note that since it may be 2114 // 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, 2115 // 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. 2116 // we just invalidate it unconditionally, since that's typically cheaper.
2112 invalidateDisplayItemClient(*line); 2117 invalidateDisplayItemClient(*line);
2113 return reason; 2118 return reason;
2114 } 2119 }
2115 2120
2116 } // namespace blink 2121 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698