Title: [258154] branches/safari-609-branch/Source/WebCore
- Revision
- 258154
- Author
- [email protected]
- Date
- 2020-03-09 13:03:03 -0700 (Mon, 09 Mar 2020)
Log Message
Cherry-pick r257640. rdar://problem/60183771
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (258153 => 258154)
--- branches/safari-609-branch/Source/WebCore/ChangeLog 2020-03-09 20:02:59 UTC (rev 258153)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog 2020-03-09 20:03:03 UTC (rev 258154)
@@ -1,5 +1,39 @@
2020-03-09 Alan Coon <[email protected]>
+ Cherry-pick r257640. rdar://problem/60183771
+
+ 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):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-03-09 Alan Coon <[email protected]>
+
Cherry-pick r257746. rdar://problem/60183767
ScriptController::executeIfJavaScriptURL() uses wrong JSGlobalObject.
Modified: branches/safari-609-branch/Source/WebCore/animation/AnimationTimeline.cpp (258153 => 258154)
--- branches/safari-609-branch/Source/WebCore/animation/AnimationTimeline.cpp 2020-03-09 20:02:59 UTC (rev 258153)
+++ branches/safari-609-branch/Source/WebCore/animation/AnimationTimeline.cpp 2020-03-09 20:03:03 UTC (rev 258154)
@@ -447,7 +447,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.
@@ -455,9 +455,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;
}
}
}
@@ -467,17 +467,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