Bug 23924
Summary: | getComputedStyle() on transform property should return function list | ||
---|---|---|---|
Product: | WebKit | Reporter: | Chris Marrin <cmarrin> |
Component: | CSS | Assignee: | Antoine Quint <graouts> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ayg, graouts, jussi.kukkonen, mrobinson, nmouchtaris, simon.fraser, webkit-bug-importer, zoltan.nyul |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=245523 | ||
Bug Depends on: | |||
Bug Blocks: | 222096, 235139, 235807, 235808 |
Chris Marrin
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Martin Robinson
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
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
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
(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
This is also an issue with getKeyframes() always returning the matrix form.
Antoine Quint
I think I'll take a crack at it.
Antoine Quint
I've made good progress here, still something to polish off before I can file a patch.
Antoine Quint
Pull request: https://github.com/WebKit/WebKit/pull/4591
Antoine Quint
The fix for this will cause a slight WPT regression tracked by bug 245523.
EWS
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
<rdar://problem/100283235>