[webkit-dev] Optimizing DOMNode _nodeWith

Geoffrey Garen ggaren at apple.com
Mon Apr 24 11:39:26 PDT 2006

To me it seems wrong that the internal DOM would have to know about  
the class naming scheme in a particular binding. A better approach  
might be just to grab the tag name and swizzle it according to the  
binding's class naming convention. Something like this:

HTMLElement* htmlElt = static_cast<HTMLElement*>(impl);
String tagName = htmlElt->tagName();
String className = "DOMHTML" + tagName + "Element";

That wouldn't be exactly right because of capitalization, but it  
illustrates the general idea.


More information about the webkit-dev mailing list