Bug 1890198 Comment 5 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Robert Longson [:longsonr] from comment #4)
> The padding on the left becomes padding on the right once rotated and therefore has no effect, right?

I think that's basically right, yeah.  You can mess with the testcase to add arbitrary amounts of `padding-left`, without impacting the rendering of the SVG (the blue circle).  That's because -- with the default `transform-origin` and `transform-box`, combined with the 180deg rotation -- we rotate about the center of the SVG's border-box.   So the padding ends up on the right side in the final visualization, and the visible SVG content always ends up in the same spot, perfectly flush with the left side of the viewport.

Since the SVG content always ends up in the same spot in this testcase (regardless of the amount of padding-left), that means `getScreenCTM` should also always produce the same matrix (also regardless of padding-left), in order to reliably produce a transform that can interconvert between the outer coordinate space to the SVG-internal coordinate space.
(In reply to Robert Longson [:longsonr] from comment #4)
> The padding on the left becomes padding on the right once rotated and therefore has no effect, right?

I think that's basically right, yeah.  You can mess with the testcase to add arbitrary amounts of `padding-left`, without impacting the rendering of the SVG (the blue circle).  That's because -- with the default `transform-origin` and `transform-box`, combined with the 180deg rotation -- we rotate about the center of the SVG's border-box.   So the padding ends up on the right side in the final visualization, and the visible SVG content always ends up in the same spot, perfectly flush with the left side of the viewport.

Since the SVG content always ends up in the same spot in this testcase (regardless of the amount of padding-left), that means `getScreenCTM` should also always produce the same matrix, with `100 100` at the end (regardless of padding-left), in order to reliably produce a transform that can interconvert between the outer coordinate space to the SVG-internal coordinate space.

Back to Bug 1890198 Comment 5