mootools/mootools-core — pull request #2602 by SergioCrisostomo (2014-05-31 08:56:52+00:00)
Title: Fix svg element size

fixes #2506, closes #2517

This PR is to fix `svg` element size in Firefox. Both with `offsetWidth` and `getBoundingClientRect` FF returns error/wrong result.

I also followed @arian 's suggestion and propose now `.getBoundingClientRect()` as default for `.getSize()`. Was forced to add a exception for IE8- which [cannot calculate](http://jsfiddle.net/R4s8K/) `.getBoundingClientRect()` of elements with `visibility: hidden;`

Added also a spec to cover `svg` element dimensions.

P.S.: When FF bug is fixed and we only support "modern" browsers this `.getSize()` method should be revisited and cleaned up.