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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 if (!shadowList) | 1231 if (!shadowList) |
1232 return cssValuePool().createIdentifierValue(CSSValueNone); | 1232 return cssValuePool().createIdentifierValue(CSSValueNone); |
1233 | 1233 |
1234 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; | 1234 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; |
1235 size_t shadowCount = shadowList->shadows().size(); | 1235 size_t shadowCount = shadowList->shadows().size(); |
1236 for (size_t i = 0; i < shadowCount; ++i) | 1236 for (size_t i = 0; i < shadowCount; ++i) |
1237 list->append(valueForShadowData(shadowList->shadows()[i], style, useSpre
ad)); | 1237 list->append(valueForShadowData(shadowList->shadows()[i], style, useSpre
ad)); |
1238 return list.release(); | 1238 return list.release(); |
1239 } | 1239 } |
1240 | 1240 |
1241 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFilter(co
nst ComputedStyle& style) | 1241 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFilter(co
nst ComputedStyle& style, const FilterOperations& filterOperations) |
1242 { | 1242 { |
1243 if (style.filter().operations().isEmpty()) | 1243 if (filterOperations.operations().isEmpty()) |
1244 return cssValuePool().createIdentifierValue(CSSValueNone); | 1244 return cssValuePool().createIdentifierValue(CSSValueNone); |
1245 | 1245 |
1246 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 1246 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
1247 | 1247 |
1248 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr; | 1248 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr; |
1249 | 1249 |
1250 for (const auto& operation : style.filter().operations()) { | 1250 for (const auto& operation : filterOperations.operations()) { |
1251 FilterOperation* filterOperation = operation.get(); | 1251 FilterOperation* filterOperation = operation.get(); |
1252 switch (filterOperation->type()) { | 1252 switch (filterOperation->type()) { |
1253 case FilterOperation::REFERENCE: | 1253 case FilterOperation::REFERENCE: |
1254 filterValue = CSSFunctionValue::create(CSSValueUrl); | 1254 filterValue = CSSFunctionValue::create(CSSValueUrl); |
1255 filterValue->append(cssValuePool().createValue(toReferenceFilterOper
ation(filterOperation)->url(), CSSPrimitiveValue::UnitType::CustomIdentifier)); | 1255 filterValue->append(cssValuePool().createValue(toReferenceFilterOper
ation(filterOperation)->url(), CSSPrimitiveValue::UnitType::CustomIdentifier)); |
1256 break; | 1256 break; |
1257 case FilterOperation::GRAYSCALE: | 1257 case FilterOperation::GRAYSCALE: |
1258 filterValue = CSSFunctionValue::create(CSSValueGrayscale); | 1258 filterValue = CSSFunctionValue::create(CSSValueGrayscale); |
1259 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil
terOperation(filterOperation)->amount(), CSSPrimitiveValue::UnitType::Number)); | 1259 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil
terOperation(filterOperation)->amount(), CSSPrimitiveValue::UnitType::Number)); |
1260 break; | 1260 break; |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2343 return CSSPrimitiveValue::create(toReferenceClipPathOperation(op
eration)->url(), CSSPrimitiveValue::UnitType::URI); | 2343 return CSSPrimitiveValue::create(toReferenceClipPathOperation(op
eration)->url(), CSSPrimitiveValue::UnitType::URI); |
2344 } | 2344 } |
2345 return cssValuePool().createIdentifierValue(CSSValueNone); | 2345 return cssValuePool().createIdentifierValue(CSSValueNone); |
2346 case CSSPropertyShapeMargin: | 2346 case CSSPropertyShapeMargin: |
2347 return cssValuePool().createValue(style.shapeMargin(), style); | 2347 return cssValuePool().createValue(style.shapeMargin(), style); |
2348 case CSSPropertyShapeImageThreshold: | 2348 case CSSPropertyShapeImageThreshold: |
2349 return cssValuePool().createValue(style.shapeImageThreshold(), CSSPrimit
iveValue::UnitType::Number); | 2349 return cssValuePool().createValue(style.shapeImageThreshold(), CSSPrimit
iveValue::UnitType::Number); |
2350 case CSSPropertyShapeOutside: | 2350 case CSSPropertyShapeOutside: |
2351 return valueForShape(style, style.shapeOutside()); | 2351 return valueForShape(style, style.shapeOutside()); |
2352 case CSSPropertyWebkitFilter: | 2352 case CSSPropertyWebkitFilter: |
2353 return valueForFilter(style); | 2353 return valueForFilter(style, style.filter()); |
| 2354 case CSSPropertyBackdropFilter: |
| 2355 return valueForFilter(style, style.backdropFilter()); |
2354 case CSSPropertyMixBlendMode: | 2356 case CSSPropertyMixBlendMode: |
2355 return cssValuePool().createValue(style.blendMode()); | 2357 return cssValuePool().createValue(style.blendMode()); |
2356 | 2358 |
2357 case CSSPropertyBackgroundBlendMode: { | 2359 case CSSPropertyBackgroundBlendMode: { |
2358 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat
ed(); | 2360 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat
ed(); |
2359 for (const FillLayer* currLayer = &style.backgroundLayers(); currLayer;
currLayer = currLayer->next()) | 2361 for (const FillLayer* currLayer = &style.backgroundLayers(); currLayer;
currLayer = currLayer->next()) |
2360 list->append(cssValuePool().createValue(currLayer->blendMode())); | 2362 list->append(cssValuePool().createValue(currLayer->blendMode())); |
2361 return list.release(); | 2363 return list.release(); |
2362 } | 2364 } |
2363 case CSSPropertyBackground: | 2365 case CSSPropertyBackground: |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 case CSSPropertyAll: | 2691 case CSSPropertyAll: |
2690 return nullptr; | 2692 return nullptr; |
2691 default: | 2693 default: |
2692 break; | 2694 break; |
2693 } | 2695 } |
2694 ASSERT_NOT_REACHED(); | 2696 ASSERT_NOT_REACHED(); |
2695 return nullptr; | 2697 return nullptr; |
2696 } | 2698 } |
2697 | 2699 |
2698 } | 2700 } |
OLD | NEW |