I made a tweak or two to the new functions.
Created attachment 26227 [details] patch
http://trac.webkit.org/changeset/39451