RESOLVED FIXED 23924
getComputedStyle() on transform property should return function list
https://bugs.webkit.org/show_bug.cgi?id=23924
Summary getComputedStyle() on transform property should return function list
Chris Marrin
Reported 2009-02-12 09:23:47 PST
Currently getComputedStyle for -webkit-transform returns matrix(...) or matrix3d(...). It should return the original function list with pixels where percents used to be, etc.
Attachments
Martin Robinson
Comment 1 2022-01-04 02:22:30 PST
I believe this issue can be closed and the comment in CSSComputedStyleDeclaration.cpp can be removed because the CSS Transforms Module Level 2 specification says: "A <transform-list> for the computed value is serialized to either one <matrix()> or one <matrix3d()> function by the following algorithm:"
Nikos Mouchtaris
Comment 2 2022-06-07 15:33:24 PDT
I think the spec you were looking at was out of date Martin. According to https://drafts.csswg.org/css-transforms/#serialization-of-transform-functions, we should be serializing the individual functions. This is related to our test failures in css/css-transforms/animation/transform-interpolation-inline-value.html.
Martin Robinson
Comment 3 2022-07-13 07:53:21 PDT
I've been investigating this a bit more and I confirmed that getComputedStyle(...).transform always returns `matrix()` or `matrix3d()` whereas div.style after running `commitStyles()` is returning the individual transform functions. In WebKit, `div.style` is returning `matrix()` and `matrix3d()` always after `commitStyles()`. I think the failure in css/css-transforms/animation/transform-interpolation-inline-value.html are probably an issue with `commitStyles()`.
Martin Robinson
Comment 4 2022-07-13 07:53:59 PDT
(In reply to Martin Robinson from comment #3) > I've been investigating this a bit more and I confirmed that > getComputedStyle(...).transform always returns `matrix()` or `matrix3d()` > whereas div.style after running `commitStyles()` is returning the individual > transform functions. In WebKit, `div.style` is returning `matrix()` and > `matrix3d()` always after `commitStyles()`. I think the failure in > css/css-transforms/animation/transform-interpolation-inline-value.html are > probably an issue with `commitStyles()`. To clarify, div.style after running `commitStyles()` is returning the individual transform functions in Firefox and Chrome.
Antoine Quint
Comment 5 2022-09-14 11:29:59 PDT
This is also an issue with getKeyframes() always returning the matrix form.
Antoine Quint
Comment 6 2022-09-14 11:36:03 PDT
I think I'll take a crack at it.
Antoine Quint
Comment 7 2022-09-15 09:28:52 PDT
I've made good progress here, still something to polish off before I can file a patch.
Antoine Quint
Comment 8 2022-09-22 02:55:38 PDT
Antoine Quint
Comment 9 2022-09-22 07:26:20 PDT
The fix for this will cause a slight WPT regression tracked by bug 245523.
EWS
Comment 10 2022-09-22 10:47:26 PDT
Committed 254760@main (ae44d0ca68fa): <https://commits.webkit.org/254760@main> Reviewed commits have been landed. Closing PR #4591 and removing active labels.
Radar WebKit Bug Importer
Comment 11 2022-09-22 10:48:24 PDT
Note You need to log in before you can comment on or make changes to this bug.