Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 2323633002: Implement animation tainted custom property values (Closed)
Patch Set: bigger fallback value Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 */ 37 */
38 38
39 #include "core/CSSPropertyNames.h" 39 #include "core/CSSPropertyNames.h"
40 #include "core/CSSValueKeywords.h" 40 #include "core/CSSValueKeywords.h"
41 #include "core/StyleBuilderFunctions.h" 41 #include "core/StyleBuilderFunctions.h"
42 #include "core/StylePropertyShorthand.h" 42 #include "core/StylePropertyShorthand.h"
43 #include "core/animation/css/CSSAnimations.h"
43 #include "core/css/CSSCounterValue.h" 44 #include "core/css/CSSCounterValue.h"
44 #include "core/css/CSSCursorImageValue.h" 45 #include "core/css/CSSCursorImageValue.h"
45 #include "core/css/CSSCustomPropertyDeclaration.h" 46 #include "core/css/CSSCustomPropertyDeclaration.h"
46 #include "core/css/CSSFunctionValue.h" 47 #include "core/css/CSSFunctionValue.h"
47 #include "core/css/CSSGridTemplateAreasValue.h" 48 #include "core/css/CSSGridTemplateAreasValue.h"
48 #include "core/css/CSSHelper.h" 49 #include "core/css/CSSHelper.h"
49 #include "core/css/CSSImageSetValue.h" 50 #include "core/css/CSSImageSetValue.h"
50 #include "core/css/CSSPendingSubstitutionValue.h" 51 #include "core/css/CSSPendingSubstitutionValue.h"
51 #include "core/css/CSSPrimitiveValueMappings.h" 52 #include "core/css/CSSPrimitiveValueMappings.h"
52 #include "core/css/CSSPropertyMetadata.h" 53 #include "core/css/CSSPropertyMetadata.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 106 }
106 } 107 }
107 108
108 } // namespace 109 } // namespace
109 110
110 void StyleBuilder::applyProperty(CSSPropertyID id, 111 void StyleBuilder::applyProperty(CSSPropertyID id,
111 StyleResolverState& state, 112 StyleResolverState& state,
112 const CSSValue& value) { 113 const CSSValue& value) {
113 if (id != CSSPropertyVariable && (value.isVariableReferenceValue() || 114 if (id != CSSPropertyVariable && (value.isVariableReferenceValue() ||
114 value.isPendingSubstitutionValue())) { 115 value.isPendingSubstitutionValue())) {
116 bool omitAnimationTainted = CSSAnimations::isAnimationAffectingProperty(id);
115 const CSSValue* resolvedValue = 117 const CSSValue* resolvedValue =
116 CSSVariableResolver::resolveVariableReferences(state, id, value); 118 CSSVariableResolver::resolveVariableReferences(state, id, value,
119 omitAnimationTainted);
117 applyProperty(id, state, *resolvedValue); 120 applyProperty(id, state, *resolvedValue);
118 121
119 if (!state.style()->hasVariableReferenceFromNonInheritedProperty() && 122 if (!state.style()->hasVariableReferenceFromNonInheritedProperty() &&
120 !CSSPropertyMetadata::isInheritedProperty(id)) 123 !CSSPropertyMetadata::isInheritedProperty(id))
121 state.style()->setHasVariableReferenceFromNonInheritedProperty(); 124 state.style()->setHasVariableReferenceFromNonInheritedProperty();
122 return; 125 return;
123 } 126 }
124 127
125 DCHECK(!isShorthandProperty(id)) << "Shorthand property id = " << id 128 DCHECK(!isShorthandProperty(id)) << "Shorthand property id = " << id
126 << " wasn't expanded at parsing time"; 129 << " wasn't expanded at parsing time";
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 } 1042 }
1040 } 1043 }
1041 1044
1042 void StyleBuilderFunctions::applyInheritCSSPropertyPosition( 1045 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(
1043 StyleResolverState& state) { 1046 StyleResolverState& state) {
1044 if (!state.parentNode()->isDocumentNode()) 1047 if (!state.parentNode()->isDocumentNode())
1045 state.style()->setPosition(state.parentStyle()->position()); 1048 state.style()->setPosition(state.parentStyle()->position());
1046 } 1049 }
1047 1050
1048 } // namespace blink 1051 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698