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 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3009 } | 3009 } |
3010 | 3010 |
3011 // FIXME: availableLogicalHeight() is wrong if the replaced element's wr iting-mode is perpendicular to the | 3011 // FIXME: availableLogicalHeight() is wrong if the replaced element's wr iting-mode is perpendicular to the |
3012 // containing block's writing-mode. | 3012 // containing block's writing-mode. |
3013 // https://bugs.webkit.org/show_bug.cgi?id=46496 | 3013 // https://bugs.webkit.org/show_bug.cgi?id=46496 |
3014 LayoutUnit availableHeight; | 3014 LayoutUnit availableHeight; |
3015 if (isOutOfFlowPositioned()) { | 3015 if (isOutOfFlowPositioned()) { |
3016 availableHeight = containingBlockLogicalHeightForPositioned(toLayout BoxModelObject(cb)); | 3016 availableHeight = containingBlockLogicalHeightForPositioned(toLayout BoxModelObject(cb)); |
3017 } else if (stretchedHeight != -1) { | 3017 } else if (stretchedHeight != -1) { |
3018 availableHeight = stretchedHeight; | 3018 availableHeight = stretchedHeight; |
3019 } else if (isGridItem() && hasOverrideContainingBlockLogicalHeight()) { | 3019 } else if (hasOverrideContainingBlockLogicalHeight()) { |
jfernandez
2016/08/19 21:14:24
I think it's correct, from the layout logic point
Manuel Rego
2016/08/22 10:31:09
The isGridItem() was added in:
https://codereview.
| |
3020 availableHeight = overrideContainingBlockContentLogicalHeight(); | 3020 availableHeight = overrideContainingBlockContentLogicalHeight(); |
3021 } else { | 3021 } else { |
3022 availableHeight = containingBlockLogicalHeightForContent(IncludeMarg inBorderPadding); | 3022 availableHeight = containingBlockLogicalHeightForContent(IncludeMarg inBorderPadding); |
3023 // It is necessary to use the border-box to match WinIE's broken | 3023 // It is necessary to use the border-box to match WinIE's broken |
3024 // box model. This is essential for sizing inside | 3024 // box model. This is essential for sizing inside |
3025 // table cells using percentage heights. | 3025 // table cells using percentage heights. |
3026 // FIXME: This needs to be made writing-mode-aware. If the cell and image are perpendicular writing-modes, this isn't right. | 3026 // FIXME: This needs to be made writing-mode-aware. If the cell and image are perpendicular writing-modes, this isn't right. |
3027 // https://bugs.webkit.org/show_bug.cgi?id=46997 | 3027 // https://bugs.webkit.org/show_bug.cgi?id=46997 |
3028 while (cb && !cb->isLayoutView() && (cb->style()->logicalHeight().is Auto() || cb->style()->logicalHeight().hasPercent())) { | 3028 while (cb && !cb->isLayoutView() && (cb->style()->logicalHeight().is Auto() || cb->style()->logicalHeight().hasPercent())) { |
3029 if (cb->isTableCell()) { | 3029 if (cb->isTableCell()) { |
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4831 m_rareData->m_snapAreas->remove(&snapArea); | 4831 m_rareData->m_snapAreas->remove(&snapArea); |
4832 } | 4832 } |
4833 } | 4833 } |
4834 | 4834 |
4835 SnapAreaSet* LayoutBox::snapAreas() const | 4835 SnapAreaSet* LayoutBox::snapAreas() const |
4836 { | 4836 { |
4837 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4837 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4838 } | 4838 } |
4839 | 4839 |
4840 } // namespace blink | 4840 } // namespace blink |
OLD | NEW |