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

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

Issue 1339183003: NOT FOR LANDING Experiment with allocating SVGImageForContainer on demand (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
« no previous file with comments | « Source/core/style/StyleFetchedImage.cpp ('k') | Source/core/style/StyleFetchedImageSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/StyleFetchedImageSet.h
diff --git a/Source/core/style/StyleFetchedImageSet.h b/Source/core/style/StyleFetchedImageSet.h
index 2ad89c3fefb7eccd410a0870c642e609f3e5ae46..88a1ad0c2460f67357ea0df8bb236033334b7f7b 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;
@@ -66,23 +66,24 @@ public:
bool imageHasRelativeHeight() const override;
void computeIntrinsicDimensions(const LayoutObject*, Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio) override;
bool usesImageContainerSize() const override;
- void setContainerSizeForLayoutObject(const LayoutObject*, const IntSize&, float) override;
void addClient(LayoutObject*) override;
void removeClient(LayoutObject*) override;
PassRefPtr<Image> image(LayoutObject*, const IntSize&) const override;
float imageScaleFactor() const override { return m_imageScaleFactor; }
bool knownToBeOpaque(const LayoutObject*) const override;
ImageResource* cachedImage() const override { return m_bestFitImage.get(); }
+ KURL url() const override { return m_urlWithFragment; }
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;
};
DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet());
« no previous file with comments | « Source/core/style/StyleFetchedImage.cpp ('k') | Source/core/style/StyleFetchedImageSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698