| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 CSSPropertyPageBreakInside, | 168 CSSPropertyPageBreakInside, |
| 169 CSSPropertyPointerEvents, | 169 CSSPropertyPointerEvents, |
| 170 CSSPropertyPosition, | 170 CSSPropertyPosition, |
| 171 CSSPropertyResize, | 171 CSSPropertyResize, |
| 172 CSSPropertyRight, | 172 CSSPropertyRight, |
| 173 CSSPropertySpeak, | 173 CSSPropertySpeak, |
| 174 CSSPropertyTableLayout, | 174 CSSPropertyTableLayout, |
| 175 CSSPropertyTabSize, | 175 CSSPropertyTabSize, |
| 176 CSSPropertyTextAlign, | 176 CSSPropertyTextAlign, |
| 177 CSSPropertyTextDecoration, | 177 CSSPropertyTextDecoration, |
| 178 CSSPropertyTextDecorationLine, |
| 179 CSSPropertyTextDecorationStyle, |
| 180 CSSPropertyTextDecorationColor, |
| 178 #if ENABLE(CSS3_TEXT) | 181 #if ENABLE(CSS3_TEXT) |
| 179 CSSPropertyWebkitTextDecorationLine, | |
| 180 CSSPropertyWebkitTextDecorationStyle, | |
| 181 CSSPropertyWebkitTextDecorationColor, | |
| 182 CSSPropertyWebkitTextAlignLast, | 182 CSSPropertyWebkitTextAlignLast, |
| 183 CSSPropertyWebkitTextUnderlinePosition, | 183 CSSPropertyWebkitTextUnderlinePosition, |
| 184 #endif // CSS3_TEXT | 184 #endif // CSS3_TEXT |
| 185 CSSPropertyTextIndent, | 185 CSSPropertyTextIndent, |
| 186 CSSPropertyTextRendering, | 186 CSSPropertyTextRendering, |
| 187 CSSPropertyTextShadow, | 187 CSSPropertyTextShadow, |
| 188 CSSPropertyTextOverflow, | 188 CSSPropertyTextOverflow, |
| 189 CSSPropertyTextTransform, | 189 CSSPropertyTextTransform, |
| 190 CSSPropertyTop, | 190 CSSPropertyTop, |
| 191 CSSPropertyTransitionDelay, | 191 CSSPropertyTransitionDelay, |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 if (textDecoration & OVERLINE) | 1315 if (textDecoration & OVERLINE) |
| 1316 list->append(cssValuePool().createIdentifierValue(CSSValueOverline)); | 1316 list->append(cssValuePool().createIdentifierValue(CSSValueOverline)); |
| 1317 if (textDecoration & LINE_THROUGH) | 1317 if (textDecoration & LINE_THROUGH) |
| 1318 list->append(cssValuePool().createIdentifierValue(CSSValueLineThrough)); | 1318 list->append(cssValuePool().createIdentifierValue(CSSValueLineThrough)); |
| 1319 | 1319 |
| 1320 if (!list->length()) | 1320 if (!list->length()) |
| 1321 return cssValuePool().createIdentifierValue(CSSValueNone); | 1321 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1322 return list; | 1322 return list; |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 #if ENABLE(CSS3_TEXT) | |
| 1326 static PassRefPtr<CSSValue> renderTextDecorationStyleFlagsToCSSValue(TextDecorat
ionStyle textDecorationStyle) | 1325 static PassRefPtr<CSSValue> renderTextDecorationStyleFlagsToCSSValue(TextDecorat
ionStyle textDecorationStyle) |
| 1327 { | 1326 { |
| 1328 switch (textDecorationStyle) { | 1327 switch (textDecorationStyle) { |
| 1329 case TextDecorationStyleSolid: | 1328 case TextDecorationStyleSolid: |
| 1330 return cssValuePool().createIdentifierValue(CSSValueSolid); | 1329 return cssValuePool().createIdentifierValue(CSSValueSolid); |
| 1331 case TextDecorationStyleDouble: | 1330 case TextDecorationStyleDouble: |
| 1332 return cssValuePool().createIdentifierValue(CSSValueDouble); | 1331 return cssValuePool().createIdentifierValue(CSSValueDouble); |
| 1333 case TextDecorationStyleDotted: | 1332 case TextDecorationStyleDotted: |
| 1334 return cssValuePool().createIdentifierValue(CSSValueDotted); | 1333 return cssValuePool().createIdentifierValue(CSSValueDotted); |
| 1335 case TextDecorationStyleDashed: | 1334 case TextDecorationStyleDashed: |
| 1336 return cssValuePool().createIdentifierValue(CSSValueDashed); | 1335 return cssValuePool().createIdentifierValue(CSSValueDashed); |
| 1337 case TextDecorationStyleWavy: | 1336 case TextDecorationStyleWavy: |
| 1338 return cssValuePool().createIdentifierValue(CSSValueWavy); | 1337 return cssValuePool().createIdentifierValue(CSSValueWavy); |
| 1339 } | 1338 } |
| 1340 | 1339 |
| 1341 ASSERT_NOT_REACHED(); | 1340 ASSERT_NOT_REACHED(); |
| 1342 return cssValuePool().createExplicitInitialValue(); | 1341 return cssValuePool().createExplicitInitialValue(); |
| 1343 } | 1342 } |
| 1344 #endif // CSS3_TEXT | |
| 1345 | 1343 |
| 1346 static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepea
t yRepeat) | 1344 static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepea
t yRepeat) |
| 1347 { | 1345 { |
| 1348 // For backwards compatibility, if both values are equal, just return one of
them. And | 1346 // For backwards compatibility, if both values are equal, just return one of
them. And |
| 1349 // if the two values are equivalent to repeat-x or repeat-y, just return the
shorthand. | 1347 // if the two values are equivalent to repeat-x or repeat-y, just return the
shorthand. |
| 1350 if (xRepeat == yRepeat) | 1348 if (xRepeat == yRepeat) |
| 1351 return cssValuePool().createValue(xRepeat); | 1349 return cssValuePool().createValue(xRepeat); |
| 1352 if (xRepeat == RepeatFill && yRepeat == NoRepeatFill) | 1350 if (xRepeat == RepeatFill && yRepeat == NoRepeatFill) |
| 1353 return cssValuePool().createIdentifierValue(CSSValueRepeatX); | 1351 return cssValuePool().createIdentifierValue(CSSValueRepeatX); |
| 1354 if (xRepeat == NoRepeatFill && yRepeat == RepeatFill) | 1352 if (xRepeat == NoRepeatFill && yRepeat == RepeatFill) |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 return cssValuePool().createValue(style->position()); | 2122 return cssValuePool().createValue(style->position()); |
| 2125 case CSSPropertyRight: | 2123 case CSSPropertyRight: |
| 2126 return getPositionOffsetValue(style.get(), CSSPropertyRight, rendere
r, m_node->document()->renderView()); | 2124 return getPositionOffsetValue(style.get(), CSSPropertyRight, rendere
r, m_node->document()->renderView()); |
| 2127 case CSSPropertyWebkitRubyPosition: | 2125 case CSSPropertyWebkitRubyPosition: |
| 2128 return cssValuePool().createValue(style->rubyPosition()); | 2126 return cssValuePool().createValue(style->rubyPosition()); |
| 2129 case CSSPropertyTableLayout: | 2127 case CSSPropertyTableLayout: |
| 2130 return cssValuePool().createValue(style->tableLayout()); | 2128 return cssValuePool().createValue(style->tableLayout()); |
| 2131 case CSSPropertyTextAlign: | 2129 case CSSPropertyTextAlign: |
| 2132 return cssValuePool().createValue(style->textAlign()); | 2130 return cssValuePool().createValue(style->textAlign()); |
| 2133 case CSSPropertyTextDecoration: | 2131 case CSSPropertyTextDecoration: |
| 2132 case CSSPropertyTextDecorationLine: |
| 2134 return renderTextDecorationFlagsToCSSValue(style->textDecoration()); | 2133 return renderTextDecorationFlagsToCSSValue(style->textDecoration()); |
| 2134 case CSSPropertyTextDecorationStyle: |
| 2135 return renderTextDecorationStyleFlagsToCSSValue(style->textDecoratio
nStyle()); |
| 2136 case CSSPropertyTextDecorationColor: |
| 2137 return currentColorOrValidColor(style.get(), style->textDecorationCo
lor()); |
| 2135 #if ENABLE(CSS3_TEXT) | 2138 #if ENABLE(CSS3_TEXT) |
| 2136 case CSSPropertyWebkitTextDecorationLine: | |
| 2137 return renderTextDecorationFlagsToCSSValue(style->textDecoration()); | |
| 2138 case CSSPropertyWebkitTextDecorationStyle: | |
| 2139 return renderTextDecorationStyleFlagsToCSSValue(style->textDecoratio
nStyle()); | |
| 2140 case CSSPropertyWebkitTextDecorationColor: | |
| 2141 return currentColorOrValidColor(style.get(), style->textDecorationCo
lor()); | |
| 2142 case CSSPropertyWebkitTextAlignLast: | 2139 case CSSPropertyWebkitTextAlignLast: |
| 2143 return cssValuePool().createValue(style->textAlignLast()); | 2140 return cssValuePool().createValue(style->textAlignLast()); |
| 2144 case CSSPropertyWebkitTextUnderlinePosition: | 2141 case CSSPropertyWebkitTextUnderlinePosition: |
| 2145 return cssValuePool().createValue(style->textUnderlinePosition()); | 2142 return cssValuePool().createValue(style->textUnderlinePosition()); |
| 2146 #endif // CSS3_TEXT | 2143 #endif // CSS3_TEXT |
| 2147 case CSSPropertyWebkitTextDecorationsInEffect: | 2144 case CSSPropertyWebkitTextDecorationsInEffect: |
| 2148 return renderTextDecorationFlagsToCSSValue(style->textDecorationsInE
ffect()); | 2145 return renderTextDecorationFlagsToCSSValue(style->textDecorationsInE
ffect()); |
| 2149 case CSSPropertyWebkitTextFillColor: | 2146 case CSSPropertyWebkitTextFillColor: |
| 2150 return currentColorOrValidColor(style.get(), style->textFillColor())
; | 2147 return currentColorOrValidColor(style.get(), style->textFillColor())
; |
| 2151 case CSSPropertyWebkitTextEmphasisColor: | 2148 case CSSPropertyWebkitTextEmphasisColor: |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2993 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 2990 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
| 2994 CSSPropertyB
ackgroundClip }; | 2991 CSSPropertyB
ackgroundClip }; |
| 2995 | 2992 |
| 2996 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 2993 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
| 2997 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); | 2994 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); |
| 2998 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); | 2995 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); |
| 2999 return list.release(); | 2996 return list.release(); |
| 3000 } | 2997 } |
| 3001 | 2998 |
| 3002 } // namespace WebCore | 2999 } // namespace WebCore |
| OLD | NEW |