| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 // the min/max width of the multicol container, not the flow thread. | 1488 // the min/max width of the multicol container, not the flow thread. |
| 1489 if (child->isOutOfFlowPositioned() || child->isColumnSpanAll()) { | 1489 if (child->isOutOfFlowPositioned() || child->isColumnSpanAll()) { |
| 1490 child = child->nextSibling(); | 1490 child = child->nextSibling(); |
| 1491 continue; | 1491 continue; |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 RefPtr<ComputedStyle> childStyle = child->mutableStyle(); | 1494 RefPtr<ComputedStyle> childStyle = child->mutableStyle(); |
| 1495 if (child->isFloating() || | 1495 if (child->isFloating() || |
| 1496 (child->isBox() && toLayoutBox(child)->avoidsFloats())) { | 1496 (child->isBox() && toLayoutBox(child)->avoidsFloats())) { |
| 1497 LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth; | 1497 LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth; |
| 1498 if (childStyle->clear() & ClearLeft) { | 1498 if (childStyle->clear() == ClearBoth || |
| 1499 childStyle->clear() == ClearLeft) { |
| 1499 maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth); | 1500 maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth); |
| 1500 floatLeftWidth = LayoutUnit(); | 1501 floatLeftWidth = LayoutUnit(); |
| 1501 } | 1502 } |
| 1502 if (childStyle->clear() & ClearRight) { | 1503 if (childStyle->clear() == ClearBoth || |
| 1504 childStyle->clear() == ClearRight) { |
| 1503 maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth); | 1505 maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth); |
| 1504 floatRightWidth = LayoutUnit(); | 1506 floatRightWidth = LayoutUnit(); |
| 1505 } | 1507 } |
| 1506 } | 1508 } |
| 1507 | 1509 |
| 1508 // A margin basically has three types: fixed, percentage, and auto | 1510 // A margin basically has three types: fixed, percentage, and auto |
| 1509 // (variable). | 1511 // (variable). |
| 1510 // Auto and percentage margins simply become 0 when computing min/max width. | 1512 // Auto and percentage margins simply become 0 when computing min/max width. |
| 1511 // Fixed margins can be added in as is. | 1513 // Fixed margins can be added in as is. |
| 1512 Length startMarginLength = childStyle->marginStartUsing(&styleToUse); | 1514 Length startMarginLength = childStyle->marginStartUsing(&styleToUse); |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2205 } | 2207 } |
| 2206 | 2208 |
| 2207 return availableHeight; | 2209 return availableHeight; |
| 2208 } | 2210 } |
| 2209 | 2211 |
| 2210 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2212 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2211 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2213 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2212 } | 2214 } |
| 2213 | 2215 |
| 2214 } // namespace blink | 2216 } // namespace blink |
| OLD | NEW |