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 // TODO(lajava): This code doesn't work for ShadowDOM (see Node::par
entComputedStyle) |
| 1614 const ComputedStyle* parentStyle = styledNode->parentNode() ? styled
Node->parentNode()->ensureComputedStyle() : nullptr; |
| 1615 position = parentStyle ? ComputedStyle::resolveAlignment(*parentStyl
e, style, resolveAlignmentAuto(parentStyle->alignItemsPosition(), parentStyle))
: ItemPositionStart; |
| 1616 } |
| 1617 return valueForItemPositionWithOverflowAlignment(position, style.alignSe
lfOverflowAlignment(), NonLegacyPosition); |
1613 } | 1618 } |
1614 case CSSPropertyFlex: | 1619 case CSSPropertyFlex: |
1615 return valuesForShorthandProperty(flexShorthand(), style, layoutObject,
styledNode, allowVisitedStyle); | 1620 return valuesForShorthandProperty(flexShorthand(), style, layoutObject,
styledNode, allowVisitedStyle); |
1616 case CSSPropertyFlexBasis: | 1621 case CSSPropertyFlexBasis: |
1617 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); | 1622 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); |
1618 case CSSPropertyFlexDirection: | 1623 case CSSPropertyFlexDirection: |
1619 return cssValuePool().createValue(style.flexDirection()); | 1624 return cssValuePool().createValue(style.flexDirection()); |
1620 case CSSPropertyFlexFlow: | 1625 case CSSPropertyFlexFlow: |
1621 return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObje
ct, styledNode, allowVisitedStyle); | 1626 return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObje
ct, styledNode, allowVisitedStyle); |
1622 case CSSPropertyFlexGrow: | 1627 case CSSPropertyFlexGrow: |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2734 case CSSPropertyAll: | 2739 case CSSPropertyAll: |
2735 return nullptr; | 2740 return nullptr; |
2736 default: | 2741 default: |
2737 break; | 2742 break; |
2738 } | 2743 } |
2739 ASSERT_NOT_REACHED(); | 2744 ASSERT_NOT_REACHED(); |
2740 return nullptr; | 2745 return nullptr; |
2741 } | 2746 } |
2742 | 2747 |
2743 } | 2748 } |
OLD | NEW |