Bug 255758 - AX: Play Animation and Pause Animation actions don't appear for animations with a link parent element
Summary: AX: Play Animation and Pause Animation actions don't appear for animations wi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-20 18:56 PDT by Tyler Wilcock
Modified: 2023-04-24 11:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (38.18 KB, patch)
2023-04-20 19:21 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (38.30 KB, patch)
2023-04-20 20:32 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (38.15 KB, patch)
2023-04-20 20:41 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (37.99 KB, patch)
2023-04-21 16:12 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2023-04-20 18:56:21 PDT
Example demonstrating this:

<a href="#foo">
    <img src="animated-red-green-blue-repeat-infinite.gif" width="223" height="223" alt="Alt text">
</a>
Comment 1 Radar WebKit Bug Importer 2023-04-20 18:56:50 PDT
<rdar://problem/108350118>
Comment 2 Tyler Wilcock 2023-04-20 19:21:43 PDT
Created attachment 466022 [details]
Patch
Comment 3 Tyler Wilcock 2023-04-20 20:32:21 PDT
Created attachment 466025 [details]
Patch
Comment 4 Tyler Wilcock 2023-04-20 20:41:59 PDT
Created attachment 466026 [details]
Patch
Comment 5 chris fleizach 2023-04-21 15:19:32 PDT
Comment on attachment 466026 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=466026&action=review

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:545
> +                [actions addObject:[_WKElementAction _elementActionWithType:_WKElementActionPauseAnimation info:elementInfo assistant:self]];

can we write these 4 lines as

[actions addObject:[_WKElementAction _elementActionWithType:elementInfo.isAnimating ? _WKElementActionPauseAnimation : _WKElementActionPlayAnimation  info:elementInfo assistant:self]];

> Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm:379
> +#if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL)

does this function need to be guarded by animation control? seems generic
Comment 6 Tyler Wilcock 2023-04-21 16:12:13 PDT
Created attachment 466037 [details]
Patch
Comment 7 Tyler Wilcock 2023-04-21 16:18:47 PDT
(In reply to chris fleizach from comment #5)
> Comment on attachment 466026 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=466026&action=review
> 
> > Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:545
> > +                [actions addObject:[_WKElementAction _elementActionWithType:_WKElementActionPauseAnimation info:elementInfo assistant:self]];
> 
> can we write these 4 lines as
> 
> [actions addObject:[_WKElementAction
> _elementActionWithType:elementInfo.isAnimating ?
> _WKElementActionPauseAnimation : _WKElementActionPlayAnimation 
> info:elementInfo assistant:self]];
Yeah, that's nicer, thanks. Fixed in latest patch.

> > Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm:379
> > +#if ENABLE(ACCESSIBILITY_ANIMATION_CONTROL)
> 
> does this function need to be guarded by animation control? seems generic
Since it's only used with ENABLE(ACCESSIBILITY_ANIMATION_CONTROL), I believe un-guarding it would cause an unused static function warning for other platforms.
Comment 8 EWS 2023-04-24 11:37:50 PDT
Committed 263323@main (9a8207739bc9): <https://commits.webkit.org/263323@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 466037 [details].