Any <svg> element that is the root of an SVG fragment should have its x and y attributes ignored as per the SVG 1.1 specification. WebKit currently treats those as CSS left/top offsets, or so it seems.
Created attachment 14664 [details] Test case for x/y attributes on root-most <svg> element For the test to pass, the green SVG square should be rendered aligned to the top-left of the red CSS-rendered square, which is 10 pixels wider and taller.
Created attachment 14724 [details] First attempt Not that happy with the checks, but I think it is the safest way. Cheers, Rob.
Comment on attachment 14724 [details] First attempt i find myself wondering whether else { + rootX += x().value(); + rootY += y().value(); } should account for tx, ty though the more i think about the less i think it should.. hmmm... also the += can just be + now fianlly, the layout test in this case can *probably* be text only... eg. eventController.dumpAsText or somthing
Comment on attachment 14724 [details] First attempt R=me, following discussion on irc pixel test is necessary as screenctm and layout/painting follow completely different paths
Landed r21820
svg/custom/rootmost-svg-xy-attrs seems to be failing on feature branch. Perhaps this patch was forgotten during the merge?
Created attachment 16510 [details] new fix for feature-branch
Laded as r25957.