Changeset 59473 in webkit


Ignore:
Timestamp:
May 14, 2010 7:47:12 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-05-14 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Darin Adler.

CSSParser::parseColor() shouldn't alter 'color' unless passed a valid color string.
https://bugs.webkit.org/show_bug.cgi?id=39031

  • css/CSSParser.cpp: (WebCore::CSSParser::parseColor):
  • editing/ApplyStyleCommand.cpp: (WebCore::StyleChange::extractTextStyles): Don't depend on old behavior.
  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setShadow): Remove dead code.
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r59472 r59473  
     12010-05-14  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        CSSParser::parseColor() shouldn't alter 'color' unless passed a valid color string.
     6        https://bugs.webkit.org/show_bug.cgi?id=39031
     7
     8        * css/CSSParser.cpp:
     9        (WebCore::CSSParser::parseColor):
     10        * editing/ApplyStyleCommand.cpp:
     11        (WebCore::StyleChange::extractTextStyles): Don't depend on old behavior.
     12        * html/canvas/CanvasRenderingContext2D.cpp:
     13        (WebCore::CanvasRenderingContext2D::setShadow): Remove dead code.
     14
    1152010-05-14  Jens Alfke  <snej@chromium.org>
    216
  • trunk/WebCore/css/CSSParser.cpp

    r58867 r59473  
    285285bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict)
    286286{
    287     color = 0;
    288287    CSSParser parser(true);
    289288
  • trunk/WebCore/editing/ApplyStyleCommand.cpp

    r53809 r59473  
    213213        ASSERT(colorValue->isPrimitiveValue());
    214214        CSSPrimitiveValue* primitiveColor = static_cast<CSSPrimitiveValue*>(colorValue.get());
    215         RGBA32 rgba;
     215        RGBA32 rgba = 0;
    216216        if (primitiveColor->primitiveType() != CSSPrimitiveValue::CSS_RGBCOLOR) {
    217217            CSSParser::parseColor(rgba, colorValue->cssText());
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r59447 r59473  
    882882
    883883    RGBA32 rgba = makeRGBA32FromFloats(r, g, b, a); // default is transparent black
    884     if (!state().m_shadowColor.isEmpty())
    885         CSSParser::parseColor(rgba, state().m_shadowColor);
    886884    c->setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba), DeviceColorSpace);
    887885}
Note: See TracChangeset for help on using the changeset viewer.