[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webkit-changes
Subject:    [webkit-changes] [259118] branches/safari-609.2.1.2-branch
From:       repstein () apple ! com
Date:       2020-03-27 16:37:08
Message-ID: 20200327163708.E6D1810051CB () svn ! webkit ! org
[Download RAW message or body]

[Attachment #2 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[259118] branches/safari-609.2.1.2-branch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt;  } #msg dl a { font-weight: \
bold} #msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
 #patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
                .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://trac.webkit.org/projects/webkit/changeset/259118">259118</a></dd> \
<dt>Author</dt> <dd>repstein@apple.com</dd> <dt>Date</dt> <dd>2020-03-27 09:37:08 \
-0700 (Fri, 27 Mar 2020)</dd> </dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/256627">r256627</a>. \
rdar://problem/60919944

    [Web Animations] Style changes due to Web Animations should not trigger CSS \
Transitions  https://bugs.webkit.org/show_bug.cgi?id=207760
    &lt;rdar://problem/59458111&gt;

    Reviewed by Simon Fraser.

    LayoutTests/imported/w3c:

    Mark Web Platform Tests progressions.

    * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
    * web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:
                
    * web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt:
                
    * web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt:


    Source/WebCore:

    While we would consider the unanimated style of CSS Animations specifically when \
considering what the &quot;start&quot; style values (before-change style in spec \
terminology)  should be when considering whether to start a CSS Transition during \
style resolution, we would not consider other types of animations, specifically \
JS-created Web  Animations. However, Web Platform Tests specifically test whether \
changes made using the Web Animations API may trigger transitions, and until now they \
would because  the RenderStyle used to determine the before-change style was the \
style from the previous resolution, which would include animated values.

    To fix this, we make it so that KeyframeEffect objects now keep a copy of the \
unanimated style used when blending animated values for the very first time. That \
style  is cleared each time keyframes change, which is rare, but may happen through \
the Web Animations API. Then in \
AnimationTimeline::updateCSSTransitionsForElementAndProperty(),  we look for a \
KeyframeEffect currently affecting the property for which we're considering starting \
a CSS Transition, and use its unanimated style.

    If that unanimated style has not been set yet, this is because the KeyframeEffect \
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.

    Finally, tracking the unanimated style at the KeyframeEffect level means we no \
longer to track it specifically for CSSAnimation.

    * animation/AnimationTimeline.cpp:
    (WebCore::keyframeEffectForElementAndProperty):
    (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
    * animation/AnimationTimeline.h:
    * animation/CSSAnimation.cpp:
    (WebCore::CSSAnimation::create):
    (WebCore::CSSAnimation::CSSAnimation):
    * animation/CSSAnimation.h:
    * animation/KeyframeEffect.cpp:
    (WebCore::KeyframeEffect::animatesProperty const): Because the backing \
KeyframeList object may not have been created by the first time we query a \
KeyframeEffect during  CSS Transitions resolution, we provide a method that will \
check the values provided by the Web Animations API to determine whether it targets a \
given CSS property.  (WebCore::KeyframeEffect::clearBlendingKeyframes):
    (WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
    (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
    (WebCore::KeyframeEffect::apply):
    * animation/KeyframeEffect.h:
    (WebCore::KeyframeEffect::unanimatedStyle const):
    * style/StyleTreeResolver.cpp:
    (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

    LayoutTests:

    Mark that a couple of tests are no longer flaky.

    * TestExpectations:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256627 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari609212branchLayoutTestsChangeLog">branches/safari-609.2.1.2-branch/LayoutTests/ChangeLog</a></li>
 <li><a href="#branchessafari609212branchLayoutTestsTestExpectations">branches/safari-609.2.1.2-branch/LayoutTests/TestExpectations</a></li>
 <li><a href="#branchessafari609212branchLayoutTestsimportedw3cChangeLog">branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/ChangeLog</a></li>
 <li><a href="#branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanim \
ationsinterfacesAnimatableanimateexpectedtxt">branches/safari-609.2.1.2-branch/LayoutT \
ests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt</a></li>
 <li><a href="#branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanim \
ationsinterfacesAnimationstylechangeeventsexpectedtxt">branches/safari-609.2.1.2-branc \
h/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt</a></li>
 <li><a href="#branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanim \
ationsinterfacesDocumentTimelinestylechangeeventsexpectedtxt">branches/safari-609.2.1. \
2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt</a></li>
 <li><a href="#branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanim \
ationsinterfacesKeyframeEffectstylechangeeventsexpectedtxt">branches/safari-609.2.1.2- \
branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt</a></li>
 <li><a href="#branchessafari609212branchSourceWebCoreChangeLog">branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog</a></li>
 <li><a href="#branchessafari609212branchSourceWebCoreanimationAnimationTimelinecpp">b \
ranches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.cpp</a></li>
 <li><a href="#branchessafari609212branchSourceWebCoreanimationAnimationTimelineh">bra \
nches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.h</a></li> \
<li><a href="#branchessafari609212branchSourceWebCoreanimationCSSAnimationcpp">branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.cpp</a></li>
 <li><a href="#branchessafari609212branchSourceWebCoreanimationCSSAnimationh">branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.h</a></li>
 <li><a href="#branchessafari609212branchSourceWebCoreanimationKeyframeEffectcpp">bran \
ches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.cpp</a></li> \
<li><a href="#branchessafari609212branchSourceWebCoreanimationKeyframeEffecth">branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.h</a></li>
 <li><a href="#branchessafari609212branchSourceWebCorestyleStyleTreeResolvercpp">branches/safari-609.2.1.2-branch/Source/WebCore/style/StyleTreeResolver.cpp</a></li>
 </ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari609212branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/ChangeLog (259117 => 259118)</h4> <pre \
class="diff"><span> <span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/ChangeLog	2020-03-27 16:37:01 UTC (rev \
                259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/ChangeLog	2020-03-27 16:37:08 UTC \
(rev 259118) </span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2020-03-27  Russell Epstein  &lt;repstein@apple.com&gt;
+
+        Cherry-pick r256627. rdar://problem/60919944
+
+    [Web Animations] Style changes due to Web Animations should not trigger CSS \
Transitions +    https://bugs.webkit.org/show_bug.cgi?id=207760
+    &lt;rdar://problem/59458111&gt;
+    
+    Reviewed by Simon Fraser.
+    
+    LayoutTests/imported/w3c:
+    
+    Mark Web Platform Tests progressions.
+    
+    * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
+    * web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt:
 +    
+    Source/WebCore:
+    
+    While we would consider the unanimated style of CSS Animations specifically when \
considering what the &quot;start&quot; style values (before-change style in spec \
terminology) +    should be when considering whether to start a CSS Transition during \
style resolution, we would not consider other types of animations, specifically \
JS-created Web +    Animations. However, Web Platform Tests specifically test whether \
changes made using the Web Animations API may trigger transitions, and until now they \
would because +    the RenderStyle used to determine the before-change style was the \
style from the previous resolution, which would include animated values. +    
+    To fix this, we make it so that KeyframeEffect objects now keep a copy of the \
unanimated style used when blending animated values for the very first time. That \
style +    is cleared each time keyframes change, which is rare, but may happen \
through the Web Animations API. Then in \
AnimationTimeline::updateCSSTransitionsForElementAndProperty(), +    we look for a \
KeyframeEffect currently affecting the property for which we're considering starting \
a CSS Transition, and use its unanimated style. +    
+    If that unanimated style has not been set yet, this is because the \
KeyframeEffect 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. +    
+    Finally, tracking the unanimated style at the KeyframeEffect level means we no \
longer to track it specifically for CSSAnimation. +    
+    * animation/AnimationTimeline.cpp:
+    (WebCore::keyframeEffectForElementAndProperty):
+    (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
+    * animation/AnimationTimeline.h:
+    * animation/CSSAnimation.cpp:
+    (WebCore::CSSAnimation::create):
+    (WebCore::CSSAnimation::CSSAnimation):
+    * animation/CSSAnimation.h:
+    * animation/KeyframeEffect.cpp:
+    (WebCore::KeyframeEffect::animatesProperty const): Because the backing \
KeyframeList object may not have been created by the first time we query a \
KeyframeEffect during +    CSS Transitions resolution, we provide a method that will \
check the values provided by the Web Animations API to determine whether it targets a \
given CSS property. +    (WebCore::KeyframeEffect::clearBlendingKeyframes):
+    (WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
+    (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
+    (WebCore::KeyframeEffect::apply):
+    * animation/KeyframeEffect.h:
+    (WebCore::KeyframeEffect::unanimatedStyle const):
+    * style/StyleTreeResolver.cpp:
+    (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
+    
+    LayoutTests:
+    
+    Mark that a couple of tests are no longer flaky.
+    
+    * TestExpectations:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256627 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc +
+    2020-02-14  Antoine Quint  &lt;graouts@webkit.org&gt;
+
+            [Web Animations] Style changes due to Web Animations should not trigger \
CSS Transitions +            https://bugs.webkit.org/show_bug.cgi?id=207760
+            &lt;rdar://problem/59458111&gt;
+
+            Reviewed by Simon Fraser.
+
+            Mark that a couple of tests are no longer flaky.
+
+            * TestExpectations:
+
</ins><span class="cx"> 2020-02-14  Russell Epstein  &lt;repstein@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r256623. rdar://problem/59478938
</span></span></pre></div>
<a id="branchessafari609212branchLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/TestExpectations (259117 => 259118)</h4> \
<pre class="diff"><span> <span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/TestExpectations	2020-03-27 16:37:01 UTC \
                (rev 259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/TestExpectations	2020-03-27 16:37:08 \
UTC (rev 259118) </span><span class="lines">@@ -2651,13 +2651,6 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/179069 \
imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/sandbox_032.htm \
[ Pass Failure ] </span><span class="cx"> 
</span><del>-webkit.org/b/202107 \
imported/w3c/web-platform-tests/web-animations/interfaces/Animation/style-change-events.html \
                [ Pass Failure ]
-webkit.org/b/202108 \
imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events.html \
                [ Pass Failure ]
-webkit.org/b/202109 \
imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events.html \
                [ Pass Failure ]
-
-webkit.org/b/157068 [ Debug ] \
                imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html [ \
                Pass Crash ]
-webkit.org/b/157068 [ Release ] \
                imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html [ \
                Pass Failure ]
-
</del><span class="cx"> http/tests/adClickAttribution [ Skip ]
</span><span class="cx"> 
</span><span class="cx"> # Application Manifest tests
</span></span></pre></div>
<a id="branchessafari609212branchLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/ChangeLog (259117 => \
259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/ChangeLog	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/ChangeLog	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -1,3 +1,82 @@
</span><ins>+2020-03-27  Russell Epstein  &lt;repstein@apple.com&gt;
+
+        Cherry-pick r256627. rdar://problem/60919944
+
+    [Web Animations] Style changes due to Web Animations should not trigger CSS \
Transitions +    https://bugs.webkit.org/show_bug.cgi?id=207760
+    &lt;rdar://problem/59458111&gt;
+    
+    Reviewed by Simon Fraser.
+    
+    LayoutTests/imported/w3c:
+    
+    Mark Web Platform Tests progressions.
+    
+    * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
+    * web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt:
 +    
+    Source/WebCore:
+    
+    While we would consider the unanimated style of CSS Animations specifically when \
considering what the &quot;start&quot; style values (before-change style in spec \
terminology) +    should be when considering whether to start a CSS Transition during \
style resolution, we would not consider other types of animations, specifically \
JS-created Web +    Animations. However, Web Platform Tests specifically test whether \
changes made using the Web Animations API may trigger transitions, and until now they \
would because +    the RenderStyle used to determine the before-change style was the \
style from the previous resolution, which would include animated values. +    
+    To fix this, we make it so that KeyframeEffect objects now keep a copy of the \
unanimated style used when blending animated values for the very first time. That \
style +    is cleared each time keyframes change, which is rare, but may happen \
through the Web Animations API. Then in \
AnimationTimeline::updateCSSTransitionsForElementAndProperty(), +    we look for a \
KeyframeEffect currently affecting the property for which we're considering starting \
a CSS Transition, and use its unanimated style. +    
+    If that unanimated style has not been set yet, this is because the \
KeyframeEffect 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. +    
+    Finally, tracking the unanimated style at the KeyframeEffect level means we no \
longer to track it specifically for CSSAnimation. +    
+    * animation/AnimationTimeline.cpp:
+    (WebCore::keyframeEffectForElementAndProperty):
+    (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
+    * animation/AnimationTimeline.h:
+    * animation/CSSAnimation.cpp:
+    (WebCore::CSSAnimation::create):
+    (WebCore::CSSAnimation::CSSAnimation):
+    * animation/CSSAnimation.h:
+    * animation/KeyframeEffect.cpp:
+    (WebCore::KeyframeEffect::animatesProperty const): Because the backing \
KeyframeList object may not have been created by the first time we query a \
KeyframeEffect during +    CSS Transitions resolution, we provide a method that will \
check the values provided by the Web Animations API to determine whether it targets a \
given CSS property. +    (WebCore::KeyframeEffect::clearBlendingKeyframes):
+    (WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
+    (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
+    (WebCore::KeyframeEffect::apply):
+    * animation/KeyframeEffect.h:
+    (WebCore::KeyframeEffect::unanimatedStyle const):
+    * style/StyleTreeResolver.cpp:
+    (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
+    
+    LayoutTests:
+    
+    Mark that a couple of tests are no longer flaky.
+    
+    * TestExpectations:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256627 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc +
+    2020-02-14  Antoine Quint  &lt;graouts@webkit.org&gt;
+
+            [Web Animations] Style changes due to Web Animations should not trigger \
CSS Transitions +            https://bugs.webkit.org/show_bug.cgi?id=207760
+            &lt;rdar://problem/59458111&gt;
+
+            Reviewed by Simon Fraser.
+
+            Mark Web Platform Tests progressions.
+
+            * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
 +            * web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:
 +            * web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt:
 +            * web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt:
 +
</ins><span class="cx"> 2020-02-14  Russell Epstein  &lt;repstein@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r256207. rdar://problem/59447263
</span></span></pre></div>
<a id="branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanimationsinterfacesAnimatableanimateexpectedtxt"></a>
 <div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt \
(259117 => 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -133,8 +133,12 @@
</span><span class="cx"> PASS Element.animate() correctly sets the Animation's \
timeline when triggered on an element in a different document  </span><span \
class="cx"> PASS Element.animate() calls play on the Animation  </span><span \
class="cx"> PASS Element.animate() does NOT trigger a style change event  \
                </span><del>-PASS CSSPseudoElement.animate() creates an Animation \
                object 
-FAIL CSSPseudoElement.animate() creates an Animation object for ::marker \
                assert_true: expected true got false
-PASS CSSPseudoElement.animate() creates an Animation object targeting to the correct \
                CSSPseudoElement object 
-FAIL CSSPseudoElement.animate() creates an Animation object targeting to the correct \
CSSPseudoElement object for ::marker assert_true: expected true got false \
</del><ins>+PASS animate() with pseudoElement parameter creates an Animation object  \
+PASS animate() with pseudoElement parameter without content creates an Animation \
object  +PASS animate() with pseudoElement parameter  creates an Animation object for \
::marker  +PASS animate() with pseudoElement parameter  creates an Animation object \
for ::first-line  +FAIL animate() with pseudoElement an Animation object targeting \
the correct pseudo-element assert_equals: The returned Animation targets the correct \
selector expected (string) &quot;::before&quot; but got (undefined) undefined +FAIL \
animate() with pseudoElement without content creates an Animation object targeting \
the correct pseudo-element assert_equals: The returned Animation targets the correct \
selector expected (string) &quot;::before&quot; but got (undefined) undefined +FAIL \
animate() with pseudoElement an Animation object targeting the correct pseudo-element \
for ::marker assert_equals: The returned Animation targets the correct selector \
expected (string) &quot;::marker&quot; but got (undefined) undefined +FAIL animate() \
with pseudoElement an Animation object targeting the correct pseudo-element for \
::first-line assert_equals: The returned Animation targets the correct selector \
expected (string) &quot;::first-line&quot; but got (undefined) undefined </ins><span \
class="cx">  </span></span></pre></div>
<a id="branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanimationsinterfacesAnimationstylechangeeventsexpectedtxt"></a>
 <div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt \
(259117 => 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -1,26 +1,26 @@
</span><span class="cx"> 
</span><span class="cx"> PASS All property keys are recognized 
</span><del>-FAIL Animation.id produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.effect produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.timeline produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.startTime produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.currentTime produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.playbackRate produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.playState produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.replaceState produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.pending produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.onfinish produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.oncancel produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.onremove produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.ready produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.finished produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.cancel produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.finish produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.play produces expected style change events assert_false: A transition \
                should NOT have been triggered expected false got true
-FAIL Animation.pause produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-FAIL Animation.updatePlaybackRate produces expected style change events \
                assert_false: A transition should NOT have been triggered expected \
                false got true
-FAIL Animation.reverse produces expected style change events assert_false: A \
                transition should NOT have been triggered expected false got true
-PASS Animation.persist produces expected style change events 
</del><ins>+PASS Animation.id produces expected style change events 
+PASS Animation.effect produces expected style change events 
+PASS Animation.timeline produces expected style change events 
+PASS Animation.startTime produces expected style change events 
+PASS Animation.currentTime produces expected style change events 
+PASS Animation.playbackRate produces expected style change events 
+PASS Animation.playState produces expected style change events 
+PASS Animation.replaceState produces expected style change events 
+PASS Animation.pending produces expected style change events 
+PASS Animation.onfinish produces expected style change events 
+PASS Animation.oncancel produces expected style change events 
+PASS Animation.onremove produces expected style change events 
+PASS Animation.ready produces expected style change events 
+PASS Animation.finished produces expected style change events 
+PASS Animation.cancel produces expected style change events 
+PASS Animation.finish produces expected style change events 
+PASS Animation.play produces expected style change events 
+PASS Animation.pause produces expected style change events 
+PASS Animation.updatePlaybackRate produces expected style change events 
+PASS Animation.reverse produces expected style change events 
+FAIL Animation.persist produces expected style change events assert_false: A \
transition should NOT have been triggered expected false got true </ins><span \
class="cx"> FAIL Animation.commitStyles produces expected style change events \
assert_true: A transition should have been triggered expected true got false \
</span><del>-FAIL Animation.Animation constructor produces expected style change \
events assert_false: A transition should NOT have been triggered expected false got \
true </del><ins>+PASS Animation.Animation constructor produces expected style change \
events  </ins><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanimationsinterfacesDocumentTimelinestylechangeeventsexpectedtxt"></a>
 <div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt \
(259117 => 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-a \
nimations/interfaces/DocumentTimeline/style-change-events-expected.txt	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><del>-FAIL DocumentTimeline.currentTime does NOT trigger a style change event \
                assert_false: A transition should NOT have been triggered expected \
                false got true
-FAIL DocumentTimeline constructor does NOT trigger a style change event \
assert_false: A transition should NOT have been triggered expected false got true \
</del><ins>+PASS DocumentTimeline.currentTime does NOT trigger a style change event  \
+PASS DocumentTimeline constructor does NOT trigger a style change event  </ins><span \
class="cx">  </span></span></pre></div>
<a id="branchessafari609212branchLayoutTestsimportedw3cwebplatformtestswebanimationsinterfacesKeyframeEffectstylechangeeventsexpectedtxt"></a>
 <div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt \
(259117 => 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS All property keys are recognized 
</del><ins>+FAIL All property keys are recognized assert_in_array: Test property \
'pseudoElement' should be one of the properties on  KeyframeEffect value \
&quot;pseudoElement&quot; not in array [&quot;getTiming&quot;, \
&quot;getComputedTiming&quot;, &quot;updateTiming&quot;, &quot;target&quot;, \
&quot;iterationComposite&quot;, &quot;composite&quot;, &quot;getKeyframes&quot;, \
&quot;setKeyframes&quot;, &quot;KeyframeEffect constructor&quot;, \
&quot;KeyframeEffect copy constructor&quot;] </ins><span class="cx"> PASS \
KeyframeEffect.getTiming does NOT trigger a style change event  </span><span \
class="cx"> PASS KeyframeEffect.getComputedTiming does NOT trigger a style change \
event  </span><span class="cx"> PASS KeyframeEffect.updateTiming does NOT trigger a \
style change event  </span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog (259117 => 259118)</h4> \
<pre class="diff"><span> <span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog	2020-03-27 16:37:01 UTC \
                (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog	2020-03-27 16:37:08 UTC \
(rev 259118) </span><span class="lines">@@ -1,43 +1,150 @@
</span><del>-b'2020-03-20  Alan Coon  &lt;alancoon@apple.com&gt;\n\n        \
Cherry-pick r258267. rdar://problem/60703602\n\n    Consolidate detachment of \
document timeline into Document::commonTeardown.\n    \
https://bugs.webkit.org/show_bug.cgi?id=208786\n    &lt;rdar://problem/59936716&gt;\n \
\n    Patch by Jack Lee &lt;shihchieh_lee@apple.com&gt; on 2020-03-11\n    Reviewed \
by Ryosuke Niwa.\n    \n    Move detachment of DocumentTimeline to \
Document::commonTeardown().\n    \n    No new tests. Covered by existing document \
tests.\n    \n    * dom/Document.cpp:\n    (WebCore::Document::removedLastRef):\n    \
(WebCore::Document::commonTeardown):\n    \
(WebCore::Document::prepareForDestruction):\n    \n    git-svn-id: \
https://svn.webkit.org/repository/webkit/trunk@258267 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-11  Jack Lee  \
&lt;shihchieh_lee@apple.com&gt;\n\n            Consolidate detachment of document \
                timeline into Document::commonTeardown.\n            \
                https://bugs.webkit
 .org/show_bug.cgi?id=208786\n            &lt;rdar://problem/59936716&gt;\n\n         \
Reviewed by Ryosuke Niwa.\n\n            Move detachment of DocumentTimeline to \
Document::commonTeardown().\n\n            No new tests. Covered by existing document \
tests.\n\n            * dom/Document.cpp:\n            \
(WebCore::Document::removedLastRef):\n            \
(WebCore::Document::commonTeardown):\n            \
(WebCore::Document::prepareForDestruction):\n\n'2020-03-17  Kocsen Chung  \
&lt;kocsen_chung@apple.com&gt; </del><ins>+2020-03-27  Russell Epstein  \
&lt;repstein@apple.com&gt; </ins><span class="cx"> 
</span><del>-        Cherry-pick r257746. rdar://problem/60260331
</del><ins>+        Cherry-pick r256627. rdar://problem/60919944
</ins><span class="cx"> 
</span><del>-    ScriptController::executeIfJavaScriptURL() uses wrong \
                JSGlobalObject.
-    https://bugs.webkit.org/show_bug.cgi?id=208290
-    &lt;rdar://problem/59839476&gt;
</del><ins>+    [Web Animations] Style changes due to Web Animations should not \
trigger CSS Transitions +    https://bugs.webkit.org/show_bug.cgi?id=207760
+    &lt;rdar://problem/59458111&gt;
</ins><span class="cx">     
</span><del>-    Reviewed by Chris Dumez.
</del><ins>+    Reviewed by Simon Fraser.
</ins><span class="cx">     
</span><del>-    The call to executeScriptIgnoringException() may have changed the \
                current global
-    object of the window.  We should be using the original global object that \
                produced
-    the result string.
</del><ins>+    LayoutTests/imported/w3c:
</ins><span class="cx">     
</span><del>-    Also added a missing exception check needed after a potential rope \
resolution. </del><ins>+    Mark Web Platform Tests progressions.
</ins><span class="cx">     
</span><del>-    * bindings/js/ScriptController.cpp:
-    (WebCore::ScriptController::executeIfJavaScriptURL):
</del><ins>+    * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/DocumentTimeline/style-change-events-expected.txt:
 +    * web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt:
 </ins><span class="cx">     
</span><ins>+    Source/WebCore:
</ins><span class="cx">     
</span><ins>+    While we would consider the unanimated style of CSS Animations \
specifically when considering what the &quot;start&quot; style values (before-change \
style in spec terminology) +    should be when considering whether to start a CSS \
Transition during style resolution, we would not consider other types of animations, \
specifically JS-created Web +    Animations. However, Web Platform Tests specifically \
test whether changes made using the Web Animations API may trigger transitions, and \
until now they would because +    the RenderStyle used to determine the before-change \
style was the style from the previous resolution, which would include animated \
values. </ins><span class="cx">     
</span><del>-    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257746 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc </del><ins>+    To fix this, we make it so that \
KeyframeEffect objects now keep a copy of the unanimated style used when blending \
animated values for the very first time. That style +    is cleared each time \
keyframes change, which is rare, but may happen through the Web Animations API. Then \
in AnimationTimeline::updateCSSTransitionsForElementAndProperty(), +    we look for a \
KeyframeEffect currently affecting the property for which we're considering starting \
a CSS Transition, and use its unanimated style. +    
+    If that unanimated style has not been set yet, this is because the \
KeyframeEffect 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. +    
+    Finally, tracking the unanimated style at the KeyframeEffect level means we no \
longer to track it specifically for CSSAnimation. +    
+    * animation/AnimationTimeline.cpp:
+    (WebCore::keyframeEffectForElementAndProperty):
+    (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
+    * animation/AnimationTimeline.h:
+    * animation/CSSAnimation.cpp:
+    (WebCore::CSSAnimation::create):
+    (WebCore::CSSAnimation::CSSAnimation):
+    * animation/CSSAnimation.h:
+    * animation/KeyframeEffect.cpp:
+    (WebCore::KeyframeEffect::animatesProperty const): Because the backing \
KeyframeList object may not have been created by the first time we query a \
KeyframeEffect during +    CSS Transitions resolution, we provide a method that will \
check the values provided by the Web Animations API to determine whether it targets a \
given CSS property. +    (WebCore::KeyframeEffect::clearBlendingKeyframes):
+    (WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
+    (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
+    (WebCore::KeyframeEffect::apply):
+    * animation/KeyframeEffect.h:
+    (WebCore::KeyframeEffect::unanimatedStyle const):
+    * style/StyleTreeResolver.cpp:
+    (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
+    
+    LayoutTests:
+    
+    Mark that a couple of tests are no longer flaky.
+    
+    * TestExpectations:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256627 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc </ins><span class="cx"> 
</span><del>-    2020-03-02  Mark Lam  &lt;mark.lam@apple.com&gt;
</del><ins>+    2020-02-14  Antoine Quint  &lt;graouts@webkit.org&gt;
</ins><span class="cx"> 
</span><del>-            ScriptController::executeIfJavaScriptURL() uses wrong \
                JSGlobalObject.
-            https://bugs.webkit.org/show_bug.cgi?id=208290
-            &lt;rdar://problem/59839476&gt;
</del><ins>+            [Web Animations] Style changes due to Web Animations should \
not trigger CSS Transitions +            \
https://bugs.webkit.org/show_bug.cgi?id=207760 +            \
&lt;rdar://problem/59458111&gt; </ins><span class="cx"> 
</span><del>-            Reviewed by Chris Dumez.
</del><ins>+            Reviewed by Simon Fraser.
</ins><span class="cx"> 
</span><del>-            The call to executeScriptIgnoringException() may have \
                changed the current global
-            object of the window.  We should be using the original global object \
                that produced
-            the result string.
</del><ins>+            While we would consider the unanimated style of CSS \
Animations specifically when considering what the &quot;start&quot; style values \
(before-change style in spec terminology) +            should be when considering \
whether to start a CSS Transition during style resolution, we would not consider \
other types of animations, specifically JS-created Web +            Animations. \
However, Web Platform Tests specifically test whether changes made using the Web \
Animations API may trigger transitions, and until now they would because +            \
the RenderStyle used to determine the before-change style was the style from the \
previous resolution, which would include animated values. </ins><span class="cx"> 
</span><del>-            Also added a missing exception check needed after a \
potential rope resolution. </del><ins>+            To fix this, we make it so that \
KeyframeEffect objects now keep a copy of the unanimated style used when blending \
animated values for the very first time. That style +            is cleared each time \
keyframes change, which is rare, but may happen through the Web Animations API. Then \
in AnimationTimeline::updateCSSTransitionsForElementAndProperty(), +            we \
look for a KeyframeEffect currently affecting the property for which we're \
considering starting a CSS Transition, and use its unanimated style. </ins><span \
class="cx">  </span><del>-            * bindings/js/ScriptController.cpp:
-            (WebCore::ScriptController::executeIfJavaScriptURL):
</del><ins>+            If that unanimated style has not been set yet, this is \
because the KeyframeEffect 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. </ins><span class="cx"> 
</span><ins>+            Finally, tracking the unanimated style at the KeyframeEffect \
level means we no longer to track it specifically for CSSAnimation. +
+            * animation/AnimationTimeline.cpp:
+            (WebCore::keyframeEffectForElementAndProperty):
+            (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
+            * animation/AnimationTimeline.h:
+            * animation/CSSAnimation.cpp:
+            (WebCore::CSSAnimation::create):
+            (WebCore::CSSAnimation::CSSAnimation):
+            * animation/CSSAnimation.h:
+            * animation/KeyframeEffect.cpp:
+            (WebCore::KeyframeEffect::animatesProperty const): Because the backing \
KeyframeList object may not have been created by the first time we query a \
KeyframeEffect during +            CSS Transitions resolution, we provide a method \
that will check the values provided by the Web Animations API to determine whether it \
targets a given CSS property. +            \
(WebCore::KeyframeEffect::clearBlendingKeyframes): +            \
(WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes): +            \
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes): +            \
(WebCore::KeyframeEffect::apply): +            * animation/KeyframeEffect.h:
+            (WebCore::KeyframeEffect::unanimatedStyle const):
+            * style/StyleTreeResolver.cpp:
+            (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
+
+    b'2020-03-20  Alan Coon  &lt;alancoon@apple.com&gt;\n\n        Cherry-pick \
r258267. rdar://problem/60703602\n\n    Consolidate detachment of document timeline \
into Document::commonTeardown.\n    https://bugs.webkit.org/show_bug.cgi?id=208786\n  \
&lt;rdar://problem/59936716&gt;\n    \n    Patch by Jack Lee \
&lt;shihchieh_lee@apple.com&gt; on 2020-03-11\n    Reviewed by Ryosuke Niwa.\n    \n  \
Move detachment of DocumentTimeline to Document::commonTeardown().\n    \n    No new \
tests. Covered by existing document tests.\n    \n    * dom/Document.cpp:\n    \
(WebCore::Document::removedLastRef):\n    (WebCore::Document::commonTeardown):\n    \
(WebCore::Document::prepareForDestruction):\n    \n    git-svn-id: \
https://svn.webkit.org/repository/webkit/trunk@258267 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-11  Jack Lee  \
&lt;shihchieh_lee@apple.com&gt;\n\n            Consolidate detachment of document \
timeline into Document::commonTeardown.\n            https://bugs.webkit.org/sho  \
w_bug.cgi?id=208786\n            &lt;rdar://problem/59936716&gt;\n\n            \
Reviewed by Ryosuke Niwa.\n\n            Move detachment of DocumentTimeline to \
Document::commonTeardown().\n\n            No new tests. Covered by existing document \
tests.\n\n            * dom/Document.cpp:\n            \
(WebCore::Document::removedLastRef):\n            \
(WebCore::Document::commonTeardown):\n            \
(WebCore::Document::prepareForDestruction):\n\n'2020-03-17  Kocsen Chung  \
&lt;kocsen_chung@apple.com&gt; +
+            Cherry-pick r257746. rdar://problem/60260331
+
+        ScriptController::executeIfJavaScriptURL() uses wrong JSGlobalObject.
+        https://bugs.webkit.org/show_bug.cgi?id=208290
+        &lt;rdar://problem/59839476&gt;
+
+        Reviewed by Chris Dumez.
+
+        The call to executeScriptIgnoringException() may have changed the current \
global +        object of the window.  We should be using the original global object \
that produced +        the result string.
+
+        Also added a missing exception check needed after a potential rope \
resolution. +
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::executeIfJavaScriptURL):
+
+
+
+        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257746 \
268f45cc-cd09-0410-ab3c-d52691b4dbfc +
+        2020-03-02  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+                ScriptController::executeIfJavaScriptURL() uses wrong \
JSGlobalObject. +                https://bugs.webkit.org/show_bug.cgi?id=208290
+                &lt;rdar://problem/59839476&gt;
+
+                Reviewed by Chris Dumez.
+
+                The call to executeScriptIgnoringException() may have changed the \
current global +                object of the window.  We should be using the \
original global object that produced +                the result string.
+
+                Also added a missing exception check needed after a potential rope \
resolution. +
+                * bindings/js/ScriptController.cpp:
+                (WebCore::ScriptController::executeIfJavaScriptURL):
+
</ins><span class="cx"> 2020-02-17  Alan Coon  &lt;alancoon@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Revert r256693. rdar://problem/59478981
</span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreanimationAnimationTimelinecpp"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.cpp \
(259117 => 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.cpp	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.cpp	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -352,15 +352,17 @@
</span><span class="cx">     \
keyframeEffectStack.setCSSAnimationList(currentAnimationList); </span><span \
class="cx"> } </span><span class="cx"> 
</span><del>-RefPtr&lt;WebAnimation&gt; \
AnimationTimeline::cssAnimationForElementAndProperty(Element&amp; element, \
CSSPropertyID property) </del><ins>+static KeyframeEffect* \
keyframeEffectForElementAndProperty(Element&amp; element, CSSPropertyID property) \
</ins><span class="cx"> { </span><del>-    RefPtr&lt;WebAnimation&gt; \
                matchingAnimation;
-    for (const auto&amp; animation : m_elementToCSSAnimationsMap.get(&amp;element)) \
                {
-        auto* effect = animation-&gt;effect();
-        if (is&lt;KeyframeEffect&gt;(effect) &amp;&amp; \
                downcast&lt;KeyframeEffect&gt;(effect)-&gt;animatedProperties().contains(property))
                
-            matchingAnimation = animation;
</del><ins>+    if (auto* keyframeEffectStack = element.keyframeEffectStack()) {
+        auto effects = keyframeEffectStack-&gt;sortedEffects();
+        for (const auto&amp; effect : makeReversedRange(effects)) {
+            if (effect-&gt;animatesProperty(property))
+                return effect.get();
+        }
</ins><span class="cx">     }
</span><del>-    return matchingAnimation;
</del><ins>+
+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool \
propertyInStyleMatchesValueForTransitionInMap(CSSPropertyID property, const \
RenderStyle&amp; style, AnimationTimeline::PropertyToTransitionMap&amp; transitions) \
</span><span class="lines">@@ -460,9 +462,21 @@ </span><span class="cx">             \
} </span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (auto existingAnimation = \
                cssAnimationForElementAndProperty(element, property))
-            return downcast&lt;CSSAnimation&gt;(existingAnimation.get())-&gt;unanimatedStyle();
 </del><ins>+        if (auto* keyframeEffect = \
keyframeEffectForElementAndProperty(element, property)) { +            // If we \
already have a keyframe effect targeting this property, we should use its unanimated \
style to determine what the potential +            // 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-&gt;unanimatedStyle())
+                return *unanimatedStyle;
</ins><span class="cx"> 
</span><ins>+            // 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;
+        }
+
+        // In any other scenario, the before-change style should be the previously \
resolved style for this element. </ins><span class="cx">         return currentStyle;
</span><span class="cx">     }();
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreanimationAnimationTimelineh"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.h (259117 \
=> 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.h	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/animation/AnimationTimeline.h	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -88,7 +88,6 @@
</span><span class="cx">     using ElementToCSSAnimationsMap = HashMap&lt;Element*, \
CSSAnimationCollection&gt;; </span><span class="cx"> 
</span><span class="cx">     void updateGlobalPosition(WebAnimation&amp;);
</span><del>-    RefPtr&lt;WebAnimation&gt; \
cssAnimationForElementAndProperty(Element&amp;, CSSPropertyID); </del><span \
class="cx">     PropertyToTransitionMap&amp; \
ensureRunningTransitionsByProperty(Element&amp;); </span><span class="cx">     void \
updateCSSTransitionsForElementAndProperty(Element&amp;, CSSPropertyID, const \
RenderStyle&amp; currentStyle, const RenderStyle&amp; afterChangeStyle, \
PropertyToTransitionMap&amp;, PropertyToTransitionMap&amp;, const MonotonicTime); \
</span><span class="cx">     void removeCSSAnimationCreatedByMarkup(Element&amp;, \
CSSAnimation&amp;); </span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreanimationCSSAnimationcpp"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.cpp (259117 => \
259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.cpp	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.cpp	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;CSSAnimation&gt; CSSAnimation::create(Element&amp; \
owningElement, const Animation&amp; backingAnimation, const RenderStyle* oldStyle, \
const RenderStyle&amp; newStyle) </span><span class="cx"> {
</span><del>-    auto result = adoptRef(*new CSSAnimation(owningElement, \
backingAnimation, newStyle)); </del><ins>+    auto result = adoptRef(*new \
CSSAnimation(owningElement, backingAnimation)); </ins><span class="cx">     \
result-&gt;initialize(oldStyle, newStyle); </span><span class="cx"> 
</span><span class="cx">     \
InspectorInstrumentation::didCreateWebAnimation(result.get()); </span><span \
class="lines">@@ -46,10 +46,9 @@ </span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSAnimation::CSSAnimation(Element&amp; element, const Animation&amp; \
backingAnimation, const RenderStyle&amp; unanimatedStyle) \
</del><ins>+CSSAnimation::CSSAnimation(Element&amp; element, const Animation&amp; \
backingAnimation) </ins><span class="cx">     : DeclarativeAnimation(element, \
backingAnimation) </span><span class="cx">     , \
m_animationName(backingAnimation.name()) </span><del>-    , \
m_unanimatedStyle(RenderStyle::clonePtr(unanimatedStyle)) </del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreanimationCSSAnimationh"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.h (259117 => \
259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.h	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/animation/CSSAnimation.h	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool isCSSAnimation() const override { return true; }
</span><span class="cx">     const String&amp; animationName() const { return \
m_animationName; } </span><del>-    const RenderStyle&amp; unanimatedStyle() const { \
return *m_unanimatedStyle; } </del><span class="cx"> 
</span><span class="cx">     ExceptionOr&lt;void&gt; bindingsPlay() final;
</span><span class="cx">     ExceptionOr&lt;void&gt; bindingsPause() final;
</span><span class="lines">@@ -51,10 +50,9 @@
</span><span class="cx">     void syncPropertiesWithBackingAnimation() final;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    CSSAnimation(Element&amp;, const Animation&amp;, const \
RenderStyle&amp;); </del><ins>+    CSSAnimation(Element&amp;, const Animation&amp;);
</ins><span class="cx"> 
</span><span class="cx">     String m_animationName;
</span><del>-    std::unique_ptr&lt;RenderStyle&gt; m_unanimatedStyle;
</del><span class="cx">     bool m_stickyPaused { false };
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreanimationKeyframeEffectcpp"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.cpp (259117 \
=> 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.cpp	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.cpp	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -769,6 +769,20 @@
</span><span class="cx">     setBlendingKeyframes(keyframeList);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool KeyframeEffect::animatesProperty(CSSPropertyID property) const
+{
+    if (!m_blendingKeyframes.isEmpty())
+        return m_blendingKeyframes.properties().contains(property);
+
+    for (auto&amp; keyframe : m_parsedKeyframes) {
+        for (auto keyframeProperty : keyframe.unparsedStyle.keys()) {
+            if (keyframeProperty == property)
+                return true;
+        }
+    }
+    return false;
+}
+
</ins><span class="cx"> bool KeyframeEffect::forceLayoutIfNeeded()
</span><span class="cx"> {
</span><span class="cx">     if (!m_needsForcedLayout || !m_target)
</span><span class="lines">@@ -790,6 +804,7 @@
</span><span class="cx"> void KeyframeEffect::clearBlendingKeyframes()
</span><span class="cx"> {
</span><span class="cx">     m_blendingKeyframesSource = \
BlendingKeyframesSource::WebAnimation; </span><ins>+    m_unanimatedStyle = nullptr;
</ins><span class="cx">     m_blendingKeyframes.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -908,12 +923,12 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(is&lt;DeclarativeAnimation&gt;(animation()));
</span><span class="cx">     if (is&lt;CSSAnimation&gt;(animation()))
</span><del>-        computeCSSAnimationBlendingKeyframes();
</del><ins>+        computeCSSAnimationBlendingKeyframes(newStyle);
</ins><span class="cx">     else if (is&lt;CSSTransition&gt;(animation()))
</span><span class="cx">         computeCSSTransitionBlendingKeyframes(oldStyle, \
newStyle); </span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void KeyframeEffect::computeCSSAnimationBlendingKeyframes()
</del><ins>+void KeyframeEffect::computeCSSAnimationBlendingKeyframes(const \
RenderStyle&amp; unanimatedStyle) </ins><span class="cx"> {
</span><span class="cx">     ASSERT(is&lt;CSSAnimation&gt;(animation()));
</span><span class="cx"> 
</span><span class="lines">@@ -922,7 +937,7 @@
</span><span class="cx"> 
</span><span class="cx">     KeyframeList keyframeList(backingAnimation.name());
</span><span class="cx">     if (auto* styleScope = \
Style::Scope::forOrdinal(*m_target, backingAnimation.nameStyleScopeOrdinal())) \
</span><del>-        styleScope-&gt;resolver().keyframeStylesForAnimation(*m_target, \
&amp;cssAnimation-&gt;unanimatedStyle(), keyframeList); </del><ins>+        \
styleScope-&gt;resolver().keyframeStylesForAnimation(*m_target, &amp;unanimatedStyle, \
keyframeList); </ins><span class="cx"> 
</span><span class="cx">     // Ensure resource loads for all the frames.
</span><span class="cx">     for (auto&amp; keyframe : keyframeList.keyframes()) {
</span><span class="lines">@@ -1089,6 +1104,9 @@
</span><span class="cx">     if (!computedTiming.progress)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    if (!m_unanimatedStyle)
+        m_unanimatedStyle = RenderStyle::clonePtr(targetStyle);
+
</ins><span class="cx">     setAnimatedPropertiesInStyle(targetStyle, \
computedTiming.progress.value()); </span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari609212branchSourceWebCoreanimationKeyframeEffecth"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.h (259117 => \
259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.h	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/animation/KeyframeEffect.h	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -144,6 +144,7 @@
</span><span class="cx">     void computeDeclarativeAnimationBlendingKeyframes(const \
RenderStyle* oldStyle, const RenderStyle&amp; newStyle); </span><span class="cx">     \
const KeyframeList&amp; blendingKeyframes() const { return m_blendingKeyframes; } \
</span><span class="cx">     const HashSet&lt;CSSPropertyID&gt;&amp; \
animatedProperties() const { return m_blendingKeyframes.properties(); } </span><ins>+ \
bool animatesProperty(CSSPropertyID) const; </ins><span class="cx"> 
</span><span class="cx">     bool computeExtentOfTransformAnimation(LayoutRect&amp;) \
const; </span><span class="cx">     bool \
computeTransformedExtentViaTransformList(const FloatRect&amp;, const \
RenderStyle&amp;, LayoutRect&amp;) const; </span><span class="lines">@@ -154,6 +155,8 \
@@ </span><span class="cx">     bool isCurrentlyAffectingProperty(CSSPropertyID, \
Accelerated = Accelerated::No) const; </span><span class="cx">     bool \
isRunningAcceleratedAnimationForProperty(CSSPropertyID) const; </span><span \
class="cx">  </span><ins>+    const RenderStyle* unanimatedStyle() const { return \
m_unanimatedStyle.get(); } +
</ins><span class="cx"> private:
</span><span class="cx">     KeyframeEffect(Element*);
</span><span class="cx"> 
</span><span class="lines">@@ -173,7 +176,7 @@
</span><span class="cx">     void computeStackingContextImpact();
</span><span class="cx">     void clearBlendingKeyframes();
</span><span class="cx">     void updateBlendingKeyframes(RenderStyle&amp;);
</span><del>-    void computeCSSAnimationBlendingKeyframes();
</del><ins>+    void computeCSSAnimationBlendingKeyframes(const RenderStyle&amp;);
</ins><span class="cx">     void computeCSSTransitionBlendingKeyframes(const \
RenderStyle* oldStyle, const RenderStyle&amp; newStyle); </span><span class="cx">     \
void computeAcceleratedPropertiesState(); </span><span class="cx">     void \
setBlendingKeyframes(KeyframeList&amp;); </span><span class="lines">@@ -190,6 +193,8 \
@@ </span><span class="cx">     Vector&lt;AcceleratedAction&gt; \
m_pendingAcceleratedActions; </span><span class="cx">     RefPtr&lt;Element&gt; \
m_target; </span><span class="cx"> 
</span><ins>+    std::unique_ptr&lt;const RenderStyle&gt; m_unanimatedStyle;
+
</ins><span class="cx">     AcceleratedAction m_lastRecordedAcceleratedAction { \
AcceleratedAction::Stop }; </span><span class="cx">     BlendingKeyframesSource \
m_blendingKeyframesSource { BlendingKeyframesSource::WebAnimation }; </span><span \
class="cx">     IterationCompositeOperation m_iterationCompositeOperation { \
IterationCompositeOperation::Replace }; </span></span></pre></div>
<a id="branchessafari609212branchSourceWebCorestyleStyleTreeResolvercpp"></a>
<div class="modfile"><h4>Modified: \
branches/safari-609.2.1.2-branch/Source/WebCore/style/StyleTreeResolver.cpp (259117 \
=> 259118)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/safari-609.2.1.2-branch/Source/WebCore/style/StyleTreeResolver.cpp	2020-03-27 \
                16:37:01 UTC (rev 259117)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/style/StyleTreeResolver.cpp	2020-03-27 \
16:37:08 UTC (rev 259118) </span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx"> ElementUpdate \
TreeResolver::createAnimatedElementUpdate(std::unique_ptr&lt;RenderStyle&gt; \
newStyle, Element&amp; element, Change parentChange) </span><span class="cx"> {
</span><span class="cx">     auto* oldStyle = element.renderOrDisplayContentsStyle();
</span><del>-    
</del><ins>+
</ins><span class="cx">     OptionSet&lt;AnimationImpact&gt; animationImpact;
</span><span class="cx"> 
</span><span class="cx">     // New code path for CSS Animations and CSS Transitions.
</span></span></pre>
</div>
</div>

</body>
</html>



_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic