Skip to content

Instantly share code, notes, and snippets.

@theiostream
Last active April 27, 2024 00:23
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save theiostream/7b9e83997320ccade6b5ec749cdc3573 to your computer and use it in GitHub Desktop.
Save theiostream/7b9e83997320ccade6b5ec749cdc3573 to your computer and use it in GitHub Desktop.
GSoC '17 Product - GNUstep - "Make WebCore run on top of GNUstep"

GNUstep Port of WebKit

Proposal

This project's proposal for Google Summer of Code was targeted at the GNUstep project. GNUstep is a free reimplementation of Apple's Cocoa APIs (such as Foundation, CoreFoundation, AppKit...). Cocoa is used for development of macOS and iOS applications, and through GNUstep it can be used for developing GNU/Linux and Windows applications as well.

Currently, GNUstep does not provide a WebView component for its applications, which is a major factor stopping greater adoption of the framework for cross-platform development.

This project aimed to build the Mac port of the WebKit web engine with the GNUstep framework with two purposes in mind:

  • Push GNUstep APIs forward by testing them against an extremely complex use case of Cocoa;
  • Have the WebKit product as part of the GNUstep APIs, enabling WebViews in GNUstep apps.

WebKit is supported on macOS, Windows, and GNU/Linux (through Qt and Gtk backends), and platform-specific backends exist for each of those. This project aimed to build the pure macOS port on a Linux installation using the GNUstep APIs.

While the initial proposition's goal was to make WebCore workable with a GNUstep backend, further investigation proved the framework would only be testable if we also compiled the WebKit framework, expanding the original proposition's already very large goals.

To make the build work, a series of new definitions and stubs were added to several GNUstep libraries, as well as a fair amount of actual working code. Conversely, many patches had to be done to the WebKit tree itself. A very common reason for such is the Mac port's reliance on Darwin-only features, such as Mach ports, XPC and dyld APIs. These were replaced with Linux equivalents.

In the "GNUstep-PATCHES.md" file, a comprehensive list of all patches submitted as part of this project to GNUstep is presented. The changes made to WebKit are in "webkit.diff", an admittedly big and disorganized patchfile.

State of the port

Currently, the GNUstep port of WebKit is still incomplete. If you follow these instructions, you will be able to build WebKit successfully using the GNUstep libraries, but you will not have an usable product.

Currently, JavaScriptCore mostly works, and passes most tests. The only feature that is not supported is the JS<-->ObjC bridge, which requires the implementation of a private Apple Objective-C runtime feature both in the Clang GNU ObjC emitter and on libobjc2. This issue is currently being tracked at gnustep/libobjc2#37.

WebCore is being built with most ENABLE_* flags disabled for experimental purposes. However, re-enabling most of these flags should not generate any issue, or few issues at best. Notable exceptions are:

  • Remote Inspector: the Mac implementation of remote inspection relies heavily on Mach APIs and XPC, which is completely unimplemented on Linux.
  • Multimedia: GNUstep has no short-term plans of implementing AVFoundation, CoreVideo and other multimedia Cocoa frameworks. If the GS port ever supports multimedia, it should likely do so by integrating with the Gtk implementation for it.

In not so frequent cases, some features only used in edge cases have been commented out to avoid strenuous build effort for a seldom used quirk. A notable example is support for macOS' dictionary feature.

A notable choice has been to use the Gtk port's libsoup networking backend for the GNUstep rather than Foundation's. The reason for this was immaturity in newer Cocoa networking APIs in gnustep-base as well as the lack of CFNetwork, Security and SystemConfiguration frameworks in GNUstep. A hacky, dead simple NSURL*<-->Soup bridge was created in WebCore to support this.

WebKit2.framework relies heavily on newer APIs that are not implemented in GNUstep. For greater ease in building, we have chosen to build WebKitLegacy instead. The Mac port has been slightly modified with the addition of some ENABLE() checks, and with some PDF- and plugin-related features being commented out.

This build was attained thanks to the creation of some stubs in GNUstep libraries. We chose to create stubs for features that are used in edge cases and to actually implement general-use APIs. It should be noted that these stubs are very likely to generate issues in the future.

An unexpected factor which will likely impact future work on this port is the Mac port's enormous reliance on Apple internal APIs, some of which will likely have to be implemented without any behavior specification.

Technical notes on the port

When building WebKit with the configuration supplied here, these preprocessor conditions should be true:

  • PLATFORM(COCOA)
  • PLATFORM(MAC)
  • PLATFORM(GNUSTEP)
  • OS(LINUX)

Build instructions

  1. Install the latest release of Arch Linux

  2. Install the dependencies for the WebKit port:

$ pacman -S clang cairo libkqueue libpthread_workqueue lcms glu libxt gperf ruby glib2 libsoup libbsd
  1. Do a dirty hack to make WebKit compile against our header setup:
