[webkit-help] Scrolling behavior modification

Dmitry M dmitrym at gmail.com
Tue Dec 15 08:52:03 PST 2009


Hello everyone, I've just started diving into webkit development, so
please excuse the inevitable ignorance.

My goal is to modify the scrolling behavior. Specifically, I want to
force mouse wheel scrolling, to scroll one page -- instead of a
certain increment. I've looked through the source code and attempted
to trace execution with gdb, but I still can't find the appropriate
place for modification. I can't understand how events are processed
and dispatched right now.

I've started at the top. Events seem to come into EventHandler.cpp
(and on my Mac, EventHandlerMac.cpp) and then are passed on to
WebCore::FrameView (which is in fact a WebCore::ScrollView). Then it
looks like these messages are passed onto the individual widgets on
the page. Backtrace in one of the function is EventHandler.cpp or
ScrollView.cpp reveal that the originator of these messages is a
native NSScrollView class. So, FrameView is way down below in the
chain of events. Additionally, if I disable
EventHandler::handleWheelEvent (by inserting a return statement at the
top) the scrolling behavior still functions correctly. So the
scrolling behavior is defined elsewhere, and I'm having a tough time
pinpointing where that is.

So:

#1 If you've read this far, does my summary above look correct?
#2 Does Safari bind to webkit in a different way than say a Qt
browser? I'm running my session with WebKitTools/Scripts/debug-safari.
#3 Where is the scrolling behavior controlled?

If this post is more appropriate in webkit-dev please let me know. I'd
appreciate any tips anyone might have!

Thanks in advance,

Dmitry


More information about the webkit-help mailing list