Allow more buffer formats in the IOSurface pool
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-11-20  Simon Fraser  <simon.fraser@apple.com>
2
3         Allow more buffer formats in the IOSurface pool
4         https://bugs.webkit.org/show_bug.cgi?id=151516
5
6         Reviewed by Tim Horton.
7         
8         Have RemoteLayerBackingStore go through a static function on IOSurface to return
9         a surface to the pool, rather than knowing about IOSurfacePool directly.
10
11         * Shared/mac/RemoteLayerBackingStore.mm:
12         (WebKit::RemoteLayerBackingStore::Buffer::discard):
13
14 2015-11-20  Alex Christensen  <achristensen@webkit.org>
15
16         Remove NETWORK_PROCESS compile flag
17         https://bugs.webkit.org/show_bug.cgi?id=151512
18
19         Reviewed by Tim Horton.
20
21         * CMakeLists.txt:
22         * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
23         (NetworkProcessMain):
24         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
25         (NetworkServiceInitializer):
26         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
27         (WebKit::NetworkBlobRegistry::filesInBlob):
28         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
29         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
30         (WebKit::NetworkConnectionToWebProcess::blobSize):
31         * NetworkProcess/NetworkConnectionToWebProcess.h:
32         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
33         * NetworkProcess/NetworkLoad.cpp:
34         * NetworkProcess/NetworkLoad.h:
35         * NetworkProcess/NetworkLoadClient.h:
36         * NetworkProcess/NetworkLoadParameters.cpp:
37         (WebKit::NetworkLoadParameters::NetworkLoadParameters):
38         * NetworkProcess/NetworkLoadParameters.h:
39         * NetworkProcess/NetworkProcess.cpp:
40         * NetworkProcess/NetworkProcess.h:
41         * NetworkProcess/NetworkProcess.messages.in:
42         * NetworkProcess/NetworkResourceLoader.cpp:
43         * NetworkProcess/NetworkResourceLoader.h:
44         * NetworkProcess/NetworkResourceLoader.messages.in:
45         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
46         (WebKit::NetworkProcess::clearDiskCache):
47         * NetworkProcess/efl/NetworkProcessMainEfl.cpp:
48         (WebKit::NetworkProcessMainUnix):
49         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
50         (WebKit::NetworkProcessMainUnix):
51         * NetworkProcess/ios/NetworkProcessIOS.mm:
52         * NetworkProcess/mac/NetworkLoadMac.mm:
53         * NetworkProcess/mac/NetworkProcessMac.mm:
54         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
55         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
56         * NetworkProcess/soup/NetworkProcessSoup.cpp:
57         (WebKit::NetworkProcess::platformTerminate):
58         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
59         (WebKit::RemoteNetworkingContext::storageSession):
60         * Shared/Authentication/AuthenticationManager.cpp:
61         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
62         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
63         (WebKit::CustomProtocolManager::initialize):
64         (WebKit::CustomProtocolManager::addCustomProtocol):
65         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
66         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
67         (WebKit::CustomProtocolManager::supplementName):
68         (WebKit::CustomProtocolManager::initialize):
69         (WebKit::CustomProtocolManager::registerScheme):
70         * Shared/Network/NetworkProcessCreationParameters.cpp:
71         (WebKit::NetworkProcessCreationParameters::decode):
72         * Shared/Network/NetworkProcessCreationParameters.h:
73         * Shared/Network/NetworkProcessSupplement.h:
74         (WebKit::NetworkProcessSupplement::initialize):
75         * Shared/Network/NetworkResourceLoadParameters.cpp:
76         (WebKit::NetworkResourceLoadParameters::decode):
77         * Shared/Network/NetworkResourceLoadParameters.h:
78         * Shared/ProcessExecutablePath.h:
79         * Shared/WebProcessCreationParameters.cpp:
80         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
81         (WebKit::WebProcessCreationParameters::encode):
82         (WebKit::WebProcessCreationParameters::decode):
83         * Shared/WebProcessCreationParameters.h:
84         * Shared/efl/ProcessExecutablePathEfl.cpp:
85         (WebKit::executablePathOfPluginProcess):
86         (WebKit::executablePathOfNetworkProcess):
87         (WebKit::executablePathOfDatabaseProcess):
88         * Shared/gtk/ProcessExecutablePathGtk.cpp:
89         (WebKit::executablePathOfPluginProcess):
90         (WebKit::executablePathOfNetworkProcess):
91         (WebKit::executablePathOfDatabaseProcess):
92         * Shared/mac/CookieStorageShim.h:
93         * Shared/mac/CookieStorageShim.mm:
94         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
95         * Shared/mac/CookieStorageShimLibrary.cpp:
96         * Shared/mac/CookieStorageShimLibrary.h:
97         * UIProcess/API/APISession.cpp:
98         (API::Session::~Session):
99         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
100         (WKContextGetNetworkProcessIdentifier):
101         * UIProcess/API/efl/ewk_context.cpp:
102         (ewk_context_process_model_set):
103         (ewk_context_process_model_get):
104         (ewk_context_tls_error_policy_get):
105         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
106         (WebKit::WebProcessPool::updateProcessSuppressionState):
107         (WebKit::WebProcessPool::platformInitializeWebProcess):
108         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
109         (WebKit::WebProcessPool::platformInvalidateContext):
110         * UIProcess/Downloads/DownloadProxy.cpp:
111         (WebKit::DownloadProxy::cancel):
112         * UIProcess/Launcher/ProcessLauncher.cpp:
113         (WebKit::ProcessLauncher::processTypeAsString):
114         (WebKit::ProcessLauncher::getProcessTypeFromString):
115         * UIProcess/Launcher/ProcessLauncher.h:
116         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
117         (WebKit::ProcessLauncher::launchProcess):
118         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
119         (WebKit::ProcessLauncher::launchProcess):
120         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
121         (WebKit::computeProcessShimPath):
122         (WebKit::serviceName):
123         (WebKit::shouldLeakBoost):
124         (WebKit::createProcess):
125         * UIProcess/Network/NetworkProcessProxy.cpp:
126         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
127         * UIProcess/Network/NetworkProcessProxy.h:
128         * UIProcess/Network/NetworkProcessProxy.messages.in:
129         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
130         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
131         * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
132         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
133         * UIProcess/WebCookieManagerProxy.cpp:
134         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
135         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
136         * UIProcess/WebPageProxy.cpp:
137         (WebKit::WebPageProxy::WebPageProxy):
138         (WebKit::WebPageProxy::setSessionID):
139         (WebKit::WebPageProxy::initializeWebPage):
140         * UIProcess/WebProcessPool.cpp:
141         (WebKit::WebProcessPool::WebProcessPool):
142         (WebKit::WebProcessPool::~WebProcessPool):
143         (WebKit::WebProcessPool::initializeClient):
144         (WebKit::WebProcessPool::networkingProcessConnection):
145         (WebKit::WebProcessPool::languageChanged):
146         (WebKit::WebProcessPool::setUsesNetworkProcess):
147         (WebKit::WebProcessPool::usesNetworkProcess):
148         (WebKit::WebProcessPool::ensureNetworkProcess):
149         (WebKit::WebProcessPool::getNetworkProcessConnection):
150         (WebKit::WebProcessPool::ensureDatabaseProcess):
151         (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
152         (WebKit::WebProcessPool::createNewWebProcess):
153         (WebKit::WebProcessPool::download):
154         (WebKit::WebProcessPool::resumeDownload):
155         (WebKit::WebProcessPool::setAdditionalPluginsDirectory):
156         (WebKit::WebProcessPool::networkProcessIdentifier):
157         (WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
158         (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
159         (WebKit::WebProcessPool::registerURLSchemeAsLocal):
160         (WebKit::WebProcessPool::setCacheModel):
161         (WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
162         (WebKit::WebProcessPool::createDownloadProxy):
163         (WebKit::WebProcessPool::useTestingNetworkSession):
164         (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
165         (WebKit::WebProcessPool::requestNetworkingStatistics):
166         (WebKit::WebProcessPool::handleMessage):
167         * UIProcess/WebProcessPool.h:
168         (WebKit::WebProcessPool::sendToNetworkingProcess):
169         (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
170         * UIProcess/WebProcessProxy.cpp:
171         (WebKit::WebProcessProxy::getPluginProcessConnection):
172         (WebKit::WebProcessProxy::getNetworkProcessConnection):
173         (WebKit::WebProcessProxy::getDatabaseProcessConnection):
174         (WebKit::WebProcessProxy::createDownloadProxy):
175         (WebKit::WebProcessProxy::didCancelProcessSuspension):
176         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
177         (WebKit::WebProcessProxy::didSetAssertionState):
178         * UIProcess/WebProcessProxy.h:
179         (WebKit::WebProcessProxy::throttler):
180         * UIProcess/WebProcessProxy.messages.in:
181         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
182         (WebKit::WebsiteDataStore::~WebsiteDataStore):
183         (WebKit::WebsiteDataStore::cloneSessionData):
184         * UIProcess/gtk/WebProcessPoolGtk.cpp:
185         (WebKit::initInspectorServer):
186         (WebKit::WebProcessPool::setIgnoreTLSErrors):
187         * UIProcess/soup/WebProcessPoolSoup.cpp:
188         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
189         * WebKit2Prefix.h:
190         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
191         (WebKit::BlobRegistryProxy::blobSize):
192         * WebProcess/FileAPI/BlobRegistryProxy.h:
193         * WebProcess/Network/NetworkProcessConnection.cpp:
194         * WebProcess/Network/NetworkProcessConnection.h:
195         * WebProcess/Network/NetworkProcessConnection.messages.in:
196         * WebProcess/Network/WebResourceLoadScheduler.cpp:
197         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
198         * WebProcess/Network/WebResourceLoadScheduler.h:
199         * WebProcess/Network/WebResourceLoader.cpp:
200         * WebProcess/Network/WebResourceLoader.h:
201         * WebProcess/Network/WebResourceLoader.messages.in:
202         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
203         (WebKit::initializeBrowserFuncs):
204         (WebKit::netscapeBrowserFuncs):
205         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
206         (WebKit::NetscapePlugin::registerRedirect):
207         (WebKit::NetscapePlugin::urlRedirectResponse):
208         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
209         (WebKit::WebPlatformStrategies::cookiesForDOM):
210         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
211         (WebKit::WebPlatformStrategies::cookiesEnabled):
212         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
213         (WebKit::WebPlatformStrategies::getRawCookies):
214         (WebKit::WebPlatformStrategies::deleteCookie):
215         (WebKit::WebPlatformStrategies::resourceLoadScheduler):
216         (WebKit::WebPlatformStrategies::createBlobRegistry):
217         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
218         * WebProcess/WebPage/WebFrame.cpp:
219         (WebKit::WebFrame::startDownload):
220         (WebKit::WebFrame::convertMainResourceLoadToDownload):
221         * WebProcess/WebProcess.cpp:
222         (WebKit::WebProcess::WebProcess):
223         (WebKit::WebProcess::initializeWebProcess):
224         (WebKit::WebProcess::ensureNetworkProcessConnection):
225         (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
226         (WebKit::WebProcess::usesNetworkProcess):
227         (WebKit::WebProcess::networkConnection):
228         (WebKit::WebProcess::webResourceLoadScheduler):
229         (WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
230         (WebKit::WebProcess::prefetchDNS):
231         * WebProcess/WebProcess.h:
232         * config.h:
233
234 2015-11-19  Simon Fraser  <simon.fraser@apple.com>
235
236         Back-buffer to front-buffer copy fails for some buffer formats
237         https://bugs.webkit.org/show_bug.cgi?id=151475
238         rdar://problem/23617899
239
240         Reviewed by Tim Horton.
241         
242         When displaying RemoteLayerBackingStore, we copy the back buffer to the front
243         buffer before painting the updated regions. For buffers using Format::RGB10A8,
244         the CGImage-based copy fails, so in this case, use IOSurface::copyToSurface().
245         
246         Reorganized RemoteLayerBackingStore::drawInContext() to make this a bit easier
247         to understand. First, we either copy the entire surface over, or paint the backImage.
248         Then we clip to the dirty rects, and clear them, then paint the layer contents.
249
250         * Shared/mac/RemoteLayerBackingStore.mm:
251         (WebKit::RemoteLayerBackingStore::display):
252         (WebKit::RemoteLayerBackingStore::drawInContext):
253
254 2015-11-19  Commit Queue  <commit-queue@webkit.org>
255
256         Unreviewed, rolling out r192667 and r192668.
257         https://bugs.webkit.org/show_bug.cgi?id=151476
258
259         broke api tests (Requested by alexchristensen on #webkit).
260
261         Reverted changesets:
262
263         "Remove the non-NetworkProcess configurations"
264         https://bugs.webkit.org/show_bug.cgi?id=151418
265         http://trac.webkit.org/changeset/192667
266
267         "Fix GTK Build after r192667."
268         http://trac.webkit.org/changeset/192668
269
270 2015-11-19  Alex Christensen  <achristensen@webkit.org>
271
272         Fix GTK Build after r192667.
273
274         * UIProcess/API/gtk/WebKitWebContext.cpp:
275         (webkitWebContextConstructed):
276         (webkit_web_context_set_process_model):
277         (webkit_web_context_get_process_model):
278         (toWebKitProcessModel): Deleted.
279         (injectedBundleDirectory): Deleted.
280
281 2015-11-19  Alex Christensen  <achristensen@webkit.org>
282
283         Remove the non-NetworkProcess configurations
284         https://bugs.webkit.org/show_bug.cgi?id=151418
285
286         Reviewed by Geoffrey Garen.
287
288         This patch assumes ENABLE(NETWORK_PROCESS) is always 1, usesNetworkProcess is always true, 
289         and ProcessModel is always ProcessModelMultipleSecondaryProcesses.  It does this by removing
290         the checks and the code that would be executed with other configurations.
291
292         * CMakeLists.txt:
293         * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
294         (NetworkProcessMain):
295         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
296         (NetworkServiceInitializer):
297         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
298         (WebKit::NetworkBlobRegistry::filesInBlob):
299         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
300         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
301         (WebKit::NetworkConnectionToWebProcess::blobSize):
302         * NetworkProcess/NetworkConnectionToWebProcess.h:
303         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
304         * NetworkProcess/NetworkLoad.cpp:
305         * NetworkProcess/NetworkLoad.h:
306         * NetworkProcess/NetworkLoadClient.h:
307         * NetworkProcess/NetworkLoadParameters.cpp:
308         (WebKit::NetworkLoadParameters::NetworkLoadParameters):
309         * NetworkProcess/NetworkLoadParameters.h:
310         * NetworkProcess/NetworkProcess.cpp:
311         * NetworkProcess/NetworkProcess.h:
312         * NetworkProcess/NetworkProcess.messages.in:
313         * NetworkProcess/NetworkResourceLoader.cpp:
314         * NetworkProcess/NetworkResourceLoader.h:
315         * NetworkProcess/NetworkResourceLoader.messages.in:
316         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
317         (WebKit::NetworkProcess::clearDiskCache):
318         * NetworkProcess/efl/NetworkProcessMainEfl.cpp:
319         (WebKit::NetworkProcessMainUnix):
320         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
321         (WebKit::NetworkProcessMainUnix):
322         * NetworkProcess/ios/NetworkProcessIOS.mm:
323         * NetworkProcess/mac/NetworkLoadMac.mm:
324         * NetworkProcess/mac/NetworkProcessMac.mm:
325         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
326         * NetworkProcess/soup/NetworkProcessSoup.cpp:
327         (WebKit::NetworkProcess::platformTerminate):
328         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
329         (WebKit::RemoteNetworkingContext::storageSession):
330         * Shared/API/c/WKDeprecatedFunctions.cpp:
331         (WKInspectorToggleJavaScriptProfiling):
332         (WKContextSetProcessModel):
333         (WKContextGetProcessModel):
334         (WKContextSetUsesNetworkProcess):
335         (WKGraphicsContextGetCGContext):
336         * Shared/Authentication/AuthenticationManager.cpp:
337         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
338         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
339         (WebKit::CustomProtocolManager::initialize):
340         (WebKit::CustomProtocolManager::addCustomProtocol):
341         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
342         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
343         (WebKit::CustomProtocolManager::supplementName):
344         (WebKit::CustomProtocolManager::initialize):
345         (WebKit::CustomProtocolManager::registerScheme):
346         * Shared/Network/NetworkProcessCreationParameters.cpp:
347         (WebKit::NetworkProcessCreationParameters::decode):
348         * Shared/Network/NetworkProcessCreationParameters.h:
349         * Shared/Network/NetworkProcessSupplement.h:
350         (WebKit::NetworkProcessSupplement::initialize):
351         * Shared/Network/NetworkResourceLoadParameters.cpp:
352         (WebKit::NetworkResourceLoadParameters::decode):
353         * Shared/Network/NetworkResourceLoadParameters.h:
354         * Shared/ProcessExecutablePath.h:
355         * Shared/WebProcessCreationParameters.cpp:
356         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
357         (WebKit::WebProcessCreationParameters::encode):
358         (WebKit::WebProcessCreationParameters::decode):
359         * Shared/WebProcessCreationParameters.h:
360         * Shared/efl/ProcessExecutablePathEfl.cpp:
361         (WebKit::executablePathOfPluginProcess):
362         (WebKit::executablePathOfNetworkProcess):
363         (WebKit::executablePathOfDatabaseProcess):
364         * Shared/gtk/ProcessExecutablePathGtk.cpp:
365         (WebKit::executablePathOfPluginProcess):
366         (WebKit::executablePathOfNetworkProcess):
367         (WebKit::executablePathOfDatabaseProcess):
368         * Shared/mac/CookieStorageShim.h:
369         * Shared/mac/CookieStorageShim.mm:
370         (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
371         * Shared/mac/CookieStorageShimLibrary.cpp:
372         * Shared/mac/CookieStorageShimLibrary.h:
373         * UIProcess/API/APIProcessPoolConfiguration.cpp:
374         (API::ProcessPoolConfiguration::createWithLegacyOptions):
375         (API::ProcessPoolConfiguration::copy):
376         * UIProcess/API/APIProcessPoolConfiguration.h:
377         * UIProcess/API/APISession.cpp:
378         (API::Session::~Session):
379         * UIProcess/API/C/WKAPICast.h:
380         (WebKit::toAPI):
381         (WebKit::toFontSmoothingLevel):
382         (WebKit::toProcessModel): Deleted.
383         * UIProcess/API/C/WKContext.cpp:
384         (WKContextGetCacheModel):
385         (WKContextSetMaximumNumberOfProcesses):
386         (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
387         (WKContextUseTestingNetworkSession):
388         (WKContextSetProcessModel): Deleted.
389         (WKContextGetProcessModel): Deleted.
390         (WKContextSetUsesNetworkProcess): Deleted.
391         * UIProcess/API/C/WKContext.h:
392         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
393         (WKContextGetNetworkProcessIdentifier):
394         * UIProcess/API/Cocoa/WKProcessGroup.mm:
395         (-[WKProcessGroup initWithInjectedBundleURL:]):
396         * UIProcess/API/Cocoa/WKProcessPool.mm:
397         * UIProcess/API/efl/ewk_context.cpp:
398         (ewk_context_process_model_set):
399         (ewk_context_process_model_get):
400         (ewk_context_tls_error_policy_get):
401         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
402         (WebKit::WebProcessPool::updateProcessSuppressionState):
403         (WebKit::WebProcessPool::platformInitializeWebProcess):
404         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
405         (WebKit::WebProcessPool::platformInvalidateContext):
406         * UIProcess/Downloads/DownloadProxy.cpp:
407         (WebKit::DownloadProxy::cancel):
408         (WebKit::DownloadProxy::invalidate):
409         * UIProcess/Launcher/ProcessLauncher.cpp:
410         (WebKit::ProcessLauncher::processTypeAsString):
411         (WebKit::ProcessLauncher::getProcessTypeFromString):
412         * UIProcess/Launcher/ProcessLauncher.h:
413         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
414         (WebKit::ProcessLauncher::launchProcess):
415         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
416         (WebKit::ProcessLauncher::launchProcess):
417         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
418         (WebKit::computeProcessShimPath):
419         (WebKit::serviceName):
420         (WebKit::shouldLeakBoost):
421         (WebKit::createProcess):
422         * UIProcess/Network/NetworkProcessProxy.cpp:
423         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
424         * UIProcess/Network/NetworkProcessProxy.h:
425         * UIProcess/Network/NetworkProcessProxy.messages.in:
426         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
427         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
428         * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
429         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
430         * UIProcess/ProcessModel.h: Removed.
431         * UIProcess/WebCookieManagerProxy.cpp:
432         (WebKit::WebCookieManagerProxy::shouldTerminate):
433         (WebKit::WebCookieManagerProxy::refWebContextSupplement):
434         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
435         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
436         * UIProcess/WebInspectorProxy.cpp:
437         (WebKit::WebInspectorProxy::inspectorProcessPool):
438         * UIProcess/WebPageProxy.cpp:
439         (WebKit::WebPageProxy::WebPageProxy):
440         (WebKit::WebPageProxy::reattachToWebProcess):
441         (WebKit::WebPageProxy::setSessionID):
442         (WebKit::WebPageProxy::initializeWebPage):
443         * UIProcess/WebProcessPool.cpp:
444         (WebKit::WebProcessPool::create):
445         (WebKit::WebProcessPool::WebProcessPool):
446         (WebKit::WebProcessPool::~WebProcessPool):
447         (WebKit::WebProcessPool::initializeClient):
448         (WebKit::WebProcessPool::setDownloadClient):
449         (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
450         (WebKit::WebProcessPool::networkingProcessConnection):
451         (WebKit::WebProcessPool::languageChanged):
452         (WebKit::WebProcessPool::textCheckerStateChanged):
453         (WebKit::WebProcessPool::ensureNetworkProcess):
454         (WebKit::WebProcessPool::getNetworkProcessConnection):
455         (WebKit::WebProcessPool::ensureDatabaseProcess):
456         (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
457         (WebKit::WebProcessPool::processDidCachePage):
458         (WebKit::WebProcessPool::createNewWebProcess):
459         (WebKit::WebProcessPool::disconnectProcess):
460         (WebKit::WebProcessPool::createWebPage):
461         (WebKit::WebProcessPool::download):
462         (WebKit::WebProcessPool::resumeDownload):
463         (WebKit::WebProcessPool::postMessageToInjectedBundle):
464         (WebKit::WebProcessPool::setAdditionalPluginsDirectory):
465         (WebKit::WebProcessPool::networkProcessIdentifier):
466         (WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
467         (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
468         (WebKit::WebProcessPool::registerURLSchemeAsLocal):
469         (WebKit::WebProcessPool::setCacheModel):
470         (WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
471         (WebKit::WebProcessPool::createDownloadProxy):
472         (WebKit::WebProcessPool::addMessageReceiver):
473         (WebKit::WebProcessPool::useTestingNetworkSession):
474         (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
475         (WebKit::WebProcessPool::requestWebContentStatistics):
476         (WebKit::WebProcessPool::requestNetworkingStatistics):
477         (WebKit::WebProcessPool::handleMessage):
478         (WebKit::WebProcessPool::setProcessModel): Deleted.
479         (WebKit::WebProcessPool::setUsesNetworkProcess): Deleted.
480         (WebKit::WebProcessPool::usesNetworkProcess): Deleted.
481         (WebKit::WebProcessPool::ensureSharedWebProcess): Deleted.
482         * UIProcess/WebProcessPool.h:
483         (WebKit::WebProcessPool::sendToNetworkingProcess):
484         (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
485         (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
486         (WebKit::WebProcessPool::sendToOneProcess):
487         * UIProcess/WebProcessProxy.cpp:
488         (WebKit::WebProcessProxy::removeWebPage):
489         (WebKit::WebProcessProxy::getPluginProcessConnection):
490         (WebKit::WebProcessProxy::getNetworkProcessConnection):
491         (WebKit::WebProcessProxy::getDatabaseProcessConnection):
492         (WebKit::WebProcessProxy::updateTextCheckerState):
493         (WebKit::WebProcessProxy::didSaveToPageCache):
494         (WebKit::WebProcessProxy::didCancelProcessSuspension):
495         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
496         (WebKit::WebProcessProxy::didSetAssertionState):
497         (WebKit::WebProcessProxy::createDownloadProxy): Deleted.
498         * UIProcess/WebProcessProxy.h:
499         (WebKit::WebProcessProxy::throttler):
500         * UIProcess/WebProcessProxy.messages.in:
501         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
502         (WebKit::WebsiteDataStore::~WebsiteDataStore):
503         (WebKit::WebsiteDataStore::cloneSessionData):
504         * UIProcess/gtk/WebProcessPoolGtk.cpp:
505         (WebKit::initInspectorServer):
506         (WebKit::WebProcessPool::platformInitializeWebProcess):
507         (WebKit::WebProcessPool::setIgnoreTLSErrors):
508         * UIProcess/soup/WebProcessPoolSoup.cpp:
509         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
510         * WebKit2.xcodeproj/project.pbxproj:
511         * WebKit2Prefix.h:
512         * WebProcess/FileAPI/BlobRegistryProxy.cpp:
513         (WebKit::BlobRegistryProxy::registerFileBlobURL):
514         (WebKit::BlobRegistryProxy::registerBlobURL):
515         (WebKit::BlobRegistryProxy::unregisterBlobURL):
516         (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
517         (WebKit::BlobRegistryProxy::blobSize):
518         * WebProcess/FileAPI/BlobRegistryProxy.h:
519         * WebProcess/Network/NetworkProcessConnection.cpp:
520         * WebProcess/Network/NetworkProcessConnection.h:
521         * WebProcess/Network/NetworkProcessConnection.messages.in:
522         * WebProcess/Network/WebResourceLoadScheduler.cpp:
523         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
524         * WebProcess/Network/WebResourceLoadScheduler.h:
525         * WebProcess/Network/WebResourceLoader.cpp:
526         * WebProcess/Network/WebResourceLoader.h:
527         * WebProcess/Network/WebResourceLoader.messages.in:
528         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
529         (WebKit::initializeBrowserFuncs):
530         (WebKit::netscapeBrowserFuncs):
531         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
532         (WebKit::NetscapePlugin::registerRedirect):
533         (WebKit::NetscapePlugin::urlRedirectResponse):
534         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
535         (WebKit::WebPlatformStrategies::cookiesForDOM):
536         (WebKit::WebPlatformStrategies::setCookiesFromDOM):
537         (WebKit::WebPlatformStrategies::cookiesEnabled):
538         (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
539         (WebKit::WebPlatformStrategies::getRawCookies):
540         (WebKit::WebPlatformStrategies::deleteCookie):
541         (WebKit::WebPlatformStrategies::resourceLoadScheduler):
542         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
543         (WebKit::WebPlatformStrategies::createPingHandle):
544         (WebKit::WebPlatformStrategies::createBlobRegistry):
545         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
546         * WebProcess/WebPage/WebFrame.cpp:
547         (WebKit::WebFrame::startDownload):
548         (WebKit::WebFrame::convertMainResourceLoadToDownload):
549         (WebKit::WebFrame::source):
550         * WebProcess/WebProcess.cpp:
551         (WebKit::WebProcess::WebProcess):
552         (WebKit::WebProcess::initializeConnection):
553         (WebKit::WebProcess::initializeWebProcess):
554         (WebKit::WebProcess::ensureNetworkProcessConnection):
555         (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
556         (WebKit::WebProcess::destroyPrivateBrowsingSession):
557         (WebKit::WebProcess::pluginProcessConnectionManager):
558         (WebKit::WebProcess::shouldTerminate):
559         (WebKit::WebProcess::setInjectedBundleParameters):
560         (WebKit::WebProcess::networkConnection):
561         (WebKit::WebProcess::webResourceLoadScheduler):
562         (WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
563         (WebKit::WebProcess::setEnhancedAccessibility):
564         (WebKit::WebProcess::prefetchDNS):
565         (WebKit::WebProcess::didCreateDownload): Deleted.
566         (WebKit::WebProcess::didDestroyDownload): Deleted.
567         (WebKit::WebProcess::downloadProxyConnection): Deleted.
568         (WebKit::WebProcess::downloadsAuthenticationManager): Deleted.
569         (WebKit::WebProcess::downloadManager): Deleted.
570         (WebKit::WebProcess::usesNetworkProcess): Deleted.
571         (WebKit::WebProcess::downloadRequest): Deleted.
572         (WebKit::WebProcess::resumeDownload): Deleted.
573         (WebKit::WebProcess::cancelDownload): Deleted.
574         * WebProcess/WebProcess.h:
575         (WebKit::WebProcess::textCheckerState):
576         (WebKit::WebProcess::eventDispatcher):
577         * WebProcess/WebProcess.messages.in:
578         * WebProcess/soup/WebProcessSoup.cpp:
579         (WebKit::WebProcess::platformSetCacheModel):
580         (WebKit::WebProcess::platformClearResourceCaches):
581         (WebKit::WebProcess::platformInitializeWebProcess):
582         (WebKit::WebProcess::platformTerminate):
583         (WebKit::WebProcess::setIgnoreTLSErrors):
584         (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost):
585         (WebKit::getCacheDiskFreeSize): Deleted.
586         (WebKit::setSoupSessionAcceptLanguage): Deleted.
587         (WebKit::languageChanged): Deleted.
588         * config.h:
589
590 2015-11-19  Csaba Osztrogonác  <ossy@webkit.org>
591
592         [EFL] Fix Wreturn-type clang warning in EWK2UnitTestBase.cpp
593         https://bugs.webkit.org/show_bug.cgi?id=151444
594
595         Reviewed by Darin Adler.
596
597         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
598         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
599
600 2015-11-19  Csaba Osztrogonác  <ossy@webkit.org>
601
602         [EFL] Fix -Winconsistent-missing-override clang warnings
603         https://bugs.webkit.org/show_bug.cgi?id=151443
604
605         Reviewed by Darin Adler.
606
607         * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
608         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
609         * UIProcess/CoordinatedGraphics/WebView.h:
610         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
611         (WebKit::CoordinatedDrawingArea::layerTreeStateIsFrozen):
612         (WebKit::CoordinatedDrawingArea::layerTreeHost):
613         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
614         (WebKit::CoordinatedLayerTreeHost::layerTreeContext):
615         (WebKit::CoordinatedLayerTreeHost::pauseRendering):
616         (WebKit::CoordinatedLayerTreeHost::resumeRendering):
617
618 2015-11-18  Alex Christensen  <achristensen@webkit.org>
619
620         Progress towards implementing Downloads with NETWORK_SESSION
621         https://bugs.webkit.org/show_bug.cgi?id=151414
622
623         Reviewed begrudgingly by Brady Eidson.
624
625         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
626         (WebKit::storageSession):
627         (WebKit::NetworkConnectionToWebProcess::startDownload):
628         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
629         * NetworkProcess/NetworkConnectionToWebProcess.h:
630         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
631         * NetworkProcess/NetworkLoad.cpp:
632         (WebKit::NetworkLoad::NetworkLoad):
633         (WebKit::NetworkLoad::didReceiveChallenge):
634         (WebKit::NetworkLoad::didReceiveResponse):
635         (WebKit::NetworkLoad::didReceiveData):
636         * NetworkProcess/NetworkLoad.h:
637         * NetworkProcess/NetworkProcess.cpp:
638         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
639         (WebKit::NetworkProcess::downloadRequest):
640         (WebKit::NetworkProcess::resumeDownload):
641         * NetworkProcess/NetworkProcess.h:
642         * NetworkProcess/NetworkProcess.messages.in:
643         * NetworkProcess/NetworkResourceLoader.cpp:
644         (WebKit::NetworkResourceLoader::cleanup):
645         (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
646         (WebKit::NetworkResourceLoader::abort):
647         * NetworkProcess/NetworkResourceLoader.h:
648         * NetworkProcess/NetworkSession.h:
649         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
650         (toNSURLSessionResponseDisposition):
651         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
652         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
653         (-[NetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
654         (-[NetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
655         (-[NetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
656         (-[NetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
657         * Shared/Authentication/AuthenticationManager.cpp:
658         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
659         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
660         (WebKit::AuthenticationManager::cancelSingleChallenge):
661         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
662         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
663         * Shared/Downloads/Download.h:
664         * Shared/Downloads/DownloadManager.cpp:
665         (WebKit::DownloadManager::DownloadManager):
666         (WebKit::DownloadManager::startDownload):
667         (WebKit::DownloadManager::convertHandleToDownload):
668         (WebKit::DownloadManager::resumeDownload):
669         (WebKit::DownloadManager::cancelDownload):
670         (WebKit::DownloadManager::downloadFinished):
671         (WebKit::DownloadManager::didCreateDownload):
672         * Shared/Downloads/DownloadManager.h:
673         (WebKit::DownloadManager::isDownloading):
674         (WebKit::DownloadManager::activeDownloadCount):
675         * Shared/Downloads/mac/DownloadMac.mm:
676         (WebKit::Download::start):
677         (WebKit::Download::startWithHandle):
678         (WebKit::Download::resume):
679         * UIProcess/WebProcessPool.cpp:
680         (WebKit::WebProcessPool::download):
681         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
682         (WebKit::WebFrameLoaderClient::canCachePage):
683         (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
684         (WebKit::WebFrameLoaderClient::createFrame):
685         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
686         * WebProcess/WebPage/WebFrame.cpp:
687         (WebKit::WebFrame::startDownload):
688         (WebKit::WebFrame::convertMainResourceLoadToDownload):
689         (WebKit::WebFrame::source):
690         * WebProcess/WebPage/WebFrame.h:
691         * WebProcess/WebProcess.cpp:
692         (WebKit::WebProcess::downloadRequest):
693         (WebKit::WebProcess::resumeDownload):
694         (WebKit::WebProcess::releasePageCache):
695         (WebKit::WebProcess::fetchWebsiteData):
696         * WebProcess/WebProcess.h:
697         * WebProcess/WebProcess.messages.in:
698
699 2015-11-18  Chris Dumez  <cdumez@apple.com>
700
701         Clean up / optimize NetworkCacheSubresourcesEntry
702         https://bugs.webkit.org/show_bug.cgi?id=151405
703
704         Reviewed by Antti Koivisto.
705
706         Clean up / optimize NetworkCacheSubresourcesEntry:
707         - Remove m_sourceStorageRecord data member
708         - Avoid copying the Key when constructing it
709
710         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
711         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
712         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
713         (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
714         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
715
716 2015-11-18  Jer Noble  <jer.noble@apple.com>
717
718         Expose WebCore's AudioPlaybackRequiresUserGesture setting to WebKit & WebKit2
719         https://bugs.webkit.org/show_bug.cgi?id=151274
720
721         Reviewed by Anders Carlsson.
722
723         Add a new, private, WKWebViewConfiguration property, _requiresUserActionForAudioPlayback,
724         and use that configuration property to set WebCore's AudioPlaybackRequiresUserGesture setting
725         during page creation.
726
727         * Shared/WebPreferencesDefinitions.h:
728         * UIProcess/API/C/WKPreferences.cpp:
729         (WKPreferencesSetAudioPlaybackRequiresUserGesture): Add legacy C API for setting this new WK preference.
730         (WKPreferencesGetAudioPlaybackRequiresUserGesture): Ditto.
731         * UIProcess/API/C/WKPreferencesRefPrivate.h:
732         * UIProcess/API/Cocoa/WKWebView.mm:
733         (-[WKWebView initWithFrame:configuration:]): Set the page configuration value from preferences.
734         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
735         (-[WKWebViewConfiguration init]): Default the value of the new configuration property to YES for iOS.
736         (-[WKWebViewConfiguration copyWithZone:]): Copy the value across.
737         (-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]): Simple getter.
738         (-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]): Simple setter.
739         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
740         * WebProcess/WebPage/WebPage.cpp:
741         (WebKit::WebPage::updatePreferences): Set WebCore's audioPlaybackRequiresUserGesture Setting.
742
743 2015-11-18  Daniel Bates  <dabates@apple.com>
744
745         [iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile()
746         https://bugs.webkit.org/show_bug.cgi?id=151392
747         <rdar://problem/23595341>
748
749         Reviewed by Alexey Proskuryakov.
750
751         Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves
752         the path to the user temporary directory without a trailing slash in the iOS simulator.
753
754         * Shared/mac/SandboxExtensionMac.mm:
755         (WebKit::SandboxExtension::createHandleForTemporaryFile): Add a path separator (/) between the directory path and filename.
756
757 2015-11-17  Geoffrey Garen  <ggaren@apple.com>
758
759         A window with a hung tab waits 5s before closing
760         https://bugs.webkit.org/show_bug.cgi?id=151319
761
762         Reviewed by Anders Carlsson.
763
764         I manually tested that I did not break unload events upon window close
765         by running run-webkit-httpd and invoking a 1x1 image load of
766         http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
767         handler.
768
769         * UIProcess/WebPageProxy.cpp:
770         (WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
771         close without waiting for a response.
772
773         * UIProcess/WebProcessProxy.h:
774         (WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.
775
776 2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
777
778         [GTK] Web Process crashes on reparenting a WebView with AC mode on
779         https://bugs.webkit.org/show_bug.cgi?id=151139
780
781         Reviewed by Mario Sanchez Prada.
782
783         When the web view is reparented, the widget is first unrealized,
784         and then realized again when added to the new parent. In the
785         second realize, the old redirected XComposite window is destroyed
786         and a new one is created, but the web process is still using the
787         old redirected window ID. As soon as the redirected window is
788         destroyed and the web process tries to use the window ID, it
789         crashes due to a BadDrawable X error. We have to notify the web
790         process as soon as the web view is unrealized to stop using the
791         current window ID and exit accelerated compositing mode until a
792         new window ID is given. This notification needs to be synchronous,
793         because the window can be destroyed in the UI process before the
794         message is received in the web process.
795
796         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
797         (webkitWebViewBaseRealize): Add an assert to ensure we never have
798         a redirected window when the view is realized. Also check drawing
799         area is not nullptr, since it can be destroyed at any time if the
800         web process crashes.
801         (webkitWebViewBaseUnrealize): Call
802         DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
803         and destroy the redirected XComposite window.
804         * UIProcess/DrawingAreaProxyImpl.cpp:
805         (WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing):
806         Send DestroyNativeSurfaceHandleForCompositing synchronous messsage
807         to the web process.
808         * UIProcess/DrawingAreaProxyImpl.h:
809         * WebProcess/WebPage/DrawingArea.h:
810         * WebProcess/WebPage/DrawingArea.messages.in: Add
811         DestroyNativeSurfaceHandleForCompositing message.
812         * WebProcess/WebPage/DrawingAreaImpl.cpp:
813         (WebKit::DrawingAreaImpl::destroyNativeSurfaceHandleForCompositing):
814         Set the native surface handler for compositing to 0 to reset it.
815         * WebProcess/WebPage/DrawingAreaImpl.h:
816         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
817         (WebKit::LayerTreeHostGtk::makeContextCurrent): Return false
818         early always when layer tree context ID is 0, even if we already
819         have a context.
820         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
821         Cancel any pending layer flush when setting a new handler.
822
823 2015-11-16  Alex Christensen  <achristensen@webkit.org>
824
825         Fix CMake build and make PluginProcess executable
826         https://bugs.webkit.org/show_bug.cgi?id=151332
827
828         Reviewed by Tim Horton.
829
830         * PlatformMac.cmake:
831
832 2015-11-16  Tim Horton  <timothy_horton@apple.com>
833
834         Multi-WKWebView find completes after the first view
835         https://bugs.webkit.org/show_bug.cgi?id=151325
836
837         Reviewed by Anders Carlsson.
838
839         * UIProcess/mac/WKTextFinderClient.mm:
840         (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
841         Update progress before calling the completion handler; NSTextFinder assumes
842         that if the progress doesn't change, the search is complete.
843
844 2015-11-16  Ryuan Choi  <ryuan.choi@navercorp.com>
845
846         WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function after it's been moved from
847         https://bugs.webkit.org/show_bug.cgi?id=151248
848
849         Reviewed by Darin Adler.
850
851         Like r188287, calling an empty std::function results in a std::bad_function_call
852         exception being thrown when sendSync is failed.
853
854         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
855         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
856
857 2015-11-16  Beth Dakin  <bdakin@apple.com>
858
859         Add SPI for handling inline link navigation for peek/pop
860         https://bugs.webkit.org/show_bug.cgi?id=151270
861         -and corresponding-
862         rdar://problem/22233739
863
864         Reviewed by Darin Adler.
865
866         This patch adds three new SPI methods. If a client wants to disable previews 
867         entirely for the given element, they should return NO in 
868         shouldPreviewElement:. Returning NO in shouldPreviewElement will prevent the 
869         other methods from being invoked. The client can provide a custom preview by 
870         returning their own UIViewController from 
871         previewingViewControllerForElement:defaultActions:. Returning nil will result 
872         in the default preview behavior for that element. This will allow clients to 
873         implement this method to handle http link navigation inline, but still opt 
874         into UIKit’s built-in DataDetectors behaviors for DD links once we start 
875         supporting DD links in WK2. 
876         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
877
878         Added linkURL to _WKElementInfo. linkURL will be nil for elements that are 
879         not links.
880         * UIProcess/API/Cocoa/_WKElementInfo.h:
881         * UIProcess/API/Cocoa/_WKElementInfo.mm:
882         (-[_WKElementInfo copyWithZone:]):
883         (-[_WKElementInfo linkURL]):
884         * UIProcess/API/Cocoa/_WKElementInfoInternal.h: Added.
885
886         _WKPreviewingElementInfo inherits from _WKElementInfo. Added a constructor.
887         * UIProcess/API/Cocoa/_WKPreviewElementInfo.h: Added.
888         * UIProcess/API/Cocoa/_WKPreviewElementInfo.mm: Added.
889         (-[_WKPreviewElementInfo _initWithLinkURL:]):
890         * UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h: Added.
891
892         Invoke shouldPreviewElement:.
893         * UIProcess/ios/WKContentViewInteraction.mm:
894         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
895
896         Invoke previewingViewControllerForElement: for all potentially preview-able 
897         elements that have a default implementations, which will be limited to links 
898         at this time.
899         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
900
901         Invoke commitPreviewingViewController:
902         (-[WKContentView _previewItemController:commitPreview:]):
903         * WebKit2.xcodeproj/project.pbxproj:
904
905 2015-11-16  Anders Carlsson  <andersca@apple.com>
906
907         Add identifier strings for a bunch of context menu items
908         https://bugs.webkit.org/show_bug.cgi?id=151272
909
910         Reviewed by Dan Bernstein.
911
912         * UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
913         * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
914         * UIProcess/mac/WebContextMenuProxyMac.mm:
915         (WebKit::menuItemIdentifier):
916         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
917         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
918         * WebKit2.xcodeproj/project.pbxproj:
919
920 2015-11-16  Simon Fraser  <simon.fraser@apple.com>
921
922         Sort the Xcode project files.
923
924         * WebKit2.xcodeproj/project.pbxproj:
925
926 2015-11-13  Commit Queue  <commit-queue@webkit.org>
927
928         Unreviewed, rolling out r192445, r192451, and r192452.
929         https://bugs.webkit.org/show_bug.cgi?id=151291
930
931         Broke Mavericks build (and thus EWS) (Requested by ap on
932         #webkit).
933
934         Reverted changesets:
935
936         "Add identifier strings for a bunch of context menu items"
937         https://bugs.webkit.org/show_bug.cgi?id=151272
938         http://trac.webkit.org/changeset/192445
939
940         "Try to fix the 32-bit build"
941         http://trac.webkit.org/changeset/192451
942
943         "Try to fix the 32-bit build"
944         http://trac.webkit.org/changeset/192452
945
946 2015-11-13  Timothy Horton  <timothy_horton@apple.com>
947
948         Try to fix the 32-bit build
949
950         * UIProcess/mac/WebContextMenuProxyMac.mm:
951         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
952
953 2015-11-13  Timothy Horton  <timothy_horton@apple.com>
954
955         Try to fix the 32-bit build
956
957         * UIProcess/mac/WebContextMenuProxyMac.mm:
958         (WebKit::menuItemIdentifier):
959
960 2015-11-13  Wenson Hsieh  <wenson_hsieh@apple.com>
961
962         WK2 iOS interaction tests in LayoutTests/fast/events/ios are flaky
963         https://bugs.webkit.org/show_bug.cgi?id=151199
964         <rdar://problem/23518459>
965
966         Reviewed by Tim Horton.
967
968         While transforming touch positions from document to global coordinates, HIDEventGenerator
969         sometimes uses an old scale of the webview in computing the transformed position. This happens
970         in spite of how we force the UI script to run after the UI process receives a layer tree commit
971         because we invoke the callback before calling WebPageProxy::didCommitLayerTree, which is where
972         we actually use the layer transaction information to update the WKWebView.
973
974         To fix this, we run the drawing-ensured callbacks after committing the layer tree, so the
975         callbacks will have updated information about the web view's scale and dimensions.
976
977         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
978         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
979
980 2015-11-13  Tim Horton  <timothy_horton@apple.com>
981
982         Support printing in WKWebView
983         https://bugs.webkit.org/show_bug.cgi?id=151276
984         <rdar://problem/23525715>
985
986         Reviewed by Beth Dakin.
987
988         * UIProcess/API/Cocoa/WKWebView.mm:
989         (-[WKWebView _printOperationWithPrintInfo:]):
990         (-[WKWebView _printOperationWithPrintInfo:forFrame:]):
991         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
992         Expose SPI similar to what we have on WKView.
993
994 2015-11-13  Joseph Pecoraro  <pecoraro@apple.com>
995
996         Follow-up to r192437. Add availability macros.
997
998         Reviewed by Tim Horton.
999
1000         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1001
1002 2015-11-13  Anders Carlsson  <andersca@apple.com>
1003
1004         Add identifier strings for a bunch of context menu items
1005         https://bugs.webkit.org/show_bug.cgi?id=151272
1006
1007         Reviewed by Dan Bernstein.
1008
1009         * UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
1010         * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
1011         * UIProcess/mac/WebContextMenuProxyMac.mm:
1012         (WebKit::menuItemIdentifier):
1013         (WebKit::WebContextMenuProxyMac::createShareMenuItem):
1014         (WebKit::WebContextMenuProxyMac::createContextMenuItem):
1015         * WebKit2.xcodeproj/project.pbxproj:
1016
1017 2015-11-13  Joseph Pecoraro  <pecoraro@apple.com>
1018
1019         Web Inspector: Provide a way to override the WKWebView remote inspector name
1020         https://bugs.webkit.org/show_bug.cgi?id=151075
1021
1022         Reviewed by Tim Horton.
1023
1024         * Shared/WebPageCreationParameters.cpp:
1025         (WebKit::WebPageCreationParameters::encode):
1026         (WebKit::WebPageCreationParameters::decode):
1027         * Shared/WebPageCreationParameters.h:
1028         * UIProcess/API/Cocoa/WKWebView.mm:
1029         (-[WKWebView _remoteInspectionNameOverride]):
1030         (-[WKWebView _setRemoteInspectionNameOverride:]):
1031         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1032         * UIProcess/WebPageProxy.cpp:
1033         (WebKit::WebPageProxy::setRemoteInspectionNameOverride):
1034         (WebKit::WebPageProxy::creationParameters):
1035         * UIProcess/WebPageProxy.h:
1036         (WebKit::WebPageProxy::remoteInspectionNameOverride):
1037         * WebProcess/WebPage/WebPage.cpp:
1038         (WebKit::m_shouldDispatchFakeMouseMoveEvents):
1039         (WebKit::WebPage::setRemoteInspectionNameOverride):
1040         * WebProcess/WebPage/WebPage.h:
1041         * WebProcess/WebPage/WebPage.messages.in:
1042
1043 2015-11-13  Tim Horton  <timothy_horton@apple.com>
1044
1045         Hardware keyboard spacebar scrolls too far on iOS
1046         https://bugs.webkit.org/show_bug.cgi?id=151227
1047         <rdar://problem/23500681>
1048
1049         Reviewed by Simon Fraser.
1050
1051         There were two bugs conspiring here to make spacebar scrolling very wrong on iOS:
1052
1053         1) Incoming key events were being handled twice
1054             - fix this by only propagating the event to super if we don't
1055             end up handling the event ourselves
1056
1057         2) _scrollByOffset was not converting the offset delta out of content coordinates
1058             - fix this by doing the relevant conversion and renaming the function
1059             to make it more clear exactly what it does
1060
1061         * UIProcess/API/Cocoa/WKWebView.mm:
1062         (-[WKWebView _scrollByContentOffset:]):
1063         (-[WKWebView _scrollByOffset:]): Deleted.
1064         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1065         Rename to _scrollByContentOffset to make it clear that this is
1066         in content coordinates, and do the conversion from content coordinates
1067         (apply the scale) so that we scroll by the right amount.
1068
1069         * UIProcess/ios/PageClientImplIOS.mm:
1070         (WebKit::PageClientImpl::doneWithKeyEvent):
1071         Pass whether the event was handled through to WKContentView.
1072
1073         * UIProcess/ios/WKContentViewInteraction.h:
1074         * UIProcess/ios/WKContentViewInteraction.mm:
1075         (-[WKWebEvent dealloc]):
1076         Add WKWebEvent, which is a WebEvent and retains a reference to the UIEvent
1077         from which it came.
1078
1079         (-[WKContentView _handleKeyUIEvent:]):
1080         Only pass the event to super immediately if we don't try to handle it.
1081         We'll re-send it to super asynchronously if we decide not to handle it.
1082
1083         (-[WKContentView handleKeyEvent:]):
1084         If we're in the middle of resending an event we didn't handle the first
1085         time, just ignore it.
1086
1087         Make a WKWebEvent and store the UIEvent on it.
1088
1089         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
1090         If the event wasn't handled, and is one of our special events with a
1091         wrapped UIEvent, resend it to super. We'll ignore it as noted above.
1092
1093         (-[WKContentView _interpretKeyEvent:isCharEvent:]):
1094         Factor out unobscured content rect retrieval.
1095         Make use of Scrollbar::pageStep to match the Mac behavior of not
1096         scrolling quite a whole page when scrolling with the spacebar.
1097
1098 2015-11-12  Ryuan Choi  <ryuan.choi@navercorp.com>
1099
1100         [EFL] Fix wrong test case for window_create since r192196
1101         https://bugs.webkit.org/show_bug.cgi?id=151247
1102
1103         Reviewed by Gyuyoung Kim.
1104
1105         r192196 introduces new test cases for window_create but there are typos which hide bug
1106         This patch fixes typos and split ewk_view_create_window test case.
1107
1108         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1109         (TEST_F):
1110
1111 2015-11-12  Anders Carlsson  <andersca@apple.com>
1112
1113         Add a context menu delegate method that takes a userInfo parameter
1114         https://bugs.webkit.org/show_bug.cgi?id=151232
1115
1116         Reviewed by Tim Horton.
1117
1118         * UIProcess/API/APIContextMenuClient.h:
1119         (API::ContextMenuClient::menuFromProposedMenu):
1120         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1121         * UIProcess/Cocoa/UIDelegate.h:
1122         * UIProcess/Cocoa/UIDelegate.mm:
1123         (WebKit::UIDelegate::setDelegate):
1124         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1125         * UIProcess/mac/WebContextMenuProxyMac.mm:
1126         (WebKit::WebContextMenuProxyMac::showContextMenu):
1127
1128 2015-11-12  Anders Carlsson  <andersca@apple.com>
1129
1130         ContextMenuAction and WebMenuItemTag shouldn't have to be in sync
1131         https://bugs.webkit.org/show_bug.cgi?id=151226
1132
1133         Reviewed by Tim Horton.
1134
1135         * Shared/API/c/WKSharedAPICast.h:
1136         (WebKit::toAPI):
1137         (WebKit::toImpl):
1138         Remove ContextMenuItemTagOpenLinkInThisWindow.
1139
1140 2015-11-12  Anders Carlsson  <andersca@apple.com>
1141
1142         ContextMenuController::contextMenuItemSelected only needs the action and title, not the full item
1143         https://bugs.webkit.org/show_bug.cgi?id=151217
1144
1145         Reviewed by Joseph Pecoraro.
1146
1147         * WebProcess/WebPage/WebContextMenu.cpp:
1148         (WebKit::WebContextMenu::itemSelected):
1149
1150 2015-11-12  Anders Carlsson  <andersca@apple.com>
1151
1152         Remove an unused function
1153         https://bugs.webkit.org/show_bug.cgi?id=151215
1154
1155         Reviewed by Joseph Pecoraro.
1156
1157         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1158         (WebKit::WebContextMenuClient::contextMenuItemSelected): Deleted.
1159         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1160
1161 2015-11-11  Anders Carlsson  <andersca@apple.com>
1162
1163         Enable cross-platform context menus by default
1164         https://bugs.webkit.org/show_bug.cgi?id=151173
1165
1166         Reviewed by Tim Horton.
1167
1168         * Shared/WebContextMenuItemData.cpp:
1169         (WebKit::WebContextMenuItemData::WebContextMenuItemData): Deleted.
1170         * WebProcess/WebPage/WebContextMenu.cpp:
1171         (WebKit::WebContextMenu::menuItemsWithUserData): Deleted.
1172
1173 2015-11-12  Dan Bernstein  <mitz@apple.com>
1174
1175         Fixed the build.
1176
1177         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1178         (PluginServiceInitializer):
1179
1180 2015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
1181
1182         Remove ENABLE(SATURATED_LAYOUT_ARITHMETIC) guards
1183         https://bugs.webkit.org/show_bug.cgi?id=150972
1184
1185         Reviewed by Darin Adler.
1186
1187         * Configurations/FeatureDefines.xcconfig:
1188
1189 2015-11-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1190
1191         Print result of memory sampler more readable
1192         https://bugs.webkit.org/show_bug.cgi?id=151085
1193
1194         Reviewed by Darin Adler.
1195
1196         Current memory sampler prints result of memory sample horizontally. It makes us hard to read
1197         the result at a glance. To improve readability of the memory sampler result, this patch prints it
1198         vertically.
1199
1200         * Shared/WebMemorySampler.cpp:
1201         (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
1202         (WebKit::WebMemorySampler::writeHeaders):
1203
1204 2015-11-11  Geoffrey Garen  <ggaren@apple.com>
1205
1206         Rename handle.*Event to dispatch.*Event
1207         https://bugs.webkit.org/show_bug.cgi?id=151168
1208
1209         Reviewed by Chris Dumez.
1210
1211         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1212         (WebKit::WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
1213         (WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
1214         (WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents): Deleted.
1215         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1216
1217 2015-11-11  Anders Carlsson  <andersca@apple.com>
1218
1219         Fix builds.
1220
1221         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
1222         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1223         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
1224         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1225
1226 2015-11-11  Anders Carlsson  <andersca@apple.com>
1227
1228         REGRESSION (r191407): Context menus are missing Services
1229         https://bugs.webkit.org/show_bug.cgi?id=151167
1230         rdar://problem/23500769
1231
1232         Reviewed by Tim Horton.
1233
1234         * UIProcess/mac/WebContextMenuProxyMac.mm:
1235         (WebKit::WebContextMenuProxyMac::showContextMenu):
1236         Use contentsToRootView to better indicate which coordinate system we're using.
1237
1238         * WebProcess/WebPage/WebContextMenu.cpp:
1239         (WebKit::WebContextMenu::show):
1240         Use +[NSMenu popUpContextMenu:withEvent:forView:] so we'll get service menus where applicable.
1241
1242 2015-11-11  Anders Carlsson  <andersca@apple.com>
1243
1244         Remove more dead context menu code
1245         https://bugs.webkit.org/show_bug.cgi?id=151163
1246
1247         Reviewed by Tim Horton.
1248
1249         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1250         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1251         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1252
1253 2015-11-11  Tim Horton  <timothy_horton@apple.com>
1254
1255         Remove an unnecessary zero-delay timer from swipe snapshot removal
1256         https://bugs.webkit.org/show_bug.cgi?id=151161
1257
1258         Reviewed by Anders Carlsson.
1259
1260         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1261         (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
1262         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector): Deleted.
1263         (WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired): Deleted.
1264         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1265         There's no discernable reason for this zero-delay timer, and it dates back
1266         to the original swipe patch with no explanation given. My only theory
1267         is that I was depending on spinning the runloop to ensure we've painted,
1268         but we have other mechanisms to do that now, on both platforms.
1269
1270         This also was a surprising waste of time in some cases where the web
1271         process was very slow.
1272
1273 2015-11-11  Chris Dumez  <cdumez@apple.com>
1274
1275         Unreviewed attempt to fix the Mac CMake build.
1276
1277         * CMakeLists.txt:
1278
1279 2015-11-11  Chris Dumez  <cdumez@apple.com>
1280
1281         [WK2] Add initial support for speculative resource revalidation to the WebKit disk cache
1282         https://bugs.webkit.org/show_bug.cgi?id=150856
1283         <rdar://problem/23092196>
1284
1285         Reviewed by Antti Koivisto.
1286
1287         Add initial support for speculative resource revalidation to the WebKit
1288         disk cache. When a main resource is requested by WebCore, we look up its
1289         list of subresources in the cache and speculatively warm them up before
1290         WebCore asks for them, in order to improve page load time. In this
1291         context, warming it up means:
1292         1. If the cached resource is usable (has not expired), keep it around
1293            in a memory for a limited amount of time (10 seconds).
1294         2. If the resource has expired, do a speculative revalidation of the
1295            resource and then keep it in memory for a while as well (10 seconds).
1296
1297         The feature is currently behind a compile-time flag that is only enabled
1298         on COCOA. Also, it is currently disabled at run-time until it is mature
1299         enough.
1300
1301         Initial results show that speculative revalidation gives a ~5%
1302         progression on throttled warm PLT on iPhone 5s.
1303
1304         * NetworkProcess/NetworkResourceLoader.cpp:
1305         (WebKit::NetworkResourceLoader::start):
1306         * NetworkProcess/cache/NetworkCache.cpp:
1307         (WebKit::NetworkCache::Cache::retrieve):
1308         (WebKit::NetworkCache::Cache::store):
1309         (WebKit::NetworkCache::Cache::update):
1310         * NetworkProcess/cache/NetworkCache.h:
1311         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1312         (WebKit::NetworkCache::Entry::Entry):
1313         * NetworkProcess/cache/NetworkCacheEntry.h:
1314         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Added.
1315         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
1316         (WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
1317         (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
1318         (WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
1319         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
1320         (WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
1321         (WebKit::NetworkCache::SpeculativeLoad::didComplete):
1322         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Added.
1323         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1324         (WebKit::NetworkCache::constructRevalidationRequest):
1325         (WebKit::NetworkCache::responseNeedsRevalidation):
1326         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
1327         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry):
1328         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::lifetimeTimerFired):
1329         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
1330         (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
1331         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
1332         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
1333         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
1334         (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests):
1335         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
1336         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
1337         (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
1338         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource): Deleted.
1339         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord): Deleted.
1340         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
1341         * WebKit2.xcodeproj/project.pbxproj:
1342
1343 2015-11-11  Anders Carlsson  <andersca@apple.com>
1344
1345         _WKRemoteObjectInterface should handle specifying allowed classes for reply block arguments
1346         https://bugs.webkit.org/show_bug.cgi?id=151144
1347
1348         Reviewed by Tim Horton.
1349
1350         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
1351         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1352         (classesForSelectorArgument):
1353         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:ofReply:]):
1354         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]):
1355         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
1356         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
1357
1358 2015-11-11  Tim Horton  <timothy_horton@apple.com>
1359
1360         Add some font-related preferences to the modern API
1361         https://bugs.webkit.org/show_bug.cgi?id=151138
1362         <rdar://problem/23492636>
1363
1364         Reviewed by Anders Carlsson.
1365
1366         * UIProcess/API/Cocoa/WKPreferences.mm:
1367         (-[WKPreferences _defaultFontSize]):
1368         (-[WKPreferences _setDefaultFontSize:]):
1369         (-[WKPreferences _defaultFixedPitchFontSize]):
1370         (-[WKPreferences _setDefaultFixedPitchFontSize:]):
1371         (-[WKPreferences _fixedPitchFontFamily]):
1372         (-[WKPreferences _setFixedPitchFontFamily:]):
1373         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1374
1375 2015-11-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1376
1377         [GTK] Runtime critical warnings when closing a page containing windowed plugins
1378         https://bugs.webkit.org/show_bug.cgi?id=151132
1379
1380         Reviewed by Martin Robinson.
1381
1382         This is because our plugin widget, that is a GtkPlug (derived from
1383         GtkWindow), can receive the delete-event signal before
1384         NetscapePlugin::platformDestroy is called. The delete-event
1385         signal, by default, destroys the window when the signal is not
1386         handled. So, after the delete-event the GtkPlug is destroyed, but
1387         our pointer hasn't been reset. We can handle the delete-event
1388         using gtk_widget_hide_on_delete as callback, so that the plugin
1389         widget is hidden instead of destroyed.
1390
1391         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1392         (WebKit::NetscapePlugin::platformPostInitializeWindowed):
1393
1394 2015-11-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1395
1396         REGRESSION(r191856): [GTK] SOCK_SEQPACKET no longer used after r191856
1397         https://bugs.webkit.org/show_bug.cgi?id=151129
1398
1399         Reviewed by Martin Robinson.
1400
1401         r191856 unconditionally disabled SOCK_SEQPACKET for GTK port.
1402
1403         * Platform/IPC/unix/ConnectionUnix.cpp: Use always SOCK_SEQPACKET
1404         when available.
1405
1406 2015-11-10  Alex Christensen  <achristensen@webkit.org>
1407
1408         Implement authentication challenge handling when using NETWORK_SESSION
1409         https://bugs.webkit.org/show_bug.cgi?id=150968
1410
1411         Reviewed by Antti Koivisto.
1412
1413         * NetworkProcess/NetworkLoad.cpp:
1414         (WebKit::NetworkLoad::didReceiveChallenge):
1415         Copy functionality from NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync (which is used when we don't use NETWORK_SESSION)
1416         because there is no canAuthenticateAgainstProtectionSpace delegate callback when using NSURLSession, according to
1417         https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/AuthenticationChallenges.html
1418         Instead, all authentication challenge callbacks go to URLSession:task:didReceiveChallenge:completionHandler:
1419         because we do not implement URLSession:didReceiveChallenge:completionHandler:
1420         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1421         (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1422         (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1423         (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1424         Make a block copy of the completion handlers so we can copy the std::functions that wrap them into HashMaps and call them later,
1425         in this case we call the completion handler after the UIProcess gives us credentials for an authentication challenge.
1426         * Shared/Authentication/AuthenticationManager.cpp:
1427         (WebKit::AuthenticationManager::AuthenticationManager):
1428         (WebKit::AuthenticationManager::addChallengeToChallengeMap):
1429         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
1430         (WebKit::AuthenticationManager::coalesceChallengesMatching):
1431         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1432         Fix an existing bug that caused multiple calls to addChallengeToChallengeMap for one challenge.  This caused too many calls to 
1433         the AuthenticationClient methods, which did not cause a problem because they were not one-time-use block copies of completion handlers before.
1434         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
1435         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
1436         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
1437         (WebKit::AuthenticationManager::cancelChallenge):
1438         (WebKit::AuthenticationManager::cancelSingleChallenge):
1439         (WebKit::AuthenticationManager::performDefaultHandling):
1440         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
1441         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
1442         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
1443         Call completion handlers which we stored in a HashMap before doing IPC if we are using NETWORK_SESSION,
1444         which has completion handlers instead of continueSomething client calls.
1445         * Shared/Authentication/AuthenticationManager.h:
1446         (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
1447         * Shared/Downloads/Download.cpp:
1448         (WebKit::Download::didReceiveAuthenticationChallenge):
1449         (WebKit::Download::didReceiveResponse):
1450         * Shared/Downloads/DownloadAuthenticationClient.cpp:
1451         (WebKit::DownloadAuthenticationClient::receivedChallengeRejection):
1452         * Shared/Downloads/DownloadAuthenticationClient.h:
1453         Add ifdefs for code related to downloading I will implement later.
1454
1455 2015-11-10  Simon Fraser  <simon.fraser@apple.com>
1456
1457         Use different pixel formats for displays that support them
1458         https://bugs.webkit.org/show_bug.cgi?id=151122
1459         rdar://problem/22846841
1460
1461         Reviewed by Tim Horton.
1462         
1463         New the new IOSurface formats when appropriate for the properties of the
1464         display.
1465
1466         * Shared/mac/RemoteLayerBackingStore.mm:
1467         (WebKit::bufferFormat):
1468         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
1469
1470 2015-11-10  Tim Horton  <timothy_horton@apple.com>
1471
1472         Adopt formal protocols for CA delegates
1473         https://bugs.webkit.org/show_bug.cgi?id=151121
1474         <rdar://problem/6739193>
1475
1476         Reviewed by Anders Carlsson.
1477
1478         * UIProcess/API/Cocoa/WKWebView.mm:
1479         * UIProcess/Cocoa/WebViewImpl.mm:
1480         * UIProcess/mac/WKTextFinderClient.mm:
1481         * UIProcess/mac/WebPageProxyMac.mm:
1482         * WebKit2.xcodeproj/project.pbxproj:
1483         * WebProcess/cocoa/WebProcessCocoa.mm:
1484         Adapt to the split out SPI headers.
1485
1486         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1487         Conform!
1488
1489 2015-11-10  Dan Bernstein  <mitz@apple.com>
1490
1491         Fixed the build.
1492
1493         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
1494         (DatabaseServiceInitializer):
1495         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1496         (NetworkServiceInitializer):
1497         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1498         (WebContentServiceInitializer):
1499
1500 2015-11-10  Chris Dumez  <cdumez@apple.com>
1501
1502         [WK2][NetworkCache] Rename SpeculativeLoader to SpeculativeLoadManager
1503         https://bugs.webkit.org/show_bug.cgi?id=151110
1504
1505         Reviewed by Alex Christensen.
1506
1507         Rename SpeculativeLoader to SpeculativeLoadManager for clarity, as it
1508         manages all speculative loads.
1509
1510         * NetworkProcess/cache/NetworkCache.cpp:
1511         (WebKit::NetworkCache::Cache::initialize):
1512         (WebKit::NetworkCache::Cache::retrieve):
1513         * NetworkProcess/cache/NetworkCache.h:
1514         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp.
1515         (WebKit::NetworkCache::subresourcesType):
1516         (WebKit::NetworkCache::makeSubresourcesKey):
1517         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
1518         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
1519         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
1520         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markAsCompleted):
1521         (WebKit::NetworkCache::SpeculativeLoadManager::SpeculativeLoadManager):
1522         (WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):
1523         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
1524         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.h.
1525         * WebKit2.xcodeproj/project.pbxproj:
1526
1527 2015-11-10  Tim Horton  <timothy_horton@apple.com>
1528
1529         Add WKWebViewConfiguration SPI for a variety of different ex-preferences
1530         https://bugs.webkit.org/show_bug.cgi?id=151070
1531         <rdar://problem/23020454>
1532
1533         Reviewed by Anders Carlsson.
1534
1535         * UIProcess/API/Cocoa/WKWebView.mm:
1536         (-[WKWebView initWithFrame:configuration:]):
1537         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1538         (-[WKWebViewConfiguration init]):
1539         (-[WKWebViewConfiguration copyWithZone:]):
1540         (-[WKWebViewConfiguration _setRespectsImageOrientation:]):
1541         (-[WKWebViewConfiguration _respectsImageOrientation]):
1542         (-[WKWebViewConfiguration _setPrintsBackgrounds:]):
1543         (-[WKWebViewConfiguration _printsBackgrounds]):
1544         (-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):
1545         (-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
1546         (-[WKWebViewConfiguration _setAllowsJavaScriptMarkup:]):
1547         (-[WKWebViewConfiguration _allowsJavaScriptMarkup]):
1548         (-[WKWebViewConfiguration _setConvertsPositionStyleOnCopy:]):
1549         (-[WKWebViewConfiguration _convertsPositionStyleOnCopy]):
1550         (-[WKWebViewConfiguration _setAllowsMetaRefresh:]):
1551         (-[WKWebViewConfiguration _allowsMetaRefresh]):
1552         (-[WKWebViewConfiguration _setShowsURLsInToolTips:]):
1553         (-[WKWebViewConfiguration _showsURLsInToolTips]):
1554         (-[WKWebViewConfiguration _setServiceControlsEnabled:]):
1555         (-[WKWebViewConfiguration _serviceControlsEnabled]):
1556         (-[WKWebViewConfiguration _setImageControlsEnabled:]):
1557         (-[WKWebViewConfiguration _imageControlsEnabled]):
1558         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1559         Plumb some configuration SPI for various clients.
1560
1561 2015-11-10  Chris Dumez  <cdumez@apple.com>
1562
1563         [WK2][iOS] Update WebContent sandbox profile to allow loading injected bundles again
1564         https://bugs.webkit.org/show_bug.cgi?id=151102
1565         <rdar://problem/23442311>
1566
1567         Reviewed by Dan Bernstein.
1568
1569         Update WebContent sandbox profile to allow loading injected bundles again.
1570
1571         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1572
1573 2015-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1574
1575         [UNIX] Environment variable should take precedence over directories in plugin search path
1576         https://bugs.webkit.org/show_bug.cgi?id=151096
1577
1578         Reviewed by Martin Robinson.
1579
1580         Otherwise you can't override the directories using the env vars
1581         for plugins already installed.
1582
1583         * Shared/Plugins/unix/PluginSearchPath.cpp:
1584         (WebKit::pluginsDirectories):
1585
1586 2015-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1587
1588         [GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
1589         https://bugs.webkit.org/show_bug.cgi?id=150642
1590
1591         Reviewed by Martin Robinson.
1592
1593         Use CROSS_PLATFORM_CONTEXT_MENUS. Since we can't just use
1594         WebContextMenuItemData, because we need to bind a GtkAction to the
1595         menu items, this patch adds WebContextMenuItemGtk that derives
1596         from WebContextMenuItemData and adds the GtkAction and its own
1597         handling of submenu items. WebKitContextMenu and
1598         WebKitContextMenuItem no longer deal with the widgets (GtkMenu and
1599         GtkMenuItem), that are now created by WebContextMenuProxy when
1600         building the popup menu.
1601         This patch also removes the support for input methods submenu,
1602         since it has been deprecated (and disabled by default) in GTK+ for
1603         long time, it has never actually worked (because the menu items
1604         don't have a GtkAction associated) and it makes the code more
1605         complicated for no benefit.
1606
1607         * PlatformGTK.cmake:
1608         * Shared/gtk/WebContextMenuItemGtk.cpp: Added.
1609         (WebKit::gtkStockIDFromContextMenuAction):
1610         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
1611         (WebKit::WebContextMenuItemGtk::~WebContextMenuItemGtk):
1612         (WebKit::WebContextMenuItemGtk::createGtkActionIfNeeded):
1613         * Shared/gtk/WebContextMenuItemGtk.h: Copied from Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h.
1614         (WebKit::WebContextMenuItemGtk::gtkAction):
1615         (WebKit::WebContextMenuItemGtk::submenuItems):
1616         * UIProcess/API/gtk/WebKitContextMenu.cpp:
1617         (webkitContextMenuPopulate):
1618         (webkitContextMenuCreate): Deleted.
1619         (webkitContextMenuSetParentItem): Deleted.
1620         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
1621         (webkitContextMenuActionGetForContextMenuItem):
1622         * UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h:
1623         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
1624         (webkitContextMenuItemSetSubMenu):
1625         (webkitContextMenuItemCreate):
1626         (webkitContextMenuItemToWebContextMenuItemGtk):
1627         (webkitContextMenuItemToWebContextMenuItemData):
1628         (webkit_context_menu_item_new):
1629         (webkit_context_menu_item_new_from_stock_action):
1630         (webkit_context_menu_item_new_from_stock_action_with_label):
1631         (webkit_context_menu_item_new_with_submenu):
1632         (webkit_context_menu_item_new_separator):
1633         (webkit_context_menu_item_get_action):
1634         (webkit_context_menu_item_get_stock_action):
1635         (webkit_context_menu_item_is_separator): Deleted.
1636         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
1637         * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
1638         * UIProcess/API/gtk/WebKitWebView.cpp:
1639         (webkitWebViewPopulateContextMenu):
1640         (contextMenuDismissed): Deleted.
1641         (webkitWebViewSubmitFormRequest): Deleted.
1642         (webkitWebViewHandleAuthenticationChallenge): Deleted.
1643         (webkitWebViewInsecureContentDetected): Deleted.
1644         (webkitWebViewEmitRunColorChooser): Deleted.
1645         (webkitWebViewRequestInstallMissingMediaPlugins): Deleted.
1646         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1647         (WebKit::contextMenuItemActivatedCallback):
1648         (WebKit::WebContextMenuProxyGtk::append):
1649         (WebKit::WebContextMenuProxyGtk::populate):
1650         (WebKit::WebContextMenuProxyGtk::show):
1651         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1652         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1653         * UIProcess/gtk/WebContextMenuProxyGtk.h:
1654         (WebKit::WebContextMenuProxyGtk::gtkMenu):
1655         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1656
1657 2015-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1658
1659         Unreviewed. Fix GTK+ build after r192184.
1660
1661         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1662         (WebKit::LayerTreeHostGtk::initialize):
1663         (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
1664
1665 2015-11-09  Eric Carlson  <eric.carlson@apple.com>
1666
1667         [Mac] Add a mock AppleTV device for testing
1668         https://bugs.webkit.org/show_bug.cgi?id=148912
1669         <rdar://problem/22596272>
1670
1671         Reviewed by Tim Horton.
1672
1673         * Shared/WebCoreArgumentCoders.cpp:
1674         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): Update for MediaPlaybackTargetContext changes.
1675         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): Ditto.
1676         * Shared/WebCoreArgumentCoders.h:
1677
1678         * Shared/mac/WebCoreArgumentCodersMac.mm:
1679         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
1680         (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
1681
1682         * UIProcess/WebPageProxy.cpp:
1683         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled): New.
1684         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState): Ditto.
1685         * UIProcess/WebPageProxy.h:
1686
1687         * UIProcess/WebPageProxy.messages.in: Add SetMockMediaPlaybackTargetPickerEnabled and 
1688           SetMockMediaPlaybackTargetPickerState.
1689
1690         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1691         (WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerEnabled): New.
1692         (WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState): Ditto.
1693         * WebProcess/WebCoreSupport/WebChromeClient.h:
1694
1695         * WebProcess/WebPage/WebPage.h: MediaPlaybackTargetContext is a class, not a struct.
1696
1697         * WebProcess/WebPage/WebPage.messages.in: Ditto.
1698
1699         * WebProcess/WebPage/mac/WebPageMac.mm:
1700         (WebKit::WebPage::playbackTargetSelected): Support mock target.
1701
1702 2015-11-09  Ryuan Choi  <ryuan.choi@navercorp.com>
1703
1704         [EFL] Crash while opening child webview with EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
1705         https://bugs.webkit.org/show_bug.cgi?id=145924
1706
1707         Reviewed by Gyuyoung Kim.
1708
1709         There are some crashes when we clicked the link that opens child window
1710         via window.open or <a> tag with _blank target if process model is multiple
1711         secondary.
1712
1713         It's because multiple secondary process model tries to assign new webprocess
1714         if related page is null. In order to keep the child window in same process
1715         with opener, we should pass related page when we create WebPageProxy.
1716
1717         This patch adds ewk_view_configuration object and ewk_view_add_configuration()
1718         to pass related page to WebPageProxy.
1719
1720         * PlatformEfl.cmake:
1721         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1722         (WKViewCreate):
1723         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1724         * UIProcess/API/efl/EWebKit2.h.in:
1725         * UIProcess/API/efl/EwkView.cpp:
1726         (EwkView::createNewPage):
1727         * UIProcess/API/efl/ewk_view_configuration.cpp: Added.
1728         * UIProcess/API/efl/ewk_view_configuration.h: Added.
1729         * UIProcess/API/efl/ewk_view_configuration_private.h: Added.
1730         * UIProcess/API/efl/ewk_view.cpp:
1731         (EWKViewCreate):
1732         (ewk_view_smart_add):
1733         (ewk_view_add_with_configuration): Added to pass configuration.
1734         (ewk_view_add_with_context):
1735         * UIProcess/API/efl/ewk_view.h:
1736         * UIProcess/API/efl/ewk_view_private.h:
1737         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1738         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
1739         (EWK2UnitTest::EWK2UnitTestBase::waitUntilNotNull):
1740         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1741         * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added test cases to test window_create smart method.
1742         (windowCreateCallback):
1743         (TEST_F):
1744         (EWK2ViewTestNewWindowWithMultipleProcesses::EWK2ViewTestNewWindowWithMultipleProcesses):
1745         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
1746         (EWK2WindowFeaturesTest::createDefaultWindow):
1747         (EWK2WindowFeaturesTest::createWindow):
1748         * UIProcess/CoordinatedGraphics/WebView.cpp:
1749         (WebKit::WebView::WebView):
1750         * UIProcess/CoordinatedGraphics/WebView.h:
1751         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1752         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1753         * UIProcess/efl/WebViewEfl.cpp:
1754         (WebKit::WebView::create):
1755         (WebKit::WebViewEfl::WebViewEfl):
1756         * UIProcess/efl/WebViewEfl.h:
1757
1758 2015-11-09  Anders Carlsson  <andersca@apple.com>
1759
1760         Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
1761         https://bugs.webkit.org/show_bug.cgi?id=151069
1762         rdar://problem/23473435
1763
1764         Reviewed by Tim Horton.
1765
1766         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1767         (initializeMethod):
1768
1769 2015-11-09  Anders Carlsson  <andersca@apple.com>
1770
1771         Fix 32-bit build.
1772
1773         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1774         (WebKit::RemoteObjectRegistry::callReplyBlock):
1775
1776 2015-11-09  Anders Carlsson  <andersca@apple.com>
1777
1778         Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
1779         https://bugs.webkit.org/show_bug.cgi?id=151056
1780         rdar://problem/23222609
1781
1782         Reviewed by Tim Horton.
1783
1784         * Platform/spi/Cocoa/NSInvocationSPI.h:
1785         Add NSBlockInvocation declaration.
1786
1787         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
1788         (WebKit::RemoteObjectInvocation::encode):
1789         Encode true if we have a reply ID.
1790
1791         * Shared/API/Cocoa/RemoteObjectRegistry.h:
1792         Add new members.
1793
1794         * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
1795         Add new CallReplyBlock message.
1796
1797         * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1798         (WebKit::RemoteObjectRegistry::sendReplyBlock):
1799         Just send the CallReplyBlock message.
1800
1801         (WebKit::RemoteObjectRegistry::callReplyBlock):
1802         Call through to _WKRemoteObjectRegistry.
1803
1804         * Shared/API/Cocoa/WKRemoteObjectCoder.h:
1805         Pass an optional reply selector.
1806
1807         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1808         (encodeInvocationArguments):
1809         Don't hard-code the first argument index.
1810
1811         (encodeInvocation):
1812         Encode block invocations.
1813
1814         (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:replyToSelector:]):
1815         Initialize _replyToSelector.
1816
1817         (validateClass):
1818         NSBlockInvocation doesn't need to conform to NSSecureCoding.
1819
1820         (decodeInvocationArguments):
1821         Don't hard-code the first argument, take it as a parameter instead.
1822
1823         (decodeInvocation):
1824         Decode NSBlockInvocations (reply block invocations).
1825
1826         (decodeObject):
1827         Check for NSBlockInvocation.
1828
1829         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1830         (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
1831         Return null if we can't find the method.
1832
1833         (-[_WKRemoteObjectInterface _methodSignatureForReplyBlockOfSelector:]):
1834         Look up the reply block signature and return it.
1835
1836         (-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
1837         Look up the allowed reply argument classes and return them.
1838
1839         * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
1840         Add new methods.
1841
1842         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1843         (PendingReply::PendingReply):
1844         Add new object that represents a pending reply.
1845
1846         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1847         If the invocation has a reply block, add a pending reply to our map.
1848
1849         (-[_WKRemoteObjectRegistry _invokeMethod:]):
1850         If the method we're about to invoke has a reply block, construct a special reply block that calls us back with an invocation.
1851         Encode this invocation and send it back across the wire.
1852
1853         (-[_WKRemoteObjectRegistry _callReplyWithID:blockInvocation:]):
1854         Find the pending reply, decode the reply block invocation and call it.
1855
1856         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
1857         Add new methods.
1858
1859 2015-11-09  Tim Horton  <timothy_horton@apple.com>
1860
1861         Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
1862         https://bugs.webkit.org/show_bug.cgi?id=151054
1863         <rdar://problem/22907994>
1864
1865         Reviewed by Simon Fraser.
1866
1867         * Shared/WebPageCreationParameters.cpp:
1868         (WebKit::WebPageCreationParameters::encode): Deleted.
1869         (WebKit::WebPageCreationParameters::decode): Deleted.
1870         * Shared/WebPageCreationParameters.h:
1871         * UIProcess/API/mac/WKView.mm:
1872         (-[WKView setDrawsTransparentBackground:]):
1873         (-[WKView drawsTransparentBackground]):
1874         * UIProcess/Cocoa/WebViewImpl.h:
1875         * UIProcess/Cocoa/WebViewImpl.mm:
1876         (WebKit::WebViewImpl::updateLayer):
1877         (WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
1878         (WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
1879         * UIProcess/WebPageProxy.cpp:
1880         (WebKit::WebPageProxy::WebPageProxy): Deleted.
1881         (WebKit::WebPageProxy::setDrawsTransparentBackground): Deleted.
1882         (WebKit::WebPageProxy::creationParameters): Deleted.
1883         * UIProcess/WebPageProxy.h:
1884         (WebKit::WebPageProxy::drawsTransparentBackground): Deleted.
1885         * UIProcess/mac/WebInspectorProxyMac.mm:
1886         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1887         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1888         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1889         * WebProcess/WebPage/WebPage.cpp:
1890         (WebKit::WebPage::WebPage): Deleted.
1891         (WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
1892         (WebKit::WebPage::setDrawsTransparentBackground): Deleted.
1893         * WebProcess/WebPage/WebPage.h:
1894         (WebKit::WebPage::drawsTransparentBackground): Deleted.
1895         * WebProcess/WebPage/WebPage.messages.in:
1896         Get rid of drawsTransparentBackground. It doesn't seem like there's any observable
1897         difference in a layer-backed world. WKView's (set)drawsTransparentBackground
1898         will just forward to drawsBackground (inverted).
1899
1900         * UIProcess/API/Cocoa/WKWebView.mm:
1901         (-[WKWebView _webProcessIsResponsive]):
1902         Move _webProcessIsResponsive up with the other cross-platform SPI methods, instead
1903         of below all of the platform-specific SPI methods.
1904
1905         (-[WKWebView _drawsBackground]):
1906         (-[WKWebView _setDrawsBackground:]):
1907         Added.
1908
1909         (-[WKWebView _drawsTransparentBackground]):
1910         (-[WKWebView _setDrawsTransparentBackground:]):
1911         Deleted.
1912         
1913         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1914         Replace drawsTransparentBackground with drawsBackground.
1915
1916 2015-11-09  Joseph Pecoraro  <pecoraro@apple.com>
1917
1918         Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
1919         https://bugs.webkit.org/show_bug.cgi?id=151050
1920
1921         Reviewed by Brian Burg.
1922
1923         * UIProcess/mac/WebInspectorProxyMac.mm:
1924         (WebKit::WebInspectorProxy::platformCanAttach):
1925         Check now that the inspected view can be a WKWebView.
1926
1927 2015-11-09  Anders Carlsson  <andersca@apple.com>
1928
1929         Introspect reply block types as well
1930         https://bugs.webkit.org/show_bug.cgi?id=151048
1931
1932         Reviewed by Tim Horton.
1933
1934         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1935         (initializeMethod):
1936         (initializeMethods):
1937         (-[_WKRemoteObjectInterface debugDescription]):
1938
1939 2015-11-09  Anders Carlsson  <andersca@apple.com>
1940
1941         Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
1942         https://bugs.webkit.org/show_bug.cgi?id=151044
1943
1944         Reviewed by Tim Horton.
1945
1946         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1947         (-[_WKRemoteObjectInterface debugDescription]):
1948         (-[_WKRemoteObjectInterface description]): Deleted.
1949
1950 2015-11-06  Anders Carlsson  <andersca@apple.com>
1951
1952         Rework the way allowed argument classes are stored
1953         https://bugs.webkit.org/show_bug.cgi?id=150992
1954
1955         Reviewed by Darin Adler.
1956
1957         Add a separate MethodInfo class so we have someplace to store the reply block arguments.
1958         Use HashSet<Class> instead of NSSet. No functionality change intended.
1959
1960         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1961         (-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
1962         (decodeObjectFromObjectStream):
1963         (checkIfClassIsAllowed):
1964         (decodeInvocationArguments):
1965         (decodeObject):
1966         (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
1967         (-[WKRemoteObjectDecoder allowedClasses]):
1968         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1969         (isContainerClass):
1970         (propertyListClasses):
1971         (initializeMethod):
1972         (initializeMethods):
1973         (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
1974         (classesForSelectorArgument):
1975         (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
1976         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
1977         (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
1978         (allowedArgumentClassesForMethod): Deleted.
1979         (initializeAllowedArgumentClasses): Deleted.
1980         * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
1981
1982 2015-11-09  Csaba Osztrogonác  <ossy@webkit.org>
1983
1984         Unreviewed CMake buildfix after r192113.
1985
1986         * PlatformMac.cmake: New file added.
1987
1988 2015-11-09  Csaba Osztrogonác  <ossy@webkit.org>
1989
1990         Unreviewed speculative CMake buildfix after r192111.
1991
1992         * CMakeLists.txt: New files added.
1993
1994 2015-11-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1995
1996         [EFL] Add UserAgentEFl.cpp|h
1997         https://bugs.webkit.org/show_bug.cgi?id=151007
1998
1999         Reviewed by Darin Adler.
2000
2001         As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
2002         UA.
2003
2004         * UIProcess/efl/WebPageProxyEfl.cpp:
2005         (WebKit::WebPageProxy::standardUserAgent): Call WebCore::standardUserAgent().
2006
2007 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
2008
2009         Remove ColorSpace argument to all the drawing calls
2010         https://bugs.webkit.org/show_bug.cgi?id=150967
2011
2012         Reviewed by Darin Adler.
2013
2014         * Shared/API/c/cg/WKImageCG.cpp:
2015         (WKImageCreateFromCGImage):
2016         * Shared/ContextMenuContextData.cpp:
2017         (WebKit::ContextMenuContextData::ContextMenuContextData):
2018         * Shared/WebCoreArgumentCoders.cpp:
2019         (IPC::encodeImage):
2020         * Shared/mac/RemoteLayerBackingStore.mm:
2021         (WebKit::RemoteLayerBackingStore::drawInContext):
2022         * UIProcess/API/Cocoa/WKWebView.mm:
2023         (-[WKWebView _updateScrollViewBackground]):
2024         * UIProcess/WKInspectorHighlightView.mm:
2025         (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
2026         (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
2027         * UIProcess/ios/ViewGestureControllerIOS.mm:
2028         (WebKit::ViewGestureController::beginSwipeGesture):
2029         * UIProcess/ios/WKContentViewInteraction.mm:
2030         (-[WKContentView _updateTapHighlight]):
2031         * UIProcess/mac/ViewGestureControllerMac.mm:
2032         (WebKit::ViewGestureController::beginSwipeGesture):
2033         * WebProcess/WebPage/FindController.cpp:
2034         (WebKit::FindController::drawRect):
2035         * WebProcess/WebPage/WebFrame.cpp:
2036         (WebKit::WebFrame::createSelectionSnapshot):
2037         * WebProcess/WebPage/WebPage.cpp:
2038         (WebKit::WebPage::snapshotAtSize):
2039         * WebProcess/WebPage/ios/FindControllerIOS.mm:
2040         (WebKit::FindIndicatorOverlayClientIOS::drawRect):
2041         * WebProcess/WebPage/ios/WebPageIOS.mm:
2042         (WebKit::WebPage::getPositionInformation):
2043         * WebProcess/ios/WebVideoFullscreenManager.mm:
2044         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2045
2046 2015-11-07  Simon Fraser  <simon.fraser@apple.com>
2047
2048         Use ColorSpaceSRGB for image buffers everywhere
2049         https://bugs.webkit.org/show_bug.cgi?id=150990
2050
2051         Reviewed by Zalan Bujtas.
2052
2053         ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
2054         code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
2055
2056         * Shared/mac/RemoteLayerBackingStore.mm:
2057         (WebKit::RemoteLayerBackingStore::decode):
2058         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2059         * UIProcess/API/Cocoa/WKWebView.mm:
2060         (-[WKWebView _takeViewSnapshot]):
2061         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2062
2063 2015-11-06  Brady Eidson  <beidson@apple.com>
2064
2065         Modern IDB: Make the result data for a "get" request be an IDBGetResult.
2066         https://bugs.webkit.org/show_bug.cgi?id=150985
2067
2068         Reviewed by Alex Christensen.
2069
2070         * Shared/WebCoreArgumentCoders.cpp:
2071         (IPC::ArgumentCoder<IDBGetResult>::encode):
2072         (IPC::ArgumentCoder<IDBGetResult>::decode):
2073
2074 2015-11-06  Tim Horton  <timothy_horton@apple.com>
2075
2076         Add preliminary (SPI) support for NSTextFinder on WKWebView
2077         https://bugs.webkit.org/show_bug.cgi?id=150907
2078         <rdar://problem/19171624>
2079
2080         Reviewed by Darin Adler.
2081
2082         New API test: WebKit2.FindInPage
2083
2084         * Platform/spi/mac/AppKitSPI.h:
2085         Add some SPI.
2086
2087         * UIProcess/API/APIFindClient.h:
2088         (API::FindClient::didFindString):
2089         * UIProcess/API/C/WKPage.cpp:
2090         (WKPageSetPageFindClient):
2091         * UIProcess/WebPageProxy.cpp:
2092         (WebKit::WebPageProxy::didFindString):
2093         * UIProcess/WebPageProxy.h:
2094         * UIProcess/WebPageProxy.messages.in:
2095         * UIProcess/Cocoa/FindClient.h:
2096         * UIProcess/Cocoa/FindClient.mm:
2097         (WebKit::FindClient::didFindString):
2098         Make didFindString return the match rects like didFindStringMatches does.
2099
2100         * WebProcess/WebPage/FindController.cpp:
2101         (WebKit::FindController::updateFindUIAfterPageScroll):
2102         (WebKit::FindController::findString):
2103         Keep the most recent find match around for incremental find just like we do
2104         for the non-incremental version. This way, getImageForFindMatch and selectFindMatch
2105         will work for incremental find too!
2106
2107         * UIProcess/API/Cocoa/WKWebView.mm:
2108         (-[WKWebView _ensureTextFinderClient]):
2109         (-[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
2110         (-[WKWebView documentContainerView]):
2111         (-[WKWebView getSelectedText:]):
2112         (-[WKWebView selectFindMatch:completionHandler:]):
2113         Implement NSTextFinder's async client protocol and forward to the new WKTextFinderClient.
2114
2115         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2116         Privately note our conformance to the aformentioned protocol.
2117
2118         * UIProcess/mac/WKTextFinderClient.h: Added.
2119         * UIProcess/mac/WKTextFinderClient.mm: Added.
2120         (WebKit::TextFinderFindClient::TextFinderFindClient):
2121         (-[WKTextFinderMatch initWithClient:view:index:rects:]):
2122         (-[WKTextFinderMatch containingView]):
2123         (-[WKTextFinderMatch textRects]):
2124         (-[WKTextFinderMatch generateTextImage:]):
2125         (-[WKTextFinderMatch index]):
2126         (-[WKTextFinderClient initWithPage:view:]):
2127         (-[WKTextFinderClient willDestroyView:]):
2128         (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
2129         (-[WKTextFinderClient getSelectedText:]):
2130         (-[WKTextFinderClient selectFindMatch:completionHandler:]):
2131         (-[WKTextFinderClient didFindStringMatches:rects:index:]):
2132         (-[WKTextFinderClient didGetImageForMatchResult:index:]):
2133         (-[WKTextFinderClient didFindString:rects:index:]):
2134         (-[WKTextFinderClient didFailToFindString:]):
2135         (-[WKTextFinderClient getImageForMatchResult:completionHandler:]):
2136         * WebKit2.xcodeproj/project.pbxproj:
2137         Add WKTextFinderClient. It installs itself as the FindClient and FindMatchesClient,
2138         so you can only use one mechanism or the other.
2139
2140 2015-11-06  Chris Dumez  <cdumez@apple.com>
2141
2142         [WK2][SpeculativeRevalidation] Save to disk cache relationship between resources
2143         https://bugs.webkit.org/show_bug.cgi?id=150951
2144         <rdar://problem/23092196>
2145
2146         Reviewed by Darin Adler.
2147
2148         This patch is a first step towards speculative revalidation support in
2149         the WebKit network cache. It maps sub-resources to the main resource
2150         that caused them to be requested. We then write this information to the
2151         network cache, as a list of subresource keys for each main resource,
2152         even if the main resource is not cacheable.
2153
2154         To map sub-resources to main resources, we track the loads happening
2155         in each frame and store the key of the main resource for the frame,
2156         as well as the key of each sub-resource later loaded in the frame. We
2157         use a HysteresisActivity to detect when loads settle down in each frame
2158         (no loads happen for a while) and we then write the information to the
2159         disk. If a new main resource is loaded in a frame where we were already
2160         tracking a load, we save the data to disk before tracking the new load,
2161         instead of waiting for the HysteresisActivity to detect the end of the
2162         load.
2163
2164         The feature is currently behind a compile-time flag that is enabled on
2165         Mac and iOS only. It is also behind a runtime flag (NSUserDefaults)
2166         that is disabled by default.
2167
2168         * NetworkProcess/NetworkResourceLoader.cpp:
2169         (WebKit::NetworkResourceLoader::start):
2170         Pass frameID in addition to the pageID. We need to globally identify
2171         frames (using <pageID, frameID> pair) to be able to track loads in
2172         each frame.
2173
2174         * NetworkProcess/cache/NetworkCache.cpp:
2175         (WebKit::NetworkCache::Cache::initialize):
2176         Only initialize the SpeculativeLoader if the
2177         enableNetworkCacheSpeculativeRevalidation run-time flag is set.
2178
2179         (WebKit::NetworkCache::Cache::retrieve):
2180         Register the load with the SpeculativeLoader.
2181
2182         * NetworkProcess/cache/NetworkCacheKey.h:
2183         (WebKit::NetworkCache::Key::Key):
2184         (WebKit::NetworkCache::Key::isHashTableDeletedValue):
2185         (WebKit::NetworkCache::Key::range):
2186         (WTF::NetworkCacheKeyHash::hash):
2187         (WTF::NetworkCacheKeyHash::equal):
2188         (WTF::HashTraits<WebKit::NetworkCache::Key>::isEmptyValue):
2189         Add needed HashTraits for NetworkCache::Key so it can be used as key in
2190         HashMap / HashSet.
2191
2192         * NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp: Added.
2193         * NetworkProcess/cache/NetworkCacheSpeculativeLoader.h: Added.
2194         Add new NetworkCacheSpeculativeLoader class that takes care of tracking
2195         loads in each frame to map subresources to main resources and then write
2196         this information to the network disk cache. In the future, this class we
2197         also take care of triggering speculative revalidations, thus the naming.
2198
2199         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2200         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2201         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2202         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2203         * Shared/Network/NetworkProcessCreationParameters.cpp:
2204         (WebKit::NetworkProcessCreationParameters::encode):
2205         (WebKit::NetworkProcessCreationParameters::decode):
2206         * Shared/Network/NetworkProcessCreationParameters.h:
2207         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2208         (WebKit::registerUserDefaultsIfNeeded):
2209         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2210         Add new NetworkProcess parameter to control at runtime if speculative loading
2211         should be enabled or not. It is disabled by default.
2212
2213         * WebKit2.xcodeproj/project.pbxproj:
2214         Add new files to XCode project.
2215
2216         * config.h:
2217         Add ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION build flag for the new
2218         feature that is enable by default on COCOA.
2219
2220 2015-11-06  Chris Dumez  <cdumez@apple.com>
2221
2222         Unreviewed, remove empty #if block landed by mistake in r192038.
2223
2224         * NetworkProcess/NetworkLoad.cpp:
2225
2226 2015-11-06  Philip Chimento  <philip.chimento@gmail.com>
2227
2228         [GTK] Fails to link libwebkit2gtkinjectedbundle.so on OSX
2229         https://bugs.webkit.org/show_bug.cgi?id=144785
2230
2231         Reviewed by Philippe Normand.
2232
2233         * PlatformGTK.cmake: Add missing WebKit2 library to list of
2234         libraries to link with. Required for OSX build.
2235
2236 2015-11-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2237
2238         Add runtime and compile time flags for enabling Web Animations API and model.
2239         https://bugs.webkit.org/show_bug.cgi?id=150914
2240
2241         Reviewed by Benjamin Poulain.
2242
2243         Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
2244
2245         * Configurations/FeatureDefines.xcconfig:
2246         * Shared/WebPreferencesDefinitions.h:
2247         * UIProcess/API/C/WKPreferences.cpp:
2248         (WKPreferencesSetWebAnimationsEnabled):
2249         (WKPreferencesGetWebAnimationsEnabled):
2250         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2251         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2252         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2253         (WebKit::InjectedBundle::setWebAnimationsEnabled):
2254         * WebProcess/InjectedBundle/InjectedBundle.h:
2255         * WebProcess/WebPage/WebPage.cpp:
2256         (WebKit::WebPage::updatePreferences):
2257
2258 2015-11-05  Ryuan Choi  <ryuan.choi@navercorp.com>
2259
2260         [EFL] Separate beforeunload confirm callback from confirm callback
2261         https://bugs.webkit.org/show_bug.cgi?id=150964
2262
2263         Reviewed by Gyuyoung Kim.
2264
2265         Browser may need to distinguish between beforeunload confirm panel and general confirm panel.
2266         For example, browser may want to modify the message or show different buttons from confirm panel
2267         such as "Stay Page | Leave Page".
2268
2269         * UIProcess/API/efl/EwkView.cpp:
2270         (EwkView::requestJSBeforeUnloadConfirmPopup):
2271         * UIProcess/API/efl/EwkView.h:
2272         * UIProcess/API/efl/ewk_view.h:
2273         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2274         (TEST_F):
2275         * UIProcess/efl/PageUIClientEfl.cpp:
2276         (WebKit::PageUIClientEfl::runBeforeUnloadConfirmPanel):
2277
2278 2015-11-05  Commit Queue  <commit-queue@webkit.org>
2279
2280         Unreviewed, rolling out r192089.
2281         https://bugs.webkit.org/show_bug.cgi?id=150966
2282
2283         This change broke an existing layout test on Yosemite and
2284         Mavericks (Requested by ryanhaddad on #webkit).
2285
2286         Reverted changeset:
2287
2288         "Preview on apple.com/contact with all text selected shows a
2289         map"
2290         https://bugs.webkit.org/show_bug.cgi?id=150963
2291         http://trac.webkit.org/changeset/192089
2292
2293 2015-11-05  Tim Horton  <timothy_horton@apple.com>
2294
2295         Preview on apple.com/contact with all text selected shows a map
2296         https://bugs.webkit.org/show_bug.cgi?id=150963
2297         <rdar://problem/23421750>
2298
2299         Reviewed by Beth Dakin.
2300
2301         * WebProcess/WebPage/mac/WebPageMac.mm:
2302         (WebKit::WebPage::performDictionaryLookupForSelection):
2303         In this case, we don't know where we hit, so pass a null VisiblePosition.
2304
2305 2015-11-05  Geoffrey Garen  <ggaren@apple.com>
2306
2307         _WKObservablePageState's _webProcessIsResponsive property isn't set to YES when an unresponsive page is reloaded
2308         https://bugs.webkit.org/show_bug.cgi?id=150953
2309
2310         Reviewed by Anders Carlsson.
2311
2312         * UIProcess/ResponsivenessTimer.cpp:
2313         (WebKit::ResponsivenessTimer::processTerminated): Call stop() to
2314         indicate that we are responsive again. This gives the client a chance
2315         to remove the SPOD cursor, among other things.
2316
2317         * UIProcess/ResponsivenessTimer.h:
2318         (WebKit::ResponsivenessTimer::processTerminated): Anders told me to do this!
2319
2320         * UIProcess/WebPageProxy.cpp:
2321         (WebKit::WebPageProxy::resetStateAfterProcessExited): Be sure to reset
2322         the responsiveness timer too, or it will continue thinking we are
2323         unresponsive after a crash or a forced load or reload.
2324
2325 2015-11-05  Anders Carlsson  <andersca@apple.com>
2326
2327         Move invocation argument encoding out to a separate function
2328         https://bugs.webkit.org/show_bug.cgi?id=150950
2329
2330         Reviewed by Tim Horton.
2331
2332         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2333         (encodeInvocationArguments):
2334         (encodeInvocation):
2335
2336 2015-11-05  Chris Dumez  <cdumez@apple.com>
2337
2338         [WK2] Clean up / Modernize NetworkResourceLoader
2339         https://bugs.webkit.org/show_bug.cgi?id=150922
2340
2341         Reviewed by Andreas Kling.
2342
2343         Clean up / Modernize NetworkResourceLoader.
2344
2345         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2346         (WebKit::NetworkBlobRegistry::filesInBlob):
2347         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2348         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2349         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
2350         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
2351         * NetworkProcess/NetworkConnectionToWebProcess.h:
2352         * NetworkProcess/NetworkResourceLoader.cpp:
2353         (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
2354         (WebKit::sendReplyToSynchronousRequest):
2355         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2356         (WebKit::NetworkResourceLoader::startNetworkLoad):
2357         (WebKit::NetworkResourceLoader::didFinishLoading):
2358         (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
2359         (WebKit::NetworkResourceLoader::bufferingTimerFired):
2360         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
2361         (WebKit::NetworkResourceLoader::validateCacheEntry):
2362         (WebKit::NetworkResourceLoader::messageSenderConnection):
2363         (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
2364         (WebKit::NetworkResourceLoader::~NetworkResourceLoader): Deleted.
2365         (WebKit::NetworkResourceLoader::didReceiveBuffer): Deleted.
2366         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Deleted.
2367         (WebKit::NetworkResourceLoader::consumeSandboxExtensions): Deleted.
2368         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
2369         * NetworkProcess/NetworkResourceLoader.h:
2370         * NetworkProcess/mac/NetworkDiskCacheMonitor.h:
2371
2372 2015-11-05  Chris Dumez  <cdumez@apple.com>
2373
2374         Regression(r192038): Safari cannot load any pages
2375         https://bugs.webkit.org/show_bug.cgi?id=150937
2376         <rdar://problem/23413859>
2377
2378         Reviewed by Alex Christensen.
2379
2380         Make sure we use the current "defersLoading" state instead of the
2381         original one when constructing / initializing the NetworkLoad.
2382
2383         * NetworkProcess/NetworkResourceLoader.cpp:
2384         (WebKit::NetworkResourceLoader::startNetworkLoad):
2385
2386 2015-11-05  Ryuan Choi  <ryuan.choi@navercorp.com>
2387
2388         [EFL] Add try_close API to handle beforeunload event
2389         https://bugs.webkit.org/show_bug.cgi?id=150705
2390
2391         Reviewed by Gyuyoung Kim.
2392
2393         This patch adds ewk_view_try_close to have a chance to call confirm callback
2394         for beforeunload event while destryoing webview.
2395
2396         * UIProcess/API/efl/ewk_view.cpp:
2397         (ewk_view_try_close):
2398         * UIProcess/API/efl/ewk_view.h:
2399         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2400         (EWK2ViewTest::beforeUnloadCallback):
2401         (EWK2ViewTest::windowCloseCallback):
2402         (TEST_F): Added test case for ewk_view_try_close.
2403
2404 2015-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2405
2406         [GTK] Epiphany with Debug mode compiled WebKitGtk+ 2.10.3 hits ASSERT_ARG on willEnterAcceleratedCompositingMode
2407         https://bugs.webkit.org/show_bug.cgi?id=150620
2408
2409         Reviewed by Mario Sanchez Prada.
2410
2411         WillEnterAcceleratedCompositingMode message is sent when the
2412         LayerTreeHost is created in the Web Process. This can happen while
2413         there's still a DidUpdateBackingStoreState pending, in which case
2414         we are receiving the new backingStoreStateID, but the current one
2415         hasn't been updated yet.
2416
2417         * UIProcess/DrawingAreaProxyImpl.cpp:
2418         (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
2419         Fix the ASSERT to check the given ID is alt least the next one,
2420         and remove the early return since it's valid to not enter AC mode
2421         in the end after the WillEnter message.
2422
2423 2015-11-04  Tim Horton  <timothy_horton@apple.com>
2424
2425         REGRESSION (r191499): 100% repro crash under _prepareForMoveToWindow:
2426         https://bugs.webkit.org/show_bug.cgi?id=150912
2427         <rdar://problem/23402116>
2428
2429         Reviewed by Simon Fraser.
2430
2431         * UIProcess/API/mac/WKView.mm:
2432         (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
2433
2434 2015-11-04  Chris Dumez  <cdumez@apple.com>
2435
2436         Regression(r192038): Crash in ~SandboxExtension()
2437         https://bugs.webkit.org/show_bug.cgi?id=150898
2438
2439         Reviewed by Alex Christensen.
2440
2441         We are seeing a couple of crashes under ~SandboxExtension() on the bots
2442         after ~SandboxExtension(). The reason is that the SandBoxExtension is
2443         still in use (useCount > 0) when destroyed. This happens due to a bug
2444         in setDefersLoading() that could cause the load to get started more
2445         than once and thus the SandboxExtension to be consumed more than once.
2446
2447         * NetworkProcess/NetworkResourceLoader.cpp:
2448         (WebKit::NetworkResourceLoader::setDefersLoading):
2449         (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
2450
2451 2015-11-04  Chris Dumez  <cdumez@apple.com>
2452
2453         [WK2] Extract networking code out of NetworkResourceLoader class to improve reusability
2454         https://bugs.webkit.org/show_bug.cgi?id=150898
2455
2456         Reviewed by Alex Christensen.
2457
2458         Extract networking code out of NetworkResourceLoader class to improve
2459         reusability (will be used for speculative revalidation) and simplify
2460         the NetworkResourceLoader.
2461
2462         * CMakeLists.txt:
2463         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2464         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2465         * NetworkProcess/NetworkLoad.cpp: Added.
2466         * NetworkProcess/NetworkLoad.h: Added.
2467         * NetworkProcess/NetworkLoadClient.h: Added.
2468         * NetworkProcess/NetworkLoadParameters.cpp: Added.
2469         * NetworkProcess/NetworkLoadParameters.h: Added.
2470         * NetworkProcess/NetworkResourceLoader.cpp:
2471         * NetworkProcess/NetworkResourceLoader.h:
2472         * NetworkProcess/mac/NetworkLoadMac.mm: Added.
2473         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2474         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
2475         * WebKit2.xcodeproj/project.pbxproj:
2476
2477 2015-11-04  Beth Dakin  <bdakin@apple.com>
2478
2479         Link preview doesn't work on XHTML pages with Content-Type header as 
2480         `application/xhtml+xml`
2481         https://bugs.webkit.org/show_bug.cgi?id=150740
2482         -and corresponding-
2483         rdar://problem/23063585
2484
2485         Reviewed by Darin Adler.
2486
2487         My original fix for this bug was incorrect in the presence of non-HTML 
2488         elements that happen to have the same local name as HTML elements. Since it 
2489         seems silly to have all of this logic in the UI process to determine whether 
2490         to treat something as a link or an image, this patch fixes the bug by adding 
2491         isLink and isImage to InteractionInformationAtPosition in order to simplify 
2492         everything. The only remaining uses of clickableElementName just use it to 
2493         compare against isNull and isEmpty, so that can be a bool too.
2494
2495         Add isLink and isImage, and turn clickableElementName into isClickableElement
2496         * Shared/InteractionInformationAtPosition.cpp:
2497         (WebKit::InteractionInformationAtPosition::encode):
2498         (WebKit::InteractionInformationAtPosition::decode):
2499         * Shared/InteractionInformationAtPosition.h:
2500
2501         Use the new isLink, isImage, and isClickableElement
2502         * UIProcess/ios/WKContentViewInteraction.mm:
2503         (-[WKContentView _actionForLongPress]):
2504         (-[WKContentView gestureRecognizerShouldBegin:]):
2505         (-[WKContentView _highlightLongPressRecognized:]):
2506         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2507         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2508
2509         Set everything correctly.
2510         * WebProcess/WebPage/ios/WebPageIOS.mm:
2511         (WebKit::WebPage::getPositionInformation):
2512
2513 2015-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>
2514
2515         Fix crashing fast-clicking WK2 tests on iOS
2516         https://bugs.webkit.org/show_bug.cgi?id=150896
2517         <rdar://problem/23344491>
2518
2519         Reviewed by Simon Fraser.
2520
2521         In order for the modified fast-clicking tests to pass, we can't allow hit-testing to
2522         find the tap highlight view. See the Radar for more UIKit-specific descriptions.
2523
2524         * UIProcess/ios/WKContentViewInteraction.mm:
2525         (-[WKContentView _showTapHighlight]):
2526
2527 2015-11-03  Anders Carlsson  <andersca@apple.com>
2528
2529         PageLoadState::will/didChangeProcessIsResponsive should call observers
2530         https://bugs.webkit.org/show_bug.cgi?id=150870
2531
2532         Reviewed by Dan Bernstein.
2533
2534         * UIProcess/PageLoadState.cpp:
2535         (WebKit::PageLoadState::willChangeProcessIsResponsive):
2536         (WebKit::PageLoadState::didChangeProcessIsResponsive):
2537
2538 2015-11-04  Ryan Haddad  <ryanhaddad@apple.com>
2539
2540         Speculative build fix. Missed the checkin for the changelog with r192029.
2541
2542         * UIProcess/API/Cocoa/WKWebView.mm:
2543
2544 2015-11-03  Andy Estes  <aestes@apple.com>
2545
2546         [Cocoa] Add SPI to warm an initial web process
2547         https://bugs.webkit.org/show_bug.cgi?id=150886
2548
2549         Reviewed by Dan Bernstein.
2550
2551         * UIProcess/API/Cocoa/WKProcessPool.mm:
2552         (-[WKProcessPool _warmInitialProcess]):
2553         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2554
2555 2015-11-03  Andy Estes  <aestes@apple.com>
2556
2557         [Cocoa] Adopt WKWebViewAdditions
2558         https://bugs.webkit.org/show_bug.cgi?id=150885
2559
2560         Reviewed by Dan Bernstein.
2561
2562         * UIProcess/API/Cocoa/WKWebView.mm:
2563
2564 2015-11-03  Tim Horton  <timothy_horton@apple.com>
2565
2566         Duplicate validateUserInterfaceItem in WKWebView
2567         https://bugs.webkit.org/show_bug.cgi?id=150873
2568
2569         Reviewed by Anders Carlsson.
2570
2571         * UIProcess/API/Cocoa/WKWebView.mm:
2572         (-[WKWebView changeFont:]):
2573         (-[WKWebView startSpeaking:]):
2574         (-[WKWebView validateUserInterfaceItem:]):
2575         (-[WKWebView goBack:]):
2576
2577 2015-11-03  Geoffrey Garen  <ggaren@apple.com>
2578
2579         Provide a way to turn off const in WebKit2.
2580
2581         Reviewed by Sam Weinig.
2582
2583         * Shared/WebProcessCreationParameters.cpp:
2584         (WebKit::WebProcessCreationParameters::encode):
2585         (WebKit::WebProcessCreationParameters::decode):
2586         * Shared/WebProcessCreationParameters.h:
2587         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2588         (WebKit::WebProcessPool::platformInitializeWebProcess):
2589         * WebProcess/WebProcess.cpp:
2590         (WebKit::WebProcess::initializeWebProcess):
2591
2592 2015-11-03  Alex Christensen  <achristensen@webkit.org>
2593
2594         Create a NetworkSession for each SessionID
2595         https://bugs.webkit.org/show_bug.cgi?id=150857
2596
2597         Reviewed by Anders Carlsson.
2598
2599         This patch renames SessionTracker::session to storageSession and makes a parallel
2600         structure for NetworkSessions.  NetworkSession and NetworkStorageSession should eventually
2601         become the same class in WebCore.  Because not everybody uses NetworkSessions yet,
2602         we keep them separate but created, destroyed, and managed together.
2603
2604         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2605         (WebKit::storageSession):
2606         * NetworkProcess/NetworkProcess.cpp:
2607         (WebKit::NetworkProcess::fetchWebsiteData):
2608         (WebKit::NetworkProcess::deleteWebsiteData):
2609         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2610         * NetworkProcess/NetworkResourceLoader.cpp:
2611         (WebKit::NetworkResourceLoader::startNetworkLoad):
2612         (WebKit::NetworkResourceLoader::abort):
2613         * NetworkProcess/NetworkResourceLoader.h:
2614         * NetworkProcess/NetworkSession.h:
2615         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
2616         (WebKit::NetworkDataTask::client):
2617         (WebKit::NetworkDataTask::clearClient):
2618         (WebKit::NetworkingDataTask::client): Deleted.
2619         (WebKit::NetworkingDataTask::clearClient): Deleted.
2620         (WebKit::NetworkSession::~NetworkSession): Deleted.
2621         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2622         (WebKit::configurationForType):
2623         (WebKit::defaultNetworkSession):
2624         (WebKit::NetworkSession::defaultSession):
2625         (WebKit::NetworkSession::NetworkSession):
2626         (WebKit::NetworkSession::~NetworkSession):
2627         (WebKit::NetworkSession::createDataTaskWithRequest):
2628         (WebKit::NetworkSession::dataTaskForIdentifier):
2629         (WebKit::NetworkDataTask::NetworkDataTask):
2630         (WebKit::NetworkDataTask::~NetworkDataTask):
2631         (WebKit::NetworkDataTask::cancel):
2632         (WebKit::NetworkDataTask::resume):
2633         (WebKit::NetworkDataTask::taskIdentifier):
2634         (WebKit::NetworkSession::create): Deleted.
2635         (WebKit::NetworkSession::singleton): Deleted.
2636         (WebKit::NetworkingDataTask::NetworkingDataTask): Deleted.
2637         (WebKit::NetworkingDataTask::~NetworkingDataTask): Deleted.
2638         (WebKit::NetworkingDataTask::suspend): Deleted.
2639         (WebKit::NetworkingDataTask::resume): Deleted.
2640         (WebKit::NetworkingDataTask::taskIdentifier): Deleted.
2641         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2642         (WebKit::RemoteNetworkingContext::storageSession):
2643         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2644         * Shared/SessionTracker.cpp:
2645         (WebKit::staticStorageSessionMap):
2646         (WebKit::identifierBase):
2647         (WebKit::SessionTracker::storageSessionMap):
2648         (WebKit::SessionTracker::getIdentifierBase):
2649         (WebKit::SessionTracker::storageSession):
2650         (WebKit::staticSessionMap):
2651         (WebKit::SessionTracker::networkSession):
2652         (WebKit::SessionTracker::sessionID):
2653         (WebKit::SessionTracker::setSession):
2654         (WebKit::SessionTracker::destroySession):
2655         (WebKit::SessionTracker::sessionMap): Deleted.
2656         (WebKit::SessionTracker::session): Deleted.
2657         * Shared/SessionTracker.h:
2658         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2659         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2660         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2661         (WebKit::WebFrameNetworkingContext::storageSession):
2662         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2663         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2664         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2665         (WebKit::WebFrameNetworkingContext::storageSession):
2666
2667 2015-11-03  Ryuan Choi  <ryuan.choi@navercorp.com>
2668
2669         [CoordinatedGraphics] invisible webview should not paint the content
2670         https://bugs.webkit.org/show_bug.cgi?id=150662
2671
2672         Reviewed by Darin Adler.
2673
2674         Suspend or resume the painting instead of just initializing m_isPaintingSuspended 
2675         for invisible webview not to paint the content until visibility is changed.
2676
2677         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
2678         (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
2679
2680 2015-11-03  Anders Carlsson  <andersca@apple.com>
2681
2682         Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
2683         https://bugs.webkit.org/show_bug.cgi?id=150844
2684
2685         Reviewed by Tim Horton.
2686
2687         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2688         (-[_WKRemoteObjectRegistry _invokeMethod:]):
2689         (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
2690         * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
2691
2692 2015-11-02  Anders Carlsson  <andersca@apple.com>
2693
2694         CTTE the responsiveness timer getter
2695         https://bugs.webkit.org/show_bug.cgi?id=150825
2696
2697         Reviewed by Daniel Bates.
2698
2699         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2700         (-[WKObservablePageState _webProcessIsResponsive]):
2701         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2702         (-[WKBrowsingContextController _webProcessIsResponsive]):
2703         * UIProcess/API/Cocoa/WKWebView.mm:
2704         (-[WKWebView _webProcessIsResponsive]):
2705         * UIProcess/WebPageProxy.cpp:
2706         (WebKit::WebPageProxy::reattachToWebProcessForReload):
2707         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2708         (WebKit::WebPageProxy::tryClose):
2709         (WebKit::WebPageProxy::loadRequest):
2710         (WebKit::WebPageProxy::loadFile):
2711         (WebKit::WebPageProxy::loadData):
2712         (WebKit::WebPageProxy::loadHTMLString):
2713         (WebKit::WebPageProxy::loadAlternateHTMLString):
2714         (WebKit::WebPageProxy::loadPlainTextString):
2715         (WebKit::WebPageProxy::loadWebArchiveData):
2716         (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
2717         (WebKit::WebPageProxy::stopLoading):
2718         (WebKit::WebPageProxy::reload):
2719         (WebKit::WebPageProxy::goForward):
2720         (WebKit::WebPageProxy::goBack):
2721         (WebKit::WebPageProxy::goToBackForwardItem):
2722         (WebKit::WebPageProxy::dispatchViewStateChange):
2723         (WebKit::WebPageProxy::handleMouseEvent):
2724         (WebKit::WebPageProxy::sendWheelEvent):
2725         (WebKit::WebPageProxy::handleKeyboardEvent):
2726         (WebKit::WebPageProxy::handleGestureEvent):
2727         (WebKit::WebPageProxy::handleTouchEventSynchronously):
2728         (WebKit::WebPageProxy::handleTouchEvent):
2729         (WebKit::WebPageProxy::closePage):
2730         (WebKit::WebPageProxy::runJavaScriptAlert):
2731         (WebKit::WebPageProxy::runJavaScriptConfirm):
2732         (WebKit::WebPageProxy::runJavaScriptPrompt):
2733         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
2734         (WebKit::WebPageProxy::runOpenPanel):
2735         (WebKit::WebPageProxy::showPopupMenu):
2736         (WebKit::WebPageProxy::internalShowContextMenu):
2737         (WebKit::WebPageProxy::didReceiveEvent):
2738         (WebKit::WebPageProxy::stopResponsivenessTimer):
2739         (WebKit::WebPageProxy::runModal):
2740         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
2741         * UIProcess/WebProcessProxy.h:
2742         (WebKit::WebProcessProxy::responsivenessTimer):
2743
2744 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2745
2746         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.1 release.
2747
2748         * gtk/NEWS: Add release notes for 2.11.1.
2749
2750 2015-11-03  Alex Christensen  <achristensen@webkit.org>
2751
2752         Use the same cookie storage as WebCore when using NETWORK_SESSION
2753         https://bugs.webkit.org/show_bug.cgi?id=150833
2754
2755         Reviewed by Antti Koivisto.
2756
2757         This fixes 12 tests when using NETWORK_SESSION.
2758
2759         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2760         (WebKit::NetworkSession::NetworkSession):
2761
2762 2015-11-03  Alex Christensen  <achristensen@webkit.org>
2763
2764         Clean up NETWORK_SESSION code after r191848
2765         https://bugs.webkit.org/show_bug.cgi?id=150829
2766
2767         Reviewed by Darin Adler.
2768
2769         * NetworkProcess/NetworkResourceLoader.cpp:
2770         (WebKit::NetworkResourceLoader::didReceiveData):
2771         (WebKit::NetworkResourceLoader::didCompleteWithError):
2772         * NetworkProcess/NetworkSession.h:
2773         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2774         (WebKit::NetworkSession::NetworkSession):
2775         (WebKit::NetworkSession::createDataTaskWithRequest):
2776         (WebKit::NetworkSession::dataTaskForIdentifier):
2777
2778 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2779
2780         Unreviewed. Fix GTK+ build after r191924.
2781
2782         * UIProcess/API/gtk/WebKitWebView.cpp:
2783
2784 2015-11-02  Alex Christensen  <achristensen@webkit.org>
2785
2786         Fix CMake build after r191922.
2787
2788         * PlatformMac.cmake:
2789
2790 2015-11-02  Andy Estes  <aestes@apple.com>
2791
2792         Try again to fix the iOS build.
2793
2794         * Shared/mac/PDFKitImports.mm:
2795
2796 2015-11-02  Tim Horton  <timothy_horton@apple.com>
2797
2798         Try to fix the iOS build
2799
2800         * Shared/mac/PDFKitImports.h:
2801
2802 2015-11-02  Tim Horton  <timothy_horton@apple.com>
2803
2804         Address a misssed review comment in r191922
2805
2806         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2807         (WebKit::PDFPlugin::nextMatchForString):
2808
2809 2015-11-02  Anders Carlsson  <andersca@apple.com>
2810
2811         Add KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePageState
2812         https://bugs.webkit.org/show_bug.cgi?id=150818
2813         rdar://problem/22372131
2814
2815         Reviewed by Tim Horton.
2816
2817         * UIProcess/API/C/mac/WKPagePrivateMac.h:
2818         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2819         (-[WKObservablePageState _webProcessIsResponsive]):
2820         * UIProcess/API/Cocoa/PageLoadStateObserver.h:
2821         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2822         (-[WKBrowsingContextController _webProcessIsResponsive]):
2823         * UIProcess/API/Cocoa/WKWebView.mm:
2824         (-[WKWebView _webProcessIsResponsive]):
2825         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2826         * UIProcess/Cocoa/NavigationState.h:
2827         * UIProcess/Cocoa/NavigationState.mm:
2828         (WebKit::NavigationState::willChangeWebProcessIsResponsive):
2829         (WebKit::NavigationState::didChangeWebProcessIsResponsive):
2830         * UIProcess/PageLoadState.cpp:
2831         (WebKit::PageLoadState::willChangeProcessIsResponsive):
2832         (WebKit::PageLoadState::didChangeProcessIsResponsive):
2833         * UIProcess/PageLoadState.h:
2834         * UIProcess/ResponsivenessTimer.cpp:
2835         (WebKit::ResponsivenessTimer::ResponsivenessTimer):
2836         (WebKit::ResponsivenessTimer::timerFired):
2837         (WebKit::ResponsivenessTimer::stop):
2838         * UIProcess/ResponsivenessTimer.h:
2839         * UIProcess/WebPageProxy.cpp:
2840         (WebKit::WebPageProxy::willChangeProcessIsResponsive):
2841         (WebKit::WebPageProxy::didChangeProcessIsResponsive):
2842         * UIProcess/WebPageProxy.h:
2843         * UIProcess/WebProcessProxy.cpp:
2844         (WebKit::WebProcessProxy::WebProcessProxy):
2845         (WebKit::WebProcessProxy::didBecomeUnresponsive):
2846         (WebKit::WebProcessProxy::didBecomeResponsive):
2847         (WebKit::WebProcessProxy::willChangeIsResponsive):
2848         (WebKit::WebProcessProxy::didChangeIsResponsive):
2849         * UIProcess/WebProcessProxy.h:
2850
2851 2015-11-02  Tim Horton  <timothy_horton@apple.com>
2852
2853         PDFPlugin should take advantage of threaded scrolling
2854         https://bugs.webkit.org/show_bug.cgi?id=150037
2855
2856         Reviewed by Anders Carlsson.
2857
2858         Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
2859         DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
2860         prior to this patch).
2861
2862         The new PDFPlugin differs from the old one in a few significant ways,
2863         and we need to keep both alive for the time being. Significant differences
2864         include:
2865
2866         - PDFPlugin is no longer a ScrollableArea
2867         - PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
2868           into the page tiles, allowing WebCore's threaded scrolling to do its job
2869         - PDFPlugin now resizes itself to the size of the document
2870         - PDFPlugin doesn't handle zooming itself, it just delegates to the page
2871         - PDFLayerController has large and incompatible API changes
2872         - PDFPlugin now implements more of the HUD behavior, but it's still
2873           painted by PDFLayerController (into a view-relative PageOverlay)
2874
2875         [ File list elided because it's long and useless. ]
2876
2877 2015-11-02  Andy Estes  <aestes@apple.com>
2878
2879         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
2880         https://bugs.webkit.org/show_bug.cgi?id=150819
2881
2882         Reviewed by Dan Bernstein.
2883
2884         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
2885
2886         * Configurations/Base.xcconfig:
2887
2888 2015-11-02  Anders Carlsson  <andersca@apple.com>
2889
2890         Begin work on supporting reply blocks in _WKRemoteObjectRegistry
2891         https://bugs.webkit.org/show_bug.cgi?id=150739
2892
2893         Reviewed by Tim Horton.
2894
2895         * Platform/spi/Cocoa/BlockSPI.h:
2896         Add SPI header.
2897
2898         * Shared/API/Cocoa/RemoteObjectInvocation.h:
2899         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
2900         (WebKit::RemoteObjectInvocation::replyInfo):
2901         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
2902         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
2903         (WebKit::RemoteObjectInvocation::encode):
2904         (WebKit::RemoteObjectInvocation::decode):
2905         Add an optional ReplyInfo struct to RemoteObjectInvocation.
2906
2907         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2908         (generateReplyIdentifier):
2909         Helper function to generate a reply identifier.
2910
2911         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
2912         Do some block parameter validation.
2913
2914         * WebKit2.xcodeproj/project.pbxproj:
2915
2916 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
2917
2918         [iOS] Another unreviewed sandbox update.
2919
2920         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Change copyright.
2921
2922 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
2923
2924         [iOS] Unreviewed sandbox update.
2925
2926         Correcting copyright information.
2927
2928         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2929
2930 2015-11-02  Tim Horton  <timothy_horton@apple.com>
2931
2932         Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
2933         https://bugs.webkit.org/show_bug.cgi?id=150174
2934
2935         Reviewed by Anders Carlsson.
2936
2937         * UIProcess/API/Cocoa/WKWebView.mm:
2938         (-[WKWebView initWithFrame:configuration:]):
2939         (-[WKWebView dealloc]):
2940         (-[WKWebView allowsLinkPreview]):
2941         (-[WKWebView setAllowsLinkPreview:]):
2942         (-[WKWebView acceptsFirstResponder]):
2943         (-[WKWebView becomeFirstResponder]):
2944         (-[WKWebView resignFirstResponder]):
2945         (-[WKWebView viewWillStartLiveResize]):
2946         (-[WKWebView viewDidEndLiveResize]):
2947         (-[WKWebView isFlipped]):
2948         (-[WKWebView intrinsicContentSize]):
2949         (-[WKWebView prepareContentInRect:]):
2950         (-[WKWebView setFrameSize:]):
2951         (-[WKWebView renewGState]):
2952         (-[WKWebView writeSelectionToPasteboard:types:]):
2953         (-[WKWebView centerSelectionInVisibleArea:]):
2954         (-[WKWebView validRequestorForSendType:returnType:]):
2955         (-[WKWebView readSelectionFromPasteboard:]):
2956         (-[WKWebView changeFont:]):
2957         (-[WKWebView validateUserInterfaceItem:]):
2958         (-[WKWebView startSpeaking:]):
2959         (-[WKWebView stopSpeaking:]):
2960         (-[WKWebView showGuessPanel:]):
2961         (-[WKWebView checkSpelling:]):
2962         (-[WKWebView changeSpelling:]):
2963         (-[WKWebView toggleContinuousSpellChecking:]):
2964         (-[WKWebView isGrammarCheckingEnabled]):
2965         (-[WKWebView setGrammarCheckingEnabled:]):
2966         (-[WKWebView toggleGrammarChecking:]):
2967         (-[WKWebView toggleAutomaticSpellingCorrection:]):
2968         (-[WKWebView orderFrontSubstitutionsPanel:]):
2969         (-[WKWebView toggleSmartInsertDelete:]):
2970         (-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
2971         (-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
2972         (-[WKWebView toggleAutomaticQuoteSubstitution:]):
2973         (-[WKWebView isAutomaticDashSubstitutionEnabled]):
2974         (-[WKWebView setAutomaticDashSubstitutionEnabled:]):
2975         (-[WKWebView toggleAutomaticDashSubstitution:]):
2976         (-[WKWebView isAutomaticLinkDetectionEnabled]):
2977         (-[WKWebView setAutomaticLinkDetectionEnabled:]):
2978         (-[WKWebView toggleAutomaticLinkDetection:]):
2979         (-[WKWebView isAutomaticTextReplacementEnabled]):
2980         (-[WKWebView setAutomaticTextReplacementEnabled:]):
2981         (-[WKWebView toggleAutomaticTextReplacement:]):
2982         (-[WKWebView uppercaseWord:]):
2983         (-[WKWebView lowercaseWord:]):
2984         (-[WKWebView capitalizeWord:]):
2985         (-[WKWebView _wantsKeyDownForEvent:]):
2986         (-[WKWebView scrollWheel:]):
2987         (-[WKWebView swipeWithEvent:]):
2988         (-[WKWebView mouseMoved:]):
2989         (-[WKWebView mouseDown:]):
2990         (-[WKWebView mouseUp:]):
2991         (-[WKWebView mouseDragged:]):
2992         (-[WKWebView mouseEntered:]):
2993         (-[WKWebView mouseExited:]):
2994         (-[WKWebView otherMouseDown:]):
2995         (-[WKWebView otherMouseDragged:]):
2996         (-[WKWebView otherMouseUp:]):
2997         (-[WKWebView rightMouseDown:]):
2998         (-[WKWebView rightMouseDragged:]):
2999         (-[WKWebView rightMouseUp:]):
3000         (-[WKWebView pressureChangeWithEvent:]):
3001         (-[WKWebView acceptsFirstMouse:]):
3002         (-[WKWebView shouldDelayWindowOrderingForEvent:]):
3003         (-[WKWebView doCommandBySelector:]):
3004         (-[WKWebView insertText:]):
3005         (-[WKWebView insertText:replacementRange:]):
3006         (-[WKWebView inputContext]):
3007         (-[WKWebView performKeyEquivalent:]):
3008         (-[WKWebView keyUp:]):
3009         (-[WKWebView keyDown:]):
3010         (-[WKWebView flagsChanged:]):
3011         (-[WKWebView setMarkedText:selectedRange:replacementRange:]):
3012         (-[WKWebView unmarkText]):
3013         (-[WKWebView selectedRange]):
3014         (-[WKWebView hasMarkedText]):
3015         (-[WKWebView markedRange]):
3016         (-[WKWebView attributedSubstringForProposedRange:actualRange:]):
3017         (-[WKWebView characterIndexForPoint:]):
3018         (-[WKWebView firstRectForCharacterRange:actualRange:]):
3019         (-[WKWebView selectedRangeWithCompletionHandler:]):
3020         (-[WKWebView markedRangeWithCompletionHandler:]):
3021         (-[WKWebView hasMarkedTextWithCompletionHandler:]):
3022         (-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
3023         (-[WKWebView firstRectForCharacterRange:completionHandler:]):
3024         (-[WKWebView characterIndexForPoint:completionHandler:]):
3025         (-[WKWebView validAttributesForMarkedText]):
3026         (-[WKWebView draggedImage:endedAt:operation:]):
3027         (-[WKWebView draggingEntered:]):
3028         (-[WKWebView draggingUpdated:]):
3029         (-[WKWebView draggingExited:]):
3030         (-[WKWebView prepareForDragOperation:]):
3031         (-[WKWebView performDragOperation:]):
3032         (-[WKWebView _hitTest:dragTypes:]):
3033         (-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
3034         (-[WKWebView viewWillMoveToWindow:]):
3035         (-[WKWebView viewDidMoveToWindow]):
3036         (-[WKWebView drawRect:]):
3037         (-[WKWebView isOpaque]):
3038         (-[WKWebView mouseDownCanMoveWindow]):
3039         (-[WKWebView viewDidHide]):
3040         (-[WKWebView viewDidUnhide]):
3041         (-[WKWebView viewDidChangeBackingProperties]):
3042         (-[WKWebView _activeSpaceDidChange:]):
3043         (-[WKWebView accessibilityFocusedUIElement]):
3044         (-[WKWebView accessibilityIsIgnored]):
3045         (-[WKWebView accessibilityHitTest:]):
3046         (-[WKWebView accessibilityAttributeValue:]):
3047         (-[WKWebView hitTest:]):
3048         (-[WKWebView conversationIdentifier]):
3049         (-[WKWebView quickLookWithEvent:]):
3050         (-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
3051         (-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
3052         (-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
3053         (-[WKWebView removeTrackingRect:]):
3054         (-[WKWebView _removeTrackingRects:count:]):
3055         (-[WKWebView view:stringForToolTip:point:userData:]):
3056         (-[WKWebView pasteboardChangedOwner:]):
3057         (-[WKWebView pasteboard:provideDataForType:]):
3058         (-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
3059         (-[WKWebView wantsUpdateLayer]):
3060         (-[WKWebView updateLayer]):
3061         (-[WKWebView setAllowsBackForwardNavigationGestures:]):
3062         (-[WKWebView allowsBackForwardNavigationGestures]):
3063         (-[WKWebView smartMagnifyWithEvent:]):
3064         (-[WKWebView setMagnification:centeredAtPoint:]):
3065         (-[WKWebView setMagnification:]):
3066         (-[WKWebView magnification]):
3067         (-[WKWebView setAllowsMagnification:]):
3068         (-[WKWebView allowsMagnification]):
3069         (-[WKWebView magnifyWithEvent:]):
3070         (-[WKWebView rotateWithEvent:]):
3071         (-[WKWebView _web_superInputContext]):
3072         (-[WKWebView _web_superQuickLookWithEvent:]):
3073         (-[WKWebView _web_superSwipeWithEvent:]):
3074         (-[WKWebView _web_superMagnifyWithEvent:]):
3075         (-[WKWebView _web_superSmartMagnifyWithEvent:]):
3076         (-[WKWebView _web_superRemoveTrackingRect:]):
3077         (-[WKWebView _web_superAccessibilityAttributeValue:]):
3078         (-[WKWebView _web_superDoCommandBySelector:]):
3079         (-[WKWebView _web_superPerformKeyEquivalent:]):
3080         (-[WKWebView _web_superKeyDown:]):
3081         (-[WKWebView _web_superHitTest:]):
3082         (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
3083         (-[WKWebView _web_prepareForImmediateActionAnimation]):
3084         (-[WKWebView _web_cancelImmediateActionAnimation]):
3085         (-[WKWebView _web_completeImmediateActionAnimation]):
3086         (-[WKWebView _web_didChangeContentSize:]):
3087         (-[WKWebView _web_dismissContentRelativeChildWindows]):
3088         (-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
3089         (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
3090         (-[WKWebView _setEditable:]):
3091         (-[WKWebView _remoteObjectRegistry]):
3092         (-[WKWebView _layoutMode]):
3093         (-[WKWebView _setLayoutMode:]):
3094         (-[WKWebView _setViewScale:]):
3095         (-[WKWebView _drawsTransparentBackground]):
3096         (-[WKWebView _setDrawsTransparentBackground:]):
3097         (-[WKWebView _inspectorAttachmentView]):
3098         (-[WKWebView _setInspectorAttachmentView:]):
3099         (-[WKWebView _windowOcclusionDetectionEnabled]):
3100         (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
3101         (-[WKWebView _setOverrideDeviceScaleFactor:]):
3102         (-[WKWebView _overrideDeviceScaleFactor]):
3103         (-[WKWebView _setTopContentInset:]):
3104         (-[WKWebView _topContentInset]):
3105         (-[WKWebView _pageExtendedBackgroundColor]):
3106         (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
3107         (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
3108         (-[WKWebView _automaticallyAdjustsContentInsets]):
3109         (-[WKWebView _setMinimumLayoutWidth:]):
3110         (-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
3111         (-[WKWebView _ignoresNonWheelEvents]): Deleted.
3112         (-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
3113         (-[WKWebView _setIntrinsicContentSize:]): Deleted.
3114         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3115         * UIProcess/API/mac/WKView.mm:
3116         (-[WKView _web_superInputContext]):
3117         (-[WKView _web_superQuickLookWithEvent:]):
3118         (-[WKView _web_superSwipeWithEvent:]):
3119         (-[WKView _web_superMagnifyWithEvent:]):
3120         (-[WKView _web_superSmartMagnifyWithEvent:]):
3121         (-[WKView _web_superRemoveTrackingRect:]):
3122         (-[WKView _web_superAccessibilityAttributeValue:]):
3123         (-[WKView _web_superDoCommandBySelector:]):
3124         (-[WKView _web_superPerformKeyEquivalent:]):
3125         (-[WKView _web_superKeyDown:]):
3126         (-[WKView _web_superHitTest:]):
3127         (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
3128         (-[WKView _web_prepareForImmediateActionAnimation]):
3129         (-[WKView _web_cancelImmediateActionAnimation]):
3130         (-[WKView _web_completeImmediateActionAnimation]):
3131         (-[WKView _web_didChangeContentSize:]):
3132         (-[WKView _web_dismissContentRelativeChildWindows]):
3133         (-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
3134         (-[WKView _web_gestureEventWasNotHandledByWebCore:]):
3135         (-[WKView _superInputContext]): Deleted.
3136         (-[WKView _superQuickLookWithEvent:]): Deleted.
3137         (-[WKView _superSwipeWithEvent:]): Deleted.
3138         (-[WKView _superMagnifyWithEvent:]): Deleted.
3139         (-[WKView _superSmartMagnifyWithEvent:]): Deleted.
3140         (-[WKView _superRemoveTrackingRect:]): Deleted.
3141         (-[WKView _superAccessibilityAttributeValue:]): Deleted.
3142         (-[WKView _superDoCommandBySelector:]): Deleted.
3143         (-[WKView _superPerformKeyEquivalent:]): Deleted.
3144         (-[WKView _superKeyDown:]): Deleted.
3145         (-[WKView _superHitTest:]): Deleted.
3146         (-[WKView _addFontPanelObserver]): Deleted.
3147         * UIProcess/API/mac/WKViewInternal.h:
3148         * UIProcess/Cocoa/WebViewImpl.h:
3149         * UIProcess/Cocoa/WebViewImpl.mm:
3150         (WebKit::WebViewImpl::hitTest):
3151         (WebKit::WebViewImpl::updateSecureInputState):
3152         (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
3153         (WebKit::WebViewImpl::executeSavedCommandBySelector):
3154         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
3155         (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
3156         (WebKit::WebViewImpl::quickLookWithEvent):
3157         (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
3158         (WebKit::WebViewImpl::cancelImmediateActionAnimation):
3159         (WebKit::WebViewImpl::completeImmediateActionAnimation):
3160         (WebKit::WebViewImpl::didChangeContentSize):
3161         (WebKit::WebViewImpl::accessibilityAttributeValue):
3162         (WebKit::WebViewImpl::removeTrackingRect):
3163         (WebKit::WebViewImpl::swipeWithEvent):
3164         (WebKit::WebViewImpl::magnifyWithEvent):
3165         (WebKit::WebViewImpl::smartMagnifyWithEvent):
3166         (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
3167         (WebKit::WebViewImpl::doCommandBySelector):
3168         (WebKit::WebViewImpl::inputContext):
3169         (WebKit::WebViewImpl::performKeyEquivalent):
3170         (WebKit::WebViewImpl::keyDown):
3171         * UIProcess/mac/PageClientImpl.mm:
3172         (WebKit::PageClientImpl::setDragImage):
3173         (WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
3174         (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
3175         Plop.
3176
3177 2015-11-02  Anders Carlsson  <andersca@apple.com>
3178
3179         Remove unused API client callback code
3180         https://bugs.webkit.org/show_bug.cgi?id=150813
3181
3182         Reviewed by Tim Horton.
3183
3184         * UIProcess/API/APILoaderClient.h:
3185         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive): Deleted.
3186         * UIProcess/API/C/WKPage.cpp:
3187         (WKPageSetPageLoaderClient): Deleted.
3188         * UIProcess/ResponsivenessTimer.cpp:
3189         (WebKit::ResponsivenessTimer::timerFired):
3190         * UIProcess/ResponsivenessTimer.h:
3191         * UIProcess/WebPageProxy.cpp:
3192         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): Deleted.
3193         * UIProcess/WebPageProxy.h:
3194         * UIProcess/WebProcessProxy.cpp:
3195         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): Deleted.
3196         * UIProcess/WebProcessProxy.h:
3197
3198 2015-10-31  Andy Estes  <aestes@apple.com>
3199
3200         Replace iOS-only WebKitSystemInterface calls with SPI
3201         https://bugs.webkit.org/show_bug.cgi?id=150763
3202
3203         Reviewed by Darin Adler.
3204
3205         * Platform/ios/AccessibilityIOS.h: Added.
3206         * Platform/ios/AccessibilityIOS.mm: Added.
3207         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
3208         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
3209         * Shared/WebPreferencesStore.cpp:
3210         * UIProcess/API/Cocoa/WKWebView.mm:
3211         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
3212         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
3213         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3214         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
3215         * UIProcess/ios/WKContentView.mm:
3216         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
3217         (-[WKContentView _updateForScreen:]): Ditto.
3218         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
3219         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
3220         * UIProcess/ios/WKContentViewInteraction.mm:
3221         * UIProcess/ios/WebPageProxyIOS.mm:
3222         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
3223         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
3224         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
3225         * WebKit2.xcodeproj/project.pbxproj:
3226         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3227         (InitWebCoreSystemInterface): Deleted.
3228         * WebProcess/WebPage/ios/WebPageIOS.mm:
3229         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
3230
3231 2015-11-02  Commit Queue  <commit-queue@webkit.org>
3232
3233         Unreviewed, rolling out r191902.
3234         https://bugs.webkit.org/show_bug.cgi?id=150811
3235
3236         This change broke iOS builders (Requested by ryanhaddad on
3237         #webkit).
3238
3239         Reverted changeset:
3240
3241         "Replace iOS-only WebKitSystemInterface calls with SPI"
3242         https://bugs.webkit.org/show_bug.cgi?id=150763
3243         http://trac.webkit.org/changeset/191902
3244
3245 2015-10-31  Andy Estes  <aestes@apple.com>
3246
3247         Replace iOS-only WebKitSystemInterface calls with SPI
3248         https://bugs.webkit.org/show_bug.cgi?id=150763
3249
3250         Reviewed by Darin Adler.
3251
3252         * Platform/ios/AccessibilityIOS.h: Added.
3253         * Platform/ios/AccessibilityIOS.mm: Added.
3254         (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
3255         * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
3256         * Shared/WebPreferencesStore.cpp:
3257         * UIProcess/API/Cocoa/WKWebView.mm:
3258         (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
3259         (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
3260         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3261         (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
3262         * UIProcess/ios/WKContentView.mm:
3263         (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
3264         (-[WKContentView _updateForScreen:]): Ditto.
3265         (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
3266         (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
3267         * UIProcess/ios/WKContentViewInteraction.mm:
3268         * UIProcess/ios/WebPageProxyIOS.mm:
3269         (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
3270         (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
3271         (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
3272         * WebKit2.xcodeproj/project.pbxproj:
3273         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3274         (InitWebCoreSystemInterface): Deleted.
3275         * WebProcess/WebPage/ios/WebPageIOS.mm:
3276         (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
3277
3278 2015-11-02  Yongjun Zhang  <yongjun_zhang@apple.com>
3279
3280         Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive.
3281         https://bugs.webkit.org/show_bug.cgi?id=150778
3282
3283         Add methods into WKNavigationDelegatePrivate to notify WebKit client when web process becomes unresponsive
3284         or responsive, which is reported by WebKit::ResponsivenessTimer.
3285
3286         Reviewed by Darin Adler.
3287
3288         * UIProcess/API/APINavigationClient.h: Add two new method processDidBecomeResponsive and processDidBecomeUnresponsive
3289             to NavigationClient; they are called when WebKit::ResponsivenessTimer update its client's state.
3290         (API::NavigationClient::processDidBecomeResponsive):
3291         (API::NavigationClient::processDidBecomeUnresponsive):
3292         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Add two new delegate method to WKNavigationDelegatePrivate:
3293             _webViewWebProcessDidBecomeResponsive: and _webViewWebProcessDidBecomeUnresponsive:
3294         * UIProcess/Cocoa/NavigationState.h: Add new overriding methods processDidBecomeResponsive and processDidBecomeUnresponsive.
3295             Also add a bool member for each method to indicate if the delegate has implement the related method.
3296         * UIProcess/Cocoa/NavigationState.mm:
3297         (WebKit::NavigationState::setNavigationDelegate): Update the new bool members based on the delegate.
3298         (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive): Send the delegate message to navigationDelegate
3299             if _webViewWebProcessDidBecomeResponsive: is implemented.
3300         (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive): Ditto.
3301         * UIProcess/WebPageProxy.cpp:
3302         (WebKit::WebPageProxy::processDidBecomeUnresponsive): Call navigationClient's processDidBecomeUnresponsive if the page proxy
3303             has navigationClient.
3304         (WebKit::WebPageProxy::processDidBecomeResponsive):  Call navigationClient's processDidBecomeResponsive if the page proxy
3305             has navigationClient.
3306
3307 2015-11-02  Beth Dakin  <bdakin@apple.com>
3308
3309         Tapping and holding a link should have a share option
3310         https://bugs.webkit.org/show_bug.cgi?id=150693
3311
3312         Reviewed by Dan Bernstein.
3313
3314         This is a follow-up to the original change. This change fixes non-ascii URLs. 
3315         They should maintain their non-ascii characters when they are shared.
3316
3317         * UIProcess/ios/WKContentViewInteraction.mm:
3318         (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
3319         * UIProcess/ios/WKPDFView.mm:
3320         (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
3321
3322 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3323
3324         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
3325         https://bugs.webkit.org/show_bug.cgi?id=150613
3326
3327         Reviewed by Darin Adler.
3328
3329         * WebProcess/WebPage/WebFrame.cpp:
3330         (WebKit::WebFrame::frameForContext): Renaming impl() to wrapped().
3331         (WebKit::WebFrame::counterValue): Ditto.
3332
3333 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3334
3335         [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
3336         https://bugs.webkit.org/show_bug.cgi?id=150772
3337
3338         Reviewed by Žan Doberšek.
3339
3340         Add GSocketMonitor class to be used by Connection to monitor the
3341         availability of the socket file descriptor instead of using a
3342         GMainLoopSource.
3343
3344         * Platform/IPC/Connection.h:
3345         * Platform/IPC/glib/GSocketMonitor.cpp: Added.
3346         (IPC::GSocketMonitor::~GSocketMonitor):
3347         (IPC::GSocketMonitor::socketSourceCallback):
3348         (IPC::GSocketMonitor::start):
3349         (IPC::GSocketMonitor::stop):
3350         * Platform/IPC/glib/GSocketMonitor.h: Added.
3351         * Platform/IPC/unix/ConnectionUnix.cpp:
3352         (IPC::Connection::platformInvalidate):
3353         (IPC::Connection::open):
3354         * PlatformGTK.cmake:
3355
3356 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3357
3358         [GTK] Use RunLoop in WorkQueue implementation
3359         https://bugs.webkit.org/show_bug.cgi?id=150770
3360
3361         Reviewed by Darin Adler.
3362
3363         * Platform/IPC/unix/ConnectionUnix.cpp:
3364         (IPC::Connection::open): Get the main context from the WorkQueue Runloop.
3365
3366 2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3367
3368         [ES6] Support Generator Syntax
3369         https://bugs.webkit.org/show_bug.cgi?id=150769
3370
3371         Reviewed by Geoffrey Garen.
3372
3373         Added ENABLE_ES6_GENERATORS flag.
3374
3375         * Configurations/FeatureDefines.xcconfig:
3376
3377 2015-11-01  Brent Fulgham  <bfulgham@apple.com>
3378
3379         Use convenience function in sandbox profile
3380         https://bugs.webkit.org/show_bug.cgi?id=150732
3381         <rdar://problem/23287894>
3382
3383         Reviewed by Alexey Proskuryakov.
3384
3385         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Switch to
3386         the 'awd-log-directory' convenience function.
3387
3388 2015-11-01  Joonghun Park  <jh718.park@samsung.com>
3389
3390         [EFL] Fix inappropriate move semantics use in parseAndRemoveEnvironments function
3391         https://bugs.webkit.org/show_bug.cgi?id=150544
3392
3393         Reviewed by Darin Adler.
3394
3395         In parseAndRemoveEnvironments function, it declares its paramerter type as rvalue.
3396         But in ProcessLauncher::launchProcess(), the argument of
3397         parseAndRemoveEnvironments still be used after the call of the function.
3398         Currently the rvalue is not assigned to any other variable in parseAndRemoveEnvironments,
3399         so it doesn't lead to runtime error but use of move semantic
3400         is not appropriate semantically in this case.
3401
3402         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3403         (WebKit::parseAndRemoveEnvironments):
3404         (WebKit::ProcessLauncher::launchProcess):
3405
3406 2015-11-01  Commit Queue  <commit-queue@webkit.org>
3407
3408         Unreviewed, rolling out r191831.
3409         https://bugs.webkit.org/show_bug.cgi?id=150774
3410
3411         The new test fails (Requested by ap on #webkit).
3412
3413         Reverted changeset:
3414
3415         "Begin work on supporting reply blocks in
3416         _WKRemoteObjectRegistry"
3417         https://bugs.webkit.org/show_bug.cgi?id=150739
3418         http://trac.webkit.org/changeset/191831
3419
3420 2015-11-01  Philip Chimento  <philip.chimento@gmail.com>
3421
3422         [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
3423         https://bugs.webkit.org/show_bug.cgi?id=144560
3424
3425         Reviewed by Darin Adler.
3426
3427         * NetworkProcess/NetworkProcess.cpp:
3428         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
3429         Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
3430         so that we can use Unix domain sockets even on Darwin for the GTK
3431         platform.
3432         * Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
3433         to OS(DARWIN) check, in order to support GTK platform on OSX.
3434         * Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
3435         USE(UNIX_DOMAIN_SOCKETS) checks throughout.
3436         (IPC::Attachment::size):
3437         (IPC::Attachment::releaseFileDescriptor):
3438         (IPC::Attachment::fileDescriptor):
3439         (IPC::Attachment::disposition):
3440         (IPC::Attachment::port): 
3441         * Platform/IPC/Connection.h: Ditto.
3442         (IPC::Connection::identifierIsNull):
3443         (IPC::Connection::Identifier::Identifier): 
3444         (IPC::Connection::xpcConnection): 
3445         * Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
3446         if the platform is not GTK, because otherwise the PLATFORM(GTK)
3447         check below is never reached.
3448         * Platform/SharedMemory.h: Change order of OS(DARWIN) and
3449         USE(UNIX_DOMAIN_SOCKETS) checks.
3450         * PluginProcess/PluginProcess.cpp: Ditto.
3451         (WebKit::PluginProcess::createWebProcessConnection):