Title: [257983] releases/WebKitGTK/webkit-2.28/Source/WebCore
- Revision
- 257983
- Author
- [email protected]
- Date
- 2020-03-06 06:28:07 -0800 (Fri, 06 Mar 2020)
Log Message
Merge r257640 - updateCSSTransitionsForElementAndProperty should clone RenderStyles
https://bugs.webkit.org/show_bug.cgi?id=208356
rdar://59869560
Reviewed by Antti Koivisto.
Make ownership of the local variable clear by cloning the RenderStyles
used in updateCSSTransitionsForElementAndProperty rather than referencing
different versions.
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog (257982 => 257983)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-03-06 14:28:03 UTC (rev 257982)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-03-06 14:28:07 UTC (rev 257983)
@@ -1,3 +1,18 @@
+2020-02-28 Dean Jackson <[email protected]>
+
+ updateCSSTransitionsForElementAndProperty should clone RenderStyles
+ https://bugs.webkit.org/show_bug.cgi?id=208356
+ rdar://59869560
+
+ Reviewed by Antti Koivisto.
+
+ Make ownership of the local variable clear by cloning the RenderStyles
+ used in updateCSSTransitionsForElementAndProperty rather than referencing
+ different versions.
+
+ * animation/AnimationTimeline.cpp:
+ (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
+
2020-02-28 Chris Dumez <[email protected]>
Retain cycle between CSSFontSelector -> CSSFontFaceSet -> CSSFontFace -> CSSFontSelector
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/animation/AnimationTimeline.cpp (257982 => 257983)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/animation/AnimationTimeline.cpp 2020-03-06 14:28:03 UTC (rev 257982)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/animation/AnimationTimeline.cpp 2020-03-06 14:28:07 UTC (rev 257983)
@@ -459,7 +459,7 @@
// Define the before-change style as the computed values of all properties on the element as of the previous style change event, except with
// any styles derived from declarative animations such as CSS Transitions, CSS Animations, and SMIL Animations updated to the current time.
bool hasRunningTransition = runningTransitionsByProperty.contains(property);
- auto& beforeChangeStyle = [&]() -> const RenderStyle& {
+ auto beforeChangeStyle = [&]() {
if (hasRunningTransition && CSSPropertyAnimation::animationOfPropertyIsAccelerated(property)) {
// In case we have an accelerated transition running for this element, we need to get its computed style as the before-change style
// since otherwise the animated value for that property won't be visible.
@@ -467,9 +467,9 @@
if (is<KeyframeEffect>(runningTransition->effect())) {
auto& keyframeEffect = *downcast<KeyframeEffect>(runningTransition->effect());
if (keyframeEffect.isRunningAccelerated()) {
- auto animatedStyle = RenderStyle::clonePtr(currentStyle);
- runningTransition->resolve(*animatedStyle);
- return *animatedStyle;
+ auto animatedStyle = RenderStyle::clone(currentStyle);
+ runningTransition->resolve(animatedStyle);
+ return animatedStyle;
}
}
}
@@ -479,17 +479,17 @@
// start value of the transition shoud be to make sure that we don't account for animated values that would have been blended onto
// the style applied during the last style resolution.
if (auto* unanimatedStyle = keyframeEffect->unanimatedStyle())
- return *unanimatedStyle;
+ return RenderStyle::clone(*unanimatedStyle);
// If we have a keyframe effect targeting this property, but it doesn't yet have an unanimated style, this is because it has not
// had a chance to apply itself with a non-null progress. In this case, the before-change and after-change styles should be the
// same in order to prevent a transition from being triggered as the unanimated style for this keyframe effect will most likely
// be this after-change style, or any future style change that may happen before the keyframe effect starts blending animated values.
- return afterChangeStyle;
+ return RenderStyle::clone(afterChangeStyle);
}
// In any other scenario, the before-change style should be the previously resolved style for this element.
- return currentStyle;
+ return RenderStyle::clone(currentStyle);
}();
if (!hasRunningTransition
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes