1 2017-11-16 Youenn Fablet <youenn@apple.com>
3 Service Worker should get the body of intercepted requests
4 https://bugs.webkit.org/show_bug.cgi?id=179776
6 Reviewed by Alex Christensen.
8 Pass a FormDataReference when starting fetch IPC.
9 Convert this FormDataReference in a FormData and using it to set the FetchRequest body properly in Service Worker process.
10 Forbid fetch interception when URL is not HTTP/HTTPS.
12 * Platform/IPC/FormDataReference.h:
13 (IPC::FormDataReference::FormDataReference):
14 (IPC::FormDataReference::takeData):
15 (IPC::FormDataReference::encode const):
16 (IPC::FormDataReference::decode):
17 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
18 (WebKit::WebSWServerConnection::startFetch):
19 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
20 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
21 * WebProcess/Storage/WebSWClientConnection.cpp:
22 (WebKit::WebSWClientConnection::startFetch):
23 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
24 (WebKit::WebSWContextManagerConnection::startFetch):
25 * WebProcess/Storage/WebSWContextManagerConnection.h:
26 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
27 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
28 (WebKit::WebServiceWorkerProvider::handleFetch):
30 2017-11-16 Daniel Bates <dabates@apple.com>
32 Add feature define for alternative presentation button element
33 https://bugs.webkit.org/show_bug.cgi?id=179692
34 Part of <rdar://problem/34917108>
36 Reviewed by Andy Estes.
38 Only enabled on Cocoa platforms by default.
40 * Configurations/FeatureDefines.xcconfig:
42 2017-11-16 Chris Dumez <cdumez@apple.com>
44 [Service Worker] Implement "Try Clear Registration" algorithm
45 https://bugs.webkit.org/show_bug.cgi?id=179791
47 Reviewed by Youenn Fablet.
49 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
50 * WebProcess/Storage/WebSWClientConnection.cpp:
51 (WebKit::WebSWClientConnection::serviceWorkerStartedControllingClient):
52 (WebKit::WebSWClientConnection::serviceWorkerStoppedControllingClient):
53 * WebProcess/Storage/WebSWClientConnection.h:
55 2017-11-16 Michael Catanzaro <mcatanzaro@igalia.com>
57 REGRESSION(r224179): layer flush now requires sync IPC to compute undo/redo availability in EditorState
58 https://bugs.webkit.org/show_bug.cgi?id=179797
60 Reviewed by Simon Fraser.
62 r224179 introduced a performance regression. The newly-added code in WebPage::editorState is
63 part of a performance-critical path. (The editor state is computed and sent to the UI
64 process during the layer flush.) Calls to Editor::canUndo and Editor::canRedo were added,
65 but these calls are both implemented with sync IPC calls to WebPageProxy in the UI process.
66 WebPageProxy passes them along to PageClientImpl to compute the availability of the
69 That's all pointless because this code only exists for the purpose of getting editing
70 command availability to the UI process. In the case of undo and redo, it's not needed at
71 all. I did not realize that when writing the code. So canUndo and canRedo should be removed
72 from EditorState. This ought to be sufficient to avoid the perf regression.
74 No changes are needed to the GTK/WPE WebKitEditorState API. The API is reimplemented using
75 WebPageProxy::canUndoRedo instead of EditorState. There should be no changes in behavior,
78 * Shared/EditorState.cpp:
79 (WebKit::EditorState::PostLayoutData::encode const):
80 (WebKit::EditorState::PostLayoutData::decode):
81 * Shared/EditorState.h:
82 * UIProcess/API/glib/WebKitEditorState.cpp:
83 (webkitEditorStateCreate):
84 (webkitEditorStateChanged):
85 * UIProcess/API/glib/WebKitEditorStatePrivate.h:
86 * UIProcess/API/glib/WebKitWebView.cpp:
87 (webkit_web_view_get_editor_state):
88 * UIProcess/WebPageProxy.cpp:
89 (WebKit::WebPageProxy::canUndo):
90 (WebKit::WebPageProxy::canRedo):
91 * UIProcess/WebPageProxy.h:
92 * WebProcess/WebPage/WebPage.cpp:
93 (WebKit::WebPage::editorState const):
95 2017-11-16 Megan Gardner <megan_gardner@apple.com>
97 Remove allowBlockSelection as block selection is not supported anymore
98 https://bugs.webkit.org/show_bug.cgi?id=179738
100 Reviewed by Tim Horton.
102 Remove all instances of the alloweBlockSelection flag. Blocks selection is fully disabled
103 and thus this flag will do nothing. This was only added as a debug measure last year, and nothing
104 ever actually used it.
106 * Shared/WebPageCreationParameters.cpp:
107 (WebKit::WebPageCreationParameters::encode const):
108 (WebKit::WebPageCreationParameters::decode):
109 * Shared/WebPageCreationParameters.h:
110 * UIProcess/API/Cocoa/WKWebView.mm:
111 (-[WKWebView _allowsBlockSelection]): Deleted.
112 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
113 (-[WKWebViewConfiguration init]):
114 (-[WKWebViewConfiguration copyWithZone:]):
115 (-[WKWebViewConfiguration _allowsBlockSelection]): Deleted.
116 (-[WKWebViewConfiguration _setAllowsBlockSelection:]): Deleted.
117 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
118 * UIProcess/API/Cocoa/WKWebViewInternal.h:
119 * UIProcess/PageClient.h:
120 * UIProcess/WebPageProxy.cpp:
121 (WebKit::WebPageProxy::creationParameters):
122 * UIProcess/ios/PageClientImplIOS.h:
123 * UIProcess/ios/PageClientImplIOS.mm:
124 (WebKit::PageClientImpl::allowsBlockSelection): Deleted.
125 * WebProcess/WebPage/WebPage.cpp:
126 * WebProcess/WebPage/WebPage.h:
128 2017-11-16 Brent Fulgham <bfulgham@apple.com>
130 Whitelist additional IOKit properties based on customer feedback
131 https://bugs.webkit.org/show_bug.cgi?id=179782
132 <rdar://problem/35508246>
134 Reviewed by Dean Jackson.
136 Expand the IOKit property whitelist to recognize a few more properties as valid based on review of logs
137 from customer systems and our test infrastructure.
139 * WebProcess/com.apple.WebProcess.sb.in:
141 2017-11-15 Brady Eidson <beidson@apple.com>
143 Implement basics of "Terminate Service Worker" algorithm.
144 https://bugs.webkit.org/show_bug.cgi?id=179551
146 Reviewed by Chris Dumez.
148 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
149 (WebKit::WebSWServerToContextConnection::terminateWorker):
150 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
151 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
153 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
154 (WebKit::WebSWContextManagerConnection::terminateWorker):
155 (WebKit::WebSWContextManagerConnection::workerTerminated):
156 * WebProcess/Storage/WebSWContextManagerConnection.h:
157 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
159 2017-11-15 Brent Fulgham <bfulgham@apple.com>
161 Remove access to 'com.apple.mediaaccessibility.public' preferences in WebContent sandbox
162 https://bugs.webkit.org/show_bug.cgi?id=179747
163 <rdar://problem/35367346>
165 Reviewed by Dean Jackson.
167 The 'mediaaccessibilityd' process handles access to MediaAccessibility preferences. We don't need
168 to grant the WebContent Process sandbox access to them.
170 * WebProcess/com.apple.WebProcess.sb.in:
172 2017-11-15 Alex Christensen <achristensen@webkit.org>
175 https://bugs.webkit.org/show_bug.cgi?id=179719
177 * UIProcess/API/APIContentRuleListStore.cpp:
178 (API::compiledToFile):
179 r224885 was a speculative fix that did not fix anything on the bots.
181 2017-11-15 Brent Fulgham <bfulgham@apple.com>
183 Unreviewed build fix after r224830.
185 * WebProcess/com.apple.WebProcess.sb.in: Add missing sysctl-read permissions needed
186 to support testing on Mac Mini hardware.
188 2017-11-15 Youenn Fablet <youenn@apple.com>
190 Add ServiceWorker to WebProcess plumbery for FormData fetch responses
191 https://bugs.webkit.org/show_bug.cgi?id=179694
193 Reviewed by Alex Christensen.
195 Added plumbery from Service Worker up to Web Process to pass form data response bodies.
196 A follow-up patch should read the data from Network Process and send it to the ResourceLoader.
198 * Platform/IPC/FormDataReference.h: Added.
199 (IPC::FormDataReference::FormDataReference):
200 (IPC::FormDataReference::takeData):
201 (IPC::FormDataReference::encode const):
202 (IPC::FormDataReference::decode):
203 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
204 (WebKit::WebSWServerConnection::didReceiveFetchFormData):
205 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
206 * StorageProcess/StorageProcess.cpp:
207 (WebKit::StorageProcess::didReceiveFetchFormData):
208 * StorageProcess/StorageProcess.h:
209 * StorageProcess/StorageProcess.messages.in:
210 * WebKit.xcodeproj/project.pbxproj:
211 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
212 (WebKit::ServiceWorkerClientFetch::didReceiveFormData):
213 * WebProcess/Storage/ServiceWorkerClientFetch.h:
214 * WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
215 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
216 (WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormData):
217 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
219 2017-11-15 Alex Christensen <achristensen@webkit.org>
221 Move a compiled WKContentRuleList to its destination before calling mmap
222 https://bugs.webkit.org/show_bug.cgi?id=179719
224 Reviewed by Brady Eidson.
226 Right now we compile a WKContentRuleList to a temporary file, call mmap, close the file, then move it.
227 Sometimes, especially on bots running tests, the move fails because the temporary file doesn't exist
228 any more. Moving the file before mmaping and closing the file might prevent this failure.
230 * UIProcess/API/APIContentRuleListStore.cpp:
231 (API::compiledToFile):
233 2017-11-15 Chris Dumez <cdumez@apple.com>
235 [Service Workers] Implement Client API
236 https://bugs.webkit.org/show_bug.cgi?id=179709
238 Reviewed by Alex Christensen.
240 * Shared/WebCoreArgumentCoders.cpp:
241 * Shared/WebCoreArgumentCoders.h:
242 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
243 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
244 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
245 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
246 * WebProcess/Storage/WebSWClientConnection.cpp:
247 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
248 * WebProcess/Storage/WebSWClientConnection.h:
249 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
250 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
251 * WebProcess/Storage/WebSWContextManagerConnection.h:
252 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
254 2017-11-15 Ryan Haddad <ryanhaddad@apple.com>
256 Unreviewed, rolling out r224863.
258 Introduced LayoutTest crashes on iOS Simulator.
262 "Move JSONValues to WTF and convert uses of InspectorValues.h
264 https://bugs.webkit.org/show_bug.cgi?id=173793
265 https://trac.webkit.org/changeset/224863
267 2017-11-14 Brent Fulgham <bfulgham@apple.com>
269 Remove access to "com.apple.pbs.fetch_services" from WebContent sandbox
270 https://bugs.webkit.org/show_bug.cgi?id=179689
271 <rdar://problem/35369172>
273 Reviewed by Per Arne Vollan.
275 WebKit's WebContent process should not have any need to interact with the fetch_services
276 API exposed to the system. These interactions (if needed) should be happening in the UIProcess,
277 so we should prevent the untrusted Web Content Process from being able to connect.
279 * WebProcess/com.apple.WebProcess.sb.in:
281 2017-11-15 Michael Catanzaro <mcatanzaro@igalia.com>
283 Remove GTK web inspector images
284 https://bugs.webkit.org/show_bug.cgi?id=179716
286 Reviewed by Carlos Garcia Campos.
288 * InspectorGResources.cmake:
290 2017-11-15 Gabriel Ivascu <givascu@igalia.com>
292 [GTK] Automatically adjust font size when gtk-xft-dpi changes
293 https://bugs.webkit.org/show_bug.cgi?id=142673
295 Some follow-up fixes for the previous patch.
297 Reviewed by Carlos Garcia Campos.
299 * UIProcess/API/glib/WebKitSettings.cpp:
300 (webKitSettingsDispose):
301 (webKitSettingsConstructed):
303 2017-11-14 Nan Wang <n_wang@apple.com>
305 AX: AOM: Implement AccessibleNode class and support label and role attributes
306 https://bugs.webkit.org/show_bug.cgi?id=179494
308 Reviewed by Ryosuke Niwa.
310 * Shared/WebPreferences.yaml:
311 * UIProcess/API/C/WKPreferences.cpp:
312 (WKPreferencesSetAccessibilityObjectModelEnabled):
313 (WKPreferencesGetAccessibilityObjectModelEnabled):
314 * UIProcess/API/C/WKPreferencesRefPrivate.h:
316 2017-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
318 Move JSONValues to WTF and convert uses of InspectorValues.h to JSONValues.h
319 https://bugs.webkit.org/show_bug.cgi?id=173793
321 Reviewed by Brian Burg.
323 Based on patch by Brian Burg.
325 * UIProcess/Automation/WebAutomationSession.cpp:
326 (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
327 (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
328 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
329 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
330 (WebKit::WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout):
331 (WebKit::WebAutomationSession::respondToPendingFrameNavigationCallbacksWithTimeout):
332 (WebKit::WebAutomationSession::navigationOccurredForFrame):
333 (WebKit::WebAutomationSession::documentLoadedForFrame):
334 (WebKit::WebAutomationSession::inspectorFrontendLoaded):
335 (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
336 (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
337 (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
338 (WebKit::WebAutomationSession::addSingleCookie):
339 (WebKit::WebAutomationSession::setSessionPermissions):
340 (WebKit::WebAutomationSession::performMouseInteraction):
341 (WebKit::WebAutomationSession::performKeyboardInteractions):
342 * UIProcess/Automation/WebAutomationSession.h:
344 2017-11-14 Chris Dumez <cdumez@apple.com>
346 [Service Workers] Implement container.getRegistrations()
347 https://bugs.webkit.org/show_bug.cgi?id=179672
349 Reviewed by Brady Eidson.
351 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
352 (WebKit::WebSWServerConnection::getRegistrations):
353 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
354 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
355 * WebProcess/Storage/WebSWClientConnection.cpp:
356 (WebKit::WebSWClientConnection::didGetRegistrations):
357 (WebKit::WebSWClientConnection::getRegistrations):
358 * WebProcess/Storage/WebSWClientConnection.h:
359 * WebProcess/Storage/WebSWClientConnection.messages.in:
361 2017-11-14 Youenn Fablet <youenn@apple.com>
363 Implement ServiceWorker handle fetch for navigation loads
364 https://bugs.webkit.org/show_bug.cgi?id=179404
366 Reviewed by Alex Christensen and Chris Dumez.
368 Update handle fetch algorithm to support navigation requests.
369 In case of navigation requests, set service worker response mime type to text/html if none is provided.
371 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
372 (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
373 * WebProcess/Storage/WebSWClientConnection.cpp:
374 (WebKit::WebSWClientConnection::startFetch):
375 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
376 (WebKit::shouldHandleFetch):
377 (WebKit::WebServiceWorkerProvider::handleFetch):
379 2017-11-14 Alex Christensen <achristensen@webkit.org>
381 Remove Cocoa CFURLConnection loading code
382 https://bugs.webkit.org/show_bug.cgi?id=179688
384 Reviewed by Antti Koivisto.
386 * NetworkProcess/Downloads/Download.h:
388 2017-11-14 Daniel Bates <dabates@apple.com>
390 Update comment in FeatureDefines.xcconfig to reflect location of Visual Studio property files
393 Following r195498 and r201917 the Visual Studio property files for feature defines have
394 moved from directory WebKitLibraries/win/tools/vsprops to directory Source/cmake/tools/vsprops.
395 Update the comment in FeatureDefines.xcconfig to reflect the new location and names of these
398 * Configurations/FeatureDefines.xcconfig:
400 2017-11-14 Brent Fulgham <bfulgham@apple.com>
402 Whitelist some IOKIt properties to avoid sandbox violations on YouTube
403 https://bugs.webkit.org/show_bug.cgi?id=179683
404 <rdar://problem/35415368>
406 Reviewed by Dean Jackson.
408 YouTube video playback on some hardware (and some video encodings) generates sandbox violations. Add
409 whitelist entries for the relevant IOKit properties needed to support these activities.
411 * WebProcess/com.apple.WebProcess.sb.in:
413 2017-11-14 Daniel Bates <dabates@apple.com>
415 Mark WebChromeClient::requestStorageAccess() as final
416 https://bugs.webkit.org/show_bug.cgi?id=179673
418 Reviewed by Sam Weinig.
420 Mark WebChromeClient::requestStorageAccess() as final so that it overrides the virtual function
421 in ChromeClient with the same name and hence we actually call it through a ChromeClient pointer.
423 * WebProcess/WebCoreSupport/WebChromeClient.h:
425 2017-11-14 Youenn Fablet <youenn@apple.com>
427 WebSWClientConnection should do IPC to StorageProcess if its WebSWOriginTable is not yet initialized
428 https://bugs.webkit.org/show_bug.cgi?id=179668
430 Reviewed by Chris Dumez.
432 There may be cases where the origin table is not initialized and we would think there is no service worker registration.
433 In such a case, we should go to the StorageProcess.
434 StorageProcess is now sending an IPC message back to each registered SW connection so that WebProcess will know whether its map
435 is correctly initialized or not.
437 Renaming hasServiceWorkerRegisteredForOrigin in mayHaveServiceWorkerRegisteredForOrigin.
439 * WebProcess/Storage/WebSWClientConnection.cpp:
440 (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
441 (WebKit::WebSWClientConnection::matchRegistration):
442 (WebKit::WebSWClientConnection::hasServiceWorkerRegisteredForOrigin const): Deleted.
443 * WebProcess/Storage/WebSWClientConnection.h:
444 * WebProcess/Storage/WebSWOriginTable.h:
445 (WebKit::WebSWOriginTable::isInitialized const):
446 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
447 (WebKit::shouldHandleFetch):
449 2017-11-14 Brent Fulgham <bfulgham@apple.com>
451 Consolidate sysctl-read rules in WebProcess sandbox
452 https://bugs.webkit.org/show_bug.cgi?id=179674
453 <rdar://problem/35367154>
455 Reviewed by Dean Jackson.
457 Consolidate the various calls to 'allow sysctl-read' imported during Bug 179548 into
458 the main function in the sandbox profile.
460 Remove the statement to grant global sysctl-read permissions that was copied into this
461 sandbox profile in an earlier checkin. We started blocking the blanket read permissions in
462 macOS 10.13, and want to continue to do so.
464 The earlier "grant global read access" in 'system.sb' apparently allowed some sysctl reads
465 to occur before we hit the block declaration in the WebContent sandbox. Now that we are
466 consistently blocking systcl reads from the start, we need to add whitelist entries for a
467 few more entries to avoid creating new sandbox violations.
469 * WebProcess/com.apple.WebProcess.sb.in:
471 2017-11-14 Alex Christensen <achristensen@webkit.org>
473 Remove WebKit CFURLConnection code
474 https://bugs.webkit.org/show_bug.cgi?id=179645
476 Reviewed by Alexey Proskuryakov.
478 The CFURLConnection code is Windows-specific now. Nobody can use it in modern WebKit.
480 * NetworkProcess/Downloads/Download.h:
481 * NetworkProcess/Downloads/mac/DownloadMac.mm:
482 * NetworkProcess/NetworkLoad.h:
483 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
484 (WebKit::serverTrustCredential):
485 * NetworkProcess/mac/NetworkLoadMac.mm:
486 * Shared/Authentication/AuthenticationManager.cpp:
487 (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
488 (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
489 (WebKit::AuthenticationManager::cancelSingleChallenge):
490 (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
491 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
492 * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
493 * Shared/Authentication/mac/AuthenticationManager.mac.mm:
494 (WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge):
495 * Shared/WebProcessCreationParameters.cpp:
496 (WebKit::WebProcessCreationParameters::encode const):
497 (WebKit::WebProcessCreationParameters::decode):
498 * Shared/WebProcessCreationParameters.h:
499 * Shared/mac/WebCoreArgumentCodersMac.mm:
500 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
501 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
504 2017-11-14 Alex Christensen <achristensen@webkit.org>
506 Remove assertions added in r224791
507 https://bugs.webkit.org/show_bug.cgi?id=178751#c10
509 * NetworkProcess/mac/RemoteNetworkingContext.mm:
510 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
511 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
512 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
513 I had added assertions that sandbox extension handle consumption succeeds.
514 In the API test IndexedDB.StructuredCloneBackwardCompatibility we get a sandbox extension handle
515 to give access to a directory that does not exist and consumption fails. We want it to fail,
516 so my optimistic addition of a success assertion was incorrect. The test passes without it
517 and behaves like it used to.
519 2017-11-14 Tim Horton <timothy_horton@apple.com>
521 Don't use -[NSString stringWithFormat:] to build defaults keys
522 https://bugs.webkit.org/show_bug.cgi?id=179680
524 Reviewed by Simon Fraser.
526 * UIProcess/mac/WebPreferencesMac.mm:
528 (WebKit::debugUserDefaultsValue):
529 Use string concatenation instead of stringWithFormat to build
530 preference keys. This wasn't a huge cost, but it shaves a few milliseconds
533 2017-11-14 Alex Christensen <achristensen@webkit.org>
535 Clean up old URL parser remnants
536 https://bugs.webkit.org/show_bug.cgi?id=179573
538 Reviewed by Darin Adler.
540 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
541 (WebKit::WebContextMenuClient::searchWithGoogle):
542 Use https if we do end up searching with google.
544 2017-11-14 Antti Koivisto <antti@apple.com>
546 Enable display:contents by default
547 https://bugs.webkit.org/show_bug.cgi?id=179655
549 Reviewed by Sam Weinig.
551 * Shared/WebPreferences.yaml:
553 Make non-experimental and enabled.
555 2017-11-10 Brent Fulgham <bfulgham@apple.com>
557 Consolidate mach-lookup calls in WebProcess sandbox
558 https://bugs.webkit.org/show_bug.cgi?id=179650
559 <rdar://problem/35367154>
561 Reviewed by Dean Jackson.
563 Consolidate the various calls to 'allow mach-lookup' imported during Bug 179548 into the main
564 function in the sandbox profile. Remove some entries that are not needed by WebKit.
566 Remove the statement to grant global permission to perform mach-lookup for any xpc
567 service name that was copied into this sandbox profile in Bug 179548. We started blocking
568 this in macOS 10.13 and want to continue to do so.
570 The earlier "grant global permission" in 'system.sb' apparently allowed some xpc lookups to occur
571 before we hit the block declaration in the WebContent sandbox. Now that we are consistently blocking
572 mach lookups we need to add whitelist entries for a few more services to avoid creating new
575 * WebProcess/com.apple.WebProcess.sb.in:
577 2017-11-14 Tim Horton <timothy_horton@apple.com>
579 Long pressing a phone number with spaces in it results in a link sheet instead of a data detectors sheet
580 https://bugs.webkit.org/show_bug.cgi?id=179646
581 <rdar://problem/35337288>
583 Reviewed by Simon Fraser.
585 * UIProcess/ios/WKActionSheetAssistant.mm:
586 (-[WKActionSheetAssistant showImageSheet]):
587 (-[WKActionSheetAssistant showLinkSheet]):
588 (-[WKActionSheetAssistant showDataDetectorsSheet]):
589 * UIProcess/ios/WKContentViewInteraction.mm:
590 (-[WKContentView _actionForLongPressFromPositionInformation:]):
591 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
592 Make use of canBePresentedByDataDetectors with our WebCore URL instead
593 of (sometimes unsucessfully) reparsing the URL with NSURL's parser.
594 Also, avoid a few unnecessary round-trips through String when converting
597 2017-11-14 Brent Fulgham <bfulgham@apple.com>
599 REGRESSION(r224799): WebKit crashes on Sierra due to sandbox violation
600 https://bugs.webkit.org/show_bug.cgi?id=179656
602 Unreviewed build fix.
604 * WebProcess/com.apple.WebProcess.sb.in: Switch to Dan's recommended version check.
606 2017-11-13 Joseph Pecoraro <pecoraro@apple.com>
608 Give a ServiceWorker WebContentProcess a different display name
609 https://bugs.webkit.org/show_bug.cgi?id=179653
611 Reviewed by Brady Eidson.
613 * UIProcess/WebProcessProxy.h:
614 * UIProcess/WebProcessProxy.cpp:
615 (WebKit::WebProcessProxy::create):
616 Call connect after construction so virtual methods will use subclass implementations.
618 * UIProcess/ServiceWorkerProcessProxy.h:
619 * UIProcess/ServiceWorkerProcessProxy.cpp:
620 (WebKit::ServiceWorkerProcessProxy::create):
621 Copy the pattern from WebProcessProxy to ensure connect() gets called after construction.
623 (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
624 Set a launch option to signal this is a Service Worker process.
626 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
627 (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
628 * WebProcess/cocoa/WebProcessCocoa.mm:
629 (WebKit::WebProcess::initializeProcessName):
630 Consume the launch option to configuration the process name.
632 2017-11-13 Ryosuke Niwa <rniwa@webkit.org>
634 REGRESSION(r224799): WebKit crashes at launch on macOS Sierra due to a sandbox violation
635 https://bugs.webkit.org/show_bug.cgi?id=179656
637 Unreviewed. Revert r224799 on macOS Sierra.
639 * WebProcess/com.apple.WebProcess.sb.in:
641 2017-11-13 Chris Dumez <cdumez@apple.com>
643 Send ServiceWorkerData structs to the WebProcesses instead of ServiceWorkerIdentifiers
644 https://bugs.webkit.org/show_bug.cgi?id=179649
646 Reviewed by Brady Eidson.
648 * Shared/WebCoreArgumentCoders.h:
649 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
650 (WebKit::WebSWServerConnection::updateRegistrationStateInClient):
651 (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient):
652 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
653 * WebProcess/Storage/WebSWClientConnection.cpp:
654 (WebKit::WebSWClientConnection::postMessageToServiceWorkerClient):
655 * WebProcess/Storage/WebSWClientConnection.h:
656 * WebProcess/Storage/WebSWClientConnection.messages.in:
658 2017-11-13 Brady Eidson <beidson@apple.com>
660 Massive "Server-process-to-context-process" connection overhaul.
661 https://bugs.webkit.org/show_bug.cgi?id=179554
663 Reviewed by Chris Dumez.
665 * DerivedSources.make:
666 * WebKit.xcodeproj/project.pbxproj:
668 * Shared/WebCoreArgumentCoders.h:
670 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
671 (WebKit::WebSWServerConnection::sendToContextProcess):
672 (WebKit::WebSWServerConnection::installServiceWorkerContext): Deleted.
673 (WebKit::WebSWServerConnection::fireInstallEvent): Deleted.
674 (WebKit::WebSWServerConnection::fireActivateEvent): Deleted.
675 (WebKit::WebSWServerConnection::setContextConnection): Deleted.
676 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
678 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp: Copied from Source/WebCore/workers/service/server/SWServerWorker.cpp.
679 (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
680 (WebKit::WebSWServerToContextConnection::messageSenderConnection):
681 (WebKit::WebSWServerToContextConnection::messageSenderDestinationID):
682 (WebKit::WebSWServerToContextConnection::connectionClosed):
683 (WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
684 (WebKit::WebSWServerToContextConnection::fireInstallEvent):
685 (WebKit::WebSWServerToContextConnection::fireActivateEvent):
686 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h: Copied from Source/WebCore/workers/service/ServiceWorkerTypes.h.
687 (WebKit::WebSWServerToContextConnection::create):
688 (WebKit::WebSWServerToContextConnection::ipcConnection const):
689 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in: Copied from Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in.
691 * StorageProcess/StorageProcess.cpp:
692 (WebKit::StorageProcess::didClose):
693 (WebKit::StorageProcess::didReceiveMessage):
694 (WebKit::StorageProcess::globalServerToContextConnection):
695 (WebKit::StorageProcess::createServerToContextConnection):
696 (WebKit::StorageProcess::didGetWorkerContextProcessConnection):
697 (WebKit::StorageProcess::workerContextProcessConnection): Deleted.
698 (WebKit::StorageProcess::createWorkerContextProcessConnection): Deleted.
699 (WebKit::StorageProcess::serviceWorkerContextFailedToStart): Deleted.
700 (WebKit::StorageProcess::serviceWorkerContextStarted): Deleted.
701 (WebKit::StorageProcess::didFinishServiceWorkerInstall): Deleted.
702 (WebKit::StorageProcess::didFinishServiceWorkerActivation): Deleted.
703 (WebKit::StorageProcess::setServiceWorkerHasPendingEvents): Deleted.
704 * StorageProcess/StorageProcess.h:
705 * StorageProcess/StorageProcess.messages.in:
707 * StorageProcess/StorageToWebProcessConnection.cpp:
708 (WebKit::StorageToWebProcessConnection::didReceiveMessage):
709 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
710 (WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated):
712 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
713 (WebKit::WebSWContextManagerConnection::installServiceWorker):
714 (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
715 (WebKit::WebSWContextManagerConnection::fireInstallEvent):
716 (WebKit::WebSWContextManagerConnection::fireActivateEvent):
717 (WebKit::WebSWContextManagerConnection::didFinishInstall):
718 (WebKit::WebSWContextManagerConnection::didFinishActivation):
719 (WebKit::WebSWContextManagerConnection::setServiceWorkerHasPendingEvents):
720 * WebProcess/Storage/WebSWContextManagerConnection.h:
721 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
723 2017-11-13 Brent Fulgham <bfulgham@apple.com>
725 WebContent sandbox should not include 'system.sb'
726 https://bugs.webkit.org/show_bug.cgi?id=179548
727 <rdar://problem/35367154>
729 Reviewed by Darin Adler.
731 Stop including 'system.sb', and just include the portions of that sandbox that we
732 actually use in WebContent Process. This is the first step in some further sandbox
735 * WebProcess/com.apple.WebProcess.sb.in:
737 2017-11-13 Simon Fraser <simon.fraser@apple.com>
739 When navigating back to a page, compositing layers may not use accelerated drawing
740 https://bugs.webkit.org/show_bug.cgi?id=178749
741 rdar://problem/35158946
743 Reviewed by Dean Jackson.
745 Avoid assertions when a test enables accelerated drawing (which we can't support
746 in the iOS simulator).
748 * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
749 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
751 2017-11-13 Youenn Fablet <youenn@apple.com>
753 matchRegistration does not need to go to StorageProcess if no service worker is registered
754 https://bugs.webkit.org/show_bug.cgi?id=179480
756 Reviewed by Chris Dumez.
758 Removed origin store handling from StorageProcess since it is now handled within SWServer.
759 Updated clearing of web site data accordingly.
760 Optimized matchRegistration by looking at the origin store before doing any IPC.
761 Do IPC to the StorageProcess if the origin store is not yet initialized on the WebProcess.
763 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
764 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
765 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
766 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
767 * StorageProcess/StorageProcess.cpp:
768 (WebKit::StorageProcess::deleteWebsiteData):
769 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
770 (WebKit::StorageProcess::swServerForSession):
771 (WebKit::StorageProcess::swOriginStoreForSession):
772 (WebKit::StorageProcess::registerSWServerConnection):
773 (WebKit::StorageProcess::unregisterSWServerConnection):
774 (WebKit::StorageProcess::ensureSWOriginStoreForSession): Deleted.
775 (WebKit::StorageProcess::swOriginStoreForSession const): Deleted.
776 * StorageProcess/StorageProcess.h:
777 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
778 (WebKit::WebSWOriginStore::addToStore):
779 (WebKit::WebSWOriginStore::removeFromStore):
780 (WebKit::WebSWOriginStore::clearStore):
781 (WebKit::WebSWOriginStore::add): Deleted.
782 (WebKit::WebSWOriginStore::remove): Deleted.
783 (WebKit::WebSWOriginStore::clear): Deleted.
784 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
785 * WebProcess/Storage/WebSWClientConnection.cpp:
786 (WebKit::WebSWClientConnection::matchRegistration):
788 2017-11-13 Alex Christensen <achristensen@webkit.org>
790 Merge NetworkProcess::EnsurePrivateBrowsingSession and NetworkProcess::AddWebsiteDataStore into one message type
791 https://bugs.webkit.org/show_bug.cgi?id=178751
793 Reviewed by Brady Eidson.
795 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
796 (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
797 * NetworkProcess/NetworkProcess.cpp:
798 (WebKit::NetworkProcess::initializeNetworkProcess):
799 (WebKit::NetworkProcess::ensurePrivateBrowsingSession): Deleted.
800 * NetworkProcess/NetworkProcess.h:
801 * NetworkProcess/NetworkProcess.messages.in:
802 * NetworkProcess/RemoteNetworkingContext.h:
803 * NetworkProcess/mac/RemoteNetworkingContext.mm:
804 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
805 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Deleted.
806 * Shared/WebsiteDataStoreParameters.cpp:
807 (WebKit::WebsiteDataStoreParameters::legacyPrivateSessionParameters):
808 * Shared/WebsiteDataStoreParameters.h:
809 * UIProcess/WebProcessPool.cpp:
810 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
811 (WebKit::WebProcessPool::createNewWebProcess):
812 (WebKit::WebProcessPool::pageAddedToProcess):
813 * WebProcess/InjectedBundle/InjectedBundle.cpp:
814 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
815 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
816 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
817 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
818 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Deleted.
819 * WebProcess/WebPage/WebPage.cpp:
820 (WebKit::WebPage::setSessionID):
821 * WebProcess/WebProcess.cpp:
822 (WebKit::WebProcess::ensurePrivateBrowsingSession): Deleted.
823 * WebProcess/WebProcess.h:
824 * WebProcess/WebProcess.messages.in:
826 2017-11-13 Alex Christensen <achristensen@webkit.org>
828 Add logs to debug content extension test failures
829 https://bugs.webkit.org/show_bug.cgi?id=179624
831 Reviewed by Chris Dumez.
833 * UIProcess/API/APIContentRuleListStore.cpp:
834 (API::compiledToFile):
835 Right now I'm seeing this log:
836 "Rule list compilation failed: Unspecified error during compile."
837 I need more information to debug what is failing on the bots.
839 2017-11-07 Brian Burg <bburg@apple.com>
841 Web Automation: inViewCenterPoint should not include topContentInset when computed in viewport coordinates
842 https://bugs.webkit.org/show_bug.cgi?id=179129
843 <rdar://problem/35297038>
845 Reviewed by Simon Fraser.
847 When computing the in view center point per W3C specification, the top content inset
848 is inadvertently added back in when converting to the root view coordinate system.
850 This patch reworks the protocol command so that it explicitly requests a coordinate
851 system, with options for "Page" (root / contents), "LayoutViewport", and "VisualViewport".
852 The latter is not implemented in this patch, since it is intended for use on iOS someday.
854 * UIProcess/Automation/Automation.json:
855 Change usesViewport to CoordinateSystem.
856 Add a new coordinate system enum type and use it.
857 Fix relevant comments for Automation.computElementLayout.
859 * UIProcess/Automation/WebAutomationSession.h:
860 * UIProcess/Automation/WebAutomationSession.cpp:
861 (WebKit::protocolStringToCoordinateSystem):
862 (WebKit::WebAutomationSession::computeElementLayout):
863 Parse the requested coordinate system and send it in the message to the web process.
865 * WebKit.xcodeproj/project.pbxproj:
866 * WebProcess/Automation/WebAutomationSessionProxy.messages.in:
867 * WebProcess/Automation/WebAutomationSessionProxy.h:
868 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
869 (WebKit::WebAutomationSessionProxy::computeElementLayout):
870 Rework the implementation. Get the element bounds and in-view center point in
871 client coordinates and convert back to root view coordinates for CoordinateSystem::Page.
873 2017-11-08 Keith Miller <keith_miller@apple.com>
875 Async iteration should only fetch the next method once and add feature flag
876 https://bugs.webkit.org/show_bug.cgi?id=179451
878 Reviewed by Geoffrey Garen.
880 Add feature flag for Async iteration.
882 * Configurations/FeatureDefines.xcconfig:
884 2017-11-13 Mark Lam <mark.lam@apple.com>
886 Add more overflow check book-keeping for MarkedArgumentBuffer.
887 https://bugs.webkit.org/show_bug.cgi?id=179634
888 <rdar://problem/35492517>
890 Reviewed by Saam Barati.
892 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
893 (WebKit::NPJSObject::construct):
894 (WebKit::NPJSObject::invoke):
896 2017-11-13 Timothy Horton <timothy_horton@apple.com>
898 Address some post-landing review comments from r224728
899 https://bugs.webkit.org/show_bug.cgi?id=179576
901 * Platform/IPC/mac/MachMessage.h:
902 (IPC::MachMessage::setMessageReceiverName):
903 (IPC::MachMessage::setMessageName):
906 2017-11-13 Tim Horton <timothy_horton@apple.com>
908 Occasional MobileSafari crash under -[WKPDFView web_setMinimumSize:]
909 https://bugs.webkit.org/show_bug.cgi?id=179628
910 <rdar://problem/34773037>
912 Reviewed by Simon Fraser.
914 * UIProcess/ios/WKPDFView.mm:
915 (-[WKPDFView _computePageAndDocumentFrames]):
916 Similar to r223444, avoid propagating null CGRects into the view hierarchy.
917 In this case, the null rect comes from applying margins to a rect that is
918 smaller than the margins. We could check for that specifically, but a
919 more-general check for a null rect seems reasonable.
921 2017-11-13 Tim Horton <timothy_horton@apple.com>
923 Use the real mach type instead of reinterpret_casting in MachMessage
924 https://bugs.webkit.org/show_bug.cgi?id=179629
926 Reviewed by Dan Bernstein.
928 * Platform/IPC/mac/MachMessage.cpp:
929 (IPC::MachMessage::header):
930 * Platform/IPC/mac/MachMessage.h:
931 Just use mach_msg_header_t proper, and avoid the reinterpret_cast.
932 This also corrects the alignment of the struct on platforms where
933 alignof(mach_msg_header_t) != alignof(uint8_t).
935 2017-11-13 Gabriel Ivascu <givascu@igalia.com>
937 [GTK] Automatically adjust font size when gtk-xft-dpi changes
938 https://bugs.webkit.org/show_bug.cgi?id=142673
940 Reviewed by Michael Catanzaro.
942 * UIProcess/API/glib/WebKitSettings.cpp:
943 (webKitSettingsDispose):
944 (webKitSettingsConstructed):
945 (webkit_settings_class_init):
947 2017-11-13 Chris Dumez <cdumez@apple.com>
949 Implement "Service Worker Has No Pending Events" / "Update Service Worker Extended Events Set" algorithms
950 https://bugs.webkit.org/show_bug.cgi?id=179618
952 Reviewed by Brady Eidson.
954 * StorageProcess/StorageProcess.cpp:
955 (WebKit::StorageProcess::setServiceWorkerHasPendingEvents):
956 * StorageProcess/StorageProcess.h:
957 * StorageProcess/StorageProcess.messages.in:
958 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
959 (WebKit::WebSWContextManagerConnection::setServiceWorkerHasPendingEvents):
960 * WebProcess/Storage/WebSWContextManagerConnection.h:
962 2017-11-13 Wenson Hsieh <wenson_hsieh@apple.com>
964 [Attachment Support] Implement SPI for clients to request data for a given attachment
965 https://bugs.webkit.org/show_bug.cgi?id=179586
966 <rdar://problem/35355720>
968 Reviewed by Darin Adler.
970 Adds support in WebKit for fetching data for a given attachment element. See WebCore/ChangeLog for more details.
971 Most of the changes here are boilerplate plumbing of -requestAttachmentData through the client layers.
973 Test coverage by augmenting existing API tests in WKAttachmentTests, and adding 3 new tests.
975 * UIProcess/API/APIAttachment.cpp:
976 (API::Attachment::requestData):
977 * UIProcess/API/APIAttachment.h:
978 * UIProcess/API/Cocoa/_WKAttachment.h:
979 * UIProcess/API/Cocoa/_WKAttachment.mm:
980 (-[_WKAttachment requestData:]):
981 * UIProcess/WebPageProxy.cpp:
982 (WebKit::WebPageProxy::sharedBufferCallback):
984 Add a new IPC callback helper type, SharedBufferCallback. This is similar to the existing DataCallback, but
985 instead of deserializing to an API::Data, we convert to a SharedBuffer instead. Additionally,
986 SharedBufferCallback is able to draw a distinction between null data and empty data. This allows -requestData:
987 to distinguish between cases where (for instance) the data for a given attachment is an empty blob, and when
988 the attachment doesn't exist at all.
990 (WebKit::WebPageProxy::dataCallback):
991 (WebKit::WebPageProxy::insertAttachment):
992 (WebKit::WebPage::invokeSharedBufferCallback):
993 (WebKit::WebPageProxy::requestAttachmentData):
994 * UIProcess/WebPageProxy.h:
995 * UIProcess/WebPageProxy.messages.in:
996 * WebProcess/WebPage/WebPage.cpp:
997 (WebKit::WebPage::requestAttachmentData):
998 * WebProcess/WebPage/WebPage.h:
999 * WebProcess/WebPage/WebPage.messages.in:
1001 2017-11-12 Darin Adler <darin@apple.com>
1003 More is<> and downcast<>, less static_cast<>
1004 https://bugs.webkit.org/show_bug.cgi?id=179600
1006 Reviewed by Chris Dumez.
1008 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp:
1009 (WebKit::wrap): Use is/downcast.
1010 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1011 (WebKit::WebEditorClient::handleKeyboardEvent): Ditto.
1012 * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
1013 (WebKit::WebEditorClient::handleKeyboardEvent): Ditto.
1014 * WebProcess/WebPage/WebPage.cpp:
1015 (WebKit::WebPage::handleEditingKeyboardEvent): Ditto.
1016 * WebProcess/WebPage/mac/WebPageMac.mm:
1017 (WebKit::frameForEvent): Ditto.
1019 2017-11-12 Gabriel Ivascu <givascu@igalia.com>
1021 [GTK] Add functionality to handle font sizes in points
1022 https://bugs.webkit.org/show_bug.cgi?id=179285
1024 Reviewed by Carlos Garcia Campos and Michael Catanzaro.
1026 * UIProcess/API/glib/WebKitSettings.cpp:
1027 (webkit_settings_class_init):
1028 (webkit_settings_font_size_to_points):
1029 (webkit_settings_font_size_to_pixels):
1030 * UIProcess/API/gtk/WebKitSettings.h:
1031 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1033 2017-11-11 Tim Horton <timothy_horton@apple.com>
1035 Increase the alignment requirement of WKObject's wrapped C++ object
1036 https://bugs.webkit.org/show_bug.cgi?id=179518
1038 Reviewed by Dan Bernstein.
1040 * Shared/API/APIObject.h:
1041 * Shared/Cocoa/APIObject.mm:
1042 (API::allocateWKObject):
1043 (API::Object::fromWKObjectExtraSpace):
1044 (API::Object::newObject):
1045 * Shared/Cocoa/WKObject.mm:
1046 (-[WKObject dealloc]):
1047 (-[WKObject _apiObject]):
1048 * UIProcess/API/Cocoa/WKConnection.mm:
1049 (-[WKConnection dealloc]):
1050 (-[WKConnection _apiObject]):
1051 (-[WKConnection _connection]):
1052 Increase the alignment of the C++ object stored inside WKObject's extra space
1053 to 8-bytes, for platforms where some types require greater-than-pointer alignment.
1054 To achieve this, increase the size of the extra-space allocation by the difference
1055 between 8 bytes and pointer-alignment, and then align within that.
1057 2017-11-11 Tim Horton <timothy_horton@apple.com>
1059 Avoid composing the message + recipient name for crash logs until a failure actually occurs
1060 https://bugs.webkit.org/show_bug.cgi?id=179576
1062 Reviewed by Dan Bernstein.
1064 * Platform/IPC/mac/ConnectionMac.mm:
1065 (IPC::Connection::sendMessage):
1066 (IPC::Connection::sendOutgoingMessage):
1067 * Platform/IPC/mac/MachMessage.h:
1068 (IPC::MachMessage::messageReceiverName const):
1069 (IPC::MachMessage::setMessageReceiverName):
1070 (IPC::MachMessage::messageName const):
1071 (IPC::MachMessage::setMessageName):
1072 Store the message name and receiver name separately on MachMessage,
1073 only composing them into a string if the message is unhandled. This
1074 makes the time spent composing the string in sendOutgoingMessage
1075 completely disappear. In absolute terms, it wasn't huge, but if you
1076 do enough IPC it starts to add up.
1078 2017-11-10 Chris Dumez <cdumez@apple.com>
1080 [Service Workers] Implement "Try Activate" / "Activate" algorithms
1081 https://bugs.webkit.org/show_bug.cgi?id=179436
1083 Reviewed by Brady Eidson.
1085 Implement proper "Try Activate" / "Activate" algorithms as per:
1086 - https://w3c.github.io/ServiceWorker/#try-activate-algorithm
1087 - https://w3c.github.io/ServiceWorker/#activation-algorithm
1089 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1090 (WebKit::WebSWServerConnection::fireActivateEvent):
1091 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1092 * StorageProcess/StorageProcess.cpp:
1093 (WebKit::StorageProcess::didFinishServiceWorkerActivation):
1094 * StorageProcess/StorageProcess.h:
1095 * StorageProcess/StorageProcess.messages.in:
1096 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1097 (WebKit::WebSWContextManagerConnection::fireActivateEvent):
1098 (WebKit::WebSWContextManagerConnection::didFinishActivation):
1099 * WebProcess/Storage/WebSWContextManagerConnection.h:
1100 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1102 2017-11-10 John Wilander <wilander@apple.com>
1104 Ignore HSTS for partitioned, cross-origin subresource requests
1105 https://bugs.webkit.org/show_bug.cgi?id=178993
1106 <rdar://problem/34962462>
1108 Reviewed by Brent Fulgham.
1110 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1112 Convenience function to downgrade a request if
1113 CFNetwork as already upgraded it during
1114 canonicalization. This allows the rest of
1115 WebKit's processing to function, such as UIR
1116 and mixed content blocking.
1117 (updateIgnoreStrictTransportSecuritySettingIfNecessary):
1118 Adds and removed the ignore request accordingly.
1119 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1120 Now asks CFNetwork to ignore HSTS on resource loads we
1121 partition cookies for.
1122 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1123 Now asks CFNetwork to ignore HSTS on resource loads we
1124 partition cookies for.
1126 2017-11-10 Alex Christensen <achristensen@webkit.org>
1128 _WKThumbnailView initialization with WKWebView needs to call correct initWithFrame
1129 https://bugs.webkit.org/show_bug.cgi?id=179537
1130 <rdar://problem/35275219>
1132 Reviewed by Darin Adler.
1134 I introduced this in r223439 and made an ObjC mistake. This is what I get for adding SPI with no tests.
1135 I fixed this by making the existing WKView/_WKThumbnailView API tests work with WKWebView.
1137 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
1138 (-[_WKThumbnailView initWithFrame:fromWKWebView:]):
1140 2017-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
1142 [GTK][WPE] Switch to use API::NavigationClient
1143 https://bugs.webkit.org/show_bug.cgi?id=178720
1145 Reviewed by Alex Christensen.
1147 Replace WebKitLoaderClient and WebKitPolicyClient with WebKitNavigationClient that implements
1148 API::NavigationClient.
1150 * PlatformGTK.cmake:
1151 * PlatformWPE.cmake:
1152 * UIProcess/API/APINavigationAction.h: Add new constructor that receives a target frame name instead of a target
1154 * UIProcess/API/APINavigationClient.h:
1155 (API::NavigationClient::didDisplayInsecureContent): Added.
1156 (API::NavigationClient::didRunInsecureContent): Added.
1157 (API::NavigationClient::decidePolicyForNavigationResponse): Change NavigationResponse parameter to be a
1158 Ref<NavigationResponse>&& instead of a NavigationResponse&.
1159 * UIProcess/API/C/WKPage.cpp:
1160 (WKPageSetPageNavigationClient): Update NavigationResponse parameter.
1161 * UIProcess/API/glib/WebKitBackForwardList.cpp:
1162 (webkitBackForwardListChanged):
1163 * UIProcess/API/glib/WebKitBackForwardListPrivate.h:
1164 * UIProcess/API/glib/WebKitNavigationAction.cpp:
1165 (webkitNavigationActionCreate): Wrap the given API::NavigationAction.
1166 (webkit_navigation_action_get_navigation_type): Use the wrapped API::NavigationAction.
1167 (webkit_navigation_action_get_mouse_button): Ditto.
1168 (webkit_navigation_action_get_modifiers): Ditto.
1169 (webkit_navigation_action_get_request): Ditto.
1170 (webkit_navigation_action_is_user_gesture): Ditto.
1171 (webkit_navigation_action_is_redirect): Ditto.
1172 * UIProcess/API/glib/WebKitNavigationActionPrivate.h:
1173 (_WebKitNavigationAction::_WebKitNavigationAction):
1174 * UIProcess/API/glib/WebKitNavigationClient.cpp: Renamed from Source/WebKit/UIProcess/API/glib/WebKitLoaderClient.cpp.
1175 (NavigationClient::NavigationClient):
1176 (attachNavigationClientToView):
1177 * UIProcess/API/glib/WebKitNavigationClient.h: Renamed from Source/WebKit/UIProcess/API/glib/WebKitLoaderClient.h.
1178 * UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp:
1179 (webkit_navigation_policy_decision_get_frame_name): Add FIXME.
1180 (webkitNavigationPolicyDecisionCreate): Get the target frame name from the API::NavigationAction.
1181 * UIProcess/API/glib/WebKitNavigationPolicyDecisionPrivate.h:
1182 * UIProcess/API/glib/WebKitPolicyClient.cpp: Removed.
1183 * UIProcess/API/glib/WebKitPolicyClient.h: Removed.
1184 * UIProcess/API/glib/WebKitPolicyDecision.cpp:
1185 (webkitPolicyDecisionSetListener): Remove the madePolicyDecision boolean member, we can null-check the listener instead.
1186 (webkit_policy_decision_use): Ensure listener is nullptr after being invoked to prevent the decision from being made
1188 (webkit_policy_decision_ignore): Ditto.
1189 (webkit_policy_decision_download): Ditto.
1190 * UIProcess/API/glib/WebKitPolicyDecisionPrivate.h:
1191 * UIProcess/API/glib/WebKitResponsePolicyDecision.cpp:
1192 (webkit_response_policy_decision_get_request): Use the wrapped API::NavigationResponse.
1193 (webkit_response_policy_decision_get_response): Ditto.
1194 (webkit_response_policy_decision_is_mime_type_supported): Ditto.
1195 (webkitResponsePolicyDecisionCreate): Wrap the given API::NavigationResponse.
1196 * UIProcess/API/glib/WebKitResponsePolicyDecisionPrivate.h:
1197 * UIProcess/API/glib/WebKitUIClient.cpp:
1198 (UIClient::createNewPage): Create the WebKitNavigationAction from a new API::NavigationAction.
1199 * UIProcess/API/glib/WebKitWebView.cpp:
1200 (webkitWebViewConstructed): Attach navigation client.
1201 * UIProcess/Cocoa/NavigationState.h: Update API::NavigationResponse parameter of decidePolicyForNavigationResponse.
1202 * UIProcess/Cocoa/NavigationState.mm:
1203 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
1204 * UIProcess/WebPageProxy.cpp:
1205 (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): Notify the navigation client if it's used.
1206 (WebKit::WebPageProxy::didRunInsecureContentForFrame): Ditto.
1207 (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Use the new API::NavigationAction constructor to pass
1208 the target frame name, instead of a null target frame info.
1209 (WebKit::WebPageProxy::decidePolicyForResponse): Move the API::NavigationResponse.
1211 2017-11-09 Chris Dumez <cdumez@apple.com>
1213 Unreviewed, rolling out r224661.
1215 Broke build on several internal Mac/iOS bots
1219 "Ignore HSTS for partitioned, cross-origin subresource
1221 https://bugs.webkit.org/show_bug.cgi?id=178993
1222 https://trac.webkit.org/changeset/224661
1224 2017-11-09 Chris Dumez <cdumez@apple.com>
1226 ServiceWorkerRegistration objects may get recycled for different SWServerRegistration objects
1227 https://bugs.webkit.org/show_bug.cgi?id=179517
1229 Reviewed by Brady Eidson.
1231 * Scripts/webkit/messages.py:
1232 (forward_declarations_and_headers):
1233 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1234 (WebKit::WebSWServerConnection::updateRegistrationStateInClient):
1235 (WebKit::WebSWServerConnection::fireUpdateFoundEvent):
1236 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1237 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1238 * WebProcess/Storage/WebSWClientConnection.cpp:
1239 (WebKit::WebSWClientConnection::addServiceWorkerRegistrationInServer):
1240 (WebKit::WebSWClientConnection::removeServiceWorkerRegistrationInServer):
1241 * WebProcess/Storage/WebSWClientConnection.h:
1242 * WebProcess/Storage/WebSWClientConnection.messages.in:
1244 2017-11-09 John Wilander <wilander@apple.com>
1246 Ignore HSTS for partitioned, cross-origin subresource requests
1247 https://bugs.webkit.org/show_bug.cgi?id=178993
1248 <rdar://problem/34962462>
1250 Reviewed by Brent Fulgham.
1252 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1254 Convenience function to downgrade a request if
1255 CFNetwork as already upgraded it during
1256 canonicalization. This allows the rest of
1257 WebKit's processing to function, such as UIR
1258 and mixed content blocking.
1259 (updateIgnoreStrictTransportSecuritySettingIfNecessary):
1260 Adds and removed the ignore request accordingly.
1261 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1262 Now asks CFNetwork to ignore HSTS on resource loads we
1263 partition cookies for.
1264 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1265 Now asks CFNetwork to ignore HSTS on resource loads we
1266 partition cookies for.
1268 2017-11-09 Chris Dumez <cdumez@apple.com>
1270 Implement real post 'install' event steps of the Install algorithm (steps 14+)
1271 https://bugs.webkit.org/show_bug.cgi?id=179401
1273 Reviewed by Brady Eidson.
1275 Implement step 14+ of Install algorithm, as per:
1276 - https://w3c.github.io/ServiceWorker/#installation-algorithm
1278 * Scripts/webkit/messages.py:
1280 * Shared/WebCoreArgumentCoders.h:
1281 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1282 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
1283 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1284 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1285 * WebProcess/Storage/WebSWClientConnection.cpp:
1286 (WebKit::WebSWClientConnection::didResolveRegistrationPromise):
1287 * WebProcess/Storage/WebSWClientConnection.h:
1288 * WebProcess/Storage/WebSWClientConnection.messages.in:
1290 2017-11-09 Megan Gardner <megan_gardner@apple.com>
1292 Clean out unused selection items from UIKitSPI
1293 https://bugs.webkit.org/show_bug.cgi?id=179459
1295 Reviewed by Tim Horton.
1297 Many of these should have been removed from previous commits, but they were missed.
1298 None of these enums or methods are being used by WebKit anymore, and removing them will keep things
1299 clean and allow UIKit to remove things that are not used at all by anyone anymore.
1301 * Platform/spi/ios/UIKitSPI.h:
1303 2017-11-09 Christopher Reid <chris.reid@sony.com>
1305 Use enum classes within FileSystem
1306 https://bugs.webkit.org/show_bug.cgi?id=175172
1308 Reviewed by Darin Adler.
1310 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1311 * NetworkProcess/NetworkDataTaskBlob.cpp:
1312 * NetworkProcess/cache/NetworkCache.cpp:
1313 * NetworkProcess/capture/NetworkCaptureManager.cpp:
1314 * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
1315 * Shared/WebMemorySampler.cpp:
1316 * UIProcess/API/APIContentRuleListStore.cpp:
1317 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
1319 2017-11-09 Youenn Fablet <youenn@apple.com>
1321 ServiceWorkerClientFetch should create not null ResourceError
1322 https://bugs.webkit.org/show_bug.cgi?id=179485
1324 Reviewed by Darin Adler.
1326 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
1327 (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
1329 2017-11-09 Andy Estes <aestes@apple.com>
1331 [iOS] Adopt UIPreviewDataAttachmentListIsContentManaged
1332 https://bugs.webkit.org/show_bug.cgi?id=179458
1333 <rdar://problem/35034691>
1335 Reviewed by Dan Bernstein.
1337 * Platform/spi/ios/UIKitSPI.h:
1338 * UIProcess/ios/WKContentViewInteraction.mm:
1339 (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
1341 2017-11-08 Joseph Pecoraro <pecoraro@apple.com>
1343 Include a more complete block signature in public headers to avoid potential -Wstrict-prototypes warnings
1344 https://bugs.webkit.org/show_bug.cgi?id=179466
1346 Reviewed by Dan Bernstein.
1348 * UIProcess/API/Cocoa/WKHTTPCookieStore.h:
1349 * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
1350 (-[WKHTTPCookieStore setCookie:completionHandler:]):
1351 (-[WKHTTPCookieStore deleteCookie:completionHandler:]):
1353 2017-11-08 Jeremy Jones <jeremyj@apple.com>
1355 Make WKFullScreenWidnowController more robust against modification by the embedding app.
1356 https://bugs.webkit.org/show_bug.cgi?id=179413
1357 rdar://problem/35408061
1359 Reviewed by Darin Adler.
1361 Present fullscreen UViewController in a separate UIWindow to prevent interaction with the embedding app's
1362 UIViewController hierarchy.
1364 Immediately tear down the fullscreen interface if the embedding app removes the WKWebView from the fullscreen window.
1365 This prevents the fullscreen interface from getting into an invalid state.
1367 Preserve scrollView.zoomScale because it is not effectively preserved by the more indirect _viewScale.
1369 Use a custom root view controller to allow hiding of the status bar.
1371 Remove the no-longer-necessary dispatch_after calls during enter and exit fullscreen.
1373 * UIProcess/API/Cocoa/WKWebView.mm:
1374 (-[WKWebView removeFromSuperview]):
1375 * UIProcess/ios/WKFullScreenWindowControllerIOS.h:
1376 * UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
1377 (WebKit::WKWebViewState::applyTo):
1378 (WebKit::WKWebViewState::store):
1379 (-[_WKFullScreenViewController loadView]):
1380 (-[_WKFullscreenRootViewController prefersStatusBarHidden]):
1381 (-[WKFullScreenWindowController enterFullScreen]):
1382 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
1383 (-[WKFullScreenWindowController completedExitFullScreen]):
1384 (-[WKFullScreenWindowController exitFullscreenImmediately]):
1385 (-[WKFullScreenWindowController close]):
1386 (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
1387 (-[_WKFullScreenViewController viewDidDisappear:]): Deleted.
1389 2017-11-08 Jeremy Jones <jeremyj@apple.com>
1391 HTMLMediaElement should not use element fullscreen on iOS
1392 https://bugs.webkit.org/show_bug.cgi?id=179418
1393 rdar://problem/35409277
1395 Reviewed by Eric Carlson.
1397 Add ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN to determine if HTMLMediaElement should use element full screen or not.
1399 * Configurations/FeatureDefines.xcconfig:
1401 2017-11-08 Wenson Hsieh <wenson_hsieh@apple.com>
1403 [Attachment Support] Implement delegate hooks for attachment element insertion and removal
1404 https://bugs.webkit.org/show_bug.cgi?id=179016
1405 <rdar://problem/35250890>
1407 Reviewed by Tim Horton.
1409 See WebCore/ChangeLog for more details.
1411 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1412 * UIProcess/API/Cocoa/WKWebView.mm:
1413 (-[WKWebView _didInsertAttachment:]):
1414 (-[WKWebView _didRemoveAttachment:]):
1415 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1416 * UIProcess/Cocoa/PageClientImplCocoa.h:
1417 * UIProcess/Cocoa/PageClientImplCocoa.mm:
1418 (WebKit::PageClientImplCocoa::didInsertAttachment):
1419 (WebKit::PageClientImplCocoa::didRemoveAttachment):
1420 * UIProcess/PageClient.h:
1421 (WebKit::PageClient::didInsertAttachment):
1422 (WebKit::PageClient::didRemoveAttachment):
1423 * UIProcess/WebPageProxy.cpp:
1424 (WebKit::WebPageProxy::didInsertAttachment):
1425 (WebKit::WebPageProxy::didRemoveAttachment):
1426 * UIProcess/WebPageProxy.h:
1427 * UIProcess/WebPageProxy.messages.in:
1428 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1429 (WebKit::WebEditorClient::didInsertAttachment):
1430 (WebKit::WebEditorClient::didRemoveAttachment):
1431 * WebProcess/WebCoreSupport/WebEditorClient.h:
1433 2017-11-08 Carlos Garcia Campos <cgarcia@igalia.com>
1435 REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right after open-window
1436 https://bugs.webkit.org/show_bug.cgi?id=179365
1438 Reviewed by Michael Catanzaro.
1440 In the GTK+ API, open-window already implies presenting the window to bring it to the front, so it's not
1441 expected that bring-to-front is emitted on open. This is happening since r223773 that moved common code from
1442 platform specific inspector files to the main file, but in the case of open the mac implementation was not
1443 exactly the same as the GTK+ one. This broke /webkit2/WebKitWebInspector/default and
1444 /webkit2/WebKitWebInspector/manual-attach-detach.
1446 * UIProcess/WebInspectorProxy.cpp:
1447 (WebKit::WebInspectorProxy::open): Set m_isOpening for the scope of the function.
1448 * UIProcess/WebInspectorProxy.h: Add m_isOpening.
1449 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1450 (WebKit::WebInspectorProxy::platformBringToFront): Return early if m_isOpening is true.
1452 2017-11-07 Carlos Garcia Campos <cgarcia@igalia.com>
1454 REGRESSION(r224179): [GTK] Several WebViewEditor tests are failing since r224179
1455 https://bugs.webkit.org/show_bug.cgi?id=179366
1457 Reviewed by Michael Catanzaro.
1459 In r224179, webkit_web_view_can_execute_editing_command() was optimized to use the sync path for commands
1460 supported by the WebViewEditorState, but the state requires a redraw to be up to date. We can't know if
1461 WebViewEditorState is in sync, when webkit_web_view_can_execute_editing_command() is called, so we always need
1462 to ask the web process.
1464 * UIProcess/API/glib/WebKitWebView.cpp:
1465 (webkit_web_view_can_execute_editing_command):
1467 2017-11-07 Carlos Garcia Campos <cgarcia@igalia.com>
1469 [GTK][WPE] Build inspector resources using copy-user-interface-resources.pl script
1470 https://bugs.webkit.org/show_bug.cgi?id=179317
1472 Reviewed by Michael Catanzaro.
1474 This is the script used by Apple and it has several advantages:
1476 - It allows to combine and minify most of the js and css files, which improves performance and binary size.
1477 - It removes the debug resources and assertions in production builds.
1478 - It allows to remove the test resources in production builds.
1480 The patch also moves the common cmake code to generate the resources to a new file InspectorGResources.cmake included
1481 by GTK+ and WPE platform cmake files.
1483 * InspectorGResources.cmake: Added.
1484 * PlatformGTK.cmake:
1485 * PlatformWPE.cmake:
1487 2017-11-07 Jeremy Jones <jeremyj@apple.com>
1489 Add downcast support for FullscreenClient.
1490 https://bugs.webkit.org/show_bug.cgi?id=178824
1492 Reviewed by Simon Fraser.
1494 Add SPECIALIZE_TYPE_TRAITS macros for API::FullscreenClient and WebKit::Fullscreen client so
1495 downcasts can be done safely.
1497 * UIProcess/API/APIFullscreenClient.h:
1498 (API::FullscreenClient::isType const):
1499 * UIProcess/API/C/mac/WKPagePrivateMac.mm:
1500 (WKPageSetFullscreenDelegate):
1501 (WKPageGetFullscreenDelegate):
1502 * UIProcess/API/Cocoa/WKWebView.mm:
1503 (-[WKWebView _setFullscreenDelegate:]):
1504 (-[WKWebView _fullscreenDelegate]):
1505 * UIProcess/Cocoa/FullscreenClient.h:
1507 * UIProcess/Cocoa/FullscreenClient.mm:
1509 2017-11-07 Brady Eidson <beidson@apple.com>
1511 Implement "UpdateWorkerState" and use it
1512 https://bugs.webkit.org/show_bug.cgi?id=179318
1514 Reviewed by Chris Dumez.
1516 * Scripts/webkit/messages.py:
1518 * Shared/WebCoreArgumentCoders.h:
1520 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1521 (WebKit::WebSWServerConnection::updateWorkerStateInClient):
1522 (WebKit::WebSWServerConnection::installServiceWorkerContext):
1523 (WebKit::WebSWServerConnection::setContextConnection):
1524 (WebKit::WebSWServerConnection::updateServiceWorkerContext): Deleted.
1525 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1527 * WebProcess/Storage/WebSWClientConnection.messages.in:
1529 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1530 (WebKit::WebSWContextManagerConnection::installServiceWorker):
1531 (WebKit::WebSWContextManagerConnection::updateServiceWorker): Deleted.
1532 * WebProcess/Storage/WebSWContextManagerConnection.h:
1533 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1535 2017-11-07 Commit Queue <commit-queue@webkit.org>
1537 Unreviewed, rolling out r224512 and r224521.
1538 https://bugs.webkit.org/show_bug.cgi?id=179388
1540 An API test added with this change is failing an assertion on
1541 the bots. (Requested by ryanhaddad on #webkit).
1543 Reverted changesets:
1545 "[Attachment Support] Implement delegate hooks for attachment
1546 element insertion and removal"
1547 https://bugs.webkit.org/show_bug.cgi?id=179016
1548 https://trac.webkit.org/changeset/224512
1550 "Remove stray logging from a newly added API test"
1551 https://trac.webkit.org/changeset/224521
1553 2017-11-07 Chris Dumez <cdumez@apple.com>
1555 [Service Workers] Add support for "install" event
1556 https://bugs.webkit.org/show_bug.cgi?id=179338
1558 Reviewed by Youenn Fablet.
1560 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1561 (WebKit::WebSWServerConnection::firePostInstallEvents):
1562 (WebKit::WebSWServerConnection::fireInstallEvent):
1563 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1564 * StorageProcess/StorageProcess.cpp:
1565 (WebKit::StorageProcess::didFinishServiceWorkerInstall):
1566 * StorageProcess/StorageProcess.h:
1567 * StorageProcess/StorageProcess.messages.in:
1568 * WebProcess/Storage/WebSWClientConnection.messages.in:
1569 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1570 (WebKit::WebSWContextManagerConnection::fireInstallEvent):
1571 (WebKit::WebSWContextManagerConnection::didFinishInstall):
1572 * WebProcess/Storage/WebSWContextManagerConnection.h:
1573 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1575 2017-11-07 Youenn Fablet <youenn@apple.com>
1577 Support the case of fetch events that are not responded
1578 https://bugs.webkit.org/show_bug.cgi?id=179336
1580 Reviewed by Chris Dumez.
1582 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
1583 (WebKit::WebServiceWorkerFetchTaskClient::didNotHandle):
1584 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
1586 2017-11-06 Alex Christensen <achristensen@webkit.org>
1588 Make ResourceLoader::willSendRequestInternal asynchronous
1589 https://bugs.webkit.org/show_bug.cgi?id=179251
1591 Reviewed by Andy Estes.
1593 * WebProcess/Network/WebLoaderStrategy.cpp:
1594 (WebKit::WebLoaderStrategy::loadResource):
1595 (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
1596 * WebProcess/Network/WebLoaderStrategy.h:
1597 * WebProcess/Plugins/PluginView.cpp:
1598 (WebKit::PluginView::Stream::start):
1600 2017-11-06 Wenson Hsieh <wenson_hsieh@apple.com>
1602 [Attachment Support] Implement delegate hooks for attachment element insertion and removal
1603 https://bugs.webkit.org/show_bug.cgi?id=179016
1604 <rdar://problem/35250890>
1606 Reviewed by Tim Horton.
1608 Adds boilerplate plumbing to WebEditorClient, WebPage, and the usual machinery in the UI process to notify
1609 WebKit2 clients when attachment elements have been inserted or removed from the document. See the WebCore
1610 ChangeLog for more details about the implementation, or the Tools ChangeLog for more information about new API
1613 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1614 * UIProcess/API/Cocoa/WKWebView.mm:
1615 (-[WKWebView _didInsertAttachment:]):
1616 (-[WKWebView _didRemoveAttachment:]):
1617 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1618 * UIProcess/Cocoa/PageClientImplCocoa.h:
1619 * UIProcess/Cocoa/PageClientImplCocoa.mm:
1620 (WebKit::PageClientImplCocoa::didInsertAttachment):
1621 (WebKit::PageClientImplCocoa::didRemoveAttachment):
1622 * UIProcess/PageClient.h:
1623 (WebKit::PageClient::didInsertAttachment):
1624 (WebKit::PageClient::didRemoveAttachment):
1625 * UIProcess/WebPageProxy.cpp:
1626 (WebKit::WebPageProxy::didInsertAttachment):
1627 (WebKit::WebPageProxy::didRemoveAttachment):
1628 * UIProcess/WebPageProxy.h:
1629 * UIProcess/WebPageProxy.messages.in:
1630 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1631 (WebKit::WebEditorClient::didInsertAttachment):
1632 (WebKit::WebEditorClient::didRemoveAttachment):
1633 * WebProcess/WebCoreSupport/WebEditorClient.h:
1635 2017-11-06 Jeremy Jones <jeremyj@apple.com>
1637 iOS element fullscreen should use a UIGestureRecognizer to detect user interaction.
1638 https://bugs.webkit.org/show_bug.cgi?id=179029
1639 rdar://problem/35307882
1641 Reviewed by Simon Fraser.
1643 Replace _WKTapDelegatingView with a UILongPressGestureRecognizer. When set with a duration of 0, it effectively
1644 recognizes UITouchBegin events.
1646 * UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
1647 (-[_WKFullScreenViewController loadView]):
1648 (-[_WKFullScreenViewController gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1649 (-[_WKTapDelegatingView setTarget:action:]): Deleted.
1650 (-[_WKTapDelegatingView hitTest:withEvent:]): Deleted.
1652 2017-11-06 Chris Dumez <cdumez@apple.com>
1654 [Service Workers] Add proper implementation for 'updatefound' event
1655 https://bugs.webkit.org/show_bug.cgi?id=179302
1657 Reviewed by Brady Eidson.
1659 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1660 (WebKit::WebSWServerConnection::fireUpdateFoundEvent):
1661 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1662 * WebProcess/Storage/WebSWClientConnection.messages.in:
1664 2017-11-06 Christopher Reid <chris.reid@sony.com>
1666 Use enum classes within FileSystem
1667 https://bugs.webkit.org/show_bug.cgi?id=175172
1669 Reviewed by Myles C. Maxfield.
1671 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1672 * NetworkProcess/NetworkDataTaskBlob.cpp:
1673 * NetworkProcess/cache/NetworkCache.cpp:
1674 * NetworkProcess/capture/NetworkCaptureManager.cpp:
1675 * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
1676 * Shared/WebMemorySampler.cpp:
1677 * UIProcess/API/APIContentRuleListStore.cpp:
1678 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
1680 2017-11-06 Michael Catanzaro <mcatanzaro@igalia.com>
1682 [WPE] Properly use SYSTEM_INCLUDE_DIRECTORIES for WebKit build target
1683 https://bugs.webkit.org/show_bug.cgi?id=179097
1685 Reviewed by Žan Doberšek.
1687 * PlatformWPE.cmake:
1689 2017-11-05 Yusuke Suzuki <utatane.tea@gmail.com>
1691 JIT call inline caches should cache calls to objects with getCallData/getConstructData traps
1692 https://bugs.webkit.org/show_bug.cgi?id=144458
1694 Reviewed by Saam Barati.
1696 * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1697 (WebKit::JSNPMethod::JSNPMethod):
1698 (WebKit::JSNPMethod::getCallData): Deleted.
1699 * WebProcess/Plugins/Netscape/JSNPMethod.h:
1700 (WebKit::JSNPMethod::createStructure):
1702 2017-11-04 Chris Dumez <cdumez@apple.com>
1704 REGRESSION(r223718): Leaking WebProcessPool after reconfiguration
1705 https://bugs.webkit.org/show_bug.cgi?id=179123
1706 <rdar://problem/35294685>
1708 Reviewed by Geoff Garen.
1710 Make sure we destroy the ServiceWorker WebProcess once all other WebProcesses
1711 go away at there is no use keeping it running at this point. Also, this prevents
1712 leaking the WebProcessPool since the WebProcessProxy holds a strong reference
1713 to the WebProcessPool.
1715 * UIProcess/WebProcessPool.cpp:
1716 (WebKit::WebProcessPool::disconnectProcess):
1718 2017-11-01 Darin Adler <darin@apple.com>
1720 Simplify event dispatch code and make it a bit more consistent
1721 https://bugs.webkit.org/show_bug.cgi?id=178991
1723 Reviewed by Chris Dumez.
1725 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
1726 (webkit_dom_event_get_src_element): Call target instead of srcElement.
1728 2017-11-04 Aishwarya Nirmal <anirmal@apple.com>
1730 [Touch Bar Web API] Add support for menuitem tag
1731 https://bugs.webkit.org/show_bug.cgi?id=179020
1733 Reviewed by Ryosuke Niwa.
1735 Adds in the MenuItemElementEnabled flag so that the menu item element is a runtime-
1736 enabled feature. It has a default value of false.
1738 * Shared/WebPreferences.yaml:
1739 * UIProcess/API/C/WKPreferences.cpp:
1740 (WKPreferencesSetMenuItemElementEnabled):
1741 (WKPreferencesGetMenuItemElementEnabled):
1742 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1744 2017-11-03 Chris Dumez <cdumez@apple.com>
1746 Unreviewed, rolling out r224438.
1748 Has caused assertions on the bots
1752 "REGRESSION(r223718): Leaking WebProcessPool after
1754 https://bugs.webkit.org/show_bug.cgi?id=179123
1755 https://trac.webkit.org/changeset/224438
1757 2017-11-03 Youenn Fablet <youenn@apple.com>
1759 Requests handled by Service Worker should not go through preflighting
1760 https://bugs.webkit.org/show_bug.cgi?id=179250
1762 Reviewed by Alex Christensen.
1764 * WebProcess/Network/WebLoaderStrategy.cpp:
1765 (WebKit::WebLoaderStrategy::scheduleLoad):
1766 * WebProcess/Storage/WebSWClientConnection.cpp:
1767 (WebKit::WebSWClientConnection::startFetch):
1768 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
1769 (WebKit::shouldHandleFetch):
1771 2017-11-03 Chris Dumez <cdumez@apple.com>
1773 REGRESSION(r223718): Leaking WebProcessPool after reconfiguration
1774 https://bugs.webkit.org/show_bug.cgi?id=179123
1775 <rdar://problem/35294685>
1777 Reviewed by Geoffrey Garen.
1779 Make sure we destroy the ServiceWorker WebProcess once all other WebProcesses
1780 go away at there is no use keeping it running at this point. Also, this prevents
1781 leaking the WebProcessPool since the WebProcessProxy holds a strong reference
1782 to the WebProcessPool.
1784 * UIProcess/WebProcessPool.cpp:
1785 (WebKit::WebProcessPool::disconnectProcess):
1787 2017-11-03 Youenn Fablet <youenn@apple.com>
1789 Implement Service Worker Matching Registration algorithm
1790 https://bugs.webkit.org/show_bug.cgi?id=178882
1792 Reviewed by Chris Dumez.
1794 Added IPC plumbery for matchRegistration request and response.
1795 Added some limited clearing of workers and registrations.
1797 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1798 (WebKit::WebSWServerConnection::matchRegistration):
1799 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1800 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1801 * StorageProcess/StorageProcess.cpp:
1802 (WebKit::StorageProcess::deleteWebsiteData):
1803 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
1804 * WebProcess/Storage/WebSWClientConnection.cpp:
1805 (WebKit::WebSWClientConnection::didMatchRegistration):
1806 (WebKit::WebSWClientConnection::matchRegistration):
1807 * WebProcess/Storage/WebSWClientConnection.h:
1808 * WebProcess/Storage/WebSWClientConnection.messages.in:
1809 * WebProcess/Storage/WebServiceWorkerProvider.h:
1811 2017-11-03 Jeremy Jones <jeremyj@apple.com>
1813 Element fullscreen should use FloatRects instead of IntRects in beganEnterFullScreenWithInitialFrame
1814 https://bugs.webkit.org/show_bug.cgi?id=179033
1815 rdar://problem/35309279
1817 Reviewed by Darin Adler.
1819 Screen coordinates are floats, so use NSRect instead of IntRect on Mac.
1821 * UIProcess/mac/WKFullScreenWindowController.h:
1822 * UIProcess/mac/WKFullScreenWindowController.mm:
1823 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
1824 (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
1826 2017-11-03 Chris Dumez <cdumez@apple.com>
1828 Use a single identifier type to identify Service Workers
1829 https://bugs.webkit.org/show_bug.cgi?id=179192
1831 Reviewed by Brady Eidson.
1833 Use a single identifier type to identify Service Workers. We had both a String
1834 identifier and a uint64_t identifier for each service worker. We now consistently
1835 use a ServiceWorkerIdentifier which is a strongly typed identifier backed by a
1838 * Scripts/webkit/messages.py:
1839 (forward_declarations_and_headers):
1840 (forward_declarations_and_headers.templates):
1841 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1842 (WebKit::WebSWServerConnection::startFetch):
1843 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
1844 (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient):
1845 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1846 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1847 * StorageProcess/StorageProcess.cpp:
1848 (WebKit::StorageProcess::serviceWorkerContextFailedToStart):
1849 (WebKit::StorageProcess::serviceWorkerContextStarted):
1850 (WebKit::StorageProcess::postMessageToServiceWorkerClient):
1851 * StorageProcess/StorageProcess.h:
1852 * StorageProcess/StorageProcess.messages.in:
1853 * WebProcess/Storage/WebSWClientConnection.cpp:
1854 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
1855 (WebKit::WebSWClientConnection::postMessageToServiceWorkerClient):
1856 * WebProcess/Storage/WebSWClientConnection.h:
1857 * WebProcess/Storage/WebSWClientConnection.messages.in:
1858 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1859 (WebKit::WebSWContextManagerConnection::updateServiceWorker):
1860 (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
1861 (WebKit::WebSWContextManagerConnection::startFetch):
1862 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
1863 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
1864 * WebProcess/Storage/WebSWContextManagerConnection.h:
1865 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1867 2017-11-03 Antti Koivisto <antti@apple.com>
1869 Enable display:contents by default as experimental feature
1870 https://bugs.webkit.org/show_bug.cgi?id=179239
1871 <rdar://problem/35334612>
1873 Reviewed by Darin Adler.
1875 We pass most of the WPT tests. What remains is mostly flexbox related edge cases.
1877 * Shared/WebPreferences.yaml:
1879 2017-11-03 Frederic Wang <fwang@igalia.com>
1881 Use WK_IOS_TBA instead of WK_MAC_TBA to indicate availability of private functions on iOS
1882 https://bugs.webkit.org/show_bug.cgi?id=179238
1884 Reviewed by Darin Adler.
1886 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1887 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1889 2017-11-02 Maciej Stachowiak <mjs@apple.com>
1891 Don't try to guess plugin MIME type from a file extension in a URL (no observable effect)
1892 https://bugs.webkit.org/show_bug.cgi?id=178333
1894 Reviewed by Darin Adler.
1896 * WebProcess/Plugins/PluginView.cpp:
1897 (WebKit::PluginView::pluginDidReceiveUserInteraction): loadedMIMEType --> serviceType
1898 * WebProcess/WebPage/WebPage.cpp:
1899 (WebKit::WebPage::determinePrimarySnapshottedPlugIn): ditto
1901 2017-11-02 Brady Eidson <beidson@apple.com>
1903 SW: Implement "Update Registration State" algorithm (unused for now)
1904 https://bugs.webkit.org/show_bug.cgi?id=179186
1906 Reviewed by Chris Dumez.
1908 * Scripts/webkit/messages.py:
1911 * Shared/WebCoreArgumentCoders.h:
1913 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1914 (WebKit::WebSWServerConnection::updateRegistrationStateInClient):
1915 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1916 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
1918 * WebProcess/Storage/WebSWClientConnection.cpp:
1919 (WebKit::WebSWClientConnection::addServiceWorkerRegistrationInServer):
1920 (WebKit::WebSWClientConnection::removeServiceWorkerRegistrationInServer):
1921 * WebProcess/Storage/WebSWClientConnection.h:
1922 * WebProcess/Storage/WebSWClientConnection.messages.in:
1924 2017-11-02 Alex Christensen <achristensen@webkit.org>
1926 Use CompletionHandlers for redirects
1927 https://bugs.webkit.org/show_bug.cgi?id=179163
1929 Reviewed by Tim Horton.
1931 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1932 (WebKit::BlobDownloadClient::willSendRequestAsync):
1933 * NetworkProcess/Downloads/BlobDownloadClient.h:
1934 * NetworkProcess/NetworkDataTask.h:
1935 * NetworkProcess/NetworkLoad.cpp:
1936 (WebKit::NetworkLoad::~NetworkLoad):
1937 (WebKit::NetworkLoad::continueWillSendRequest):
1938 (WebKit::NetworkLoad::willSendRequestAsync):
1939 * NetworkProcess/NetworkLoad.h:
1940 * NetworkProcess/NetworkLoadClient.h:
1941 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1942 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1943 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
1944 * UIProcess/API/APIDownloadClient.h:
1945 (API::DownloadClient::willSendRequest):
1946 * UIProcess/API/C/WKContext.cpp:
1947 (WKContextSetDownloadClient):
1948 * UIProcess/Cocoa/DownloadClient.h:
1949 * UIProcess/Cocoa/DownloadClient.mm:
1950 (WebKit::DownloadClient::willSendRequest):
1951 * WebProcess/Network/WebResourceLoader.cpp:
1952 (WebKit::WebResourceLoader::willSendRequest):
1953 * WebProcess/Plugins/PluginView.cpp:
1954 (WebKit::PluginView::Stream::~Stream):
1955 (WebKit::PluginView::Stream::continueLoad):
1956 (WebKit::PluginView::Stream::willSendRequest):
1957 * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
1959 2017-11-02 Christopher Reid <chris.reid@sony.com>
1961 Add a FileSystem namespace to FileSystem.cpp
1962 https://bugs.webkit.org/show_bug.cgi?id=179063
1964 Reviewed by Darin Adler.
1966 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1967 * NetworkProcess/Downloads/BlobDownloadClient.h:
1968 * NetworkProcess/NetworkDataTaskBlob.cpp:
1969 * NetworkProcess/NetworkDataTaskBlob.h:
1970 * NetworkProcess/NetworkProcess.cpp:
1971 * NetworkProcess/cache/CacheStorageEngine.cpp:
1972 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
1973 * NetworkProcess/cache/NetworkCache.cpp:
1974 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1975 * NetworkProcess/cache/NetworkCacheData.cpp:
1976 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
1977 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1978 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1979 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1980 * NetworkProcess/cache/NetworkCacheStorage.cpp:
1981 * NetworkProcess/capture/NetworkCaptureManager.cpp:
1982 * NetworkProcess/capture/NetworkCaptureManager.h:
1983 * NetworkProcess/capture/NetworkCaptureRecorder.cpp:
1984 * NetworkProcess/capture/NetworkCaptureResource.h:
1985 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1986 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1987 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1988 * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
1989 * Shared/Plugins/unix/PluginSearchPath.cpp:
1990 * Shared/WebMemorySampler.cpp:
1991 * Shared/WebMemorySampler.h:
1992 * Shared/gtk/ProcessExecutablePathGtk.cpp:
1993 * Shared/ios/ChildProcessIOS.mm:
1994 * Shared/mac/ChildProcessMac.mm:
1995 * Shared/mac/SandboxExtensionMac.mm:
1996 * Shared/wpe/ProcessExecutablePathWPE.cpp:
1997 * StorageProcess/StorageProcess.cpp:
1998 * UIProcess/API/APIContentRuleListStore.cpp:
1999 * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
2000 * UIProcess/API/glib/IconDatabase.cpp:
2001 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
2002 * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
2003 * UIProcess/API/glib/WebKitWebContext.cpp:
2004 * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
2005 * UIProcess/Automation/WebAutomationSession.cpp:
2006 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2007 * UIProcess/Cocoa/WebViewImpl.mm:
2008 * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
2009 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2010 * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2011 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2012 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:
2013 * UIProcess/WebStorage/LocalStorageDatabase.cpp:
2014 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
2015 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
2016 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2017 * UIProcess/gtk/WebProcessPoolGtk.cpp:
2018 * UIProcess/mac/WebPageProxyMac.mm:
2019 * UIProcess/wpe/WebProcessPoolWPE.cpp:
2020 * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:
2021 * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
2022 * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2023 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2024 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2025 * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
2027 2017-11-02 Joseph Pecoraro <pecoraro@apple.com>
2029 Make ServiceWorker a Remote Inspector debuggable target
2030 https://bugs.webkit.org/show_bug.cgi?id=179043
2031 <rdar://problem/34126008>
2033 Reviewed by Brian Burg.
2035 * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
2036 * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
2037 (debuggableTypeString):
2038 Provide a way to start a Remote Web Inspector frontend for a ServiceWorker target type.
2040 2017-11-02 Ryan Haddad <ryanhaddad@apple.com>
2042 Unreviewed, rolling out r224353.
2044 Breaks internal builds.
2048 "Ignore HSTS for partitioned, cross-origin subresource
2050 https://bugs.webkit.org/show_bug.cgi?id=178993
2051 https://trac.webkit.org/changeset/224353
2053 2017-11-02 John Wilander <wilander@apple.com>
2055 Ignore HSTS for partitioned, cross-origin subresource requests
2056 https://bugs.webkit.org/show_bug.cgi?id=178993
2057 <rdar://problem/34962462>
2059 Reviewed by Brent Fulgham and Alex Christensen.
2061 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2063 Convenience function to downgrade a request if
2064 CFNetwork as already upgraded it during
2065 canonicalization. This allows the rest of
2066 WebKit's processing to function, such as UIR
2067 and mixed content blocking.
2068 (updateIgnoreStrictTransportSecuritySettingIfNecessary):
2069 Adds and removed the ignore request accordingly.
2070 (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2071 Now asks CFNetwork to ignore HSTS on resource loads we
2072 partition cookies for.
2073 (-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
2074 Now asks CFNetwork to ignore HSTS on resource loads we
2075 partition cookies for.
2077 2017-11-02 Yousuke Kimoto <yousuke.kimoto@sony.com>
2079 [WinCairo] Add IPC files for wincairo webkit
2080 https://bugs.webkit.org/show_bug.cgi?id=177919
2082 Reviewed by Alex Christensen.
2084 * Platform/IPC/Attachment.cpp:
2085 * Platform/IPC/Attachment.h:
2086 (IPC::Attachment::Attachment):
2087 (IPC::Attachment::handle):
2088 * Platform/IPC/Connection.h:
2089 (IPC::Connection::identifierIsNull):
2090 (IPC::Connection::sendWithReply):
2091 * Platform/IPC/win/AttachmentWin.cpp: Added.
2092 (IPC::Attachment::encode const):
2093 (IPC::getDuplicatedHandle):
2094 (IPC::Attachment::decode):
2095 * Platform/IPC/win/ConnectionWin.cpp: Added.
2096 (IPC::Connection::createServerAndClientIdentifiers):
2097 (IPC::Connection::platformInitialize):
2098 (IPC::Connection::platformInvalidate):
2099 (IPC::Connection::readEventHandler):
2100 (IPC::Connection::writeEventHandler):
2101 (IPC::Connection::open):
2102 (IPC::Connection::platformCanSendOutgoingMessages const):
2103 (IPC::Connection::sendOutgoingMessage):
2104 (IPC::Connection::willSendSyncMessage):
2105 (IPC::Connection::didReceiveSyncReply):
2106 * PlatformWin.cmake:
2108 2017-11-02 Megan Gardner <megan_gardner@apple.com>
2110 Early out selection update when data is not present
2111 https://bugs.webkit.org/show_bug.cgi?id=179084
2113 Reviewed by Ryosuke Niwa.
2115 We should early out of a selection update when we do not have the data that is necessary to make that
2116 update. This mostly helps avoid debug asserts, but will be helpful with the selection changes that are
2119 * UIProcess/ios/WKContentViewInteraction.mm:
2120 (-[WKContentView _updateChangedSelection:]):
2122 2017-11-02 Eric Carlson <eric.carlson@apple.com>
2124 [MediaStream] audioTrack.label is always empty on macOS
2125 https://bugs.webkit.org/show_bug.cgi?id=179175
2126 <rdar://problem/35315438>
2128 Reviewed by Youenn Fablet.
2130 * WebProcess/cocoa/UserMediaCaptureManager.cpp:
2131 (WebKit::UserMediaCaptureManager::createCaptureSource): Pass settings.label to Source constructor.
2133 2017-11-02 Frederic Wang <fwang@igalia.com>
2135 Add references to bug 179167 in FIXME comments
2136 https://bugs.webkit.org/show_bug.cgi?id=179168
2138 Reviewed by Daniel Bates.
2140 * Configurations/FeatureDefines.xcconfig:
2142 2017-11-01 Jeremy Jones <jeremyj@apple.com>
2144 Implement WKFullscreenWindowController for iOS.
2145 https://bugs.webkit.org/show_bug.cgi?id=178924
2146 rdar://problem/34697120
2148 Reviewed by Simon Fraser.
2150 Plumb relevant calls through WKWebView and PageClientImplIOS.
2152 This forms the base implementation for element fullscreen. This will animate an element into fullscreen and back to inline.
2153 It does this by replacing the WKWebView with a placeholder image and presenting the WKWebView with a fullscreen view controller.
2154 This also attempts to preserve UI state of the WKWebView when it is placed back inline.
2156 To enable _WKFullscreenDelegate for iOS, this adds an iOS version of the delegate methods that passes WKWebView instead of NSView.
2157 The iOS version of these functions are renamed to be more specific and disambiguate them from the video fullscreen delegate methods.
2159 This also adds an image asset for the done button.
2161 * Configurations/FeatureDefines.xcconfig:
2162 * UIProcess/API/Cocoa/WKWebView.mm:
2163 (-[WKWebView hasFullScreenWindowController]):
2164 (-[WKWebView fullScreenWindowController]):
2165 (-[WKWebView closeFullScreenWindowController]):
2166 (-[WKWebView fullScreenPlaceholderView]):
2167 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2168 * UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
2169 * UIProcess/Cocoa/FullscreenClient.h:
2170 * UIProcess/Cocoa/FullscreenClient.mm:
2171 (WebKit::FullscreenClient::FullscreenClient):
2172 (WebKit::FullscreenClient::setDelegate):
2173 (WebKit::FullscreenClient::willEnterFullscreen):
2174 (WebKit::FullscreenClient::didEnterFullscreen):
2175 (WebKit::FullscreenClient::willExitFullscreen):
2176 (WebKit::FullscreenClient::didExitFullscreen):
2177 * UIProcess/ios/PageClientImplIOS.mm:
2178 (WebKit::PageClientImpl::closeFullScreenManager):
2179 (WebKit::PageClientImpl::isFullScreen):
2180 (WebKit::PageClientImpl::enterFullScreen):
2181 (WebKit::PageClientImpl::exitFullScreen):
2182 (WebKit::PageClientImpl::beganEnterFullScreen):
2183 (WebKit::PageClientImpl::beganExitFullScreen):
2184 * UIProcess/ios/WKContentView.mm:
2185 * UIProcess/ios/WKFullScreenWindowControllerIOS.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKFullscreenDelegate.h.
2186 * UIProcess/ios/WKFullScreenWindowControllerIOS.mm: Added.
2187 (WebKit::replaceViewWithView):
2188 (WebKit::WKWebViewState::applyTo):
2189 (WebKit::WKWebViewState::store):
2190 (-[_WKTapDelgatingView setTarget:action:]):
2191 (-[_WKTapDelgatingView hitTest:withEvent:]):
2192 (-[_WKFullScreenViewController dealloc]):
2193 (-[_WKFullScreenViewController viewWillTransitionToSize:withTransitionCoordinator:]):
2194 (+[_WKFullScreenViewController configureView:withBackgroundFillOfColor:opacity:filter:]):
2195 (-[_WKFullScreenViewController _updateTransparencyOfVisualEffectView:]):
2196 (-[_WKFullScreenViewController createVisualEffectViewWithFrame:]):
2197 (-[_WKFullScreenViewController loadView]):
2198 (-[_WKFullScreenViewController viewWillAppear:]):
2199 (-[_WKFullScreenViewController viewDidDisappear:]):
2200 (-[_WKFullScreenViewController cancelAction:]):
2201 (-[_WKFullScreenViewController hideCancelButton]):
2202 (-[_WKFullScreenViewController showCancelButton]):
2203 (-[_WKFullScreenViewController setTarget:action:]):
2204 (-[_WKFullScreenViewController prefersStatusBarHidden]):
2205 (-[WKFullscreenAnimationController transitionDuration:]):
2206 (-[WKFullscreenAnimationController animateTransition:]):
2207 (-[WKFullscreenAnimationController animationEnded:]):
2208 (-[WKFullScreenWindowController initWithWebView:page:]):
2209 (-[WKFullScreenWindowController dealloc]):
2210 (-[WKFullScreenWindowController isFullScreen]):
2211 (-[WKFullScreenWindowController webViewPlaceholder]):
2212 (-[WKFullScreenWindowController enterFullScreen]):
2213 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
2214 (-[WKFullScreenWindowController completedEnterFullScreen]):
2215 (-[WKFullScreenWindowController exitFullScreen]):
2216 (-[WKFullScreenWindowController requestExitFullScreen]):
2217 (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
2218 (-[WKFullScreenWindowController completedExitFullScreen]):
2219 (-[WKFullScreenWindowController close]):
2220 (-[WKFullScreenWindowController _manager]):
2221 (-[WKFullScreenWindowController animationControllerForPresentedController:presentingController:sourceController:]):
2222 (-[WKFullScreenWindowController animationControllerForDismissedController:]):
2223 * WebKit.xcassets/Contents.json: Added.
2224 * WebKit.xcassets/Done.imageset/Contents.json: Added.
2225 * WebKit.xcassets/Done.imageset/Done.pdf: Added.
2226 * WebKit.xcodeproj/project.pbxproj:
2227 * WebProcess/FullScreen/WebFullScreenManager.cpp:
2228 (WebKit::WebFullScreenManager::willEnterFullScreen):
2229 (WebKit::WebFullScreenManager::willExitFullScreen):
2231 2017-11-01 Daniel Bates <dabates@apple.com>
2233 XMLHttpRequest should not sniff content encoding
2234 https://bugs.webkit.org/show_bug.cgi?id=175597
2235 <rdar://problem/34912624>
2237 Reviewed by Alex Christensen.
2239 Fixes an issue where the body of an HTTP response with headers "Content-Type: application/octet-stream" and
2240 "Content-Encoding: gzip" associated with an XHR request to a .gz file would not be automatically gzipped
2241 decompressed. Specifically, such a response would be treated analogous to a response with headers
2242 "Content-Type: application/gzip" and "Content-Encoding: identity". This behavior does not conform to the
2243 behavior of the Content-Encoding header as defined in the HTTP 1.1 and later specs. Moreover this behavior
2244 breaks the Epic Zen Garden demo: <https://s3.amazonaws.com/mozilla-games/ZenGarden/EpicZenGarden.html>.
2246 On macOS 10.13.2 opt out of content encoding sniffing when making an XHR request. We likely can
2247 selectively opt out of content encoding sniffing for other network requests. This will be done
2248 in subsequent commits to make it straightforward to identify site breakage (if any).
2250 * NetworkProcess/Downloads/Download.cpp:
2251 (WebKit::Download::start): Enable content encoding sniff to match existing behavior.
2252 (WebKit::Download::startWithHandle): Ditto.
2253 * NetworkProcess/NetworkDataTask.cpp:
2254 (WebKit::NetworkDataTask::create): Pass through the content encoding sniffing policy.
2255 * NetworkProcess/NetworkLoad.cpp:
2256 (WebKit::NetworkLoad::NetworkLoad): Ditto.
2257 * NetworkProcess/NetworkLoadParameters.h:
2258 * NetworkProcess/NetworkResourceLoadParameters.cpp:
2259 (WebKit::NetworkResourceLoadParameters::encode const): Encode content encoding sniffing policy.
2260 (WebKit::NetworkResourceLoadParameters::decode): Decode content encoding sniffing policy.
2261 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2262 (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): Enable content encoding sniff to match existing
2263 behavior. We should look to disable content encoding sniffing in a subsequent change.
2264 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2265 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2266 (WebKit::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded): Added helper function
2267 to apply sniffing policies and bind request to interface, if applicable.
2268 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Modified to take the content encoding sniffing
2269 policy. Calls applySniffingPoliciesAndBindRequestToInferfaceIfNeeded() to apply this policy. Also use
2270 convenience function URL::isLocalFile() to determine if the URL is a file URL.
2271 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2272 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Pass through the content encoding sniffing policy.
2273 * NetworkProcess/soup/NetworkDataTaskSoup.h:
2274 * WebProcess/Network/WebLoaderStrategy.cpp:
2275 (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): Pass through the content encoding sniffing policy.
2276 (WebKit::WebLoaderStrategy::loadResourceSynchronously): Enable content encoding sniff to match existing
2279 2017-11-01 Brady Eidson <beidson@apple.com>
2281 Plumbing for handling SW scripts failing to evaluate
2282 https://bugs.webkit.org/show_bug.cgi?id=178926
2284 Reviewed by Chris Dumez.
2286 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2287 (WebKit::WebSWServerConnection::updateServiceWorkerContext):
2288 (WebKit::WebSWServerConnection::setContextConnection):
2289 (WebKit::WebSWServerConnection::startServiceWorkerContext): Deleted.
2290 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2292 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2293 (WebKit::WebSWContextManagerConnection::updateServiceWorker):
2294 (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
2295 (WebKit::WebSWContextManagerConnection::startServiceWorker): Deleted.
2296 * WebProcess/Storage/WebSWContextManagerConnection.h:
2297 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2299 2017-11-01 Frederic Wang <fwang@igalia.com>
2301 Make iOS Find UI reveal matches in scrollable elements
2302 https://bugs.webkit.org/show_bug.cgi?id=178789
2304 Reviewed by Tim Horton.
2306 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2307 (WebKit::FindController::didFindString): Reveal selection up to the main frame. The main frame
2308 is handled by the SmartMagnificationController.
2310 2017-11-01 Michael Catanzaro <mcatanzaro@igalia.com>
2312 REGRESSION(r224192): [WPE] Fix WebEventFactory::createWebWheelEvent
2313 https://bugs.webkit.org/show_bug.cgi?id=179098
2315 Reviewed by Sam Weinig.
2317 * Shared/wpe/WebEventFactory.cpp:
2318 (WebKit::WebEventFactory::createWebWheelEvent):
2320 2017-10-31 Tim Horton <timothy_horton@apple.com>
2322 Clean up some drag and drop feature flags
2323 https://bugs.webkit.org/show_bug.cgi?id=179082
2325 Reviewed by Simon Fraser.
2327 * Configurations/FeatureDefines.xcconfig:
2329 2017-10-31 Wenson Hsieh <wenson_hsieh@apple.com>
2331 Followup to r224238: API::Attachment should generate a _WKAttachment ObjC wrapper
2332 https://bugs.webkit.org/show_bug.cgi?id=179080
2334 Reviewed by Tim Horton.
2336 Fixes a failing API test. The new Attachment object type added in r224238 was not actually being handled in
2337 Object::newObject, so a plain WKObject Objective C wrapper was being created; fix this by allocating a new
2338 _WKAttachment object for Type::Attachment.
2340 * Shared/Cocoa/APIObject.mm:
2341 (API::Object::newObject):
2343 2017-10-31 Tim Horton <timothy_horton@apple.com>
2345 Fix up some content filtering feature flags
2346 https://bugs.webkit.org/show_bug.cgi?id=179079
2348 Reviewed by Simon Fraser.
2350 * Configurations/FeatureDefines.xcconfig:
2352 2017-10-31 Youenn Fablet <youenn@apple.com>
2354 rwt should allow service worker to load localhost HTTPS resources with any certificate
2355 https://bugs.webkit.org/show_bug.cgi?id=179018
2357 Reviewed by Chris Dumez.
2359 Allowing ServiceWorkerProcessProxy to handle authentication challenge.
2360 Temporarily adding a boolean flag through WebProcessPool to lower the SSL certificate verifications for service workers.
2361 This allows reducing flakiness in our layout tests for rwt.
2362 Future work should be done to expose a correct API for the application level to handle authentication challenges properly.
2364 * UIProcess/API/C/WKContext.cpp:
2365 (WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting):
2366 * UIProcess/API/C/WKContextPrivate.h:
2367 * UIProcess/API/Cocoa/WKProcessPool.mm:
2368 (-[WKProcessPool _setAllowsAnySSLCertificateForServiceWorker:]):
2369 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2370 * UIProcess/Network/NetworkProcessProxy.cpp:
2371 (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
2372 (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace):
2373 * UIProcess/ServiceWorkerProcessProxy.cpp:
2374 (WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge):
2375 * UIProcess/ServiceWorkerProcessProxy.h:
2376 * UIProcess/WebProcessPool.h:
2378 2017-10-31 Joseph Pecoraro <pecoraro@apple.com>
2380 Web Inspector: UIProcess ASSERT in ~RemoteWebInspectorProxy when InspectorProcess crashes
2381 https://bugs.webkit.org/show_bug.cgi?id=179044
2383 Reviewed by Alex Christensen.
2385 * UIProcess/RemoteWebInspectorProxy.cpp:
2386 (WebKit::RemoteWebInspectorProxy::frontendDidClose):
2387 Add a protector to keep the proxy alive for the duration of this method.
2389 2017-10-31 Youenn Fablet <youenn@apple.com>
2391 Crash in: com.apple.WebKit: WebKit::CacheStorage::Caches::initializeSize(WTF::Function<void (std::optional<WebCore::DOMCacheEngine::Error>&&)>&&) + 30 (CacheStorageEngineCaches.cpp:163)
2392 https://bugs.webkit.org/show_bug.cgi?id=179037
2394 Reviewed by Chris Dumez.
2396 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2397 (WebKit::CacheStorage::Caches::initializeSize): the storage backend may be cleared when clearing caches by the UI Process.
2398 Returning early in that case. A web application will typically fail to open a cache in this case.
2399 On retry, the cache should be opened.
2401 2017-10-31 Wenson Hsieh <wenson_hsieh@apple.com>
2403 [Attachment Support] Implement WKWebView SPI for inserting attachment elements
2404 https://bugs.webkit.org/show_bug.cgi?id=179013
2405 <rdar://problem/35249668>
2407 Reviewed by Tim Horton.
2409 Adds native SPI to insert attachment elements given a filename, an optional MIME type, and a data blob. See
2410 change-by-change comments below for more detail. Covered by a new API test.
2412 * PlatformMac.cmake:
2413 * Shared/API/APIObject.h:
2414 * Shared/API/Cocoa/WebKitPrivate.h:
2415 * UIProcess/API/APIAttachment.cpp: Copied from Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h.
2416 (API::Attachment::create):
2417 (API::Attachment::Attachment):
2418 (API::Attachment::~Attachment):
2420 Introduce API::Attachment, which represents a platform-agnostic Attachment.
2422 * UIProcess/API/APIAttachment.h: Copied from Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h.
2423 * UIProcess/API/Cocoa/WKWebView.mm:
2424 (-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]):
2426 Adds support for inserting a new attachment element. Calls out to WebPageProxy to insert the attachment from the
2427 given data blob, and creates a new API-object-backed _WKAttachment.
2429 (-[WKWebView _executeEditCommand:argument:completion:]):
2431 Support passing in a nil completion block.
2433 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2434 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2435 * UIProcess/API/Cocoa/_WKAttachment.h: Copied from Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h.
2436 * UIProcess/API/Cocoa/_WKAttachment.mm: Copied from Source/WebCore/html/HTMLAttachmentElement.h.
2438 Introduces _WKAttachment, an Objective C wrapper around the API::Attachment.
2440 (-[_WKAttachment _apiObject]):
2441 (-[_WKAttachment isEqual:]):
2442 (-[_WKAttachment uniqueIdentifier]):
2443 (-[_WKAttachment hash]):
2445 Add _WKAttachment, a WebKit SPI object that wraps an attachment element unique identifier. Also, allow
2446 _WKAttachment to be used as a hashable NSDictionary key.
2448 (-[_WKAttachment description]):
2449 * UIProcess/API/Cocoa/_WKAttachmentInternal.h: Copied from Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h.
2451 * UIProcess/WebPageProxy.cpp:
2452 (WebKit::WebPageProxy::insertAttachment):
2454 Implement IPC support for inserting an attachment.
2456 * UIProcess/WebPageProxy.h:
2457 * WebKit.xcodeproj/project.pbxproj:
2458 * WebProcess/WebPage/WebPage.cpp:
2459 (WebKit::WebPage::insertAttachment):
2460 * WebProcess/WebPage/WebPage.h:
2461 * WebProcess/WebPage/WebPage.messages.in:
2463 2017-10-31 Alex Christensen <achristensen@webkit.org>
2465 Fix custom header field setting with reloads and asynchronous navigation action policy decisions
2466 https://bugs.webkit.org/show_bug.cgi?id=179064
2468 Reviewed by Tim Horton.
2470 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2471 (WebKit::WebFrameLoaderClient::applyToDocumentLoader):
2472 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2473 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2474 * WebProcess/WebPage/WebFrame.cpp:
2475 (WebKit::WebFrame::didReceivePolicyDecision):
2476 * WebProcess/WebPage/WebFrame.h:
2477 * WebProcess/WebPage/WebPage.cpp:
2478 (WebKit::WebPage::didReceivePolicyDecision):
2480 2017-10-31 Carlos Garcia Campos <cgarcia@igalia.com>
2482 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.19.1 release.
2484 * gtk/NEWS: Add release notes for 2.19.1.
2486 2017-10-31 Carlos Garcia Campos <cgarcia@igalia.com>
2488 Unreviewed. Fix GTK+ make distcheck.
2490 Include WebCore/TextEncodingRegistry.h to ensure the forwarding header is generated.
2492 * UIProcess/API/glib/WebKitSettings.cpp:
2494 2017-10-31 Commit Queue <commit-queue@webkit.org>
2496 Unreviewed, rolling out r223884.
2497 https://bugs.webkit.org/show_bug.cgi?id=179055
2499 It broke GTK+ make distcheck (Requested by KaL on #webkit).
2503 "[GTK][WPE] generate-forwarding-headers.pl should also scan
2504 derived sources in WebKit framework"
2505 https://bugs.webkit.org/show_bug.cgi?id=178579
2506 https://trac.webkit.org/changeset/223884
2508 2017-10-30 Fujii Hironori <Hironori.Fujii@sony.com>
2510 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for XMLNames, HTMLNames, MathMLNames and SVGNames
2511 https://bugs.webkit.org/show_bug.cgi?id=175118
2513 Reviewed by Alex Christensen.
2515 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
2518 2017-10-27 Megan Gardner <megan_gardner@apple.com>
2520 Correctly determine affinity when inserting text via Keyboard Suggestions
2521 https://bugs.webkit.org/show_bug.cgi?id=178969
2523 Reviewed by Ryosuke Niwa.
2525 Use the logic of VisiblePosition to correctly determine cursor affinity. We were
2526 defaulting to upstream, but that in incorrect and resulted in hitting asserts that
2527 we should not. This should give us the correct affinity in all cases.
2529 * WebProcess/WebPage/ios/WebPageIOS.mm:
2530 (WebKit::WebPage::syncApplyAutocorrection):
2532 2017-10-30 Commit Queue <commit-queue@webkit.org>
2534 Unreviewed, rolling out r224078.
2535 https://bugs.webkit.org/show_bug.cgi?id=179026
2537 MotionMark regression (Requested by shallawa on #webkit).
2541 "When navigating back to a page, compositing layers may not
2542 use accelerated drawing"
2543 https://bugs.webkit.org/show_bug.cgi?id=178749
2544 https://trac.webkit.org/changeset/224078
2546 2017-10-30 Sam Weinig <sam@webkit.org>
2548 [Setting] Only expose experimental features that are compiled in
2549 https://bugs.webkit.org/show_bug.cgi?id=179023
2551 Reviewed by Tim Horton.
2553 * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
2555 Update template to conditionally expose experimental features based on their
2556 'condition' option in WebPreferences.yaml
2558 2017-10-30 Michael Catanzaro <mcatanzaro@igalia.com>
2560 [WPE] Fix build warnings
2561 https://bugs.webkit.org/show_bug.cgi?id=178899
2563 Reviewed by Carlos Alberto Lopez Perez.
2565 * PlatformWPE.cmake:
2567 2017-10-30 Sam Weinig <sam@webkit.org>
2569 [Settings] Replace macro driven experimental features code with generated code
2570 https://bugs.webkit.org/show_bug.cgi?id=178994
2572 Reviewed by Simon Fraser.
2574 As a first step toward allowing experimental features to vary based on compile
2575 time flags, replace the macro driven implementation of the WebPreferences part
2576 of experimental features, with one generated from a template file.
2579 * DerivedSources.make:
2580 * Scripts/GeneratePreferences.rb:
2581 * WebKit.xcodeproj/project.pbxproj:
2583 Generate the new template.
2585 * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb: Added.
2586 * UIProcess/WebPreferences.cpp:
2587 (WebKit::createExperimentalFeaturesVector): Deleted.
2588 (WebKit::WebPreferences::experimentalFeatures): Deleted.
2589 (WebKit::WebPreferences::isEnabledForFeature const): Deleted.
2590 (WebKit::WebPreferences::setEnabledForFeature): Deleted.
2591 (WebKit::WebPreferences::enableAllExperimentalFeatures): Deleted.
2593 Replace macro implementation with template generated one.
2595 2017-10-30 Michael Catanzaro <mcatanzaro@igalia.com>
2597 [WPE] Build more files under WebCore as unified sources and get rid of WebCorePlatformWPE build target
2598 https://bugs.webkit.org/show_bug.cgi?id=178964
2600 Reviewed by Carlos Alberto Lopez Perez.
2602 * PlatformWPE.cmake:
2604 2017-10-30 Michael Catanzaro <mcatanzaro@igalia.com>
2606 [WPE][GTK] Expose availability of certain editing commands in WebKitEditorState
2607 https://bugs.webkit.org/show_bug.cgi?id=168219
2609 Reviewed by Ryosuke Niwa.
2611 Expose canCut, canCopy, canPaste, canUndo, and canRedo in EditorState::PostLayouData.
2613 Add corresponding new WPE/GTK API.
2615 Remove allowsCopy from WebKitTestResultData. It's unused, does not work correctly in all
2616 circumstances, and irritates Ryosuke.
2618 Also, remove a bunch of #ifs guarding post layout data, since it's now used on all ports.
2620 * Shared/EditorState.cpp:
2621 (WebKit::EditorState::encode const):
2622 (WebKit::EditorState::decode):
2623 (WebKit::EditorState::PostLayoutData::encode const):
2624 (WebKit::EditorState::PostLayoutData::decode):
2625 * Shared/EditorState.h:
2626 (WebKit::EditorState::postLayoutData const const):
2627 * Shared/WebHitTestResultData.cpp:
2628 (WebKit::WebHitTestResultData::WebHitTestResultData):
2629 (WebKit::WebHitTestResultData::encode const):
2630 (WebKit::WebHitTestResultData::decode):
2631 * Shared/WebHitTestResultData.h:
2632 * UIProcess/API/APIHitTestResult.h:
2633 (API::HitTestResult::allowsCopy const): Deleted.
2634 * UIProcess/API/glib/WebKitEditorState.cpp:
2635 (webkitEditorStateChanged):
2636 (webkit_editor_state_is_cut_available):
2637 (webkit_editor_state_is_copy_available):
2638 (webkit_editor_state_is_paste_available):
2639 (webkit_editor_state_is_undo_available):
2640 (webkit_editor_state_is_redo_available):
2641 * UIProcess/API/glib/WebKitWebView.cpp:
2642 (webkit_web_view_can_execute_editing_command):
2643 * UIProcess/API/gtk/WebKitEditorState.h:
2644 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2645 * UIProcess/API/wpe/WebKitEditorState.h:
2646 * WebProcess/WebPage/WebPage.cpp:
2647 (WebKit::WebPage::editorState const):
2648 * WebProcess/WebPage/mac/WebPageMac.mm:
2649 (WebKit::WebPage::performImmediateActionHitTestAtLocation):
2651 2017-10-27 Sam Weinig <sam@webkit.org>
2653 [Settings] Generate more of the WebKit preferences code
2654 https://bugs.webkit.org/show_bug.cgi?id=178945
2656 Reviewed by Chris Dumez.
2658 Generate WebPreferencesKeys.{h,cpp} and WebPreferencesStoreDefaultsMap.cpp
2661 * DerivedSources.make:
2662 * WebKit.xcodeproj/project.pbxproj:
2663 * Scripts/GeneratePreferences.rb:
2667 * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
2671 * Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb: Added.
2672 * Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb: Added.
2673 * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb: Added.
2675 Add template files for new generated files.
2677 * Shared/WebPreferencesDefaultValues.h: Copied from Source/WebKit/Shared/WebPreferencesDefinitionsBase.h.
2678 * Shared/WebPreferencesDefinitionsBase.h:
2680 Renamed WebPreferencesDefinitionsBase.h to WebPreferencesDefaultValues.h to better indicate what it is.
2682 * Shared/WebPreferencesKeys.cpp: Removed.
2683 * Shared/WebPreferencesKeys.h: Removed.
2685 Replaced with generated versions.
2687 * Shared/WebPreferencesStore.cpp:
2688 (WebKit::defaults): Deleted.
2689 * Shared/WebPreferencesStore.h:
2691 Replace macro driven defaults map with generated WebPreferencesStoreDefaultsMap.cpp.
2693 2017-10-28 Chris Dumez <cdumez@apple.com>
2695 self.ExtendableEvent / Client / Clients / WindowClient do not exist in a Service Worker
2696 https://bugs.webkit.org/show_bug.cgi?id=178976
2698 Reviewed by Sam Weinig.
2700 Actually enable the Service Worker RuntimeEnabledFeature in the Service Worker
2703 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2704 (WebKit::WebSWContextManagerConnection::updatePreferences):
2706 2017-10-28 Joseph Pecoraro <pecoraro@apple.com>
2708 Make postprocess-framework-headers.sh a little easier to read
2709 https://bugs.webkit.org/show_bug.cgi?id=178971
2711 Reviewed by Sam Weinig.
2713 * mac/postprocess-framework-headers.sh:
2715 2017-10-27 Daniel Bates <dabates@apple.com>
2717 Attempt to fix the Apple El Capitan build following <https://trac.webkit.org/changeset/224134>
2718 (https://bugs.webkit.org/show_bug.cgi?id=178919)
2720 Move definition of NetworkLoad::isAllowedToAskUserForCredentials() outside of USE(NETWORK_SESSION)-guarded section.
2722 * NetworkProcess/NetworkLoad.cpp:
2723 (WebKit::NetworkLoad::isAllowedToAskUserForCredentials const):
2725 2017-10-27 Daniel Bates <dabates@apple.com>
2727 Only allow non-mixed content protected subresources to ask for credentials
2728 https://bugs.webkit.org/show_bug.cgi?id=178919
2729 <rdar://problem/35015245>
2731 Reviewed by Alex Christensen.
2733 Only allow non-mixed content protected subresources to ask for credentials. It is not meaningful
2734 to allow protected mixed-content subresources to ask for credentials.
2736 * NetworkProcess/Downloads/PendingDownload.cpp:
2737 (WebKit::PendingDownload::PendingDownload): Initialize m_isAllowedToAskUserForCredentials based on
2738 the specified resource load parameters or NetworkLoad object.
2739 * NetworkProcess/Downloads/PendingDownload.h: Add override for NetworkLoadClient::isAllowedToAskUserForCredentials().
2740 * NetworkProcess/NetworkLoad.cpp:
2741 (WebKit::NetworkLoad::isAllowedToAskUserForCredentials const): Added.
2742 (WebKit::NetworkLoad::completeAuthenticationChallenge): Ask NetworkLoadClient whether the load is
2743 allowed to prompt for credentials.
2744 (WebKit::NetworkLoad::didReceiveAuthenticationChallenge): Ditto.
2745 * NetworkProcess/NetworkLoad.h:
2746 * NetworkProcess/NetworkLoadClient.h:
2747 * NetworkProcess/NetworkResourceLoader.cpp:
2748 (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize m_isAllowedToAskUserForCredentials
2749 based on the specified resource load parameters.
2750 (WebKit::NetworkResourceLoader::willSendRedirectedRequest): We do not support prompting for credentials
2751 for synchronous loads.
2752 (WebKit::NetworkResourceLoader::continueWillSendRequest): Modified to take an argument as to whether the
2753 load is allowed to ask the user for credentials and updates state.
2754 * NetworkProcess/NetworkResourceLoader.h:
2755 * NetworkProcess/NetworkResourceLoader.messages.in: Modified message ContinueWillSendRequest to take a
2756 boolean as to whether the load is allowed to ask the user for credentials.
2757 * NetworkProcess/PreconnectTask.h: Override NetworkLoadClient::isAllowedToAskUserForCredentials()
2758 such that we never ask for credentials. This matches our current behavior.
2759 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Ditto.
2760 * WebProcess/Network/WebResourceLoader.cpp:
2761 (WebKit::WebResourceLoader::willSendRequest): Query ResourceLoader as to whether the load is allowed to
2762 ask the user for credentials and pass this state to NetworkResourceLoader.
2764 2017-10-27 Adrian Perez de Castro <aperez@igalia.com>
2766 [GTK][CMake] Incorrect conditional check when adding build dir to GIR runtime library path
2767 https://bugs.webkit.org/show_bug.cgi?id=178936
2769 Reviewed by Michael Catanzaro.
2771 * PlatformGTK.cmake: Fix spelling of variable used in conditional.
2773 2017-10-27 Chris Dumez <cdumez@apple.com>
2775 Add initial support for serviceWorkerClient.postMessage()
2776 https://bugs.webkit.org/show_bug.cgi?id=178794
2778 Reviewed by Youenn Fablet.
2780 Add initial support for serviceWorkerClient.postMessage():
2781 - https://w3c.github.io/ServiceWorker/#client-postmessage
2783 It is now possible to do bi-directional communication with a service worker
2786 * Shared/WebCoreArgumentCoders.cpp:
2787 (IPC::ArgumentCoder<ServiceWorkerClientIdentifier>::encode):
2788 (IPC::ArgumentCoder<ServiceWorkerClientIdentifier>::decode):
2789 * Shared/WebCoreArgumentCoders.h:
2790 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2791 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
2792 (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient):
2793 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
2794 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
2795 * StorageProcess/StorageProcess.cpp:
2796 (WebKit::StorageProcess::postMessageToServiceWorkerClient):
2797 * StorageProcess/StorageProcess.h:
2798 * StorageProcess/StorageProcess.messages.in:
2799 * WebProcess/Storage/WebSWClientConnection.cpp:
2800 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
2801 (WebKit::WebSWClientConnection::postMessageToServiceWorkerClient):
2802 * WebProcess/Storage/WebSWClientConnection.h:
2803 * WebProcess/Storage/WebSWClientConnection.messages.in:
2804 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2805 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
2806 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
2807 * WebProcess/Storage/WebSWContextManagerConnection.h:
2808 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
2810 2017-10-27 David Kilzer <ddkilzer@apple.com>
2812 REGRESSION (r224077): DeprecatedGlobalSettings::setAVKitEnabled() not protected by HAVE(AVKIT)
2814 Unreviewed build fix.
2816 * WebProcess/WebPage/WebPage.cpp:
2817 (WebKit::WebPage::updatePreferences): Fix build.
2819 2017-10-26 Jeremy Jones <jeremyj@apple.com>
2821 Implement seek tolerance methods in WebAVPlayerController.
2822 https://bugs.webkit.org/show_bug.cgi?id=178838
2823 rdar://problem/33781777
2825 Reviewed by Eric Carlson.
2827 This implementes additional methods on WebAVPlayerController that allows AVKit more control over seeking.
2829 * UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
2830 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
2831 (WebKit::PlaybackSessionModelContext::seekToTime):
2832 (WebKit::PlaybackSessionManagerProxy::seekToTime):
2833 * WebProcess/cocoa/PlaybackSessionManager.h:
2834 * WebProcess/cocoa/PlaybackSessionManager.messages.in:
2835 * WebProcess/cocoa/PlaybackSessionManager.mm:
2836 (WebKit::PlaybackSessionManager::seekToTime):
2838 2017-10-26 Brian Burg <bburg@apple.com>
2840 Web Automation: denying user permission for getUserMedia doesn't work
2841 https://bugs.webkit.org/show_bug.cgi?id=178895
2843 Reviewed by Youenn Fablet.
2845 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2846 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
2847 The ordering of special cases is incorrect. Safari configures its automation views to
2848 allow mock devices and never prompt for them. These checks were before the check for
2849 the automation session's getUserMedia permission. Switch these checks.
2851 Also change the deny reason so that subsequent requests are also denied. This matches
2852 behavior when a user denies a permission request on a real dialog. With this change,
2853 the DOM error changes from SecurityError to NotAllowedError, which makes more sense.
2855 2017-10-26 Michael Catanzaro <mcatanzaro@igalia.com>
2857 Unreviewed, fix GCC warning spam after r224077
2858 https://bugs.webkit.org/show_bug.cgi?id=178823
2860 Need to leave a blank line at the bottom of the file.
2862 * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
2864 2017-10-25 Simon Fraser <simon.fraser@apple.com>
2866 When navigating back to a page, compositing layers may not use accelerated drawing
2867 https://bugs.webkit.org/show_bug.cgi?id=178749
2868 rdar://problem/35158946
2870 Reviewed by Dean Jackson.
2872 Avoid assertions when a test enables accelerated drawing (which we can't support
2873 in the iOS simulator).
2875 * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
2876 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
2878 2017-10-26 Sam Weinig <sam@webkit.org>
2880 [Settings] Generate the bulk of WebPage::updatePreferences(...)
2881 https://bugs.webkit.org/show_bug.cgi?id=178823
2883 Reviewed by Tim Horton.
2886 * DerivedSources.make:
2887 * WebKit.xcodeproj/project.pbxproj:
2889 Add new file generation.
2891 * Scripts/GeneratePreferences.rb:
2893 Replace 'webkitOnly' boolean option with a new 'webcoreBinding' option.
2894 'webcoreBinding' supports the following values:
2895 - none (same as webkit only)
2896 - custom (means that you do bind to a webcore concept, but currently it must
2897 be done in a custom manner)
2898 - DeprecatedGlobalSettings (binds to a DeprecatedGlobalSettings setting)
2899 - RuntimeEnabledFeatures (binds to a RuntimeEnabledFeatures setting)
2900 If 'webcoreBinding' is not provided, the preference binds to WebCore Setting
2901 of either the same name or the override name provided by the new 'webcoreName'
2902 option (we should try to remove the need for 'webcoreName' by unifying with
2903 WebCore on preference/setting naming).
2905 A 'condition' option was also added to indicate that the preference is only available
2906 when that macro condition is true.
2908 Since we are generating most of WebPage::updatePreferences, we can simplify the
2909 macros in WebPreferencesDefinitions.h to only have normal/debug/experimental variants
2910 and remove the need for per-type macros, which were only used in WebPage::updatePreferences.
2912 * Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb: Added.
2914 Generates bindings from WebPreferences to WebCore::Settings/DeprecatedGlobalSettings/RuntimeEnabledFeatures.
2915 Does not generate a binding if the 'webcoreBinding' option is set to either 'none' or 'custom'.
2917 * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
2919 Simplify down to just normal/debug/experimental macros.
2921 * Shared/WebPreferences.yaml:
2923 Annotate perferences with new optional 'webcoreBinding', 'webcoreName', and 'condition'
2926 * WebProcess/WebPage/WebPage.cpp:
2927 (WebKit::WebPage::updatePreferences):
2929 Replace a ton of hand written preference to settings bindings with a call to updatePreferencesGenerated().
2931 * WebProcess/WebPage/WebPage.h:
2933 Add declaration of updatePreferencesGenerated, remove platformPreferencesDidChange.
2935 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2936 (WebKit::WebPage::platformPreferencesDidChange): Deleted.
2937 * WebProcess/WebPage/ios/WebPageIOS.mm:
2938 (WebKit::WebPage::platformPreferencesDidChange): Deleted.
2939 * WebProcess/WebPage/mac/WebPageMac.mm:
2940 (WebKit::WebPage::platformPreferencesDidChange): Deleted.
2941 * WebProcess/WebPage/win/WebPageWin.cpp:
2942 (WebKit::WebPage::platformPreferencesDidChange): Deleted.
2943 * WebProcess/WebPage/wpe/WebPageWPE.cpp:
2944 (WebKit::WebPage::platformPreferencesDidChange): Deleted.
2946 Remove all the empty platformPreferencesDidChange functions.
2948 2017-10-26 Alex Christensen <achristensen@webkit.org>
2950 Move WKWebViewConfiguration validation to WKWebView construction
2951 https://bugs.webkit.org/show_bug.cgi?id=178840
2953 Reviewed by Tim Horton.
2955 I'm trying to remove WKWebViewConfigurationInternal methods so I can make WKWebViewConfiguration
2956 a wrapper around an APIObject like all the other API objects. A small step towards making this easier
2957 is to remove the unnecessary method _validate and move its logic to its one callsite. I added an API test
2958 that ensures no change in behavior.
2960 * UIProcess/API/Cocoa/WKWebView.mm:
2961 (-[WKWebView _initializeWithConfiguration:]):
2962 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2963 (-[WKWebViewConfiguration _validate]): Deleted.
2964 * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2966 2017-10-26 Megan Gardner <megan_gardner@apple.com>
2968 Remove unneeded block selection calculation code
2969 https://bugs.webkit.org/show_bug.cgi?id=178889
2971 Reviewed by Tim Horton.
2973 Removing more block selection code. Much of this should have been removed
2974 before, as the only things that were using these functions were removed in the
2975 last patch. Also remove the code decided if you should move to block mode or not,
2976 as the answer now is always NO.
2978 * WebProcess/WebPage/WebPage.h:
2979 * WebProcess/WebPage/ios/WebPageIOS.mm:
2980 (WebKit::WebPage::updateSelectionWithTouches):
2981 (WebKit::WebPage::rangeForBlockAtPoint): Deleted.
2982 (WebKit::distanceBetweenRectsForPosition): Deleted.
2983 (WebKit::rectsEssentiallyTheSame): Deleted.
2984 (WebKit::unionDOMRanges): Deleted.
2985 (WebKit::computeEdgeCenter): Deleted.
2986 (WebKit::WebPage::expandedRangeFromHandle): Deleted.
2987 (WebKit::WebPage::contractedRangeFromHandle): Deleted.
2988 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Deleted.
2989 (WebKit::WebPage::switchToBlockSelectionAtPoint): Deleted.
2990 (WebKit::WebPage::shouldSwitchToBlockModeForHandle): Deleted.
2992 2017-10-26 Jeremy Jones <jeremyj@apple.com>
2994 Call setFullscreenClient on iOS.
2995 https://bugs.webkit.org/show_bug.cgi?id=178089
2997 Reviewed by Simon Fraser.
2999 This was only being set for MacOS.
3001 * UIProcess/ios/WKContentView.mm:
3002 (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
3004 2017-10-26 Eric Carlson <eric.carlson@apple.com>
3006 NowPlayingInfo should contain a unique identifier
3007 https://bugs.webkit.org/show_bug.cgi?id=178872
3009 Reviewed by Jer Noble.
3011 * UIProcess/API/Cocoa/WKWebView.mm:
3012 (-[WKWebView _requestActiveNowPlayingSessionInfo:]): Take a completion handler.
3013 (-[WKWebView _requestActiveNowPlayingSessionInfo]): Deleted.
3014 (-[WKWebView _handleActiveNowPlayingSessionInfoResponse:title:duration:elapsedTime:]): Deleted.
3015 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3016 * UIProcess/PageClient.h:
3018 * UIProcess/WebPageProxy.cpp:
3019 (WebKit::WebPageProxy::requestActiveNowPlayingSessionInfo): Ditto.
3020 (WebKit::WebPageProxy::nowPlayingInfoCallback): Lookup and call completion handler.
3021 (WebKit::WebPageProxy::handleActiveNowPlayingSessionInfoResponse const): Deleted.
3022 * UIProcess/WebPageProxy.h:
3023 * UIProcess/WebPageProxy.messages.in:
3025 * UIProcess/ios/PageClientImplIOS.h:
3026 * UIProcess/ios/PageClientImplIOS.mm:
3027 (WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse): Deleted.
3029 * UIProcess/mac/PageClientImplMac.h:
3030 * UIProcess/mac/PageClientImplMac.mm:
3031 (WebKit::PageClientImpl::handleActiveNowPlayingSessionInfoResponse): Deleted.
3033 * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
3034 (WebKit::WebPage::requestActiveNowPlayingSessionInfo): Take callback ID. Pass unique ID.
3035 * WebProcess/WebPage/WebPage.h:
3036 * WebProcess/WebPage/WebPage.messages.in:
3038 2017-10-26 Andy Estes <aestes@apple.com>
3040 [Payment Request] Enable Payment Request whenever Apple Pay is enabled
3041 https://bugs.webkit.org/show_bug.cgi?id=178880
3043 Reviewed by Tim Horton.
3045 * Shared/WebPreferences.yaml:
3046 * UIProcess/API/C/WKPreferences.cpp:
3047 (WKPreferencesSetPaymentRequestEnabled): Deleted.
3048 (WKPreferencesGetPaymentRequestEnabled): Deleted.
3049 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3050 * WebProcess/WebPage/WebPage.cpp:
3051 (WebKit::WebPage::updatePreferences):
3053 2017-10-26 Chris Dumez <cdumez@apple.com>
3055 Bring back SWContextManager abstraction in WebCore
3056 https://bugs.webkit.org/show_bug.cgi?id=178876
3058 Reviewed by Geoffrey Garen.
3060 Bring back SWContextManager abstraction in WebCore. It was killed in <https://trac.webkit.org/changeset/223718> but
3061 is actually useful when the ServiceWorker wants to message the storage process.
3064 * DerivedSources.make:
3065 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3066 (WebKit::WebSWServerConnection::startServiceWorkerContext):
3067 (WebKit::WebSWServerConnection::startFetch):
3068 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
3069 * WebKit.xcodeproj/project.pbxproj:
3070 * WebProcess/Storage/WebSWContextManagerConnection.cpp: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.cpp.
3071 (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
3072 (WebKit::WebSWContextManagerConnection::updatePreferences):
3073 (WebKit::WebSWContextManagerConnection::startServiceWorker):
3074 (WebKit::WebSWContextManagerConnection::startFetch):
3075 (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerGlobalScope):
3076 * WebProcess/Storage/WebSWContextManagerConnection.h: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
3077 * WebProcess/Storage/WebSWContextManagerConnection.messages.in: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.messages.in.
3078 * WebProcess/WebProcess.cpp:
3079 (WebKit::WebProcess::didReceiveMessage):
3080 (WebKit::WebProcess::getWorkerContextConnection):
3081 * WebProcess/WebProcess.h:
3083 2017-10-26 Alexey Proskuryakov <ap@apple.com>
3085 Remove deprecated WebKit symbols
3086 https://bugs.webkit.org/show_bug.cgi?id=178875
3087 rdar://problem/31139070
3089 Reviewed by Dan Bernstein.
3091 * PlatformMac.cmake:
3092 * Shared/API/c/WKDeprecatedFunctions.cpp:
3093 (WKContextSetProcessModel):
3094 (WKPageGroupCopyIdentifier): Deleted.
3095 (WKPageGroupAddUserContentFilter): Deleted.
3096 (WKPageGroupRemoveUserContentFilter): Deleted.
3097 * UIProcess/API/C/WKPageGroup.h:
3098 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Removed.
3099 * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
3100 * WebKit.xcodeproj/project.pbxproj:
3102 2017-10-26 Ryan Haddad <ryanhaddad@apple.com>
3104 Unreviewed, rolling out r223984.
3106 Caused LayoutTest assertion failures.
3110 "When navigating back to a page, compositing layers may not
3111 use accelerated drawing"
3112 https://bugs.webkit.org/show_bug.cgi?id=178749
3113 https://trac.webkit.org/changeset/223984
3115 2017-10-26 Megan Gardner <megan_gardner@apple.com>
3117 Remove code to update block selection
3118 https://bugs.webkit.org/show_bug.cgi?id=178843
3120 Reviewed by Tim Horton.
3122 Removes code for updating block selection, which has been disabled.
3123 This code is being slowly pruned to avoid regressions and accidental removal of code that is being used.
3125 * Platform/spi/ios/UIKitSPI.h:
3126 * UIProcess/PageClient.h:
3127 * UIProcess/WebPageProxy.h:
3128 * UIProcess/WebPageProxy.messages.in:
3129 * UIProcess/ios/PageClientImplIOS.h:
3130 * UIProcess/ios/PageClientImplIOS.mm:
3131 (WebKit::PageClientImpl::didUpdateBlockSelectionWithTouch): Deleted.
3132 * UIProcess/ios/WKContentViewInteraction.h:
3133 * UIProcess/ios/WKContentViewInteraction.mm:
3134 (toSelectionHandlePosition): Deleted.
3135 (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]): Deleted.
3136 (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]): Deleted.
3137 * UIProcess/ios/WebPageProxyIOS.mm:
3138 (WebKit::WebPageProxy::updateBlockSelectionWithTouch): Deleted.
3139 (WebKit::WebPageProxy::didUpdateBlockSelectionWithTouch): Deleted.
3140 * WebProcess/WebPage/WebPage.h:
3141 * WebProcess/WebPage/WebPage.messages.in:
3142 * WebProcess/WebPage/ios/WebPageIOS.mm:
3143 (WebKit::shouldExpand): Deleted.
3144 (WebKit::WebPage::changeBlockSelection): Deleted.
3145 (WebKit::WebPage::updateBlockSelectionWithTouch): Deleted.
3147 2017-10-26 Ryan Haddad <ryanhaddad@apple.com>
3149 Unreviewed, rolling out r223994.
3151 The LayoutTest for this change is failing.
3155 "Add service worker handle fetch support for all subresource
3157 https://bugs.webkit.org/show_bug.cgi?id=178769
3158 https://trac.webkit.org/changeset/223994
3160 2017-10-26 Ryan Haddad <ryanhaddad@apple.com>
3162 Unreviewed, rolling out r223908.
3164 Causes LayoutTest crashes with newer SDKs.
3168 "Adopt new secure coding APIs"
3169 https://bugs.webkit.org/show_bug.cgi?id=178484
3170 https://trac.webkit.org/changeset/223908
3172 2017-10-26 Christopher Reid <chris.reid@sony.com>
3174 Remove scopeguard from platform
3175 https://bugs.webkit.org/show_bug.cgi?id=178681
3177 Reviewed by Brady Eidson.
3179 * Shared/mac/ChildProcessMac.mm:
3181 2017-10-25 Per Arne Vollan <pvollan@apple.com>
3183 Network process crash under WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge.
3184 https://bugs.webkit.org/show_bug.cgi?id=160234
3185 rdar://problem/30675510
3187 Reviewed by Geoffrey Garen.
3189 An exception is raised because we call the method rejectProtectionSpaceAndContinueWithChallenge on the CFNetwork
3190 challenge sender, which does not implement this optional method. The methods on the authentication challenge
3191 sender are deprecated when network session is used, so we should not call them in that case.
3193 * Shared/Authentication/AuthenticationManager.cpp:
3194 (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
3195 (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
3196 (WebKit::AuthenticationManager::cancelSingleChallenge):
3197 (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
3198 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
3199 * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
3200 (WebKit::AuthenticationManager::receivedCredential):
3201 (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
3202 (WebKit::AuthenticationManager::receivedCancellation):
3203 (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
3204 (WebKit::AuthenticationManager::receivedChallengeRejection):
3205 * Shared/Authentication/soup/AuthenticationManagerSoup.cpp:
3207 2017-10-25 Youenn Fablet <youenn@apple.com>
3209 Move DNS resolution outside of NetworkRTCProvider
3210 https://bugs.webkit.org/show_bug.cgi?id=178796
3212 Reviewed by Geoffrey Garen.
3214 Tested through manual testing on external STUN servers.
3215 Moving NetworkRTCProvider::Resolver into NetworkRTCResolver.
3216 Updating the implementation to use a completion handler.
3218 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
3219 (WebKit::NetworkRTCProvider::createResolver):
3220 * NetworkProcess/webrtc/NetworkRTCProvider.h:
3221 * NetworkProcess/webrtc/NetworkRTCResolver.cpp:
3222 (WebKit::NetworkRTCResolver::NetworkRTCResolver):
3223 (WebKit::NetworkRTCResolver::~NetworkRTCResolver):
3224 (WebKit::NetworkRTCResolver::start):
3225 (WebKit::NetworkRTCResolver::stop):
3226 (WebKit::NetworkRTCResolver::completed):
3227 (WebKit::NetworkRTCProvider::Resolver::~Resolver): Deleted.
3228 (WebKit::NetworkRTCProvider::stop): Deleted.
3229 (WebKit::NetworkRTCProvider::resolutionCompleted): Deleted.
3230 * NetworkProcess/webrtc/NetworkRTCResolver.h:
3231 * WebKit.xcodeproj/project.pbxproj:
3233 2017-10-25 Eric Carlson <eric.carlson@apple.com>
3235 [MediaStream] Clear cached gUM prompt state
3236 https://bugs.webkit.org/show_bug.cgi?id=178754
3237 <rdar://problem/32742356>
3239 Reviewed by Youenn Fablet.
3241 * Shared/WebPreferences.yaml: Define new settings.
3243 * Shared/WebPreferencesDefinitionsBase.h: New default values.
3245 * UIProcess/API/C/WKPreferences.cpp:
3246 (WKPreferencesSetInactiveMediaCaptureSteamRepromptIntervalInMinutes): New.
3247 (WKPreferencesGetInactiveMediaCaptureSteamRepromptIntervalInMinutes): Ditto.
3248 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3250 * UIProcess/API/Cocoa/WKPreferences.mm:
3251 (-[WKPreferences _inactiveMediaCaptureSteamRepromptIntervalInMinutes]): Ditto.
3252 (-[WKPreferences _setInactiveMediaCaptureSteamRepromptIntervalInMinutes:]): Ditto.
3253 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3255 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3256 (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Initialize
3258 (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Remove unneeded namespace.
3259 (WebKit::toWebCore): Remove unneeded breaks.
3260 (WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const): Remove unneeded namespace.
3261 (WebKit::UserMediaPermissionRequestManagerProxy::wasRequestDenied): Ditto.
3262 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Ditto.
3263 (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Ditto.
3264 (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Ditto.
3265 (WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs const): Ditto.
3266 (WebKit::UserMediaPermissionRequestManagerProxy::captureStateChanged): Set the watchdog timer
3267 to the correct interval based on capture state.
3268 (WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired): Clear cached state.
3269 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3271 2017-10-25 Simon Fraser <simon.fraser@apple.com>
3273 When navigating back to a page, compositing layers may not use accelerated drawing
3274 https://bugs.webkit.org/show_bug.cgi?id=178749
3275 rdar://problem/35158946
3277 Reviewed by Dean Jackson.
3279 Avoid assertions when a test enables accelerated drawing (which we can't support
3280 in the iOS simulator).
3282 * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
3283 (WebKit::RemoteLayerBackingStore::ensureBackingStore):
3285 2017-10-25 Youenn Fablet <youenn@apple.com>
3287 Enable ServiceWorker to fetch resources
3288 https://bugs.webkit.org/show_bug.cgi?id=178673
3290 Reviewed by Brady Eidson.
3292 ServiceWorkerContextManager makes use of the new ServiceWorkerThreadProxy.
3293 It creates the necessary environment for the thread to make use of network loads, web sockets and cache storage.
3294 Fetch is functional with these changes.
3296 ServiceWorkerProcessProxy is introduced as a UIProcess proxy to the service worker process.
3297 This process proxy is responsible to give the pageID used by all service worker thread instances for network loads.
3298 ServiceWorkerContextManager is responsible to give a unique frameID for all service worker threads.
3299 This is necessary as these two ids are currently needed for any network load.
3301 ServiceWorkerThreadProxy creates its own FrameLoaderClient which is now used to get pageID, frameID and sessionID.
3303 * UIProcess/ServiceWorkerProcessProxy.cpp: Added.
3304 (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
3305 (WebKit::m_serviceWorkerPageID):
3306 (WebKit::ServiceWorkerProcessProxy::~ServiceWorkerProcessProxy):
3307 (WebKit::ServiceWorkerProcessProxy::start):
3308 * UIProcess/ServiceWorkerProcessProxy.h: Added.
3309 * UIProcess/WebProcessPool.cpp:
3310 (WebKit::WebProcessPool::getWorkerContextProcessConnection):
3311 (WebKit::WebProcessPool::createNewWebProcess):
3312 (WebKit::WebProcessPool::initializeNewWebProcess):
3313 (WebKit::WebProcessPool::disconnectProcess):
3314 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
3315 (WebKit::WebProcessPool::createWebPage):
3316 * UIProcess/WebProcessPool.h:
3317 * UIProcess/WebProcessProxy.cpp:
3318 (WebKit::WebProcessProxy::generatePageID):
3319 * UIProcess/WebProcessProxy.h:
3320 * WebKit.xcodeproj/project.pbxproj:
3321 * WebProcess/Network/WebLoaderStrategy.cpp:
3322 (WebKit::WebLoaderStrategy::scheduleLoad):
3323 (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
3324 (WebKit::WebLoaderStrategy::startPingLoad):
3325 * WebProcess/Network/WebLoaderStrategy.h:
3326 * WebProcess/Storage/ServiceWorkerContextManager.cpp:
3327 (WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):
3328 (WebKit::ServiceWorkerContextManager::startServiceWorker):
3329 (WebKit::ServiceWorkerContextManager::startFetch):
3330 * WebProcess/Storage/ServiceWorkerContextManager.h:
3331 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3332 (WebKit::WebFrameLoaderClient::pageID const):
3333 (WebKit::WebFrameLoaderClient::frameID const):
3334 (WebKit::WebFrameLoaderClient::sessionID const):
3335 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3336 * WebProcess/WebProcess.cpp:
3337 (WebKit::WebProcess::getWorkerContextConnection):
3338 * WebProcess/WebProcess.h:
3339 * WebProcess/WebProcess.messages.in:
3341 2017-10-25 Yousuke Kimoto <yousuke.kimoto@sony.com>
3343 [WinCairo] Add WebKit platform files for wincairo webkit
3344 https://bugs.webkit.org/show_bug.cgi?id=178000
3346 Reviewed by Alex Christensen.
3348 * Platform/Module.h:
3349 * Platform/SharedMemory.h:
3350 (WebKit::SharedMemory::handle const):
3351 * Platform/win/LoggingWin.cpp: Added. It is based on Source/WebCore/platform/win/LoggingWin.cpp
3352 (WebKit::logLevelString):
3353 * Platform/win/ModuleWin.cpp: Added.
3354 (WebKit::Module::load):
3355 (WebKit::Module::unload):
3356 (WebKit::Module::platformFunctionPointer const):
3357 * Platform/win/SharedMemoryWin.cpp: Added.
3358 (WebKit::SharedMemory::Handle::Handle):
3359 (WebKit::SharedMemory::Handle::~Handle):
3360 (WebKit::SharedMemory::Handle::isNull const):
3361 (WebKit::SharedMemory::Handle::encode const):
3362 (WebKit::SharedMemory::Handle::clear):
3363 (WebKit::getDuplicatedHandle):
3364 (WebKit::SharedMemory::Handle::decode):
3365 (WebKit::protectAttribute):
3366 (WebKit::SharedMemory::allocate):
3367 (WebKit::SharedMemory::create):
3368 (WebKit::accessRights):
3369 (WebKit::SharedMemory::map):
3370 (WebKit::SharedMemory::adopt):
3371 (WebKit::SharedMemory::~SharedMemory):
3372 (WebKit::SharedMemory::createHandle):
3373 (WebKit::SharedMemory::systemPageSize):
3374 * PlatformWin.cmake:
3376 2017-10-25 Chris Dumez <cdumez@apple.com>
3378 Add support for unregistering a service worker
3379 https://bugs.webkit.org/show_bug.cgi?id=178735
3381 Reviewed by Brady Eidson.
3383 Add support for unregistering a service worker:
3384 - https://w3c.github.io/ServiceWorker/#navigator-service-worker-unregister
3386 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3387 (WebKit::WebSWServerConnection::resolveRegistrationJobInClient):
3388 (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
3389 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3390 * WebProcess/Storage/WebSWClientConnection.messages.in:
3392 2017-10-25 Chris Dumez <cdumez@apple.com>
3394 Make SharedStringHashTable less error prone
3395 https://bugs.webkit.org/show_bug.cgi?id=178764
3397 Reviewed by Youenn Fablet.
3399 SharedStringHashTable is backed by SharedMemory and this SharedMemory
3400 may be readonly (and is when used in the WebContent process). As a result,
3401 some of the operations on SharedStringHashTable that write to this shared
3402 memory will crash if called and the SharedMemory is readonly.
3404 To make this less error prone, introduce a new SharedStringHashTableReadOnly
3405 base class for SharedStringHashTable and only keep the operations that
3406 write to the shared memory on SharedStringHashTableReadOnly (namely, add() /
3407 remove() / clear(). Update VisitedLinkTableController and WebSWOriginTable
3408 to use SharedStringHashTableReadOnly since they are instantiated in the
3409 WebContent process and use readonly shared memory.
3411 * Shared/SharedStringHashTable.cpp:
3412 (WebKit::SharedStringHashTableReadOnly::SharedStringHashTableReadOnly):
3413 (WebKit::SharedStringHashTableReadOnly::~SharedStringHashTableReadOnly):
3414 (WebKit::SharedStringHashTableReadOnly::setSharedMemory):
3415 (WebKit::doubleHash):
3416 (WebKit::SharedStringHashTableReadOnly::contains const):
3417 (WebKit::SharedStringHashTableReadOnly::findSlot const):
3418 (WebKit::SharedStringHashTable::SharedStringHashTable):
3419 (WebKit::SharedStringHashTable::~SharedStringHashTable):
3420 (WebKit::SharedStringHashTable::add):
3421 (WebKit::SharedStringHashTable::remove):
3422 (WebKit::SharedStringHashTable::clear):
3423 * Shared/SharedStringHashTable.h:
3424 * WebProcess/Storage/WebSWOriginTable.h:
3425 * WebProcess/WebPage/VisitedLinkTableController.cpp:
3426 (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
3427 * WebProcess/WebPage/VisitedLinkTableController.h:
3429 2017-10-25 Adrian Perez de Castro <aperez@igalia.com>
3431 [WPE] Remove GLib API functions which use Cairo
3432 https://bugs.webkit.org/show_bug.cgi?id=178205
3434 Reviewed by Michael Catanzaro.
3436 Add PLATFORM(GTK) guards for the parts of of the GLib API which use cairo_surface_t (web
3437 page snapshots and favicons), and remove the affected function prototypes from public API
3438 headers. This way, the WPE version of the API is not tied to Cairo.
3440 * PlatformWPE.cmake:
3441 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
3442 * UIProcess/API/glib/WebKitFaviconDatabasePrivate.h:
3443 * UIProcess/API/glib/WebKitInjectedBundleClient.cpp:
3444 * UIProcess/API/glib/WebKitWebView.cpp:
3445 (webkitWebViewConstructed):
3446 (webkitWebViewGetProperty):
3447 (webkitWebViewDispose):
3448 (webkit_web_view_class_init):
3449 (webkitWebViewLoadChanged):
3450 * UIProcess/API/glib/WebKitWebViewPrivate.h:
3451 * UIProcess/API/wpe/WebKitFaviconDatabase.h:
3452 * UIProcess/API/wpe/WebKitWebView.h:
3453 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
3454 (webkitWebPageDidReceiveMessage):
3456 2017-10-25 Zan Dobersek <zdobersek@igalia.com>
3458 Make SERVICE_WORKER feature buildable on GTK, WPE
3459 https://bugs.webkit.org/show_bug.cgi?id=178574
3461 Reviewed by Carlos Garcia Campos.
3463 * CMakeLists.txt: Add missing files to the build.
3464 * StorageProcess/StorageProcess.cpp:
3465 (WebKit::StorageProcess::didGetWorkerContextProcessConnection):
3466 IPC::Attachment object should be accessed through an rvalue reference,
3467 making it mutable and enabling releasing the file descriptor.
3468 * StorageProcess/StorageProcess.h: Adjust the method signature.
3469 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3470 Explicitly include the ResourceError header from WebCore (using a forwarding header).
3471 * WebProcess/Storage/WebServiceWorkerProvider.cpp:
3472 Include the CachedResource header from WebCore (again using a forwarding header).
3473 * WebProcess/Storage/WebServiceWorkerProvider.h: Forward-declare the WebCore::CachedResource type.
3475 2017-10-24 Youenn Fablet <youenn@apple.com>
3477 ServiceWorkerClientFetch should return an error that is not null in case of failure
3478 https://bugs.webkit.org/show_bug.cgi?id=178761
3480 Reviewed by Geoffrey Garen.
3482 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3483 (WebKit::ServiceWorkerClientFetch::didFail): Generating a General error.
3485 2017-10-24 Youenn Fablet <youenn@apple.com>
3487 Enable service worker to use cache storage api
3488 https://bugs.webkit.org/show_bug.cgi?id=178684
3490 Reviewed by Brady Eidson.
3492 Passing the WebPreferences store of the default page group of the WebProcessPool to its ServiceWorker process.
3493 ServiceWorkerContextManager then uses it to initialize the preferences accordingly.
3494 Patch is covered by new test which is using cache api previously disabled and now enabled through the store.
3496 Made use of the new ServiceWorkerThreadProxy in ServiceWorkerContextManager to enable a cache storage connection.
3497 Fixed the default size of quota in WebsiteDataStore.
3499 * UIProcess/WebProcessPool.cpp:
3500 (WebKit::WebProcessPool::getWorkerContextProcessConnection):
3501 * UIProcess/WebsiteData/WebsiteDataStore.h:
3502 * WebProcess/Storage/ServiceWorkerContextManager.cpp:
3503 (WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):
3504 (WebKit::ServiceWorkerContextManager::updatePreferences):
3505 (WebKit::ServiceWorkerContextManager::startServiceWorker):
3506 (WebKit::ServiceWorkerContextManager::startFetch):
3507 * WebProcess/Storage/ServiceWorkerContextManager.h:
3508 (WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager): Deleted.
3509 * WebProcess/WebProcess.cpp:
3510 (WebKit::WebProcess::getWorkerContextConnection):
3511 * WebProcess/WebProcess.h:
3512 * WebProcess/WebProcess.messages.in:
3514 2017-10-24 Alex Christensen <achristensen@webkit.org>
3516 Selecting and right-clicking URL-like strings with IDNA-disallowed characters in host or authority causes rendering engine crash
3517 https://bugs.webkit.org/show_bug.cgi?id=174267
3519 Reviewed by Tim Horton.
3521 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3522 (WKBundlePageCanHandleRequest):
3524 2017-10-24 Chris Dumez <cdumez@apple.com>
3526 Add initial implementation for serviceWorker.postMessage()
3527 https://bugs.webkit.org/show_bug.cgi?id=178534
3529 Reviewed by Youenn Fablet.
3531 Add initial implementation for serviceWorker.postMessage():
3532 - https://w3c.github.io/ServiceWorker/#service-worker-postmessage
3534 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3535 (WebKit::WebSWServerConnection::postMessageToServiceWorkerGlobalScope):
3536 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3537 * StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
3538 * WebProcess/Storage/ServiceWorkerContextManager.cpp:
3539 (WebKit::ServiceWorkerContextManager::postMessageToServiceWorkerGlobalScope):
3540 * WebProcess/Storage/ServiceWorkerContextManager.h:
3541 * WebProcess/Storage/ServiceWorkerContextManager.messages.in:
3542 * WebProcess/Storage/WebSWClientConnection.cpp:
3543 (WebKit::WebSWClientConnection::postMessageToServiceWorkerGlobalScope):
3544 * WebProcess/Storage/WebSWClientConnection.h:
3546 2017-10-24 Brent Fulgham <bfulgham@apple.com>
3548 Adopt new secure coding APIs
3549 https://bugs.webkit.org/show_bug.cgi?id=178484
3550 <rdar://problem/34837193>
3552 Reviewed by Tim Horton.
3554 Switch to new NSKeyed[Un]Archiver methods that active and use
3555 NSSecureCoding by default.
3557 * Platform/ios/AccessibilityIOS.mm:
3558 (WebKit::newAccessibilityRemoteToken): Use secure-by-default API.
3559 * Shared/Cocoa/DataDetectionResult.mm:
3560 (WebKit::DataDetectionResult::encode const): Ditto.
3561 (WebKit::DataDetectionResult::decode): Ditto.
3562 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
3563 (IPC::ArgumentCoder<WebCore::Payment>::encode): Ditto.
3564 (IPC::ArgumentCoder<WebCore::Payment>::decode): Ditto.
3565 (IPC::ArgumentCoder<WebCore::PaymentContact>::encode): Ditto.
3566 (IPC::ArgumentCoder<WebCore::PaymentContact>::decode): Ditto.
3567 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode): Ditto.
3568 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode): Ditto.
3569 (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode): Ditto.
3570 (IPC::ArgumentCoder<WebCore::PaymentMethod>::decode): Ditto.
3571 * Shared/ios/InteractionInformationAtPosition.mm:
3572 (WebKit::InteractionInformationAtPosition::encode const): Ditto.
3573 (WebKit::InteractionInformationAtPosition::decode): Ditto.
3574 * Shared/mac/WebCoreArgumentCodersMac.mm:
3575 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Ditto.
3576 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Ditto.
3577 (IPC::ArgumentCoder<Credential>::encodePlatformData): Ditto.
3578 (IPC::ArgumentCoder<Credential>::decodePlatformData): Ditto.
3579 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode): Ditto.
3580 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode): Ditto.
3581 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
3582 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
3583 * Shared/mac/WebHitTestResultData.mm:
3584 (WebKit::WebHitTestResultData::platformEncode const): Ditto.
3585 (WebKit::WebHitTestResultData::platformDecode): Ditto.
3586 * UIProcess/API/Cocoa/WKProcessPool.mm:
3587 (-[WKProcessPool _setObject:forBundleParameter:]): Ditto.
3588 (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]): Ditto.
3589 * UIProcess/API/Cocoa/WKWebView.mm:
3590 (-[WKWebView _setInputDelegate:]): Ditto.
3591 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3592 (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
3593 * UIProcess/ios/PageClientImplIOS.mm:
3594 (WebKit::PageClientImpl::startAssistingNode): Ditto.
3595 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3596 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Ditto.
3597 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3598 (WebKit::InjectedBundle::initialize): Ditto.
3599 (WebKit::InjectedBundle::setBundleParameter): Ditto.
3600 (WebKit::InjectedBundle::setBundleParameters): Ditto.
3602 2017-10-24 Sam Weinig <sam@webkit.org>
3604 [Settings] Add initial support for generating preferences related code
3605 https://bugs.webkit.org/show_bug.cgi?id=178656
3607 Reviewed by Dean Jackson.
3609 As a first step towards getting off the macros in WebPreferencesDefinitions.h
3610 and reducing the overhead of adding a preference, this change generates adds
3611 WebPreferences.yaml where preference changes will go, and generates much of
3612 WebPreferencesDefinitions.h from it (all the custom defaults moved to
3613 WebPreferencesDefinitionsBase.h). Subsequent changes will remove the need for
3614 the macros in WebPreferencesDefinitions.h entirely.
3617 * DerivedSources.make:
3618 * WebKit.xcodeproj/project.pbxproj:
3620 Add new files / rules to generate WebPreferencesDefinitions.h.
3622 * Scripts/GeneratePreferences.rb: Added.
3623 * Scripts/PreferencesTemplates: Added.
3624 * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb: Added.
3626 Add scripts and template to generate WebPreferencesDefinitions.h from
3627 WebPreferences.yaml.
3629 * Shared/WebPreferences.yaml: Added.
3631 Configuration file for preferences.
3633 * Shared/WebPreferencesDefinitions.h: Removed.
3634 * Shared/WebPreferencesDefinitionsBase.h: Copied from Source/WebKit/Shared/WebPreferencesDefinitions.h.
3636 Moved custom defaults to new WebPreferencesDefinitionsBase.h. Removed the need for
3637 FOR_EACH_WEBKIT_STRING_PREFERENCE by using custom defaults for the font family values.
3639 2017-10-24 Matt Lewis <jlewis3@apple.com>
3641 Unreviewed, rolling out r223889.
3643 This caused multiple crashes on all platforms
3647 "Adopt new secure coding APIs"
3648 https://bugs.webkit.org/show_bug.cgi?id=178484
3649 https://trac.webkit.org/changeset/223889
3651 2017-10-24 Youenn Fablet <youenn@apple.com>
3653 ASSERTION FAILED: !m_serviceWorkerManager in WebProcess::getWorkerContextConnection() on API tests
3654 https://bugs.webkit.org/show_bug.cgi?id=178586
3655 <rdar://problem/35115902>
3657 Reviewed by Brady Eidson.
3659 Covered by API tests no longer crashing.
3661 * UIProcess/WebProcessPool.cpp:
3662 (WebKit::WebProcessPool::getWorkerContextProcessConnection): Sending a worker context process connection message only at creation of the service worker process.
3664 2017-10-24 Brent Fulgham <bfulgham@apple.com>
3666 Adopt new secure coding APIs
3667 https://bugs.webkit.org/show_bug.cgi?id=178484
3668 <rdar://problem/34837193>
3670 Reviewed by Tim Horton.
3672 Switch to new NSKeyed[Un]Archiver methods that active and use
3673 NSSecureCoding by default.
3675 * Platform/ios/AccessibilityIOS.mm:
3676 (WebKit::newAccessibilityRemoteToken): Use secure-by-default API.
3677 * Shared/Cocoa/DataDetectionResult.mm:
3678 (WebKit::DataDetectionResult::encode const): Ditto.
3679 (WebKit::DataDetectionResult::decode): Ditto.
3680 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
3681 (IPC::ArgumentCoder<WebCore::Payment>::encode): Ditto.
3682 (IPC::ArgumentCoder<WebCore::Payment>::decode): Ditto.
3683 (IPC::ArgumentCoder<WebCore::PaymentContact>::encode): Ditto.
3684 (IPC::ArgumentCoder<WebCore::PaymentContact>::decode): Ditto.
3685 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode): Ditto.
3686 (IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode): Ditto.
3687 (IPC::ArgumentCoder<WebCore::PaymentMethod>::encode): Ditto.
3688 (IPC::ArgumentCoder<WebCore::PaymentMethod>::decode): Ditto.
3689 * Shared/ios/InteractionInformationAtPosition.mm:
3690 (WebKit::InteractionInformationAtPosition::encode const): Ditto.
3691 (WebKit::InteractionInformationAtPosition::decode): Ditto.
3692 * Shared/mac/WebCoreArgumentCodersMac.mm:
3693 (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Ditto.
3694 (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Ditto.
3695 (IPC::ArgumentCoder<Credential>::encodePlatformData): Ditto.
3696 (IPC::ArgumentCoder<Credential>::decodePlatformData): Ditto.
3697 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode): Ditto.
3698 (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode): Ditto.
3699 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
3700 (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.
3701 * Shared/mac/WebHitTestResultData.mm:
3702 (WebKit::WebHitTestResultData::platformEncode const): Ditto.
3703 (WebKit::WebHitTestResultData::platformDecode): Ditto.
3704 * UIProcess/API/Cocoa/WKProcessPool.mm:
3705 (-[WKProcessPool _setObject:forBundleParameter:]): Ditto.
3706 (-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]): Ditto.
3707 * UIProcess/API/Cocoa/WKWebView.mm:
3708 (-[WKWebView _setInputDelegate:]): Ditto.
3709 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3710 (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
3711 * UIProcess/ios/PageClientImplIOS.mm:
3712 (WebKit::PageClientImpl::startAssistingNode): Ditto.
3713 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3714 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Ditto.
3715 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3716 (WebKit::InjectedBundle::initialize): Ditto.
3717 (WebKit::InjectedBundle::setBundleParameter): Ditto.
3718 (WebKit::InjectedBundle::setBundleParameters): Ditto.
3720 2017-10-24 Zan Dobersek <zdobersek@igalia.com>
3722 [GTK][WPE] generate-forwarding-headers.pl should also scan derived sources in WebKit framework
3723 https://bugs.webkit.org/show_bug.cgi?id=178579
3725 Reviewed by Carlos Garcia Campos.
3727 * PlatformGTK.cmake: When generating forwarding headers, derived sources
3728 should be scanned as well. The DERIVED_SOURCES_WEBKIT_DIR value has to
3729 be passed as an include path to the generate-forward-headers.pl script
3730 to achieve that. This target then also has to depend on all the derived
3731 source files to be generated before this can be performed.
3732 * PlatformWPE.cmake: Ditto.
3734 2017-10-23 Brian Burg <bburg@apple.com>
3736 [Cocoa] Web Automation: add SPI to tell whether the automation session is currently simulating user interactions
3737 https://bugs.webkit.org/show_bug.cgi?id=178616
3739 Reviewed by Joseph Pecoraro.
3741 This is needed to disambiguate whether an action (such as selectAll:) came from
3742 a user clicking on "Edit > Select All" in a menu or whether it was produced by
3743 simulating the keystrokes to produce the chord for "Command + a". Some clients,
3744 such as Safari, would allow the latter but not the former during automation.
3746 * UIProcess/API/Cocoa/_WKAutomationSession.h:
3747 * UIProcess/API/Cocoa/_WKAutomationSession.mm:
3748 (-[_WKAutomationSession isSimulatingUserInteraction]):
3749 Add new SPI property that's backed by the same WebAutomationSession method.
3751 * UIProcess/Automation/WebAutomationSession.h:
3752 * UIProcess/Automation/WebAutomationSession.cpp:
3753 (WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
3754 (WebKit::WebAutomationSession::performMouseInteraction):
3755 (WebKit::WebAutomationSession::performKeyboardInteractions):
3756 Set m_simulatingUserInteraction prior to sending the synthesized events. It will
3757 be cleared when keyboardEventsFlushedForPage() is called by WebPageProxy.
3759 * UIProcess/WebPageProxy.cpp:
3760 (WebKit::WebPageProxy::didReceiveEvent):
3761 Notify the automation session that the key event queue was flushed *after* giving
3762 delegates a chance to do something with the key event. This is necessary so that
3763 any actions that are created from the NSEvent by the delegates are handled prior
3764 to the automation session finishing its keyboard interaction command.
3766 2017-10-23 Brian Burg <bburg@apple.com>
3768 [Mac] Web Automation: key modifiers for synthesized NSEvents are incorrect
3769 https://bugs.webkit.org/show_bug.cgi?id=178615
3771 Reviewed by Joseph Pecoraro.
3773 In both PLATFORM(MAC) platform methods for simulating keyboard interactions,
3774 we errantly relied on +[NSEvent modifierFlags] to get the current state of
3775 sticky modifiers when creating synthesized events. This is incorrect for two reasons:
3776 modifierFlags is never updated when simulating a sequence of events (because
3777 all the events are synthesized before any are delivered); and the NSEvent class
3778 method only reflects the modifier state of the primary physical keyboard, which
3779 is not affected by synthesized NSEvents that happen to have modifier flags.
3781 Instead, just keep our own m_currentModifiers state in the session and compute
3782 the necessary NSEventModifierFlags to put on each synthesized event. This aligns
3783 the implementation with the treatment of sticky keys in the iOS and GTK platform methods.
3785 * UIProcess/Automation/WebAutomationSession.h: Every port gets this variable now.
3786 * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3787 (WebKit::WebAutomationSession::platformSimulateKeyStroke):
3788 (WebKit::WebAutomationSession::platformSimulateKeySequence):
3789 Use and update m_currentModifiers.
3791 2017-10-23 Alex Christensen <achristensen@webkit.org>
3793 Fix ASAN test after r222824
3794 https://bugs.webkit.org/show_bug.cgi?id=178688
3795 <rdar://problem/35104706>
3797 Reviewed by Tim Horton.
3799 * UIProcess/WebBackForwardList.cpp:
3800 (WebKit::WebBackForwardList::clear):
3801 Resizing a list of Ref<T> after we've WTFMoved all the elements doesn't make ASAN happy.
3803 2017-10-23 Tim Horton <timothy_horton@apple.com>
3805 Stop using _UIApplicationUsesLegacyUI()
3806 https://bugs.webkit.org/show_bug.cgi?id=178680
3807 <rdar://problem/35131949>
3809 Reviewed by Dan Bernstein.
3811 * Platform/spi/ios/UIKitSPI.h:
3812 * UIProcess/ios/forms/WKFormSelectPopover.mm:
3813 (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
3814 (-[WKSelectPopover initWithView:hasGroups:]):
3815 Resolve _UIApplicationUsesLegacyUI to false and simplify.
3817 2017-10-23 Ryan Haddad <ryanhaddad@apple.com>
3819 Unreviewed, suppress deprecation warnings to fix the build.
3820 <rdar://problem/35131949>
3822 * UIProcess/ios/forms/WKFormSelectPopover.mm:
3823 (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
3824 (-[WKSelectPopover initWithView:hasGroups:]):
3826 2017-10-23 Youenn Fablet <youenn@apple.com>
3828 TestController should clear all fetch caches when resetting its state
3829 https://bugs.webkit.org/show_bug.cgi?id=178486
3830 <rdar://problem/35066305>
3832 Reviewed by Chris Dumez.
3834 Adding a new DidNotHandle message to disambiguate with the DidFail fetch case.
3835 With DidNotHandle, the loading should go the network process.
3836 With DidFail, the loading should return a network error.
3838 On receiving an order to start a fetch, ServiceWorkerThread will dispatch a fetch event.
3839 The client of this event will retrieve the response and return it to the WebProcess through IPC.
3841 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3842 (WebKit::WebSWServerConnection::didNotHandleFetch):
3843 * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3844 * StorageProcess/StorageProcess.cpp:
3845 (WebKit::StorageProcess::didNotHandleFetch):
3846 * StorageProcess/StorageProcess.h:
3847 * StorageProcess/StorageProcess.messages.in:
3848 * WebKit.xcodeproj/project.pbxproj:
3849 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3850 (WebKit::ServiceWorkerClientFetch::didFail):
3851 (WebKit::ServiceWorkerClientFetch::didNotHandle):
3852 * WebProcess/Storage/ServiceWorkerClientFetch.h:
3853 * WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
3854 * WebProcess/Storage/ServiceWorkerContextManager.cpp:
3855 (WebKit::ServiceWorkerContextManager::startFetch):
3856 * WebProcess/Storage/ServiceWorkerContextManager.h:
3857 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: Added.
3858 (WebKit::WebServiceWorkerFetchTaskClient::~WebServiceWorkerFetchTaskClient):
3859 (WebKit::WebServiceWorkerFetchTaskClient::WebServiceWorkerFetchTaskClient):
3860 (WebKit::WebServiceWorkerFetchTaskClient::didReceiveResponse):
3861 (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
3862 (WebKit::WebServiceWorkerFetchTaskClient::didFail):
3863 (WebKit::WebServiceWorkerFetchTaskClient::didFinish):
3864 * WebProcess/Storage/WebServiceWorkerFetchTaskClient.h: Added.
3865 * WebProcess/WebProcess.cpp:
3866 (WebKit::WebProcess::startFetchInServiceWorker):
3867 * WebProcess/WebProcess.h:
3869 2017-10-22 Wenson Hsieh <wenson_hsieh@apple.com>
3871 [iOS] WebProcess::initializeWebProcess spends ~150ms spinning up AVSystemController on some devices
3872 https://bugs.webkit.org/show_bug.cgi?id=178640
3873 <rdar://problem/35113105>
3875 Reviewed by Youenn Fablet.
3877 In r213933, we added a mechanism to allow the web process to drive media capture, by setting an attribute on the
3878 shared AVSystemController. This requires us to fault in the Celestial framework, which is a slight performance
3879 hit on some hardware. Instead of doing this at the start of every web process launch, we can just do this work
3880 lazily, the first time the web process requests permissions for user media access.
3882 * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
3883 (WebKit::WebUserMediaClient::requestUserMediaAccess):
3884 * WebProcess/WebPage/WebPage.cpp:
3885 (WebKit::WebPage::prepareToSendUserMediaPermissionRequest):
3886 * WebProcess/WebPage/WebPage.h:
3887 * WebProcess/WebPage/ios/WebPageIOS.mm:
3888 (WebKit::WebPage::prepareToSendUserMediaPermissionRequest):
3889 * WebProcess/cocoa/WebProcessCocoa.mm:
3890 (WebKit::WebProcess::platformInitializeWebProcess):
3892 2017-10-21 Michael Catanzaro <mcatanzaro@igalia.com>
3894 Unreviewed, silence a -Wunused-but-set-variable warning
3896 * WebProcess/WebPage/EventDispatcher.cpp:
3897 (WebKit::EventDispatcher::wheelEvent):
3899 2017-10-20 Alex Christensen <achristensen@webkit.org>
3901 Add FIXME comment after r223803
3902 https://bugs.webkit.org/show_bug.cgi?id=178418
3904 * UIProcess/WebProcessPool.cpp:
3905 (WebKit::WebProcessPool::ensureNetworkProcess):
3906 We need some work to better support customized persistent data stores. Add a comment indicating such.
3908 2017-10-20 Alex Christensen <achristensen@webkit.org>
3910 Fix API tests after r223791.
3911 https://bugs.webkit.org/show_bug.cgi?id=178418
3913 * UIProcess/WebProcessPool.cpp:
3914 (WebKit::WebProcessPool::ensureNetworkProcess):
3915 Whatever NetworkSessionInitializationParameters we send with the NetworkProcess initialization message,
3916 that's the default session. This is needed for WebKit.WebsiteDataStoreCustomPaths.
3917 (WebKit::WebProcessPool::createNewWebProcess):
3918 Don't change behavior or NetworkProcess initialization like I did in r223791.
3920 2017-10-20 Alex Christensen <achristensen@webkit.org>
3922 Fix download tests on El Capitan after r223730
3923 https://bugs.webkit.org/show_bug.cgi?id=178547
3925 * UIProcess/Downloads/DownloadProxy.cpp:
3926 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3927 Revert to original behavior. This uses suggestedFilename, which may have come from places like
3928 the download attribute, instead of always using the filename from CFNetwork.
3930 2017-10-20 Alex Christensen <achristensen@webkit.org>
3932 Expose _boundInterfaceIdentifier and _allowsCellularAccess to WKWebsiteDataStorePrivate
3933 https://bugs.webkit.org/show_bug.cgi?id=178418
3934 <rdar://problem/29599569>
3936 Reviewed by Tim Horton.
3938 In r213747 I introduced allowsCellularAccess to _WKProcessPoolConfiguration because there
3939 was no way to add parameters to the default (and other) NetworkSession constructors. Since
3940 clients have not adopted this SPI, we can introduce such a way in NetworkSessionCreationParameters
3941 and move the SPI to WKWebsiteDataStore, which is where it and other NetworkSession properties
3942 ought to be instead of making them WKProcessPool global.
3944 We also need to expose access to NSURLRequest.boundInterfaceIdentifier. Instead of serializing and
3945 deserializing that property for each NSURLRequest and then having subresources mysteriously jump back
3946 to having no bound interface identifiers, I'm adding this to WKWebsiteDataStore, too, to make it a
3947 session networking property.
3949 I manually verified that these properties are being set properly with a custom test app and added logs.
3950 Unfortunately, these properties don't do anything under circumstances anywhere close to what we test.
3951 The architecture change of having NetworkSessionCreationParameters is verified to not have a change in
3952 behavior by existing tests, such as any test that uses TestProtocol (which we should eventually remove).
3954 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3955 (WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
3956 * NetworkProcess/NetworkProcess.cpp:
3957 (WebKit::NetworkProcess::NetworkProcess):
3958 (WebKit::NetworkProcess::initializeNetworkProcess):
3959 (WebKit::NetworkProcess::clearCachedCredentials):
3960 * NetworkProcess/NetworkProcessCreationParameters.cpp:
3961 (WebKit::NetworkProcessCreationParameters::encode const):
3962 (WebKit::NetworkProcessCreationParameters::decode):
3963 * NetworkProcess/NetworkProcessCreationParameters.h:
3964 * NetworkProcess/NetworkSession.cpp:
3965 (WebKit::NetworkSession::create):
3966 (WebKit::NetworkSession::defaultSession): Deleted.
3967 * NetworkProcess/NetworkSession.h:
3968 * NetworkProcess/NetworkSessionCreationParameters.h: Added.
3969 (WebKit::NetworkSessionCreationParameters::encode const):
3970 (WebKit::NetworkSessionCreationParameters::decode):
3971 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
3972 (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
3973 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3974 (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
3975 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3976 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3977 * NetworkProcess/cocoa/NetworkSessionCocoa.h:
3978 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3979 (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
3980 (WebKit::NetworkSessionCocoa::create):
3981 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3982 (WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager): Deleted.
3983 (WebKit::NetworkSessionCocoa::setAllowsCellularAccess): Deleted.
3984 (WebKit::NetworkSessionCocoa::defaultSession): Deleted.
3985 * NetworkProcess/mac/RemoteNetworkingContext.mm:
3986 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3987 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
3988 * Shared/SessionTracker.cpp:
3989 (WebKit::SessionTracker::networkSession):
3990 (WebKit::SessionTracker::setSession):
3991 * Shared/WebsiteDataStoreParameters.cpp:
3992 (WebKit::WebsiteDataStoreParameters::encode const):
3993 (WebKit::WebsiteDataStoreParameters::decode):
3994 * Shared/WebsiteDataStoreParameters.h:
3995 * UIProcess/API/APIProcessPoolConfiguration.cpp:
3996 (API::ProcessPoolConfiguration::copy):
3997 * UIProcess/API/APIProcessPoolConfiguration.h:
3998 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3999 (-[WKWebsiteDataStore _setBoundInterfaceIdentifier:]):
4000 (-[WKWebsiteDataStore _boundInterfaceIdentifier]):
4001 (-[WKWebsiteDataStore _setAllowsCellularAccess:]):
4002 (-[WKWebsiteDataStore _allowsCellularAccess]):
4003 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
4004 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
4005 (-[_WKProcessPoolConfiguration allowsCellularAccess]):
4006 (-[_WKProcessPoolConfiguration setAllowsCellularAccess:]):
4007 * UIProcess/WebProcessPool.cpp:
4008 (WebKit::WebProcessPool::ensureNetworkProcess):
4009 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
4010 * UIProcess/WebsiteData/WebsiteDataStore.h:
4011 (WebKit::WebsiteDataStore::setBoundInterfaceIdentifier):
4012 (WebKit::WebsiteDataStore::boundInterfaceIdentifier):
4013 (WebKit::WebsiteDataStore::setAllowsCellularAccess):
4014 (WebKit::WebsiteDataStore::allowsCellularAccess):
4015 * WebKit.xcodeproj/project.pbxproj:
4016 * WebProcess/InjectedBundle/InjectedBundle.cpp:
4017 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
4018 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
4019 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
4020 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
4021 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
4022 * WebProcess/WebProcess.cpp:
4023 (WebKit::WebProcess::ensurePrivateBrowsingSession):
4024 (WebKit::WebProcess::clearCachedCredentials):
4026 2017-10-20 Alex Christensen <achristensen@webkit.org>
4028 Add ObjC SPI to _WKDownloadDelegate missing from WKContextDownloadClient
4029 https://bugs.webkit.org/show_bug.cgi?id=178566
4030 <rdar://problem/23041906>
4032 Reviewed by Brady Eidson.
4034 * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
4035 * UIProcess/Cocoa/DownloadClient.h:
4036 * UIProcess/Cocoa/DownloadClient.mm:
4037 (WebKit::DownloadClient::DownloadClient):
4038 (WebKit::DownloadClient::didReceiveAuthenticationChallenge):
4039 (WebKit::DownloadClient::shouldDecodeSourceDataOfMIMEType):
4040 (WebKit::DownloadClient::didCreateDestination):
4041 (WebKit::DownloadClient::processDidCrash):
4043 2017-10-20 Youenn Fablet <youenn@apple.com>
4045 ResourceResponse should have a ServiceWorker source
4046 https://bugs.webkit.org/show_bug.cgi?id=178593
4048 Reviewed by Alex Christensen.
4050 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
4051 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): setting response source to ServiceWorker.