RESOLVED FIXED 237371
[web-animations] keyframe values set to "inherit" should recompute their values when the inherited value changes
https://bugs.webkit.org/show_bug.cgi?id=237371
Summary [web-animations] keyframe values set to "inherit" should recompute their valu...
Antoine Quint
Reported 2022-03-02 08:31:26 PST
[web-animations] keyframe values set to "inherit" should recompute their values when the inherited value changes
Attachments
Patch (9.04 KB, patch)
2022-03-02 08:33 PST, Antoine Quint
no flags
Patch (9.05 KB, patch)
2022-03-03 08:03 PST, Antoine Quint
koivisto: review+
koivisto: commit-queue-
Antoine Quint
Comment 1 2022-03-02 08:33:08 PST
Antti Koivisto
Comment 2 2022-03-02 09:13:40 PST
Comment on attachment 453615 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453615&action=review > Source/WebCore/animation/KeyframeEffect.cpp:786 > + if (value.contains("inherit")) What happens if the value is "finherit"? Shouldn't the test here be for exact equality with "inherit"?
Antoine Quint
Comment 3 2022-03-02 09:18:29 PST
(In reply to Antti Koivisto from comment #2) > Comment on attachment 453615 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=453615&action=review > > > Source/WebCore/animation/KeyframeEffect.cpp:786 > > + if (value.contains("inherit")) > > What happens if the value is "finherit"? Shouldn't the test here be for > exact equality with "inherit"? Only properties that have been successfully parsed made it this far in the code, so "finherit" would have been rejected.
Antoine Quint
Comment 4 2022-03-02 09:19:15 PST
However, I think we can expect to see "inherit" in a list of values, hence the contains().
Antti Koivisto
Comment 5 2022-03-02 09:23:34 PST
> Only properties that have been successfully parsed made it this far in the > code, so "finherit" would have been rejected. I guess I don't understand what these values are. Many properties take arbitrary strings as values (say, urls).
Antti Koivisto
Comment 6 2022-03-02 09:25:49 PST
(In reply to Antoine Quint from comment #4) > However, I think we can expect to see "inherit" in a list of values, hence > the contains(). Can' you give an example of "inherit" on a list?
Antoine Quint
Comment 7 2022-03-03 07:58:46 PST
(In reply to Antti Koivisto from comment #6) > (In reply to Antoine Quint from comment #4) > > However, I think we can expect to see "inherit" in a list of values, hence > > the contains(). > > Can' you give an example of "inherit" on a list? I can't actually think of one, it was more theoretical for CSSValueList. I will however add a check for CSSProperty::isInheritedProperty().
Antoine Quint
Comment 8 2022-03-03 08:03:20 PST
Antti Koivisto
Comment 9 2022-03-03 10:28:38 PST
Comment on attachment 453739 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453739&action=review > Source/WebCore/animation/KeyframeEffect.cpp:788 > + for (auto& [property, value] : keyframe.styleStrings) { > + if (CSSProperty::isInheritedProperty(property) && value == "inherit") > + m_inheritedProperties.add(property); > + } Shouldn't this be || rather than &&?
Antti Koivisto
Comment 10 2022-03-03 10:32:31 PST
Comment on attachment 453739 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453739&action=review >> Source/WebCore/animation/KeyframeEffect.cpp:788 >> + } > > Shouldn't this be || rather than &&? also equalLettersIgnoringASCIICase(value, "inherit")
Antoine Quint
Comment 11 2022-03-04 00:53:49 PST
Radar WebKit Bug Importer
Comment 12 2022-03-04 00:54:16 PST
Antoine Quint
Comment 13 2022-03-04 06:48:43 PST
(In reply to Antti Koivisto from comment #9) > Comment on attachment 453739 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=453739&action=review > > > Source/WebCore/animation/KeyframeEffect.cpp:788 > > + for (auto& [property, value] : keyframe.styleStrings) { > > + if (CSSProperty::isInheritedProperty(property) && value == "inherit") > > + m_inheritedProperties.add(property); > > + } > > Shouldn't this be || rather than &&? Actually, use of CSSProperty::isInheritedProperty() is completely wrong here. It doesn't matter where a property on a keyframe is inherited, it matters that it uses the "inherit" keyword.
Note You need to log in before you can comment on or make changes to this bug.