[Webkit-unassigned] [Bug 163892] [GTK] Add function webkit_dom_element_get_bounding_client_rect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 28 04:32:51 PST 2017


--- Comment #15 from aidanholm+webkit at gmail.com ---
(In reply to comment #14)
> Comment on attachment 302921 [details]
> Patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=302921&action=review
> 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.

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

> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:128
> These are not attributes, but methods:
> // CSSOM View Module API                                                    
> ClientRectList getClientRects();
> ClientRect getBoundingClientRect();

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

> > 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.

Okay, makes sense.

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/20170228/7311dcf8/attachment.html>

More information about the webkit-unassigned mailing list