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