RESOLVED FIXED245179
getKeyframes() returns equal "from" and "to" values for a "width" transition
https://bugs.webkit.org/show_bug.cgi?id=245179
Summary getKeyframes() returns equal "from" and "to" values for a "width" transition
Antoine Quint
Reported 2022-09-14 07:48:35 PDT
Starting a "width" transition for a simple <div> will return the same values for "from" and "to" when getKeyframes() is called. This cannot be correct since a transition cannot have the same from and to values. Digging into this, this is about this code in ComputedStyleExtractor::valueForPropertyInStyle(): case CSSPropertyWidth: if (renderer && !renderer->isRenderOrLegacyRenderSVGModelObject()) { // According to http://www.w3.org/TR/CSS2/visudet.html#the-width-property, // the "width" property does not apply for non-replaced inline elements. if (!isNonReplacedInline(*renderer)) return zoomAdjustedPixelValue(sizingBox(*renderer).width(), style); } return zoomAdjustedPixelValueForLength(style.width(), style); In this case we end up calling zoomAdjustedPixelValue(sizingBox(*renderer).width(), style) which simply does not use the values provided in the RenderStyle for the keyframe.
Attachments
testcase (815 bytes, text/html)
2022-09-14 07:50 PDT, Antoine Quint
no flags
Antoine Quint
Comment 1 2022-09-14 07:50:13 PDT
Created attachment 462334 [details] testcase
Antoine Quint
Comment 2 2022-09-14 09:09:25 PDT
Radar WebKit Bug Importer
Comment 3 2022-09-21 07:49:18 PDT
Antoine Quint
Comment 4 2022-09-23 03:13:01 PDT
I believe this got fixed along with bug 23924. Will add a new test though.
EWS
Comment 5 2022-09-23 10:10:24 PDT
Committed 254793@main (1ed5a302e8a0): <https://commits.webkit.org/254793@main> Reviewed commits have been landed. Closing PR #4350 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.