| Index: third_party/WebKit/Source/core/fetch/ImageResource.h
|
| diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
|
| index ca287bd4a93a3d895d019f88106cf561193e2589..5cfe9cabc923686e63cde0554ad8560f9034b3ba 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ImageResource.h
|
| +++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
|
| @@ -41,7 +41,6 @@ class Length;
|
| class MemoryCache;
|
| class LayoutObject;
|
| class SecurityOrigin;
|
| -class SVGImageForContainer;
|
|
|
| class CORE_EXPORT ImageResource final : public Resource, public ImageObserver {
|
| friend class MemoryCache;
|
| @@ -59,7 +58,6 @@ public:
|
| void load(ResourceFetcher*, const ResourceLoaderOptions&) override;
|
|
|
| blink::Image* image(); // Returns the nullImage() if the image is not available yet.
|
| - blink::Image* imageForLayoutObject(const LayoutObject*); // Returns the nullImage() if the image is not available yet.
|
| bool hasImage() const { return m_image.get(); }
|
| // Side effect: ensures decoded image is in cache, therefore should only be called when about to draw the image.
|
| // FIXME: Decoding image on the main thread is expensive, so rather than forcing decode, consider returning false
|
| @@ -71,7 +69,6 @@ public:
|
|
|
| bool canRender(const LayoutObject& layoutObject, float multiplier) { return !errorOccurred() && !imageSizeForLayoutObject(&layoutObject, multiplier).isEmpty(); }
|
|
|
| - void setContainerSizeForLayoutObject(const ImageResourceClient*, const IntSize&, float);
|
| bool usesImageContainerSize() const;
|
| bool imageHasRelativeWidth() const;
|
| bool imageHasRelativeHeight() const;
|
| @@ -80,12 +77,11 @@ public:
|
| bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHeaderValue; }
|
|
|
| enum SizeType {
|
| - NormalSize, // Report the size of the image associated with a certain layoutObject
|
| - IntrinsicSize, // Report the intrinsic size, i.e. ignore whatever has been set extrinsically.
|
| + IntrinsicSize, // Report the intrinsic size.
|
| IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to account for image density.
|
| };
|
| // This method takes a zoom multiplier that can be used to increase the natural size of the image by the zoom.
|
| - LayoutSize imageSizeForLayoutObject(const LayoutObject*, float multiplier, SizeType = NormalSize); // returns the size of the complete image.
|
| + LayoutSize imageSizeForLayoutObject(const LayoutObject*, float multiplier, SizeType = IntrinsicSize); // returns the size of the complete image.
|
| void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio);
|
|
|
| bool isAccessAllowed(SecurityOrigin*);
|
| @@ -142,15 +138,10 @@ private:
|
| void clearImage();
|
| // If not null, changeRect is the changed part of the image.
|
| void notifyObservers(const IntRect* changeRect = nullptr);
|
| - IntSize svgImageSizeForLayoutObject(const LayoutObject*) const;
|
| - blink::Image* svgImageForLayoutObject(const LayoutObject*);
|
| bool loadingMultipartContent() const;
|
|
|
| float m_devicePixelRatioHeaderValue;
|
|
|
| - typedef HashMap<const ImageResourceClient*, RefPtr<SVGImageForContainer>> ImageForContainerMap;
|
| - OwnPtr<ImageForContainerMap> m_imageForContainerMap;
|
| -
|
| RefPtr<blink::Image> m_image;
|
| bool m_hasDevicePixelRatioHeaderValue;
|
| };
|
|
|