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

Unified Diff: Source/core/style/StyleFetchedImageSet.h

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/style/StyleFetchedImageSet.h
diff --git a/Source/core/style/StyleFetchedImageSet.h b/Source/core/style/StyleFetchedImageSet.h
index 2ad89c3fefb7eccd410a0870c642e609f3e5ae46..657c28705ea79d3879e8ecce69db16f6d81da063 100644
--- a/Source/core/style/StyleFetchedImageSet.h
+++ b/Source/core/style/StyleFetchedImageSet.h
@@ -41,9 +41,9 @@ class CSSImageSetValue;
class StyleFetchedImageSet final : public StyleImage, private ImageResourceClient {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleFetchedImageSet);
public:
- static PassRefPtrWillBeRawPtr<StyleFetchedImageSet> create(ImageResource* image, float imageScaleFactor, CSSImageSetValue* value)
+ static PassRefPtrWillBeRawPtr<StyleFetchedImageSet> create(ImageResource* image, float imageScaleFactor, CSSImageSetValue* value, const KURL& urlWithFragment)
{
- return adoptRefWillBeNoop(new StyleFetchedImageSet(image, imageScaleFactor, value));
+ return adoptRefWillBeNoop(new StyleFetchedImageSet(image, imageScaleFactor, value, urlWithFragment));
}
~StyleFetchedImageSet() override;
@@ -77,12 +77,13 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValue*);
+ StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValue*, const KURL&);
ResourcePtr<ImageResource> m_bestFitImage;
float m_imageScaleFactor;
RawPtrWillBeMember<CSSImageSetValue> m_imageSetValue; // Not retained; it owns us.
+ KURL m_urlWithFragment;
f(malita) 2015/09/08 18:41:19 Plumbing the fragment through several general clas
davve 2015/09/08 19:12:25 Yes. The feature seems to have a significant cost.
f(malita) 2015/09/08 20:45:51 I also think the tradeoff is worth it, and I'm cer
davve 2015/09/09 14:22:53 I looked into keeping the fragment URL isolated to
};
DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet());

Powered by Google App Engine
This is Rietveld 408576698