| Index: Source/core/svg/graphics/SVGImage.cpp
|
| diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
|
| index ff5b6279222c5758590ede2015b45306dc4a1b7f..26c23850bb05d9b42aa20cc44b9e2ccdae2318f7 100644
|
| --- a/Source/core/svg/graphics/SVGImage.cpp
|
| +++ b/Source/core/svg/graphics/SVGImage.cpp
|
| @@ -303,8 +303,11 @@ void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const Fl
|
|
|
| FrameView* view = frameView();
|
| view->resize(containerSize());
|
| - if (!m_url.isEmpty())
|
| - view->scrollToFragment(m_url);
|
| +
|
| + // Always call scrollToFragment, even if the url is empty, because
|
| + // there may have been a previous url/fragment that needs to be reset.
|
| + view->scrollToFragment(m_url);
|
| +
|
| view->updateLayoutAndStyleForPainting();
|
| view->paint(&recordingContext, enclosingIntRect(srcRect));
|
| ASSERT(!view->needsLayout());
|
|
|