Title: [291675] branches/safari-613-branch
- Revision
- 291675
- Author
- [email protected]
- Date
- 2022-03-22 10:57:24 -0700 (Tue, 22 Mar 2022)
Log Message
Cherry-pick r291527. rdar://problem/88857731
Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88857731
Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.
LayoutTests/imported/w3c:
Import relevant WPT tests that had already been upstreamed in a previous, reverted
version of this patch.
* web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
* web-platform-tests/css/css-animations/dialog-animation.html: Added.
* web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
* web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
* web-platform-tests/css/css-animations/support/testcommon.js:
(addElement):
(addDiv):
Source/WebCore:
Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.
The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to `display: none`. We now call setAnimationsCreatedByMarkup
to correctly clear such state both when we identify a Styleable is newly getting
`display: none`. We do the same when cancelDeclarativeAnimations() is called, but also
call setCSSAnimationList() on the associated effect stack since that wasn't done either.
Now both functions do similar cleanup.
This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
to clear CSS Animation state per-animation when we only ever used that function for
_all_ animations.
The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().
Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
empty list doesn't end up creating an ElementAnimationRareData object if there was no
pre-existing object and the list of animations are empty.
Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html
imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html
* dom/Element.cpp:
(WebCore::Element::removeFromTopLayer):
(WebCore::Element::setAnimationsCreatedByMarkup):
* style/Styleable.cpp:
(WebCore::Styleable::cancelDeclarativeAnimations const):
(WebCore::Styleable::updateCSSAnimations const):
(WebCore::removeCSSAnimationCreatedByMarkup): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (291674 => 291675)
--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog 2022-03-22 17:57:20 UTC (rev 291674)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog 2022-03-22 17:57:24 UTC (rev 291675)
@@ -1,5 +1,86 @@
2022-03-21 Alan Coon <[email protected]>
+ Cherry-pick r291527. rdar://problem/88857731
+
+ Dialog element only animates once
+ https://bugs.webkit.org/show_bug.cgi?id=236274
+ rdar://88857731
+
+ Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.
+
+ LayoutTests/imported/w3c:
+
+ Import relevant WPT tests that had already been upstreamed in a previous, reverted
+ version of this patch.
+
+ * web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
+ * web-platform-tests/css/css-animations/dialog-animation.html: Added.
+ * web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
+ * web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
+ * web-platform-tests/css/css-animations/support/testcommon.js:
+ (addElement):
+ (addDiv):
+
+ Source/WebCore:
+
+ Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
+ and its ::backdrop as the dialog is open and eventually re-opened.
+
+ The first issue was that we didn't clear all CSS Animations state when a <dialog> was
+ closed and its style was set to `display: none`. We now call setAnimationsCreatedByMarkup
+ to correctly clear such state both when we identify a Styleable is newly getting
+ `display: none`. We do the same when cancelDeclarativeAnimations() is called, but also
+ call setCSSAnimationList() on the associated effect stack since that wasn't done either.
+ Now both functions do similar cleanup.
+
+ This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
+ to clear CSS Animation state per-animation when we only ever used that function for
+ _all_ animations.
+
+ The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
+ We now do that inside of Element::removeFromTopLayer() at a point where the code in
+ Styleable::fromRenderer() will still work as the element will still be contained in
+ Document::topLayerElements().
+
+ Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
+ empty list doesn't end up creating an ElementAnimationRareData object if there was no
+ pre-existing object and the list of animations are empty.
+
+ Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html
+ imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::removeFromTopLayer):
+ (WebCore::Element::setAnimationsCreatedByMarkup):
+ * style/Styleable.cpp:
+ (WebCore::Styleable::cancelDeclarativeAnimations const):
+ (WebCore::Styleable::updateCSSAnimations const):
+ (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-19 Antoine Quint <[email protected]>
+
+ Dialog element only animates once
+ https://bugs.webkit.org/show_bug.cgi?id=236274
+ rdar://88857731
+
+ Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.
+
+ Import relevant WPT tests that had already been upstreamed in a previous, reverted
+ version of this patch.
+
+ * web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
+ * web-platform-tests/css/css-animations/dialog-animation.html: Added.
+ * web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
+ * web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
+ * web-platform-tests/css/css-animations/support/testcommon.js:
+ (addElement):
+ (addDiv):
+
+2022-03-21 Alan Coon <[email protected]>
+
Cherry-pick r291303. rdar://problem/72432683
background-clip:text doesn't work with display:flex
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (291674 => 291675)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-22 17:57:20 UTC (rev 291674)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-22 17:57:24 UTC (rev 291675)
@@ -1,5 +1,109 @@
2022-03-21 Alan Coon <[email protected]>
+ Cherry-pick r291527. rdar://problem/88857731
+
+ Dialog element only animates once
+ https://bugs.webkit.org/show_bug.cgi?id=236274
+ rdar://88857731
+
+ Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.
+
+ LayoutTests/imported/w3c:
+
+ Import relevant WPT tests that had already been upstreamed in a previous, reverted
+ version of this patch.
+
+ * web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
+ * web-platform-tests/css/css-animations/dialog-animation.html: Added.
+ * web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
+ * web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
+ * web-platform-tests/css/css-animations/support/testcommon.js:
+ (addElement):
+ (addDiv):
+
+ Source/WebCore:
+
+ Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
+ and its ::backdrop as the dialog is open and eventually re-opened.
+
+ The first issue was that we didn't clear all CSS Animations state when a <dialog> was
+ closed and its style was set to `display: none`. We now call setAnimationsCreatedByMarkup
+ to correctly clear such state both when we identify a Styleable is newly getting
+ `display: none`. We do the same when cancelDeclarativeAnimations() is called, but also
+ call setCSSAnimationList() on the associated effect stack since that wasn't done either.
+ Now both functions do similar cleanup.
+
+ This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
+ to clear CSS Animation state per-animation when we only ever used that function for
+ _all_ animations.
+
+ The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
+ We now do that inside of Element::removeFromTopLayer() at a point where the code in
+ Styleable::fromRenderer() will still work as the element will still be contained in
+ Document::topLayerElements().
+
+ Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
+ empty list doesn't end up creating an ElementAnimationRareData object if there was no
+ pre-existing object and the list of animations are empty.
+
+ Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html
+ imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::removeFromTopLayer):
+ (WebCore::Element::setAnimationsCreatedByMarkup):
+ * style/Styleable.cpp:
+ (WebCore::Styleable::cancelDeclarativeAnimations const):
+ (WebCore::Styleable::updateCSSAnimations const):
+ (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-19 Antoine Quint <[email protected]>
+
+ Dialog element only animates once
+ https://bugs.webkit.org/show_bug.cgi?id=236274
+ rdar://88857731
+
+ Reviewed by Dean Jackson, Tim Nguyen and Antti Koivisto.
+
+ Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
+ and its ::backdrop as the dialog is open and eventually re-opened.
+
+ The first issue was that we didn't clear all CSS Animations state when a <dialog> was
+ closed and its style was set to `display: none`. We now call setAnimationsCreatedByMarkup
+ to correctly clear such state both when we identify a Styleable is newly getting
+ `display: none`. We do the same when cancelDeclarativeAnimations() is called, but also
+ call setCSSAnimationList() on the associated effect stack since that wasn't done either.
+ Now both functions do similar cleanup.
+
+ This allows us to remove removeCSSAnimationCreatedByMarkup() which did a fair bit of work
+ to clear CSS Animation state per-animation when we only ever used that function for
+ _all_ animations.
+
+ The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
+ We now do that inside of Element::removeFromTopLayer() at a point where the code in
+ Styleable::fromRenderer() will still work as the element will still be contained in
+ Document::topLayerElements().
+
+ Finally, we need to be sure that calling Element::setAnimationsCreatedByMarkup() with an
+ empty list doesn't end up creating an ElementAnimationRareData object if there was no
+ pre-existing object and the list of animations are empty.
+
+ Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html
+ imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::removeFromTopLayer):
+ (WebCore::Element::setAnimationsCreatedByMarkup):
+ * style/Styleable.cpp:
+ (WebCore::Styleable::cancelDeclarativeAnimations const):
+ (WebCore::Styleable::updateCSSAnimations const):
+ (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.
+
+2022-03-21 Alan Coon <[email protected]>
+
Cherry-pick r291451. rdar://problem/89940620
[Apple Pay] REGRESSION(r283431): `HAVE_PASSKIT_PAYMENT_METHOD_BILLING_ADDRESS` was removed without also removing where it was used
Modified: branches/safari-613-branch/Source/WebCore/dom/Element.cpp (291674 => 291675)
--- branches/safari-613-branch/Source/WebCore/dom/Element.cpp 2022-03-22 17:57:20 UTC (rev 291674)
+++ branches/safari-613-branch/Source/WebCore/dom/Element.cpp 2022-03-22 17:57:24 UTC (rev 291675)
@@ -4052,6 +4052,8 @@
void Element::setAnimationsCreatedByMarkup(PseudoId pseudoId, CSSAnimationCollection&& animations)
{
+ if (animations.isEmpty() && !animationRareData(pseudoId))
+ return;
ensureAnimationRareData(pseudoId).setAnimationsCreatedByMarkup(WTFMove(animations));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes