| Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| index 90a7524683d22369ce3b6c8bc99df714f4db7f04..105915073b428da170c90c92c01eebc24b173148 100644
|
| --- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
|
| @@ -156,11 +156,14 @@ IntSize SVGImage::containerSize() const
|
| LayoutBox::IntrinsicSizingInfo intrinsicSizingInfo;
|
| layoutObject->computeIntrinsicSizingInfo(intrinsicSizingInfo);
|
|
|
| - if (intrinsicSizingInfo.size.isEmpty() && intrinsicSizingInfo.aspectRatio) {
|
| - if (!intrinsicSizingInfo.size.width() && intrinsicSizingInfo.size.height())
|
| - intrinsicSizingInfo.size.setWidth(intrinsicSizingInfo.size.height() * intrinsicSizingInfo.aspectRatio);
|
| - else if (intrinsicSizingInfo.size.width() && !intrinsicSizingInfo.size.height())
|
| - intrinsicSizingInfo.size.setHeight(intrinsicSizingInfo.size.width() / intrinsicSizingInfo.aspectRatio);
|
| + if (intrinsicSizingInfo.size.isEmpty() && !intrinsicSizingInfo.aspectRatio.isEmpty()) {
|
| + if (!intrinsicSizingInfo.size.width() && intrinsicSizingInfo.size.height()) {
|
| + intrinsicSizingInfo.size.setWidth(
|
| + intrinsicSizingInfo.size.height() * intrinsicSizingInfo.aspectRatio.width() / intrinsicSizingInfo.aspectRatio.height());
|
| + } else if (intrinsicSizingInfo.size.width() && !intrinsicSizingInfo.size.height()) {
|
| + intrinsicSizingInfo.size.setHeight(
|
| + intrinsicSizingInfo.size.width() * intrinsicSizingInfo.aspectRatio.height() / intrinsicSizingInfo.aspectRatio.width());
|
| + }
|
| }
|
|
|
| // TODO(davve): In order to maintain aspect ratio the intrinsic
|
|
|