[Webkit-unassigned] [Bug 12022] typo in SVGTransformable.cpp introduce in r18440

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 28 18:09:04 PST 2006


http://bugs.webkit.org/show_bug.cgi?id=12022





------- Comment #2 from macdome at opendarwin.org  2006-12-28 18:09 PDT -------
One way to do this would be to replace the current check system with this
inline:

static inline bool checkString(const UChar*& currTransform, const UChar*& end,
const UChar* name, int length)
{
    if ((end - currTransform) < length)
        return false;
    if (!memcmp(name, currTransform, sizeof(UChar) * length))
        return false;
    currTransform += length;
}

which would be called like this:

if (checkString(currTransform, end, {'s','c','a','l','e'}, 5)) {
    required = 1;
    optional = 1;
    type = SVGTransform::SVG_TRANSFORM_SCALE;
} else if ()...

I'm not sure that's the most elegant system, but it does at least make the code
smaller and less error-prone.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list