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 b1141564d2424c0a8a97b91a158ab1d1b222863c..76fde922cbf101dade18414fcb163d962847520f 100644 |
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
@@ -210,8 +210,8 @@ FloatSize SVGImage::calculateConcreteObjectSize(const FloatSize& defaultObjectSi |
if (!intrinsicSizingInfo.aspectRatio.isEmpty()) { |
// TODO(davve): According to the specification, the concrete object size should resolve as a |
// contain constraint against the default object size at this stage. Until the |
- // defaultObjectSize is context sensitive, right now it's hard-coded to 300x150, we have to |
- // preserve legacy behavior by returning the aspectRatio as the concrete object size. |
+ // defaultObjectSize is context sensitive - right now it's hard-coded to 300x150 - we have |
+ // to preserve legacy behavior by returning the aspectRatio as the concrete object size. |
return intrinsicSizingInfo.aspectRatio; |
} |
@@ -546,4 +546,9 @@ String SVGImage::filenameExtension() const |
return "svg"; |
} |
+void SVGImage::updateConcreteObjectSize(const LayoutSize& defaultObjectSize) |
+{ |
+ m_concreteObjectSize = roundedIntSize(calculateConcreteObjectSize(FloatSize(defaultObjectSize))); |
+} |
+ |
} // namespace blink |