| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 3037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3048 | 3048 |
| 3049 // We need to stop here, since we don't want to increase the height of the t
able | 3049 // We need to stop here, since we don't want to increase the height of the t
able |
| 3050 // artificially. We're going to rely on this cell getting expanded to some
new | 3050 // artificially. We're going to rely on this cell getting expanded to some
new |
| 3051 // height, and then when we lay out again we'll use the calculation below. | 3051 // height, and then when we lay out again we'll use the calculation below. |
| 3052 if (isTableCell() && (h.isAuto() || h.hasPercent())) { | 3052 if (isTableCell() && (h.isAuto() || h.hasPercent())) { |
| 3053 if (hasOverrideLogicalContentHeight()) | 3053 if (hasOverrideLogicalContentHeight()) |
| 3054 return overrideLogicalContentHeight(); | 3054 return overrideLogicalContentHeight(); |
| 3055 return logicalHeight() - borderAndPaddingLogicalHeight(); | 3055 return logicalHeight() - borderAndPaddingLogicalHeight(); |
| 3056 } | 3056 } |
| 3057 | 3057 |
| 3058 if (isFlexItem()) { |
| 3059 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); |
| 3060 LayoutUnit stretchedHeight = flexBox.childLogicalHeightForPercentageReso
lution(*this); |
| 3061 if (stretchedHeight != LayoutUnit(-1)) |
| 3062 return stretchedHeight; |
| 3063 } |
| 3064 |
| 3058 if (h.hasPercent() && isOutOfFlowPositioned()) { | 3065 if (h.hasPercent() && isOutOfFlowPositioned()) { |
| 3059 // FIXME: This is wrong if the containingBlock has a perpendicular writi
ng mode. | 3066 // FIXME: This is wrong if the containingBlock has a perpendicular writi
ng mode. |
| 3060 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(c
ontainingBlock()); | 3067 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(c
ontainingBlock()); |
| 3061 return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, avail
ableHeight)); | 3068 return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, avail
ableHeight)); |
| 3062 } | 3069 } |
| 3063 | 3070 |
| 3064 // FIXME: Should we pass intrinsicContentLogicalHeight() instead of -1 here? | 3071 // FIXME: Should we pass intrinsicContentLogicalHeight() instead of -1 here? |
| 3065 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh
tUsing(MainOrPreferredSize, h, LayoutUnit(-1)); | 3072 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh
tUsing(MainOrPreferredSize, h, LayoutUnit(-1)); |
| 3066 if (heightIncludingScrollbar != -1) | 3073 if (heightIncludingScrollbar != -1) |
| 3067 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(
heightIncludingScrollbar) - scrollbarLogicalHeight()); | 3074 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(
heightIncludingScrollbar) - scrollbarLogicalHeight()); |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4814 m_rareData->m_snapAreas->remove(&snapArea); | 4821 m_rareData->m_snapAreas->remove(&snapArea); |
| 4815 } | 4822 } |
| 4816 } | 4823 } |
| 4817 | 4824 |
| 4818 SnapAreaSet* LayoutBox::snapAreas() const | 4825 SnapAreaSet* LayoutBox::snapAreas() const |
| 4819 { | 4826 { |
| 4820 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4827 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4821 } | 4828 } |
| 4822 | 4829 |
| 4823 } // namespace blink | 4830 } // namespace blink |
| OLD | NEW |