Changeset 92588 in webkit


Ignore:
Timestamp:
Aug 8, 2011 1:42:14 AM (13 years ago)
Author:
bashi@chromium.org
Message:

Should not use C-style cast in CSSParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=65807

Remove C-style cast.

Reviewed by Kent Tamura.

No new tests because no behavior change.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseAnimationTimingFunction): Replaced a cast with clampToInteger().
(WebCore::CSSParser::parseFontFeatureTag): Ditto.
(WebCore::CSSParser::createKeyframeRule): Replaced a cast with C++-style cast.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r92587 r92588  
     12011-08-08  Kenichi Ishibashi  <bashi@chromium.org>
     2
     3        Should not use C-style cast in CSSParser.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=65807
     5
     6        Remove C-style cast.
     7
     8        Reviewed by Kent Tamura.
     9
     10        No new tests because no behavior change.
     11
     12        * css/CSSParser.cpp:
     13        (WebCore::CSSParser::parseAnimationTimingFunction): Replaced a cast with clampToInteger().
     14        (WebCore::CSSParser::parseFontFeatureTag): Ditto.
     15        (WebCore::CSSParser::createKeyframeRule): Replaced a cast with C++-style cast.
     16
    1172011-08-05  Pavel Feldman  <pfeldman@chromium.org>
    218
  • trunk/Source/WebCore/css/CSSParser.cpp

    r92549 r92588  
    32853285        if (!validUnit(v, FInteger, m_strict))
    32863286            return 0;
    3287         numSteps = static_cast<int>(min(v->fValue, (double)INT_MAX));
     3287        numSteps = clampToInteger(v->fValue);
    32883288        if (numSteps < 1)
    32893289            return 0;
     
    63346334    if (value) {
    63356335        if (value->unit == CSSPrimitiveValue::CSS_NUMBER && value->isInt && value->fValue >= 0) {
    6336             tagValue = static_cast<int>(value->fValue);
     6336            tagValue = clampToInteger(value->fValue);
    63376337            if (tagValue < 0)
    63386338                return false;
     
    69536953    String keyString;
    69546954    for (unsigned i = 0; i < keys->size(); ++i) {
    6955         float key = (float) keys->valueAt(i)->fValue;
     6955        float key = static_cast<float>(keys->valueAt(i)->fValue);
    69566956        if (i != 0)
    69576957            keyString += ",";
Note: See TracChangeset for help on using the changeset viewer.