/*
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;
valid_primitive = true;
break;
- case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit
- if (id == CSSValueAuto || id == CSSValueOptimizespeed || id == CSSValueOptimizelegibility ||
- id == CSSValueGeometricprecision)
- valid_primitive = true;
- break;
-
case CSSPropertyImageRendering: // auto | optimizeSpeed |
case CSSPropertyColorRendering: // optimizeQuality | inherit
if (id == CSSValueAuto || id == CSSValueOptimizespeed ||
* correctly and allows optimization in applyRule(..)
*/
- case CSSPropertyPointerEvents:
- // none | visiblePainted | visibleFill | visibleStroke | visible |
- // painted | fill | stroke | none | all | inherit
- if (id == CSSValueVisible || id == CSSValueNone || id == CSSValueAll ||
- (id >= CSSValueVisiblepainted && id <= CSSValueStroke))
- valid_primitive = true;
- break;
-
case CSSPropertyTextAnchor: // start | middle | end | inherit
if (id == CSSValueStart || id == CSSValueMiddle || id == CSSValueEnd)
valid_primitive = true;
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
m_valueList->next();
}
break;
+ case CSSPropertyWebkitSvgShadow:
+ if (id == CSSValueNone)
+ valid_primitive = true;
+ else
+ return parseShadow(propId, important);
/* shorthand properties */
case CSSPropertyMarker:
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));
}