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 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2832 LayoutUnit rootMarginBorderPaddingHeight; | 2832 LayoutUnit rootMarginBorderPaddingHeight; |
2833 while (!cb->isLayoutView() && skipContainingBlockForPercentHeightCalculation
(cb)) { | 2833 while (!cb->isLayoutView() && skipContainingBlockForPercentHeightCalculation
(cb)) { |
2834 if (cb->isBody() || cb->isDocumentElement()) | 2834 if (cb->isBody() || cb->isDocumentElement()) |
2835 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfte
r() + cb->borderAndPaddingLogicalHeight(); | 2835 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfte
r() + cb->borderAndPaddingLogicalHeight(); |
2836 skippedAutoHeightContainingBlock = true; | 2836 skippedAutoHeightContainingBlock = true; |
2837 containingBlockChild = cb; | 2837 containingBlockChild = cb; |
2838 cb = cb->containingBlock(); | 2838 cb = cb->containingBlock(); |
2839 } | 2839 } |
2840 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(this)); | 2840 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(this)); |
2841 | 2841 |
2842 LayoutUnit availableHeight; | 2842 LayoutUnit availableHeight(-1); |
2843 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) { | 2843 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) { |
2844 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo
ntent(); | 2844 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo
ntent(); |
2845 } else if (hasOverrideContainingBlockLogicalHeight()) { | 2845 } else if (hasOverrideContainingBlockLogicalHeight()) { |
2846 availableHeight = overrideContainingBlockContentLogicalHeight(); | 2846 availableHeight = overrideContainingBlockContentLogicalHeight(); |
2847 } else if (cb->isTableCell()) { | 2847 } else if (cb->isTableCell()) { |
2848 if (!skippedAutoHeightContainingBlock) { | 2848 if (!skippedAutoHeightContainingBlock) { |
2849 // Table cells violate what the CSS spec says to do with heights. Ba
sically we | 2849 // Table cells violate what the CSS spec says to do with heights. Ba
sically we |
2850 // don't care if the cell specified a height or not. We just always
make ourselves | 2850 // don't care if the cell specified a height or not. We just always
make ourselves |
2851 // be a percentage of the cell's current content height. | 2851 // be a percentage of the cell's current content height. |
2852 if (!cb->hasOverrideLogicalContentHeight()) { | 2852 if (!cb->hasOverrideLogicalContentHeight()) { |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4874 LayoutRect rect = frameRect(); | 4874 LayoutRect rect = frameRect(); |
4875 | 4875 |
4876 LayoutBlock* block = containingBlock(); | 4876 LayoutBlock* block = containingBlock(); |
4877 if (block) | 4877 if (block) |
4878 block->adjustChildDebugRect(rect); | 4878 block->adjustChildDebugRect(rect); |
4879 | 4879 |
4880 return rect; | 4880 return rect; |
4881 } | 4881 } |
4882 | 4882 |
4883 } // namespace blink | 4883 } // namespace blink |
OLD | NEW |