[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:41:58 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 20a991ba07a9345154d744f57b089e6a3ac9130a
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 24 11:51:17 2011 +0000
2011-01-24 Andreas Kling <kling at webkit.org>
Reviewed by Tor Arne Vestbø.
[Qt] Use rad2deg() from WTF instead of rolling our own.
https://bugs.webkit.org/show_bug.cgi?id=52993
* 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@76501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index fbdfe0e..0757971 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-24 Andreas Kling <kling at webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Use rad2deg() from WTF instead of rolling our own.
+ https://bugs.webkit.org/show_bug.cgi?id=52993
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::rotate):
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::addArc):
+
2011-01-24 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Martin Robinson.
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 87cc87c..c21c43d 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(qreal(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