CSSParserTokenStream& stream,
Blink Style Guide: Naming - May leave obvious parameter names out of function declarations. The parameter names `stream` and `context` are clear from their types and can be omitted from the function declaration in the header file.
***
_To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options: \
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason \
\
This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent). \
AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve. \
[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
HeapVector<std::pair<AtomicString, AtomicString>> action_behavior_pairs_;
Blink Style Guide: Prefer blink:: types over STL and base types. Please use `WTF::KeyValuePair` instead of `std::pair` for the member variable `action_behavior_pairs_`.
***
_To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options: \
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason \
\
This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent). \
AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve. \
[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Looks good as long as we get the testing situation sorted. :-)
keep things simple. It shuold be easy enough to restrict this if such a
nit
// TODO(crbug.com/441408561): Enable when the actual attaching uses the
// updated parsing
I'd make the update here instead of disabling the tests.
ConsumeCommaIncludingWhitespace(stream);
We should check the return value of this, right?
// A ')' after an action-behavior pair indicates the end of the trigger()
// function.
if (stream.Peek().GetType() == kRightParenthesisToken) {
break;
}
Not needed; this token is treated as `EOF` inside the block (`stream.AtEnd()` returns true at this token.)
if (trigger_name && !action_behavior_pairs.empty()) {
trigger_attachment_value =
MakeGarbageCollected<cssvalue::CSSTriggerAttachmentValue>(
trigger_name, action_behavior_pairs);
}
return trigger_attachment_value;
I don't think `trigger_attachment_value` is needed?
```suggestion
if (trigger_name && !action_behavior_pairs.empty()) {
return MakeGarbageCollected<cssvalue::CSSTriggerAttachmentValue>(
trigger_name, action_behavior_pairs);
}
return nullptr;
```
(Run `git cl format` on that, though.)
return nullptr;
This can not happen. I'd use `const auto& attachment_value = To<cssvalue::CSSTriggerAttachmentValue>(value)` at the top instead.
return nullptr;
Can this happen? Isn't it either `none` or a list? If it can, we should cover this with a test. Otherwise, just confidently use `To<CSSValueList>(value)`.
crbug.com/429392773 external/wpt/scroll-animations/animation-trigger/* [ Failure Timeout ]
This seems unwise. I would _recommend_ updating all the tests in the same CL to maintain unbroken coverage of the feature.
test_invalid_value('animation-trigger', 'trigger(--abc, play)');
I suggest adding:
```
test_invalid_value('animation-trigger', 'trigger(--abc click play)');
test_invalid_value('animation-trigger', 'trigger(--abc, click play click play)');
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Looks good as long as we get the testing situation sorted. :-)
Acknowledged
keep things simple. It shuold be easy enough to restrict this if such a
David Awogbemilanit
Done
// TODO(crbug.com/441408561): Enable when the actual attaching uses the
// updated parsing
I'd make the update here instead of disabling the tests.
Sounds good.
Blink Style Guide: Naming - May leave obvious parameter names out of function declarations. The parameter names `stream` and `context` are clear from their types and can be omitted from the function declaration in the header file.
***_To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options: \
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason \
\
This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent). \
AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve. \
[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Acknowledged
We should check the return value of this, right?
Yes, good catch. I've added the tests you suggested below which would have caught this.
// A ')' after an action-behavior pair indicates the end of the trigger()
// function.
if (stream.Peek().GetType() == kRightParenthesisToken) {
break;
}
Not needed; this token is treated as `EOF` inside the block (`stream.AtEnd()` returns true at this token.)
Done.
if (trigger_name && !action_behavior_pairs.empty()) {
trigger_attachment_value =
MakeGarbageCollected<cssvalue::CSSTriggerAttachmentValue>(
trigger_name, action_behavior_pairs);
}
return trigger_attachment_value;
I don't think `trigger_attachment_value` is needed?
```suggestion
if (trigger_name && !action_behavior_pairs.empty()) {
return MakeGarbageCollected<cssvalue::CSSTriggerAttachmentValue>(
trigger_name, action_behavior_pairs);
}return nullptr;
```(Run `git cl format` on that, though.)
Done.
This can not happen. I'd use `const auto& attachment_value = To<cssvalue::CSSTriggerAttachmentValue>(value)` at the top instead.
Done.
Can this happen? Isn't it either `none` or a list? If it can, we should cover this with a test. Otherwise, just confidently use `To<CSSValueList>(value)`.
Done.
HeapVector<std::pair<AtomicString, AtomicString>> action_behavior_pairs_;
Blink Style Guide: Prefer blink:: types over STL and base types. Please use `WTF::KeyValuePair` instead of `std::pair` for the member variable `action_behavior_pairs_`.
***_To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options: \
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason \
\
This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent). \
AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve. \
[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Won't fix: "error: static assertion failed due to requirement 'internal::IsTraceableV<blink::KeyValuePair"
crbug.com/429392773 external/wpt/scroll-animations/animation-trigger/* [ Failure Timeout ]
This seems unwise. I would _recommend_ updating all the tests in the same CL to maintain unbroken coverage of the feature.
Sounds good. I've updated the tests. No need for the TestExpectations entry now.
test_invalid_value('animation-trigger', 'trigger(--abc, play)');
I suggest adding:
```
test_invalid_value('animation-trigger', 'trigger(--abc click play)');
test_invalid_value('animation-trigger', 'trigger(--abc, click play click play)');
```
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[animation-trigger] Parse trigger() function into computed style
`animation-trigger` previously specified a comma-separated list of
space-separated lists of dashed idents which were names of triggers,
i.e:
animation-trigger: [ [ <dashed-ident>]+ ]#
Now, per [1], `animation-trigger` is parsed as:
/*action*/ /*behavior*/
<action-behavior>: <ident> <ident>
<single-animation-trigger>: trigger(<dashed-ident>, <action-behavior> [, <action-behavior>]+)
animation-trigger: [ [<single-animation-trigger>]+ ]#
The CSSWG might restrict the idents that can be specified as actions
and/or behaviors but for now I've kept them as CSSCustomIdentValue to
keep things simple. It should be easy enough to restrict this if such a
resolution is passed.
[1] https://github.com/w3c/csswg-drafts/issues/12652
R=and...@chromium.org
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/54730
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |