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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 525 } |
526 } while (absoluteValue(groupRemainingSpace) >= 1); | 526 } while (absoluteValue(groupRemainingSpace) >= 1); |
527 } | 527 } |
528 | 528 |
529 // We didn't find any children that could grow. | 529 // We didn't find any children that could grow. |
530 if (haveFlex && !flexingChildren) | 530 if (haveFlex && !flexingChildren) |
531 haveFlex = false; | 531 haveFlex = false; |
532 } | 532 } |
533 } while (haveFlex); | 533 } while (haveFlex); |
534 | 534 |
535 LayoutBlock::finishDelayUpdateScrollInfo(); | 535 LayoutBlock::finishDelayUpdateScrollInfo(nullptr); |
536 | 536 |
537 if (remainingSpace > 0 && ((style()->isLeftToRightDirection() && style()->bo
xPack() != Start) | 537 if (remainingSpace > 0 && ((style()->isLeftToRightDirection() && style()->bo
xPack() != Start) |
538 || (!style()->isLeftToRightDirection() && style()->boxPack() != End))) { | 538 || (!style()->isLeftToRightDirection() && style()->boxPack() != End))) { |
539 // Children must be repositioned. | 539 // Children must be repositioned. |
540 LayoutUnit offset; | 540 LayoutUnit offset; |
541 if (style()->boxPack() == Justify) { | 541 if (style()->boxPack() == Justify) { |
542 // Determine the total number of children. | 542 // Determine the total number of children. |
543 int totalChildren = 0; | 543 int totalChildren = 0; |
544 for (LayoutBox* child = iterator.first(); child; child = iterator.ne
xt()) { | 544 for (LayoutBox* child = iterator.first(); child; child = iterator.ne
xt()) { |
545 if (childDoesNotAffectWidthOrFlexing(child)) | 545 if (childDoesNotAffectWidthOrFlexing(child)) |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 } | 776 } |
777 } while (absoluteValue(groupRemainingSpace) >= 1); | 777 } while (absoluteValue(groupRemainingSpace) >= 1); |
778 } | 778 } |
779 | 779 |
780 // We didn't find any children that could grow. | 780 // We didn't find any children that could grow. |
781 if (haveFlex && !flexingChildren) | 781 if (haveFlex && !flexingChildren) |
782 haveFlex = false; | 782 haveFlex = false; |
783 } | 783 } |
784 } while (haveFlex); | 784 } while (haveFlex); |
785 | 785 |
786 LayoutBlock::finishDelayUpdateScrollInfo(); | 786 LayoutBlock::finishDelayUpdateScrollInfo(nullptr); |
787 | 787 |
788 if (style()->boxPack() != Start && remainingSpace > 0) { | 788 if (style()->boxPack() != Start && remainingSpace > 0) { |
789 // Children must be repositioned. | 789 // Children must be repositioned. |
790 LayoutUnit offset; | 790 LayoutUnit offset; |
791 if (style()->boxPack() == Justify) { | 791 if (style()->boxPack() == Justify) { |
792 // Determine the total number of children. | 792 // Determine the total number of children. |
793 int totalChildren = 0; | 793 int totalChildren = 0; |
794 for (LayoutBox* child = iterator.first(); child; child = iterator.ne
xt()) { | 794 for (LayoutBox* child = iterator.first(); child; child = iterator.ne
xt()) { |
795 if (childDoesNotAffectWidthOrFlexing(child)) | 795 if (childDoesNotAffectWidthOrFlexing(child)) |
796 continue; | 796 continue; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 if (minHeight.isFixed() || minHeight.isAuto()) { | 997 if (minHeight.isFixed() || minHeight.isAuto()) { |
998 LayoutUnit minHeight(child->style()->minHeight().value()); | 998 LayoutUnit minHeight(child->style()->minHeight().value()); |
999 LayoutUnit height = contentHeightForChild(child); | 999 LayoutUnit height = contentHeightForChild(child); |
1000 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero()
; | 1000 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero()
; |
1001 return allowedShrinkage; | 1001 return allowedShrinkage; |
1002 } | 1002 } |
1003 return LayoutUnit(); | 1003 return LayoutUnit(); |
1004 } | 1004 } |
1005 | 1005 |
1006 } // namespace blink | 1006 } // namespace blink |
OLD | NEW |