move page generation into a single function
Created attachment 90415 [details] Patch
Comment on attachment 90415 [details] Patch OK.
Committed r84420: <http://trac.webkit.org/changeset/84420>