Bug 20010

Summary: [Qt] Add API access to scrolling
Product: WebKit Reporter: marcoil <marc.ordinasillopis>
Component: WebKit QtAssignee: marcoil <marc.ordinasillopis>
Status: RESOLVED FIXED    
Severity: Enhancement CC: pierre-luc.beaudoin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Adds API control of a frame scroll offset for r35126
none
Re-made the patch with simplified API, r35344 hausmann: review+

Description marcoil 2008-07-11 08:34:20 PDT
Right now it's not possible to control a frame's scroll offset from the public API if no scrollbars are present.

Directly managing the scrolling is necessary, for example, when using "native" (not internal) scrollbars or alternative scrolling interfaces.
Comment 1 marcoil 2008-07-11 08:48:49 PDT
Created attachment 22248 [details]
Adds API control of a frame scroll offset for r35126

This is a first attempt at adding API support for scrolling.

I have an example QtLauncher that uses QAbstractScrollArea and "real" scrollbars instead of the internal ones at http://git.collabora.co.uk/?p=user/marcoil/webkit.git;a=shortlog;h=refs/heads/marcoil/qtscrollbars
Comment 2 marcoil 2008-07-25 09:37:58 PDT
Created attachment 22474 [details]
Re-made the patch with simplified API, r35344

After some comments in #qtwebkit, I have remade the patch with the following changes:
- Renamed scrollBy to scroll, as in other Qt classes.
- Removed the main frame control from QWebPage, as it's redundant.
Comment 3 Simon Hausmann 2008-07-26 06:32:18 PDT
Comment on attachment 22474 [details]
Re-made the patch with simplified API, r35344

Patch looks good. But when landing two _tiny_ fixes should be done:

1) There's a const missing before the QSize& in setScrollOffset

2) The documentation of scroll() needs a \since 4.5 tag
Comment 4 Mark Rowe (bdash) 2008-07-26 22:59:35 PDT
Landed in r35397 with the two requested tweaks.