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

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

Issue 2323633002: Implement animation tainted custom property values (Closed)
Patch Set: Rebased 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
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
(...skipping 24 matching lines...) Expand all
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */ 39 */
40 40
41 #include "core/CSSPropertyNames.h" 41 #include "core/CSSPropertyNames.h"
42 #include "core/CSSValueKeywords.h" 42 #include "core/CSSValueKeywords.h"
43 #include "core/StyleBuilderFunctions.h" 43 #include "core/StyleBuilderFunctions.h"
44 #include "core/StylePropertyShorthand.h" 44 #include "core/StylePropertyShorthand.h"
45 #include "core/animation/css/CSSAnimations.h"
45 #include "core/css/CSSCounterValue.h" 46 #include "core/css/CSSCounterValue.h"
46 #include "core/css/CSSCursorImageValue.h" 47 #include "core/css/CSSCursorImageValue.h"
47 #include "core/css/CSSCustomPropertyDeclaration.h" 48 #include "core/css/CSSCustomPropertyDeclaration.h"
48 #include "core/css/CSSFunctionValue.h" 49 #include "core/css/CSSFunctionValue.h"
49 #include "core/css/CSSGridTemplateAreasValue.h" 50 #include "core/css/CSSGridTemplateAreasValue.h"
50 #include "core/css/CSSHelper.h" 51 #include "core/css/CSSHelper.h"
51 #include "core/css/CSSImageSetValue.h" 52 #include "core/css/CSSImageSetValue.h"
52 #include "core/css/CSSPendingSubstitutionValue.h" 53 #include "core/css/CSSPendingSubstitutionValue.h"
53 #include "core/css/CSSPrimitiveValueMappings.h" 54 #include "core/css/CSSPrimitiveValueMappings.h"
54 #include "core/css/CSSPropertyMetadata.h" 55 #include "core/css/CSSPropertyMetadata.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 108 }
108 } 109 }
109 110
110 } // namespace 111 } // namespace
111 112
112 void StyleBuilder::applyProperty(CSSPropertyID id, 113 void StyleBuilder::applyProperty(CSSPropertyID id,
113 StyleResolverState& state, 114 StyleResolverState& state,
114 const CSSValue& value) { 115 const CSSValue& value) {
115 if (id != CSSPropertyVariable && (value.isVariableReferenceValue() || 116 if (id != CSSPropertyVariable && (value.isVariableReferenceValue() ||
116 value.isPendingSubstitutionValue())) { 117 value.isPendingSubstitutionValue())) {
118 bool omitAnimationTainted = CSSAnimations::isAnimationAffectingProperty(id);
117 const CSSValue* resolvedValue = 119 const CSSValue* resolvedValue =
118 CSSVariableResolver::resolveVariableReferences(state, id, value); 120 CSSVariableResolver::resolveVariableReferences(state, id, value,
121 omitAnimationTainted);
119 applyProperty(id, state, *resolvedValue); 122 applyProperty(id, state, *resolvedValue);
120 123
121 if (!state.style()->hasVariableReferenceFromNonInheritedProperty() && 124 if (!state.style()->hasVariableReferenceFromNonInheritedProperty() &&
122 !CSSPropertyMetadata::isInheritedProperty(id)) 125 !CSSPropertyMetadata::isInheritedProperty(id))
123 state.style()->setHasVariableReferenceFromNonInheritedProperty(); 126 state.style()->setHasVariableReferenceFromNonInheritedProperty();
124 return; 127 return;
125 } 128 }
126 129
127 DCHECK(!isShorthandProperty(id)) << "Shorthand property id = " << id 130 DCHECK(!isShorthandProperty(id)) << "Shorthand property id = " << id
128 << " wasn't expanded at parsing time"; 131 << " wasn't expanded at parsing time";
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1045 }
1043 } 1046 }
1044 1047
1045 void StyleBuilderFunctions::applyInheritCSSPropertyPosition( 1048 void StyleBuilderFunctions::applyInheritCSSPropertyPosition(
1046 StyleResolverState& state) { 1049 StyleResolverState& state) {
1047 if (!state.parentNode()->isDocumentNode()) 1050 if (!state.parentNode()->isDocumentNode())
1048 state.style()->setPosition(state.parentStyle()->position()); 1051 state.style()->setPosition(state.parentStyle()->position());
1049 } 1052 }
1050 1053
1051 } // namespace blink 1054 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698