1 2017-12-08 Brady Eidson <beidson@apple.com>
3 Delay some service worker operations until after the database import completes.
4 https://bugs.webkit.org/show_bug.cgi?id=180573
6 Reviewed by Chris Dumez.
8 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
9 (WebKit::WebSWOriginStore::importComplete): Tell the Origin Table on all connects that
10 the import is complete.
11 (WebKit::WebSWOriginStore::registerSWServerConnection):
12 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
14 * WebProcess/Storage/WebSWClientConnection.cpp:
15 (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
16 (WebKit::WebSWClientConnection::setSWOriginTableIsImported): Run deferred tasks!
17 (WebKit::WebSWClientConnection::matchRegistration): If the import isn't complete yet, delay
18 the match registration task until later.
19 (WebKit::WebSWClientConnection::runOrDelayTask): Either send the message now or save off
20 the task to wait until the import is complete.
21 (WebKit::WebSWClientConnection::getRegistrations): If the import isn't complete yet, delay
22 the get registrations task until later.
23 (WebKit::WebSWClientConnection::initializeSWOriginTableAsEmpty): Deleted.
24 * WebProcess/Storage/WebSWClientConnection.h:
25 * WebProcess/Storage/WebSWClientConnection.messages.in:
27 * WebProcess/Storage/WebSWOriginTable.cpp:
28 (WebKit::WebSWOriginTable::setSharedMemory):
29 * WebProcess/Storage/WebSWOriginTable.h:
30 (WebKit::WebSWOriginTable::isImported const):
31 (WebKit::WebSWOriginTable::setIsImported):
32 (WebKit::WebSWOriginTable::isInitialized const): Deleted.
33 (WebKit::WebSWOriginTable::initializeAsEmpty): Deleted.
35 2017-12-08 Youenn Fablet <youenn@apple.com>
37 Service Worker should use a correct user agent
38 https://bugs.webkit.org/show_bug.cgi?id=180566
39 <rdar://problem/35926295>
41 Reviewed by Chris Dumez.
43 Add support to set service worker user agent from UIProcess to service worker process.
44 One user agent is currently supported per service worker process and it can be changed at any given time.
45 Only new service worker will use the new value.
46 Once a service worker is launched, it will stay with the same user agent value.
48 This sets both navigator.userAgent and User-Agent header name used for fetch within a service worker.
49 Compute the service worker process user agent by picking the last user agent set for a web page.
51 * UIProcess/ServiceWorkerProcessProxy.cpp:
52 (WebKit::ServiceWorkerProcessProxy::start):
53 (WebKit::ServiceWorkerProcessProxy::setUserAgent):
54 * UIProcess/ServiceWorkerProcessProxy.h:
55 * UIProcess/WebPageProxy.cpp:
56 (WebKit::WebPageProxy::setApplicationNameForUserAgent):
57 * UIProcess/WebProcessPool.cpp:
58 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
59 (WebKit::WebProcessPool::createWebPage):
60 (WebKit::WebProcessPool::updateServiceWorkerUserAgent):
61 * UIProcess/WebProcessPool.h:
62 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
63 (WebKit::WebSWContextManagerConnection::installServiceWorker):
64 (WebKit::WebSWContextManagerConnection::setUserAgent):
65 (WebKit::WebSWContextManagerConnection::removeFrameLoaderClient):
66 * WebProcess/Storage/WebSWContextManagerConnection.h:
67 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
69 2017-12-07 Simon Fraser <simon.fraser@apple.com>
71 Wrong caret position for input field inside a fixed position parent on iOS 11
72 https://bugs.webkit.org/show_bug.cgi?id=176896
73 rdar://problem/33726145
75 Reviewed by Tim Horton.
77 In r219668 I added code to compute a layout viewport rect in the web process, so that
78 after programmatic scrolling, getBoundingClientRect() would return the correct values.
79 However, that computation sometimes used a different visual viewport than the UI process,
80 resulting in a different layout viewport being set. This would happen when the keyboard
81 was visible, and the combination of this and zooming when focusing an input would result
82 in a state where the scrolling tree contained notes computed with the bad layout viewport.
83 This could cause apparently offset fixed elements, and bad caret positioning if those fixed
84 elements contained the focused input.
86 Fix by passing to the web process the same visual viewport rect that the UI process is using,
87 namely "unobscuredContentRectRespectingInputViewBounds". This was already being set in
88 VisibleContentRectUpdateInfo but wasn't encoded/decoded, so fix that. Set it as an optional<>
89 on FrameView when different from the normal visual viewport, and return it from
92 Some other minor logging changes.
94 * Shared/VisibleContentRectUpdateInfo.cpp:
95 (WebKit::VisibleContentRectUpdateInfo::encode const):
96 (WebKit::VisibleContentRectUpdateInfo::decode):
98 * Shared/VisibleContentRectUpdateInfo.h:
99 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
100 * WebProcess/WebPage/ios/WebPageIOS.mm:
101 (WebKit::WebPage::updateVisibleContentRects):
103 2017-12-06 Simon Fraser <simon.fraser@apple.com>
105 When the iPhone keyboard is up, sometimes we never commit a stable update and re-show the caret
106 https://bugs.webkit.org/show_bug.cgi?id=180498
108 Reviewed by Tim Horton.
110 When the keyboard is showing, we would think that the page was in a rubber-banding state
111 because contentOffsetBoundedInValidRange() would always clamp the content offset to a different
114 This happened because scrollView.contentInset don't change when the keyboard is showing,
115 but UIKit actually consults scrollView.adjustedContentInset, which does. If we use
116 scrollView.adjustedContentInset in this computation, we'll get a correct answer.
118 Also rewrote the clamping logic to be more similar to what UIKit does internally when computing
119 min/max content offset.
121 * UIProcess/API/Cocoa/WKWebView.mm:
122 (contentOffsetBoundedInValidRange):
124 2017-12-08 Chris Dumez <cdumez@apple.com>
126 Clearing all Website Data should remove service worker registrations on disk
127 https://bugs.webkit.org/show_bug.cgi?id=180558
129 Reviewed by Youenn Fablet.
131 * StorageProcess/StorageProcess.cpp:
132 (WebKit::StorageProcess::deleteWebsiteData):
133 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
135 2017-12-08 Youenn Fablet <youenn@apple.com>
137 WebServiceWorkerProvider should use Cancellation error to notify DTL that it cannot handle a fetch
138 https://bugs.webkit.org/show_bug.cgi?id=180584
140 Reviewed by Alex Christensen.
142 * WebProcess/Network/WebLoaderStrategy.cpp:
143 (WebKit::WebLoaderStrategy::scheduleLoad):
145 2017-12-08 Youenn Fablet <youenn@apple.com>
147 Service Worker should use a correct SessionID
148 https://bugs.webkit.org/show_bug.cgi?id=180585
150 Reviewed by Alex Christensen.
152 Store SessionID in SWServer and send it as part of service worker instantiation.
153 Use it when creating service worker thread in service worker process.
155 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
156 (WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
157 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
158 * StorageProcess/StorageProcess.cpp:
159 (WebKit::StorageProcess::swServerForSession):
160 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
161 (WebKit::WebSWContextManagerConnection::installServiceWorker):
162 * WebProcess/Storage/WebSWContextManagerConnection.h:
163 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
165 2017-12-08 Youenn Fablet <youenn@apple.com>
167 FetchResponse should keep unfiltered ResourceResponse so that it can be used in Service Worker
168 https://bugs.webkit.org/show_bug.cgi?id=179641
169 <rdar://problem/35923570>
171 Reviewed by Alex Christensen.
173 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
174 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): In case of opaque redirected response, handle it as a regular response.
176 2017-12-08 Alex Christensen <achristensen@webkit.org>
178 Remove unused code in WebPageGroup
179 https://bugs.webkit.org/show_bug.cgi?id=180604
181 Reviewed by Youenn Fablet.
183 * UIProcess/WebPageGroup.cpp:
184 (WebKit::WebPageGroup::userContentController):
185 (WebKit::WebPageGroup::createNonNull): Deleted.
186 (WebKit::WebPageGroup::preferencesDidChange): Deleted.
187 * UIProcess/WebPageGroup.h:
188 * UIProcess/WebProcessPool.cpp:
189 (WebKit::WebProcessPool::WebProcessPool):
191 2017-12-08 Alex Christensen <achristensen@webkit.org>
193 Modernize APIWebsiteDataStore.h and WebProcessPool.h
194 https://bugs.webkit.org/show_bug.cgi?id=180588
196 Reviewed by Chris Dumez.
198 pragma once, Ref instead of RefPtr, initializer list in header instead of literals in constructor.
200 * UIProcess/API/APIWebsiteDataStore.h:
201 * UIProcess/WebProcessPool.cpp:
202 (WebKit::WebProcessPool::WebProcessPool):
203 * UIProcess/WebProcessPool.h:
205 2017-12-08 Yusuke Suzuki <utatane.tea@gmail.com>
207 Remove pthread_once in favor of dispatch_once
208 https://bugs.webkit.org/show_bug.cgi?id=180591
210 Reviewed by Saam Barati.
212 * PluginProcess/mac/PluginProcessMac.mm:
213 (WebKit::shouldCallRealDebugger):
214 (WebKit::initShouldCallRealDebugger): Deleted.
216 2017-12-08 Chris Dumez <cdumez@apple.com>
218 ProcessPoolConfiguration::copy() fails to copy the service worker path
219 https://bugs.webkit.org/show_bug.cgi?id=180595
221 Reviewed by Brady Eidson.
223 * UIProcess/API/APIProcessPoolConfiguration.cpp:
224 (API::ProcessPoolConfiguration::copy):
226 2017-12-08 Chris Dumez <cdumez@apple.com>
228 Different WebKitTestRunner instances should use different service worker registrations databases
229 https://bugs.webkit.org/show_bug.cgi?id=180589
231 Reviewed by Brady Eidson.
233 * UIProcess/API/C/WKContextConfigurationRef.cpp:
234 (WKContextConfigurationCopyServiceWorkerDatabaseDirectory):
235 (WKContextConfigurationSetServiceWorkerDatabaseDirectory):
236 * UIProcess/API/C/WKContextConfigurationRef.h:
238 2017-12-08 Alex Christensen <achristensen@webkit.org>
240 Pass std::optional<WebsitePolicies> instead of WebsitePolicies
241 https://bugs.webkit.org/show_bug.cgi?id=180563
243 Reviewed by Andy Estes.
245 WebsitePolicies are only passed along when a decidePolicyForNavigationAction SPI completion handler
246 is called with a valid _WKWebsitePolicies object. In other cases, we don't have one. Rather than
247 making WebsitePolicies have a default value for everything that won't change policies, pass
248 a std::optional<WebsitePolicies> which indicates better when we don't have new policies.
250 No change in behavior, but this will enable me to add things to WebsitePolicies that have no default value.
252 * Shared/WebsitePolicies.h:
253 Make WebsitePolicies a class with public members because the IPC code generators don't understand std::optional<struct type>
254 * UIProcess/API/C/WKAPICast.h:
255 * UIProcess/Cocoa/NavigationState.mm:
256 (WebKit::tryAppLink):
257 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
258 * UIProcess/WebFrameListenerProxy.cpp:
259 (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
260 * UIProcess/WebFrameListenerProxy.h:
261 * UIProcess/WebFramePolicyListenerProxy.cpp:
262 (WebKit::WebFramePolicyListenerProxy::use):
263 * UIProcess/WebFramePolicyListenerProxy.h:
264 * UIProcess/WebFrameProxy.cpp:
265 (WebKit::WebFrameProxy::receivedPolicyDecision):
266 * UIProcess/WebFrameProxy.h:
267 * UIProcess/WebPageProxy.cpp:
268 (WebKit::WebPageProxy::receivedPolicyDecision):
269 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
270 * UIProcess/WebPageProxy.h:
271 * UIProcess/WebPageProxy.messages.in:
272 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
273 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
274 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
275 * WebProcess/WebPage/WebFrame.cpp:
276 (WebKit::WebFrame::didReceivePolicyDecision):
277 * WebProcess/WebPage/WebFrame.h:
278 * WebProcess/WebPage/WebPage.cpp:
279 (WebKit::WebPage::didReceivePolicyDecision):
280 * WebProcess/WebPage/WebPage.h:
281 * WebProcess/WebPage/WebPage.messages.in:
283 2017-12-08 Yusuke Suzuki <utatane.tea@gmail.com>
285 [WTF] Remove remaining use of Mutex
286 https://bugs.webkit.org/show_bug.cgi?id=180579
288 Reviewed by Alex Christensen.
290 Remove unused "BinarySemaphore.h".
292 * Platform/IPC/win/ConnectionWin.cpp:
294 2017-12-08 Michael Catanzaro <mcatanzaro@igalia.com>
296 [GTK] WebInspectorProxyClient needs a virtual destructor
297 https://bugs.webkit.org/show_bug.cgi?id=180533
299 Reviewed by Carlos Garcia Campos.
301 Otherwise the derived class portion of the object, WebKitInspectorClient, is not destroyed.
303 * UIProcess/gtk/WebInspectorProxyClient.h:
305 2017-12-07 Yousuke Kimoto <yousuke.kimoto@sony.com>
307 [WinCairo] Fix ResourceError handling in ArgumentCoder for wincairo webkit
308 https://bugs.webkit.org/show_bug.cgi?id=180483
310 Reviewed by Alex Christensen.
312 * Shared/curl/WebCoreArgumentCodersCurl.cpp:
313 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
314 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
316 2017-12-07 Youenn Fablet <youenn@apple.com>
318 StartFetch should take a ServiceWorkerIdentifier
319 https://bugs.webkit.org/show_bug.cgi?id=180478
321 Reviewed by Brady Eidson.
323 Before the patch, StartFetch was taking an optional ServiceWorkerIdentifier.
324 Now that every navigation fetch is querying its matching registration, it can no longer be optional.
326 In the case there is a problem in running the service worker at start fetch time,
327 answer to the WebProcess to go to network so that the request does not get stalled.
329 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
330 (WebKit::WebSWServerConnection::startFetch):
331 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
332 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
333 * WebProcess/Storage/WebSWClientConnection.cpp:
334 (WebKit::WebSWClientConnection::startFetch):
335 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
336 (WebKit::WebSWContextManagerConnection::startFetch):
337 * WebProcess/Storage/WebSWContextManagerConnection.h:
338 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
340 2017-12-07 Saam Barati <sbarati@apple.com>
342 We need to grab the JSLock in InjectedBundle::createWebDataFromUint8Array
343 https://bugs.webkit.org/show_bug.cgi?id=180492
345 Reviewed by Alex Christensen.
347 InjectedBundle::createWebDataFromUint8Array calls into WebCore APIs that allocate
348 out of the JS heap. It's only legal to allocate out of the JS heap when holding the JS lock.
350 * WebProcess/InjectedBundle/InjectedBundle.cpp:
351 (WebKit::InjectedBundle::createWebDataFromUint8Array):
353 2017-12-07 Simon Fraser <simon.fraser@apple.com>
355 Propagate WebKit2Logging channels to the Web Process
356 https://bugs.webkit.org/show_bug.cgi?id=180517
358 Reviewed by Tim Horton.
360 If you set WebKit2Logging, you want those channels active in both the UI process and
361 the web process, but without tricky 'defaults' gyrations, setting them in the web process
364 Instead, send them through to the process via WebProcessCreationParameters, as we do
365 for WebCoreLogging channels.
367 * Platform/LogInitialization.h:
368 * Platform/Logging.cpp:
369 (WebKit::initializeLogChannelsIfNecessary):
370 * Shared/WebProcessCreationParameters.cpp:
371 (WebKit::WebProcessCreationParameters::encode const):
372 (WebKit::WebProcessCreationParameters::decode):
373 * Shared/WebProcessCreationParameters.h:
374 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
375 (WebKit::WebProcessPool::platformInitializeWebProcess):
376 * WebProcess/cocoa/WebProcessCocoa.mm:
377 (WebKit::WebProcess::platformInitializeWebProcess):
379 2017-12-07 Simon Fraser <simon.fraser@apple.com>
381 Add logging for EditorState in RemoteLayerTree transactions
382 https://bugs.webkit.org/show_bug.cgi?id=180515
384 Reviewed by Wenson Hsieh.
386 Make EditorState TextStream-able, and dump it in layer tree transactions.
388 * Shared/EditorState.cpp:
389 (WebKit::operator<<):
390 * Shared/EditorState.h:
391 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
392 (WebKit::RemoteLayerTreeTransaction::description const):
394 2017-12-07 Youenn Fablet <youenn@apple.com>
396 CacheStorage Cache should not remove any disk entry when clearing its memory representation
397 https://bugs.webkit.org/show_bug.cgi?id=180546
399 Reviewed by Brady Eidson.
401 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
402 (WebKit::CacheStorage::Cache::clearMemoryRepresentation):
404 2017-12-07 Myles C. Maxfield <mmaxfield@apple.com>
406 [Cocoa] Add SPI to disallow user-installed fonts
407 https://bugs.webkit.org/show_bug.cgi?id=180062
408 <rdar://problem/35042408>
410 Reviewed by Simon Fraser.
412 * Shared/WebPreferences.yaml:
413 * UIProcess/API/C/WKPreferences.cpp:
414 (WKPreferencesSetShouldDisallowUserInstalledFonts):
415 (WKPreferencesGetShouldDisallowUserInstalledFonts):
416 * UIProcess/API/C/WKPreferencesRefPrivate.h:
417 * UIProcess/API/Cocoa/WKPreferences.mm:
418 (-[WKPreferences _shouldDisallowUserInstalledFonts]):
419 (-[WKPreferences _setShouldDisallowUserInstalledFonts:]):
420 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
422 2017-12-07 David Quesada <david_quesada@apple.com>
424 [Web App Manifest] Support display-mode media feature
425 https://bugs.webkit.org/show_bug.cgi?id=180376
426 rdar://problem/35837993
428 Reviewed by Geoffrey Garen.
430 * UIProcess/API/Cocoa/_WKApplicationManifest.h:
431 * UIProcess/API/Cocoa/_WKApplicationManifest.mm:
432 (-[_WKApplicationManifest initWithCoder:]):
433 (-[_WKApplicationManifest encodeWithCoder:]):
434 (-[_WKApplicationManifest displayMode]):
436 2017-12-07 Chris Dumez <cdumez@apple.com>
438 Unreviewed build fix after r225622.
440 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
441 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
443 2017-12-06 Chris Dumez <cdumez@apple.com>
445 We should be able to recover after a Service Worker process crash
446 https://bugs.webkit.org/show_bug.cgi?id=180477
448 Reviewed by Brady Eidson and Youenn Fablet.
450 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
451 (WebKit::WebSWServerConnection::startFetch):
452 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromClient):
453 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
454 Update calls to SWServer::runServiceWorkerIfNecessary() that that it is asynchronous
455 and takes in a lambda.
457 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
458 (WebKit::WebSWServerConnection::ipcConnection const):
459 Add getter for the underlying IPC connection.
461 * StorageProcess/StorageProcess.cpp:
462 (WebKit::StorageProcess::didClose):
463 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
464 Move some code to connectionToContextProcessWasClosed() to avoid duplication.
465 Also, relaunch the Service Worker process if it has exited but we still
466 have SWServer connections to regular Web Processes.
468 (WebKit::StorageProcess::needsServerToContextConnection const):
469 Utility function to determine if we still need the service worker process.
470 The current rule is that we need the service worker (aka "context") process
471 if we still have SWServer connections to regular Web Processes.
473 * StorageProcess/StorageProcess.h:
475 * StorageProcess/StorageToWebProcessConnection.cpp:
476 (WebKit::StorageToWebProcessConnection::didClose):
477 If didClose() is called for the connection to the service worker context,
478 let the StorageProcess know so that it can clear its state and relaunch
479 the process if necessary.
481 * UIProcess/API/C/WKContext.cpp:
482 (WKContextTerminateServiceWorkerProcess):
483 * UIProcess/API/C/WKContextPrivate.h:
484 * UIProcess/API/Cocoa/WKProcessPool.mm:
485 (-[WKProcessPool _terminateServiceWorkerProcess]):
486 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
487 Add SPI to terminate the service worker process.
489 * UIProcess/WebProcessPool.cpp:
490 (WebKit::m_serviceWorkerProcessTerminationTimer):
491 (WebKit::WebProcessPool::createNewWebProcess):
492 (WebKit::WebProcessPool::disconnectProcess):
493 (WebKit::WebProcessPool::terminateServiceWorkerProcess):
494 * UIProcess/WebProcessPool.h:
495 We used to shutdown the ServiceWorker process right away as soon as the last regular
496 WebProcess was gone. We now give it a grace period of 5 seconds in case a new
497 WebProcess gets launched shortly after.
499 2017-12-02 Darin Adler <darin@apple.com>
501 Modernize some aspects of text codecs, eliminate WebKit use of strcasecmp
502 https://bugs.webkit.org/show_bug.cgi?id=180009
504 Reviewed by Alex Christensen.
506 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
507 (WebKit::initializeProtectionSpace): Use equalLettersIgnoringASCIICase instead
510 2017-12-06 David Quesada <david_quesada@apple.com>
512 [Web App Manifest] Add SPI for applying a manifest to a top-level browsing context
513 https://bugs.webkit.org/show_bug.cgi?id=180368
514 rdar://problem/34748067
516 Reviewed by Geoffrey Garen.
518 Add a new property WKWebViewConfiguration._applicationManifest to specify manifest
519 to apply to application contexts (aka. top-level browsing contexts, i.e. web views).
520 The manifest is ultimately stored on the MainFrame of the Pages created from the
521 web view configuration.
523 No new tests, no change in behavior.
525 * Shared/WebPageCreationParameters.cpp:
526 (WebKit::WebPageCreationParameters::encode const):
527 (WebKit::WebPageCreationParameters::decode):
528 * Shared/WebPageCreationParameters.h:
529 * UIProcess/API/APIPageConfiguration.cpp:
530 (API::PageConfiguration::copy const):
531 (API::PageConfiguration::applicationManifest const):
532 (API::PageConfiguration::setApplicationManifest):
533 * UIProcess/API/APIPageConfiguration.h:
534 * UIProcess/API/Cocoa/WKWebView.mm:
535 (-[WKWebView _initializeWithConfiguration:]):
536 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
537 (-[WKWebViewConfiguration copyWithZone:]):
538 (-[WKWebViewConfiguration _applicationManifest]):
539 (-[WKWebViewConfiguration _setApplicationManifest:]):
540 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
541 * UIProcess/API/Cocoa/_WKApplicationManifestInternal.h:
542 * UIProcess/WebPageProxy.cpp:
543 (WebKit::WebPageProxy::creationParameters):
544 * WebProcess/WebPage/WebPage.cpp:
545 (WebKit::m_cpuLimit):
547 2017-12-06 Jeff Miller <jeffm@apple.com>
549 -[WKWebViewConfiguration copyWithZone] doesn't copy _groupIdentifier
550 https://bugs.webkit.org/show_bug.cgi?id=180504
552 Reviewed by Geoffrey Garen.
554 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
555 (-[WKWebViewConfiguration copyWithZone:]):
556 Copy _groupIdentifier.
558 2017-12-06 David Quesada <david_quesada@apple.com>
560 [Web App Manifest] Add SPI for fetching the manifest
561 https://bugs.webkit.org/show_bug.cgi?id=180294
562 rdar://problem/34747968
564 Reviewed by Geoffrey Garen.
566 Add a new method -[WKWebView _getApplicationManifestWithCompletionHandler:] to request
567 the manifest associated with the current page.
569 * Shared/API/APIObject.h:
570 * Shared/Cocoa/APIObject.mm:
571 (API::Object::newObject):
572 * UIProcess/API/APIApplicationManifest.h: Copied from Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h.
573 Add a new API object type for application manifests.
574 * UIProcess/API/C/WKPage.cpp:
575 (WKPageGetApplicationManifest_b):
576 Add a C version of this SPI for WebKitTestRunner.
577 * UIProcess/API/C/WKPagePrivate.h:
578 * UIProcess/API/Cocoa/WKWebView.mm:
579 (-[WKWebView _getApplicationManifestWithCompletionHandler:]):
580 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
581 * UIProcess/API/Cocoa/_WKApplicationManifest.h: Copied from Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h.
582 * UIProcess/API/Cocoa/_WKApplicationManifest.mm: Added.
583 (-[_WKApplicationManifest initWithCoder:]):
584 (-[_WKApplicationManifest encodeWithCoder:]):
585 (+[_WKApplicationManifest applicationManifestFromJSON:manifestURL:documentURL:]):
586 (-[_WKApplicationManifest _apiObject]):
588 (-[_WKApplicationManifest name]):
589 (-[_WKApplicationManifest shortName]):
590 (-[_WKApplicationManifest applicationDescription]):
591 (-[_WKApplicationManifest scope]):
592 (-[_WKApplicationManifest startURL]):
593 * UIProcess/API/Cocoa/_WKApplicationManifestInternal.h: Copied from Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h.
595 * UIProcess/WebPageProxy.cpp:
596 (WebKit::WebPageProxy::applicationManifestCallback):
597 (WebKit::WebPageProxy::getApplicationManifest):
598 * UIProcess/WebPageProxy.h:
599 * UIProcess/WebPageProxy.messages.in:
600 * WebKit.xcodeproj/project.pbxproj:
601 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
602 (WebKit::WebFrameLoaderClient::finishedLoadingApplicationManifest):
603 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
604 * WebProcess/WebPage/WebPage.cpp:
605 (WebKit::WebPage::getApplicationManifest):
606 (WebKit::WebPage::didFinishLoadingApplicationManifest):
607 * WebProcess/WebPage/WebPage.h:
608 * WebProcess/WebPage/WebPage.messages.in:
610 2017-12-06 Per Arne Vollan <pvollan@apple.com>
612 The WebProcess should use the NSRunLoop runloop type.
613 https://bugs.webkit.org/show_bug.cgi?id=179804
614 <rdar://problem/14012823>
616 Reviewed by Brent Fulgham.
618 * Platform/IPC/mac/ConnectionMac.mm:
619 (IPC::AccessibilityProcessSuspendedNotification):
620 * Shared/ChildProcess.h:
621 * Shared/mac/ChildProcessMac.mm:
622 (WebKit::ChildProcess::launchServicesCheckIn):
623 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
624 (WebKit::shouldLeakBoost):
625 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
626 * WebProcess/WebProcess.cpp:
627 (WebKit::WebProcess::initializeProcess):
629 2017-12-06 Nan Wang <n_wang@apple.com>
631 AX: [iOS] Post accessibility notification when a web process changes its suspended state
632 https://bugs.webkit.org/show_bug.cgi?id=180458
633 <rdar://problem/35869115>
635 Reviewed by Chris Dumez.
637 Post accessibility notification with the pid information when a web process
638 becomes suspended or resumes running.
640 * WebProcess/WebProcess.cpp:
641 (WebKit::WebProcess::actualPrepareToSuspend):
642 (WebKit::WebProcess::processDidResume):
643 * WebProcess/WebProcess.h:
644 * WebProcess/cocoa/WebProcessCocoa.mm:
645 (WebKit::WebProcess::accessibilityProcessSuspendedNotification):
647 2017-12-06 Ryan Haddad <ryanhaddad@apple.com>
649 Unreviewed build fix, removed unused lambda capture.
651 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
652 (WebKit::CacheStorageEngineConnection::open):
654 2017-12-06 John Wilander <wilander@apple.com>
656 Storage Access API: Make document.hasStorageAccess a function and always allow access for same-origin iframes
657 https://bugs.webkit.org/show_bug.cgi?id=176944
658 <rdar://problem/34440658>
660 Reviewed by Brent Fulgham.
662 This change introduces document.hasStorageAccess() as a function which
663 returns a promise instead of being a property. Since cookie access can
664 be due to both a granted request and recent user interaction as first
665 party, the WebKit::WebResourceLoadStatisticsStore needs to be consulted.
667 * UIProcess/WebPageProxy.cpp:
668 (WebKit::WebPageProxy::hasStorageAccess):
669 * UIProcess/WebPageProxy.h:
670 * UIProcess/WebPageProxy.messages.in:
671 * UIProcess/WebResourceLoadStatisticsStore.cpp:
672 (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess):
673 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
674 Now adds an entry for granted access. A bug found through testing.
675 Switched from WTF::Function to WTF::CompletionHandler.
676 * UIProcess/WebResourceLoadStatisticsStore.h:
677 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
678 (WebKit::WebsiteDataStore::hasStorageAccess):
679 (WebKit::WebsiteDataStore::requestStorageAccess):
680 Switched from WTF::Function to WTF::CompletionHandler.
681 * UIProcess/WebsiteData/WebsiteDataStore.h:
682 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
683 (WebKit::WebChromeClient::hasStorageAccess):
684 (WebKit::WebChromeClient::requestStorageAccess):
685 Switched from WTF::Function to WTF::CompletionHandler.
686 * WebProcess/WebCoreSupport/WebChromeClient.h:
687 * WebProcess/WebPage/WebPage.cpp:
688 (WebKit::WebPage::hasStorageAccess):
689 (WebKit::WebPage::requestStorageAccess):
690 Switched from WTF::Function to WTF::CompletionHandler.
691 * WebProcess/WebPage/WebPage.h:
693 2017-12-06 Youenn Fablet <youenn@apple.com>
695 CacheStorageEngineConnection should protect its IPC Connection when doing asynchronous tasks
696 https://bugs.webkit.org/show_bug.cgi?id=180461
698 Reviewed by Chris Dumez.
700 Protecting the IPC connection instead of the CacheStorageEngineConnection
701 since CacheStorageEngineConnection only keeps a reference to the NetworkConnectionToWebProcess.
703 * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
704 (WebKit::CacheStorageEngineConnection::open):
705 (WebKit::CacheStorageEngineConnection::remove):
706 (WebKit::CacheStorageEngineConnection::caches):
707 (WebKit::CacheStorageEngineConnection::retrieveRecords):
708 (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
709 (WebKit::CacheStorageEngineConnection::putRecords):
710 (WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
712 2017-12-06 Zan Dobersek <zdobersek@igalia.com>
714 [CoordGraphics] Introduce Nicosia::PaintingContext, add Cairo implementation
715 https://bugs.webkit.org/show_bug.cgi?id=180239
717 Reviewed by Michael Catanzaro.
719 With Nicosia::Buffer now only providing the memory area into which the
720 tile content was rasterized, we can simplify the BitmapTexture update
721 greatly -- we don't have to create a BitmapImage anymore and retrieve
722 memory pointer from the contained cairo_surface_t object. Instead, we
723 just copy to GPU the memory that Nicosia::Buffer controls.
725 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
726 (WebKit::CoordinatedBackingStoreTile::swapBuffers):
728 2017-12-05 Brent Fulgham <bfulgham@apple.com>
730 Limit user agent versioning to an upper bound
731 https://bugs.webkit.org/show_bug.cgi?id=180365
732 <rdar://problem/34550617>
734 Reviewed by Joseph Pecoraro.
736 * UIProcess/ios/WebPageProxyIOS.mm:
737 (WebKit::WebPageProxy::standardUserAgent): Don't pass the WebKit bundle version when
738 creatin the User Agent string.
739 (WebKit::webKitBundleVersionString): Deleted.
740 * UIProcess/mac/WebPageProxyMac.mm:
741 (WebKit::WebPageProxy::standardUserAgent): Ditto.
742 (WebKit::webKitBundleVersionString): Deleted.
744 2017-12-05 Alex Christensen <achristensen@webkit.org>
746 Fix crash when loading a file URL that does not have a fileSystemPath representation
747 https://bugs.webkit.org/show_bug.cgi?id=180448
748 <rdar://problem/22805921>
750 Reviewed by Chris Dumez.
752 * UIProcess/WebProcessProxy.cpp:
753 (WebKit::WebProcessProxy::assumeReadAccessToBaseURL):
754 Check if a String is null before adding it to a HashSet.
756 2017-12-05 Youenn Fablet <youenn@apple.com>
758 Implement https://w3c.github.io/ServiceWorker/#clients-claim
759 https://bugs.webkit.org/show_bug.cgi?id=180261
761 Reviewed by Chris Dumez.
763 Add IPC plumbery for clients claim between ServiceWorker process and Storage process.
765 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
766 (WebKit::WebSWServerToContextConnection::claimCompleted):
767 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
768 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
769 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
770 (WebKit::WebSWContextManagerConnection::claim):
771 (WebKit::WebSWContextManagerConnection::claimCompleted):
772 * WebProcess/Storage/WebSWContextManagerConnection.h:
773 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
775 2017-12-05 Chris Dumez <cdumez@apple.com>
777 Add support for ServiceWorkerContainer.prototype.ready
778 https://bugs.webkit.org/show_bug.cgi?id=180383
780 Reviewed by Youenn Fablet.
782 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
783 (WebKit::WebSWServerConnection::whenRegistrationReady):
784 (WebKit::WebSWServerConnection::resolveRegistrationReadyRequests):
785 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
786 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
787 * WebProcess/Storage/WebSWClientConnection.cpp:
788 (WebKit::WebSWClientConnection::matchRegistration):
789 (WebKit::WebSWClientConnection::whenRegistrationReady):
790 (WebKit::WebSWClientConnection::registrationReady):
791 (WebKit::WebSWClientConnection::getRegistrations):
792 * WebProcess/Storage/WebSWClientConnection.h:
793 * WebProcess/Storage/WebSWClientConnection.messages.in:
795 2017-12-05 Youenn Fablet <youenn@apple.com>
797 Implement setting of service worker to client in SWServer without going to WebProcess
798 https://bugs.webkit.org/show_bug.cgi?id=180382
800 Reviewed by Chris Dumez.
802 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
803 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
804 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
805 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
806 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
807 * WebProcess/Storage/WebSWClientConnection.cpp:
808 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
809 (WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient): Deleted.
810 (WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient): Deleted.
811 * WebProcess/Storage/WebSWClientConnection.h:
813 2017-12-04 Chris Dumez <cdumez@apple.com>
815 Support container.getRegistration() / getRegistrations() inside service workers
816 https://bugs.webkit.org/show_bug.cgi?id=180360
818 Reviewed by Youenn Fablet.
820 * WebProcess/Storage/WebSWClientConnection.cpp:
821 (WebKit::WebSWClientConnection::didMatchRegistration):
822 (WebKit::WebSWClientConnection::didGetRegistrations):
823 (WebKit::WebSWClientConnection::matchRegistration):
824 (WebKit::WebSWClientConnection::getRegistrations):
826 2017-12-04 Brady Eidson <beidson@apple.com>
829 Get a directory path to SWServers for storing ServiceWorker registrations
830 https://bugs.webkit.org/show_bug.cgi?id=180362
834 * StorageProcess/StorageProcess.cpp:
835 (WebKit::StorageProcess::swServerForSession): Change this ASSERT which is invalid in private browsing sessions.
837 2017-12-04 Simon Fraser <simon.fraser@apple.com>
839 Minor DisplayRefreshMonitor-related cleanup
840 https://bugs.webkit.org/show_bug.cgi?id=179802
842 Reviewed by Sam Weinig.
844 Use RunLoopObserver::WellKnownRunLoopOrders. We want to fire before layer flushing.
846 * UIProcess/WebPageProxy.cpp:
847 (WebKit::m_configurationPreferenceValues):
849 2017-12-04 Brent Fulgham <bfulgham@apple.com>
851 Don't force creation of process pool when enabling resource load statistics
852 https://bugs.webkit.org/show_bug.cgi?id=180374
853 <rdar://problem/35545639>
855 Reviewed by Alex Christensen.
857 Pass appropriate arguments to the 'processPool' accessor so that we only get the
858 set of existing process pools. We don't want to pay the cost of launching new
859 process pools just to set this flag. The flag will be properly set when the pools
860 are created as soon as a WebView is instantiated.
862 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
863 (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
865 2017-12-04 David Quesada <david_quesada@apple.com>
867 Add a class for parsing application manifests
868 https://bugs.webkit.org/show_bug.cgi?id=177973
869 rdar://problem/34747949
871 Reviewed by Geoffrey Garen.
873 * Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.
875 2017-12-04 Wenson Hsieh <wenson_hsieh@apple.com>
877 Rename a static helper in TouchBarMenuItemData.cpp to match style guidelines.
878 https://bugs.webkit.org/show_bug.cgi?id=180305
880 Reviewed by Andy Estes.
882 Style guidelines state that we should use bare words for getters, so getItemType should just be
883 itemType. Since this collides with the itemType member variable, this patch also renames that
884 member variable to the more concise "type".
886 No change in behavior.
888 * Shared/TouchBarMenuItemData.cpp:
890 (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
891 (WebKit::TouchBarMenuItemData::encode const):
892 (WebKit::TouchBarMenuItemData::decode):
893 (WebKit::getItemType): Deleted.
894 * Shared/TouchBarMenuItemData.h:
895 (WebKit::operator==):
897 2017-12-04 Brian Burg <bburg@apple.com>
899 Web Automation: add flag to preserve legacy page screenshot behavior
900 https://bugs.webkit.org/show_bug.cgi?id=180313
901 <rdar://problem/34379930>
903 Reviewed by Joseph Pecoraro.
905 For compatibility with JSON Wire Protocol implemented by Safari,
906 we need to retain the ability to perform whole page contents
907 snapshots using Automation.takeScreenshot. Add an extra flag,
908 clipToViewport, which can be used by W3C-conforming drivers.
910 * UIProcess/Automation/Automation.json: Add new flag.
911 * UIProcess/Automation/WebAutomationSession.h:
912 * UIProcess/Automation/WebAutomationSession.cpp:
913 (WebKit::WebAutomationSession::takeScreenshot):
914 * WebProcess/Automation/WebAutomationSessionProxy.h:
915 * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
916 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
917 (WebKit::snapshotRectForScreenshot):
918 (WebKit::WebAutomationSessionProxy::takeScreenshot):
919 If the flag is false, take a screenshot of the whole page contents.
921 2017-12-04 JF Bastien <jfbastien@apple.com>
923 Update std::expected to match libc++ coding style
924 https://bugs.webkit.org/show_bug.cgi?id=180264
926 Reviewed by Alex Christensen.
928 Update various uses of Expected, mostly renaming valueOr and
929 hasValue to the STL naming convention.
931 * NetworkProcess/cache/CacheStorageEngine.cpp:
932 (WebKit::CacheStorage::Engine::open):
933 (WebKit::CacheStorage::Engine::retrieveCaches):
934 (WebKit::CacheStorage::Engine::retrieveRecords):
935 (WebKit::CacheStorage::Engine::putRecords):
936 (WebKit::CacheStorage::Engine::deleteMatchingRecords):
937 (WebKit::CacheStorage::Engine::fetchEntries):
938 (WebKit::CacheStorage::Engine::clearMemoryRepresentation):
939 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
940 (WebKit::CacheStorage::ReadRecordTaskCounter::appendRecord):
941 (WebKit::CacheStorage::Cache::updateRecordToDisk):
942 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
943 (WebKit::CacheStorage::Caches::initialize):
944 (WebKit::CacheStorage::Caches::readCachesFromDisk):
945 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
946 (WebKit::NetworkRTCProvider::createResolver):
947 * Platform/IPC/ArgumentCoders.h:
949 2017-12-04 Brady Eidson <beidson@apple.com>
951 Get a directory path to SWServers for storing ServiceWorker registrations.
952 https://bugs.webkit.org/show_bug.cgi?id=180362
954 Reviewed by Chris Dumez.
956 This gets all of the plumbing in place for specifying a ServiceWorker registration storage path
957 in a particular WebsiteDataStore.
959 * Shared/Storage/StorageProcessCreationParameters.cpp:
960 (WebKit::StorageProcessCreationParameters::encode const):
961 (WebKit::StorageProcessCreationParameters::decode):
962 * Shared/Storage/StorageProcessCreationParameters.h:
964 * StorageProcess/StorageProcess.cpp:
965 (WebKit::StorageProcess::initializeWebsiteDataStore):
966 (WebKit::StorageProcess::swServerForSession):
967 * StorageProcess/StorageProcess.h:
969 * UIProcess/API/APIProcessPoolConfiguration.cpp:
970 (API::ProcessPoolConfiguration::createWithLegacyOptions):
971 (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
972 (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
973 * UIProcess/API/APIProcessPoolConfiguration.h:
975 * UIProcess/API/APIWebsiteDataStore.h:
976 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
977 (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
978 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
979 (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
981 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
982 (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
983 (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
984 * UIProcess/WebProcessPool.cpp:
985 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
986 * UIProcess/WebProcessPool.h:
988 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
989 (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
990 (WebKit::WebsiteDataStore::storageProcessParameters):
991 * UIProcess/WebsiteData/WebsiteDataStore.h:
992 (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):
994 * UIProcess/gtk/WebProcessPoolGtk.cpp:
995 (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
997 * UIProcess/wpe/WebProcessPoolWPE.cpp:
998 (WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
1000 2017-12-04 Frederic Wang <fwang@igalia.com>
1002 Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
1003 https://bugs.webkit.org/show_bug.cgi?id=180353
1005 Reviewed by Antonio Gomes.
1007 This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
1008 nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
1009 actually the frame node itself or otherwise we will get the same rendering bug. This patch
1010 makes enclosingFrameNode return the node itself when it is a frame node and renames it to
1011 clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
1012 behavior is unchanged.
1014 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
1015 (WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll): Use auto* and
1016 the new function name.
1018 2017-12-04 Michael Catanzaro <mcatanzaro@igalia.com>
1020 [GTK] Implement PAL::SleepDisabler
1021 https://bugs.webkit.org/show_bug.cgi?id=178485
1023 Reviewed by Carlos Garcia Campos.
1025 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1026 (webkitWebViewBaseDispose):
1027 (webkitWebViewBaseEnterFullScreen):
1028 (webkitWebViewBaseExitFullScreen):
1029 (screenSaverInhibitedCallback): Deleted.
1030 (webkitWebViewBaseSendInhibitMessageToScreenSaver): Deleted.
1031 (screenSaverProxyCreatedCallback): Deleted.
1032 (webkitWebViewBaseInhibitScreenSaver): Deleted.
1033 (webkitWebViewBaseUninhibitScreenSaver): Deleted.
1035 2017-12-03 Yusuke Suzuki <utatane.tea@gmail.com>
1037 WTF shouldn't have both Thread and ThreadIdentifier
1038 https://bugs.webkit.org/show_bug.cgi?id=180308
1040 Reviewed by Darin Adler.
1042 * UIProcess/API/glib/IconDatabase.cpp:
1043 * UIProcess/GenericCallback.h:
1044 (WebKit::GenericCallback::~GenericCallback):
1045 (WebKit::GenericCallback::performCallbackWithReturnValue):
1047 2017-12-03 Chris Dumez <cdumez@apple.com>
1049 Support serviceWorker.postMessage() inside service workers
1050 https://bugs.webkit.org/show_bug.cgi?id=180328
1052 Reviewed by Darin Adler.
1054 Support serviceWorker.postMessage() inside service workers.
1056 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1057 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromClient):
1058 (WebKit::WebSWServerConnection::postMessageToServiceWorkerFromServiceWorker):
1059 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1060 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1061 * WebProcess/Storage/WebSWClientConnection.cpp:
1062 (WebKit::WebSWClientConnection::postMessageToServiceWorker):
1063 * WebProcess/Storage/WebSWClientConnection.h:
1064 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1065 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerFromClient):
1066 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerFromServiceWorker):
1067 * WebProcess/Storage/WebSWContextManagerConnection.h:
1068 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1070 2017-12-03 Chris Dumez <cdumez@apple.com>
1072 Implement self.skipWaiting() inside service workers
1073 https://bugs.webkit.org/show_bug.cgi?id=180329
1075 Reviewed by Darin Adler.
1077 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1078 (WebKit::WebSWServerToContextConnection::didFinishSkipWaiting):
1079 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1080 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
1081 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1082 (WebKit::WebSWContextManagerConnection::skipWaiting):
1083 (WebKit::WebSWContextManagerConnection::didFinishSkipWaiting):
1084 * WebProcess/Storage/WebSWContextManagerConnection.h:
1085 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1087 2017-12-02 Youenn Fablet <youenn@apple.com>
1089 Implement https://w3c.github.io/ServiceWorker/#clients-getall
1090 https://bugs.webkit.org/show_bug.cgi?id=180276
1092 Reviewed by Chris Dumez.
1094 Add IPC plumbery for clients.matchAll between ServiceWorker process and Storage process.
1096 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1097 (WebKit::WebSWServerToContextConnection::matchAllCompleted):
1098 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1099 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
1100 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1101 (WebKit::WebSWContextManagerConnection::matchAll):
1102 (WebKit::WebSWContextManagerConnection::matchAllCompleted):
1103 * WebProcess/Storage/WebSWContextManagerConnection.h:
1104 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1106 2017-12-02 Joseph Pecoraro <pecoraro@apple.com>
1108 Remote Web Inspector window always shows up at the default size
1109 https://bugs.webkit.org/show_bug.cgi?id=180284
1110 <rdar://problem/35430255>
1112 Reviewed by Brian Burg.
1114 * UIProcess/mac/RemoteWebInspectorProxyMac.mm:
1115 (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
1116 Give remote web inspector windows an autosave name so that their frame can
1117 be automatically saved and restored by the system.
1119 2017-12-02 Simon Fraser <simon.fraser@apple.com>
1121 Add a log channel for viewports
1122 https://bugs.webkit.org/show_bug.cgi?id=180295
1124 Reviewed by Zalan Bujtas.
1126 Add a "Viewports" log channel to log viewport scaling information, and enhance the
1127 WebKit "VisibleRects" channel to log additional data for the same reason.
1129 * UIProcess/API/Cocoa/WKWebView.mm:
1130 (-[WKWebView _didCommitLayerTree:]):
1131 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
1132 (-[WKWebView _dispatchSetMinimumLayoutSize:]):
1133 (-[WKWebView _endAnimatedResize]):
1134 (-[WKWebView _resizeWhileHidingContentWithUpdates:]):
1135 * WebProcess/WebPage/WebPage.cpp:
1136 (WebKit::WebPage::setFixedLayoutSize):
1137 (WebKit::WebPage::mainFrameDidLayout):
1138 (WebKit::WebPage::didCommitLoad):
1139 * WebProcess/WebPage/ios/WebPageIOS.mm:
1140 (WebKit::scaleAfterViewportWidthChange):
1141 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
1142 (WebKit::WebPage::dynamicViewportSizeUpdate):
1143 (WebKit::WebPage::resetViewportDefaultConfiguration):
1144 (WebKit::WebPage::viewportConfigurationChanged):
1145 (WebKit::WebPage::updateVisibleContentRects):
1147 2017-12-02 Carlos Garcia Campos <cgarcia@igalia.com>
1149 WebDriver: handle user prompts shown while executing scripts
1150 https://bugs.webkit.org/show_bug.cgi?id=179979
1152 Reviewed by Brian Burg.
1154 * UIProcess/Automation/Automation.json: Add UnexpectedAlertOpen error.
1155 * UIProcess/Automation/WebAutomationSession.cpp:
1156 (WebKit::WebAutomationSession::willShowJavaScriptDialog): Finish pending evaluateJavaScriptFunction operations
1157 with UnexpectedAlertOpen error.
1159 2017-12-02 Wenson Hsieh <wenson_hsieh@apple.com>
1161 Make some minor adjustments to TouchBarMenuData and TouchBarMenuItemData
1162 https://bugs.webkit.org/show_bug.cgi?id=180305
1164 Reviewed by Joseph Pecoraro.
1166 Mark some methods and parameters as const, use the default constructor in more places, and also remove a few
1167 extraneous imported headers.
1169 * Shared/TouchBarMenuData.cpp:
1170 (WebKit::TouchBarMenuData::TouchBarMenuData):
1172 Add a FIXME regarding the use of the 'id' attribute.
1174 (WebKit::TouchBarMenuData::decode):
1175 * Shared/TouchBarMenuData.h:
1176 (WebKit::TouchBarMenuData::items const):
1177 (WebKit::TouchBarMenuData::setID):
1178 (WebKit::TouchBarMenuData::isPageCustomized const):
1179 (WebKit::TouchBarMenuData::items): Deleted.
1180 (WebKit::TouchBarMenuData::isPageCustomized): Deleted.
1181 * Shared/TouchBarMenuItemData.cpp:
1182 (WebKit::getItemType):
1184 Change a helper method from a static class function to a static function in the implementation file.
1186 (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
1187 (WebKit::TouchBarMenuItemData::encode const):
1188 (WebKit::TouchBarMenuItemData::decode):
1189 (WebKit::TouchBarMenuItemData::getItemType): Deleted.
1190 * Shared/TouchBarMenuItemData.h:
1191 (WebKit::operator==):
1193 Remove the commandName member variable, since it doesn't make sense to propagate an event handler
1194 attribute from WebCore to the client layer.
1196 * UIProcess/WebPageProxy.messages.in:
1198 2017-12-01 Zan Dobersek <zdobersek@igalia.com>
1200 Unreviewed GTK+ debug build fix. Replace ASSERT_UNUSED() with UNUSED_PARAM()
1201 in WebKit::WebPage methods that used to operate on HTMLMenuElement pointer
1202 values (which have been converted to references).
1204 * WebProcess/WebPage/WebPage.cpp:
1205 (WebKit::WebPage::didInsertMenuElement):
1206 (WebKit::WebPage::didRemoveMenuElement):
1207 (WebKit::WebPage::didInsertMenuItemElement):
1208 (WebKit::WebPage::didRemoveMenuItemElement):
1210 2017-12-01 Simon Fraser <simon.fraser@apple.com>
1212 Reduce the number of calls to ViewportConfiguration::updateConfiguration()
1213 https://bugs.webkit.org/show_bug.cgi?id=180299
1215 Reviewed by Zalan Bujtas.
1217 There are several calls to ViewportConfiguration::setDefaultConfiguration() during loading
1218 with the same arguments. We can avoid unnecessary calls to updateConfiguration() by returning
1219 early if the configuration hasn't changed.
1221 Also move the fetching of ViewportConfiguration::xhtmlMobileParameters() from didReceiveMobileDocType()
1222 into resetViewportDefaultConfiguration() where we grab all the other default configs.
1224 * WebProcess/WebPage/WebPage.h:
1225 * WebProcess/WebPage/ios/WebPageIOS.mm:
1226 (WebKit::WebPage::didReceiveMobileDocType):
1227 (WebKit::WebPage::resetViewportDefaultConfiguration):
1229 2017-12-01 Aishwarya Nirmal <anirmal@apple.com>
1231 [Touch Bar Web API] Object representing Touch Bar Menu to send between Web and UI Processes
1232 https://bugs.webkit.org/show_bug.cgi?id=179714
1234 Reviewed by Wenson Hsieh.
1236 These changes define the TouchBarMenuData and TouchBarMenuItemData objects which draw information
1237 from touch bar HTMLMenuElement and HTMLMenuItemElement. These objects represent the contents of
1238 the page-customized touch bar. Changes to the html elements representing the touch bar are sent
1241 * Shared/TouchBarMenuData.cpp: Copied from Source/WebCore/html/HTMLMenuItemElement.cpp.
1242 (WebKit::TouchBarMenuData::TouchBarMenuData):
1243 (WebKit::TouchBarMenuData::addMenuItem):
1244 (WebKit::TouchBarMenuData::removeMenuItem):
1245 (WebKit::TouchBarMenuData::encode const):
1246 (WebKit::TouchBarMenuData::decode):
1247 * Shared/TouchBarMenuData.h: Copied from Source/WebCore/html/HTMLMenuItemElement.h.
1248 (WebKit::TouchBarMenuData::items):
1249 (WebKit::TouchBarMenuData::isPageCustomized):
1250 (WebKit::TouchBarMenuData::setIsPageCustomized):
1251 * Shared/TouchBarMenuItemData.cpp: Added.
1252 (WebKit::TouchBarMenuItemData::getItemType):
1253 (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
1254 (WebKit::TouchBarMenuItemData::encode const):
1255 (WebKit::TouchBarMenuItemData::decode):
1256 * Shared/TouchBarMenuItemData.h: Added.
1257 (WebKit::operator<):
1258 (WebKit::operator>):
1259 (WebKit::operator<=):
1260 (WebKit::operator>=):
1261 (WebKit::operator==):
1262 (WebKit::operator!=):
1263 * UIProcess/WebPageProxy.cpp:
1264 (WebKit::WebPageProxy::touchBarMenuDataChanged):
1265 (WebKit::WebPageProxy::touchBarMenuItemDataAdded):
1266 (WebKit::WebPageProxy::touchBarMenuItemDataRemoved):
1267 * UIProcess/WebPageProxy.h:
1268 (WebKit::WebPageProxy::touchBarMenuData const):
1269 * UIProcess/WebPageProxy.messages.in:
1270 * WebKit.xcodeproj/project.pbxproj:
1271 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1272 (WebKit::WebChromeClient::didInsertMenuElement):
1273 (WebKit::WebChromeClient::didRemoveMenuElement):
1274 (WebKit::WebChromeClient::didInsertMenuItemElement):
1275 (WebKit::WebChromeClient::didRemoveMenuItemElement):
1276 * WebProcess/WebCoreSupport/WebChromeClient.h:
1277 * WebProcess/WebPage/WebPage.cpp:
1278 (WebKit::WebPage::didInsertMenuElement):
1279 (WebKit::WebPage::didRemoveMenuElement):
1280 (WebKit::WebPage::didInsertMenuItemElement):
1281 (WebKit::WebPage::didRemoveMenuItemElement):
1282 (WebKit::WebPage::sendTouchBarMenuDataRemovedUpdate):
1283 (WebKit::WebPage::sendTouchBarMenuDataAddedUpdate):
1284 (WebKit::WebPage::sendTouchBarMenuItemDataAddedUpdate):
1285 (WebKit::WebPage::sendTouchBarMenuItemDataRemovedUpdate):
1286 * WebProcess/WebPage/WebPage.h:
1288 2017-12-01 Daniel Bates <dabates@apple.com>
1290 Alternative Presentation Button: Provide a way to query for the replaced elements
1291 https://bugs.webkit.org/show_bug.cgi?id=180114
1292 <rdar://problem/35710539>
1294 Reviewed by Tim Horton.
1296 Add SPI to query for the elements that were replaced by an Alternative Presentation Button.
1298 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1299 (-[WKWebProcessPlugInFrame elementsReplacedByAlternativePresentationButtonWithIdentifier:]): Added.
1300 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
1301 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1302 (WKBundleElementsReplacedByAlternativePresentationButton): Added.
1303 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1305 2017-12-01 Youenn Fablet <youenn@apple.com>
1307 Implement https://w3c.github.io/ServiceWorker/#clients-get
1308 https://bugs.webkit.org/show_bug.cgi?id=180167
1310 Reviewed by Chris Dumez.
1312 Add IPC plumbery for clientFromId between ServiceWorker process and Storage process.
1314 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1315 (WebKit::WebSWServerToContextConnection::clientFromIdCompleted):
1316 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1317 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
1318 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1319 (WebKit::WebSWContextManagerConnection::findClientByIdentifier):
1320 (WebKit::WebSWContextManagerConnection::findClientByIdentifierCompleted):
1321 * WebProcess/Storage/WebSWContextManagerConnection.h:
1322 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1324 2017-12-01 Brian Burg <bburg@apple.com>
1326 Web Inspector: move Inspector::Protocol::Array<T> to JSON namespace
1327 https://bugs.webkit.org/show_bug.cgi?id=173662
1329 Reviewed by Joseph Pecoraro.
1331 Adopt new type names.
1333 * UIProcess/Automation/WebAutomationSession.cpp:
1334 (WebKit::WebAutomationSession::getNextContext):
1335 (WebKit::WebAutomationSession::getBrowsingContexts):
1336 (WebKit::buildArrayForCookies):
1337 (WebKit::WebAutomationSession::getSessionPermissions):
1338 * UIProcess/Automation/WebAutomationSession.h:
1340 2017-12-01 Wenson Hsieh <wenson_hsieh@apple.com>
1342 [Attachment Support] Implement SPI for clients to update a given attachment's data
1343 https://bugs.webkit.org/show_bug.cgi?id=180184
1344 <rdar://problem/35355731>
1346 Reviewed by Tim Horton.
1348 Add plumbing to the web process for setting the attachment data (and optionally, the content type and/or file
1349 name) of a given attachment. See WebCore ChangeLog for more detail. Changes covered by new API tests.
1351 * UIProcess/API/APIAttachment.cpp:
1352 (API::Attachment::setDataAndContentType):
1353 * UIProcess/API/APIAttachment.h:
1354 * UIProcess/API/Cocoa/_WKAttachment.h:
1356 Add nullability annotations around _WKAttachment SPI methods.
1358 * UIProcess/API/Cocoa/_WKAttachment.mm:
1359 (-[_WKAttachment setData:newContentType:newFilename:completion:]):
1360 * UIProcess/WebPageProxy.cpp:
1361 (WebKit::WebPageProxy::setAttachmentDataAndContentType):
1362 * UIProcess/WebPageProxy.h:
1363 * WebProcess/WebPage/WebPage.cpp:
1364 (WebKit::WebPage::setAttachmentDataAndContentType):
1365 * WebProcess/WebPage/WebPage.h:
1366 * WebProcess/WebPage/WebPage.messages.in:
1368 2017-12-01 Brady Eidson <beidson@apple.com>
1370 Add Internals.terminateServiceWorker, and the ability to restart service workers for postMessage.
1371 https://bugs.webkit.org/show_bug.cgi?id=180170
1373 Reviewed by Chris Dumez.
1375 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1376 (WebKit::WebSWServerConnection::startFetch):
1377 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
1378 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1379 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1381 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1382 (WebKit::WebSWServerToContextConnection::syncTerminateWorker):
1383 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1385 * StorageProcess/StorageToWebProcessConnection.cpp:
1386 (WebKit::StorageToWebProcessConnection::didReceiveSyncMessage):
1388 * WebProcess/Storage/WebSWClientConnection.cpp:
1389 (WebKit::WebSWClientConnection::syncTerminateWorker):
1390 * WebProcess/Storage/WebSWClientConnection.h:
1392 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1393 (WebKit::WebSWContextManagerConnection::terminateWorker):
1394 (WebKit::WebSWContextManagerConnection::syncTerminateWorker):
1395 * WebProcess/Storage/WebSWContextManagerConnection.h:
1396 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1398 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1399 (WebKit::WebToStorageProcessConnection::didReceiveSyncMessage):
1400 * WebProcess/Storage/WebToStorageProcessConnection.h:
1402 2017-12-01 Youenn Fablet <youenn@apple.com>
1404 Clear WebSWClientConnection in case storage process IPC connection is closing
1405 https://bugs.webkit.org/show_bug.cgi?id=180210
1407 Reviewed by Chris Dumez.
1409 Clear the sw connection maps when connection is closing.
1410 Call related completion handlers for each connection.
1412 * WebProcess/Storage/WebSWClientConnection.cpp:
1413 (WebKit::WebSWClientConnection::connectionToServerLost):
1414 * WebProcess/Storage/WebSWClientConnection.h:
1415 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1416 (WebKit::WebToStorageProcessConnection::didClose):
1417 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
1418 (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
1419 * WebProcess/Storage/WebToStorageProcessConnection.h:
1421 2017-12-01 Eric Carlson <eric.carlson@apple.com>
1423 [MediaStream] Use CaptureDevice instead of device ID to identify devices
1424 https://bugs.webkit.org/show_bug.cgi?id=180206
1425 <rdar://problem/35775758>
1427 Reviewed by Youenn Fablet.
1429 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
1430 (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
1431 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
1432 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
1433 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1434 (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
1435 (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
1436 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
1437 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
1438 * UIProcess/UserMediaPermissionRequestProxy.cpp:
1439 (WebKit::UserMediaPermissionRequestProxy::allow):
1440 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1441 (WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted):
1442 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1443 * WebProcess/WebPage/WebPage.cpp:
1444 (WebKit::WebPage::userMediaAccessWasGranted):
1445 * WebProcess/WebPage/WebPage.h:
1446 * WebProcess/WebPage/WebPage.messages.in:
1447 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
1448 (WebKit::UserMediaCaptureManager::createCaptureSource):
1449 * WebProcess/cocoa/UserMediaCaptureManager.h:
1451 2017-12-01 Carlos Garcia Campos <cgarcia@igalia.com>
1453 WebDriver: link and partial links queries don't work in xhtml documents
1454 https://bugs.webkit.org/show_bug.cgi?id=180191
1456 Reviewed by Brian Burg.
1458 We convert the queries to use xpath, which works for html documents, but it doesn't work for xhtml. In case of
1459 xhtml we would need to provide a namespace resolver and elements would need to be prefixed with 'xhtml:'. It's
1460 easier to simply iterate the link elements and compare the text.
1462 Fixes: imported/w3c/webdriver/tests/retrieval/find_element_from_element.py::test_xhtml_namespace[link text-full link text]
1463 imported/w3c/webdriver/tests/retrieval/find_element_from_element.py::test_xhtml_namespace[partial link text-link text]
1464 imported/w3c/webdriver/tests/retrieval/find_element_from_elements.py::test_xhtml_namespace[link text-full link text]
1465 imported/w3c/webdriver/tests/retrieval/find_element_from_elements.py::test_xhtml_namespace[partial link text-link text]
1466 imported/w3c/webdriver/tests/retrieval/find_element.py::test_xhtml_namespace[link text-full link text]
1467 imported/w3c/webdriver/tests/retrieval/find_element.py::test_xhtml_namespace[partial link text-link text]
1468 imported/w3c/webdriver/tests/retrieval/find_elements.py::test_xhtml_namespace[link text-full link text]
1469 imported/w3c/webdriver/tests/retrieval/find_elements.py::test_xhtml_namespace[partial link text-link text]
1471 * UIProcess/Automation/atoms/FindNodes.js:
1475 2017-11-30 Alex Christensen <achristensen@webkit.org>
1477 REGRESSION (r224791): cookies are shared between ephemeral sessions in the same process pool
1478 https://bugs.webkit.org/show_bug.cgi?id=180235
1480 Reviewed by Joseph Pecoraro.
1482 In r224791 I assumed that uiProcessCookieStorageIdentifier would be empty in the ephemeral session initialization message.
1483 This is not the case. We did not catch this because almost all of our ephemeral session testing uses the legacyPrivateSessionID.
1484 I add checks for if the SessionID is ephemeral like we already have in WebFrameNetworkingContext::ensureWebsiteDataStoreSession.
1485 I also add an API test that makes sure cookies are not shared between ephemeral sessions the way they are made through the API.
1487 * NetworkProcess/mac/RemoteNetworkingContext.mm:
1488 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
1490 2017-11-30 Stephan Szabo <stephan.szabo@sony.com>
1492 Make LegacyCustomProtocolManager optional for network process
1493 https://bugs.webkit.org/show_bug.cgi?id=176230
1495 Reviewed by Alex Christensen.
1498 * Configurations/FeatureDefines.xcconfig:
1499 * NetworkProcess/NetworkProcess.cpp:
1500 (WebKit::NetworkProcess::NetworkProcess):
1501 (WebKit::NetworkProcess::initializeNetworkProcess):
1502 * PlatformGTK.cmake:
1503 * PlatformMac.cmake:
1504 * PlatformWPE.cmake:
1505 * UIProcess/Network/NetworkProcessProxy.cpp:
1506 (WebKit::NetworkProcessProxy::NetworkProcessProxy):
1507 (WebKit::NetworkProcessProxy::didClose):
1508 * UIProcess/Network/NetworkProcessProxy.h:
1509 * UIProcess/WebProcessPool.cpp:
1510 (WebKit::WebProcessPool::setLegacyCustomProtocolManagerClient):
1511 (WebKit::WebProcessPool::registerSchemeForCustomProtocol):
1512 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol):
1514 2017-11-30 Ryan Haddad <ryanhaddad@apple.com>
1516 Unreviewed build fix, suppress deprecation warnings.
1518 * Shared/mac/SandboxExtensionMac.mm:
1519 (WebKit::SandboxExtensionImpl::sandboxExtensionForType):
1521 2017-11-30 Daniel Bates <dabates@apple.com>
1523 Expose SPI didClickAlternativePresentationButtonWithUserInfo on iOS
1524 https://bugs.webkit.org/show_bug.cgi?id=180218
1525 <rdar://problem/35782555>
1527 Reviewed by Alex Christensen.
1529 We want to support the SPI didClickAlternativePresentationButtonWithUserInfo on Cocoa platforms.
1531 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1532 * UIProcess/Cocoa/UIDelegate.h:
1533 * UIProcess/Cocoa/UIDelegate.mm:
1534 (WebKit::UIDelegate::setDelegate):
1535 (WebKit::UIDelegate::UIClient::didClickAlternativePresentationButton):
1537 2017-11-30 Joseph Pecoraro <pecoraro@apple.com>
1539 [Cocoa] Web Automation: _WKAutomationSessionConfiguration leak
1540 https://bugs.webkit.org/show_bug.cgi?id=180222
1542 Reviewed by Brian Burg.
1544 * UIProcess/Cocoa/AutomationClient.mm:
1545 (WebKit::AutomationClient::requestAutomationSessionWithCapabilities):
1547 2017-11-30 Joseph Pecoraro <pecoraro@apple.com>
1549 Fix some NSOperationQueue leaks
1550 https://bugs.webkit.org/show_bug.cgi?id=180221
1552 Reviewed by Wenson Hsieh.
1554 * UIProcess/Cocoa/WebViewImpl.mm:
1555 (WebKit::WebViewImpl::performDragOperation):
1557 2017-11-30 Brian Burg <bburg@apple.com>
1559 Web Automation: computeElementLayout does not correctly translate iframe client coordinates to main frame coordinates
1560 https://bugs.webkit.org/show_bug.cgi?id=180213
1561 <rdar://problem/30260141>
1563 Reviewed by Simon Fraser.
1565 The current implementation computes points in terms of the frame in which the element is located.
1566 However, WebDriver expects coordinates to be relative to the top-level document since
1567 these coordinates are used for generating click events, among other things.
1569 To convert from frame client coordinates to main frame client coordinates, round-trip
1570 both inViewCenterPoint and elementBounds to root view coordinates and back
1571 to the main frame's contents/client coordinates. Then convert this to page coordinates if needed.
1573 This progresses several tests in the Selenium Python test suite:
1575 - event_firing_webdriver_tests.py::test_should_fire_navigation_events
1576 - frame_switching_tests.py::testShouldBeAbleToClickInAFrameThatRewritesTopWindowLocation
1577 - frame_switching_tests.py::testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUs
1578 - frame_switching_tests.py::testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithFrameIndex
1579 - frame_switching_tests.py::testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithWebelement
1580 - frame_switching_tests.py::testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs
1581 - position_and_size_tests.py::testShouldGetCoordinatesOfAnInvisibleElement
1583 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
1584 (WebKit::WebAutomationSessionProxy::computeElementLayout):
1585 Get both the frame and main frame FrameViews and convert coordinates to the root view.
1586 This is somewhat lossy as clientToDocument* deals with FloatPoints but contentsToRootView
1587 deals with IntPoints. For the purposes of WebDriver, lossiness is not a problem since
1588 integer values are expected anyway.
1590 The imperative nature of the coordinate calculations is difficult to debug, so I converted
1591 this function to only assign to each variable once.
1593 2017-11-30 Alex Christensen <achristensen@webkit.org>
1595 WKURLSchemeHandler.request should include HTTPBody
1596 https://bugs.webkit.org/show_bug.cgi?id=180220
1598 Reviewed by Brady Eidson.
1600 * Shared/URLSchemeTaskParameters.cpp: Added.
1601 (WebKit::URLSchemeTaskParameters::encode const):
1602 (WebKit::URLSchemeTaskParameters::decode):
1603 * Shared/URLSchemeTaskParameters.h: Added.
1604 * UIProcess/API/Cocoa/WKURLSchemeTask.mm:
1605 (-[WKURLSchemeTaskImpl request]):
1606 * UIProcess/WebPageProxy.cpp:
1607 (WebKit::WebPageProxy::startURLSchemeTask):
1608 * UIProcess/WebPageProxy.h:
1609 * UIProcess/WebPageProxy.messages.in:
1610 * UIProcess/WebURLSchemeHandler.cpp:
1611 (WebKit::WebURLSchemeHandler::startTask):
1612 * UIProcess/WebURLSchemeHandler.h:
1613 * UIProcess/WebURLSchemeTask.cpp:
1614 (WebKit::WebURLSchemeTask::create):
1615 (WebKit::WebURLSchemeTask::WebURLSchemeTask):
1616 * UIProcess/WebURLSchemeTask.h:
1617 * WebKit.xcodeproj/project.pbxproj:
1618 * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
1619 (WebKit::WebURLSchemeTaskProxy::startLoading):
1621 2017-11-30 Darin Adler <darin@apple.com>
1623 [Mac] remove unneeded RetainPtr use introduced in r225142
1624 https://bugs.webkit.org/show_bug.cgi?id=180202
1626 Reviewed by Tim Horton.
1628 * WebProcess/Plugins/PDF/PDFPlugin.h: Got rid of unnecessary RetainPtr.
1629 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1630 (WebKit::PDFPlugin::lookupTextAtLocation const): Ditto.
1631 * WebProcess/WebPage/WebPage.h: Ditto.
1632 * WebProcess/WebPage/mac/WebPageMac.mm:
1633 (WebKit::WebPage::performDictionaryLookupAtLocation): Ditto.
1634 (WebKit::WebPage::performDictionaryLookupForSelection): Ditto.
1635 (WebKit::WebPage::performImmediateActionHitTestAtLocation): Ditto.
1636 (WebKit::WebPage::lookupTextAtLocation): Ditto.
1638 2017-11-30 Zan Dobersek <zdobersek@igalia.com>
1640 [CoordGraphics] Move CoordinatedGraphicsLayer painting behind Nicosia::PaintingEngine
1641 https://bugs.webkit.org/show_bug.cgi?id=180141
1643 Reviewed by Carlos Garcia Campos.
1645 CompositingCoordinator must implement the paintingEngine() method now
1646 that the method's been added to the CoordinatedGraphicsLayerClient
1647 interface. The CompositingCoordinator manages the Nicosia::PaintingEngine
1648 object through the new m_paintingEngine member variable, and returns the
1649 reference to this object in the paintingEngine() method.
1651 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1652 (WebKit::CompositingCoordinator::CompositingCoordinator):
1653 (WebKit::CompositingCoordinator::paintingEngine):
1654 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1655 Drop unnecessary typedefs.
1657 2017-11-29 Wenson Hsieh <wenson_hsieh@apple.com>
1659 [Attachment Support] Implement SPI for clients to make an attachment element display in-place
1660 https://bugs.webkit.org/show_bug.cgi?id=180153
1661 <rdar://problem/35735252>
1663 Reviewed by Tim Horton.
1665 Add new WebKit SPI, -[_WKAttachment setDisplayOptions:completion:], and add plumbing for attachment display
1666 options to the web content process. Changes covered by 4 new API tests.
1668 * Scripts/webkit/messages.py:
1670 * UIProcess/API/APIAttachment.cpp:
1671 (API::Attachment::setDisplayOptions):
1672 * UIProcess/API/APIAttachment.h:
1673 * UIProcess/API/Cocoa/WKWebView.mm:
1674 (-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]):
1676 Respect given display options when inserting a new attachment.
1678 * UIProcess/API/Cocoa/_WKAttachment.h:
1679 * UIProcess/API/Cocoa/_WKAttachment.mm:
1680 (-[_WKAttachmentDisplayOptions coreDisplayOptions]):
1682 Introduce a helper to convert from the Cocoa _WKAttachmentDisplayOptions object to platform-agnostic
1683 AttachmentDisplayOptions.
1685 (-[_WKAttachment setDisplayOptions:completion:]):
1686 (WebKit::if): Deleted.
1687 * UIProcess/API/Cocoa/_WKAttachmentInternal.h:
1688 * UIProcess/WebPageProxy.cpp:
1689 (WebKit::WebPageProxy::insertAttachment):
1690 (WebKit::WebPageProxy::setAttachmentDisplayOptions):
1691 * UIProcess/WebPageProxy.h:
1692 * WebProcess/WebPage/WebPage.cpp:
1693 (WebKit::WebPage::insertAttachment):
1694 (WebKit::WebPage::requestAttachmentData):
1695 (WebKit::WebPage::setAttachmentDisplayOptions):
1696 (WebKit::WebPage::attachmentElementWithIdentifier const):
1698 Pull common logic to retrieve an attachment element matching a given identifier out into a helper.
1700 * WebProcess/WebPage/WebPage.h:
1701 * WebProcess/WebPage/WebPage.messages.in:
1703 2017-11-29 Brent Fulgham <bfulgham@apple.com>
1705 Part 2: Adopt updated NSKeyed[Un]Archiver API when available
1706 https://bugs.webkit.org/show_bug.cgi?id=180127
1707 <rdar://problem/35710738>
1709 Reviewed by Simon Fraser.
1711 The API that accepts a user-allocated NSMutableData is deprecated. Switch (for macOS 10.12 and newer)
1712 to the modern API. Use the original API for macOS builds prior to 10.12.
1714 * Shared/Cocoa/DataDetectionResult.mm:
1715 (WebKit::DataDetectionResult::encode const):
1716 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
1717 (IPC::ArgumentCoder<WebCore::Payment>::encode):
1718 (IPC::ArgumentCoder<WebCore::PaymentContact>::encode):
1719 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
1720 (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode):
1721 * Shared/ios/InteractionInformationAtPosition.mm:
1722 (WebKit::InteractionInformationAtPosition::encode const):
1723 * Shared/mac/WebCoreArgumentCodersMac.mm:
1724 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData):
1725 (IPC::ArgumentCoder<Credential>::encodePlatformData):
1726 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
1727 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData):
1728 * Shared/mac/WebHitTestResultData.mm:
1729 (WebKit::WebHitTestResultData::platformEncode const):
1730 * UIProcess/API/Cocoa/WKProcessPool.mm:
1731 (-[WKProcessPool _setObject:forBundleParameter:]):
1732 (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]):
1733 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1734 (WebKit::WebProcessPool::platformInitializeWebProcess):
1735 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1736 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
1738 2017-11-29 Brady Eidson <beidson@apple.com>
1740 When managing context startups, make ServiceWorkerJobDataIdentifier's optional.
1741 https://bugs.webkit.org/show_bug.cgi?id=180166
1743 Reviewed by Chris Dumez.
1745 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
1747 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1748 (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
1749 (WebKit::WebSWContextManagerConnection::didFinishInstall):
1750 * WebProcess/Storage/WebSWContextManagerConnection.h:
1752 2017-11-29 Youenn Fablet <youenn@apple.com>
1754 Add support for service worker generated redirections
1755 https://bugs.webkit.org/show_bug.cgi?id=179498
1757 Reviewed by Darin Adler.
1759 Small refactoring to allow a service worker redirected fetch to follow the redirection through the service worker.
1761 * WebProcess/Network/WebLoaderStrategy.cpp:
1762 (WebKit::WebLoaderStrategy::scheduleLoad): Make use of the loader request in case a network load is needed after a service worker redirection.
1763 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
1764 (WebKit::ServiceWorkerClientFetch::create):
1765 (WebKit::ServiceWorkerClientFetch::~ServiceWorkerClientFetch):
1766 (WebKit::ServiceWorkerClientFetch::ServiceWorkerClientFetch):
1767 (WebKit::ServiceWorkerClientFetch::start):
1768 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): Check for response.
1769 Generate redirected request if needed and call loader callback to process the redirection.
1770 Adding some states so that if didFinish is called before the willSendRequest callback, redirection is followed.
1771 (WebKit::ServiceWorkerClientFetch::didFinish):
1772 In case redirection should be followed, wait for didFinish to follow it.
1773 This simplifies the model although introducing some limited latency.
1774 * WebProcess/Storage/ServiceWorkerClientFetch.h:
1775 * WebProcess/Storage/WebSWClientConnection.cpp:
1776 (WebKit::WebSWClientConnection::startFetch):
1777 * WebProcess/Storage/WebSWClientConnection.h:
1778 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
1779 (WebKit::WebServiceWorkerProvider::handleFetch):
1781 2017-11-29 Youenn Fablet <youenn@apple.com>
1783 Add support for FetchEvent.clientId
1784 https://bugs.webkit.org/show_bug.cgi?id=180052
1786 Reviewed by Chris Dumez.
1788 Using FetchOption persistency coders for cache API and modernizing IPC FetchOptions decoding.
1790 * WebKit/Shared/WebCoreArgumentCoders.cpp:
1791 * NetworkProcess/cache/CacheStorageEngineCache.cpp:
1792 (WebKit::CacheStorage::Cache::encode):
1793 (WebKit::CacheStorage::Cache::decodeRecordHeader):
1794 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1795 (WebKit::WebSWContextManagerConnection::startFetch):
1796 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1797 (WebKit::WebSWContextManagerConnection::startFetch):
1799 2017-11-29 Alex Christensen <achristensen@webkit.org>
1801 Make WebFrameLoaderClient more robust against null pointer dereferencing
1802 https://bugs.webkit.org/show_bug.cgi?id=180157
1803 <rdar://problem/34895616>
1805 Reviewed by Tim Horton.
1807 There has always been rare null pointer crashes in this code, but they have become more common
1808 now that we are waiting for completion handlers for redirects, which makes it more likely that
1809 we are hitting this code after we have detached from the core frame.
1811 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1812 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1813 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1814 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1815 * WebProcess/WebPage/WebFrame.cpp:
1816 (WebKit::WebFrame::page const):
1818 2017-11-29 Alex Christensen <achristensen@webkit.org>
1820 Fix Mac CMake build.
1822 * PlatformMac.cmake:
1824 2017-11-29 Chris Dumez <cdumez@apple.com>
1826 StorageToWebProcessConnection & WebSWServerToContextConnection should use the same underlying IPC::Connection
1827 https://bugs.webkit.org/show_bug.cgi?id=180147
1829 Reviewed by Brady Eidson.
1831 StorageToWebProcessConnection & WebSWServerToContextConnection should use the same underlying IPC::Connection.
1832 Otherwise, we have with 2 IPC::Connections between the StorageProcess and the ServiceWorker (aka Context) process,
1833 which makes synchronization of IPC messages difficult.
1835 * StorageProcess/StorageProcess.cpp:
1836 (WebKit::StorageProcess::createStorageToWebProcessConnection):
1837 (WebKit::StorageProcess::createServerToContextConnection):
1838 * StorageProcess/StorageProcess.h:
1839 * StorageProcess/StorageProcess.messages.in:
1840 * StorageProcess/StorageToWebProcessConnection.cpp:
1841 (WebKit::StorageToWebProcessConnection::didReceiveMessage):
1842 * UIProcess/ServiceWorkerProcessProxy.cpp:
1843 (WebKit::ServiceWorkerProcessProxy::start):
1844 * UIProcess/ServiceWorkerProcessProxy.h:
1845 * UIProcess/Storage/StorageProcessProxy.cpp:
1846 (WebKit::StorageProcessProxy::getStorageProcessConnection):
1847 (WebKit::StorageProcessProxy::didFinishLaunching):
1848 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess):
1849 * UIProcess/Storage/StorageProcessProxy.h:
1850 * UIProcess/Storage/StorageProcessProxy.messages.in:
1851 * UIProcess/WebProcessPool.cpp:
1852 (WebKit::WebProcessPool::getStorageProcessConnection):
1853 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1854 * UIProcess/WebProcessPool.h:
1855 * UIProcess/WebProcessProxy.cpp:
1856 (WebKit::WebProcessProxy::getStorageProcessConnection):
1857 * UIProcess/WebProcessProxy.h:
1858 (WebKit::WebProcessProxy::isServiceWorkerProcess const):
1859 * UIProcess/WebProcessProxy.messages.in:
1860 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1861 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
1862 * WebProcess/WebProcess.cpp:
1863 (WebKit::WebProcess::didReceiveMessage):
1864 (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess):
1865 * WebProcess/WebProcess.h:
1866 * WebProcess/WebProcess.messages.in:
1868 2017-11-29 Chris Dumez <cdumez@apple.com>
1870 ensure*Connection() methods on WebProcess should return a reference
1871 https://bugs.webkit.org/show_bug.cgi?id=180149
1873 Reviewed by Alex Christensen.
1875 ensure*Connection() methods on WebProcess should return a reference instead of not returning
1876 anything. Also get rid of the non-ensure variants which called "ensure" internally and are
1879 * Shared/mac/CookieStorageShim.mm:
1880 (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
1881 * WebProcess/Cache/WebCacheStorageConnection.cpp:
1882 (WebKit::WebCacheStorageConnection::connection):
1883 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1884 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
1885 (WebKit::preregisterSandboxExtensionsIfNecessary):
1886 * WebProcess/Databases/WebDatabaseProvider.cpp:
1887 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
1888 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
1889 (WebKit::BlobRegistryProxy::registerFileBlobURL):
1890 (WebKit::BlobRegistryProxy::registerBlobURL):
1891 (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
1892 (WebKit::BlobRegistryProxy::unregisterBlobURL):
1893 (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
1894 (WebKit::BlobRegistryProxy::blobSize):
1895 (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
1896 * WebProcess/Network/NetworkProcessConnection.cpp:
1897 (WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
1898 * WebProcess/Network/WebLoaderStrategy.cpp:
1899 (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
1900 (WebKit::WebLoaderStrategy::remove):
1901 (WebKit::WebLoaderStrategy::setDefersLoading):
1902 (WebKit::WebLoaderStrategy::loadResourceSynchronously):
1903 (WebKit::WebLoaderStrategy::startPingLoad):
1904 (WebKit::WebLoaderStrategy::preconnectTo):
1905 (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
1906 (WebKit::WebLoaderStrategy::setCaptureExtraNetworkLoadMetricsEnabled):
1907 * WebProcess/Network/WebResourceLoader.cpp:
1908 (WebKit::WebResourceLoader::messageSenderConnection):
1909 * WebProcess/Network/WebSocketStream.cpp:
1910 (WebKit::WebSocketStream::WebSocketStream):
1911 (WebKit::WebSocketStream::messageSenderConnection):
1912 * WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
1913 (WebKit::sendOnMainThread):
1914 * WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
1915 (WebKit::sendOnMainThread):
1916 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
1917 (WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
1918 (WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
1919 (WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
1920 (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
1921 * WebProcess/Network/webrtc/WebRTCMonitor.cpp:
1922 (WebKit::sendOnMainThread):
1923 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
1924 (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
1925 (WebKit::WebServiceWorkerProvider::handleFetch):
1926 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1927 (WebKit::WebPlatformStrategies::cookiesForDOM):
1928 (WebKit::WebPlatformStrategies::setCookiesFromDOM):
1929 (WebKit::WebPlatformStrategies::cookiesEnabled):
1930 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
1931 (WebKit::WebPlatformStrategies::getRawCookies):
1932 (WebKit::WebPlatformStrategies::deleteCookie):
1933 * WebProcess/WebPage/WebFrame.cpp:
1934 (WebKit::WebFrame::startDownload):
1935 (WebKit::WebFrame::convertMainResourceLoadToDownload):
1936 * WebProcess/WebProcess.cpp:
1937 (WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
1938 (WebKit::WebProcess::ensureNetworkProcessConnection):
1939 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
1940 (WebKit::WebProcess::prefetchDNS):
1941 * WebProcess/WebProcess.h:
1943 2017-11-29 Alex Christensen <achristensen@webkit.org>
1945 Modernize API::SerializedScriptValue
1946 https://bugs.webkit.org/show_bug.cgi?id=180115
1948 Reviewed by Brady Eidson.
1950 Also remove some SPI that hasn't been used anywhere since Mountain Lion.
1952 * Shared/API/APISerializedScriptValue.h:
1953 (API::SerializedScriptValue::create):
1954 (API::SerializedScriptValue::internalRepresentation):
1955 (API::SerializedScriptValue::SerializedScriptValue):
1956 * Shared/API/c/WKSerializedScriptValue.cpp:
1957 (WKSerializedScriptValueDeserialize):
1958 (WKSerializedScriptValueCreateWithInternalRepresentation): Deleted.
1959 (WKSerializedScriptValueGetInternalRepresentation): Deleted.
1960 * Shared/API/c/WKSerializedScriptValuePrivate.h: Removed.
1961 * UIProcess/API/Cocoa/WKWebView.mm:
1962 (-[WKWebView _evaluateJavaScript:forceUserGesture:completionHandler:]):
1963 * WebKit.xcodeproj/project.pbxproj:
1965 2017-11-29 Michael Catanzaro <mcatanzaro@igalia.com>
1967 REGRESSION(r218064): [GTK] Broke entering fullscreen mode in debug builds
1968 https://bugs.webkit.org/show_bug.cgi?id=180120
1970 Reviewed by Carlos Garcia Campos.
1972 These assertions need to be swapped. Fixes /webkit2/WebKitWebView/fullscreen in debug mode.
1974 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1975 (webkitWebViewBaseEnterFullScreen):
1976 (webkitWebViewBaseExitFullScreen):
1978 2017-11-29 Zan Dobersek <zdobersek@igalia.com>
1980 [CoordGraphics] Rename CoordinatedBuffer to Nicosia::Buffer
1981 https://bugs.webkit.org/show_bug.cgi?id=180135
1983 Reviewed by Carlos Garcia Campos.
1985 Adjust code to the CoordinatedBuffer -> Nicosia::Buffer transition.
1987 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1988 (WebKit::CoordinatedBackingStoreTile::setBackBuffer):
1989 (WebKit::CoordinatedBackingStore::updateTile):
1990 * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
1991 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1992 (WebKit::CoordinatedGraphicsScene::createUpdateAtlas):
1993 (WebKit::CoordinatedGraphicsScene::updateImageBacking):
1994 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1995 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1996 (WebKit::CompositingCoordinator::updateImageBacking):
1997 (WebKit::CompositingCoordinator::createUpdateAtlas):
1998 (WebKit::CompositingCoordinator::getCoordinatedBuffer):
1999 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2000 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
2001 (WebKit::UpdateAtlas::UpdateAtlas):
2002 (WebKit::UpdateAtlas::getCoordinatedBuffer):
2003 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
2005 2017-11-28 Brent Fulgham <bfulgham@apple.com>
2007 Adopt updated NSKeyed[Un]Archiver API when available
2008 https://bugs.webkit.org/show_bug.cgi?id=180127
2009 <rdar://problem/35710738>
2011 Reviewed by Alex Christensen.
2013 Switch to new NSKeyed[Un]Archiver methods when available. We do not attempt
2014 to adopt secure coding in places we were not under the original API.
2016 * Platform/ios/AccessibilityIOS.mm:
2017 (WebKit::newAccessibilityRemoteToken): Use secure-by-default API.
2018 * Shared/Cocoa/DataDetectionResult.mm:
2019 (WebKit::DataDetectionResult::encode const): Ditto.
2020 (WebKit::DataDetectionResult::decode): Ditto.
2021 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
2022 (IPC::ArgumentCoder<WebCore::Payment>::encode): Ditto.
2023 (IPC::ArgumentCoder<WebCore::Payment>::decode): Ditto.
2024 (IPC::ArgumentCoder<WebCore::PaymentContact>::encode): Ditto.
2025 (IPC::ArgumentCoder<WebCore::PaymentContact>::decode): Ditto.
2026 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode): Ditto.
2027 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode): Ditto.
2028 (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode): Ditto.
2029 (IPC::ArgumentCoder<WebCore::PaymentMethod>::decode): Ditto.
2030 * Shared/ios/InteractionInformationAtPosition.mm:
2031 (WebKit::InteractionInformationAtPosition::encode const): Ditto.
2032 (WebKit::InteractionInformationAtPosition::decode): Ditto.
2033 * Shared/mac/WebCoreArgumentCodersMac.mm:
2034 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Ditto.
2035 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Ditto.
2036 (IPC::ArgumentCoder<Credential>::encodePlatformData): Ditto.
2037 (IPC::ArgumentCoder<Credential>::decodePlatformData): Ditto.
2038 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode): Ditto.
2039 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode): Ditto.
2040 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
2041 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
2042 * Shared/mac/WebHitTestResultData.mm:
2043 (WebKit::WebHitTestResultData::platformEncode const): Ditto.
2044 (WebKit::WebHitTestResultData::platformDecode): Ditto.
2045 * UIProcess/API/Cocoa/WKProcessPool.mm:
2046 (-[WKProcessPool _setObject:forBundleParameter:]): Ditto.
2047 (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]): Ditto.
2048 * UIProcess/API/Cocoa/WKWebView.mm:
2049 (-[WKWebView _setInputDelegate:]): Ditto.
2050 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2051 (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
2052 * UIProcess/ios/PageClientImplIOS.mm:
2053 (WebKit::PageClientImpl::startAssistingNode): Ditto.
2054 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2055 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Ditto.
2056 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2057 (WebKit::InjectedBundle::initialize): Ditto.
2058 (WebKit::InjectedBundle::setBundleParameter): Ditto.
2059 (WebKit::InjectedBundle::setBundleParameters): Ditto.
2061 2017-11-28 Youenn Fablet <youenn@apple.com>
2063 NetworkCache::Storage should protect itself when removing operations from its maps
2064 https://bugs.webkit.org/show_bug.cgi?id=180118
2066 Reviewed by Antti Koivisto.
2068 The operations can contain ref to the Storage object and removing them from the map may destroy the Storage object
2070 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2071 (WebKit::NetworkCache::Storage::remove):
2072 (WebKit::NetworkCache::Storage::finishReadOperation):
2073 (WebKit::NetworkCache::Storage::finishWriteOperation):
2074 (WebKit::NetworkCache::Storage::traverse):
2076 2017-11-28 Youenn Fablet <youenn@apple.com>
2078 Register Documents as ServiceWorker clients to the StorageProcess
2079 https://bugs.webkit.org/show_bug.cgi?id=180047
2081 Reviewed by Brady Eidson.
2083 Adding IPC to register/unregister clients to the storage process.
2084 This will be used to enable service worker termination, and implementation of Clients API.
2086 WebSWServerConnection keeps a hash map of all its related clients.
2087 This allows unregistering these clients if the corresponding web process crashes.
2089 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2090 (WebKit::WebSWServerConnection::~WebSWServerConnection):
2091 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
2092 (WebKit::WebSWServerConnection::unregisterServiceWorkerClient):
2093 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2094 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2095 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
2096 * WebProcess/Storage/WebSWClientConnection.cpp:
2097 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
2098 (WebKit::WebSWClientConnection::unregisterServiceWorkerClient):
2099 * WebProcess/Storage/WebSWClientConnection.h:
2101 2017-11-28 Said Abou-Hallawa <sabouhallawa@apple.com>
2103 [CG] PostScript images should be supported if they are sub-resource images
2104 https://bugs.webkit.org/show_bug.cgi?id=178502
2105 <rdar://problem/35102988>
2107 Reviewed by Simon Fraser.
2109 Make convertPostScriptDataToPDF() be as static function of PDFDocumentImage
2112 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2113 (WebKit::PDFPlugin::convertPostScriptDataIfNeeded):
2114 (WebKit::convertPostScriptDataToPDF): Deleted.
2116 2017-11-28 Alex Christensen <achristensen@webkit.org>
2118 Add SPI for adding strings directly to a _WKVisitedLinkStore
2119 https://bugs.webkit.org/show_bug.cgi?id=180100
2121 Reviewed by Geoffrey Garen.
2123 * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
2124 * UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:
2125 (-[_WKVisitedLinkStore addVisitedLinkWithString:]):
2126 This is a performance optimization for rdar://problem/16321391
2128 2017-11-28 Joseph Pecoraro <pecoraro@apple.com>
2130 REGRESSION: Web Inspector: context menu actions "Download Image" and "Open Image in New Window" don't work
2131 https://bugs.webkit.org/show_bug.cgi?id=178808
2132 <rdar://problem/35176608>
2134 Reviewed by Brian Burg.
2136 * UIProcess/mac/WKInspectorViewController.mm:
2137 (-[WKInspectorViewController _webView:contextMenu:forElement:]):
2138 Continue to hide the image context menu actions like we used to.
2139 Investigating making these context menus work can be done as a
2142 * UIProcess/mac/WKWebInspectorWKWebView.mm:
2143 (-[WKWebInspectorWKWebView initWithFrame:configuration:]):
2144 Use nullptr instead of 0.
2146 2017-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
2148 Move JSONValues to WTF and convert uses of InspectorValues.h to JSONValues.h
2149 https://bugs.webkit.org/show_bug.cgi?id=173793
2151 Reviewed by Joseph Pecocaro.
2153 Based on patch by Brian Burg.
2155 * UIProcess/Automation/WebAutomationSession.cpp:
2156 (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
2157 (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
2158 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
2159 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
2160 (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout):
2161 (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
2162 (WebKit::WebAutomationSession::navigationOccurredForFrame):
2163 (WebKit::WebAutomationSession::documentLoadedForFrame):
2164 (WebKit::WebAutomationSession::inspectorFrontendLoaded):
2165 (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
2166 (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
2167 (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
2168 (WebKit::WebAutomationSession::addSingleCookie):
2169 (WebKit::WebAutomationSession::setSessionPermissions):
2170 (WebKit::WebAutomationSession::performMouseInteraction):
2171 (WebKit::WebAutomationSession::performKeyboardInteractions):
2172 * UIProcess/Automation/WebAutomationSession.h:
2174 2017-11-28 Daniel Bates <dabates@apple.com>
2176 [Cocoa] First pass at implementing alternative presentation button element
2177 https://bugs.webkit.org/show_bug.cgi?id=179785
2178 Part of <rdar://problem/34917108>
2180 Reviewed by Brent Fulgham.
2182 Expose SPI to substitute the alternative presentation button for one or more elements
2183 and remove the alternative presentation button. Add a private delegate callback when
2184 the alternative presentation button is clicked.
2186 * UIProcess/API/APIUIClient.h:
2187 (API::UIClient::didClickAlternativePresentationButton): Added.
2188 * UIProcess/API/C/WKPageUIClient.h:
2189 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2190 * UIProcess/Cocoa/UIDelegate.h:
2191 * UIProcess/Cocoa/UIDelegate.mm:
2192 (WebKit::UIDelegate::setDelegate): Wired up delegate callback.
2193 (WebKit::UIDelegate::UIClient::didClickAlternativePresentationButton): Added.
2194 * UIProcess/WebPageProxy.cpp:
2195 (WebKit::WebPageProxy::handleAlternativePresentationButtonClick): Added.
2196 * UIProcess/WebPageProxy.h:
2197 * UIProcess/WebPageProxy.messages.in:
2198 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
2199 (API::InjectedBundle::PageUIClient::didClickAlternativePresentationButton): Added.
2200 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
2201 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2202 (-[WKWebProcessPlugInFrame substituteElements:withAlternativePresentationButtonWithIdentifier:]): Added.
2203 (-[WKWebProcessPlugInFrame removeAlternativePresentationButton:]): Added.
2204 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
2205 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2206 (WKBundleSubstituteWithAlternativePresentationButton): Added.
2207 (WKBundleRemoveAlternativePresentationButton): Added.
2208 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2209 * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
2210 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2211 (WebKit::InjectedBundlePageUIClient::didClickAlternativePresentationButton): Added.
2212 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2213 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2214 (WebKit::WebChromeClient::handleAlternativePresentationButtonClick): Added.
2215 * WebProcess/WebCoreSupport/WebChromeClient.h:
2217 2017-11-27 Chris Dumez <cdumez@apple.com>
2219 ASSERTION FAILED: addResult.isNewEntry WebCore::SWServerRegistration::addClientUsingRegistration(WebCore::ServiceWorkerClientIdentifier const&) + 141
2220 https://bugs.webkit.org/show_bug.cgi?id=180049
2222 Reviewed by Brady Eidson.
2224 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2225 * WebProcess/Storage/WebSWClientConnection.cpp:
2226 (WebKit::WebSWClientConnection::addServiceWorkerRegistrationInServer):
2227 (WebKit::WebSWClientConnection::removeServiceWorkerRegistrationInServer):
2228 (WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient):
2229 (WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient):
2230 * WebProcess/Storage/WebSWClientConnection.h:
2232 2017-11-27 Jeremy Jones <jeremyj@apple.com>
2234 downcast to WebKit::FullscreenClient can sometimes fail.
2235 https://bugs.webkit.org/show_bug.cgi?id=179849
2237 Reviewed by Darin Adler.
2239 There are cases during teardown where fullscreenClient() has been cleared back to an API::FullscreenClient.
2240 Because those cases, WKWebView should test before downcasting to WebKit::FullscreenClient.
2242 This is causing a crash when fullscreen delegate is cleared after a page is closed.
2244 * UIProcess/API/Cocoa/WKWebView.mm:
2245 (-[WKWebView _setFullscreenDelegate:]):
2246 (-[WKWebView _fullscreenDelegate]):
2248 2017-11-27 Chris Dumez <cdumez@apple.com>
2250 Give Document a strongly typed identifier instead of a uint64_t
2251 https://bugs.webkit.org/show_bug.cgi?id=180041
2253 Reviewed by Youenn Fablet.
2255 Give Document a strongly typed identifier instead of a uint64_t, for clarity.
2257 * Platform/IPC/ArgumentCoders.h:
2258 * Scripts/webkit/messages.py:
2259 (forward_declarations_and_headers):
2260 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2261 (WebKit::WebSWServerConnection::notifyClientsOfControllerChange):
2262 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
2263 (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient):
2264 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2265 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2266 * StorageProcess/StorageProcess.cpp:
2267 (WebKit::StorageProcess::postMessageToServiceWorkerClient):
2268 * WebProcess/Storage/WebSWClientConnection.cpp:
2269 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
2270 (WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient):
2271 (WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient):
2272 (WebKit::WebSWClientConnection::postMessageToServiceWorkerClient):
2273 * WebProcess/Storage/WebSWClientConnection.h:
2274 * WebProcess/Storage/WebSWClientConnection.messages.in:
2276 2017-11-27 Yacine Bandou <yacine.bandou_ext@softathome.com>
2278 [GTK][WPE] Add "enable-encrypted-media" property to WebKitWebSettings
2279 https://bugs.webkit.org/show_bug.cgi?id=18005
2281 Reviewed by Michael Catanzaro.
2283 EncryptedMedia is an experimental JavaScript API for playing encrypted media in HTML.
2284 This property will only work as intended if the EncryptedMedia feature is enabled at build time
2285 with the ENABLE_ENCRYPTED_MEDIA flag.
2287 * UIProcess/API/glib/WebKitSettings.cpp:
2288 (webKitSettingsSetProperty):
2289 (webKitSettingsGetProperty):
2290 (webkit_settings_class_init):
2291 (webkit_settings_get_enable_encrypted_media):
2292 (webkit_settings_set_enable_encrypted_media):
2293 * UIProcess/API/gtk/WebKitSettings.h:
2294 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2295 * UIProcess/API/wpe/WebKitSettings.h:
2297 2017-11-27 Tim Horton <timothy_horton@apple.com>
2299 One too many zeroes in macOS version number in FeatureDefines
2300 https://bugs.webkit.org/show_bug.cgi?id=180011
2302 Reviewed by Dan Bernstein.
2304 * Configurations/FeatureDefines.xcconfig:
2306 2017-11-27 Zan Dobersek <zdobersek@igalia.com>
2308 [CoordGraphics] Prettify ID value handling in UpdateAtlas and UpdateAtlas::Client
2309 https://bugs.webkit.org/show_bug.cgi?id=180038
2311 Reviewed by Carlos Garcia Campos.
2313 In the UpdateAtlas class, provide an ID type that aliases to uint32_t.
2314 The m_id member variable (ex-m_ID) uses this type, and it's also now
2315 used in the Client interface.
2317 While poking around, the header is modified to use '#pragma once',
2318 and m_id is moved to the more logical first position among member
2321 The static ID variable is modified to use the new type, and renamed
2322 to s_nextID. Comment alongside the namespace scope closure is fixed
2323 to use the appropriate name.
2325 createUpdateAtlas() and removeUpdateAtlas() methods in the
2326 CompositingCoordinator class are modified to use the UpdateAtlas::ID
2327 type, and the former has the second parameter changed from RefPtr<>
2330 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2331 (WebKit::CompositingCoordinator::createUpdateAtlas):
2332 (WebKit::CompositingCoordinator::removeUpdateAtlas):
2333 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2334 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
2335 (WebKit::UpdateAtlas::UpdateAtlas):
2336 (WebKit::UpdateAtlas::~UpdateAtlas):
2337 (WebKit::UpdateAtlas::getCoordinatedBuffer):
2338 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
2340 2017-11-27 Zan Dobersek <zdobersek@igalia.com>
2342 [CoordGraphics] CompositingCoordinator: clean up Client vtable, GraphicsLayerClient overrides
2343 https://bugs.webkit.org/show_bug.cgi?id=180037
2345 Reviewed by Carlos Garcia Campos.
2347 Remove the CompositingCoordinator::Client::paintLayerContents() method since
2348 the only implementation in CoordinatedLayerTreeHost was empty.
2350 Subsequently, the CompositingCoordinator::paintContents() override of the
2351 GraphicsLayerClient method can also be removed. The notifyAnimationStarted()
2352 override is empty, just like the base method, so it's removed as well.
2354 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2355 (WebKit::CompositingCoordinator::deviceScaleFactor const): Bring method up
2356 to the notifyFlushRequired() code, since both are overrides of the
2357 GraphicsLayerClient-inherited methods.
2358 (WebKit::CompositingCoordinator::pageScaleFactor const): Ditto.
2359 (WebKit::CompositingCoordinator::notifyAnimationStarted): Deleted.
2360 (WebKit::CompositingCoordinator::paintContents): Deleted.
2361 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2362 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2363 (WebKit::CoordinatedLayerTreeHost::paintLayerContents): Deleted.
2364 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2366 2017-11-27 Carlos Garcia Campos <cgarcia@igalia.com>
2368 REGRESSION(r223073): disk cache directory is no longer copied in ProcessPoolConfiguration::copy()
2369 https://bugs.webkit.org/show_bug.cgi?id=180031
2371 Reviewed by Youenn Fablet.
2373 This has caused GTK/WPE test /webkit2/WebKitWebsiteData/configuration to fail, and the wrong directory is used
2374 by the network process. I think it was removed by mistake in r223073.
2376 * UIProcess/API/APIProcessPoolConfiguration.cpp:
2377 (API::ProcessPoolConfiguration::copy): Copy m_diskCacheDirectory too.
2379 2017-11-27 Adrian Perez de Castro <aperez@igalia.com>
2381 [WPE][GTK] Improve contents of pkg-config .pc files
2382 https://bugs.webkit.org/show_bug.cgi?id=180032
2384 Reviewed by Carlos Garcia Campos.
2386 * gtk/webkit2gtk-web-extension.pc.in: Add URL, edit Name and Description.
2387 * gtk/webkit2gtk.pc.in: Add URL, edit Name.
2388 * wpe/wpe-webkit.pc.in: Add URL, edit Name and Description.
2390 2017-11-23 Darin Adler <darin@apple.com>
2392 Fix dictionary leak in lookup, convert FindOptions to OptionSet, tweak code style nearby
2393 https://bugs.webkit.org/show_bug.cgi?id=179981
2395 Reviewed by Sam Weinig.
2397 * WebProcess/Plugins/PDF/PDFPlugin.h: Use some references instead of pointers. Made more
2398 things final and private. Changed functions with multiple return values to use tuples
2399 instead of out arguments for clarity, especially because some were using pointers and it
2400 was ambiguous whether the pointers could be nullptr. Tweaked formatting. Moved initialization
2401 of data members into the class definition.
2403 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2404 (WebKit::PDFPlugin::create): Take a reference.
2405 (WebKit::PDFPlugin::PDFPlugin): Ditto. Also moved some initialization to the class definition.
2406 (WebKit::PDFPlugin::countFindMatches): Added comment about ignored maxMatchCount argument.
2407 (WebKit::PDFPlugin::findString): Use contains instead of & to check bits in options.
2408 Simplified slightly confusing match count code that was doing some unnecessary comparisons
2409 with the maximum match count. Use auto a bit.
2410 (WebKit::coreCursor): Renamed from pdfLayerControllerCursorTypeToCursor since this is C++
2411 and overloading works based on the argument type.
2412 (WebKit::PDFPlugin::notifyCursorChanged): Updated for name change.
2413 (WebKit::PDFPlugin::lookupTextAtLocation const): Return a tuple instead of using two out
2414 arguments and use a RetainPtr so we don't leak the options dictionary.
2416 * WebProcess/Plugins/PluginProxy.h: Removed unneeded include of FindOptions.h.
2418 * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2419 (WebKit::WebContextMenuClient::lookUpInDictionary): Pass a reference.
2421 * WebProcess/WebPage/FindController.cpp:
2422 (WebKit::core): Use |= instead of | to build up a FindOptions.
2423 (WebKit::FindController::FindController): Initialize data members in the class definition.
2424 (WebKit::pluginViewForFrame): Deleted. Callers now use WebPage::pluginViewForFrame.
2425 (WebKit::FindController::updateFindUIAfterPageScroll): Added a FIXME about some peculiar code.
2426 (WebKit::FindController::findString): Use |= rather than | to add in an option.
2427 (WebKit::FindController::hideFindUI): Use { } rather than 0 for no options.
2428 * WebProcess/WebPage/FindController.h: Moved initialization to the header. Exported the core
2429 function that converts WebKit::FindOptions to WebCore::FindOptions.
2431 * WebProcess/WebPage/WebFrame.cpp:
2432 (WebKit::WebFrame::handlesPageScaleGesture const): Use WebPage::pluginViewForFrame.
2433 (WebKit::WebFrame::requiresUnifiedScaleFactor const): Use WebPage::pluginViewForFrame.
2435 * WebProcess/WebPage/WebPage.cpp:
2436 (WebKit::WebPage::createPlugin): Removed unneeded local variable and UNUSED_PARAM.
2437 (WebKit::WebPage::focusedPluginViewForFrame): Use pluginViewForFrame.
2438 (WebKit::WebPage::pluginViewForFrame): Added a null check since this takes a pointer.
2439 Use is/downcast insteadof more ad hoc coding style.
2440 (WebKit::WebPage::findStringFromInjectedBundle): Call core to convert WebKit::FindOptions
2441 to WebCore::FindOptions. Before, this was accidentally relying on the bits from the two
2442 enumrations matching! The stricter type checking of OptionSet helps us catch mistakes
2445 * WebProcess/WebPage/WebPage.h: Updated for the above. Also flattened out nested #if
2446 statements, made forward declarations unconditional, and re-sorted them. Changed the
2447 Mac-specific lookupTextAtLocation to return a tuple (see below).
2449 * WebProcess/WebPage/ios/WebPageIOS.mm:
2450 (WebKit::WebPage::performDictionaryLookupForSelection): Take a reference instead of a pointer.
2451 (WebKit::WebPage::performDictionaryLookupForRange): Ditto.
2452 (WebKit::rangeNearPositionMatchesText): Use { } rather than 0 for no options.
2454 * WebProcess/WebPage/mac/WebPageMac.mm:
2455 (WebKit::WebPage::performDictionaryLookupAtLocation): Use RetainPtr<NSDictionary> to fix
2456 code that used to leak.
2457 (WebKit::WebPage::performDictionaryLookupForSelection): Ditto.
2458 (WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Use a reference.
2459 (WebKit::WebPage::dictionaryPopupInfoForRange): Updated for changed argument types.
2460 (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Ditto.
2461 (WebKit::WebPage::performDictionaryLookupForRange): Ditto.
2462 (WebKit::WebPage::performImmediateActionHitTestAtLocation): Updated to handle the
2463 tuple result from the lookupTextAtLocation functions.
2464 (WebKit::WebPage::lookupTextAtLocation): Changed to return a tuple and use RetainPtr
2465 for the NSDictionary to help fix the leak.
2467 2017-11-24 Zan Dobersek <zdobersek@igalia.com>
2469 [CoordGraphics] CoordinatedGraphicsLayer::updateContentBuffers() should always assume a non-null CoordinatedBuffer
2470 https://bugs.webkit.org/show_bug.cgi?id=179977
2472 Reviewed by Carlos Garcia Campos.
2474 Make CompositingCoordinator::getCoordinatedBuffer() return a Ref<CoordinatedBuffer>
2475 value. In case an UpdateAtlas with enough free area is found, its CoordinatedBuffer
2476 is dereferenced into the return value. In case a new UpdateAtlas is created, the
2477 returned CoordinatedBuffer pointer is asserted to be non-null and dereferenced.
2479 The retrieved CoordinatedBuffer pointer on a newly-created UpdateAtlas should never
2480 be null since the tiles are smaller in size than the UpdateAtlas area. The assert
2481 is done in release configurations as well since the code in CoordinatedGraphicsLayer
2482 assumes the returned pointer will be non-null, so it's just a matter of where to
2483 crash first in case somehow a null value is returned.
2485 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2486 (WebKit::CompositingCoordinator::getCoordinatedBuffer):
2487 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2489 2017-11-24 Zan Dobersek <zdobersek@igalia.com>
2491 [CoordGraphics] UpdateAtlas constructor should receive an IntSize, not a dimension value
2492 https://bugs.webkit.org/show_bug.cgi?id=179976
2494 Reviewed by Carlos Garcia Campos.
2496 Have the UpdateAtlas constructor receive an IntSize object that specifies
2497 the desired size for the CoordinatedBuffer. Passing in a dimension doesn't
2498 really make sense since this value isn't dynamically configurable, and
2499 the only value that is passed in is already a power-of-two.
2501 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2502 (WebKit::CompositingCoordinator::getCoordinatedBuffer):
2503 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
2504 (WebKit::UpdateAtlas::UpdateAtlas):
2505 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
2507 2017-11-23 Sam Weinig <sam@webkit.org>
2509 Remove unneeded ScriptController::processingUserGesture() forwarding functions
2510 https://bugs.webkit.org/show_bug.cgi?id=179954
2512 Reviewed by Darin Adler.
2514 Replace ScriptController::processingUserGesture() and ScriptController::processingUserGestureForMedia()
2515 with direct calls to the corresponding UserGestureIndicator functions.
2517 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2518 (WebKit::InjectedBundle::isProcessingUserGesture):
2519 * WebProcess/WebPage/WebPage.cpp:
2520 (WebKit::WebPage::addResourceRequest):
2522 2017-11-23 Chris Dumez <cdumez@apple.com>
2524 WebSWServerConnection should register/unregister itself with the StorageProcess
2525 https://bugs.webkit.org/show_bug.cgi?id=179965
2527 Reviewed by Darin Adler.
2529 WebSWServerConnection should register/unregister itself with the StorageProcess instead of relying
2530 on StorageToWebProcessConnection to do so on its behalf. This is less error-prone.
2532 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2533 (WebKit::WebSWServerConnection::WebSWServerConnection):
2534 (WebKit::WebSWServerConnection::~WebSWServerConnection):
2535 * StorageProcess/StorageToWebProcessConnection.cpp:
2536 (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
2537 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
2538 (WebKit::StorageToWebProcessConnection::removeSWServerConnection):
2540 2017-11-23 Darin Adler <darin@apple.com>
2542 Reduce WTF::String operations that do unnecessary Unicode operations instead of ASCII
2543 https://bugs.webkit.org/show_bug.cgi?id=179907
2545 Reviewed by Sam Weinig.
2547 * NetworkProcess/cache/NetworkCache.cpp:
2548 (WebKit::NetworkCache::isMediaMIMEType): Use startsWithLettersIgnoringASCIICase.
2549 * NetworkProcess/cache/NetworkCacheKey.cpp:
2550 (WebKit::NetworkCache::hashString): Use isAllASCII..
2551 * UIProcess/API/C/WKWebsitePolicies.cpp:
2552 (WKWebsitePoliciesSetCustomHeaderFields): Use startsWithLettersIgnoringASCIICase..
2553 * UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
2554 (-[_WKWebsitePolicies setCustomHeaderFields:]): Ditto.
2555 * UIProcess/WebPageProxy.cpp:
2556 (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder): Use endsWithIgnoringASCIICase.
2557 * UIProcess/WebPreferences.cpp:
2558 (WebKit::WebPreferences::WebPreferences): Initialize m_identifier explicitly. Somehow
2559 changing the String default constructor to be "= default" led to a warning that we
2560 otherwise did not get about not initializing m_identifier. Arguably a compiler bug,
2561 but legitimately strange that the copy constructor does not copy m_identifier and so
2562 nice to be explicit about it, I guess.
2563 * UIProcess/mac/WebPageProxyMac.mm:
2564 (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw): Use
2565 endsWithIgnoringASCIICase.
2566 (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): Ditto.
2567 * WebProcess/WebPage/WebPage.cpp:
2568 (WebKit::WebPage::createPlugin): Ditto.
2569 * WebProcess/WebPage/ios/WebPageIOS.mm:
2570 (WebKit::WebPage::platformEditorState const): Use isAllSpecialCharacters<isHTMLSpace>.
2572 2017-11-23 Zan Dobersek <zdobersek@igalia.com>
2574 [CoordGraphics] Simplify CoordinatedGraphicsLayer's content buffer updates
2575 https://bugs.webkit.org/show_bug.cgi?id=179972
2577 Reviewed by Carlos Garcia Campos.
2579 In CompositingCoordinator, add the getCoordinatedBuffer() method, replacing
2580 paintToSurface(). The new method traverses the list of UpdateAtlases and
2581 returns any CoordinatedBuffer object that was free to use. If none exist,
2582 a new UpdateAtlas object is created, and its CoordinatedBuffer is returned.
2584 In UpdateAtlas, the paintOnAvailableBuffer() method is replaced with
2585 getCoordinatedBuffer(). The latter allocates the necessary area but then
2586 returns a reference to the CoordinatedBuffer buffer, along with the atlas ID
2587 and the allocated rectangle information, and does not invoke any painting
2588 operation like paintOnAvailableBuffer() did.
2590 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2591 (WebKit::CompositingCoordinator::getCoordinatedBuffer):
2592 (WebKit::CompositingCoordinator::paintToSurface): Deleted.
2593 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2594 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
2595 (WebKit::UpdateAtlas::getCoordinatedBuffer):
2596 (WebKit::UpdateAtlas::paintOnAvailableBuffer): Deleted.
2597 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
2599 2017-11-23 Zan Dobersek <zdobersek@igalia.com>
2601 [CoordGraphics] Remove relay CoordinatedBuffer::Client implementations
2602 https://bugs.webkit.org/show_bug.cgi?id=179970
2604 Reviewed by Carlos Garcia Campos.
2606 Drop the helper UpdateAtlasSurfaceClient class and instead directly use
2607 the CoordinatedBuffer's GraphicsContext to perform clip and translation
2608 operations based on the allocated rectangle, to pre-fill the target rect
2609 with transparent color in case the alpha channel is supported, and to
2610 then invoke CoordinatedBuffer::Client::paintToSurfaceContext() method,
2611 passing the GraphicsContext as the argument.
2613 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
2614 (WebKit::UpdateAtlas::paintOnAvailableBuffer):
2617 2017-11-23 Zan Dobersek <zdobersek@igalia.com>
2619 [CoordGraphics] Replace CoordinatedSurface, ThreadSafeCoordinatedSurface with CoordinatedBuffer
2620 https://bugs.webkit.org/show_bug.cgi?id=179967
2622 Reviewed by Carlos Garcia Campos.
2624 Replace uses of CoordinatedSurface class with CoordinatedBuffer. The
2625 ThreadSafeCoordinatedSurface class is removed, along with the code in
2626 CoordinatedLayerTreeHost that established a CoordinatedSurface factory.
2628 * PlatformGTK.cmake:
2629 * PlatformWPE.cmake:
2630 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2631 (WebKit::CoordinatedBackingStoreTile::swapBuffers):
2632 (WebKit::CoordinatedBackingStoreTile::setBackBuffer):
2633 (WebKit::CoordinatedBackingStore::updateTile):
2634 * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
2635 Rename m_surface to m_buffer, m_surfaceOffset to m_bufferOffset.
2636 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2637 (WebKit::CoordinatedGraphicsScene::createUpdateAtlas):
2638 (WebKit::CoordinatedGraphicsScene::updateImageBacking):
2639 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2640 * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp: Removed.
2641 * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h: Removed.
2642 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2643 (WebKit::CompositingCoordinator::updateImageBacking):
2644 (WebKit::CompositingCoordinator::createUpdateAtlas):
2645 (WebKit::CompositingCoordinator::paintToSurface):
2646 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
2647 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2648 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2649 (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface): Deleted.
2650 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2651 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
2652 (WebKit::UpdateAtlas::UpdateAtlas):
2653 (WebKit::UpdateAtlas::~UpdateAtlas):
2654 (WebKit::UpdateAtlas::paintOnAvailableBuffer):
2655 * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
2656 Rename m_surface to m_buffer.
2657 (WebKit::UpdateAtlas::size const):
2658 (WebKit::UpdateAtlas::supportsAlpha const):
2660 2017-11-22 Ali Juma <ajuma@chromium.org>
2662 Implement VisualViewport API attributes
2663 https://bugs.webkit.org/show_bug.cgi?id=179385
2665 Reviewed by Frédéric Wang.
2667 Add a VisualViewportAPI experimental feature.
2669 * Shared/WebPreferences.yaml:
2671 2017-11-22 Tim Horton <timothy_horton@apple.com> and Michael Catanzaro <mcatanzaro@igalia.com>
2673 Remove build-webkit's notion of feature flags having a default value
2674 https://bugs.webkit.org/show_bug.cgi?id=177338
2676 Reviewed by Carlos Alberto Lopez Perez.
2678 Use ENABLE_EXPERIMENTAL_FEATURES instead of ENABLE_DEVELOPER_MODE to enable runtime
2679 experimental features.
2681 * Shared/WebPreferencesDefaultValues.h:
2683 2017-11-22 Commit Queue <commit-queue@webkit.org>
2685 Unreviewed, rolling out r225093.
2686 https://bugs.webkit.org/show_bug.cgi?id=179938
2688 Compilation failed on WinCairo 64-bit Release (Requested by
2693 "Implement VisualViewport API attributes"
2694 https://bugs.webkit.org/show_bug.cgi?id=179385
2695 https://trac.webkit.org/changeset/225093
2697 2017-11-21 Ali Juma <ajuma@chromium.org>
2699 Implement VisualViewport API attributes
2700 https://bugs.webkit.org/show_bug.cgi?id=179385
2702 Reviewed by Frédéric Wang.
2704 Add a VisualViewportAPI experimental feature.
2706 * Shared/WebPreferences.yaml:
2708 2017-11-21 Christopher Reid <chris.reid@sony.com>
2710 [PAL] Remove FileSystem's dependency on WebCoreNSStringExtras
2711 https://bugs.webkit.org/show_bug.cgi?id=179504
2713 Reviewed by Darin Adler.
2715 * UIProcess/Cocoa/WebViewImpl.mm:
2716 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2717 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2719 2017-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
2721 [WPE] WPEWebProcess: Couldn't find current GLX or EGL context
2722 https://bugs.webkit.org/show_bug.cgi?id=179883
2724 Reviewed by Žan Doberšek.
2726 I'm seeing that message quite often when running the unit tests. The problem seems to be that some tests run so
2727 fast that the web process never renders the first frame, so the context is created but never made current. I've
2728 checked with apitrace that there are calls to eglQueryContext with null display, causing a EGL_BAD_DISPLAY, but
2729 I don't know where those calls are originated. Making the context current right after it's created fixes the
2732 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2733 (WebKit::ThreadedCompositor::createGLContext): Always call makeContextCurrent() right after the context is created.
2735 2017-11-20 Carlos Garcia Campos <cgarcia@igalia.com>
2737 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.2 release.
2739 * gtk/NEWS: Add release notes for 2.19.2.
2741 2017-11-20 Don Olmstead <don.olmstead@sony.com>
2743 Add declspec within WebKit API
2744 https://bugs.webkit.org/show_bug.cgi?id=179893
2746 Reviewed by Darin Adler.
2748 * Shared/API/c/WKDeclarationSpecifiers.h:
2750 2017-11-20 Mario Sanchez Prada <mario@endlessm.com>
2752 [GTK] New API to add, retrieve and delete cookies via WebKitCookieManager
2753 https://bugs.webkit.org/show_bug.cgi?id=177932
2755 Reviewed by Carlos Garcia Campos.
2757 Added new API to WebKitCookieManager to add, retrieve and delete complete
2758 cookies into/out-of a running session, and updated documentation sections.
2760 * UIProcess/API/glib/WebKitCookieManager.cpp:
2761 (webkit_cookie_manager_add_cookie): New function.
2762 (webkit_cookie_manager_add_cookie_finish): Ditto.
2763 (webkit_cookie_manager_get_cookies): Ditto.
2764 (webkit_cookie_manager_get_cookies_finish): Ditto.
2765 (webkit_cookie_manager_delete_cookie): Ditto.
2766 (webkit_cookie_manager_delete_cookie_finish): Ditto.
2767 * UIProcess/API/gtk/WebKitCookieManager.h: Added new functions.
2768 * UIProcess/API/wpe/WebKitCookieManager.h: Ditto.
2769 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Ditto.
2771 2017-11-20 Carlos Garcia Campos <cgarcia@igalia.com>
2773 [WPE] webkit_web_view_new() should enable specifying wpe_view_backend object
2774 https://bugs.webkit.org/show_bug.cgi?id=178655
2776 Reviewed by Michael Catanzaro.
2778 Update all WebKitWebView constructors to receive a WebKitWebViewBackend as argument. It's now required to
2779 provide a backend to create a web view, but it can be NULL to use the default one. WebKitWebViewBackend is a
2780 boxed type wrapping a struct wpe_view_backend* used as construct only property of WebKitWebView. The view always
2781 takes the ownership of the WebKitWebViewBackend which owns the struct wpe_view_backend*. An optional
2782 GDestroyNotify and user data pointer can be passed to the WebKitWebViewBackend constructor to provide a custom
2783 deleter for the backend. In the C API the struct wpe_view_backend* is also mandatory now, but it can't be NULL
2784 and it's owned by the caller, not the view.
2786 * PlatformWPE.cmake:
2787 * UIProcess/API/C/wpe/WKView.cpp:
2789 * UIProcess/API/C/wpe/WKView.h:
2790 * UIProcess/API/glib/WebKitWebView.cpp:
2791 (_WebKitWebViewPrivate::~_WebKitWebViewPrivate):
2792 (webkitWebViewConstructed):
2793 (webkitWebViewSetProperty):
2794 (webkitWebViewGetProperty):
2795 (webkit_web_view_class_init):
2796 (webkitWebViewCreatePage):
2797 (webkit_web_view_get_backend):
2798 * UIProcess/API/wpe/WPEView.cpp:
2800 (WKWPE::View::~View):
2801 * UIProcess/API/wpe/WebKitWebView.h:
2802 * UIProcess/API/wpe/WebKitWebViewBackend.cpp: Added.
2803 (_WebKitWebViewBackend::_WebKitWebViewBackend):
2804 (_WebKitWebViewBackend::~_WebKitWebViewBackend):
2805 (webkitWebViewBackendRef):
2806 (webkitWebViewBackendUnref):
2807 (webkitWebViewBackendCreateDefault):
2808 (webkit_web_view_backend_new):
2809 (webkit_web_view_backend_get_wpe_backend):
2810 * UIProcess/API/wpe/WebKitWebViewBackend.h: Added.
2811 * UIProcess/API/wpe/WebKitWebViewBackendPrivate.h: Added.
2812 * UIProcess/API/wpe/WebKitWebViewWPE.cpp:
2813 (webkit_web_view_new):
2814 (webkit_web_view_new_with_context):
2815 (webkit_web_view_new_with_related_view):
2816 (webkit_web_view_new_with_settings):
2817 (webkit_web_view_new_with_user_content_manager):
2818 * UIProcess/API/wpe/webkit.h:
2820 2017-11-20 Carlos Garcia Campos <cgarcia@igalia.com>
2822 [GTK][WPE] webkit_cookie_manager_delete_all_cookies doesn't delete the cookies if called before a web process is running
2823 https://bugs.webkit.org/show_bug.cgi?id=175265
2825 Reviewed by Michael Catanzaro.
2827 This is what happens:
2829 1- We create our WebKitWebContext that creates its WebProcessPool.
2830 2- We set a persistent cookies storage.
2831 3- We ask the website data store to delete all cookies, but since website data store is a web process observer
2832 and we haven't spawned any web process yet, it creates a new WebProcessPool with the default configuration
2833 (no persistent cookies) and sends the message to delete the cookies there.
2834 4- The network process of the second process pool does nothing because it doesn't have cookies at all.
2836 We need to set the primary data store of the WebProcessPool when WebKitWebContext is constructed to ensure that
2837 one is used before the web process is launched.
2839 * UIProcess/API/glib/WebKitWebContext.cpp:
2840 (webkitWebContextConstructed):
2842 2017-11-19 Tim Horton <timothy_horton@apple.com>
2844 Remove unused TOUCH_ICON_LOADING feature flag
2845 https://bugs.webkit.org/show_bug.cgi?id=179873
2847 Reviewed by Simon Fraser.
2849 * Configurations/FeatureDefines.xcconfig:
2851 2017-11-19 Tim Horton <timothy_horton@apple.com>
2853 Remove unused LEGACY_VENDOR_PREFIXES feature flag
2854 https://bugs.webkit.org/show_bug.cgi?id=179872
2856 Reviewed by Darin Adler.
2858 * Configurations/FeatureDefines.xcconfig:
2860 2017-11-18 Chris Dumez <cdumez@apple.com>
2862 ASSERTION FAILED: registration in WebCore::SWServerJobQueue::scriptContextStarted(ServiceWorkerIdentifier)
2863 https://bugs.webkit.org/show_bug.cgi?id=179846
2865 Reviewed by Darin Adler.
2867 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2868 (WebKit::WebSWServerConnection::rejectJobInClient):
2869 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
2870 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
2871 (WebKit::WebSWServerConnection::startScriptFetchInClient):
2872 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2873 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
2874 * WebProcess/Storage/WebSWClientConnection.messages.in:
2875 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2876 (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
2877 (WebKit::WebSWContextManagerConnection::didFinishInstall):
2878 * WebProcess/Storage/WebSWContextManagerConnection.h:
2880 2017-11-18 Tim Horton <timothy_horton@apple.com>
2882 Rename some Network Capture debugging defines
2883 https://bugs.webkit.org/show_bug.cgi?id=179870
2885 Reviewed by Darin Adler.
2887 * NetworkProcess/capture/NetworkCaptureLogging.h:
2888 * NetworkProcess/capture/NetworkCaptureManager.cpp:
2889 (WebKit::NetworkCapture::Manager::findMatch):
2890 (WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
2891 These shouldn't have WTF in their name - they have nothing to do with WTF.
2892 These shouldn't use ENABLE(), since they're not features, just debugging macros.
2894 2017-11-17 Chris Dumez <cdumez@apple.com>
2896 [Service Workers] Implement "Notify Controller Change" algorithm
2897 https://bugs.webkit.org/show_bug.cgi?id=179822
2899 Reviewed by Youenn Fablet.
2901 * Scripts/webkit/messages.py:
2902 (class_template_headers):
2903 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2904 (WebKit::WebSWServerConnection::notifyClientsOfControllerChange):
2905 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2906 * WebProcess/Storage/WebSWClientConnection.messages.in:
2908 2017-11-17 Chris Dumez <cdumez@apple.com>
2910 Use a strongly typed identifier for SWServer::Connection
2911 https://bugs.webkit.org/show_bug.cgi?id=179848
2913 Reviewed by Brady Eidson.
2915 Use a strongly typed identifier for SWServer::Connection, for clarity.
2917 * Scripts/webkit/messages.py:
2918 (forward_declarations_and_headers):
2919 (forward_declarations_and_headers.templates):
2921 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2922 (WebKit::WebSWServerConnection::WebSWServerConnection):
2923 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
2924 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2925 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2926 * StorageProcess/StorageProcess.cpp:
2927 (WebKit::StorageProcess::didFailFetch):
2928 (WebKit::StorageProcess::didNotHandleFetch):
2929 (WebKit::StorageProcess::didReceiveFetchResponse):
2930 (WebKit::StorageProcess::didReceiveFetchData):
2931 (WebKit::StorageProcess::didReceiveFetchFormData):
2932 (WebKit::StorageProcess::didFinishFetch):
2933 * StorageProcess/StorageProcess.h:
2934 * StorageProcess/StorageProcess.messages.in:
2935 * StorageProcess/StorageToWebProcessConnection.cpp:
2936 (WebKit::StorageToWebProcessConnection::didReceiveMessage):
2937 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
2938 (WebKit::StorageToWebProcessConnection::removeSWServerConnection):
2939 (WebKit::generateIDBConnectionToServerIdentifier):
2940 (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer):
2941 * StorageProcess/StorageToWebProcessConnection.h:
2942 * StorageProcess/StorageToWebProcessConnection.messages.in:
2943 * WebProcess/Storage/WebSWClientConnection.cpp:
2944 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
2945 * WebProcess/Storage/WebSWClientConnection.h:
2946 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2947 (WebKit::WebSWContextManagerConnection::startFetch):
2948 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
2949 * WebProcess/Storage/WebSWContextManagerConnection.h:
2950 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2951 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
2952 (WebKit::WebServiceWorkerFetchTaskClient::WebServiceWorkerFetchTaskClient):
2953 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
2954 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
2955 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
2956 (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
2957 * WebProcess/Storage/WebToStorageProcessConnection.h:
2959 2017-11-17 John Wilander <wilander@apple.com>
2961 Storage Access API: UI process should update network process about granted access
2962 https://bugs.webkit.org/show_bug.cgi?id=176943
2963 <rdar://problem/34440612>
2965 Reviewed by Alex Christensen.
2967 * NetworkProcess/NetworkProcess.cpp:
2968 (WebKit::NetworkProcess::updateStorageAccessForPrevalentDomains):
2969 Updates storage access on the session.
2970 * NetworkProcess/NetworkProcess.h:
2971 * NetworkProcess/NetworkProcess.messages.in:
2972 * NetworkProcess/NetworkProcessCreationParameters.cpp:
2973 (WebKit::NetworkProcessCreationParameters::encode const):
2974 (WebKit::NetworkProcessCreationParameters::decode):
2975 * NetworkProcess/NetworkProcessCreationParameters.h:
2976 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2977 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2978 (WebKit::NetworkProcess::setStorageAccessAPIEnabled):
2979 * UIProcess/API/C/WKCookieManager.cpp:
2980 (WKCookieManagerSetStorageAccessAPIEnabled):
2981 * UIProcess/API/C/WKCookieManager.h:
2982 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2983 (WKWebsiteDataStoreSetStatisticsHasHadNonRecentUserInteraction):
2984 * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2985 * UIProcess/API/Cocoa/WKProcessPool.mm:
2986 (-[WKProcessPool _isStorageAccessAPIEnabled]):
2987 (-[WKProcessPool _setStorageAccessAPIEnabled:]):
2988 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2989 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2990 (-[WKWebsiteDataStore _resourceLoadStatisticsSetHasHadNonRecentUserInteractionForHost:]):
2991 Test infrastructure.
2992 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2993 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2994 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2995 (WebKit::WebProcessPool::setStorageAccessAPIEnabled):
2996 * UIProcess/Network/NetworkProcessProxy.cpp:
2997 (WebKit::nextRequestStorageAccessContextId):
2998 (WebKit::NetworkProcessProxy::updateStorageAccessForPrevalentDomains):
2999 Sends a message to the network process to update storage access.
3000 (WebKit::NetworkProcessProxy::storageAccessRequestResult):
3001 Receives a message from the network process that storage access
3003 * UIProcess/Network/NetworkProcessProxy.h:
3004 * UIProcess/Network/NetworkProcessProxy.messages.in:
3005 * UIProcess/WebCookieManagerProxy.cpp:
3006 (WebKit::WebCookieManagerProxy::setStorageAccessAPIEnabled):
3007 * UIProcess/WebCookieManagerProxy.h:
3008 * UIProcess/WebProcessPool.h:
3009 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3010 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3011 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
3012 (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
3013 Test infrastructure.
3014 (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
3015 Now makes the API call even if the only operation is to clear first.
3016 * UIProcess/WebResourceLoadStatisticsStore.h:
3017 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3018 (WebKit::WebsiteDataStore::updateStorageAccessForPrevalentDomainsHandler):
3019 Propagates the storage access directive to the network process proxy.
3020 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3021 * UIProcess/WebsiteData/WebsiteDataStore.h:
3023 2017-11-16 Yousuke Kimoto <yousuke.kimoto@sony.com>
3025 [WinCairo] Add network (curl) files for wincairo webkit
3026 https://bugs.webkit.org/show_bug.cgi?id=179474
3028 Reviewed by Alex Christensen.
3030 * Shared/curl/WebCoreArgumentCodersCurl.cpp:
3031 (IPC::ArgumentCoder<CertificateInfo>::decode): Fidex return value since currently no operation is needed for wincairo webkit.
3032 (IPC::ArgumentCoder<ResourceError>::decodePlatformData): Fidex return value since currently no operation is needed for wincairo webkit.
3033 * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp: Renamed from Source/WebKit/WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.cpp.
3034 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
3035 * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h: Renamed from Source/WebKit/WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h.
3037 2017-11-16 Don Olmstead <don.olmstead@sony.com>
3039 [WinCairo] Update WinCairoRequirements
3040 https://bugs.webkit.org/show_bug.cgi?id=179790
3042 Reviewed by Alex Christensen.
3044 * PlatformWin.cmake:
3046 2017-11-16 Youenn Fablet <youenn@apple.com>
3048 Service Worker should get the body of intercepted requests
3049 https://bugs.webkit.org/show_bug.cgi?id=179776
3051 Reviewed by Alex Christensen.
3053 Pass a FormDataReference when starting fetch IPC.
3054 Convert this FormDataReference in a FormData and using it to set the FetchRequest body properly in Service Worker process.
3055 Forbid fetch interception when URL is not HTTP/HTTPS.
3057 * Platform/IPC/FormDataReference.h:
3058 (IPC::FormDataReference::FormDataReference):
3059 (IPC::FormDataReference::takeData):
3060 (IPC::FormDataReference::encode const):
3061 (IPC::FormDataReference::decode):
3062 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3063 (WebKit::WebSWServerConnection::startFetch):
3064 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3065 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3066 * WebProcess/Storage/WebSWClientConnection.cpp:
3067 (WebKit::WebSWClientConnection::startFetch):
3068 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3069 (WebKit::WebSWContextManagerConnection::startFetch):
3070 * WebProcess/Storage/WebSWContextManagerConnection.h:
3071 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3072 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
3073 (WebKit::WebServiceWorkerProvider::handleFetch):
3075 2017-11-16 Daniel Bates <dabates@apple.com>
3077 Add feature define for alternative presentation button element
3078 https://bugs.webkit.org/show_bug.cgi?id=179692
3079 Part of <rdar://problem/34917108>
3081 Reviewed by Andy Estes.
3083 Only enabled on Cocoa platforms by default.
3085 * Configurations/FeatureDefines.xcconfig:
3087 2017-11-16 Chris Dumez <cdumez@apple.com>
3089 [Service Worker] Implement "Try Clear Registration" algorithm
3090 https://bugs.webkit.org/show_bug.cgi?id=179791
3092 Reviewed by Youenn Fablet.
3094 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3095 * WebProcess/Storage/WebSWClientConnection.cpp:
3096 (WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient):
3097 (WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient):
3098 * WebProcess/Storage/WebSWClientConnection.h:
3100 2017-11-16 Michael Catanzaro <mcatanzaro@igalia.com>
3102 REGRESSION(r224179): layer flush now requires sync IPC to compute undo/redo availability in EditorState
3103 https://bugs.webkit.org/show_bug.cgi?id=179797
3105 Reviewed by Simon Fraser.
3107 r224179 introduced a performance regression. The newly-added code in WebPage::editorState is
3108 part of a performance-critical path. (The editor state is computed and sent to the UI
3109 process during the layer flush.) Calls to Editor::canUndo and Editor::canRedo were added,
3110 but these calls are both implemented with sync IPC calls to WebPageProxy in the UI process.
3111 WebPageProxy passes them along to PageClientImpl to compute the availability of the
3114 That's all pointless because this code only exists for the purpose of getting editing
3115 command availability to the UI process. In the case of undo and redo, it's not needed at
3116 all. I did not realize that when writing the code. So canUndo and canRedo should be removed
3117 from EditorState. This ought to be sufficient to avoid the perf regression.
3119 No changes are needed to the GTK/WPE WebKitEditorState API. The API is reimplemented using
3120 WebPageProxy::canUndoRedo instead of EditorState. There should be no changes in behavior,
3123 * Shared/EditorState.cpp:
3124 (WebKit::EditorState::PostLayoutData::encode const):
3125 (WebKit::EditorState::PostLayoutData::decode):
3126 * Shared/EditorState.h:
3127 * UIProcess/API/glib/WebKitEditorState.cpp:
3128 (webkitEditorStateCreate):
3129 (webkitEditorStateChanged):
3130 * UIProcess/API/glib/WebKitEditorStatePrivate.h:
3131 * UIProcess/API/glib/WebKitWebView.cpp:
3132 (webkit_web_view_get_editor_state):
3133 * UIProcess/WebPageProxy.cpp:
3134 (WebKit::WebPageProxy::canUndo):
3135 (WebKit::WebPageProxy::canRedo):
3136 * UIProcess/WebPageProxy.h:
3137 * WebProcess/WebPage/WebPage.cpp:
3138 (WebKit::WebPage::editorState const):
3140 2017-11-16 Megan Gardner <megan_gardner@apple.com>
3142 Remove allowBlockSelection as block selection is not supported anymore
3143 https://bugs.webkit.org/show_bug.cgi?id=179738
3145 Reviewed by Tim Horton.
3147 Remove all instances of the alloweBlockSelection flag. Blocks selection is fully disabled
3148 and thus this flag will do nothing. This was only added as a debug measure last year, and nothing
3149 ever actually used it.
3151 * Shared/WebPageCreationParameters.cpp:
3152 (WebKit::WebPageCreationParameters::encode const):
3153 (WebKit::WebPageCreationParameters::decode):
3154 * Shared/WebPageCreationParameters.h:
3155 * UIProcess/API/Cocoa/WKWebView.mm:
3156 (-[WKWebView _allowsBlockSelection]): Deleted.
3157 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3158 (-[WKWebViewConfiguration init]):
3159 (-[WKWebViewConfiguration copyWithZone:]):
3160 (-[WKWebViewConfiguration _allowsBlockSelection]): Deleted.
3161 (-[WKWebViewConfiguration _setAllowsBlockSelection:]): Deleted.
3162 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3163 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3164 * UIProcess/PageClient.h:
3165 * UIProcess/WebPageProxy.cpp:
3166 (WebKit::WebPageProxy::creationParameters):
3167 * UIProcess/ios/PageClientImplIOS.h:
3168 * UIProcess/ios/PageClientImplIOS.mm:
3169 (WebKit::PageClientImpl::allowsBlockSelection): Deleted.
3170 * WebProcess/WebPage/WebPage.cpp:
3171 * WebProcess/WebPage/WebPage.h:
3173 2017-11-16 Brent Fulgham <bfulgham@apple.com>
3175 Whitelist additional IOKit properties based on customer feedback
3176 https://bugs.webkit.org/show_bug.cgi?id=179782
3177 <rdar://problem/35508246>
3179 Reviewed by Dean Jackson.
3181 Expand the IOKit property whitelist to recognize a few more properties as valid based on review of logs
3182 from customer systems and our test infrastructure.
3184 * WebProcess/com.apple.WebProcess.sb.in:
3186 2017-11-15 Brady Eidson <beidson@apple.com>
3188 Implement basics of "Terminate Service Worker" algorithm.
3189 https://bugs.webkit.org/show_bug.cgi?id=179551
3191 Reviewed by Chris Dumez.
3193 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
3194 (WebKit::WebSWServerToContextConnection::terminateWorker):
3195 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
3196 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
3198 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3199 (WebKit::WebSWContextManagerConnection::terminateWorker):
3200 (WebKit::WebSWContextManagerConnection::workerTerminated):
3201 * WebProcess/Storage/WebSWContextManagerConnection.h:
3202 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3204 2017-11-15 Brent Fulgham <bfulgham@apple.com>
3206 Remove access to 'com.apple.mediaaccessibility.public' preferences in WebContent sandbox
3207 https://bugs.webkit.org/show_bug.cgi?id=179747
3208 <rdar://problem/35367346>
3210 Reviewed by Dean Jackson.
3212 The 'mediaaccessibilityd' process handles access to MediaAccessibility preferences. We don't need
3213 to grant the WebContent Process sandbox access to them.
3215 * WebProcess/com.apple.WebProcess.sb.in:
3217 2017-11-15 Alex Christensen <achristensen@webkit.org>
3220 https://bugs.webkit.org/show_bug.cgi?id=179719
3222 * UIProcess/API/APIContentRuleListStore.cpp:
3223 (API::compiledToFile):
3224 r224885 was a speculative fix that did not fix anything on the bots.
3226 2017-11-15 Brent Fulgham <bfulgham@apple.com>
3228 Unreviewed build fix after r224830.
3230 * WebProcess/com.apple.WebProcess.sb.in: Add missing sysctl-read permissions needed
3231 to support testing on Mac Mini hardware.
3233 2017-11-15 Youenn Fablet <youenn@apple.com>
3235 Add ServiceWorker to WebProcess plumbery for FormData fetch responses
3236 https://bugs.webkit.org/show_bug.cgi?id=179694
3238 Reviewed by Alex Christensen.
3240 Added plumbery from Service Worker up to Web Process to pass form data response bodies.
3241 A follow-up patch should read the data from Network Process and send it to the ResourceLoader.
3243 * Platform/IPC/FormDataReference.h: Added.
3244 (IPC::FormDataReference::FormDataReference):
3245 (IPC::FormDataReference::takeData):
3246 (IPC::FormDataReference::encode const):
3247 (IPC::FormDataReference::decode):
3248 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3249 (WebKit::WebSWServerConnection::didReceiveFetchFormData):
3250 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3251 * StorageProcess/StorageProcess.cpp:
3252 (WebKit::StorageProcess::didReceiveFetchFormData):
3253 * StorageProcess/StorageProcess.h:
3254 * StorageProcess/StorageProcess.messages.in:
3255 * WebKit.xcodeproj/project.pbxproj:
3256 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3257 (WebKit::ServiceWorkerClientFetch::didReceiveFormData):
3258 * WebProcess/Storage/ServiceWorkerClientFetch.h:
3259 * WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
3260 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
3261 (WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormData):
3262 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
3264 2017-11-15 Alex Christensen <achristensen@webkit.org>
3266 Move a compiled WKContentRuleList to its destination before calling mmap
3267 https://bugs.webkit.org/show_bug.cgi?id=179719
3269 Reviewed by Brady Eidson.
3271 Right now we compile a WKContentRuleList to a temporary file, call mmap, close the file, then move it.
3272 Sometimes, especially on bots running tests, the move fails because the temporary file doesn't exist
3273 any more. Moving the file before mmaping and closing the file might prevent this failure.
3275 * UIProcess/API/APIContentRuleListStore.cpp:
3276 (API::compiledToFile):
3278 2017-11-15 Chris Dumez <cdumez@apple.com>
3280 [Service Workers] Implement Client API
3281 https://bugs.webkit.org/show_bug.cgi?id=179709
3283 Reviewed by Alex Christensen.
3285 * Shared/WebCoreArgumentCoders.cpp:
3286 * Shared/WebCoreArgumentCoders.h:
3287 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3288 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
3289 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3290 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3291 * WebProcess/Storage/WebSWClientConnection.cpp:
3292 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
3293 * WebProcess/Storage/WebSWClientConnection.h:
3294 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
3295 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
3296 * WebProcess/Storage/WebSWContextManagerConnection.h:
3297 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
3299 2017-11-15 Ryan Haddad <ryanhaddad@apple.com>
3301 Unreviewed, rolling out r224863.
3303 Introduced LayoutTest crashes on iOS Simulator.
3307 "Move JSONValues to WTF and convert uses of InspectorValues.h
3309 https://bugs.webkit.org/show_bug.cgi?id=173793
3310 https://trac.webkit.org/changeset/224863
3312 2017-11-14 Brent Fulgham <bfulgham@apple.com>
3314 Remove access to "com.apple.pbs.fetch_services" from WebContent sandbox
3315 https://bugs.webkit.org/show_bug.cgi?id=179689
3316 <rdar://problem/35369172>
3318 Reviewed by Per Arne Vollan.
3320 WebKit's WebContent process should not have any need to interact with the fetch_services
3321 API exposed to the system. These interactions (if needed) should be happening in the UIProcess,
3322 so we should prevent the untrusted Web Content Process from being able to connect.
3324 * WebProcess/com.apple.WebProcess.sb.in:
3326 2017-11-15 Michael Catanzaro <mcatanzaro@igalia.com>
3328 Remove GTK web inspector images
3329 https://bugs.webkit.org/show_bug.cgi?id=179716
3331 Reviewed by Carlos Garcia Campos.
3333 * InspectorGResources.cmake:
3335 2017-11-15 Gabriel Ivascu <givascu@igalia.com>
3337 [GTK] Automatically adjust font size when gtk-xft-dpi changes
3338 https://bugs.webkit.org/show_bug.cgi?id=142673
3340 Some follow-up fixes for the previous patch.
3342 Reviewed by Carlos Garcia Campos.
3344 * UIProcess/API/glib/WebKitSettings.cpp:
3345 (webKitSettingsDispose):
3346 (webKitSettingsConstructed):
3348 2017-11-14 Nan Wang <n_wang@apple.com>
3350 AX: AOM: Implement AccessibleNode class and support label and role attributes
3351 https://bugs.webkit.org/show_bug.cgi?id=179494
3353 Reviewed by Ryosuke Niwa.
3355 * Shared/WebPreferences.yaml:
3356 * UIProcess/API/C/WKPreferences.cpp:
3357 (WKPreferencesSetAccessibilityObjectModelEnabled):
3358 (WKPreferencesGetAccessibilityObjectModelEnabled):
3359 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3361 2017-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
3363 Move JSONValues to WTF and convert uses of InspectorValues.h to JSONValues.h
3364 https://bugs.webkit.org/show_bug.cgi?id=173793
3366 Reviewed by Brian Burg.
3368 Based on patch by Brian Burg.
3370 * UIProcess/Automation/WebAutomationSession.cpp:
3371 (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
3372 (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
3373 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
3374 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
3375 (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout):
3376 (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
3377 (WebKit::WebAutomationSession::navigationOccurredForFrame):
3378 (WebKit::WebAutomationSession::documentLoadedForFrame):
3379 (WebKit::WebAutomationSession::inspectorFrontendLoaded):
3380 (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
3381 (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
3382 (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
3383 (WebKit::WebAutomationSession::addSingleCookie):
3384 (WebKit::WebAutomationSession::setSessionPermissions):
3385 (WebKit::WebAutomationSession::performMouseInteraction):
3386 (WebKit::WebAutomationSession::performKeyboardInteractions):
3387 * UIProcess/Automation/WebAutomationSession.h:
3389 2017-11-14 Chris Dumez <cdumez@apple.com>
3391 [Service Workers] Implement container.getRegistrations()
3392 https://bugs.webkit.org/show_bug.cgi?id=179672
3394 Reviewed by Brady Eidson.
3396 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3397 (WebKit::WebSWServerConnection::getRegistrations):
3398 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3399 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3400 * WebProcess/Storage/WebSWClientConnection.cpp:
3401 (WebKit::WebSWClientConnection::didGetRegistrations):
3402 (WebKit::WebSWClientConnection::getRegistrations):
3403 * WebProcess/Storage/WebSWClientConnection.h:
3404 * WebProcess/Storage/WebSWClientConnection.messages.in:
3406 2017-11-14 Youenn Fablet <youenn@apple.com>
3408 Implement ServiceWorker handle fetch for navigation loads
3409 https://bugs.webkit.org/show_bug.cgi?id=179404
3411 Reviewed by Alex Christensen and Chris Dumez.
3413 Update handle fetch algorithm to support navigation requests.
3414 In case of navigation requests, set service worker response mime type to text/html if none is provided.
3416 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3417 (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
3418 * WebProcess/Storage/WebSWClientConnection.cpp:
3419 (WebKit::WebSWClientConnection::startFetch):
3420 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
3421 (WebKit::shouldHandleFetch):
3422 (WebKit::WebServiceWorkerProvider::handleFetch):
3424 2017-11-14 Alex Christensen <achristensen@webkit.org>
3426 Remove Cocoa CFURLConnection loading code
3427 https://bugs.webkit.org/show_bug.cgi?id=179688
3429 Reviewed by Antti Koivisto.
3431 * NetworkProcess/Downloads/Download.h:
3433 2017-11-14 Daniel Bates <dabates@apple.com>
3435 Update comment in FeatureDefines.xcconfig to reflect location of Visual Studio property files
3438 Following r195498 and r201917 the Visual Studio property files for feature defines have
3439 moved from directory WebKitLibraries/win/tools/vsprops to directory Source/cmake/tools/vsprops.
3440 Update the comment in FeatureDefines.xcconfig to reflect the new location and names of these
3443 * Configurations/FeatureDefines.xcconfig:
3445 2017-11-14 Brent Fulgham <bfulgham@apple.com>
3447 Whitelist some IOKIt properties to avoid sandbox violations on YouTube
3448 https://bugs.webkit.org/show_bug.cgi?id=179683
3449 <rdar://problem/35415368>
3451 Reviewed by Dean Jackson.
3453 YouTube video playback on some hardware (and some video encodings) generates sandbox violations. Add
3454 whitelist entries for the relevant IOKit properties needed to support these activities.
3456 * WebProcess/com.apple.WebProcess.sb.in: