Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing headers from Webcore for Webkit2 #8

Merged
merged 17 commits into from May 6, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d883420
Building webkit command fix
RAJAGOPALAN-GANGADHARAN Feb 9, 2019
42addb5
Merge remote-tracking branch 'upstream/webkit2' into HEAD
RAJAGOPALAN-GANGADHARAN Mar 3, 2019
6fdad02
Restored haikus NetworkContext to latest state
RAJAGOPALAN-GANGADHARAN Mar 3, 2019
09f7990
Created WebEvent factory and some fixes for old haiku APIs and few he…
RAJAGOPALAN-GANGADHARAN Mar 6, 2019
7e97e5b
Few more build fixes
RAJAGOPALAN-GANGADHARAN Mar 9, 2019
1b9e6ac
Fixed few linking errors
RAJAGOPALAN-GANGADHARAN Mar 9, 2019
31351ab
More linking errors fixed
RAJAGOPALAN-GANGADHARAN Mar 11, 2019
5e05c55
Update WebProcessMainHaiku.cpp
RAJAGOPALAN-GANGADHARAN Mar 13, 2019
2cd19e0
Roll back licence info
RAJAGOPALAN-GANGADHARAN Mar 13, 2019
81a496a
Fixed building webkit2
RAJAGOPALAN-GANGADHARAN Mar 13, 2019
0d98b04
Cleanup job
RAJAGOPALAN-GANGADHARAN Mar 13, 2019
4a7a146
Configuring minibrowser build and execute [early stage]
RAJAGOPALAN-GANGADHARAN Mar 17, 2019
c80ae31
Merge branch 'webkit2' of https://github.com/RAJAGOPALAN-GANGADHARAN/…
RAJAGOPALAN-GANGADHARAN Mar 17, 2019
c9f0fd0
Initial implementation to load blank url and now trying to load html …
RAJAGOPALAN-GANGADHARAN Apr 5, 2019
7182b92
Process launching done succesffuly but for now have ignored the case …
RAJAGOPALAN-GANGADHARAN Apr 29, 2019
1e1c1ad
Added message handler to main run loop and made changes to webview st…
RAJAGOPALAN-GANGADHARAN May 2, 2019
7fc2bc0
Fixed naming and namespace inconsistencies
RAJAGOPALAN-GANGADHARAN May 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Source/WTF/wtf/PlatformHaiku.cmake
Expand Up @@ -11,6 +11,7 @@ LIST(APPEND WTF_SOURCES
posix/ThreadingPOSIX.cpp

unicode/icu/CollatorICU.cpp
UniStdExtras.cpp

unix/CPUTimeUnix.cpp

Expand Down
5 changes: 4 additions & 1 deletion Source/WebCore/PlatformHaiku.cmake
Expand Up @@ -398,6 +398,8 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES

css/parser

inspector/agents

html/canvas
html/forms
html/parser
Expand All @@ -408,6 +410,7 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
loader/archive
loader/cache
loader/icon
loader/archive/mhtml


page/animation
Expand Down Expand Up @@ -438,7 +441,7 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES

platform/text/transcoder

PAL/pal
PAL/pal

rendering/line
rendering/shapes
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/platform/graphics/haiku/ImageBufferHaiku.cpp
Expand Up @@ -32,8 +32,8 @@
#include "MIMETypeRegistry.h"
#include "NotImplemented.h"
#include "StillImageHaiku.h"
#include "JavaScriptCore/GenericTypedArrayViewInlines.h"
#include "JavaScriptCore/JSGenericTypedArrayView.h"
#include "JavaScriptCore/JSCInlines.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked that the changes in WebCore do not build the WebKitLegacy build?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing webcore doesnt build webkitlegacy? i thought all the linked files would be rebuilt again not sure let me build again and let you know 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can build DumpRenderTree or HaikuLauncher (ninja HaikuLauncher) to test building just the webkitlegacy parts. Since WebKit2 build is broken the build may stop before or after building webkit...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is absolutely safe Pulkomandy 😄

#include "JavaScriptCore/TypedArrayInlines.h"

#include <wtf/text/Base64.h>
#include <wtf/text/CString.h>
Expand Down
5 changes: 0 additions & 5 deletions Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
Expand Up @@ -36,9 +36,4 @@ String contextMenuItemTagSearchWeb()
return String::fromUTF8("_Search the Web");
}

