Bug 183917 - [Web Animations] Support "transition: all" for CSS Transitions as Web Animations
Summary: [Web Animations] Support "transition: all" for CSS Transitions as Web Animations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-22 14:38 PDT by Antoine Quint
Modified: 2018-03-23 04:44 PDT (History)
3 users (show)

See Also:


Attachments
Patch (23.97 KB, patch)
2018-03-22 14:51 PDT, Antoine Quint
dino: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews205 for win-future (12.15 MB, application/zip)
2018-03-22 17:12 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2018-03-22 14:38:26 PDT
[Web Animations] Support "transition: all" for CSS Transitions as Web Animations
Comment 1 Antoine Quint 2018-03-22 14:51:34 PDT
Created attachment 336315 [details]
Patch
Comment 2 EWS Watchlist 2018-03-22 17:11:57 PDT
Comment on attachment 336315 [details]
Patch

Attachment 336315 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7068084

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
Comment 3 EWS Watchlist 2018-03-22 17:12:08 PDT
Created attachment 336339 [details]
Archive of layout-test-results from ews205 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews205  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 4 Dean Jackson 2018-03-23 04:08:07 PDT
Comment on attachment 336315 [details]
Patch

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

> Source/WebCore/animation/AnimationTimeline.cpp:245
> +            for (int propertyIndex = 0; propertyIndex < CSSPropertyAnimation::getNumProperties(); ++propertyIndex) {

Maybe use a variable to hold getNumProperties()?

> Source/WebCore/animation/AnimationTimeline.cpp:247
> +                    // Get the next property which is not a shorthand.

I think this comment is slightly misleading. It should be // Ignore this property if it is a shorthand.
but that's actually obvious from the code.

> Source/WebCore/animation/AnimationTimeline.cpp:255
> +                } else if (propertyIndex) {
> +                    // We only go once through this loop if we are transitioning a single property.
> +                    break;
> +                }

This logic is a bit hard to understand. I wonder if it would be easier to split the all and individual cases, to avoid having the strange step of breaking the loop after one iteration. It seems like you've made an effort to avoid duplicating code, but at the expense of being able to work out what's happening.

Anyway, I hope you can think of a more clear way to express what is happening here.
Comment 5 Antoine Quint 2018-03-23 04:33:59 PDT
(In reply to Dean Jackson from comment #4)
> Comment on attachment 336315 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=336315&action=review
> 
> > Source/WebCore/animation/AnimationTimeline.cpp:245
> > +            for (int propertyIndex = 0; propertyIndex < CSSPropertyAnimation::getNumProperties(); ++propertyIndex) {
> 
> Maybe use a variable to hold getNumProperties()?

Sure, will fix in commit.

> > Source/WebCore/animation/AnimationTimeline.cpp:247
> > +                    // Get the next property which is not a shorthand.
> 
> I think this comment is slightly misleading. It should be // Ignore this
> property if it is a shorthand.
> but that's actually obvious from the code.

Will remove entirely, it is obvious.

> > Source/WebCore/animation/AnimationTimeline.cpp:255
> > +                } else if (propertyIndex) {
> > +                    // We only go once through this loop if we are transitioning a single property.
> > +                    break;
> > +                }
> 
> This logic is a bit hard to understand. I wonder if it would be easier to
> split the all and individual cases, to avoid having the strange step of
> breaking the loop after one iteration. It seems like you've made an effort
> to avoid duplicating code, but at the expense of being able to work out
> what's happening.
> 
> Anyway, I hope you can think of a more clear way to express what is
> happening here.

Will try to improve the comment.
Comment 6 Antoine Quint 2018-03-23 04:42:38 PDT
Committed r229888: <https://trac.webkit.org/changeset/229888>
Comment 7 Radar WebKit Bug Importer 2018-03-23 04:44:17 PDT
<rdar://problem/38789890>