Move width/height calculations to DisplayObject (HTML5)