<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add function webkit_dom_element_get_bounding_client_rect"
   href="https://bugs.webkit.org/show_bug.cgi?id=163892#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Add function webkit_dom_element_get_bounding_client_rect"
   href="https://bugs.webkit.org/show_bug.cgi?id=163892">bug 163892</a>
              from <span class="vcard"><a class="email" href="mailto:aidanholm+webkit&#64;gmail.com" title="aidanholm+webkit&#64;gmail.com">aidanholm+webkit&#64;gmail.com</a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=163892#c14">comment #14</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=302921&amp;action=diff" name="attach_302921" title="Patch">attachment 302921</a> <a href="attachment.cgi?id=302921&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=302921&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=302921&amp;action=review</a>
&gt; 
&gt; Thanks for the patch! It's true that we don't have API tests to cover all
&gt; the DOM bindings, mainly because it used to be autogenerated and we didn't
&gt; even know when new API was added. However, we have a few tests for DOM
&gt; bindings, and we should definitely add tests for newly added API, so this
&gt; patch should include unit tests.</span >

Are there any DOM bindings that do have tests? To use as a guideline.

<span class="quote">&gt; 
&gt; &gt; Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:128
&gt; &gt; +    PROP_BOUNDING_CLIENT_RECT,
&gt; &gt; +    PROP_CLIENT_RECTS,
&gt; 
&gt; These are not attributes, but methods:
&gt; 
&gt; // CSSOM View Module API                                                    
&gt; 
&gt; ClientRectList getClientRects();
&gt; ClientRect getBoundingClientRect();</span >

So I should remove the added properties in WebKitDOMElement.cpp, and leave just the two webkit_dom_element_get_whatever()?

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:1263
&gt; &gt; +GList* webkit_dom_element_get_client_rects(WebKitDOMElement* self)
&gt; 
&gt; We can't do this. In other APIs we can use other types to make it more
&gt; convenient to use or whatever, but here we are implementing the DOM, so we
&gt; should follow whatever the idl says. getClientRects() returns a
&gt; ClientRectList, that contains a read-only attribute length and one method
&gt; item(). So, you should also add WebKitDOMClientRectList, and return that
&gt; from this method. See WebKitDOMHTMLCollection for an example.</span >

Okay, makes sense.</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>