Skip to content

Commit d4fa0ca

Browse files
author
zhangjipeng
committed
add webkit build part - 14
1 parent 3255296 commit d4fa0ca

File tree

11 files changed

+396
-17
lines changed

11 files changed

+396
-17
lines changed

‎packages/patchs/sqlite-autoconf-3460000/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.16.0)
22

33
PROJECT(sqlite3)
44
include_directories(${CMAKE_CURRENT_LIST_DIR})
5+
6+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fPIC")
57
add_library(sqlite3 STATIC sqlite3.c sqlite3.h sqlite3ext.h)
68

79
add_definitions(-DSQLITE_ENABLE_RTREE)

‎packages/patchs/webkitgtk-2.45.6/OptionsDavinci.cmake‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ set_target_properties(LibXslt::LibXslt PROPERTIES
6060
)
6161
add_library(SQLite::SQLite3 UNKNOWN IMPORTED PUBLIC sqlite3)
6262
set_target_properties(SQLite::SQLite3 PROPERTIES
63-
IMPORTED_LOCATION "${WORKSPACE_OUT}/lib/${LIB_PREFIX}sqlite3.${LIB_EXT}"
63+
IMPORTED_LOCATION "${WORKSPACE_OUT}/lib/${LIB_PREFIX}sqlite3.${LIBA_EXT}"
6464
INTERFACE_INCLUDE_DIRECTORIES "${WORKSPACE_OUT}/include"
6565
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
6666
)
@@ -112,12 +112,24 @@ set_target_properties(LCMS2::LCMS2 PROPERTIES
112112
INTERFACE_INCLUDE_DIRECTORIES "${WORKSPACE_OUT}/include"
113113
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
114114
)
115+
add_library(WOFF2::common UNKNOWN IMPORTED PUBLIC woff2common)
116+
set_target_properties(WOFF2::common PROPERTIES
117+
IMPORTED_LOCATION "${WORKSPACE_OUT}/lib/${LIB_PREFIX}woff2common.${LIBA_EXT}"
118+
INTERFACE_INCLUDE_DIRECTORIES "${WORKSPACE_OUT}/include"
119+
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
120+
)
115121
add_library(WOFF2::dec UNKNOWN IMPORTED PUBLIC woff2dec)
116122
set_target_properties(WOFF2::dec PROPERTIES
117123
IMPORTED_LOCATION "${WORKSPACE_OUT}/lib/${LIB_PREFIX}woff2dec.${LIBA_EXT}"
118124
INTERFACE_INCLUDE_DIRECTORIES "${WORKSPACE_OUT}/include"
119125
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
120126
)
127+
add_library(WOFF2::enc UNKNOWN IMPORTED PUBLIC woff2enc)
128+
set_target_properties(WOFF2::enc PROPERTIES
129+
IMPORTED_LOCATION "${WORKSPACE_OUT}/lib/${LIB_PREFIX}woff2enc.${LIBA_EXT}"
130+
INTERFACE_INCLUDE_DIRECTORIES "${WORKSPACE_OUT}/include"
131+
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
132+
)
121133
add_library(HarfBuzz::HarfBuzz UNKNOWN IMPORTED PUBLIC harfbuzz)
122134
set_target_properties(HarfBuzz::HarfBuzz PROPERTIES
123135
IMPORTED_LOCATION "${WORKSPACE_OUT}/lib/${LIB_PREFIX}harfbuzz.${LIBA_EXT}"
@@ -168,10 +180,10 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_DATETIMELOCAL PRIVATE ON)
168180
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_MONTH PRIVATE ON)
169181
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PRIVATE ON)
170182
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK PRIVATE ON)
171-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE ON)
172-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE ON)
183+
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_RECORDER PRIVATE OFF)
184+
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION PRIVATE OFF)
173185
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_SESSION_PLAYLIST PRIVATE OFF)
174-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ON)
186+
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE OFF)
175187
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
176188
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MODERN_MEDIA_CONTROLS PRIVATE ON)
177189
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS PRIVATE ON)

‎packages/patchs/webkitgtk-2.45.6/WebCore/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,8 @@ endif ()
22412241

22422242
if (USE_WOFF2)
22432243
list(APPEND WebCore_LIBRARIES WOFF2::dec)
2244+
list(APPEND WebCore_LIBRARIES WOFF2::enc)
2245+
list(APPEND WebCore_LIBRARIES WOFF2::common)
22442246
endif ()
22452247

22462248
if (USE_XDGMIME)

