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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 return cssValuePool().createValue(style.boxLines()); | 1442 return cssValuePool().createValue(style.boxLines()); |
1443 case CSSPropertyWebkitBoxOrdinalGroup: | 1443 case CSSPropertyWebkitBoxOrdinalGroup: |
1444 return cssValuePool().createValue(style.boxOrdinalGroup(), CSSPrimitiveV
alue::CSS_NUMBER); | 1444 return cssValuePool().createValue(style.boxOrdinalGroup(), CSSPrimitiveV
alue::CSS_NUMBER); |
1445 case CSSPropertyWebkitBoxOrient: | 1445 case CSSPropertyWebkitBoxOrient: |
1446 return cssValuePool().createValue(style.boxOrient()); | 1446 return cssValuePool().createValue(style.boxOrient()); |
1447 case CSSPropertyWebkitBoxPack: | 1447 case CSSPropertyWebkitBoxPack: |
1448 return cssValuePool().createValue(style.boxPack()); | 1448 return cssValuePool().createValue(style.boxPack()); |
1449 case CSSPropertyWebkitBoxReflect: | 1449 case CSSPropertyWebkitBoxReflect: |
1450 return valueForReflection(style.boxReflect(), style); | 1450 return valueForReflection(style.boxReflect(), style); |
1451 case CSSPropertyBoxShadow: | 1451 case CSSPropertyBoxShadow: |
1452 case CSSPropertyWebkitBoxShadow: | |
1453 return valueForShadowList(style.boxShadow(), style, true); | 1452 return valueForShadowList(style.boxShadow(), style, true); |
1454 case CSSPropertyCaptionSide: | 1453 case CSSPropertyCaptionSide: |
1455 return cssValuePool().createValue(style.captionSide()); | 1454 return cssValuePool().createValue(style.captionSide()); |
1456 case CSSPropertyClear: | 1455 case CSSPropertyClear: |
1457 return cssValuePool().createValue(style.clear()); | 1456 return cssValuePool().createValue(style.clear()); |
1458 case CSSPropertyColor: | 1457 case CSSPropertyColor: |
1459 return cssValuePool().createColorValue(allowVisitedStyle ? style.visited
DependentColor(CSSPropertyColor).rgb() : style.color().rgb()); | 1458 return cssValuePool().createColorValue(allowVisitedStyle ? style.visited
DependentColor(CSSPropertyColor).rgb() : style.color().rgb()); |
1460 case CSSPropertyWebkitPrintColorAdjust: | 1459 case CSSPropertyWebkitPrintColorAdjust: |
1461 return cssValuePool().createValue(style.printColorAdjust()); | 1460 return cssValuePool().createValue(style.printColorAdjust()); |
1462 case CSSPropertyWebkitColumnCount: | 1461 case CSSPropertyWebkitColumnCount: |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2107 list->append(cssValuePool().createValue(CSSAnimationData::initialIterati
onCount(), CSSPrimitiveValue::CSS_NUMBER)); | 2106 list->append(cssValuePool().createValue(CSSAnimationData::initialIterati
onCount(), CSSPrimitiveValue::CSS_NUMBER)); |
2108 list->append(valueForAnimationDirection(CSSAnimationData::initialDirecti
on())); | 2107 list->append(valueForAnimationDirection(CSSAnimationData::initialDirecti
on())); |
2109 list->append(valueForAnimationFillMode(CSSAnimationData::initialFillMode
())); | 2108 list->append(valueForAnimationFillMode(CSSAnimationData::initialFillMode
())); |
2110 // Initial animation-play-state. | 2109 // Initial animation-play-state. |
2111 list->append(cssValuePool().createIdentifierValue(CSSValueRunning)); | 2110 list->append(cssValuePool().createIdentifierValue(CSSValueRunning)); |
2112 return list.release(); | 2111 return list.release(); |
2113 } | 2112 } |
2114 case CSSPropertyWebkitAppearance: | 2113 case CSSPropertyWebkitAppearance: |
2115 return cssValuePool().createValue(style.appearance()); | 2114 return cssValuePool().createValue(style.appearance()); |
2116 case CSSPropertyBackfaceVisibility: | 2115 case CSSPropertyBackfaceVisibility: |
2117 case CSSPropertyWebkitBackfaceVisibility: | |
2118 return cssValuePool().createIdentifierValue((style.backfaceVisibility()
== BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible); | 2116 return cssValuePool().createIdentifierValue((style.backfaceVisibility()
== BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible); |
2119 case CSSPropertyWebkitBorderImage: | 2117 case CSSPropertyWebkitBorderImage: |
2120 return valueForNinePieceImage(style.borderImage(), style); | 2118 return valueForNinePieceImage(style.borderImage(), style); |
2121 case CSSPropertyBorderImageOutset: | 2119 case CSSPropertyBorderImageOutset: |
2122 return valueForNinePieceImageQuad(style.borderImage().outset(), style); | 2120 return valueForNinePieceImageQuad(style.borderImage().outset(), style); |
2123 case CSSPropertyBorderImageRepeat: | 2121 case CSSPropertyBorderImageRepeat: |
2124 return valueForNinePieceImageRepeat(style.borderImage()); | 2122 return valueForNinePieceImageRepeat(style.borderImage()); |
2125 case CSSPropertyBorderImageSlice: | 2123 case CSSPropertyBorderImageSlice: |
2126 return valueForNinePieceImageSlice(style.borderImage()); | 2124 return valueForNinePieceImageSlice(style.borderImage()); |
2127 case CSSPropertyBorderImageWidth: | 2125 case CSSPropertyBorderImageWidth: |
(...skipping 19 matching lines...) Expand all Loading... |
2147 case CSSPropertyWebkitMarginAfterCollapse: | 2145 case CSSPropertyWebkitMarginAfterCollapse: |
2148 return cssValuePool().createValue(style.marginAfterCollapse()); | 2146 return cssValuePool().createValue(style.marginAfterCollapse()); |
2149 case CSSPropertyWebkitMarginTopCollapse: | 2147 case CSSPropertyWebkitMarginTopCollapse: |
2150 case CSSPropertyWebkitMarginBeforeCollapse: | 2148 case CSSPropertyWebkitMarginBeforeCollapse: |
2151 return cssValuePool().createValue(style.marginBeforeCollapse()); | 2149 return cssValuePool().createValue(style.marginBeforeCollapse()); |
2152 case CSSPropertyPerspective: | 2150 case CSSPropertyPerspective: |
2153 case CSSPropertyWebkitPerspective: | 2151 case CSSPropertyWebkitPerspective: |
2154 if (!style.hasPerspective()) | 2152 if (!style.hasPerspective()) |
2155 return cssValuePool().createIdentifierValue(CSSValueNone); | 2153 return cssValuePool().createIdentifierValue(CSSValueNone); |
2156 return zoomAdjustedPixelValue(style.perspective(), style); | 2154 return zoomAdjustedPixelValue(style.perspective(), style); |
2157 case CSSPropertyPerspectiveOrigin: | 2155 case CSSPropertyPerspectiveOrigin: { |
2158 case CSSPropertyWebkitPerspectiveOrigin: { | |
2159 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat
ed(); | 2156 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat
ed(); |
2160 if (renderer) { | 2157 if (renderer) { |
2161 LayoutRect box; | 2158 LayoutRect box; |
2162 if (renderer->isBox()) | 2159 if (renderer->isBox()) |
2163 box = toLayoutBox(renderer)->borderBoxRect(); | 2160 box = toLayoutBox(renderer)->borderBoxRect(); |
2164 | 2161 |
2165 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers
pectiveOriginX(), box.width()), style)); | 2162 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers
pectiveOriginX(), box.width()), style)); |
2166 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers
pectiveOriginY(), box.height()), style)); | 2163 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.pers
pectiveOriginY(), box.height()), style)); |
2167 } else { | 2164 } else { |
2168 list->append(zoomAdjustedPixelValueForLength(style.perspectiveOrigin
X(), style)); | 2165 list->append(zoomAdjustedPixelValueForLength(style.perspectiveOrigin
X(), style)); |
(...skipping 25 matching lines...) Expand all Loading... |
2194 rect->setRight(zoomAdjustedPixelValue(style.clip().right().value(), styl
e)); | 2191 rect->setRight(zoomAdjustedPixelValue(style.clip().right().value(), styl
e)); |
2195 rect->setBottom(zoomAdjustedPixelValue(style.clip().bottom().value(), st
yle)); | 2192 rect->setBottom(zoomAdjustedPixelValue(style.clip().bottom().value(), st
yle)); |
2196 rect->setLeft(zoomAdjustedPixelValue(style.clip().left().value(), style)
); | 2193 rect->setLeft(zoomAdjustedPixelValue(style.clip().left().value(), style)
); |
2197 return cssValuePool().createValue(rect.release()); | 2194 return cssValuePool().createValue(rect.release()); |
2198 } | 2195 } |
2199 case CSSPropertySpeak: | 2196 case CSSPropertySpeak: |
2200 return cssValuePool().createValue(style.speak()); | 2197 return cssValuePool().createValue(style.speak()); |
2201 case CSSPropertyTransform: | 2198 case CSSPropertyTransform: |
2202 case CSSPropertyWebkitTransform: | 2199 case CSSPropertyWebkitTransform: |
2203 return computedTransform(renderer, style); | 2200 return computedTransform(renderer, style); |
2204 case CSSPropertyTransformOrigin: | 2201 case CSSPropertyTransformOrigin: { |
2205 case CSSPropertyWebkitTransformOrigin: { | |
2206 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat
ed(); | 2202 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat
ed(); |
2207 if (renderer) { | 2203 if (renderer) { |
2208 LayoutRect box; | 2204 LayoutRect box; |
2209 if (renderer->isBox()) | 2205 if (renderer->isBox()) |
2210 box = toLayoutBox(renderer)->borderBoxRect(); | 2206 box = toLayoutBox(renderer)->borderBoxRect(); |
2211 | 2207 |
2212 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran
sformOriginX(), box.width()), style)); | 2208 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran
sformOriginX(), box.width()), style)); |
2213 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran
sformOriginY(), box.height()), style)); | 2209 list->append(zoomAdjustedPixelValue(minimumValueForLength(style.tran
sformOriginY(), box.height()), style)); |
2214 if (style.transformOriginZ() != 0) | 2210 if (style.transformOriginZ() != 0) |
2215 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st
yle)); | 2211 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st
yle)); |
2216 } else { | 2212 } else { |
2217 list->append(zoomAdjustedPixelValueForLength(style.transformOriginX(
), style)); | 2213 list->append(zoomAdjustedPixelValueForLength(style.transformOriginX(
), style)); |
2218 list->append(zoomAdjustedPixelValueForLength(style.transformOriginY(
), style)); | 2214 list->append(zoomAdjustedPixelValueForLength(style.transformOriginY(
), style)); |
2219 if (style.transformOriginZ() != 0) | 2215 if (style.transformOriginZ() != 0) |
2220 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st
yle)); | 2216 list->append(zoomAdjustedPixelValue(style.transformOriginZ(), st
yle)); |
2221 } | 2217 } |
2222 return list.release(); | 2218 return list.release(); |
2223 } | 2219 } |
2224 case CSSPropertyTransformStyle: | 2220 case CSSPropertyTransformStyle: |
2225 case CSSPropertyWebkitTransformStyle: | |
2226 return cssValuePool().createIdentifierValue((style.transformStyle3D() ==
TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat); | 2221 return cssValuePool().createIdentifierValue((style.transformStyle3D() ==
TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat); |
2227 case CSSPropertyTransitionDelay: | 2222 case CSSPropertyTransitionDelay: |
2228 case CSSPropertyWebkitTransitionDelay: | 2223 case CSSPropertyWebkitTransitionDelay: |
2229 return valueForAnimationDelay(style.transitions()); | 2224 return valueForAnimationDelay(style.transitions()); |
2230 case CSSPropertyTransitionDuration: | 2225 case CSSPropertyTransitionDuration: |
2231 case CSSPropertyWebkitTransitionDuration: | 2226 case CSSPropertyWebkitTransitionDuration: |
2232 return valueForAnimationDuration(style.transitions()); | 2227 return valueForAnimationDuration(style.transitions()); |
2233 case CSSPropertyTransitionProperty: | 2228 case CSSPropertyTransitionProperty: |
2234 case CSSPropertyWebkitTransitionProperty: | 2229 case CSSPropertyWebkitTransitionProperty: |
2235 return valueForTransitionProperty(style.transitions()); | 2230 return valueForTransitionProperty(style.transitions()); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2574 case CSSPropertyAll: | 2569 case CSSPropertyAll: |
2575 return nullptr; | 2570 return nullptr; |
2576 default: | 2571 default: |
2577 break; | 2572 break; |
2578 } | 2573 } |
2579 ASSERT_NOT_REACHED(); | 2574 ASSERT_NOT_REACHED(); |
2580 return nullptr; | 2575 return nullptr; |
2581 } | 2576 } |
2582 | 2577 |
2583 } | 2578 } |
OLD | NEW |