| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 CSSPropertyWebkitMaskPosition, | 252 CSSPropertyWebkitMaskPosition, |
| 253 CSSPropertyWebkitMaskRepeat, | 253 CSSPropertyWebkitMaskRepeat, |
| 254 CSSPropertyWebkitMaskSize, | 254 CSSPropertyWebkitMaskSize, |
| 255 CSSPropertyOrder, | 255 CSSPropertyOrder, |
| 256 CSSPropertyPerspective, | 256 CSSPropertyPerspective, |
| 257 CSSPropertyWebkitPerspective, | 257 CSSPropertyWebkitPerspective, |
| 258 CSSPropertyPerspectiveOrigin, | 258 CSSPropertyPerspectiveOrigin, |
| 259 CSSPropertyWebkitPerspectiveOrigin, | 259 CSSPropertyWebkitPerspectiveOrigin, |
| 260 CSSPropertyWebkitPrintColorAdjust, | 260 CSSPropertyWebkitPrintColorAdjust, |
| 261 CSSPropertyWebkitRtlOrdering, | 261 CSSPropertyWebkitRtlOrdering, |
| 262 CSSPropertyShapeOutside, | |
| 263 CSSPropertyShapeImageThreshold, | |
| 264 CSSPropertyShapeMargin, | |
| 265 CSSPropertyWebkitTapHighlightColor, | 262 CSSPropertyWebkitTapHighlightColor, |
| 266 CSSPropertyWebkitTextDecorationsInEffect, | 263 CSSPropertyWebkitTextDecorationsInEffect, |
| 267 CSSPropertyWebkitTextEmphasisColor, | 264 CSSPropertyWebkitTextEmphasisColor, |
| 268 CSSPropertyWebkitTextEmphasisPosition, | 265 CSSPropertyWebkitTextEmphasisPosition, |
| 269 CSSPropertyWebkitTextEmphasisStyle, | 266 CSSPropertyWebkitTextEmphasisStyle, |
| 270 CSSPropertyWebkitTextFillColor, | 267 CSSPropertyWebkitTextFillColor, |
| 271 CSSPropertyWebkitTextOrientation, | 268 CSSPropertyWebkitTextOrientation, |
| 272 CSSPropertyWebkitTextStrokeColor, | 269 CSSPropertyWebkitTextStrokeColor, |
| 273 CSSPropertyWebkitTextStrokeWidth, | 270 CSSPropertyWebkitTextStrokeWidth, |
| 274 CSSPropertyTransform, | 271 CSSPropertyTransform, |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 static PassRefPtr<CSSPrimitiveValue> valueForFontVariant(RenderStyle& style) | 1192 static PassRefPtr<CSSPrimitiveValue> valueForFontVariant(RenderStyle& style) |
| 1196 { | 1193 { |
| 1197 return cssValuePool().createValue(style.fontDescription().variant()); | 1194 return cssValuePool().createValue(style.fontDescription().variant()); |
| 1198 } | 1195 } |
| 1199 | 1196 |
| 1200 static PassRefPtr<CSSPrimitiveValue> valueForFontWeight(RenderStyle& style) | 1197 static PassRefPtr<CSSPrimitiveValue> valueForFontWeight(RenderStyle& style) |
| 1201 { | 1198 { |
| 1202 return cssValuePool().createValue(style.fontDescription().weight()); | 1199 return cssValuePool().createValue(style.fontDescription().weight()); |
| 1203 } | 1200 } |
| 1204 | 1201 |
| 1205 static PassRefPtr<CSSValue> valueForShape(const RenderStyle& style, ShapeValue*
shapeValue) | |
| 1206 { | |
| 1207 if (!shapeValue) | |
| 1208 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 1209 if (shapeValue->type() == ShapeValue::Box) | |
| 1210 return cssValuePool().createValue(shapeValue->cssBox()); | |
| 1211 if (shapeValue->type() == ShapeValue::Image) { | |
| 1212 if (shapeValue->image()) | |
| 1213 return shapeValue->image()->cssValue(); | |
| 1214 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 1215 } | |
| 1216 | |
| 1217 ASSERT(shapeValue->type() == ShapeValue::Shape); | |
| 1218 | |
| 1219 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | |
| 1220 list->append(valueForBasicShape(style, shapeValue->shape())); | |
| 1221 if (shapeValue->cssBox() != BoxMissing) | |
| 1222 list->append(cssValuePool().createValue(shapeValue->cssBox())); | |
| 1223 return list.release(); | |
| 1224 } | |
| 1225 | |
| 1226 static PassRefPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction touchAction) | 1202 static PassRefPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction touchAction) |
| 1227 { | 1203 { |
| 1228 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | 1204 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
| 1229 if (touchAction == TouchActionAuto) | 1205 if (touchAction == TouchActionAuto) |
| 1230 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); | 1206 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); |
| 1231 if (touchAction & TouchActionNone) { | 1207 if (touchAction & TouchActionNone) { |
| 1232 ASSERT(touchAction == TouchActionNone); | 1208 ASSERT(touchAction == TouchActionNone); |
| 1233 list->append(cssValuePool().createIdentifierValue(CSSValueNone)); | 1209 list->append(cssValuePool().createIdentifierValue(CSSValueNone)); |
| 1234 } | 1210 } |
| 1235 if (touchAction == (TouchActionPanX | TouchActionPanY | TouchActionPinchZoom
)) { | 1211 if (touchAction == (TouchActionPanX | TouchActionPanY | TouchActionPinchZoom
)) { |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2210 case CSSPropertyWebkitLineBoxContain: | 2186 case CSSPropertyWebkitLineBoxContain: |
| 2211 return createLineBoxContainValue(style->lineBoxContain()); | 2187 return createLineBoxContainValue(style->lineBoxContain()); |
| 2212 case CSSPropertyContent: | 2188 case CSSPropertyContent: |
| 2213 return valueForContentData(*style); | 2189 return valueForContentData(*style); |
| 2214 case CSSPropertyWebkitClipPath: | 2190 case CSSPropertyWebkitClipPath: |
| 2215 if (ClipPathOperation* operation = style->clipPath()) { | 2191 if (ClipPathOperation* operation = style->clipPath()) { |
| 2216 if (operation->type() == ClipPathOperation::SHAPE) | 2192 if (operation->type() == ClipPathOperation::SHAPE) |
| 2217 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); | 2193 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); |
| 2218 } | 2194 } |
| 2219 return cssValuePool().createIdentifierValue(CSSValueNone); | 2195 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 2220 case CSSPropertyShapeMargin: | |
| 2221 return cssValuePool().createValue(style->shapeMargin(), *style); | |
| 2222 case CSSPropertyShapeImageThreshold: | |
| 2223 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); | |
| 2224 case CSSPropertyShapeOutside: | |
| 2225 return valueForShape(*style, style->shapeOutside()); | |
| 2226 case CSSPropertyWebkitFilter: | 2196 case CSSPropertyWebkitFilter: |
| 2227 return valueForFilter(renderer, *style); | 2197 return valueForFilter(renderer, *style); |
| 2228 case CSSPropertyMixBlendMode: | 2198 case CSSPropertyMixBlendMode: |
| 2229 return cssValuePool().createValue(style->blendMode()); | 2199 return cssValuePool().createValue(style->blendMode()); |
| 2230 | 2200 |
| 2231 case CSSPropertyBackgroundBlendMode: { | 2201 case CSSPropertyBackgroundBlendMode: { |
| 2232 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); | 2202 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); |
| 2233 for (const FillLayer* currLayer = &style->backgroundLayers(); currLa
yer; currLayer = currLayer->next()) | 2203 for (const FillLayer* currLayer = &style->backgroundLayers(); currLa
yer; currLayer = currLayer->next()) |
| 2234 list->append(cssValuePool().createValue(currLayer->blendMode()))
; | 2204 list->append(cssValuePool().createValue(currLayer->blendMode()))
; |
| 2235 return list.release(); | 2205 return list.release(); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 return list.release(); | 2505 return list.release(); |
| 2536 } | 2506 } |
| 2537 | 2507 |
| 2538 void CSSComputedStyleDeclaration::trace(Visitor* visitor) | 2508 void CSSComputedStyleDeclaration::trace(Visitor* visitor) |
| 2539 { | 2509 { |
| 2540 visitor->trace(m_node); | 2510 visitor->trace(m_node); |
| 2541 CSSStyleDeclaration::trace(visitor); | 2511 CSSStyleDeclaration::trace(visitor); |
| 2542 } | 2512 } |
| 2543 | 2513 |
| 2544 } // namespace blink | 2514 } // namespace blink |
| OLD | NEW |