Diff
Modified: trunk/Source/WebKit/ChangeLog (264924 => 264925)
--- trunk/Source/WebKit/ChangeLog 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/ChangeLog 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,3 +1,34 @@
+2020-07-27 Kate Cheney <katherine_che...@apple.com>
+
+ Remove API::Object::Type::RenderLayer and API::Object::Type::RenderObject
+ https://bugs.webkit.org/show_bug.cgi?id=214772
+ <rdar://problem/52734803>
+
+ Reviewed by Simon Fraser.
+
+ These APIs are no longer used, so we should remove them.
+
+ * Shared/API/APIObject.h:
+ * Shared/API/c/WKBase.h:
+ * Shared/API/c/WKRenderLayer.cpp: Removed.
+ * Shared/API/c/WKRenderLayer.h: Removed.
+ * Shared/API/c/WKRenderObject.cpp: Removed.
+ * Shared/API/c/WKRenderObject.h: Removed.
+ * Shared/UserData.cpp:
+ (WebKit::UserData::encode):
+ (WebKit::UserData::decode):
+ * Shared/WebRenderLayer.cpp: Removed.
+ * Shared/WebRenderLayer.h: Removed.
+ * Shared/WebRenderObject.cpp: Removed.
+ * Shared/WebRenderObject.h: Removed.
+ * Sources.txt:
+ * UIProcess/API/C/WKAPICast.h:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+ (WKBundlePageCopyRenderTree): Deleted.
+ (WKBundlePageCopyRenderLayerTree): Deleted.
+ * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
+
2020-07-27 Youenn Fablet <you...@apple.com>
Check m_connection in NetworkRTCProvider::createResolver/stopResolver
Modified: trunk/Source/WebKit/Shared/API/APIObject.h (264924 => 264925)
--- trunk/Source/WebKit/Shared/API/APIObject.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/API/APIObject.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -321,8 +321,6 @@
API::Object::Type::PageHandle,
API::Object::Type::PageGroupHandle,
API::Object::Type::ProtectionSpace,
- API::Object::Type::RenderLayer,
- API::Object::Type::RenderObject,
API::Object::Type::ResourceLoadInfo,
API::Object::Type::SecurityOrigin,
API::Object::Type::SessionState,
Modified: trunk/Source/WebKit/Shared/API/c/WKBase.h (264924 => 264925)
--- trunk/Source/WebKit/Shared/API/c/WKBase.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/API/c/WKBase.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -64,8 +64,6 @@
typedef const struct OpaqueWKImage* WKImageRef;
typedef const struct OpaqueWKPointRef* WKPointRef;
typedef const struct OpaqueWKRectRef* WKRectRef;
-typedef const struct OpaqueWKRenderLayer* WKRenderLayerRef;
-typedef const struct OpaqueWKRenderObject* WKRenderObjectRef;
typedef const struct OpaqueWKSecurityOrigin* WKSecurityOriginRef;
typedef const struct OpaqueWKSerializedScriptValue* WKSerializedScriptValueRef;
typedef const struct OpaqueWKSizeRef* WKSizeRef;
Deleted: trunk/Source/WebKit/Shared/API/c/WKRenderLayer.cpp (264924 => 264925)
--- trunk/Source/WebKit/Shared/API/c/WKRenderLayer.cpp 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/API/c/WKRenderLayer.cpp 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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 "WKRenderLayer.h"
-
-#include "APIArray.h"
-#include "WKAPICast.h"
-#include "WebRenderLayer.h"
-
-WKTypeID WKRenderLayerGetTypeID()
-{
- return WebKit::toAPI(WebKit::WebRenderLayer::APIType);
-}
-
-WKRenderObjectRef WKRenderLayerGetRenderer(WKRenderLayerRef renderLayerRef)
-{
- return toAPI(WebKit::toImpl(renderLayerRef)->renderer());
-}
-
-WKStringRef WKRenderLayerCopyRendererName(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toCopiedAPI(WebKit::toImpl(renderLayerRef)->renderer()->name());
-}
-
-WKStringRef WKRenderLayerCopyElementTagName(WKRenderLayerRef renderLayerRef)
-{
- WebKit::WebRenderLayer* renderLayer = WebKit::toImpl(renderLayerRef);
- if (!renderLayer->renderer()->elementTagName().isNull())
- return WebKit::toCopiedAPI(renderLayer->renderer()->elementTagName());
-
- return nullptr;
-}
-
-WKStringRef WKRenderLayerCopyElementID(WKRenderLayerRef renderLayerRef)
-{
- WebKit::WebRenderLayer* renderLayer = WebKit::toImpl(renderLayerRef);
- if (!renderLayer->renderer()->elementID().isNull())
- return WebKit::toCopiedAPI(renderLayer->renderer()->elementID());
-
- return nullptr;
-}
-
-WKArrayRef WKRenderLayerGetElementClassNames(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->renderer()->elementClassNames());
-}
-
-WKRect WKRenderLayerGetAbsoluteBounds(WKRenderLayerRef renderLayerRef)
-{
- WebCore::IntRect bounds = WebKit::toImpl(renderLayerRef)->absoluteBoundingBox();
- return WKRectMake(bounds.x(), bounds.y(), bounds.width(), bounds.height());
-}
-
-bool WKRenderLayerIsClipping(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toImpl(renderLayerRef)->isClipping();
-}
-
-bool WKRenderLayerIsClipped(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toImpl(renderLayerRef)->isClipped();
-}
-
-bool WKRenderLayerIsReflection(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toImpl(renderLayerRef)->isReflection();
-}
-
-WKCompositingLayerType WKRenderLayerGetCompositingLayerType(WKRenderLayerRef renderLayerRef)
-{
- switch (WebKit::toImpl(renderLayerRef)->compositingLayerType()) {
- case WebKit::WebRenderLayer::None:
- return kWKCompositingLayerTypeNone;
- case WebKit::WebRenderLayer::Normal:
- return kWKCompositingLayerTypeNormal;
- case WebKit::WebRenderLayer::Tiled:
- return kWKCompositingLayerTypeTiled;
- case WebKit::WebRenderLayer::Media:
- return kWKCompositingLayerTypeMedia;
- case WebKit::WebRenderLayer::Container:
- return kWKCompositingLayerTypeContainer;
- }
-
- ASSERT_NOT_REACHED();
- return kWKCompositingLayerTypeNone;
-}
-
-WK_EXPORT double WKRenderLayerGetBackingStoreMemoryEstimate(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toImpl(renderLayerRef)->backingStoreMemoryEstimate();
-}
-
-WKArrayRef WKRenderLayerGetNegativeZOrderList(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->negativeZOrderList());
-}
-
-WKArrayRef WKRenderLayerGetNormalFlowList(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->normalFlowList());
-}
-
-WKArrayRef WKRenderLayerGetPositiveZOrderList(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->positiveZOrderList());
-}
-
-WKRenderLayerRef WKRenderLayerGetFrameContentsLayer(WKRenderLayerRef renderLayerRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderLayerRef)->frameContentsLayer());
-}
Deleted: trunk/Source/WebKit/Shared/API/c/WKRenderLayer.h (264924 => 264925)
--- trunk/Source/WebKit/Shared/API/c/WKRenderLayer.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/API/c/WKRenderLayer.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#ifndef WKRenderLayer_h
-#define WKRenderLayer_h
-
-
-#include <WebKit/WKBase.h>
-#include <WebKit/WKGeometry.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKTypeID WKRenderLayerGetTypeID(void);
-
-WK_EXPORT WKRenderObjectRef WKRenderLayerGetRenderer(WKRenderLayerRef renderLayer);
-
-// FIXME: Remove this function once Safari does not require it. Clients can access this data via the renderer.
-WK_EXPORT WKStringRef WKRenderLayerCopyRendererName(WKRenderLayerRef renderLayer);
-
-// FIXME: Remove these three functions once Safari does not require them.
-WK_EXPORT WKStringRef WKRenderLayerCopyElementTagName(WKRenderLayerRef renderLayer);
-WK_EXPORT WKStringRef WKRenderLayerCopyElementID(WKRenderLayerRef renderLayer);
-WK_EXPORT WKArrayRef WKRenderLayerGetElementClassNames(WKRenderLayerRef renderLayer);
-
-WK_EXPORT WKRect WKRenderLayerGetAbsoluteBounds(WKRenderLayerRef renderLayer);
-
-WK_EXPORT bool WKRenderLayerIsClipping(WKRenderLayerRef renderLayer);
-WK_EXPORT bool WKRenderLayerIsClipped(WKRenderLayerRef renderLayer);
-WK_EXPORT bool WKRenderLayerIsReflection(WKRenderLayerRef renderLayer);
-
-enum WKCompositingLayerType {
- kWKCompositingLayerTypeNone,
- kWKCompositingLayerTypeNormal,
- kWKCompositingLayerTypeTiled,
- kWKCompositingLayerTypeMedia,
- kWKCompositingLayerTypeContainer
-};
-typedef enum WKCompositingLayerType WKCompositingLayerType;
-
-WK_EXPORT WKCompositingLayerType WKRenderLayerGetCompositingLayerType(WKRenderLayerRef renderLayer);
-WK_EXPORT double WKRenderLayerGetBackingStoreMemoryEstimate(WKRenderLayerRef renderLayer);
-
-WK_EXPORT WKArrayRef WKRenderLayerGetNegativeZOrderList(WKRenderLayerRef renderLayer);
-WK_EXPORT WKArrayRef WKRenderLayerGetNormalFlowList(WKRenderLayerRef renderLayer);
-WK_EXPORT WKArrayRef WKRenderLayerGetPositiveZOrderList(WKRenderLayerRef renderLayer);
-
-WK_EXPORT WKRenderLayerRef WKRenderLayerGetFrameContentsLayer(WKRenderLayerRef renderLayer);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // WKRenderLayer_h
Deleted: trunk/Source/WebKit/Shared/API/c/WKRenderObject.cpp (264924 => 264925)
--- trunk/Source/WebKit/Shared/API/c/WKRenderObject.cpp 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/API/c/WKRenderObject.cpp 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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 "WKRenderObject.h"
-
-#include "APIArray.h"
-#include "WKAPICast.h"
-#include "WebRenderObject.h"
-
-WKTypeID WKRenderObjectGetTypeID()
-{
- return WebKit::toAPI(WebKit::WebRenderObject::APIType);
-}
-
-WKStringRef WKRenderObjectCopyName(WKRenderObjectRef renderObjectRef)
-{
- return WebKit::toCopiedAPI(WebKit::toImpl(renderObjectRef)->name());
-}
-
-WKStringRef WKRenderObjectCopyTextSnippet(WKRenderObjectRef renderObjectRef)
-{
- WebKit::WebRenderObject* renderObject = WebKit::toImpl(renderObjectRef);
- if (!renderObject->textSnippet().isNull())
- return WebKit::toCopiedAPI(renderObject->textSnippet());
-
- return nullptr;
-}
-
-unsigned WKRenderObjectGetTextLength(WKRenderObjectRef renderObjectRef)
-{
- return WebKit::toImpl(renderObjectRef)->textLength();
-}
-
-WKStringRef WKRenderObjectCopyElementTagName(WKRenderObjectRef renderObjectRef)
-{
- WebKit::WebRenderObject* renderObject = WebKit::toImpl(renderObjectRef);
- if (!renderObject->elementTagName().isNull())
- return WebKit::toCopiedAPI(renderObject->elementTagName());
-
- return nullptr;
-}
-
-WKStringRef WKRenderObjectCopyElementID(WKRenderObjectRef renderObjectRef)
-{
- WebKit::WebRenderObject* renderObject = WebKit::toImpl(renderObjectRef);
- if (!renderObject->elementID().isNull())
- return WebKit::toCopiedAPI(renderObject->elementID());
-
- return nullptr;
-}
-
-WKArrayRef WKRenderObjectGetElementClassNames(WKRenderObjectRef renderObjectRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderObjectRef)->elementClassNames());
-}
-
-WKPoint WKRenderObjectGetAbsolutePosition(WKRenderObjectRef renderObjectRef)
-{
- WebCore::IntPoint absolutePosition = WebKit::toImpl(renderObjectRef)->absolutePosition();
- return WKPointMake(absolutePosition.x(), absolutePosition.y());
-}
-
-WKRect WKRenderObjectGetFrameRect(WKRenderObjectRef renderObjectRef)
-{
- WebCore::IntRect frameRect = WebKit::toImpl(renderObjectRef)->frameRect();
- return WKRectMake(frameRect.x(), frameRect.y(), frameRect.width(), frameRect.height());
-}
-
-WKArrayRef WKRenderObjectGetChildren(WKRenderObjectRef renderObjectRef)
-{
- return WebKit::toAPI(WebKit::toImpl(renderObjectRef)->children());
-}
Deleted: trunk/Source/WebKit/Shared/API/c/WKRenderObject.h (264924 => 264925)
--- trunk/Source/WebKit/Shared/API/c/WKRenderObject.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/API/c/WKRenderObject.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#ifndef WKRenderObject_h
-#define WKRenderObject_h
-
-#include <WebKit/WKBase.h>
-#include <WebKit/WKGeometry.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WK_EXPORT WKTypeID WKRenderObjectGetTypeID(void);
-
-WK_EXPORT WKStringRef WKRenderObjectCopyName(WKRenderObjectRef renderObject);
-WK_EXPORT WKStringRef WKRenderObjectCopyTextSnippet(WKRenderObjectRef renderObject);
-WK_EXPORT unsigned WKRenderObjectGetTextLength(WKRenderObjectRef renderObject);
-WK_EXPORT WKStringRef WKRenderObjectCopyElementTagName(WKRenderObjectRef renderObject);
-WK_EXPORT WKStringRef WKRenderObjectCopyElementID(WKRenderObjectRef renderObject);
-WK_EXPORT WKArrayRef WKRenderObjectGetElementClassNames(WKRenderObjectRef renderObject);
-
-WK_EXPORT WKPoint WKRenderObjectGetAbsolutePosition(WKRenderObjectRef renderObject);
-WK_EXPORT WKRect WKRenderObjectGetFrameRect(WKRenderObjectRef renderObject);
-WK_EXPORT WKArrayRef WKRenderObjectGetChildren(WKRenderObjectRef renderObject);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // WKRenderObject_h
Modified: trunk/Source/WebKit/Shared/UserData.cpp (264924 => 264925)
--- trunk/Source/WebKit/Shared/UserData.cpp 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/UserData.cpp 2020-07-27 16:00:23 UTC (rev 264925)
@@ -47,8 +47,6 @@
#include "WebCertificateInfo.h"
#include "WebCoreArgumentCoders.h"
#include "WebImage.h"
-#include "WebRenderLayer.h"
-#include "WebRenderObject.h"
#include <wtf/CheckedArithmetic.h>
#if PLATFORM(COCOA)
@@ -248,38 +246,6 @@
static_cast<const API::Rect&>(object).encode(encoder);
break;
- case API::Object::Type::RenderLayer: {
- auto& renderLayer = static_cast<const WebRenderLayer&>(object);
-
- encode(encoder, renderLayer.renderer());
- encoder << renderLayer.isReflection();
- encoder << renderLayer.isClipping();
- encoder << renderLayer.isClipped();
- encoder << static_cast<uint32_t>(renderLayer.compositingLayerType());
- encoder << renderLayer.absoluteBoundingBox();
- encoder << renderLayer.backingStoreMemoryEstimate();
- encode(encoder, renderLayer.negativeZOrderList());
- encode(encoder, renderLayer.normalFlowList());
- encode(encoder, renderLayer.positiveZOrderList());
- encode(encoder, renderLayer.frameContentsLayer());
- break;
- }
-
- case API::Object::Type::RenderObject: {
- auto& renderObject = static_cast<const WebRenderObject&>(object);
-
- encoder << renderObject.name();
- encoder << renderObject.elementTagName();
- encoder << renderObject.elementID();
- encode(encoder, renderObject.elementClassNames());
- encoder << renderObject.absolutePosition();
- encoder << renderObject.frameRect();
- encoder << renderObject.textSnippet();
- encoder << renderObject.textLength();
- encode(encoder, renderObject.children());
- break;
- }
-
case API::Object::Type::SerializedScriptValue: {
auto& serializedScriptValue = static_cast<const API::SerializedScriptValue&>(object);
encoder << serializedScriptValue.dataReference();
@@ -469,83 +435,6 @@
return false;
break;
- case API::Object::Type::RenderLayer: {
- RefPtr<API::Object> renderer;
- bool isReflection;
- bool isClipping;
- bool isClipped;
- uint32_t compositingLayerTypeAsUInt32;
- WebCore::IntRect absoluteBoundingBox;
- double backingStoreMemoryEstimate;
- RefPtr<API::Object> negativeZOrderList;
- RefPtr<API::Object> normalFlowList;
- RefPtr<API::Object> positiveZOrderList;
- RefPtr<API::Object> frameContentsLayer;
-
- if (!decode(decoder, renderer))
- return false;
- if (renderer->type() != API::Object::Type::RenderObject)
- return false;
- if (!decoder.decode(isReflection))
- return false;
- if (!decoder.decode(isClipping))
- return false;
- if (!decoder.decode(isClipped))
- return false;
- if (!decoder.decode(compositingLayerTypeAsUInt32))
- return false;
- if (!decoder.decode(absoluteBoundingBox))
- return false;
- if (!decoder.decode(backingStoreMemoryEstimate))
- return false;
- if (!decode(decoder, negativeZOrderList))
- return false;
- if (!decode(decoder, normalFlowList))
- return false;
- if (!decode(decoder, positiveZOrderList))
- return false;
- if (!decode(decoder, frameContentsLayer))
- return false;
-
- result = WebRenderLayer::create(static_pointer_cast<WebRenderObject>(renderer), isReflection, isClipping, isClipped, static_cast<WebRenderLayer::CompositingLayerType>(compositingLayerTypeAsUInt32), absoluteBoundingBox, backingStoreMemoryEstimate, static_pointer_cast<API::Array>(negativeZOrderList), static_pointer_cast<API::Array>(normalFlowList), static_pointer_cast<API::Array>(positiveZOrderList), static_pointer_cast<WebRenderLayer>(frameContentsLayer));
- break;
- }
-
- case API::Object::Type::RenderObject: {
- String name;
- String textSnippet;
- String elementTagName;
- String elementID;
- unsigned textLength;
- RefPtr<API::Object> elementClassNames;
- WebCore::IntPoint absolutePosition;
- WebCore::IntRect frameRect;
- RefPtr<API::Object> children;
-
- if (!decoder.decode(name))
- return false;
- if (!decoder.decode(elementTagName))
- return false;
- if (!decoder.decode(elementID))
- return false;
- if (!decode(decoder, elementClassNames))
- return false;
- if (!decoder.decode(absolutePosition))
- return false;
- if (!decoder.decode(frameRect))
- return false;
- if (!decoder.decode(textSnippet))
- return false;
- if (!decoder.decode(textLength))
- return false;
- if (!decode(decoder, children))
- return false;
- if (children && children->type() != API::Object::Type::Array)
- return false;
- result = WebRenderObject::create(name, elementTagName, elementID, static_pointer_cast<API::Array>(elementClassNames), absolutePosition, frameRect, textSnippet, textLength, static_pointer_cast<API::Array>(children));
- break;
- }
-
case API::Object::Type::SerializedScriptValue: {
IPC::DataReference dataReference;
if (!decoder.decode(dataReference))
Deleted: trunk/Source/WebKit/Shared/WebRenderLayer.cpp (264924 => 264925)
--- trunk/Source/WebKit/Shared/WebRenderLayer.cpp 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/WebRenderLayer.cpp 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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 "WebRenderLayer.h"
-
-#include "APIArray.h"
-#include "APIString.h"
-#include "WebPage.h"
-#include <WebCore/Frame.h>
-#include <WebCore/FrameLoader.h>
-#include <WebCore/FrameLoaderClient.h>
-#include <WebCore/RenderLayer.h>
-#include <WebCore/RenderLayerBacking.h>
-#include <WebCore/RenderView.h>
-#include <WebCore/RenderWidget.h>
-#include <WebCore/StyledElement.h>
-
-namespace WebKit {
-
-RefPtr<WebRenderLayer> WebRenderLayer::create(WebPage* page)
-{
- WebCore::Frame* mainFrame = page->mainFrame();
- if (!mainFrame)
- return nullptr;
-
- if (!mainFrame->loader().client().hasHTMLView())
- return nullptr;
-
- WebCore::RenderView* contentRenderer = mainFrame->contentRenderer();
- if (!contentRenderer)
- return nullptr;
-
- WebCore::RenderLayer* rootLayer = contentRenderer->layer();
- if (!rootLayer)
- return nullptr;
-
- return adoptRef(new WebRenderLayer(rootLayer));
-}
-
-Ref<WebRenderLayer> WebRenderLayer::create(RefPtr<WebRenderObject>&& renderer, bool isReflection, bool isClipping, bool isClipped, CompositingLayerType type, WebCore::IntRect absoluteBoundingBox, double backingStoreMemoryEstimate, RefPtr<API::Array>&& negativeZOrderList, RefPtr<API::Array>&& normalFlowList, RefPtr<API::Array>&& positiveZOrderList, RefPtr<WebRenderLayer>&& frameContentsLayer)
-{
- return adoptRef(*new WebRenderLayer(WTFMove(renderer), isReflection, isClipping, isClipped, type, absoluteBoundingBox, backingStoreMemoryEstimate, WTFMove(negativeZOrderList), WTFMove(normalFlowList), WTFMove(positiveZOrderList), WTFMove(frameContentsLayer)));
-}
-
-WebRenderLayer::WebRenderLayer(WebCore::RenderLayer* layer)
-{
- m_renderer = WebRenderObject::create(&layer->renderer());
- m_isReflection = layer->isReflection();
-
- if (layer->isComposited()) {
- WebCore::RenderLayerBacking* backing = layer->backing();
- m_isClipping = backing->hasClippingLayer();
- m_isClipped = backing->hasAncestorClippingLayers();
- switch (backing->compositingLayerType()) {
- case WebCore::NormalCompositingLayer:
- m_compositingLayerType = Normal;
- break;
- case WebCore::TiledCompositingLayer:
- m_compositingLayerType = Tiled;
- break;
- case WebCore::MediaCompositingLayer:
- m_compositingLayerType = Media;
- break;
- case WebCore::ContainerCompositingLayer:
- m_compositingLayerType = Container;
- break;
- }
-
- m_backingStoreMemoryEstimate = backing->backingStoreMemoryEstimate();
- } else {
- m_isClipping = false;
- m_isClipped = false;
- m_compositingLayerType = None;
- m_backingStoreMemoryEstimate = 0;
- }
-
- m_absoluteBoundingBox = layer->absoluteBoundingBox();
-
- auto createArrayFromLayerList = [] (WebCore::RenderLayer::LayerList list) -> RefPtr<API::Array> {
- if (!list.size())
- return nullptr;
-
- Vector<RefPtr<API::Object>> layers;
- layers.reserveInitialCapacity(list.size());
-
- for (auto* layer : list)
- layers.uncheckedAppend(adoptRef(new WebRenderLayer(layer)));
-
- return API::Array::create(WTFMove(layers));
- };
-
- m_negativeZOrderList = createArrayFromLayerList(layer->negativeZOrderLayers());
- m_normalFlowList = createArrayFromLayerList(layer->normalFlowLayers());
- m_positiveZOrderList = createArrayFromLayerList(layer->positiveZOrderLayers());
-
- if (is<WebCore::RenderWidget>(layer->renderer())) {
- if (WebCore::Document* contentDocument = downcast<WebCore::RenderWidget>(layer->renderer()).frameOwnerElement().contentDocument()) {
- if (WebCore::RenderView* view = contentDocument->renderView())
- m_frameContentsLayer = adoptRef(new WebRenderLayer(view->layer()));
- }
- }
-}
-
-WebRenderLayer::WebRenderLayer(RefPtr<WebRenderObject>&& renderer, bool isReflection, bool isClipping, bool isClipped, CompositingLayerType type, WebCore::IntRect absoluteBoundingBox, double backingStoreMemoryEstimate, RefPtr<API::Array>&& negativeZOrderList, RefPtr<API::Array>&& normalFlowList, RefPtr<API::Array>&& positiveZOrderList, RefPtr<WebRenderLayer>&& frameContentsLayer)
- : m_renderer(WTFMove(renderer))
- , m_isReflection(isReflection)
- , m_isClipping(isClipping)
- , m_isClipped(isClipped)
- , m_compositingLayerType(type)
- , m_absoluteBoundingBox(absoluteBoundingBox)
- , m_backingStoreMemoryEstimate(backingStoreMemoryEstimate)
- , m_negativeZOrderList(WTFMove(negativeZOrderList))
- , m_normalFlowList(WTFMove(normalFlowList))
- , m_positiveZOrderList(WTFMove(positiveZOrderList))
- , m_frameContentsLayer(WTFMove(frameContentsLayer))
-{
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit/Shared/WebRenderLayer.h (264924 => 264925)
--- trunk/Source/WebKit/Shared/WebRenderLayer.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/WebRenderLayer.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#ifndef WebRenderLayer_h
-#define WebRenderLayer_h
-
-#include "WebRenderObject.h"
-
-namespace WebCore {
-class RenderLayer;
-}
-
-namespace WebKit {
-
-class WebPage;
-
-class WebRenderLayer : public API::ObjectImpl<API::Object::Type::RenderLayer> {
-public:
- enum CompositingLayerType { None, Normal, Tiled, Media, Container };
-
- static RefPtr<WebRenderLayer> create(WebPage*);
- static Ref<WebRenderLayer> create(RefPtr<WebRenderObject>&& renderer, bool isReflection, bool isClipping, bool isClipped, CompositingLayerType, WebCore::IntRect absoluteBoundingBox, double backingStoreMemoryEstimate, RefPtr<API::Array>&& negativeZOrderList, RefPtr<API::Array>&& normalFlowList, RefPtr<API::Array>&& positiveZOrderList, RefPtr<WebRenderLayer>&& frameContentsLayer);
-
- API::Array* negativeZOrderList() const { return m_negativeZOrderList.get(); }
- API::Array* normalFlowList() const { return m_normalFlowList.get(); }
- API::Array* positiveZOrderList() const { return m_positiveZOrderList.get(); }
- WebRenderLayer* frameContentsLayer() const { return m_frameContentsLayer.get(); }
-
- WebRenderObject* renderer() const { return m_renderer.get(); }
- bool isReflection() const { return m_isReflection; }
- bool isClipping() const { return m_isClipping; }
- bool isClipped() const { return m_isClipped; }
- CompositingLayerType compositingLayerType() const { return m_compositingLayerType; }
- WebCore::IntRect absoluteBoundingBox() const { return m_absoluteBoundingBox; }
- double backingStoreMemoryEstimate() const { return m_backingStoreMemoryEstimate; }
-
-private:
- explicit WebRenderLayer(WebCore::RenderLayer*);
- WebRenderLayer(RefPtr<WebRenderObject>&& renderer, bool isReflection, bool isClipping, bool isClipped, CompositingLayerType, WebCore::IntRect absoluteBoundingBox, double backingStoreMemoryEstimate, RefPtr<API::Array>&& negativeZOrderList, RefPtr<API::Array>&& normalFlowList, RefPtr<API::Array>&& positiveZOrderList, RefPtr<WebRenderLayer>&& frameContentsLayer);
-
- RefPtr<WebRenderObject> m_renderer;
- bool m_isReflection;
- bool m_isClipping;
- bool m_isClipped;
- CompositingLayerType m_compositingLayerType;
- WebCore::IntRect m_absoluteBoundingBox;
- double m_backingStoreMemoryEstimate;
-
- RefPtr<API::Array> m_negativeZOrderList;
- RefPtr<API::Array> m_normalFlowList;
- RefPtr<API::Array> m_positiveZOrderList;
-
- RefPtr<WebRenderLayer> m_frameContentsLayer;
-};
-
-} // namespace WebKit
-
-#endif // WebRenderLayer_h
Deleted: trunk/Source/WebKit/Shared/WebRenderObject.cpp (264924 => 264925)
--- trunk/Source/WebKit/Shared/WebRenderObject.cpp 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/WebRenderObject.cpp 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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 "WebRenderObject.h"
-
-#include "APIArray.h"
-#include "APIString.h"
-#include "WebPage.h"
-#include <WebCore/Frame.h>
-#include <WebCore/FrameLoader.h>
-#include <WebCore/FrameLoaderClient.h>
-#include <WebCore/RenderInline.h>
-#include <WebCore/RenderText.h>
-#include <WebCore/RenderView.h>
-#include <WebCore/RenderWidget.h>
-
-namespace WebKit {
-using namespace WebCore;
-
-RefPtr<WebRenderObject> WebRenderObject::create(WebPage* page)
-{
- Frame* mainFrame = page->mainFrame();
- if (!mainFrame)
- return nullptr;
-
- if (!mainFrame->loader().client().hasHTMLView())
- return nullptr;
-
- RenderView* contentRenderer = mainFrame->contentRenderer();
- if (!contentRenderer)
- return nullptr;
-
- return adoptRef(new WebRenderObject(contentRenderer, true));
-}
-
-Ref<WebRenderObject> WebRenderObject::create(const String& name, const String& elementTagName, const String& elementID, RefPtr<API::Array>&& elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, const String& textSnippet, unsigned textLength, RefPtr<API::Array>&& children)
-{
- return adoptRef(*new WebRenderObject(name, elementTagName, elementID, WTFMove(elementClassNames), absolutePosition, frameRect, textSnippet, textLength, WTFMove(children)));
-}
-
-WebRenderObject::WebRenderObject(RenderObject* renderer, bool shouldIncludeDescendants)
-{
- m_name = renderer->renderName();
- m_textLength = 0;
-
- if (Node* node = renderer->node()) {
- if (is<Element>(*node)) {
- Element& element = downcast<Element>(*node);
- m_elementTagName = element.tagName();
- m_elementID = element.getIdAttribute();
-
- if (element.isStyledElement() && element.hasClass()) {
- Vector<RefPtr<API::Object>> classNames;
- classNames.reserveInitialCapacity(element.classNames().size());
-
- for (size_t i = 0, size = element.classNames().size(); i < size; ++i)
- classNames.append(API::String::create(element.classNames()[i]));
-
- m_elementClassNames = API::Array::create(WTFMove(classNames));
- }
- }
-
- if (node->isTextNode()) {
- String value = node->nodeValue();
- m_textLength = value.length();
-
- const int maxSnippetLength = 40;
- if (value.length() > maxSnippetLength)
- m_textSnippet = value.substring(0, maxSnippetLength);
- else
- m_textSnippet = value;
- }
- }
-
- // FIXME: broken with transforms
- m_absolutePosition = flooredIntPoint(renderer->localToAbsolute());
-
- if (is<RenderBox>(*renderer))
- m_frameRect = snappedIntRect(downcast<RenderBox>(*renderer).frameRect());
- else if (is<RenderText>(*renderer)) {
- m_frameRect = downcast<RenderText>(*renderer).linesBoundingBox();
- m_frameRect.setLocation(downcast<RenderText>(*renderer).firstRunLocation());
- } else if (is<RenderInline>(*renderer))
- m_frameRect = IntRect(downcast<RenderInline>(*renderer).borderBoundingBox());
-
- if (!shouldIncludeDescendants)
- return;
-
- Vector<RefPtr<API::Object>> children;
-
- for (auto* coreChild = renderer->firstChildSlow(); coreChild; coreChild = coreChild->nextSibling())
- children.append(adoptRef(*new WebRenderObject(coreChild, shouldIncludeDescendants)));
-
- if (is<RenderWidget>(*renderer)) {
- auto* widget = downcast<RenderWidget>(*renderer).widget();
- if (is<FrameView>(widget)) {
- if (auto* coreContentRenderer = downcast<FrameView>(*widget).frame().contentRenderer())
- children.append(adoptRef(*new WebRenderObject(coreContentRenderer, shouldIncludeDescendants)));
- }
- }
-
- m_children = API::Array::create(WTFMove(children));
-}
-
-WebRenderObject::WebRenderObject(const String& name, const String& elementTagName, const String& elementID, RefPtr<API::Array>&& elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, const String& textSnippet, unsigned textLength, RefPtr<API::Array>&& children)
- : m_children(WTFMove(children))
- , m_name(name)
- , m_elementTagName(elementTagName)
- , m_elementID(elementID)
- , m_textSnippet(textSnippet)
- , m_elementClassNames(WTFMove(elementClassNames))
- , m_absolutePosition(absolutePosition)
- , m_frameRect(frameRect)
- , m_textLength(textLength)
-{
-}
-
-WebRenderObject::~WebRenderObject()
-{
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit/Shared/WebRenderObject.h (264924 => 264925)
--- trunk/Source/WebKit/Shared/WebRenderObject.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Shared/WebRenderObject.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#ifndef WebRenderObject_h
-#define WebRenderObject_h
-
-#include "APIObject.h"
-#include <WebCore/IntRect.h>
-#include <wtf/Ref.h>
-#include <wtf/text/WTFString.h>
-
-namespace API {
-class Array;
-}
-
-namespace WebCore {
- class RenderObject;
-}
-
-namespace WebKit {
-
-class WebPage;
-
-class WebRenderObject : public API::ObjectImpl<API::Object::Type::RenderObject> {
-public:
- static RefPtr<WebRenderObject> create(WebPage*);
- static Ref<WebRenderObject> create(WebCore::RenderObject* renderer)
- {
- return adoptRef(*new WebRenderObject(renderer, false));
- }
-
- static Ref<WebRenderObject> create(const String& name, const String& elementTagName, const String& elementID, RefPtr<API::Array>&& elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, const String& textSnippet, unsigned textLength, RefPtr<API::Array>&& children);
-
- virtual ~WebRenderObject();
-
- API::Array* children() const { return m_children.get(); }
-
- const String& name() const { return m_name; }
-
- // Only non-empty for RenderText objects.
- const String& textSnippet() const { return m_textSnippet; }
- unsigned textLength() const { return m_textLength; }
-
- const String& elementTagName() const { return m_elementTagName; }
- const String& elementID() const { return m_elementID; }
- API::Array* elementClassNames() const { return m_elementClassNames.get(); }
- WebCore::IntPoint absolutePosition() const { return m_absolutePosition; }
- WebCore::IntRect frameRect() const { return m_frameRect; }
-
-private:
- WebRenderObject(WebCore::RenderObject*, bool shouldIncludeDescendants);
- WebRenderObject(const String& name, const String& elementTagName, const String& elementID, RefPtr<API::Array>&& elementClassNames, WebCore::IntPoint absolutePosition, WebCore::IntRect frameRect, const String& textSnippet, unsigned textLength, RefPtr<API::Array>&& children);
-
- RefPtr<API::Array> m_children;
-
- String m_name;
- String m_elementTagName;
- String m_elementID;
- String m_textSnippet;
- RefPtr<API::Array> m_elementClassNames;
- WebCore::IntPoint m_absolutePosition;
- WebCore::IntRect m_frameRect;
- unsigned m_textLength;
-};
-
-} // namespace WebKit
-
-#endif // WebRenderObject_h
Modified: trunk/Source/WebKit/Sources.txt (264924 => 264925)
--- trunk/Source/WebKit/Sources.txt 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/Sources.txt 2020-07-27 16:00:23 UTC (rev 264925)
@@ -206,8 +206,6 @@
Shared/WebPreferencesDefaultValues.cpp
Shared/WebPreferencesStore.cpp
Shared/WebProcessCreationParameters.cpp
-Shared/WebRenderLayer.cpp
-Shared/WebRenderObject.cpp
Shared/WebTouchEvent.cpp @no-unify
Shared/WebUserContentControllerDataTypes.cpp
Shared/WebWheelEvent.cpp @no-unify
@@ -240,8 +238,6 @@
Shared/API/c/WKMutableDictionary.cpp
Shared/API/c/WKNumber.cpp
Shared/API/c/WKPluginInformation.cpp
-Shared/API/c/WKRenderLayer.cpp
-Shared/API/c/WKRenderObject.cpp
Shared/API/c/WKSecurityOriginRef.cpp
Shared/API/c/WKSerializedScriptValue.cpp
Shared/API/c/WKString.cpp
Modified: trunk/Source/WebKit/UIProcess/API/C/WKAPICast.h (264924 => 264925)
--- trunk/Source/WebKit/UIProcess/API/C/WKAPICast.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/UIProcess/API/C/WKAPICast.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -105,8 +105,6 @@
class WebPreferences;
class WebProcessPool;
class WebProtectionSpace;
-class WebRenderLayer;
-class WebRenderObject;
class WebResourceLoadStatisticsManager;
class WebTextChecker;
class WebUserContentControllerProxy;
@@ -156,8 +154,6 @@
WK_ADD_API_MAPPING(WKPageRef, WebPageProxy)
WK_ADD_API_MAPPING(WKPreferencesRef, WebPreferences)
WK_ADD_API_MAPPING(WKProtectionSpaceRef, WebProtectionSpace)
-WK_ADD_API_MAPPING(WKRenderLayerRef, WebRenderLayer)
-WK_ADD_API_MAPPING(WKRenderObjectRef, WebRenderObject)
WK_ADD_API_MAPPING(WKResourceLoadStatisticsManagerRef, WebResourceLoadStatisticsManager)
WK_ADD_API_MAPPING(WKSessionStateRef, API::SessionState)
WK_ADD_API_MAPPING(WKTextCheckerRef, WebTextChecker)
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (264924 => 264925)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-07-27 16:00:23 UTC (rev 264925)
@@ -838,8 +838,6 @@
3749421D1DF1FAB90033C19F /* WKWebProcessPlugInRangeHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3749421C1DF1FAB90033C19F /* WKWebProcessPlugInRangeHandleInternal.h */; };
3754D5451B3A29FD003A4C7F /* NSInvocationSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 3754D5441B3A29FD003A4C7F /* NSInvocationSPI.h */; };
375E0E141D66432700EFEC2C /* WKNSNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 375E0E121D66432700EFEC2C /* WKNSNumber.h */; };
- 3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 3760881D150413E900FC82C7 /* WebRenderObject.h */; };
- 37608823150414F700FC82C7 /* WKRenderObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 37608821150414F700FC82C7 /* WKRenderObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
376311FD1A3FB5F7005A2E51 /* _WKSameDocumentNavigationType.h in Headers */ = {isa = PBXBuildFile; fileRef = 376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */; settings = {ATTRIBUTES = (Private, ); }; };
376311FE1A3FB600005A2E51 /* _WKSameDocumentNavigationTypeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */; };
3766F9EE189A1241003CF19B /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C7DE100E846E0078DEBC /* _javascript_Core.framework */; };
@@ -858,8 +856,6 @@
378E1A40181EDA010031007A /* WKObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 378E1A3F181EDA010031007A /* WKObject.h */; };
378E1A4A18208CD60031007A /* WKNSString.h in Headers */ = {isa = PBXBuildFile; fileRef = 378E1A4818208CD60031007A /* WKNSString.h */; };
378E1A4E18208D700031007A /* WKNSURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 378E1A4C18208D700031007A /* WKNSURL.h */; };
- 37948404150C350600E52CE9 /* WebRenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 37948402150C350600E52CE9 /* WebRenderLayer.h */; };
- 37948409150C4B9700E52CE9 /* WKRenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 37948407150C4B9600E52CE9 /* WKRenderLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
3795789C18AD4F1900B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3795789B18AD4F1100B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
379A873618BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 379A873518BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h */; };
379A873A18BBFE0F00588AF2 /* _WKElementAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 379A873818BBFE0F00588AF2 /* _WKElementAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3319,10 +3315,6 @@
375E0E111D66432700EFEC2C /* WKNSNumber.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSNumber.mm; sourceTree = "<group>"; };
375E0E121D66432700EFEC2C /* WKNSNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSNumber.h; sourceTree = "<group>"; };
375FB4731883415600BE34D4 /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = "<group>"; };
- 3760881C150413E900FC82C7 /* WebRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebRenderObject.cpp; sourceTree = "<group>"; };
- 3760881D150413E900FC82C7 /* WebRenderObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderObject.h; sourceTree = "<group>"; };
- 37608820150414F700FC82C7 /* WKRenderObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderObject.cpp; sourceTree = "<group>"; };
- 37608821150414F700FC82C7 /* WKRenderObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRenderObject.h; sourceTree = "<group>"; };
376311F81A3FB30B005A2E51 /* _WKSameDocumentNavigationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSameDocumentNavigationType.h; sourceTree = "<group>"; };
376311FA1A3FB38B005A2E51 /* _WKSameDocumentNavigationTypeInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKSameDocumentNavigationTypeInternal.h; sourceTree = "<group>"; };
3769079818F31CB2001DFF04 /* APIInjectedBundlePageUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APIInjectedBundlePageUIClient.h; path = API/APIInjectedBundlePageUIClient.h; sourceTree = "<group>"; };
@@ -3341,10 +3333,6 @@
378E1A4818208CD60031007A /* WKNSString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSString.h; sourceTree = "<group>"; };
378E1A4B18208D700031007A /* WKNSURL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSURL.mm; sourceTree = "<group>"; };
378E1A4C18208D700031007A /* WKNSURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSURL.h; sourceTree = "<group>"; };
- 37948401150C350600E52CE9 /* WebRenderLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebRenderLayer.cpp; sourceTree = "<group>"; };
- 37948402150C350600E52CE9 /* WebRenderLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderLayer.h; sourceTree = "<group>"; };
- 37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRenderLayer.cpp; sourceTree = "<group>"; };
- 37948407150C4B9600E52CE9 /* WKRenderLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRenderLayer.h; sourceTree = "<group>"; };
3795789B18AD4F1100B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInFormDelegatePrivate.h; sourceTree = "<group>"; };
379A873518BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKActivatedElementInfoInternal.h; sourceTree = "<group>"; };
379A873718BBFE0F00588AF2 /* _WKElementAction.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKElementAction.mm; sourceTree = "<group>"; };
@@ -6173,10 +6161,6 @@
BC306823125A6B9400E71278 /* WebProcessCreationParameters.cpp */,
BC306822125A6B9400E71278 /* WebProcessCreationParameters.h */,
467E43E72243FF6D00B13924 /* WebProcessDataStoreParameters.h */,
- 37948401150C350600E52CE9 /* WebRenderLayer.cpp */,
- 37948402150C350600E52CE9 /* WebRenderLayer.h */,
- 3760881C150413E900FC82C7 /* WebRenderObject.cpp */,
- 3760881D150413E900FC82C7 /* WebRenderObject.h */,
5C8DD37F1FE4519200F2A556 /* WebsiteAutoplayPolicy.h */,
5C8DD3811FE455CA00F2A556 /* WebsiteAutoplayQuirk.h */,
511F7D3F1EB1BCEE00E47B83 /* WebsiteDataStoreParameters.cpp */,
@@ -9969,10 +9953,6 @@
A5EFD38B16B0E88C00B2F0E8 /* WKPageVisibilityTypes.h */,
7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */,
7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */,
- 37948406150C4B9600E52CE9 /* WKRenderLayer.cpp */,
- 37948407150C4B9600E52CE9 /* WKRenderLayer.h */,
- 37608820150414F700FC82C7 /* WKRenderObject.cpp */,
- 37608821150414F700FC82C7 /* WKRenderObject.h */,
51CD1C591B3493A900142CA5 /* WKSecurityOriginRef.cpp */,
51CD1C5A1B3493A900142CA5 /* WKSecurityOriginRef.h */,
BC4075E7124FF0270068F20A /* WKSerializedScriptValue.cpp */,
@@ -11411,8 +11391,6 @@
1A1E093418861D3800D2DC49 /* WebProgressTrackerClient.h in Headers */,
512F589D12A8838800629530 /* WebProtectionSpace.h in Headers */,
461CCCA6231485AA00B659B9 /* WebRemoteObjectRegistry.h in Headers */,
- 37948404150C350600E52CE9 /* WebRenderLayer.h in Headers */,
- 3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */,
A5860E71230F67FC00461AAE /* WebResourceInterceptController.h in Headers */,
510AFFBA16542048001BA05E /* WebResourceLoader.h in Headers */,
51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
@@ -11755,8 +11733,6 @@
1AD01BCD1905D54900C9C45F /* WKReloadFrameErrorRecoveryAttempter.h in Headers */,
1A9E329B1822E1CC00F5D04C /* WKRemoteObject.h in Headers */,
1A9E329F1822FEDD00F5D04C /* WKRemoteObjectCoder.h in Headers */,
- 37948409150C4B9700E52CE9 /* WKRenderLayer.h in Headers */,
- 37608823150414F700FC82C7 /* WKRenderObject.h in Headers */,
3336763B130C99DC006C9DE2 /* WKResourceCacheManager.h in Headers */,
BC8A501511765F5600757573 /* WKRetainPtr.h in Headers */,
5CA26D81217ABD5B00F97A35 /* WKSafeBrowsingWarning.h in Headers */,
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (264924 => 264925)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp 2020-07-27 16:00:23 UTC (rev 264925)
@@ -56,8 +56,6 @@
#include "WebPage.h"
#include "WebPageGroupProxy.h"
#include "WebPageOverlay.h"
-#include "WebRenderLayer.h"
-#include "WebRenderObject.h"
#include <WebCore/AXObjectCache.h>
#include <WebCore/AccessibilityObjectInterface.h>
#include <WebCore/ApplicationCacheStorage.h>
@@ -578,16 +576,6 @@
return WebKit::toImpl(pageRef)->renderTreeSize();
}
-WKRenderObjectRef WKBundlePageCopyRenderTree(WKBundlePageRef pageRef)
-{
- return WebKit::toAPI(WebKit::WebRenderObject::create(WebKit::toImpl(pageRef)).leakRef());
-}
-
-WKRenderLayerRef WKBundlePageCopyRenderLayerTree(WKBundlePageRef pageRef)
-{
- return WebKit::toAPI(WebKit::WebRenderLayer::create(WebKit::toImpl(pageRef)).leakRef());
-}
-
void WKBundlePageSetPaintedObjectsCounterThreshold(WKBundlePageRef, uint64_t)
{
// FIXME: This function is only still here to keep open source Mac builds building.
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h (264924 => 264925)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h 2020-07-27 15:58:27 UTC (rev 264924)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h 2020-07-27 16:00:23 UTC (rev 264925)
@@ -72,9 +72,6 @@
WK_EXPORT uint64_t WKBundlePageGetRenderTreeSize(WKBundlePageRef page);
-WK_EXPORT WKRenderObjectRef WKBundlePageCopyRenderTree(WKBundlePageRef page);
-WK_EXPORT WKRenderLayerRef WKBundlePageCopyRenderLayerTree(WKBundlePageRef page);
-
// FIXME: This function is only still here to keep open source Mac builds building. It doesn't do anything anymore!
// We should remove it as soon as we can.
WK_EXPORT void WKBundlePageSetPaintedObjectsCounterThreshold(WKBundlePageRef page, uint64_t threshold);