Title: [287879] trunk/Source
- Revision
- 287879
- Author
- [email protected]
- Date
- 2022-01-11 07:41:14 -0800 (Tue, 11 Jan 2022)
Log Message
Remove AppleTV specific disabling of conic gradients, its not necessary
https://bugs.webkit.org/show_bug.cgi?id=235041
Reviewed by Darin Adler.
Source/WebCore:
There doesn't seem to be any reason to disable conic gradients on AppleTV. We do still
need to disable it on windows, but rather than hard coding this in WebCore, use a new
HAVE macro to conditionalize the code.
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::paint):
* platform/graphics/cg/GradientRendererCG.cpp:
(WebCore::GradientRendererCG::drawConicGradient):
Source/WTF:
Add HAVE_CORE_GRAPHICS_CONIC_GRADIENTS macro and use it to control ENABLE_CSS_CONIC_GRADIENTS.
* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (287878 => 287879)
--- trunk/Source/WTF/ChangeLog 2022-01-11 15:18:25 UTC (rev 287878)
+++ trunk/Source/WTF/ChangeLog 2022-01-11 15:41:14 UTC (rev 287879)
@@ -1,3 +1,15 @@
+2022-01-11 Sam Weinig <[email protected]>
+
+ Remove AppleTV specific disabling of conic gradients, its not necessary
+ https://bugs.webkit.org/show_bug.cgi?id=235041
+
+ Reviewed by Darin Adler.
+
+ Add HAVE_CORE_GRAPHICS_CONIC_GRADIENTS macro and use it to control ENABLE_CSS_CONIC_GRADIENTS.
+
+ * wtf/PlatformEnableCocoa.h:
+ * wtf/PlatformHave.h:
+
2022-01-10 Alex Christensen <[email protected]>
Start using C++20
Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (287878 => 287879)
--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2022-01-11 15:18:25 UTC (rev 287878)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2022-01-11 15:41:14 UTC (rev 287879)
@@ -179,8 +179,7 @@
#define ENABLE_CSS_COMPOSITING 1
#endif
-// FIXME: Seems likely this can be enabled for tvOS.
-#if !defined(ENABLE_CSS_CONIC_GRADIENTS) && !PLATFORM(APPLETV)
+#if !defined(ENABLE_CSS_CONIC_GRADIENTS)
#define ENABLE_CSS_CONIC_GRADIENTS 1
#endif
Modified: trunk/Source/WTF/wtf/PlatformHave.h (287878 => 287879)
--- trunk/Source/WTF/wtf/PlatformHave.h 2022-01-11 15:18:25 UTC (rev 287878)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2022-01-11 15:41:14 UTC (rev 287879)
@@ -917,6 +917,7 @@
#define HAVE_CORE_GRAPHICS_LINEAR_SRGB_COLOR_SPACE 1
#define HAVE_CORE_GRAPHICS_ROMMRGB_COLOR_SPACE 1
#define HAVE_CORE_GRAPHICS_XYZ_COLOR_SPACE 1
+#define HAVE_CORE_GRAPHICS_CONIC_GRADIENTS 1
#endif
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
Modified: trunk/Source/WebCore/ChangeLog (287878 => 287879)
--- trunk/Source/WebCore/ChangeLog 2022-01-11 15:18:25 UTC (rev 287878)
+++ trunk/Source/WebCore/ChangeLog 2022-01-11 15:41:14 UTC (rev 287879)
@@ -1,3 +1,19 @@
+2022-01-11 Sam Weinig <[email protected]>
+
+ Remove AppleTV specific disabling of conic gradients, its not necessary
+ https://bugs.webkit.org/show_bug.cgi?id=235041
+
+ Reviewed by Darin Adler.
+
+ There doesn't seem to be any reason to disable conic gradients on AppleTV. We do still
+ need to disable it on windows, but rather than hard coding this in WebCore, use a new
+ HAVE macro to conditionalize the code.
+
+ * platform/graphics/cg/GradientCG.cpp:
+ (WebCore::Gradient::paint):
+ * platform/graphics/cg/GradientRendererCG.cpp:
+ (WebCore::GradientRendererCG::drawConicGradient):
+
2022-01-11 Tim Nguyen <[email protected]>
::backdrop pseudo element should react to associated element event listeners
Modified: trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp (287878 => 287879)
--- trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp 2022-01-11 15:18:25 UTC (rev 287878)
+++ trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp 2022-01-11 15:41:14 UTC (rev 287879)
@@ -160,9 +160,7 @@
CGContextRestoreGState(platformContext);
},
[&] (const ConicData& data) {
-// FIXME: Seems like this should be HAVE(CG_CONTEXT_DRAW_CONIC_GRADIENT).
-// FIXME: Can we change tvOS to be like the other Cocoa platforms?
-#if PLATFORM(COCOA) && !PLATFORM(APPLETV)
+#if HAVE(CORE_GRAPHICS_CONIC_GRADIENTS)
CGContextSaveGState(platformContext);
CGContextTranslateCTM(platformContext, data.point0.x(), data.point0.y());
CGContextRotateCTM(platformContext, (CGFloat)-M_PI_2);
Modified: trunk/Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp (287878 => 287879)
--- trunk/Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp 2022-01-11 15:18:25 UTC (rev 287878)
+++ trunk/Source/WebCore/platform/graphics/cg/GradientRendererCG.cpp 2022-01-11 15:41:14 UTC (rev 287879)
@@ -684,9 +684,7 @@
void GradientRendererCG::drawConicGradient(CGContextRef platformContext, CGPoint center, CGFloat angle)
{
-// FIXME: Seems like this should be HAVE(CG_CONTEXT_DRAW_CONIC_GRADIENT).
-// FIXME: Can we change tvOS to be like the other Cocoa platforms?
-#if PLATFORM(COCOA) && !PLATFORM(APPLETV)
+#if HAVE(CORE_GRAPHICS_CONIC_GRADIENTS)
WTF::switchOn(m_strategy,
[&] (Gradient& gradient) {
CGContextDrawConicGradient(platformContext, gradient.gradient.get(), center, angle);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes