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

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

Issue 1367193003: NOT FOR LANDING Allocate SVGImageForContainer on demand (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some NeedsRebaseline and revived some LayoutListMarker code that turned out to be important Created 5 years, 2 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: third_party/WebKit/Source/core/style/StyleFetchedImageSet.h
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.h b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.h
index 8b32d752c2b2ad96b3eb368fed41ea6abc99b007..6889186e6ecc06eade6f4e50a9508a8a71d6a2b6 100644
--- a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.h
+++ b/third_party/WebKit/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;
@@ -67,23 +67,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(const LayoutObject*, const IntSize&) const override;
+ PassRefPtr<Image> image(const LayoutObject*, const IntSize&, float, const KURL&) const override;
float imageScaleFactor() const override { return m_imageScaleFactor; }
bool knownToBeOpaque(const LayoutObject*) const override;
ImageResource* cachedImage() const override;
+ 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());

Powered by Google App Engine
This is Rietveld 408576698