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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 pair->append(zoomAdjustedPixelValueForLength(coordinate.x(), style)); | 1350 pair->append(zoomAdjustedPixelValueForLength(coordinate.x(), style)); |
1351 pair->append(zoomAdjustedPixelValueForLength(coordinate.y(), style)); | 1351 pair->append(zoomAdjustedPixelValueForLength(coordinate.y(), style)); |
1352 list->append(pair); | 1352 list->append(pair); |
1353 } | 1353 } |
1354 | 1354 |
1355 return list.release(); | 1355 return list.release(); |
1356 } | 1356 } |
1357 | 1357 |
1358 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(const AtomicS
tring customPropertyName, const ComputedStyle& style) | 1358 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(const AtomicS
tring customPropertyName, const ComputedStyle& style) |
1359 { | 1359 { |
1360 CSSVariableData* data = style.variables()->getVariable(customPropertyName); | 1360 StyleVariableData* variables = style.variables(); |
| 1361 if (!variables) |
| 1362 return nullptr; |
| 1363 |
| 1364 CSSVariableData* data = variables->getVariable(customPropertyName); |
1361 if (!data) | 1365 if (!data) |
1362 return nullptr; | 1366 return nullptr; |
1363 | 1367 |
1364 return CSSCustomPropertyDeclaration::create(customPropertyName, data); | 1368 return CSSCustomPropertyDeclaration::create(customPropertyName, data); |
1365 } | 1369 } |
1366 | 1370 |
| 1371 const HashMap<AtomicString, RefPtr<CSSVariableData>>* ComputedStyleCSSValueMappi
ng::getVariables(const ComputedStyle& style) |
| 1372 { |
| 1373 StyleVariableData* variables = style.variables(); |
| 1374 if (variables) |
| 1375 return variables->getVariables(); |
| 1376 return nullptr; |
| 1377 } |
| 1378 |
1367 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node*
styledNode, bool allowVisitedStyle) | 1379 PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node*
styledNode, bool allowVisitedStyle) |
1368 { | 1380 { |
1369 const SVGComputedStyle& svgStyle = style.svgStyle(); | 1381 const SVGComputedStyle& svgStyle = style.svgStyle(); |
1370 propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style.di
rection(), style.writingMode()); | 1382 propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style.di
rection(), style.writingMode()); |
1371 switch (propertyID) { | 1383 switch (propertyID) { |
1372 case CSSPropertyInvalid: | 1384 case CSSPropertyInvalid: |
1373 return nullptr; | 1385 return nullptr; |
1374 | 1386 |
1375 case CSSPropertyBackgroundColor: | 1387 case CSSPropertyBackgroundColor: |
1376 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited
DependentColor(CSSPropertyBackgroundColor).rgb()) : currentColorOrValidColor(sty
le, style.backgroundColor()); | 1388 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited
DependentColor(CSSPropertyBackgroundColor).rgb()) : currentColorOrValidColor(sty
le, style.backgroundColor()); |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2723 case CSSPropertyAll: | 2735 case CSSPropertyAll: |
2724 return nullptr; | 2736 return nullptr; |
2725 default: | 2737 default: |
2726 break; | 2738 break; |
2727 } | 2739 } |
2728 ASSERT_NOT_REACHED(); | 2740 ASSERT_NOT_REACHED(); |
2729 return nullptr; | 2741 return nullptr; |
2730 } | 2742 } |
2731 | 2743 |
2732 } | 2744 } |
OLD | NEW |