Title: [222246] trunk/Source/WebCore
- Revision
- 222246
- Author
- [email protected]
- Date
- 2017-09-19 19:40:40 -0700 (Tue, 19 Sep 2017)
Log Message
Image subclasses should support is<> and downcast<>
https://bugs.webkit.org/show_bug.cgi?id=177209
Reviewed by Tim Horton.
Add SPECIALIZE_TYPE_TRAITS_IMAGE() for Image subclasses.
Also use #pragma once in these headers.
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.h:
* platform/graphics/Image.h:
* platform/graphics/NamedImageGeneratedImage.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222245 => 222246)
--- trunk/Source/WebCore/ChangeLog 2017-09-20 02:20:28 UTC (rev 222245)
+++ trunk/Source/WebCore/ChangeLog 2017-09-20 02:40:40 UTC (rev 222246)
@@ -1,3 +1,20 @@
+2017-09-19 Simon Fraser <[email protected]>
+
+ Image subclasses should support is<> and downcast<>
+ https://bugs.webkit.org/show_bug.cgi?id=177209
+
+ Reviewed by Tim Horton.
+
+ Add SPECIALIZE_TYPE_TRAITS_IMAGE() for Image subclasses.
+
+ Also use #pragma once in these headers.
+
+ * platform/graphics/CrossfadeGeneratedImage.h:
+ * platform/graphics/GeneratedImage.h:
+ * platform/graphics/GradientImage.h:
+ * platform/graphics/Image.h:
+ * platform/graphics/NamedImageGeneratedImage.h:
+
2017-09-19 Wenson Hsieh <[email protected]>
REGRESSION (r215613): Incorrect corners clipping with border-radius
Modified: trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h (222245 => 222246)
--- trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h 2017-09-20 02:20:28 UTC (rev 222245)
+++ trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h 2017-09-20 02:40:40 UTC (rev 222246)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CrossfadeGeneratedImage_h
-#define CrossfadeGeneratedImage_h
+#pragma once
#include "FloatSize.h"
#include "GeneratedImage.h"
@@ -68,4 +67,4 @@
}
-#endif
+SPECIALIZE_TYPE_TRAITS_IMAGE(CrossfadeGeneratedImage)
Modified: trunk/Source/WebCore/platform/graphics/GeneratedImage.h (222245 => 222246)
--- trunk/Source/WebCore/platform/graphics/GeneratedImage.h 2017-09-20 02:20:28 UTC (rev 222245)
+++ trunk/Source/WebCore/platform/graphics/GeneratedImage.h 2017-09-20 02:40:40 UTC (rev 222246)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef GeneratedImage_h
-#define GeneratedImage_h
+#pragma once
#include "FloatSize.h"
#include "Image.h"
@@ -64,4 +63,4 @@
}
-#endif
+SPECIALIZE_TYPE_TRAITS_IMAGE(GeneratedImage)
Modified: trunk/Source/WebCore/platform/graphics/GradientImage.h (222245 => 222246)
--- trunk/Source/WebCore/platform/graphics/GradientImage.h 2017-09-20 02:20:28 UTC (rev 222245)
+++ trunk/Source/WebCore/platform/graphics/GradientImage.h 2017-09-20 02:40:40 UTC (rev 222246)
@@ -41,6 +41,8 @@
virtual ~GradientImage();
+ const Gradient& gradient() const { return m_gradient.get(); }
+
private:
GradientImage(Gradient&, const FloatSize&);
@@ -56,3 +58,5 @@
};
}
+
+SPECIALIZE_TYPE_TRAITS_IMAGE(GradientImage)
Modified: trunk/Source/WebCore/platform/graphics/Image.h (222245 => 222246)
--- trunk/Source/WebCore/platform/graphics/Image.h 2017-09-20 02:20:28 UTC (rev 222245)
+++ trunk/Source/WebCore/platform/graphics/Image.h 2017-09-20 02:40:40 UTC (rev 222246)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Image_h
-#define Image_h
+#pragma once
#include "Color.h"
#include "DecodingOptions.h"
@@ -217,4 +216,3 @@
static bool isType(const WebCore::Image& image) { return image.is##ToClassName(); } \
SPECIALIZE_TYPE_TRAITS_END()
-#endif // Image_h
Modified: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h (222245 => 222246)
--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h 2017-09-20 02:20:28 UTC (rev 222245)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h 2017-09-20 02:40:40 UTC (rev 222246)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NamedImageGeneratedImage_h
-#define NamedImageGeneratedImage_h
+#pragma once
#include "FloatSize.h"
#include "GeneratedImage.h"
@@ -54,4 +53,4 @@
}
-#endif
+SPECIALIZE_TYPE_TRAITS_IMAGE(NamedImageGeneratedImage)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes