Changeset 67574 in webkit


Ignore:
Timestamp:
Sep 15, 2010 3:57:04 PM (14 years ago)
Author:
jchaffraix@webkit.org
Message:

Unreviewed.

Reverting my changes as it is breaking several tests on Gtk and Qt.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r67571 r67574  
     12010-09-15  Julien Chaffraix  <jchaffraix@codeaurora.org>
     2
     3        Unreviewed.
     4
     5        Reverting my changes as it is breaking several tests on Gtk and Qt.
     6
     7        * platform/mac/Skipped:
     8        * platform/qt/Skipped:
     9
    1102010-09-15  Erik Arvidsson  <arv@chromium.org>
    211
  • trunk/LayoutTests/platform/mac/Skipped

    r67570 r67574  
    189189canvas/philip/tests/2d.fillStyle.parse.current.changed.html
    190190canvas/philip/tests/2d.fillStyle.parse.current.removed.html
     191canvas/philip/tests/2d.fillStyle.parse.system.html
    191192canvas/philip/tests/2d.gradient.radial.cone.front.html
    192193canvas/philip/tests/2d.gradient.radial.cone.top.html
  • trunk/LayoutTests/platform/qt/Skipped

    r67570 r67574  
    52245224canvas/philip/tests/2d.fillStyle.parse.current.changed.html
    52255225canvas/philip/tests/2d.fillStyle.parse.current.removed.html
     5226canvas/philip/tests/2d.fillStyle.parse.system.html
    52265227canvas/philip/tests/2d.gradient.radial.cone.behind.html
    52275228canvas/philip/tests/2d.gradient.radial.cone.beside.html
  • trunk/WebCore/ChangeLog

    r67570 r67574  
     12010-09-15  Julien Chaffraix  <jchaffraix@codeaurora.org>
     2
     3        Unreviewed.
     4
     5        Reverting my changes as it is breaking several tests on Gtk and Qt.
     6
     7        * css/CSSParser.cpp:
     8        (WebCore::CSSParser::parseColor):
     9        * css/CSSParser.h:
     10        * html/canvas/CanvasRenderingContext2D.cpp:
     11        (WebCore::CanvasRenderingContext2D::setStrokeColor):
     12        (WebCore::CanvasRenderingContext2D::setFillColor):
     13        * html/canvas/CanvasStyle.cpp:
     14        (WebCore::CanvasStyle::createFromString):
     15        * html/canvas/CanvasStyle.h:
     16
    1172010-09-15  Julien Chaffraix  <jchaffraix@codeaurora.org>
    218
  • trunk/WebCore/css/CSSParser.cpp

    r67570 r67574  
    6464#include "MediaList.h"
    6565#include "MediaQueryExp.h"
    66 #include "Page.h"
    6766#include "Pair.h"
    6867#include "Rect.h"
    69 #include "RenderTheme.h"
    7068#include "ShadowValue.h"
    7169#include "WebKitCSSKeyframeRule.h"
     
    296294
    297295    CSSValue* value = parser.m_parsedProperties[0]->value();
    298     if (value->cssValueType() != CSSValue::CSS_PRIMITIVE_VALUE)
    299         return false;
    300 
    301     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
    302     if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR) {
     296    if (value->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) {
     297        CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
    303298        color = primitiveValue->getRGBA32Value();
    304         return true;
    305     }
    306     return false;
     299    }
     300
     301    return true;
    307302}
    308303
     
    317312
    318313    return (m_numParsedProperties && m_parsedProperties[0]->m_id == CSSPropertyColor);
    319 }
    320 
    321 bool CSSParser::parseSystemColor(RGBA32& color, const String& string, Document* document)
    322 {
    323     if (!document || !document->page())
    324         return false;
    325 
    326     CSSParserString cssColor;
    327     cssColor.characters = const_cast<UChar*>(string.characters());
    328     cssColor.length = string.length();
    329     int id = cssValueKeywordID(cssColor);
    330     if (id <= 0)
    331         return false;
    332 
    333     color = document->page()->theme()->systemColor(id).rgb();
    334     return true;
    335314}
    336315
  • trunk/WebCore/css/CSSParser.h

    r67570 r67574  
    6666        bool parseValue(CSSMutableStyleDeclaration*, int propId, const String&, bool important);
    6767        static bool parseColor(RGBA32& color, const String&, bool strict = false);
    68         static bool parseSystemColor(RGBA32& color, const String&, Document*);
    6968        bool parseColor(CSSMutableStyleDeclaration*, const String&);
    7069        bool parseDeclaration(CSSMutableStyleDeclaration*, const String&);
  • trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r67570 r67574  
    5454#include "Page.h"
    5555#include "RenderHTMLCanvas.h"
    56 #include "RenderTheme.h"
    5756#include "SecurityOrigin.h"
    5857#include "Settings.h"
     
    571570    if (color == state().m_unparsedStrokeColor)
    572571        return;
    573     setStrokeStyle(CanvasStyle::createFromString(color, canvas()->document()));
     572    setStrokeStyle(CanvasStyle::createFromString(color));
    574573    state().m_unparsedStrokeColor = color;
    575574}
     
    612611    if (color == state().m_unparsedFillColor)
    613612        return;
    614     setFillStyle(CanvasStyle::createFromString(color, canvas()->document()));
     613    setFillStyle(CanvasStyle::createFromString(color));
    615614    state().m_unparsedFillColor = color;
    616615}
  • trunk/WebCore/html/canvas/CanvasStyle.cpp

    r67570 r67574  
    8787}
    8888
    89 PassRefPtr<CanvasStyle> CanvasStyle::createFromString(const String& color, Document* document)
     89PassRefPtr<CanvasStyle> CanvasStyle::createFromString(const String& color)
    9090{
    9191    RGBA32 rgba;
    92     if (CSSParser::parseColor(rgba, color))
    93         return adoptRef(new CanvasStyle(rgba));
    94 
    95     if (CSSParser::parseSystemColor(rgba, color, document))
    96         return adoptRef(new CanvasStyle(rgba));
    97 
    98     return 0;
     92    if (!CSSParser::parseColor(rgba, color))
     93        return 0;
     94    return adoptRef(new CanvasStyle(rgba));
    9995}
    10096
  • trunk/WebCore/html/canvas/CanvasStyle.h

    r67570 r67574  
    3535    class CanvasGradient;
    3636    class CanvasPattern;
    37     class Document;
    3837    class GraphicsContext;
    3938
     
    4140    public:
    4241        static PassRefPtr<CanvasStyle> createFromRGBA(RGBA32 rgba) { return adoptRef(new CanvasStyle(rgba)); }
    43         static PassRefPtr<CanvasStyle> createFromString(const String& color, Document* = 0);
     42        static PassRefPtr<CanvasStyle> createFromString(const String& color);
    4443        static PassRefPtr<CanvasStyle> createFromStringWithOverrideAlpha(const String& color, float alpha);
    4544        static PassRefPtr<CanvasStyle> createFromGrayLevelWithAlpha(float grayLevel, float alpha) { return adoptRef(new CanvasStyle(grayLevel, alpha)); }
Note: See TracChangeset for help on using the changeset viewer.