<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[214215] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/214215">214215</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-03-21 02:11:05 -0700 (Tue, 21 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] Add function webkit_dom_element_get_bounding_client_rect
https://bugs.webkit.org/show_bug.cgi?id=163892

Patch by Aidan Holm &lt;aidanholm+webkit@gmail.com&gt; on 2017-03-21
Reviewed by Carlos Garcia Campos.

Wrap WebCore::ClientRect as WebKitDOMClientRect.
Wrap WebCore::ClientRectList as WebKitDOMClientRectList.
Implement webkit_dom_element_get_bounding_client_rect().
Implement webkit_dom_element_get_client_rects().

* PlatformGTK.cmake:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp: Added.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp: Added.
(WebKit::kit):
(WebKit::core):
(WebKit::wrapClientRect):
(webkit_dom_client_rect_finalize):
(webkit_dom_client_rect_get_property):
(webkit_dom_client_rect_constructed):
(webkit_dom_client_rect_class_init):
(webkit_dom_client_rect_init):
(webkit_dom_client_rect_get_top):
(webkit_dom_client_rect_get_right):
(webkit_dom_client_rect_get_bottom):
(webkit_dom_client_rect_get_left):
(webkit_dom_client_rect_get_width):
(webkit_dom_client_rect_get_height):
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h: Added.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h: Added.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
(webkit_dom_element_get_property):
(webkit_dom_element_class_init):
(webkit_dom_element_get_scroll_height):
(webkit_dom_element_get_bounding_client_rect):
(webkit_dom_element_get_client_rects):
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.h:
* WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
* WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
* WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h:
* WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMElementcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMElementh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMdocswebkitdomgtk40sectionstxt">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMwebkitdomh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMwebkitdomautocleanupsh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMwebkitdomdefinesh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkCMakeListstxt">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRecth">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectListcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectListh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectListPrivateh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectPrivateh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkDOMClientRectTestcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMClientRectTest.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkTestDOMClientRectcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMClientRect.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2017-03-21  Aidan Holm  &lt;aidanholm+webkit@gmail.com&gt;
+
+        [GTK] Add function webkit_dom_element_get_bounding_client_rect
+        https://bugs.webkit.org/show_bug.cgi?id=163892
+
+        Reviewed by Carlos Garcia Campos.
+
+        Wrap WebCore::ClientRect as WebKitDOMClientRect.
+        Wrap WebCore::ClientRectList as WebKitDOMClientRectList.
+        Implement webkit_dom_element_get_bounding_client_rect().
+        Implement webkit_dom_element_get_client_rects().
+
+        * PlatformGTK.cmake:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp: Added.
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp: Added.
+        (WebKit::kit):
+        (WebKit::core):
+        (WebKit::wrapClientRect):
+        (webkit_dom_client_rect_finalize):
+        (webkit_dom_client_rect_get_property):
+        (webkit_dom_client_rect_constructed):
+        (webkit_dom_client_rect_class_init):
+        (webkit_dom_client_rect_init):
+        (webkit_dom_client_rect_get_top):
+        (webkit_dom_client_rect_get_right):
+        (webkit_dom_client_rect_get_bottom):
+        (webkit_dom_client_rect_get_left):
+        (webkit_dom_client_rect_get_width):
+        (webkit_dom_client_rect_get_height):
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h: Added.
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h: Added.
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h: Added.
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h: Added.
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
+        (webkit_dom_element_get_property):
+        (webkit_dom_element_class_init):
+        (webkit_dom_element_get_scroll_height):
+        (webkit_dom_element_get_bounding_client_rect):
+        (webkit_dom_element_get_client_rects):
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp:
+        (WebKit::wrap):
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.h:
+        * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
+        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
+        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h:
+        * WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h:
+
</ins><span class="cx"> 2017-03-20  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         WebPageProxy DecidePolicyForNavigationAction and DecidePolicyForResponseSync should be Delayed reply messages
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -359,6 +359,8 @@
</span><span class="cx">     WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp
</span><span class="cx">     WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp
</span><span class="cx">     WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp
</span><ins>+    WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp
+    WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp
</ins><span class="cx">     WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp
</span><span class="cx">     WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp
</span><span class="cx">     WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp
</span><span class="lines">@@ -604,6 +606,8 @@
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h
</span><ins>+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h
+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h
</ins><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h
</span><span class="lines">@@ -715,6 +719,8 @@
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h
</span><ins>+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h
+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h
</ins><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h
</span><span class="cx">     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,243 @@
</span><ins>+/*
+ *  Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitDOMClientRect.h&quot;
+
+#include &quot;ConvertToUTF8String.h&quot;
+#include &quot;DOMObjectCache.h&quot;
+#include &quot;WebKitDOMClientRectPrivate.h&quot;
+#include &quot;WebKitDOMPrivate.h&quot;
+#include &lt;WebCore/CSSImportRule.h&gt;
+#include &lt;WebCore/Document.h&gt;
+#include &lt;WebCore/ExceptionCodeDescription.h&gt;
+#include &lt;WebCore/ExceptionCode.h&gt;
+#include &lt;WebCore/JSMainThreadExecState.h&gt;
+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+#define WEBKIT_DOM_CLIENT_RECT_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_DOM_TYPE_CLIENT_RECT, WebKitDOMClientRectPrivate)
+
+typedef struct _WebKitDOMClientRectPrivate {
+    RefPtr&lt;WebCore::ClientRect&gt; coreObject;
+} WebKitDOMClientRectPrivate;
+
+namespace WebKit {
+
+WebKitDOMClientRect* kit(WebCore::ClientRect* obj)
+{
+    if (!obj)
+        return nullptr;
+
+    if (gpointer ret = DOMObjectCache::get(obj))
+        return WEBKIT_DOM_CLIENT_RECT(ret);
+
+    return wrapClientRect(obj);
+}
+
+WebCore::ClientRect* core(WebKitDOMClientRect* request)
+{
+    return request ? static_cast&lt;WebCore::ClientRect*&gt;(WEBKIT_DOM_OBJECT(request)-&gt;coreObject) : nullptr;
+}
+
+WebKitDOMClientRect* wrapClientRect(WebCore::ClientRect* coreObject)
+{
+    ASSERT(coreObject);
+    return WEBKIT_DOM_CLIENT_RECT(g_object_new(WEBKIT_DOM_TYPE_CLIENT_RECT, &quot;core-object&quot;, coreObject, nullptr));
+}
+
+} // namespace WebKit
+
+G_DEFINE_TYPE(WebKitDOMClientRect, webkit_dom_client_rect, WEBKIT_DOM_TYPE_OBJECT)
+
+enum {
+    PROP_0,
+    PROP_TOP,
+    PROP_RIGHT,
+    PROP_BOTTOM,
+    PROP_LEFT,
+    PROP_WIDTH,
+    PROP_HEIGHT,
+};
+
+static void webkit_dom_client_rect_finalize(GObject* object)
+{
+    WebKitDOMClientRectPrivate* priv = WEBKIT_DOM_CLIENT_RECT_GET_PRIVATE(object);
+
+    WebKit::DOMObjectCache::forget(priv-&gt;coreObject.get());
+
+    priv-&gt;~WebKitDOMClientRectPrivate();
+    G_OBJECT_CLASS(webkit_dom_client_rect_parent_class)-&gt;finalize(object);
+}
+
+static void webkit_dom_client_rect_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
+{
+    WebKitDOMClientRect* self = WEBKIT_DOM_CLIENT_RECT(object);
+
+    switch (propertyId) {
+    case PROP_TOP:
+        g_value_set_float(value, webkit_dom_client_rect_get_top(self));
+        break;
+    case PROP_RIGHT:
+        g_value_set_float(value, webkit_dom_client_rect_get_right(self));
+        break;
+    case PROP_BOTTOM:
+        g_value_set_float(value, webkit_dom_client_rect_get_bottom(self));
+        break;
+    case PROP_LEFT:
+        g_value_set_float(value, webkit_dom_client_rect_get_left(self));
+        break;
+    case PROP_WIDTH:
+        g_value_set_float(value, webkit_dom_client_rect_get_width(self));
+        break;
+    case PROP_HEIGHT:
+        g_value_set_float(value, webkit_dom_client_rect_get_height(self));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+        break;
+    }
+}
+
+static void webkit_dom_client_rect_constructed(GObject* object)
+{
+    G_OBJECT_CLASS(webkit_dom_client_rect_parent_class)-&gt;constructed(object);
+
+    WebKitDOMClientRectPrivate* priv = WEBKIT_DOM_CLIENT_RECT_GET_PRIVATE(object);
+    priv-&gt;coreObject = static_cast&lt;WebCore::ClientRect*&gt;(WEBKIT_DOM_OBJECT(object)-&gt;coreObject);
+    WebKit::DOMObjectCache::put(priv-&gt;coreObject.get(), object);
+}
+
+static void webkit_dom_client_rect_class_init(WebKitDOMClientRectClass* requestClass)
+{
+    GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
+    g_type_class_add_private(gobjectClass, sizeof(WebKitDOMClientRectPrivate));
+    gobjectClass-&gt;constructed = webkit_dom_client_rect_constructed;
+    gobjectClass-&gt;finalize = webkit_dom_client_rect_finalize;
+    gobjectClass-&gt;get_property = webkit_dom_client_rect_get_property;
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_TOP,
+        g_param_spec_float(
+            &quot;top&quot;,
+            &quot;ClientRect:top&quot;,
+            &quot;read-only gfloat ClientRect:top&quot;,
+            -G_MAXFLOAT, G_MAXFLOAT, 0,
+            WEBKIT_PARAM_READABLE));
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_RIGHT,
+        g_param_spec_float(
+            &quot;right&quot;,
+            &quot;ClientRect:right&quot;,
+            &quot;read-only gfloat ClientRect:right&quot;,
+            -G_MAXFLOAT, G_MAXFLOAT, 0,
+            WEBKIT_PARAM_READABLE));
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_BOTTOM,
+        g_param_spec_float(
+            &quot;bottom&quot;,
+            &quot;ClientRect:bottom&quot;,
+            &quot;read-only gfloat ClientRect:bottom&quot;,
+            -G_MAXFLOAT, G_MAXFLOAT, 0,
+            WEBKIT_PARAM_READABLE));
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_LEFT,
+        g_param_spec_float(
+            &quot;left&quot;,
+            &quot;ClientRect:left&quot;,
+            &quot;read-only gfloat ClientRect:left&quot;,
+            -G_MAXFLOAT, G_MAXFLOAT, 0,
+            WEBKIT_PARAM_READABLE));
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_WIDTH,
+        g_param_spec_float(
+            &quot;width&quot;,
+            &quot;ClientRect:width&quot;,
+            &quot;read-only gfloat ClientRect:width&quot;,
+            0, G_MAXFLOAT, 0,
+            WEBKIT_PARAM_READABLE));
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_HEIGHT,
+        g_param_spec_float(
+            &quot;height&quot;,
+            &quot;ClientRect:height&quot;,
+            &quot;read-only gfloat ClientRect:height&quot;,
+            0, G_MAXFLOAT, 0,
+            WEBKIT_PARAM_READABLE));
+
+}
+
+static void webkit_dom_client_rect_init(WebKitDOMClientRect* request)
+{
+    WebKitDOMClientRectPrivate* priv = WEBKIT_DOM_CLIENT_RECT_GET_PRIVATE(request);
+    new (priv) WebKitDOMClientRectPrivate();
+}
+
+gfloat webkit_dom_client_rect_get_top(WebKitDOMClientRect* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT(self), 0);
+    return WebKit::core(self)-&gt;top();
+}
+
+gfloat webkit_dom_client_rect_get_right(WebKitDOMClientRect* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT(self), 0);
+    return WebKit::core(self)-&gt;right();
+}
+
+gfloat webkit_dom_client_rect_get_bottom(WebKitDOMClientRect* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT(self), 0);
+    return WebKit::core(self)-&gt;bottom();
+}
+
+gfloat webkit_dom_client_rect_get_left(WebKitDOMClientRect* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT(self), 0);
+    return WebKit::core(self)-&gt;left();
+}
+
+gfloat webkit_dom_client_rect_get_width(WebKitDOMClientRect* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT(self), 0);
+    return WebKit::core(self)-&gt;width();
+}
+
+gfloat webkit_dom_client_rect_get_height(WebKitDOMClientRect* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT(self), 0);
+    return WebKit::core(self)-&gt;height();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRecth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,131 @@
</span><ins>+/*
+ *  Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#if !defined(__WEBKITDOM_H_INSIDE__) &amp;&amp; !defined(BUILDING_WEBKIT)
+#error &quot;Only &lt;webkitdom/webkitdom.h&gt; can be included directly.&quot;
+#endif
+
+#ifndef WebKitDOMClientRect_h
+#define WebKitDOMClientRect_h
+
+#include &lt;glib-object.h&gt;
+#include &lt;webkitdom/WebKitDOMObject.h&gt;
+#include &lt;webkitdom/webkitdomdefines.h&gt;
+
+G_BEGIN_DECLS
+
+#define WEBKIT_DOM_TYPE_CLIENT_RECT            (webkit_dom_client_rect_get_type())
+#define WEBKIT_DOM_CLIENT_RECT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_CLIENT_RECT, WebKitDOMClientRect))
+#define WEBKIT_DOM_CLIENT_RECT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_DOM_TYPE_CLIENT_RECT, WebKitDOMClientRectClass)
+#define WEBKIT_DOM_IS_CLIENT_RECT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_CLIENT_RECT))
+#define WEBKIT_DOM_IS_CLIENT_RECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_DOM_TYPE_CLIENT_RECT))
+#define WEBKIT_DOM_CLIENT_RECT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_DOM_TYPE_CLIENT_RECT, WebKitDOMClientRectClass))
+
+struct _WebKitDOMClientRect {
+    WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMClientRectClass {
+    WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_client_rect_get_type(void);
+
+/**
+ * webkit_dom_client_rect_get_top:
+ * @self: A #WebKitDOMClientRect
+ *
+ * Returns the top coordinate of @self, relative to the viewport.
+ *
+ * Returns: A #gfloat
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gfloat
+webkit_dom_client_rect_get_top(WebKitDOMClientRect* self);
+
+/**
+ * webkit_dom_client_rect_get_right:
+ * @self: A #WebKitDOMClientRect
+ *
+ * Returns the right coordinate of @self, relative to the viewport.
+ *
+ * Returns: A #gfloat
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gfloat
+webkit_dom_client_rect_get_right(WebKitDOMClientRect* self);
+
+/**
+ * webkit_dom_client_rect_get_bottom:
+ * @self: A #WebKitDOMClientRect
+ *
+ * Returns the bottom coordinate of @self, relative to the viewport.
+ *
+ * Returns: A #gfloat
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gfloat
+webkit_dom_client_rect_get_bottom(WebKitDOMClientRect* self);
+
+/**
+ * webkit_dom_client_rect_get_left:
+ * @self: A #WebKitDOMClientRect
+ *
+ * Returns the left coordinate of @self, relative to the viewport.
+ *
+ * Returns: A #gfloat
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gfloat
+webkit_dom_client_rect_get_left(WebKitDOMClientRect* self);
+
+/**
+ * webkit_dom_client_rect_get_width:
+ * @self: A #WebKitDOMClientRect
+ *
+ * Returns the width of @self.
+ *
+ * Returns: A #gfloat
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gfloat
+webkit_dom_client_rect_get_width(WebKitDOMClientRect* self);
+
+/**
+ * webkit_dom_client_rect_get_height:
+ * @self: A #WebKitDOMClientRect
+ *
+ * Returns the height of @self.
+ *
+ * Returns: A #gfloat
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gfloat
+webkit_dom_client_rect_get_height(WebKitDOMClientRect* self);
+
+G_END_DECLS
+
+#endif /* WebKitDOMClientRect_h */
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectListcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,148 @@
</span><ins>+/*
+ *  Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitDOMClientRectList.h&quot;
+
+#include &quot;ConvertToUTF8String.h&quot;
+#include &quot;DOMObjectCache.h&quot;
+#include &quot;WebKitDOMClientRectListPrivate.h&quot;
+#include &quot;WebKitDOMClientRectPrivate.h&quot;
+#include &quot;WebKitDOMPrivate.h&quot;
+#include &lt;WebCore/CSSImportRule.h&gt;
+#include &lt;WebCore/Document.h&gt;
+#include &lt;WebCore/ExceptionCodeDescription.h&gt;
+#include &lt;WebCore/ExceptionCode.h&gt;
+#include &lt;WebCore/JSMainThreadExecState.h&gt;
+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+#define WEBKIT_DOM_CLIENT_RECT_LIST_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, WebKitDOMClientRectListPrivate)
+
+typedef struct _WebKitDOMClientRectListPrivate {
+    RefPtr&lt;WebCore::ClientRectList&gt; coreObject;
+} WebKitDOMClientRectListPrivate;
+
+namespace WebKit {
+
+WebKitDOMClientRectList* kit(WebCore::ClientRectList* obj)
+{
+    if (!obj)
+        return nullptr;
+
+    if (gpointer ret = DOMObjectCache::get(obj))
+        return WEBKIT_DOM_CLIENT_RECT_LIST(ret);
+
+    return wrapClientRectList(obj);
+}
+
+WebCore::ClientRectList* core(WebKitDOMClientRectList* request)
+{
+    return request ? static_cast&lt;WebCore::ClientRectList*&gt;(WEBKIT_DOM_OBJECT(request)-&gt;coreObject) : nullptr;
+}
+
+WebKitDOMClientRectList* wrapClientRectList(WebCore::ClientRectList* coreObject)
+{
+    ASSERT(coreObject);
+    return WEBKIT_DOM_CLIENT_RECT_LIST(g_object_new(WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, &quot;core-object&quot;, coreObject, nullptr));
+}
+
+} // namespace WebKit
+
+G_DEFINE_TYPE(WebKitDOMClientRectList, webkit_dom_client_rect_list, WEBKIT_DOM_TYPE_OBJECT)
+
+enum {
+    PROP_0,
+    PROP_LENGTH,
+};
+
+static void webkit_dom_client_rect_list_finalize(GObject* object)
+{
+    WebKitDOMClientRectListPrivate* priv = WEBKIT_DOM_CLIENT_RECT_LIST_GET_PRIVATE(object);
+
+    WebKit::DOMObjectCache::forget(priv-&gt;coreObject.get());
+
+    priv-&gt;~WebKitDOMClientRectListPrivate();
+    G_OBJECT_CLASS(webkit_dom_client_rect_list_parent_class)-&gt;finalize(object);
+}
+
+static void webkit_dom_client_rect_list_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec)
+{
+    WebKitDOMClientRectList* self = WEBKIT_DOM_CLIENT_RECT_LIST(object);
+
+    switch (propertyId) {
+    case PROP_LENGTH:
+        g_value_set_ulong(value, webkit_dom_client_rect_list_get_length(self));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
+        break;
+    }
+}
+
+static void webkit_dom_client_rect_list_constructed(GObject* object)
+{
+    G_OBJECT_CLASS(webkit_dom_client_rect_list_parent_class)-&gt;constructed(object);
+
+    WebKitDOMClientRectListPrivate* priv = WEBKIT_DOM_CLIENT_RECT_LIST_GET_PRIVATE(object);
+    priv-&gt;coreObject = static_cast&lt;WebCore::ClientRectList*&gt;(WEBKIT_DOM_OBJECT(object)-&gt;coreObject);
+    WebKit::DOMObjectCache::put(priv-&gt;coreObject.get(), object);
+}
+
+static void webkit_dom_client_rect_list_class_init(WebKitDOMClientRectListClass* requestClass)
+{
+    GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
+    g_type_class_add_private(gobjectClass, sizeof(WebKitDOMClientRectListPrivate));
+    gobjectClass-&gt;constructed = webkit_dom_client_rect_list_constructed;
+    gobjectClass-&gt;finalize = webkit_dom_client_rect_list_finalize;
+    gobjectClass-&gt;get_property = webkit_dom_client_rect_list_get_property;
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_LENGTH,
+        g_param_spec_ulong(
+            &quot;length&quot;,
+            &quot;ClientRectList:length&quot;,
+            &quot;read-only gulong ClientRectList:length&quot;,
+            0, G_MAXULONG, 0,
+            WEBKIT_PARAM_READABLE));
+
+}
+
+static void webkit_dom_client_rect_list_init(WebKitDOMClientRectList* request)
+{
+    WebKitDOMClientRectListPrivate* priv = WEBKIT_DOM_CLIENT_RECT_LIST_GET_PRIVATE(request);
+    new (priv) WebKitDOMClientRectListPrivate();
+}
+
+WebKitDOMClientRect* webkit_dom_client_rect_list_item(WebKitDOMClientRectList* self, gulong index)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT_LIST(self), nullptr);
+    WebCore::ClientRectList* item = WebKit::core(self);
+    RefPtr&lt;WebCore::ClientRect&gt; gobjectResult = WTF::getPtr(item-&gt;item(index));
+    return WebKit::kit(gobjectResult.get());
+}
+
+gulong webkit_dom_client_rect_list_get_length(WebKitDOMClientRectList* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT_LIST(self), 0);
+    return WebKit::core(self)-&gt;length();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectListh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ *  Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#if !defined(__WEBKITDOM_H_INSIDE__) &amp;&amp; !defined(BUILDING_WEBKIT)
+#error &quot;Only &lt;webkitdom/webkitdom.h&gt; can be included directly.&quot;
+#endif
+
+#ifndef WebKitDOMClientRectList_h
+#define WebKitDOMClientRectList_h
+
+#include &lt;glib-object.h&gt;
+#include &lt;webkitdom/WebKitDOMObject.h&gt;
+#include &lt;webkitdom/webkitdomdefines.h&gt;
+
+G_BEGIN_DECLS
+
+#define WEBKIT_DOM_TYPE_CLIENT_RECT_LIST            (webkit_dom_client_rect_list_get_type())
+#define WEBKIT_DOM_CLIENT_RECT_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, WebKitDOMClientRectList))
+#define WEBKIT_DOM_CLIENT_RECT_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, WebKitDOMClientRectListClass)
+#define WEBKIT_DOM_IS_CLIENT_RECT_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_CLIENT_RECT_LIST))
+#define WEBKIT_DOM_IS_CLIENT_RECT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_DOM_TYPE_CLIENT_RECT_LIST))
+#define WEBKIT_DOM_CLIENT_RECT_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, WebKitDOMClientRectListClass))
+
+struct _WebKitDOMClientRectList {
+    WebKitDOMObject parent_instance;
+};
+
+struct _WebKitDOMClientRectListClass {
+    WebKitDOMObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_dom_client_rect_list_get_type(void);
+
+/**
+ * webkit_dom_client_rect_list_get_length:
+ * @self: A #WebKitDOMClientRectList
+ *
+ * Returns the number of #WebKitDOMClientRect objects that @self contains.
+ *
+ * Returns: A #gulong
+ *
+ * Since: 2.18
+**/
+WEBKIT_API gulong
+webkit_dom_client_rect_list_get_length(WebKitDOMClientRectList* self);
+
+/**
+ * webkit_dom_client_rect_list_item:
+ * @self: A #WebKitDOMClientRectList
+ * @index: A #gulong
+ *
+ * Returns the #WebKitDOMClientRect object that @self contains at @index.
+ *
+ * Returns: (transfer none): A #WebKitDOMClientRect
+ *
+ * Since: 2.18
+**/
+WEBKIT_API WebKitDOMClientRect* webkit_dom_client_rect_list_item(WebKitDOMClientRectList* self, gulong index);
+
+G_END_DECLS
+
+#endif /* WebKitDOMClientRectList_h */
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectListPrivateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+/*
+ *  Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include &lt;WebCore/ClientRectList.h&gt;
+#include &lt;webkitdom/WebKitDOMClientRectList.h&gt;
+
+namespace WebKit {
+WebKitDOMClientRectList* wrapClientRectList(WebCore::ClientRectList*);
+WebKitDOMClientRectList* kit(WebCore::ClientRectList*);
+WebCore::ClientRectList* core(WebKitDOMClientRectList*);
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMClientRectPrivateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+/*
+ *  Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include &lt;WebCore/ClientRect.h&gt;
+#include &lt;webkitdom/WebKitDOMClientRect.h&gt;
+
+namespace WebKit {
+WebKitDOMClientRect* wrapClientRect(WebCore::ClientRect*);
+WebKitDOMClientRect* kit(WebCore::ClientRect*);
+WebCore::ClientRect* core(WebKitDOMClientRect*);
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -22,6 +22,8 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/CSSImportRule.h&gt;
</span><span class="cx"> #include &quot;DOMObjectCache.h&quot;
</span><ins>+#include &lt;WebCore/ClientRect.h&gt;
+#include &lt;WebCore/ClientRectList.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Document.h&gt;
</span><span class="cx"> #include &lt;WebCore/ExceptionCode.h&gt;
</span><span class="cx"> #include &lt;WebCore/ExceptionCodeDescription.h&gt;
</span><span class="lines">@@ -30,6 +32,8 @@
</span><span class="cx"> #include &lt;WebCore/JSMainThreadExecState.h&gt;
</span><span class="cx"> #include &quot;WebKitDOMAttrPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMCSSStyleDeclarationPrivate.h&quot;
</span><ins>+#include &quot;WebKitDOMClientRectListPrivate.h&quot;
+#include &quot;WebKitDOMClientRectPrivate.h&quot;
</ins><span class="cx"> #include &quot;WebKitDOMDOMTokenListPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMElementPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitDOMEventPrivate.h&quot;
</span><span class="lines">@@ -1221,6 +1225,24 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebKitDOMClientRect* webkit_dom_element_get_bounding_client_rect(WebKitDOMElement* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_ELEMENT(self), nullptr);
+    WebCore::Element* item = WebKit::core(self);
+    auto clientRect = item-&gt;getBoundingClientRect();
+    return WebKit::kit(clientRect.ptr());
+}
+
+WebKitDOMClientRectList* webkit_dom_element_get_client_rects(WebKitDOMElement* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_ELEMENT(self), nullptr);
+    WebCore::Element* item = WebKit::core(self);
+    auto clientRects = item-&gt;getClientRects();
+    return WebKit::kit(clientRects.ptr());
+}
+
</ins><span class="cx"> WebKitDOMElement* webkit_dom_element_get_offset_parent(WebKitDOMElement* self)
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -516,6 +516,34 @@
</span><span class="cx"> webkit_dom_element_get_scroll_height(WebKitDOMElement* self);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_element_get_bounding_client_rect:
+ * @self: A #WebKitDOMElement
+ *
+ * Returns a #WebKitDOMClientRect representing the size and position of @self
+ * relative to the viewport.
+ *
+ * Returns: (transfer full): A #WebKitDOMClientRect
+ *
+ * Since: 2.18
+**/
+WEBKIT_API WebKitDOMClientRect*
+webkit_dom_element_get_bounding_client_rect(WebKitDOMElement* self);
+
+/**
+ * webkit_dom_element_get_client_rects:
+ * @self: A #WebKitDOMElement
+ *
+ * Returns a collection of #WebKitDOMClientRect objects, each of which describe
+ * the size and position of a CSS border box relative to the viewport.
+ *
+ * Returns: (transfer full): A #WebKitDOMClientRectList
+ *
+ * Since: 2.18
+**/
+WEBKIT_API WebKitDOMClientRectList*
+webkit_dom_element_get_client_rects(WebKitDOMElement* self);
+
+/**
</ins><span class="cx">  * webkit_dom_element_get_offset_parent:
</span><span class="cx">  * @self: A #WebKitDOMElement
</span><span class="cx">  *
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMdocswebkitdomgtk40sectionstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -647,6 +647,8 @@
</span><span class="cx"> webkit_dom_element_set_scroll_top
</span><span class="cx"> webkit_dom_element_get_scroll_width
</span><span class="cx"> webkit_dom_element_get_scroll_height
</span><ins>+webkit_dom_element_get_bounding_client_rect
+webkit_dom_element_get_client_rects
</ins><span class="cx"> webkit_dom_element_get_offset_parent
</span><span class="cx"> webkit_dom_element_get_inner_html
</span><span class="cx"> webkit_dom_element_set_inner_html
</span><span class="lines">@@ -3201,3 +3203,48 @@
</span><span class="cx"> WEBKIT_DEPRECATED_FOR
</span><span class="cx"> &lt;/SECTION&gt;
</span><span class="cx"> 
</span><ins>+&lt;SECTION&gt;
+&lt;FILE&gt;WebKitDOMClientRect&lt;/FILE&gt;
+&lt;TITLE&gt;WebKitDOMClientRect&lt;/TITLE&gt;
+WebKitDOMClientRect
+
+webkit_dom_client_rect_get_top
+webkit_dom_client_rect_get_right
+webkit_dom_client_rect_get_bottom
+webkit_dom_client_rect_get_left
+webkit_dom_client_rect_get_width
+webkit_dom_client_rect_get_height
+
+&lt;SUBSECTION Standard&gt;
+WebKitDOMClientRectClass
+WEBKIT_DOM_TYPE_CLIENT_RECT
+WEBKIT_DOM_CLIENT_RECT
+WEBKIT_DOM_IS_CLIENT_RECT
+WEBKIT_DOM_CLIENT_RECT_CLASS
+WEBKIT_DOM_IS_CLIENT_RECT_CLASS
+WEBKIT_DOM_CLIENT_RECT_GET_CLASS
+
+&lt;SUBSECTION Private&gt;
+webkit_dom_client_rect_get_type
+&lt;/SECTION&gt;
+
+&lt;SECTION&gt;
+&lt;FILE&gt;WebKitDOMClientRectList&lt;/FILE&gt;
+&lt;TITLE&gt;WebKitDOMClientRectList&lt;/TITLE&gt;
+WebKitDOMClientRectList
+
+webkit_dom_client_rect_list_item
+webkit_dom_client_rect_list_get_length
+
+&lt;SUBSECTION Standard&gt;
+WebKitDOMClientRectClass
+WEBKIT_DOM_TYPE_CLIENT_RECT_LIST
+WEBKIT_DOM_CLIENT_RECT_LIST
+WEBKIT_DOM_IS_CLIENT_RECT_LIST
+WEBKIT_DOM_CLIENT_RECT_LIST_CLASS
+WEBKIT_DOM_IS_CLIENT_RECT_LIST_CLASS
+WEBKIT_DOM_CLIENT_RECT_LIST_GET_CLASS
+
+&lt;SUBSECTION Private&gt;
+webkit_dom_client_rect_list_get_type
+&lt;/SECTION&gt;
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMwebkitdomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> #include &lt;webkitdom/WebKitDOMCSSStyleSheet.h&gt;
</span><span class="cx"> #include &lt;webkitdom/WebKitDOMCSSValue.h&gt;
</span><span class="cx"> #include &lt;webkitdom/WebKitDOMCharacterData.h&gt;
</span><ins>+#include &lt;webkitdom/WebKitDOMClientRect.h&gt;
+#include &lt;webkitdom/WebKitDOMClientRectList.h&gt;
</ins><span class="cx"> #include &lt;webkitdom/WebKitDOMComment.h&gt;
</span><span class="cx"> #include &lt;webkitdom/WebKitDOMCustom.h&gt;
</span><span class="cx"> #include &lt;webkitdom/WebKitDOMDOMImplementation.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMwebkitdomautocleanupsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomautocleanups.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMCSSStyleSheet, g_object_unref)
</span><span class="cx"> G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMCSSValue, g_object_unref)
</span><span class="cx"> G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMCharacterData, g_object_unref)
</span><ins>+G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMClientRect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMClientRectList, g_object_unref)
</ins><span class="cx"> G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMComment, g_object_unref)
</span><span class="cx"> G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMDOMImplementation, g_object_unref)
</span><span class="cx"> G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOMDOMWindow, g_object_unref)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMwebkitdomdefinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/webkitdomdefines.h        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -64,6 +64,12 @@
</span><span class="cx"> typedef struct _WebKitDOMCharacterData WebKitDOMCharacterData;
</span><span class="cx"> typedef struct _WebKitDOMCharacterDataClass WebKitDOMCharacterDataClass;
</span><span class="cx"> 
</span><ins>+typedef struct _WebKitDOMClientRect WebKitDOMClientRect;
+typedef struct _WebKitDOMClientRectClass WebKitDOMClientRectClass;
+
+typedef struct _WebKitDOMClientRectList WebKitDOMClientRectList;
+typedef struct _WebKitDOMClientRectListClass WebKitDOMClientRectListClass;
+
</ins><span class="cx"> typedef struct _WebKitDOMComment WebKitDOMComment;
</span><span class="cx"> typedef struct _WebKitDOMCommentClass WebKitDOMCommentClass;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt (214214 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt        2017-03-21 08:59:27 UTC (rev 214214)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> endmacro()
</span><span class="cx"> 
</span><span class="cx"> ADD_WK2_TEST_WEB_EXTENSION(WebExtensionTest WebExtensionTest.cpp)
</span><del>-ADD_WK2_TEST_WEB_EXTENSION(WebProcessTest AutocleanupsTest.cpp DOMNodeTest.cpp DOMNodeFilterTest.cpp DOMXPathNSResolverTest.cpp FrameTest.cpp WebProcessTest.cpp EditorTest.cpp)
</del><ins>+ADD_WK2_TEST_WEB_EXTENSION(WebProcessTest AutocleanupsTest.cpp DOMClientRectTest.cpp DOMNodeTest.cpp DOMNodeFilterTest.cpp DOMXPathNSResolverTest.cpp FrameTest.cpp WebProcessTest.cpp EditorTest.cpp)
</ins><span class="cx"> 
</span><span class="cx"> ADD_WK2_TEST(InspectorTestServer InspectorTestServer.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestAuthentication TestAuthentication.cpp)
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx"> ADD_WK2_TEST(TestBackForwardList TestBackForwardList.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestContextMenu TestContextMenu.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestCookieManager TestCookieManager.cpp)
</span><ins>+ADD_WK2_TEST(TestDOMClientRect TestDOMClientRect.cpp)
</ins><span class="cx"> ADD_WK2_TEST(TestDOMNode TestDOMNode.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestDOMNodeFilter TestDOMNodeFilter.cpp)
</span><span class="cx"> ADD_WK2_TEST(TestDOMXPathNSResolver TestDOMXPathNSResolver.cpp)
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkDOMClientRectTestcpp"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMClientRectTest.cpp (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMClientRectTest.cpp                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMClientRectTest.cpp        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+/*
+ * Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebProcessTest.h&quot;
+#include &lt;gio/gio.h&gt;
+#include &lt;webkit2/webkit-web-extension.h&gt;
+
+class WebKitDOMClientRectTest : public WebProcessTest {
+public:
+    static std::unique_ptr&lt;WebProcessTest&gt; create() { return std::unique_ptr&lt;WebKitDOMClientRectTest&gt;(new WebKitDOMClientRectTest()); }
+
+private:
+    static void checkClientRectPosition(WebKitDOMClientRect* clientRect)
+    {
+        // Expected values correspond to CSS in TestDOMClientRect.cpp
+        g_assert_cmpfloat(webkit_dom_client_rect_get_top(clientRect), ==, -25);
+        g_assert_cmpfloat(webkit_dom_client_rect_get_right(clientRect), ==, 50);
+        g_assert_cmpfloat(webkit_dom_client_rect_get_bottom(clientRect), ==, 175);
+        g_assert_cmpfloat(webkit_dom_client_rect_get_left(clientRect), ==, -50);
+        g_assert_cmpfloat(webkit_dom_client_rect_get_width(clientRect), ==, 100);
+        g_assert_cmpfloat(webkit_dom_client_rect_get_height(clientRect), ==, 200);
+    }
+
+
+    bool testDivBoundingClientRectPosition(WebKitWebPage* page)
+    {
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(document));
+
+        WebKitDOMElement* div = webkit_dom_document_get_element_by_id(document, &quot;rect&quot;);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(div));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(div));
+
+        GRefPtr&lt;WebKitDOMClientRect&gt; clientRect = adoptGRef(webkit_dom_element_get_bounding_client_rect(div));
+        g_assert(WEBKIT_DOM_IS_CLIENT_RECT(clientRect.get()));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(clientRect.get()));
+        checkClientRectPosition(clientRect.get());
+
+        return true;
+    }
+
+    bool testDivClientRectsPositionAndLength(WebKitWebPage* page)
+    {
+        WebKitDOMDocument* document = webkit_web_page_get_dom_document(page);
+        g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(document));
+
+        WebKitDOMElement* div = webkit_dom_document_get_element_by_id(document, &quot;rect&quot;);
+        g_assert(WEBKIT_DOM_IS_HTML_ELEMENT(div));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(div));
+
+        GRefPtr&lt;WebKitDOMClientRectList&gt; clientRectList = adoptGRef(webkit_dom_element_get_client_rects(div));
+        g_assert(WEBKIT_DOM_IS_CLIENT_RECT_LIST(clientRectList.get()));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(clientRectList.get()));
+
+        g_assert_cmpuint(webkit_dom_client_rect_list_get_length(clientRectList.get()), ==, 1);
+
+        WebKitDOMClientRect* clientRect = webkit_dom_client_rect_list_item(clientRectList.get(), 0);
+        g_assert(WEBKIT_DOM_IS_CLIENT_RECT(clientRect));
+        assertObjectIsDeletedWhenTestFinishes(G_OBJECT(clientRect));
+        checkClientRectPosition(clientRect);
+
+        // Getting the clientRect twice should return the same pointer.
+        g_assert(webkit_dom_client_rect_list_item(clientRectList.get(), 0) == webkit_dom_client_rect_list_item(clientRectList.get(), 0));
+
+        return true;
+    }
+
+    bool runTest(const char* testName, WebKitWebPage* page) override
+    {
+        if (!strcmp(testName, &quot;div-bounding-client-rect-position&quot;))
+            return testDivBoundingClientRectPosition(page);
+        if (!strcmp(testName, &quot;div-client-rects-position-and-length&quot;))
+            return testDivClientRectsPositionAndLength(page);
+
+        g_assert_not_reached();
+        return false;
+    }
+};
+
+static void __attribute__((constructor)) registerTests()
+{
+    REGISTER_TEST(WebKitDOMClientRectTest, &quot;WebKitDOMClientRect/div-bounding-client-rect-position&quot;);
+    REGISTER_TEST(WebKitDOMClientRectTest, &quot;WebKitDOMClientRect/div-client-rects-position-and-length&quot;);
+}
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkTestDOMClientRectcpp"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMClientRect.cpp (0 => 214215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMClientRect.cpp                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDOMClientRect.cpp        2017-03-21 09:11:05 UTC (rev 214215)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2017 Aidan Holm &lt;aidanholm@gmail.com&gt;
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;WebViewTest.h&quot;
+#include &lt;webkit2/webkit2.h&gt;
+
+static void prepareDOMForClientRectPositionTests(WebViewTest* test)
+{
+    static const char* testHTML = &quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&quot;
+        &quot;&lt;style&gt;&quot;
+        &quot;    #rect { position: fixed; top: -25px; left: -50px; width: 100px; height: 200px; }&quot;
+        &quot;&lt;/style&gt;&quot;
+        &quot;&lt;div id=rect&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&quot;;
+    test-&gt;loadHtml(testHTML, nullptr);
+    test-&gt;waitUntilLoadFinished();
+}
+
+static void testWebKitDOMClientRectDivBoundingClientRectPosition(WebViewTest* test, gconstpointer)
+{
+    prepareDOMForClientRectPositionTests(test);
+    g_assert(test-&gt;runWebProcessTest(&quot;WebKitDOMClientRect&quot;, &quot;div-bounding-client-rect-position&quot;));
+}
+
+static void testWebKitDOMClientRectDivClientRectsPositionAndLength(WebViewTest* test, gconstpointer)
+{
+    prepareDOMForClientRectPositionTests(test);
+    g_assert(test-&gt;runWebProcessTest(&quot;WebKitDOMClientRect&quot;, &quot;div-client-rects-position-and-length&quot;));
+}
+
+void beforeAll()
+{
+    WebViewTest::add(&quot;WebKitDOMClientRect&quot;, &quot;div-bounding-client-rect-position&quot;, testWebKitDOMClientRectDivBoundingClientRectPosition);
+    WebViewTest::add(&quot;WebKitDOMClientRect&quot;, &quot;div-client-rects-position-and-length&quot;, testWebKitDOMClientRectDivClientRectsPositionAndLength);
+}
+
+void afterAll()
+{
+}
</ins></span></pre>
</div>
</div>

</body>
</html>