WebCore: Guard uneven corners in rounded rectangles
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2020 18:10:49 +0000 (18:10 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2020 18:10:49 +0000 (18:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=206838

Reviewed by Darin Adler.

Source/WebCore:

No functional changes, covered by existing tests.

* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::platformAddPathForRoundedRect):

Source/WTF:

* wtf/PlatformHave.h: Add HAVE(CG_PATH_UNEVEN_CORNERS_ROUNDEDRECT).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255255 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/PlatformHave.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/PathCG.cpp

index 97fa4e2..b330c08 100644 (file)
@@ -1,3 +1,12 @@
+2020-01-28  Jonathan Bedard  <jbedard@apple.com>
+
+        WebCore: Guard uneven corners in rounded rectangles
+        https://bugs.webkit.org/show_bug.cgi?id=206838
+
+        Reviewed by Darin Adler.
+
+        * wtf/PlatformHave.h: Add HAVE(CG_PATH_UNEVEN_CORNERS_ROUNDEDRECT).
+
 2020-01-27  Jonathan Bedard  <jbedard@apple.com>
 
         WebCore: Remove iOS 11 macros from RenderThemeIOS.mm
index 4344a4d..0a4667a 100644 (file)
 #define HAVE_SYSTEM_FONT_STYLE_TITLE_0 1
 #define HAVE_SYSTEM_FONT_STYLE_TITLE_4 1
 #endif
+
+#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101400) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
+#define HAVE_CG_PATH_UNEVEN_CORNERS_ROUNDEDRECT 1
+#endif
index 3df1130..410d297 100644 (file)
@@ -1,3 +1,15 @@
+2020-01-28  Jonathan Bedard  <jbedard@apple.com>
+
+        WebCore: Guard uneven corners in rounded rectangles
+        https://bugs.webkit.org/show_bug.cgi?id=206838
+
+        Reviewed by Darin Adler.
+
+        No functional changes, covered by existing tests.
+
+        * platform/graphics/cg/PathCG.cpp:
+        (WebCore::Path::platformAddPathForRoundedRect):
+
 2020-01-28  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r255237.
index 3d1d5f1..f6ffc22 100644 (file)
@@ -314,7 +314,7 @@ void Path::platformAddPathForRoundedRect(const FloatRect& rect, const FloatSize&
         return;
     }
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
+#if HAVE(CG_PATH_UNEVEN_CORNERS_ROUNDEDRECT)
     CGRect rectToDraw = rect;
     
     enum Corners {