Skip to content
  • andreas.kling@nokia.com's avatar
    2011-02-13 Andreas Kling <kling@webkit.org> · b0132124
    andreas.kling@nokia.com authored
            Reviewed by Dirk Schulze.
    
            Canvas: 2d.fillStyle.parse.system.html fails
            https://bugs.webkit.org/show_bug.cgi?id=39168
    
            Based on previous work by Julien Chaffraix <jchaffraix@codeaurora.org>
            and Jan Erik Hanssen <jhanssen@sencha.com>
    
            * css/CSSParser.cpp:
            (WebCore::CSSParser::parseColor): Changed the function to better match our
            early return policy. Also we now return false when we don't parse the color.
            This is needed for createFromString to fallback to using parseSystemColor.
    
            (WebCore::CSSParser::parseSystemColor): Made use of the RenderTheme to get
            the system colors.
    
            * css/CSSParser.h: Added the new parseSystemColor method.
    
            * html/canvas/CanvasRenderingContext2D.cpp:
            (WebCore::CanvasRenderingContext2D::setStrokeColor): Pass the document to createFromString.
            (WebCore::CanvasRenderingContext2D::setFillColor): Ditto.
    
            * html/canvas/CanvasStyle.cpp:
            (WebCore::parseColor):
            (WebCore::parseColorOrCurrentColor):
            (WebCore::CanvasStyle::createFromString): Try to parse the color using CSSParser::parseColor
            and fall back to parseSystemColor if it did not work.
    
            * html/canvas/CanvasStyle.h: Added the new Document* parameter to createFromString.
    2011-02-13  Andreas Kling  <kling@webkit.org>
    
            Reviewed by Dirk Schulze.
    
            Canvas: 2d.fillStyle.parse.system.html fails
            https://bugs.webkit.org/show_bug.cgi?id=39168
    
            * fast/css/test-setting-canvas-color-expected.txt: Added.
            * fast/css/test-setting-canvas-color.html: Added.
            * platform/gtk/Skipped:
            * platform/mac-leopard/Skipped:
            * platform/qt/Skipped:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b0132124