Teach SVGImage::containerSize() to deduce intrinsic values
When an SVG has either intrinsic width or height but not both, and a intrinsic ratio, the missing intrinsic width or height can be calculated. Doing so enables us to return correct intrinsic width and height for SVG images in more cases when the image has no renderer. Also, this patch removes the unspecified use of the viewBox attribute as the source of intrinsic size. A small number of tests depended on this and has been updated. The reasoning to make this change is because we don't use the viewBox for intrinsic size in any other context than SVGImage. And we only use it until the renderer has a containerSize() anyway. http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#dom-img-width http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#dom-img-height BUG=376895 Review URL: https://codereview.chromium.org/308643002 git-svn-id: svn://svn.chromium.org/blink/trunk@175784 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment