This will require some finesse. I already know that doing it the wrong way regresses perf.
This may be done as of http://trac.webkit.org/changeset/216965/webkit I'll wait a bit before closing this.