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 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2136 // Figure out if we should clear out our line boxes. | 2136 // Figure out if we should clear out our line boxes. |
2137 // FIXME: Handle resize eventually! | 2137 // FIXME: Handle resize eventually! |
2138 bool isFullLayout = !firstLineBox() || selfNeedsLayout() || relayoutChildren
|| clearLinesForPagination; | 2138 bool isFullLayout = !firstLineBox() || selfNeedsLayout() || relayoutChildren
|| clearLinesForPagination; |
2139 LineLayoutState layoutState(isFullLayout, repaintLogicalTop, repaintLogicalB
ottom, flowThread); | 2139 LineLayoutState layoutState(isFullLayout, repaintLogicalTop, repaintLogicalB
ottom, flowThread); |
2140 | 2140 |
2141 if (isFullLayout) | 2141 if (isFullLayout) |
2142 lineBoxes()->deleteLineBoxes(); | 2142 lineBoxes()->deleteLineBoxes(); |
2143 | 2143 |
2144 // Text truncation kicks in in two cases: | 2144 // Text truncation kicks in in two cases: |
2145 // 1) If your overflow isn't visible and your text-overflow-mode isn't c
lip. | 2145 // 1) If your overflow isn't visible and your text-overflow-mode isn't c
lip. |
2146 // 2) If you're an anonymous block with a block parent that satisfies #1
. | 2146 // 2) If you're an anonymous block with a block parent that satisfies #1
that was created |
| 2147 // to accomodate a block that has inline and block children. This exc
ludes parents where |
| 2148 // canCollapseAnonymousBlockChild is false, notabley flex items and g
rid items. |
2147 // FIXME: CSS3 says that descendants that are clipped must also know how to
truncate. This is insanely | 2149 // FIXME: CSS3 says that descendants that are clipped must also know how to
truncate. This is insanely |
2148 // difficult to figure out in general (especially in the middle of doing lay
out), so we only handle the | 2150 // difficult to figure out in general (especially in the middle of doing lay
out), so we only handle the |
2149 // simple case of an anonymous block truncating when it's parent is clipped. | 2151 // simple case of an anonymous block truncating when it's parent is clipped. |
2150 bool hasTextOverflow = (style()->textOverflow() && hasOverflowClip()) | 2152 bool hasTextOverflow = (style()->textOverflow() && hasOverflowClip()) |
2151 || (isAnonymousBlock() && parent() && parent()->isRenderBlock() && paren
t()->style()->textOverflow() && parent()->hasOverflowClip()); | 2153 || (isAnonymousBlock() && parent() && parent()->isRenderBlock() && toRen
derBlock(parent())->canCollapseAnonymousBlockChild() |
| 2154 && parent()->style()->textOverflow() && parent()->hasOverflowClip())
; |
2152 | 2155 |
2153 // Walk all the lines and delete our ellipsis line boxes if they exist. | 2156 // Walk all the lines and delete our ellipsis line boxes if they exist. |
2154 if (hasTextOverflow) | 2157 if (hasTextOverflow) |
2155 deleteEllipsisLineBoxes(); | 2158 deleteEllipsisLineBoxes(); |
2156 | 2159 |
2157 if (firstChild()) { | 2160 if (firstChild()) { |
2158 // In full layout mode, clear the line boxes of children upfront. Otherw
ise, | 2161 // In full layout mode, clear the line boxes of children upfront. Otherw
ise, |
2159 // siblings can run into stale root lineboxes during layout. Then layout | 2162 // siblings can run into stale root lineboxes during layout. Then layout |
2160 // the replaced elements later. In partial layout mode, line boxes are n
ot | 2163 // the replaced elements later. In partial layout mode, line boxes are n
ot |
2161 // deleted and only dirtied. In that case, we can layout the replaced | 2164 // deleted and only dirtied. In that case, we can layout the replaced |
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3559 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 3562 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
3560 | 3563 |
3561 setLineGridBox(lineGridBox); | 3564 setLineGridBox(lineGridBox); |
3562 | 3565 |
3563 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 3566 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
3564 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 3567 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
3565 // to this grid. | 3568 // to this grid. |
3566 } | 3569 } |
3567 | 3570 |
3568 } | 3571 } |
OLD | NEW |