Index: Source/core/layout/svg/LayoutSVGImage.cpp |
diff --git a/Source/core/layout/svg/LayoutSVGImage.cpp b/Source/core/layout/svg/LayoutSVGImage.cpp |
index 9bbb4d5212afe9f251da752609c6f9de440cd20f..cba229a0479a4d1616199eb085031c3fa07fc3af 100644 |
--- a/Source/core/layout/svg/LayoutSVGImage.cpp |
+++ b/Source/core/layout/svg/LayoutSVGImage.cpp |
@@ -79,27 +79,6 @@ FloatSize LayoutSVGImage::computeImageViewportSize(ImageResource& cachedImage) c |
return intrinsicRatio; |
} |
-static bool containerSizeIsSetForLayoutObject(ImageResource& cachedImage, const LayoutObject* layoutObject) |
-{ |
- const Image* image = cachedImage.image(); |
- // If a container size has been specified for this layoutObject, then |
- // imageForLayoutObject() will return the SVGImageForContainer while image() |
- // will return the underlying SVGImage. |
- return !image->isSVGImage() || image != cachedImage.imageForLayoutObject(layoutObject); |
-} |
- |
-void LayoutSVGImage::updateImageContainerSize() |
-{ |
- ImageResource* cachedImage = m_imageResource->cachedImage(); |
- if (!cachedImage || !cachedImage->usesImageContainerSize()) |
- return; |
- FloatSize imageViewportSize = computeImageViewportSize(*cachedImage); |
- if (LayoutSize(imageViewportSize) != m_imageResource->imageSize(styleRef().effectiveZoom()) |
- || !containerSizeIsSetForLayoutObject(*cachedImage, this)) { |
- m_imageResource->setContainerSizeForLayoutObject(roundedIntSize(imageViewportSize)); |
- } |
-} |
- |
void LayoutSVGImage::updateBoundingBox() |
{ |
FloatRect oldBoundaries = m_objectBoundingBox; |
@@ -119,7 +98,6 @@ void LayoutSVGImage::layout() |
LayoutAnalyzer::Scope analyzer(*this); |
updateBoundingBox(); |
- updateImageContainerSize(); |
bool transformOrBoundariesUpdate = m_needsTransformUpdate || m_needsBoundariesUpdate; |
if (m_needsTransformUpdate) { |
@@ -185,10 +163,6 @@ void LayoutSVGImage::imageChanged(WrappedImagePtr, const IntRect*) |
// representation of this image/layout object. |
LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(this, false); |
- // Update the SVGImageCache sizeAndScales entry in case image loading finished after layout. |
- // (https://bugs.webkit.org/show_bug.cgi?id=99489) |
- updateImageContainerSize(); |
- |
m_bufferedForeground.clear(); |
setShouldDoFullPaintInvalidation(); |