WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
240232
[GTK] Add a way to set and get the scrollbar position in a WebView
https://bugs.webkit.org/show_bug.cgi?id=240232
Summary
[GTK] Add a way to set and get the scrollbar position in a WebView
Disable Graphics
Reported
2022-05-09 06:32:56 PDT
Hobbyist developers like me don't have the time to read the JavaScriptCore API documentation and WebKitWebExtensions won't show the scrollbar position since they only execute when the page loads (Probably I'm missing something, if so, please correct me), so webkit_dom_dom_window_get_scroll_y() will always return 0 (And it's deprecated). Also, there's only one decent tutorial about WebKitWebExtensions (this one:
https://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/
), and the other one is in the official WebKitGTK documentation. These two don't cover anything related to this issue. Adding a way to get and set the scrollbar position would ease the task for many developers, hobbyist or not, as it would not require to write an extension (Requiring, in most cases, reading lots and lots of documentation, which can or cannot be understood) The functions that I'm proposing would be: gdouble webkit_web_view_get_scroll_y(WebKitWebView * web_view) gdouble webkit_web_view_get_scroll_x(WebKitWebView * web_view) void webkit_web_view_set_scroll_y(WebKitWebView * web_view, gdouble y) void webkit_web_view_set_scroll_x(WebKitWebView * web_view, gdouble x) The ranges would be between 0.0 and 1.0. The y's are for vertical scroll and the x's for horizontal.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug