| 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 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3074 | 3074 |
| 3075 // We need to stop here, since we don't want to increase the height of the t
able | 3075 // We need to stop here, since we don't want to increase the height of the t
able |
| 3076 // artificially. We're going to rely on this cell getting expanded to some
new | 3076 // artificially. We're going to rely on this cell getting expanded to some
new |
| 3077 // height, and then when we lay out again we'll use the calculation below. | 3077 // height, and then when we lay out again we'll use the calculation below. |
| 3078 if (isTableCell() && (h.isAuto() || h.isPercentOrCalc())) { | 3078 if (isTableCell() && (h.isAuto() || h.isPercentOrCalc())) { |
| 3079 if (hasOverrideLogicalContentHeight()) | 3079 if (hasOverrideLogicalContentHeight()) |
| 3080 return overrideLogicalContentHeight(); | 3080 return overrideLogicalContentHeight(); |
| 3081 return logicalHeight() - borderAndPaddingLogicalHeight(); | 3081 return logicalHeight() - borderAndPaddingLogicalHeight(); |
| 3082 } | 3082 } |
| 3083 | 3083 |
| 3084 if (isFlexItem()) { |
| 3085 LayoutFlexibleBox& flexBox = toLayoutFlexibleBox(*parent()); |
| 3086 LayoutUnit stretchedHeight = flexBox.childLogicalHeightForPercentageReso
lution(*this); |
| 3087 if (stretchedHeight != LayoutUnit(-1)) |
| 3088 return stretchedHeight; |
| 3089 } |
| 3090 |
| 3084 if (h.isPercentOrCalc() && isOutOfFlowPositioned()) { | 3091 if (h.isPercentOrCalc() && isOutOfFlowPositioned()) { |
| 3085 // FIXME: This is wrong if the containingBlock has a perpendicular writi
ng mode. | 3092 // FIXME: This is wrong if the containingBlock has a perpendicular writi
ng mode. |
| 3086 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(c
ontainingBlock()); | 3093 LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(c
ontainingBlock()); |
| 3087 return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, avail
ableHeight)); | 3094 return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, avail
ableHeight)); |
| 3088 } | 3095 } |
| 3089 | 3096 |
| 3090 // FIXME: Should we pass intrinsicContentLogicalHeight() instead of -1 here? | 3097 // FIXME: Should we pass intrinsicContentLogicalHeight() instead of -1 here? |
| 3091 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh
tUsing(MainOrPreferredSize, h, LayoutUnit(-1)); | 3098 LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeigh
tUsing(MainOrPreferredSize, h, LayoutUnit(-1)); |
| 3092 if (heightIncludingScrollbar != -1) | 3099 if (heightIncludingScrollbar != -1) |
| 3093 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(
heightIncludingScrollbar) - scrollbarLogicalHeight()); | 3100 return std::max(LayoutUnit(), adjustContentBoxLogicalHeightForBoxSizing(
heightIncludingScrollbar) - scrollbarLogicalHeight()); |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4867 LayoutRect rect = frameRect(); | 4874 LayoutRect rect = frameRect(); |
| 4868 | 4875 |
| 4869 LayoutBlock* block = containingBlock(); | 4876 LayoutBlock* block = containingBlock(); |
| 4870 if (block) | 4877 if (block) |
| 4871 block->adjustChildDebugRect(rect); | 4878 block->adjustChildDebugRect(rect); |
| 4872 | 4879 |
| 4873 return rect; | 4880 return rect; |
| 4874 } | 4881 } |
| 4875 | 4882 |
| 4876 } // namespace blink | 4883 } // namespace blink |
| OLD | NEW |