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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 904 RootInlineBox* lineBox = createLineBoxesFromBidiRuns(resolver.status ().context->level(), bidiRuns, endOfLine, layoutState.lineInfo(), verticalPositi onCache, trailingSpaceRun, wordMeasurements); | 904 RootInlineBox* lineBox = createLineBoxesFromBidiRuns(resolver.status ().context->level(), bidiRuns, endOfLine, layoutState.lineInfo(), verticalPositi onCache, trailingSpaceRun, wordMeasurements); |
| 905 | 905 |
| 906 bidiRuns.deleteRuns(); | 906 bidiRuns.deleteRuns(); |
| 907 resolver.markCurrentRunEmpty(); // FIXME: This can probably be repla ced by an ASSERT (or just removed). | 907 resolver.markCurrentRunEmpty(); // FIXME: This can probably be repla ced by an ASSERT (or just removed). |
| 908 | 908 |
| 909 if (lineBox) { | 909 if (lineBox) { |
| 910 lineBox->setLineBreakInfo(endOfLine.getLineLayoutItem(), endOfLi ne.offset(), resolver.status()); | 910 lineBox->setLineBreakInfo(endOfLine.getLineLayoutItem(), endOfLi ne.offset(), resolver.status()); |
| 911 if (layoutState.usesPaintInvalidationBounds()) | 911 if (layoutState.usesPaintInvalidationBounds()) |
| 912 layoutState.updatePaintInvalidationRangeFromBox(lineBox); | 912 layoutState.updatePaintInvalidationRangeFromBox(lineBox); |
| 913 | 913 |
| 914 if (paginated) { | 914 bool insideBreakableObject = !isTableCell() || toLayoutBox(paren t())->getPaginationBreakability() == AllowAnyBreaks; |
|
mstensho (USE GERRIT)
2016/03/17 14:04:03
This is wrong. break-inside:avoid means that you s
| |
| 915 if (paginated && insideBreakableObject) { | |
| 915 LayoutUnit adjustment; | 916 LayoutUnit adjustment; |
| 916 adjustLinePositionForPagination(*lineBox, adjustment); | 917 adjustLinePositionForPagination(*lineBox, adjustment); |
| 917 if (adjustment) { | 918 if (adjustment) { |
| 918 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine() ? IndentText : DoNotIndent Text); | 919 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine() ? IndentText : DoNotIndent Text); |
| 919 lineBox->moveInBlockDirection(adjustment); | 920 lineBox->moveInBlockDirection(adjustment); |
| 920 if (layoutState.usesPaintInvalidationBounds()) | 921 if (layoutState.usesPaintInvalidationBounds()) |
| 921 layoutState.updatePaintInvalidationRangeFromBox(line Box); | 922 layoutState.updatePaintInvalidationRangeFromBox(line Box); |
| 922 | 923 |
| 923 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine() ? IndentText: DoNotIndentText) != o ldLineWidth) { | 924 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine() ? IndentText: DoNotIndentText) != o ldLineWidth) { |
| 924 // We have to delete this line, remove all floats th at got added, and let line layout re-run. | 925 // We have to delete this line, remove all floats th at got added, and let line layout re-run. |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2107 if (!line || !line->isFirstLineStyle()) | 2108 if (!line || !line->isFirstLineStyle()) |
| 2108 return reason; | 2109 return reason; |
| 2109 // It's the RootInlineBox that paints the ::first-line background. Note that since it may be | 2110 // 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, | 2111 // 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. | 2112 // we just invalidate it unconditionally, since that's typically cheaper. |
| 2112 invalidateDisplayItemClient(*line); | 2113 invalidateDisplayItemClient(*line); |
| 2113 return reason; | 2114 return reason; |
| 2114 } | 2115 } |
| 2115 | 2116 |
| 2116 } // namespace blink | 2117 } // namespace blink |
| OLD | NEW |