| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace | 108 } // namespace |
| 109 | 109 |
| 110 void StyleBuilder::applyProperty(CSSPropertyID id, StyleResolverState& state, co
nst CSSValue& value) | 110 void StyleBuilder::applyProperty(CSSPropertyID id, StyleResolverState& state, co
nst CSSValue& value) |
| 111 { | 111 { |
| 112 if (id != CSSPropertyVariable | 112 if (id != CSSPropertyVariable |
| 113 && (value.isVariableReferenceValue() || value.isPendingSubstitutionValue
())) { | 113 && (value.isVariableReferenceValue() || value.isPendingSubstitutionValue
())) { |
| 114 | 114 |
| 115 const CSSValue* resolvedValue = value.isVariableReferenceValue() ? | 115 const CSSValue* resolvedValue = CSSVariableResolver::resolveVariableRefe
rences(state, id, value); |
| 116 CSSVariableResolver::resolveVariableReferences(state, id, toCSSVaria
bleReferenceValue(value)) : | |
| 117 CSSVariableResolver::resolvePendingSubstitutions(state, id, toCSSPen
dingSubstitutionValue(value)); | |
| 118 applyProperty(id, state, *resolvedValue); | 116 applyProperty(id, state, *resolvedValue); |
| 119 | 117 |
| 120 if (!state.style()->hasVariableReferenceFromNonInheritedProperty() && !C
SSPropertyMetadata::isInheritedProperty(id)) | 118 if (!state.style()->hasVariableReferenceFromNonInheritedProperty() && !C
SSPropertyMetadata::isInheritedProperty(id)) |
| 121 state.style()->setHasVariableReferenceFromNonInheritedProperty(); | 119 state.style()->setHasVariableReferenceFromNonInheritedProperty(); |
| 122 return; | 120 return; |
| 123 } | 121 } |
| 124 | 122 |
| 125 DCHECK(!isShorthandProperty(id)) << "Shorthand property id = " << id << " wa
sn't expanded at parsing time"; | 123 DCHECK(!isShorthandProperty(id)) << "Shorthand property id = " << id << " wa
sn't expanded at parsing time"; |
| 126 | 124 |
| 127 bool isInherit = state.parentNode() && value.isInheritedValue(); | 125 bool isInherit = state.parentNode() && value.isInheritedValue(); |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 } | 882 } |
| 885 } | 883 } |
| 886 | 884 |
| 887 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(StyleResolverState&
state) | 885 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(StyleResolverState&
state) |
| 888 { | 886 { |
| 889 if (!state.parentNode()->isDocumentNode()) | 887 if (!state.parentNode()->isDocumentNode()) |
| 890 state.style()->setPosition(state.parentStyle()->position()); | 888 state.style()->setPosition(state.parentStyle()->position()); |
| 891 } | 889 } |
| 892 | 890 |
| 893 } // namespace blink | 891 } // namespace blink |
| OLD | NEW |