Changeset 261488 in webkit
- Timestamp:
- May 11, 2020 12:37:24 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r261468 r261488 1 2020-05-11 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Document.getAnimations() should only consider document connection and not timeline association 4 https://bugs.webkit.org/show_bug.cgi?id=211697 5 6 Reviewed by Dean Jackson. 7 8 Mark two additional WPT tests as PASS. 9 10 * web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt: 11 1 12 2020-05-10 Rob Buis <rbuis@igalia.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt
r259577 r261488 5 5 PASS Document.getAnimations() does not return a disconnected node 6 6 PASS Document.getAnimations() does not return an animation with a null target 7 FAIL Document.getAnimations() returns animations on elements inside same-origin iframes assert_equals: expected 1 but got 0 8 FAIL iframe.contentDocument.getAnimations() returns animations on elements inside same-origin Document assert_equals: expected 1 but got 0 7 PASS Document.getAnimations() returns animations on elements inside same-origin iframes 8 PASS iframe.contentDocument.getAnimations() returns animations on elements inside same-origin Document 9 9 PASS ShadowRoot.getAnimations() return all animations in the shadow tree 10 10 PASS Document.getAnimations() does NOT return animations in shadow trees -
trunk/Source/WebCore/ChangeLog
r261487 r261488 1 2020-05-11 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Document.getAnimations() should only consider document connection and not timeline association 4 https://bugs.webkit.org/show_bug.cgi?id=211697 5 6 Reviewed by Dean Jackson. 7 8 The Document.getAnimations() function should return any animation running for an element that is a child of the 9 target Document. We now consider all current animations, regardless of which timeline they might be associated 10 with. This lets us pass the final two WPT Document.getAnimations() tests. 11 12 * dom/Document.cpp: 13 (WebCore::Document::matchingAnimations): 14 1 15 2020-05-11 Andres Gonzalez <andresg_22@apple.com> 2 16 -
trunk/Source/WebCore/dom/Document.cpp
r261470 r261488 8130 8130 updateStyleIfNeeded(); 8131 8131 8132 if (!m_timeline)8133 return { };8134 8135 8132 Vector<RefPtr<WebAnimation>> animations; 8136 for (auto & animation : m_timeline->relevantAnimations()) {8133 for (auto* animation : WebAnimation::instances()) { 8137 8134 if (!animation || !animation->isRelevant() || !is<KeyframeEffect>(animation->effect())) 8138 8135 continue; 8139 8136 8140 8137 auto* target = downcast<KeyframeEffect>(*animation->effect()).targetElementOrPseudoElement(); 8141 if (target && target->is DescendantOf(this)&& function(*target))8138 if (target && target->isConnected() && &target->document() == this && function(*target)) 8142 8139 animations.append(animation); 8143 8140 }
Note: See TracChangeset
for help on using the changeset viewer.