<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[23930] trunk</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/23930">23930</a></dd>
<dt>Author</dt> <dd>weinig</dd>
<dt>Date</dt> <dd>2007-07-02 11:44:00 -0700 (Mon, 02 Jul 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>JavaScriptCore:

        Reviewed by Kevin McCullough.

        Third round of fixes for implicit 64-32 bit conversion errors.
        &lt;rdar://problem/5292262&gt;

        Add custom piDouble and piFloat constants to use instead of M_PI.

        * kjs/math_object.cpp:
        (MathObjectImp::getValueProperty):
        * wtf/MathExtras.h:
        (wtf_atan2):

WebCore:

        Reviewed by Kevin McCullough.

        Third round of fixes for implicit 64-32 bit conversion errors.
        &lt;rdar://problem/5292262&gt;

        Use new piDouble and piFloat constants instead of M_PI.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::rotate):
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::SVGPathParser::calculateArc):
        * platform/graphics/Path.cpp:
        (WebCore::pathLengthApplierFunction):
        (WebCore::Path::createEllipse):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawEllipse):
        (WebCore::GraphicsContext::strokeArc):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::setCurrentPage):
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
        * rendering/RenderPath.cpp:
        (WebCore::drawMarkerWithData):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJavaScriptCoreChangeLog">trunk/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkJavaScriptCorekjsmath_objectcpp">trunk/JavaScriptCore/kjs/math_object.cpp</a></li>
