Title: [243680] trunk/Source/WebCore
Revision
243680
Author
[email protected]
Date
2019-03-30 10:50:37 -0700 (Sat, 30 Mar 2019)

Log Message

Try to fix Windows build.

* platform/graphics/RoundedRect.cpp:
(WebCore::approximateAsRegion):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (243679 => 243680)


--- trunk/Source/WebCore/ChangeLog	2019-03-30 16:38:17 UTC (rev 243679)
+++ trunk/Source/WebCore/ChangeLog	2019-03-30 17:50:37 UTC (rev 243680)
@@ -1,3 +1,10 @@
+2019-03-30  Antti Koivisto  <[email protected]>
+
+        Try to fix Windows build.
+
+        * platform/graphics/RoundedRect.cpp:
+        (WebCore::approximateAsRegion):
+
 2019-03-30  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: JSC Sampling Profiler thread not getting subtracted in CPU Usage Timeline

Modified: trunk/Source/WebCore/platform/graphics/RoundedRect.cpp (243679 => 243680)


--- trunk/Source/WebCore/platform/graphics/RoundedRect.cpp	2019-03-30 16:38:17 UTC (rev 243679)
+++ trunk/Source/WebCore/platform/graphics/RoundedRect.cpp	2019-03-30 17:50:37 UTC (rev 243680)
@@ -33,9 +33,8 @@
 #include "LayoutRect.h"
 #include "LayoutUnit.h"
 #include "Region.h"
-
 #include <algorithm>
-#include <math.h>
+#include <wtf/MathExtras.h>
 
 namespace WebCore {
 
@@ -327,7 +326,7 @@
     };
 
     auto subtractCornerRects = [&] (LayoutPoint corner, LayoutPoint ellipsisCenter, LayoutSize axes, double fromAngle) {
-        double toAngle = fromAngle + M_PI / 2;
+        double toAngle = fromAngle + piDouble / 2;
 
         // Substract more rects for longer, more rounded arcs.
         auto arcLengthFactor = roundToInt(std::min(axes.width(), axes.height()));
@@ -352,7 +351,7 @@
         auto corner = rect.minXMaxYCorner();
         auto axes = radii.bottomLeft();
         auto ellipsisCenter = LayoutPoint(corner.x() + axes.width(), corner.y() - axes.height());
-        subtractCornerRects(corner, ellipsisCenter, axes, M_PI / 2);
+        subtractCornerRects(corner, ellipsisCenter, axes, piDouble / 2);
     }
 
     {
@@ -359,7 +358,7 @@
         auto corner = rect.minXMinYCorner();
         auto axes = radii.topLeft();
         auto ellipsisCenter = LayoutPoint(corner.x() + axes.width(), corner.y() + axes.height());
-        subtractCornerRects(corner, ellipsisCenter, axes, M_PI);
+        subtractCornerRects(corner, ellipsisCenter, axes, piDouble);
     }
 
     {
@@ -366,7 +365,7 @@
         auto corner = rect.maxXMinYCorner();
         auto axes = radii.topRight();
         auto ellipsisCenter = LayoutPoint(corner.x() - axes.width(), corner.y() + axes.height());
-        subtractCornerRects(corner, ellipsisCenter, axes, M_PI * 3 / 2);
+        subtractCornerRects(corner, ellipsisCenter, axes, piDouble * 3 / 2);
     }
 
     return region;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to