Bug 19802

Summary: [GTK] Add functions to scroll the view by pixels, lines or pages
Product: WebKit Reporter: Xan Lopez <xan.lopez>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: cosimoc
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
0001-webkit-add-functions-to-scroll-the-view-by-pixels.patch christian: review-

Description Xan Lopez 2008-06-28 15:30:42 PDT
Used by Epiphany and its extensions, patch attached. Bug http://bugzilla.gnome.org/show_bug.cgi?id=538822 is blocking on this.
Comment 1 Xan Lopez 2008-06-28 15:33:56 PDT
Created attachment 21989 [details]
0001-webkit-add-functions-to-scroll-the-view-by-pixels.patch

From: Xan Lopez <xan@gnome.org>
Date: Sun, 29 Jun 2008 01:32:16 +0300
Subject: [PATCH] webkit: add functions to scroll the view by pixels, lines or pages.

---
 WebKit/gtk/ChangeLog                |   12 ++++++
 WebKit/gtk/webkit/webkitwebview.cpp |   69 +++++++++++++++++++++++++++++++++++
 WebKit/gtk/webkit/webkitwebview.h   |   12 ++++++
 3 files changed, 93 insertions(+), 0 deletions(-)
Comment 2 Christian Dywan 2008-06-29 10:50:43 PDT
Comment on attachment 21989 [details]
0001-webkit-add-functions-to-scroll-the-view-by-pixels.patch

(In reply to comment #1)
> Created an attachment (id=21989) [edit]
> 0001-webkit-add-functions-to-scroll-the-view-by-pixels.patch

I don't see why this needs to be part of the API.

The EphyEmbed code already used the GtkAdjustment to implement this, and that's how this should be done. In fact this is too specialized for general use. In the linked Epiphany bug you even attempted to remove this code entirely until you noticed that one extension appears to need this.
Comment 3 Xan Lopez 2008-06-30 08:49:36 PDT
Well, I think this API is way more straightforward, and also I'm not sure how third parties could know about LINE_STEP or PAGE_KEEP, etc. So if you want consistent scrolling behavior you should put API in place to get it.
Comment 4 Xan Lopez 2008-06-30 08:57:53 PDT
Well, also, this code is used inside ephy itself, in the search bar (when you are searching you can press down/up page down/up etc), so if the API is not added we'd need to duplicate the logic inside webkit to match the scrolling behavior. So in this case even ephy is a third party/extension :)
Comment 5 Xan Lopez 2009-05-21 10:18:12 PDT
This more or less works in trunk now, and we have plans to completely unify the scrolling behavior when triggered through adjustments/keys, so I'm closing the bug.