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