-
Notifications
You must be signed in to change notification settings - Fork 37
/
QtWebKit_remove_plugins.patch
294 lines (254 loc) · 7.89 KB
/
QtWebKit_remove_plugins.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
--- ./Source/WebCore/plugins/PluginDatabase.cpp~ 2017-04-18 22:15:27.000000000 +0200
+++ ./Source/WebCore/plugins/PluginDatabase.cpp 2019-03-21 15:42:50.286047941 +0100
@@ -70,10 +70,12 @@
if (!plugins) {
plugins = new PluginDatabase;
+ /*
if (populate) {
plugins->setPluginDirectories(PluginDatabase::defaultPluginDirectories());
plugins->refresh();
}
+ */
}
return plugins;
@@ -91,12 +93,14 @@
void PluginDatabase::addExtraPluginDirectory(const String& directory)
{
- m_pluginDirectories.append(directory);
+ // m_pluginDirectories.append(directory);
refresh();
}
bool PluginDatabase::refresh()
{
+ return false;
+
#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
if (!m_persistentMetadataCacheIsLoaded)
loadPersistentMetadataCache();
@@ -175,11 +179,11 @@
Vector<PluginPackage*> PluginDatabase::plugins() const
{
Vector<PluginPackage*> result;
-
+#if 0
PluginSet::const_iterator end = m_plugins.end();
for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it)
result.append((*it).get());
-
+#endif
return result;
}
@@ -193,6 +197,8 @@
PluginPackage* PluginDatabase::pluginForMIMEType(const String& mimeType)
{
+ return 0;
+
if (mimeType.isEmpty())
return 0;
@@ -232,6 +238,8 @@
String PluginDatabase::MIMETypeForExtension(const String& extension) const
{
+ return String();
+
if (extension.isEmpty())
return String();
@@ -283,6 +291,8 @@
PluginPackage* PluginDatabase::findPlugin(const KURL& url, String& mimeType)
{
+ return 0;
+
if (!mimeType.isEmpty())
return pluginForMIMEType(mimeType);
@@ -314,6 +324,8 @@
bool PluginDatabase::fileExistsAndIsNotDisabled(const String& filePath) const
{
+ return false;
+
// Skip plugin files that are disabled by filename.
if (m_disabledPluginFiles.contains(pathGetFileName(filePath)))
return false;
@@ -332,6 +344,8 @@
bool PluginDatabase::add(PassRefPtr<PluginPackage> prpPackage)
{
+ return false;
+
ASSERT_ARG(prpPackage, prpPackage);
RefPtr<PluginPackage> package = prpPackage;
@@ -392,6 +406,7 @@
{
Vector<String> paths;
+#if 0
// Add paths specific to each platform
#if defined(XP_UNIX) && !PLATFORM(BLACKBERRY)
String userPluginPath = homeDirectoryPath();
@@ -449,7 +464,8 @@
qtPath.split(UChar(':'), /* allowEmptyEntries */ false, qtPaths);
paths.appendVector(qtPaths);
#endif
-
+#endif
+
return paths;
}
@@ -472,7 +488,7 @@
}
void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const
-{
+{return;
// FIXME: This should be a case insensitive set.
HashSet<String> uniqueFilenames;
@@ -551,6 +567,8 @@
void PluginDatabase::loadPersistentMetadataCache()
{
+ return;
+
if (!isPersistentMetadataCacheEnabled() || persistentMetadataCachePath().isEmpty())
return;
@@ -631,6 +649,8 @@
void PluginDatabase::updatePersistentMetadataCache()
{
+ return;
+
if (!isPersistentMetadataCacheEnabled() || persistentMetadataCachePath().isEmpty())
return;
--- ./Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp~ 2017-04-18 22:15:27.000000000 +0200
+++ ./Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp 2019-03-21 15:37:42.520399021 +0100
@@ -98,6 +98,8 @@
{
ASSERT(m_isInitialized);
+ return false;
+
Module* module = m_module.get();
NPP_GetValueProcPtr NPP_GetValue = module->functionPointer<NPP_GetValueProcPtr>("NP_GetValue");
if (!NPP_GetValue)
@@ -127,6 +129,8 @@
bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
{
+ return false;
+
RawPluginMetaData metaData;
if (!PluginProcessProxy::scanPlugin(pluginPath, metaData))
return false;
@@ -142,6 +146,8 @@
void NetscapePluginModule::determineQuirks()
{
+ return;
+
#if CPU(X86_64)
RawPluginMetaData metaData;
if (!getPluginInfoForLoadedPlugin(metaData))
@@ -179,6 +185,8 @@
bool NetscapePluginModule::scanPlugin(const String& pluginPath)
{
+ return true;
+
RawPluginMetaData metaData;
{
--- ./Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp~ 2017-04-18 22:15:27.000000000 +0200
+++ ./Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp 2019-03-21 15:36:07.315634987 +0100
@@ -137,6 +137,8 @@
PassRefPtr<NetscapePluginModule> NetscapePluginModule::getOrCreate(const String& pluginPath)
{
+ return 0;
+ #if 0
// First, see if we already have a module with this plug-in path.
for (size_t i = 0; i < initializedNetscapePluginModules().size(); ++i) {
NetscapePluginModule* pluginModule = initializedNetscapePluginModules()[i];
@@ -144,14 +146,14 @@
if (pluginModule->m_pluginPath == pluginPath)
return pluginModule;
}
-
- RefPtr<NetscapePluginModule> pluginModule(adoptRef(new NetscapePluginModule(pluginPath)));
+#endif
+ // RefPtr<NetscapePluginModule> pluginModule(adoptRef(new NetscapePluginModule(pluginPath)));
// Try to load and initialize the plug-in module.
- if (!pluginModule->load())
+ //if (!pluginModule->load())
return 0;
- return pluginModule.release();
+ //return pluginModule.release();
}
void NetscapePluginModule::incrementLoadCount()
@@ -177,6 +179,8 @@
bool NetscapePluginModule::load()
{
+ return false;
+
if (m_isInitialized) {
ASSERT(initializedNetscapePluginModules().find(this) != notFound);
return true;
@@ -199,6 +203,8 @@
bool NetscapePluginModule::tryLoad()
{
+ return false;
+
m_module = adoptPtr(new Module(m_pluginPath));
if (!m_module->load())
return false;
--- ./Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp~ 2017-04-18 22:15:27.000000000 +0200
+++ ./Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp 2019-03-21 15:34:32.865886722 +0100
@@ -42,7 +42,7 @@
Vector<String> PluginInfoStore::pluginsDirectories()
{
Vector<String> result;
-
+#if 0
result.append(homeDirectoryPath() + "/.mozilla/plugins");
result.append(homeDirectoryPath() + "/.netscape/plugins");
result.append("/usr/lib/browser/plugins");
@@ -74,20 +74,21 @@
mozillaPaths.split(UChar(':'), /* allowEmptyEntries */ false, paths);
result.appendVector(paths);
}
-
+#endif
return result;
}
Vector<String> PluginInfoStore::pluginPathsInDirectory(const String& directory)
{
Vector<String> result;
+#if 0
Vector<String> pluginPaths = listDirectory(directory, String("*.so"));
Vector<String>::const_iterator end = pluginPaths.end();
for (Vector<String>::const_iterator it = pluginPaths.begin(); it != end; ++it) {
if (fileExists(*it))
result.append(*it);
}
-
+#endif
return result;
}
@@ -98,13 +99,15 @@
bool PluginInfoStore::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
{
- return NetscapePluginModule::getPluginInfo(pluginPath, plugin);
+ return false;
+ //return NetscapePluginModule::getPluginInfo(pluginPath, plugin);
}
bool PluginInfoStore::shouldUsePlugin(Vector<PluginModuleInfo>& /*alreadyLoadedPlugins*/, const PluginModuleInfo& /*plugin*/)
{
// We do not do any black-listing presently.
- return true;
+ //return true;
+ return false;
}
} // namespace WebKit
--- Source/WebCore/plugins/qt/PluginPackageQt.cpp~ 2017-04-18 22:15:27.000000000 +0200
+++ Source/WebCore/plugins/qt/PluginPackageQt.cpp 2019-03-21 17:31:24.204042064 +0100
@@ -38,6 +38,8 @@
bool PluginPackage::fetchInfo()
{
+ return false;
+
if (!m_module) {
if (isPluginBlacklisted())
return false;
@@ -166,6 +168,8 @@
bool PluginPackage::load()
{
+ return false;
+
if (m_isLoaded) {
m_loadCount++;
return true;