[webkit-reviews] review canceled: [Bug 32356] Implement smooth scrolling for multiple platforms : [Attachment 44721] patch v1.1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 15 21:37:53 PST 2009


Peter Kasting <pkasting at google.com> has canceled Peter Kasting
<pkasting at google.com>'s request for review:
Bug 32356: Implement smooth scrolling for multiple platforms
https://bugs.webkit.org/show_bug.cgi?id=32356

Attachment 44721: patch v1.1
https://bugs.webkit.org/attachment.cgi?id=44721&action=review

------- Additional Comments from Peter Kasting <pkasting at google.com>
This patch implements something like what mitz described.  There is a
ScrollAnimator class that can be subclassed on particular ports or platforms to
perform one- or two-dimensional animation; the APIs to call it are extremely
simple, so the class can implement pretty much any algorithm it desires.  There
is a ScrollAnimatorClient class that the animator uses to convey the scroll
amounts back to the scrollbars; for simplicity's sake, ScrollbarClient inherits
from this class.  ScrollbarClient also adds the couple of hooks needed for the
Scrollbar to communicate to the ScrollAnimator that a scroll is desired.

ScrollAnimator.h contains a stub implementation that will do no scroll
animation (i.e. the same behavior as before this patch), and everyone but
PLATFORM(CHROMIUM) uses it.  I also thought about putting the one relevant
function here in something like a ScrollAnimatorNone.cpp and compiling that in
to projects where appropriate, I wasn't sure which would be better.

The smooth-scrolling logic from the last patch is moved to
ScrollAnimatorChromiumWin.  It has also been updated to not clamp keyboard
scrolling rates to the scrollbar autorepeat rate (I found a way to make
keyboard scrolling fairly smooth even at higher rates).  We still do need the
added plumbing in the rest of the code that tells us whether we're performing a
keyboard-triggered scroll or not.

There are a few problems with this patch:
* XCode project not updated with ScrollAnimator.h -- I don't have a Mac with
XCode handy (someone want to add the relevant bits here so I can put them in
the patch?)
* Won't link on non-Windows Chromium (need to get the right #ifdefs in place)


More information about the webkit-reviews mailing list