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

Side by Side Diff: third_party/WebKit/Source/core/animation/ElementAnimations.cpp

Issue 1987943002: [wip] unprefix filter Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add animation blur filter test. Created 4 years, 7 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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ASSERT(animation.effect()->isKeyframeEffect()); 52 ASSERT(animation.effect()->isKeyframeEffect());
53 const KeyframeEffect& effect = *toKeyframeEffect(animation.effect()); 53 const KeyframeEffect& effect = *toKeyframeEffect(animation.effect());
54 if (effect.isCurrent()) { 54 if (effect.isCurrent()) {
55 if (effect.affects(PropertyHandle(CSSPropertyOpacity))) 55 if (effect.affects(PropertyHandle(CSSPropertyOpacity)))
56 style.setHasCurrentOpacityAnimation(true); 56 style.setHasCurrentOpacityAnimation(true);
57 if (effect.affects(PropertyHandle(CSSPropertyTransform)) 57 if (effect.affects(PropertyHandle(CSSPropertyTransform))
58 || effect.affects(PropertyHandle(CSSPropertyRotate)) 58 || effect.affects(PropertyHandle(CSSPropertyRotate))
59 || effect.affects(PropertyHandle(CSSPropertyScale)) 59 || effect.affects(PropertyHandle(CSSPropertyScale))
60 || effect.affects(PropertyHandle(CSSPropertyTranslate))) 60 || effect.affects(PropertyHandle(CSSPropertyTranslate)))
61 style.setHasCurrentTransformAnimation(true); 61 style.setHasCurrentTransformAnimation(true);
62 if (effect.affects(PropertyHandle(CSSPropertyWebkitFilter))) 62 if (effect.affects(PropertyHandle(CSSPropertyFilter)))
63 style.setHasCurrentFilterAnimation(true); 63 style.setHasCurrentFilterAnimation(true);
64 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter))) 64 if (effect.affects(PropertyHandle(CSSPropertyBackdropFilter)))
65 style.setHasCurrentBackdropFilterAnimation(true); 65 style.setHasCurrentBackdropFilterAnimation(true);
66 } 66 }
67 } 67 }
68 68
69 if (style.hasCurrentOpacityAnimation()) 69 if (style.hasCurrentOpacityAnimation())
70 style.setIsRunningOpacityAnimationOnCompositor(m_animationStack.hasActiv eAnimationsOnCompositor(CSSPropertyOpacity)); 70 style.setIsRunningOpacityAnimationOnCompositor(m_animationStack.hasActiv eAnimationsOnCompositor(CSSPropertyOpacity));
71 if (style.hasCurrentTransformAnimation()) 71 if (style.hasCurrentTransformAnimation())
72 style.setIsRunningTransformAnimationOnCompositor(m_animationStack.hasAct iveAnimationsOnCompositor(CSSPropertyTransform)); 72 style.setIsRunningTransformAnimationOnCompositor(m_animationStack.hasAct iveAnimationsOnCompositor(CSSPropertyTransform));
73 if (style.hasCurrentFilterAnimation()) 73 if (style.hasCurrentFilterAnimation())
74 style.setIsRunningFilterAnimationOnCompositor(m_animationStack.hasActive AnimationsOnCompositor(CSSPropertyWebkitFilter)); 74 style.setIsRunningFilterAnimationOnCompositor(m_animationStack.hasActive AnimationsOnCompositor(CSSPropertyFilter));
75 if (style.hasCurrentBackdropFilterAnimation()) 75 if (style.hasCurrentBackdropFilterAnimation())
76 style.setIsRunningBackdropFilterAnimationOnCompositor(m_animationStack.h asActiveAnimationsOnCompositor(CSSPropertyBackdropFilter)); 76 style.setIsRunningBackdropFilterAnimationOnCompositor(m_animationStack.h asActiveAnimationsOnCompositor(CSSPropertyBackdropFilter));
77 } 77 }
78 78
79 void ElementAnimations::restartAnimationOnCompositor() 79 void ElementAnimations::restartAnimationOnCompositor()
80 { 80 {
81 for (const auto& entry : m_animations) 81 for (const auto& entry : m_animations)
82 entry.key->restartAnimationOnCompositor(); 82 entry.key->restartAnimationOnCompositor();
83 } 83 }
84 84
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w ithout forcing 122 // TODO(rune@opera.com): The FontFaceCache version number may be increased w ithout forcing
123 // a style recalc (see crbug.com/471079). ComputedStyle objects created with different cache 123 // a style recalc (see crbug.com/471079). ComputedStyle objects created with different cache
124 // versions will not be considered equal as Font::operator== will compare ve rsions, hence 124 // versions will not be considered equal as Font::operator== will compare ve rsions, hence
125 // ComputedStyle::operator== will return false. We avoid using baseComputedS tyle (the check for 125 // ComputedStyle::operator== will return false. We avoid using baseComputedS tyle (the check for
126 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT 126 // isFallbackValid()) in that case to avoid triggering the ComputedStyle com parison ASSERT
127 // in updateBaseComputedStyle. 127 // in updateBaseComputedStyle.
128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid()); 128 return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyl e->font().isFallbackValid());
129 } 129 }
130 130
131 } // namespace blink 131 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698