Changeset 147477 in webkit


Ignore:
Timestamp:
Apr 2, 2013 11:36:40 AM (11 years ago)
Author:
danakj@chromium.org
Message:

[chromium] Initialize all fields in WebFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=113807

Reviewed by James Robinson.

  • chromium/public/WebFilterOperation.h:

(WebKit::WebFilterOperation::WebFilterOperation):

  • chromium/src/WebFilterOperation.cpp:

(WebKit::WebFilterOperation::WebFilterOperation):

Location:
trunk/Source/Platform
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/Platform/ChangeLog

    r147163 r147477  
     12013-04-02  Dana Jansens  <danakj@chromium.org>
     2
     3        [chromium] Initialize all fields in WebFilterOperation
     4        https://bugs.webkit.org/show_bug.cgi?id=113807
     5
     6        Reviewed by James Robinson.
     7
     8        * chromium/public/WebFilterOperation.h:
     9        (WebKit::WebFilterOperation::WebFilterOperation):
     10        * chromium/src/WebFilterOperation.cpp:
     11        (WebKit::WebFilterOperation::WebFilterOperation):
     12
    1132013-03-28  Tien-Ren Chen  <trchen@chromium.org>
    214
  • trunk/Source/Platform/chromium/public/WebFilterOperation.h

    r146013 r147477  
    159159
    160160    WebFilterOperation(FilterType type, float amount)
    161     {
    162         WEBKIT_ASSERT(type != FilterTypeDropShadow && type != FilterTypeColorMatrix);
    163         m_type = type;
    164         m_amount = amount;
    165         m_dropShadowColor = 0;
     161        : m_type(type)
     162        , m_amount(amount)
     163        , m_dropShadowOffset(0, 0)
     164        , m_dropShadowColor(0)
     165        , m_zoomInset(0)
     166    {
     167        WEBKIT_ASSERT(m_type != FilterTypeDropShadow && m_type != FilterTypeColorMatrix);
     168        memset(m_matrix, 0, sizeof(m_matrix));
    166169    }
    167170
    168171    WebFilterOperation(FilterType type, WebPoint offset, float stdDeviation, WebColor color)
    169     {
    170         WEBKIT_ASSERT(type == FilterTypeDropShadow);
    171         m_type = type;
    172         m_amount = stdDeviation;
    173         m_dropShadowOffset = offset;
    174         m_dropShadowColor = color;
     172        : m_type(type)
     173        , m_amount(stdDeviation)
     174        , m_dropShadowOffset(offset)
     175        , m_dropShadowColor(color)
     176        , m_zoomInset(0)
     177    {
     178        WEBKIT_ASSERT(m_type == FilterTypeDropShadow);
     179        memset(m_matrix, 0, sizeof(m_matrix));
    175180    }
    176181
     
    178183
    179184    WebFilterOperation(FilterType type, float amount, int inset)
    180     {
    181         WEBKIT_ASSERT(type == FilterTypeZoom);
    182         m_type = type;
    183         m_amount = amount;
    184         m_zoomInset = inset;
     185        : m_type(type)
     186        , m_amount(amount)
     187        , m_dropShadowOffset(0, 0)
     188        , m_dropShadowColor(0)
     189        , m_zoomInset(inset)
     190    {
     191        WEBKIT_ASSERT(m_type == FilterTypeZoom);
     192        memset(m_matrix, 0, sizeof(m_matrix));
    185193    }
    186194};
  • trunk/Source/Platform/chromium/src/WebFilterOperation.cpp

    r124392 r147477  
    4646
    4747WebFilterOperation::WebFilterOperation(FilterType type, SkScalar matrix[20])
     48    : m_type(type)
     49    , m_amount(0)
     50    , m_dropShadowOffset(0, 0)
     51    , m_dropShadowColor(0)
     52    , m_zoomInset(0)
    4853{
    49     WEBKIT_ASSERT(type == FilterTypeColorMatrix);
    50     m_type = type;
     54    WEBKIT_ASSERT(m_type == FilterTypeColorMatrix);
    5155    memcpy(m_matrix, matrix, sizeof(m_matrix));
    5256}
Note: See TracChangeset for help on using the changeset viewer.