$ ln -s /usr/include/glib-2.0/* /usr/local/include
$ ln -s /usr/lib/glib-2.0/include/glibconfig.h /usr/local/include/
$ ln -s /usr/include/libsoup-2.4/libsoup/ /usr/local/include/libsoup
$ ln -s /usr/include/GL /usr/local/include/OpenGL
  1. Install gnustep-make, setting clang as the compiler.

  2. Build and install GNUstep libobjc2 from source using clang as a compiler (https://github.com/gnustep/libobjc2).

  3. Build and install libdispatch from source (github.com/nickhutchinson/libdispatch), making sure to link against libobjc2 for block support. DO NOT install libBlocksRuntime.

$ cmake -H. -Bbuild -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBLOCKS_RUNTIME_LIBRARIES="/usr/local/lib/libobjc.so"
  1. Install Apple ICU.

    1. download from https://opensource.apple.com/tarballs/ICU/ICU-57163.0.1.tar.gz
    2. make LINUX=YES ARCH64=YES CC=clang CXX=clang++
    3. copy ./build/obj64/libicucore.so into /usr/local/lib.

DO NOT install the Apple ICU headers into your system.

  1. Build and install the following GNUstep components from source, making sure to always use clang as a compiler and libobjc2 as the ObjC runtime:

Having -fobjc-runtime=gnustep-1.7 in the compiler flags is a good way to guarantee that the correct runtime is being used.

  1. Checkout the WebKit Git repository at commit f1d75cec792c730cde5d85d6fdf6891b2098ea70 (see https://webkit.org for the checkout URL).

  2. Apply webkit.diff to the WebKit upstream:

$ cd WebKit; patch -p1 < ../webkit.diff
  1. Create an empty library file stub:
$ echo "void x(){}" > stub.c; gcc -o /usr/local/lib/libempty.so -shared stub.c;
  1. Build the webkit-system-interface library for some needed stubs:
$ git clone https://github.com/theiostream/webkit-system-interface
$ cd webkit-system-interface; make
$ cp libWebKitSystemInterfaceLinux.a $WEBKIT/WebKitLibraries
  1. Patch libobjc2 headers:

    1. In objc/runtime.h, change #define nil ((id)_OBJC_NULL_PTR) into #define nil (_OBJC_NULL_PTR)
    2. Wrap objc/objc-arc.h around an extern "C" {} block if we're compiling with C++. This second step should be very temporary.
  2. Patch CoreGraphics headers by adding the following to /usr/local/include/CoreGraphics/CGGeometry.h:

#define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES 1
  1. Create an empty file at /usr/local/include/TargetConditionals.h

  2. Add a required stub typedef to /usr/local/include/CFNetwork/CFNetwork.h:

typedef struct __CFHTTPMessage *CFHTTPMessageRef;
  1. Setup the WebKit build with CMake:
$ cd WebKit
$ cmake -H. -Bbuildstep -DPORT=Mac -DWTF_LINUX=ON \
  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=14 \
  -DCMAKE_C_FLAGS="-fobjc-runtime=gnustep-1.7 -fblocks -fPIC -DBUILDING_GNUSTEP__=1 -DENABLE_INSPECTOR_ALTERNATE_DISPATCHERS=0 -DJSC_OBJC_API_ENABLED=1" \
  -DCMAKE_CXX_FLAGS="-fobjc-runtime=gnustep-1.7 -fblocks -fPIC -DBUILDING_GNUSTEP__=1 -DENABLE_INSPECTOR_ALTERNATE_DISPATCHERS=0 -DJSC_OBJC_API_ENABLED=1" \
  \
  -DACCELERATE_LIBRARY=/usr/local/lib/libempty.so \
  -DAUDIOTOOLBOX_LIBRARY=/usr/local/lib/libempty.so \
  -DAUDIOUNIT_LIBRARY=/usr/local/lib/libempty.so \
  -DAVFOUNDATION_LIBRARY=/usr/local/lib/libempty.so \
  -DCARBON_LIBRARY=/usr/local/lib/libgnustep-boron.so \
  -DCOCOA_LIBRARY=/usr/local/lib/libgnustep-gui.so \
  -DCOREAUDIO_LIBRARY=/usr/local/lib/libempty.so \
  -DCOREFOUNDATION_LIBRARY=/usr/local/lib/libgnustep-corebase.so \
  -DDATADETECTORSCORE_FRAMEWORK=/usr/local/lib/libempty.so \
  -DDISKARBITRATION_LIBRARY=/usr/local/lib/libempty.so \
  -DIOKIT_LIBRARY=/usr/local/lib/libempty.so \
  -DIOSURFACE_LIBRARY=/usr/local/lib/libempty.so \
  -DLOOKUP_FRAMEWORK=/usr/local/lib/libempty.so \
  -DMETAL_LIBRARY=/usr/local/lib/libempty.so \
  -DOPENGL_LIBRARY=/usr/lib/libglapi.so \
  -DQUARTZCORE_LIBRARY=/usr/local/lib/libempty.so \
  -DQUARTZ_LIBRARY=/usr/local/lib/libempty.so \
  -DREADLINE_LIBRARY=/usr/lib/libreadline.so \
  -DSECURITY_LIBRARY=/usr/local/lib/libempty.so \
  -DSYSTEMCONFIGURATION_LIBRARY=/usr/local/lib/libempty.so \
  -DXML2_LIBRARY=/usr/lib/libxml2.so \
  \
  -DENABLE_REMOTE_INSPECTOR=OFF -DENABLE_MEDIA_CONTROLS_SCRIPT=OFF \
  -DENABLE_WEBKIT=OFF -DENABLE_WEBKIT_LEGACY=ON -DENABLE_SUBTLE_CRYPTO=OFF \
  -DENABLE_WEBGPU=0 -DENABLE_LEGACY_ENCRYPTED_MEDIA=0 \
  -DENABLE_IOSURFACE_CANVAS_BACKING_STORE=0 -DENABLE_WEB_AUDIO=0 \
  -DENABLE_VIDEO_TRACK=0 -DENABLE_PDFKIT_PLUGIN=0 \
  -DENABLE_WEBGL=0 -DENABLE_WEBGL2=0 \
  -DENABLE_VIDEO=0 -DENABLE_MEDIA_SOURCE=0 \
  -DENABLE_MINIBROWSER=ON -DENABLE_3D_TRANSFORMS=OFF \
  -DENABLE_ACCELERATED_OVERFLOW_SCROLLING=OFF -DENABLE_API_TESTS=OFF \
  -DENABLE_ASYNC_SCROLLING=OFF -DENABLE_ATTACHMENT_ELEMENT=OFF \
  -DENABLE_AVF_CAPTIONS=OFF -DENABLE_CACHE_PARTITIONING=OFF \
  -DENABLE_CANVAS_PATH=OFF \
  -DENABLE_CHANNEL_MESSAGING=OFF \
  -DENABLE_CONTENT_FILTERING=OFF \
  -DENABLE_CONTEXT_MENUS=OFF \
  -DENABLE_CSS_BOX_DECORATION_BREAK=OFF \
  -DENABLE_CSS_COMPOSITING=OFF \
  -DENABLE_CSS_REGIONS=OFF \
  -DENABLE_CSS_SCROLL_SNAP=OFF \
  -DENABLE_CURSOR_VISIBILITY=OFF \
  -DENABLE_DASHBOARD_SUPPORT=OFF \
  -DENABLE_DATACUE_VALUE=OFF \
  -DENABLE_DRAG_SUPPORT=OFF \
  -DENABLE_FETCH_API=OFF \
  -DENABLE_FILTERS_LEVEL_2=OFF \
  -DENABLE_FTPDIR=OFF \
  -DENABLE_FULLSCREEN_API=OFF \
  -DENABLE_GEOLOCATION=OFF \
  -DENABLE_ICONDATABASE=OFF \
  -DENABLE_INDEXED_DATABASE=OFF \
  -DENABLE_INDIE_UI=OFF \
  -DENABLE_INPUT_TYPE_COLOR=OFF \
  -DENABLE_INPUT_TYPE_COLOR_POPOVER=OFF \
  -DENABLE_INPUT_TYPE_DATE=OFF \
  -DENABLE_INPUT_TYPE_DATETIMELOCAL=OFF \
  -DENABLE_INPUT_TYPE_MONTH=OFF \
  -DENABLE_INPUT_TYPE_TIME=OFF \
  -DENABLE_INTERSECTION_OBSERVER=OFF \
  -DENABLE_INTL=OFF \
  -DENABLE_IOS_AIRPLAY=OFF \
  -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=OFF \
  -DENABLE_LEGACY_VENDOR_PREFIXES=OFF \
  -DENABLE_LETTERPRESS=OFF \
  -DENABLE_MAC_LONG_PRESS=OFF \
  -DENABLE_MATHML=OFF \
  -DENABLE_MEMORY_SAMPLER=OFF \
  -DENABLE_METER_ELEMENT=OFF \
  -DENABLE_MOUSE_CURSOR_SCALE=OFF \
  -DENABLE_NETSCAPE_PLUGIN_API=OFF \
  -DENABLE_NOTIFICATIONS=OFF \
  -DENABLE_PUBLIC_SUFFIX_LIST=OFF \
  -DENABLE_RESOURCE_USAGE=OFF \
  -DENABLE_RUBBER_BANDING=OFF \
  -DENABLE_SAMPLING_PROFILER=OFF \
  -DENABLE_SERVICE_CONTROLS=OFF \
  -DENABLE_SMOOTH_SCROLLING=OFF \
  -DENABLE_SPEECH_SYNTHESIS=OFF \
  -DENABLE_STREAMS_API=OFF \
  -DENABLE_SVG_FONTS=OFF \
  -DENABLE_TELEPHONE_NUMBER_DETECTION=OFF \
  -DENABLE_USERSELECT_ALL=OFF \
  -DENABLE_USER_MESSAGE_HANDLERS=OFF \
  -DENABLE_WEBASSEMBLY=OFF \
  -DENABLE_WEBVTT_REGIONS=OFF \
  -DENABLE_WEB_SOCKETS=OFF \
  -DENABLE_XSLT=OFF
  1. Build WebKit:
$ make -C buildstep/

The build should only fail when we get to the MiniBrowser subproject, but by then we should have already generated libWebKitLegacy.so and be able to experiment with a WebView class supplied by it.

Next steps

With WebKit built, the next step is to link against libWebKitLegacy.so and try to get WebView to display a page. Currently, even initialization of the view causes a crash, and getting it to work should be a fun challenge.

Most work should likely happen at GNUstep GUI, which lacks many APIs that WebKit requires; and on QuartzCore, which lacks most APIs exposed by Apple.

Once this is attained, the next step is to enable the ENABLE_* flags that had been disabled in WebCore. As previously states, most should cause no or little issues; although few should cause enough trouble.

Tips

For building WebKit, we used a m4.xlarge instance at AWS for faster build times.

Here follows a list of patches submitted to GNUstep:

New libraries

gnustep-boron (a reimplementation of some non-deprecated Carbon APIs)

All work on this library is part of this GSoC project. This project contains stubs and a working reimplementation of macOS Universal Type Identifier APIs.

webkit-system-interface (a free reimplementation of a WebKit closed-source component)

Currently, this project only possesses stubs, and is a means to get WebKit linking.

Patched libraries

libobjc2 (reimplementation of the Objective-C 2 runtime)

Merged:

Unmerged:

gnustep-base (reimplementation of Foundation, a collection of general-purpose Objective-C APIs)

Merged:

gnustep-corebase (reimplementation of CoreFoundation, a collection of general-purpose APIs in C)

Merged:

gnustep-gui

Merged:

gnustep-back

Merged:

opal

Unmerged:

Merged:

quartzcore

Unmerged:

From 9999deea9ca85fefb3f7e01b8c8ac17036f3b397 Mon Sep 17 00:00:00 2001
From: Daniel Ferreira <dtf@stanford.edu>
Date: Fri, 4 Aug 2017 15:51:45 +0000
Subject: [PATCH 1/3] First patch round
---
Source/JavaScriptCore/API/JSContext.mm | 2 +
Source/JavaScriptCore/API/JSValueRef.cpp | 6 +-
Source/JavaScriptCore/API/JSWrapperMap.mm | 8 +-
Source/JavaScriptCore/API/ObjcRuntimeExtras.h | 10 ++
Source/JavaScriptCore/API/tests/Regress141275.mm | 1 +
Source/JavaScriptCore/API/tests/testapi.mm | 9 +-
Source/JavaScriptCore/PlatformMac.cmake | 2 +-
Source/JavaScriptCore/inspector/EventLoop.cpp | 4 +
Source/JavaScriptCore/runtime/Options.cpp | 8 +-
Source/JavaScriptCore/shell/CMakeLists.txt | 4 +-
Source/JavaScriptCore/shell/PlatformMac.cmake | 2 +-
Source/WTF/wtf/Assertions.cpp | 2 +-
Source/WTF/wtf/MD5.cpp | 2 +-
Source/WTF/wtf/MD5.h | 4 +-
Source/WTF/wtf/MainThread.h | 2 +-
Source/WTF/wtf/OSObjectPtr.h | 14 +++
Source/WTF/wtf/ObjcRuntimeExtras.h | 3 +
Source/WTF/wtf/Platform.h | 54 ++++++---
Source/WTF/wtf/PlatformMac.cmake | 52 +++++---
.../WTF/wtf/PlatformUserPreferredLanguagesMac.mm | 7 ++
Source/WTF/wtf/RetainPtr.h | 4 +
Source/WTF/wtf/SHA1.cpp | 2 +-
Source/WTF/wtf/SHA1.h | 4 +-
Source/WTF/wtf/SchedulePairMac.mm | 4 +-
Source/WTF/wtf/glib/GRefPtr.cpp | 2 +-
Source/WTF/wtf/glib/GRefPtr.h | 4 +-
Source/WTF/wtf/glib/GUniquePtr.h | 5 +-
.../WTF/wtf/mac/AppKitCompatibilityDeclarations.h | 2 +-
Source/WTF/wtf/mac/MainThreadMac.mm | 11 ++
Source/WTF/wtf/spi/cf/CFBundleSPI.h | 4 +-
Source/WTF/wtf/spi/cocoa/SecuritySPI.h | 2 +-
.../text/mac/TextBreakIteratorInternalICUMac.mm | 8 ++
Source/WebCore/PAL/pal/PlatformMac.cmake | 3 +-
Source/WebCore/PlatformMac.cmake | 134 +++++++++++++--------
.../WebCore/accessibility/mac/AXObjectCacheMac.mm | 1 +
.../mac/WebAccessibilityObjectWrapperMac.mm | 9 ++
Source/WebCore/crypto/keys/CryptoKeyEC.h | 2 +-
Source/WebCore/crypto/keys/CryptoKeyRSA.h | 2 +-
Source/WebCore/css/StyleResolver.cpp | 2 +
Source/WebCore/dom/DataTransferMac.mm | 4 +
Source/WebCore/editing/mac/FrameSelectionMac.mm | 2 +
Source/WebCore/fileapi/FileCocoa.mm | 2 +
Source/WebCore/html/HTMLMediaElement.cpp | 6 +-
Source/WebCore/inspector/InspectorNetworkAgent.cpp | 4 +-
Source/WebCore/page/MemoryRelease.cpp | 2 +-
Source/WebCore/page/PerformanceLogging.cpp | 2 +-
Source/WebCore/page/Settings.cpp | 2 +-
Source/WebCore/page/cocoa/SettingsCocoa.mm | 1 +
.../page/scrolling/ScrollingMomentumCalculator.cpp | 4 +
.../scrolling/mac/ScrollingMomentumCalculatorMac.h | 4 +
.../mac/ScrollingMomentumCalculatorMac.mm | 4 +
Source/WebCore/platform/Logging.cpp | 4 +-
Source/WebCore/platform/PlatformScreen.h | 5 +-
Source/WebCore/platform/SleepDisabler.cpp | 2 +-
.../audio/mac/AudioHardwareListenerMac.cpp | 4 +-
.../audio/mac/CAAudioStreamDescription.cpp | 5 +
.../platform/audio/mac/MediaSessionManagerMac.mm | 2 +
.../platform/cf/MainThreadSharedTimerCF.cpp | 4 +-
.../cocoa/ContentFilterUnblockHandlerCocoa.mm | 1 +
.../WebCore/platform/cocoa/CoreVideoSoftLink.cpp | 4 +
Source/WebCore/platform/cocoa/CoreVideoSoftLink.h | 4 +
Source/WebCore/platform/cocoa/FileMonitorCocoa.mm | 4 +
Source/WebCore/platform/cocoa/FileSystemCocoa.mm | 2 +-
Source/WebCore/platform/cocoa/MachSendRight.h | 4 +
.../platform/cocoa/NetworkExtensionContentFilter.h | 5 +-
.../platform/cocoa/VideoToolboxSoftLink.cpp | 4 +
.../WebCore/platform/cocoa/WebCoreNSErrorExtras.mm | 4 +-
.../platform/graphics/ComplexTextController.h | 5 +
Source/WebCore/platform/graphics/FloatPoint.h | 5 +-
Source/WebCore/platform/graphics/FloatRect.h | 5 +-
Source/WebCore/platform/graphics/FloatSize.h | 5 +-
.../WebCore/platform/graphics/FontPlatformData.h | 4 +-
Source/WebCore/platform/graphics/IntPoint.h | 5 +-
Source/WebCore/platform/graphics/IntRect.h | 5 +-
Source/WebCore/platform/graphics/IntSize.h | 5 +-
.../avfoundation/objc/MediaSampleAVFObjC.mm | 5 +
.../WebCore/platform/graphics/ca/GraphicsLayerCA.h | 1 +
.../graphics/ca/cocoa/PlatformCALayerCocoa.mm | 24 ++--
.../WebCore/platform/graphics/cg/ImageBufferCG.cpp | 4 +
.../platform/graphics/cg/ImageBufferDataCG.h | 2 +-
.../platform/graphics/cg/PDFDocumentImage.h | 4 +-
.../platform/graphics/cocoa/FontCacheCoreText.cpp | 17 +--
.../WebCore/platform/graphics/cocoa/FontCocoa.mm | 4 +-
.../cocoa/FontFamilySpecificationCoreText.h | 4 +
.../platform/graphics/cocoa/GPUDeviceMetal.mm | 4 +-
.../cocoa/WebActionDisablingCALayerDelegate.mm | 1 +
.../graphics/cv/PixelBufferConformerCV.cpp | 5 +
.../WebCore/platform/graphics/cv/TextureCacheCV.mm | 5 +
.../platform/graphics/cv/VideoTextureCopierCV.cpp | 4 +
.../graphics/mac/ComplexTextControllerCoreText.mm | 4 +-
.../platform/graphics/mac/FontCustomPlatformData.h | 5 +
Source/WebCore/platform/graphics/mac/ImageMac.mm | 2 +
.../WebCore/platform/graphics/mac/UTIUtilities.h | 37 ++++++
Source/WebCore/platform/mac/BlacklistUpdater.mm | 8 ++
Source/WebCore/platform/mac/DragDataMac.mm | 2 +
Source/WebCore/platform/mac/FileSystemMac.mm | 3 +-
Source/WebCore/platform/mac/PasteboardMac.mm | 1 +
Source/WebCore/platform/mac/PasteboardWriter.mm | 1 +
.../platform/mac/PlatformEventFactoryMac.mm | 7 +-
.../WebCore/platform/mac/PlatformPasteboardMac.mm | 1 +
Source/WebCore/platform/mac/ScrollbarThemeMac.mm | 6 +-
Source/WebCore/platform/mac/ThemeMac.mm | 37 +++---
Source/WebCore/platform/mac/ThreadCheck.mm | 11 ++
.../platform/mac/WebCoreFullScreenWarningView.mm | 4 +
.../WebCore/platform/mac/WebCoreSystemInterface.h | 18 ++-
Source/WebCore/platform/mac/WebGLBlacklist.mm | 2 +-
.../platform/network/NetworkStorageSession.h | 4 +-
.../platform/network/ResourceHandleInternal.h | 4 +
.../WebCore/platform/network/cf/CertificateInfo.h | 4 +-
.../platform/network/cocoa/CredentialCocoa.h | 2 +-
.../platform/network/cocoa/CredentialCocoa.mm | 4 +-
.../platform/network/cocoa/WebCoreNSURLSession.h | 5 +
.../platform/network/cocoa/WebCoreNSURLSession.mm | 8 ++
.../network/soup/AuthenticationChallenge.h | 1 +
.../platform/network/soup/ResourceHandleSoup.cpp | 17 +++
.../network/soup/SocketStreamHandleImplSoup.cpp | 17 +++
Source/WebCore/platform/posix/FileSystemPOSIX.cpp | 1 +
Source/WebCore/platform/spi/cf/CFNetworkSPI.h | 1 +
.../WebCore/platform/spi/cocoa/NEFilterSourceSPI.h | 2 +-
Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h | 3 +
Source/WebCore/platform/spi/mac/DataDetectorsSPI.h | 2 +
Source/WebCore/platform/text/mac/TextBoundaries.mm | 3 +
Source/WebCore/rendering/RenderThemeMac.mm | 58 ++++-----
Source/cmake/OptionsMac.cmake | 4 +-
Tools/CMakeLists.txt | 2 +-
Tools/Scripts/webkitdirs.pm | 3 +-
Tools/WebKitTestRunner/CMakeLists.txt | 2 +-
130 files changed, 664 insertions(+), 254 deletions(-)
create mode 100644 Source/WebCore/platform/graphics/mac/UTIUtilities.h
diff --git a/Source/JavaScriptCore/API/JSContext.mm b/Source/JavaScriptCore/API/JSContext.mm
index 5b100c75e..38516f799 100644
--- a/Source/JavaScriptCore/API/JSContext.mm
+++ b/Source/JavaScriptCore/API/JSContext.mm
@@ -40,6 +40,8 @@
#if JSC_OBJC_API_ENABLED
+#include <objc/objc-arc.h>
+
@implementation JSContext {
JSVirtualMachine *m_virtualMachine;
JSGlobalContextRef m_context;
diff --git a/Source/JavaScriptCore/API/JSValueRef.cpp b/Source/JavaScriptCore/API/JSValueRef.cpp
index 64ac6c324..712d25c30 100644
--- a/Source/JavaScriptCore/API/JSValueRef.cpp
+++ b/Source/JavaScriptCore/API/JSValueRef.cpp
@@ -44,7 +44,7 @@
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
-#if PLATFORM(MAC)
+#if OS(DARWIN)
#include <mach-o/dyld.h>
#endif
@@ -54,7 +54,7 @@
using namespace JSC;
-#if PLATFORM(MAC)
+#if OS(DARWIN)
static bool evernoteHackNeeded()
{
static const int32_t webkitLastVersionWithEvernoteHack = 35133959;
@@ -442,7 +442,7 @@ void JSValueProtect(JSContextRef ctx, JSValueRef value)
void JSValueUnprotect(JSContextRef ctx, JSValueRef value)
{
-#if PLATFORM(MAC)
+#if OS(DARWIN)
if ((!value || !ctx) && evernoteHackNeeded())
return;
#endif
diff --git a/Source/JavaScriptCore/API/JSWrapperMap.mm b/Source/JavaScriptCore/API/JSWrapperMap.mm
index 8cce3692e..f3bf7840d 100644
--- a/Source/JavaScriptCore/API/JSWrapperMap.mm
+++ b/Source/JavaScriptCore/API/JSWrapperMap.mm
@@ -42,7 +42,11 @@
#import <wtf/spi/cocoa/NSMapTableSPI.h>
#import <wtf/spi/darwin/dyldSPI.h>
+#if OS(DARWIN)
#include <mach-o/dyld.h>
+#endif
+
+#undef toupper
#if PLATFORM(APPLETV)
#else
@@ -664,7 +668,7 @@ bool supportsInitMethodConstructors()
#if PLATFORM(APPLETV)
// There are no old clients on Apple TV, so there's no need for backwards compatibility.
return true;
-#else
+#elif OS(DARWIN)
// First check to see the version of JavaScriptCore we directly linked against.
static int32_t versionOfLinkTimeJavaScriptCore = 0;
if (!versionOfLinkTimeJavaScriptCore)
@@ -680,6 +684,8 @@ bool supportsInitMethodConstructors()
programSDKVersion = dyld_get_program_sdk_version();
return programSDKVersion >= firstSDKVersionWithInitConstructorSupport;
+#else
+ return true;
#endif
}
diff --git a/Source/JavaScriptCore/API/ObjcRuntimeExtras.h b/Source/JavaScriptCore/API/ObjcRuntimeExtras.h
index fa44ff6f7..dccf90d9b 100644
--- a/Source/JavaScriptCore/API/ObjcRuntimeExtras.h
+++ b/Source/JavaScriptCore/API/ObjcRuntimeExtras.h
@@ -236,11 +236,21 @@ typename DelegateType::ResultType parseObjCType(const char*& position)
}
}
+#if PLATFORM(GNUSTEP)
+#define _protocol_getMethodTypeEncoding(x, y, z, w) (protocol_getMethodDescription(x, y, z, w).types)
+#define _Block_has_signature(x) (block_getType_np(x) != NULL)
+#define _Block_signature(x) block_getType_np(x)
+#endif
+
extern "C" {
// Forward declare some Objective-C runtime internal methods that are not API.
+#if !PLATFORM(GNUSTEP)
const char *_protocol_getMethodTypeEncoding(Protocol *, SEL, BOOL isRequiredMethod, BOOL isInstanceMethod);
+#endif
id objc_initWeak(id *, id);
void objc_destroyWeak(id *);
+#if !PLATFORM(GNUSTEP)
bool _Block_has_signature(void *);
const char * _Block_signature(void *);
+#endif
}
diff --git a/Source/JavaScriptCore/API/tests/Regress141275.mm b/Source/JavaScriptCore/API/tests/Regress141275.mm
index 18e186a65..c142e07eb 100644
--- a/Source/JavaScriptCore/API/tests/Regress141275.mm
+++ b/Source/JavaScriptCore/API/tests/Regress141275.mm
@@ -29,6 +29,7 @@
#import <Foundation/Foundation.h>
#import <objc/objc.h>
#import <objc/runtime.h>
+#import <dispatch/dispatch.h>
#if JSC_OBJC_API_ENABLED
diff --git a/Source/JavaScriptCore/API/tests/testapi.mm b/Source/JavaScriptCore/API/tests/testapi.mm
index e98d6cf5d..bccee3f39 100644
--- a/Source/JavaScriptCore/API/tests/testapi.mm
+++ b/Source/JavaScriptCore/API/tests/testapi.mm
@@ -24,6 +24,7 @@
*/
#import <JavaScriptCore/JavaScriptCore.h>
+#import <wtf/Platform.h>
#import "CurrentThisInsideBlockGetterTest.h"
#import "DateTests.h"
@@ -37,8 +38,14 @@
extern "C" void JSSynchronousGarbageCollectForDebugging(JSContextRef);
extern "C" void JSSynchronousEdenCollectForDebugging(JSContextRef);
+#if PLATFORM(GNUSTEP)
+#import <Block.h>
+#define _Block_has_signature(x) (block_getType_np((__bridge void *)x) != NULL)
+#define _Block_signature(x) block_getType_np((__bridge void *)x)
+#else
extern "C" bool _Block_has_signature(id);
extern "C" const char * _Block_signature(id);
+#endif
extern int failed;
extern "C" void testObjectiveCAPI(void);
@@ -1469,7 +1476,7 @@ static void testObjectiveCAPIMain()
checkResult(@"Ran code in five concurrent VMs that GC'd", ok);
}
- currentThisInsideBlockGetterTest();
+ //currentThisInsideBlockGetterTest();
runDateTests();
runJSExportTests();
runRegress141275();
diff --git a/Source/JavaScriptCore/PlatformMac.cmake b/Source/JavaScriptCore/PlatformMac.cmake
index e528b800a..08df416f1 100644
--- a/Source/JavaScriptCore/PlatformMac.cmake
+++ b/Source/JavaScriptCore/PlatformMac.cmake
@@ -31,7 +31,7 @@ list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
${JAVASCRIPTCORE_DIR}/inspector/remote/cocoa
)
-set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
+#set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}"-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
# FIXME: Make including these files consistent in the source so these forwarding headers are not needed.
if (NOT EXISTS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorBackendDispatchers.h)
diff --git a/Source/JavaScriptCore/inspector/EventLoop.cpp b/Source/JavaScriptCore/inspector/EventLoop.cpp
index 7af75c114..179ed9900 100644
--- a/Source/JavaScriptCore/inspector/EventLoop.cpp
+++ b/Source/JavaScriptCore/inspector/EventLoop.cpp
@@ -32,6 +32,10 @@
#include <glib.h>
#endif
+#if USE(CF)
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
namespace Inspector {
#if USE(CF) && !OS(WINDOWS)
diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp
index 430eacf82..a891bde04 100644
--- a/Source/JavaScriptCore/runtime/Options.cpp
+++ b/Source/JavaScriptCore/runtime/Options.cpp
@@ -46,7 +46,7 @@
#include <wtf/text/StringBuilder.h>
#include <wtf/threads/Signals.h>
-#if PLATFORM(COCOA)
+#if OS(DARWIN)
#include <crt_externs.h>
#endif
@@ -523,7 +523,7 @@ void Options::initialize()
// Allow environment vars to override options if applicable.
// The evn var should be the name of the option prefixed with
// "JSC_".
-#if PLATFORM(COCOA)
+#if OS(DARWIN)
bool hasBadOptions = false;
for (char** envp = *_NSGetEnviron(); *envp; envp++) {
const char* env = *envp;
@@ -536,12 +536,12 @@ void Options::initialize()
}
if (hasBadOptions && Options::validateOptions())
CRASH();
-#else // PLATFORM(COCOA)
+#else // OS(DARWIN)
#define FOR_EACH_OPTION(type_, name_, defaultValue_, availability_, description_) \
overrideOptionWithHeuristic(name_(), name_##ID, "JSC_" #name_, Availability::availability_);
JSC_OPTIONS(FOR_EACH_OPTION)
#undef FOR_EACH_OPTION
-#endif // PLATFORM(COCOA)
+#endif // OS(DARWIN)
#define FOR_EACH_OPTION(aliasedName_, unaliasedName_, equivalence_) \
overrideAliasedOptionWithHeuristic("JSC_" #aliasedName_);
diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
index bc37dd317..e978b8d6a 100644
--- a/Source/JavaScriptCore/shell/CMakeLists.txt
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt
@@ -71,8 +71,8 @@ if (NOT WIN32)
add_executable(testmasm ${TESTMASM_SOURCES})
target_link_libraries(testmasm ${JSC_LIBRARIES})
- add_executable(testb3 ${TESTB3_SOURCES})
- target_link_libraries(testb3 ${JSC_LIBRARIES})
+ #add_executable(testb3 ${TESTB3_SOURCES})
+ #target_link_libraries(testb3 ${JSC_LIBRARIES})
add_executable(testair ${TESTAIR_SOURCES})
target_link_libraries(testair ${JSC_LIBRARIES})
diff --git a/Source/JavaScriptCore/shell/PlatformMac.cmake b/Source/JavaScriptCore/shell/PlatformMac.cmake
index 7c0fea252..21c4e1701 100644
--- a/Source/JavaScriptCore/shell/PlatformMac.cmake
+++ b/Source/JavaScriptCore/shell/PlatformMac.cmake
@@ -1,5 +1,5 @@
set(TESTAPI_OBJC_SOURCES
- ../API/tests/CurrentThisInsideBlockGetterTest.mm
+ #../API/tests/CurrentThisInsideBlockGetterTest.mm CFBridgingRetain
../API/tests/DateTests.mm
../API/tests/JSExportTests.mm
../API/tests/Regress141275.mm
diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
index 86ae54506..4071a4e43 100644
--- a/Source/WTF/wtf/Assertions.cpp
+++ b/Source/WTF/wtf/Assertions.cpp
@@ -55,7 +55,7 @@
#if USE(CF)
#include <CoreFoundation/CFString.h>
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define USE_APPLE_SYSTEM_LOG 1
#include <asl.h>
#endif
diff --git a/Source/WTF/wtf/MD5.cpp b/Source/WTF/wtf/MD5.cpp
index 55080f215..41ade9396 100644
--- a/Source/WTF/wtf/MD5.cpp
+++ b/Source/WTF/wtf/MD5.cpp
@@ -59,7 +59,7 @@
namespace WTF {
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
MD5::MD5()
{
diff --git a/Source/WTF/wtf/MD5.h b/Source/WTF/wtf/MD5.h
index ff1dbbb93..a01a0a959 100644
--- a/Source/WTF/wtf/MD5.h
+++ b/Source/WTF/wtf/MD5.h
@@ -34,7 +34,7 @@
#include <array>
#include <wtf/Vector.h>
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#include <CommonCrypto/CommonDigest.h>
#endif
@@ -60,7 +60,7 @@ public:
WTF_EXPORT_PRIVATE void checksum(Digest&);
private:
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
CC_MD5_CTX m_context;
#else
uint32_t m_buf[4];
diff --git a/Source/WTF/wtf/MainThread.h b/Source/WTF/wtf/MainThread.h
index 14b34673a..4596ebbbb 100644
--- a/Source/WTF/wtf/MainThread.h
+++ b/Source/WTF/wtf/MainThread.h
@@ -84,7 +84,7 @@ void initializeMainThreadPlatform();
void scheduleDispatchFunctionsOnMainThread();
void dispatchFunctionsFromMainThread();
-#if OS(DARWIN) && !USE(GLIB)
+#if PLATFORM(COCOA) && !USE(GLIB)
#if !USE(WEB_THREAD)
// This version of initializeMainThread sets up the main thread as corresponding
// to the process's main thread, and not necessarily the thread that calls this
diff --git a/Source/WTF/wtf/OSObjectPtr.h b/Source/WTF/wtf/OSObjectPtr.h
index ed7eceb92..3b33246d5 100644
--- a/Source/WTF/wtf/OSObjectPtr.h
+++ b/Source/WTF/wtf/OSObjectPtr.h
@@ -30,6 +30,20 @@
#include <wtf/Assertions.h>
#include <wtf/StdLibExtras.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifndef __OBJC__
+void *os_retain(void *object);
+void os_release(void *object);
+#else
+#define os_retain(object) [object release]
+#define os_release(object) [object release]
+#endif
+#ifdef __cplusplus
+}
+#endif
+
namespace WTF {
template<typename T> class OSObjectPtr;
diff --git a/Source/WTF/wtf/ObjcRuntimeExtras.h b/Source/WTF/wtf/ObjcRuntimeExtras.h
index 89b9f4b9c..55e4301a2 100644
--- a/Source/WTF/wtf/ObjcRuntimeExtras.h
+++ b/Source/WTF/wtf/ObjcRuntimeExtras.h
@@ -29,6 +29,9 @@
// but it should be ObjC with an uppercase C.
#include <objc/message.h>
+#if PLATFORM(GNUSTEP)
+#include <objc/runtime.h>
+#endif
#ifdef __cplusplus
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 802f52579..566d986d2 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -28,6 +28,10 @@
#ifndef WTF_Platform_h
#define WTF_Platform_h
+// FIXME: TEMP
+#define __MAC_OS_X_VERSION_MIN_REQUIRED 0
+#define __MAC_OS_X_VERSION_MAX_ALLOWED 0
+
/* Include compiler specific macros */
#include <wtf/Compiler.h>
@@ -466,6 +470,9 @@
/* PLATFORM(WIN) */
#if defined(BUILDING_GTK__)
#define WTF_PLATFORM_GTK 1
+#elif defined(BUILDING_GNUSTEP__)
+#define WTF_PLATFORM_GNUSTEP 1
+#define WTF_PLATFORM_MAC 1
#elif defined(BUILDING_WPE__)
#define WTF_PLATFORM_WPE 1
#elif defined(BUILDING_JSCONLY__)
@@ -492,6 +499,11 @@
#endif
#endif
+/* PLATFORM(GNUSTEP) */
+#if PLATFORM(GNUSTEP)
+#include <GNUstepBase/GSVersionMacros.h>
+#endif
+
/* PLATFORM(APPLETV) */
#if defined(TARGET_OS_TV) && TARGET_OS_TV
#define WTF_PLATFORM_APPLETV 1
@@ -517,11 +529,14 @@
#define USE_GLIB 1
#define USE_FREETYPE 1
#define USE_HARFBUZZ 1
-#define USE_SOUP 1
#define USE_WEBP 1
#define USE_FILE_LOCK 1
#endif
+#if PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(GNUSTEP)
+#define USE_SOUP 1
+#endif
+
#if PLATFORM(GTK)
#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36
#endif
@@ -544,13 +559,13 @@
#define USE_CF 1
#define USE_FOUNDATION 1
#define USE_NETWORK_CFDATA_ARRAY_CALLBACK 1
-#define ENABLE_USER_MESSAGE_HANDLERS 1
+#define ENABLE_USER_MESSAGE_HANDLERS 0 // ENABLE_!
#define HAVE_OUT_OF_PROCESS_LAYER_HOSTING 1
#define HAVE_DTRACE 0
#define USE_FILE_LOCK 1
#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
-#define ENABLE_DATA_DETECTION 1
+#define ENABLE_DATA_DETECTION 0 // ENABLE_!
#define HAVE_AVKIT 1
#define HAVE_PARENTAL_CONTROLS 1
#endif
@@ -559,7 +574,7 @@
#if PLATFORM(MAC)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 && !PLATFORM(GNUSTEP)
#define USE_QTKIT 1
#else
#define USE_QTKIT 0
@@ -1053,7 +1068,7 @@
#define ENABLE_BINDING_INTEGRITY 1
#endif
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define USE_AVFOUNDATION 1
#endif
@@ -1080,33 +1095,33 @@
#endif
#endif
-#if PLATFORM(IOS) || PLATFORM(MAC)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define USE_COREMEDIA 1
#define HAVE_AVFOUNDATION_VIDEO_OUTPUT 1
#endif
-#if PLATFORM(IOS) || PLATFORM(MAC) || (OS(WINDOWS) && USE(CG))
+#if (PLATFORM(COCOA) && !PLATFORM(GNUSTEP)) || (OS(WINDOWS) && USE(CG))
#define HAVE_AVFOUNDATION_MEDIA_SELECTION_GROUP 1
#endif
-#if PLATFORM(IOS) || PLATFORM(MAC) || (OS(WINDOWS) && USE(CG))
+#if (PLATFORM(COCOA) && !PLATFORM(GNUSTEP)) || (OS(WINDOWS) && USE(CG))
#define HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT 1
#define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
#endif
-#if PLATFORM(IOS) || PLATFORM(MAC)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1
#endif
-#if PLATFORM(MAC) || (PLATFORM(IOS) && ENABLE(WEB_RTC))
+#if (PLATFORM(MAC) || (PLATFORM(IOS) && ENABLE(WEB_RTC))) && !PLATFORM(GNUSTEP)
#define USE_VIDEOTOOLBOX 1
#endif
-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
+#if (PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)) && !PLATFORM(GNUSTEP)
#define USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
#endif
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(GNUSTEP)
#define USE_COREAUDIO 1
#endif
@@ -1115,7 +1130,7 @@
#endif
#ifndef HAVE_QOS_CLASSES
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define HAVE_QOS_CLASSES 1
#endif
#endif
@@ -1153,16 +1168,16 @@
#define HAVE_TIMINGDATAOPTIONS 1
#endif
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define USE_AUDIO_SESSION 1
#endif
-#if PLATFORM(COCOA) && !PLATFORM(IOS_SIMULATOR)
+#if PLATFORM(COCOA) && !PLATFORM(IOS_SIMULATOR) && !PLATFORM(GNUSTEP)
#define USE_IOSURFACE 1
#endif
#if PLATFORM(COCOA)
-#define ENABLE_RESOURCE_USAGE 1
+#define ENABLE_RESOURCE_USAGE 0 // ENABLE_!
#endif
#if PLATFORM(GTK) || PLATFORM(WPE)
@@ -1190,6 +1205,7 @@
#define HAVE_NS_ACTIVITY 1
#endif
+/* GSTODO: Review this */
#if (OS(DARWIN) && USE(CG)) || (USE(FREETYPE) && !PLATFORM(GTK)) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))
#undef ENABLE_OPENTYPE_MATH
#define ENABLE_OPENTYPE_MATH 1
@@ -1201,7 +1217,7 @@
#define TARGET_OS_IPHONE 0
#endif
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#define USE_MEDIATOOLBOX 1
#endif
@@ -1213,7 +1229,7 @@
#endif
#endif
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
+#if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)) && !PLATFORM(GNUSTEP)
#define HAVE_SEC_TRUST_SERIALIZATION 1
#endif
@@ -1241,7 +1257,7 @@
#endif
#endif
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 && !PLATFORM(GNUSTEP)
#define USE_MEDIAREMOTE 1
#endif
diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake
index b4b1daf33..df8777ac3 100644
--- a/Source/WTF/wtf/PlatformMac.cmake
+++ b/Source/WTF/wtf/PlatformMac.cmake
@@ -3,6 +3,11 @@ find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(READLINE_LIBRARY Readline)
list(APPEND WTF_LIBRARIES
${COREFOUNDATION_LIBRARY}
+ gnustep-base
+ dispatch
+ objc
+ objcxx
+ pthread
${COCOA_LIBRARY}
${READLINE_LIBRARY}
)
@@ -19,9 +24,6 @@ list(APPEND WTF_SOURCES
cf/RunLoopCF.cpp
- cocoa/CPUTimeCocoa.mm
- cocoa/MemoryFootprintCocoa.cpp
- cocoa/MemoryPressureHandlerCocoa.mm
cocoa/WorkQueueCocoa.cpp
mac/DeprecatedSymbolsUsedBySafari.mm
@@ -37,28 +39,46 @@ list(APPEND WTF_SOURCES
text/mac/StringViewObjC.mm
)
+if (WTF_LINUX)
+ list(APPEND WTF_SOURCES
+ linux/MemoryFootprintLinux.cpp
+ linux/MemoryPressureHandlerLinux.cpp
+ unix/CPUTimeUnix.cpp
+ )
+else (WTF_LINUX)
+ list(APPEND WTF_SOURCES
+ cocoa/MemoryFootprintCocoa.mm
+ cocoa/MemoryPressureHandlerCocoa.mm
+ cocoa/CPUTimeCocoa.mm
+ )
+endif(WTF_LINUX)
+
+
list(APPEND WTF_INCLUDE_DIRECTORIES
"${WTF_DIR}/icu"
"${WTF_DIR}/wtf/spi/darwin"
${DERIVED_SOURCES_WTF_DIR}
)
-file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
+if (WTF_LINUX)
+else(WTF_LINUX)
+ file(COPY mac/MachExceptions.defs DESTINATION ${DERIVED_SOURCES_WTF_DIR})
-add_custom_command(
- OUTPUT
- ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
- ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
+ add_custom_command(
+ OUTPUT
+ ${DERIVED_SOURCES_WTF_DIR}/MachExceptionsServer.h
+ ${DERIVED_SOURCES_WTF_DIR}/mach_exc.h
+ ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
+ ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
+ MAIN_DEPENDENCY mac/MachExceptions.defs
+ WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
+ COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
+ VERBATIM)
+ list(APPEND WTF_SOURCES
${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
- MAIN_DEPENDENCY mac/MachExceptions.defs
- WORKING_DIRECTORY ${DERIVED_SOURCES_WTF_DIR}
- COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
- VERBATIM)
-list(APPEND WTF_SOURCES
- ${DERIVED_SOURCES_WTF_DIR}/mach_excServer.c
- ${DERIVED_SOURCES_WTF_DIR}/mach_excUser.c
-)
+ )
+endif(WTF_LINUX)
WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${FORWARDING_HEADERS_DIR}/WebKitLegacy)
diff --git a/Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm b/Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm
index 3ae71aefc..746afd36b 100644
--- a/Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm
+++ b/Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm
@@ -29,6 +29,7 @@
#import "BlockObjCExceptions.h"
#import <mutex>
#import <unicode/uloc.h>
+#import <dispatch/dispatch.h>
#import <wtf/Assertions.h>
#import <wtf/Lock.h>
#import <wtf/NeverDestroyed.h>
@@ -88,6 +89,7 @@ static String httpStyleLanguageCode(NSString *language)
// 1. There is no reason why CFBundle localization names would be at all related to language names as used on the Web.
// 2. Script Manager codes cannot represent all languages that are now supported by the platform, so the conversion is lossy.
// 3. This should probably match what is sent by the network layer as Accept-Language, but currently, that's implemented separately.
+#if !PLATFORM(GNUSTEP)
CFBundleGetLocalizationInfoForLocalization((CFStringRef)language, &languageCode, &regionCode, &scriptCode, &stringEncoding);
RetainPtr<CFStringRef> preferredLanguageCode = adoptCF(CFBundleCopyLocalizationForLocalizationInfo(languageCode, regionCode, scriptCode, stringEncoding));
if (preferredLanguageCode)
@@ -99,6 +101,7 @@ static String httpStyleLanguageCode(NSString *language)
[mutableLanguageCode.get() replaceCharactersInRange:NSMakeRange(2, 1) withString:@"-"];
return mutableLanguageCode.get();
}
+#endif
return language;
}
@@ -118,6 +121,9 @@ Vector<String> platformUserPreferredLanguages()
Vector<String>& userPreferredLanguages = preferredLanguages();
if (userPreferredLanguages.isEmpty()) {
+#if PLATFORM(GNUSTEP)
+ userPreferredLanguages.append("en");
+#else
RetainPtr<CFArrayRef> languages = adoptCF(CFLocaleCopyPreferredLanguages());
CFIndex languageCount = CFArrayGetCount(languages.get());
if (!languageCount)
@@ -126,6 +132,7 @@ Vector<String> platformUserPreferredLanguages()
for (CFIndex i = 0; i < languageCount; i++)
userPreferredLanguages.append(httpStyleLanguageCode((NSString *)CFArrayGetValueAtIndex(languages.get(), i)));
}
+#endif
}
Vector<String> userPreferredLanguagesCopy;
diff --git a/Source/WTF/wtf/RetainPtr.h b/Source/WTF/wtf/RetainPtr.h
index c55eec31c..9ebd1a674 100644
--- a/Source/WTF/wtf/RetainPtr.h
+++ b/Source/WTF/wtf/RetainPtr.h
@@ -167,7 +167,11 @@ template<typename T> inline typename RetainPtr<T>::PtrType RetainPtr<T>::leakRef
#ifdef __OBJC__
template<typename T> inline auto RetainPtr<T>::autorelease() -> PtrType
{
+#if PLATFORM(GNUSTEP)
+ return (__bridge PtrType)leakRef();
+#else
return (__bridge PtrType)CFBridgingRelease(leakRef());
+#endif
}
#endif
diff --git a/Source/WTF/wtf/SHA1.cpp b/Source/WTF/wtf/SHA1.cpp
index 2f84a1e95..bf89490ce 100644
--- a/Source/WTF/wtf/SHA1.cpp
+++ b/Source/WTF/wtf/SHA1.cpp
@@ -39,7 +39,7 @@
namespace WTF {
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
SHA1::SHA1()
{
diff --git a/Source/WTF/wtf/SHA1.h b/Source/WTF/wtf/SHA1.h
index 009b484ad..2094cf6f0 100644
--- a/Source/WTF/wtf/SHA1.h
+++ b/Source/WTF/wtf/SHA1.h
@@ -35,7 +35,7 @@
#include <wtf/Vector.h>
#include <wtf/text/CString.h>
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#include <CommonCrypto/CommonDigest.h>
#endif
@@ -71,7 +71,7 @@ public:
WTF_EXPORT_PRIVATE CString computeHexDigest();
private:
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
CC_SHA1_CTX m_context;
#else
void finalize();
diff --git a/Source/WTF/wtf/SchedulePairMac.mm b/Source/WTF/wtf/SchedulePairMac.mm
index 24d5577cd..5047c8b68 100644
--- a/Source/WTF/wtf/SchedulePairMac.mm
+++ b/Source/WTF/wtf/SchedulePairMac.mm
@@ -29,13 +29,13 @@
#include "config.h"
#include "SchedulePair.h"
-#if !USE(CFURLCONNECTION)
+#if !USE(CFURLCONNECTION) || !PLATFORM(GNUSTEP)
namespace WTF {
SchedulePair::SchedulePair(NSRunLoop* runLoop, CFStringRef mode)
: m_nsRunLoop(runLoop)
- , m_runLoop([runLoop getCFRunLoop])
+ , m_runLoop(NULL/*[runLoop getCFRunLoop]*/)
{
if (mode)
m_mode = adoptCF(CFStringCreateCopy(0, mode));
diff --git a/Source/WTF/wtf/glib/GRefPtr.cpp b/Source/WTF/wtf/glib/GRefPtr.cpp
index c522095af..1e380fbf6 100644
--- a/Source/WTF/wtf/glib/GRefPtr.cpp
+++ b/Source/WTF/wtf/glib/GRefPtr.cpp
@@ -19,7 +19,7 @@
#include "config.h"
#include "GRefPtr.h"
-#if USE(GLIB)
+#if USE(GLIB) || PLATFORM(GNUSTEP)
#include <glib-object.h>
#include <glib.h>
diff --git a/Source/WTF/wtf/glib/GRefPtr.h b/Source/WTF/wtf/glib/GRefPtr.h
index 731305bda..758e95790 100644
--- a/Source/WTF/wtf/glib/GRefPtr.h
+++ b/Source/WTF/wtf/glib/GRefPtr.h
@@ -23,8 +23,10 @@
#ifndef WTF_GRefPtr_h
#define WTF_GRefPtr_h
-#if USE(GLIB)
+#if USE(GLIB) || PLATFORM(GNUSTEP)
+#include <glib.h>
+#include <glib-object.h>
#include <wtf/HashTraits.h>
#include <algorithm>
diff --git a/Source/WTF/wtf/glib/GUniquePtr.h b/Source/WTF/wtf/glib/GUniquePtr.h
index e1cff8dde..27482da0d 100644
--- a/Source/WTF/wtf/glib/GUniquePtr.h
+++ b/Source/WTF/wtf/glib/GUniquePtr.h
@@ -21,9 +21,10 @@
#ifndef GUniquePtr_h
#define GUniquePtr_h
-#if USE(GLIB)
+//#if USE(GLIB)
#include <gio/gio.h>
+#include <glib.h>
#include <wtf/Noncopyable.h>
namespace WTF {
@@ -122,7 +123,7 @@ private:
using WTF::GUniquePtr;
using WTF::GUniqueOutPtr;
-#endif // USE(GLIB)
+//#endif // USE(GLIB)
#endif // GUniquePtr_h
diff --git a/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h b/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h
index bbeb39134..c80c3bd9d 100644
--- a/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h
+++ b/Source/WTF/wtf/mac/AppKitCompatibilityDeclarations.h
@@ -26,7 +26,7 @@
#ifndef AppKitCompatibilityDeclarations_h
#define AppKitCompatibilityDeclarations_h
-#import <Availability.h>
+//#import <Availability.h>
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
diff --git a/Source/WTF/wtf/mac/MainThreadMac.mm b/Source/WTF/wtf/mac/MainThreadMac.mm
index 272e3f5f9..2f6909c85 100644
--- a/Source/WTF/wtf/mac/MainThreadMac.mm
+++ b/Source/WTF/wtf/mac/MainThreadMac.mm
@@ -46,6 +46,17 @@
- (void)call;
@end
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
@implementation JSWTFMainThreadCaller
- (void)call
diff --git a/Source/WTF/wtf/spi/cf/CFBundleSPI.h b/Source/WTF/wtf/spi/cf/CFBundleSPI.h
index c089e175b..ce6fda718 100644
--- a/Source/WTF/wtf/spi/cf/CFBundleSPI.h
+++ b/Source/WTF/wtf/spi/cf/CFBundleSPI.h
@@ -30,13 +30,15 @@
#if USE(APPLE_INTERNAL_SDK)
#import <CoreFoundation/CFPriv.h>
-#else
+#elif OS(DARWIN)
#include <wtf/spi/darwin/XPCSPI.h>
#endif
WTF_EXTERN_C_BEGIN
+#if OS(DARWIN)
void _CFBundleSetupXPCBootstrap(xpc_object_t bootstrap);
+#endif
CFBundleRef _CFBundleCreateUnique(CFAllocatorRef, CFURLRef bundleURL);
Boolean CFBundleGetLocalizationInfoForLocalization(CFStringRef localizationName, SInt32 *languageCode, SInt32 *regionCode, SInt32 *scriptCode, CFStringEncoding *stringEncoding);
diff --git a/Source/WTF/wtf/spi/cocoa/SecuritySPI.h b/Source/WTF/wtf/spi/cocoa/SecuritySPI.h
index 375b9e215..10c64af32 100644
--- a/Source/WTF/wtf/spi/cocoa/SecuritySPI.h
+++ b/Source/WTF/wtf/spi/cocoa/SecuritySPI.h
@@ -70,7 +70,7 @@ CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef, CFStringRef entitlement, CF
CFStringRef SecTaskCopySigningIdentifier(SecTaskRef, CFErrorRef *);
#endif
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(GNUSTEP)
#include <Security/SecAsn1Types.h>
extern const SecAsn1Template kSecAsn1AlgorithmIDTemplate[];
extern const SecAsn1Template kSecAsn1SubjectPublicKeyInfoTemplate[];
diff --git a/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm b/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm
index 5fd654af1..70b3ff726 100644
--- a/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm
+++ b/Source/WTF/wtf/text/mac/TextBreakIteratorInternalICUMac.mm
@@ -53,21 +53,29 @@ static const int maxLocaleStringLength = 32;
static inline RetainPtr<CFStringRef> textBreakLocalePreference()
{
+#if PLATFORM(GNUSTEP)
+ return static_cast<CFStringRef>(CFSTR("en_US_POSIX"));
+#else
RetainPtr<CFPropertyListRef> locale = adoptCF(CFPreferencesCopyValue(CFSTR("AppleTextBreakLocale"),
kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
if (!locale || CFGetTypeID(locale.get()) != CFStringGetTypeID())
return nullptr;
return static_cast<CFStringRef>(locale.get());
+#endif
}
static RetainPtr<CFStringRef> topLanguagePreference()
{
+#if PLATFORM(GNUSTEP)
+ return nullptr;
+#else
RetainPtr<CFArrayRef> languagesArray = adoptCF(CFLocaleCopyPreferredLanguages());
if (!languagesArray)
return nullptr;
if (!CFArrayGetCount(languagesArray.get()))
return nullptr;
return static_cast<CFStringRef>(CFArrayGetValueAtIndex(languagesArray.get(), 0));
+#endif
}
static void getLocale(CFStringRef locale, char localeStringBuffer[maxLocaleStringLength])
diff --git a/Source/WebCore/PAL/pal/PlatformMac.cmake b/Source/WebCore/PAL/pal/PlatformMac.cmake
index 42878a606..7323b5d0a 100644
--- a/Source/WebCore/PAL/pal/PlatformMac.cmake
+++ b/Source/WebCore/PAL/pal/PlatformMac.cmake
@@ -1,5 +1,6 @@
list(APPEND PAL_SOURCES
- crypto/commoncrypto/CryptoDigestCommonCrypto.cpp
+ #crypto/commoncrypto/CryptoDigestCommonCrypto.cpp
+ crypto/gcrypt/CryptoDigestGCrypt.cpp
system/mac/SoundMac.mm
diff --git a/Source/WebCore/PlatformMac.cmake b/Source/WebCore/PlatformMac.cmake
index 12d7325c2..dd4955848 100644
--- a/Source/WebCore/PlatformMac.cmake
+++ b/Source/WebCore/PlatformMac.cmake
@@ -114,9 +114,10 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/mac"
"${WEBCORE_DIR}/platform/mediastream/mac"
"${WEBCORE_DIR}/platform/network/cocoa"
- "${WEBCORE_DIR}/platform/network/cf"
- "${WEBCORE_DIR}/platform/network/ios"
- "${WEBCORE_DIR}/platform/network/mac"
+ #"${WEBCORE_DIR}/platform/network/cf"
+ #"${WEBCORE_DIR}/platform/network/ios"
+ #"${WEBCORE_DIR}/platform/network/mac"
+ "${WEBCORE_DIR}/platform/network/soup"
"${WEBCORE_DIR}/platform/text/cf"
"${WEBCORE_DIR}/platform/text/mac"
"${WEBCORE_DIR}/platform/spi/cf"
@@ -241,10 +242,12 @@ list(APPEND WebCore_SOURCES
page/CaptionUserPreferencesMediaAF.cpp
page/PageDebuggable.cpp
- page/cocoa/MemoryReleaseCocoa.mm
- page/cocoa/PerformanceLoggingCocoa.mm
- page/cocoa/ResourceUsageOverlayCocoa.mm
- page/cocoa/ResourceUsageThreadCocoa.mm
+ #page/cocoa/MemoryReleaseCocoa.mm
+ # page/cocoa/PerformanceLoggingCocoa.mm
+ #page/cocoa/ResourceUsageOverlayCocoa.mm
+ #page/cocoa/ResourceUsageThreadCocoa.mm
+ page/linux/ResourceUsageThreadLinux.cpp
+ page/linux/ResourceUsageOverlayLinux.cpp
page/cocoa/SettingsCocoa.mm
page/cocoa/UserAgent.mm
@@ -308,7 +311,7 @@ list(APPEND WebCore_SOURCES
platform/cocoa/KeyEventCocoa.mm
platform/cocoa/LocalizedStringsCocoa.mm
platform/cocoa/MIMETypeRegistryCocoa.mm
- platform/cocoa/MachSendRight.cpp
+ #platform/cocoa/MachSendRight.cpp
platform/cocoa/NetworkExtensionContentFilter.mm
platform/cocoa/ParentalControlsContentFilter.mm
platform/cocoa/RuntimeApplicationChecksCocoa.mm
@@ -316,7 +319,7 @@ list(APPEND WebCore_SOURCES
platform/cocoa/ScrollSnapAnimatorState.mm
platform/cocoa/SearchPopupMenuCocoa.mm
platform/cocoa/SharedBufferCocoa.mm
- platform/cocoa/SleepDisablerCocoa.cpp
+ #platform/cocoa/SleepDisablerCocoa.cpp
platform/cocoa/SystemVersion.mm
platform/cocoa/TelephoneNumberDetectorCocoa.cpp
platform/cocoa/ThemeCocoa.mm
@@ -493,10 +496,10 @@ list(APPEND WebCore_SOURCES
platform/mac/PlatformScreenMac.mm
platform/mac/PlatformSpeechSynthesizerMac.mm
platform/mac/PluginBlacklist.mm
- platform/mac/PowerObserverMac.cpp
+ #platform/mac/PowerObserverMac.cpp
platform/mac/PublicSuffixMac.mm
platform/mac/RemoteCommandListenerMac.mm
- platform/mac/SSLKeyGeneratorMac.mm
+ platform/glib/SSLKeyGeneratorGLib.cpp
platform/mac/ScrollAnimatorMac.mm
platform/mac/ScrollViewMac.mm
platform/mac/ScrollbarThemeMac.mm
@@ -525,51 +528,76 @@ list(APPEND WebCore_SOURCES
platform/mediastream/mac/MockRealtimeVideoSourceMac.mm
- platform/network/cf/AuthenticationCF.cpp
- platform/network/cf/CookieJarCFNet.cpp
- platform/network/cf/CookieStorageCFNet.cpp
- platform/network/cf/CredentialStorageCFNet.cpp
- platform/network/cf/DNSCFNet.cpp
- platform/network/cf/FormDataStreamCFNet.cpp
- platform/network/cf/LoaderRunLoopCF.cpp
- platform/network/cf/NetworkStorageSessionCFNet.cpp
- platform/network/cf/ProxyServerCFNet.cpp
- platform/network/cf/ResourceErrorCF.cpp
- platform/network/cf/ResourceRequestCFNet.cpp
- platform/network/cf/ResourceResponseCFNet.cpp
- platform/network/cf/SocketStreamHandleImplCFNet.cpp
- platform/network/cf/SynchronousLoaderClientCFNet.cpp
- platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp
-
- platform/network/cocoa/CookieCocoa.mm
- platform/network/cocoa/CookieStorageObserver.mm
- platform/network/cocoa/CredentialCocoa.mm
- platform/network/cocoa/NetworkLoadMetrics.mm
- platform/network/cocoa/NetworkStorageSessionCocoa.mm
- platform/network/cocoa/ProtectionSpaceCocoa.mm
- platform/network/cocoa/ResourceRequestCocoa.mm
- platform/network/cocoa/ResourceResponseCocoa.mm
- platform/network/cocoa/WebCoreNSURLSession.mm
-
- platform/network/mac/AuthenticationMac.mm
- platform/network/mac/BlobDataFileReferenceMac.mm
- platform/network/mac/CertificateInfoMac.mm
- platform/network/mac/CookieJarMac.mm
- platform/network/mac/CookieStorageMac.mm
- platform/network/mac/CredentialStorageMac.mm
- platform/network/mac/FormDataStreamMac.mm
- platform/network/mac/NetworkStateNotifierMac.cpp
- platform/network/mac/ResourceErrorMac.mm
- platform/network/mac/ResourceHandleMac.mm
- platform/network/mac/SynchronousLoaderClient.mm
- platform/network/mac/UTIUtilities.mm
- platform/network/mac/WebCoreResourceHandleAsDelegate.mm
- platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
- platform/network/mac/WebCoreURLResponse.mm
+ #platform/network/cf/AuthenticationCF.cpp
+ #platform/network/cf/CookieJarCFNet.cpp
+ #platform/network/cf/CookieStorageCFNet.cpp
+ #platform/network/cf/CredentialStorageCFNet.cpp
+ #platform/network/cf/DNSCFNet.cpp
+ #platform/network/cf/FormDataStreamCFNet.cpp
+ #platform/network/cf/LoaderRunLoopCF.cpp
+ #platform/network/cf/NetworkStorageSessionCFNet.cpp
+ #platform/network/cf/ProxyServerCFNet.cpp
+ #platform/network/cf/ResourceErrorCF.cpp
+ #platform/network/cf/ResourceRequestCFNet.cpp
+ #platform/network/cf/ResourceResponseCFNet.cpp
+ #platform/network/cf/SocketStreamHandleImplCFNet.cpp
+ #platform/network/cf/SynchronousLoaderClientCFNet.cpp
+ #platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp
+
+ #platform/network/cocoa/CookieCocoa.mm
+ #platform/network/cocoa/CookieStorageObserver.mm
+ #platform/network/cocoa/CredentialCocoa.mm
+ #platform/network/cocoa/NetworkLoadMetrics.mm
+ #platform/network/cocoa/NetworkStorageSessionCocoa.mm
+ #platform/network/cocoa/ProtectionSpaceCocoa.mm
+ #platform/network/cocoa/ResourceRequestCocoa.mm
+ #platform/network/cocoa/ResourceResponseCocoa.mm
+ #platform/network/cocoa/WebCoreNSURLSession.mm
+
+ #platform/network/mac/AuthenticationMac.mm
+ #platform/network/mac/BlobDataFileReferenceMac.mm
+ #platform/network/mac/CertificateInfoMac.mm
+ #platform/network/soup/CertificateInfo.cpp
+ #platform/network/mac/CookieJarMac.mm
+ #platform/network/mac/CookieStorageMac.mm
+ #platform/network/mac/CredentialStorageMac.mm
+ #platform/network/mac/FormDataStreamMac.mm
+ #platform/network/mac/NetworkStateNotifierMac.cpp
+ #platform/network/mac/ResourceErrorMac.mm
+ #platform/network/mac/ResourceHandleMac.mm
+ #platform/network/mac/SynchronousLoaderClient.mm
+ #platform/network/mac/UTIUtilities.mm
+ #platform/network/mac/WebCoreResourceHandleAsDelegate.mm
+ #platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
+ #platform/network/mac/WebCoreURLResponse.mm
+
+ platform/network/soup/AuthenticationChallengeSoup.cpp
+ platform/network/soup/CertificateInfo.cpp
+ platform/network/soup/CookieJarSoup.cpp
+ platform/network/soup/CookieStorageSoup.cpp
+ platform/network/soup/CredentialStorageSoup.cpp
+ platform/network/soup/DNSSoup.cpp
+ platform/network/soup/GRefPtrSoup.cpp
+ platform/network/soup/NetworkStorageSessionSoup.cpp
+ platform/network/soup/ProxyServerSoup.cpp
+ platform/network/soup/ResourceErrorSoup.cpp
+ platform/network/soup/ResourceHandleSoup.cpp
+ platform/network/soup/ResourceRequestSoup.cpp
+ platform/network/soup/ResourceResponseSoup.cpp
+ platform/network/soup/SocketStreamHandleImplSoup.cpp
+ platform/network/soup/SoupNetworkSession.cpp
+ platform/network/soup/SynchronousLoaderClientSoup.cpp
+ platform/network/soup/WebKitSoupRequestGeneric.cpp
+
+ platform/soup/PublicSuffixSoup.cpp
+ platform/soup/SharedBufferSoup.cpp
+ platform/soup/URLSoup.cpp
+
+ platform/text/Hyphenation.cpp
platform/posix/FileSystemPOSIX.cpp
- platform/text/cf/HyphenationCF.cpp
+ #platform/text/cf/HyphenationCF.cpp
platform/text/mac/LocaleMac.mm
platform/text/mac/TextBoundaries.mm
diff --git a/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm b/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
index 2379751b8..bf8ca9396 100644
--- a/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
+++ b/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
@@ -33,6 +33,7 @@
#import "RenderObject.h"
#import "WebAccessibilityObjectWrapperMac.h"
#import "WebCoreSystemInterface.h"
+#import <HIServices/Accessibility.h>
#if USE(APPLE_INTERNAL_SDK)
#include <HIServices/AccessibilityPriv.h>
diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
index eec17d8d9..f402a10b8 100644
--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
@@ -83,6 +83,13 @@
#import <wtf/text/StringBuilder.h>
#endif
+#if OS(LINUX)
+#include <bsd/string.h>
+#endif
+
+#import <ApplicationServices/ApplicationServices.h>
+#include <dispatch/dispatch.h>
+
using namespace WebCore;
using namespace HTMLNames;
@@ -3493,7 +3500,9 @@ static NSString* roleValueToNSString(AccessibilityRole value)
}
}
+#if ENABLE(CONTEXT_MENUS)
page->contextMenuController().showContextMenuAt(page->mainFrame(), rect.center());
+#endif
}
- (void)accessibilityScrollToVisible
diff --git a/Source/WebCore/crypto/keys/CryptoKeyEC.h b/Source/WebCore/crypto/keys/CryptoKeyEC.h
index 4c7d0298e..1d4d2e088 100644
--- a/Source/WebCore/crypto/keys/CryptoKeyEC.h
+++ b/Source/WebCore/crypto/keys/CryptoKeyEC.h
@@ -31,7 +31,7 @@
#if ENABLE(SUBTLE_CRYPTO)
-#if OS(DARWIN) && !PLATFORM(GTK)
+#if PLATFORM(COCOA) && !PLATFORM(GTK)
typedef struct _CCECCryptor *CCECCryptorRef;
typedef CCECCryptorRef PlatformECKey;
#endif
diff --git a/Source/WebCore/crypto/keys/CryptoKeyRSA.h b/Source/WebCore/crypto/keys/CryptoKeyRSA.h
index 41bce859e..e156140c8 100644
--- a/Source/WebCore/crypto/keys/CryptoKeyRSA.h
+++ b/Source/WebCore/crypto/keys/CryptoKeyRSA.h
@@ -31,7 +31,7 @@
#if ENABLE(SUBTLE_CRYPTO)
-#if OS(DARWIN) && !PLATFORM(GTK)
+#if PLATFORM(COCOA) && !PLATFORM(GTK)
typedef struct _CCRSACryptor *CCRSACryptorRef;
typedef CCRSACryptorRef PlatformRSAKey;
#endif
diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp
index 6eabcb156..0cc90e94a 100644
--- a/Source/WebCore/css/StyleResolver.cpp
+++ b/Source/WebCore/css/StyleResolver.cpp
@@ -782,9 +782,11 @@ static bool hasEffectiveDisplayNoneForDisplayContents(const Element& element)
// FIXME: <g>, <use> and <tspan> have special (?) behavior for display:contents in the current draft spec.
if (is<SVGElement>(element))
return true;
+#if ENABLE(MATHML)
// Not sure MathML code can handle it.
if (is<MathMLElement>(element))
return true;
+#endif
if (!is<HTMLElement>(element))
return false;
return tagNames.get().contains(element.localName());
diff --git a/Source/WebCore/dom/DataTransferMac.mm b/Source/WebCore/dom/DataTransferMac.mm
index 94711a06d..f7d0e7e12 100644
--- a/Source/WebCore/dom/DataTransferMac.mm
+++ b/Source/WebCore/dom/DataTransferMac.mm
@@ -30,6 +30,8 @@
#import "Element.h"
#import "DragImage.h"
+#if ENABLE(DRAG_SUPPORT)
+
namespace WebCore {
// FIXME: Need to refactor and figure out how to handle the flipping in a more sensible way so we can
@@ -58,3 +60,5 @@ DragImageRef DataTransfer::createDragImage(IntPoint& location) const
}
}
+
+#endif
diff --git a/Source/WebCore/editing/mac/FrameSelectionMac.mm b/Source/WebCore/editing/mac/FrameSelectionMac.mm
index 69eb299df..b05dff299 100644
--- a/Source/WebCore/editing/mac/FrameSelectionMac.mm
+++ b/Source/WebCore/editing/mac/FrameSelectionMac.mm
@@ -30,6 +30,8 @@
#import "Frame.h"
#import "RenderView.h"
+#import <HIServices/UniversalAccess.h>
+
namespace WebCore {
#if !PLATFORM(IOS)
diff --git a/Source/WebCore/fileapi/FileCocoa.mm b/Source/WebCore/fileapi/FileCocoa.mm
index 0d5a697f6..0f003a945 100644
--- a/Source/WebCore/fileapi/FileCocoa.mm
+++ b/Source/WebCore/fileapi/FileCocoa.mm
@@ -32,6 +32,8 @@
#if PLATFORM(IOS)
#import <MobileCoreServices/MobileCoreServices.h>
+#elif PLATFORM(MAC)
+#import <ApplicationServices/ApplicationServices.h>
#endif
namespace WebCore {
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 9d3989431..971a72468 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -5949,7 +5949,7 @@ void HTMLMediaElement::privateBrowsingStateDidChange()
MediaControls* HTMLMediaElement::mediaControls() const
{
-#if ENABLE(MEDIA_CONTROLS_SCRIPT)
+#if ENABLE(MEDIA_CONTROLS_SCRIPT) || PLATFORM(GNUSTEP)
return nullptr;
#else
ShadowRoot* root = userAgentShadowRoot();
@@ -5962,7 +5962,7 @@ MediaControls* HTMLMediaElement::mediaControls() const
bool HTMLMediaElement::hasMediaControls() const
{
-#if ENABLE(MEDIA_CONTROLS_SCRIPT)
+#if ENABLE(MEDIA_CONTROLS_SCRIPT) || PLATFORM(GNUSTEP)
return false;
#else
@@ -5978,7 +5978,7 @@ bool HTMLMediaElement::hasMediaControls() const
bool HTMLMediaElement::createMediaControls()
{
-#if ENABLE(MEDIA_CONTROLS_SCRIPT)
+#if ENABLE(MEDIA_CONTROLS_SCRIPT) || PLATFORM(GNUSTEP)
ensureMediaControlsShadowRoot();
return false;
#else
diff --git a/Source/WebCore/inspector/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/InspectorNetworkAgent.cpp
index f3e3acfcf..f2c52aba0 100644
--- a/Source/WebCore/inspector/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/InspectorNetworkAgent.cpp
@@ -658,8 +658,6 @@ void InspectorNetworkAgent::didReceiveWebSocketFrameError(unsigned long identifi
m_frontendDispatcher->webSocketFrameError(IdentifiersFactory::requestId(identifier), timestamp(), errorMessage);
}
-#endif // ENABLE(WEB_SOCKETS)
-
void InspectorNetworkAgent::enable(ErrorString&)
{
enable();
@@ -706,6 +704,8 @@ void InspectorNetworkAgent::disable(ErrorString&)
m_pageAgent->page().setResourceCachingDisabledOverride(false);
}
+#endif // ENABLE(WEB_SOCKETS)
+
void InspectorNetworkAgent::setExtraHTTPHeaders(ErrorString&, const InspectorObject& headers)
{
for (auto& entry : headers) {
diff --git a/Source/WebCore/page/MemoryRelease.cpp b/Source/WebCore/page/MemoryRelease.cpp
index 1089db046..f060a061c 100644
--- a/Source/WebCore/page/MemoryRelease.cpp
+++ b/Source/WebCore/page/MemoryRelease.cpp
@@ -188,7 +188,7 @@ void logMemoryStatisticsAtTimeOfDeath()
#endif
}
-#if !PLATFORM(COCOA)
+#if !PLATFORM(COCOA) || PLATFORM(GNUSTEP)
void platformReleaseMemory(Critical) { }
void jettisonExpensiveObjectsOnTopLevelNavigation() { }
void registerMemoryReleaseNotifyCallbacks() { }
diff --git a/Source/WebCore/page/PerformanceLogging.cpp b/Source/WebCore/page/PerformanceLogging.cpp
index 24f039603..d0274d221 100644
--- a/Source/WebCore/page/PerformanceLogging.cpp
+++ b/Source/WebCore/page/PerformanceLogging.cpp
@@ -102,7 +102,7 @@ void PerformanceLogging::didReachPointOfInterest(PointOfInterest poi)
#endif
}
-#if !PLATFORM(COCOA)
+#if !PLATFORM(COCOA) || PLATFORM(GNUSTEP)
void PerformanceLogging::getPlatformMemoryUsageStatistics(HashMap<const char*, size_t>&) { }
std::optional<uint64_t> PerformanceLogging::physicalFootprint() { return std::nullopt; }
#endif
diff --git a/Source/WebCore/page/Settings.cpp b/Source/WebCore/page/Settings.cpp
index 668f2c10b..bba20047f 100644
--- a/Source/WebCore/page/Settings.cpp
+++ b/Source/WebCore/page/Settings.cpp
@@ -583,7 +583,7 @@ void Settings::setQTKitEnabled(bool enabled)
return;
gQTKitEnabled = enabled;
- HTMLMediaElement::resetMediaEngines();
+ //HTMLMediaElement::resetMediaEngines();
}
#endif
diff --git a/Source/WebCore/page/cocoa/SettingsCocoa.mm b/Source/WebCore/page/cocoa/SettingsCocoa.mm
index ca14e3198..e8a207ccf 100644
--- a/Source/WebCore/page/cocoa/SettingsCocoa.mm
+++ b/Source/WebCore/page/cocoa/SettingsCocoa.mm
@@ -27,6 +27,7 @@
#include "Settings.h"
#include <wtf/NeverDestroyed.h>
+#import <CoreText/CoreText.h>
#if PLATFORM(IOS)
#include "Device.h"
diff --git a/Source/WebCore/page/scrolling/ScrollingMomentumCalculator.cpp b/Source/WebCore/page/scrolling/ScrollingMomentumCalculator.cpp
index 7640d55d9..c95df52f4 100644
--- a/Source/WebCore/page/scrolling/ScrollingMomentumCalculator.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingMomentumCalculator.cpp
@@ -29,6 +29,8 @@
#include "FloatPoint.h"
#include "FloatSize.h"
+#if ENABLE(CSS_SCROLL_SNAP)
+
namespace WebCore {
static const Seconds scrollSnapAnimationDuration = 1_s;
@@ -233,3 +235,5 @@ float BasicScrollingMomentumCalculator::animationProgressAfterElapsedTime(Second
}
}; // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.h b/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.h
index 89f336b6e..7a895c85f 100644
--- a/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.h
+++ b/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.h
@@ -25,6 +25,8 @@
#pragma once
+#if ENABLE(CSS_SCROLL_SNAP)
+
#include "ScrollingMomentumCalculator.h"
#include <wtf/RetainPtr.h>
@@ -50,3 +52,5 @@ private:
};
} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm
index 66b2e9f9e..054949e67 100644
--- a/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm
+++ b/Source/WebCore/page/scrolling/mac/ScrollingMomentumCalculatorMac.mm
@@ -26,6 +26,8 @@
#include "config.h"
#include "ScrollingMomentumCalculatorMac.h"
+#if ENABLE(CSS_SCROLL_SNAP)
+
#if PLATFORM(MAC)
#include "NSScrollingMomentumCalculatorSPI.h"
@@ -106,3 +108,5 @@ _NSScrollingMomentumCalculator *ScrollingMomentumCalculatorMac::ensurePlatformMo
} // namespace WebCore
#endif // PLATFORM(MAC)
+
+#endif
diff --git a/Source/WebCore/platform/Logging.cpp b/Source/WebCore/platform/Logging.cpp
index 88843995c..d921680e0 100644
--- a/Source/WebCore/platform/Logging.cpp
+++ b/Source/WebCore/platform/Logging.cpp
@@ -31,7 +31,7 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
-#if PLATFORM(COCOA)
+#if OS(DARWIN)
#include <notify.h>
#include <wtf/BlockPtr.h>
#endif
@@ -82,7 +82,7 @@ void initializeLogChannelsIfNecessary()
#ifndef NDEBUG
void registerNotifyCallback(const String& notifyID, WTF::Function<void()>&& callback)
{
-#if PLATFORM(COCOA)
+#if OS(DARWIN)
int token;
notify_register_dispatch(notifyID.utf8().data(), &token, dispatch_get_main_queue(), BlockPtr<void (int)>::fromCallable([callback = WTFMove(callback)] (int) {
callback();
diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h
index e28ff1995..3ef4b2fa1 100644
--- a/Source/WebCore/platform/PlatformScreen.h
+++ b/Source/WebCore/platform/PlatformScreen.h
@@ -28,13 +28,14 @@
#if PLATFORM(MAC)
OBJC_CLASS NSScreen;
OBJC_CLASS NSWindow;
-#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
+/*#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGRect NSRect;
typedef struct CGPoint NSPoint;
#else
typedef struct _NSRect NSRect;
typedef struct _NSPoint NSPoint;
-#endif
+#endif*/
+#include <CoreGraphics/CGGeometry.h>
#endif
#if PLATFORM(IOS)
diff --git a/Source/WebCore/platform/SleepDisabler.cpp b/Source/WebCore/platform/SleepDisabler.cpp
index b243e77d9..ed51b16c0 100644
--- a/Source/WebCore/platform/SleepDisabler.cpp
+++ b/Source/WebCore/platform/SleepDisabler.cpp
@@ -28,7 +28,7 @@
namespace WebCore {
-#if !PLATFORM(COCOA)
+#if !PLATFORM(COCOA) || PLATFORM(GNUSTEP)
std::unique_ptr<SleepDisabler> SleepDisabler::create(const char* reason, Type type)
{
return std::unique_ptr<SleepDisabler>(new SleepDisabler(reason, type));
diff --git a/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp b/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp
index 0b44f5921..cd76fa97e 100644
--- a/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp
+++ b/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp
@@ -24,10 +24,10 @@
*/
#include "config.h"
-#include "AudioHardwareListenerMac.h"
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && ENABLE(WEB_AUDIO)
+#include "AudioHardwareListenerMac.h"
#include <algorithm>
enum {
diff --git a/Source/WebCore/platform/audio/mac/CAAudioStreamDescription.cpp b/Source/WebCore/platform/audio/mac/CAAudioStreamDescription.cpp
index 86bbcb93f..6800047c6 100644
--- a/Source/WebCore/platform/audio/mac/CAAudioStreamDescription.cpp
+++ b/Source/WebCore/platform/audio/mac/CAAudioStreamDescription.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(WEB_AUDIO)
+
#include "CAAudioStreamDescription.h"
namespace WebCore {
@@ -157,3 +160,5 @@ bool operator==(const AudioStreamBasicDescription& a, const AudioStreamBasicDesc
}
}
+
+#endif
diff --git a/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm b/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
index b3c877681..a7b02ba48 100644
--- a/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
+++ b/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
@@ -112,8 +112,10 @@ void MediaSessionManagerMac::clientCharacteristicsChanged(PlatformMediaSession&)
PlatformMediaSession* MediaSessionManagerMac::nowPlayingEligibleSession()
{
+#if ENABLE(VIDEO)
if (auto element = HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager(MediaElementSession::PlaybackControlsPurpose::NowPlaying))
return &element->mediaSession();
+#endif
return nullptr;
}
diff --git a/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp b/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp
index f9e4bf800..8d70455b0 100644
--- a/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp
+++ b/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp
@@ -29,7 +29,7 @@
#include <wtf/AutodrainedPool.h>
#if PLATFORM(MAC)
-#import "PowerObserverMac.h"
+//#import "PowerObserverMac.h"
#elif PLATFORM(IOS)
#import "WebCoreThreadInternal.h"
#import "WebCoreThreadRun.h"
@@ -54,7 +54,7 @@ static void applicationDidBecomeActive(CFNotificationCenterRef, void*, CFStringR
static void setupPowerObserver()
{
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(GNUSTEP)
static PowerObserver* powerObserver;
if (!powerObserver)
powerObserver = std::make_unique<PowerObserver>(restartSharedTimer).release();
diff --git a/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm b/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
index 4e891f970..cfe143593 100644
--- a/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
+++ b/Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
@@ -32,6 +32,7 @@
#import "Logging.h"
#import "ResourceRequest.h"
#import <wtf/BlockObjCExceptions.h>
+#include <dispatch/dispatch.h>
#if !LOG_DISABLED
#import <wtf/text/CString.h>
diff --git a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp b/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp
index 7a3691dfa..9d49eeae7 100644
--- a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp
+++ b/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp
@@ -25,6 +25,8 @@
#include "config.h"
+#if ENABLE(VIDEO)
+
#include <CoreVideo/CoreVideo.h>
#include <wtf/SoftLinking.h>
@@ -69,3 +71,5 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVOpenGLTextureGetTarget, GLen
SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVOpenGLTextureGetName, GLuint, (CVOpenGLTextureRef image), (image))
SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, CoreVideo, kCVPixelBufferIOSurfaceOpenGLFBOCompatibilityKey, CFStringRef)
#endif
+
+#endif
diff --git a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h b/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h
index a9dd2b19e..b45621086 100644
--- a/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h
+++ b/Source/WebCore/platform/cocoa/CoreVideoSoftLink.h
@@ -26,6 +26,8 @@
#ifndef CoreVideoSoftLink_h
#define CoreVideoSoftLink_h
+#if ENABLE(VIDEO)
+
#include <CoreVideo/CoreVideo.h>
#include <wtf/SoftLinking.h>
@@ -109,4 +111,6 @@ SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, CoreVideo, kCVPixelBufferIOSurfaceOpenGLF
#define kCVPixelBufferIOSurfaceOpenGLFBOCompatibilityKey get_CoreVideo_kCVPixelBufferIOSurfaceOpenGLFBOCompatibilityKey()
#endif
+#endif
+
#endif // CoreVideoSoftLink_h
diff --git a/Source/WebCore/platform/cocoa/FileMonitorCocoa.mm b/Source/WebCore/platform/cocoa/FileMonitorCocoa.mm
index 395df7771..5c1cb8666 100644
--- a/Source/WebCore/platform/cocoa/FileMonitorCocoa.mm
+++ b/Source/WebCore/platform/cocoa/FileMonitorCocoa.mm
@@ -30,6 +30,8 @@
#import "Logging.h"
#import <wtf/BlockPtr.h>
+#if OS(DARWIN)
+
namespace WebCore {
constexpr unsigned monitorMask = DISPATCH_VNODE_DELETE | DISPATCH_VNODE_WRITE | DISPATCH_VNODE_RENAME | DISPATCH_VNODE_REVOKE;
@@ -88,3 +90,5 @@ FileMonitor::~FileMonitor()
}
} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/platform/cocoa/FileSystemCocoa.mm b/Source/WebCore/platform/cocoa/FileSystemCocoa.mm
index 51e2259fc..c9de52702 100644
--- a/Source/WebCore/platform/cocoa/FileSystemCocoa.mm
+++ b/Source/WebCore/platform/cocoa/FileSystemCocoa.mm
@@ -56,7 +56,7 @@ String openTemporaryFile(const String& prefix, PlatformFileHandle& platformFileH
platformFileHandle = invalidPlatformFileHandle;
Vector<char> temporaryFilePath(PATH_MAX);
- if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryFilePath.data(), temporaryFilePath.size()))
+ //if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryFilePath.data(), temporaryFilePath.size())) GNUSTEP FIX
return String();
// Shrink the vector.
diff --git a/Source/WebCore/platform/cocoa/MachSendRight.h b/Source/WebCore/platform/cocoa/MachSendRight.h
index cded9dcb0..088fc5adc 100644
--- a/Source/WebCore/platform/cocoa/MachSendRight.h
+++ b/Source/WebCore/platform/cocoa/MachSendRight.h
@@ -26,6 +26,8 @@
#ifndef MachSendRight_h
#define MachSendRight_h
+#if 0
+
#include <mach/mach_port.h>
namespace WebCore {
@@ -56,4 +58,6 @@ private:
}
+#endif
+
#endif // MachSendRight_h
diff --git a/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h b/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h
index 983b7035b..f66e32adf 100644
--- a/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h
+++ b/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h
@@ -27,12 +27,15 @@
#define NetworkExtensionContentFilter_h
#include "PlatformContentFilter.h"
+#if !PLATFORM(GNUSTEP)
#include <objc/NSObjCRuntime.h>
+#endif
#include <wtf/Compiler.h>
#include <wtf/OSObjectPtr.h>
#include <wtf/RetainPtr.h>
+#include <dispatch/dispatch.h>
-enum NEFilterSourceStatus : NSInteger;
+enum NEFilterSourceStatus : int;
OBJC_CLASS NEFilterSource;
OBJC_CLASS NSData;
diff --git a/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp b/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp
index 614cd0e5b..0ca1b3cca 100644
--- a/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp
+++ b/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp
@@ -25,6 +25,8 @@
#include "config.h"
+#if ENABLE(VIDEO)
+
#include <VideoToolbox/VideoToolbox.h>
#include <wtf/SoftLinking.h>
@@ -41,3 +43,5 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTDecompressionSessionDecod
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, VTIsHardwareDecodeSupported, Boolean, (CMVideoCodecType codecType), (codecType))
SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, VideoToolbox, kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder, CFStringRef)
#define kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder get_VideoToolbox_kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder()
+
+#endif
diff --git a/Source/WebCore/platform/cocoa/WebCoreNSErrorExtras.mm b/Source/WebCore/platform/cocoa/WebCoreNSErrorExtras.mm
index 52399d64a..ad2ca074f 100644
--- a/Source/WebCore/platform/cocoa/WebCoreNSErrorExtras.mm
+++ b/Source/WebCore/platform/cocoa/WebCoreNSErrorExtras.mm
@@ -26,7 +26,7 @@
#import "config.h"
#import "WebCoreNSErrorExtras.h"
-#import <AVFoundation/AVError.h>
+//#import <AVFoundation/AVError.h>
namespace WebCore {
@@ -34,7 +34,7 @@ long mediaKeyErrorSystemCode(NSError *error)
{
NSInteger code = [error code];
- if (code == AVErrorUnknown) {
+ if (code == -11800) {
NSError* underlyingError = [error.userInfo valueForKey:NSUnderlyingErrorKey];
if (underlyingError && [underlyingError isKindOfClass:[NSError class]])
return [underlyingError code];
diff --git a/Source/WebCore/platform/graphics/ComplexTextController.h b/Source/WebCore/platform/graphics/ComplexTextController.h
index b2c151f99..4ed68e1fb 100644
--- a/Source/WebCore/platform/graphics/ComplexTextController.h
+++ b/Source/WebCore/platform/graphics/ComplexTextController.h
@@ -34,8 +34,13 @@
typedef unsigned short CGGlyph;
+#if !PLATFORM(GNUSTEP)
typedef const struct __CTRun * CTRunRef;
typedef const struct __CTLine * CTLineRef;
+#else
+typedef struct CTRun *CTRunRef;
+typedef struct CTLine *CTLineRef;
+#endif
namespace WebCore {
diff --git a/Source/WebCore/platform/graphics/FloatPoint.h b/Source/WebCore/platform/graphics/FloatPoint.h
index 6ed4d21a2..99db7e9ac 100644
--- a/Source/WebCore/platform/graphics/FloatPoint.h
+++ b/Source/WebCore/platform/graphics/FloatPoint.h
@@ -34,7 +34,8 @@
#import <Foundation/NSGeometry.h>
#endif
-#if USE(CG)
+#include <CoreGraphics/CGGeometry.h>
+/*#if USE(CG)
typedef struct CGPoint CGPoint;
#endif
@@ -44,7 +45,7 @@ typedef struct CGPoint NSPoint;
#else
typedef struct _NSPoint NSPoint;
#endif
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(MAC)*/
#if PLATFORM(WIN)
struct D2D_POINT_2F;
diff --git a/Source/WebCore/platform/graphics/FloatRect.h b/Source/WebCore/platform/graphics/FloatRect.h
index 7e5558d63..c6a90f21e 100644
--- a/Source/WebCore/platform/graphics/FloatRect.h
+++ b/Source/WebCore/platform/graphics/FloatRect.h
@@ -28,7 +28,8 @@
#include "FloatPoint.h"
-#if USE(CG)
+#include <CoreGraphics/CGGeometry.h>
+/*#if USE(CG)
typedef struct CGRect CGRect;
#endif
@@ -38,7 +39,7 @@ typedef struct CGRect NSRect;
#else
typedef struct _NSRect NSRect;
#endif
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(MAC)*/
#if USE(CAIRO)
typedef struct _cairo_rectangle cairo_rectangle_t;
diff --git a/Source/WebCore/platform/graphics/FloatSize.h b/Source/WebCore/platform/graphics/FloatSize.h
index 51e52acb4..1582ef442 100644
--- a/Source/WebCore/platform/graphics/FloatSize.h
+++ b/Source/WebCore/platform/graphics/FloatSize.h
@@ -34,7 +34,8 @@
#include <CoreGraphics/CoreGraphics.h>
#endif
-#if USE(CG)
+#include <CoreGraphics/CGGeometry.h>
+/*#if USE(CG)
typedef struct CGSize CGSize;
#endif
@@ -44,7 +45,7 @@ typedef struct CGSize NSSize;
#else
typedef struct _NSSize NSSize;
#endif
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(MAC)*/
#if PLATFORM(WIN)
struct D2D_SIZE_F;
diff --git a/Source/WebCore/platform/graphics/FontPlatformData.h b/Source/WebCore/platform/graphics/FontPlatformData.h
index 45db14748..28fb283aa 100644
--- a/Source/WebCore/platform/graphics/FontPlatformData.h
+++ b/Source/WebCore/platform/graphics/FontPlatformData.h
@@ -48,7 +48,9 @@
OBJC_CLASS NSFont;
#endif
-#if PLATFORM(COCOA)
+#if PLATFORM(GNUSTEP)
+typedef struct OPFont* CTFontRef;
+#elif PLATFORM(COCOA)
typedef const struct __CTFont* CTFontRef;
#endif
diff --git a/Source/WebCore/platform/graphics/IntPoint.h b/Source/WebCore/platform/graphics/IntPoint.h
index 1a8d79b1a..c4a797a92 100644
--- a/Source/WebCore/platform/graphics/IntPoint.h
+++ b/Source/WebCore/platform/graphics/IntPoint.h
@@ -32,7 +32,8 @@
#import <Foundation/NSGeometry.h>
#endif
-#if USE(CG)
+#include <CoreGraphics/CGGeometry.h>
+/*#if USE(CG)
typedef struct CGPoint CGPoint;
#endif
@@ -45,7 +46,7 @@ typedef struct CGPoint NSPoint;
typedef struct _NSPoint NSPoint;
#endif
#endif
-#endif // !PLATFORM(IOS)
+#endif // !PLATFORM(IOS)*/
#if PLATFORM(WIN)
typedef struct tagPOINT POINT;
diff --git a/Source/WebCore/platform/graphics/IntRect.h b/Source/WebCore/platform/graphics/IntRect.h
index e262bfb6b..a8a3f3cc4 100644
--- a/Source/WebCore/platform/graphics/IntRect.h
+++ b/Source/WebCore/platform/graphics/IntRect.h
@@ -28,7 +28,8 @@
#include "IntPoint.h"
#include "LayoutUnit.h"
-#if USE(CG)
+#include <CoreGraphics/CGGeometry.h>
+/*#if USE(CG)
typedef struct CGRect CGRect;
#endif
@@ -44,7 +45,7 @@ typedef struct _NSRect NSRect;
#ifndef NSRect
#define NSRect CGRect
#endif
-#endif
+#endif*/
#if PLATFORM(WIN)
typedef struct tagRECT RECT;
diff --git a/Source/WebCore/platform/graphics/IntSize.h b/Source/WebCore/platform/graphics/IntSize.h
index 5dcdfd1a1..ad09f15d1 100644
--- a/Source/WebCore/platform/graphics/IntSize.h
+++ b/Source/WebCore/platform/graphics/IntSize.h
@@ -32,7 +32,8 @@
#import <Foundation/NSGeometry.h>
#endif
-#if USE(CG)
+#include <CoreGraphics/CGGeometry.h>
+/*#if USE(CG)
typedef struct CGSize CGSize;
#endif
@@ -48,7 +49,7 @@ typedef struct _NSSize NSSize;
#ifndef NSSize
#define NSSize CGSize
#endif
-#endif
+#endif*/
#if PLATFORM(WIN)
typedef struct tagSIZE SIZE;
diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
index 0f895ae43..84baa296c 100644
--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
@@ -34,6 +34,8 @@
#import "CoreMediaSoftLink.h"
#import "CoreVideoSoftLink.h"
+#if ENABLE(VIDEO)
+
namespace WebCore {
static inline void releaseUint8Vector(void *array, const void*)
@@ -297,3 +299,6 @@ RefPtr<JSC::Uint8ClampedArray> MediaSampleAVFObjC::getRGBAImageData() const
}
}
+
+#endif
+
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
index f7fbd233f..073926ff9 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
@@ -32,6 +32,7 @@
#include <wtf/HashMap.h>
#include <wtf/RetainPtr.h>
#include <wtf/text/StringHash.h>
+#include <ImageIO/ImageIO.h>
// Enable this to add a light red wash over the visible portion of Tiled Layers, as computed
// by flushCompositingState().
diff --git a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
index 5c9b42ed1..61a7044b9 100644
--- a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
+++ b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
@@ -46,8 +46,8 @@
#import "WebLayer.h"
#import "WebSystemBackdropLayer.h"
#import "WebTiledBackingLayer.h"
-#import <AVFoundation/AVPlayer.h>
-#import <AVFoundation/AVPlayerLayer.h>
+//#import <AVFoundation/AVPlayer.h>
+//#import <AVFoundation/AVPlayerLayer.h>
#import <QuartzCore/QuartzCore.h>
#import <objc/runtime.h>
#import <wtf/BlockObjCExceptions.h>
@@ -63,9 +63,9 @@
#import "ThemeMac.h"
#endif
-SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
+//SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
-SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVPlayerLayer)
+//SOFT_LINK_CLASS_OPTIONAL(AVFoundation, AVPlayerLayer)
using namespace WebCore;
@@ -192,8 +192,8 @@ static NSString *toCAFilterType(PlatformCALayer::FilterType type)
PlatformCALayer::LayerType PlatformCALayerCocoa::layerTypeForPlatformLayer(PlatformLayer* layer)
{
- if ([layer isKindOfClass:getAVPlayerLayerClass()] || [layer isKindOfClass:objc_getClass("WebVideoContainerLayer")])
- return LayerTypeAVPlayerLayer;
+ /*if ([layer isKindOfClass:getAVPlayerLayerClass()] || [layer isKindOfClass:objc_getClass("WebVideoContainerLayer")])
+ return LayerTypeAVPlayerLayer;*/
if ([layer isKindOfClass:[WebGLLayer class]])
return LayerTypeContentsProvidedLayer;
@@ -251,9 +251,9 @@ PlatformCALayerCocoa::PlatformCALayerCocoa(LayerType layerType, PlatformCALayerC
case LayerTypePageTiledBackingLayer:
layerClass = [WebTiledBackingLayer class];
break;
- case LayerTypeAVPlayerLayer:
+ /*case LayerTypeAVPlayerLayer:
layerClass = getAVPlayerLayerClass();
- break;
+ break;*/
case LayerTypeContentsProvidedLayer:
// We don't create PlatformCALayerCocoas wrapped around WebGLLayers or WebGPULayers.
ASSERT_NOT_REACHED();
@@ -349,7 +349,7 @@ Ref<PlatformCALayer> PlatformCALayerCocoa::clone(PlatformCALayerClient* owner) c
newLayer->copyFiltersFrom(*this);
newLayer->updateCustomAppearance(customAppearance());
- if (type == LayerTypeAVPlayerLayer) {
+ /*if (type == LayerTypeAVPlayerLayer) {
ASSERT([newLayer->platformLayer() isKindOfClass:getAVPlayerLayerClass()]);
AVPlayerLayer *destinationPlayerLayer = static_cast<PlatformCALayerCocoa&>(newLayer.get()).avPlayerLayer();
@@ -359,7 +359,7 @@ Ref<PlatformCALayer> PlatformCALayerCocoa::clone(PlatformCALayerClient* owner) c
dispatch_async(dispatch_get_main_queue(), ^{
[destinationPlayerLayer setPlayer:[sourcePlayerLayer player]];
});
- }
+ }*/
if (type == LayerTypeShapeLayer)
newLayer->setShapeRoundedRect(shapeRoundedRect());
@@ -1224,7 +1224,7 @@ unsigned PlatformCALayerCocoa::backingStoreBytesPerPixel() const
return 4;
}
-AVPlayerLayer *PlatformCALayerCocoa::avPlayerLayer() const
+/*AVPlayerLayer *PlatformCALayerCocoa::avPlayerLayer() const
{
if (layerType() != LayerTypeAVPlayerLayer)
return nil;
@@ -1240,4 +1240,4 @@ AVPlayerLayer *PlatformCALayerCocoa::avPlayerLayer() const
ASSERT_NOT_REACHED();
return nil;
-}
+}*/
diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
index c7dd81460..09df52b96 100644
--- a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
+++ b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
@@ -50,6 +50,10 @@
#include "WebCoreSystemInterface.h"
#endif
+#if PLATFORM(MAC)
+#include <CoreServices/CoreServices.h>
+#endif
+
#if USE(IOSURFACE_CANVAS_BACKING_STORE)
#include "IOSurface.h"
#include "IOSurfaceSPI.h"
diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h b/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h
index c0b6392e9..0ad4cfee7 100644
--- a/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h
+++ b/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h
@@ -31,7 +31,7 @@
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
-#if PLATFORM(COCOA) && USE(CA) && !PLATFORM(IOS_SIMULATOR)
+#if PLATFORM(COCOA) && USE(CA) && !PLATFORM(IOS_SIMULATOR) && !PLATFORM(GNUSTEP)
#define USE_IOSURFACE_CANVAS_BACKING_STORE 1
#endif
diff --git a/Source/WebCore/platform/graphics/cg/PDFDocumentImage.h b/Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
index b1c95288d..bf2d61d2e 100644
--- a/Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
+++ b/Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
@@ -34,8 +34,10 @@
#if USE(CG)
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(GNUSTEP)
#define USE_PDFKIT_FOR_PDFDOCUMENTIMAGE 1
+#else
+#define USE_PDFKIT_FOR_PDFDOCUMENTIMAGE 0
#endif
typedef struct CGPDFDocument *CGPDFDocumentRef;
diff --git a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
index 9f0f31244..2a4493850 100644
--- a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
+++ b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
@@ -29,6 +29,7 @@
#include "CoreTextSPI.h"
#include "Font.h"
+#include <CoreFoundation/CoreFoundation.h>
#include <CoreText/SFNTLayoutTypes.h>
#include <wtf/HashSet.h>
@@ -707,25 +708,25 @@ static float stretchFromCoreTextTraits(CFDictionaryRef traits)
static void invalidateFontCache();
-static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
+/*static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
{
ASSERT_UNUSED(observer, observer == &FontCache::singleton());
invalidateFontCache();
-}
+}*/
void FontCache::platformInit()
{
- CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, &fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);
+ //CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, &fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);
-#if PLATFORM(MAC)
+/*#if PLATFORM(MAC)
CFNotificationCenterRef center = CFNotificationCenterGetLocalCenter();
const CFStringRef notificationName = kCFLocaleCurrentLocaleDidChangeNotification;
#else
CFNotificationCenterRef center = CFNotificationCenterGetDarwinNotifyCenter();
const CFStringRef notificationName = CFSTR("com.apple.language.changed");
#endif
- CFNotificationCenterAddObserver(center, this, &fontCacheRegisteredFontsChangedNotificationCallback, notificationName, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);
+ CFNotificationCenterAddObserver(center, this, &fontCacheRegisteredFontsChangedNotificationCallback, notificationName, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);*/
}
Vector<String> FontCache::systemFontFamilies()
@@ -743,7 +744,7 @@ Vector<String> FontCache::systemFontFamilies()
HashSet<String> visited;
for (CFIndex i = 0; i < numMatches; ++i) {
- auto fontDescriptor = static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(matchedDescriptors.get(), i));
+ auto fontDescriptor = (CTFontDescriptorRef)(CFArrayGetValueAtIndex(matchedDescriptors.get(), i));
if (auto familyName = adoptCF(static_cast<CFStringRef>(CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontFamilyNameAttribute))))
visited.add(familyName.get());
}
@@ -896,7 +897,7 @@ public:
Vector<InstalledFont> result;
result.reserveInitialCapacity(count);
for (CFIndex i = 0; i < count; ++i) {
- InstalledFont installedFont(static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(matches.get(), i)));
+ InstalledFont installedFont((CTFontDescriptorRef)(CFArrayGetValueAtIndex(matches.get(), i)));
result.uncheckedAppend(WTFMove(installedFont));
}
return InstalledFontFamily(WTFMove(result));
@@ -919,7 +920,7 @@ public:
CFTypeRef values[] = { kCFBooleanTrue, postScriptNameString.get() };
auto attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
auto fontDescriptorToMatch = adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get()));
- auto match = adoptCF(static_cast<CTFontDescriptorRef>(CTFontDescriptorCreateMatchingFontDescriptor(fontDescriptorToMatch.get(), nullptr)));
+ auto match = adoptCF((CTFontDescriptorRef)(CTFontDescriptorCreateMatchingFontDescriptor(fontDescriptorToMatch.get(), nullptr)));
return InstalledFont(match.get());
}).iterator->value;
}
diff --git a/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm b/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
index 7a1f0f39d..3c87dcde6 100644
--- a/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
+++ b/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
@@ -679,10 +679,10 @@ bool Font::canRenderCombiningCharacterSequence(const UChar* characters, size_t l
CFIndex runCount = CFArrayGetCount(runArray);
for (CFIndex r = 0; r < runCount; r++) {
- CTRunRef ctRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runArray, r));
+ CTRunRef ctRun = (CTRunRef)(CFArrayGetValueAtIndex(runArray, r));
ASSERT(CFGetTypeID(ctRun) == CTRunGetTypeID());
CFDictionaryRef runAttributes = CTRunGetAttributes(ctRun);
- CTFontRef runFont = static_cast<CTFontRef>(CFDictionaryGetValue(runAttributes, kCTFontAttributeName));
+ CTFontRef runFont = (CTFontRef)(CFDictionaryGetValue(runAttributes, kCTFontAttributeName));
if (!CFEqual(fontEqualityObject.get(), FontPlatformData::objectForEqualityCheck(runFont).get()))
return false;
}
diff --git a/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.h b/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.h
index 3294d8788..cbefb9864 100644
--- a/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.h
+++ b/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.h
@@ -27,7 +27,11 @@
#include <wtf/RetainPtr.h>
+#if !PLATFORM(GNUSTEP)
typedef const struct __CTFontDescriptor* CTFontDescriptorRef;
+#else
+typedef struct OPFontDescriptor *CTFontDescriptorRef;
+#endif
namespace WebCore {
diff --git a/Source/WebCore/platform/graphics/cocoa/GPUDeviceMetal.mm b/Source/WebCore/platform/graphics/cocoa/GPUDeviceMetal.mm
index 4d02098c2..b1526c7fb 100644
--- a/Source/WebCore/platform/graphics/cocoa/GPUDeviceMetal.mm
+++ b/Source/WebCore/platform/graphics/cocoa/GPUDeviceMetal.mm
@@ -29,12 +29,12 @@
#import "Logging.h"
#import "WebGPULayer.h"
+#if ENABLE(WEBGPU)
+
#import <Metal/Metal.h>
#import <runtime/ArrayBuffer.h>
#import <wtf/BlockObjCExceptions.h>
-#if ENABLE(WEBGPU)
-
namespace WebCore {
GPUDevice::GPUDevice()
diff --git a/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm b/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
index 373a9ea4c..d63a7776a 100644
--- a/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
+++ b/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
@@ -27,6 +27,7 @@
#import "WebActionDisablingCALayerDelegate.h"
#import <QuartzCore/QuartzCore.h>
+#include <dispatch/dispatch.h>
@implementation WebActionDisablingCALayerDelegate
diff --git a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp b/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp
index 6a4c43144..991fb4c88 100644
--- a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp
+++ b/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(VIDEO)
+
#include "PixelBufferConformerCV.h"
#include "GraphicsContextCG.h"
@@ -118,3 +121,5 @@ RetainPtr<CGImageRef> PixelBufferConformerCV::createImageFromPixelBuffer(CVPixel
}
}
+
+#endif
diff --git a/Source/WebCore/platform/graphics/cv/TextureCacheCV.mm b/Source/WebCore/platform/graphics/cv/TextureCacheCV.mm
index fe7919ce2..b3b94f59f 100644
--- a/Source/WebCore/platform/graphics/cv/TextureCacheCV.mm
+++ b/Source/WebCore/platform/graphics/cv/TextureCacheCV.mm
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(VIDEO)
+
#include "TextureCacheCV.h"
#include "GraphicsContext3D.h"
@@ -90,3 +93,5 @@ RetainPtr<TextureCacheCV::TextureType> TextureCacheCV::textureFromImage(CVImageB
}
}
+
+#endif
diff --git a/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp b/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp
index 9bc37b3e6..23701b56c 100644
--- a/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp
+++ b/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "VideoTextureCopierCV.h"
+#if ENABLE(VIDEO)
+
#include "Logging.h"
#include <wtf/NeverDestroyed.h>
@@ -210,3 +212,5 @@ bool VideoTextureCopierCV::copyVideoTextureToPlatformTexture(TextureType inputTe
}
+
+#endif
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
index 636daa18f..1a9d42b96 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
@@ -239,13 +239,13 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
CFIndex runCount = CFArrayGetCount(runArray);
for (CFIndex r = 0; r < runCount; r++) {
- CTRunRef ctRun = static_cast<CTRunRef>(CFArrayGetValueAtIndex(runArray, m_run.ltr() ? r : runCount - 1 - r));
+ CTRunRef ctRun = (CTRunRef)(CFArrayGetValueAtIndex(runArray, m_run.ltr() ? r : runCount - 1 - r));
ASSERT(CFGetTypeID(ctRun) == CTRunGetTypeID());
CFRange runRange = CTRunGetStringRange(ctRun);
const Font* runFont = font;
if (isSystemFallback) {
CFDictionaryRef runAttributes = CTRunGetAttributes(ctRun);
- CTFontRef runCTFont = static_cast<CTFontRef>(CFDictionaryGetValue(runAttributes, kCTFontAttributeName));
+ CTFontRef runCTFont = (CTFontRef)(CFDictionaryGetValue(runAttributes, kCTFontAttributeName));
ASSERT(runCTFont && CFGetTypeID(runCTFont) == CTFontGetTypeID());
RetainPtr<CFTypeRef> runFontEqualityObject = FontPlatformData::objectForEqualityCheck(runCTFont);
if (!safeCFEqual(runFontEqualityObject.get(), font->platformData().objectForEqualityCheck().get())) {
diff --git a/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h b/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h
index 838c414a0..f46a44235 100644
--- a/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h
+++ b/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h
@@ -28,7 +28,12 @@
#include <wtf/RetainPtr.h>
typedef struct CGFont* CGFontRef;
+
+#if !PLATFORM(GNUSTEP)
typedef const struct __CTFontDescriptor* CTFontDescriptorRef;
+#else
+typedef struct OPFontDescriptor *CTFontDescriptorRef;
+#endif
namespace WebCore {
diff --git a/Source/WebCore/platform/graphics/mac/ImageMac.mm b/Source/WebCore/platform/graphics/mac/ImageMac.mm
index e1cfe3fbd..12467de64 100644
--- a/Source/WebCore/platform/graphics/mac/ImageMac.mm
+++ b/Source/WebCore/platform/graphics/mac/ImageMac.mm
@@ -35,6 +35,8 @@
#import <CoreGraphics/CoreGraphics.h>
#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/MobileCoreServices.h>
+#elif PLATFORM(MAC)
+#import <ApplicationServices/ApplicationServices.h>
#endif
@interface WebCoreBundleFinder : NSObject
diff --git a/Source/WebCore/platform/graphics/mac/UTIUtilities.h b/Source/WebCore/platform/graphics/mac/UTIUtilities.h
new file mode 100644
index 000000000..e15f69b71
--- /dev/null
+++ b/Source/WebCore/platform/graphics/mac/UTIUtilities.h
@@ -0,0 +1,37 @@
+/*
+ * 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 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 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 UTIUtilities_h
+#define UTIUtilities_h
+
+#import <wtf/RetainPtr.h>
+
+namespace WebCore {
+RetainPtr<CFStringRef> mimeTypeFromUTITree(CFStringRef uti);
+RetainPtr<CFStringRef> UTIFromMIMEType(CFStringRef mime);
+bool isDeclaredUTI(CFStringRef UTI);
+}
+
+#endif // UTIUtilities_h
diff --git a/Source/WebCore/platform/mac/BlacklistUpdater.mm b/Source/WebCore/platform/mac/BlacklistUpdater.mm
index 940f82965..a36221212 100644
--- a/Source/WebCore/platform/mac/BlacklistUpdater.mm
+++ b/Source/WebCore/platform/mac/BlacklistUpdater.mm
@@ -75,7 +75,11 @@ void BlacklistUpdater::reloadIfNecessary()
if (stat([blacklistPath fileSystemRepresentation], &statBuf) == -1)
return;
+#if OS(LINUX)
+ if (statBuf.st_mtime == blacklistUpdateTime)
+#else
if (statBuf.st_mtimespec.tv_sec == blacklistUpdateTime)
+#endif
return;
NSDictionary *propertyList = readBlacklistData();
if (!propertyList)
@@ -94,7 +98,11 @@ void BlacklistUpdater::reloadIfNecessary()
s_pluginBlacklist = PluginBlacklist::create(propertyList).release();
s_webGLBlacklist = WebGLBlacklist::create(propertyList).release();
+#if OS(LINUX)
+ blacklistUpdateTime = statBuf.st_mtime;
+#else
blacklistUpdateTime = statBuf.st_mtimespec.tv_sec;
+#endif
}
void BlacklistUpdater::initializeQueue()
diff --git a/Source/WebCore/platform/mac/DragDataMac.mm b/Source/WebCore/platform/mac/DragDataMac.mm
index 8e56b5fa9..ecae77c2e 100644
--- a/Source/WebCore/platform/mac/DragDataMac.mm
+++ b/Source/WebCore/platform/mac/DragDataMac.mm
@@ -37,6 +37,8 @@
#if PLATFORM(IOS)
#import <MobileCoreServices/MobileCoreServices.h>
+#elif PLATFORM(MAC)
+#import <CoreServices/CoreServices.h>
#endif
namespace WebCore {
diff --git a/Source/WebCore/platform/mac/FileSystemMac.mm b/Source/WebCore/platform/mac/FileSystemMac.mm
index 58dcea88b..4ade55f33 100644
--- a/Source/WebCore/platform/mac/FileSystemMac.mm
+++ b/Source/WebCore/platform/mac/FileSystemMac.mm
@@ -31,6 +31,7 @@
#import "WebCoreNSURLExtras.h"
#import "WebCoreSystemInterface.h"
#import <wtf/text/WTFString.h>
+#include <dispatch/dispatch.h>
namespace WebCore {
@@ -70,7 +71,7 @@ bool canExcludeFromBackup()
bool excludeFromBackup(const String& path)
{
// It is critical to pass FALSE for excludeByPath because excluding by path requires root privileges.
- CSBackupSetItemExcluded(pathAsURL(path).get(), TRUE, FALSE);
+ //CSBackupSetItemExcluded(pathAsURL(path).get(), TRUE, FALSE);
return true;
}
diff --git a/Source/WebCore/platform/mac/PasteboardMac.mm b/Source/WebCore/platform/mac/PasteboardMac.mm
index 18dfabc87..0a6008b43 100644
--- a/Source/WebCore/platform/mac/PasteboardMac.mm
+++ b/Source/WebCore/platform/mac/PasteboardMac.mm
@@ -55,6 +55,7 @@
#import <wtf/StdLibExtras.h>
#import <wtf/text/StringBuilder.h>
#import <wtf/unicode/CharacterNames.h>
+#import <CoreServices/CoreServices.h>
namespace WebCore {
diff --git a/Source/WebCore/platform/mac/PasteboardWriter.mm b/Source/WebCore/platform/mac/PasteboardWriter.mm
index 82637f8cd..5df1fc010 100644
--- a/Source/WebCore/platform/mac/PasteboardWriter.mm
+++ b/Source/WebCore/platform/mac/PasteboardWriter.mm
@@ -28,6 +28,7 @@
#if PLATFORM(MAC)
+#import <CoreServices/CoreServices.h>
#import "NSPasteboardSPI.h"
#import "PasteboardWriterData.h"
#import "SharedBuffer.h"
diff --git a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
index 6ba76f4af..109c633a9 100644
--- a/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
+++ b/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
@@ -34,8 +34,9 @@
#import "WebCoreSystemInterface.h"
#import "WindowsKeyboardCodes.h"
#import <HIToolbox/Events.h>
-#import <mach/mach_time.h>
+//#import <mach/mach_time.h>
#import <wtf/ASCIICType.h>
+#include <dispatch/dispatch.h>
namespace WebCore {
@@ -588,10 +589,10 @@ static void updateSystemStartupTimeIntervalSince1970()
{
// CFAbsoluteTimeGetCurrent() provides the absolute time in seconds since 2001.
// mach_absolute_time() provides a relative system time since startup minus the time the computer was suspended.
- mach_timebase_info_data_t timebase_info;
+ /*mach_timebase_info_data_t timebase_info;
mach_timebase_info(&timebase_info);
double elapsedTimeSinceStartup = static_cast<double>(mach_absolute_time()) * timebase_info.numer / timebase_info.denom / 1e9;
- systemStartupTime = kCFAbsoluteTimeIntervalSince1970 + CFAbsoluteTimeGetCurrent() - elapsedTimeSinceStartup;
+ systemStartupTime = kCFAbsoluteTimeIntervalSince1970 + CFAbsoluteTimeGetCurrent() - elapsedTimeSinceStartup;*/
}
static CFTimeInterval cachedStartupTimeIntervalSince1970()
diff --git a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm b/Source/WebCore/platform/mac/PlatformPasteboardMac.mm
index 16a248c7b..4e24c8873 100644
--- a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm
+++ b/Source/WebCore/platform/mac/PlatformPasteboardMac.mm
@@ -28,6 +28,7 @@
#import "URL.h"
#import "PlatformPasteboard.h"
#import "SharedBuffer.h"
+#import <CoreServices/CoreServices.h>
namespace WebCore {
diff --git a/Source/WebCore/platform/mac/ScrollbarThemeMac.mm b/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
index 118256211..fa5de6972 100644
--- a/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
+++ b/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
@@ -37,6 +37,7 @@
#include "ScrollView.h"
#include "WebCoreSystemInterface.h"
#include <Carbon/Carbon.h>
+#include <QuartzCore/CALayer.h>
#include <wtf/BlockObjCExceptions.h>
#include <wtf/HashMap.h>
#include <wtf/NeverDestroyed.h>
@@ -485,7 +486,8 @@ bool ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb(Scrollbar&, const Platf
int ScrollbarThemeMac::scrollbarPartToHIPressedState(ScrollbarPart part)
{
- switch (part) {
+ return 0;
+ /*switch (part) {
case BackButtonStartPart:
return kThemeTopOutsideArrowPressed;
case BackButtonEndPart:
@@ -498,7 +500,7 @@ int ScrollbarThemeMac::scrollbarPartToHIPressedState(ScrollbarPart part)
return kThemeThumbPressed;
default:
return 0;
- }
+ }*/
}
void ScrollbarThemeMac::updateEnabledState(Scrollbar& scrollbar)
diff --git a/Source/WebCore/platform/mac/ThemeMac.mm b/Source/WebCore/platform/mac/ThemeMac.mm
index d8c00330d..cf30b4ae2 100644
--- a/Source/WebCore/platform/mac/ThemeMac.mm
+++ b/Source/WebCore/platform/mac/ThemeMac.mm
@@ -157,7 +157,7 @@ static LengthSize sizeFromFont(const FontCascade& font, const LengthSize& zoomed
return sizeFromNSControlSize(controlSizeForFont(font), zoomedSize, zoomFactor, sizes);
}
-static ControlSize controlSizeFromPixelSize(const std::array<IntSize, 3>& sizes, const IntSize& minZoomedSize, float zoomFactor)
+static NSControlSize controlSizeFromPixelSize(const std::array<IntSize, 3>& sizes, const IntSize& minZoomedSize, float zoomFactor)
{
if (minZoomedSize.width() >= static_cast<int>(sizes[NSControlSizeRegular].width() * zoomFactor)
&& minZoomedSize.height() >= static_cast<int>(sizes[NSControlSizeRegular].height() * zoomFactor))
@@ -170,7 +170,7 @@ static ControlSize controlSizeFromPixelSize(const std::array<IntSize, 3>& sizes,
static void setControlSize(NSCell* cell, const std::array<IntSize, 3>& sizes, const IntSize& minZoomedSize, float zoomFactor)
{
- ControlSize size = controlSizeFromPixelSize(sizes, minZoomedSize, zoomFactor);
+ NSControlSize size = controlSizeFromPixelSize(sizes, minZoomedSize, zoomFactor);
if (size != [cell controlSize]) // Only update if we have to, since AppKit does work even if the size is the same.
[cell setControlSize:(NSControlSize)size];
}
@@ -215,7 +215,8 @@ static void updateStates(NSCell* cell, const ControlStates& controlStates, bool
static ThemeDrawState convertControlStatesToThemeDrawState(ThemeButtonKind kind, const ControlStates& controlStates)
{
- ControlStates::States states = controlStates.states();
+ return 0;
+ /*ControlStates::States states = controlStates.states();
if (!(states & ControlStates::EnabledState))
return kThemeStateUnavailableInactive;
@@ -226,7 +227,7 @@ static ThemeDrawState convertControlStatesToThemeDrawState(ThemeButtonKind kind,
return states & ControlStates::SpinUpState ? kThemeStatePressedUp : kThemeStatePressedDown;
return kThemeStatePressed;
}
- return kThemeStateActive;
+ return kThemeStateActive;*/
}
static FloatRect inflateRect(const FloatRect& zoomedRect, const IntSize& zoomedSize, const int* margins, float zoomFactor)
@@ -570,17 +571,17 @@ static void paintStepper(ControlStates& states, GraphicsContext& context, const
// We don't use NSStepperCell because there are no ways to draw an
// NSStepperCell with the up button highlighted.
- HIThemeButtonDrawInfo drawInfo;
- drawInfo.version = 0;
- drawInfo.state = convertControlStatesToThemeDrawState(kThemeIncDecButton, states);
- drawInfo.adornment = kThemeAdornmentDefault;
- ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), IntSize(zoomedRect.size()), zoomFactor);
- if (controlSize == NSControlSizeSmall)
- drawInfo.kind = kThemeIncDecButtonSmall;
- else if (controlSize == NSControlSizeMini)
- drawInfo.kind = kThemeIncDecButtonMini;
- else
- drawInfo.kind = kThemeIncDecButton;
+ //HIThemeButtonDrawInfo drawInfo;
+ //drawInfo.version = 0;
+ //drawInfo.state = convertControlStatesToThemeDrawState(kThemeIncDecButton, states);
+ //drawInfo.adornment = kThemeAdornmentDefault;
+ //ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), IntSize(zoomedRect.size()), zoomFactor);
+ //if (controlSize == NSControlSizeSmall)
+ // drawInfo.kind = kThemeIncDecButtonSmall;
+ //else if (controlSize == NSControlSizeMini)
+ // drawInfo.kind = kThemeIncDecButtonMini;
+ //else
+ // drawInfo.kind = kThemeIncDecButton;
IntRect rect(zoomedRect);
GraphicsContextStateSaver stateSaver(context);
@@ -593,7 +594,7 @@ static void paintStepper(ControlStates& states, GraphicsContext& context, const
}
CGRect bounds(rect);
CGRect backgroundBounds;
- HIThemeGetButtonBackgroundBounds(&bounds, &drawInfo, &backgroundBounds);
+ //HIThemeGetButtonBackgroundBounds(&bounds, &drawInfo, &backgroundBounds);
// Center the stepper rectangle in the specified area.
backgroundBounds.origin.x = bounds.origin.x + (bounds.size.width - backgroundBounds.size.width) / 2;
if (backgroundBounds.size.height < bounds.size.height) {
@@ -602,7 +603,7 @@ static void paintStepper(ControlStates& states, GraphicsContext& context, const
}
LocalCurrentGraphicsContext localContext(context);
- HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), kHIThemeOrientationNormal, 0);
+ //HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), kHIThemeOrientationNormal, 0);
}
// This will ensure that we always return a valid NSView, even if ScrollView doesn't have an associated document NSView.
@@ -803,7 +804,7 @@ void ThemeMac::inflateControlPaintRect(ControlPart part, const ControlStates& st
}
case InnerSpinButtonPart: {
static const int stepperMargin[4] = { 0, 0, 0, 0 };
- ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), zoomRectSize, zoomFactor);
+ NSControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), zoomRectSize, zoomFactor);
IntSize zoomedSize = stepperSizes()[controlSize];
zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
zoomedSize.setWidth(zoomedSize.width() * zoomFactor);
diff --git a/Source/WebCore/platform/mac/ThreadCheck.mm b/Source/WebCore/platform/mac/ThreadCheck.mm
index ec0b9996f..f8519fa21 100644
--- a/Source/WebCore/platform/mac/ThreadCheck.mm
+++ b/Source/WebCore/platform/mac/ThreadCheck.mm
@@ -31,6 +31,17 @@
#import <wtf/StdLibExtras.h>
#include <wtf/text/StringHash.h>
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
namespace WebCore {
static bool didReadThreadViolationBehaviorFromUserDefaults = false;
diff --git a/Source/WebCore/platform/mac/WebCoreFullScreenWarningView.mm b/Source/WebCore/platform/mac/WebCoreFullScreenWarningView.mm
index 3494b88ac..7343a2ddf 100644
--- a/Source/WebCore/platform/mac/WebCoreFullScreenWarningView.mm
+++ b/Source/WebCore/platform/mac/WebCoreFullScreenWarningView.mm
@@ -45,6 +45,8 @@ static const CGFloat WarningViewShadowAlpha = 1;
static const NSSize WarningViewShadowOffset = {0, -2};
static const CGFloat WarningViewShadowRadius = 5;
+#if ENABLE(FULLSCREEN_API)
+
@implementation WebCoreFullScreenWarningView
- (id)initWithTitle:(NSString*)title
@@ -107,3 +109,5 @@ static const CGFloat WarningViewShadowRadius = 5;
@end
#endif // !PLATFORM(IOS)
+
+#endif
diff --git a/Source/WebCore/platform/mac/WebCoreSystemInterface.h b/Source/WebCore/platform/mac/WebCoreSystemInterface.h
index 5adf12e3f..1f82e4bf7 100644
--- a/Source/WebCore/platform/mac/WebCoreSystemInterface.h
+++ b/Source/WebCore/platform/mac/WebCoreSystemInterface.h
@@ -27,13 +27,14 @@
#define WebCoreSystemInterface_h
#include <objc/objc.h>
+#include <CoreGraphics/CGGeometry.h>
typedef const struct __CFString * CFStringRef;
typedef const struct __CFNumber * CFNumberRef;
typedef const struct __CFDictionary * CFDictionaryRef;
-typedef struct CGPoint CGPoint;
-typedef struct CGSize CGSize;
-typedef struct CGRect CGRect;
+//typedef struct CGPoint CGPoint;
+//typedef struct CGSize CGSize;
+//typedef struct CGRect CGRect;
typedef struct CGAffineTransform CGAffineTransform;
typedef struct CGContext *CGContextRef;
typedef struct CGImage *CGImageRef;
@@ -47,10 +48,17 @@ typedef struct __CFRunLoop * CFRunLoopRef;
typedef struct __CFHTTPMessage *CFHTTPMessageRef;
typedef struct _CFURLResponse *CFURLResponseRef;
typedef const struct _CFURLRequest *CFURLRequestRef;
+#if !PLATFORM(GNUSTEP)
typedef const struct __CTFont * CTFontRef;
typedef const struct __CTLine * CTLineRef;
typedef const struct __CTRun * CTRunRef;
typedef const struct __CTTypesetter * CTTypesetterRef;
+#else
+typedef struct OPFont * CTFontRef;
+typedef struct CTLine * CTLineRef;
+typedef struct CTRun * CTRunRef;
+typedef struct CTTypesetter * CTTypesetterRef;
+#endif
typedef const struct __AXUIElement *AXUIElementRef;
#if !PLATFORM(IOS)
typedef struct _NSRange NSRange;
@@ -63,7 +71,7 @@ typedef struct __IOSurface *IOSurfaceRef;
#endif // !PLATFORM(IOS_SIMULATOR)
#endif
-#if !PLATFORM(IOS)
+/*#if !PLATFORM(IOS)
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGPoint NSPoint;
typedef struct CGRect NSRect;
@@ -71,7 +79,7 @@ typedef struct CGRect NSRect;
typedef struct _NSPoint NSPoint;
typedef struct _NSRect NSRect;
#endif
-#endif // !PLATFORM(IOS)
+#endif // !PLATFORM(IOS)*/
#if PLATFORM(IOS)
#include <CoreGraphics/CoreGraphics.h>
diff --git a/Source/WebCore/platform/mac/WebGLBlacklist.mm b/Source/WebCore/platform/mac/WebGLBlacklist.mm
index 6724bcfad..f95e91310 100644
--- a/Source/WebCore/platform/mac/WebGLBlacklist.mm
+++ b/Source/WebCore/platform/mac/WebGLBlacklist.mm
@@ -26,7 +26,7 @@
#import "config.h"
#import "WebGLBlacklist.h"
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && ENABLE(WEBGL)
#import "BlacklistUpdater.h"
#import "CFUtilitiesSPI.h"
diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h
index dfca3240a..fae2e201c 100644
--- a/Source/WebCore/platform/network/NetworkStorageSession.h
+++ b/Source/WebCore/platform/network/NetworkStorageSession.h
@@ -77,7 +77,7 @@ public:
NSHTTPCookieStorage *nsCookieStorage() const;
#endif
-#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
+#if (PLATFORM(COCOA) || USE(CFURLCONNECTION)) && !PLATFORM(GNUSTEP)
WEBCORE_EXPORT static void ensureSession(SessionID, const String& identifierBase, RetainPtr<CFHTTPCookieStorageRef>&&);
NetworkStorageSession(SessionID, RetainPtr<CFURLStorageSessionRef>&&, RetainPtr<CFHTTPCookieStorageRef>&&);
@@ -120,7 +120,7 @@ private:
static HashMap<SessionID, std::unique_ptr<NetworkStorageSession>>& globalSessionMap();
SessionID m_sessionID;
-#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
+#if (PLATFORM(COCOA) || USE(CFURLCONNECTION)) && !PLATFORM(GNUSTEP)
RetainPtr<CFURLStorageSessionRef> m_platformSession;
RetainPtr<CFHTTPCookieStorageRef> m_platformCookieStorage;
#elif USE(SOUP)
diff --git a/Source/WebCore/platform/network/ResourceHandleInternal.h b/Source/WebCore/platform/network/ResourceHandleInternal.h
index 5f34de8c4..61ea52d32 100644
--- a/Source/WebCore/platform/network/ResourceHandleInternal.h
+++ b/Source/WebCore/platform/network/ResourceHandleInternal.h
@@ -210,6 +210,10 @@ public:
#endif
#if PLATFORM(COCOA)
+#ifndef nil
+#define nil 0
+#endif
+
// We need to keep a reference to the original challenge to be able to cancel it.
// It is almost identical to m_currentWebChallenge.nsURLAuthenticationChallenge(), but has a different sender.
NSURLAuthenticationChallenge *m_currentMacChallenge { nil };
diff --git a/Source/WebCore/platform/network/cf/CertificateInfo.h b/Source/WebCore/platform/network/cf/CertificateInfo.h
index 3619015d3..929f3b86a 100644
--- a/Source/WebCore/platform/network/cf/CertificateInfo.h
+++ b/Source/WebCore/platform/network/cf/CertificateInfo.h
@@ -29,7 +29,7 @@
#include "PlatformExportMacros.h"
#include <wtf/RetainPtr.h>
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && HAVE(SEC_TRUST_SERIALIZATION)
#include <Security/SecTrust.h>
#endif
@@ -68,7 +68,7 @@ public:
bool isEmpty() const { return type() == Type::None; }
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && HAVE(SEC_TRUST_SERIALIZATION)
static RetainPtr<CFArrayRef> certificateChainFromSecTrust(SecTrustRef);
#endif
diff --git a/Source/WebCore/platform/network/cocoa/CredentialCocoa.h b/Source/WebCore/platform/network/cocoa/CredentialCocoa.h
index a69fc25af..a03634ad1 100644
--- a/Source/WebCore/platform/network/cocoa/CredentialCocoa.h
+++ b/Source/WebCore/platform/network/cocoa/CredentialCocoa.h
@@ -26,7 +26,7 @@
#pragma once
#include "CredentialBase.h"
-#include <Security/SecBase.h>
+//#include <Security/SecBase.h>
#include <wtf/RetainPtr.h>
#if USE(CFURLCONNECTION)
diff --git a/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm b/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm
index 9b735ba77..f6c76062e 100644
--- a/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm
+++ b/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm
@@ -75,8 +75,8 @@ Credential::Credential(const Credential& original, CredentialPersistence persist
if (NSString *user = originalNSURLCredential.user)
m_nsCredential = adoptNS([[NSURLCredential alloc] initWithUser:user password:originalNSURLCredential.password persistence:toNSURLCredentialPersistence(persistence)]);
- else if (SecIdentityRef identity = originalNSURLCredential.identity)
- m_nsCredential = adoptNS([[NSURLCredential alloc] initWithIdentity:identity certificates:originalNSURLCredential.certificates persistence:toNSURLCredentialPersistence(persistence)]);
+ /*else if (SecIdentityRef identity = originalNSURLCredential.identity)
+ m_nsCredential = adoptNS([[NSURLCredential alloc] initWithIdentity:identity certificates:originalNSURLCredential.certificates persistence:toNSURLCredentialPersistence(persistence)]);*/
else {
// It is not possible to set the persistence of server trust credentials.
ASSERT_NOT_REACHED();
diff --git a/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h b/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h
index 9873bc342..cfe0f0378 100644
--- a/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h
+++ b/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h
@@ -26,6 +26,7 @@
#ifndef WebCoreNSURLSession_h
#define WebCoreNSURLSession_h
+#include <dispatch/dispatch.h>
#import <Foundation/NSURLSession.h>
#import <wtf/HashSet.h>
#import <wtf/Lock.h>
@@ -104,6 +105,8 @@ WEBCORE_EXPORT @interface WebCoreNSURLSession : NSObject {
- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (^)(NSURL * location, NSURLResponse * response, NSError * error))completionHandler;
@end
+#if ENABLE(VIDEO)
+
@interface WebCoreNSURLSessionDataTask : NSObject {
WebCoreNSURLSession *_session;
RefPtr<WebCore::PlatformMediaResource> _resource;
@@ -138,6 +141,8 @@ WEBCORE_EXPORT @interface WebCoreNSURLSession : NSObject {
- (void)resume;
@end
+#endif
+
NS_ASSUME_NONNULL_END
#endif
diff --git a/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm b/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
index 41cb090d5..ea7dfad53 100644
--- a/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
+++ b/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
@@ -341,6 +341,8 @@ NS_ASSUME_NONNULL_END
namespace WebCore {
+#if ENABLE(VIDEO)
+
class WebCoreNSURLSessionDataTaskClient : public PlatformMediaResourceClient {
public:
WebCoreNSURLSessionDataTaskClient(WebCoreNSURLSessionDataTask *task)
@@ -403,6 +405,10 @@ void WebCoreNSURLSessionDataTaskClient::loadFinished(PlatformMediaResource& reso
}
+#endif
+
+#if ENABLE(VIDEO)
+
#pragma mark - WebCoreNSURLSessionDataTask
@implementation WebCoreNSURLSessionDataTask
@@ -657,3 +663,5 @@ void WebCoreNSURLSessionDataTaskClient::loadFinished(PlatformMediaResource& reso
[self _resource:resource loadFinishedWithError:nil];
}
@end
+
+#endif
diff --git a/Source/WebCore/platform/network/soup/AuthenticationChallenge.h b/Source/WebCore/platform/network/soup/AuthenticationChallenge.h
index c6d4bd1dd..94ce7a838 100644
--- a/Source/WebCore/platform/network/soup/AuthenticationChallenge.h
+++ b/Source/WebCore/platform/network/soup/AuthenticationChallenge.h
@@ -27,6 +27,7 @@
#include "AuthenticationChallengeBase.h"
#include "AuthenticationClient.h"
+#include <wtf/glib/GRefPtr.h>
typedef struct _SoupAuth SoupAuth;
typedef struct _SoupMessage SoupMessage;
diff --git a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index bfb173be1..6127c1b67 100644
--- a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -61,6 +61,23 @@
#include <wtf/glib/RunLoopSourcePriority.h>
#include <wtf/text/CString.h>
+enum RunLoopSourcePriority {
+ RunLoopDispatcher = 100,
+ RunLoopTimer = 0,
+ JavascriptTimer = 200,
+ MainThreadDispatcherTimer = 100,
+ MemoryPressureHandlerTimer = -100,
+ MainThreadSharedTimer = 100,
+ ReleaseUnusedResourcesTimer = 200,
+ CompositingThreadUpdateTimer = 110,
+ LayerFlushTimer = -100,
+ DisplayRefreshMonitorTimer = -100,
+ NonAcceleratedDrawingTimer = 100,
+ AsyncIONetwork = 100,
+ DiskCacheRead = 100,
+ DiskCacheWrite = 200,
+};
+
namespace WebCore {
static const size_t gDefaultReadBufferSize = 8192;
diff --git a/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp b/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
index e8594e943..ed2c9a4ee 100644
--- a/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
+++ b/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
@@ -46,6 +46,23 @@
#include <wtf/glib/RunLoopSourcePriority.h>
#include <wtf/text/CString.h>
+enum RunLoopSourcePriority {
+ RunLoopDispatcher = 100,
+ RunLoopTimer = 0,
+ JavascriptTimer = 200,
+ MainThreadDispatcherTimer = 100,
+ MemoryPressureHandlerTimer = -100,
+ MainThreadSharedTimer = 100,
+ ReleaseUnusedResourcesTimer = 200,
+ CompositingThreadUpdateTimer = 110,
+ LayerFlushTimer = -100,
+ DisplayRefreshMonitorTimer = -100,
+ NonAcceleratedDrawingTimer = 100,
+ AsyncIONetwork = 100,
+ DiskCacheRead = 100,
+ DiskCacheWrite = 200,
+};
+
#define READ_BUFFER_SIZE 1024
namespace WebCore {
diff --git a/Source/WebCore/platform/posix/FileSystemPOSIX.cpp b/Source/WebCore/platform/posix/FileSystemPOSIX.cpp
index dff9b8598..79f68f484 100644
--- a/Source/WebCore/platform/posix/FileSystemPOSIX.cpp
+++ b/Source/WebCore/platform/posix/FileSystemPOSIX.cpp
@@ -38,6 +38,7 @@
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/file.h>
#include <unistd.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
diff --git a/Source/WebCore/platform/spi/cf/CFNetworkSPI.h b/Source/WebCore/platform/spi/cf/CFNetworkSPI.h
index 5738474c5..2b33617fe 100644
--- a/Source/WebCore/platform/spi/cf/CFNetworkSPI.h
+++ b/Source/WebCore/platform/spi/cf/CFNetworkSPI.h
@@ -29,6 +29,7 @@
#include "CFNetworkConnectionCacheSPI.h"
#include <CFNetwork/CFNetwork.h>
+#include <dispatch/dispatch.h>
#if PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
diff --git a/Source/WebCore/platform/spi/cocoa/NEFilterSourceSPI.h b/Source/WebCore/platform/spi/cocoa/NEFilterSourceSPI.h
index f8bd9f014..8b3b2c2c4 100644
--- a/Source/WebCore/platform/spi/cocoa/NEFilterSourceSPI.h
+++ b/Source/WebCore/platform/spi/cocoa/NEFilterSourceSPI.h
@@ -29,7 +29,7 @@
#else
-typedef NS_ENUM(NSInteger, NEFilterSourceStatus) {
+typedef NS_ENUM(int, NEFilterSourceStatus) {
NEFilterSourceStatusPass = 1,
NEFilterSourceStatusBlock = 2,
NEFilterSourceStatusNeedsMoreData = 3,
diff --git a/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h b/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
index f2329686f..fe7b6653e 100644
--- a/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
+++ b/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
@@ -24,7 +24,10 @@
*/
#import <QuartzCore/QuartzCore.h>
+
+#if USE(IOSURFACE)
#import <WebCore/IOSurfaceSPI.h>
+#endif
#if USE(APPLE_INTERNAL_SDK)
diff --git a/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h b/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
index 32bfcbf08..4675f2b57 100644
--- a/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
+++ b/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
@@ -34,6 +34,8 @@
#if PLATFORM(MAC)
+#import <CoreGraphics/CoreGraphics.h>
+
#if USE(APPLE_INTERNAL_SDK)
// Can't include DDAction.h because as of this writing it is a private header that includes a non-private header with an "" include.
diff --git a/Source/WebCore/platform/text/mac/TextBoundaries.mm b/Source/WebCore/platform/text/mac/TextBoundaries.mm
index 5c39d6319..43b2252bd 100644
--- a/Source/WebCore/platform/text/mac/TextBoundaries.mm
+++ b/Source/WebCore/platform/text/mac/TextBoundaries.mm
@@ -26,7 +26,10 @@
#import "config.h"
#import "TextBoundaries.h"
+#if !USE(APPKIT)
#import <CoreFoundation/CFStringTokenizer.h>
+#endif
+
#import <Foundation/Foundation.h>
#import <unicode/ubrk.h>
#import <unicode/uchar.h>
diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm
index d634165c8..3c36f385e 100644
--- a/Source/WebCore/rendering/RenderThemeMac.mm
+++ b/Source/WebCore/rendering/RenderThemeMac.mm
@@ -451,7 +451,7 @@ static RGBA32 convertNSColorToColor(NSColor *color)
static RGBA32 menuBackgroundColor()
{
- NSBitmapImageRep *offscreenRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil
+ /*NSBitmapImageRep *offscreenRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil
pixelsWide:1
pixelsHigh:1
bitsPerSample:8
@@ -474,7 +474,9 @@ static RGBA32 menuBackgroundColor()
[offscreenRep release];
- return makeRGB(pixel[0], pixel[1], pixel[2]);
+ return makeRGB(pixel[0], pixel[1], pixel[2]);*/
+ // GNUSTEP: FIXME
+ return makeRGB(0, 0, 0);
}
void RenderThemeMac::platformColorsDidChange()
@@ -1130,31 +1132,31 @@ bool RenderThemeMac::paintProgressBar(const RenderObject& renderObject, const Pa
NSControlSize controlSize = controlSizeForFont(renderObject.style());
const auto& renderProgress = downcast<RenderProgress>(renderObject);
- HIThemeTrackDrawInfo trackInfo;
- trackInfo.version = 0;
- if (controlSize == NSControlSizeRegular)
- trackInfo.kind = renderProgress.position() < 0 ? kThemeLargeIndeterminateBar : kThemeLargeProgressBar;
- else
- trackInfo.kind = renderProgress.position() < 0 ? kThemeMediumIndeterminateBar : kThemeMediumProgressBar;
-
- float deviceScaleFactor = renderObject.document().deviceScaleFactor();
- trackInfo.bounds = IntRect(IntPoint(), inflatedRect.size());
- trackInfo.min = 0;
- trackInfo.max = std::numeric_limits<SInt32>::max();
- trackInfo.value = lround(renderProgress.position() * nextafter(trackInfo.max, 0));
- trackInfo.trackInfo.progress.phase = lround(renderProgress.animationProgress() * nextafter(progressAnimationNumFrames, 0) * deviceScaleFactor);
- trackInfo.attributes = kThemeTrackHorizontal;
- trackInfo.enableState = isActive(renderObject) ? kThemeTrackActive : kThemeTrackInactive;
- trackInfo.reserved = 0;
- trackInfo.filler1 = 0;
-
- std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::createCompatibleBuffer(inflatedRect.size(), deviceScaleFactor, ColorSpaceSRGB, paintInfo.context());
- if (!imageBuffer)
- return true;
-
- ContextContainer cgContextContainer(imageBuffer->context());
- CGContextRef cgContext = cgContextContainer.context();
- HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
+ //HIThemeTrackDrawInfo trackInfo;
+ //trackInfo.version = 0;
+ //if (controlSize == NSControlSizeRegular)
+ // trackInfo.kind = renderProgress.position() < 0 ? kThemeLargeIndeterminateBar : kThemeLargeProgressBar;
+ //else
+ // trackInfo.kind = renderProgress.position() < 0 ? kThemeMediumIndeterminateBar : kThemeMediumProgressBar;
+
+ //float deviceScaleFactor = renderObject.document().deviceScaleFactor();
+ //trackInfo.bounds = IntRect(IntPoint(), inflatedRect.size());
+ //trackInfo.min = 0;
+ //trackInfo.max = std::numeric_limits<SInt32>::max();
+ //trackInfo.value = lround(renderProgress.position() * nextafter(trackInfo.max, 0));
+ //trackInfo.trackInfo.progress.phase = lround(renderProgress.animationProgress() * nextafter(progressAnimationNumFrames, 0) * deviceScaleFactor);
+ //trackInfo.attributes = kThemeTrackHorizontal;
+ //trackInfo.enableState = isActive(renderObject) ? kThemeTrackActive : kThemeTrackInactive;
+ //trackInfo.reserved = 0;
+ //trackInfo.filler1 = 0;
+
+ //std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::createCompatibleBuffer(inflatedRect.size(), deviceScaleFactor, ColorSpaceSRGB, paintInfo.context());
+ //if (!imageBuffer)
+ // return true;
+
+ //ContextContainer cgContextContainer(imageBuffer->context());
+ //CGContextRef cgContext = cgContextContainer.context();
+ //HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
GraphicsContextStateSaver stateSaver(paintInfo.context());
@@ -1163,7 +1165,7 @@ bool RenderThemeMac::paintProgressBar(const RenderObject& renderObject, const Pa
paintInfo.context().scale(FloatSize(-1, 1));
}
- paintInfo.context().drawConsumingImageBuffer(WTFMove(imageBuffer), inflatedRect.location());
+ //paintInfo.context().drawConsumingImageBuffer(WTFMove(imageBuffer), inflatedRect.location());
return false;
}
diff --git a/Source/cmake/OptionsMac.cmake b/Source/cmake/OptionsMac.cmake
index 091152417..a750e9786 100644
--- a/Source/cmake/OptionsMac.cmake
+++ b/Source/cmake/OptionsMac.cmake
@@ -111,11 +111,11 @@ WEBKIT_OPTION_END()
set(ENABLE_GRAPHICS_CONTEXT_3D ON)
set(ENABLE_WEBKIT_LEGACY ON)
-set(ENABLE_WEBKIT ON)
+#set(ENABLE_WEBKIT ON)
set(WebCore_LIBRARY_TYPE SHARED)
set(WebCoreTestSupport_LIBRARY_TYPE SHARED)
set(WebKit_LIBRARY_TYPE SHARED)
add_definitions(-DU_DISABLE_RENAMING=1 -DU_SHOW_CPLUSPLUS_API=0)
-set(ICU_LIBRARIES libicucore.dylib)
+set(ICU_LIBRARIES icucore)
diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt
index a0d91f705..94906cfc1 100644
--- a/Tools/CMakeLists.txt
+++ b/Tools/CMakeLists.txt
@@ -17,7 +17,7 @@ if ("${PORT}" STREQUAL "GTK")
endif ()
elseif ("${PORT}" STREQUAL "Mac")
add_subdirectory(DumpRenderTree)
- add_subdirectory(WebKitTestRunner)
+ # add_subdirectory(WebKitTestRunner)
add_subdirectory(MiniBrowser/mac)
elseif ("${PORT}" STREQUAL "JSCOnly")
if (ENABLE_API_TESTS)
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index a4987a183..0c5941eef 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -1213,7 +1213,8 @@ sub isWindowsXP()
sub isDarwin()
{
- return ($^O eq "darwin") || 0;
+ #return ($^O eq "darwin") || 0;
+ return 1;
}
sub isWindows()
diff --git a/Tools/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt
index fb7d52339..32f31c2db 100644
--- a/Tools/WebKitTestRunner/CMakeLists.txt
+++ b/Tools/WebKitTestRunner/CMakeLists.txt
@@ -118,4 +118,4 @@ add_dependencies(WebKitTestRunner WebKitTestRunnerBindings)
if (NOT APPLE)
add_dependencies(WebKit2 ${ForwardingHeadersForWebKitTestRunner_NAME})
-endif ()
\ No newline at end of file
+endif ()
--
2.13.3
From 7043c288f3243a36a4fdb08ab33043ec320d3dcc Mon Sep 17 00:00:00 2001
From: Daniel Ferreira <dtf@stanford.edu>
Date: Sat, 19 Aug 2017 21:16:08 +0000
Subject: [PATCH 2/3] Second patch round
---
Source/WTF/wtf/FeatureDefines.h | 32 +++---
Source/WTF/wtf/Platform.h | 2 +-
Source/WTF/wtf/PlatformMac.cmake | 3 +
Source/WTF/wtf/text/cf/TextBreakIteratorCF.h | 15 +--
Source/WebCore/PAL/pal/PlatformMac.cmake | 3 +-
Source/WebCore/PlatformMac.cmake | 44 +++++---
Source/WebCore/editing/cocoa/EditorCocoa.mm | 10 ++
Source/WebCore/editing/cocoa/HTMLConverter.mm | 2 +-
Source/WebCore/editing/mac/DictionaryLookup.mm | 2 +-
Source/WebCore/editing/mac/EditorMac.mm | 8 ++
Source/WebCore/html/HTMLPlugInElement.cpp | 2 +-
Source/WebCore/inspector/InspectorController.cpp | 2 +
Source/WebCore/inspector/InspectorNetworkAgent.cpp | 6 +-
Source/WebCore/loader/ResourceLoader.cpp | 2 +-
Source/WebCore/loader/ResourceLoader.h | 4 +-
Source/WebCore/loader/SubresourceLoader.h | 4 +-
.../loader/archive/cf/LegacyWebArchiveMac.mm | 8 +-
.../WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm | 7 +-
.../WebCore/loader/cocoa/SubresourceLoaderCocoa.mm | 8 +-
Source/WebCore/loader/mac/DocumentLoaderMac.cpp | 2 +-
Source/WebCore/page/DOMWindow.cpp | 4 +-
Source/WebCore/page/MemoryRelease.cpp | 2 +-
Source/WebCore/page/Page.cpp | 6 +-
Source/WebCore/page/mac/EventHandlerMac.mm | 4 +-
Source/WebCore/page/mac/PageMac.mm | 4 +-
Source/WebCore/page/mac/TextIndicatorWindow.mm | 8 +-
.../WebCore/page/mac/WheelEventDeltaFilterMac.mm | 6 +-
Source/WebCore/platform/DragImage.cpp | 3 +
Source/WebCore/platform/ScrollableArea.cpp | 4 +-
.../platform/audio/mac/MediaSessionManagerMac.mm | 5 +
Source/WebCore/platform/cocoa/FileSystemCocoa.mm | 4 +-
.../platform/cocoa/MIMETypeRegistryCocoa.mm | 9 +-
.../cocoa/NetworkExtensionContentFilter.mm | 8 +-
.../cocoa/ParentalControlsContentFilter.mm | 2 +-
.../graphics/ca/cocoa/PlatformCALayerCocoa.mm | 2 +
.../WebCore/platform/graphics/cg/UTIRegistry.cpp | 7 +-
.../WebCore/platform/gtk/LocalizedStringsGtk.cpp | 2 +
Source/WebCore/platform/mac/BlacklistUpdater.mm | 6 ++
Source/WebCore/platform/mac/PlatformScreenMac.mm | 5 +-
Source/WebCore/platform/mac/PluginBlacklist.mm | 5 +-
Source/WebCore/platform/mac/ScrollbarThemeMac.mm | 53 ++++-----
Source/WebCore/platform/mac/ThemeMac.mm | 2 +-
.../mac/WebCoreFullScreenPlaceholderView.mm | 9 +-
.../WebCore/platform/mac/WebCoreNSStringExtras.mm | 5 +-
Source/WebCore/platform/mac/WidgetMac.mm | 2 +
Source/WebCore/platform/network/Cookie.cpp | 2 +-
Source/WebCore/platform/network/Credential.h | 2 +-
.../platform/network/NetworkStateNotifier.cpp | 2 +-
.../platform/network/NetworkStorageSession.h | 2 +-
.../platform/network/ProtectionSpaceBase.cpp | 3 +-
.../platform/network/ResourceHandleClient.cpp | 2 +-
.../platform/network/ResourceHandleClient.h | 4 +-
.../platform/network/cocoa/ResourceRequestCocoa.mm | 14 +--
.../network/cocoa/ResourceResponseCocoa.mm | 10 +-
.../platform/network/mac/ResourceErrorMac.mm | 2 +-
.../platform/network/soup/ResourceErrorSoup.cpp | 6 +-
Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h | 4 +-
Source/WebCore/platform/spi/cocoa/CoreTextSPI.h | 2 +-
Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h | 4 +-
Source/WebCore/rendering/RenderTheme.h | 2 +-
Source/WebCore/rendering/RenderThemeIOS.h | 2 +-
Source/WebCore/rendering/RenderThemeIOS.mm | 4 +-
Source/WebCore/rendering/RenderThemeMac.h | 2 +-
Source/WebCore/rendering/RenderThemeMac.mm | 4 +-
Source/WebCore/testing/Internals.cpp | 2 +-
Source/WebKitLegacy/PlatformMac.cmake | 120 ++++++++++-----------
.../cf/WebCoreSupport/WebInspectorClientCF.cpp | 4 +-
Source/WebKitLegacy/mac/DOM/DOM.mm | 10 ++
Source/WebKitLegacy/mac/DOM/DOMPrivate.h | 4 +-
Source/WebKitLegacy/mac/Misc/WebCache.mm | 11 ++
Source/WebKitLegacy/mac/Misc/WebDownload.mm | 4 +-
Source/WebKitLegacy/mac/Misc/WebIconDatabase.h | 2 +-
Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm | 1 +
.../WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm | 2 +-
.../WebKitLegacy/mac/Misc/WebKitVersionChecks.mm | 10 ++
.../WebApplicationCacheQuotaManager.mm | 8 +-
.../mac/WebCoreSupport/WebContextMenuClient.mm | 2 +-
.../mac/WebCoreSupport/WebEditorClient.mm | 2 +-
.../mac/WebCoreSupport/WebFrameLoaderClient.mm | 4 +
.../mac/WebCoreSupport/WebInspectorClient.mm | 2 +-
Source/WebKitLegacy/mac/WebView/WebArchive.mm | 4 +
Source/WebKitLegacy/mac/WebView/WebDataSource.mm | 12 +++
Source/WebKitLegacy/mac/WebView/WebFrame.mm | 19 ++++
Source/WebKitLegacy/mac/WebView/WebFramePrivate.h | 1 +
Source/WebKitLegacy/mac/WebView/WebFrameView.mm | 5 +-
.../mac/WebView/WebHTMLRepresentation.mm | 2 +
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm | 74 +++++++++----
.../mac/WebView/WebImmediateActionController.h | 4 +-
.../mac/WebView/WebImmediateActionController.mm | 46 ++++----
Source/WebKitLegacy/mac/WebView/WebPDFView.h | 2 +-
Source/WebKitLegacy/mac/WebView/WebPreferences.mm | 29 +++--
.../mac/WebView/WebPreferencesPrivate.h | 6 +-
Source/WebKitLegacy/mac/WebView/WebView.mm | 46 +++++---
Source/WebKitLegacy/mac/WebView/WebViewPrivate.h | 1 +
Tools/CMakeLists.txt | 2 +-
Tools/DumpRenderTree/mac/FrameLoadDelegate.mm | 1 +
Tools/DumpRenderTree/mac/UIScriptControllerMac.mm | 1 +
WebKitLibraries/WebKitSystemInterface.h | 8 +-
98 files changed, 545 insertions(+), 312 deletions(-)
diff --git a/Source/WTF/wtf/FeatureDefines.h b/Source/WTF/wtf/FeatureDefines.h
index d389a1fa1..da9ca0265 100644
--- a/Source/WTF/wtf/FeatureDefines.h
+++ b/Source/WTF/wtf/FeatureDefines.h
@@ -174,31 +174,31 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
#if PLATFORM(MAC)
#if !defined(ENABLE_CONTENT_EXTENSIONS)
-#define ENABLE_CONTENT_EXTENSIONS 1
+#define ENABLE_CONTENT_EXTENSIONS 0
#endif
#if !defined(ENABLE_DASHBOARD_SUPPORT)
-#define ENABLE_DASHBOARD_SUPPORT 1
+#define ENABLE_DASHBOARD_SUPPORT 0
#endif
#if !defined(ENABLE_FULLSCREEN_API)
-#define ENABLE_FULLSCREEN_API 1
+#define ENABLE_FULLSCREEN_API 0
#endif
#if !defined(ENABLE_REMOTE_INSPECTOR)
-#define ENABLE_REMOTE_INSPECTOR 1
+#define ENABLE_REMOTE_INSPECTOR 0
#endif
#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
-#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
+#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 0
#endif
#if !defined(ENABLE_SMOOTH_SCROLLING)
-#define ENABLE_SMOOTH_SCROLLING 1
+#define ENABLE_SMOOTH_SCROLLING 0
#endif
#if !defined(ENABLE_ASYNC_SCROLLING)
-#define ENABLE_ASYNC_SCROLLING 1
+#define ENABLE_ASYNC_SCROLLING 0
#endif
#if ENABLE(VIDEO)
@@ -216,31 +216,31 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
#endif
#if !defined(ENABLE_WEB_ARCHIVE)
-#define ENABLE_WEB_ARCHIVE 1
+#define ENABLE_WEB_ARCHIVE 0
#endif
#if !defined(ENABLE_WEB_AUDIO)
-#define ENABLE_WEB_AUDIO 1
+#define ENABLE_WEB_AUDIO 0
#endif
#if !defined(ENABLE_CURSOR_VISIBILITY)
-#define ENABLE_CURSOR_VISIBILITY 1
+#define ENABLE_CURSOR_VISIBILITY 0
#endif
#if !defined(ENABLE_INPUT_TYPE_COLOR)
-#define ENABLE_INPUT_TYPE_COLOR 1
+#define ENABLE_INPUT_TYPE_COLOR 0
#endif
#if !defined(ENABLE_INPUT_TYPE_COLOR_POPOVER)
-#define ENABLE_INPUT_TYPE_COLOR_POPOVER 1
+#define ENABLE_INPUT_TYPE_COLOR_POPOVER 0
#endif
#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
+#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 0
#endif
#if !defined(ENABLE_MAC_GESTURE_EVENTS) && USE(APPLE_INTERNAL_SDK)
-#define ENABLE_MAC_GESTURE_EVENTS 1
+#define ENABLE_MAC_GESTURE_EVENTS 0
#endif
#endif /* PLATFORM(MAC) */
@@ -252,11 +252,11 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
#endif
#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA)
-#define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
+#define ENABLE_LEGACY_ENCRYPTED_MEDIA 0
#endif
#if !defined(ENABLE_FILE_REPLACEMENT)
-#define ENABLE_FILE_REPLACEMENT 1
+#define ENABLE_FILE_REPLACEMENT 0
#endif
#if !defined(ENABLE_KEYBOARD_KEY_ATTRIBUTE)
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 566d986d2..73b19c284 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -1017,7 +1017,7 @@
#endif
#if PLATFORM(COCOA)
-#define USE_PROTECTION_SPACE_AUTH_CALLBACK 1
+#define USE_PROTECTION_SPACE_AUTH_CALLBACK 0
#endif
#if PLATFORM(COCOA) && HAVE(ACCESSIBILITY)
diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake
index df8777ac3..6538f96b4 100644
--- a/Source/WTF/wtf/PlatformMac.cmake
+++ b/Source/WTF/wtf/PlatformMac.cmake
@@ -37,12 +37,15 @@ list(APPEND WTF_SOURCES
text/mac/StringImplMac.mm
text/mac/StringMac.mm
text/mac/StringViewObjC.mm
+
+ glib/GRefPtr.cpp
)
if (WTF_LINUX)
list(APPEND WTF_SOURCES
linux/MemoryFootprintLinux.cpp
linux/MemoryPressureHandlerLinux.cpp
+ linux/CurrentProcessMemoryStatus.cpp
unix/CPUTimeUnix.cpp
)
else (WTF_LINUX)
diff --git a/Source/WTF/wtf/text/cf/TextBreakIteratorCF.h b/Source/WTF/wtf/text/cf/TextBreakIteratorCF.h
index 27e50bce5..1c0888092 100644
--- a/Source/WTF/wtf/text/cf/TextBreakIteratorCF.h
+++ b/Source/WTF/wtf/text/cf/TextBreakIteratorCF.h
@@ -63,24 +63,27 @@ public:
auto length = static_cast<unsigned long>(CFStringGetLength(m_string.get()));
if (location > length)
return length;
- auto range = CFStringGetRangeOfCharacterClusterAtIndex(m_string.get(), location - 1, m_type);
- return range.location;
+ //auto range = CFStringGetRangeOfCharacterClusterAtIndex(m_string.get(), location - 1, m_type);
+ //return range.location;
+ return {};
}
std::optional<unsigned> following(unsigned location) const
{
if (location >= static_cast<unsigned long>(CFStringGetLength(m_string.get())))
return { };
- auto range = CFStringGetRangeOfCharacterClusterAtIndex(m_string.get(), location, m_type);
- return range.location + range.length;
+ //auto range = CFStringGetRangeOfCharacterClusterAtIndex(m_string.get(), location, m_type);
+ //return range.location + range.length;
+ return {};
}
bool isBoundary(unsigned location) const
{
if (location == static_cast<unsigned long>(CFStringGetLength(m_string.get())))
return true;
- auto range = CFStringGetRangeOfCharacterClusterAtIndex(m_string.get(), location, m_type);
- return static_cast<unsigned long>(range.location) == location;
+ //auto range = CFStringGetRangeOfCharacterClusterAtIndex(m_string.get(), location, m_type);
+ //return static_cast<unsigned long>(range.location) == location;
+ return false;
}
private:
diff --git a/Source/WebCore/PAL/pal/PlatformMac.cmake b/Source/WebCore/PAL/pal/PlatformMac.cmake
index 7323b5d0a..0eb3ca2d8 100644
--- a/Source/WebCore/PAL/pal/PlatformMac.cmake
+++ b/Source/WebCore/PAL/pal/PlatformMac.cmake
@@ -4,5 +4,6 @@ list(APPEND PAL_SOURCES
system/mac/SoundMac.mm
- text/mac/KillRingMac.mm
+ #text/mac/KillRingMac.mm
+ text/KillRingNone.cpp
)
diff --git a/Source/WebCore/PlatformMac.cmake b/Source/WebCore/PlatformMac.cmake
index dd4955848..497e489a3 100644
--- a/Source/WebCore/PlatformMac.cmake
+++ b/Source/WebCore/PlatformMac.cmake
@@ -45,9 +45,17 @@ list(APPEND WebCore_LIBRARIES
${SECURITY_LIBRARY}
${SQLITE3_LIBRARY}
${SYSTEMCONFIGURATION_LIBRARY}
- ${WEBKITSYSTEMINTERFACE_LIBRARY}
+ #${WEBKITSYSTEMINTERFACE_LIBRARY}
${XML2_LIBRARY}
${ZLIB_LIBRARIES}
+ opal
+ QuartzCore
+ soup-2.4
+ glib-2.0
+ gio-2.0
+ gobject-2.0
+ gcrypt
+ bsd
)
add_definitions(-iframework ${APPLICATIONSERVICES_LIBRARY}/Versions/Current/Frameworks)
@@ -113,6 +121,7 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/graphics/mac"
"${WEBCORE_DIR}/platform/mac"
"${WEBCORE_DIR}/platform/mediastream/mac"
+ "${WEBCORE_DIR}/platform/network"
"${WEBCORE_DIR}/platform/network/cocoa"
#"${WEBCORE_DIR}/platform/network/cf"
#"${WEBCORE_DIR}/platform/network/ios"
@@ -225,25 +234,28 @@ list(APPEND WebCore_SOURCES
history/mac/HistoryItemMac.mm
- loader/ResourceLoadInfo.cpp
+ #loader/ResourceLoadInfo.cpp
- loader/archive/cf/LegacyWebArchive.cpp
- loader/archive/cf/LegacyWebArchiveMac.mm
+ #loader/archive/cf/LegacyWebArchive.cpp
+ #loader/archive/cf/LegacyWebArchiveMac.mm
- loader/cocoa/DiskCacheMonitorCocoa.mm
- loader/cocoa/SubresourceLoaderCocoa.mm
+ #loader/cocoa/DiskCacheMonitorCocoa.mm
+ #loader/cocoa/SubresourceLoaderCocoa.mm
- loader/cf/ResourceLoaderCFNet.cpp
+ #loader/cf/ResourceLoaderCFNet.cpp
- loader/mac/DocumentLoaderMac.cpp
+ #loader/mac/DocumentLoaderMac.cpp
loader/mac/LoaderNSURLExtras.mm
- loader/mac/ResourceLoaderMac.mm
+ #loader/mac/ResourceLoaderMac.mm
+
+ loader/soup/CachedRawResourceSoup.cpp
+ loader/soup/SubresourceLoaderSoup.cpp
page/CaptionUserPreferencesMediaAF.cpp
page/PageDebuggable.cpp
#page/cocoa/MemoryReleaseCocoa.mm
- # page/cocoa/PerformanceLoggingCocoa.mm
+ #page/cocoa/PerformanceLoggingCocoa.mm
#page/cocoa/ResourceUsageOverlayCocoa.mm
#page/cocoa/ResourceUsageThreadCocoa.mm
page/linux/ResourceUsageThreadLinux.cpp
@@ -276,6 +288,7 @@ list(APPEND WebCore_SOURCES
platform/CPUMonitor.cpp
platform/LocalizedStrings.cpp
+ #platform/gtk/LocalizedStringsGtk.cpp
platform/ScrollableArea.cpp
platform/audio/AudioSession.cpp
@@ -550,8 +563,6 @@ list(APPEND WebCore_SOURCES
#platform/network/cocoa/NetworkLoadMetrics.mm
#platform/network/cocoa/NetworkStorageSessionCocoa.mm
#platform/network/cocoa/ProtectionSpaceCocoa.mm
- #platform/network/cocoa/ResourceRequestCocoa.mm
- #platform/network/cocoa/ResourceResponseCocoa.mm
#platform/network/cocoa/WebCoreNSURLSession.mm
#platform/network/mac/AuthenticationMac.mm
@@ -563,7 +574,6 @@ list(APPEND WebCore_SOURCES
#platform/network/mac/CredentialStorageMac.mm
#platform/network/mac/FormDataStreamMac.mm
#platform/network/mac/NetworkStateNotifierMac.cpp
- #platform/network/mac/ResourceErrorMac.mm
#platform/network/mac/ResourceHandleMac.mm
#platform/network/mac/SynchronousLoaderClient.mm
#platform/network/mac/UTIUtilities.mm
@@ -581,6 +591,7 @@ list(APPEND WebCore_SOURCES
platform/network/soup/NetworkStorageSessionSoup.cpp
platform/network/soup/ProxyServerSoup.cpp
platform/network/soup/ResourceErrorSoup.cpp
+ platform/network/mac/ResourceErrorMac.mm
platform/network/soup/ResourceHandleSoup.cpp
platform/network/soup/ResourceRequestSoup.cpp
platform/network/soup/ResourceResponseSoup.cpp
@@ -588,6 +599,9 @@ list(APPEND WebCore_SOURCES
platform/network/soup/SoupNetworkSession.cpp
platform/network/soup/SynchronousLoaderClientSoup.cpp
platform/network/soup/WebKitSoupRequestGeneric.cpp
+
+ #platform/network/cocoa/ResourceRequestCocoa.mm
+ #platform/network/cocoa/ResourceResponseCocoa.mm
platform/soup/PublicSuffixSoup.cpp
platform/soup/SharedBufferSoup.cpp
@@ -799,7 +813,7 @@ list(APPEND WebCoreTestSupport_SOURCES
testing/MockContentFilterSettings.cpp
testing/MockPreviewLoaderClient.cpp
- testing/cocoa/WebArchiveDumpSupport.mm
+ #testing/cocoa/WebArchiveDumpSupport.mm
)
-set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
+#set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
diff --git a/Source/WebCore/editing/cocoa/EditorCocoa.mm b/Source/WebCore/editing/cocoa/EditorCocoa.mm
index 39b848f0b..621585287 100644
--- a/Source/WebCore/editing/cocoa/EditorCocoa.mm
+++ b/Source/WebCore/editing/cocoa/EditorCocoa.mm
@@ -168,7 +168,9 @@ void Editor::writeSelectionToPasteboard(Pasteboard& pasteboard)
PasteboardWebContent content;
content.canSmartCopyOrDelete = canSmartCopyOrDelete();
+#if ENABLE(WEB_ARCHIVE)
content.dataInWebArchiveFormat = selectionInWebArchiveFormat();
+#endif
content.dataInRTFDFormat = attributedString.containsAttachments ? dataInRTFDFormat(attributedString) : nullptr;
content.dataInRTFFormat = dataInRTFFormat(attributedString);
content.dataInAttributedStringFormat = archivedDataForAttributedString(attributedString);
@@ -188,7 +190,9 @@ void Editor::writeSelection(PasteboardWriterData& pasteboardWriterData)
PasteboardWriterData::WebContent webContent;
webContent.canSmartCopyOrDelete = canSmartCopyOrDelete();
+#if ENABLE(WEB_ARCHIVE)
webContent.dataInWebArchiveFormat = selectionInWebArchiveFormat();
+#endif
webContent.dataInRTFDFormat = attributedString.containsAttachments ? dataInRTFDFormat(attributedString) : nullptr;
webContent.dataInRTFFormat = dataInRTFFormat(attributedString);
webContent.dataInAttributedStringFormat = archivedDataForAttributedString(attributedString);
@@ -202,6 +206,7 @@ void Editor::writeSelection(PasteboardWriterData& pasteboardWriterData)
pasteboardWriterData.setWebContent(WTFMove(webContent));
}
+#if ENABLE(WEB_ARCHIVE)
RefPtr<SharedBuffer> Editor::selectionInWebArchiveFormat()
{
RefPtr<LegacyWebArchive> archive = LegacyWebArchive::createFromSelection(&m_frame);
@@ -209,6 +214,7 @@ RefPtr<SharedBuffer> Editor::selectionInWebArchiveFormat()
return nullptr;
return SharedBuffer::create(archive->rawDataRepresentation().get());
}
+#endif
// FIXME: Makes no sense that selectedTextForDataTransfer always includes alt text, but stringSelectionForPasteboard does not.
// This was left in a bad state when selectedTextForDataTransfer was added. Need to look over clients and fix this.
@@ -259,8 +265,10 @@ RefPtr<DocumentFragment> Editor::createFragmentForImageResourceAndAddResource(Re
String resourceURL = URL.isFileURL ? URL.absoluteString : resource->url();
#endif
+#if ENABLE(WEB_ARCHIVE)
if (DocumentLoader* loader = m_frame.loader().documentLoader())
loader->addArchiveResource(resource.releaseNonNull());
+#endif
auto imageElement = HTMLImageElement::create(*m_frame.document());
imageElement->setAttributeWithoutSynchronization(HTMLNames::srcAttr, resourceURL);
@@ -317,10 +325,12 @@ RefPtr<DocumentFragment> Editor::createFragmentAndAddResources(NSAttributedStrin
auto fragmentAndResources = createFragment(string);
+#if ENABLE(WEB_ARCHIVE)
if (auto* loader = m_frame.loader().documentLoader()) {
for (auto& resource : fragmentAndResources.resources)
loader->addArchiveResource(WTFMove(resource));
}
+#endif
if (wasImagesEnabled)
cachedResourceLoader.setImagesEnabled(true);
diff --git a/Source/WebCore/editing/cocoa/HTMLConverter.mm b/Source/WebCore/editing/cocoa/HTMLConverter.mm
index 9c0e68932..979cf65a4 100644
--- a/Source/WebCore/editing/cocoa/HTMLConverter.mm
+++ b/Source/WebCore/editing/cocoa/HTMLConverter.mm
@@ -1642,7 +1642,7 @@ static inline NSDate *_dateForString(NSString *string)
return [[[[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian] autorelease] dateFromComponents:dateComponents.get()];
}
-static NSInteger _colCompare(id block1, id block2, void *)
+static NSComparisonResult _colCompare(id block1, id block2, void *)
{
NSInteger col1 = [(NSTextTableBlock *)block1 startingColumn];
NSInteger col2 = [(NSTextTableBlock *)block2 startingColumn];
diff --git a/Source/WebCore/editing/mac/DictionaryLookup.mm b/Source/WebCore/editing/mac/DictionaryLookup.mm
index aac637e40..add73fe99 100644
--- a/Source/WebCore/editing/mac/DictionaryLookup.mm
+++ b/Source/WebCore/editing/mac/DictionaryLookup.mm
@@ -26,7 +26,7 @@
#import "config.h"
#import "DictionaryLookup.h"
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(GNUSTEP)
#import "Document.h"
#import "Editing.h"
diff --git a/Source/WebCore/editing/mac/EditorMac.mm b/Source/WebCore/editing/mac/EditorMac.mm
index 4a26300f2..21e1cd6fd 100644
--- a/Source/WebCore/editing/mac/EditorMac.mm
+++ b/Source/WebCore/editing/mac/EditorMac.mm
@@ -199,6 +199,7 @@ String Editor::selectionInHTMLFormat()
return createMarkup(*selectedRange(), nullptr, AnnotateForInterchange, false, ResolveNonLocalURLs);
}
+#if ENABLE(WEB_ARCHIVE)
RefPtr<SharedBuffer> Editor::imageInWebArchiveFormat(Element& imageElement)
{
RefPtr<LegacyWebArchive> archive = LegacyWebArchive::create(imageElement);
@@ -206,6 +207,7 @@ RefPtr<SharedBuffer> Editor::imageInWebArchiveFormat(Element& imageElement)
return nullptr;
return SharedBuffer::create(archive->rawDataRepresentation().get());
}
+#endif
RefPtr<SharedBuffer> Editor::dataSelectionForPasteboard(const String& pasteboardType)
{
@@ -217,8 +219,10 @@ RefPtr<SharedBuffer> Editor::dataSelectionForPasteboard(const String& pasteboard
if (!canCopy())
return nullptr;
+#if ENABLE(WEB_ARCHIVE)
if (pasteboardType == WebArchivePboardType)
return selectionInWebArchiveFormat();
+#endif
if (pasteboardType == String(NSRTFDPboardType))
return dataInRTFDFormat(attributedStringFromRange(*adjustedSelectionRange()));
@@ -288,7 +292,9 @@ void Editor::writeImageToPasteboard(Pasteboard& pasteboard, Element& imageElemen
return;
ASSERT(cachedImage);
+#if ENABLE(WEB_ARCHIVE)
pasteboardImage.dataInWebArchiveFormat = imageInWebArchiveFormat(imageElement);
+#endif
pasteboardImage.url.url = url;
pasteboardImage.url.title = title;
pasteboardImage.url.userVisibleForm = client()->userVisibleString(pasteboardImage.url.url);
@@ -337,6 +343,7 @@ bool Editor::WebContentReader::readWebArchive(SharedBuffer* buffer)
if (!buffer)
return false;
+#if ENABLE(WEB_ARCHIVE)
auto archive = LegacyWebArchive::create(URL(), *buffer);
if (!archive)
return false;
@@ -361,6 +368,7 @@ bool Editor::WebContentReader::readWebArchive(SharedBuffer* buffer)
fragment = frame.editor().createFragmentForImageResourceAndAddResource(WTFMove(mainResource));
return true;
}
+#endif
return false;
}
diff --git a/Source/WebCore/html/HTMLPlugInElement.cpp b/Source/WebCore/html/HTMLPlugInElement.cpp
index e2e31a155..00dd59a9b 100644
--- a/Source/WebCore/html/HTMLPlugInElement.cpp
+++ b/Source/WebCore/html/HTMLPlugInElement.cpp
@@ -317,7 +317,7 @@ static Vector<ReplacementPlugin*>& registeredPluginReplacements()
return registeredReplacements;
enginesQueried = true;
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && ENABLE(MEDIA_CONTROLS_SCRIPT)
QuickTimePluginReplacement::registerPluginReplacement(registrar);
YouTubePluginReplacement::registerPluginReplacement(registrar);
#endif
diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp
index 0d03aba0d..8a361cc65 100644
--- a/Source/WebCore/inspector/InspectorController.cpp
+++ b/Source/WebCore/inspector/InspectorController.cpp
@@ -143,7 +143,9 @@ InspectorController::InspectorController(Page& page, InspectorClient* inspectorC
InspectorDatabaseAgent* databaseAgent = databaseAgentPtr.get();
m_agents.append(WTFMove(databaseAgentPtr));
+#if ENABLE(REMOTE_INSPECTOR)
m_agents.append(std::make_unique<InspectorNetworkAgent>(pageContext, pageAgent));
+#endif
#if ENABLE(INDEXED_DATABASE)
m_agents.append(std::make_unique<InspectorIndexedDBAgent>(pageContext, pageAgent));
diff --git a/Source/WebCore/inspector/InspectorNetworkAgent.cpp b/Source/WebCore/inspector/InspectorNetworkAgent.cpp
index f2c52aba0..31d8b315f 100644
--- a/Source/WebCore/inspector/InspectorNetworkAgent.cpp
+++ b/Source/WebCore/inspector/InspectorNetworkAgent.cpp
@@ -658,6 +658,8 @@ void InspectorNetworkAgent::didReceiveWebSocketFrameError(unsigned long identifi
m_frontendDispatcher->webSocketFrameError(IdentifiersFactory::requestId(identifier), timestamp(), errorMessage);
}
+#endif
+
void InspectorNetworkAgent::enable(ErrorString&)
{
enable();
@@ -668,6 +670,7 @@ void InspectorNetworkAgent::enable()
m_enabled = true;
m_instrumentingAgents.setInspectorNetworkAgent(this);
+#if ENABLE(WEB_SOCKETS)
LockHolder lock(WebSocket::allActiveWebSocketsMutex());
for (WebSocket* webSocket : WebSocket::allActiveWebSockets(lock)) {
@@ -692,6 +695,7 @@ void InspectorNetworkAgent::enable()
if (webSocket->readyState() == WebSocket::CLOSED)
didCloseWebSocket(identifier);
}
+#endif
}
void InspectorNetworkAgent::disable(ErrorString&)
@@ -704,8 +708,6 @@ void InspectorNetworkAgent::disable(ErrorString&)
m_pageAgent->page().setResourceCachingDisabledOverride(false);
}
-#endif // ENABLE(WEB_SOCKETS)
-
void InspectorNetworkAgent::setExtraHTTPHeaders(ErrorString&, const InspectorObject& headers)
{
for (auto& entry : headers) {
diff --git a/Source/WebCore/loader/ResourceLoader.cpp b/Source/WebCore/loader/ResourceLoader.cpp
index d7e2547a6..73ecc1477 100644
--- a/Source/WebCore/loader/ResourceLoader.cpp
+++ b/Source/WebCore/loader/ResourceLoader.cpp
@@ -729,7 +729,7 @@ void ResourceLoader::receivedCancellation(const AuthenticationChallenge&)
cancel();
}
-#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
void ResourceLoader::schedule(SchedulePair& pair)
{
diff --git a/Source/WebCore/loader/ResourceLoader.h b/Source/WebCore/loader/ResourceLoader.h
index 5cd50693e..16bd36de8 100644
--- a/Source/WebCore/loader/ResourceLoader.h
+++ b/Source/WebCore/loader/ResourceLoader.h
@@ -157,10 +157,10 @@ protected:
void didReceiveDataOrBuffer(const char*, unsigned, RefPtr<SharedBuffer>&&, long long encodedDataLength, DataPayloadType);
-#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
#endif
-#if PLATFORM(COCOA) && USE(CFURLCONNECTION)
+#if PLATFORM(COCOA) && USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
#endif
diff --git a/Source/WebCore/loader/SubresourceLoader.h b/Source/WebCore/loader/SubresourceLoader.h
index 9af98721f..526fa6bd4 100644
--- a/Source/WebCore/loader/SubresourceLoader.h
+++ b/Source/WebCore/loader/SubresourceLoader.h
@@ -76,10 +76,10 @@ private:
void didCancel(const ResourceError&) override;
void didRetrieveDerivedDataFromCache(const String& type, SharedBuffer&) override;
-#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
#endif
-#if PLATFORM(COCOA) && USE(CFURLCONNECTION)
+#if PLATFORM(COCOA) && USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
#endif
diff --git a/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm b/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm
index 4fef1c491..c2699d941 100644
--- a/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm
+++ b/Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm
@@ -53,12 +53,13 @@ ResourceResponse LegacyWebArchive::createResourceResponseFromMacArchivedData(CFD
}
[unarchiver release];
- return ResourceResponse(response);
+ //return ResourceResponse(response);
+ return NULL;
}
RetainPtr<CFDataRef> LegacyWebArchive::createPropertyListRepresentation(const ResourceResponse& response)
{
- NSURLResponse *nsResponse = response.nsURLResponse();
+ /*NSURLResponse *nsResponse = response.nsURLResponse();
ASSERT(nsResponse);
if (!nsResponse)
return nullptr;
@@ -70,7 +71,8 @@ RetainPtr<CFDataRef> LegacyWebArchive::createPropertyListRepresentation(const Re
[archiver finishEncoding];
[archiver release];
- return adoptCF(responseData);
+ return adoptCF(responseData);*/
+ return NULL;
}
}
diff --git a/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm b/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm
index 4825bd06a..0e36ec4fa 100644
--- a/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm
+++ b/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm
@@ -44,11 +44,12 @@ static const double diskCacheMonitorTimeout = 20;
RefPtr<SharedBuffer> DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse(CFCachedURLResponseRef cachedResponse)
{
- auto data = _CFCachedURLResponseGetMemMappedData(cachedResponse);
+ /*auto data = _CFCachedURLResponseGetMemMappedData(cachedResponse);
if (!data)
return nullptr;
- return SharedBuffer::create(data);
+ return SharedBuffer::create(data);*/
+ return nullptr;
}
void DiskCacheMonitor::monitorFileBackingStoreCreation(const ResourceRequest& request, SessionID sessionID, CFCachedURLResponseRef cachedResponse)
@@ -111,7 +112,7 @@ DiskCacheMonitor::DiskCacheMonitor(const ResourceRequest& request, SessionID ses
#else
auto blockToRun = block;
#endif
- _CFCachedURLResponseSetBecameFileBackedCallBackBlock(cachedResponse, blockToRun, dispatch_get_main_queue());
+ //_CFCachedURLResponseSetBecameFileBackedCallBackBlock(cachedResponse, blockToRun, dispatch_get_main_queue());
}
void DiskCacheMonitor::resourceBecameFileBacked(SharedBuffer& fileBackedBuffer)
diff --git a/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm b/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm
index 8e003f58a..2398c9399 100644
--- a/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm
+++ b/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm
@@ -40,8 +40,8 @@ namespace WebCore {
CFCachedURLResponseRef SubresourceLoader::willCacheResponse(ResourceHandle* handle, CFCachedURLResponseRef cachedResponse)
{
DiskCacheMonitor::monitorFileBackingStoreCreation(request(), m_resource->sessionID(), cachedResponse);
- if (!m_resource->shouldCacheResponse(CFCachedURLResponseGetWrappedResponse(cachedResponse)))
- return nullptr;
+ //if (!m_resource->shouldCacheResponse(CFCachedURLResponseGetWrappedResponse(cachedResponse)))
+ // return nullptr;
return ResourceLoader::willCacheResponse(handle, cachedResponse);
}
@@ -50,8 +50,8 @@ CFCachedURLResponseRef SubresourceLoader::willCacheResponse(ResourceHandle* hand
NSCachedURLResponse* SubresourceLoader::willCacheResponse(ResourceHandle* handle, NSCachedURLResponse* response)
{
DiskCacheMonitor::monitorFileBackingStoreCreation(request(), m_resource->sessionID(), [response _CFCachedURLResponse]);
- if (!m_resource->shouldCacheResponse(response.response))
- return nullptr;
+ //if (!m_resource->shouldCacheResponse(response.response))
+ // return nullptr;
return ResourceLoader::willCacheResponse(handle, response);
}
diff --git a/Source/WebCore/loader/mac/DocumentLoaderMac.cpp b/Source/WebCore/loader/mac/DocumentLoaderMac.cpp
index 6943a2ca8..79db5f925 100644
--- a/Source/WebCore/loader/mac/DocumentLoaderMac.cpp
+++ b/Source/WebCore/loader/mac/DocumentLoaderMac.cpp
@@ -33,7 +33,7 @@
namespace WebCore {
-#if !USE(CFURLCONNECTION)
+#if !USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
static void scheduleAll(const ResourceLoaderMap& loaders, SchedulePair& pair)
{
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 5c6c03c56..74fc517f0 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -2252,7 +2252,7 @@ RefPtr<DOMWindow> DOMWindow::open(DOMWindow& activeWindow, DOMWindow& firstWindo
return nullptr;
#if ENABLE(CONTENT_EXTENSIONS)
- if (firstFrame->document()
+ /*if (firstFrame->document()
&& firstFrame->page()
&& firstFrame->mainFrame().document()
&& firstFrame->mainFrame().document()->loader()) {
@@ -2261,7 +2261,7 @@ RefPtr<DOMWindow> DOMWindow::open(DOMWindow& activeWindow, DOMWindow& firstWindo
if (action.type() == ContentExtensions::ActionType::BlockLoad)
return nullptr;
}
- }
+ }*/
#endif
if (!firstWindow.allowPopUp()) {
diff --git a/Source/WebCore/page/MemoryRelease.cpp b/Source/WebCore/page/MemoryRelease.cpp
index f060a061c..ae5b8a2be 100644
--- a/Source/WebCore/page/MemoryRelease.cpp
+++ b/Source/WebCore/page/MemoryRelease.cpp
@@ -58,7 +58,7 @@ namespace WebCore {
static void releaseNoncriticalMemory()
{
- RenderTheme::singleton().purgeCaches();
+ //RenderTheme::singleton().purgeCaches();
FontCache::singleton().purgeInactiveFontData();
FontDescription::invalidateCaches();
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
index c26987f8d..656a4c1ef 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
@@ -261,7 +261,7 @@ Page::Page(PageConfiguration&& pageConfiguration)
m_inspectorDebuggable->init();
#endif
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
platformInitialize();
#endif
}
@@ -342,11 +342,13 @@ ViewportArguments Page::viewportArguments() const
ScrollingCoordinator* Page::scrollingCoordinator()
{
+#if ENABLE(ASYNC_SCROLLING)
if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) {
m_scrollingCoordinator = chrome().client().createScrollingCoordinator(*this);
if (!m_scrollingCoordinator)
m_scrollingCoordinator = ScrollingCoordinator::create(this);
}
+#endif
return m_scrollingCoordinator.get();
}
@@ -1586,8 +1588,10 @@ void Page::setActivityState(ActivityState::Flags activityState)
for (auto* observer : m_activityStateChangeObservers)
observer->activityStateDidChange(oldActivityState, m_activityState);
+#if ENABLE(WEB_AUDIO)
if (wasVisibleAndActive != isVisibleAndActive())
PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary();
+#endif
if (m_performanceMonitor)
m_performanceMonitor->activityStateChanged(oldActivityState, activityState);
diff --git a/Source/WebCore/page/mac/EventHandlerMac.mm b/Source/WebCore/page/mac/EventHandlerMac.mm
index f71e4fdc1..dc0a4eae0 100644
--- a/Source/WebCore/page/mac/EventHandlerMac.mm
+++ b/Source/WebCore/page/mac/EventHandlerMac.mm
@@ -1107,9 +1107,9 @@ VisibleSelection EventHandler::selectClosestWordFromHitTestResultBasedOnLookup(c
if (!m_frame.editor().behavior().shouldSelectBasedOnDictionaryLookup())
return VisibleSelection();
- NSDictionary *options = nil;
+ /*NSDictionary *options = nil;
if (RefPtr<Range> range = DictionaryLookup::rangeAtHitTestResult(result, &options))
- return VisibleSelection(*range);
+ return VisibleSelection(*range);*/
return VisibleSelection();
}
diff --git a/Source/WebCore/page/mac/PageMac.mm b/Source/WebCore/page/mac/PageMac.mm
index cfdd6f5f9..bd02e9842 100644
--- a/Source/WebCore/page/mac/PageMac.mm
+++ b/Source/WebCore/page/mac/PageMac.mm
@@ -73,7 +73,7 @@ void Page::addSchedulePair(Ref<SchedulePair>&& pair)
m_scheduledRunLoopPairs = std::make_unique<SchedulePairHashSet>();
m_scheduledRunLoopPairs->add(pair.ptr());
-#if !USE(CFURLCONNECTION)
+#if !USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
for (Frame* frame = &m_mainFrame.get(); frame; frame = frame->tree().traverseNext()) {
if (DocumentLoader* documentLoader = frame->loader().documentLoader())
documentLoader->schedule(pair);
@@ -93,7 +93,7 @@ void Page::removeSchedulePair(Ref<SchedulePair>&& pair)
m_scheduledRunLoopPairs->remove(pair.ptr());
-#if !USE(CFURLCONNECTION)
+#if !USE(CFURLCONNECTION) && !PLATFORM(GNUSTEP)
for (Frame* frame = &m_mainFrame.get(); frame; frame = frame->tree().traverseNext()) {
if (DocumentLoader* documentLoader = frame->loader().documentLoader())
documentLoader->unschedule(pair);
diff --git a/Source/WebCore/page/mac/TextIndicatorWindow.mm b/Source/WebCore/page/mac/TextIndicatorWindow.mm
index fc36dcb13..142242295 100644
--- a/Source/WebCore/page/mac/TextIndicatorWindow.mm
+++ b/Source/WebCore/page/mac/TextIndicatorWindow.mm
@@ -155,8 +155,8 @@ static bool indicatorWantsManualAnimation(const TextIndicator& indicator)
_textIndicator = &textIndicator;
_margin = margin;
- self.wantsLayer = YES;
- self.layer.anchorPoint = CGPointZero;
+ //self.wantsLayer = YES;
+ //self.layer.anchorPoint = CGPointZero;
FloatSize contentsImageLogicalSize = _textIndicator->contentImage()->size();
contentsImageLogicalSize.scale(1 / _textIndicator->contentImageScaleFactor());
@@ -243,7 +243,7 @@ static bool indicatorWantsManualAnimation(const TextIndicator& indicator)
[bounceLayer addSublayer:textLayer.get()];
}
- self.layer.sublayers = bounceLayers.get();
+ //self.layer.sublayers = bounceLayers.get();
_bounceLayers = bounceLayers;
return self;
@@ -367,7 +367,7 @@ static RetainPtr<CABasicAnimation> createFadeInAnimation(CFTimeInterval duration
[CATransaction begin];
[CATransaction setCompletionBlock:completionHandler];
- [self.layer addAnimation:fadeAnimation.get() forKey:@"fadeOut"];
+ //[self.layer addAnimation:fadeAnimation.get() forKey:@"fadeOut"];
[CATransaction commit];
}
diff --git a/Source/WebCore/page/mac/WheelEventDeltaFilterMac.mm b/Source/WebCore/page/mac/WheelEventDeltaFilterMac.mm
index 60e60ece8..2976e97d7 100644
--- a/Source/WebCore/page/mac/WheelEventDeltaFilterMac.mm
+++ b/Source/WebCore/page/mac/WheelEventDeltaFilterMac.mm
@@ -37,7 +37,7 @@ namespace WebCore {
WheelEventDeltaFilterMac::WheelEventDeltaFilterMac()
: WheelEventDeltaFilter()
- , m_predominantAxisFilter(adoptNS([[_NSScrollingPredominantAxisFilter alloc] init]))
+ //, m_predominantAxisFilter(adoptNS([[_NSScrollingPredominantAxisFilter alloc] init]))
{
}
@@ -54,7 +54,7 @@ void WheelEventDeltaFilterMac::updateFromDelta(const FloatSize& delta)
NSPoint filteredDeltaResult;
NSPoint filteredVelocityResult;
- [m_predominantAxisFilter filterInputDelta:NSPoint(FloatPoint(delta.width(), delta.height())) timestamp:monotonicallyIncreasingTime() - m_beginFilteringDeltasTime outputDelta:&filteredDeltaResult velocity:&filteredVelocityResult];
+ //[m_predominantAxisFilter filterInputDelta:NSPoint(FloatPoint(delta.width(), delta.height())) timestamp:monotonicallyIncreasingTime() - m_beginFilteringDeltasTime outputDelta:&filteredDeltaResult velocity:&filteredVelocityResult];
m_currentFilteredVelocity = FloatSize(filteredVelocityResult.x, filteredVelocityResult.y);
m_currentFilteredDelta = FloatSize(filteredDeltaResult.x, filteredDeltaResult.y);
}
@@ -63,7 +63,7 @@ void WheelEventDeltaFilterMac::endFilteringDeltas()
{
m_currentFilteredDelta = FloatSize(0, 0);
m_beginFilteringDeltasTime = 0;
- [m_predominantAxisFilter reset];
+ //[m_predominantAxisFilter reset];
m_isFilteringDeltas = false;
}
diff --git a/Source/WebCore/platform/DragImage.cpp b/Source/WebCore/platform/DragImage.cpp
index cd2bd4375..477a41028 100644
--- a/Source/WebCore/platform/DragImage.cpp
+++ b/Source/WebCore/platform/DragImage.cpp
@@ -36,6 +36,8 @@
#include "RenderView.h"
#include "TextIndicator.h"
+#if ENABLE(DRAG_SUPPORT)
+
namespace WebCore {
DragImageRef fitDragImageToMaxSize(DragImageRef image, const IntSize& layoutSize, const IntSize& maxSize)
@@ -281,3 +283,4 @@ DragImage::~DragImage()
} // namespace WebCore
+#endif
diff --git a/Source/WebCore/platform/ScrollableArea.cpp b/Source/WebCore/platform/ScrollableArea.cpp
index dead72169..d7ff996d3 100644
--- a/Source/WebCore/platform/ScrollableArea.cpp
+++ b/Source/WebCore/platform/ScrollableArea.cpp
@@ -76,14 +76,14 @@ ScrollableArea::~ScrollableArea()
ScrollAnimator& ScrollableArea::scrollAnimator() const
{
- if (!m_scrollAnimator) {
+ /*if (!m_scrollAnimator) {
if (usesMockScrollAnimator()) {
m_scrollAnimator = std::make_unique<ScrollAnimatorMock>(const_cast<ScrollableArea&>(*this), [this](const String& message) {
logMockScrollAnimatorMessage(message);
});
} else
m_scrollAnimator = ScrollAnimator::create(const_cast<ScrollableArea&>(*this));
- }
+ }*/
ASSERT(m_scrollAnimator);
return *m_scrollAnimator.get();
diff --git a/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm b/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
index a7b02ba48..457e4d5a0 100644
--- a/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
+++ b/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
@@ -24,6 +24,9 @@
*/
#import "config.h"
+
+#if ENABLE(WEB_AUDIO)
+
#import "MediaSessionManagerMac.h"
#if PLATFORM(MAC)
@@ -210,3 +213,5 @@ void MediaSessionManagerMac::updateNowPlayingInfo()
} // namespace WebCore
#endif // PLATFORM(MAC)
+
+#endif
diff --git a/Source/WebCore/platform/cocoa/FileSystemCocoa.mm b/Source/WebCore/platform/cocoa/FileSystemCocoa.mm
index c9de52702..718de5329 100644
--- a/Source/WebCore/platform/cocoa/FileSystemCocoa.mm
+++ b/Source/WebCore/platform/cocoa/FileSystemCocoa.mm
@@ -51,12 +51,13 @@ String homeDirectoryPath()
return NSHomeDirectory();
}
+#if OS(DARWIN)
String openTemporaryFile(const String& prefix, PlatformFileHandle& platformFileHandle)
{
platformFileHandle = invalidPlatformFileHandle;
Vector<char> temporaryFilePath(PATH_MAX);
- //if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryFilePath.data(), temporaryFilePath.size())) GNUSTEP FIX
+ if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryFilePath.data(), temporaryFilePath.size())) GNUSTEP FIX
return String();
// Shrink the vector.
@@ -79,6 +80,7 @@ String openTemporaryFile(const String& prefix, PlatformFileHandle& platformFileH
return String::fromUTF8(temporaryFilePath.data());
}
+#endif
bool moveFile(const String& oldPath, const String& newPath)
{
diff --git a/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm b/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm
index 35737041d..bffbad0b3 100644
--- a/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm
+++ b/Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm
@@ -33,12 +33,14 @@ namespace WebCore {
String MIMETypeRegistry::getMIMETypeForExtension(const String& extension)
{
- return [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:(NSString *)extension];
+ //return [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:(NSString *)extension];
+ return @"temporary-mime-report-this";
}
Vector<String> MIMETypeRegistry::getExtensionsForMIMEType(const String& type)
{
- NSArray *stringsArray = [[NSURLFileTypeMappings sharedMappings] extensionsForMIMEType:(NSString *)type];
+ //NSArray *stringsArray = [[NSURLFileTypeMappings sharedMappings] extensionsForMIMEType:(NSString *)type];
+ NSArray *stringsArray = [NSArray array];
Vector<String> stringsVector = Vector<String>();
unsigned count = [stringsArray count];
if (count > 0) {
@@ -52,7 +54,8 @@ Vector<String> MIMETypeRegistry::getExtensionsForMIMEType(const String& type)
String MIMETypeRegistry::getPreferredExtensionForMIMEType(const String& type)
{
- return [[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:(NSString *)type];
+ //return [[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:(NSString *)type];
+ return @"temporary-extension-report-this";
}
bool MIMETypeRegistry::isApplicationPluginMIMEType(const String& MIMEType)
diff --git a/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm b/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
index 0aa97cfde..203c84e55 100644
--- a/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
+++ b/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
@@ -101,11 +101,11 @@ void NetworkExtensionContentFilter::willSendRequest(ResourceRequest& request, co
}
RetainPtr<NSString> modifiedRequestURLString;
- [m_neFilterSource willSendRequest:request.nsURLRequest(DoNotUpdateHTTPBody) decisionHandler:[this, &modifiedRequestURLString](NEFilterSourceStatus status, NSDictionary *decisionInfo) {
+ /*[m_neFilterSource willSendRequest:request.nsURLRequest(DoNotUpdateHTTPBody) decisionHandler:[this, &modifiedRequestURLString](NEFilterSourceStatus status, NSDictionary *decisionInfo) {
modifiedRequestURLString = decisionInfo[NEFilterSourceOptionsRedirectURL];
ASSERT(!modifiedRequestURLString || [modifiedRequestURLString isKindOfClass:[NSString class]]);
handleDecision(status, replacementDataFromDecisionInfo(decisionInfo));
- }];
+ }];*/
// FIXME: We have to block here since DocumentLoader expects to have a
// blocked/not blocked answer from the filter immediately after calling
@@ -131,9 +131,9 @@ void NetworkExtensionContentFilter::responseReceived(const ResourceResponse& res
return;
}
- [m_neFilterSource receivedResponse:response.nsURLResponse() decisionHandler:[this](NEFilterSourceStatus status, NSDictionary *decisionInfo) {
+ /*[m_neFilterSource receivedResponse:response.nsURLResponse() decisionHandler:[this](NEFilterSourceStatus status, NSDictionary *decisionInfo) {
handleDecision(status, replacementDataFromDecisionInfo(decisionInfo));
- }];
+ }];*/
// FIXME: We have to block here since DocumentLoader expects to have a
// blocked/not blocked answer from the filter immediately after calling
diff --git a/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm b/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm
index 467de0f4f..8572e96f2 100644
--- a/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm
+++ b/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm
@@ -71,7 +71,7 @@ void ParentalControlsContentFilter::responseReceived(const ResourceResponse& res
return;
}
- m_webFilterEvaluator = adoptNS([allocWebFilterEvaluatorInstance() initWithResponse:response.nsURLResponse()]);
+ m_webFilterEvaluator = NULL;//adoptNS([allocWebFilterEvaluatorInstance() initWithResponse:response.nsURLResponse()]);
updateFilterState();
}
diff --git a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
index 61a7044b9..b71106d8a 100644
--- a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
+++ b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
@@ -195,8 +195,10 @@ PlatformCALayer::LayerType PlatformCALayerCocoa::layerTypeForPlatformLayer(Platf
/*if ([layer isKindOfClass:getAVPlayerLayerClass()] || [layer isKindOfClass:objc_getClass("WebVideoContainerLayer")])
return LayerTypeAVPlayerLayer;*/
+#if ENABLE(WEBGL)
if ([layer isKindOfClass:[WebGLLayer class]])
return LayerTypeContentsProvidedLayer;
+#endif
#if ENABLE(WEBGPU)
if ([layer isKindOfClass:[WebGPULayer class]])
diff --git a/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp b/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp
index 421d615da..de63792af 100644
--- a/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp
+++ b/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp
@@ -24,12 +24,13 @@
*/
#include "config.h"
-#include "UTIRegistry.h"
-
-#if USE(CG)
+#include <wtf/text/StringHash.h>
#include <wtf/HashSet.h>
#include <wtf/NeverDestroyed.h>
+#include "UTIRegistry.h"
+
+#if USE(CG)
#if !PLATFORM(IOS)
#include <ApplicationServices/ApplicationServices.h>
diff --git a/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp b/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
index 750ece399..9d63e76fa 100644
--- a/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
+++ b/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
@@ -34,6 +34,8 @@
#include <wtf/glib/GUniquePtr.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
+#include <libintl.h>
+#define _(String) gettext (String)
namespace WebCore {
diff --git a/Source/WebCore/platform/mac/BlacklistUpdater.mm b/Source/WebCore/platform/mac/BlacklistUpdater.mm
index a36221212..2d2e30050 100644
--- a/Source/WebCore/platform/mac/BlacklistUpdater.mm
+++ b/Source/WebCore/platform/mac/BlacklistUpdater.mm
@@ -50,7 +50,9 @@ namespace WebCore {
dispatch_queue_t BlacklistUpdater::s_queue;
PluginBlacklist* BlacklistUpdater::s_pluginBlacklist = nullptr;
+#if ENABLE(WEBGL)
WebGLBlacklist* BlacklistUpdater::s_webGLBlacklist = nullptr;
+#endif
NSDictionary * BlacklistUpdater::readBlacklistData()
{
@@ -90,13 +92,17 @@ void BlacklistUpdater::reloadIfNecessary()
s_pluginBlacklist = 0;
}
+#if ENABLE(WEBGL)
if (s_webGLBlacklist) {
delete s_webGLBlacklist;
s_webGLBlacklist = 0;
}
+#endif
s_pluginBlacklist = PluginBlacklist::create(propertyList).release();
+#if ENABLE(WEBGL)
s_webGLBlacklist = WebGLBlacklist::create(propertyList).release();
+#endif
#if OS(LINUX)
blacklistUpdateTime = statBuf.st_mtime;
diff --git a/Source/WebCore/platform/mac/PlatformScreenMac.mm b/Source/WebCore/platform/mac/PlatformScreenMac.mm
index 5779471a9..a5aa0e620 100644
--- a/Source/WebCore/platform/mac/PlatformScreenMac.mm
+++ b/Source/WebCore/platform/mac/PlatformScreenMac.mm
@@ -138,15 +138,16 @@ bool screenSupportsExtendedColor(Widget* widget)
{
if (!widget)
return false;
+ return false;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+/*#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
return [screen(widget) canRepresentDisplayGamut:NSDisplayGamutP3];
#else
auto colorSpace = screen(widget).colorSpace.CGColorSpace;
auto iccData = adoptCF(CGColorSpaceCopyICCProfile(colorSpace));
auto profile = adoptCF(ColorSyncProfileCreate(iccData.get(), nullptr));
return profile && ColorSyncProfileIsWideGamut(profile.get());
-#endif
+#endif*/
}
FloatRect toUserSpace(const NSRect& rect, NSWindow *destination)
diff --git a/Source/WebCore/platform/mac/PluginBlacklist.mm b/Source/WebCore/platform/mac/PluginBlacklist.mm
index ebcc94fdb..8230245c4 100644
--- a/Source/WebCore/platform/mac/PluginBlacklist.mm
+++ b/Source/WebCore/platform/mac/PluginBlacklist.mm
@@ -69,7 +69,7 @@ bool PluginBlacklist::isPluginUpdateAvailable(NSString *bundleIdentifier)
std::unique_ptr<PluginBlacklist> PluginBlacklist::create(NSDictionary *propertyList)
{
- CFDictionaryRef systemVersionDictionary = _CFCopySystemVersionDictionary();
+ /*CFDictionaryRef systemVersionDictionary = _CFCopySystemVersionDictionary();
CFStringRef osVersion = static_cast<CFStringRef>(CFDictionaryGetValue(systemVersionDictionary, _kCFSystemVersionProductVersionKey));
NSDictionary *dictionary = [propertyList objectForKey:@"PlugInBlacklist"];
@@ -114,7 +114,8 @@ std::unique_ptr<PluginBlacklist> PluginBlacklist::create(NSDictionary *propertyL
CFRelease(systemVersionDictionary);
- return std::unique_ptr<PluginBlacklist>(new PluginBlacklist(bundleIDToMinimumSecureVersion, bundleIDToMinimumCompatibleVersion, bundleIDToBlockedVersions, bundleIDsWithAvailableUpdates));
+ return std::unique_ptr<PluginBlacklist>(new PluginBlacklist(bundleIDToMinimumSecureVersion, bundleIDToMinimumCompatibleVersion, bundleIDToBlockedVersions, bundleIDsWithAvailableUpdates));*/
+ return nullptr;
}
PluginBlacklist::~PluginBlacklist()
diff --git a/Source/WebCore/platform/mac/ScrollbarThemeMac.mm b/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
index fa5de6972..4cf6b5d43 100644
--- a/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
+++ b/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
@@ -54,13 +54,13 @@ using namespace WebCore;
namespace WebCore {
-typedef HashMap<Scrollbar*, RetainPtr<NSScrollerImp>> ScrollerImpMap;
+//typedef HashMap<Scrollbar*, RetainPtr<NSScrollerImp>> ScrollerImpMap;
-static ScrollerImpMap* scrollbarMap()
+/*static ScrollerImpMap* scrollbarMap()
{
static ScrollerImpMap* map = new ScrollerImpMap;
return map;
-}
+}*/
}
@@ -85,13 +85,13 @@ static ScrollerImpMap* scrollbarMap()
return;
static_cast<ScrollbarThemeMac&>(theme).preferencesChanged();
- if (scrollbarMap()->isEmpty())
+ /*if (scrollbarMap()->isEmpty())
return;
ScrollerImpMap::iterator end = scrollbarMap()->end();
for (ScrollerImpMap::iterator it = scrollbarMap()->begin(); it != end; ++it) {
it->key->styleChanged();
it->key->invalidate();
- }
+ }*/
}
+ (void)behaviorPrefsChanged:(NSNotification *)unusedNotification
@@ -168,29 +168,29 @@ void ScrollbarThemeMac::registerScrollbar(Scrollbar& scrollbar)
return;
bool isHorizontal = scrollbar.orientation() == HorizontalScrollbar;
- NSScrollerImp *scrollerImp = [NSScrollerImp scrollerImpWithStyle:recommendedScrollerStyle() controlSize:scrollbarControlSizeToNSControlSize(scrollbar.controlSize()) horizontal:isHorizontal replacingScrollerImp:nil];
+ /*NSScrollerImp *scrollerImp = [NSScrollerImp scrollerImpWithStyle:recommendedScrollerStyle() controlSize:scrollbarControlSizeToNSControlSize(scrollbar.controlSize()) horizontal:isHorizontal replacingScrollerImp:nil];
scrollbarMap()->add(&scrollbar, scrollerImp);
didCreateScrollerImp(scrollbar);
updateEnabledState(scrollbar);
- updateScrollbarOverlayStyle(scrollbar);
+ updateScrollbarOverlayStyle(scrollbar);*/
}
void ScrollbarThemeMac::unregisterScrollbar(Scrollbar& scrollbar)
{
- scrollbarMap()->remove(&scrollbar);
+ //scrollbarMap()->remove(&scrollbar);
}
void ScrollbarThemeMac::setNewPainterForScrollbar(Scrollbar& scrollbar, NSScrollerImp *newPainter)
{
- scrollbarMap()->set(&scrollbar, newPainter);
+ /*scrollbarMap()->set(&scrollbar, newPainter);
updateEnabledState(scrollbar);
- updateScrollbarOverlayStyle(scrollbar);
+ updateScrollbarOverlayStyle(scrollbar);*/
}
-NSScrollerImp *ScrollbarThemeMac::painterForScrollbar(Scrollbar& scrollbar)
+/*NSScrollerImp *ScrollbarThemeMac::painterForScrollbar(Scrollbar& scrollbar)
{
return scrollbarMap()->get(&scrollbar).get();
-}
+}*/
bool ScrollbarThemeMac::isLayoutDirectionRTL(Scrollbar& scrollbar)
{
@@ -244,9 +244,10 @@ void ScrollbarThemeMac::preferencesChanged()
int ScrollbarThemeMac::scrollbarThickness(ScrollbarControlSize controlSize, ScrollbarExpansionState expansionState)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- NSScrollerImp *scrollerImp = [NSScrollerImp scrollerImpWithStyle:recommendedScrollerStyle() controlSize:scrollbarControlSizeToNSControlSize(controlSize) horizontal:NO replacingScrollerImp:nil];
+ /*NSScrollerImp *scrollerImp = [NSScrollerImp scrollerImpWithStyle:recommendedScrollerStyle() controlSize:scrollbarControlSizeToNSControlSize(controlSize) horizontal:NO replacingScrollerImp:nil];
[scrollerImp setExpanded:(expansionState == ScrollbarExpansionState::Expanded)];
- return [scrollerImp trackBoxWidth];
+ return [scrollerImp trackBoxWidth];*/
+ return 0;
END_BLOCK_OBJC_EXCEPTIONS;
}
@@ -263,7 +264,7 @@ void ScrollbarThemeMac::usesOverlayScrollbarsChanged()
void ScrollbarThemeMac::updateScrollbarOverlayStyle(Scrollbar& scrollbar)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- NSScrollerImp *painter = painterForScrollbar(scrollbar);
+ /*NSScrollerImp *painter = painterForScrollbar(scrollbar);
switch (scrollbar.scrollableArea().scrollbarOverlayStyle()) {
case ScrollbarOverlayStyleDefault:
[painter setKnobStyle:NSScrollerKnobStyleDefault];
@@ -274,7 +275,7 @@ void ScrollbarThemeMac::updateScrollbarOverlayStyle(Scrollbar& scrollbar)
case ScrollbarOverlayStyleLight:
[painter setKnobStyle:NSScrollerKnobStyleLight];
break;
- }
+ }*/
END_BLOCK_OBJC_EXCEPTIONS;
}
@@ -305,13 +306,14 @@ bool ScrollbarThemeMac::hasThumb(Scrollbar& scrollbar)
{
int minLengthForThumb;
- NSScrollerImp *painter = scrollbarMap()->get(&scrollbar).get();
+ /*NSScrollerImp *painter = scrollbarMap()->get(&scrollbar).get();
minLengthForThumb = [painter knobMinLength] + [painter trackOverlapEndInset] + [painter knobOverlapEndInset]
+ 2 * ([painter trackEndInset] + [painter knobEndInset]);
return scrollbar.enabled() && (scrollbar.orientation() == HorizontalScrollbar ?
scrollbar.width() :
- scrollbar.height()) >= minLengthForThumb;
+ scrollbar.height()) >= minLengthForThumb;*/
+ return true;
}
static IntRect buttonRepaintRect(const IntRect& buttonRect, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, bool start)
@@ -446,7 +448,8 @@ IntRect ScrollbarThemeMac::trackRect(Scrollbar& scrollbar, bool painting)
int ScrollbarThemeMac::minimumThumbLength(Scrollbar& scrollbar)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- return [scrollbarMap()->get(&scrollbar) knobMinLength];
+ //return [scrollbarMap()->get(&scrollbar) knobMinLength];
+ return 0;
END_BLOCK_OBJC_EXCEPTIONS;
}
@@ -506,14 +509,14 @@ int ScrollbarThemeMac::scrollbarPartToHIPressedState(ScrollbarPart part)
void ScrollbarThemeMac::updateEnabledState(Scrollbar& scrollbar)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- [scrollbarMap()->get(&scrollbar) setEnabled:scrollbar.enabled()];
+ //[scrollbarMap()->get(&scrollbar) setEnabled:scrollbar.enabled()];
END_BLOCK_OBJC_EXCEPTIONS;
}
void ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(Scrollbar& scrollbar)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- NSScrollerImp *painter = painterForScrollbar(scrollbar);
+ /*NSScrollerImp *painter = painterForScrollbar(scrollbar);
float value;
float overhang;
@@ -526,11 +529,11 @@ void ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(Scrollbar& scrollbar
#if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)
[painter setPresentationValue:value];
#endif
- [painter setKnobProportion:proportion];
+ [painter setKnobProportion:proportion];*/
END_BLOCK_OBJC_EXCEPTIONS;
}
-static void scrollerImpPaint(NSScrollerImp *scrollerImp, bool enabled)
+/*static void scrollerImpPaint(NSScrollerImp *scrollerImp, bool enabled)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
// Use rectForPart: here; it will take the expansion transition progress into account.
@@ -542,7 +545,7 @@ static void scrollerImpPaint(NSScrollerImp *scrollerImp, bool enabled)
if (enabled)
[scrollerImp drawKnob];
END_BLOCK_OBJC_EXCEPTIONS;
-}
+}*/
bool ScrollbarThemeMac::paint(Scrollbar& scrollbar, GraphicsContext& context, const IntRect& damageRect)
{
@@ -557,7 +560,7 @@ bool ScrollbarThemeMac::paint(Scrollbar& scrollbar, GraphicsContext& context, co
context.clip(damageRect);
context.translate(scrollbar.frameRect().x(), scrollbar.frameRect().y());
LocalCurrentGraphicsContext localContext(context);
- scrollerImpPaint(scrollbarMap()->get(&scrollbar).get(), scrollbar.enabled());
+ //scrollerImpPaint(scrollbarMap()->get(&scrollbar).get(), scrollbar.enabled());
return true;
}
diff --git a/Source/WebCore/platform/mac/ThemeMac.mm b/Source/WebCore/platform/mac/ThemeMac.mm
index cf30b4ae2..17b6cefb7 100644
--- a/Source/WebCore/platform/mac/ThemeMac.mm
+++ b/Source/WebCore/platform/mac/ThemeMac.mm
@@ -213,7 +213,7 @@ static void updateStates(NSCell* cell, const ControlStates& controlStates, bool
// a view in a window whose key state can be detected.
}
-static ThemeDrawState convertControlStatesToThemeDrawState(ThemeButtonKind kind, const ControlStates& controlStates)
+static int convertControlStatesToThemeDrawState(int kind, const ControlStates& controlStates)
{
return 0;
/*ControlStates::States states = controlStates.states();
diff --git a/Source/WebCore/platform/mac/WebCoreFullScreenPlaceholderView.mm b/Source/WebCore/platform/mac/WebCoreFullScreenPlaceholderView.mm
index 515d751c6..38763382a 100644
--- a/Source/WebCore/platform/mac/WebCoreFullScreenPlaceholderView.mm
+++ b/Source/WebCore/platform/mac/WebCoreFullScreenPlaceholderView.mm
@@ -45,13 +45,13 @@ using namespace WebCore;
if (!self)
return nil;
- self.wantsLayer = YES;
+ //self.wantsLayer = YES;
self.autoresizesSubviews = YES;
self.layerContentsPlacement = NSViewLayerContentsPlacementScaleProportionallyToFit;
self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawNever;
_effectView = adoptNS([[NSVisualEffectView alloc] initWithFrame:frameRect]);
- _effectView.get().wantsLayer = YES;
+ //_effectView.get().wantsLayer = YES;
_effectView.get().autoresizesSubviews = YES;
_effectView.get().autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
_effectView.get().blendingMode = NSVisualEffectBlendingModeWithinWindow;
@@ -85,12 +85,13 @@ using namespace WebCore;
@dynamic contents;
- (void)setContents:(id)contents
{
- [[self layer] setContents:contents];
+ //[[self layer] setContents:contents];
}
- (id)contents
{
- return [[self layer] contents];
+ //return [[self layer] contents];
+ return nil;
}
- (void)setExitWarningVisible:(BOOL)visible
diff --git a/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm b/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm
index 29975fd23..441f93722 100644
--- a/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm
+++ b/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm
@@ -93,10 +93,11 @@ NSString *canonicalLocaleName(NSString *language)
LangCode languageCode;
RegionCode regionCode;
- Boolean success = CFLocaleGetLanguageRegionEncodingForLocaleIdentifier((CFStringRef)language, &languageCode, &regionCode, nullptr, nullptr);
+ /*Boolean success = CFLocaleGetLanguageRegionEncodingForLocaleIdentifier((CFStringRef)language, &languageCode, &regionCode, nullptr, nullptr);
if (!success)
return @"en_US";
RetainPtr<CFStringRef> code = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode));
- return (NSString *)code.autorelease();
+ return (NSString *)code.autorelease();*/
+ return @"en_US";
}
diff --git a/Source/WebCore/platform/mac/WidgetMac.mm b/Source/WebCore/platform/mac/WidgetMac.mm
index 60f1bbca0..ba123fc8c 100644
--- a/Source/WebCore/platform/mac/WidgetMac.mm
+++ b/Source/WebCore/platform/mac/WidgetMac.mm
@@ -193,6 +193,7 @@ void Widget::paint(GraphicsContext& p, const IntRect& r, SecurityOriginPaintPoli
// We don't want to paint the view at all if it's layer backed, because then we'll end up
// with multiple copies of the view contents, one in the view's layer itself and one in the
// WebHTMLView's backing store (either a layer or the window backing store).
+#if !PLATFORM(GNUSTEP)
if (view.layer) {
#if PLATFORM(MAC)
// However, Quicken Essentials has a plug-in that depends on drawing to update the layer (see <rdar://problem/15221231>).
@@ -200,6 +201,7 @@ void Widget::paint(GraphicsContext& p, const IntRect& r, SecurityOriginPaintPoli
#endif
return;
}
+#endif
// Take a reference to this Widget, because sending messages to the views can invoke arbitrary
// code, which can deref it.
diff --git a/Source/WebCore/platform/network/Cookie.cpp b/Source/WebCore/platform/network/Cookie.cpp
index cefcf5aa9..fe5b79703 100644
--- a/Source/WebCore/platform/network/Cookie.cpp
+++ b/Source/WebCore/platform/network/Cookie.cpp
@@ -28,7 +28,7 @@
namespace WebCore {
-#if !PLATFORM(COCOA)
+#if !PLATFORM(COCOA) || PLATFORM(GNUSTEP)
bool Cookie::operator==(const Cookie& other) const
{
return name == other.name
diff --git a/Source/WebCore/platform/network/Credential.h b/Source/WebCore/platform/network/Credential.h
index b0fb0dcd7..998ee97bb 100644
--- a/Source/WebCore/platform/network/Credential.h
+++ b/Source/WebCore/platform/network/Credential.h
@@ -28,7 +28,7 @@
#include <wtf/Platform.h>
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
#include "CredentialCocoa.h"
#else
diff --git a/Source/WebCore/platform/network/NetworkStateNotifier.cpp b/Source/WebCore/platform/network/NetworkStateNotifier.cpp
index aa25bb0cb..50ecd515f 100644
--- a/Source/WebCore/platform/network/NetworkStateNotifier.cpp
+++ b/Source/WebCore/platform/network/NetworkStateNotifier.cpp
@@ -75,7 +75,7 @@ void NetworkStateNotifier::updateStateSoon()
m_updateStateTimer.startOneShot(updateStateSoonInterval);
}
-#if !PLATFORM(IOS) && !PLATFORM(MAC) && !PLATFORM(WIN)
+#if (!PLATFORM(IOS) && !PLATFORM(MAC) && !PLATFORM(WIN)) || PLATFORM(GNUSTEP)
// Empty stubs for platforms where monitoring of network state is not yet implemented.
diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h
index fae2e201c..a28bc70d4 100644
--- a/Source/WebCore/platform/network/NetworkStorageSession.h
+++ b/Source/WebCore/platform/network/NetworkStorageSession.h
@@ -144,7 +144,7 @@ private:
HashSet<String> m_topPrivatelyControlledDomainsForCookiePartitioning;
#endif
-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
public:
CookieStorageObserver& cookieStorageObserver() const;
diff --git a/Source/WebCore/platform/network/ProtectionSpaceBase.cpp b/Source/WebCore/platform/network/ProtectionSpaceBase.cpp
index dfc74e522..27ee6277c 100644
--- a/Source/WebCore/platform/network/ProtectionSpaceBase.cpp
+++ b/Source/WebCore/platform/network/ProtectionSpaceBase.cpp
@@ -133,7 +133,8 @@ bool ProtectionSpaceBase::compare(const ProtectionSpace& a, const ProtectionSpac
if (a.authenticationScheme() != b.authenticationScheme())
return false;
- return ProtectionSpace::platformCompare(a, b);
+ //return ProtectionSpace::platformCompare(a, b);
+ return true; // FIXME
}
}
diff --git a/Source/WebCore/platform/network/ResourceHandleClient.cpp b/Source/WebCore/platform/network/ResourceHandleClient.cpp
index 9487d967e..dec40fd6d 100644
--- a/Source/WebCore/platform/network/ResourceHandleClient.cpp
+++ b/Source/WebCore/platform/network/ResourceHandleClient.cpp
@@ -67,7 +67,7 @@ void ResourceHandleClient::willCacheResponseAsync(ResourceHandle* handle, CFCach
{
handle->continueWillCacheResponse(response);
}
-#elif PLATFORM(COCOA)
+#elif PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
void ResourceHandleClient::willCacheResponseAsync(ResourceHandle* handle, NSCachedURLResponse *response)
{
handle->continueWillCacheResponse(response);
diff --git a/Source/WebCore/platform/network/ResourceHandleClient.h b/Source/WebCore/platform/network/ResourceHandleClient.h
index 261893999..7af95dd09 100644
--- a/Source/WebCore/platform/network/ResourceHandleClient.h
+++ b/Source/WebCore/platform/network/ResourceHandleClient.h
@@ -93,7 +93,7 @@ public:
// Client will pass an updated request using ResourceHandle::continueWillCacheResponse() when ready.
#if USE(CFURLCONNECTION)
WEBCORE_EXPORT virtual void willCacheResponseAsync(ResourceHandle*, CFCachedURLResponseRef);
-#elif PLATFORM(COCOA)
+#elif PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
WEBCORE_EXPORT virtual void willCacheResponseAsync(ResourceHandle*, NSCachedURLResponse *);
#endif
@@ -118,7 +118,7 @@ public:
virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) { return true; }
#endif // PLATFORM(WIN)
-#elif PLATFORM(COCOA)
+#elif PLATFORM(COCOA) && !PLATFORM(GNUSTEP)
virtual NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse *response) { return response; }
#endif
};
diff --git a/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm b/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
index 537876395..52d38f838 100644
--- a/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
+++ b/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm
@@ -24,15 +24,15 @@
*/
#import "config.h"
-#import "ResourceRequest.h"
+#import "cf/ResourceRequest.h"
#if PLATFORM(COCOA)
-#import "CFNetworkSPI.h"
+//#import "CFNetworkSPI.h"
#import "FileSystem.h"
-#import "FormDataStreamMac.h"
+#import "mac/FormDataStreamMac.h"
#import "HTTPHeaderNames.h"
-#import "ResourceRequestCFNet.h"
+//#import "ResourceRequestCFNet.h"
#import "RuntimeApplicationChecks.h"
#import "WebCoreSystemInterface.h"
#import <Foundation/Foundation.h>
@@ -74,10 +74,10 @@ void ResourceRequest::clearOrUpdateNSURLRequest()
#else
-CFURLRequestRef ResourceRequest::cfURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
+/*CFURLRequestRef ResourceRequest::cfURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
{
return [nsURLRequest(bodyPolicy) _CFURLRequest];
-}
+}*/
static inline ResourceRequestCachePolicy fromPlatformRequestCachePolicy(NSURLRequestCachePolicy policy)
{
@@ -179,7 +179,7 @@ void ResourceRequest::doUpdatePlatformRequest()
CFURLRequestSetRequestPriority([nsRequest _CFURLRequest], toPlatformRequestPriority(priority()));
[nsRequest setCachePolicy:toPlatformRequestCachePolicy(cachePolicy())];
- _CFURLRequestSetProtocolProperty([nsRequest _CFURLRequest], kCFURLRequestAllowAllPOSTCaching, kCFBooleanTrue);
+ //_CFURLRequestSetProtocolProperty([nsRequest _CFURLRequest], kCFURLRequestAllowAllPOSTCaching, kCFBooleanTrue); wtf
double timeoutInterval = ResourceRequestBase::timeoutInterval();
if (timeoutInterval)
diff --git a/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm b/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm
index e991c35e6..f404818de 100644
--- a/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm
+++ b/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm
@@ -24,13 +24,13 @@
*/
#import "config.h"
-#import "ResourceResponse.h"
+#import "cf/ResourceResponse.h"
#if PLATFORM(COCOA)
#import "CFNetworkSPI.h"
#import "HTTPParsers.h"
-#import "WebCoreURLResponse.h"
+#import "mac/WebCoreURLResponse.h"
#import <Foundation/Foundation.h>
#import <limits>
#import <wtf/AutodrainedPool.h>
@@ -73,7 +73,7 @@ void ResourceResponse::disableLazyInitialization()
lazyInit(AllFields);
}
-CertificateInfo ResourceResponse::platformCertificateInfo() const
+/*CertificateInfo ResourceResponse::platformCertificateInfo() const
{
#if USE(CFURLCONNECTION)
ASSERT(m_cfResponse);
@@ -112,7 +112,7 @@ CertificateInfo ResourceResponse::platformCertificateInfo() const
#else
return CertificateInfo(CertificateInfo::certificateChainFromSecTrust(trust));
#endif
-}
+}*/
#if USE(CFURLCONNECTION)
@@ -135,7 +135,7 @@ NSURLResponse *ResourceResponse::nsURLResponse() const
ResourceResponse::ResourceResponse(NSURLResponse* nsResponse)
: m_initLevel(Uninitialized)
- , m_cfResponse([nsResponse _CFURLResponse])
+ //, m_cfResponse([nsResponse _CFURLResponse])
, m_nsResponse(nsResponse)
{
m_isNull = !nsResponse;
diff --git a/Source/WebCore/platform/network/mac/ResourceErrorMac.mm b/Source/WebCore/platform/network/mac/ResourceErrorMac.mm
index 00d6e27d7..645f17f7b 100644
--- a/Source/WebCore/platform/network/mac/ResourceErrorMac.mm
+++ b/Source/WebCore/platform/network/mac/ResourceErrorMac.mm
@@ -24,7 +24,7 @@
*/
#import "config.h"
-#import "ResourceError.h"
+#import "cf/ResourceError.h"
#import "URL.h"
#import <CoreFoundation/CFError.h>
diff --git a/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp b/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp
index a608e7e10..3c0575fe5 100644
--- a/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp
+++ b/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp
@@ -78,7 +78,7 @@ ResourceError ResourceError::genericGError(GError* error, SoupRequest* request)
ResourceError ResourceError::tlsError(SoupRequest* request, unsigned tlsErrors, GTlsCertificate* certificate)
{
ResourceError resourceError(g_quark_to_string(SOUP_HTTP_ERROR), SOUP_STATUS_SSL_FAILED,
- failingURI(request), unacceptableTLSCertificate());
+ failingURI(request), /*unacceptableTLSCertificate()*/String::fromUTF8("Unacceptable TLS certificate"));
resourceError.setTLSErrors(tlsErrors);
resourceError.setCertificate(certificate);
return resourceError;
@@ -95,6 +95,8 @@ ResourceError ResourceError::timeoutError(const URL& failingURL)
return ResourceError(errorDomain, timeoutError, failingURL, "Request timed out", ResourceError::Type::Timeout);
}
+/*
+Really really tricky issue here!
void ResourceError::doPlatformIsolatedCopy(const ResourceError& other)
{
m_certificate = other.m_certificate;
@@ -104,7 +106,7 @@ void ResourceError::doPlatformIsolatedCopy(const ResourceError& other)
bool ResourceError::platformCompare(const ResourceError& a, const ResourceError& b)
{
return a.tlsErrors() == b.tlsErrors();
-}
+}*/
} // namespace WebCore
diff --git a/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h b/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h
index 0fc71c443..b4fdedccb 100644
--- a/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h
+++ b/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h
@@ -73,6 +73,7 @@ struct CGFontDescriptor {
typedef const struct CGColorTransform* CGColorTransformRef;
+#if !PLATFORM(GNUSTEP)
typedef enum {
kCGContextTypeUnknown,
kCGContextTypePDF,
@@ -85,6 +86,7 @@ typedef enum {
kCGContextTypeIOSurface,
kCGContextTypeCount
} CGContextType;
+#endif
typedef enum {
kCGCompositeCopy = 1,
@@ -173,7 +175,7 @@ CGContextType CGContextGetType(CGContextRef);
CFStringRef CGFontCopyFamilyName(CGFontRef);
bool CGFontGetDescriptor(CGFontRef, CGFontDescriptor*);
-bool CGFontGetGlyphAdvancesForStyle(CGFontRef, const CGAffineTransform* , CGFontRenderingStyle, const CGGlyph[], size_t count, CGSize advances[]);
+//bool CGFontGetGlyphAdvancesForStyle(CGFontRef, const CGAffineTransform* , CGFontRenderingStyle, const CGGlyph[], size_t count, CGSize advances[]);
void CGFontGetGlyphsForUnichars(CGFontRef, const UniChar[], CGGlyph[], size_t count);
const CGFontHMetrics* CGFontGetHMetrics(CGFontRef);
const char* CGFontGetPostScriptName(CGFontRef);
diff --git a/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h b/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
index d44c628d8..bae1f4a7a 100644
--- a/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
+++ b/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
@@ -69,7 +69,7 @@ extern const CFStringRef kCTFontReferenceURLAttribute;
extern const CFStringRef kCTFontOpticalSizeAttribute;
extern const CFStringRef kCTFontPostScriptNameAttribute;
-bool CTFontTransformGlyphs(CTFontRef, CGGlyph glyphs[], CGSize advances[], CFIndex count, CTFontTransformOptions);
+//bool CTFontTransformGlyphs(CTFontRef, CGGlyph glyphs[], CGSize advances[], CFIndex count, CTFontTransformOptions);
CGSize CTRunGetInitialAdvance(CTRunRef run);
CTLineRef CTLineCreateWithUniCharProvider(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon);
diff --git a/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h b/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
index fe7b6653e..b09d83fa9 100644
--- a/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
+++ b/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
@@ -116,8 +116,8 @@ typedef struct CAColorMatrix CAColorMatrix;
+ (NSValue *)valueWithCAColorMatrix:(CAColorMatrix)t;
@end
-@interface CAFilter : NSObject <NSCopying, NSMutableCopying, NSCoding>
-@end
+/*@interface CAFilter : NSObject <NSCopying, NSMutableCopying, NSCoding>
+@end*/
@interface CAFilter ()
+ (CAFilter *)filterWithType:(NSString *)type;
diff --git a/Source/WebCore/rendering/RenderTheme.h b/Source/WebCore/rendering/RenderTheme.h
index a28baaca7..9a916ee21 100644
--- a/Source/WebCore/rendering/RenderTheme.h
+++ b/Source/WebCore/rendering/RenderTheme.h
@@ -53,7 +53,7 @@ public:
// appropriate platform theme.
WEBCORE_EXPORT static RenderTheme& singleton();
- virtual void purgeCaches() { }
+ //virtual void purgeCaches() { }
// This method is called whenever style has been computed for an element and the appearance
// property has been set to a value other than "none". The theme should map in all of the appropriate
diff --git a/Source/WebCore/rendering/RenderThemeIOS.h b/Source/WebCore/rendering/RenderThemeIOS.h
index d15243d71..c93a16cdb 100644
--- a/Source/WebCore/rendering/RenderThemeIOS.h
+++ b/Source/WebCore/rendering/RenderThemeIOS.h
@@ -126,7 +126,7 @@ private:
RenderThemeIOS();
virtual ~RenderThemeIOS() { }
- void purgeCaches() override;
+ //void purgeCaches() override;
const Color& shadowColor() const;
FloatRect addRoundedBorderClip(const RenderObject& box, GraphicsContext&, const IntRect&);
diff --git a/Source/WebCore/rendering/RenderThemeIOS.mm b/Source/WebCore/rendering/RenderThemeIOS.mm
index d7c8bc50f..0c5f0d536 100644
--- a/Source/WebCore/rendering/RenderThemeIOS.mm
+++ b/Source/WebCore/rendering/RenderThemeIOS.mm
@@ -1342,13 +1342,13 @@ String RenderThemeIOS::modernMediaControlsStyleSheet()
#endif
}
-void RenderThemeIOS::purgeCaches()
+/*void RenderThemeIOS::purgeCaches()
{
m_legacyMediaControlsScript.clearImplIfNotShared();
m_mediaControlsScript.clearImplIfNotShared();
m_legacyMediaControlsStyleSheet.clearImplIfNotShared();
m_mediaControlsStyleSheet.clearImplIfNotShared();
-}
+}*/
String RenderThemeIOS::mediaControlsScript()
{
diff --git a/Source/WebCore/rendering/RenderThemeMac.h b/Source/WebCore/rendering/RenderThemeMac.h
index a4874a011..234f2d053 100644
--- a/Source/WebCore/rendering/RenderThemeMac.h
+++ b/Source/WebCore/rendering/RenderThemeMac.h
@@ -171,7 +171,7 @@ private:
Color systemColor(CSSValueID) const final;
- void purgeCaches() final;
+ //void purgeCaches() final;
// Get the control size based off the font. Used by some of the controls (like buttons).
NSControlSize controlSizeForFont(const RenderStyle&) const;
diff --git a/Source/WebCore/rendering/RenderThemeMac.mm b/Source/WebCore/rendering/RenderThemeMac.mm
index 3c36f385e..52e799136 100644
--- a/Source/WebCore/rendering/RenderThemeMac.mm
+++ b/Source/WebCore/rendering/RenderThemeMac.mm
@@ -232,13 +232,13 @@ String RenderThemeMac::modernMediaControlsStyleSheet()
#endif
}
-void RenderThemeMac::purgeCaches()
+/*void RenderThemeMac::purgeCaches()
{
m_legacyMediaControlsScript.clearImplIfNotShared();
m_mediaControlsScript.clearImplIfNotShared();
m_legacyMediaControlsStyleSheet.clearImplIfNotShared();
m_mediaControlsStyleSheet.clearImplIfNotShared();
-}
+}*/
String RenderThemeMac::mediaControlsScript()
{
diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp
index ee2f91f14..94969f906 100644
--- a/Source/WebCore/testing/Internals.cpp
+++ b/Source/WebCore/testing/Internals.cpp
@@ -1693,7 +1693,7 @@ RefPtr<Range> Internals::rangeOfStringNearLocation(const Range& searchRange, con
ExceptionOr<RefPtr<Range>> Internals::rangeForDictionaryLookupAtLocation(int x, int y)
{
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(GNUSTEP)
auto* document = contextDocument();
if (!document || !document->frame())
return Exception { InvalidAccessError };
diff --git a/Source/WebKitLegacy/PlatformMac.cmake b/Source/WebKitLegacy/PlatformMac.cmake
index 71f42dda9..1af0089c0 100644
--- a/Source/WebKitLegacy/PlatformMac.cmake
+++ b/Source/WebKitLegacy/PlatformMac.cmake
@@ -211,34 +211,34 @@ list(APPEND WebKit_SOURCES
mac/Panels/WebAuthenticationPanel.m
mac/Panels/WebPanelAuthenticationHandler.m
- mac/Plugins/WebBaseNetscapePluginView.mm
- mac/Plugins/WebBasePluginPackage.mm
- mac/Plugins/WebNetscapePluginEventHandler.mm
- mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
- mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
- mac/Plugins/WebNetscapePluginPackage.mm
- mac/Plugins/WebNetscapePluginStream.mm
- mac/Plugins/WebNetscapePluginView.mm
- mac/Plugins/WebPluginContainerCheck.mm
- mac/Plugins/WebPluginController.mm
- mac/Plugins/WebPluginDatabase.mm
- mac/Plugins/WebPluginPackage.mm
- mac/Plugins/WebPluginRequest.m
- mac/Plugins/npapi.mm
-
- mac/Plugins/Hosted/HostedNetscapePluginStream.mm
- mac/Plugins/Hosted/NetscapePluginHostManager.mm
- mac/Plugins/Hosted/NetscapePluginHostProxy.mm
- mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
- mac/Plugins/Hosted/ProxyInstance.mm
- mac/Plugins/Hosted/ProxyRuntimeObject.mm
- mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
- mac/Plugins/Hosted/WebKitPluginAgent.defs
- mac/Plugins/Hosted/WebKitPluginAgentReply.defs
- mac/Plugins/Hosted/WebKitPluginClient.defs
- mac/Plugins/Hosted/WebKitPluginHost.defs
- mac/Plugins/Hosted/WebKitPluginHostTypes.defs
- mac/Plugins/Hosted/WebTextInputWindowController.m
+ #mac/Plugins/WebBaseNetscapePluginView.mm
+ #mac/Plugins/WebBasePluginPackage.mm
+ #mac/Plugins/WebNetscapePluginEventHandler.mm
+ #mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
+ #mac/Plugins/WebNetscapePluginEventHandlerCocoa.mm
+ #mac/Plugins/WebNetscapePluginPackage.mm
+ #mac/Plugins/WebNetscapePluginStream.mm
+ #mac/Plugins/WebNetscapePluginView.mm
+ #mac/Plugins/WebPluginContainerCheck.mm
+ #mac/Plugins/WebPluginController.mm
+ #mac/Plugins/WebPluginDatabase.mm
+ #mac/Plugins/WebPluginPackage.mm
+ #mac/Plugins/WebPluginRequest.m
+ #mac/Plugins/npapi.mm
+
+ #mac/Plugins/Hosted/HostedNetscapePluginStream.mm
+ #mac/Plugins/Hosted/NetscapePluginHostManager.mm
+ #mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+ #mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+ #mac/Plugins/Hosted/ProxyInstance.mm
+ #mac/Plugins/Hosted/ProxyRuntimeObject.mm
+ #mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+ #mac/Plugins/Hosted/WebKitPluginAgent.defs
+ #mac/Plugins/Hosted/WebKitPluginAgentReply.defs
+ #mac/Plugins/Hosted/WebKitPluginClient.defs
+ #mac/Plugins/Hosted/WebKitPluginHost.defs
+ #mac/Plugins/Hosted/WebKitPluginHostTypes.defs
+ #mac/Plugins/Hosted/WebTextInputWindowController.m
mac/Storage/WebDatabaseManager.mm
mac/Storage/WebDatabaseManagerClient.mm
@@ -300,12 +300,12 @@ list(APPEND WebKit_SOURCES
mac/WebView/WebHTMLView.mm
mac/WebView/WebImmediateActionController.mm
mac/WebView/WebIndicateLayer.mm
- mac/WebView/WebJSPDFDoc.mm
+ #mac/WebView/WebJSPDFDoc.mm
mac/WebView/WebNavigationData.mm
mac/WebView/WebNotification.mm
- mac/WebView/WebPDFDocumentExtras.mm
- mac/WebView/WebPDFRepresentation.mm
- mac/WebView/WebPDFView.mm
+ #mac/WebView/WebPDFDocumentExtras.mm
+ #mac/WebView/WebPDFRepresentation.mm
+ #mac/WebView/WebPDFView.mm
mac/WebView/WebPolicyDelegate.mm
mac/WebView/WebPreferences.mm
mac/WebView/WebResource.mm
@@ -395,9 +395,9 @@ set(C99_FILES
foreach (_file ${WebKit_SOURCES})
list(FIND C99_FILES ${_file} _c99_index)
if (${_c99_index} EQUAL -1)
- set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14")
+ set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14 -Wno-unused-parameter")
else ()
- set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS -std=c99)
+ set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c99 -Wno-unused-parameter")
endif ()
endforeach ()
@@ -410,31 +410,31 @@ file(COPY
mac/Plugins/Hosted/WebKitPluginHostTypes.h
DESTINATION ${DERIVED_SOURCES_WEBKITLEGACY_DIR})
-add_custom_command(
- OUTPUT
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyServer.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyUser.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentServer.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostServer.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
- MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
- WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
- COMMAND mig -I.. WebKitPluginAgent.defs WebKitPluginAgentReply.defs WebKitPluginHost.defs
- VERBATIM)
-add_custom_command(
- OUTPUT
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientUser.c
- MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
- WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
- COMMAND mig -I.. -sheader WebKitPluginClientServer.h WebKitPluginClient.defs
- VERBATIM)
-list(APPEND WebKit_SOURCES
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
- ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
-)
+#add_custom_command(
+# OUTPUT
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyServer.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentReplyUser.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentServer.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostServer.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
+# MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
+# WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
+# COMMAND mig -I.. WebKitPluginAgent.defs WebKitPluginAgentReply.defs WebKitPluginHost.defs
+# VERBATIM)
+#add_custom_command(
+# OUTPUT
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientUser.c
+# MAIN_DEPENDENCY mac/Plugins/Hosted/WebKitPluginAgent.defs
+# WORKING_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
+# COMMAND mig -I.. -sheader WebKitPluginClientServer.h WebKitPluginClient.defs
+# VERBATIM)
+#list(APPEND WebKit_SOURCES
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginAgentUser.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginClientServer.c
+# ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitPluginHostUser.c
+#)
WEBKIT_CREATE_FORWARDING_HEADERS(WebKitLegacy DIRECTORIES ${WebKitLegacy_FORWARDING_HEADERS_DIRECTORIES} FILES ${WebKitLegacy_FORWARDING_HEADERS_FILES})
WEBKIT_CREATE_FORWARDING_HEADERS(WebKit DIRECTORIES ${FORWARDING_HEADERS_DIR}/WebKitLegacy)
@@ -454,4 +454,4 @@ endforeach ()
set(WebKit_OUTPUT_NAME WebKitLegacy)
-set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
+#set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
diff --git a/Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp b/Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp
index 3e2f85a25..9d75bdd3b 100644
--- a/Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp
+++ b/Source/WebKitLegacy/cf/WebCoreSupport/WebInspectorClientCF.cpp
@@ -70,7 +70,7 @@ static inline RetainPtr<CFStringRef> createKeyForPreferences(const String& key)
static void populateSetting(const String& key, String* setting)
{
RetainPtr<CFStringRef> preferencesKey = createKeyForPreferences(key);
- RetainPtr<CFPropertyListRef> value = adoptCF(CFPreferencesCopyAppValue(preferencesKey.get(), kCFPreferencesCurrentApplication));
+ RetainPtr<CFPropertyListRef> value = NULL;//adoptCF(CFPreferencesCopyAppValue(preferencesKey.get(), kCFPreferencesCurrentApplication));
if (!value)
return;
@@ -86,7 +86,7 @@ static void populateSetting(const String& key, String* setting)
static void storeSetting(const String& key, const String& setting)
{
- CFPreferencesSetAppValue(createKeyForPreferences(key).get(), setting.createCFString().get(), kCFPreferencesCurrentApplication);
+ //CFPreferencesSetAppValue(createKeyForPreferences(key).get(), setting.createCFString().get(), kCFPreferencesCurrentApplication);
}
void WebInspectorClient::sendMessageToFrontend(const String& message)
diff --git a/Source/WebKitLegacy/mac/DOM/DOM.mm b/Source/WebKitLegacy/mac/DOM/DOM.mm
index b2f0743b4..33b540d24 100644
--- a/Source/WebKitLegacy/mac/DOM/DOM.mm
+++ b/Source/WebKitLegacy/mac/DOM/DOM.mm
@@ -156,7 +156,9 @@ static void createElementClassMap()
addElementClass(HTMLNames::titleTag, [DOMHTMLTitleElement class]);
addElementClass(HTMLNames::trTag, [DOMHTMLTableRowElement class]);
addElementClass(HTMLNames::ulTag, [DOMHTMLUListElement class]);
+#if ENABLE(VIDEO)
addElementClass(HTMLNames::videoTag, [DOMHTMLVideoElement class]);
+#endif
addElementClass(HTMLNames::xmpTag, [DOMHTMLPreElement class]);
}
@@ -510,11 +512,15 @@ id <DOMEventTarget> kit(EventTarget* eventTarget)
- (NSImage *)renderedImage
{
+#if ENABLE(DRAG_SUPPORT)
auto& node = *core(self);
auto* frame = node.document().frame();
if (!frame)
return nil;
return createDragImageForNode(*frame, node).autorelease();
+#else
+ return nil;
+#endif
}
#endif
@@ -628,7 +634,11 @@ id <DOMEventTarget> kit(EventTarget* eventTarget)
// iOS uses CGImageRef for drag images, which doesn't support separate logical/physical sizes.
#if PLATFORM(MAC)
+#if ENABLE(DRAG_SUPPORT)
RetainPtr<NSImage> renderedImage = createDragImageForRange(*frame, range, forceBlackText);
+#else
+ RetainPtr<NSImage> renderedImage = NULL;
+#endif
IntSize size([renderedImage size]);
size.scale(1 / frame->page()->deviceScaleFactor());
diff --git a/Source/WebKitLegacy/mac/DOM/DOMPrivate.h b/Source/WebKitLegacy/mac/DOM/DOMPrivate.h
index ad0aa9fe5..d2b201f3b 100644
--- a/Source/WebKitLegacy/mac/DOM/DOMPrivate.h
+++ b/Source/WebKitLegacy/mac/DOM/DOMPrivate.h
@@ -28,9 +28,9 @@
#import <WebKitLegacy/WebAutocapitalizeTypes.h>
#import <WebKitLegacy/WebDOMOperationsPrivate.h>
-#if TARGET_OS_IPHONE
+//#if TARGET_OS_IPHONE
#import <CoreText/CoreText.h>
-#endif
+//#endif
@interface DOMNode (DOMNodeExtensionsPendingPublic)
#if !TARGET_OS_IPHONE
diff --git a/Source/WebKitLegacy/mac/Misc/WebCache.mm b/Source/WebKitLegacy/mac/Misc/WebCache.mm
index 2f5082875..8ea627f5b 100644
--- a/Source/WebKitLegacy/mac/Misc/WebCache.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebCache.mm
@@ -49,6 +49,17 @@
#import <WebCore/WebCoreThreadRun.h>
#endif
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
@implementation WebCache
+ (void)initialize
diff --git a/Source/WebKitLegacy/mac/Misc/WebDownload.mm b/Source/WebKitLegacy/mac/Misc/WebDownload.mm
index 392f04fac..367bfd3b9 100644
--- a/Source/WebKitLegacy/mac/Misc/WebDownload.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebDownload.mm
@@ -124,11 +124,11 @@ using namespace WebCore;
#if !PLATFORM(IOS)
// Try previously stored credential first.
if (![challenge previousFailureCount]) {
- NSURLCredential *credential = CredentialStorage::defaultCredentialStorage().get(emptyString(), ProtectionSpace([challenge protectionSpace])).nsCredential();
+ /*NSURLCredential *credential = CredentialStorage::defaultCredentialStorage().get(emptyString(), ProtectionSpace([challenge protectionSpace])).nsCredential();
if (credential) {
[[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
return;
- }
+ }*/
}
if ([realDelegate respondsToSelector:@selector(download:didReceiveAuthenticationChallenge:)]) {
diff --git a/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h b/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h
index e830e8b2a..43a5115e2 100644
--- a/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h
+++ b/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h
@@ -32,7 +32,7 @@
#import <Cocoa/Cocoa.h>
#endif
-#define ICON_DATABASE_DEPRECATED __deprecated_msg("WebIconDatabase is not API and no longer handles icon loading. It will be removed in a future release.")
+#define ICON_DATABASE_DEPRECATED //__deprecated_msg("WebIconDatabase is not API and no longer handles icon loading. It will be removed in a future release.")
extern NSString *WebIconDatabaseDidAddIconNotification;
diff --git a/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm b/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm
index 658cd20c4..a7d359fea 100644
--- a/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm
@@ -37,6 +37,7 @@
#import <wtf/MainThread.h>
#import <wtf/NeverDestroyed.h>
#import <wtf/RunLoop.h>
+#import <dispatch/dispatch.h>
using namespace WebCore;
diff --git a/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm b/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm
index a760c7682..9d10c9c4c 100644
--- a/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm
@@ -303,7 +303,7 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
if (!cacheDir || ![cacheDir isKindOfClass:[NSString class]]) {
#if PLATFORM(IOS)
cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
-#else
+#elif OS(DARWIN)
char cacheDirectory[MAXPATHLEN];
size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
diff --git a/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.mm b/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.mm
index 918b1c3b8..b26244d75 100644
--- a/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebKitVersionChecks.mm
@@ -28,7 +28,9 @@
#import "WebKitVersionChecks.h"
+#if OS(DARWIN)
#import <mach-o/dyld.h>
+#endif
static int WebKitLinkTimeVersion(void);
static int overridenWebKitLinkTimeVersion;
@@ -59,6 +61,7 @@ static int WebKitLinkTimeVersion(void)
if (overridenWebKitLinkTimeVersion)
return overridenWebKitLinkTimeVersion;
+#if OS(DARWIN)
#if !PLATFORM(IOS)
return NSVersionOfLinkTimeLibrary("WebKit");
#else
@@ -66,9 +69,16 @@ static int WebKitLinkTimeVersion(void)
// Third party applications do not link against WebKit, but rather against UIKit.
return NSVersionOfLinkTimeLibrary("UIKit");
#endif
+#else
+ return 0;
+#endif
}
bool linkedOnOrAfter(SDKVersion sdkVersion)
{
+#if OS(DARWIN)
return dyld_get_program_sdk_version() >= static_cast<uint32_t>(sdkVersion);
+#else
+ return false;
+#endif
}
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
index 0d482b4dd..a65547a12 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm
@@ -51,8 +51,8 @@ using namespace WebCore;
- (unsigned long long)usage
{
long long usage;
- if (webApplicationCacheStorage().calculateUsageForOrigin([_origin _core], usage))
- return usage;
+ //if (webApplicationCacheStorage().calculateUsageForOrigin([_origin _core], (int64_t)usage))
+ // return usage;
return 0;
}
@@ -61,8 +61,8 @@ using namespace WebCore;
long long quota;
if (!_origin)
return 0;
- if (webApplicationCacheStorage().calculateQuotaForOrigin(*[_origin _core], quota))
- return quota;
+ //if (webApplicationCacheStorage().calculateQuotaForOrigin(*[_origin _core], (int64_t)quota))
+ // return quota;
return 0;
}
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm
index 24e804103..95b7d7352 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm
@@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if !PLATFORM(IOS)
+#if !PLATFORM(IOS) && ENABLE(CONTEXT_MENUS)
#import "WebContextMenuClient.h"
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm
index 4746f5a95..a6ed06635 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm
@@ -385,7 +385,7 @@ void WebEditorClient::discardedComposition(Frame*)
void WebEditorClient::canceledComposition()
{
#if !PLATFORM(IOS)
- [[NSTextInputContext currentInputContext] discardMarkedText];
+ //[[NSTextInputContext currentInputContext] discardMarkedText];
#endif
}
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 0ab90e45e..ef31f912f 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -1714,6 +1714,7 @@ static String parameterValue(const Vector<String>& paramNames, const Vector<Stri
return String();
}
+#if 0
static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage,
NSArray *attributeNames, NSArray *attributeValues, NSURL *baseURL,
DOMElement *element, BOOL loadManually)
@@ -1757,6 +1758,7 @@ static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage,
return view;
}
+#endif
class PluginWidget : public PluginViewBase {
public:
@@ -1907,6 +1909,7 @@ static bool shouldBlockPlugin(WebBasePluginPackage *pluginPackage)
RefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement& element, const URL& url,
const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
+#if 0
BEGIN_BLOCK_OBJC_EXCEPTIONS;
ASSERT(paramNames.size() == paramValues.size());
@@ -2045,6 +2048,7 @@ RefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugI
END_BLOCK_OBJC_EXCEPTIONS;
return nullptr;
+#endif
}
void WebFrameLoaderClient::recreatePlugin(Widget*)
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
index 3bae093a1..a1f2b351c 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebInspectorClient.mm
@@ -476,7 +476,7 @@ void WebInspectorFrontendClient::append(const String& suggestedURL, const String
[window setMinFullScreenContentSize:NSMakeSize(minimumFullScreenWidth, minimumWindowHeight)];
[window setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenAllowsTiling)];
- window.titlebarAppearsTransparent = YES;
+ //window.titlebarAppearsTransparent = YES;
[self setWindow:window];
[window release];
diff --git a/Source/WebKitLegacy/mac/WebView/WebArchive.mm b/Source/WebKitLegacy/mac/WebView/WebArchive.mm
index 7c2f866e6..a489582d0 100644
--- a/Source/WebKitLegacy/mac/WebView/WebArchive.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebArchive.mm
@@ -41,6 +41,8 @@
#import <wtf/MainThread.h>
#import <wtf/RunLoop.h>
+#if ENABLE(WEB_ARCHIVE)
+
using namespace WebCore;
NSString *WebArchivePboardType = @"Apple Web Archive pasteboard type";
@@ -374,3 +376,5 @@ static BOOL isArrayOfClass(id object, Class elementClass)
}
@end
+
+#endif
diff --git a/Source/WebKitLegacy/mac/WebView/WebDataSource.mm b/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
index d33560a7b..201e73c54 100644
--- a/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
@@ -167,8 +167,10 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)_addSubframeArchives:(NSArray *)subframeArchives
{
// FIXME: This SPI is poor, poor design. Can we come up with another solution for those who need it?
+#if ENABLE(WEB_ARCHIVE)
for (WebArchive *archive in subframeArchives)
toPrivate(_private)->loader->addAllArchiveResources(*[archive _coreLegacyWebArchive]);
+#endif
}
#if !PLATFORM(IOS)
@@ -297,14 +299,17 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)_replaceSelectionWithArchive:(WebArchive *)archive selectReplacement:(BOOL)selectReplacement
{
+#if ENABLE(WEB_ARCHIVE)
DOMDocumentFragment *fragment = [self _documentFragmentWithArchive:archive];
if (fragment)
[[self webFrame] _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:NO matchStyle:NO];
+#endif
}
// FIXME: There are few reasons why this method and many of its related methods can't be pushed entirely into WebCore in the future.
- (DOMDocumentFragment *)_documentFragmentWithArchive:(WebArchive *)archive
{
+#if ENABLE(WEB_ARCHIVE)
ASSERT(archive);
WebResource *mainResource = [archive mainResource];
if (mainResource) {
@@ -324,6 +329,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
}
}
return nil;
+#endif
}
- (DOMDocumentFragment *)_documentFragmentWithImageResource:(WebResource *)resource
@@ -521,11 +527,15 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (WebArchive *)webArchive
{
+#if ENABLE(WEB_ARCHIVE)
// it makes no sense to grab a WebArchive from an uncommitted document.
if (!toPrivate(_private)->loader->isCommitted())
return nil;
return [[[WebArchive alloc] _initWithCoreLegacyWebArchive:LegacyWebArchive::create(*core([self webFrame]))] autorelease];
+#else
+ return nil;
+#endif
}
- (WebResource *)mainResource
@@ -555,7 +565,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (void)addSubresource:(WebResource *)subresource
{
+#if ENABLE(WEB_ARCHIVE)
toPrivate(_private)->loader->addArchiveResource([subresource _coreResource]);
+#endif
}
@end
diff --git a/Source/WebKitLegacy/mac/WebView/WebFrame.mm b/Source/WebKitLegacy/mac/WebView/WebFrame.mm
index f0f8e6285..54cf512a8 100644
--- a/Source/WebKitLegacy/mac/WebView/WebFrame.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebFrame.mm
@@ -130,6 +130,17 @@
#import <WebCore/WebCoreURLResponseIOS.h>
#endif
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
using namespace WebCore;
using namespace HTMLNames;
@@ -985,7 +996,11 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
{
// Currently, all documents that we can view source for
// (HTML and XML documents) can also be saved as web archives
+#if ENABLE(WEB_ARCHIVE)
return [self _canProvideDocumentSource];
+#else
+ return NO;
+#endif
}
- (void)_commitData:(NSData *)data
@@ -1888,6 +1903,7 @@ static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType)
- (void)_replaceSelectionWithWebArchive:(WebArchive *)webArchive selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace
{
+#if ENABLE(WEB_ARCHIVE)
NSArray* subresources = [webArchive subresources];
for (WebResource* subresource in subresources) {
if (![[self dataSource] subresourceForURL:[subresource URL]])
@@ -1896,6 +1912,7 @@ static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType)
DOMDocumentFragment* fragment = [[self dataSource] _documentFragmentWithArchive:webArchive];
[self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
+#endif
}
#endif // PLATFORM(IOS)
@@ -2554,8 +2571,10 @@ static NSURL *createUniqueWebDataURL()
- (void)loadArchive:(WebArchive *)archive
{
+#if ENABLE(WEB_ARCHIVE)
if (auto* coreArchive = [archive _coreLegacyWebArchive])
_private->coreFrame->loader().loadArchive(*coreArchive);
+#endif
}
- (void)stopLoading
diff --git a/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h b/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h
index 6a938c244..0679db5a5 100644
--- a/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h
+++ b/Source/WebKitLegacy/mac/WebView/WebFramePrivate.h
@@ -30,6 +30,7 @@
#import <WebKitLegacy/WebFrame.h>
#import <JavaScriptCore/JSBase.h>
+#import <CoreGraphics/CGGeometry.h>
#if !TARGET_OS_IPHONE
#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
diff --git a/Source/WebKitLegacy/mac/WebView/WebFrameView.mm b/Source/WebKitLegacy/mac/WebView/WebFrameView.mm
index d720c7a0f..d07044a8b 100644
--- a/Source/WebKitLegacy/mac/WebView/WebFrameView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebFrameView.mm
@@ -275,14 +275,15 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
// Since this is a "secret default" we don't bother registering it.
BOOL omitPDFSupport = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];
- if (!omitPDFSupport)
+ if (!omitPDFSupport) {
#if PLATFORM(IOS)
#define WebPDFView ([WebView _getPDFViewClass])
#endif
- addTypesFromClass(viewTypes, [WebPDFView class], [WebPDFView supportedMIMETypes]);
+ //addTypesFromClass(viewTypes, [WebPDFView class], [WebPDFView supportedMIMETypes]);
#if PLATFORM(IOS)
#undef WebPDFView
#endif
+ }
}
if (!addedImageTypes && !allowImageTypeOmission) {
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm
index 32e55529e..911752b97 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm
@@ -227,11 +227,13 @@ static RetainPtr<NSArray> newArrayWithStrings(const HashSet<String, ASCIICaseIns
- (NSString *)documentSource
{
+#if ENABLE(WEB_ARCHIVE)
if ([self _isDisplayingWebArchive]) {
SharedBuffer *parsedArchiveData = [_private->dataSource _documentLoader]->parsedArchiveData();
NSString *result = [[NSString alloc] initWithData:parsedArchiveData ? parsedArchiveData->createNSData().get() : nil encoding:NSUTF8StringEncoding];
return [result autorelease];
}
+#endif
Frame* coreFrame = core([_private->dataSource webFrame]);
if (!coreFrame)
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
index f94733bbe..02036b063 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -162,6 +162,17 @@
#import <WebCore/WebEvent.h>
#endif
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
using namespace WebCore;
using namespace HTMLNames;
using namespace WTF;
@@ -183,6 +194,7 @@ using namespace WTF;
- (void)forwardContextMenuAction:(id)sender;
@end
+#if ENABLE(CONTEXT_MENUS)
static std::optional<ContextMenuAction> toAction(NSInteger tag)
{
if (tag >= ContextMenuItemBaseCustomTag && tag <= ContextMenuItemLastCustomTag) {
@@ -550,6 +562,7 @@ static std::optional<NSInteger> toTag(ContextMenuAction action)
return std::nullopt;
}
+#endif
static WebMenuTarget* target;
@@ -574,8 +587,10 @@ static WebMenuTarget* target;
- (void)forwardContextMenuAction:(id)sender
{
+#if ENABLE(CONTEXT_MENUS)
if (auto action = toAction([sender tag]))
_menuController->contextMenuItemSelected(*action, [sender title]);
+#endif
}
@end
@@ -587,7 +602,7 @@ static WebMenuTarget* target;
@implementation NSWindow (BorderViewAccess)
- (NSView*)_web_borderView
{
- return _borderView;
+ return nil;//_borderView;
}
@end
@@ -1220,12 +1235,14 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
NSArray *types = [pasteboard types];
DOMDocumentFragment *fragment = nil;
+#if ENABLE(WEB_ARCHIVE)
if ([types containsObject:WebArchivePboardType] &&
(fragment = [self _documentFragmentFromPasteboard:pasteboard
forType:WebArchivePboardType
inContext:context
subresources:0]))
return fragment;
+#endif
if ([types containsObject:NSFilenamesPboardType] &&
(fragment = [self _documentFragmentFromPasteboard:pasteboard
@@ -1465,12 +1482,14 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
- (void)_writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard cachedAttributedString:(NSAttributedString *)attributedString
{
// Put HTML on the pasteboard.
+#if ENABLE(WEB_ARCHIVE)
if ([types containsObject:WebArchivePboardType]) {
if (RefPtr<LegacyWebArchive> coreArchive = LegacyWebArchive::createFromSelection(core([self _frame]))) {
if (RetainPtr<CFDataRef> data = coreArchive ? coreArchive->rawDataRepresentation() : 0)
[pasteboard setData:(NSData *)data.get() forType:WebArchivePboardType];
}
}
+#endif
// Put the attributed string on the pasteboard (RTF/RTFD format).
if ([types containsObject:NSRTFDPboardType]) {
@@ -1711,13 +1730,13 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
#if !PLATFORM(IOS)
ASSERT(!_private->subviewsSetAside);
ASSERT(_private->savedSubviews == nil);
- _private->savedSubviews = _subviews;
+ /*_private->savedSubviews = _subviews;
// We need to keep the layer-hosting view in the subviews, otherwise the layers flash.
if (_private->layerHostingView) {
NSArray* newSubviews = [[NSArray alloc] initWithObjects:_private->layerHostingView, nil];
_subviews = newSubviews;
} else
- _subviews = nil;
+ _subviews = nil;*/
_private->subviewsSetAside = YES;
#endif
}
@@ -1726,13 +1745,13 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
{
#if !PLATFORM(IOS)
ASSERT(_private->subviewsSetAside);
- if (_private->layerHostingView) {
+ /*if (_private->layerHostingView) {
[_subviews release];
_subviews = _private->savedSubviews;
} else {
ASSERT(_subviews == nil);
_subviews = _private->savedSubviews;
- }
+ }*/
_private->savedSubviews = nil;
_private->subviewsSetAside = NO;
#endif
@@ -2175,8 +2194,13 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
{
static NSArray *types = nil;
if (!types) {
+#if ENABLE(WEB_ARCHIVE)
types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, kUTTypePNG, nil];
+#else
+ types = [[NSArray alloc] initWithObjects:NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
+ NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, kUTTypePNG, nil];
+#endif
CFRetain(types);
}
return types;
@@ -2185,7 +2209,11 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
+ (NSArray *)_selectionPasteboardTypes
{
// FIXME: We should put data for NSHTMLPboardType on the pasteboard but Microsoft Excel doesn't like our format of HTML (3640423).
+#if ENABLE(WEB_ARCHIVE)
return [NSArray arrayWithObjects:WebArchivePboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, nil];
+#else
+ return [NSArray arrayWithObjects:NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, nil];
+#endif
}
- (void)pasteboardChangedOwner:(NSPasteboard *)pasteboard
@@ -2195,11 +2223,14 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
- (void)pasteboard:(NSPasteboard *)pasteboard provideDataForType:(NSString *)type
{
+#if ENABLE(WEB_ARCHIVE)
if ([type isEqual:NSRTFDPboardType] && [[pasteboard types] containsObject:WebArchivePboardType]) {
WebArchive *archive = [[WebArchive alloc] initWithData:[pasteboard dataForType:WebArchivePboardType]];
[pasteboard _web_writePromisedRTFDFromArchive:archive containsImage:[[pasteboard types] containsObject:NSTIFFPboardType]];
[archive release];
- } else if ([type isEqual:NSTIFFPboardType] && [self promisedDragTIFFDataSource]) {
+ } else
+#endif
+ if ([type isEqual:NSTIFFPboardType] && [self promisedDragTIFFDataSource]) {
if (Image* image = [self promisedDragTIFFDataSource]->image())
[pasteboard setData:(NSData *)image->tiffRepresentation() forType:NSTIFFPboardType];
[self setPromisedDragTIFFDataSource:0];
@@ -2310,7 +2341,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
{
// Guarantee that the autoscroll timer is invalidated, even if we don't receive
// a mouse up event.
-#if !PLATFORM(IOS)
+#if !PLATFORM(IOS) && !PLATFORM(GNUSTEP)
BOOL isStillDown = CGEventSourceButtonState(kCGEventSourceStateCombinedSessionState, kCGMouseButtonLeft);
#else
BOOL isStillDown = NO;
@@ -2526,6 +2557,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
inContext:(DOMRange *)context
subresources:(NSArray **)subresources
{
+#if ENABLE(WEB_ARCHIVE)
if (pboardType == WebArchivePboardType) {
WebArchive *archive = [[WebArchive alloc] initWithData:[pasteboard dataForType:WebArchivePboardType]];
if (subresources)
@@ -2534,6 +2566,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
[archive release];
return fragment;
}
+#endif
if (pboardType == NSFilenamesPboardType)
return [self _documentFragmentWithPaths:[pasteboard propertyListForType:NSFilenamesPboardType]];
@@ -2813,9 +2846,9 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
- (void)_web_addDescendantWebHTMLViewsToArray:(NSMutableArray *)array
{
-#if PLATFORM(IOS)
+//#if PLATFORM(IOS)
NSArray* _subviews = [self subviews];
-#endif
+//#endif
unsigned count = [_subviews count];
for (unsigned i = 0; i < count; ++i) {
NSView *child = [_subviews objectAtIndex:i];
@@ -3660,7 +3693,7 @@ WEBCORE_COMMAND(toggleUnderline)
[self layoutToMinimumPageWidth:0 height:0 originalPageWidth:0 originalPageHeight:0 maximumShrinkRatio:0 adjustingViewSize:NO];
}
-#if !PLATFORM(IOS)
+#if !PLATFORM(IOS) && ENABLE(CONTEXT_MENUS)
// Deliver mouseup events to the DOM for button 2.
- (void)rightMouseUp:(NSEvent *)event
{
@@ -6680,7 +6713,8 @@ static BOOL writingDirectionKeyBindingsEnabled()
if (_private) {
ASSERT(!_private->drawingIntoLayer);
_private->drawingIntoLayer = YES;
- _private->drawingIntoAcceleratedLayer = [layer drawsAsynchronously];
+ //_private->drawingIntoAcceleratedLayer = [layer drawsAsynchronously];
+ _private->drawingIntoAcceleratedLayer = NO;
}
[super drawLayer:layer inContext:ctx];
@@ -7195,19 +7229,19 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
return;
if (isInPasswordField(coreFrame)) {
- if (!_private->isInSecureInputState)
- EnableSecureEventInput();
- _private->isInSecureInputState = YES;
+ //if (!_private->isInSecureInputState)
+ // EnableSecureEventInput();
+ //_private->isInSecureInputState = YES;
// WebKit substitutes nil for input context when in password field, which corresponds to null TSMDocument. So, there is
// no need to call TSMGetActiveDocument(), which may return an incorrect result when selection hasn't been yet updated
// after focusing a node.
- static CFArrayRef inputSources = TISCreateASCIICapableInputSourceList();
- TSMSetDocumentProperty(0, kTSMDocumentEnabledInputSourcesPropertyTag, sizeof(CFArrayRef), &inputSources);
+ //static CFArrayRef inputSources = TISCreateASCIICapableInputSourceList();
+ //TSMSetDocumentProperty(0, kTSMDocumentEnabledInputSourcesPropertyTag, sizeof(CFArrayRef), &inputSources);
} else {
- if (_private->isInSecureInputState)
- DisableSecureEventInput();
- _private->isInSecureInputState = NO;
- TSMRemoveDocumentProperty(0, kTSMDocumentEnabledInputSourcesPropertyTag);
+ //if (_private->isInSecureInputState)
+ // DisableSecureEventInput();
+ //_private->isInSecureInputState = NO;
+ //TSMRemoveDocumentProperty(0, kTSMDocumentEnabledInputSourcesPropertyTag);
}
}
#endif
diff --git a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.h b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.h
index 512876399..c0e06cb0f 100644
--- a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.h
+++ b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.h
@@ -32,7 +32,7 @@
#import <wtf/RetainPtr.h>
@class DDActionContext;
-@class QLPreviewMenuItem;
+//@class QLPreviewMenuItem;
@class NSDictionary;
@class WebView;
@@ -49,7 +49,7 @@ struct DictionaryPopupInfo;
WebCore::HitTestResult _hitTestResult;
RetainPtr<NSImmediateActionGestureRecognizer> _immediateActionRecognizer;
- RetainPtr<QLPreviewMenuItem> _currentQLPreviewMenuItem;
+ //RetainPtr<QLPreviewMenuItem> _currentQLPreviewMenuItem;
RetainPtr<DDActionContext> _currentActionContext;
BOOL _hasActivatedActionContext;
BOOL _contentPreventsDefault;
diff --git a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
index f231ee5d2..92ac57f09 100644
--- a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
@@ -50,7 +50,7 @@
#import <WebCore/LookupSPI.h>
#import <WebCore/NSMenuSPI.h>
#import <WebCore/Page.h>
-#import <WebCore/QuickLookMacSPI.h>
+//#import <WebCore/QuickLookMacSPI.h>
#import <WebCore/RenderElement.h>
#import <WebCore/RenderObject.h>
#import <WebCore/RuntimeApplicationChecks.h>
@@ -58,12 +58,13 @@
#import <objc/objc-class.h>
#import <objc/objc.h>
#import <wtf/SoftLinking.h>
+#include <dispatch/dispatch.h>
-SOFT_LINK_FRAMEWORK_IN_UMBRELLA(Quartz, QuickLookUI)
-SOFT_LINK_CLASS(QuickLookUI, QLPreviewMenuItem)
+/*SOFT_LINK_FRAMEWORK_IN_UMBRELLA(Quartz, QuickLookUI)
+SOFT_LINK_CLASS(QuickLookUI, QLPreviewMenuItem)*/
-@interface WebImmediateActionController () <QLPreviewMenuItemDelegate>
-@end
+//@interface WebImmediateActionController () <QLPreviewMenuItemDelegate>
+//@end
@interface WebAnimationController : NSObject <NSImmediateActionAnimationController>
@end
@@ -92,10 +93,10 @@ using namespace WebCore;
_webView = nil;
id animationController = [_immediateActionRecognizer animationController];
- if ([animationController isKindOfClass:NSClassFromString(@"QLPreviewMenuItem")]) {
+ /*if ([animationController isKindOfClass:NSClassFromString(@"QLPreviewMenuItem")]) {
QLPreviewMenuItem *menuItem = (QLPreviewMenuItem *)animationController;
menuItem.delegate = nil;
- }
+ }*/
_immediateActionRecognizer = nil;
_currentActionContext = nil;
@@ -103,7 +104,7 @@ using namespace WebCore;
- (void)webView:(WebView *)webView didHandleScrollWheel:(NSEvent *)event
{
- [_currentQLPreviewMenuItem close];
+ //[_currentQLPreviewMenuItem close];
[self _clearImmediateActionState];
[_webView _clearTextIndicatorWithAnimation:TextIndicatorWindowDismissalAnimation::None];
}
@@ -125,7 +126,7 @@ using namespace WebCore;
- (void)_clearImmediateActionState
{
- if (!DataDetectorsLibrary())
+ /*if (!DataDetectorsLibrary())
return;
DDActionsManager *actionsManager = [getDDActionsManagerClass() sharedManager];
@@ -138,8 +139,8 @@ using namespace WebCore;
_type = WebImmediateActionNone;
_currentActionContext = nil;
- _currentQLPreviewMenuItem = nil;
- _contentPreventsDefault = NO;
+ //_currentQLPreviewMenuItem = nil;
+ _contentPreventsDefault = NO;*/
}
- (void)performHitTestAtPoint:(NSPoint)viewPoint
@@ -186,7 +187,7 @@ using namespace WebCore;
- (void)immediateActionRecognizerWillBeginAnimation:(NSImmediateActionGestureRecognizer *)immediateActionRecognizer
{
- if (!DataDetectorsLibrary())
+ /*if (!DataDetectorsLibrary())
return;
if (immediateActionRecognizer != _immediateActionRecognizer)
@@ -196,7 +197,7 @@ using namespace WebCore;
_hasActivatedActionContext = YES;
if (![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()])
[self _cancelImmediateAction];
- }
+ }*/
}
- (void)immediateActionRecognizerDidUpdateAnimation:(NSImmediateActionGestureRecognizer *)immediateActionRecognizer
@@ -280,11 +281,12 @@ using namespace WebCore;
if (indicator)
[_webView _setTextIndicator:*indicator withLifetime:TextIndicatorWindowLifetime::Permanent];
- QLPreviewMenuItem *item = [NSMenuItem standardQuickLookMenuItem];
+ /*QLPreviewMenuItem *item = [NSMenuItem standardQuickLookMenuItem];
item.previewStyle = QLPreviewStylePopover;
item.delegate = self;
_currentQLPreviewMenuItem = item;
- return (id <NSImmediateActionAnimationController>)item;
+ return (id <NSImmediateActionAnimationController>)item;*/
+ return nil;
}
}
@@ -348,13 +350,13 @@ using namespace WebCore;
return _webView;
}
-- (id<QLPreviewItem>)menuItem:(NSMenuItem *)menuItem previewItemAtPoint:(NSPoint)point
+/*- (id<QLPreviewItem>)menuItem:(NSMenuItem *)menuItem previewItemAtPoint:(NSPoint)point
{
if (!_webView)
return nil;
return _hitTestResult.absoluteLinkURL();
-}
+}*/
- (NSRectEdge)menuItem:(NSMenuItem *)menuItem preferredEdgeForPoint:(NSPoint)point
{
@@ -413,7 +415,7 @@ static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)
- (id <NSImmediateActionAnimationController>)_animationControllerForDataDetectedText
{
- if (!DataDetectorsLibrary())
+ /*if (!DataDetectorsLibrary())
return nil;
RefPtr<Range> detectedDataRange;
@@ -458,12 +460,13 @@ static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)
if (menuItems.count != 1)
return nil;
- return menuItems.lastObject;
+ return menuItems.lastObject;*/
+ return nil;
}
- (id <NSImmediateActionAnimationController>)_animationControllerForDataDetectedLink
{
- if (!DataDetectorsLibrary())
+ /*if (!DataDetectorsLibrary())
return nil;
RetainPtr<DDActionContext> actionContext = adoptNS([allocDDActionContextInstance() init]);
@@ -493,7 +496,8 @@ static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)
if (menuItems.count != 1)
return nil;
- return menuItems.lastObject;
+ return menuItems.lastObject;*/
+ return nil;
}
#pragma mark Text action
diff --git a/Source/WebKitLegacy/mac/WebView/WebPDFView.h b/Source/WebKitLegacy/mac/WebView/WebPDFView.h
index 633b4ff79..726f32f77 100644
--- a/Source/WebKitLegacy/mac/WebView/WebPDFView.h
+++ b/Source/WebKitLegacy/mac/WebView/WebPDFView.h
@@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if !PLATFORM(IOS)
+#if !PLATFORM(IOS) && !PLATFORM(GNUSTEP)
#import <PDFKit/PDFKit.h>
#import <WebKitLegacy/WebDocumentInternal.h>
diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
index cff704374..10b0ecc61 100644
--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
@@ -53,6 +53,17 @@
#import <wtf/RetainPtr.h>
#import <wtf/RunLoop.h>
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
using namespace WebCore;
#if PLATFORM(IOS)
@@ -467,8 +478,8 @@ public:
[NSNumber numberWithBool:NO], WebKitRespectStandardStyleKeyEquivalentsPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowsURLsInToolTipsPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowsToolTipOverTruncatedTextPreferenceKey,
- @"1", WebKitPDFDisplayModePreferenceKey,
- @"0", WebKitPDFScaleFactorPreferenceKey,
+ /*@"1", WebKitPDFDisplayModePreferenceKey,
+ @"0", WebKitPDFScaleFactorPreferenceKey,*/
#endif
@"0", WebKitUseSiteSpecificSpoofingPreferenceKey,
[NSNumber numberWithInt:WebKitEditableLinkDefaultBehavior], WebKitEditableLinkBehaviorPreferenceKey,
@@ -683,7 +694,7 @@ public:
#if !PLATFORM(IOS)
// This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above
- ASSERT(kPDFDisplaySinglePageContinuous == 1);
+ //ASSERT(kPDFDisplaySinglePageContinuous == 1);
#endif
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
}
@@ -1630,7 +1641,7 @@ public:
#endif // PLATFORM(IOS)
#if !PLATFORM(IOS)
-- (float)PDFScaleFactor
+/*- (float)PDFScaleFactor
{
return [self _floatValueForKey:WebKitPDFScaleFactorPreferenceKey];
}
@@ -1638,7 +1649,7 @@ public:
- (void)setPDFScaleFactor:(float)factor
{
[self _setFloatValue:factor forKey:WebKitPDFScaleFactorPreferenceKey];
-}
+}*/
#endif
- (int64_t)applicationCacheTotalQuota
@@ -1665,7 +1676,7 @@ public:
}
#if !PLATFORM(IOS)
-- (PDFDisplayMode)PDFDisplayMode
+/*- (PDFDisplayMode)PDFDisplayMode
{
PDFDisplayMode value = static_cast<PDFDisplayMode>([self _integerValueForKey:WebKitPDFDisplayModePreferenceKey]);
if (value != kPDFDisplaySinglePage && value != kPDFDisplaySinglePageContinuous && value != kPDFDisplayTwoUp && value != kPDFDisplayTwoUpContinuous) {
@@ -1678,7 +1689,7 @@ public:
- (void)setPDFDisplayMode:(PDFDisplayMode)mode
{
[self _setIntegerValue:mode forKey:WebKitPDFDisplayModePreferenceKey];
-}
+}*/
#endif
- (WebKitEditableLinkBehavior)editableLinkBehavior
@@ -1865,9 +1876,9 @@ static NSString *classIBCreatorID = nil;
+ (void)_setCurrentNetworkLoaderSessionCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy
{
- RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage();
+ /*RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage();
ASSERT(cookieStorage); // Will fail when building without USE(CFURLCONNECTION) and NetworkStorageSession::switchToNewTestingSession() was not called beforehand.
- CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage.get(), policy);
+ CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage.get(), policy);*/
}
- (BOOL)isDOMPasteAllowed
diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
index 86275af44..3f99480e1 100644
--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
@@ -29,7 +29,7 @@
#import <WebKitLegacy/WebPreferences.h>
#if !TARGET_OS_IPHONE
-#import <Quartz/Quartz.h>
+#import <QuartzCore/QuartzCore.h>
#endif
typedef enum {
@@ -102,8 +102,8 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
- (BOOL)textAreasAreResizable;
- (void)setTextAreasAreResizable:(BOOL)flag;
-- (PDFDisplayMode)PDFDisplayMode;
-- (void)setPDFDisplayMode:(PDFDisplayMode)mode;
+//- (PDFDisplayMode)PDFDisplayMode;
+//- (void)setPDFDisplayMode:(PDFDisplayMode)mode;
#endif
- (BOOL)shrinksStandaloneImagesToFit;
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
index feacc65ee..094cc5a80 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -209,7 +209,6 @@
#import <WebKitLegacy/DOMPrivate.h>
#import <WebKitSystemInterface.h>
#import <bindings/ScriptValue.h>
-#import <mach-o/dyld.h>
#import <objc/runtime.h>
#import <runtime/ArrayPrototype.h>
#import <runtime/CatchScope.h>
@@ -229,7 +228,10 @@
#import <wtf/SoftLinking.h>
#import <wtf/StdLibExtras.h>
#import <wtf/WorkQueue.h>
+#if OS(DARWIN)
#import <wtf/spi/darwin/dyldSPI.h>
+#import <mach-o/dyld.h>
+#endif
#if !PLATFORM(IOS)
#import "WebContextMenuClient.h"
@@ -240,7 +242,7 @@
#import "WebNSPasteboardExtras.h"
#import "WebNSPrintOperationExtras.h"
#import "WebPDFView.h"
-#import <WebCore/AVKitSPI.h>
+//#import <WebCore/AVKitSPI.h>
#import <WebCore/LookupSPI.h>
#import <WebCore/NSImmediateActionGestureRecognizerSPI.h>
#import <WebCore/TextIndicator.h>
@@ -371,6 +373,17 @@ SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *)
#endif
+#if OS(LINUX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+static inline int pthread_main_np()
+{
+ return syscall(SYS_gettid) == getpid() ? 1 : 0;
+}
+#endif
+
using namespace JSC;
using namespace Inspector;
using namespace WebCore;
@@ -1288,7 +1301,7 @@ static bool shouldConvertInvalidURLsToBlank()
{
#if PLATFORM(IOS)
static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_10_0;
-#elif PLATFORM(MAC)
+#elif PLATFORM(MAC) && OS(DARWIN)
static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= DYLD_MACOSX_VERSION_10_12;
#else
static bool shouldConvertInvalidURLsToBlank = true;
@@ -1417,7 +1430,9 @@ static void WebKitInitializeGamepadProviderIfNecessary()
);
#if !PLATFORM(IOS)
pageConfiguration.chromeClient = new WebChromeClient(self);
+#if ENABLE(CONTEXT_MENUS)
pageConfiguration.contextMenuClient = new WebContextMenuClient(self);
+#endif
// FIXME: We should enable this on iOS as well.
pageConfiguration.validationMessageClient = std::make_unique<WebValidationMessageClient>(self);
pageConfiguration.inspectorClient = new WebInspectorClient(self);
@@ -1949,7 +1964,7 @@ static NSMutableSet *knownPluginMIMETypes()
#if PLATFORM(IOS)
#define WebPDFView ([WebView _getPDFViewClass])
#endif
- if (!viewClass || !repClass || [[WebPDFView supportedMIMETypes] containsObject:MIMEType]) {
+ if (!viewClass || !repClass/* || [[WebPDFView supportedMIMETypes] containsObject:MIMEType]*/) {
#if PLATFORM(IOS)
#undef WebPDFView
#endif
@@ -2787,7 +2802,9 @@ static bool needsSelfRetainWhileLoadingQuirk()
settings.setNeedsSiteSpecificQuirks(_private->useSiteSpecificSpoofing);
settings.setDOMTimersThrottlingEnabled([preferences domTimersThrottlingEnabled]);
+#if ENABLE(WEB_ARCHIVE)
settings.setWebArchiveDebugModeEnabled([preferences webArchiveDebugModeEnabled]);
+#endif
settings.setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]);
settings.setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]);
settings.setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
@@ -3550,12 +3567,13 @@ static inline IMP getMethod(id o, SEL s)
if (!_private->page)
return nil;
- if (CFURLStorageSessionRef storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession().platformSession())
+ /*if (CFURLStorageSessionRef storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession().platformSession())
cachedResponse = WKCachedResponseForRequest(storageSession, request.get());
else
cachedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:request.get()];
- return cachedResponse;
+ return cachedResponse;*/
+ return nil;
}
- (void)_writeImageForElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard
@@ -5432,7 +5450,7 @@ static Vector<String> toStringVector(NSArray* patterns)
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if (![defaults objectForKey:WebAutomaticQuoteSubstitutionEnabled])
- return [NSSpellChecker isAutomaticQuoteSubstitutionEnabled];
+ return (BOOL)[NSSpellChecker isAutomaticQuoteSubstitutionEnabled];
return [defaults boolForKey:WebAutomaticQuoteSubstitutionEnabled];
}
@@ -5760,13 +5778,13 @@ static bool needsWebViewInitThreadWorkaround()
{
// Set asside the subviews before we archive. We don't want to archive any subviews.
// The subviews will always be created in _commonInitializationFrameName:groupName:.
- id originalSubviews = _subviews;
- _subviews = nil;
+ //id originalSubviews = _subviews;
+ //_subviews = nil;
[super encodeWithCoder:encoder];
// Restore the subviews we set aside.
- _subviews = originalSubviews;
+ //_subviews = originalSubviews;
BOOL useBackForwardList = _private->page && static_cast<BackForwardList*>(_private->page->backForward().client())->enabled();
if ([encoder allowsKeyedCoding]) {
@@ -7603,7 +7621,7 @@ static BOOL findString(NSView <WebDocumentSearching> *searchView, NSString *stri
return coreFrame->loader().shouldClose();
}
-#if !PLATFORM(IOS)
+/*#if !PLATFORM(IOS)
static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSC::JSValue jsValue)
{
VM& vm = exec->vm();
@@ -7670,7 +7688,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSC::JSValue j
JSLockHolder lock(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec());
return aeDescFromJSValue(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec(), result);
}
-#endif
+#endif*/
- (BOOL)canMarkAllTextMatches
{
@@ -9017,7 +9035,7 @@ static WebFrameView *containingFrameView(NSView *view)
- (void)_retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
{
- CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
+ /*CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
Boolean keyExistsAndHasValidFormat;
int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
@@ -9030,7 +9048,7 @@ static WebFrameView *containingFrameView(NSView *view)
// check for tabbing to links
if ([_private->preferences tabsToLinks])
_private->_keyboardUIMode = (KeyboardUIMode)(_private->_keyboardUIMode | KeyboardAccessTabsToLinks);
-#endif
+#endif*/
}
- (KeyboardUIMode)_keyboardUIMode
diff --git a/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h b/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h
index bb959b5b7..b8eb4076f 100644
--- a/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h
+++ b/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h
@@ -29,6 +29,7 @@
#import <WebKitLegacy/WebView.h>
#import <WebKitLegacy/WebFramePrivate.h>
#import <JavaScriptCore/JSBase.h>
+#import <CoreGraphics/CoreGraphics.h>
#if TARGET_OS_IPHONE
#import <CoreGraphics/CGColor.h>
diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt
index 94906cfc1..8adaea345 100644
--- a/Tools/CMakeLists.txt
+++ b/Tools/CMakeLists.txt
@@ -16,7 +16,7 @@ if ("${PORT}" STREQUAL "GTK")
add_subdirectory(MiniBrowser/gtk)
endif ()
elseif ("${PORT}" STREQUAL "Mac")
- add_subdirectory(DumpRenderTree)
+ #add_subdirectory(DumpRenderTree)
# add_subdirectory(WebKitTestRunner)
add_subdirectory(MiniBrowser/mac)
elseif ("${PORT}" STREQUAL "JSCOnly")
diff --git a/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm b/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
index ba7323105..a561c1237 100644
--- a/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
+++ b/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
@@ -52,6 +52,7 @@
#import <WebKit/WebSecurityOriginPrivate.h>
#import <WebKit/WebViewPrivate.h>
#import <wtf/Assertions.h>
+#import <dispatch/dispatch.h>
#if !PLATFORM(IOS)
#import "AppleScriptController.h"
diff --git a/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm b/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm
index 23d40ed7f..d045e58f8 100644
--- a/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm
+++ b/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm
@@ -33,6 +33,7 @@
#import <JavaScriptCore/JSValue.h>
#import <WebKit/WebKit.h>
#import <WebKit/WebViewPrivate.h>
+#import <dispatch/dispatch.h>
#if PLATFORM(MAC)
diff --git a/WebKitLibraries/WebKitSystemInterface.h b/WebKitLibraries/WebKitSystemInterface.h
index c84124396..3a19af43f 100644
--- a/WebKitLibraries/WebKitSystemInterface.h
+++ b/WebKitLibraries/WebKitSystemInterface.h
@@ -100,7 +100,7 @@ CFURLRef WKCopyBundleURLForExecutableURL(CFURLRef);
CALayer *WKMakeRenderLayer(uint32_t contextID);
typedef struct __WKCAContextRef *WKCAContextRef;
-WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
+//WKCAContextRef WKCAContextMakeRemoteWithServerPort(mach_port_t port);
void WKDestroyRenderingResources(void);
void WKCALayerEnumerateRectsBeingDrawnWithBlock(CALayer *layer, CGContextRef context, void (^block)(CGRect rect));
@@ -295,7 +295,7 @@ NSArray *WKQTGetSitesInMediaDownloadCache();
void WKQTClearMediaDownloadCacheForSite(NSString *site);
void WKQTClearMediaDownloadCache();
-mach_port_t WKInitializeRenderServer(void);
+//mach_port_t WKInitializeRenderServer(void);
typedef struct __WKSoftwareCARendererRef *WKSoftwareCARendererRef;
@@ -346,10 +346,10 @@ typedef void (*WKOcclusionNotificationHandler)(uint32_t, void* data, uint32_t da
bool WKRegisterOcclusionNotificationHandler(WKOcclusionNotificationType, WKOcclusionNotificationHandler);
bool WKEnableWindowOcclusionNotifications(NSInteger windowID, bool *outCurrentOcclusionState);
-#if defined(__x86_64__)
+/*#if defined(__x86_64__)
#import <mach/mig.h>
CFRunLoopSourceRef WKCreateMIGServerSource(mig_subsystem_t subsystem, mach_port_t serverPort);
-#endif
+#endif*/
#ifndef __LP64__
--
2.13.3
From f0f2ce64f78e45125f58e1886428c60803817fe5 Mon Sep 17 00:00:00 2001
From: Daniel Ferreira <dtf@stanford.edu>
Date: Sun, 20 Aug 2017 02:33:27 +0000
Subject: [PATCH 3/3] Third patch round
---
Source/WebCore/PlatformMac.cmake | 18 +++----
.../platform/network/soup/ResourceRequest.h | 8 ++++
.../network/soup/ResourceRequestSoupCocoa.mm | 29 +++++++++++
.../platform/network/soup/ResourceResponse.h | 7 +++
Source/WebKitLegacy/PlatformMac.cmake | 2 +-
.../WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm | 6 +++
.../mac/WebCoreSupport/WebFrameLoaderClient.mm | 14 +++---
Source/WebKitLegacy/mac/WebView/WebDataSource.mm | 4 +-
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm | 20 ++++----
.../mac/WebView/WebImmediateActionController.mm | 2 +-
Source/WebKitLegacy/mac/WebView/WebView.mm | 53 +++++++++++----------
12 files changed, 109 insertions(+), 54 deletions(-)
create mode 100644 Source/WebCore/platform/network/soup/ResourceRequestSoupCocoa.mm
diff --git a/Source/WebCore/PlatformMac.cmake b/Source/WebCore/PlatformMac.cmake
index 497e489a3..74a3dfeb5 100644
--- a/Source/WebCore/PlatformMac.cmake
+++ b/Source/WebCore/PlatformMac.cmake
@@ -1,10 +1,11 @@
-if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
- set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceMavericks.a)
-elseif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
- set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceYosemite.a)
-else ()
- set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceElCapitan.a)
-endif ()
+#if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
+# set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceMavericks.a)
+#elseif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
+# set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceYosemite.a)
+#else ()
+# set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceElCapitan.a)
+#endif ()
+set(WEBKITSYSTEMINTERFACE_LIBRARY ${CMAKE_SOURCE_DIR}/WebKitLibraries/libWebKitSystemInterfaceLinux.a)
find_library(ACCELERATE_LIBRARY accelerate)
find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
@@ -45,7 +46,7 @@ list(APPEND WebCore_LIBRARIES
${SECURITY_LIBRARY}
${SQLITE3_LIBRARY}
${SYSTEMCONFIGURATION_LIBRARY}
- #${WEBKITSYSTEMINTERFACE_LIBRARY}
+ ${WEBKITSYSTEMINTERFACE_LIBRARY}
${XML2_LIBRARY}
${ZLIB_LIBRARIES}
opal
@@ -599,6 +600,7 @@ list(APPEND WebCore_SOURCES
platform/network/soup/SoupNetworkSession.cpp
platform/network/soup/SynchronousLoaderClientSoup.cpp
platform/network/soup/WebKitSoupRequestGeneric.cpp
+ platform/network/soup/ResourceRequestSoupCocoa.mm
#platform/network/cocoa/ResourceRequestCocoa.mm
#platform/network/cocoa/ResourceResponseCocoa.mm
diff --git a/Source/WebCore/platform/network/soup/ResourceRequest.h b/Source/WebCore/platform/network/soup/ResourceRequest.h
index 04d5d4841..50d035d7f 100644
--- a/Source/WebCore/platform/network/soup/ResourceRequest.h
+++ b/Source/WebCore/platform/network/soup/ResourceRequest.h
@@ -31,6 +31,10 @@
#include "ResourceRequestBase.h"
#include <libsoup/soup.h>
+#if PLATFORM(COCOA) && defined(__OBJC__)
+#include <Foundation/NSURLRequest.h>
+#endif
+
namespace WebCore {
class ResourceRequest : public ResourceRequestBase {
@@ -108,6 +112,10 @@ namespace WebCore {
template<class Encoder> void encodeWithPlatformData(Encoder&) const;
template<class Decoder> bool decodeWithPlatformData(Decoder&);
+
+#if PLATFORM(COCOA) && defined(__OBJC__)
+ WEBCORE_EXPORT NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
+#endif
private:
friend class ResourceRequestBase;
diff --git a/Source/WebCore/platform/network/soup/ResourceRequestSoupCocoa.mm b/Source/WebCore/platform/network/soup/ResourceRequestSoupCocoa.mm
new file mode 100644
index 000000000..6b9bb5fb8
--- /dev/null
+++ b/Source/WebCore/platform/network/soup/ResourceRequestSoupCocoa.mm
@@ -0,0 +1,29 @@
+#import "config.h"
+#include <wtf/text/AtomicString.h>
+#import "ResourceRequest.h"
+#import "ResourceResponse.h"
+
+#if PLATFORM(COCOA)
+
+namespace WebCore {
+
+NSURLRequest *ResourceRequest::nsURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
+{
+ updatePlatformRequest(bodyPolicy);
+ // FIXME: lots to be added here
+ return [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:m_url.string()]];
+}
+
+NSURLResponse *ResourceResponse::nsURLResponse() const
+{
+ // It should be fairly easy to have the headerFields right here as well
+ return [[NSURLResponse alloc] initWithURL:[NSURL URLWithString:m_url.string()]
+ statusCode:m_httpStatusCode
+ HTTPVersion:m_httpVersion.string()
+ headerFields:nil];
+
+}
+
+}
+
+#endif
diff --git a/Source/WebCore/platform/network/soup/ResourceResponse.h b/Source/WebCore/platform/network/soup/ResourceResponse.h
index 9e206bba9..3d64c1e93 100644
--- a/Source/WebCore/platform/network/soup/ResourceResponse.h
+++ b/Source/WebCore/platform/network/soup/ResourceResponse.h
@@ -30,6 +30,10 @@
#include <libsoup/soup.h>
#include <wtf/glib/GRefPtr.h>
+#if PLATFORM(COCOA) && defined(__OBJC__)
+#include <Foundation/NSURLResponse.h>
+#endif
+
namespace WebCore {
class ResourceResponse : public ResourceResponseBase {
@@ -74,6 +78,9 @@ public:
template<class Encoder> void encode(Encoder&) const;
template<class Decoder> static bool decode(Decoder&, ResourceResponse&);
+#if PLATFORM(COCOA) && defined(__OBJC__)
+ WEBCORE_EXPORT NSURLResponse *nsURLResponse() const;
+#endif
private:
friend class ResourceResponseBase;
diff --git a/Source/WebKitLegacy/PlatformMac.cmake b/Source/WebKitLegacy/PlatformMac.cmake
index 1af0089c0..c285dae5d 100644
--- a/Source/WebKitLegacy/PlatformMac.cmake
+++ b/Source/WebKitLegacy/PlatformMac.cmake
@@ -267,7 +267,7 @@ list(APPEND WebKit_SOURCES
mac/WebCoreSupport/WebNotificationClient.mm
mac/WebCoreSupport/WebOpenPanelResultListener.mm
mac/WebCoreSupport/WebPlatformStrategies.mm
- mac/WebCoreSupport/WebPluginInfoProvider.mm
+ #mac/WebCoreSupport/WebPluginInfoProvider.mm
mac/WebCoreSupport/WebProgressTrackerClient.mm
mac/WebCoreSupport/WebSecurityOrigin.mm
mac/WebCoreSupport/WebSelectionServiceController.mm
diff --git a/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm b/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm
index 866d40aec..90226b885 100644
--- a/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm
+++ b/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm
@@ -87,7 +87,9 @@ static inline NSArray *_createWritableTypesForImageWithArchive()
{
NSMutableArray *types = [_writableTypesForImageWithoutArchive() mutableCopy];
[types addObject:NSRTFDPboardType];
+#if ENABLE(WEB_ARCHIVE)
[types addObject:WebArchivePboardType];
+#endif
return types;
}
@@ -259,15 +261,19 @@ static CachedImage* imageFromElement(DOMElement *domElement)
[self setData:[element _imageTIFFRepresentation] forType:NSTIFFPboardType];
}
+#if ENABLE(WEB_ARCHIVE)
if (archive) {
if ([types containsObject:WebArchivePboardType])
[self setData:[archive data] forType:WebArchivePboardType];
return;
}
+#endif
// We should not have declared types that we aren't going to write (4031826).
ASSERT(![types containsObject:NSRTFDPboardType]);
+#if ENABLE(WEB_ARCHIVE)
ASSERT(![types containsObject:WebArchivePboardType]);
+#endif
}
- (id)_web_declareAndWriteDragImageForElement:(DOMElement *)element
diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
index ef31f912f..7ee395cf1 100644
--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -308,7 +308,7 @@ void WebFrameLoaderClient::convertMainResourceLoadToDownload(DocumentLoader* doc
auto connection = handle->releaseConnectionForDownload();
[WebDownload _downloadWithLoadingCFURLConnection:connection.get() request:request.cfURLRequest(UpdateHTTPBody) response:response.cfURLResponse() delegate:[webView downloadDelegate] proxy:nil];
#else
- [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];
+ //[WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil]; bad shit
#endif
}
@@ -375,8 +375,8 @@ void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader* loader, unsig
if (implementations->willSendRequestFunc)
newURLRequest = (NSURLRequest *)CallResourceLoadDelegate(implementations->willSendRequestFunc, webView, @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:), [webView _objectForIdentifier:identifier], currentURLRequest, redirectResponse.nsURLResponse(), dataSource(loader));
- if (newURLRequest != currentURLRequest)
- request.updateFromDelegatePreservingOldProperties(ResourceRequest(newURLRequest));
+ //if (newURLRequest != currentURLRequest)
+ // request.updateFromDelegatePreservingOldProperties(ResourceRequest(newURLRequest));
}
bool WebFrameLoaderClient::shouldUseCredentialStorage(DocumentLoader* loader, unsigned long identifier)
@@ -397,18 +397,18 @@ void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoa
WebView *webView = getWebView(m_webFrame.get());
WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- NSURLAuthenticationChallenge *webChallenge = mac(challenge);
+ //NSURLAuthenticationChallenge *webChallenge = mac(challenge);
if (implementations->didReceiveAuthenticationChallengeFunc) {
if (id resource = [webView _objectForIdentifier:identifier]) {
- CallResourceLoadDelegate(implementations->didReceiveAuthenticationChallengeFunc, webView, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:), resource, webChallenge, dataSource(loader));
+ //CallResourceLoadDelegate(implementations->didReceiveAuthenticationChallengeFunc, webView, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:), resource, webChallenge, dataSource(loader));
return;
}
}
#if !PLATFORM(IOS)
NSWindow *window = [webView hostWindow] ? [webView hostWindow] : [webView window];
- [[WebPanelAuthenticationHandler sharedHandler] startAuthentication:webChallenge window:window];
+ //[[WebPanelAuthenticationHandler sharedHandler] startAuthentication:webChallenge window:window];
#endif
}
@@ -1662,7 +1662,7 @@ ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const
NSURL *URL = url;
NSString *extension = [[URL path] pathExtension];
if ([extension length] > 0) {
- type = [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
+ type = @"temporary-mime-report-this";//[[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
if (type.isEmpty()) {
// If no MIME type is specified, use a plug-in if we have one that can handle the extension.
if ([getWebView(m_webFrame.get()) _pluginForExtension:extension])
diff --git a/Source/WebKitLegacy/mac/WebView/WebDataSource.mm b/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
index 201e73c54..a2bf33031 100644
--- a/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebDataSource.mm
@@ -279,11 +279,11 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
// Since this is a "secret default" we don't both registering it.
BOOL omitPDFSupport = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];
- if (!omitPDFSupport)
+ //if (!omitPDFSupport)
#if PLATFORM(IOS)
#define WebPDFRepresentation ([WebView _getPDFRepresentationClass])
#endif
- addTypesFromClass(repTypes, [WebPDFRepresentation class], [WebPDFRepresentation supportedMIMETypes]);
+ //addTypesFromClass(repTypes, [WebPDFRepresentation class], [WebPDFRepresentation supportedMIMETypes]);
#if PLATFORM(IOS)
#undef WebPDFRepresentation
#endif
diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
index 02036b063..7c07605cc 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -1150,11 +1150,11 @@ static NSCellStateValue kit(TriState state)
NSEnumerator *enumerator = [paths objectEnumerator];
NSString *path;
- while ((path = [enumerator nextObject]) != nil) {
+ /*while ((path = [enumerator nextObject]) != nil) {
NSString *MIMEType = [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:[path pathExtension]];
if (MIMETypeRegistry::isSupportedImageResourceMIMEType(MIMEType))
return YES;
- }
+ }*/
return NO;
}
@@ -2419,7 +2419,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
_private->transparentBackground = f;
}
-#if !PLATFORM(IOS)
+#if !PLATFORM(IOS) && ENABLE(DRAG_SUPPORT)
- (NSImage *)_selectionDraggingImage
{
if (![self _hasSelection])
@@ -2901,7 +2901,7 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
_private = [[WebHTMLViewPrivate alloc] init];
- _private->pluginController = [[WebPluginController alloc] initWithDocumentView:self];
+ _private->pluginController = nil;//[[WebPluginController alloc] initWithDocumentView:self];
#if PLATFORM(IOS)
[[NSNotificationCenter defaultCenter]
addObserver:self selector:@selector(markedTextUpdate:)
@@ -3601,7 +3601,7 @@ WEBCORE_COMMAND(toggleUnderline)
{
[super addSubview:view];
- if ([WebPluginController isPlugInView:view]) {
+ /*if ([WebPluginController isPlugInView:view]) {
#if PLATFORM(IOS)
WebView *webView = [self _webView];
@@ -3609,7 +3609,7 @@ WEBCORE_COMMAND(toggleUnderline)
#endif
[[self _pluginController] addPlugin:view];
- }
+ }*/
}
- (void)willRemoveSubview:(NSView *)subview
@@ -3621,8 +3621,8 @@ WEBCORE_COMMAND(toggleUnderline)
LOG(View, "A view of class %s was removed during subview enumeration for layout or printing mode change. We will still do layout or the printing mode change even though this view is no longer in the view hierarchy.", object_getClassName([subview class]));
#endif
- if ([WebPluginController isPlugInView:subview])
- [[self _pluginController] destroyPlugin:subview];
+ /*if ([WebPluginController isPlugInView:subview])
+ [[self _pluginController] destroyPlugin:subview];*/
[super willRemoveSubview:subview];
}
@@ -7426,9 +7426,11 @@ static CGImageRef selectionImage(Frame* frame, bool forceBlackText)
#if PLATFORM(IOS)
return selectionImage(coreFrame, forceBlackText);
-#else
+#elif ENABLE(DRAG_SUPPORT)
TextIndicatorData textIndicator;
return createDragImageForSelection(*coreFrame, textIndicator, forceBlackText).autorelease();
+#else
+ return nil;
#endif
}
diff --git a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
index 92ac57f09..fb37a2712 100644
--- a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
@@ -569,7 +569,7 @@ static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)
return nil;
NSDictionary *options = nil;
- RefPtr<Range> dictionaryRange = DictionaryLookup::rangeAtHitTestResult(_hitTestResult, &options);
+ RefPtr<Range> dictionaryRange = nil;//DictionaryLookup::rangeAtHitTestResult(_hitTestResult, &options);
if (!dictionaryRange)
return nil;
diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm
index 094cc5a80..571bb36c5 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -1456,7 +1456,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
pageConfiguration.progressTrackerClient = new WebProgressTrackerClient(self);
pageConfiguration.applicationCacheStorage = &webApplicationCacheStorage();
pageConfiguration.databaseProvider = &WebDatabaseProvider::singleton();
- pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton();
+ //pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton();
pageConfiguration.storageNamespaceProvider = &_private->group->storageNamespaceProvider();
pageConfiguration.userContentProvider = &_private->group->userContentController();
pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore();
@@ -1615,7 +1615,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
+ (NSArray *)_supportedMIMETypes
{
// Load the plug-in DB allowing plug-ins to install types.
- [WebPluginDatabase sharedDatabase];
+ //[WebPluginDatabase sharedDatabase];
return [[WebFrameView _viewTypesAllowImageTypeOmission:NO] allKeys];
}
@@ -1625,13 +1625,13 @@ static void WebKitInitializeGamepadProviderIfNecessary()
NSMutableSet *extensions = [[NSMutableSet alloc] init];
NSArray *MIMETypes = [self _supportedMIMETypes];
NSEnumerator *enumerator = [MIMETypes objectEnumerator];
- NSString *MIMEType;
+ /*NSString *MIMEType;
while ((MIMEType = [enumerator nextObject]) != nil) {
NSArray *extensionsForType = [[NSURLFileTypeMappings sharedMappings] extensionsForMIMEType:MIMEType];
if (extensionsForType) {
[extensions addObjectsFromArray:extensionsForType];
}
- }
+ }*/
NSArray *uniqueExtensions = [extensions allObjects];
[extensions release];
return uniqueExtensions;
@@ -1711,7 +1711,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
pageConfiguration.storageNamespaceProvider = &_private->group->storageNamespaceProvider();
pageConfiguration.userContentProvider = &_private->group->userContentController();
pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore();
- pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton();
+ //pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton();
_private->page = new Page(WTFMove(pageConfiguration));
@@ -1972,7 +1972,7 @@ static NSMutableSet *knownPluginMIMETypes()
if (allowPlugins) {
// Load the plug-in DB allowing plug-ins to install types.
- [WebPluginDatabase sharedDatabase];
+ //[WebPluginDatabase sharedDatabase];
}
// Load the image types and get the view class and rep class. This should be the fullest picture of all handled types.
@@ -2055,7 +2055,7 @@ static NSMutableSet *knownPluginMIMETypes()
#if !PLATFORM(IOS)
+ (NSString *)suggestedFileExtensionForMIMEType:(NSString *)type
{
- return [[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:type];
+ return @"temporary-extension-report-this";//[[NSURLFileTypeMappings sharedMappings] preferredExtensionForMIMEType:type];
}
#endif
@@ -2189,8 +2189,8 @@ static NSMutableSet *knownPluginMIMETypes()
#endif
// Keep the global plug-in database active until the app terminates to avoid having to reload plug-in bundles.
- if (!pluginDatabaseClientCount && applicationIsTerminating)
- [WebPluginDatabase closeSharedDatabase];
+ //if (!pluginDatabaseClientCount && applicationIsTerminating)
+ //[WebPluginDatabase closeSharedDatabase];
}
- (void)_closeWithFastTeardown
@@ -2362,7 +2362,7 @@ static bool fastDocumentTeardownEnabled()
#endif
NSString *MIMEType = nil;
-#if !PLATFORM(IOS)
+#if !PLATFORM(IOS) && !PLATFORM(GNUSTEP)
// Get the MIME type from the extension.
if ([extension length] != 0) {
MIMEType = [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
@@ -3992,7 +3992,7 @@ static inline IMP getMethod(id o, SEL s)
- (void)_setAdditionalWebPlugInPaths:(NSArray *)newPaths
{
if (!_private->pluginDatabase)
- _private->pluginDatabase = [[WebPluginDatabase alloc] init];
+ _private->pluginDatabase = nil;//[[WebPluginDatabase alloc] init];
[_private->pluginDatabase setPlugInPaths:newPaths];
[_private->pluginDatabase refresh];
@@ -5110,12 +5110,12 @@ static Vector<String> toStringVector(NSArray* patterns)
+ (BOOL)_HTTPPipeliningEnabled
{
- return ResourceRequest::httpPipeliningEnabled();
+ return NO;//ResourceRequest::httpPipeliningEnabled();
}
+ (void)_setHTTPPipeliningEnabled:(BOOL)enabled
{
- ResourceRequest::setHTTPPipeliningEnabled(enabled);
+ //ResourceRequest::setHTTPPipeliningEnabled(enabled);
}
- (void)_didScrollDocumentInFrameView:(WebFrameView *)frameView
@@ -5484,7 +5484,7 @@ static Vector<String> toStringVector(NSArray* patterns)
[self closeAllWebViews];
if (!pluginDatabaseClientCount)
- [WebPluginDatabase closeSharedDatabase];
+ //[WebPluginDatabase closeSharedDatabase];
WebKit::WebStorageNamespaceProvider::closeLocalStorage();
}
@@ -5510,9 +5510,9 @@ static Vector<String> toStringVector(NSArray* patterns)
if (![_private->preferences arePlugInsEnabled])
return nil;
- WebBasePluginPackage *pluginPackage = [[WebPluginDatabase sharedDatabase] pluginForMIMEType:MIMEType];
+ /*WebBasePluginPackage *pluginPackage = [[WebPluginDatabase sharedDatabase] pluginForMIMEType:MIMEType];
if (pluginPackage)
- return pluginPackage;
+ return pluginPackage;*/
#if !PLATFORM(IOS)
if (_private->pluginDatabase)
@@ -5527,9 +5527,9 @@ static Vector<String> toStringVector(NSArray* patterns)
if (![_private->preferences arePlugInsEnabled])
return nil;
- WebBasePluginPackage *pluginPackage = [[WebPluginDatabase sharedDatabase] pluginForExtension:extension];
+ /*WebBasePluginPackage *pluginPackage = [[WebPluginDatabase sharedDatabase] pluginForExtension:extension];
if (pluginPackage)
- return pluginPackage;
+ return pluginPackage;*/
#if !PLATFORM(IOS)
if (_private->pluginDatabase)
@@ -5542,8 +5542,8 @@ static Vector<String> toStringVector(NSArray* patterns)
#if !PLATFORM(IOS)
- (void)addPluginInstanceView:(NSView *)view
{
- if (!_private->pluginDatabase)
- _private->pluginDatabase = [[WebPluginDatabase alloc] init];
+ /*if (!_private->pluginDatabase)
+ _private->pluginDatabase = [[WebPluginDatabase alloc] init];*/
[_private->pluginDatabase addPluginInstanceView:view];
}
@@ -5565,8 +5565,8 @@ static Vector<String> toStringVector(NSArray* patterns)
if (![_private->preferences arePlugInsEnabled])
return NO;
- if ([[WebPluginDatabase sharedDatabase] isMIMETypeRegistered:MIMEType])
- return YES;
+ //if ([[WebPluginDatabase sharedDatabase] isMIMETypeRegistered:MIMEType])
+ // return YES;
#if !PLATFORM(IOS)
if (_private->pluginDatabase && [_private->pluginDatabase isMIMETypeRegistered:MIMEType])
@@ -9409,11 +9409,12 @@ bool LayerFlushController::flushLayers()
[self _prepareForDictionaryLookup];
- return DictionaryLookup::animationControllerForPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {
+ /*return DictionaryLookup::animationControllerForPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {
[self _setTextIndicator:textIndicator withLifetime:TextIndicatorWindowLifetime::Permanent];
}, [self](FloatRect rectInRootViewCoordinates) {
return [self _convertRectFromRootView:rectInRootViewCoordinates];
- });
+ });*/
+ return nil;
}
- (NSEvent *)_pressureEvent
@@ -9472,11 +9473,11 @@ bool LayerFlushController::flushLayers()
[self _prepareForDictionaryLookup];
- DictionaryLookup::showPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {
+ /*DictionaryLookup::showPopup(dictionaryPopupInfo, self, [self](TextIndicator& textIndicator) {
[self _setTextIndicator:textIndicator withLifetime:TextIndicatorWindowLifetime::Permanent];
}, [self](FloatRect rectInRootViewCoordinates) {
return [self _convertRectFromRootView:rectInRootViewCoordinates];
- });
+ });*/
}
- (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification
--
2.13.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment