OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * Copyright (C) 2015 Google Inc. All rights reserved. | 7 * Copyright (C) 2015 Google Inc. 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 Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1601 return cssValuePool().createValue(style.direction()); | 1601 return cssValuePool().createValue(style.direction()); |
1602 case CSSPropertyDisplay: | 1602 case CSSPropertyDisplay: |
1603 return cssValuePool().createValue(style.display()); | 1603 return cssValuePool().createValue(style.display()); |
1604 case CSSPropertyEmptyCells: | 1604 case CSSPropertyEmptyCells: |
1605 return cssValuePool().createValue(style.emptyCells()); | 1605 return cssValuePool().createValue(style.emptyCells()); |
1606 case CSSPropertyAlignContent: | 1606 case CSSPropertyAlignContent: |
1607 return valueForContentPositionAndDistributionWithOverflowAlignment(resol veAlignContentAuto(style)); | 1607 return valueForContentPositionAndDistributionWithOverflowAlignment(resol veAlignContentAuto(style)); |
1608 case CSSPropertyAlignItems: | 1608 case CSSPropertyAlignItems: |
1609 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st yle.alignItemsPosition(), &style), style.alignItemsOverflowAlignment(), NonLegac yPosition); | 1609 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st yle.alignItemsPosition(), &style), style.alignItemsOverflowAlignment(), NonLegac yPosition); |
1610 case CSSPropertyAlignSelf: { | 1610 case CSSPropertyAlignSelf: { |
1611 Node* parent = styledNode->parentNode(); | 1611 ItemPosition position = style.alignSelfPosition(); |
1612 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st yle.alignSelfPosition(), parent ? parent->ensureComputedStyle() : nullptr), styl e.alignSelfOverflowAlignment(), NonLegacyPosition); | 1612 if (position == ItemPositionAuto) { |
1613 const ComputedStyle* parentStyle = styledNode->parentNode() ? styled Node->parentNode()->ensureComputedStyle() : nullptr; | |
esprehn
2016/01/29 04:20:55
You need to use LayoutTreeBuilderTraversal::parent
| |
1614 position = parentStyle ? ComputedStyle::resolveAlignment(*parentStyl e, style, resolveAlignmentAuto(parentStyle->alignItemsPosition(), parentStyle)) : ItemPositionStart; | |
1615 } | |
1616 return valueForItemPositionWithOverflowAlignment(position, style.alignSe lfOverflowAlignment(), NonLegacyPosition); | |
1613 } | 1617 } |
1614 case CSSPropertyFlex: | 1618 case CSSPropertyFlex: |
1615 return valuesForShorthandProperty(flexShorthand(), style, layoutObject, styledNode, allowVisitedStyle); | 1619 return valuesForShorthandProperty(flexShorthand(), style, layoutObject, styledNode, allowVisitedStyle); |
1616 case CSSPropertyFlexBasis: | 1620 case CSSPropertyFlexBasis: |
1617 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); | 1621 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); |
1618 case CSSPropertyFlexDirection: | 1622 case CSSPropertyFlexDirection: |
1619 return cssValuePool().createValue(style.flexDirection()); | 1623 return cssValuePool().createValue(style.flexDirection()); |
1620 case CSSPropertyFlexFlow: | 1624 case CSSPropertyFlexFlow: |
1621 return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObje ct, styledNode, allowVisitedStyle); | 1625 return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObje ct, styledNode, allowVisitedStyle); |
1622 case CSSPropertyFlexGrow: | 1626 case CSSPropertyFlexGrow: |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2734 case CSSPropertyAll: | 2738 case CSSPropertyAll: |
2735 return nullptr; | 2739 return nullptr; |
2736 default: | 2740 default: |
2737 break; | 2741 break; |
2738 } | 2742 } |
2739 ASSERT_NOT_REACHED(); | 2743 ASSERT_NOT_REACHED(); |
2740 return nullptr; | 2744 return nullptr; |
2741 } | 2745 } |
2742 | 2746 |
2743 } | 2747 } |
OLD | NEW |