Bug 20010 - [Qt] Add API access to scrolling
Summary: [Qt] Add API access to scrolling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Enhancement
Assignee: marcoil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-11 08:34 PDT by marcoil
Modified: 2008-07-26 22:59 PDT (History)
1 user (show)

See Also:


Attachments
Adds API control of a frame scroll offset for r35126 (4.90 KB, patch)
2008-07-11 08:48 PDT, marcoil
no flags Details | Formatted Diff | Diff
Re-made the patch with simplified API, r35344 (2.67 KB, patch)
2008-07-25 09:37 PDT, marcoil
hausmann: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.