Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1139)

Unified Diff: Source/core/layout/LayoutImageResource.cpp

Issue 1314793010: Support fragment URLs for all kinds of SVG images (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update DEPS to match Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutImageResource.cpp
diff --git a/Source/core/layout/LayoutImageResource.cpp b/Source/core/layout/LayoutImageResource.cpp
index 85e24d61d56493228c2276e38b94076d114c9807..d12f2f06676bfe47d8745d3c75a54c368e2607a6 100644
--- a/Source/core/layout/LayoutImageResource.cpp
+++ b/Source/core/layout/LayoutImageResource.cpp
@@ -57,7 +57,7 @@ void LayoutImageResource::shutdown()
m_cachedImage->removeClient(m_layoutObject);
}
-void LayoutImageResource::setImageResource(ImageResource* newImage)
+void LayoutImageResource::setImageResource(ImageResource* newImage, const KURL& urlWithFragment)
{
ASSERT(m_layoutObject);
@@ -67,6 +67,7 @@ void LayoutImageResource::setImageResource(ImageResource* newImage)
if (m_cachedImage)
m_cachedImage->removeClient(m_layoutObject);
m_cachedImage = newImage;
+ m_urlWithFragment = urlWithFragment;
if (m_cachedImage) {
m_cachedImage->addClient(m_layoutObject);
if (m_cachedImage->errorOccurred())
@@ -91,8 +92,10 @@ void LayoutImageResource::resetAnimation()
void LayoutImageResource::setContainerSizeForLayoutObject(const IntSize& imageContainerSize)
{
ASSERT(m_layoutObject);
- if (m_cachedImage)
- m_cachedImage->setContainerSizeForLayoutObject(m_layoutObject, imageContainerSize, m_layoutObject->style()->effectiveZoom());
+ if (m_cachedImage) {
+ m_cachedImage->setContainerParametersForLayoutObject(
+ m_layoutObject, imageContainerSize, m_layoutObject->style()->effectiveZoom(), m_urlWithFragment);
+ }
}
LayoutSize LayoutImageResource::getImageSize(float multiplier, ImageResource::SizeType type) const

Powered by Google App Engine
This is Rietveld 408576698