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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 19367002: Implement DeferredAnimatableValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 989
990 Vector<Animation*>* animations = target->activeAnimations(); 990 Vector<Animation*>* animations = target->activeAnimations();
991 991
992 for (size_t i = 0; i < animations->size(); ++i) { 992 for (size_t i = 0; i < animations->size(); ++i) {
993 RefPtr<Animation> animation = animations->at(i); 993 RefPtr<Animation> animation = animations->at(i);
994 const AnimationEffect::CompositableValueMap* compositableValues = animat ion->compositableValues(); 994 const AnimationEffect::CompositableValueMap* compositableValues = animat ion->compositableValues();
995 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos itableValues->begin(); iter != compositableValues->end(); ++iter) { 995 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos itableValues->begin(); iter != compositableValues->end(); ++iter) {
996 CSSPropertyID property = iter->key; 996 CSSPropertyID property = iter->key;
997 if (!isPropertyForPass<pass>(property)) 997 if (!isPropertyForPass<pass>(property))
998 continue; 998 continue;
999 RefPtr<CSSValue> value = iter->value->compositeOnto(AnimatableValue: :neutralValue())->toCSSValue(); 999 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto (AnimatableValue::neutralValue());
1000 if (animatableValue->isDeferredSnapshot())
1001 continue;
1002 RefPtr<CSSValue> cssValue = animatableValue->toCSSValue();
1000 if (pass == HighPriorityProperties && property == CSSPropertyLineHei ght) 1003 if (pass == HighPriorityProperties && property == CSSPropertyLineHei ght)
1001 state.setLineHeightValue(value.get()); 1004 state.setLineHeightValue(cssValue.get());
1002 else 1005 else
1003 applyProperty(state, property, value.get()); 1006 applyProperty(state, property, cssValue.get());
1004 } 1007 }
1005 } 1008 }
1006 } 1009 }
1007 1010
1008 static inline bool isValidVisitedLinkProperty(CSSPropertyID id) 1011 static inline bool isValidVisitedLinkProperty(CSSPropertyID id)
1009 { 1012 {
1010 switch (id) { 1013 switch (id) {
1011 case CSSPropertyBackgroundColor: 1014 case CSSPropertyBackgroundColor:
1012 case CSSPropertyBorderLeftColor: 1015 case CSSPropertyBorderLeftColor:
1013 case CSSPropertyBorderRightColor: 1016 case CSSPropertyBorderRightColor:
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 fprintf(stderr, "This recalc style:\n"); 1446 fprintf(stderr, "This recalc style:\n");
1444 printStyleStats(m_searches, m_elementsEligibleForSharing, m_stylesShared, m_ searchFoundSiblingForSharing, m_searchesMissedSharing); 1447 printStyleStats(m_searches, m_elementsEligibleForSharing, m_stylesShared, m_ searchFoundSiblingForSharing, m_searchesMissedSharing);
1445 1448
1446 fprintf(stderr, "Total:\n"); 1449 fprintf(stderr, "Total:\n");
1447 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing); 1450 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing);
1448 fprintf(stderr, "----------------------------------------------------------- ---------------------\n"); 1451 fprintf(stderr, "----------------------------------------------------------- ---------------------\n");
1449 } 1452 }
1450 #endif 1453 #endif
1451 1454
1452 } // namespace WebCore 1455 } // namespace WebCore
OLDNEW
« Source/core/animation/AnimatableValue.cpp ('K') | « Source/core/core.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698