css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -


this svg contains rect overflows svg element:

<svg id='svg' width='10' height='10'>   <rect x='-10' y='-10' width='30' height='30'/> </svg> 

chrome 28 , opera 12 return getboundingclientrect() svg element width , height of 10. firefox 23 reports width , height of 30. correct?

jsfiddle

the relevant spec cssom, delegates svg spec if svg element not "have associated css layout box". haven't found definition of "having associated css layout box", correct result seem hinge on definition, getbbox returns 30x30 rect in browsers.

this firefox bug fixed now, fix in firefox nightlies , should make through firefox 33 released on 14 october 2014. see bug 530985 details.


Comments

Popular posts from this blog

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -