Changeset 157238 in webkit


Ignore:
Timestamp:
Oct 10, 2013 12:22:57 PM (11 years ago)
Author:
hmuller@adobe.com
Message:

[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):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r157208 r157238  
     12013-10-10  Hans Muller  <hmuller@adobe.com>
     2
     3        [CSS Shapes] clampToUnsigned() should return unsigned, not int
     4        https://bugs.webkit.org/show_bug.cgi?id=122601
     5
     6        Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
     7
     8        Reviewed by Andreas Kling.
     9
     10        * wtf/MathExtras.h:
     11        (clampToUnsigned):
     12
    1132013-10-08  Filip Pizlo  <fpizlo@apple.com>
    214
  • trunk/Source/WTF/wtf/MathExtras.h

    r156838 r157238  
    297297}
    298298
    299 inline int clampToUnsigned(double value)
     299inline unsigned clampToUnsigned(double value)
    300300{
    301301    return clampTo<unsigned>(value);
  • trunk/Source/WebCore/ChangeLog

    r157236 r157238  
     12013-10-10  Hans Muller  <hmuller@adobe.com>
     2
     3        [CSS Shapes] clampToUnsigned() should return unsigned, not int
     4        https://bugs.webkit.org/show_bug.cgi?id=122601
     5
     6        Reviewed by Andreas Kling.
     7
     8        Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
     9        No new tests since this is just an internal refactoring of existing code.
     10
     11        * rendering/shapes/RasterShape.cpp:
     12        (WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.
     13
    1142013-10-10  Bem Jones-Bey  <bjonesbe@adobe.com>
    215
  • trunk/Source/WebCore/rendering/shapes/RasterShape.cpp

    r156838 r157238  
    245245        return *m_intervals;
    246246
    247     unsigned marginBoundaryRadius = std::min(clampToUnsigned(ceil(shapeMargin())), std::max(m_imageSize.width(), m_imageSize.height()));
     247    unsigned marginBoundaryRadius = std::min(clampToUnsigned(ceil(shapeMargin())), std::max<unsigned>(m_imageSize.width(), m_imageSize.height()));
    248248    if (!m_marginIntervals)
    249249        m_marginIntervals = m_intervals->computeShapeMarginIntervals(marginBoundaryRadius);
Note: See TracChangeset for help on using the changeset viewer.