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