‎packages/patchs/webkitgtk-2.45.6/WebCore/PAL/PlatformDavinci.cmake‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#list(APPEND PAL_PUBLIC_HEADERS
2-
# crypto/gcrypt/Handle.h
3-
# crypto/gcrypt/Initialization.h
4-
# crypto/gcrypt/Utilities.h
5-
# crypto/tasn1/Utilities.h
6-
#)
1+
list(APPEND PAL_PUBLIC_HEADERS
2+
crypto/gcrypt/Handle.h
3+
crypto/gcrypt/Initialization.h
4+
crypto/gcrypt/Utilities.h
5+
crypto/tasn1/Utilities.h
6+
)
77

88
list(APPEND PAL_SOURCES
9-
# crypto/gcrypt/CryptoDigestGCrypt.cpp
9+
crypto/gcrypt/CryptoDigestGCrypt.cpp
1010

11-
# crypto/tasn1/Utilities.cpp
11+
crypto/tasn1/Utilities.cpp
1212

1313
system/ClockGeneric.cpp
1414

‎packages/patchs/webkitgtk-2.45.6/WebCore/PlatformDavinci.cmake‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include(platform/TextureMapper.cmake)
66
include(platform/Skia.cmake)
77

88
include(${WORKSPACE_DIR}/source/WebCore/Curl.cmake)
9+
include(${WORKSPACE_DIR}/source/WebCore/Platform.cmake)
910

1011
list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES
1112
"SourcesDavinci.txt"

‎source/WTF/wtf/PlatformUseDavinci.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,10 @@
3939
#define USE_CURL 1
4040
#define USE_HARFBUZZ 1
4141
#define USE_OPENSSL 1
42+
43+
#ifndef FALSE
44+
#define FALSE 0
45+
#endif
46+
#ifndef TRUE
47+
#define TRUE 1
48+
#endif

‎source/WebCore/Platform.cmake‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
set(WEBCORE_IMP_DIR ${WORKSPACE_DIR}/source/WebCore)
2+
3+
list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
4+
"${WEBCORE_IMP_DIR}/platform"
5+
"${WEBCORE_IMP_DIR}/platform/graphics"
6+
"${WEBCORE_IMP_DIR}/platform/graphics/egl"
7+
"${WEBCORE_IMP_DIR}/platform/accessibility"
8+
)
9+
10+
list(APPEND WebCore_SOURCES
11+
${WEBCORE_IMP_DIR}/platform/DragData.cpp
12+
${WEBCORE_IMP_DIR}/platform/Pasteboard.cpp
13+
${WEBCORE_IMP_DIR}/platform/Screen.cpp
14+
${WEBCORE_IMP_DIR}/platform/graphics/egl/GLFence.cpp
15+
${WEBCORE_IMP_DIR}/platform/graphics/egl/GLContext.cpp
16+
${WEBCORE_IMP_DIR}/platform/graphics/egl/GLContextWrapper.cpp
17+
${WEBCORE_IMP_DIR}/platform/graphics/egl/PlatformDisplaySurfaceless.cpp
18+
)
19+
20+
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
21+
${WEBCORE_IMP_DIR}/platform/graphics/egl/GLContext.h
22+
${WEBCORE_IMP_DIR}/platform/graphics/egl/GLContextWrapper.h
23+
${WEBCORE_IMP_DIR}/platform/graphics/egl/GLFence.h
24+
${WEBCORE_IMP_DIR}/platform/graphics/egl/PlatformDisplaySurfaceless.h
25+
)
26+
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* Copyright (C) 2024 Zhang Ji Peng <onecoolx@gmail.com>
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
18+
19+
#include "config.h"
20+
#include "DragData.h"
21+
#include "NotImplemented.h"
22+
23+
namespace WebCore {
24+
25+
bool DragData::canSmartReplace() const
26+
{
27+
return false;
28+
}
29+
30+
bool DragData::containsColor() const
31+
{
32+
return false;
33+
}
34+
35+
bool DragData::containsFiles() const
36+
{
37+
notImplemented();
38+
return false;
39+
}
40+
41+
unsigned DragData::numberOfFiles() const
42+
{
43+
notImplemented();
44+
return 0;
45+
}
46+
47+
Vector<String> DragData::asFilenames() const
48+
{
49+
if (m_disallowFileAccess)
50+
return { };
51+
52+
notImplemented();
53+
return { };
54+
}
55+
56+
bool DragData::containsPlainText() const
57+
{
58+
notImplemented();
59+
return false;
60+
}
61+
62+
String DragData::asPlainText() const
63+
{
64+
notImplemented();
65+
return String();
66+
}
67+
68+
Color DragData::asColor() const
69+
{
70+
return Color();
71+
}
72+
73+
bool DragData::containsCompatibleContent(DraggingPurpose) const
74+
{
75+
notImplemented();
76+
return false;//containsPlainText() || containsURL() || m_platformDragData->hasMarkup() || containsColor() || containsFiles();
77+
}
78+
79+
bool DragData::containsURL(FilenameConversionPolicy filenamePolicy) const
80+
{
81+
notImplemented();
82+
return false;//!asURL(filenamePolicy).isEmpty();
83+
}
84+
85+
String DragData::asURL(FilenameConversionPolicy filenamePolicy, String* title) const
86+
{
87+
notImplemented();
88+
//if (!m_platformDragData->hasURL())
89+
// return String();
90+
//if (filenamePolicy != ConvertFilenames) {
91+
// if (m_platformDragData->url().protocolIsFile())
92+
// return { };
93+
//}
94+
95+
//if (title)
96+
// *title = m_platformDragData->urlLabel();
97+
//return m_platformDragData->url().string();
98+
return String();
99+
}
100+
101+
bool DragData::shouldMatchStyleOnDrop() const
102+
{
103+
return false;
104+
}
105+
106+
}
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/*
2+
* Copyright (C) 2024 Zhang Ji Peng
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free
16+
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17+
* Boston, MA 02110-1301 USA
18+
*/
19+
20+
#include "config.h"
21+
#include "Pasteboard.h"
22+
#include "NotImplemented.h"
23+
24+
namespace WebCore {
25+
26+
std::unique_ptr<Pasteboard> Pasteboard::createForCopyAndPaste(std::unique_ptr<PasteboardContext>&& context)
27+
{
28+
return makeUnique<Pasteboard>(WTFMove(context));
29+
}
30+
31+
Pasteboard::Pasteboard(std::unique_ptr<PasteboardContext>&& context)
32+
: m_context(WTFMove(context))
33+
{
34+
}
35+
36+
bool Pasteboard::hasData()
37+
{
38+
notImplemented();
39+
return false;
40+
}
41+
42+
Vector<String> Pasteboard::typesSafeForBindings(const String&)
43+
{
44+
notImplemented();
45+
return { };
46+
}
47+
48+
Vector<String> Pasteboard::typesForLegacyUnsafeBindings()
49+
{
50+
Vector<String> types;
51+
notImplemented();
52+
return types;
53+
}
54+
55+
String Pasteboard::readOrigin()
56+
{
57+
notImplemented();
58+
return { };
59+
}
60+
61+
String Pasteboard::readString(const String& type)
62+
{
63+
return String();
64+
}
65+
66+
String Pasteboard::readStringInCustomData(const String&)
67+
{
68+
notImplemented();
69+
return { };
70+
}
71+
72+
void Pasteboard::writeString(const String& type, const String& text)
73+
{
74+
notImplemented();
75+
}
76+
77+
void Pasteboard::clear()
78+
{
79+
}
80+
81+
void Pasteboard::clear(const String&)
82+
{
83+
}
84+
85+
void Pasteboard::read(PasteboardPlainText& text, PlainTextURLReadingPolicy, std::optional<size_t>)
86+
{
87+
notImplemented();
88+
}
89+
90+
void Pasteboard::read(PasteboardWebContentReader&, WebContentReadingPolicy, std::optional<size_t>)
91+
{
92+
notImplemented();
93+
}
94+
95+
void Pasteboard::read(PasteboardFileReader&, std::optional<size_t>)
96+
{
97+
}
98+
99+
void Pasteboard::write(const PasteboardURL& url)
100+
{
101+
notImplemented();
102+
}
103+
104+
void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
105+
{
106+
notImplemented();
107+
}
108+
109+
void Pasteboard::write(const PasteboardImage&)
110+
{
111+
}
112+
113+
void Pasteboard::write(const PasteboardBuffer&)
114+
{
115+
}
116+
117+
void Pasteboard::write(const PasteboardWebContent& content)
118+
{
119+
notImplemented();
120+
}
121+
122+
Pasteboard::FileContentState Pasteboard::fileContentState()
123+
{
124+
notImplemented();
125+
return FileContentState::NoFileOrImageData;
126+
}
127+
128+
bool Pasteboard::canSmartReplace()
129+
{
130+
return false;
131+
}
132+
133+
void Pasteboard::writeMarkup(const String&)
134+
{
135+
}
136+
137+
void Pasteboard::writePlainText(const String& text, SmartReplaceOption)
138+
{
139+
writeString("text/plain;charset=utf-8"_s, text);
140+
}
141+
142+
void Pasteboard::writeCustomData(const Vector<PasteboardCustomData>&)
143+
{
144+
}
145+
146+
void Pasteboard::write(const Color&)
147+
{
148+
}
149+
150+
} // namespace WebCore

0 commit comments

Comments
 (0)