| 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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2128 } | 2128 } |
| 2129 | 2129 |
| 2130 static bool columnFlexItemHasStretchAlignment(const LayoutObject* flexitem) | 2130 static bool columnFlexItemHasStretchAlignment(const LayoutObject* flexitem) |
| 2131 { | 2131 { |
| 2132 LayoutObject* parent = flexitem->parent(); | 2132 LayoutObject* parent = flexitem->parent(); |
| 2133 // auto margins mean we don't stretch. Note that this function will only be
used for | 2133 // auto margins mean we don't stretch. Note that this function will only be
used for |
| 2134 // widths, so we don't have to check marginBefore/marginAfter. | 2134 // widths, so we don't have to check marginBefore/marginAfter. |
| 2135 ASSERT(parent->style()->isColumnFlexDirection()); | 2135 ASSERT(parent->style()->isColumnFlexDirection()); |
| 2136 if (flexitem->style()->marginStart().isAuto() || flexitem->style()->marginEn
d().isAuto()) | 2136 if (flexitem->style()->marginStart().isAuto() || flexitem->style()->marginEn
d().isAuto()) |
| 2137 return false; | 2137 return false; |
| 2138 return flexitem->style()->alignSelf() == ItemPositionStretch || (flexitem->s
tyle()->alignSelf() == ItemPositionAuto && parent->style()->alignItems() == Item
PositionStretch); | 2138 return flexitem->style()->alignSelfPosition() == ItemPositionStretch || (fle
xitem->style()->alignSelfPosition() == ItemPositionAuto && parent->style()->alig
nItemsPosition() == ItemPositionStretch); |
| 2139 } | 2139 } |
| 2140 | 2140 |
| 2141 static bool isStretchingColumnFlexItem(const LayoutObject* flexitem) | 2141 static bool isStretchingColumnFlexItem(const LayoutObject* flexitem) |
| 2142 { | 2142 { |
| 2143 LayoutObject* parent = flexitem->parent(); | 2143 LayoutObject* parent = flexitem->parent(); |
| 2144 if (parent->isDeprecatedFlexibleBox() && parent->style()->boxOrient() == VER
TICAL && parent->style()->boxAlign() == BSTRETCH) | 2144 if (parent->isDeprecatedFlexibleBox() && parent->style()->boxOrient() == VER
TICAL && parent->style()->boxAlign() == BSTRETCH) |
| 2145 return true; | 2145 return true; |
| 2146 | 2146 |
| 2147 // We don't stretch multiline flexboxes because they need to apply line spac
ing (align-content) first. | 2147 // We don't stretch multiline flexboxes because they need to apply line spac
ing (align-content) first. |
| 2148 if (parent->isFlexibleBox() && parent->style()->flexWrap() == FlexNoWrap &&
parent->style()->isColumnFlexDirection() && columnFlexItemHasStretchAlignment(fl
exitem)) | 2148 if (parent->isFlexibleBox() && parent->style()->flexWrap() == FlexNoWrap &&
parent->style()->isColumnFlexDirection() && columnFlexItemHasStretchAlignment(fl
exitem)) |
| (...skipping 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4703 computedValues.m_margins.m_end = marginEnd(); | 4703 computedValues.m_margins.m_end = marginEnd(); |
| 4704 | 4704 |
| 4705 setLogicalTop(oldLogicalTop); | 4705 setLogicalTop(oldLogicalTop); |
| 4706 setLogicalWidth(oldLogicalWidth); | 4706 setLogicalWidth(oldLogicalWidth); |
| 4707 setLogicalLeft(oldLogicalLeft); | 4707 setLogicalLeft(oldLogicalLeft); |
| 4708 setMarginLeft(oldMarginLeft); | 4708 setMarginLeft(oldMarginLeft); |
| 4709 setMarginRight(oldMarginRight); | 4709 setMarginRight(oldMarginRight); |
| 4710 } | 4710 } |
| 4711 | 4711 |
| 4712 } // namespace blink | 4712 } // namespace blink |
| OLD | NEW |