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 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2667 RenderStyle* cbstyle = cb->style(); | 2667 RenderStyle* cbstyle = cb->style(); |
2668 | 2668 |
2669 // A positioned element that specified both top/bottom or that specifies hei ght should be treated as though it has a height | 2669 // A positioned element that specified both top/bottom or that specifies hei ght should be treated as though it has a height |
2670 // explicitly specified that can be used for any percentage computations. | 2670 // explicitly specified that can be used for any percentage computations. |
2671 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned() && (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c bstyle->logicalBottom().isAuto())); | 2671 bool isOutOfFlowPositionedWithSpecifiedHeight = cb->isOutOfFlowPositioned() && (!cbstyle->logicalHeight().isAuto() || (!cbstyle->logicalTop().isAuto() && !c bstyle->logicalBottom().isAuto())); |
2672 | 2672 |
2673 bool includeBorderPadding = isTable(); | 2673 bool includeBorderPadding = isTable(); |
2674 | 2674 |
2675 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) | 2675 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) |
2676 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent(); | 2676 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent(); |
2677 else if (hasOverrideContainingBlockLogicalHeight()) | 2677 else if (cb->hasOverrideContainingBlockLogicalHeight()) |
2678 availableHeight = overrideContainingBlockContentLogicalHeight(); | 2678 availableHeight = cb->overrideContainingBlockContentLogicalHeight(); |
tony
2014/06/18 17:53:18
Why remove the previous check? Shouldn't this be
harpreet.sk
2014/06/19 12:22:38
You are right. I didn't have to remove this check.
| |
2679 else if (cb->isTableCell()) { | 2679 else if (cb->isTableCell()) { |
2680 if (!skippedAutoHeightContainingBlock) { | 2680 if (!skippedAutoHeightContainingBlock) { |
2681 // Table cells violate what the CSS spec says to do with heights. Ba sically we | 2681 // Table cells violate what the CSS spec says to do with heights. Ba sically we |
2682 // don't care if the cell specified a height or not. We just always make ourselves | 2682 // don't care if the cell specified a height or not. We just always make ourselves |
2683 // be a percentage of the cell's current content height. | 2683 // be a percentage of the cell's current content height. |
2684 if (!cb->hasOverrideHeight()) { | 2684 if (!cb->hasOverrideHeight()) { |
2685 // Normally we would let the cell size intrinsically, but scroll ing overflow has to be | 2685 // Normally we would let the cell size intrinsically, but scroll ing overflow has to be |
2686 // treated differently, since WinIE lets scrolled overflow regio ns shrink as needed. | 2686 // treated differently, since WinIE lets scrolled overflow regio ns shrink as needed. |
2687 // While we can't get all cases right, we can at least detect wh en the cell has a specified | 2687 // While we can't get all cases right, we can at least detect wh en the cell has a specified |
2688 // height or when the table has a specified height. In these cas es we want to initially have | 2688 // height or when the table has a specified height. In these cas es we want to initially have |
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4637 return 0; | 4637 return 0; |
4638 | 4638 |
4639 if (!layoutState && !flowThreadContainingBlock()) | 4639 if (!layoutState && !flowThreadContainingBlock()) |
4640 return 0; | 4640 return 0; |
4641 | 4641 |
4642 RenderBlock* containerBlock = containingBlock(); | 4642 RenderBlock* containerBlock = containingBlock(); |
4643 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4643 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4644 } | 4644 } |
4645 | 4645 |
4646 } // namespace WebCore | 4646 } // namespace WebCore |
OLD | NEW |