| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the layout object implementation for KHTML. | 2 * This file is part of the layout object implementation for KHTML. |
| 3 * | 3 * |
| 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 6 * Copyright (C) 2003 Apple Computer, Inc. | 6 * Copyright (C) 2003 Apple Computer, Inc. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 | 449 |
| 450 LayoutUnit remainingSpace; | 450 LayoutUnit remainingSpace; |
| 451 | 451 |
| 452 FlexBoxIterator iterator(this); | 452 FlexBoxIterator iterator(this); |
| 453 unsigned highestFlexGroup = 0; | 453 unsigned highestFlexGroup = 0; |
| 454 unsigned lowestFlexGroup = 0; | 454 unsigned lowestFlexGroup = 0; |
| 455 bool haveFlex = false, flexingChildren = false; | 455 bool haveFlex = false, flexingChildren = false; |
| 456 gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, | 456 gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, |
| 457 lowestFlexGroup, haveFlex); | 457 lowestFlexGroup, haveFlex); |
| 458 | 458 |
| 459 PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; | 459 PaintLayerScrollableArea::DelayScrollOffsetClampScope delayClampScope; |
| 460 | 460 |
| 461 // We do 2 passes. The first pass is simply to lay everyone out at | 461 // We do 2 passes. The first pass is simply to lay everyone out at |
| 462 // their preferred widths. The second pass handles flexing the children. | 462 // their preferred widths. The second pass handles flexing the children. |
| 463 do { | 463 do { |
| 464 // Reset our height. | 464 // Reset our height. |
| 465 setHeight(yPos); | 465 setHeight(yPos); |
| 466 | 466 |
| 467 xPos = borderLeft() + paddingLeft(); | 467 xPos = borderLeft() + paddingLeft(); |
| 468 | 468 |
| 469 // Our first pass is done without flexing. We simply lay the children | 469 // Our first pass is done without flexing. We simply lay the children |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, | 795 gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, |
| 796 lowestFlexGroup, haveFlex); | 796 lowestFlexGroup, haveFlex); |
| 797 | 797 |
| 798 // We confine the line clamp ugliness to vertical flexible boxes (thus keeping | 798 // We confine the line clamp ugliness to vertical flexible boxes (thus keeping |
| 799 // it out of | 799 // it out of |
| 800 // mainstream block layout); this is not really part of the XUL box model. | 800 // mainstream block layout); this is not really part of the XUL box model. |
| 801 bool haveLineClamp = !style()->lineClamp().isNone(); | 801 bool haveLineClamp = !style()->lineClamp().isNone(); |
| 802 if (haveLineClamp) | 802 if (haveLineClamp) |
| 803 applyLineClamp(iterator, relayoutChildren); | 803 applyLineClamp(iterator, relayoutChildren); |
| 804 | 804 |
| 805 PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; | 805 PaintLayerScrollableArea::DelayScrollOffsetClampScope delayClampScope; |
| 806 | 806 |
| 807 // We do 2 passes. The first pass is simply to lay everyone out at | 807 // We do 2 passes. The first pass is simply to lay everyone out at |
| 808 // their preferred widths. The second pass handles flexing the children. | 808 // their preferred widths. The second pass handles flexing the children. |
| 809 // Our first pass is done without flexing. We simply lay the children | 809 // Our first pass is done without flexing. We simply lay the children |
| 810 // out within the box. | 810 // out within the box. |
| 811 do { | 811 do { |
| 812 setHeight(borderTop() + paddingTop()); | 812 setHeight(borderTop() + paddingTop()); |
| 813 LayoutUnit minHeight = size().height() + toAdd; | 813 LayoutUnit minHeight = size().height() + toAdd; |
| 814 | 814 |
| 815 for (LayoutBox* child = iterator.first(); child; child = iterator.next()) { | 815 for (LayoutBox* child = iterator.first(); child; child = iterator.next()) { |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 if (minHeight.isFixed() || minHeight.isAuto()) { | 1261 if (minHeight.isFixed() || minHeight.isAuto()) { |
| 1262 LayoutUnit minHeight(child->style()->minHeight().value()); | 1262 LayoutUnit minHeight(child->style()->minHeight().value()); |
| 1263 LayoutUnit height = contentHeightForChild(child); | 1263 LayoutUnit height = contentHeightForChild(child); |
| 1264 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero(); | 1264 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero(); |
| 1265 return allowedShrinkage; | 1265 return allowedShrinkage; |
| 1266 } | 1266 } |
| 1267 return LayoutUnit(); | 1267 return LayoutUnit(); |
| 1268 } | 1268 } |
| 1269 | 1269 |
| 1270 } // namespace blink | 1270 } // namespace blink |
| OLD | NEW |