コード例 #1
0
bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const UChar*& currTransform, const UChar* end)
{
    bool delimParsed = false;
    while (currTransform < end) {
        delimParsed = false;
        unsigned short type = SVGTransform::SVG_TRANSFORM_UNKNOWN;
        skipOptionalSpaces(currTransform, end);
        
        if (!parseAndSkipType(currTransform, end, type))
            return false;

        SVGTransform t;
        if (!parseTransformValue(type, currTransform, end, t))
            return false;

        ExceptionCode ec = 0;
        list->appendItem(t, ec);
        skipOptionalSpaces(currTransform, end);
        if (currTransform < end && *currTransform == ',') {
            delimParsed = true;
            currTransform++;
        }
        skipOptionalSpaces(currTransform, end);
    }

    return !delimParsed;
}
コード例 #2
0
ファイル: SVGTransformable.cpp プロジェクト: edcwconan/webkit
bool SVGTransformable::parseTransformAttribute(SVGTransformList& list, const UChar*& currTransform, const UChar* end, TransformParsingMode mode)
{
    if (mode == ClearList)
        list.clear();

    bool delimParsed = false;
    while (currTransform < end) {
        delimParsed = false;
        SVGTransform::SVGTransformType type = SVGTransform::SVG_TRANSFORM_UNKNOWN;
        skipOptionalSVGSpaces(currTransform, end);

        if (!parseAndSkipType(currTransform, end, type))
            return false;

        SVGTransform transform;
        if (!parseTransformValue(type, currTransform, end, transform))
            return false;

        list.append(transform);
        skipOptionalSVGSpaces(currTransform, end);
        if (currTransform < end && *currTransform == ',') {
            delimParsed = true;
            ++currTransform;
        }
        skipOptionalSVGSpaces(currTransform, end);
    }

    return !delimParsed;
}
コード例 #3
0
SVGTransform::SVGTransformType SVGTransformable::parseTransformType(const String& typeString)
{
    unsigned short type = SVGTransform::SVG_TRANSFORM_UNKNOWN;
    const UChar* characters = typeString.characters();
    parseAndSkipType(characters, characters + typeString.length(), type);
    return static_cast<SVGTransform::SVGTransformType>(type);
}
コード例 #4
0
ファイル: SVGTransformable.cpp プロジェクト: edcwconan/webkit
SVGTransform::SVGTransformType SVGTransformable::parseTransformType(const String& typeString)
{
    SVGTransform::SVGTransformType type = SVGTransform::SVG_TRANSFORM_UNKNOWN;
    auto upconvertedCharacters = StringView(typeString).upconvertedCharacters();
    const UChar* characters = upconvertedCharacters;
    parseAndSkipType(characters, characters + typeString.length(), type);
    return static_cast<SVGTransform::SVGTransformType>(type);
}