<li><a href="#trunkJavaScriptCorewtfMathExtrash">trunk/JavaScriptCore/wtf/MathExtras.h</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorehtmlCanvasRenderingContext2Dcpp">trunk/WebCore/html/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkWebCoreksvg2svgSVGParserUtilitiescpp">trunk/WebCore/ksvg2/svg/SVGParserUtilities.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsPathcpp">trunk/WebCore/platform/graphics/Path.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicscgGraphicsContextCGcpp">trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicscgPDFDocumentImagecpp">trunk/WebCore/platform/graphics/cg/PDFDocumentImage.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicssvgfilterscgSVGFEHelpersCgh">trunk/WebCore/platform/graphics/svg/filters/cg/SVGFEHelpersCg.h</a></li>
<li><a href="#trunkWebCorerenderingRenderPathcpp">trunk/WebCore/rendering/RenderPath.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/ChangeLog (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/ChangeLog        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/JavaScriptCore/ChangeLog        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2007-07-02  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Reviewed by Kevin McCullough.
+
+        Third round of fixes for implicit 64-32 bit conversion errors.
+        &lt;rdar://problem/5292262&gt;
+
+        Add custom piDouble and piFloat constants to use instead of M_PI.
+
+        * kjs/math_object.cpp:
+        (MathObjectImp::getValueProperty):
+        * wtf/MathExtras.h:
+        (wtf_atan2):
+
</ins><span class="cx"> 2007-06-29  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin.
</span></span></pre></div>
<a id="trunkJavaScriptCorekjsmath_objectcpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/kjs/math_object.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/kjs/math_object.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/JavaScriptCore/kjs/math_object.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">     d = 1.0/log(10.0);
</span><span class="cx">     break;
</span><span class="cx">   case Pi:
</span><del>-    d = M_PI;
</del><ins>+    d = piDouble;
</ins><span class="cx">     break;
</span><span class="cx">   case Sqrt1_2:
</span><span class="cx">     d = sqrt(0.5);
</span></span></pre></div>
<a id="trunkJavaScriptCorewtfMathExtrash"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/wtf/MathExtras.h (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/wtf/MathExtras.h        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/JavaScriptCore/wtf/MathExtras.h        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -39,6 +39,26 @@
</span><span class="cx"> #include &lt;float.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#endif
+
+#ifndef M_PI
+const double piDouble = 3.14159265358979323846;
+const float piFloat = 3.14159265358979323846f;
+#else
+const double piDouble = M_PI;
+const float piFloat = static_cast&lt;float&gt;(M_PI);
+#endif
+
+#ifndef M_PI_4
+const double piOverFourDouble = 0.785398163397448309616;
+const float piOverFourFloat = 0.785398163397448309616f;
+#else
+const double piOverFourDouble = M_PI_4;
+const float piOverFourFloat = static_cast&lt;float&gt;(M_PI_4);
+#endif
+
+#if COMPILER(MSVC)
+
</ins><span class="cx"> inline bool isinf(double num) { return !_finite(num) &amp;&amp; !_isnan(num); }
</span><span class="cx"> inline bool isnan(double num) { return !!_isnan(num); }
</span><span class="cx"> inline long lround(double num) { return static_cast&lt;long&gt;(num &gt; 0 ? num + 0.5 : ceil(num - 0.5)); }
</span><span class="lines">@@ -53,14 +73,6 @@
</span><span class="cx"> inline double copysign(double x, double y) { return _copysign(x, y); }
</span><span class="cx"> inline int isfinite(double x) { return _finite(x); }
</span><span class="cx"> 
</span><del>-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif  //  M_PI
-
-#ifndef M_PI_4
-#define M_PI_4 0.785398163397448309616
-#endif  //  M_PI_4
-
</del><span class="cx"> // Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values.
</span><span class="cx"> inline double wtf_atan2(double x, double y)
</span><span class="cx"> {
</span><span class="lines">@@ -70,13 +82,13 @@
</span><span class="cx">     double result = KJS::NaN;
</span><span class="cx"> 
</span><span class="cx">     if (x == posInf &amp;&amp; y == posInf)
</span><del>-        result = M_PI_4;
</del><ins>+        result = piOverFourDouble;
</ins><span class="cx">     else if (x == posInf &amp;&amp; y == negInf)
</span><del>-        result = 3 * M_PI_4;
</del><ins>+        result = 3 * piOverFourDouble;
</ins><span class="cx">     else if (x == negInf &amp;&amp; y == posInf)
</span><del>-        result = -M_PI_4;
</del><ins>+        result = -piOverFourDouble;
</ins><span class="cx">     else if (x == negInf &amp;&amp; y == negInf)
</span><del>-        result = -3 * M_PI_4;
</del><ins>+        result = -3 * piOverFourDouble;
</ins><span class="cx">     else
</span><span class="cx">         result = ::atan2(x, y);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/ChangeLog        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2007-07-02  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Reviewed by Kevin McCullough.
+
+        Third round of fixes for implicit 64-32 bit conversion errors.
+        &lt;rdar://problem/5292262&gt;
+
+        Use new piDouble and piFloat constants instead of M_PI.
+
+        * html/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::rotate):
+        * ksvg2/svg/SVGParserUtilities.cpp:
+        (WebCore::SVGPathParser::calculateArc):
+        * platform/graphics/Path.cpp:
+        (WebCore::pathLengthApplierFunction):
+        (WebCore::Path::createEllipse):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::drawEllipse):
+        (WebCore::GraphicsContext::strokeArc):
+        * platform/graphics/cg/PDFDocumentImage.cpp:
+        (WebCore::PDFDocumentImage::setCurrentPage):
+        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
+        * rendering/RenderPath.cpp:
+        (WebCore::drawMarkerWithData):
+
</ins><span class="cx"> 2007-07-01  Adam Roben  &lt;aroben@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Clarify/fix {Shadow,BorderImage}ParseContext's memory management
</span></span></pre></div>
<a id="trunkWebCorehtmlCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/CanvasRenderingContext2D.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasRenderingContext2D.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/html/CanvasRenderingContext2D.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx">     if (!c)
</span><span class="cx">         return;
</span><span class="cx">     c-&gt;rotate(angleInRadians);
</span><del>-    state().m_path.transform(AffineTransform().rotate(-angleInRadians/M_PI*180));
</del><ins>+    state().m_path.transform(AffineTransform().rotate(-angleInRadians / piDouble * 180.0));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CanvasRenderingContext2D::translate(float tx, float ty)
</span></span></pre></div>
<a id="trunkWebCoreksvg2svgSVGParserUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ksvg2/svg/SVGParserUtilities.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ksvg2/svg/SVGParserUtilities.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/ksvg2/svg/SVGParserUtilities.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -456,8 +456,8 @@
</span><span class="cx">     double th0, th1, th_arc;
</span><span class="cx">     int i, n_segs;
</span><span class="cx"> 
</span><del>-    sin_th = sin(angle * (M_PI / 180.0));
-    cos_th = cos(angle * (M_PI / 180.0));
</del><ins>+    sin_th = sin(angle * (piDouble / 180.0));
+    cos_th = cos(angle * (piDouble / 180.0));
</ins><span class="cx"> 
</span><span class="cx">     double dx;
</span><span class="cx"> 
</span><span class="lines">@@ -532,11 +532,11 @@
</span><span class="cx"> 
</span><span class="cx">     th_arc = th1 - th0;
</span><span class="cx">     if (th_arc &lt; 0 &amp;&amp; sweepFlag)
</span><del>-        th_arc += 2 * M_PI;
</del><ins>+        th_arc += 2 * piDouble;
</ins><span class="cx">     else if (th_arc &gt; 0 &amp;&amp; !sweepFlag)
</span><del>-        th_arc -= 2 * M_PI;
</del><ins>+        th_arc -= 2 * piDouble;
</ins><span class="cx"> 
</span><del>-    n_segs = (int) (int) ceil(fabs(th_arc / (M_PI * 0.5 + 0.001)));
</del><ins>+    n_segs = (int) (int) ceil(fabs(th_arc / (piDouble * 0.5 + 0.001)));
</ins><span class="cx"> 
</span><span class="cx">     for(i = 0; i &lt; n_segs; i++) {
</span><span class="cx">         double sin_th, cos_th;
</span><span class="lines">@@ -548,8 +548,8 @@
</span><span class="cx">         double _th0 = th0 + i * th_arc / n_segs;
</span><span class="cx">         double _th1 = th0 + (i + 1) * th_arc / n_segs;
</span><span class="cx"> 
</span><del>-        sin_th = sin(angle * (M_PI / 180.0));
-        cos_th = cos(angle * (M_PI / 180.0));
</del><ins>+        sin_th = sin(angle * (piDouble / 180.0));
+        cos_th = cos(angle * (piDouble / 180.0));
</ins><span class="cx"> 
</span><span class="cx">         /* inverse transform compared with rsvg_path_arc */
</span><span class="cx">         a00 = cos_th * r1;
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/Path.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/Path.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/platform/graphics/Path.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">             float offset = traversalState.m_desiredLength - traversalState.m_totalLength;
</span><span class="cx">             traversalState.m_current.move(offset * cosf(slope), offset * sinf(slope));
</span><span class="cx">         } else {
</span><del>-            static const float rad2deg = 180.0f / static_cast&lt;float&gt;(M_PI);
</del><ins>+            static const float rad2deg = 180.0f / piFloat;
</ins><span class="cx">             traversalState.m_normalAngle = slope * rad2deg;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        double angle = double(step) / double(num) * 2.0 * M_PI;
</del><ins>+        double angle = static_cast&lt;double&gt;(step) / static_cast&lt;double&gt;(num) * 2.0 * piDouble;
</ins><span class="cx">         x = cx + cos(angle) * rx;
</span><span class="cx">         y = cy + sin(angle) * ry;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicscgGraphicsContextCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx">     CGContextRef context = platformContext();
</span><span class="cx">     CGContextBeginPath(context);
</span><span class="cx">     float r = (float)rect.width() / 2;
</span><del>-    CGContextAddArc(context, rect.x() + r, rect.y() + r, r, 0, static_cast&lt;float&gt;(2*M_PI), 0);
</del><ins>+    CGContextAddArc(context, rect.x() + r, rect.y() + r, r, 0.0f, 2.0f * piFloat, 0);
</ins><span class="cx">     CGContextClosePath(context);
</span><span class="cx"> 
</span><span class="cx">     if (fillColor().alpha()) {
</span><span class="lines">@@ -299,8 +299,8 @@
</span><span class="cx">     float vRadius = h / 2;
</span><span class="cx">     float fa = startAngle;
</span><span class="cx">     float falen =  fa + angleSpan;
</span><del>-    float start = -fa * M_PI / 180.0f;
-    float end = -falen * M_PI / 180.0f;
</del><ins>+    float start = -fa * piFloat / 180.0f;
+    float end = -falen * piFloat / 180.0f;
</ins><span class="cx">     CGContextAddArc(context, x + hRadius, (y + vRadius) * reverseScaleFactor, hRadius, start, end, true);
</span><span class="cx"> 
</span><span class="cx">     if (w != h)
</span><span class="lines">@@ -329,9 +329,9 @@
</span><span class="cx">         // will be 50 pixels.
</span><span class="cx">         int distance;
</span><span class="cx">         if (hRadius == vRadius)
</span><del>-            distance = (int)(M_PI * hRadius) / 2;
</del><ins>+            distance = static_cast&lt;int&gt;((piFloat * hRadius) / 2.0f);
</ins><span class="cx">         else // We are elliptical and will have to estimate the distance
</span><del>-            distance = (int)(M_PI * sqrt((hRadius * hRadius + vRadius * vRadius) / 2)) / 2;
</del><ins>+            distance = static_cast&lt;int&gt;((piFloat * sqrtf((hRadius * hRadius + vRadius * vRadius) / 2.0f)) / 2.0f);
</ins><span class="cx">         
</span><span class="cx">         int remainder = distance % patWidth;
</span><span class="cx">         int coverage = distance - remainder;
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicscgPDFDocumentImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/cg/PDFDocumentImage.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/platform/graphics/cg/PDFDocumentImage.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #if PLATFORM(CG)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><ins>+#include &lt;wtf/MathExtras.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="cx"> 
</span><span class="lines">@@ -131,7 +132,7 @@
</span><span class="cx">         m_cropBox = m_mediaBox;
</span><span class="cx"> 
</span><span class="cx">     // get page rotation angle
</span><del>-    m_rotation = CGPDFPageGetRotationAngle(cgPage) * M_PI / 180.0f; // to radians
</del><ins>+    m_rotation = CGPDFPageGetRotationAngle(cgPage) * piFloat / 180.0f; // to radians
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int PDFDocumentImage::pageCount() const
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicssvgfilterscgSVGFEHelpersCgh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/svg/filters/cg/SVGFEHelpersCg.h (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/svg/filters/cg/SVGFEHelpersCg.h        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/platform/graphics/svg/filters/cg/SVGFEHelpersCg.h        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -20,11 +20,12 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG) &amp;&amp; ENABLE(SVG_EXPERIMENTAL_FEATURES)
</span><ins>+
</ins><span class="cx"> #include &quot;BlockExceptions.h&quot;
</span><span class="cx"> #include &quot;SVGFEDisplacementMap.h&quot;
</span><span class="cx"> #include &quot;SVGResourceFilter.h&quot;
</span><del>-
</del><span class="cx"> #include &lt;QuartzCore/CoreImage.h&gt;
</span><ins>+#include &lt;wtf/MathExtras.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> class Color;
</span><span class="cx"> class SVGLightSource;
</span><span class="lines">@@ -70,6 +71,6 @@
</span><span class="cx">         filter = crop; \
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-#define deg2rad(d) ((d * (2.0 * M_PI)) / 360.0)
</del><ins>+#define deg2rad(d) ((d * (2.0 * piDouble)) / 360.0)
</ins><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SVG) &amp;&amp; ENABLE(SVG_EXPERIMENTAL_FEATURES)
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderPath.cpp (23929 => 23930)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderPath.cpp        2007-07-02 15:52:25 UTC (rev 23929)
+++ trunk/WebCore/rendering/RenderPath.cpp        2007-07-02 18:44:00 UTC (rev 23930)
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx">     FloatPoint inslopeChange = data.inslopePoints[1] - FloatSize(data.inslopePoints[0].x(), data.inslopePoints[0].y());
</span><span class="cx">     FloatPoint outslopeChange = data.outslopePoints[1] - FloatSize(data.outslopePoints[0].x(), data.outslopePoints[0].y());
</span><span class="cx"> 
</span><del>-    static const double deg2rad = M_PI / 180.0;
</del><ins>+    static const double deg2rad = piDouble / 180.0;
</ins><span class="cx">     double inslope = atan2(inslopeChange.y(), inslopeChange.x()) / deg2rad;
</span><span class="cx">     double outslope = atan2(outslopeChange.y(), outslopeChange.x()) / deg2rad;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>