| 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 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2736 } else if (stretchedFlexHeight != LayoutUnit(-1)) { | 2736 } else if (stretchedFlexHeight != LayoutUnit(-1)) { |
| 2737 availableHeight = stretchedFlexHeight; | 2737 availableHeight = stretchedFlexHeight; |
| 2738 } else if (hasOverrideContainingBlockLogicalHeight() && !isOutOfFlowPosition
edWithSpecifiedHeight) { | 2738 } else if (hasOverrideContainingBlockLogicalHeight() && !isOutOfFlowPosition
edWithSpecifiedHeight) { |
| 2739 availableHeight = overrideContainingBlockContentLogicalHeight(); | 2739 availableHeight = overrideContainingBlockContentLogicalHeight(); |
| 2740 } else if (cb->isGridItem() && cb->hasOverrideLogicalContentHeight()) { | 2740 } else if (cb->isGridItem() && cb->hasOverrideLogicalContentHeight()) { |
| 2741 availableHeight = cb->overrideLogicalContentHeight(); | 2741 availableHeight = cb->overrideLogicalContentHeight(); |
| 2742 } else if (cbstyle.logicalHeight().isFixed()) { | 2742 } else if (cbstyle.logicalHeight().isFixed()) { |
| 2743 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz
ing(cbstyle.logicalHeight().value()); | 2743 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz
ing(cbstyle.logicalHeight().value()); |
| 2744 availableHeight = cb->constrainContentBoxLogicalHeightByMinMax( | 2744 availableHeight = cb->constrainContentBoxLogicalHeightByMinMax( |
| 2745 contentBoxHeight - cb->scrollbarLogicalHeight(), LayoutUnit(-1)).cla
mpNegativeToZero(); | 2745 contentBoxHeight - cb->scrollbarLogicalHeight(), LayoutUnit(-1)).cla
mpNegativeToZero(); |
| 2746 if (cb->isTableCell()) { | 2746 if (cb->isTableCell()) |
| 2747 includeBorderPadding = true; | 2747 includeBorderPadding = true; |
| 2748 // We're sizing content to the height from the cell's style so don't
involve the intrinsic padding used to align the content. | |
| 2749 availableHeight -= cb->computedCSSPaddingBefore() + cb->computedCSSP
addingAfter() + cb->borderBefore() + cb->borderAfter(); | |
| 2750 } | |
| 2751 } else if (cb->isTableCell()) { | 2748 } else if (cb->isTableCell()) { |
| 2752 if (!skippedAutoHeightContainingBlock) { | 2749 if (!skippedAutoHeightContainingBlock) { |
| 2753 // Table cells violate what the CSS spec says to do with heights. Ba
sically we | 2750 // Table cells violate what the CSS spec says to do with heights. Ba
sically we |
| 2754 // don't care if the cell specified a height or not. We just always
make ourselves | 2751 // don't care if the cell specified a height or not. We just always
make ourselves |
| 2755 // be a percentage of the cell's current content height. | 2752 // be a percentage of the cell's current content height. |
| 2756 if (!cb->hasOverrideLogicalContentHeight()) { | 2753 if (!cb->hasOverrideLogicalContentHeight()) { |
| 2757 // Normally we would let the cell size intrinsically, but scroll
ing overflow has to be | 2754 // Normally we would let the cell size intrinsically, but scroll
ing overflow has to be |
| 2758 // treated differently, since WinIE lets scrolled overflow regio
ns shrink as needed. | 2755 // treated differently, since WinIE lets scrolled overflow regio
ns shrink as needed. |
| 2759 // While we can't get all cases right, we can at least detect wh
en the cell has a specified | 2756 // While we can't get all cases right, we can at least detect wh
en the cell has a specified |
| 2760 // height or when the table has a specified height. In these cas
es we want to initially have | 2757 // height or when the table has a specified height. In these cas
es we want to initially have |
| (...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4928 m_rareData->m_snapAreas->remove(&snapArea); | 4925 m_rareData->m_snapAreas->remove(&snapArea); |
| 4929 } | 4926 } |
| 4930 } | 4927 } |
| 4931 | 4928 |
| 4932 SnapAreaSet* LayoutBox::snapAreas() const | 4929 SnapAreaSet* LayoutBox::snapAreas() const |
| 4933 { | 4930 { |
| 4934 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4931 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4935 } | 4932 } |
| 4936 | 4933 |
| 4937 } // namespace blink | 4934 } // namespace blink |
| OLD | NEW |