CSS Transforms perspective-origin percentage values are currently translated to pixel values using the wrong bounding box (currently sizingBox() which ends up as the contentbox).
Spec says "Percentages: refer to the size of the element's bounding box" and bounding box is defined as "bounding box for all SVG elements without an associated CSS layout box and the border box for all other elements". So we should be using border box for normal html elements. This is what transform-origin already does.
I'll provide a patch and a test case.
Similar to bug 94211.
Created attachment 166647 [details]
Thanks Simon, that test actually looks like a better place to test this as well
Hm, looks like I've missed transforms/3d/point-mapping/ tests at least. Will check and update those
(In reply to comment #3)
> Hm, looks like I've missed transforms/3d/point-mapping/ tests at least.
So chromium-ews was flaky for a cycle in transforms/3d/point-mapping/. Actually those tests don't really seem to check the computedStyle (and this bug only covers that). As far as I can see all the existing tests that test perspective-origin via computedStyle happen to not use borders or pass in px values so don't hit the bug.
Just to be double sure I checked the transforms/3d/point-mapping/ results on GTK -- they are identical to results before patch.
I think this is good to go.
Was it only wrong for computed style, but correct for rendering? If so, the title of this bug, and the Changelog need to make this clearer.
Yes, that is correct: rendering is unchanged (and correct as far as I can tell), but computedstyle is wrong. I'll update the changelog.
Created attachment 166741 [details]
Comment on attachment 166741 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=166741&action=review
> + getComputedStyle perspective-origin is based on the wrong boundingbox
Created attachment 166826 [details]
Comment on attachment 166826 [details]
Clearing flags on attachment: 166826
Committed r130277: <http://trac.webkit.org/changeset/130277>
All reviewed patches have been landed. Closing bug.