PassRefPtrWillBeRawPtr<CSSValue> CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String& string, CSSParserMode parserMode)
{
    if (RefPtrWillBeRawPtr<CSSValue> length = parseSimpleLengthValue(propertyID, string, parserMode))
        return length.release();
    if (isColorPropertyID(propertyID))
        return parseColor(string, isQuirksModeBehavior(parserMode));
    if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, string))
        return keyword.release();
    if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID, string))
        return transform.release();
    return nullptr;
}
Beispiel #2
0
CSSValue* CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID,
                                              const String& string,
                                              CSSParserMode parserMode) {
  if (CSSValue* length = parseSimpleLengthValue(propertyID, string, parserMode))
    return length;
  if (isColorPropertyID(propertyID))
    return parseColor(string, parserMode);
  if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode))
    return keyword;
  if (CSSValue* transform = parseSimpleTransform(propertyID, string))
    return transform;
  return nullptr;
}