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

Unified Diff: Source/core/style/StyleFetchedImage.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/paint/NinePieceImagePainter.cpp ('k') | Source/core/style/StyleFetchedImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/StyleFetchedImage.h
diff --git a/Source/core/style/StyleFetchedImage.h b/Source/core/style/StyleFetchedImage.h
index 4f6ecf2c0f9646d45c6c98424f8156f112c6f5b6..dfb16bd2baa15b7ca645817cb49f1270dff189bc 100644
--- a/Source/core/style/StyleFetchedImage.h
+++ b/Source/core/style/StyleFetchedImage.h
@@ -36,9 +36,9 @@ class ImageResource;
class StyleFetchedImage final : public StyleImage, private ImageResourceClient {
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StyleFetchedImage);
public:
- static PassRefPtrWillBeRawPtr<StyleFetchedImage> create(ImageResource* image, Document* document)
+ static PassRefPtrWillBeRawPtr<StyleFetchedImage> create(ImageResource* image, Document* document, const KURL& urlWithFragment)
{
- return adoptRefWillBeNoop(new StyleFetchedImage(image, document));
+ return adoptRefWillBeNoop(new StyleFetchedImage(image, document, urlWithFragment));
}
~StyleFetchedImage() override;
@@ -54,21 +54,22 @@ 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;
void notifyFinished(Resource*) override;
PassRefPtr<Image> image(LayoutObject*, const IntSize&) const override;
bool knownToBeOpaque(const LayoutObject*) const override;
ImageResource* cachedImage() const override { return m_image.get(); }
+ KURL url() const override { return m_urlWithFragment; }
DECLARE_VIRTUAL_TRACE();
private:
- StyleFetchedImage(ImageResource*, Document*);
+ StyleFetchedImage(ImageResource*, Document*, const KURL&);
ResourcePtr<ImageResource> m_image;
RawPtrWillBeMember<Document> m_document;
+ KURL m_urlWithFragment; // TODO(davve): Just keep the fragment?
};
DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImage, isImageResource());
« no previous file with comments | « Source/core/paint/NinePieceImagePainter.cpp ('k') | Source/core/style/StyleFetchedImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698