[CSS Shapes] clampToUnsigned() should return unsigned, not int
https://bugs.webkit.org/show_bug.cgi?id=122601
Source/WebCore:
Reviewed by Andreas Kling.
Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
No new tests since this is just an internal refactoring of existing code.
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.
Source/WTF:
Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
Reviewed by Andreas Kling.
* wtf/MathExtras.h:
(clampToUnsigned):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index d7c29fe..7c61149 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,15 @@
+2013-10-10 Hans Muller <hmuller@adobe.com>
+
+ [CSS Shapes] clampToUnsigned() should return unsigned, not int
+ https://bugs.webkit.org/show_bug.cgi?id=122601
+
+ Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
+
+ Reviewed by Andreas Kling.
+
+ * wtf/MathExtras.h:
+ (clampToUnsigned):
+
2013-10-08 Filip Pizlo <fpizlo@apple.com>
FTL should be able to do simple OSR exits using llvm.webkit.stackmap
diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h
index 9b223a5..a38d2e7 100644
--- a/Source/WTF/wtf/MathExtras.h
+++ b/Source/WTF/wtf/MathExtras.h
@@ -296,7 +296,7 @@
return clampTo<int>(value);
}
-inline int clampToUnsigned(double value)
+inline unsigned clampToUnsigned(double value)
{
return clampTo<unsigned>(value);
}
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 6bf3953..9672249 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2013-10-10 Hans Muller <hmuller@adobe.com>
+
+ [CSS Shapes] clampToUnsigned() should return unsigned, not int
+ https://bugs.webkit.org/show_bug.cgi?id=122601
+
+ Reviewed by Andreas Kling.
+
+ Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
+ No new tests since this is just an internal refactoring of existing code.
+
+ * rendering/shapes/RasterShape.cpp:
+ (WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.
+
2013-10-10 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] New positioning model: Shape cropped to margin box
diff --git a/Source/WebCore/rendering/shapes/RasterShape.cpp b/Source/WebCore/rendering/shapes/RasterShape.cpp
index 070555d..dbeda00 100644
--- a/Source/WebCore/rendering/shapes/RasterShape.cpp
+++ b/Source/WebCore/rendering/shapes/RasterShape.cpp
@@ -244,7 +244,7 @@
if (!shapeMargin())
return *m_intervals;
- unsigned marginBoundaryRadius = std::min(clampToUnsigned(ceil(shapeMargin())), std::max(m_imageSize.width(), m_imageSize.height()));
+ unsigned marginBoundaryRadius = std::min(clampToUnsigned(ceil(shapeMargin())), std::max<unsigned>(m_imageSize.width(), m_imageSize.height()));
if (!m_marginIntervals)
m_marginIntervals = m_intervals->computeShapeMarginIntervals(marginBoundaryRadius);