Ran across this while investigating event-handler bindings. Maybe I misunderstand the point of this function, but as best as I can tell it's just changing the capitalization of the various webkit* event names. If that's true and the 'a' is meant to catch the beginning of "animation", the [7] should really be a [6]. static String eventNameFromAttributeName(const String& name) { ASSERT(name.startsWith("on")); String eventType = name.substring(2); if (eventType.startsWith("w")) { switch(eventType[eventType.length() - 1]) { case 't': eventType = "webkitAnimationStart"; break; case 'n': eventType = "webkitAnimationIteration"; break; case 'd': ASSERT(eventType.length() > 7); if (eventType[7] == 'a') eventType = "webkitAnimationEnd"; else eventType = "webkitTransitionEnd"; break; } } return eventType; }
Created attachment 34790 [details] fix for off-by-one error Here's a fix if I interpreted this correctly.