[Webkit-unassigned] [Bug 160958] [GTK] Add API to get (/set?) scrollbar position and upper value from WebKitWebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 22 01:12:22 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=160958

Milan Crha <mcrha at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[GTK]                       |[GTK] Add API to get
                   |WebKitWebView::GtkScrollabl |(/set?) scrollbar position
                   |e::vadjustment reports      |and upper value from
                   |incorrect numbers           |WebKitWebView

--- Comment #2 from Milan Crha <mcrha at redhat.com> ---
(In reply to comment #1)
> WebKitWebView is a GtkContainer and it doesn't implement any interface. If
> you try to use GtkScrollable API you should be getting the default values
> used by g_return macros

Weird, I have g_return macros enabled and do not get them, though I see my expectation is wrong. I do not know from where the value gets, but I can receive the vadjustment and no runtime warning is printed. My fault by mixing things together, I'm sorry for that.

If you'll be able to add some API to WebKitWebView to be able to know current and upper scrollbar position for horizontal and vertical scrolling, ideally as some GObject properties with proper g_object_notify() signals, then it'll be great, but a simple API to get (synchronously) current position and current upper at the time of the call of the function for both scrollbars would also be useful. Say something like:

  void webkit_web_view_get_hscrollbar_position (WebKitWebView *web_view,
                                                gint *position,
                                                gint *upper_value);
  void webkit_web_view_get_vscrollbar_position (WebKitWebView *web_view,
                                                gint *position,
                                                gint *upper_value);

and if any application would also need a setter, then possibly:

  void webkit_web_view_set_hscrollbar_position (WebKitWebView *web_view,
                                                gint position);
  void webkit_web_view_set_vscrollbar_position (WebKitWebView *web_view,
                                                gint position);

But you might come with something more elegant and generic.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160822/ee465a3d/attachment.html>


More information about the webkit-unassigned mailing list