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 (registry) { |
| 1641 const PropertyRegistry::Registration* registration = registry->registrat
ion(customPropertyName); |
| 1642 if (registration) { |
| 1643 if (variables) { |
| 1644 const CSSValue* result = variables->registeredInheritedProperty(
customPropertyName); |
| 1645 if (result) |
| 1646 return result; |
| 1647 } |
| 1648 return registration->initial(); |
| 1649 } |
| 1650 } |
| 1651 |
1639 if (!variables) | 1652 if (!variables) |
1640 return nullptr; | 1653 return nullptr; |
1641 | 1654 |
1642 CSSVariableData* data = variables->getVariable(customPropertyName); | 1655 CSSVariableData* data = variables->getVariable(customPropertyName); |
1643 if (!data) | 1656 if (!data) |
1644 return nullptr; | 1657 return nullptr; |
1645 | 1658 |
1646 return CSSCustomPropertyDeclaration::create(customPropertyName, data); | 1659 return CSSCustomPropertyDeclaration::create(customPropertyName, data); |
1647 } | 1660 } |
1648 | 1661 |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3007 case CSSPropertyAll: | 3020 case CSSPropertyAll: |
3008 return nullptr; | 3021 return nullptr; |
3009 default: | 3022 default: |
3010 break; | 3023 break; |
3011 } | 3024 } |
3012 ASSERT_NOT_REACHED(); | 3025 ASSERT_NOT_REACHED(); |
3013 return nullptr; | 3026 return nullptr; |
3014 } | 3027 } |
3015 | 3028 |
3016 } // namespace blink | 3029 } // namespace blink |
OLD | NEW |