Drop support for legacy ClientRect / ClientRectList
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 May 2017 00:44:06 +0000 (00:44 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 May 2017 00:44:06 +0000 (00:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171418

Reviewed by Sam Weinig.

Source/WebCore:

Drop support for legacy ClientRect / ClientRectList types now we use
DOMRect everywhere.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/ClientRect.cpp: Removed.
* dom/ClientRect.h: Removed.
* dom/ClientRect.idl: Removed.
* dom/ClientRectList.cpp: Removed.
* dom/ClientRectList.h: Removed.
* dom/ClientRectList.idl: Removed.
* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
* html/HTMLMediaElement.cpp:
* html/track/VTTRegion.cpp:
* page/DragController.cpp:

Source/WebInspectorUI:

Drop ClientRectList-related code.

* UserInterface/Models/NativeFunctionParameters.js:

Source/WebKit2:

GTK build fix.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
(WebKit::kit):
(WebKit::core):
(WebKit::wrapClientRect):
(webkit_dom_client_rect_constructed):
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
(ClientRectList::create):
(ClientRectList::items):
(ClientRectList::ClientRectList):
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
(webkit_dom_element_get_bounding_client_rect):
(webkit_dom_element_get_client_rects):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/ClientRect.cpp [deleted file]
Source/WebCore/dom/ClientRect.h [deleted file]
Source/WebCore/dom/ClientRect.idl [deleted file]
Source/WebCore/dom/ClientRectList.cpp [deleted file]
Source/WebCore/dom/ClientRectList.h [deleted file]
Source/WebCore/dom/ClientRectList.idl [deleted file]
Source/WebCore/dom/DOMAllInOne.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/track/VTTRegion.cpp
Source/WebCore/page/DragController.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp

index 9f029da..40f64e0 100644 (file)
@@ -406,8 +406,6 @@ set(WebCore_NON_SVG_IDL_FILES
     dom/CDATASection.idl
     dom/CharacterData.idl
     dom/ChildNode.idl
-    dom/ClientRect.idl
-    dom/ClientRectList.idl
     dom/ClipboardEvent.idl
     dom/Comment.idl
     dom/CompositionEvent.idl
@@ -1447,8 +1445,6 @@ set(WebCore_SOURCES
     dom/ChildListMutationScope.cpp
     dom/ChildNodeList.cpp
     dom/ClassCollection.cpp
-    dom/ClientRect.cpp
-    dom/ClientRectList.cpp
     dom/ClipboardEvent.cpp
     dom/CollectionIndexCache.cpp
     dom/Comment.cpp
index 417e80d..b682d05 100644 (file)
@@ -1,3 +1,29 @@
+2017-04-30  Chris Dumez  <cdumez@apple.com>
+
+        Drop support for legacy ClientRect / ClientRectList
+        https://bugs.webkit.org/show_bug.cgi?id=171418
+
+        Reviewed by Sam Weinig.
+
+        Drop support for legacy ClientRect / ClientRectList types now we use
+        DOMRect everywhere.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/ClientRect.cpp: Removed.
+        * dom/ClientRect.h: Removed.
+        * dom/ClientRect.idl: Removed.
+        * dom/ClientRectList.cpp: Removed.
+        * dom/ClientRectList.h: Removed.
+        * dom/ClientRectList.idl: Removed.
+        * dom/DOMAllInOne.cpp:
+        * dom/Element.cpp:
+        * html/HTMLMediaElement.cpp:
+        * html/track/VTTRegion.cpp:
+        * page/DragController.cpp:
+
 2017-04-30  Zalan Bujtas  <zalan@apple.com>
 
         Initialize a new layout state while bailing out of simple line layout only when needed.
index bd8b782..5a661f1 100644 (file)
 #endif
 #include "JSCDATASection.cpp"
 #include "JSCharacterData.cpp"
-#include "JSClientRect.cpp"
-#include "JSClientRectList.cpp"
 #include "JSCloseEvent.cpp"
 #include "JSCommandLineAPIHost.cpp"
 #include "JSComment.cpp"
index 7c57470..0acd29c 100644 (file)
@@ -342,8 +342,6 @@ JS_BINDING_IDLS = \
     $(WebCore)/dom/CDATASection.idl \
     $(WebCore)/dom/CharacterData.idl \
     $(WebCore)/dom/ChildNode.idl \
-    $(WebCore)/dom/ClientRect.idl \
-    $(WebCore)/dom/ClientRectList.idl \
     $(WebCore)/dom/ClipboardEvent.idl \
     $(WebCore)/dom/Comment.idl \
     $(WebCore)/dom/CompositionEvent.idl \
index b97b763..3416ca4 100644 (file)
                BCBD21AB0E417AD400A070F2 /* URLHash.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBD21AA0E417AD400A070F2 /* URLHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */; };
                BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowShell.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               BCC0657D0F3CE1B700CD2D87 /* ClientRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */; };
-               BCC0657E0F3CE1B700CD2D87 /* ClientRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC065780F3CE1B700CD2D87 /* ClientRect.h */; };
-               BCC065800F3CE1B700CD2D87 /* ClientRectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC0657A0F3CE1B700CD2D87 /* ClientRectList.cpp */; };
-               BCC065810F3CE1B700CD2D87 /* ClientRectList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC0657B0F3CE1B700CD2D87 /* ClientRectList.h */; };
-               BCC065870F3CE2A700CD2D87 /* JSClientRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC065830F3CE2A700CD2D87 /* JSClientRect.cpp */; };
-               BCC065880F3CE2A700CD2D87 /* JSClientRect.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC065840F3CE2A700CD2D87 /* JSClientRect.h */; };
-               BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC065850F3CE2A700CD2D87 /* JSClientRectList.cpp */; };
-               BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */; };
                BCC0E8751BFE70E9008F7F50 /* HTMLPictureElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC0E8731BFE70E9008F7F50 /* HTMLPictureElement.cpp */; };
                BCC0E8761BFE70E9008F7F50 /* HTMLPictureElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC0E8741BFE70E9008F7F50 /* HTMLPictureElement.h */; };
                BCC5BE000C0E93110011C2DB /* JSCSSStyleSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC5BDFE0C0E93110011C2DB /* JSCSSStyleSheet.cpp */; };
                BCBD21AA0E417AD400A070F2 /* URLHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLHash.h; sourceTree = "<group>"; };
                BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowShell.cpp; sourceTree = "<group>"; };
                BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWindowShell.h; sourceTree = "<group>"; };
-               BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientRect.cpp; sourceTree = "<group>"; };
-               BCC065780F3CE1B700CD2D87 /* ClientRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientRect.h; sourceTree = "<group>"; };
-               BCC065790F3CE1B700CD2D87 /* ClientRect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ClientRect.idl; sourceTree = "<group>"; };
-               BCC0657A0F3CE1B700CD2D87 /* ClientRectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientRectList.cpp; sourceTree = "<group>"; };
-               BCC0657B0F3CE1B700CD2D87 /* ClientRectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientRectList.h; sourceTree = "<group>"; };
-               BCC0657C0F3CE1B700CD2D87 /* ClientRectList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ClientRectList.idl; sourceTree = "<group>"; };
-               BCC065830F3CE2A700CD2D87 /* JSClientRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClientRect.cpp; sourceTree = "<group>"; };
-               BCC065840F3CE2A700CD2D87 /* JSClientRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClientRect.h; sourceTree = "<group>"; };
-               BCC065850F3CE2A700CD2D87 /* JSClientRectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClientRectList.cpp; sourceTree = "<group>"; };
-               BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClientRectList.h; sourceTree = "<group>"; };
                BCC0E8731BFE70E9008F7F50 /* HTMLPictureElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPictureElement.cpp; sourceTree = "<group>"; };
                BCC0E8741BFE70E9008F7F50 /* HTMLPictureElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPictureElement.h; sourceTree = "<group>"; };
                BCC5BDFE0C0E93110011C2DB /* JSCSSStyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleSheet.cpp; sourceTree = "<group>"; };
                A83B790E0CCAFF97000B0825 /* CSS */ = {
                        isa = PBXGroup;
                        children = (
-                               BCC065830F3CE2A700CD2D87 /* JSClientRect.cpp */,
-                               BCC065840F3CE2A700CD2D87 /* JSClientRect.h */,
-                               BCC065850F3CE2A700CD2D87 /* JSClientRectList.cpp */,
-                               BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */,
                                BC46C1F20C0DDC8F0020CFC3 /* JSCSSFontFaceRule.cpp */,
                                BC46C1F30C0DDC8F0020CFC3 /* JSCSSFontFaceRule.h */,
                                BC46C1F40C0DDC8F0020CFC3 /* JSCSSImportRule.cpp */,
                                A81872150977D3C0005826D9 /* ChildNodeList.h */,
                                8348BFA91B85729500912F36 /* ClassCollection.cpp */,
                                8348BFAA1B85729500912F36 /* ClassCollection.h */,
-                               BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */,
-                               BCC065780F3CE1B700CD2D87 /* ClientRect.h */,
-                               BCC065790F3CE1B700CD2D87 /* ClientRect.idl */,
-                               BCC0657A0F3CE1B700CD2D87 /* ClientRectList.cpp */,
-                               BCC0657B0F3CE1B700CD2D87 /* ClientRectList.h */,
-                               BCC0657C0F3CE1B700CD2D87 /* ClientRectList.idl */,
                                85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */,
                                85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */,
                                836D03271DA89B7300FFD96B /* ClipboardEvent.idl */,
                                14D824080AF93AEB0004F057 /* ChromeClient.h in Headers */,
                                E4A814D41C6DEC4000BF85AC /* ClassChangeInvalidation.h in Headers */,
                                8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */,
-                               BCC0657E0F3CE1B700CD2D87 /* ClientRect.h in Headers */,
-                               BCC065810F3CE1B700CD2D87 /* ClientRectList.h in Headers */,
                                7C3A91E61C963B8800D1A7E3 /* ClipboardAccessPolicy.h in Headers */,
                                85031B400A44EFC700F992E0 /* ClipboardEvent.h in Headers */,
                                FB92DF4B15FED08700994433 /* ClipPathOperation.h in Headers */,
                                FDA15EA212B03EE1003A583A /* JSChannelMergerNode.h in Headers */,
                                FDA15EA412B03EE1003A583A /* JSChannelSplitterNode.h in Headers */,
                                65DF31F409D1CC60000BE325 /* JSCharacterData.h in Headers */,
-                               BCC065880F3CE2A700CD2D87 /* JSClientRect.h in Headers */,
-                               BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */,
                                836D03321DA8A14200FFD96B /* JSClipboardEvent.h in Headers */,
                                51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */,
                                A584FE3C1864E2D800843B10 /* JSCommandLineAPIHost.h in Headers */,
                                ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */,
                                E4A814D61C6DEE8D00BF85AC /* ClassChangeInvalidation.cpp in Sources */,
                                8348BFAB1B85729800912F36 /* ClassCollection.cpp in Sources */,
-                               BCC0657D0F3CE1B700CD2D87 /* ClientRect.cpp in Sources */,
-                               BCC065800F3CE1B700CD2D87 /* ClientRectList.cpp in Sources */,
                                85031B3F0A44EFC700F992E0 /* ClipboardEvent.cpp in Sources */,
                                580371611A66F00A00BAF519 /* ClipRect.cpp in Sources */,
                                CDEA76351460B71A008B31F1 /* Clock.cpp in Sources */,
                                FDA15EA112B03EE1003A583A /* JSChannelMergerNode.cpp in Sources */,
                                FDA15EA312B03EE1003A583A /* JSChannelSplitterNode.cpp in Sources */,
                                65DF31F309D1CC60000BE325 /* JSCharacterData.cpp in Sources */,
-                               BCC065870F3CE2A700CD2D87 /* JSClientRect.cpp in Sources */,
-                               BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */,
                                836D03311DA8A13F00FFD96B /* JSClipboardEvent.cpp in Sources */,
                                51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */,
                                A584FE3B1864E2D800843B10 /* JSCommandLineAPIHost.cpp in Sources */,
diff --git a/Source/WebCore/dom/ClientRect.cpp b/Source/WebCore/dom/ClientRect.cpp
deleted file mode 100644 (file)
index 4a64e75..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#include "config.h"
-#include "ClientRect.h"
-
-namespace WebCore {
-
-ClientRect::ClientRect()
-{
-}
-
-ClientRect::ClientRect(const IntRect& rect)
-    : m_rect(rect)
-{
-}
-
-ClientRect::ClientRect(const FloatRect& rect)
-    : m_rect(rect)
-{
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/dom/ClientRect.h b/Source/WebCore/dom/ClientRect.h
deleted file mode 100644 (file)
index 2e9efb5..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#pragma once
-
-#include "FloatRect.h"
-#include "ScriptWrappable.h"
-#include <wtf/Ref.h>
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-    class IntRect; 
-
-    class ClientRect : public ScriptWrappable, public RefCounted<ClientRect> {
-    public:
-        static Ref<ClientRect> create() { return adoptRef(*new ClientRect); }
-        static Ref<ClientRect> create(const IntRect& rect) { return adoptRef(*new ClientRect(rect)); }
-        static Ref<ClientRect> create(const FloatRect& rect) { return adoptRef(*new ClientRect(rect)); }
-
-        float top() const { return m_rect.y(); }
-        float right() const { return m_rect.maxX(); }
-        float bottom() const { return m_rect.maxY(); }
-        float left() const { return m_rect.x(); }
-        float width() const { return m_rect.width(); }
-        float height() const { return m_rect.height(); }
-
-    private:
-        WEBCORE_EXPORT ClientRect();
-        WEBCORE_EXPORT explicit ClientRect(const IntRect&);
-        WEBCORE_EXPORT explicit ClientRect(const FloatRect&);
-
-        FloatRect m_rect;
-    }; 
-
-} // namespace WebCore
diff --git a/Source/WebCore/dom/ClientRect.idl b/Source/WebCore/dom/ClientRect.idl
deleted file mode 100644 (file)
index cd9940a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-[
-    ImplementationLacksVTable,
-    ExportMacro=WEBCORE_EXPORT,
-] interface ClientRect {
-    readonly attribute unrestricted float top;
-    readonly attribute unrestricted float right;
-    readonly attribute unrestricted float bottom;
-    readonly attribute unrestricted float left;
-    readonly attribute unrestricted float width;
-    readonly attribute unrestricted float height;
-
-    serializer = { attribute };
-};
diff --git a/Source/WebCore/dom/ClientRectList.cpp b/Source/WebCore/dom/ClientRectList.cpp
deleted file mode 100644 (file)
index 354e3cc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#include "config.h"
-#include "ClientRectList.h"
-
-#include "ClientRect.h"
-
-namespace WebCore {
-
-ClientRectList::ClientRectList()
-{
-}
-
-ClientRectList::ClientRectList(const Vector<FloatQuad>& quads)
-{
-    m_list.reserveInitialCapacity(quads.size());
-    for (auto& quad : quads)
-        m_list.uncheckedAppend(ClientRect::create(quad.enclosingBoundingBox()));
-}
-
-ClientRectList::ClientRectList(Vector<Ref<ClientRect>>&& rects)
-    : m_list(WTFMove(rects))
-{
-}
-
-ClientRectList::~ClientRectList()
-{
-}
-
-unsigned ClientRectList::length() const
-{
-    return m_list.size();
-}
-
-ClientRect* ClientRectList::item(unsigned index)
-{
-    if (index >= m_list.size()) {
-        // FIXME: Should this throw an INDEX_SIZE_ERR exception?
-        return nullptr;
-    }
-    return m_list[index].ptr();
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/dom/ClientRectList.h b/Source/WebCore/dom/ClientRectList.h
deleted file mode 100644 (file)
index ba1cd71..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#pragma once
-
-#include "FloatQuad.h"
-#include <wtf/Ref.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-    class ClientRect;
-
-    class ClientRectList : public RefCounted<ClientRectList> {
-    public:
-        static Ref<ClientRectList> create() { return adoptRef(*new ClientRectList); }
-        static Ref<ClientRectList> create(const Vector<FloatQuad>& quads) { return adoptRef(*new ClientRectList(quads)); }
-        static Ref<ClientRectList> create(Vector<Ref<ClientRect>>&& rects) { return adoptRef(*new ClientRectList(WTFMove(rects))); }
-        WEBCORE_EXPORT ~ClientRectList();
-
-        unsigned length() const;
-        ClientRect* item(unsigned index);
-
-    private:
-        WEBCORE_EXPORT ClientRectList();
-        WEBCORE_EXPORT explicit ClientRectList(const Vector<FloatQuad>&);
-        WEBCORE_EXPORT explicit ClientRectList(Vector<Ref<ClientRect>>&&);
-
-        Vector<Ref<ClientRect>> m_list;
-    }; 
-
-} // namespace WebCore
diff --git a/Source/WebCore/dom/ClientRectList.idl b/Source/WebCore/dom/ClientRectList.idl
deleted file mode 100644 (file)
index a5dbcf6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-[
-    ImplementationLacksVTable,
-    ExportMacro=WEBCORE_EXPORT,
-] interface ClientRectList {
-    readonly attribute unsigned long length;
-    getter ClientRect item(unsigned long index);
-    // FIXME: Fix list behavior to allow custom exceptions to be thrown.
-};
-
index 270e416..0a05421 100644 (file)
@@ -37,8 +37,6 @@
 #include "ChildListMutationScope.cpp"
 #include "ChildNodeList.cpp"
 #include "ClassCollection.cpp"
-#include "ClientRect.cpp"
-#include "ClientRectList.cpp"
 #include "ClipboardEvent.cpp"
 #include "CollectionIndexCache.cpp"
 #include "Comment.cpp"
index 8189243..81bc731 100644 (file)
@@ -33,8 +33,6 @@
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "ClassChangeInvalidation.h"
-#include "ClientRect.h"
-#include "ClientRectList.h"
 #include "ComposedTreeAncestorIterator.h"
 #include "ContainerNodeAlgorithms.h"
 #include "CustomElementReactionQueue.h"
index 0677207..89f8edb 100644 (file)
@@ -35,8 +35,6 @@
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "ChromeClient.h"
-#include "ClientRect.h"
-#include "ClientRectList.h"
 #include "CommonVM.h"
 #include "ContentSecurityPolicy.h"
 #include "ContentType.h"
index e688480..5214a79 100644 (file)
@@ -34,7 +34,6 @@
 
 #if ENABLE(VIDEO_TRACK)
 
-#include "ClientRect.h"
 #include "DOMRect.h"
 #include "DOMTokenList.h"
 #include "ElementChildIterator.h"
index 13fea03..5dc9bd4 100644 (file)
@@ -32,7 +32,6 @@
 #if ENABLE(DRAG_SUPPORT)
 #include "CachedImage.h"
 #include "CachedResourceLoader.h"
-#include "ClientRect.h"
 #include "DataTransfer.h"
 #include "Document.h"
 #include "DocumentFragment.h"
index 00416ef..246949e 100644 (file)
@@ -1,3 +1,14 @@
+2017-04-30  Chris Dumez  <cdumez@apple.com>
+
+        Drop support for legacy ClientRect / ClientRectList
+        https://bugs.webkit.org/show_bug.cgi?id=171418
+
+        Reviewed by Sam Weinig.
+
+        Drop ClientRectList-related code.
+
+        * UserInterface/Models/NativeFunctionParameters.js:
+
 2017-04-27  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [GTK] Web Inspector: Add new GTK+ icons for different Script Timeline Views (Events and Call Trees)
index 5fcbec1..fc95fa4 100644 (file)
@@ -696,11 +696,6 @@ WebInspector.NativePrototypeFunctionParameters = {
         __proto__: null,
     },
 
-    ClientRectList: {
-        item: "[index]",
-        __proto__: null,
-    },
-
     CommandLineAPIHost: {
         copyText: "text",
         databaseId: "database",
index c49e242..4f153cb 100644 (file)
@@ -1,3 +1,27 @@
+2017-04-30  Chris Dumez  <cdumez@apple.com>
+
+        Drop support for legacy ClientRect / ClientRectList
+        https://bugs.webkit.org/show_bug.cgi?id=171418
+
+        Reviewed by Sam Weinig.
+
+        GTK build fix.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
+        (WebKit::kit):
+        (WebKit::core):
+        (WebKit::wrapClientRect):
+        (webkit_dom_client_rect_constructed):
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
+        (ClientRectList::create):
+        (ClientRectList::items):
+        (ClientRectList::ClientRectList):
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h:
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
+        (webkit_dom_element_get_bounding_client_rect):
+        (webkit_dom_element_get_client_rects):
+
 2017-04-30  Brady Eidson  <beidson@apple.com>
 
         More fixing after r215991
index 2d71e8e..4f87e0b 100644 (file)
 #define WEBKIT_DOM_CLIENT_RECT_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_DOM_TYPE_CLIENT_RECT, WebKitDOMClientRectPrivate)
 
 typedef struct _WebKitDOMClientRectPrivate {
-    RefPtr<WebCore::ClientRect> coreObject;
+    RefPtr<WebCore::DOMRect> coreObject;
 } WebKitDOMClientRectPrivate;
 
 namespace WebKit {
 
-WebKitDOMClientRect* kit(WebCore::ClientRect* obj)
+WebKitDOMClientRect* kit(WebCore::DOMRect* obj)
 {
     if (!obj)
         return nullptr;
@@ -51,12 +51,12 @@ WebKitDOMClientRect* kit(WebCore::ClientRect* obj)
     return wrapClientRect(obj);
 }
 
-WebCore::ClientRect* core(WebKitDOMClientRect* request)
+WebCore::DOMRect* core(WebKitDOMClientRect* request)
 {
-    return request ? static_cast<WebCore::ClientRect*>(WEBKIT_DOM_OBJECT(request)->coreObject) : nullptr;
+    return request ? static_cast<WebCore::DOMRect*>(WEBKIT_DOM_OBJECT(request)->coreObject) : nullptr;
 }
 
-WebKitDOMClientRect* wrapClientRect(WebCore::ClientRect* coreObject)
+WebKitDOMClientRect* wrapClientRect(WebCore::DOMRect* coreObject)
 {
     ASSERT(coreObject);
     return WEBKIT_DOM_CLIENT_RECT(g_object_new(WEBKIT_DOM_TYPE_CLIENT_RECT, "core-object", coreObject, nullptr));
@@ -120,7 +120,7 @@ static void webkit_dom_client_rect_constructed(GObject* object)
     G_OBJECT_CLASS(webkit_dom_client_rect_parent_class)->constructed(object);
 
     WebKitDOMClientRectPrivate* priv = WEBKIT_DOM_CLIENT_RECT_GET_PRIVATE(object);
-    priv->coreObject = static_cast<WebCore::ClientRect*>(WEBKIT_DOM_OBJECT(object)->coreObject);
+    priv->coreObject = static_cast<WebCore::DOMRect*>(WEBKIT_DOM_OBJECT(object)->coreObject);
     WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
 }
 
index 1601997..1bba10c 100644 (file)
 
 #define WEBKIT_DOM_CLIENT_RECT_LIST_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, WebKitDOMClientRectListPrivate)
 
+class ClientRectList : public RefCounted<ClientRectList> {
+public:
+    static Ref<ClientRectList> create(WTF::Vector<Ref<WebCore::DOMRect>>&& items)
+    {
+        return adoptRef(*new ClientRectList(WTFMove(items)));
+    }
+
+    const WTF::Vector<Ref<WebCore::DOMRect>>& items() const { return m_items; }
+
+private:
+    ClientRectList(WTF::Vector<Ref<WebCore::DOMRect>>&& items)
+        : m_items(WTFMove(items))
+    { }
+
+    WTF::Vector<Ref<WebCore::DOMRect>> m_items;
+};
+
 typedef struct _WebKitDOMClientRectListPrivate {
-    RefPtr<WebCore::ClientRectList> coreObject;
+    RefPtr<ClientRectList> coreObject;
 } WebKitDOMClientRectListPrivate;
 
 namespace WebKit {
 
-WebKitDOMClientRectList* kit(WebCore::ClientRectList* obj)
+WebKitDOMClientRectList* kit(WTF::Vector<Ref<WebCore::DOMRect>>&& obj)
 {
-    if (!obj)
-        return nullptr;
-
-    if (gpointer ret = DOMObjectCache::get(obj))
-        return WEBKIT_DOM_CLIENT_RECT_LIST(ret);
-
-    return wrapClientRectList(obj);
+    return wrapClientRectList(WTFMove(obj));
 }
 
-WebCore::ClientRectList* core(WebKitDOMClientRectList* request)
+static ClientRectList* core(WebKitDOMClientRectList* request)
 {
-    return request ? static_cast<WebCore::ClientRectList*>(WEBKIT_DOM_OBJECT(request)->coreObject) : nullptr;
+    return request ? static_cast<ClientRectList*>(WEBKIT_DOM_OBJECT(request)->coreObject) : nullptr;
 }
 
-WebKitDOMClientRectList* wrapClientRectList(WebCore::ClientRectList* coreObject)
+WebKitDOMClientRectList* wrapClientRectList(WTF::Vector<Ref<WebCore::DOMRect>>&& coreObject)
 {
     ASSERT(coreObject);
-    return WEBKIT_DOM_CLIENT_RECT_LIST(g_object_new(WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, "core-object", coreObject, nullptr));
+    auto list = ClientRectList::create(WTFMove(coreObject));
+    return WEBKIT_DOM_CLIENT_RECT_LIST(g_object_new(WEBKIT_DOM_TYPE_CLIENT_RECT_LIST, "core-object", list.ptr(), nullptr));
 }
 
 } // namespace WebKit
@@ -101,8 +113,7 @@ static void webkit_dom_client_rect_list_constructed(GObject* object)
     G_OBJECT_CLASS(webkit_dom_client_rect_list_parent_class)->constructed(object);
 
     WebKitDOMClientRectListPrivate* priv = WEBKIT_DOM_CLIENT_RECT_LIST_GET_PRIVATE(object);
-    priv->coreObject = static_cast<WebCore::ClientRectList*>(WEBKIT_DOM_OBJECT(object)->coreObject);
-    WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
+    priv->coreObject = static_cast<ClientRectList*>(WEBKIT_DOM_OBJECT(object)->coreObject);
 }
 
 static void webkit_dom_client_rect_list_class_init(WebKitDOMClientRectListClass* requestClass)
@@ -135,8 +146,8 @@ WebKitDOMClientRect* webkit_dom_client_rect_list_item(WebKitDOMClientRectList* s
 {
     WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(WEBKIT_DOM_IS_CLIENT_RECT_LIST(self), nullptr);
-    WebCore::ClientRectList* item = WebKit::core(self);
-    RefPtr<WebCore::ClientRect> gobjectResult = WTF::getPtr(item->item(index));
+    auto& list = WebKit::core(self)->items();
+    RefPtr<WebCore::DOMRect> gobjectResult = index >= list.size() ? nullptr : list[index].ptr();
     return WebKit::kit(gobjectResult.get());
 }
 
@@ -144,5 +155,5 @@ 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)->length();
+    return WebKit::core(self)->items().size();
 }
index 3bc5b4b..d2122ba 100644 (file)
 
 #pragma once
 
-#include <WebCore/ClientRectList.h>
+#include <WebCore/DOMRect.h>
 #include <webkitdom/WebKitDOMClientRectList.h>
+#include <wtf/Vector.h>
 
 namespace WebKit {
-WebKitDOMClientRectList* wrapClientRectList(WebCore::ClientRectList*);
-WebKitDOMClientRectList* kit(WebCore::ClientRectList*);
-WebCore::ClientRectList* core(WebKitDOMClientRectList*);
+WebKitDOMClientRectList* wrapClientRectList(WTF::Vector<Ref<WebCore::DOMRect>>&&);
+WebKitDOMClientRectList* kit(WTF::Vector<Ref<WebCore::DOMRect>>&&);
 } // namespace WebKit
index da88d49..d7ecc0e 100644 (file)
 
 #pragma once
 
-#include <WebCore/ClientRect.h>
+#include <WebCore/DOMRect.h>
 #include <webkitdom/WebKitDOMClientRect.h>
 
 namespace WebKit {
-WebKitDOMClientRect* wrapClientRect(WebCore::ClientRect*);
-WebKitDOMClientRect* kit(WebCore::ClientRect*);
-WebCore::ClientRect* core(WebKitDOMClientRect*);
+WebKitDOMClientRect* wrapClientRect(WebCore::DOMRect*);
+WebKitDOMClientRect* kit(WebCore::DOMRect*);
+WebCore::DOMRect* core(WebKitDOMClientRect*);
 } // namespace WebKit
index 73a6ea1..59a15d3 100644 (file)
@@ -22,8 +22,6 @@
 
 #include <WebCore/CSSImportRule.h>
 #include "DOMObjectCache.h"
-#include <WebCore/ClientRect.h>
-#include <WebCore/ClientRectList.h>
 #include <WebCore/DOMRect.h>
 #include <WebCore/Document.h>
 #include <WebCore/ExceptionCode.h>
@@ -1226,27 +1224,12 @@ glong webkit_dom_element_get_scroll_height(WebKitDOMElement* self)
     return result;
 }
 
-static Ref<WebCore::ClientRect> toClientRect(WebCore::DOMRect& rect)
-{
-    return WebCore::ClientRect::create(WebCore::FloatRect(rect.x(), rect.y(), rect.width(), rect.height()));
-}
-
 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 = toClientRect(item->getBoundingClientRect());
-    return WebKit::kit(clientRect.ptr());
-}
-
-static Vector<Ref<WebCore::ClientRect>> toClientRectVector(Vector<Ref<WebCore::DOMRect>>&& rects)
-{
-    Vector<Ref<WebCore::ClientRect>> clientRects;
-    clientRects.reserveInitialCapacity(rects.size());
-    for (auto& rect : rects)
-        clientRects.uncheckedAppend(toClientRect(rect));
-    return clientRects;
+    return WebKit::kit(item->getBoundingClientRect().ptr());
 }
 
 WebKitDOMClientRectList* webkit_dom_element_get_client_rects(WebKitDOMElement* self)
@@ -1254,8 +1237,7 @@ WebKitDOMClientRectList* webkit_dom_element_get_client_rects(WebKitDOMElement* s
     WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(WEBKIT_DOM_IS_ELEMENT(self), nullptr);
     WebCore::Element* item = WebKit::core(self);
-    auto clientRects = WebCore::ClientRectList::create(toClientRectVector(item->getClientRects()));
-    return WebKit::kit(clientRects.ptr());
+    return WebKit::kit(item->getClientRects());
 }
 
 WebKitDOMElement* webkit_dom_element_get_offset_parent(WebKitDOMElement* self)