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 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2677 cb->computeLogicalHeight(cb->logicalHeight(), 0, computedValues); | 2677 cb->computeLogicalHeight(cb->logicalHeight(), 0, computedValues); |
2678 availableHeight = computedValues.m_extent - cb->borderAndPaddingLogicalH
eight() - cb->scrollbarLogicalHeight(); | 2678 availableHeight = computedValues.m_extent - cb->borderAndPaddingLogicalH
eight() - cb->scrollbarLogicalHeight(); |
2679 } else if (cb->isRenderView()) | 2679 } else if (cb->isRenderView()) |
2680 availableHeight = view()->viewLogicalHeightForPercentages(); | 2680 availableHeight = view()->viewLogicalHeightForPercentages(); |
2681 | 2681 |
2682 if (availableHeight == -1) | 2682 if (availableHeight == -1) |
2683 return availableHeight; | 2683 return availableHeight; |
2684 | 2684 |
2685 availableHeight -= rootMarginBorderPaddingHeight; | 2685 availableHeight -= rootMarginBorderPaddingHeight; |
2686 | 2686 |
| 2687 if (isTable() && isOutOfFlowPositioned()) |
| 2688 availableHeight += cb->paddingLogicalHeight(); |
| 2689 |
2687 LayoutUnit result = valueForLength(height, availableHeight); | 2690 LayoutUnit result = valueForLength(height, availableHeight); |
2688 if (includeBorderPadding) { | 2691 if (includeBorderPadding) { |
2689 // FIXME: Table cells should default to box-sizing: border-box so we can
avoid this hack. | 2692 // FIXME: Table cells should default to box-sizing: border-box so we can
avoid this hack. |
2690 // It is necessary to use the border-box to match WinIE's broken | 2693 // It is necessary to use the border-box to match WinIE's broken |
2691 // box model. This is essential for sizing inside | 2694 // box model. This is essential for sizing inside |
2692 // table cells using percentage heights. | 2695 // table cells using percentage heights. |
2693 result -= borderAndPaddingLogicalHeight(); | 2696 result -= borderAndPaddingLogicalHeight(); |
2694 return std::max<LayoutUnit>(0, result); | 2697 return std::max<LayoutUnit>(0, result); |
2695 } | 2698 } |
2696 return result; | 2699 return result; |
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4674 return 0; | 4677 return 0; |
4675 | 4678 |
4676 if (!layoutState && !flowThreadContainingBlock()) | 4679 if (!layoutState && !flowThreadContainingBlock()) |
4677 return 0; | 4680 return 0; |
4678 | 4681 |
4679 RenderBlock* containerBlock = containingBlock(); | 4682 RenderBlock* containerBlock = containingBlock(); |
4680 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4683 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4681 } | 4684 } |
4682 | 4685 |
4683 } // namespace WebCore | 4686 } // namespace WebCore |
OLD | NEW |