1 2015-11-20 Geoffrey Garen <ggaren@apple.com>
3 A hung webpage pretends to be responsive if you scroll
4 https://bugs.webkit.org/show_bug.cgi?id=151518
6 Reviewed by Sam Weinig.
8 * UIProcess/WebPageProxy.cpp:
9 (WebKit::WebPageProxy::sendWheelEvent):
10 (WebKit::WebPageProxy::didReceiveEvent): Don't treat wheel events as
11 starting or stopping the responsiveness timer. Wheel events usually
12 process on the event dispatch thread, which responds even if the main
15 Instead, send an out-of-band ping to the main thread to verify that
16 it is still responsive and we'll be able to paint and respond to clicks
19 * UIProcess/WebProcessProxy.cpp:
20 (WebKit::WebProcessProxy::sendMainThreadPing):
21 (WebKit::WebProcessProxy::didReceiveMainThreadPing):
22 * UIProcess/WebProcessProxy.h:
23 * UIProcess/WebProcessProxy.messages.in: UI process support for pinging
24 the main thread in the web process.
26 * WebProcess/WebProcess.cpp:
27 (WebKit::WebProcess::mainThreadPing):
28 * WebProcess/WebProcess.h:
29 * WebProcess/WebProcess.messages.in: Web process support for responding
32 2015-11-20 Simon Fraser <simon.fraser@apple.com>
34 Allow more buffer formats in the IOSurface pool
35 https://bugs.webkit.org/show_bug.cgi?id=151516
37 Reviewed by Tim Horton.
39 Have RemoteLayerBackingStore go through a static function on IOSurface to return
40 a surface to the pool, rather than knowing about IOSurfacePool directly.
42 * Shared/mac/RemoteLayerBackingStore.mm:
43 (WebKit::RemoteLayerBackingStore::Buffer::discard):
45 2015-11-20 Alex Christensen <achristensen@webkit.org>
47 Remove NETWORK_PROCESS compile flag
48 https://bugs.webkit.org/show_bug.cgi?id=151512
50 Reviewed by Tim Horton.
53 * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
55 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
56 (NetworkServiceInitializer):
57 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
58 (WebKit::NetworkBlobRegistry::filesInBlob):
59 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
60 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
61 (WebKit::NetworkConnectionToWebProcess::blobSize):
62 * NetworkProcess/NetworkConnectionToWebProcess.h:
63 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
64 * NetworkProcess/NetworkLoad.cpp:
65 * NetworkProcess/NetworkLoad.h:
66 * NetworkProcess/NetworkLoadClient.h:
67 * NetworkProcess/NetworkLoadParameters.cpp:
68 (WebKit::NetworkLoadParameters::NetworkLoadParameters):
69 * NetworkProcess/NetworkLoadParameters.h:
70 * NetworkProcess/NetworkProcess.cpp:
71 * NetworkProcess/NetworkProcess.h:
72 * NetworkProcess/NetworkProcess.messages.in:
73 * NetworkProcess/NetworkResourceLoader.cpp:
74 * NetworkProcess/NetworkResourceLoader.h:
75 * NetworkProcess/NetworkResourceLoader.messages.in:
76 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
77 (WebKit::NetworkProcess::clearDiskCache):
78 * NetworkProcess/efl/NetworkProcessMainEfl.cpp:
79 (WebKit::NetworkProcessMainUnix):
80 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
81 (WebKit::NetworkProcessMainUnix):
82 * NetworkProcess/ios/NetworkProcessIOS.mm:
83 * NetworkProcess/mac/NetworkLoadMac.mm:
84 * NetworkProcess/mac/NetworkProcessMac.mm:
85 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
86 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
87 * NetworkProcess/soup/NetworkProcessSoup.cpp:
88 (WebKit::NetworkProcess::platformTerminate):
89 * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
90 (WebKit::RemoteNetworkingContext::storageSession):
91 * Shared/Authentication/AuthenticationManager.cpp:
92 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
93 * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
94 (WebKit::CustomProtocolManager::initialize):
95 (WebKit::CustomProtocolManager::addCustomProtocol):
96 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
97 * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
98 (WebKit::CustomProtocolManager::supplementName):
99 (WebKit::CustomProtocolManager::initialize):
100 (WebKit::CustomProtocolManager::registerScheme):
101 * Shared/Network/NetworkProcessCreationParameters.cpp:
102 (WebKit::NetworkProcessCreationParameters::decode):
103 * Shared/Network/NetworkProcessCreationParameters.h:
104 * Shared/Network/NetworkProcessSupplement.h:
105 (WebKit::NetworkProcessSupplement::initialize):
106 * Shared/Network/NetworkResourceLoadParameters.cpp:
107 (WebKit::NetworkResourceLoadParameters::decode):
108 * Shared/Network/NetworkResourceLoadParameters.h:
109 * Shared/ProcessExecutablePath.h:
110 * Shared/WebProcessCreationParameters.cpp:
111 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
112 (WebKit::WebProcessCreationParameters::encode):
113 (WebKit::WebProcessCreationParameters::decode):
114 * Shared/WebProcessCreationParameters.h:
115 * Shared/efl/ProcessExecutablePathEfl.cpp:
116 (WebKit::executablePathOfPluginProcess):
117 (WebKit::executablePathOfNetworkProcess):
118 (WebKit::executablePathOfDatabaseProcess):
119 * Shared/gtk/ProcessExecutablePathGtk.cpp:
120 (WebKit::executablePathOfPluginProcess):
121 (WebKit::executablePathOfNetworkProcess):
122 (WebKit::executablePathOfDatabaseProcess):
123 * Shared/mac/CookieStorageShim.h:
124 * Shared/mac/CookieStorageShim.mm:
125 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
126 * Shared/mac/CookieStorageShimLibrary.cpp:
127 * Shared/mac/CookieStorageShimLibrary.h:
128 * UIProcess/API/APISession.cpp:
129 (API::Session::~Session):
130 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
131 (WKContextGetNetworkProcessIdentifier):
132 * UIProcess/API/efl/ewk_context.cpp:
133 (ewk_context_process_model_set):
134 (ewk_context_process_model_get):
135 (ewk_context_tls_error_policy_get):
136 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
137 (WebKit::WebProcessPool::updateProcessSuppressionState):
138 (WebKit::WebProcessPool::platformInitializeWebProcess):
139 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
140 (WebKit::WebProcessPool::platformInvalidateContext):
141 * UIProcess/Downloads/DownloadProxy.cpp:
142 (WebKit::DownloadProxy::cancel):
143 * UIProcess/Launcher/ProcessLauncher.cpp:
144 (WebKit::ProcessLauncher::processTypeAsString):
145 (WebKit::ProcessLauncher::getProcessTypeFromString):
146 * UIProcess/Launcher/ProcessLauncher.h:
147 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
148 (WebKit::ProcessLauncher::launchProcess):
149 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
150 (WebKit::ProcessLauncher::launchProcess):
151 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
152 (WebKit::computeProcessShimPath):
153 (WebKit::serviceName):
154 (WebKit::shouldLeakBoost):
155 (WebKit::createProcess):
156 * UIProcess/Network/NetworkProcessProxy.cpp:
157 (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
158 * UIProcess/Network/NetworkProcessProxy.h:
159 * UIProcess/Network/NetworkProcessProxy.messages.in:
160 * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
161 (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
162 * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
163 (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
164 * UIProcess/WebCookieManagerProxy.cpp:
165 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
166 (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
167 * UIProcess/WebPageProxy.cpp:
168 (WebKit::WebPageProxy::WebPageProxy):
169 (WebKit::WebPageProxy::setSessionID):
170 (WebKit::WebPageProxy::initializeWebPage):
171 * UIProcess/WebProcessPool.cpp:
172 (WebKit::WebProcessPool::WebProcessPool):
173 (WebKit::WebProcessPool::~WebProcessPool):
174 (WebKit::WebProcessPool::initializeClient):
175 (WebKit::WebProcessPool::networkingProcessConnection):
176 (WebKit::WebProcessPool::languageChanged):
177 (WebKit::WebProcessPool::setUsesNetworkProcess):
178 (WebKit::WebProcessPool::usesNetworkProcess):
179 (WebKit::WebProcessPool::ensureNetworkProcess):
180 (WebKit::WebProcessPool::getNetworkProcessConnection):
181 (WebKit::WebProcessPool::ensureDatabaseProcess):
182 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
183 (WebKit::WebProcessPool::createNewWebProcess):
184 (WebKit::WebProcessPool::download):
185 (WebKit::WebProcessPool::resumeDownload):
186 (WebKit::WebProcessPool::setAdditionalPluginsDirectory):
187 (WebKit::WebProcessPool::networkProcessIdentifier):
188 (WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
189 (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
190 (WebKit::WebProcessPool::registerURLSchemeAsLocal):
191 (WebKit::WebProcessPool::setCacheModel):
192 (WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
193 (WebKit::WebProcessPool::createDownloadProxy):
194 (WebKit::WebProcessPool::useTestingNetworkSession):
195 (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
196 (WebKit::WebProcessPool::requestNetworkingStatistics):
197 (WebKit::WebProcessPool::handleMessage):
198 * UIProcess/WebProcessPool.h:
199 (WebKit::WebProcessPool::sendToNetworkingProcess):
200 (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
201 * UIProcess/WebProcessProxy.cpp:
202 (WebKit::WebProcessProxy::getPluginProcessConnection):
203 (WebKit::WebProcessProxy::getNetworkProcessConnection):
204 (WebKit::WebProcessProxy::getDatabaseProcessConnection):
205 (WebKit::WebProcessProxy::createDownloadProxy):
206 (WebKit::WebProcessProxy::didCancelProcessSuspension):
207 (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
208 (WebKit::WebProcessProxy::didSetAssertionState):
209 * UIProcess/WebProcessProxy.h:
210 (WebKit::WebProcessProxy::throttler):
211 * UIProcess/WebProcessProxy.messages.in:
212 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
213 (WebKit::WebsiteDataStore::~WebsiteDataStore):
214 (WebKit::WebsiteDataStore::cloneSessionData):
215 * UIProcess/gtk/WebProcessPoolGtk.cpp:
216 (WebKit::initInspectorServer):
217 (WebKit::WebProcessPool::setIgnoreTLSErrors):
218 * UIProcess/soup/WebProcessPoolSoup.cpp:
219 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
221 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
222 (WebKit::BlobRegistryProxy::blobSize):
223 * WebProcess/FileAPI/BlobRegistryProxy.h:
224 * WebProcess/Network/NetworkProcessConnection.cpp:
225 * WebProcess/Network/NetworkProcessConnection.h:
226 * WebProcess/Network/NetworkProcessConnection.messages.in:
227 * WebProcess/Network/WebResourceLoadScheduler.cpp:
228 (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
229 * WebProcess/Network/WebResourceLoadScheduler.h:
230 * WebProcess/Network/WebResourceLoader.cpp:
231 * WebProcess/Network/WebResourceLoader.h:
232 * WebProcess/Network/WebResourceLoader.messages.in:
233 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
234 (WebKit::initializeBrowserFuncs):
235 (WebKit::netscapeBrowserFuncs):
236 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
237 (WebKit::NetscapePlugin::registerRedirect):
238 (WebKit::NetscapePlugin::urlRedirectResponse):
239 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
240 (WebKit::WebPlatformStrategies::cookiesForDOM):
241 (WebKit::WebPlatformStrategies::setCookiesFromDOM):
242 (WebKit::WebPlatformStrategies::cookiesEnabled):
243 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
244 (WebKit::WebPlatformStrategies::getRawCookies):
245 (WebKit::WebPlatformStrategies::deleteCookie):
246 (WebKit::WebPlatformStrategies::resourceLoadScheduler):
247 (WebKit::WebPlatformStrategies::createBlobRegistry):
248 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
249 * WebProcess/WebPage/WebFrame.cpp:
250 (WebKit::WebFrame::startDownload):
251 (WebKit::WebFrame::convertMainResourceLoadToDownload):
252 * WebProcess/WebProcess.cpp:
253 (WebKit::WebProcess::WebProcess):
254 (WebKit::WebProcess::initializeWebProcess):
255 (WebKit::WebProcess::ensureNetworkProcessConnection):
256 (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
257 (WebKit::WebProcess::usesNetworkProcess):
258 (WebKit::WebProcess::networkConnection):
259 (WebKit::WebProcess::webResourceLoadScheduler):
260 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
261 (WebKit::WebProcess::prefetchDNS):
262 * WebProcess/WebProcess.h:
265 2015-11-19 Simon Fraser <simon.fraser@apple.com>
267 Back-buffer to front-buffer copy fails for some buffer formats
268 https://bugs.webkit.org/show_bug.cgi?id=151475
269 rdar://problem/23617899
271 Reviewed by Tim Horton.
273 When displaying RemoteLayerBackingStore, we copy the back buffer to the front
274 buffer before painting the updated regions. For buffers using Format::RGB10A8,
275 the CGImage-based copy fails, so in this case, use IOSurface::copyToSurface().
277 Reorganized RemoteLayerBackingStore::drawInContext() to make this a bit easier
278 to understand. First, we either copy the entire surface over, or paint the backImage.
279 Then we clip to the dirty rects, and clear them, then paint the layer contents.
281 * Shared/mac/RemoteLayerBackingStore.mm:
282 (WebKit::RemoteLayerBackingStore::display):
283 (WebKit::RemoteLayerBackingStore::drawInContext):
285 2015-11-19 Commit Queue <commit-queue@webkit.org>
287 Unreviewed, rolling out r192667 and r192668.
288 https://bugs.webkit.org/show_bug.cgi?id=151476
290 broke api tests (Requested by alexchristensen on #webkit).
294 "Remove the non-NetworkProcess configurations"
295 https://bugs.webkit.org/show_bug.cgi?id=151418
296 http://trac.webkit.org/changeset/192667
298 "Fix GTK Build after r192667."
299 http://trac.webkit.org/changeset/192668
301 2015-11-19 Alex Christensen <achristensen@webkit.org>
303 Fix GTK Build after r192667.
305 * UIProcess/API/gtk/WebKitWebContext.cpp:
306 (webkitWebContextConstructed):
307 (webkit_web_context_set_process_model):
308 (webkit_web_context_get_process_model):
309 (toWebKitProcessModel): Deleted.
310 (injectedBundleDirectory): Deleted.
312 2015-11-19 Alex Christensen <achristensen@webkit.org>
314 Remove the non-NetworkProcess configurations
315 https://bugs.webkit.org/show_bug.cgi?id=151418
317 Reviewed by Geoffrey Garen.
319 This patch assumes ENABLE(NETWORK_PROCESS) is always 1, usesNetworkProcess is always true,
320 and ProcessModel is always ProcessModelMultipleSecondaryProcesses. It does this by removing
321 the checks and the code that would be executed with other configurations.
324 * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
325 (NetworkProcessMain):
326 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
327 (NetworkServiceInitializer):
328 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
329 (WebKit::NetworkBlobRegistry::filesInBlob):
330 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
331 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
332 (WebKit::NetworkConnectionToWebProcess::blobSize):
333 * NetworkProcess/NetworkConnectionToWebProcess.h:
334 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
335 * NetworkProcess/NetworkLoad.cpp:
336 * NetworkProcess/NetworkLoad.h:
337 * NetworkProcess/NetworkLoadClient.h:
338 * NetworkProcess/NetworkLoadParameters.cpp:
339 (WebKit::NetworkLoadParameters::NetworkLoadParameters):
340 * NetworkProcess/NetworkLoadParameters.h:
341 * NetworkProcess/NetworkProcess.cpp:
342 * NetworkProcess/NetworkProcess.h:
343 * NetworkProcess/NetworkProcess.messages.in:
344 * NetworkProcess/NetworkResourceLoader.cpp:
345 * NetworkProcess/NetworkResourceLoader.h:
346 * NetworkProcess/NetworkResourceLoader.messages.in:
347 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
348 (WebKit::NetworkProcess::clearDiskCache):
349 * NetworkProcess/efl/NetworkProcessMainEfl.cpp:
350 (WebKit::NetworkProcessMainUnix):
351 * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
352 (WebKit::NetworkProcessMainUnix):
353 * NetworkProcess/ios/NetworkProcessIOS.mm:
354 * NetworkProcess/mac/NetworkLoadMac.mm:
355 * NetworkProcess/mac/NetworkProcessMac.mm:
356 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
357 * NetworkProcess/soup/NetworkProcessSoup.cpp:
358 (WebKit::NetworkProcess::platformTerminate):
359 * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
360 (WebKit::RemoteNetworkingContext::storageSession):
361 * Shared/API/c/WKDeprecatedFunctions.cpp:
362 (WKInspectorToggleJavaScriptProfiling):
363 (WKContextSetProcessModel):
364 (WKContextGetProcessModel):
365 (WKContextSetUsesNetworkProcess):
366 (WKGraphicsContextGetCGContext):
367 * Shared/Authentication/AuthenticationManager.cpp:
368 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
369 * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
370 (WebKit::CustomProtocolManager::initialize):
371 (WebKit::CustomProtocolManager::addCustomProtocol):
372 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
373 * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
374 (WebKit::CustomProtocolManager::supplementName):
375 (WebKit::CustomProtocolManager::initialize):
376 (WebKit::CustomProtocolManager::registerScheme):
377 * Shared/Network/NetworkProcessCreationParameters.cpp:
378 (WebKit::NetworkProcessCreationParameters::decode):
379 * Shared/Network/NetworkProcessCreationParameters.h:
380 * Shared/Network/NetworkProcessSupplement.h:
381 (WebKit::NetworkProcessSupplement::initialize):
382 * Shared/Network/NetworkResourceLoadParameters.cpp:
383 (WebKit::NetworkResourceLoadParameters::decode):
384 * Shared/Network/NetworkResourceLoadParameters.h:
385 * Shared/ProcessExecutablePath.h:
386 * Shared/WebProcessCreationParameters.cpp:
387 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
388 (WebKit::WebProcessCreationParameters::encode):
389 (WebKit::WebProcessCreationParameters::decode):
390 * Shared/WebProcessCreationParameters.h:
391 * Shared/efl/ProcessExecutablePathEfl.cpp:
392 (WebKit::executablePathOfPluginProcess):
393 (WebKit::executablePathOfNetworkProcess):
394 (WebKit::executablePathOfDatabaseProcess):
395 * Shared/gtk/ProcessExecutablePathGtk.cpp:
396 (WebKit::executablePathOfPluginProcess):
397 (WebKit::executablePathOfNetworkProcess):
398 (WebKit::executablePathOfDatabaseProcess):
399 * Shared/mac/CookieStorageShim.h:
400 * Shared/mac/CookieStorageShim.mm:
401 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
402 * Shared/mac/CookieStorageShimLibrary.cpp:
403 * Shared/mac/CookieStorageShimLibrary.h:
404 * UIProcess/API/APIProcessPoolConfiguration.cpp:
405 (API::ProcessPoolConfiguration::createWithLegacyOptions):
406 (API::ProcessPoolConfiguration::copy):
407 * UIProcess/API/APIProcessPoolConfiguration.h:
408 * UIProcess/API/APISession.cpp:
409 (API::Session::~Session):
410 * UIProcess/API/C/WKAPICast.h:
412 (WebKit::toFontSmoothingLevel):
413 (WebKit::toProcessModel): Deleted.
414 * UIProcess/API/C/WKContext.cpp:
415 (WKContextGetCacheModel):
416 (WKContextSetMaximumNumberOfProcesses):
417 (WKContextSetJavaScriptGarbageCollectorTimerEnabled):
418 (WKContextUseTestingNetworkSession):
419 (WKContextSetProcessModel): Deleted.
420 (WKContextGetProcessModel): Deleted.
421 (WKContextSetUsesNetworkProcess): Deleted.
422 * UIProcess/API/C/WKContext.h:
423 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
424 (WKContextGetNetworkProcessIdentifier):
425 * UIProcess/API/Cocoa/WKProcessGroup.mm:
426 (-[WKProcessGroup initWithInjectedBundleURL:]):
427 * UIProcess/API/Cocoa/WKProcessPool.mm:
428 * UIProcess/API/efl/ewk_context.cpp:
429 (ewk_context_process_model_set):
430 (ewk_context_process_model_get):
431 (ewk_context_tls_error_policy_get):
432 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
433 (WebKit::WebProcessPool::updateProcessSuppressionState):
434 (WebKit::WebProcessPool::platformInitializeWebProcess):
435 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
436 (WebKit::WebProcessPool::platformInvalidateContext):
437 * UIProcess/Downloads/DownloadProxy.cpp:
438 (WebKit::DownloadProxy::cancel):
439 (WebKit::DownloadProxy::invalidate):
440 * UIProcess/Launcher/ProcessLauncher.cpp:
441 (WebKit::ProcessLauncher::processTypeAsString):
442 (WebKit::ProcessLauncher::getProcessTypeFromString):
443 * UIProcess/Launcher/ProcessLauncher.h:
444 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
445 (WebKit::ProcessLauncher::launchProcess):
446 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
447 (WebKit::ProcessLauncher::launchProcess):
448 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
449 (WebKit::computeProcessShimPath):
450 (WebKit::serviceName):
451 (WebKit::shouldLeakBoost):
452 (WebKit::createProcess):
453 * UIProcess/Network/NetworkProcessProxy.cpp:
454 (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
455 * UIProcess/Network/NetworkProcessProxy.h:
456 * UIProcess/Network/NetworkProcessProxy.messages.in:
457 * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
458 (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
459 * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
460 (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
461 * UIProcess/ProcessModel.h: Removed.
462 * UIProcess/WebCookieManagerProxy.cpp:
463 (WebKit::WebCookieManagerProxy::shouldTerminate):
464 (WebKit::WebCookieManagerProxy::refWebContextSupplement):
465 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
466 (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
467 * UIProcess/WebInspectorProxy.cpp:
468 (WebKit::WebInspectorProxy::inspectorProcessPool):
469 * UIProcess/WebPageProxy.cpp:
470 (WebKit::WebPageProxy::WebPageProxy):
471 (WebKit::WebPageProxy::reattachToWebProcess):
472 (WebKit::WebPageProxy::setSessionID):
473 (WebKit::WebPageProxy::initializeWebPage):
474 * UIProcess/WebProcessPool.cpp:
475 (WebKit::WebProcessPool::create):
476 (WebKit::WebProcessPool::WebProcessPool):
477 (WebKit::WebProcessPool::~WebProcessPool):
478 (WebKit::WebProcessPool::initializeClient):
479 (WebKit::WebProcessPool::setDownloadClient):
480 (WebKit::WebProcessPool::setMaximumNumberOfProcesses):
481 (WebKit::WebProcessPool::networkingProcessConnection):
482 (WebKit::WebProcessPool::languageChanged):
483 (WebKit::WebProcessPool::textCheckerStateChanged):
484 (WebKit::WebProcessPool::ensureNetworkProcess):
485 (WebKit::WebProcessPool::getNetworkProcessConnection):
486 (WebKit::WebProcessPool::ensureDatabaseProcess):
487 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
488 (WebKit::WebProcessPool::processDidCachePage):
489 (WebKit::WebProcessPool::createNewWebProcess):
490 (WebKit::WebProcessPool::disconnectProcess):
491 (WebKit::WebProcessPool::createWebPage):
492 (WebKit::WebProcessPool::download):
493 (WebKit::WebProcessPool::resumeDownload):
494 (WebKit::WebProcessPool::postMessageToInjectedBundle):
495 (WebKit::WebProcessPool::setAdditionalPluginsDirectory):
496 (WebKit::WebProcessPool::networkProcessIdentifier):
497 (WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
498 (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
499 (WebKit::WebProcessPool::registerURLSchemeAsLocal):
500 (WebKit::WebProcessPool::setCacheModel):
501 (WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
502 (WebKit::WebProcessPool::createDownloadProxy):
503 (WebKit::WebProcessPool::addMessageReceiver):
504 (WebKit::WebProcessPool::useTestingNetworkSession):
505 (WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
506 (WebKit::WebProcessPool::requestWebContentStatistics):
507 (WebKit::WebProcessPool::requestNetworkingStatistics):
508 (WebKit::WebProcessPool::handleMessage):
509 (WebKit::WebProcessPool::setProcessModel): Deleted.
510 (WebKit::WebProcessPool::setUsesNetworkProcess): Deleted.
511 (WebKit::WebProcessPool::usesNetworkProcess): Deleted.
512 (WebKit::WebProcessPool::ensureSharedWebProcess): Deleted.
513 * UIProcess/WebProcessPool.h:
514 (WebKit::WebProcessPool::sendToNetworkingProcess):
515 (WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
516 (WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
517 (WebKit::WebProcessPool::sendToOneProcess):
518 * UIProcess/WebProcessProxy.cpp:
519 (WebKit::WebProcessProxy::removeWebPage):
520 (WebKit::WebProcessProxy::getPluginProcessConnection):
521 (WebKit::WebProcessProxy::getNetworkProcessConnection):
522 (WebKit::WebProcessProxy::getDatabaseProcessConnection):
523 (WebKit::WebProcessProxy::updateTextCheckerState):
524 (WebKit::WebProcessProxy::didSaveToPageCache):
525 (WebKit::WebProcessProxy::didCancelProcessSuspension):
526 (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
527 (WebKit::WebProcessProxy::didSetAssertionState):
528 (WebKit::WebProcessProxy::createDownloadProxy): Deleted.
529 * UIProcess/WebProcessProxy.h:
530 (WebKit::WebProcessProxy::throttler):
531 * UIProcess/WebProcessProxy.messages.in:
532 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
533 (WebKit::WebsiteDataStore::~WebsiteDataStore):
534 (WebKit::WebsiteDataStore::cloneSessionData):
535 * UIProcess/gtk/WebProcessPoolGtk.cpp:
536 (WebKit::initInspectorServer):
537 (WebKit::WebProcessPool::platformInitializeWebProcess):
538 (WebKit::WebProcessPool::setIgnoreTLSErrors):
539 * UIProcess/soup/WebProcessPoolSoup.cpp:
540 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
541 * WebKit2.xcodeproj/project.pbxproj:
543 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
544 (WebKit::BlobRegistryProxy::registerFileBlobURL):
545 (WebKit::BlobRegistryProxy::registerBlobURL):
546 (WebKit::BlobRegistryProxy::unregisterBlobURL):
547 (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
548 (WebKit::BlobRegistryProxy::blobSize):
549 * WebProcess/FileAPI/BlobRegistryProxy.h:
550 * WebProcess/Network/NetworkProcessConnection.cpp:
551 * WebProcess/Network/NetworkProcessConnection.h:
552 * WebProcess/Network/NetworkProcessConnection.messages.in:
553 * WebProcess/Network/WebResourceLoadScheduler.cpp:
554 (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
555 * WebProcess/Network/WebResourceLoadScheduler.h:
556 * WebProcess/Network/WebResourceLoader.cpp:
557 * WebProcess/Network/WebResourceLoader.h:
558 * WebProcess/Network/WebResourceLoader.messages.in:
559 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
560 (WebKit::initializeBrowserFuncs):
561 (WebKit::netscapeBrowserFuncs):
562 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
563 (WebKit::NetscapePlugin::registerRedirect):
564 (WebKit::NetscapePlugin::urlRedirectResponse):
565 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
566 (WebKit::WebPlatformStrategies::cookiesForDOM):
567 (WebKit::WebPlatformStrategies::setCookiesFromDOM):
568 (WebKit::WebPlatformStrategies::cookiesEnabled):
569 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
570 (WebKit::WebPlatformStrategies::getRawCookies):
571 (WebKit::WebPlatformStrategies::deleteCookie):
572 (WebKit::WebPlatformStrategies::resourceLoadScheduler):
573 (WebKit::WebPlatformStrategies::loadResourceSynchronously):
574 (WebKit::WebPlatformStrategies::createPingHandle):
575 (WebKit::WebPlatformStrategies::createBlobRegistry):
576 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
577 * WebProcess/WebPage/WebFrame.cpp:
578 (WebKit::WebFrame::startDownload):
579 (WebKit::WebFrame::convertMainResourceLoadToDownload):
580 (WebKit::WebFrame::source):
581 * WebProcess/WebProcess.cpp:
582 (WebKit::WebProcess::WebProcess):
583 (WebKit::WebProcess::initializeConnection):
584 (WebKit::WebProcess::initializeWebProcess):
585 (WebKit::WebProcess::ensureNetworkProcessConnection):
586 (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
587 (WebKit::WebProcess::destroyPrivateBrowsingSession):
588 (WebKit::WebProcess::pluginProcessConnectionManager):
589 (WebKit::WebProcess::shouldTerminate):
590 (WebKit::WebProcess::setInjectedBundleParameters):
591 (WebKit::WebProcess::networkConnection):
592 (WebKit::WebProcess::webResourceLoadScheduler):
593 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
594 (WebKit::WebProcess::setEnhancedAccessibility):
595 (WebKit::WebProcess::prefetchDNS):
596 (WebKit::WebProcess::didCreateDownload): Deleted.
597 (WebKit::WebProcess::didDestroyDownload): Deleted.
598 (WebKit::WebProcess::downloadProxyConnection): Deleted.
599 (WebKit::WebProcess::downloadsAuthenticationManager): Deleted.
600 (WebKit::WebProcess::downloadManager): Deleted.
601 (WebKit::WebProcess::usesNetworkProcess): Deleted.
602 (WebKit::WebProcess::downloadRequest): Deleted.
603 (WebKit::WebProcess::resumeDownload): Deleted.
604 (WebKit::WebProcess::cancelDownload): Deleted.
605 * WebProcess/WebProcess.h:
606 (WebKit::WebProcess::textCheckerState):
607 (WebKit::WebProcess::eventDispatcher):
608 * WebProcess/WebProcess.messages.in:
609 * WebProcess/soup/WebProcessSoup.cpp:
610 (WebKit::WebProcess::platformSetCacheModel):
611 (WebKit::WebProcess::platformClearResourceCaches):
612 (WebKit::WebProcess::platformInitializeWebProcess):
613 (WebKit::WebProcess::platformTerminate):
614 (WebKit::WebProcess::setIgnoreTLSErrors):
615 (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost):
616 (WebKit::getCacheDiskFreeSize): Deleted.
617 (WebKit::setSoupSessionAcceptLanguage): Deleted.
618 (WebKit::languageChanged): Deleted.
621 2015-11-19 Csaba Osztrogonác <ossy@webkit.org>
623 [EFL] Fix Wreturn-type clang warning in EWK2UnitTestBase.cpp
624 https://bugs.webkit.org/show_bug.cgi?id=151444
626 Reviewed by Darin Adler.
628 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
629 (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
631 2015-11-19 Csaba Osztrogonác <ossy@webkit.org>
633 [EFL] Fix -Winconsistent-missing-override clang warnings
634 https://bugs.webkit.org/show_bug.cgi?id=151443
636 Reviewed by Darin Adler.
638 * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
639 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
640 * UIProcess/CoordinatedGraphics/WebView.h:
641 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
642 (WebKit::CoordinatedDrawingArea::layerTreeStateIsFrozen):
643 (WebKit::CoordinatedDrawingArea::layerTreeHost):
644 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
645 (WebKit::CoordinatedLayerTreeHost::layerTreeContext):
646 (WebKit::CoordinatedLayerTreeHost::pauseRendering):
647 (WebKit::CoordinatedLayerTreeHost::resumeRendering):
649 2015-11-18 Alex Christensen <achristensen@webkit.org>
651 Progress towards implementing Downloads with NETWORK_SESSION
652 https://bugs.webkit.org/show_bug.cgi?id=151414
654 Reviewed begrudgingly by Brady Eidson.
656 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
657 (WebKit::storageSession):
658 (WebKit::NetworkConnectionToWebProcess::startDownload):
659 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
660 * NetworkProcess/NetworkConnectionToWebProcess.h:
661 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
662 * NetworkProcess/NetworkLoad.cpp:
663 (WebKit::NetworkLoad::NetworkLoad):
664 (WebKit::NetworkLoad::didReceiveChallenge):
665 (WebKit::NetworkLoad::didReceiveResponse):
666 (WebKit::NetworkLoad::didReceiveData):
667 * NetworkProcess/NetworkLoad.h:
668 * NetworkProcess/NetworkProcess.cpp:
669 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
670 (WebKit::NetworkProcess::downloadRequest):
671 (WebKit::NetworkProcess::resumeDownload):
672 * NetworkProcess/NetworkProcess.h:
673 * NetworkProcess/NetworkProcess.messages.in:
674 * NetworkProcess/NetworkResourceLoader.cpp:
675 (WebKit::NetworkResourceLoader::cleanup):
676 (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
677 (WebKit::NetworkResourceLoader::abort):
678 * NetworkProcess/NetworkResourceLoader.h:
679 * NetworkProcess/NetworkSession.h:
680 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
681 (toNSURLSessionResponseDisposition):
682 (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
683 (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
684 (-[NetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
685 (-[NetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
686 (-[NetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
687 (-[NetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
688 * Shared/Authentication/AuthenticationManager.cpp:
689 (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
690 (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
691 (WebKit::AuthenticationManager::cancelSingleChallenge):
692 (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
693 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
694 * Shared/Downloads/Download.h:
695 * Shared/Downloads/DownloadManager.cpp:
696 (WebKit::DownloadManager::DownloadManager):
697 (WebKit::DownloadManager::startDownload):
698 (WebKit::DownloadManager::convertHandleToDownload):
699 (WebKit::DownloadManager::resumeDownload):
700 (WebKit::DownloadManager::cancelDownload):
701 (WebKit::DownloadManager::downloadFinished):
702 (WebKit::DownloadManager::didCreateDownload):
703 * Shared/Downloads/DownloadManager.h:
704 (WebKit::DownloadManager::isDownloading):
705 (WebKit::DownloadManager::activeDownloadCount):
706 * Shared/Downloads/mac/DownloadMac.mm:
707 (WebKit::Download::start):
708 (WebKit::Download::startWithHandle):
709 (WebKit::Download::resume):
710 * UIProcess/WebProcessPool.cpp:
711 (WebKit::WebProcessPool::download):
712 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
713 (WebKit::WebFrameLoaderClient::canCachePage):
714 (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload):
715 (WebKit::WebFrameLoaderClient::createFrame):
716 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
717 * WebProcess/WebPage/WebFrame.cpp:
718 (WebKit::WebFrame::startDownload):
719 (WebKit::WebFrame::convertMainResourceLoadToDownload):
720 (WebKit::WebFrame::source):
721 * WebProcess/WebPage/WebFrame.h:
722 * WebProcess/WebProcess.cpp:
723 (WebKit::WebProcess::downloadRequest):
724 (WebKit::WebProcess::resumeDownload):
725 (WebKit::WebProcess::releasePageCache):
726 (WebKit::WebProcess::fetchWebsiteData):
727 * WebProcess/WebProcess.h:
728 * WebProcess/WebProcess.messages.in:
730 2015-11-18 Chris Dumez <cdumez@apple.com>
732 Clean up / optimize NetworkCacheSubresourcesEntry
733 https://bugs.webkit.org/show_bug.cgi?id=151405
735 Reviewed by Antti Koivisto.
737 Clean up / optimize NetworkCacheSubresourcesEntry:
738 - Remove m_sourceStorageRecord data member
739 - Avoid copying the Key when constructing it
741 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
742 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
743 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
744 (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
745 * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
747 2015-11-18 Jer Noble <jer.noble@apple.com>
749 Expose WebCore's AudioPlaybackRequiresUserGesture setting to WebKit & WebKit2
750 https://bugs.webkit.org/show_bug.cgi?id=151274
752 Reviewed by Anders Carlsson.
754 Add a new, private, WKWebViewConfiguration property, _requiresUserActionForAudioPlayback,
755 and use that configuration property to set WebCore's AudioPlaybackRequiresUserGesture setting
756 during page creation.
758 * Shared/WebPreferencesDefinitions.h:
759 * UIProcess/API/C/WKPreferences.cpp:
760 (WKPreferencesSetAudioPlaybackRequiresUserGesture): Add legacy C API for setting this new WK preference.
761 (WKPreferencesGetAudioPlaybackRequiresUserGesture): Ditto.
762 * UIProcess/API/C/WKPreferencesRefPrivate.h:
763 * UIProcess/API/Cocoa/WKWebView.mm:
764 (-[WKWebView initWithFrame:configuration:]): Set the page configuration value from preferences.
765 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
766 (-[WKWebViewConfiguration init]): Default the value of the new configuration property to YES for iOS.
767 (-[WKWebViewConfiguration copyWithZone:]): Copy the value across.
768 (-[WKWebViewConfiguration _requiresUserActionForAudioPlayback]): Simple getter.
769 (-[WKWebViewConfiguration _setRequiresUserActionForAudioPlayback:]): Simple setter.
770 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
771 * WebProcess/WebPage/WebPage.cpp:
772 (WebKit::WebPage::updatePreferences): Set WebCore's audioPlaybackRequiresUserGesture Setting.
774 2015-11-18 Daniel Bates <dabates@apple.com>
776 [iOS] ASSERTION FAILED: temporaryFilePath.last() == '/' in WebCore::openTemporaryFile()
777 https://bugs.webkit.org/show_bug.cgi?id=151392
778 <rdar://problem/23595341>
780 Reviewed by Alexey Proskuryakov.
782 Workaround <rdar://problem/23579077> where confstr(_CS_DARWIN_USER_TEMP_DIR, ..., ...) retrieves
783 the path to the user temporary directory without a trailing slash in the iOS simulator.
785 * Shared/mac/SandboxExtensionMac.mm:
786 (WebKit::SandboxExtension::createHandleForTemporaryFile): Add a path separator (/) between the directory path and filename.
788 2015-11-17 Geoffrey Garen <ggaren@apple.com>
790 A window with a hung tab waits 5s before closing
791 https://bugs.webkit.org/show_bug.cgi?id=151319
793 Reviewed by Anders Carlsson.
795 I manually tested that I did not break unload events upon window close
796 by running run-webkit-httpd and invoking a 1x1 image load of
797 http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
800 * UIProcess/WebPageProxy.cpp:
801 (WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
802 close without waiting for a response.
804 * UIProcess/WebProcessProxy.h:
805 (WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.
807 2015-11-17 Carlos Garcia Campos <cgarcia@igalia.com>
809 [GTK] Web Process crashes on reparenting a WebView with AC mode on
810 https://bugs.webkit.org/show_bug.cgi?id=151139
812 Reviewed by Mario Sanchez Prada.
814 When the web view is reparented, the widget is first unrealized,
815 and then realized again when added to the new parent. In the
816 second realize, the old redirected XComposite window is destroyed
817 and a new one is created, but the web process is still using the
818 old redirected window ID. As soon as the redirected window is
819 destroyed and the web process tries to use the window ID, it
820 crashes due to a BadDrawable X error. We have to notify the web
821 process as soon as the web view is unrealized to stop using the
822 current window ID and exit accelerated compositing mode until a
823 new window ID is given. This notification needs to be synchronous,
824 because the window can be destroyed in the UI process before the
825 message is received in the web process.
827 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
828 (webkitWebViewBaseRealize): Add an assert to ensure we never have
829 a redirected window when the view is realized. Also check drawing
830 area is not nullptr, since it can be destroyed at any time if the
832 (webkitWebViewBaseUnrealize): Call
833 DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
834 and destroy the redirected XComposite window.
835 * UIProcess/DrawingAreaProxyImpl.cpp:
836 (WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing):
837 Send DestroyNativeSurfaceHandleForCompositing synchronous messsage
839 * UIProcess/DrawingAreaProxyImpl.h:
840 * WebProcess/WebPage/DrawingArea.h:
841 * WebProcess/WebPage/DrawingArea.messages.in: Add
842 DestroyNativeSurfaceHandleForCompositing message.
843 * WebProcess/WebPage/DrawingAreaImpl.cpp:
844 (WebKit::DrawingAreaImpl::destroyNativeSurfaceHandleForCompositing):
845 Set the native surface handler for compositing to 0 to reset it.
846 * WebProcess/WebPage/DrawingAreaImpl.h:
847 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
848 (WebKit::LayerTreeHostGtk::makeContextCurrent): Return false
849 early always when layer tree context ID is 0, even if we already
851 (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
852 Cancel any pending layer flush when setting a new handler.
854 2015-11-16 Alex Christensen <achristensen@webkit.org>
856 Fix CMake build and make PluginProcess executable
857 https://bugs.webkit.org/show_bug.cgi?id=151332
859 Reviewed by Tim Horton.
863 2015-11-16 Tim Horton <timothy_horton@apple.com>
865 Multi-WKWebView find completes after the first view
866 https://bugs.webkit.org/show_bug.cgi?id=151325
868 Reviewed by Anders Carlsson.
870 * UIProcess/mac/WKTextFinderClient.mm:
871 (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
872 Update progress before calling the completion handler; NSTextFinder assumes
873 that if the progress doesn't change, the search is complete.
875 2015-11-16 Ryuan Choi <ryuan.choi@navercorp.com>
877 WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function after it's been moved from
878 https://bugs.webkit.org/show_bug.cgi?id=151248
880 Reviewed by Darin Adler.
882 Like r188287, calling an empty std::function results in a std::bad_function_call
883 exception being thrown when sendSync is failed.
885 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
886 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
888 2015-11-16 Beth Dakin <bdakin@apple.com>
890 Add SPI for handling inline link navigation for peek/pop
891 https://bugs.webkit.org/show_bug.cgi?id=151270
893 rdar://problem/22233739
895 Reviewed by Darin Adler.
897 This patch adds three new SPI methods. If a client wants to disable previews
898 entirely for the given element, they should return NO in
899 shouldPreviewElement:. Returning NO in shouldPreviewElement will prevent the
900 other methods from being invoked. The client can provide a custom preview by
901 returning their own UIViewController from
902 previewingViewControllerForElement:defaultActions:. Returning nil will result
903 in the default preview behavior for that element. This will allow clients to
904 implement this method to handle http link navigation inline, but still opt
905 into UIKit’s built-in DataDetectors behaviors for DD links once we start
906 supporting DD links in WK2.
907 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
909 Added linkURL to _WKElementInfo. linkURL will be nil for elements that are
911 * UIProcess/API/Cocoa/_WKElementInfo.h:
912 * UIProcess/API/Cocoa/_WKElementInfo.mm:
913 (-[_WKElementInfo copyWithZone:]):
914 (-[_WKElementInfo linkURL]):
915 * UIProcess/API/Cocoa/_WKElementInfoInternal.h: Added.
917 _WKPreviewingElementInfo inherits from _WKElementInfo. Added a constructor.
918 * UIProcess/API/Cocoa/_WKPreviewElementInfo.h: Added.
919 * UIProcess/API/Cocoa/_WKPreviewElementInfo.mm: Added.
920 (-[_WKPreviewElementInfo _initWithLinkURL:]):
921 * UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h: Added.
923 Invoke shouldPreviewElement:.
924 * UIProcess/ios/WKContentViewInteraction.mm:
925 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
927 Invoke previewingViewControllerForElement: for all potentially preview-able
928 elements that have a default implementations, which will be limited to links
930 (-[WKContentView _presentedViewControllerForPreviewItemController:]):
932 Invoke commitPreviewingViewController:
933 (-[WKContentView _previewItemController:commitPreview:]):
934 * WebKit2.xcodeproj/project.pbxproj:
936 2015-11-16 Anders Carlsson <andersca@apple.com>
938 Add identifier strings for a bunch of context menu items
939 https://bugs.webkit.org/show_bug.cgi?id=151272
941 Reviewed by Dan Bernstein.
943 * UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
944 * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
945 * UIProcess/mac/WebContextMenuProxyMac.mm:
946 (WebKit::menuItemIdentifier):
947 (WebKit::WebContextMenuProxyMac::createShareMenuItem):
948 (WebKit::WebContextMenuProxyMac::createContextMenuItem):
949 * WebKit2.xcodeproj/project.pbxproj:
951 2015-11-16 Simon Fraser <simon.fraser@apple.com>
953 Sort the Xcode project files.
955 * WebKit2.xcodeproj/project.pbxproj:
957 2015-11-13 Commit Queue <commit-queue@webkit.org>
959 Unreviewed, rolling out r192445, r192451, and r192452.
960 https://bugs.webkit.org/show_bug.cgi?id=151291
962 Broke Mavericks build (and thus EWS) (Requested by ap on
967 "Add identifier strings for a bunch of context menu items"
968 https://bugs.webkit.org/show_bug.cgi?id=151272
969 http://trac.webkit.org/changeset/192445
971 "Try to fix the 32-bit build"
972 http://trac.webkit.org/changeset/192451
974 "Try to fix the 32-bit build"
975 http://trac.webkit.org/changeset/192452
977 2015-11-13 Timothy Horton <timothy_horton@apple.com>
979 Try to fix the 32-bit build
981 * UIProcess/mac/WebContextMenuProxyMac.mm:
982 (WebKit::WebContextMenuProxyMac::createShareMenuItem):
984 2015-11-13 Timothy Horton <timothy_horton@apple.com>
986 Try to fix the 32-bit build
988 * UIProcess/mac/WebContextMenuProxyMac.mm:
989 (WebKit::menuItemIdentifier):
991 2015-11-13 Wenson Hsieh <wenson_hsieh@apple.com>
993 WK2 iOS interaction tests in LayoutTests/fast/events/ios are flaky
994 https://bugs.webkit.org/show_bug.cgi?id=151199
995 <rdar://problem/23518459>
997 Reviewed by Tim Horton.
999 While transforming touch positions from document to global coordinates, HIDEventGenerator
1000 sometimes uses an old scale of the webview in computing the transformed position. This happens
1001 in spite of how we force the UI script to run after the UI process receives a layer tree commit
1002 because we invoke the callback before calling WebPageProxy::didCommitLayerTree, which is where
1003 we actually use the layer transaction information to update the WKWebView.
1005 To fix this, we run the drawing-ensured callbacks after committing the layer tree, so the
1006 callbacks will have updated information about the web view's scale and dimensions.
1008 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1009 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1011 2015-11-13 Tim Horton <timothy_horton@apple.com>
1013 Support printing in WKWebView
1014 https://bugs.webkit.org/show_bug.cgi?id=151276
1015 <rdar://problem/23525715>
1017 Reviewed by Beth Dakin.
1019 * UIProcess/API/Cocoa/WKWebView.mm:
1020 (-[WKWebView _printOperationWithPrintInfo:]):
1021 (-[WKWebView _printOperationWithPrintInfo:forFrame:]):
1022 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1023 Expose SPI similar to what we have on WKView.
1025 2015-11-13 Joseph Pecoraro <pecoraro@apple.com>
1027 Follow-up to r192437. Add availability macros.
1029 Reviewed by Tim Horton.
1031 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1033 2015-11-13 Anders Carlsson <andersca@apple.com>
1035 Add identifier strings for a bunch of context menu items
1036 https://bugs.webkit.org/show_bug.cgi?id=151272
1038 Reviewed by Dan Bernstein.
1040 * UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: Added.
1041 * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h: Added.
1042 * UIProcess/mac/WebContextMenuProxyMac.mm:
1043 (WebKit::menuItemIdentifier):
1044 (WebKit::WebContextMenuProxyMac::createShareMenuItem):
1045 (WebKit::WebContextMenuProxyMac::createContextMenuItem):
1046 * WebKit2.xcodeproj/project.pbxproj:
1048 2015-11-13 Joseph Pecoraro <pecoraro@apple.com>
1050 Web Inspector: Provide a way to override the WKWebView remote inspector name
1051 https://bugs.webkit.org/show_bug.cgi?id=151075
1053 Reviewed by Tim Horton.
1055 * Shared/WebPageCreationParameters.cpp:
1056 (WebKit::WebPageCreationParameters::encode):
1057 (WebKit::WebPageCreationParameters::decode):
1058 * Shared/WebPageCreationParameters.h:
1059 * UIProcess/API/Cocoa/WKWebView.mm:
1060 (-[WKWebView _remoteInspectionNameOverride]):
1061 (-[WKWebView _setRemoteInspectionNameOverride:]):
1062 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1063 * UIProcess/WebPageProxy.cpp:
1064 (WebKit::WebPageProxy::setRemoteInspectionNameOverride):
1065 (WebKit::WebPageProxy::creationParameters):
1066 * UIProcess/WebPageProxy.h:
1067 (WebKit::WebPageProxy::remoteInspectionNameOverride):
1068 * WebProcess/WebPage/WebPage.cpp:
1069 (WebKit::m_shouldDispatchFakeMouseMoveEvents):
1070 (WebKit::WebPage::setRemoteInspectionNameOverride):
1071 * WebProcess/WebPage/WebPage.h:
1072 * WebProcess/WebPage/WebPage.messages.in:
1074 2015-11-13 Tim Horton <timothy_horton@apple.com>
1076 Hardware keyboard spacebar scrolls too far on iOS
1077 https://bugs.webkit.org/show_bug.cgi?id=151227
1078 <rdar://problem/23500681>
1080 Reviewed by Simon Fraser.
1082 There were two bugs conspiring here to make spacebar scrolling very wrong on iOS:
1084 1) Incoming key events were being handled twice
1085 - fix this by only propagating the event to super if we don't
1086 end up handling the event ourselves
1088 2) _scrollByOffset was not converting the offset delta out of content coordinates
1089 - fix this by doing the relevant conversion and renaming the function
1090 to make it more clear exactly what it does
1092 * UIProcess/API/Cocoa/WKWebView.mm:
1093 (-[WKWebView _scrollByContentOffset:]):
1094 (-[WKWebView _scrollByOffset:]): Deleted.
1095 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1096 Rename to _scrollByContentOffset to make it clear that this is
1097 in content coordinates, and do the conversion from content coordinates
1098 (apply the scale) so that we scroll by the right amount.
1100 * UIProcess/ios/PageClientImplIOS.mm:
1101 (WebKit::PageClientImpl::doneWithKeyEvent):
1102 Pass whether the event was handled through to WKContentView.
1104 * UIProcess/ios/WKContentViewInteraction.h:
1105 * UIProcess/ios/WKContentViewInteraction.mm:
1106 (-[WKWebEvent dealloc]):
1107 Add WKWebEvent, which is a WebEvent and retains a reference to the UIEvent
1110 (-[WKContentView _handleKeyUIEvent:]):
1111 Only pass the event to super immediately if we don't try to handle it.
1112 We'll re-send it to super asynchronously if we decide not to handle it.
1114 (-[WKContentView handleKeyEvent:]):
1115 If we're in the middle of resending an event we didn't handle the first
1116 time, just ignore it.
1118 Make a WKWebEvent and store the UIEvent on it.
1120 (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
1121 If the event wasn't handled, and is one of our special events with a
1122 wrapped UIEvent, resend it to super. We'll ignore it as noted above.
1124 (-[WKContentView _interpretKeyEvent:isCharEvent:]):
1125 Factor out unobscured content rect retrieval.
1126 Make use of Scrollbar::pageStep to match the Mac behavior of not
1127 scrolling quite a whole page when scrolling with the spacebar.
1129 2015-11-12 Ryuan Choi <ryuan.choi@navercorp.com>
1131 [EFL] Fix wrong test case for window_create since r192196
1132 https://bugs.webkit.org/show_bug.cgi?id=151247
1134 Reviewed by Gyuyoung Kim.
1136 r192196 introduces new test cases for window_create but there are typos which hide bug
1137 This patch fixes typos and split ewk_view_create_window test case.
1139 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1142 2015-11-12 Anders Carlsson <andersca@apple.com>
1144 Add a context menu delegate method that takes a userInfo parameter
1145 https://bugs.webkit.org/show_bug.cgi?id=151232
1147 Reviewed by Tim Horton.
1149 * UIProcess/API/APIContextMenuClient.h:
1150 (API::ContextMenuClient::menuFromProposedMenu):
1151 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1152 * UIProcess/Cocoa/UIDelegate.h:
1153 * UIProcess/Cocoa/UIDelegate.mm:
1154 (WebKit::UIDelegate::setDelegate):
1155 (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1156 * UIProcess/mac/WebContextMenuProxyMac.mm:
1157 (WebKit::WebContextMenuProxyMac::showContextMenu):
1159 2015-11-12 Anders Carlsson <andersca@apple.com>
1161 ContextMenuAction and WebMenuItemTag shouldn't have to be in sync
1162 https://bugs.webkit.org/show_bug.cgi?id=151226
1164 Reviewed by Tim Horton.
1166 * Shared/API/c/WKSharedAPICast.h:
1169 Remove ContextMenuItemTagOpenLinkInThisWindow.
1171 2015-11-12 Anders Carlsson <andersca@apple.com>
1173 ContextMenuController::contextMenuItemSelected only needs the action and title, not the full item
1174 https://bugs.webkit.org/show_bug.cgi?id=151217
1176 Reviewed by Joseph Pecoraro.
1178 * WebProcess/WebPage/WebContextMenu.cpp:
1179 (WebKit::WebContextMenu::itemSelected):
1181 2015-11-12 Anders Carlsson <andersca@apple.com>
1183 Remove an unused function
1184 https://bugs.webkit.org/show_bug.cgi?id=151215
1186 Reviewed by Joseph Pecoraro.
1188 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1189 (WebKit::WebContextMenuClient::contextMenuItemSelected): Deleted.
1190 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1192 2015-11-11 Anders Carlsson <andersca@apple.com>
1194 Enable cross-platform context menus by default
1195 https://bugs.webkit.org/show_bug.cgi?id=151173
1197 Reviewed by Tim Horton.
1199 * Shared/WebContextMenuItemData.cpp:
1200 (WebKit::WebContextMenuItemData::WebContextMenuItemData): Deleted.
1201 * WebProcess/WebPage/WebContextMenu.cpp:
1202 (WebKit::WebContextMenu::menuItemsWithUserData): Deleted.
1204 2015-11-12 Dan Bernstein <mitz@apple.com>
1208 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1209 (PluginServiceInitializer):
1211 2015-11-12 Csaba Osztrogonác <ossy@webkit.org>
1213 Remove ENABLE(SATURATED_LAYOUT_ARITHMETIC) guards
1214 https://bugs.webkit.org/show_bug.cgi?id=150972
1216 Reviewed by Darin Adler.
1218 * Configurations/FeatureDefines.xcconfig:
1220 2015-11-11 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1222 Print result of memory sampler more readable
1223 https://bugs.webkit.org/show_bug.cgi?id=151085
1225 Reviewed by Darin Adler.
1227 Current memory sampler prints result of memory sample horizontally. It makes us hard to read
1228 the result at a glance. To improve readability of the memory sampler result, this patch prints it
1231 * Shared/WebMemorySampler.cpp:
1232 (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
1233 (WebKit::WebMemorySampler::writeHeaders):
1235 2015-11-11 Geoffrey Garen <ggaren@apple.com>
1237 Rename handle.*Event to dispatch.*Event
1238 https://bugs.webkit.org/show_bug.cgi?id=151168
1240 Reviewed by Chris Dumez.
1242 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1243 (WebKit::WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
1244 (WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
1245 (WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents): Deleted.
1246 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1248 2015-11-11 Anders Carlsson <andersca@apple.com>
1252 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
1253 (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1254 * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
1255 (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1257 2015-11-11 Anders Carlsson <andersca@apple.com>
1259 REGRESSION (r191407): Context menus are missing Services
1260 https://bugs.webkit.org/show_bug.cgi?id=151167
1261 rdar://problem/23500769
1263 Reviewed by Tim Horton.
1265 * UIProcess/mac/WebContextMenuProxyMac.mm:
1266 (WebKit::WebContextMenuProxyMac::showContextMenu):
1267 Use contentsToRootView to better indicate which coordinate system we're using.
1269 * WebProcess/WebPage/WebContextMenu.cpp:
1270 (WebKit::WebContextMenu::show):
1271 Use +[NSMenu popUpContextMenu:withEvent:forView:] so we'll get service menus where applicable.
1273 2015-11-11 Anders Carlsson <andersca@apple.com>
1275 Remove more dead context menu code
1276 https://bugs.webkit.org/show_bug.cgi?id=151163
1278 Reviewed by Tim Horton.
1280 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1281 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1282 (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1284 2015-11-11 Tim Horton <timothy_horton@apple.com>
1286 Remove an unnecessary zero-delay timer from swipe snapshot removal
1287 https://bugs.webkit.org/show_bug.cgi?id=151161
1289 Reviewed by Anders Carlsson.
1291 * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1292 (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
1293 (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector): Deleted.
1294 (WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired): Deleted.
1295 * WebProcess/WebPage/ViewGestureGeometryCollector.h:
1296 There's no discernable reason for this zero-delay timer, and it dates back
1297 to the original swipe patch with no explanation given. My only theory
1298 is that I was depending on spinning the runloop to ensure we've painted,
1299 but we have other mechanisms to do that now, on both platforms.
1301 This also was a surprising waste of time in some cases where the web
1302 process was very slow.
1304 2015-11-11 Chris Dumez <cdumez@apple.com>
1306 Unreviewed attempt to fix the Mac CMake build.
1310 2015-11-11 Chris Dumez <cdumez@apple.com>
1312 [WK2] Add initial support for speculative resource revalidation to the WebKit disk cache
1313 https://bugs.webkit.org/show_bug.cgi?id=150856
1314 <rdar://problem/23092196>
1316 Reviewed by Antti Koivisto.
1318 Add initial support for speculative resource revalidation to the WebKit
1319 disk cache. When a main resource is requested by WebCore, we look up its
1320 list of subresources in the cache and speculatively warm them up before
1321 WebCore asks for them, in order to improve page load time. In this
1322 context, warming it up means:
1323 1. If the cached resource is usable (has not expired), keep it around
1324 in a memory for a limited amount of time (10 seconds).
1325 2. If the resource has expired, do a speculative revalidation of the
1326 resource and then keep it in memory for a while as well (10 seconds).
1328 The feature is currently behind a compile-time flag that is only enabled
1329 on COCOA. Also, it is currently disabled at run-time until it is mature
1332 Initial results show that speculative revalidation gives a ~5%
1333 progression on throttled warm PLT on iPhone 5s.
1335 * NetworkProcess/NetworkResourceLoader.cpp:
1336 (WebKit::NetworkResourceLoader::start):
1337 * NetworkProcess/cache/NetworkCache.cpp:
1338 (WebKit::NetworkCache::Cache::retrieve):
1339 (WebKit::NetworkCache::Cache::store):
1340 (WebKit::NetworkCache::Cache::update):
1341 * NetworkProcess/cache/NetworkCache.h:
1342 * NetworkProcess/cache/NetworkCacheEntry.cpp:
1343 (WebKit::NetworkCache::Entry::Entry):
1344 * NetworkProcess/cache/NetworkCacheEntry.h:
1345 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Added.
1346 (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
1347 (WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
1348 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
1349 (WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
1350 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
1351 (WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
1352 (WebKit::NetworkCache::SpeculativeLoad::didComplete):
1353 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Added.
1354 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
1355 (WebKit::NetworkCache::constructRevalidationRequest):
1356 (WebKit::NetworkCache::responseNeedsRevalidation):
1357 (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
1358 (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry):
1359 (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::lifetimeTimerFired):
1360 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
1361 (WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
1362 (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
1363 (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
1364 (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
1365 (WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests):
1366 (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
1367 (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
1368 (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
1369 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource): Deleted.
1370 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord): Deleted.
1371 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
1372 * WebKit2.xcodeproj/project.pbxproj:
1374 2015-11-11 Anders Carlsson <andersca@apple.com>
1376 _WKRemoteObjectInterface should handle specifying allowed classes for reply block arguments
1377 https://bugs.webkit.org/show_bug.cgi?id=151144
1379 Reviewed by Tim Horton.
1381 * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
1382 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1383 (classesForSelectorArgument):
1384 (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:ofReply:]):
1385 (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]):
1386 (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
1387 (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
1389 2015-11-11 Tim Horton <timothy_horton@apple.com>
1391 Add some font-related preferences to the modern API
1392 https://bugs.webkit.org/show_bug.cgi?id=151138
1393 <rdar://problem/23492636>
1395 Reviewed by Anders Carlsson.
1397 * UIProcess/API/Cocoa/WKPreferences.mm:
1398 (-[WKPreferences _defaultFontSize]):
1399 (-[WKPreferences _setDefaultFontSize:]):
1400 (-[WKPreferences _defaultFixedPitchFontSize]):
1401 (-[WKPreferences _setDefaultFixedPitchFontSize:]):
1402 (-[WKPreferences _fixedPitchFontFamily]):
1403 (-[WKPreferences _setFixedPitchFontFamily:]):
1404 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1406 2015-11-11 Carlos Garcia Campos <cgarcia@igalia.com>
1408 [GTK] Runtime critical warnings when closing a page containing windowed plugins
1409 https://bugs.webkit.org/show_bug.cgi?id=151132
1411 Reviewed by Martin Robinson.
1413 This is because our plugin widget, that is a GtkPlug (derived from
1414 GtkWindow), can receive the delete-event signal before
1415 NetscapePlugin::platformDestroy is called. The delete-event
1416 signal, by default, destroys the window when the signal is not
1417 handled. So, after the delete-event the GtkPlug is destroyed, but
1418 our pointer hasn't been reset. We can handle the delete-event
1419 using gtk_widget_hide_on_delete as callback, so that the plugin
1420 widget is hidden instead of destroyed.
1422 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1423 (WebKit::NetscapePlugin::platformPostInitializeWindowed):
1425 2015-11-11 Carlos Garcia Campos <cgarcia@igalia.com>
1427 REGRESSION(r191856): [GTK] SOCK_SEQPACKET no longer used after r191856
1428 https://bugs.webkit.org/show_bug.cgi?id=151129
1430 Reviewed by Martin Robinson.
1432 r191856 unconditionally disabled SOCK_SEQPACKET for GTK port.
1434 * Platform/IPC/unix/ConnectionUnix.cpp: Use always SOCK_SEQPACKET
1437 2015-11-10 Alex Christensen <achristensen@webkit.org>
1439 Implement authentication challenge handling when using NETWORK_SESSION
1440 https://bugs.webkit.org/show_bug.cgi?id=150968
1442 Reviewed by Antti Koivisto.
1444 * NetworkProcess/NetworkLoad.cpp:
1445 (WebKit::NetworkLoad::didReceiveChallenge):
1446 Copy functionality from NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync (which is used when we don't use NETWORK_SESSION)
1447 because there is no canAuthenticateAgainstProtectionSpace delegate callback when using NSURLSession, according to
1448 https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/AuthenticationChallenges.html
1449 Instead, all authentication challenge callbacks go to URLSession:task:didReceiveChallenge:completionHandler:
1450 because we do not implement URLSession:didReceiveChallenge:completionHandler:
1451 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1452 (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1453 (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1454 (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1455 Make a block copy of the completion handlers so we can copy the std::functions that wrap them into HashMaps and call them later,
1456 in this case we call the completion handler after the UIProcess gives us credentials for an authentication challenge.
1457 * Shared/Authentication/AuthenticationManager.cpp:
1458 (WebKit::AuthenticationManager::AuthenticationManager):
1459 (WebKit::AuthenticationManager::addChallengeToChallengeMap):
1460 (WebKit::AuthenticationManager::shouldCoalesceChallenge):
1461 (WebKit::AuthenticationManager::coalesceChallengesMatching):
1462 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1463 Fix an existing bug that caused multiple calls to addChallengeToChallengeMap for one challenge. This caused too many calls to
1464 the AuthenticationClient methods, which did not cause a problem because they were not one-time-use block copies of completion handlers before.
1465 (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
1466 (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
1467 (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
1468 (WebKit::AuthenticationManager::cancelChallenge):
1469 (WebKit::AuthenticationManager::cancelSingleChallenge):
1470 (WebKit::AuthenticationManager::performDefaultHandling):
1471 (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
1472 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
1473 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
1474 Call completion handlers which we stored in a HashMap before doing IPC if we are using NETWORK_SESSION,
1475 which has completion handlers instead of continueSomething client calls.
1476 * Shared/Authentication/AuthenticationManager.h:
1477 (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
1478 * Shared/Downloads/Download.cpp:
1479 (WebKit::Download::didReceiveAuthenticationChallenge):
1480 (WebKit::Download::didReceiveResponse):
1481 * Shared/Downloads/DownloadAuthenticationClient.cpp:
1482 (WebKit::DownloadAuthenticationClient::receivedChallengeRejection):
1483 * Shared/Downloads/DownloadAuthenticationClient.h:
1484 Add ifdefs for code related to downloading I will implement later.
1486 2015-11-10 Simon Fraser <simon.fraser@apple.com>
1488 Use different pixel formats for displays that support them
1489 https://bugs.webkit.org/show_bug.cgi?id=151122
1490 rdar://problem/22846841
1492 Reviewed by Tim Horton.
1494 New the new IOSurface formats when appropriate for the properties of the
1497 * Shared/mac/RemoteLayerBackingStore.mm:
1498 (WebKit::bufferFormat):
1499 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
1501 2015-11-10 Tim Horton <timothy_horton@apple.com>
1503 Adopt formal protocols for CA delegates
1504 https://bugs.webkit.org/show_bug.cgi?id=151121
1505 <rdar://problem/6739193>
1507 Reviewed by Anders Carlsson.
1509 * UIProcess/API/Cocoa/WKWebView.mm:
1510 * UIProcess/Cocoa/WebViewImpl.mm:
1511 * UIProcess/mac/WKTextFinderClient.mm:
1512 * UIProcess/mac/WebPageProxyMac.mm:
1513 * WebKit2.xcodeproj/project.pbxproj:
1514 * WebProcess/cocoa/WebProcessCocoa.mm:
1515 Adapt to the split out SPI headers.
1517 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1520 2015-11-10 Dan Bernstein <mitz@apple.com>
1524 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
1525 (DatabaseServiceInitializer):
1526 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1527 (NetworkServiceInitializer):
1528 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1529 (WebContentServiceInitializer):
1531 2015-11-10 Chris Dumez <cdumez@apple.com>
1533 [WK2][NetworkCache] Rename SpeculativeLoader to SpeculativeLoadManager
1534 https://bugs.webkit.org/show_bug.cgi?id=151110
1536 Reviewed by Alex Christensen.
1538 Rename SpeculativeLoader to SpeculativeLoadManager for clarity, as it
1539 manages all speculative loads.
1541 * NetworkProcess/cache/NetworkCache.cpp:
1542 (WebKit::NetworkCache::Cache::initialize):
1543 (WebKit::NetworkCache::Cache::retrieve):
1544 * NetworkProcess/cache/NetworkCache.h:
1545 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp.
1546 (WebKit::NetworkCache::subresourcesType):
1547 (WebKit::NetworkCache::makeSubresourcesKey):
1548 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
1549 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
1550 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
1551 (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markAsCompleted):
1552 (WebKit::NetworkCache::SpeculativeLoadManager::SpeculativeLoadManager):
1553 (WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):
1554 (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
1555 * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.h.
1556 * WebKit2.xcodeproj/project.pbxproj:
1558 2015-11-10 Tim Horton <timothy_horton@apple.com>
1560 Add WKWebViewConfiguration SPI for a variety of different ex-preferences
1561 https://bugs.webkit.org/show_bug.cgi?id=151070
1562 <rdar://problem/23020454>
1564 Reviewed by Anders Carlsson.
1566 * UIProcess/API/Cocoa/WKWebView.mm:
1567 (-[WKWebView initWithFrame:configuration:]):
1568 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1569 (-[WKWebViewConfiguration init]):
1570 (-[WKWebViewConfiguration copyWithZone:]):
1571 (-[WKWebViewConfiguration _setRespectsImageOrientation:]):
1572 (-[WKWebViewConfiguration _respectsImageOrientation]):
1573 (-[WKWebViewConfiguration _setPrintsBackgrounds:]):
1574 (-[WKWebViewConfiguration _printsBackgrounds]):
1575 (-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):
1576 (-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
1577 (-[WKWebViewConfiguration _setAllowsJavaScriptMarkup:]):
1578 (-[WKWebViewConfiguration _allowsJavaScriptMarkup]):
1579 (-[WKWebViewConfiguration _setConvertsPositionStyleOnCopy:]):
1580 (-[WKWebViewConfiguration _convertsPositionStyleOnCopy]):
1581 (-[WKWebViewConfiguration _setAllowsMetaRefresh:]):
1582 (-[WKWebViewConfiguration _allowsMetaRefresh]):
1583 (-[WKWebViewConfiguration _setShowsURLsInToolTips:]):
1584 (-[WKWebViewConfiguration _showsURLsInToolTips]):
1585 (-[WKWebViewConfiguration _setServiceControlsEnabled:]):
1586 (-[WKWebViewConfiguration _serviceControlsEnabled]):
1587 (-[WKWebViewConfiguration _setImageControlsEnabled:]):
1588 (-[WKWebViewConfiguration _imageControlsEnabled]):
1589 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1590 Plumb some configuration SPI for various clients.
1592 2015-11-10 Chris Dumez <cdumez@apple.com>
1594 [WK2][iOS] Update WebContent sandbox profile to allow loading injected bundles again
1595 https://bugs.webkit.org/show_bug.cgi?id=151102
1596 <rdar://problem/23442311>
1598 Reviewed by Dan Bernstein.
1600 Update WebContent sandbox profile to allow loading injected bundles again.
1602 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1604 2015-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
1606 [UNIX] Environment variable should take precedence over directories in plugin search path
1607 https://bugs.webkit.org/show_bug.cgi?id=151096
1609 Reviewed by Martin Robinson.
1611 Otherwise you can't override the directories using the env vars
1612 for plugins already installed.
1614 * Shared/Plugins/unix/PluginSearchPath.cpp:
1615 (WebKit::pluginsDirectories):
1617 2015-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
1619 [GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
1620 https://bugs.webkit.org/show_bug.cgi?id=150642
1622 Reviewed by Martin Robinson.
1624 Use CROSS_PLATFORM_CONTEXT_MENUS. Since we can't just use
1625 WebContextMenuItemData, because we need to bind a GtkAction to the
1626 menu items, this patch adds WebContextMenuItemGtk that derives
1627 from WebContextMenuItemData and adds the GtkAction and its own
1628 handling of submenu items. WebKitContextMenu and
1629 WebKitContextMenuItem no longer deal with the widgets (GtkMenu and
1630 GtkMenuItem), that are now created by WebContextMenuProxy when
1631 building the popup menu.
1632 This patch also removes the support for input methods submenu,
1633 since it has been deprecated (and disabled by default) in GTK+ for
1634 long time, it has never actually worked (because the menu items
1635 don't have a GtkAction associated) and it makes the code more
1636 complicated for no benefit.
1638 * PlatformGTK.cmake:
1639 * Shared/gtk/WebContextMenuItemGtk.cpp: Added.
1640 (WebKit::gtkStockIDFromContextMenuAction):
1641 (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
1642 (WebKit::WebContextMenuItemGtk::~WebContextMenuItemGtk):
1643 (WebKit::WebContextMenuItemGtk::createGtkActionIfNeeded):
1644 * Shared/gtk/WebContextMenuItemGtk.h: Copied from Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h.
1645 (WebKit::WebContextMenuItemGtk::gtkAction):
1646 (WebKit::WebContextMenuItemGtk::submenuItems):
1647 * UIProcess/API/gtk/WebKitContextMenu.cpp:
1648 (webkitContextMenuPopulate):
1649 (webkitContextMenuCreate): Deleted.
1650 (webkitContextMenuSetParentItem): Deleted.
1651 * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
1652 (webkitContextMenuActionGetForContextMenuItem):
1653 * UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h:
1654 * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
1655 (webkitContextMenuItemSetSubMenu):
1656 (webkitContextMenuItemCreate):
1657 (webkitContextMenuItemToWebContextMenuItemGtk):
1658 (webkitContextMenuItemToWebContextMenuItemData):
1659 (webkit_context_menu_item_new):
1660 (webkit_context_menu_item_new_from_stock_action):
1661 (webkit_context_menu_item_new_from_stock_action_with_label):
1662 (webkit_context_menu_item_new_with_submenu):
1663 (webkit_context_menu_item_new_separator):
1664 (webkit_context_menu_item_get_action):
1665 (webkit_context_menu_item_get_stock_action):
1666 (webkit_context_menu_item_is_separator): Deleted.
1667 * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
1668 * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
1669 * UIProcess/API/gtk/WebKitWebView.cpp:
1670 (webkitWebViewPopulateContextMenu):
1671 (contextMenuDismissed): Deleted.
1672 (webkitWebViewSubmitFormRequest): Deleted.
1673 (webkitWebViewHandleAuthenticationChallenge): Deleted.
1674 (webkitWebViewInsecureContentDetected): Deleted.
1675 (webkitWebViewEmitRunColorChooser): Deleted.
1676 (webkitWebViewRequestInstallMissingMediaPlugins): Deleted.
1677 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1678 (WebKit::contextMenuItemActivatedCallback):
1679 (WebKit::WebContextMenuProxyGtk::append):
1680 (WebKit::WebContextMenuProxyGtk::populate):
1681 (WebKit::WebContextMenuProxyGtk::show):
1682 (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1683 (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1684 * UIProcess/gtk/WebContextMenuProxyGtk.h:
1685 (WebKit::WebContextMenuProxyGtk::gtkMenu):
1686 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1688 2015-11-09 Carlos Garcia Campos <cgarcia@igalia.com>
1690 Unreviewed. Fix GTK+ build after r192184.
1692 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1693 (WebKit::LayerTreeHostGtk::initialize):
1694 (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
1696 2015-11-09 Eric Carlson <eric.carlson@apple.com>
1698 [Mac] Add a mock AppleTV device for testing
1699 https://bugs.webkit.org/show_bug.cgi?id=148912
1700 <rdar://problem/22596272>
1702 Reviewed by Tim Horton.
1704 * Shared/WebCoreArgumentCoders.cpp:
1705 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): Update for MediaPlaybackTargetContext changes.
1706 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): Ditto.
1707 * Shared/WebCoreArgumentCoders.h:
1709 * Shared/mac/WebCoreArgumentCodersMac.mm:
1710 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
1711 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
1713 * UIProcess/WebPageProxy.cpp:
1714 (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled): New.
1715 (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState): Ditto.
1716 * UIProcess/WebPageProxy.h:
1718 * UIProcess/WebPageProxy.messages.in: Add SetMockMediaPlaybackTargetPickerEnabled and
1719 SetMockMediaPlaybackTargetPickerState.
1721 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1722 (WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerEnabled): New.
1723 (WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState): Ditto.
1724 * WebProcess/WebCoreSupport/WebChromeClient.h:
1726 * WebProcess/WebPage/WebPage.h: MediaPlaybackTargetContext is a class, not a struct.
1728 * WebProcess/WebPage/WebPage.messages.in: Ditto.
1730 * WebProcess/WebPage/mac/WebPageMac.mm:
1731 (WebKit::WebPage::playbackTargetSelected): Support mock target.
1733 2015-11-09 Ryuan Choi <ryuan.choi@navercorp.com>
1735 [EFL] Crash while opening child webview with EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
1736 https://bugs.webkit.org/show_bug.cgi?id=145924
1738 Reviewed by Gyuyoung Kim.
1740 There are some crashes when we clicked the link that opens child window
1741 via window.open or <a> tag with _blank target if process model is multiple
1744 It's because multiple secondary process model tries to assign new webprocess
1745 if related page is null. In order to keep the child window in same process
1746 with opener, we should pass related page when we create WebPageProxy.
1748 This patch adds ewk_view_configuration object and ewk_view_add_configuration()
1749 to pass related page to WebPageProxy.
1751 * PlatformEfl.cmake:
1752 * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1754 * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1755 * UIProcess/API/efl/EWebKit2.h.in:
1756 * UIProcess/API/efl/EwkView.cpp:
1757 (EwkView::createNewPage):
1758 * UIProcess/API/efl/ewk_view_configuration.cpp: Added.
1759 * UIProcess/API/efl/ewk_view_configuration.h: Added.
1760 * UIProcess/API/efl/ewk_view_configuration_private.h: Added.
1761 * UIProcess/API/efl/ewk_view.cpp:
1763 (ewk_view_smart_add):
1764 (ewk_view_add_with_configuration): Added to pass configuration.
1765 (ewk_view_add_with_context):
1766 * UIProcess/API/efl/ewk_view.h:
1767 * UIProcess/API/efl/ewk_view_private.h:
1768 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1769 (EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
1770 (EWK2UnitTest::EWK2UnitTestBase::waitUntilNotNull):
1771 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1772 * UIProcess/API/efl/tests/test_ewk2_view.cpp: Added test cases to test window_create smart method.
1773 (windowCreateCallback):
1775 (EWK2ViewTestNewWindowWithMultipleProcesses::EWK2ViewTestNewWindowWithMultipleProcesses):
1776 * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
1777 (EWK2WindowFeaturesTest::createDefaultWindow):
1778 (EWK2WindowFeaturesTest::createWindow):
1779 * UIProcess/CoordinatedGraphics/WebView.cpp:
1780 (WebKit::WebView::WebView):
1781 * UIProcess/CoordinatedGraphics/WebView.h:
1782 * UIProcess/efl/WebInspectorProxyEfl.cpp:
1783 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1784 * UIProcess/efl/WebViewEfl.cpp:
1785 (WebKit::WebView::create):
1786 (WebKit::WebViewEfl::WebViewEfl):
1787 * UIProcess/efl/WebViewEfl.h:
1789 2015-11-09 Anders Carlsson <andersca@apple.com>
1791 Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
1792 https://bugs.webkit.org/show_bug.cgi?id=151069
1793 rdar://problem/23473435
1795 Reviewed by Tim Horton.
1797 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1800 2015-11-09 Anders Carlsson <andersca@apple.com>
1804 * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1805 (WebKit::RemoteObjectRegistry::callReplyBlock):
1807 2015-11-09 Anders Carlsson <andersca@apple.com>
1809 Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
1810 https://bugs.webkit.org/show_bug.cgi?id=151056
1811 rdar://problem/23222609
1813 Reviewed by Tim Horton.
1815 * Platform/spi/Cocoa/NSInvocationSPI.h:
1816 Add NSBlockInvocation declaration.
1818 * Shared/API/Cocoa/RemoteObjectInvocation.mm:
1819 (WebKit::RemoteObjectInvocation::encode):
1820 Encode true if we have a reply ID.
1822 * Shared/API/Cocoa/RemoteObjectRegistry.h:
1825 * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
1826 Add new CallReplyBlock message.
1828 * Shared/API/Cocoa/RemoteObjectRegistry.mm:
1829 (WebKit::RemoteObjectRegistry::sendReplyBlock):
1830 Just send the CallReplyBlock message.
1832 (WebKit::RemoteObjectRegistry::callReplyBlock):
1833 Call through to _WKRemoteObjectRegistry.
1835 * Shared/API/Cocoa/WKRemoteObjectCoder.h:
1836 Pass an optional reply selector.
1838 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1839 (encodeInvocationArguments):
1840 Don't hard-code the first argument index.
1843 Encode block invocations.
1845 (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:replyToSelector:]):
1846 Initialize _replyToSelector.
1849 NSBlockInvocation doesn't need to conform to NSSecureCoding.
1851 (decodeInvocationArguments):
1852 Don't hard-code the first argument, take it as a parameter instead.
1855 Decode NSBlockInvocations (reply block invocations).
1858 Check for NSBlockInvocation.
1860 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1861 (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
1862 Return null if we can't find the method.
1864 (-[_WKRemoteObjectInterface _methodSignatureForReplyBlockOfSelector:]):
1865 Look up the reply block signature and return it.
1867 (-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
1868 Look up the allowed reply argument classes and return them.
1870 * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
1873 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1874 (PendingReply::PendingReply):
1875 Add new object that represents a pending reply.
1877 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1878 If the invocation has a reply block, add a pending reply to our map.
1880 (-[_WKRemoteObjectRegistry _invokeMethod:]):
1881 If the method we're about to invoke has a reply block, construct a special reply block that calls us back with an invocation.
1882 Encode this invocation and send it back across the wire.
1884 (-[_WKRemoteObjectRegistry _callReplyWithID:blockInvocation:]):
1885 Find the pending reply, decode the reply block invocation and call it.
1887 * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
1890 2015-11-09 Tim Horton <timothy_horton@apple.com>
1892 Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
1893 https://bugs.webkit.org/show_bug.cgi?id=151054
1894 <rdar://problem/22907994>
1896 Reviewed by Simon Fraser.
1898 * Shared/WebPageCreationParameters.cpp:
1899 (WebKit::WebPageCreationParameters::encode): Deleted.
1900 (WebKit::WebPageCreationParameters::decode): Deleted.
1901 * Shared/WebPageCreationParameters.h:
1902 * UIProcess/API/mac/WKView.mm:
1903 (-[WKView setDrawsTransparentBackground:]):
1904 (-[WKView drawsTransparentBackground]):
1905 * UIProcess/Cocoa/WebViewImpl.h:
1906 * UIProcess/Cocoa/WebViewImpl.mm:
1907 (WebKit::WebViewImpl::updateLayer):
1908 (WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
1909 (WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
1910 * UIProcess/WebPageProxy.cpp:
1911 (WebKit::WebPageProxy::WebPageProxy): Deleted.
1912 (WebKit::WebPageProxy::setDrawsTransparentBackground): Deleted.
1913 (WebKit::WebPageProxy::creationParameters): Deleted.
1914 * UIProcess/WebPageProxy.h:
1915 (WebKit::WebPageProxy::drawsTransparentBackground): Deleted.
1916 * UIProcess/mac/WebInspectorProxyMac.mm:
1917 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1918 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1919 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1920 * WebProcess/WebPage/WebPage.cpp:
1921 (WebKit::WebPage::WebPage): Deleted.
1922 (WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
1923 (WebKit::WebPage::setDrawsTransparentBackground): Deleted.
1924 * WebProcess/WebPage/WebPage.h:
1925 (WebKit::WebPage::drawsTransparentBackground): Deleted.
1926 * WebProcess/WebPage/WebPage.messages.in:
1927 Get rid of drawsTransparentBackground. It doesn't seem like there's any observable
1928 difference in a layer-backed world. WKView's (set)drawsTransparentBackground
1929 will just forward to drawsBackground (inverted).
1931 * UIProcess/API/Cocoa/WKWebView.mm:
1932 (-[WKWebView _webProcessIsResponsive]):
1933 Move _webProcessIsResponsive up with the other cross-platform SPI methods, instead
1934 of below all of the platform-specific SPI methods.
1936 (-[WKWebView _drawsBackground]):
1937 (-[WKWebView _setDrawsBackground:]):
1940 (-[WKWebView _drawsTransparentBackground]):
1941 (-[WKWebView _setDrawsTransparentBackground:]):
1944 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1945 Replace drawsTransparentBackground with drawsBackground.
1947 2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
1949 Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
1950 https://bugs.webkit.org/show_bug.cgi?id=151050
1952 Reviewed by Brian Burg.
1954 * UIProcess/mac/WebInspectorProxyMac.mm:
1955 (WebKit::WebInspectorProxy::platformCanAttach):
1956 Check now that the inspected view can be a WKWebView.
1958 2015-11-09 Anders Carlsson <andersca@apple.com>
1960 Introspect reply block types as well
1961 https://bugs.webkit.org/show_bug.cgi?id=151048
1963 Reviewed by Tim Horton.
1965 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1967 (initializeMethods):
1968 (-[_WKRemoteObjectInterface debugDescription]):
1970 2015-11-09 Anders Carlsson <andersca@apple.com>
1972 Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
1973 https://bugs.webkit.org/show_bug.cgi?id=151044
1975 Reviewed by Tim Horton.
1977 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
1978 (-[_WKRemoteObjectInterface debugDescription]):
1979 (-[_WKRemoteObjectInterface description]): Deleted.
1981 2015-11-06 Anders Carlsson <andersca@apple.com>
1983 Rework the way allowed argument classes are stored
1984 https://bugs.webkit.org/show_bug.cgi?id=150992
1986 Reviewed by Darin Adler.
1988 Add a separate MethodInfo class so we have someplace to store the reply block arguments.
1989 Use HashSet<Class> instead of NSSet. No functionality change intended.
1991 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1992 (-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
1993 (decodeObjectFromObjectStream):
1994 (checkIfClassIsAllowed):
1995 (decodeInvocationArguments):
1997 (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
1998 (-[WKRemoteObjectDecoder allowedClasses]):
1999 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
2001 (propertyListClasses):
2003 (initializeMethods):
2004 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
2005 (classesForSelectorArgument):
2006 (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
2007 (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
2008 (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
2009 (allowedArgumentClassesForMethod): Deleted.
2010 (initializeAllowedArgumentClasses): Deleted.
2011 * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
2013 2015-11-09 Csaba Osztrogonác <ossy@webkit.org>
2015 Unreviewed CMake buildfix after r192113.
2017 * PlatformMac.cmake: New file added.
2019 2015-11-09 Csaba Osztrogonác <ossy@webkit.org>
2021 Unreviewed speculative CMake buildfix after r192111.
2023 * CMakeLists.txt: New files added.
2025 2015-11-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2027 [EFL] Add UserAgentEFl.cpp|h
2028 https://bugs.webkit.org/show_bug.cgi?id=151007
2030 Reviewed by Darin Adler.
2032 As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
2035 * UIProcess/efl/WebPageProxyEfl.cpp:
2036 (WebKit::WebPageProxy::standardUserAgent): Call WebCore::standardUserAgent().
2038 2015-11-07 Simon Fraser <simon.fraser@apple.com>
2040 Remove ColorSpace argument to all the drawing calls
2041 https://bugs.webkit.org/show_bug.cgi?id=150967
2043 Reviewed by Darin Adler.
2045 * Shared/API/c/cg/WKImageCG.cpp:
2046 (WKImageCreateFromCGImage):
2047 * Shared/ContextMenuContextData.cpp:
2048 (WebKit::ContextMenuContextData::ContextMenuContextData):
2049 * Shared/WebCoreArgumentCoders.cpp:
2051 * Shared/mac/RemoteLayerBackingStore.mm:
2052 (WebKit::RemoteLayerBackingStore::drawInContext):
2053 * UIProcess/API/Cocoa/WKWebView.mm:
2054 (-[WKWebView _updateScrollViewBackground]):
2055 * UIProcess/WKInspectorHighlightView.mm:
2056 (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
2057 (-[WKInspectorHighlightView _layoutForRectsHighlight:]):
2058 * UIProcess/ios/ViewGestureControllerIOS.mm:
2059 (WebKit::ViewGestureController::beginSwipeGesture):
2060 * UIProcess/ios/WKContentViewInteraction.mm:
2061 (-[WKContentView _updateTapHighlight]):
2062 * UIProcess/mac/ViewGestureControllerMac.mm:
2063 (WebKit::ViewGestureController::beginSwipeGesture):
2064 * WebProcess/WebPage/FindController.cpp:
2065 (WebKit::FindController::drawRect):
2066 * WebProcess/WebPage/WebFrame.cpp:
2067 (WebKit::WebFrame::createSelectionSnapshot):
2068 * WebProcess/WebPage/WebPage.cpp:
2069 (WebKit::WebPage::snapshotAtSize):
2070 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2071 (WebKit::FindIndicatorOverlayClientIOS::drawRect):
2072 * WebProcess/WebPage/ios/WebPageIOS.mm:
2073 (WebKit::WebPage::getPositionInformation):
2074 * WebProcess/ios/WebVideoFullscreenManager.mm:
2075 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2077 2015-11-07 Simon Fraser <simon.fraser@apple.com>
2079 Use ColorSpaceSRGB for image buffers everywhere
2080 https://bugs.webkit.org/show_bug.cgi?id=150990
2082 Reviewed by Zalan Bujtas.
2084 ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
2085 code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
2087 * Shared/mac/RemoteLayerBackingStore.mm:
2088 (WebKit::RemoteLayerBackingStore::decode):
2089 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2090 * UIProcess/API/Cocoa/WKWebView.mm:
2091 (-[WKWebView _takeViewSnapshot]):
2092 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2094 2015-11-06 Brady Eidson <beidson@apple.com>
2096 Modern IDB: Make the result data for a "get" request be an IDBGetResult.
2097 https://bugs.webkit.org/show_bug.cgi?id=150985
2099 Reviewed by Alex Christensen.
2101 * Shared/WebCoreArgumentCoders.cpp:
2102 (IPC::ArgumentCoder<IDBGetResult>::encode):
2103 (IPC::ArgumentCoder<IDBGetResult>::decode):
2105 2015-11-06 Tim Horton <timothy_horton@apple.com>
2107 Add preliminary (SPI) support for NSTextFinder on WKWebView
2108 https://bugs.webkit.org/show_bug.cgi?id=150907
2109 <rdar://problem/19171624>
2111 Reviewed by Darin Adler.
2113 New API test: WebKit2.FindInPage
2115 * Platform/spi/mac/AppKitSPI.h:
2118 * UIProcess/API/APIFindClient.h:
2119 (API::FindClient::didFindString):
2120 * UIProcess/API/C/WKPage.cpp:
2121 (WKPageSetPageFindClient):
2122 * UIProcess/WebPageProxy.cpp:
2123 (WebKit::WebPageProxy::didFindString):
2124 * UIProcess/WebPageProxy.h:
2125 * UIProcess/WebPageProxy.messages.in:
2126 * UIProcess/Cocoa/FindClient.h:
2127 * UIProcess/Cocoa/FindClient.mm:
2128 (WebKit::FindClient::didFindString):
2129 Make didFindString return the match rects like didFindStringMatches does.
2131 * WebProcess/WebPage/FindController.cpp:
2132 (WebKit::FindController::updateFindUIAfterPageScroll):
2133 (WebKit::FindController::findString):
2134 Keep the most recent find match around for incremental find just like we do
2135 for the non-incremental version. This way, getImageForFindMatch and selectFindMatch
2136 will work for incremental find too!
2138 * UIProcess/API/Cocoa/WKWebView.mm:
2139 (-[WKWebView _ensureTextFinderClient]):
2140 (-[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
2141 (-[WKWebView documentContainerView]):
2142 (-[WKWebView getSelectedText:]):
2143 (-[WKWebView selectFindMatch:completionHandler:]):
2144 Implement NSTextFinder's async client protocol and forward to the new WKTextFinderClient.
2146 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2147 Privately note our conformance to the aformentioned protocol.
2149 * UIProcess/mac/WKTextFinderClient.h: Added.
2150 * UIProcess/mac/WKTextFinderClient.mm: Added.
2151 (WebKit::TextFinderFindClient::TextFinderFindClient):
2152 (-[WKTextFinderMatch initWithClient:view:index:rects:]):
2153 (-[WKTextFinderMatch containingView]):
2154 (-[WKTextFinderMatch textRects]):
2155 (-[WKTextFinderMatch generateTextImage:]):
2156 (-[WKTextFinderMatch index]):
2157 (-[WKTextFinderClient initWithPage:view:]):
2158 (-[WKTextFinderClient willDestroyView:]):
2159 (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
2160 (-[WKTextFinderClient getSelectedText:]):
2161 (-[WKTextFinderClient selectFindMatch:completionHandler:]):
2162 (-[WKTextFinderClient didFindStringMatches:rects:index:]):
2163 (-[WKTextFinderClient didGetImageForMatchResult:index:]):
2164 (-[WKTextFinderClient didFindString:rects:index:]):
2165 (-[WKTextFinderClient didFailToFindString:]):
2166 (-[WKTextFinderClient getImageForMatchResult:completionHandler:]):
2167 * WebKit2.xcodeproj/project.pbxproj:
2168 Add WKTextFinderClient. It installs itself as the FindClient and FindMatchesClient,
2169 so you can only use one mechanism or the other.
2171 2015-11-06 Chris Dumez <cdumez@apple.com>
2173 [WK2][SpeculativeRevalidation] Save to disk cache relationship between resources
2174 https://bugs.webkit.org/show_bug.cgi?id=150951
2175 <rdar://problem/23092196>
2177 Reviewed by Darin Adler.
2179 This patch is a first step towards speculative revalidation support in
2180 the WebKit network cache. It maps sub-resources to the main resource
2181 that caused them to be requested. We then write this information to the
2182 network cache, as a list of subresource keys for each main resource,
2183 even if the main resource is not cacheable.
2185 To map sub-resources to main resources, we track the loads happening
2186 in each frame and store the key of the main resource for the frame,
2187 as well as the key of each sub-resource later loaded in the frame. We
2188 use a HysteresisActivity to detect when loads settle down in each frame
2189 (no loads happen for a while) and we then write the information to the
2190 disk. If a new main resource is loaded in a frame where we were already
2191 tracking a load, we save the data to disk before tracking the new load,
2192 instead of waiting for the HysteresisActivity to detect the end of the
2195 The feature is currently behind a compile-time flag that is enabled on
2196 Mac and iOS only. It is also behind a runtime flag (NSUserDefaults)
2197 that is disabled by default.
2199 * NetworkProcess/NetworkResourceLoader.cpp:
2200 (WebKit::NetworkResourceLoader::start):
2201 Pass frameID in addition to the pageID. We need to globally identify
2202 frames (using <pageID, frameID> pair) to be able to track loads in
2205 * NetworkProcess/cache/NetworkCache.cpp:
2206 (WebKit::NetworkCache::Cache::initialize):
2207 Only initialize the SpeculativeLoader if the
2208 enableNetworkCacheSpeculativeRevalidation run-time flag is set.
2210 (WebKit::NetworkCache::Cache::retrieve):
2211 Register the load with the SpeculativeLoader.
2213 * NetworkProcess/cache/NetworkCacheKey.h:
2214 (WebKit::NetworkCache::Key::Key):
2215 (WebKit::NetworkCache::Key::isHashTableDeletedValue):
2216 (WebKit::NetworkCache::Key::range):
2217 (WTF::NetworkCacheKeyHash::hash):
2218 (WTF::NetworkCacheKeyHash::equal):
2219 (WTF::HashTraits<WebKit::NetworkCache::Key>::isEmptyValue):
2220 Add needed HashTraits for NetworkCache::Key so it can be used as key in
2223 * NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp: Added.
2224 * NetworkProcess/cache/NetworkCacheSpeculativeLoader.h: Added.
2225 Add new NetworkCacheSpeculativeLoader class that takes care of tracking
2226 loads in each frame to map subresources to main resources and then write
2227 this information to the network disk cache. In the future, this class we
2228 also take care of triggering speculative revalidations, thus the naming.
2230 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2231 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2232 * NetworkProcess/soup/NetworkProcessSoup.cpp:
2233 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2234 * Shared/Network/NetworkProcessCreationParameters.cpp:
2235 (WebKit::NetworkProcessCreationParameters::encode):
2236 (WebKit::NetworkProcessCreationParameters::decode):
2237 * Shared/Network/NetworkProcessCreationParameters.h:
2238 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2239 (WebKit::registerUserDefaultsIfNeeded):
2240 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2241 Add new NetworkProcess parameter to control at runtime if speculative loading
2242 should be enabled or not. It is disabled by default.
2244 * WebKit2.xcodeproj/project.pbxproj:
2245 Add new files to XCode project.
2248 Add ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION build flag for the new
2249 feature that is enable by default on COCOA.
2251 2015-11-06 Chris Dumez <cdumez@apple.com>
2253 Unreviewed, remove empty #if block landed by mistake in r192038.
2255 * NetworkProcess/NetworkLoad.cpp:
2257 2015-11-06 Philip Chimento <philip.chimento@gmail.com>
2259 [GTK] Fails to link libwebkit2gtkinjectedbundle.so on OSX
2260 https://bugs.webkit.org/show_bug.cgi?id=144785
2262 Reviewed by Philippe Normand.
2264 * PlatformGTK.cmake: Add missing WebKit2 library to list of
2265 libraries to link with. Required for OSX build.
2267 2015-11-05 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
2269 Add runtime and compile time flags for enabling Web Animations API and model.
2270 https://bugs.webkit.org/show_bug.cgi?id=150914
2272 Reviewed by Benjamin Poulain.
2274 Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
2276 * Configurations/FeatureDefines.xcconfig:
2277 * Shared/WebPreferencesDefinitions.h:
2278 * UIProcess/API/C/WKPreferences.cpp:
2279 (WKPreferencesSetWebAnimationsEnabled):
2280 (WKPreferencesGetWebAnimationsEnabled):
2281 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2282 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2283 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2284 (WebKit::InjectedBundle::setWebAnimationsEnabled):
2285 * WebProcess/InjectedBundle/InjectedBundle.h:
2286 * WebProcess/WebPage/WebPage.cpp:
2287 (WebKit::WebPage::updatePreferences):
2289 2015-11-05 Ryuan Choi <ryuan.choi@navercorp.com>
2291 [EFL] Separate beforeunload confirm callback from confirm callback
2292 https://bugs.webkit.org/show_bug.cgi?id=150964
2294 Reviewed by Gyuyoung Kim.
2296 Browser may need to distinguish between beforeunload confirm panel and general confirm panel.
2297 For example, browser may want to modify the message or show different buttons from confirm panel
2298 such as "Stay Page | Leave Page".
2300 * UIProcess/API/efl/EwkView.cpp:
2301 (EwkView::requestJSBeforeUnloadConfirmPopup):
2302 * UIProcess/API/efl/EwkView.h:
2303 * UIProcess/API/efl/ewk_view.h:
2304 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2306 * UIProcess/efl/PageUIClientEfl.cpp:
2307 (WebKit::PageUIClientEfl::runBeforeUnloadConfirmPanel):
2309 2015-11-05 Commit Queue <commit-queue@webkit.org>
2311 Unreviewed, rolling out r192089.
2312 https://bugs.webkit.org/show_bug.cgi?id=150966
2314 This change broke an existing layout test on Yosemite and
2315 Mavericks (Requested by ryanhaddad on #webkit).
2319 "Preview on apple.com/contact with all text selected shows a
2321 https://bugs.webkit.org/show_bug.cgi?id=150963
2322 http://trac.webkit.org/changeset/192089
2324 2015-11-05 Tim Horton <timothy_horton@apple.com>
2326 Preview on apple.com/contact with all text selected shows a map
2327 https://bugs.webkit.org/show_bug.cgi?id=150963
2328 <rdar://problem/23421750>
2330 Reviewed by Beth Dakin.
2332 * WebProcess/WebPage/mac/WebPageMac.mm:
2333 (WebKit::WebPage::performDictionaryLookupForSelection):
2334 In this case, we don't know where we hit, so pass a null VisiblePosition.
2336 2015-11-05 Geoffrey Garen <ggaren@apple.com>
2338 _WKObservablePageState's _webProcessIsResponsive property isn't set to YES when an unresponsive page is reloaded
2339 https://bugs.webkit.org/show_bug.cgi?id=150953
2341 Reviewed by Anders Carlsson.
2343 * UIProcess/ResponsivenessTimer.cpp:
2344 (WebKit::ResponsivenessTimer::processTerminated): Call stop() to
2345 indicate that we are responsive again. This gives the client a chance
2346 to remove the SPOD cursor, among other things.
2348 * UIProcess/ResponsivenessTimer.h:
2349 (WebKit::ResponsivenessTimer::processTerminated): Anders told me to do this!
2351 * UIProcess/WebPageProxy.cpp:
2352 (WebKit::WebPageProxy::resetStateAfterProcessExited): Be sure to reset
2353 the responsiveness timer too, or it will continue thinking we are
2354 unresponsive after a crash or a forced load or reload.
2356 2015-11-05 Anders Carlsson <andersca@apple.com>
2358 Move invocation argument encoding out to a separate function
2359 https://bugs.webkit.org/show_bug.cgi?id=150950
2361 Reviewed by Tim Horton.
2363 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2364 (encodeInvocationArguments):
2367 2015-11-05 Chris Dumez <cdumez@apple.com>
2369 [WK2] Clean up / Modernize NetworkResourceLoader
2370 https://bugs.webkit.org/show_bug.cgi?id=150922
2372 Reviewed by Andreas Kling.
2374 Clean up / Modernize NetworkResourceLoader.
2376 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2377 (WebKit::NetworkBlobRegistry::filesInBlob):
2378 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
2379 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2380 (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
2381 (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
2382 * NetworkProcess/NetworkConnectionToWebProcess.h:
2383 * NetworkProcess/NetworkResourceLoader.cpp:
2384 (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
2385 (WebKit::sendReplyToSynchronousRequest):
2386 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2387 (WebKit::NetworkResourceLoader::startNetworkLoad):
2388 (WebKit::NetworkResourceLoader::didFinishLoading):
2389 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
2390 (WebKit::NetworkResourceLoader::bufferingTimerFired):
2391 (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
2392 (WebKit::NetworkResourceLoader::validateCacheEntry):
2393 (WebKit::NetworkResourceLoader::messageSenderConnection):
2394 (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
2395 (WebKit::NetworkResourceLoader::~NetworkResourceLoader): Deleted.
2396 (WebKit::NetworkResourceLoader::didReceiveBuffer): Deleted.
2397 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Deleted.
2398 (WebKit::NetworkResourceLoader::consumeSandboxExtensions): Deleted.
2399 (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
2400 * NetworkProcess/NetworkResourceLoader.h:
2401 * NetworkProcess/mac/NetworkDiskCacheMonitor.h:
2403 2015-11-05 Chris Dumez <cdumez@apple.com>
2405 Regression(r192038): Safari cannot load any pages
2406 https://bugs.webkit.org/show_bug.cgi?id=150937
2407 <rdar://problem/23413859>
2409 Reviewed by Alex Christensen.
2411 Make sure we use the current "defersLoading" state instead of the
2412 original one when constructing / initializing the NetworkLoad.
2414 * NetworkProcess/NetworkResourceLoader.cpp:
2415 (WebKit::NetworkResourceLoader::startNetworkLoad):
2417 2015-11-05 Ryuan Choi <ryuan.choi@navercorp.com>
2419 [EFL] Add try_close API to handle beforeunload event
2420 https://bugs.webkit.org/show_bug.cgi?id=150705
2422 Reviewed by Gyuyoung Kim.
2424 This patch adds ewk_view_try_close to have a chance to call confirm callback
2425 for beforeunload event while destryoing webview.
2427 * UIProcess/API/efl/ewk_view.cpp:
2428 (ewk_view_try_close):
2429 * UIProcess/API/efl/ewk_view.h:
2430 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2431 (EWK2ViewTest::beforeUnloadCallback):
2432 (EWK2ViewTest::windowCloseCallback):
2433 (TEST_F): Added test case for ewk_view_try_close.
2435 2015-11-04 Carlos Garcia Campos <cgarcia@igalia.com>
2437 [GTK] Epiphany with Debug mode compiled WebKitGtk+ 2.10.3 hits ASSERT_ARG on willEnterAcceleratedCompositingMode
2438 https://bugs.webkit.org/show_bug.cgi?id=150620
2440 Reviewed by Mario Sanchez Prada.
2442 WillEnterAcceleratedCompositingMode message is sent when the
2443 LayerTreeHost is created in the Web Process. This can happen while
2444 there's still a DidUpdateBackingStoreState pending, in which case
2445 we are receiving the new backingStoreStateID, but the current one
2446 hasn't been updated yet.
2448 * UIProcess/DrawingAreaProxyImpl.cpp:
2449 (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
2450 Fix the ASSERT to check the given ID is alt least the next one,
2451 and remove the early return since it's valid to not enter AC mode
2452 in the end after the WillEnter message.
2454 2015-11-04 Tim Horton <timothy_horton@apple.com>
2456 REGRESSION (r191499): 100% repro crash under _prepareForMoveToWindow:
2457 https://bugs.webkit.org/show_bug.cgi?id=150912
2458 <rdar://problem/23402116>
2460 Reviewed by Simon Fraser.
2462 * UIProcess/API/mac/WKView.mm:
2463 (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
2465 2015-11-04 Chris Dumez <cdumez@apple.com>
2467 Regression(r192038): Crash in ~SandboxExtension()
2468 https://bugs.webkit.org/show_bug.cgi?id=150898
2470 Reviewed by Alex Christensen.
2472 We are seeing a couple of crashes under ~SandboxExtension() on the bots
2473 after ~SandboxExtension(). The reason is that the SandBoxExtension is
2474 still in use (useCount > 0) when destroyed. This happens due to a bug
2475 in setDefersLoading() that could cause the load to get started more
2476 than once and thus the SandboxExtension to be consumed more than once.
2478 * NetworkProcess/NetworkResourceLoader.cpp:
2479 (WebKit::NetworkResourceLoader::setDefersLoading):
2480 (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
2482 2015-11-04 Chris Dumez <cdumez@apple.com>
2484 [WK2] Extract networking code out of NetworkResourceLoader class to improve reusability
2485 https://bugs.webkit.org/show_bug.cgi?id=150898
2487 Reviewed by Alex Christensen.
2489 Extract networking code out of NetworkResourceLoader class to improve
2490 reusability (will be used for speculative revalidation) and simplify
2491 the NetworkResourceLoader.
2494 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2495 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2496 * NetworkProcess/NetworkLoad.cpp: Added.
2497 * NetworkProcess/NetworkLoad.h: Added.
2498 * NetworkProcess/NetworkLoadClient.h: Added.
2499 * NetworkProcess/NetworkLoadParameters.cpp: Added.
2500 * NetworkProcess/NetworkLoadParameters.h: Added.
2501 * NetworkProcess/NetworkResourceLoader.cpp:
2502 * NetworkProcess/NetworkResourceLoader.h:
2503 * NetworkProcess/mac/NetworkLoadMac.mm: Added.
2504 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2505 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
2506 * WebKit2.xcodeproj/project.pbxproj:
2508 2015-11-04 Beth Dakin <bdakin@apple.com>
2510 Link preview doesn't work on XHTML pages with Content-Type header as
2511 `application/xhtml+xml`
2512 https://bugs.webkit.org/show_bug.cgi?id=150740
2514 rdar://problem/23063585
2516 Reviewed by Darin Adler.
2518 My original fix for this bug was incorrect in the presence of non-HTML
2519 elements that happen to have the same local name as HTML elements. Since it
2520 seems silly to have all of this logic in the UI process to determine whether
2521 to treat something as a link or an image, this patch fixes the bug by adding
2522 isLink and isImage to InteractionInformationAtPosition in order to simplify
2523 everything. The only remaining uses of clickableElementName just use it to
2524 compare against isNull and isEmpty, so that can be a bool too.
2526 Add isLink and isImage, and turn clickableElementName into isClickableElement
2527 * Shared/InteractionInformationAtPosition.cpp:
2528 (WebKit::InteractionInformationAtPosition::encode):
2529 (WebKit::InteractionInformationAtPosition::decode):
2530 * Shared/InteractionInformationAtPosition.h:
2532 Use the new isLink, isImage, and isClickableElement
2533 * UIProcess/ios/WKContentViewInteraction.mm:
2534 (-[WKContentView _actionForLongPress]):
2535 (-[WKContentView gestureRecognizerShouldBegin:]):
2536 (-[WKContentView _highlightLongPressRecognized:]):
2537 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2538 (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2540 Set everything correctly.
2541 * WebProcess/WebPage/ios/WebPageIOS.mm:
2542 (WebKit::WebPage::getPositionInformation):
2544 2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com>
2546 Fix crashing fast-clicking WK2 tests on iOS
2547 https://bugs.webkit.org/show_bug.cgi?id=150896
2548 <rdar://problem/23344491>
2550 Reviewed by Simon Fraser.
2552 In order for the modified fast-clicking tests to pass, we can't allow hit-testing to
2553 find the tap highlight view. See the Radar for more UIKit-specific descriptions.
2555 * UIProcess/ios/WKContentViewInteraction.mm:
2556 (-[WKContentView _showTapHighlight]):
2558 2015-11-03 Anders Carlsson <andersca@apple.com>
2560 PageLoadState::will/didChangeProcessIsResponsive should call observers
2561 https://bugs.webkit.org/show_bug.cgi?id=150870
2563 Reviewed by Dan Bernstein.
2565 * UIProcess/PageLoadState.cpp:
2566 (WebKit::PageLoadState::willChangeProcessIsResponsive):
2567 (WebKit::PageLoadState::didChangeProcessIsResponsive):
2569 2015-11-04 Ryan Haddad <ryanhaddad@apple.com>
2571 Speculative build fix. Missed the checkin for the changelog with r192029.
2573 * UIProcess/API/Cocoa/WKWebView.mm:
2575 2015-11-03 Andy Estes <aestes@apple.com>
2577 [Cocoa] Add SPI to warm an initial web process
2578 https://bugs.webkit.org/show_bug.cgi?id=150886
2580 Reviewed by Dan Bernstein.
2582 * UIProcess/API/Cocoa/WKProcessPool.mm:
2583 (-[WKProcessPool _warmInitialProcess]):
2584 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2586 2015-11-03 Andy Estes <aestes@apple.com>
2588 [Cocoa] Adopt WKWebViewAdditions
2589 https://bugs.webkit.org/show_bug.cgi?id=150885
2591 Reviewed by Dan Bernstein.
2593 * UIProcess/API/Cocoa/WKWebView.mm:
2595 2015-11-03 Tim Horton <timothy_horton@apple.com>
2597 Duplicate validateUserInterfaceItem in WKWebView
2598 https://bugs.webkit.org/show_bug.cgi?id=150873
2600 Reviewed by Anders Carlsson.
2602 * UIProcess/API/Cocoa/WKWebView.mm:
2603 (-[WKWebView changeFont:]):
2604 (-[WKWebView startSpeaking:]):
2605 (-[WKWebView validateUserInterfaceItem:]):
2606 (-[WKWebView goBack:]):
2608 2015-11-03 Geoffrey Garen <ggaren@apple.com>
2610 Provide a way to turn off const in WebKit2.
2612 Reviewed by Sam Weinig.
2614 * Shared/WebProcessCreationParameters.cpp:
2615 (WebKit::WebProcessCreationParameters::encode):
2616 (WebKit::WebProcessCreationParameters::decode):
2617 * Shared/WebProcessCreationParameters.h:
2618 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2619 (WebKit::WebProcessPool::platformInitializeWebProcess):
2620 * WebProcess/WebProcess.cpp:
2621 (WebKit::WebProcess::initializeWebProcess):
2623 2015-11-03 Alex Christensen <achristensen@webkit.org>
2625 Create a NetworkSession for each SessionID
2626 https://bugs.webkit.org/show_bug.cgi?id=150857
2628 Reviewed by Anders Carlsson.
2630 This patch renames SessionTracker::session to storageSession and makes a parallel
2631 structure for NetworkSessions. NetworkSession and NetworkStorageSession should eventually
2632 become the same class in WebCore. Because not everybody uses NetworkSessions yet,
2633 we keep them separate but created, destroyed, and managed together.
2635 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2636 (WebKit::storageSession):
2637 * NetworkProcess/NetworkProcess.cpp:
2638 (WebKit::NetworkProcess::fetchWebsiteData):
2639 (WebKit::NetworkProcess::deleteWebsiteData):
2640 (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2641 * NetworkProcess/NetworkResourceLoader.cpp:
2642 (WebKit::NetworkResourceLoader::startNetworkLoad):
2643 (WebKit::NetworkResourceLoader::abort):
2644 * NetworkProcess/NetworkResourceLoader.h:
2645 * NetworkProcess/NetworkSession.h:
2646 (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
2647 (WebKit::NetworkDataTask::client):
2648 (WebKit::NetworkDataTask::clearClient):
2649 (WebKit::NetworkingDataTask::client): Deleted.
2650 (WebKit::NetworkingDataTask::clearClient): Deleted.
2651 (WebKit::NetworkSession::~NetworkSession): Deleted.
2652 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2653 (WebKit::configurationForType):
2654 (WebKit::defaultNetworkSession):
2655 (WebKit::NetworkSession::defaultSession):
2656 (WebKit::NetworkSession::NetworkSession):
2657 (WebKit::NetworkSession::~NetworkSession):
2658 (WebKit::NetworkSession::createDataTaskWithRequest):
2659 (WebKit::NetworkSession::dataTaskForIdentifier):
2660 (WebKit::NetworkDataTask::NetworkDataTask):
2661 (WebKit::NetworkDataTask::~NetworkDataTask):
2662 (WebKit::NetworkDataTask::cancel):
2663 (WebKit::NetworkDataTask::resume):
2664 (WebKit::NetworkDataTask::taskIdentifier):
2665 (WebKit::NetworkSession::create): Deleted.
2666 (WebKit::NetworkSession::singleton): Deleted.
2667 (WebKit::NetworkingDataTask::NetworkingDataTask): Deleted.
2668 (WebKit::NetworkingDataTask::~NetworkingDataTask): Deleted.
2669 (WebKit::NetworkingDataTask::suspend): Deleted.
2670 (WebKit::NetworkingDataTask::resume): Deleted.
2671 (WebKit::NetworkingDataTask::taskIdentifier): Deleted.
2672 * NetworkProcess/mac/RemoteNetworkingContext.mm:
2673 (WebKit::RemoteNetworkingContext::storageSession):
2674 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
2675 * Shared/SessionTracker.cpp:
2676 (WebKit::staticStorageSessionMap):
2677 (WebKit::identifierBase):
2678 (WebKit::SessionTracker::storageSessionMap):
2679 (WebKit::SessionTracker::getIdentifierBase):
2680 (WebKit::SessionTracker::storageSession):
2681 (WebKit::staticSessionMap):
2682 (WebKit::SessionTracker::networkSession):
2683 (WebKit::SessionTracker::sessionID):
2684 (WebKit::SessionTracker::setSession):
2685 (WebKit::SessionTracker::destroySession):
2686 (WebKit::SessionTracker::sessionMap): Deleted.
2687 (WebKit::SessionTracker::session): Deleted.
2688 * Shared/SessionTracker.h:
2689 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2690 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2691 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2692 (WebKit::WebFrameNetworkingContext::storageSession):
2693 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
2694 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2695 (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2696 (WebKit::WebFrameNetworkingContext::storageSession):
2698 2015-11-03 Ryuan Choi <ryuan.choi@navercorp.com>
2700 [CoordinatedGraphics] invisible webview should not paint the content
2701 https://bugs.webkit.org/show_bug.cgi?id=150662
2703 Reviewed by Darin Adler.
2705 Suspend or resume the painting instead of just initializing m_isPaintingSuspended
2706 for invisible webview not to paint the content until visibility is changed.
2708 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
2709 (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
2711 2015-11-03 Anders Carlsson <andersca@apple.com>
2713 Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
2714 https://bugs.webkit.org/show_bug.cgi?id=150844
2716 Reviewed by Tim Horton.
2718 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2719 (-[_WKRemoteObjectRegistry _invokeMethod:]):
2720 (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
2721 * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
2723 2015-11-02 Anders Carlsson <andersca@apple.com>
2725 CTTE the responsiveness timer getter
2726 https://bugs.webkit.org/show_bug.cgi?id=150825
2728 Reviewed by Daniel Bates.
2730 * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2731 (-[WKObservablePageState _webProcessIsResponsive]):
2732 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2733 (-[WKBrowsingContextController _webProcessIsResponsive]):
2734 * UIProcess/API/Cocoa/WKWebView.mm:
2735 (-[WKWebView _webProcessIsResponsive]):
2736 * UIProcess/WebPageProxy.cpp:
2737 (WebKit::WebPageProxy::reattachToWebProcessForReload):
2738 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2739 (WebKit::WebPageProxy::tryClose):
2740 (WebKit::WebPageProxy::loadRequest):
2741 (WebKit::WebPageProxy::loadFile):
2742 (WebKit::WebPageProxy::loadData):
2743 (WebKit::WebPageProxy::loadHTMLString):
2744 (WebKit::WebPageProxy::loadAlternateHTMLString):
2745 (WebKit::WebPageProxy::loadPlainTextString):
2746 (WebKit::WebPageProxy::loadWebArchiveData):
2747 (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
2748 (WebKit::WebPageProxy::stopLoading):
2749 (WebKit::WebPageProxy::reload):
2750 (WebKit::WebPageProxy::goForward):
2751 (WebKit::WebPageProxy::goBack):
2752 (WebKit::WebPageProxy::goToBackForwardItem):
2753 (WebKit::WebPageProxy::dispatchViewStateChange):
2754 (WebKit::WebPageProxy::handleMouseEvent):
2755 (WebKit::WebPageProxy::sendWheelEvent):
2756 (WebKit::WebPageProxy::handleKeyboardEvent):
2757 (WebKit::WebPageProxy::handleGestureEvent):
2758 (WebKit::WebPageProxy::handleTouchEventSynchronously):
2759 (WebKit::WebPageProxy::handleTouchEvent):
2760 (WebKit::WebPageProxy::closePage):
2761 (WebKit::WebPageProxy::runJavaScriptAlert):
2762 (WebKit::WebPageProxy::runJavaScriptConfirm):
2763 (WebKit::WebPageProxy::runJavaScriptPrompt):
2764 (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
2765 (WebKit::WebPageProxy::runOpenPanel):
2766 (WebKit::WebPageProxy::showPopupMenu):
2767 (WebKit::WebPageProxy::internalShowContextMenu):
2768 (WebKit::WebPageProxy::didReceiveEvent):
2769 (WebKit::WebPageProxy::stopResponsivenessTimer):
2770 (WebKit::WebPageProxy::runModal):
2771 (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
2772 * UIProcess/WebProcessProxy.h:
2773 (WebKit::WebProcessProxy::responsivenessTimer):
2775 2015-11-03 Carlos Garcia Campos <cgarcia@igalia.com>
2777 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.1 release.
2779 * gtk/NEWS: Add release notes for 2.11.1.
2781 2015-11-03 Alex Christensen <achristensen@webkit.org>
2783 Use the same cookie storage as WebCore when using NETWORK_SESSION
2784 https://bugs.webkit.org/show_bug.cgi?id=150833
2786 Reviewed by Antti Koivisto.
2788 This fixes 12 tests when using NETWORK_SESSION.
2790 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2791 (WebKit::NetworkSession::NetworkSession):
2793 2015-11-03 Alex Christensen <achristensen@webkit.org>
2795 Clean up NETWORK_SESSION code after r191848
2796 https://bugs.webkit.org/show_bug.cgi?id=150829
2798 Reviewed by Darin Adler.
2800 * NetworkProcess/NetworkResourceLoader.cpp:
2801 (WebKit::NetworkResourceLoader::didReceiveData):
2802 (WebKit::NetworkResourceLoader::didCompleteWithError):
2803 * NetworkProcess/NetworkSession.h:
2804 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2805 (WebKit::NetworkSession::NetworkSession):
2806 (WebKit::NetworkSession::createDataTaskWithRequest):
2807 (WebKit::NetworkSession::dataTaskForIdentifier):
2809 2015-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2811 Unreviewed. Fix GTK+ build after r191924.
2813 * UIProcess/API/gtk/WebKitWebView.cpp:
2815 2015-11-02 Alex Christensen <achristensen@webkit.org>
2817 Fix CMake build after r191922.
2819 * PlatformMac.cmake:
2821 2015-11-02 Andy Estes <aestes@apple.com>
2823 Try again to fix the iOS build.
2825 * Shared/mac/PDFKitImports.mm:
2827 2015-11-02 Tim Horton <timothy_horton@apple.com>
2829 Try to fix the iOS build
2831 * Shared/mac/PDFKitImports.h:
2833 2015-11-02 Tim Horton <timothy_horton@apple.com>
2835 Address a misssed review comment in r191922
2837 * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2838 (WebKit::PDFPlugin::nextMatchForString):
2840 2015-11-02 Anders Carlsson <andersca@apple.com>
2842 Add KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePageState
2843 https://bugs.webkit.org/show_bug.cgi?id=150818
2844 rdar://problem/22372131
2846 Reviewed by Tim Horton.
2848 * UIProcess/API/C/mac/WKPagePrivateMac.h:
2849 * UIProcess/API/C/mac/WKPagePrivateMac.mm:
2850 (-[WKObservablePageState _webProcessIsResponsive]):
2851 * UIProcess/API/Cocoa/PageLoadStateObserver.h:
2852 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2853 (-[WKBrowsingContextController _webProcessIsResponsive]):
2854 * UIProcess/API/Cocoa/WKWebView.mm:
2855 (-[WKWebView _webProcessIsResponsive]):
2856 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2857 * UIProcess/Cocoa/NavigationState.h:
2858 * UIProcess/Cocoa/NavigationState.mm:
2859 (WebKit::NavigationState::willChangeWebProcessIsResponsive):
2860 (WebKit::NavigationState::didChangeWebProcessIsResponsive):
2861 * UIProcess/PageLoadState.cpp:
2862 (WebKit::PageLoadState::willChangeProcessIsResponsive):
2863 (WebKit::PageLoadState::didChangeProcessIsResponsive):
2864 * UIProcess/PageLoadState.h:
2865 * UIProcess/ResponsivenessTimer.cpp:
2866 (WebKit::ResponsivenessTimer::ResponsivenessTimer):
2867 (WebKit::ResponsivenessTimer::timerFired):
2868 (WebKit::ResponsivenessTimer::stop):
2869 * UIProcess/ResponsivenessTimer.h:
2870 * UIProcess/WebPageProxy.cpp:
2871 (WebKit::WebPageProxy::willChangeProcessIsResponsive):
2872 (WebKit::WebPageProxy::didChangeProcessIsResponsive):
2873 * UIProcess/WebPageProxy.h:
2874 * UIProcess/WebProcessProxy.cpp:
2875 (WebKit::WebProcessProxy::WebProcessProxy):
2876 (WebKit::WebProcessProxy::didBecomeUnresponsive):
2877 (WebKit::WebProcessProxy::didBecomeResponsive):
2878 (WebKit::WebProcessProxy::willChangeIsResponsive):
2879 (WebKit::WebProcessProxy::didChangeIsResponsive):
2880 * UIProcess/WebProcessProxy.h:
2882 2015-11-02 Tim Horton <timothy_horton@apple.com>
2884 PDFPlugin should take advantage of threaded scrolling
2885 https://bugs.webkit.org/show_bug.cgi?id=150037
2887 Reviewed by Anders Carlsson.
2889 Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
2890 DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
2891 prior to this patch).
2893 The new PDFPlugin differs from the old one in a few significant ways,
2894 and we need to keep both alive for the time being. Significant differences
2897 - PDFPlugin is no longer a ScrollableArea
2898 - PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
2899 into the page tiles, allowing WebCore's threaded scrolling to do its job
2900 - PDFPlugin now resizes itself to the size of the document
2901 - PDFPlugin doesn't handle zooming itself, it just delegates to the page
2902 - PDFLayerController has large and incompatible API changes
2903 - PDFPlugin now implements more of the HUD behavior, but it's still
2904 painted by PDFLayerController (into a view-relative PageOverlay)
2906 [ File list elided because it's long and useless. ]
2908 2015-11-02 Andy Estes <aestes@apple.com>
2910 [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
2911 https://bugs.webkit.org/show_bug.cgi?id=150819
2913 Reviewed by Dan Bernstein.
2915 This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
2917 * Configurations/Base.xcconfig:
2919 2015-11-02 Anders Carlsson <andersca@apple.com>
2921 Begin work on supporting reply blocks in _WKRemoteObjectRegistry
2922 https://bugs.webkit.org/show_bug.cgi?id=150739
2924 Reviewed by Tim Horton.
2926 * Platform/spi/Cocoa/BlockSPI.h:
2929 * Shared/API/Cocoa/RemoteObjectInvocation.h:
2930 (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
2931 (WebKit::RemoteObjectInvocation::replyInfo):
2932 * Shared/API/Cocoa/RemoteObjectInvocation.mm:
2933 (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
2934 (WebKit::RemoteObjectInvocation::encode):
2935 (WebKit::RemoteObjectInvocation::decode):
2936 Add an optional ReplyInfo struct to RemoteObjectInvocation.
2938 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
2939 (generateReplyIdentifier):
2940 Helper function to generate a reply identifier.
2942 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
2943 Do some block parameter validation.
2945 * WebKit2.xcodeproj/project.pbxproj:
2947 2015-11-02 Brent Fulgham <bfulgham@apple.com>
2949 [iOS] Another unreviewed sandbox update.
2951 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Change copyright.
2953 2015-11-02 Brent Fulgham <bfulgham@apple.com>
2955 [iOS] Unreviewed sandbox update.
2957 Correcting copyright information.
2959 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2961 2015-11-02 Tim Horton <timothy_horton@apple.com>
2963 Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
2964 https://bugs.webkit.org/show_bug.cgi?id=150174
2966 Reviewed by Anders Carlsson.
2968 * UIProcess/API/Cocoa/WKWebView.mm:
2969 (-[WKWebView initWithFrame:configuration:]):
2970 (-[WKWebView dealloc]):
2971 (-[WKWebView allowsLinkPreview]):
2972 (-[WKWebView setAllowsLinkPreview:]):
2973 (-[WKWebView acceptsFirstResponder]):
2974 (-[WKWebView becomeFirstResponder]):
2975 (-[WKWebView resignFirstResponder]):
2976 (-[WKWebView viewWillStartLiveResize]):
2977 (-[WKWebView viewDidEndLiveResize]):
2978 (-[WKWebView isFlipped]):
2979 (-[WKWebView intrinsicContentSize]):
2980 (-[WKWebView prepareContentInRect:]):
2981 (-[WKWebView setFrameSize:]):
2982 (-[WKWebView renewGState]):
2983 (-[WKWebView writeSelectionToPasteboard:types:]):
2984 (-[WKWebView centerSelectionInVisibleArea:]):
2985 (-[WKWebView validRequestorForSendType:returnType:]):
2986 (-[WKWebView readSelectionFromPasteboard:]):
2987 (-[WKWebView changeFont:]):
2988 (-[WKWebView validateUserInterfaceItem:]):
2989 (-[WKWebView startSpeaking:]):
2990 (-[WKWebView stopSpeaking:]):
2991 (-[WKWebView showGuessPanel:]):
2992 (-[WKWebView checkSpelling:]):
2993 (-[WKWebView changeSpelling:]):
2994 (-[WKWebView toggleContinuousSpellChecking:]):
2995 (-[WKWebView isGrammarCheckingEnabled]):
2996 (-[WKWebView setGrammarCheckingEnabled:]):
2997 (-[WKWebView toggleGrammarChecking:]):
2998 (-[WKWebView toggleAutomaticSpellingCorrection:]):
2999 (-[WKWebView orderFrontSubstitutionsPanel:]):
3000 (-[WKWebView toggleSmartInsertDelete:]):
3001 (-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
3002 (-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
3003 (-[WKWebView toggleAutomaticQuoteSubstitution:]):
3004 (-[WKWebView isAutomaticDashSubstitutionEnabled]):
3005 (-[WKWebView setAutomaticDashSubstitutionEnabled:]):
3006 (-[WKWebView toggleAutomaticDashSubstitution:]):
3007 (-[WKWebView isAutomaticLinkDetectionEnabled]):
3008 (-[WKWebView setAutomaticLinkDetectionEnabled:]):
3009 (-[WKWebView toggleAutomaticLinkDetection:]):
3010 (-[WKWebView isAutomaticTextReplacementEnabled]):
3011 (-[WKWebView setAutomaticTextReplacementEnabled:]):
3012 (-[WKWebView toggleAutomaticTextReplacement:]):
3013 (-[WKWebView uppercaseWord:]):
3014 (-[WKWebView lowercaseWord:]):
3015 (-[WKWebView capitalizeWord:]):
3016 (-[WKWebView _wantsKeyDownForEvent:]):
3017 (-[WKWebView scrollWheel:]):
3018 (-[WKWebView swipeWithEvent:]):
3019 (-[WKWebView mouseMoved:]):
3020 (-[WKWebView mouseDown:]):
3021 (-[WKWebView mouseUp:]):
3022 (-[WKWebView mouseDragged:]):
3023 (-[WKWebView mouseEntered:]):
3024 (-[WKWebView mouseExited:]):
3025 (-[WKWebView otherMouseDown:]):
3026 (-[WKWebView otherMouseDragged:]):
3027 (-[WKWebView otherMouseUp:]):
3028 (-[WKWebView rightMouseDown:]):
3029 (-[WKWebView rightMouseDragged:]):
3030 (-[WKWebView rightMouseUp:]):
3031 (-[WKWebView pressureChangeWithEvent:]):
3032 (-[WKWebView acceptsFirstMouse:]):
3033 (-[WKWebView shouldDelayWindowOrderingForEvent:]):
3034 (-[WKWebView doCommandBySelector:]):
3035 (-[WKWebView insertText:]):
3036 (-[WKWebView insertText:replacementRange:]):
3037 (-[WKWebView inputContext]):
3038 (-[WKWebView performKeyEquivalent:]):
3039 (-[WKWebView keyUp:]):
3040 (-[WKWebView keyDown:]):
3041 (-[WKWebView flagsChanged:]):
3042 (-[WKWebView setMarkedText:selectedRange:replacementRange:]):
3043 (-[WKWebView unmarkText]):
3044 (-[WKWebView selectedRange]):
3045 (-[WKWebView hasMarkedText]):
3046 (-[WKWebView markedRange]):
3047 (-[WKWebView attributedSubstringForProposedRange:actualRange:]):
3048 (-[WKWebView characterIndexForPoint:]):
3049 (-[WKWebView firstRectForCharacterRange:actualRange:]):
3050 (-[WKWebView selectedRangeWithCompletionHandler:]):
3051 (-[WKWebView markedRangeWithCompletionHandler:]):
3052 (-[WKWebView hasMarkedTextWithCompletionHandler:]):
3053 (-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
3054 (-[WKWebView firstRectForCharacterRange:completionHandler:]):
3055 (-[WKWebView characterIndexForPoint:completionHandler:]):
3056 (-[WKWebView validAttributesForMarkedText]):
3057 (-[WKWebView draggedImage:endedAt:operation:]):
3058 (-[WKWebView draggingEntered:]):
3059 (-[WKWebView draggingUpdated:]):
3060 (-[WKWebView draggingExited:]):
3061 (-[WKWebView prepareForDragOperation:]):
3062 (-[WKWebView performDragOperation:]):
3063 (-[WKWebView _hitTest:dragTypes:]):
3064 (-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
3065 (-[WKWebView viewWillMoveToWindow:]):
3066 (-[WKWebView viewDidMoveToWindow]):
3067 (-[WKWebView drawRect:]):
3068 (-[WKWebView isOpaque]):
3069 (-[WKWebView mouseDownCanMoveWindow]):
3070 (-[WKWebView viewDidHide]):
3071 (-[WKWebView viewDidUnhide]):
3072 (-[WKWebView viewDidChangeBackingProperties]):
3073 (-[WKWebView _activeSpaceDidChange:]):
3074 (-[WKWebView accessibilityFocusedUIElement]):
3075 (-[WKWebView accessibilityIsIgnored]):
3076 (-[WKWebView accessibilityHitTest:]):
3077 (-[WKWebView accessibilityAttributeValue:]):
3078 (-[WKWebView hitTest:]):
3079 (-[WKWebView conversationIdentifier]):
3080 (-[WKWebView quickLookWithEvent:]):
3081 (-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
3082 (-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
3083 (-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
3084 (-[WKWebView removeTrackingRect:]):
3085 (-[WKWebView _removeTrackingRects:count:]):
3086 (-[WKWebView view:stringForToolTip:point:userData:]):
3087 (-[WKWebView pasteboardChangedOwner:]):
3088 (-[WKWebView pasteboard:provideDataForType:]):
3089 (-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
3090 (-[WKWebView wantsUpdateLayer]):
3091 (-[WKWebView updateLayer]):
3092 (-[WKWebView setAllowsBackForwardNavigationGestures:]):
3093 (-[WKWebView allowsBackForwardNavigationGestures]):
3094 (-[WKWebView smartMagnifyWithEvent:]):
3095 (-[WKWebView setMagnification:centeredAtPoint:]):
3096 (-[WKWebView setMagnification:]):
3097 (-[WKWebView magnification]):
3098 (-[WKWebView setAllowsMagnification:]):
3099 (-[WKWebView allowsMagnification]):
3100 (-[WKWebView magnifyWithEvent:]):
3101 (-[WKWebView rotateWithEvent:]):
3102 (-[WKWebView _web_superInputContext]):
3103 (-[WKWebView _web_superQuickLookWithEvent:]):
3104 (-[WKWebView _web_superSwipeWithEvent:]):
3105 (-[WKWebView _web_superMagnifyWithEvent:]):
3106 (-[WKWebView _web_superSmartMagnifyWithEvent:]):
3107 (-[WKWebView _web_superRemoveTrackingRect:]):
3108 (-[WKWebView _web_superAccessibilityAttributeValue:]):
3109 (-[WKWebView _web_superDoCommandBySelector:]):
3110 (-[WKWebView _web_superPerformKeyEquivalent:]):
3111 (-[WKWebView _web_superKeyDown:]):
3112 (-[WKWebView _web_superHitTest:]):
3113 (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
3114 (-[WKWebView _web_prepareForImmediateActionAnimation]):
3115 (-[WKWebView _web_cancelImmediateActionAnimation]):
3116 (-[WKWebView _web_completeImmediateActionAnimation]):
3117 (-[WKWebView _web_didChangeContentSize:]):
3118 (-[WKWebView _web_dismissContentRelativeChildWindows]):
3119 (-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
3120 (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
3121 (-[WKWebView _setEditable:]):
3122 (-[WKWebView _remoteObjectRegistry]):
3123 (-[WKWebView _layoutMode]):
3124 (-[WKWebView _setLayoutMode:]):
3125 (-[WKWebView _setViewScale:]):
3126 (-[WKWebView _drawsTransparentBackground]):
3127 (-[WKWebView _setDrawsTransparentBackground:]):
3128 (-[WKWebView _inspectorAttachmentView]):
3129 (-[WKWebView _setInspectorAttachmentView:]):
3130 (-[WKWebView _windowOcclusionDetectionEnabled]):
3131 (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
3132 (-[WKWebView _setOverrideDeviceScaleFactor:]):
3133 (-[WKWebView _overrideDeviceScaleFactor]):
3134 (-[WKWebView _setTopContentInset:]):
3135 (-[WKWebView _topContentInset]):
3136 (-[WKWebView _pageExtendedBackgroundColor]):
3137 (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
3138 (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
3139 (-[WKWebView _automaticallyAdjustsContentInsets]):
3140 (-[WKWebView _setMinimumLayoutWidth:]):
3141 (-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
3142 (-[WKWebView _ignoresNonWheelEvents]): Deleted.
3143 (-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
3144 (-[WKWebView _setIntrinsicContentSize:]): Deleted.
3145 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3146 * UIProcess/API/mac/WKView.mm:
3147 (-[WKView _web_superInputContext]):
3148 (-[WKView _web_superQuickLookWithEvent:]):
3149 (-[WKView _web_superSwipeWithEvent:]):
3150 (-[WKView _web_superMagnifyWithEvent:]):
3151 (-[WKView _web_superSmartMagnifyWithEvent:]):
3152 (-[WKView _web_superRemoveTrackingRect:]):
3153 (-[WKView _web_superAccessibilityAttributeValue:]):
3154 (-[WKView _web_superDoCommandBySelector:]):
3155 (-[WKView _web_superPerformKeyEquivalent:]):
3156 (-[WKView _web_superKeyDown:]):
3157 (-[WKView _web_superHitTest:]):
3158 (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
3159 (-[WKView _web_prepareForImmediateActionAnimation]):
3160 (-[WKView _web_cancelImmediateActionAnimation]):
3161 (-[WKView _web_completeImmediateActionAnimation]):
3162 (-[WKView _web_didChangeContentSize:]):
3163 (-[WKView _web_dismissContentRelativeChildWindows]):
3164 (-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
3165 (-[WKView _web_gestureEventWasNotHandledByWebCore:]):
3166 (-[WKView _superInputContext]): Deleted.
3167 (-[WKView _superQuickLookWithEvent:]): Deleted.
3168 (-[WKView _superSwipeWithEvent:]): Deleted.
3169 (-[WKView _superMagnifyWithEvent:]): Deleted.
3170 (-[WKView _superSmartMagnifyWithEvent:]): Deleted.
3171 (-[WKView _superRemoveTrackingRect:]): Deleted.
3172 (-[WKView _superAccessibilityAttributeValue:]): Deleted.
3173 (-[WKView _superDoCommandBySelector:]): Deleted.
3174 (-[WKView _superPerformKeyEquivalent:]): Deleted.
3175 (-[WKView _superKeyDown:]): Deleted.
3176 (-[WKView _superHitTest:]): Deleted.
3177 (-[WKView _addFontPanelObserver]): Deleted.
3178 * UIProcess/API/mac/WKViewInternal.h:
3179 * UIProcess/Cocoa/WebViewImpl.h:
3180 * UIProcess/Cocoa/WebViewImpl.mm:
3181 (WebKit::WebViewImpl::hitTest):
3182 (WebKit::WebViewImpl::updateSecureInputState):
3183 (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
3184 (WebKit::WebViewImpl::executeSavedCommandBySelector):
3185 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
3186 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
3187 (WebKit::WebViewImpl::quickLookWithEvent):
3188 (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
3189 (WebKit::WebViewImpl::cancelImmediateActionAnimation):
3190 (WebKit::WebViewImpl::completeImmediateActionAnimation):
3191 (WebKit::WebViewImpl::didChangeContentSize):
3192 (WebKit::WebViewImpl::accessibilityAttributeValue):
3193 (WebKit::WebViewImpl::removeTrackingRect):
3194 (WebKit::WebViewImpl::swipeWithEvent):
3195 (WebKit::WebViewImpl::magnifyWithEvent):
3196 (WebKit::WebViewImpl::smartMagnifyWithEvent):
3197 (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
3198 (WebKit::WebViewImpl::doCommandBySelector):
3199 (WebKit::WebViewImpl::inputContext):
3200 (WebKit::WebViewImpl::performKeyEquivalent):
3201 (WebKit::WebViewImpl::keyDown):
3202 * UIProcess/mac/PageClientImpl.mm:
3203 (WebKit::PageClientImpl::setDragImage):
3204 (WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
3205 (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
3208 2015-11-02 Anders Carlsson <andersca@apple.com>
3210 Remove unused API client callback code
3211 https://bugs.webkit.org/show_bug.cgi?id=150813
3213 Reviewed by Tim Horton.
3215 * UIProcess/API/APILoaderClient.h:
3216 (API::LoaderClient::interactionOccurredWhileProcessUnresponsive): Deleted.
3217 * UIProcess/API/C/WKPage.cpp:
3218 (WKPageSetPageLoaderClient): Deleted.
3219 * UIProcess/ResponsivenessTimer.cpp:
3220 (WebKit::ResponsivenessTimer::timerFired):
3221 * UIProcess/ResponsivenessTimer.h:
3222 * UIProcess/WebPageProxy.cpp:
3223 (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): Deleted.
3224 * UIProcess/WebPageProxy.h:
3225 * UIProcess/WebProcessProxy.cpp:
3226 (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): Deleted.
3227 * UIProcess/WebProcessProxy.h:
3229 2015-10-31 Andy Estes <aestes@apple.com>
3231 Replace iOS-only WebKitSystemInterface calls with SPI
3232 https://bugs.webkit.org/show_bug.cgi?id=150763
3234 Reviewed by Darin Adler.
3236 * Platform/ios/AccessibilityIOS.h: Added.
3237 * Platform/ios/AccessibilityIOS.mm: Added.
3238 (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
3239 * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
3240 * Shared/WebPreferencesStore.cpp:
3241 * UIProcess/API/Cocoa/WKWebView.mm:
3242 (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
3243 (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
3244 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3245 (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
3246 * UIProcess/ios/WKContentView.mm:
3247 (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
3248 (-[WKContentView _updateForScreen:]): Ditto.
3249 (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
3250 (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
3251 * UIProcess/ios/WKContentViewInteraction.mm:
3252 * UIProcess/ios/WebPageProxyIOS.mm:
3253 (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
3254 (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
3255 (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
3256 * WebKit2.xcodeproj/project.pbxproj:
3257 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3258 (InitWebCoreSystemInterface): Deleted.
3259 * WebProcess/WebPage/ios/WebPageIOS.mm:
3260 (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
3262 2015-11-02 Commit Queue <commit-queue@webkit.org>
3264 Unreviewed, rolling out r191902.
3265 https://bugs.webkit.org/show_bug.cgi?id=150811
3267 This change broke iOS builders (Requested by ryanhaddad on
3272 "Replace iOS-only WebKitSystemInterface calls with SPI"
3273 https://bugs.webkit.org/show_bug.cgi?id=150763
3274 http://trac.webkit.org/changeset/191902
3276 2015-10-31 Andy Estes <aestes@apple.com>
3278 Replace iOS-only WebKitSystemInterface calls with SPI
3279 https://bugs.webkit.org/show_bug.cgi?id=150763
3281 Reviewed by Darin Adler.
3283 * Platform/ios/AccessibilityIOS.h: Added.
3284 * Platform/ios/AccessibilityIOS.mm: Added.
3285 (WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
3286 * Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
3287 * Shared/WebPreferencesStore.cpp:
3288 * UIProcess/API/Cocoa/WKWebView.mm:
3289 (shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
3290 (-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
3291 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3292 (-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
3293 * UIProcess/ios/WKContentView.mm:
3294 (-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
3295 (-[WKContentView _updateForScreen:]): Ditto.
3296 (storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
3297 (-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
3298 * UIProcess/ios/WKContentViewInteraction.mm:
3299 * UIProcess/ios/WebPageProxyIOS.mm:
3300 (WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
3301 (WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
3302 (WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
3303 * WebKit2.xcodeproj/project.pbxproj:
3304 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3305 (InitWebCoreSystemInterface): Deleted.
3306 * WebProcess/WebPage/ios/WebPageIOS.mm:
3307 (WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().
3309 2015-11-02 Yongjun Zhang <yongjun_zhang@apple.com>
3311 Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive.
3312 https://bugs.webkit.org/show_bug.cgi?id=150778
3314 Add methods into WKNavigationDelegatePrivate to notify WebKit client when web process becomes unresponsive
3315 or responsive, which is reported by WebKit::ResponsivenessTimer.
3317 Reviewed by Darin Adler.
3319 * UIProcess/API/APINavigationClient.h: Add two new method processDidBecomeResponsive and processDidBecomeUnresponsive
3320 to NavigationClient; they are called when WebKit::ResponsivenessTimer update its client's state.
3321 (API::NavigationClient::processDidBecomeResponsive):
3322 (API::NavigationClient::processDidBecomeUnresponsive):
3323 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Add two new delegate method to WKNavigationDelegatePrivate:
3324 _webViewWebProcessDidBecomeResponsive: and _webViewWebProcessDidBecomeUnresponsive:
3325 * UIProcess/Cocoa/NavigationState.h: Add new overriding methods processDidBecomeResponsive and processDidBecomeUnresponsive.
3326 Also add a bool member for each method to indicate if the delegate has implement the related method.
3327 * UIProcess/Cocoa/NavigationState.mm:
3328 (WebKit::NavigationState::setNavigationDelegate): Update the new bool members based on the delegate.
3329 (WebKit::NavigationState::NavigationClient::processDidBecomeResponsive): Send the delegate message to navigationDelegate
3330 if _webViewWebProcessDidBecomeResponsive: is implemented.
3331 (WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive): Ditto.
3332 * UIProcess/WebPageProxy.cpp:
3333 (WebKit::WebPageProxy::processDidBecomeUnresponsive): Call navigationClient's processDidBecomeUnresponsive if the page proxy
3334 has navigationClient.
3335 (WebKit::WebPageProxy::processDidBecomeResponsive): Call navigationClient's processDidBecomeResponsive if the page proxy
3336 has navigationClient.
3338 2015-11-02 Beth Dakin <bdakin@apple.com>
3340 Tapping and holding a link should have a share option
3341 https://bugs.webkit.org/show_bug.cgi?id=150693
3343 Reviewed by Dan Bernstein.
3345 This is a follow-up to the original change. This change fixes non-ascii URLs.
3346 They should maintain their non-ascii characters when they are shared.
3348 * UIProcess/ios/WKContentViewInteraction.mm:
3349 (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
3350 * UIProcess/ios/WKPDFView.mm:
3351 (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
3353 2015-11-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
3355 Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
3356 https://bugs.webkit.org/show_bug.cgi?id=150613
3358 Reviewed by Darin Adler.
3360 * WebProcess/WebPage/WebFrame.cpp:
3361 (WebKit::WebFrame::frameForContext): Renaming impl() to wrapped().
3362 (WebKit::WebFrame::counterValue): Ditto.
3364 2015-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
3366 [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
3367 https://bugs.webkit.org/show_bug.cgi?id=150772
3369 Reviewed by Žan Doberšek.
3371 Add GSocketMonitor class to be used by Connection to monitor the
3372 availability of the socket file descriptor instead of using a
3375 * Platform/IPC/Connection.h:
3376 * Platform/IPC/glib/GSocketMonitor.cpp: Added.
3377 (IPC::GSocketMonitor::~GSocketMonitor):
3378 (IPC::GSocketMonitor::socketSourceCallback):
3379 (IPC::GSocketMonitor::start):
3380 (IPC::GSocketMonitor::stop):
3381 * Platform/IPC/glib/GSocketMonitor.h: Added.
3382 * Platform/IPC/unix/ConnectionUnix.cpp:
3383 (IPC::Connection::platformInvalidate):
3384 (IPC::Connection::open):
3385 * PlatformGTK.cmake:
3387 2015-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
3389 [GTK] Use RunLoop in WorkQueue implementation
3390 https://bugs.webkit.org/show_bug.cgi?id=150770
3392 Reviewed by Darin Adler.
3394 * Platform/IPC/unix/ConnectionUnix.cpp:
3395 (IPC::Connection::open): Get the main context from the WorkQueue Runloop.
3397 2015-11-01 Yusuke Suzuki <utatane.tea@gmail.com>
3399 [ES6] Support Generator Syntax
3400 https://bugs.webkit.org/show_bug.cgi?id=150769
3402 Reviewed by Geoffrey Garen.
3404 Added ENABLE_ES6_GENERATORS flag.
3406 * Configurations/FeatureDefines.xcconfig:
3408 2015-11-01 Brent Fulgham <bfulgham@apple.com>
3410 Use convenience function in sandbox profile
3411 https://bugs.webkit.org/show_bug.cgi?id=150732
3412 <rdar://problem/23287894>
3414 Reviewed by Alexey Proskuryakov.
3416 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Switch to
3417 the 'awd-log-directory' convenience function.
3419 2015-11-01 Joonghun Park <jh718.park@samsung.com>
3421 [EFL] Fix inappropriate move semantics use in parseAndRemoveEnvironments function
3422 https://bugs.webkit.org/show_bug.cgi?id=150544
3424 Reviewed by Darin Adler.
3426 In parseAndRemoveEnvironments function, it declares its paramerter type as rvalue.
3427 But in ProcessLauncher::launchProcess(), the argument of
3428 parseAndRemoveEnvironments still be used after the call of the function.
3429 Currently the rvalue is not assigned to any other variable in parseAndRemoveEnvironments,
3430 so it doesn't lead to runtime error but use of move semantic
3431 is not appropriate semantically in this case.
3433 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3434 (WebKit::parseAndRemoveEnvironments):
3435 (WebKit::ProcessLauncher::launchProcess):
3437 2015-11-01 Commit Queue <commit-queue@webkit.org>
3439 Unreviewed, rolling out r191831.
3440 https://bugs.webkit.org/show_bug.cgi?id=150774
3442 The new test fails (Requested by ap on #webkit).
3446 "Begin work on supporting reply blocks in
3447 _WKRemoteObjectRegistry"
3448 https://bugs.webkit.org/show_bug.cgi?id=150739
3449 http://trac.webkit.org/changeset/191831
3451 2015-11-01 Philip Chimento <philip.chimento@gmail.com>
3453 [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
3454 https://bugs.webkit.org/show_bug.cgi?id=144560
3456 Reviewed by Darin Adler.
3458 * NetworkProcess/NetworkProcess.cpp:
3459 (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
3460 Change order of OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) checks,
3461 so that we can use Unix domain sockets even on Darwin for the GTK
3463 * Platform/IPC/Attachment.cpp: Add USE(UNIX_DOMAIN_SOCKETS) check
3464 to OS(DARWIN) check, in order to support GTK platform on OSX.
3465 * Platform/IPC/Attachment.h: Change order of OS(DARWIN) and
3466 USE(UNIX_DOMAIN_SOCKETS) checks throughout.
3467 (IPC::Attachment::size):
3468 (IPC::Attachment::releaseFileDescriptor):
3469 (IPC::Attachment::fileDescriptor):
3470 (IPC::Attachment::disposition):
3471 (IPC::Attachment::port):
3472 * Platform/IPC/Connection.h: Ditto.
3473 (IPC::Connection::identifierIsNull):
3474 (IPC::Connection::Identifier::Identifier):
3475 (IPC::Connection::xpcConnection):
3476 * Platform/IPC/unix/ConnectionUnix.cpp: Only use SOCK_SEQPACKET
3477 if the platform is not GTK, because otherwise the PLATFORM(GTK)
3478 check below is never reached.
3479 * Platform/SharedMemory.h: Change order of OS(DARWIN) and
3480 USE(UNIX_DOMAIN_SOCKETS) checks.
3481 * PluginProcess/PluginProcess.cpp: Ditto.
3482 (WebKit::PluginProcess::createWebProcessConnection):
3483 * Shared/API/c/WKBase.h: Don't include WKBaseMac.h if building
3485 * UIProcess/API/C/WKNativeEvent.h: Don't use Apple API if
3487 * UIProcess/Launcher/ProcessLauncher.cpp: Change to
3488 OS(DARWIN) && !PLATFORM(GTK), in the absence of a better platform
3489 macro such as USE(MACH).
3490 (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3491 * UIProcess/Launcher/ProcessLauncher.h: Ditto.
3492 * UIProcess/Network/NetworkProcessProxy.cpp: Change order of
3493 OS(DARWIN) and PLATFORM(GTK) checks.
3494 (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
3495 (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
3496 * UIProcess/Plugins/PluginProcessProxy.cpp: Ditto.
3497 (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
3498 (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
3499 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Ditto.
3500 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
3501 * WebProcess/WebPage/WebInspector.cpp: Ditto.
3502 (WebKit::WebInspector::createInspectorPage):
3503 * WebProcess/WebPage/WebInspectorUI.cpp: Ditto.
3504 (WebKit::WebInspectorUI::establishConnection):
3505 * WebProcess/WebProcess.cpp: Ditto.
3506 (WebKit::WebProcess::ensureNetworkProcessConnection):
3508 2015-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
3510 [GTK] Use RunLoop::Timer in PluginInfoCache
3511 https://bugs.webkit.org/show_bug.cgi?id=150757
3513 Reviewed by Darin Adler.
3515 Use RunLoop::Timer instead of GMainLoopSource to save the cache
3516 contents in an idle. Also remove the mutex, since RunLoop::Timer
3517 is thread safe and saveToFile() is private and only called by the
3518 main thread loop. Also removed the code to save the file in the
3519 destructor since PluginInfoCache is a singleton and never
3520 destroyed. It's very unlikely that the program finished before the
3521 cache is saved, but even if that happens it would be harmless, the
3522 cache will be saved at some point the next time.
3524 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
3525 (WebKit::PluginInfoCache::PluginInfoCache):
3526 (WebKit::PluginInfoCache::updatePluginInfo):
3527 (WebKit::PluginInfoCache::~PluginInfoCache):
3528 (WebKit::PluginInfoCache::saveToFile):
3529 * UIProcess/Plugins/gtk/PluginInfoCache.h:
3531 2015-11-01 Carlos Garcia Campos <cgarcia@igalia.com>
3533 [GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode
3534 https://bugs.webkit.org/show_bug.cgi?id=150756
3536 Reviewed by Darin Adler.
3538 Use a RunLoop::Timer instead of a GMainLoopSource for the
3539 accelerated compositing render loop to improve the performance,
3540 since RunLoop::Timer uses a persistent source.
3541 All the logic to schedule rames has been moved to a helper
3542 internal class RenderFrameScheduler.
3544 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3545 (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
3546 (WebKit::LayerTreeHostGtk::RenderFrameScheduler::~RenderFrameScheduler):
3547 (WebKit::LayerTreeHostGtk::RenderFrameScheduler::start):
3548 (WebKit::LayerTreeHostGtk::RenderFrameScheduler::stop):
3549 (WebKit::shouldSkipNextFrameBecauseOfContinousImmediateFlushes):
3550 (WebKit::LayerTreeHostGtk::RenderFrameScheduler::nextFrame):
3551 (WebKit::LayerTreeHostGtk::RenderFrameScheduler::renderFrame):
3552 (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
3553 (WebKit::LayerTreeHostGtk::renderFrame):
3554 (WebKit::LayerTreeHostGtk::scheduleLayerFlush):
3555 (WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
3556 (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Deleted.
3557 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3559 2015-10-31 Andreas Kling <akling@apple.com>
3561 Add a debug overlay with information about web process resource usage.
3562 <https://webkit.org/b/150599>
3564 Reviewed by Darin Adler.
3566 Add WK2 preferences SPI for showing/hiding the resource usage overlay.
3568 * Shared/WebPreferencesDefinitions.h:
3569 * UIProcess/API/C/WKPreferences.cpp:
3570 (WKPreferencesSetResourceUsageOverlayVisible):
3571 (WKPreferencesGetResourceUsageOverlayVisible):
3572 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3573 * UIProcess/API/Cocoa/WKPreferences.mm:
3574 (-[WKPreferences _resourceUsageOverlayVisible]):
3575 (-[WKPreferences _setResourceUsageOverlayVisible:]):
3576 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3577 * WebProcess/WebPage/WebPage.cpp:
3578 (WebKit::WebPage::updatePreferences):
3580 2015-10-31 Alex Christensen <achristensen@webkit.org>
3582 Share more code between NETWORK_SESSION and non-NETWORK_SESSION NetworkResourceLoaders
3583 https://bugs.webkit.org/show_bug.cgi?id=150742
3585 Reviewed by Darin Adler.
3587 r191457 added enough code to NetworkResourceLoader to load most resources successfully if there are no errors.
3588 It passed about 80% of LayoutTests/http and crashed sometimes.
3589 This passes about 95% of LayoutTests/http and does not crash on any of the LayoutTests/http.
3590 It should not change behavior of the non-NETWORK_SESSION code which is currently the default in trunk.
3592 * NetworkProcess/NetworkResourceLoader.cpp:
3593 (WebKit::NetworkResourceLoader::abort):
3594 (WebKit::NetworkResourceLoader::sharedDidReceiveResponse):
3595 (WebKit::NetworkResourceLoader::sharedDidReceiveBuffer):
3596 (WebKit::NetworkResourceLoader::sharedDidFinishLoading):
3597 (WebKit::NetworkResourceLoader::sharedDidFail):
3598 (WebKit::NetworkResourceLoader::sharedWillSendRedirectedRequest):
3599 (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
3600 (WebKit::NetworkResourceLoader::didReceiveChallenge):
3601 (WebKit::NetworkResourceLoader::didReceiveResponse):
3602 (WebKit::NetworkResourceLoader::didReceiveData):
3603 (WebKit::NetworkResourceLoader::didCompleteWithError):
3604 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3605 (WebKit::NetworkResourceLoader::didReceiveBuffer):
3606 (WebKit::NetworkResourceLoader::didFinishLoading):
3607 (WebKit::NetworkResourceLoader::didFail):
3608 (WebKit::NetworkResourceLoader::willSendRequestAsync):
3609 * NetworkProcess/NetworkResourceLoader.h:
3610 * NetworkProcess/NetworkSession.h:
3611 (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
3613 2015-10-28 Wenson Hsieh <wenson_hsieh@apple.com>
3615 Inner height behavior when the keyboard is shown should match on WKWebView and MobileSafari
3616 https://bugs.webkit.org/show_bug.cgi?id=150634
3617 <rdar://problem/23202254>
3619 Reviewed by Benjamin Poulain.
3621 Make WKWebView match behavior in Safari by not firing resize events and changing the inner height when showing
3622 or hiding the keyboard. Previously, the WKWebView would do both of the above because we use the scroll view's
3623 contentInset property when no unobscured insets are explicitly set for the WKWebView. To fix this, when updating
3624 the visible content rect of a WKWebView for computing the inner height, we readjust the computed bottom inset
3625 to not take the keyboard height into account. To know how much we need to readjust the inset by, we store the
3626 total amount by which the scroll view's bottom inset has been adjusted due to the keyboard.
3628 We perform this readjustment in _updateVisibleContentRects rather than in _computedContentInset since some users
3629 of _computedContentInset may still expect the bottom inset to account for the keyboard height. However, when
3630 updating visible content rects, we should not account for the keyboard height since we don't want the inner height
3631 to change when showing or hiding the keyboard.
3633 Lastly, while calling _adjustForAutomaticKeyboardInfo, we may end up calling _updateVisibleContentRects. This call
3634 is unnecessary since we call it again immediately after _adjustForAutomaticKeyboardInfo, and it also complicates
3635 the readjustment logic, so it makes sense to prevent the update from happening altogether while we are adjusting
3636 the scroll view's insets due to keyboard changes. Altogether, these changes mean that the computed inner height
3637 will no longer be adjusted for the keyboard height on WKWebViews, matching the behavior observed on mobile Safari.
3639 Test: LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
3641 * UIProcess/API/Cocoa/WKWebView.mm:
3642 (-[WKWebView _updateVisibleContentRects]):
3643 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
3645 2015-10-30 Anders Carlsson <andersca@apple.com>
3647 Begin work on supporting reply blocks in _WKRemoteObjectRegistry
3648 https://bugs.webkit.org/show_bug.cgi?id=150739
3650 Reviewed by Tim Horton.
3652 * Platform/spi/Cocoa/BlockSPI.h:
3655 * Shared/API/Cocoa/RemoteObjectInvocation.h:
3656 (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
3657 (WebKit::RemoteObjectInvocation::replyInfo):
3658 * Shared/API/Cocoa/RemoteObjectInvocation.mm:
3659 (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
3660 (WebKit::RemoteObjectInvocation::encode):
3661 (WebKit::RemoteObjectInvocation::decode):
3662 Add an optional ReplyInfo struct to RemoteObjectInvocation.
3664 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
3665 (generateReplyIdentifier):
3666 Helper function to generate a reply identifier.
3668 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
3669 Do some block parameter validation.
3671 * WebKit2.xcodeproj/project.pbxproj:
3673 2015-10-30 Beth Dakin <bdakin@apple.com>
3675 Link preview doesn't work on XHTML pages with Content-Type header as
3676 ‘application/xhtml+xml’
3677 https://bugs.webkit.org/show_bug.cgi?id=150740
3679 rdar://problem/23063585
3681 Reviewed by Tim Horton.
3683 For XHTML pages, the element names are lowercase. This patch uses
3684 equalIgnoringCase to fix the bug.
3685 * UIProcess/ios/WKContentViewInteraction.mm:
3686 (-[WKContentView _actionForLongPress]):
3687 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
3688 (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
3690 2015-10-30 Tim Horton <timothy_horton@apple.com>
3692 WKView being inside WKWebView leads to weird API issues
3693 https://bugs.webkit.org/show_bug.cgi?id=150174
3695 Reviewed by Anders Carlsson.
3697 * UIProcess/API/mac/WKView.mm:
3698 (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
3699 (-[WKView prepareContentInRect:]):
3700 (-[WKView initWithFrame:processPool:configuration:webView:]):
3701 (-[WKView pageRef]):
3702 (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
3703 (-[WKView dealloc]): Deleted.
3704 * UIProcess/Cocoa/WebViewImpl.h:
3705 (WebKit::WebViewImpl::page):
3706 * UIProcess/Cocoa/WebViewImpl.mm:
3707 (-[WKWindowVisibilityObserver initWithView:impl:]):
3708 (-[WKWindowVisibilityObserver dealloc]):
3709 (-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
3710 (WebKit::WebViewImpl::WebViewImpl):
3711 (WebKit::WebViewImpl::~WebViewImpl):
3712 (WebKit::WebViewImpl::setDrawsBackground):
3713 (WebKit::WebViewImpl::drawsBackground):
3714 (WebKit::WebViewImpl::setDrawsTransparentBackground):
3715 (WebKit::WebViewImpl::drawsTransparentBackground):
3716 (WebKit::WebViewImpl::isOpaque):
3717 (WebKit::WebViewImpl::acceptsFirstMouse):
3718 (WebKit::WebViewImpl::becomeFirstResponder):
3719 (WebKit::WebViewImpl::resignFirstResponder):
3720 (WebKit::WebViewImpl::viewWillStartLiveResize):
3721 (WebKit::WebViewImpl::viewDidEndLiveResize):
3722 (WebKit::WebViewImpl::updateWindowAndViewFrames):
3723 (WebKit::WebViewImpl::setFixedLayoutSize):
3724 (WebKit::WebViewImpl::fixedLayoutSize):
3725 (WebKit::WebViewImpl::isUsingUISideCompositing):
3726 (WebKit::WebViewImpl::setDrawingAreaSize):
3727 (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
3728 (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
3729 (WebKit::WebViewImpl::updateLayer):
3730 (WebKit::WebViewImpl::drawRect):
3731 (WebKit::WebViewImpl::dispatchSetTopContentInset):
3732 (WebKit::WebViewImpl::prepareContentInRect):
3733 (WebKit::WebViewImpl::updateViewExposedRect):
3734 (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
3735 (WebKit::WebViewImpl::minimumSizeForAutoLayout):
3736 (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
3737 (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
3738 (WebKit::WebViewImpl::setIntrinsicContentSize):
3739 (WebKit::WebViewImpl::setViewScale):
3740 (WebKit::WebViewImpl::viewScale):
3741 (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
3742 (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
3743 (WebKit::WebViewImpl::windowDidOrderOffScreen):
3744 (WebKit::WebViewImpl::windowDidOrderOnScreen):
3745 (WebKit::WebViewImpl::windowDidBecomeKey):
3746 (WebKit::WebViewImpl::windowDidResignKey):
3747 (WebKit::WebViewImpl::windowDidMiniaturize):
3748 (WebKit::WebViewImpl::windowDidDeminiaturize):
3749 (WebKit::WebViewImpl::windowDidChangeBackingProperties):
3750 (WebKit::WebViewImpl::windowDidChangeScreen):
3751 (WebKit::WebViewImpl::windowDidChangeLayerHosting):
3752 (WebKit::WebViewImpl::windowDidChangeOcclusionState):
3753 (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
3754 (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
3755 (WebKit::WebViewImpl::viewDidMoveToWindow):
3756 (WebKit::WebViewImpl::viewDidChangeBackingProperties):
3757 (WebKit::WebViewImpl::viewDidHide):
3758 (WebKit::WebViewImpl::viewDidUnhide):
3759 (WebKit::WebViewImpl::activeSpaceDidChange):
3760 (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
3761 (WebKit::WebViewImpl::setUnderlayColor):
3762 (WebKit::WebViewImpl::underlayColor):
3763 (WebKit::WebViewImpl::pageExtendedBackgroundColor):
3764 (WebKit::WebViewImpl::setOverlayScrollbarStyle):
3765 (WebKit::WebViewImpl::overlayScrollbarStyle):
3766 (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
3767 (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
3768 (WebKit::WebViewImpl::prepareForMoveToWindow):
3769 (WebKit::WebViewImpl::updateSecureInputState):
3770 (WebKit::WebViewImpl::setPluginComplexTextInputState):
3771 (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
3772 (WebKit::WebViewImpl::handleAcceptedAlternativeText):
3773 (WebKit::WebViewImpl::pressureChangeWithEvent):
3774 (WebKit::WebViewImpl::isEditable):
3775 (WebKit::WebViewImpl::executeEditCommandForSelector):
3776 (WebKit::WebViewImpl::writeSelectionToPasteboard):
3777 (WebKit::WebViewImpl::readSelectionFromPasteboard):
3778 (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
3779 (WebKit::WebViewImpl::centerSelectionInVisibleArea):
3780 (WebKit::WebViewImpl::updateFontPanelIfNeeded):
3781 (WebKit::WebViewImpl::changeFontFromFontPanel):
3782 (WebKit::WebViewImpl::validateUserInterfaceItem):
3783 (WebKit::WebViewImpl::startSpeaking):
3784 (WebKit::WebViewImpl::showGuessPanel):
3785 (WebKit::WebViewImpl::checkSpelling):
3786 (WebKit::WebViewImpl::changeSpelling):
3787 (WebKit::WebViewImpl::toggleContinuousSpellChecking):
3788 (WebKit::WebViewImpl::setGrammarCheckingEnabled):
3789 (WebKit::WebViewImpl::toggleGrammarChecking):
3790 (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
3791 (WebKit::WebViewImpl::toggleSmartInsertDelete):
3792 (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
3793 (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
3794 (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
3795 (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
3796 (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
3797 (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
3798 (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
3799 (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
3800 (WebKit::WebViewImpl::uppercaseWord):
3801 (WebKit::WebViewImpl::lowercaseWord):
3802 (WebKit::WebViewImpl::capitalizeWord):
3803 (WebKit::WebViewImpl::preferencesDidChange):
3804 (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
3805 (WebKit::WebViewImpl::quickLookWithEvent):
3806 (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
3807 (WebKit::WebViewImpl::didChangeContentSize):
3808 (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
3809 (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
3810 (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
3811 (WebKit::WebViewImpl::stringForToolTip):
3812 (WebKit::WebViewImpl::setInspectorAttachmentView):
3813 (WebKit::WebViewImpl::remoteObjectRegistry):
3814 (WebKit::WebViewImpl::browsingContextController):
3815 (WebKit::WebViewImpl::draggedImage):
3816 (WebKit::WebViewImpl::draggingEntered):
3817 (WebKit::WebViewImpl::draggingUpdated):
3818 (WebKit::WebViewImpl::draggingExited):
3819 (WebKit::WebViewImpl::performDragOperation):
3820 (WebKit::WebViewImpl::takeViewSnapshot):
3821 (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
3822 (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
3823 (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
3824 (WebKit::WebViewImpl::setMagnification):
3825 (WebKit::WebViewImpl::magnification):
3826 (WebKit::WebViewImpl::scrollWheel):
3827 (WebKit::WebViewImpl::swipeWithEvent):
3828 (WebKit::WebViewImpl::magnifyWithEvent):
3829 (WebKit::WebViewImpl::rotateWithEvent):
3830 (WebKit::WebViewImpl::doCommandBySelector):
3831 (WebKit::WebViewImpl::insertText):
3832 (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
3833 (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
3834 (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
3835 (WebKit::WebViewImpl::attributedSubstringForProposedRange):
3836 (WebKit::WebViewImpl::firstRectForCharacterRange):
3837 (WebKit::WebViewImpl::characterIndexForPoint):
3838 (WebKit::WebViewImpl::inputContext):
3839 (WebKit::WebViewImpl::unmarkText):
3840 (WebKit::WebViewImpl::setMarkedText):
3841 (WebKit::WebViewImpl::performKeyEquivalent):
3842 (WebKit::WebViewImpl::keyUp):
3843 (WebKit::WebViewImpl::keyDown):
3844 (WebKit::WebViewImpl::flagsChanged):
3845 (WebKit::WebViewImpl::executeSavedKeypressCommands):
3846 (WebKit::WebViewImpl::selectedRange):
3847 (WebKit::WebViewImpl::hasMarkedText):
3848 (WebKit::WebViewImpl::markedRange):
3849 (WebKit::WebViewImpl::setContentPreparationRect): Deleted.
3850 (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
3851 (WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
3852 * UIProcess/WebPageProxy.h:
3853 (WebKit::WebPageProxy::scrollPinningBehavior):
3854 (WebKit::WebPageProxy::overlayScrollbarStyle):
3855 * UIProcess/WebProcessPool.cpp:
3856 (WebKit::WebProcessPool::createWebPage):
3857 * UIProcess/WebProcessPool.h:
3858 * UIProcess/mac/PageClientImpl.h:
3859 * UIProcess/mac/PageClientImpl.mm:
3860 (WebKit::PageClientImpl::PageClientImpl):
3861 (WebKit::PageClientImpl::createDrawingAreaProxy):
3862 (WebKit::PageClientImpl::viewSize):
3863 (WebKit::PageClientImpl::activeView):
3864 (WebKit::PageClientImpl::activeWindow):
3865 (WebKit::PageClientImpl::isViewFocused):
3866 (WebKit::PageClientImpl::makeFirstResponder):
3867 (WebKit::PageClientImpl::isViewVisible):
3868 (WebKit::PageClientImpl::colorSpace):
3869 (WebKit::PageClientImpl::processDidExit):
3870 (WebKit::PageClientImpl::pageClosed):
3871 (WebKit::PageClientImpl::didRelaunchProcess):
3872 (WebKit::PageClientImpl::preferencesDidChange):
3873 (WebKit::PageClientImpl::toolTipChanged):
3874 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
3875 (WebKit::PageClientImpl::didChangeContentSize):
3876 (WebKit::PageClientImpl::setCursor):
3877 (WebKit::PageClientImpl::registerEditCommand):
3878 (WebKit::PageClientImpl::registerInsertionUndoGrouping):
3879 (WebKit::PageClientImpl::clearAllEditCommands):
3880 (WebKit::PageClientImpl::canUndoRedo):
3881 (WebKit::PageClientImpl::executeUndoRedo):
3882 (WebKit::PageClientImpl::setDragImage):
3883 (WebKit::PageClientImpl::setPromisedDataForImage):
3884 (WebKit::PageClientImpl::setPromisedDataForAttachment):
3885 (WebKit::PageClientImpl::updateSecureInputState):
3886 (WebKit::PageClientImpl::resetSecureInputState):
3887 (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
3888 (WebKit::PageClientImpl::convertToDeviceSpace):
3889 (WebKit::PageClientImpl::convertToUserSpace):
3890 (WebKit::PageClientImpl::screenToRootView):
3891 (WebKit::PageClientImpl::rootViewToScreen):
3892 (WebKit::PageClientImpl::doneWithKeyEvent):
3893 (WebKit::PageClientImpl::createPopupMenuProxy):
3894 (WebKit::PageClientImpl::createContextMenuProxy):
3895 (WebKit::PageClientImpl::createColorPicker):
3896 (WebKit::PageClientImpl::setTextIndicator):
3897 (WebKit::PageClientImpl::clearTextIndicator):
3898 (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
3899 (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
3900 (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
3901 (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
3902 (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
3903 (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
3904 (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
3905 (WebKit::PageClientImpl::takeViewSnapshot):
3906 (WebKit::PageClientImpl::selectionDidChange):
3907 (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
3908 (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
3909 (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
3910 (WebKit::PageClientImpl::setPluginComplexTextInputState):
3911 (WebKit::PageClientImpl::didPerformDictionaryLookup):
3912 (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
3913 (WebKit::PageClientImpl::showCorrectionPanel):
3914 (WebKit::PageClientImpl::recordAutocorrectionResponse):
3915 (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
3916 (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
3917 (WebKit::PageClientImpl::executeSavedCommandBySelector):
3918 (WebKit::PageClientImpl::showDictationAlternativeUI):
3919 (WebKit::PageClientImpl::closeFullScreenManager):
3920 (WebKit::PageClientImpl::isFullScreen):
3921 (WebKit::PageClientImpl::enterFullScreen):
3922 (WebKit::PageClientImpl::exitFullScreen):
3923 (WebKit::PageClientImpl::beganEnterFullScreen):
3924 (WebKit::PageClientImpl::beganExitFullScreen):
3925 (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
3926 (WebKit::PageClientImpl::didFinishLoadForMainFrame):
3927 (WebKit::PageClientImpl::didFailLoadForMainFrame):
3928 (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
3929 (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
3930 (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
3931 (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
3932 (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
3933 (WebKit::PageClientImpl::showPlatformContextMenu):
3934 (WebKit::PageClientImpl::refView):
3935 (WebKit::PageClientImpl::derefView):
3936 (WebKit::PageClientImpl::startWindowDrag):
3937 (WebKit::PageClientImpl::platformWindow):
3938 (WebKit::PageClientImpl::inspectorAttachmentView):
3939 (WebKit::PageClientImpl::remoteObjectRegistry):
3940 * UIProcess/mac/WebColorPickerMac.h:
3941 * UIProcess/mac/WebColorPickerMac.mm:
3942 (WebKit::WebColorPickerMac::create):
3943 (WebKit::WebColorPickerMac::WebColorPickerMac):
3944 (-[WKColorPopoverMac initWithFrame:inView:]):
3945 * UIProcess/mac/WebContextMenuProxyMac.h:
3946 * UIProcess/mac/WebContextMenuProxyMac.mm:
3947 (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
3948 * UIProcess/mac/WebPopupMenuProxyMac.h:
3949 (WebKit::WebPopupMenuProxyMac::create):
3950 * UIProcess/mac/WebPopupMenuProxyMac.mm:
3951 (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
3952 Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.
3954 2015-10-30 Alex Christensen <achristensen@webkit.org>
3956 Fix Mac CMake build after rr191810.
3958 * PlatformMac.cmake:
3959 Add RemoteObjectInvocation.mm.
3961 2015-10-30 Anders Carlsson <andersca@apple.com>
3963 Add a separate object that represents a remote object invocation
3964 https://bugs.webkit.org/show_bug.cgi?id=150639
3966 Reviewed by Tim Horton.
3968 * Shared/API/Cocoa/RemoteObjectInvocation.h: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h.
3969 (WebKit::RemoteObjectInvocation::interfaceIdentifier):
3970 (WebKit::RemoteObjectInvocation::encodedInvocation):
3971 * Shared/API/Cocoa/RemoteObjectInvocation.mm: Copied from Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm.
3972 (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
3973 (WebKit::RemoteObjectInvocation::encode):
3974 (WebKit::RemoteObjectInvocation::decode):
3975 * Shared/API/Cocoa/RemoteObjectRegistry.h:
3976 * Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
3977 * Shared/API/Cocoa/RemoteObjectRegistry.mm:
3978 (WebKit::RemoteObjectRegistry::sendInvocation):
3979 (WebKit::RemoteObjectRegistry::invokeMethod):
3980 * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
3981 (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
3982 (-[_WKRemoteObjectRegistry _invokeMethod:]):
3983 * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
3984 * WebKit2.xcodeproj/project.pbxproj:
3986 2015-10-30 Beth Dakin <bdakin@apple.com>
3988 Another speculative build fix.
3990 * UIProcess/API/Cocoa/_WKElementAction.h:
3992 2015-10-30 Beth Dakin <bdakin@apple.com>
3994 Speculative build fix.
3996 * Platform/spi/ios/UIKitSPI.h:
3997 * UIProcess/ios/WKContentViewInteraction.mm:
3999 2015-10-30 Tim Horton <timothy_horton@apple.com>
4001 WKView being inside WKWebView leads to weird API issues
4002 https://bugs.webkit.org/show_bug.cgi?id=150174
4004 Reviewed by Anders Carlsson.
4006 * UIProcess/API/mac/WKView.mm:
4007 (-[WKView mouseMoved:]):
4008 (-[WKView mouseDown:]):
4009 (-[WKView mouseUp:]):
4010 (-[WKView mouseDragged:]):
4011 (-[WKView mouseEntered:]):
4012 (-[WKView mouseExited:]):
4013 (-[WKView otherMouseDown:]):
4014 (-[WKView otherMouseDragged:]):
4015 (-[WKView otherMouseUp:]):
4016 (-[WKView rightMouseDown:]):
4017 (-[WKView rightMouseDragged:]):
4018 (-[WKView rightMouseUp:]):
4019 (-[WKView _updateViewExposedRect]): Deleted.
4020 * UIProcess/Cocoa/WebViewImpl.h:
4021 * UIProcess/Cocoa/WebViewImpl.mm:
4022 (WebKit::WebViewImpl::mouseMoved):
4023 (WebKit::WebViewImpl::mouseDown):
4024 (WebKit::WebViewImpl::mouseUp):
4025 (WebKit::WebViewImpl::mouseDragged):
4026 Move mouse event handling.
4028 2015-10-30 Beth Dakin <bdakin@apple.com>