Bug 234872 - Refactor computed style code for transition-property and the transition shorthand
Summary: Refactor computed style code for transition-property and the transition short...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-05 01:20 PST by Antoine Quint
Modified: 2022-03-17 10:53 PDT (History)
11 users (show)

See Also:


Attachments
Patch (5.78 KB, patch)
2022-01-05 01:22 PST, Antoine Quint
koivisto: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (9.41 KB, patch)
2022-01-05 05:41 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2022-01-05 01:20:55 PST
Refactor computed style code for transition-property and the transition shorthand
Comment 1 Antoine Quint 2022-01-05 01:22:17 PST
Created attachment 448366 [details]
Patch
Comment 2 Antti Koivisto 2022-01-05 02:48:23 PST
Comment on attachment 448366 [details]
Patch

looks like some rebasing is needed
Comment 3 Antoine Quint 2022-01-05 05:41:31 PST
Created attachment 448382 [details]
Patch for landing
Comment 4 Darin Adler 2022-01-05 12:57:42 PST
Comment on attachment 448382 [details]
Patch for landing

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

> LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt:35
> -FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "all 0s ease 0s" but got "transform 1s ease 0s"
> +FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "" but got "transform 1s ease 0s"

Does this change make sense? Why did the *expected* value change?
Comment 5 Antoine Quint 2022-01-05 13:44:19 PST
(In reply to Darin Adler from comment #4)
> Comment on attachment 448382 [details]
> Patch for landing
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=448382&action=review
> 
> > LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt:35
> > -FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "all 0s ease 0s" but got "transform 1s ease 0s"
> > +FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "" but got "transform 1s ease 0s"
> 
> Does this change make sense? Why did the *expected* value change?

I'll double check, but I think the expected string is created dynamically by getting the computed style of a non-pseudo element, which would explain this behavior.
Comment 6 Antoine Quint 2022-01-05 13:48:52 PST
(In reply to Antoine Quint from comment #5)
> (In reply to Darin Adler from comment #4)
> > Comment on attachment 448382 [details]
> > Patch for landing
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=448382&action=review
> > 
> > > LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt:35
> > > -FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "all 0s ease 0s" but got "transform 1s ease 0s"
> > > +FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "" but got "transform 1s ease 0s"
> > 
> > Does this change make sense? Why did the *expected* value change?
> 
> I'll double check, but I think the expected string is created dynamically by
> getting the computed style of a non-pseudo element, which would explain this
> behavior.

Precisely:

    const target = document.querySelector("#target");
    var defaultComputedStyle = getComputedStyle(target);

I'll take a look at making this test pass as well.
Comment 7 EWS 2022-01-05 18:56:27 PST
Committed r287669 (245766@main): <https://commits.webkit.org/245766@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 448382 [details].
Comment 8 Radar WebKit Bug Importer 2022-01-05 18:57:19 PST
<rdar://problem/87176839>
Comment 9 Antoine Quint 2022-03-17 10:53:52 PDT
(In reply to Antoine Quint from comment #6)
> (In reply to Antoine Quint from comment #5)
> > (In reply to Darin Adler from comment #4)
> > > Comment on attachment 448382 [details]
> > > Patch for landing
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=448382&action=review
> > > 
> > > > LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt:35
> > > > -FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "all 0s ease 0s" but got "transform 1s ease 0s"
> > > > +FAIL transition should not be applied to first-letter pseudo elements. assert_equals: expected "" but got "transform 1s ease 0s"
> > > 
> > > Does this change make sense? Why did the *expected* value change?
> > 
> > I'll double check, but I think the expected string is created dynamically by
> > getting the computed style of a non-pseudo element, which would explain this
> > behavior.
> 
> Precisely:
> 
>     const target = document.querySelector("#target");
>     var defaultComputedStyle = getComputedStyle(target);
> 
> I'll take a look at making this test pass as well.

So this actually caused a regression in iOS 15.4 (bug 237920), all because I wasn't thorough enough in my analysis of why this test's failing output changed. I added some more explicit WPT coverage so we don't end up in this kind of situation again.