| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "core/css/CSSPrimitiveValue.h" | 46 #include "core/css/CSSPrimitiveValue.h" |
| 47 #include "core/css/CSSPrimitiveValueMappings.h" | 47 #include "core/css/CSSPrimitiveValueMappings.h" |
| 48 #include "core/css/CSSQuadValue.h" | 48 #include "core/css/CSSQuadValue.h" |
| 49 #include "core/css/CSSReflectValue.h" | 49 #include "core/css/CSSReflectValue.h" |
| 50 #include "core/css/CSSShadowValue.h" | 50 #include "core/css/CSSShadowValue.h" |
| 51 #include "core/css/CSSStringValue.h" | 51 #include "core/css/CSSStringValue.h" |
| 52 #include "core/css/CSSTimingFunctionValue.h" | 52 #include "core/css/CSSTimingFunctionValue.h" |
| 53 #include "core/css/CSSURIValue.h" | 53 #include "core/css/CSSURIValue.h" |
| 54 #include "core/css/CSSValueList.h" | 54 #include "core/css/CSSValueList.h" |
| 55 #include "core/css/CSSValuePair.h" | 55 #include "core/css/CSSValuePair.h" |
| 56 #include "core/css/PropertyRegistry.h" |
| 56 #include "core/layout/LayoutBlock.h" | 57 #include "core/layout/LayoutBlock.h" |
| 57 #include "core/layout/LayoutBox.h" | 58 #include "core/layout/LayoutBox.h" |
| 58 #include "core/layout/LayoutGrid.h" | 59 #include "core/layout/LayoutGrid.h" |
| 59 #include "core/layout/LayoutObject.h" | 60 #include "core/layout/LayoutObject.h" |
| 60 #include "core/style/ComputedStyle.h" | 61 #include "core/style/ComputedStyle.h" |
| 61 #include "core/style/ContentData.h" | 62 #include "core/style/ContentData.h" |
| 62 #include "core/style/CursorData.h" | 63 #include "core/style/CursorData.h" |
| 63 #include "core/style/QuotesData.h" | 64 #include "core/style/QuotesData.h" |
| 64 #include "core/style/ShadowList.h" | 65 #include "core/style/ShadowList.h" |
| 65 #include "core/style/StyleVariableData.h" | 66 #include "core/style/StyleVariableData.h" |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 return BreakAuto; | 1627 return BreakAuto; |
| 1627 case BreakColumn: | 1628 case BreakColumn: |
| 1628 return BreakAlways; | 1629 return BreakAlways; |
| 1629 case BreakAvoidColumn: | 1630 case BreakAvoidColumn: |
| 1630 return BreakAvoid; | 1631 return BreakAvoid; |
| 1631 default: | 1632 default: |
| 1632 return genericBreakValue; | 1633 return genericBreakValue; |
| 1633 } | 1634 } |
| 1634 } | 1635 } |
| 1635 | 1636 |
| 1636 const CSSValue* ComputedStyleCSSValueMapping::get(const AtomicString customPrope
rtyName, const ComputedStyle& style) | 1637 const CSSValue* ComputedStyleCSSValueMapping::get(const AtomicString customPrope
rtyName, const ComputedStyle& style, const PropertyRegistry* registry) |
| 1637 { | 1638 { |
| 1638 StyleVariableData* variables = style.variables(); | 1639 StyleVariableData* variables = style.variables(); |
| 1640 if (const PropertyRegistry::Registration* registration = registry->registrat
ion(customPropertyName)) { |
| 1641 if (variables) { |
| 1642 const CSSValue* result = variables->registeredInheritedProperty(cust
omPropertyName); |
| 1643 if (result) |
| 1644 return result; |
| 1645 } |
| 1646 return registration->initial(); |
| 1647 } |
| 1648 |
| 1639 if (!variables) | 1649 if (!variables) |
| 1640 return nullptr; | 1650 return nullptr; |
| 1641 | 1651 |
| 1642 CSSVariableData* data = variables->getVariable(customPropertyName); | 1652 CSSVariableData* data = variables->getVariable(customPropertyName); |
| 1643 if (!data) | 1653 if (!data) |
| 1644 return nullptr; | 1654 return nullptr; |
| 1645 | 1655 |
| 1646 return CSSCustomPropertyDeclaration::create(customPropertyName, data); | 1656 return CSSCustomPropertyDeclaration::create(customPropertyName, data); |
| 1647 } | 1657 } |
| 1648 | 1658 |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 case CSSPropertyAll: | 3017 case CSSPropertyAll: |
| 3008 return nullptr; | 3018 return nullptr; |
| 3009 default: | 3019 default: |
| 3010 break; | 3020 break; |
| 3011 } | 3021 } |
| 3012 ASSERT_NOT_REACHED(); | 3022 ASSERT_NOT_REACHED(); |
| 3013 return nullptr; | 3023 return nullptr; |
| 3014 } | 3024 } |
| 3015 | 3025 |
| 3016 } // namespace blink | 3026 } // namespace blink |
| OLD | NEW |