<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mcrha&#64;redhat.com" title="Milan Crha &lt;mcrha&#64;redhat.com&gt;"> <span class="fn">Milan Crha</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add API to get (/set?) scrollbar position and upper value from WebKitWebView"
   href="https://bugs.webkit.org/show_bug.cgi?id=160958">bug 160958</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Summary</td>
           <td>[GTK] WebKitWebView::GtkScrollable::vadjustment reports incorrect numbers
           </td>
           <td>[GTK] Add API to get (/set?) scrollbar position and upper value from WebKitWebView
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add API to get (/set?) scrollbar position and upper value from WebKitWebView"
   href="https://bugs.webkit.org/show_bug.cgi?id=160958#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add API to get (/set?) scrollbar position and upper value from WebKitWebView"
   href="https://bugs.webkit.org/show_bug.cgi?id=160958">bug 160958</a>
              from <span class="vcard"><a class="email" href="mailto:mcrha&#64;redhat.com" title="Milan Crha &lt;mcrha&#64;redhat.com&gt;"> <span class="fn">Milan Crha</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=160958#c1">comment #1</a>)
<span class="quote">&gt; WebKitWebView is a GtkContainer and it doesn't implement any interface. If
&gt; you try to use GtkScrollable API you should be getting the default values
&gt; used by g_return macros</span >

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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>