[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

andreas.kling at nokia.com andreas.kling at nokia.com
Sun Feb 20 23:39:34 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 54a0191bae1227dbff08e46e4ed31af01c651efa
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jan 23 16:24:25 2011 +0000

    2011-01-23  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Tor Arne Vestbø.
    
            [Qt] Use rad2deg() from WTF instead of rolling our own.
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::rotate):
            * platform/graphics/qt/PathQt.cpp:
            (WebCore::Path::addArc):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76463 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index ef4d26f..adc4326 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-23  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Tor Arne Vestbø.
+
+        [Qt] Use rad2deg() from WTF instead of rolling our own.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::rotate):
+        * platform/graphics/qt/PathQt.cpp:
+        (WebCore::Path::addArc):
+
 2011-01-23  Kenneth Rohde Christiansen <kenneth at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 87cc87c..0718dcb 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -62,10 +62,7 @@
 #include <QPolygonF>
 #include <QStack>
 #include <QVector>
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
+#include <wtf/MathExtras.h>
 
 namespace WebCore {
 
@@ -1135,7 +1132,7 @@ void GraphicsContext::rotate(float radians)
     if (paintingDisabled())
         return;
 
-    m_data->p()->rotate(180 / M_PI*radians);
+    m_data->p()->rotate(rad2deg(radians));
 }
 
 void GraphicsContext::scale(const FloatSize& s)
diff --git a/Source/WebCore/platform/graphics/qt/PathQt.cpp b/Source/WebCore/platform/graphics/qt/PathQt.cpp
index 571b405..37413d8 100644
--- a/Source/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/PathQt.cpp
@@ -39,15 +39,9 @@
 #include <QPainterPath>
 #include <QTransform>
 #include <QString>
+#include <wtf/MathExtras.h>
 #include <wtf/OwnPtr.h>
 
-#define _USE_MATH_DEFINES
-#include <math.h>
-
-#ifndef M_PI
-#   define M_PI 3.14159265358979323846
-#endif
-
 namespace WebCore {
 
 Path::Path()
@@ -263,7 +257,6 @@ void Path::closeSubpath()
     m_path.closeSubpath();
 }
 
-#define DEGREES(t) ((t) * 180.0 / M_PI)
 void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool anticlockwise)
 {
     qreal xc = p.x();
@@ -280,8 +273,8 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
     anticlockwise = !anticlockwise;
     //end hack
 
-    float sa = DEGREES(sar);
-    float ea = DEGREES(ear);
+    float sa = rad2deg(sar);
+    float ea = rad2deg(ear);
 
     double span = 0;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list