-
Notifications
You must be signed in to change notification settings - Fork 756
[web-animations-1] Resolve remaining issues missed in pseudo-element change. #4616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@george-steel Anything I can do to help get this landed? |
|
Sorry, I was delayed by the holidays and fixing a memory leak. I'll have another go at this in the next few days. |
Fixup of w3c#4437 addressing w3c#4301. * Add pseudoElement option to KeyframeEffect constructor body * Fix w3c#4502 adding catch-all pseudo-element case to composite order * Fix w3c#4586 adding error handling to KeyframeEffect.pseudoElement * Fix w3c#4701 making note of case when property values cannot be calculated
9d08a2e to
99b2845
Compare
|
@birtles @stephenmcgruer Next draft is ready. I agree with your advice and decided that the error handling and a couple of other issues needed to be fixed at the same time as the constructor. What I wrote here reflects the tentative decisions we made for blink in the absence of a spec. |
birtles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. It's getting close.
Sorry for all the feedback. It takes a while to get used to writing spec text. I'm still really bad at it, but these suggestions should hopefully tighten things up a little.
web-animations-1/Overview.bs
Outdated
| Note that this procedure is only performed on a <a>keyframe effect</a> having | ||
| an <a>effect target</a> for which computed property values can be calculated. | ||
| an <a>effect target</a> for which computed property values can be calculated, | ||
| as otherwise all propereties are <a>not animatable</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, I'm not exactly sure what the purpose of this change is. How is it related to pseudo elements? What is the difference between saying the procedure is not applied and the properties are "not animatable"?
It's also a bit weird to say they are "not animatable" since that's something that is normally defined for the property itself. We should instead say something like they follow the same logic as not animatable properties or something. Once I understand the purpose of the change I can help suggest wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
web-animations-1/Overview.bs
Outdated
| <var>underlying value</var> is calculated as follows. | ||
| Note that this procedure is only performed on a <a>keyframe effect</a> having | ||
| an <a>effect target</a> for which computed property values can be calculated, | ||
| as otherwise case all propereties are <a>not animatable</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"otherwise case"? s/calculated, as otherwise case all/calculated. Otherwise all/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, I'd probably avoid invoking the "not animatable" language since that's really an animation type and I think it is confusing to use that concept here. It's probably better just to say this procedure is not run on that case, or, better still, add a step that early returns if the the effect target is in a context where we can't calculate property values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
web-animations-1/Overview.bs
Outdated
| property</a> is applied using the following process. | ||
| Note that this procedure is only performed on a <a>keyframe effect</a> having | ||
| an <a>effect target</a> for which computed property values can be calculated, | ||
| as otherwise case all propereties are <a>not animatable</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
web-animations-1/Overview.bs
Outdated
|
|
||
| 1. Set the [=target pseudo-selector=] to the result corresponding to the first | ||
| matching condition from below. | ||
| 1. Set the <a>target pseudo-selector</a> of <var>effect</var> to the result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Totally unrelated but is there any reason to change [=target pseudo-selector=] to <a>target pseudo-selector</a>? I've been trying to switch to more modern bikeshed syntax bit by bit, including using [= =] instead of <a></a> where possible.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephenmcgruer requested this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I had seen the use of <a> in the line above and asked George to match it. Didn't realize [= =] was a more modern syntax and we were trying to switch to it.
Apologies for wasting your time George, but can you switch it back to [= =] then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
web-animations-1/Overview.bs
Outdated
| {{KeyframeEffectOptions/pseudoElement}} property, | ||
| :: Set the [=target pseudo-selector=] to the value of that property, | ||
| following the validation procedure from the | ||
| {{KeyframeEffect/pseudoElement}} setter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: For consistency, could we follow the same format we use for composite?
e.g.
Set the [=target pseudo-selector=] to the value of the {{KeyframeEffectOptions/pseudoElement}} property.
When assigning this property, the error-handling defined for the corresponding setter on the
{{KeyframeEffect}} interface is applied. If the setter requires an exception to be thrown, this procedure
must throw the same exception and abort all further steps.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
birtles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nits addressed
web-animations-1/Overview.bs
Outdated
| to specify that particular [=pseudo-element=]. | ||
|
|
||
| Note that not all [=effect targets=] specified in this manner (such as ''::part()'' | ||
| pseudo-elements, unsupported/invalid pseudo-elements, and `null`) have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure invalid pseudo-elements can exist, right? They're rejected at the API boundary?
What does null refer to here? The lack of a target element? (Represented by null in the programming interface) Or the lack of a target pseudo-selector?
web-animations-1/Overview.bs
Outdated
| 1. If <a>animation type</a> of the <var>target property</var> is | ||
| <a>not animatable</a> abort this procedure | ||
| since the effect cannot be applied. | ||
| 1. If the [=effect target=] is `null` or cannot have computed property values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Technically I guess this should say, "The [=keyframe effect=] does not have an [=effect target=]...since we're talking about the model here. They fact that the lack of an associated effect target is represented bynull` in the programming interface is specific to the programming interface.
stephenmcgruer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo Brian's nits
Update animation composite order on pseudo-element. Implement change found in w3c/csswg-drafts#4616 making the sort order on pseudo-elements include all selectors. Add missing const declaration to KeyframeEffect::pseudoElement(). Remove empty-string case from KeyframeEffect::setPseudoElement(). Bug: 993365, 981894 Change-Id: I32ff6917b74fb490695299d0fde0c12393755437 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031986 Commit-Queue: George Steel <gtsteel@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Cr-Commit-Position: refs/heads/master@{#740490}
Fixup of #4437 addressing #4301.