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 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 CSSPropertyPaddingBottom, | 152 CSSPropertyPaddingBottom, |
153 CSSPropertyPaddingLeft, | 153 CSSPropertyPaddingLeft, |
154 CSSPropertyPaddingRight, | 154 CSSPropertyPaddingRight, |
155 CSSPropertyPaddingTop, | 155 CSSPropertyPaddingTop, |
156 CSSPropertyPageBreakAfter, | 156 CSSPropertyPageBreakAfter, |
157 CSSPropertyPageBreakBefore, | 157 CSSPropertyPageBreakBefore, |
158 CSSPropertyPageBreakInside, | 158 CSSPropertyPageBreakInside, |
159 CSSPropertyPointerEvents, | 159 CSSPropertyPointerEvents, |
160 CSSPropertyPosition, | 160 CSSPropertyPosition, |
161 CSSPropertyRight, | 161 CSSPropertyRight, |
162 CSSPropertyScrollBehavior, | |
163 CSSPropertySpeak, | 162 CSSPropertySpeak, |
164 CSSPropertyTableLayout, | 163 CSSPropertyTableLayout, |
165 CSSPropertyTabSize, | 164 CSSPropertyTabSize, |
166 CSSPropertyTextAlign, | 165 CSSPropertyTextAlign, |
167 CSSPropertyTextAlignLast, | 166 CSSPropertyTextAlignLast, |
168 CSSPropertyTextDecoration, | 167 CSSPropertyTextDecoration, |
169 CSSPropertyTextDecorationLine, | 168 CSSPropertyTextDecorationLine, |
170 CSSPropertyTextDecorationStyle, | 169 CSSPropertyTextDecorationStyle, |
171 CSSPropertyTextDecorationColor, | 170 CSSPropertyTextDecorationColor, |
172 CSSPropertyTextJustify, | 171 CSSPropertyTextJustify, |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 case Timing::PlaybackDirectionReverse: | 861 case Timing::PlaybackDirectionReverse: |
863 return cssValuePool().createIdentifierValue(CSSValueReverse); | 862 return cssValuePool().createIdentifierValue(CSSValueReverse); |
864 case Timing::PlaybackDirectionAlternateReverse: | 863 case Timing::PlaybackDirectionAlternateReverse: |
865 return cssValuePool().createIdentifierValue(CSSValueAlternateReverse); | 864 return cssValuePool().createIdentifierValue(CSSValueAlternateReverse); |
866 default: | 865 default: |
867 ASSERT_NOT_REACHED(); | 866 ASSERT_NOT_REACHED(); |
868 return nullptr; | 867 return nullptr; |
869 } | 868 } |
870 } | 869 } |
871 | 870 |
872 static PassRefPtr<CSSValue> valueForWillChange(const Vector<CSSPropertyID>& will
ChangeProperties, bool willChangeContents, bool willChangeScrollPosition) | 871 static PassRefPtr<CSSValue> valueForWillChange(const Vector<CSSPropertyID>& will
ChangeProperties, bool willChangeContents) |
873 { | 872 { |
874 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); | 873 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); |
875 if (willChangeContents) | 874 if (willChangeContents) |
876 list->append(cssValuePool().createIdentifierValue(CSSValueContents)); | 875 list->append(cssValuePool().createIdentifierValue(CSSValueContents)); |
877 if (willChangeScrollPosition) | |
878 list->append(cssValuePool().createIdentifierValue(CSSValueScrollPosition
)); | |
879 for (size_t i = 0; i < willChangeProperties.size(); ++i) | 876 for (size_t i = 0; i < willChangeProperties.size(); ++i) |
880 list->append(cssValuePool().createIdentifierValue(willChangeProperties[i
])); | 877 list->append(cssValuePool().createIdentifierValue(willChangeProperties[i
])); |
881 if (!list->length()) | 878 if (!list->length()) |
882 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); | 879 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); |
883 return list.release(); | 880 return list.release(); |
884 } | 881 } |
885 | 882 |
886 static PassRefPtr<CSSValue> createLineBoxContainValue(unsigned lineBoxContain) | 883 static PassRefPtr<CSSValue> createLineBoxContainValue(unsigned lineBoxContain) |
887 { | 884 { |
888 if (!lineBoxContain) | 885 if (!lineBoxContain) |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 EPageBreak pageBreak = style->pageBreakInside(); | 1677 EPageBreak pageBreak = style->pageBreakInside(); |
1681 ASSERT(pageBreak != PBALWAYS); | 1678 ASSERT(pageBreak != PBALWAYS); |
1682 if (pageBreak == PBALWAYS) | 1679 if (pageBreak == PBALWAYS) |
1683 return nullptr; | 1680 return nullptr; |
1684 return cssValuePool().createValue(style->pageBreakInside()); | 1681 return cssValuePool().createValue(style->pageBreakInside()); |
1685 } | 1682 } |
1686 case CSSPropertyPosition: | 1683 case CSSPropertyPosition: |
1687 return cssValuePool().createValue(style->position()); | 1684 return cssValuePool().createValue(style->position()); |
1688 case CSSPropertyRight: | 1685 case CSSPropertyRight: |
1689 return valueForPositionOffset(*style, CSSPropertyRight, renderer); | 1686 return valueForPositionOffset(*style, CSSPropertyRight, renderer); |
1690 case CSSPropertyScrollBehavior: | |
1691 return cssValuePool().createValue(style->scrollBehavior()); | |
1692 case CSSPropertyTableLayout: | 1687 case CSSPropertyTableLayout: |
1693 return cssValuePool().createValue(style->tableLayout()); | 1688 return cssValuePool().createValue(style->tableLayout()); |
1694 case CSSPropertyTextAlign: | 1689 case CSSPropertyTextAlign: |
1695 return cssValuePool().createValue(style->textAlign()); | 1690 return cssValuePool().createValue(style->textAlign()); |
1696 case CSSPropertyTextAlignLast: | 1691 case CSSPropertyTextAlignLast: |
1697 return cssValuePool().createValue(style->textAlignLast()); | 1692 return cssValuePool().createValue(style->textAlignLast()); |
1698 case CSSPropertyTextDecoration: | 1693 case CSSPropertyTextDecoration: |
1699 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) | 1694 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) |
1700 return valuesForShorthandProperty(textDecorationShorthand()); | 1695 return valuesForShorthandProperty(textDecorationShorthand()); |
1701 // Fall through. | 1696 // Fall through. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1808 case CSSPropertyWidth: | 1803 case CSSPropertyWidth: |
1809 if (renderer) { | 1804 if (renderer) { |
1810 // According to http://www.w3.org/TR/CSS2/visudet.html#the-width
-property, | 1805 // According to http://www.w3.org/TR/CSS2/visudet.html#the-width
-property, |
1811 // the "width" property does not apply for non-replaced inline e
lements. | 1806 // the "width" property does not apply for non-replaced inline e
lements. |
1812 if (!renderer->isReplaced() && renderer->isInline()) | 1807 if (!renderer->isReplaced() && renderer->isInline()) |
1813 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1808 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1814 return pixelValue(sizingBox(renderer).width(), *style); | 1809 return pixelValue(sizingBox(renderer).width(), *style); |
1815 } | 1810 } |
1816 return pixelValueForLength(style->width(), *style); | 1811 return pixelValueForLength(style->width(), *style); |
1817 case CSSPropertyWillChange: | 1812 case CSSPropertyWillChange: |
1818 return valueForWillChange(style->willChangeProperties(), style->will
ChangeContents(), style->willChangeScrollPosition()); | 1813 return valueForWillChange(style->willChangeProperties(), style->will
ChangeContents()); |
1819 case CSSPropertyWordBreak: | 1814 case CSSPropertyWordBreak: |
1820 return cssValuePool().createValue(style->wordBreak()); | 1815 return cssValuePool().createValue(style->wordBreak()); |
1821 case CSSPropertyWordSpacing: | 1816 case CSSPropertyWordSpacing: |
1822 return pixelValue(style->wordSpacing(), *style); | 1817 return pixelValue(style->wordSpacing(), *style); |
1823 case CSSPropertyWordWrap: | 1818 case CSSPropertyWordWrap: |
1824 return cssValuePool().createValue(style->overflowWrap()); | 1819 return cssValuePool().createValue(style->overflowWrap()); |
1825 case CSSPropertyWebkitLineBreak: | 1820 case CSSPropertyWebkitLineBreak: |
1826 return cssValuePool().createValue(style->lineBreak()); | 1821 return cssValuePool().createValue(style->lineBreak()); |
1827 case CSSPropertyFontKerning: | 1822 case CSSPropertyFontKerning: |
1828 return cssValuePool().createValue(style->fontDescription().kerning()
); | 1823 return cssValuePool().createValue(style->fontDescription().kerning()
); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2386 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 2381 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
2387 CSSPropertyB
ackgroundClip }; | 2382 CSSPropertyB
ackgroundClip }; |
2388 | 2383 |
2389 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 2384 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
2390 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 2385 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
2391 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 2386 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
2392 return list.release(); | 2387 return list.release(); |
2393 } | 2388 } |
2394 | 2389 |
2395 } // namespace blink | 2390 } // namespace blink |
OLD | NEW |