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 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2726 LayoutUnit stretchedFlexHeight(-1); | 2726 LayoutUnit stretchedFlexHeight(-1); |
2727 if (cb->isFlexItem()) | 2727 if (cb->isFlexItem()) |
2728 stretchedFlexHeight = toLayoutFlexibleBox(cb->parent())->childLogicalHei ghtForPercentageResolution(*cb); | 2728 stretchedFlexHeight = toLayoutFlexibleBox(cb->parent())->childLogicalHei ghtForPercentageResolution(*cb); |
2729 | 2729 |
2730 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) { | 2730 if (isHorizontalWritingMode() != cb->isHorizontalWritingMode()) { |
2731 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent(); | 2731 availableHeight = containingBlockChild->containingBlockLogicalWidthForCo ntent(); |
2732 } else if (stretchedFlexHeight != LayoutUnit(-1)) { | 2732 } else if (stretchedFlexHeight != LayoutUnit(-1)) { |
2733 availableHeight = stretchedFlexHeight; | 2733 availableHeight = stretchedFlexHeight; |
2734 } else if (hasOverrideContainingBlockLogicalHeight()) { | 2734 } else if (hasOverrideContainingBlockLogicalHeight()) { |
2735 availableHeight = overrideContainingBlockContentLogicalHeight(); | 2735 availableHeight = overrideContainingBlockContentLogicalHeight(); |
2736 } else if (cbstyle.logicalHeight().isAuto() && cb->hasOverrideContainingBloc kLogicalHeight()) { | |
cbiesinger1
2016/06/06 16:56:57
This does not seem correct in general. You are now
Manuel Rego
2016/06/06 19:24:09
overrideContainingBlockLogicalHeight is only used
| |
2737 availableHeight = cb->overrideContainingBlockContentLogicalHeight(); | |
2736 } else if (cbstyle.logicalHeight().isFixed()) { | 2738 } else if (cbstyle.logicalHeight().isFixed()) { |
2737 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz ing(cbstyle.logicalHeight().value()); | 2739 LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSiz ing(cbstyle.logicalHeight().value()); |
2738 availableHeight = cb->constrainContentBoxLogicalHeightByMinMax( | 2740 availableHeight = cb->constrainContentBoxLogicalHeightByMinMax( |
2739 contentBoxHeight - cb->scrollbarLogicalHeight(), LayoutUnit(-1)).cla mpNegativeToZero(); | 2741 contentBoxHeight - cb->scrollbarLogicalHeight(), LayoutUnit(-1)).cla mpNegativeToZero(); |
2740 if (cb->isTableCell()) { | 2742 if (cb->isTableCell()) { |
2741 includeBorderPadding = true; | 2743 includeBorderPadding = true; |
2742 // We're sizing content to the height from the cell's style so don't involve the intrinsic padding used to align the content. | 2744 // We're sizing content to the height from the cell's style so don't involve the intrinsic padding used to align the content. |
2743 availableHeight -= cb->computedCSSPaddingBefore() + cb->computedCSSP addingAfter() + cb->borderBefore() + cb->borderAfter(); | 2745 availableHeight -= cb->computedCSSPaddingBefore() + cb->computedCSSP addingAfter() + cb->borderBefore() + cb->borderAfter(); |
2744 } | 2746 } |
2745 } else if (cb->isTableCell()) { | 2747 } else if (cb->isTableCell()) { |
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4921 m_rareData->m_snapAreas->remove(&snapArea); | 4923 m_rareData->m_snapAreas->remove(&snapArea); |
4922 } | 4924 } |
4923 } | 4925 } |
4924 | 4926 |
4925 SnapAreaSet* LayoutBox::snapAreas() const | 4927 SnapAreaSet* LayoutBox::snapAreas() const |
4926 { | 4928 { |
4927 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4929 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4928 } | 4930 } |
4929 | 4931 |
4930 } // namespace blink | 4932 } // namespace blink |
OLD | NEW |