Have Document keep track of whether scroll listeners are registered
Created attachment 97365 [details] Patch
Comment on attachment 97365 [details] Patch Did you check that this works with both document.onscroll and window.onscroll?
Will check.
window.onscroll and document.onscroll both work fine. DOMWindow::addEventListener() calls document->addListenerTypeIfNeeded().
http://trac.webkit.org/changeset/88980