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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleImage.h

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 13 matching lines...) Expand all
24 #ifndef StyleImage_h 24 #ifndef StyleImage_h
25 #define StyleImage_h 25 #define StyleImage_h
26 26
27 #include "core/CoreExport.h" 27 #include "core/CoreExport.h"
28 #include "platform/graphics/Image.h" 28 #include "platform/graphics/Image.h"
29 #include "wtf/Forward.h" 29 #include "wtf/Forward.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
33 class CSSValue; 33 class CSSValue;
34 class ImageResource; 34 class ImageResourceContent;
35 class IntSize; 35 class IntSize;
36 class LayoutObject; 36 class LayoutObject;
37 class LayoutSize; 37 class LayoutSize;
38 class SVGImage; 38 class SVGImage;
39 39
40 typedef void* WrappedImagePtr; 40 typedef void* WrappedImagePtr;
41 41
42 class CORE_EXPORT StyleImage : public GarbageCollectedFinalized<StyleImage> { 42 class CORE_EXPORT StyleImage : public GarbageCollectedFinalized<StyleImage> {
43 public: 43 public:
44 virtual ~StyleImage() {} 44 virtual ~StyleImage() {}
(...skipping 20 matching lines...) Expand all
65 virtual void removeClient(LayoutObject*) = 0; 65 virtual void removeClient(LayoutObject*) = 0;
66 // Note that the containerSize is assumed to be in the effective 66 // Note that the containerSize is assumed to be in the effective
67 // zoom level given by multiplier, i.e if the multiplier is the 67 // zoom level given by multiplier, i.e if the multiplier is the
68 // constant 1 the containerSize should be unzoomed. 68 // constant 1 the containerSize should be unzoomed.
69 virtual PassRefPtr<Image> image(const LayoutObject&, 69 virtual PassRefPtr<Image> image(const LayoutObject&,
70 const IntSize& containerSize, 70 const IntSize& containerSize,
71 float multiplier) const = 0; 71 float multiplier) const = 0;
72 virtual WrappedImagePtr data() const = 0; 72 virtual WrappedImagePtr data() const = 0;
73 virtual float imageScaleFactor() const { return 1; } 73 virtual float imageScaleFactor() const { return 1; }
74 virtual bool knownToBeOpaque(const LayoutObject&) const = 0; 74 virtual bool knownToBeOpaque(const LayoutObject&) const = 0;
75 virtual ImageResource* cachedImage() const { return 0; } 75 virtual ImageResourceContent* cachedImage() const { return 0; }
76 76
77 ALWAYS_INLINE bool isImageResource() const { return m_isImageResource; } 77 ALWAYS_INLINE bool isImageResource() const { return m_isImageResource; }
78 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; } 78 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; }
79 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; } 79 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; }
80 ALWAYS_INLINE bool isImageResourceSet() const { return m_isImageResourceSet; } 80 ALWAYS_INLINE bool isImageResourceSet() const { return m_isImageResourceSet; }
81 ALWAYS_INLINE bool isInvalidImage() const { return m_isInvalidImage; } 81 ALWAYS_INLINE bool isInvalidImage() const { return m_isInvalidImage; }
82 ALWAYS_INLINE bool isPaintImage() const { return m_isPaintImage; } 82 ALWAYS_INLINE bool isPaintImage() const { return m_isPaintImage; }
83 83
84 DEFINE_INLINE_VIRTUAL_TRACE() {} 84 DEFINE_INLINE_VIRTUAL_TRACE() {}
85 85
(...skipping 21 matching lines...) Expand all
107 #define DEFINE_STYLE_IMAGE_TYPE_CASTS(thisType, function) \ 107 #define DEFINE_STYLE_IMAGE_TYPE_CASTS(thisType, function) \
108 DEFINE_TYPE_CASTS(thisType, StyleImage, styleImage, styleImage->function, \ 108 DEFINE_TYPE_CASTS(thisType, StyleImage, styleImage, styleImage->function, \
109 styleImage.function); \ 109 styleImage.function); \
110 inline thisType* to##thisType(const Member<StyleImage>& styleImage) { \ 110 inline thisType* to##thisType(const Member<StyleImage>& styleImage) { \
111 return to##thisType(styleImage.get()); \ 111 return to##thisType(styleImage.get()); \
112 } \ 112 } \
113 typedef int NeedsSemiColonAfterDefineStyleImageTypeCasts 113 typedef int NeedsSemiColonAfterDefineStyleImageTypeCasts
114 114
115 } // namespace blink 115 } // namespace blink
116 #endif 116 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp ('k') | third_party/WebKit/Source/core/svg/SVGFEImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698