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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 2721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2732 parentStyle) | 2732 parentStyle) |
2733 .position() == ItemPositionStretch; | 2733 .position() == ItemPositionStretch; |
2734 return style | 2734 return style |
2735 .resolvedJustifySelf(cb->selfAlignmentNormalBehavior(), | 2735 .resolvedJustifySelf(cb->selfAlignmentNormalBehavior(), |
2736 parentStyle) | 2736 parentStyle) |
2737 .position() == ItemPositionStretch; | 2737 .position() == ItemPositionStretch; |
2738 } | 2738 } |
2739 | 2739 |
2740 bool LayoutBox::sizesLogicalWidthToFitContent( | 2740 bool LayoutBox::sizesLogicalWidthToFitContent( |
2741 const Length& logicalWidth) const { | 2741 const Length& logicalWidth) const { |
2742 if (isFloating() || isInlineBlockOrInlineTable()) | 2742 if (isFloating() || isInlineBlockOrInlineTable() || |
| 2743 styleRef().hasOutOfFlowPosition()) |
2743 return true; | 2744 return true; |
2744 | 2745 |
2745 if (isGridItem()) | 2746 if (isGridItem()) |
2746 return !hasStretchedLogicalWidth(); | 2747 return !hasStretchedLogicalWidth(); |
2747 | 2748 |
2748 // Flexible box items should shrink wrap, so we lay them out at their | 2749 // Flexible box items should shrink wrap, so we lay them out at their |
2749 // intrinsic widths. In the case of columns that have a stretch alignment, we | 2750 // intrinsic widths. In the case of columns that have a stretch alignment, we |
2750 // go ahead and layout at the stretched size to avoid an extra layout when | 2751 // go ahead and layout at the stretched size to avoid an extra layout when |
2751 // applying alignment. | 2752 // applying alignment. |
2752 if (parent()->isFlexibleBox()) { | 2753 if (parent()->isFlexibleBox()) { |
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5694 block->adjustChildDebugRect(rect); | 5695 block->adjustChildDebugRect(rect); |
5695 | 5696 |
5696 return rect; | 5697 return rect; |
5697 } | 5698 } |
5698 | 5699 |
5699 bool LayoutBox::shouldClipOverflow() const { | 5700 bool LayoutBox::shouldClipOverflow() const { |
5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); | 5701 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); |
5701 } | 5702 } |
5702 | 5703 |
5703 } // namespace blink | 5704 } // namespace blink |
OLD | NEW |