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

Unified Diff: third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp

Issue 2043273002: Defer compositor keyframe snapshots until the next style resolve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
index 30e6198db0e66b3bf5adcdfb83ccaada296a964a..ab4703d3570cf134c0411892dfa8f1915a6bc060 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
@@ -78,15 +78,7 @@ bool KeyframeEffectModelBase::sample(int iteration, double fraction, double iter
return changed;
}
-void KeyframeEffectModelBase::forceConversionsToAnimatableValues(Element& element, const ComputedStyle* baseStyle)
-{
- ensureKeyframeGroups();
- // TODO(alancutter): Defer compositor keyframe snapshotting to style resolve to remove the Element and ComputedStyle dependency here.
- snapshotAllCompositorKeyframes(element, baseStyle);
- ensureInterpolationEffectPopulated();
-}
-
-bool KeyframeEffectModelBase::snapshotNeutralCompositorKeyframes(Element& element, const ComputedStyle& oldStyle, const ComputedStyle& newStyle)
+bool KeyframeEffectModelBase::snapshotNeutralCompositorKeyframes(Element& element, const ComputedStyle& oldStyle, const ComputedStyle& newStyle, const ComputedStyle* parentStyle) const
{
bool updated = false;
ensureKeyframeGroups();
@@ -98,14 +90,15 @@ bool KeyframeEffectModelBase::snapshotNeutralCompositorKeyframes(Element& elemen
continue;
for (auto& keyframe : keyframeGroup->m_keyframes) {
if (keyframe->isNeutral())
- updated |= keyframe->populateAnimatableValue(property, element, &newStyle, true);
+ updated |= keyframe->populateAnimatableValue(property, element, newStyle, parentStyle);
}
}
return updated;
}
-bool KeyframeEffectModelBase::snapshotAllCompositorKeyframes(Element& element, const ComputedStyle* baseStyle)
+bool KeyframeEffectModelBase::snapshotAllCompositorKeyframes(Element& element, const ComputedStyle& baseStyle, const ComputedStyle* parentStyle) const
{
+ m_needsCompositorKeyframesSnapshot = false;
bool updated = false;
ensureKeyframeGroups();
for (CSSPropertyID property : CompositorAnimations::compositableProperties) {
@@ -113,7 +106,7 @@ bool KeyframeEffectModelBase::snapshotAllCompositorKeyframes(Element& element, c
if (!keyframeGroup)
continue;
for (auto& keyframe : keyframeGroup->m_keyframes)
- updated |= keyframe->populateAnimatableValue(property, element, baseStyle, true);
+ updated |= keyframe->populateAnimatableValue(property, element, baseStyle, parentStyle);
}
return updated;
}

Powered by Google App Engine
This is Rietveld 408576698