| 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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 for (size_t i = 0; i < replacedChildren.size(); i++) | 1311 for (size_t i = 0; i < replacedChildren.size(); i++) |
| 1312 replacedChildren[i]->layoutIfNeeded(); | 1312 replacedChildren[i]->layoutIfNeeded(); |
| 1313 | 1313 |
| 1314 layoutRunsAndFloats(layoutState); | 1314 layoutRunsAndFloats(layoutState); |
| 1315 } | 1315 } |
| 1316 | 1316 |
| 1317 // Expand the last line to accommodate Ruby and emphasis marks. | 1317 // Expand the last line to accommodate Ruby and emphasis marks. |
| 1318 int lastLineAnnotationsAdjustment = 0; | 1318 int lastLineAnnotationsAdjustment = 0; |
| 1319 if (lastRootBox()) { | 1319 if (lastRootBox()) { |
| 1320 LayoutUnit lowestAllowedPosition = std::max(lastRootBox()->lineBottom(),
logicalHeight() + paddingAfter()); | 1320 LayoutUnit lowestAllowedPosition = std::max(lastRootBox()->lineBottom(),
logicalHeight() + paddingAfter()); |
| 1321 if (!style()->isFlippedLinesWritingMode()) | 1321 lastLineAnnotationsAdjustment = lastRootBox()->computeUnderAnnotationAdj
ustment(lowestAllowedPosition); |
| 1322 lastLineAnnotationsAdjustment = lastRootBox()->computeUnderAnnotatio
nAdjustment(lowestAllowedPosition); | |
| 1323 else | |
| 1324 lastLineAnnotationsAdjustment = lastRootBox()->computeOverAnnotation
Adjustment(lowestAllowedPosition); | |
| 1325 } | 1322 } |
| 1326 | 1323 |
| 1327 // Now add in the bottom border/padding. | 1324 // Now add in the bottom border/padding. |
| 1328 setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + afterEdge
); | 1325 setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + afterEdge
); |
| 1329 | 1326 |
| 1330 if (!firstLineBox() && hasLineIfEmpty()) | 1327 if (!firstLineBox() && hasLineIfEmpty()) |
| 1331 setLogicalHeight(logicalHeight() + lineHeight(true, HorizontalLine, Posi
tionOfInteriorLineBoxes)); | 1328 setLogicalHeight(logicalHeight() + lineHeight(true, HorizontalLine, Posi
tionOfInteriorLineBoxes)); |
| 1332 | 1329 |
| 1333 // See if we have any lines that spill out of our block. If we do, then we
will possibly need to | 1330 // See if we have any lines that spill out of our block. If we do, then we
will possibly need to |
| 1334 // truncate text. | 1331 // truncate text. |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); | 1637 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); |
| 1641 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; | 1638 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; |
| 1642 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 1639 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
| 1643 | 1640 |
| 1644 if (!style()->isLeftToRightDirection()) | 1641 if (!style()->isLeftToRightDirection()) |
| 1645 return logicalWidth() - logicalLeft; | 1642 return logicalWidth() - logicalLeft; |
| 1646 return logicalLeft; | 1643 return logicalLeft; |
| 1647 } | 1644 } |
| 1648 | 1645 |
| 1649 } | 1646 } |
| OLD | NEW |