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

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

Issue 1896893004: Hook up style invalidation for CSS Paint API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css-paint-register
Patch Set: rebase. Created 4 years, 7 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 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual WrappedImagePtr data() const = 0; 70 virtual WrappedImagePtr data() const = 0;
71 virtual float imageScaleFactor() const { return 1; } 71 virtual float imageScaleFactor() const { return 1; }
72 virtual bool knownToBeOpaque(const LayoutObject&) const = 0; 72 virtual bool knownToBeOpaque(const LayoutObject&) const = 0;
73 virtual ImageResource* cachedImage() const { return 0; } 73 virtual ImageResource* cachedImage() const { return 0; }
74 74
75 ALWAYS_INLINE bool isImageResource() const { return m_isImageResource; } 75 ALWAYS_INLINE bool isImageResource() const { return m_isImageResource; }
76 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; } 76 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; }
77 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; } 77 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; }
78 ALWAYS_INLINE bool isImageResourceSet() const { return m_isImageResourceSet; } 78 ALWAYS_INLINE bool isImageResourceSet() const { return m_isImageResourceSet; }
79 ALWAYS_INLINE bool isInvalidImage() const { return m_isInvalidImage; } 79 ALWAYS_INLINE bool isInvalidImage() const { return m_isInvalidImage; }
80 ALWAYS_INLINE bool isPaintImage() const { return m_isPaintImage; }
80 81
81 DEFINE_INLINE_VIRTUAL_TRACE() { } 82 DEFINE_INLINE_VIRTUAL_TRACE() { }
82 83
83 protected: 84 protected:
84 StyleImage() 85 StyleImage()
85 : m_isImageResource(false) 86 : m_isImageResource(false)
86 , m_isPendingImage(false) 87 , m_isPendingImage(false)
87 , m_isGeneratedImage(false) 88 , m_isGeneratedImage(false)
88 , m_isImageResourceSet(false) 89 , m_isImageResourceSet(false)
89 , m_isInvalidImage(false) 90 , m_isInvalidImage(false)
91 , m_isPaintImage(false)
90 { 92 {
91 } 93 }
92 bool m_isImageResource:1; 94 bool m_isImageResource:1;
93 bool m_isPendingImage:1; 95 bool m_isPendingImage:1;
94 bool m_isGeneratedImage:1; 96 bool m_isGeneratedImage:1;
95 bool m_isImageResourceSet:1; 97 bool m_isImageResourceSet:1;
96 bool m_isInvalidImage:1; 98 bool m_isInvalidImage:1;
99 bool m_isPaintImage:1;
97 100
98 static LayoutSize applyZoom(const LayoutSize&, float multiplier); 101 static LayoutSize applyZoom(const LayoutSize&, float multiplier);
99 LayoutSize imageSizeForSVGImage(SVGImage*, float multiplier, const LayoutSiz e& defaultObjectSize) const; 102 LayoutSize imageSizeForSVGImage(SVGImage*, float multiplier, const LayoutSiz e& defaultObjectSize) const;
100 }; 103 };
101 104
102 #define DEFINE_STYLE_IMAGE_TYPE_CASTS(thisType, function) \ 105 #define DEFINE_STYLE_IMAGE_TYPE_CASTS(thisType, function) \
103 DEFINE_TYPE_CASTS(thisType, StyleImage, styleImage, styleImage->function, st yleImage.function); \ 106 DEFINE_TYPE_CASTS(thisType, StyleImage, styleImage, styleImage->function, st yleImage.function); \
104 inline thisType* to##thisType(const Member<StyleImage>& styleImage) { return to##thisType(styleImage.get()); } \ 107 inline thisType* to##thisType(const Member<StyleImage>& styleImage) { return to##thisType(styleImage.get()); } \
105 typedef int NeedsSemiColonAfterDefineStyleImageTypeCasts 108 typedef int NeedsSemiColonAfterDefineStyleImageTypeCasts
106 109
107 } // namespace blink 110 } // namespace blink
108 #endif 111 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp ('k') | third_party/WebKit/Source/core/style/StylePendingImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698