Title: [261488] trunk
- Revision
- 261488
- Author
- [email protected]
- Date
- 2020-05-11 12:37:24 -0700 (Mon, 11 May 2020)
Log Message
[Web Animations] Document.getAnimations() should only consider document connection and not timeline association
https://bugs.webkit.org/show_bug.cgi?id=211697
Patch by Antoine Quint <[email protected]> on 2020-05-11
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark two additional WPT tests as PASS.
* web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt:
Source/WebCore:
The Document.getAnimations() function should return any animation running for an element that is a child of the
target Document. We now consider all current animations, regardless of which timeline they might be associated
with. This lets us pass the final two WPT Document.getAnimations() tests.
* dom/Document.cpp:
(WebCore::Document::matchingAnimations):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261487 => 261488)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-05-11 19:37:14 UTC (rev 261487)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-05-11 19:37:24 UTC (rev 261488)
@@ -1,3 +1,14 @@
+2020-05-11 Antoine Quint <[email protected]>
+
+ [Web Animations] Document.getAnimations() should only consider document connection and not timeline association
+ https://bugs.webkit.org/show_bug.cgi?id=211697
+
+ Reviewed by Dean Jackson.
+
+ Mark two additional WPT tests as PASS.
+
+ * web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt:
+
2020-05-10 Rob Buis <[email protected]>
Fix base64.any.html test
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt (261487 => 261488)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt 2020-05-11 19:37:14 UTC (rev 261487)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt 2020-05-11 19:37:24 UTC (rev 261488)
@@ -4,8 +4,8 @@
PASS Document.getAnimations() returns script-generated animations in the order they were created
PASS Document.getAnimations() does not return a disconnected node
PASS Document.getAnimations() does not return an animation with a null target
-FAIL Document.getAnimations() returns animations on elements inside same-origin iframes assert_equals: expected 1 but got 0
-FAIL iframe.contentDocument.getAnimations() returns animations on elements inside same-origin Document assert_equals: expected 1 but got 0
+PASS Document.getAnimations() returns animations on elements inside same-origin iframes
+PASS iframe.contentDocument.getAnimations() returns animations on elements inside same-origin Document
PASS ShadowRoot.getAnimations() return all animations in the shadow tree
PASS Document.getAnimations() does NOT return animations in shadow trees
PASS ShadowRoot.getAnimations() does NOT return animations in parent document
Modified: trunk/Source/WebCore/ChangeLog (261487 => 261488)
--- trunk/Source/WebCore/ChangeLog 2020-05-11 19:37:14 UTC (rev 261487)
+++ trunk/Source/WebCore/ChangeLog 2020-05-11 19:37:24 UTC (rev 261488)
@@ -1,3 +1,17 @@
+2020-05-11 Antoine Quint <[email protected]>
+
+ [Web Animations] Document.getAnimations() should only consider document connection and not timeline association
+ https://bugs.webkit.org/show_bug.cgi?id=211697
+
+ Reviewed by Dean Jackson.
+
+ The Document.getAnimations() function should return any animation running for an element that is a child of the
+ target Document. We now consider all current animations, regardless of which timeline they might be associated
+ with. This lets us pass the final two WPT Document.getAnimations() tests.
+
+ * dom/Document.cpp:
+ (WebCore::Document::matchingAnimations):
+
2020-05-11 Andres Gonzalez <[email protected]>
Add implementation for AXIsolatedObject::elementPath, hasHighlighting, isBlockquote, isKeyboardFocusable.
Modified: trunk/Source/WebCore/dom/Document.cpp (261487 => 261488)
--- trunk/Source/WebCore/dom/Document.cpp 2020-05-11 19:37:14 UTC (rev 261487)
+++ trunk/Source/WebCore/dom/Document.cpp 2020-05-11 19:37:24 UTC (rev 261488)
@@ -8129,16 +8129,13 @@
// such as updates to CSS Animations and CSS Transitions.
updateStyleIfNeeded();
- if (!m_timeline)
- return { };
-
Vector<RefPtr<WebAnimation>> animations;
- for (auto& animation : m_timeline->relevantAnimations()) {
+ for (auto* animation : WebAnimation::instances()) {
if (!animation || !animation->isRelevant() || !is<KeyframeEffect>(animation->effect()))
continue;
auto* target = downcast<KeyframeEffect>(*animation->effect()).targetElementOrPseudoElement();
- if (target && target->isDescendantOf(this) && function(*target))
+ if (target && target->isConnected() && &target->document() == this && function(*target))
animations.append(animation);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes