Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (216001 => 216002)
--- trunk/Source/WebCore/CMakeLists.txt 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-05-01 00:44:06 UTC (rev 216002)
@@ -406,8 +406,6 @@
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 @@
dom/ChildListMutationScope.cpp
dom/ChildNodeList.cpp
dom/ClassCollection.cpp
- dom/ClientRect.cpp
- dom/ClientRectList.cpp
dom/ClipboardEvent.cpp
dom/CollectionIndexCache.cpp
dom/Comment.cpp
Modified: trunk/Source/WebCore/ChangeLog (216001 => 216002)
--- trunk/Source/WebCore/ChangeLog 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/ChangeLog 2017-05-01 00:44:06 UTC (rev 216002)
@@ -1,3 +1,29 @@
+2017-04-30 Chris Dumez <[email protected]>
+
+ 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 <[email protected]>
Initialize a new layout state while bailing out of simple line layout only when needed.
Modified: trunk/Source/WebCore/DerivedSources.cpp (216001 => 216002)
--- trunk/Source/WebCore/DerivedSources.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/DerivedSources.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -107,8 +107,6 @@
#endif
#include "JSCDATASection.cpp"
#include "JSCharacterData.cpp"
-#include "JSClientRect.cpp"
-#include "JSClientRectList.cpp"
#include "JSCloseEvent.cpp"
#include "JSCommandLineAPIHost.cpp"
#include "JSComment.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (216001 => 216002)
--- trunk/Source/WebCore/DerivedSources.make 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/DerivedSources.make 2017-05-01 00:44:06 UTC (rev 216002)
@@ -342,8 +342,6 @@
$(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 \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (216001 => 216002)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-05-01 00:44:06 UTC (rev 216002)
@@ -5794,14 +5794,6 @@
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 */; };
@@ -14233,16 +14225,6 @@
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>"; };
@@ -21839,10 +21821,6 @@
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 */,
@@ -25439,12 +25417,6 @@
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 */,
@@ -26589,8 +26561,6 @@
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 */,
@@ -27644,8 +27614,6 @@
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 */,
@@ -30660,8 +30628,6 @@
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 */,
@@ -31608,8 +31574,6 @@
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 */,
Deleted: trunk/Source/WebCore/dom/ClientRect.cpp (216001 => 216002)
--- trunk/Source/WebCore/dom/ClientRect.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/ClientRect.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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
Deleted: trunk/Source/WebCore/dom/ClientRect.h (216001 => 216002)
--- trunk/Source/WebCore/dom/ClientRect.h 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/ClientRect.h 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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
Deleted: trunk/Source/WebCore/dom/ClientRect.idl (216001 => 216002)
--- trunk/Source/WebCore/dom/ClientRect.idl 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/ClientRect.idl 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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 };
-};
Deleted: trunk/Source/WebCore/dom/ClientRectList.cpp (216001 => 216002)
--- trunk/Source/WebCore/dom/ClientRectList.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/ClientRectList.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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
Deleted: trunk/Source/WebCore/dom/ClientRectList.h (216001 => 216002)
--- trunk/Source/WebCore/dom/ClientRectList.h 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/ClientRectList.h 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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
Deleted: trunk/Source/WebCore/dom/ClientRectList.idl (216001 => 216002)
--- trunk/Source/WebCore/dom/ClientRectList.idl 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/ClientRectList.idl 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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.
-};
-
Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (216001 => 216002)
--- trunk/Source/WebCore/dom/DOMAllInOne.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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"
Modified: trunk/Source/WebCore/dom/Element.cpp (216001 => 216002)
--- trunk/Source/WebCore/dom/Element.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/dom/Element.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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"
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (216001 => 216002)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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"
Modified: trunk/Source/WebCore/html/track/VTTRegion.cpp (216001 => 216002)
--- trunk/Source/WebCore/html/track/VTTRegion.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/html/track/VTTRegion.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -34,7 +34,6 @@
#if ENABLE(VIDEO_TRACK)
-#include "ClientRect.h"
#include "DOMRect.h"
#include "DOMTokenList.h"
#include "ElementChildIterator.h"
Modified: trunk/Source/WebCore/page/DragController.cpp (216001 => 216002)
--- trunk/Source/WebCore/page/DragController.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebCore/page/DragController.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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"
Modified: trunk/Source/WebInspectorUI/ChangeLog (216001 => 216002)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-05-01 00:44:06 UTC (rev 216002)
@@ -1,3 +1,14 @@
+2017-04-30 Chris Dumez <[email protected]>
+
+ 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 <[email protected]>
[GTK] Web Inspector: Add new GTK+ icons for different Script Timeline Views (Events and Call Trees)
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (216001 => 216002)
--- trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js 2017-05-01 00:44:06 UTC (rev 216002)
@@ -696,11 +696,6 @@
__proto__: null,
},
- ClientRectList: {
- item: "[index]",
- __proto__: null,
- },
-
CommandLineAPIHost: {
copyText: "text",
databaseId: "database",
Modified: trunk/Source/WebKit2/ChangeLog (216001 => 216002)
--- trunk/Source/WebKit2/ChangeLog 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebKit2/ChangeLog 2017-05-01 00:44:06 UTC (rev 216002)
@@ -1,3 +1,27 @@
+2017-04-30 Chris Dumez <[email protected]>
+
+ 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 <[email protected]>
More fixing after r215991
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp (216001 => 216002)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -35,12 +35,12 @@
#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 @@
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 @@
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);
}
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp (216001 => 216002)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -35,32 +35,44 @@
#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 @@
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 @@
{
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 @@
{
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();
}
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h (216001 => 216002)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectListPrivate.h 2017-05-01 00:44:06 UTC (rev 216002)
@@ -19,11 +19,11 @@
#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
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h (216001 => 216002)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectPrivate.h 2017-05-01 00:44:06 UTC (rev 216002)
@@ -19,11 +19,11 @@
#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
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp (216001 => 216002)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp 2017-05-01 00:15:38 UTC (rev 216001)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp 2017-05-01 00:44:06 UTC (rev 216002)
@@ -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,36 +1224,20 @@
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());
+ return WebKit::kit(item->getBoundingClientRect().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;
-}
-
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 = 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)