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

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

Issue 2941533002: Break StyleImage dependency on LayoutObject (Closed)
Patch Set: Address reviewer comments Created 3 years, 6 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/StyleImage.h
diff --git a/third_party/WebKit/Source/core/style/StyleImage.h b/third_party/WebKit/Source/core/style/StyleImage.h
index 6f6aadbd5033e2aa87887f7cc75863a63c12162f..04542e1854f174ae1b869a5724dce3f5e57926d4 100644
--- a/third_party/WebKit/Source/core/style/StyleImage.h
+++ b/third_party/WebKit/Source/core/style/StyleImage.h
@@ -33,11 +33,11 @@ namespace blink {
class CSSValue;
class ImageResourceContent;
class IntSize;
-class LayoutObject;
class LayoutSize;
class SVGImage;
class Document;
class ComputedStyle;
+class ImageResourceObserver;
typedef void* WrappedImagePtr;
@@ -63,12 +63,14 @@ class CORE_EXPORT StyleImage : public GarbageCollectedFinalized<StyleImage> {
const LayoutSize& default_object_size) const = 0;
virtual bool ImageHasRelativeSize() const = 0;
virtual bool UsesImageContainerSize() const = 0;
- virtual void AddClient(LayoutObject*) = 0;
- virtual void RemoveClient(LayoutObject*) = 0;
+ virtual void AddClient(ImageResourceObserver*) = 0;
+ virtual void RemoveClient(ImageResourceObserver*) = 0;
// Note that the container_size is in the effective zoom level of
- // the style that applies to the given LayoutObject, i.e if the zoom
+ // the style that applies to the given ImageResourceObserver, i.e if the zoom
// level is 1.0 the container_size should be unzoomed.
- virtual PassRefPtr<Image> GetImage(const LayoutObject&,
+ virtual PassRefPtr<Image> GetImage(const ImageResourceObserver&,
+ const Document&,
+ const ComputedStyle&,
const IntSize& container_size) const = 0;
virtual WrappedImagePtr Data() const = 0;
virtual float ImageScaleFactor() const { return 1; }
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp ('k') | third_party/WebKit/Source/core/style/StyleInvalidImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698