<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@gmail.com" title="aidanholm+webkit@gmail.com">aidanholm+webkit@gmail.com</a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=163892#c14">comment #14</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=302921&action=diff" name="attach_302921" title="Patch">attachment 302921</a> <a href="attachment.cgi?id=302921&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=302921&action=review">https://bugs.webkit.org/attachment.cgi?id=302921&action=review</a>
>
> Thanks for the patch! It's true that we don't have API tests to cover all
> the DOM bindings, mainly because it used to be autogenerated and we didn't
> even know when new API was added. However, we have a few tests for DOM
> bindings, and we should definitely add tests for newly added API, so this
> patch should include unit tests.</span >
Are there any DOM bindings that do have tests? To use as a guideline.
<span class="quote">>
> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:128
> > + PROP_BOUNDING_CLIENT_RECT,
> > + PROP_CLIENT_RECTS,
>
> These are not attributes, but methods:
>
> // CSSOM View Module API
>
> ClientRectList getClientRects();
> 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">> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:1263
> > +GList* webkit_dom_element_get_client_rects(WebKitDOMElement* self)
>
> We can't do this. In other APIs we can use other types to make it more
> convenient to use or whatever, but here we are implementing the DOM, so we
> should follow whatever the idl says. getClientRects() returns a
> ClientRectList, that contains a read-only attribute length and one method
> item(). So, you should also add WebKitDOMClientRectList, and return that
> 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>