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 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2666 // A positioned element that specified both top/bottom or that specifies hei
ght should be treated as though it has a height | 2666 // A positioned element that specified both top/bottom or that specifies hei
ght should be treated as though it has a height |
2667 // explicitly specified that can be used for any percentage computations. | 2667 // explicitly specified that can be used for any percentage computations. |
2668 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned()
&& (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c
bstyle->logicalBottom().isAuto())); | 2668 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned()
&& (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c
bstyle->logicalBottom().isAuto())); |
2669 | 2669 |
2670 bool includeBorderPadding = isTable(); | 2670 bool includeBorderPadding = isTable(); |
2671 | 2671 |
2672 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) | 2672 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) |
2673 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo
ntent(); | 2673 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo
ntent(); |
2674 else if (hasOverrideContainingBlockLogicalHeight()) | 2674 else if (hasOverrideContainingBlockLogicalHeight()) |
2675 availableHeight = overrideContainingBlockContentLogicalHeight(); | 2675 availableHeight = overrideContainingBlockContentLogicalHeight(); |
| 2676 else if (cb->isFlexItem() && cb->hasOverrideContainingBlockLogicalHeight()) |
| 2677 availableHeight = cb->overrideContainingBlockContentLogicalHeight(); |
2676 else if (cb->isTableCell()) { | 2678 else if (cb->isTableCell()) { |
2677 if (!skippedAutoHeightContainingBlock) { | 2679 if (!skippedAutoHeightContainingBlock) { |
2678 // Table cells violate what the CSS spec says to do with heights. Ba
sically we | 2680 // Table cells violate what the CSS spec says to do with heights. Ba
sically we |
2679 // don't care if the cell specified a height or not. We just always
make ourselves | 2681 // don't care if the cell specified a height or not. We just always
make ourselves |
2680 // be a percentage of the cell's current content height. | 2682 // be a percentage of the cell's current content height. |
2681 if (!cb->hasOverrideHeight()) { | 2683 if (!cb->hasOverrideHeight()) { |
2682 // Normally we would let the cell size intrinsically, but scroll
ing overflow has to be | 2684 // Normally we would let the cell size intrinsically, but scroll
ing overflow has to be |
2683 // treated differently, since WinIE lets scrolled overflow regio
ns shrink as needed. | 2685 // treated differently, since WinIE lets scrolled overflow regio
ns shrink as needed. |
2684 // While we can't get all cases right, we can at least detect wh
en the cell has a specified | 2686 // While we can't get all cases right, we can at least detect wh
en the cell has a specified |
2685 // height or when the table has a specified height. In these cas
es we want to initially have | 2687 // height or when the table has a specified height. In these cas
es we want to initially have |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4643 return 0; | 4645 return 0; |
4644 | 4646 |
4645 if (!layoutState && !flowThreadContainingBlock()) | 4647 if (!layoutState && !flowThreadContainingBlock()) |
4646 return 0; | 4648 return 0; |
4647 | 4649 |
4648 RenderBlock* containerBlock = containingBlock(); | 4650 RenderBlock* containerBlock = containingBlock(); |
4649 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4651 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4650 } | 4652 } |
4651 | 4653 |
4652 } // namespace WebCore | 4654 } // namespace WebCore |
OLD | NEW |