| 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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 childMin += margins; | 1314 childMin += margins; |
| 1315 childMax += margins; | 1315 childMax += margins; |
| 1316 } | 1316 } |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 if (!child->isLayoutInline() && !child->isText()) { | 1319 if (!child->isLayoutInline() && !child->isText()) { |
| 1320 // Case (2). Inline replaced elements and floats. | 1320 // Case (2). Inline replaced elements and floats. |
| 1321 // Go ahead and terminate the current line as far as | 1321 // Go ahead and terminate the current line as far as |
| 1322 // minwidth is concerned. | 1322 // minwidth is concerned. |
| 1323 LayoutUnit childMinPreferredLogicalWidth, childMaxPreferredLogic
alWidth; | 1323 LayoutUnit childMinPreferredLogicalWidth, childMaxPreferredLogic
alWidth; |
| 1324 if (child->isBox() && child->isHorizontalWritingMode() != isHori
zontalWritingMode()) { | 1324 child->minMaxPreferredLogicalWidthForParent(childMinPreferredLog
icalWidth, childMaxPreferredLogicalWidth); |
| 1325 LayoutBox* childBox = toLayoutBox(child); | |
| 1326 LogicalExtentComputedValues computedValues; | |
| 1327 childBox->computeLogicalHeight(childBox->borderAndPaddingLog
icalHeight(), 0, computedValues); | |
| 1328 childMinPreferredLogicalWidth = childMaxPreferredLogicalWidt
h = computedValues.m_extent; | |
| 1329 } else { | |
| 1330 childMinPreferredLogicalWidth = child->minPreferredLogicalWi
dth(); | |
| 1331 childMaxPreferredLogicalWidth = child->maxPreferredLogicalWi
dth(); | |
| 1332 } | |
| 1333 childMin += childMinPreferredLogicalWidth; | 1325 childMin += childMinPreferredLogicalWidth; |
| 1334 childMax += childMaxPreferredLogicalWidth; | 1326 childMax += childMaxPreferredLogicalWidth; |
| 1335 | 1327 |
| 1336 bool clearPreviousFloat; | 1328 bool clearPreviousFloat; |
| 1337 if (child->isFloating()) { | 1329 if (child->isFloating()) { |
| 1338 clearPreviousFloat = (prevFloat | 1330 clearPreviousFloat = (prevFloat |
| 1339 && ((prevFloat->styleRef().floating() == LeftFloat && (c
hildStyle.clear() & CLEFT)) | 1331 && ((prevFloat->styleRef().floating() == LeftFloat && (c
hildStyle.clear() & CLEFT)) |
| 1340 || (prevFloat->styleRef().floating() == RightFloat &
& (childStyle.clear() & CRIGHT)))); | 1332 || (prevFloat->styleRef().floating() == RightFloat &
& (childStyle.clear() & CRIGHT)))); |
| 1341 prevFloat = child; | 1333 prevFloat = child; |
| 1342 } else { | 1334 } else { |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); | 2044 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); |
| 2053 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; | 2045 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; |
| 2054 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2046 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
| 2055 | 2047 |
| 2056 if (!style()->isLeftToRightDirection()) | 2048 if (!style()->isLeftToRightDirection()) |
| 2057 return logicalWidth() - logicalLeft; | 2049 return logicalWidth() - logicalLeft; |
| 2058 return logicalLeft; | 2050 return logicalLeft; |
| 2059 } | 2051 } |
| 2060 | 2052 |
| 2061 } | 2053 } |
| OLD | NEW |