[webkit-help] Scrolling behavior modification

Dmitry M dmitrym at gmail.com
Tue Dec 15 09:02:44 PST 2009


Thanks for a quick response Adam. Would you say that the Qt version is
a better option?

Dmitry


On Tue, Dec 15, 2009 at 9:01 AM, Adam Roben <aroben at apple.com> wrote:
> On Dec 15, 2009, at 11:52 AM, Dmitry M wrote:
>
>> 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?
>
> Scrolling in the Mac port of WebKit is quite different from all the other ports. Mac uses native widgets (i.e., NSScrollViews) to handle scrolling, as you observed. Other ports handle this operation entirely within WebCore. You may have an easier time debugging on a port other than the Mac port, if that's an option.
>
> -Adam
>
>


More information about the webkit-help mailing list