/*
Copyright (C) 2008 Eric Seidel <eric@webkit.org>
Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
- 2004, 2005, 2007 Rob Buis <buis@kde.org>
+ 2004, 2005, 2007, 2010 Rob Buis <buis@kde.org>
Copyright (C) 2005, 2006 Apple Computer, Inc.
This library is free software; you can redistribute it and/or
#include "CSSQuirkPrimitiveValue.h"
#include "CSSValueKeywords.h"
#include "CSSValueList.h"
+#include "RenderTheme.h"
#include "SVGPaint.h"
using namespace std;
parsedValue = SVGPaint::create(SVGPaint::SVG_PAINTTYPE_NONE);
else if (id == CSSValueCurrentcolor)
parsedValue = SVGPaint::create(SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR);
+ else if ((id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSSValueMenu)
+ parsedValue = SVGPaint::create(RenderTheme::defaultTheme()->systemColor(id));
else if (value->unit == CSSPrimitiveValue::CSS_URI) {
RGBA32 c = Color::transparent;
- if (m_valueList->next() && parseColorFromValue(m_valueList->current(), c, true)) {
+ if (m_valueList->next() && parseColorFromValue(m_valueList->current(), c)) {
parsedValue = SVGPaint::create(value->string, c);
} else
parsedValue = SVGPaint::create(SVGPaint::SVG_PAINTTYPE_URI, value->string);
m_valueList->next();
break;
+
+ case CSSPropertyVectorEffect: // none | non-scaling-stroke | inherit
+ if (id == CSSValueNone || id == CSSValueNonScalingStroke)
+ valid_primitive = true;
+ break;
case CSSPropertyWritingMode:
// lr-tb | rl_tb | tb-rl | lr | rl | tb | inherit
PassRefPtr<CSSValue> CSSParser::parseSVGPaint()
{
RGBA32 c = Color::transparent;
- if (!parseColorFromValue(m_valueList->current(), c, true))
+ if (!parseColorFromValue(m_valueList->current(), c))
return SVGPaint::create();
return SVGPaint::create(Color(c));
}
PassRefPtr<CSSValue> CSSParser::parseSVGColor()
{
RGBA32 c = Color::transparent;
- if (!parseColorFromValue(m_valueList->current(), c, true))
+ if (!parseColorFromValue(m_valueList->current(), c))
return 0;
return SVGColor::create(Color(c));
}