Changeset 57236 in webkit


Ignore:
Timestamp:
Apr 7, 2010 2:53:26 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-07 Luiz Agostini <luiz.agostini@openbossa.org>

Reviewed by Darin Adler.

Adding static method zero() to classes IntPoint and FloatPoint.
https://bugs.webkit.org/show_bug.cgi?id=37220

Adding static method zero() to classes IntPoint and FloatPoint as suggested by Darin Adler.

  • platform/graphics/FloatPoint.h: (WebCore::FloatPoint::zero):
  • platform/graphics/IntPoint.h: (WebCore::IntPoint::zero): (WebCore::IntPoint::clampNegativeToZero):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r57235 r57236  
     12010-04-07  Luiz Agostini  <luiz.agostini@openbossa.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Adding static method zero() to classes IntPoint and FloatPoint.
     6        https://bugs.webkit.org/show_bug.cgi?id=37220
     7
     8        Adding static method zero() to classes IntPoint and FloatPoint as suggested by Darin Adler.
     9
     10        * platform/graphics/FloatPoint.h:
     11        (WebCore::FloatPoint::zero):
     12        * platform/graphics/IntPoint.h:
     13        (WebCore::IntPoint::zero):
     14        (WebCore::IntPoint::clampNegativeToZero):
     15
    1162010-04-07  Alexey Proskuryakov  <ap@apple.com>
    217
  • trunk/WebCore/platform/graphics/FloatPoint.h

    r55633 r57236  
    7070    FloatPoint(float x, float y) : m_x(x), m_y(y) { }
    7171    FloatPoint(const IntPoint&);
     72
     73
     74    static FloatPoint zero() { return FloatPoint(); }
    7275
    7376    static FloatPoint narrowPrecision(double x, double y);
  • trunk/WebCore/platform/graphics/IntPoint.h

    r57118 r57236  
    8282    explicit IntPoint(const IntSize& size) : m_x(size.width()), m_y(size.height()) { }
    8383
     84    static IntPoint zero() { return IntPoint(); }
     85
    8486    int x() const { return m_x; }
    8587    int y() const { return m_y; }
     
    105107    void clampNegativeToZero()
    106108    {
    107         *this = expandedTo(IntPoint());
     109        *this = expandedTo(zero());
    108110    }
    109111
Note: See TracChangeset for help on using the changeset viewer.