Changeset 290122 in webkit
- Timestamp:
- Feb 18, 2022 7:35:59 AM (5 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/webanimations/custom-effect/custom-effect-get-animations-expected.txt (added)
-
LayoutTests/webanimations/custom-effect/custom-effect-get-animations.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r290121 r290122 1 2022-02-18 Antoine Quint <graouts@webkit.org> 2 3 [custom-effect] Animations associated with a custom effect should appear in document.getAnimations() result 4 https://bugs.webkit.org/show_bug.cgi?id=236828 5 6 Reviewed by Dean Jackson. 7 8 * webanimations/custom-effect/custom-effect-get-animations-expected.txt: Added. 9 * webanimations/custom-effect/custom-effect-get-animations.html: Added. 10 1 11 2022-02-18 Antoine Quint <graouts@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r290121 r290122 1 2022-02-18 Antoine Quint <graouts@webkit.org> 2 3 [custom-effect] Animations associated with a custom effect should appear in document.getAnimations() result 4 https://bugs.webkit.org/show_bug.cgi?id=236828 5 6 Reviewed by Dean Jackson. 7 8 Test: webanimations/custom-effect/custom-effect-get-animations.html 9 10 * dom/Document.cpp: 11 (WebCore::Document::matchingAnimations): 12 1 13 2022-02-18 Antoine Quint <graouts@webkit.org> 2 14 -
trunk/Source/WebCore/dom/Document.cpp
r290116 r290122 54 54 #include "ContentfulPaintChecker.h" 55 55 #include "CookieJar.h" 56 #include "CustomEffect.h" 56 57 #include "CustomElementReactionQueue.h" 57 58 #include "CustomElementRegistry.h" … … 8516 8517 8517 8518 Vector<RefPtr<WebAnimation>> animations; 8519 8520 auto effectCanBeListed = [&](AnimationEffect* effect) { 8521 if (is<CustomEffect>(effect)) 8522 return true; 8523 8524 if (auto* keyframeEffect = dynamicDowncast<KeyframeEffect>(effect)) { 8525 auto* target = keyframeEffect->target(); 8526 return target && target->isConnected() && &target->document() == this && function(*target); 8527 } 8528 8529 return false; 8530 }; 8531 8518 8532 for (auto* animation : WebAnimation::instances()) { 8519 if (!animation->isRelevant() || !is<KeyframeEffect>(animation->effect())) 8520 continue; 8521 8522 auto* target = downcast<KeyframeEffect>(*animation->effect()).target(); 8523 if (target && target->isConnected() && &target->document() == this && function(*target)) 8533 if (animation->isRelevant() && effectCanBeListed(animation->effect())) 8524 8534 animations.append(animation); 8525 8535 }
Note: See TracChangeset
for help on using the changeset viewer.