String localizedString(const char* key)
{
return String::fromUTF8(key, strlen(key));
}

};
2 changes: 1 addition & 1 deletion Source/WebCore/platform/network/haiku/CookieJarHaiku.cpp
Expand Up @@ -56,7 +56,7 @@ void startObservingCookieChanges(const NetworkStorageSession& storageSession, WT
notImplemented();
}

void stopObservingCookieChanges()
void stopObservingCookieChanges(const NetworkStorageSession& storageSession)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/network/haiku/ProxyServerHaiku.cpp
Expand Up @@ -30,7 +30,7 @@

namespace WebCore {

Vector<ProxyServer> proxyServersForURL(const URL&, const NetworkingContext*)
Vector<ProxyServer> proxyServersForURL(const URL&)
{
// FIXME: Implement.
return Vector<ProxyServer>();
Expand Down
Expand Up @@ -27,9 +27,9 @@

#include <cstdlib>

#if USE(GCRYPT)
/*#if USE(GCRYPT)
#include <pal/crypto/gcrypt/Initialization.h>
#endif
#endif*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the error i told that day the compiler couldnt identify USE maybe its because the source is happening in a seperate process?


using namespace WebKit;

Expand All @@ -45,9 +45,9 @@ int main(int argc, char** argv)
// WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp.
setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0);

#if USE(GCRYPT)
/*#if USE(GCRYPT)
PAL::GCrypt::initialize();
#endif
#endif*/

return NetworkProcessMainUnix(argc, argv);
}
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014 Haiku, inc.
* Copyright (C) 2019 Haiku, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand All @@ -10,7 +10,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS''
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
Expand All @@ -24,65 +24,58 @@
*/

#include "config.h"
#include "WebCookieManagerProxy.h"
#include "WebContext.h"
#include "NetworkCacheData.h"

#include "NotImplemented.h"
#include <WebCore/IconDatabase.h>

namespace WebKit {
namespace NetworkCache {

void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
Data::Data(const uint8_t* data, size_t size)
{
notImplemented();
}

void WebContext::platformInvalidateContext()
Data Data::empty()
{
notImplemented();
return { };
}

String WebContext::platformDefaultWebSQLDatabaseDirectory()
const uint8_t* Data::data() const
{
notImplemented();
return "/WebKitEfl/Databases";
return nullptr;
}

String WebContext::platformDefaultIndexedDBDatabaseDirectory()
bool Data::isNull() const
{
notImplemented();
return String();
return true;
}

String WebContext::platformDefaultIconDatabasePath() const
bool Data::apply(const Function<bool(const uint8_t*, size_t)>& applier) const
{
notImplemented();
return "/WebKitEfl/IconDatabase/" + WebCore::IconDatabase::defaultDatabaseFilename();
return false;
}

String WebContext::platformDefaultLocalStorageDirectory()
Data Data::subrange(size_t offset, size_t size) const
{
notImplemented();
return "/WebKitEfl/LocalStorage";
return { };
}

String WebContext::platformDefaultDiskCacheDirectory() const
Data concatenate(const Data& a, const Data& b)
{
notImplemented();
return "/WebKitEfl";
return { };
}

String WebContext::platformDefaultCookieStorageDirectory() const
Data Data::adoptMap(void* map, size_t size, int fd)
{
notImplemented();
return String();
return { };
}


String WebContext::platformDefaultApplicationCacheDirectory() const
{
notImplemented();
return "/WebKitEfl/Applications";
}

}
} // namespace NetworkCache
} // namespace WebKit
61 changes: 61 additions & 0 deletions Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelHaiku.cpp
@@ -0,0 +1,61 @@
/*
* Copyright (C) 2019 Haiku Inc.,
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "config.h"
#include "NetworkCacheIOChannel.h"

#include "NotImplemented.h"

namespace WebKit {
namespace NetworkCache {

IOChannel::IOChannel(const String& filePath, Type type)
: m_path{filePath}
, m_type{type}
{
notImplemented();
}

IOChannel::~IOChannel()
{
}

Ref<IOChannel> IOChannel::open(const String& filePath, IOChannel::Type type)
{
return adoptRef(*new IOChannel(filePath, type));
}

void IOChannel::read(size_t offset, size_t size, WorkQueue* queue, Function<void(Data&, int error)>&& completionHandler)
{
notImplemented();
}

void IOChannel::write(size_t offset, const Data& data, WorkQueue* queue, Function<void(int error)>&& completionHandler)
{
notImplemented();
}

} // namespace NetworkCache
} // namespace WebKit
93 changes: 93 additions & 0 deletions Source/WebKit/NetworkProcess/haiku/NetworkProcessHaiku.cpp
@@ -0,0 +1,93 @@
/*
* Copyright (C) 2019 Haiku, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "config.h"
#include "NetworkProcess.h"

#include "NetworkProcessCreationParameters.h"
#include <WebCore/NetworkStorageSession.h>
#include <WebCore/NotImplemented.h>

namespace WebCore
{
class NetworkStorageSession;
}

namespace WebKit {

using namespace WebCore;

void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters& parameters)
{
notImplemented();
}

void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& certificateInfo, const String& host)
{
notImplemented();
}

std::unique_ptr<WebCore::NetworkStorageSession> NetworkProcess::platformCreateDefaultStorageSession() const
{
return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), nullptr);
}

void NetworkProcess::platformProcessDidTransitionToForeground()
{
notImplemented();
}

void NetworkProcess::platformProcessDidTransitionToBackground()
{
notImplemented();
}

void NetworkProcess::clearCacheForAllOrigins(uint32_t cachesToClear)
{
notImplemented();
}

void NetworkProcess::platformProcessDidResume()
{
notImplemented();
}

void NetworkProcess::platformTerminate()
{
notImplemented();
}

void NetworkProcess::platformPrepareToSuspend(CompletionHandler<void()>&& completionHandler)
{
notImplemented();
completionHandler();
}

void NetworkProcess::clearDiskCache(WallTime modifiedSince, CompletionHandler<void()>&& completionHandler)
{
notImplemented();
}

} // namespace WebKit
45 changes: 45 additions & 0 deletions Source/WebKit/NetworkProcess/haiku/NetworkProcessMainHaiku.cpp
@@ -0,0 +1,45 @@
/*
* Copyright (C) 2019 Haiku, Inc.
*
* 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 THE COPYRIGHT HOLDERS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "config.h"
#include "NetworkProcessMainUnix.h"

#include "AuxiliaryProcessMain.h"
#include "NetworkProcess.h"

namespace WebKit {

template<>
void initializeAuxiliaryProcess<NetworkProcess>(AuxiliaryProcessInitializationParameters&& parameters)
{
static NeverDestroyed<NetworkProcess> networkProcess(WTFMove(parameters));
}

int NetworkProcessMainUnix(int argc, char** argv)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the existing NetworkProcessMainUnix? When the UNIX code works; there is no need to copy it, and copying it and changing copyright on it is not right (you should keep the original copyright when you make changes and add the haiku copyright as well)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only declaration is provided by Unix we have to define it for our own platform hence this

{
return AuxiliaryProcessMain<NetworkProcess, AuxiliaryProcessMainBase>(argc, argv);
}

} // namespace WebKit