| Index: third_party/WebKit/Source/core/css/CSSImageSetValue.h
|
| diff --git a/third_party/WebKit/Source/core/css/CSSImageSetValue.h b/third_party/WebKit/Source/core/css/CSSImageSetValue.h
|
| index 31d07bf1d437803c7d60d0ac79346a068c0f034f..c6b5c009ce9fa2b1a504ac5e886e6ee26952404a 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSImageSetValue.h
|
| +++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.h
|
| @@ -46,12 +46,15 @@
|
| }
|
| ~CSSImageSetValue();
|
|
|
| - bool isCachePending(float deviceScaleFactor) const;
|
| - StyleImage* cachedImageSet(float deviceScaleFactor);
|
| - StyleFetchedImageSet* cacheImageSet(Document*, float deviceScaleFactor, const ResourceLoaderOptions&);
|
| - StyleFetchedImageSet* cacheImageSet(Document*, float deviceScaleFactor);
|
| + StyleFetchedImageSet* cachedImageSet(Document*, float deviceScaleFactor, const ResourceLoaderOptions&);
|
| + StyleFetchedImageSet* cachedImageSet(Document*, float deviceScaleFactor);
|
| +
|
| + // Returns a StyleFetchedImageSet if the best fit image has been cached already, otherwise a StylePendingImage.
|
| + StyleImage* cachedOrPendingImageSet(float);
|
|
|
| String customCSSText() const;
|
| +
|
| + bool isPending() const { return !m_accessedBestFitImage; }
|
|
|
| struct ImageWithScale {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| @@ -67,7 +70,7 @@
|
| DECLARE_TRACE_AFTER_DISPATCH();
|
|
|
| protected:
|
| - ImageWithScale bestImageForScaleFactor(float scaleFactor);
|
| + ImageWithScale bestImageForScaleFactor();
|
|
|
| private:
|
| CSSImageSetValue();
|
| @@ -75,9 +78,12 @@
|
| void fillImageSet();
|
| static inline bool compareByScaleFactor(ImageWithScale first, ImageWithScale second) { return first.scaleFactor < second.scaleFactor; }
|
|
|
| - bool m_isCachePending;
|
| - float m_cachedScaleFactor;
|
| - RefPtrWillBeMember<StyleImage> m_cachedImageSet;
|
| + RefPtrWillBeMember<StyleImage> m_imageSet;
|
| + bool m_accessedBestFitImage;
|
| +
|
| + // This represents the scale factor that we used to find the best fit image. It does not necessarily
|
| + // correspond to the scale factor of the best fit image.
|
| + float m_scaleFactor;
|
|
|
| Vector<ImageWithScale> m_imagesInSet;
|
| };
|
|
|