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 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 } | 1506 } |
1507 return value.release(); | 1507 return value.release(); |
1508 } | 1508 } |
1509 case CSSPropertyDirection: | 1509 case CSSPropertyDirection: |
1510 return cssValuePool().createValue(style.direction()); | 1510 return cssValuePool().createValue(style.direction()); |
1511 case CSSPropertyDisplay: | 1511 case CSSPropertyDisplay: |
1512 return cssValuePool().createValue(style.display()); | 1512 return cssValuePool().createValue(style.display()); |
1513 case CSSPropertyEmptyCells: | 1513 case CSSPropertyEmptyCells: |
1514 return cssValuePool().createValue(style.emptyCells()); | 1514 return cssValuePool().createValue(style.emptyCells()); |
1515 case CSSPropertyAlignContent: | 1515 case CSSPropertyAlignContent: |
1516 return valueForContentPositionAndDistributionWithOverflowAlignment(resol
veContentAlignmentAuto(style.alignContent(), style.alignContentDistribution(), s
tyledNode), style.alignContentOverflowAlignment(), style.alignContentDistributio
n()); | 1516 return valueForContentPositionAndDistributionWithOverflowAlignment(resol
veContentAlignmentAuto(style.alignContentPosition(), style.alignContentDistribut
ion(), styledNode), style.alignContentOverflowAlignment(), style.alignContentDis
tribution()); |
1517 case CSSPropertyAlignItems: | 1517 case CSSPropertyAlignItems: |
1518 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.alignItems(), styledNode), style.alignItemsOverflowAlignment(), NonLegacyPos
ition); | 1518 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.alignItemsPosition(), styledNode), style.alignItemsOverflowAlignment(), NonL
egacyPosition); |
1519 case CSSPropertyAlignSelf: | 1519 case CSSPropertyAlignSelf: |
1520 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.alignSelf(), styledNode->parentNode()), style.alignSelfOverflowAlignment(),
NonLegacyPosition); | 1520 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.alignSelfPosition(), styledNode->parentNode()), style.alignSelfOverflowAlign
ment(), NonLegacyPosition); |
1521 case CSSPropertyFlex: | 1521 case CSSPropertyFlex: |
1522 return valuesForShorthandProperty(flexShorthand(), style, renderer, styl
edNode, allowVisitedStyle); | 1522 return valuesForShorthandProperty(flexShorthand(), style, renderer, styl
edNode, allowVisitedStyle); |
1523 case CSSPropertyFlexBasis: | 1523 case CSSPropertyFlexBasis: |
1524 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); | 1524 return zoomAdjustedPixelValueForLength(style.flexBasis(), style); |
1525 case CSSPropertyFlexDirection: | 1525 case CSSPropertyFlexDirection: |
1526 return cssValuePool().createValue(style.flexDirection()); | 1526 return cssValuePool().createValue(style.flexDirection()); |
1527 case CSSPropertyFlexFlow: | 1527 case CSSPropertyFlexFlow: |
1528 return valuesForShorthandProperty(flexFlowShorthand(), style, renderer,
styledNode, allowVisitedStyle); | 1528 return valuesForShorthandProperty(flexFlowShorthand(), style, renderer,
styledNode, allowVisitedStyle); |
1529 case CSSPropertyFlexGrow: | 1529 case CSSPropertyFlexGrow: |
1530 return cssValuePool().createValue(style.flexGrow()); | 1530 return cssValuePool().createValue(style.flexGrow()); |
1531 case CSSPropertyFlexShrink: | 1531 case CSSPropertyFlexShrink: |
1532 return cssValuePool().createValue(style.flexShrink()); | 1532 return cssValuePool().createValue(style.flexShrink()); |
1533 case CSSPropertyFlexWrap: | 1533 case CSSPropertyFlexWrap: |
1534 return cssValuePool().createValue(style.flexWrap()); | 1534 return cssValuePool().createValue(style.flexWrap()); |
1535 case CSSPropertyJustifyContent: | 1535 case CSSPropertyJustifyContent: |
1536 return valueForContentPositionAndDistributionWithOverflowAlignment(resol
veContentAlignmentAuto(style.justifyContent(), style.justifyContentDistribution(
), styledNode), style.justifyContentOverflowAlignment(), style.justifyContentDis
tribution()); | 1536 return valueForContentPositionAndDistributionWithOverflowAlignment(resol
veContentAlignmentAuto(style.justifyContentPosition(), style.justifyContentDistr
ibution(), styledNode), style.justifyContentOverflowAlignment(), style.justifyCo
ntentDistribution()); |
1537 case CSSPropertyOrder: | 1537 case CSSPropertyOrder: |
1538 return cssValuePool().createValue(style.order(), CSSPrimitiveValue::CSS_
NUMBER); | 1538 return cssValuePool().createValue(style.order(), CSSPrimitiveValue::CSS_
NUMBER); |
1539 case CSSPropertyFloat: | 1539 case CSSPropertyFloat: |
1540 if (style.display() != NONE && style.hasOutOfFlowPosition()) | 1540 if (style.display() != NONE && style.hasOutOfFlowPosition()) |
1541 return cssValuePool().createIdentifierValue(CSSValueNone); | 1541 return cssValuePool().createIdentifierValue(CSSValueNone); |
1542 return cssValuePool().createValue(style.floating()); | 1542 return cssValuePool().createValue(style.floating()); |
1543 case CSSPropertyFont: { | 1543 case CSSPropertyFont: { |
1544 RefPtrWillBeRawPtr<CSSFontValue> computedFont = CSSFontValue::create(); | 1544 RefPtrWillBeRawPtr<CSSFontValue> computedFont = CSSFontValue::create(); |
1545 computedFont->style = valueForFontStyle(style); | 1545 computedFont->style = valueForFontStyle(style); |
1546 computedFont->variant = valueForFontVariant(style); | 1546 computedFont->variant = valueForFontVariant(style); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 return cssValuePool().createValue(style.highlight(), CSSPrimitiveValue::
CSS_STRING); | 1662 return cssValuePool().createValue(style.highlight(), CSSPrimitiveValue::
CSS_STRING); |
1663 case CSSPropertyWebkitHyphenateCharacter: | 1663 case CSSPropertyWebkitHyphenateCharacter: |
1664 if (style.hyphenationString().isNull()) | 1664 if (style.hyphenationString().isNull()) |
1665 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1665 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1666 return cssValuePool().createValue(style.hyphenationString(), CSSPrimitiv
eValue::CSS_STRING); | 1666 return cssValuePool().createValue(style.hyphenationString(), CSSPrimitiv
eValue::CSS_STRING); |
1667 case CSSPropertyImageRendering: | 1667 case CSSPropertyImageRendering: |
1668 return CSSPrimitiveValue::create(style.imageRendering()); | 1668 return CSSPrimitiveValue::create(style.imageRendering()); |
1669 case CSSPropertyIsolation: | 1669 case CSSPropertyIsolation: |
1670 return cssValuePool().createValue(style.isolation()); | 1670 return cssValuePool().createValue(style.isolation()); |
1671 case CSSPropertyJustifyItems: | 1671 case CSSPropertyJustifyItems: |
1672 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.justifyItems(), styledNode), style.justifyItemsOverflowAlignment(), style.ju
stifyItemsPositionType()); | 1672 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.justifyItemsPosition(), styledNode), style.justifyItemsOverflowAlignment(),
style.justifyItemsPositionType()); |
1673 case CSSPropertyJustifySelf: | 1673 case CSSPropertyJustifySelf: |
1674 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.justifySelf(), styledNode->parentNode()), style.justifySelfOverflowAlignment
(), NonLegacyPosition); | 1674 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.justifySelfPosition(), styledNode->parentNode()), style.justifySelfOverflowA
lignment(), NonLegacyPosition); |
1675 case CSSPropertyLeft: | 1675 case CSSPropertyLeft: |
1676 return valueForPositionOffset(style, CSSPropertyLeft, renderer); | 1676 return valueForPositionOffset(style, CSSPropertyLeft, renderer); |
1677 case CSSPropertyLetterSpacing: | 1677 case CSSPropertyLetterSpacing: |
1678 if (!style.letterSpacing()) | 1678 if (!style.letterSpacing()) |
1679 return cssValuePool().createIdentifierValue(CSSValueNormal); | 1679 return cssValuePool().createIdentifierValue(CSSValueNormal); |
1680 return zoomAdjustedPixelValue(style.letterSpacing(), style); | 1680 return zoomAdjustedPixelValue(style.letterSpacing(), style); |
1681 case CSSPropertyWebkitLineClamp: | 1681 case CSSPropertyWebkitLineClamp: |
1682 if (style.lineClamp().isNone()) | 1682 if (style.lineClamp().isNone()) |
1683 return cssValuePool().createIdentifierValue(CSSValueNone); | 1683 return cssValuePool().createIdentifierValue(CSSValueNone); |
1684 return cssValuePool().createValue(style.lineClamp().value(), style.lineC
lamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveValue::C
SS_NUMBER); | 1684 return cssValuePool().createValue(style.lineClamp().value(), style.lineC
lamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveValue::C
SS_NUMBER); |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2543 case CSSPropertyAll: | 2543 case CSSPropertyAll: |
2544 return nullptr; | 2544 return nullptr; |
2545 default: | 2545 default: |
2546 break; | 2546 break; |
2547 } | 2547 } |
2548 ASSERT_NOT_REACHED(); | 2548 ASSERT_NOT_REACHED(); |
2549 return nullptr; | 2549 return nullptr; |
2550 } | 2550 } |
2551 | 2551 |
2552 } | 2552 } |
OLD | NEW |