#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "RuntimeEnabledFeatures.h"
-#include "core/css/CSSParser.h"
+#include "core/css/parser/BisonCSSParser.h"
#include "core/css/CSSValueList.h"
#include "core/rendering/RenderTheme.h"
#include "core/svg/SVGPaint.h"
return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSSValueMenu;
}
-bool CSSParser::parseSVGValue(CSSPropertyID propId, bool important)
+bool BisonCSSParser::parseSVGValue(CSSPropertyID propId, bool important)
{
CSSParserValue* value = m_valueList->current();
if (!value)
parsedValue = SVGPaint::createURIAndColor(value->string, c);
else if (m_valueList->current()->id == CSSValueNone)
parsedValue = SVGPaint::createURIAndNone(value->string);
+ else if (m_valueList->current()->id == CSSValueCurrentcolor)
+ parsedValue = SVGPaint::createURIAndCurrentColor(value->string);
}
if (!parsedValue)
parsedValue = SVGPaint::createURI(value->string);
case CSSPropertyMarker:
{
ShorthandScope scope(this, propId);
- CSSParser::ImplicitScope implicitScope(this, PropertyImplicit);
+ BisonCSSParser::ImplicitScope implicitScope(this, PropertyImplicit);
if (!parseValue(CSSPropertyMarkerStart, important))
return false;
if (m_valueList->current()) {
}
default:
// If you crash here, it's because you added a css property and are not handling it
- // in either this switch statement or the one in CSSParser::parseValue
+ // in either this switch statement or the one in BisonCSSParser::parseValue
ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propId);
return false;
}
return true;
}
-PassRefPtr<CSSValue> CSSParser::parseSVGStrokeDasharray()
+PassRefPtr<CSSValue> BisonCSSParser::parseSVGStrokeDasharray()
{
- RefPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
CSSParserValue* value = m_valueList->current();
bool valid_primitive = true;
while (value) {
return ret.release();
}
-PassRefPtr<CSSValue> CSSParser::parseSVGPaint()
+PassRefPtr<CSSValue> BisonCSSParser::parseSVGPaint()
{
RGBA32 c = Color::transparent;
if (!parseColorFromValue(m_valueList->current(), c))
return SVGPaint::createColor(Color(c));
}
-PassRefPtr<CSSValue> CSSParser::parseSVGColor()
+PassRefPtr<CSSValue> BisonCSSParser::parseSVGColor()
{
RGBA32 c = Color::transparent;
if (!parseColorFromValue(m_valueList->current(), c))
}
// normal | [ fill || stroke || markers ]
-PassRefPtr<CSSValue> CSSParser::parsePaintOrder() const
+PassRefPtr<CSSValue> BisonCSSParser::parsePaintOrder() const
{
if (m_valueList->size() > 3)
return 0;
if (!value)
return 0;
- RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
+ RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
// The default paint-order is: Fill, Stroke, Markers.
bool seenFill = false,