Turn SourceBufferChangeTypeEnabled on by default
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-09-14  Jer Noble  <jer.noble@apple.com>
2
3         Turn SourceBufferChangeTypeEnabled on by default
4         https://bugs.webkit.org/show_bug.cgi?id=189527
5
6         Reviewed by Eric Carlson.
7
8         * Shared/WebPreferences.yaml:
9         * UIProcess/API/C/WKPreferencesRefPrivate.h:
10
11 2018-09-14  Michael Catanzaro  <mcatanzaro@igalia.com>
12
13         Unreviewed, speculative WPE build fix after r236004
14         https://bugs.webkit.org/show_bug.cgi?id=189545
15
16         * UIProcess/API/wpe/WebKitScriptDialog.h:
17
18 2018-09-14  Carlos Garcia Campos  <cgarcia@igalia.com>
19
20         [GTK] Make script dialogs modal to the current web view only
21         https://bugs.webkit.org/show_bug.cgi?id=189545
22
23         Reviewed by Michael Catanzaro.
24
25         Change the default implementation of script dialogs to use an embedded window, like the HTTP auth dialog,
26         instead of a GtkMessageDialog. This patch adds a base class WebKitWebViewDialog shared by
27         WebKitAuthenticationDialog and the new WebKitScriptDialogImpl.
28
29         * SourcesGTK.txt: Add new files to compilation.
30         * UIProcess/API/glib/WebKitScriptDialogPrivate.h:
31         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
32         (webkitAuthenticationDialogInitialize): Do not use a frame and use a better styled title.
33         (webkit_authentication_dialog_class_init): Remove implementation of vfuncs that are now implemented by the
34         parent.
35         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
36         * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:
37         (webkitScriptDialogAccept): Use WebKitScriptDialogImpl API.
38         (webkitScriptDialogDismiss): Ditto.
39         (webkitScriptDialogSetUserInput): Ditto.
40         * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp: Added.
41         (webkitScriptDialogImplClose):
42         (webkitScriptDialogImplKeyPressEvent):
43         (webkitScriptDialogImplMap):
44         (webkitScriptDialogImplConstructed):
45         (webkitScriptDialogImplDispose):
46         (webkit_script_dialog_impl_class_init):
47         (webkitScriptDialogImplAddButton):
48         (webkitScriptDialogImplNew):
49         (webkitScriptDialogImplCancel):
50         (webkitScriptDialogImplConfirm):
51         (webkitScriptDialogImplSetEntryText):
52         * UIProcess/API/gtk/WebKitScriptDialogImpl.h: Added.
53         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
54         (webkitWebViewChildIsInternalWidget): Rename authenticationDialog as just dialog.
55         (webkitWebViewBaseAddDialog): Ditto.
56         (webkitWebViewBaseContainerRemove): Ditto.
57         (webkitWebViewBaseContainerForall): Ditto.
58         (webkitWebViewBaseConstructed): Ditto.
59         (webkitWebViewBaseSizeAllocate): Ditto.
60         (webkitWebViewBaseKeyPressEvent): Ditto.
61         (webkitWebViewBaseHandleMouseEvent): Ditto.
62         (webkitWebViewBaseButtonPressEvent): Ditto.
63         (webkitWebViewBaseButtonReleaseEvent): Ditto.
64         (webkitWebViewBaseHandleWheelEvent): Ditto.
65         (webkitWebViewBaseScrollEvent): Ditto.
66         (webkitWebViewBaseMotionNotifyEvent): Ditto.
67         (webkitWebViewBaseCrossingNotifyEvent): Ditto.
68         (webkitWebViewBaseTouchEvent): Ditto.
69         (webkitWebViewBaseFocus): Ditto.
70         (webkitWebViewBaseDestroy): Ditto.
71         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
72         * UIProcess/API/gtk/WebKitWebViewDialog.cpp: Added.
73         (webkitWebViewDialogDraw):
74         (webkitWebViewDialogSizeAllocate):
75         (webkitWebViewDialogConstructed):
76         (webkit_web_view_dialog_class_init):
77         * UIProcess/API/gtk/WebKitWebViewDialog.h: Added.
78         * UIProcess/API/gtk/WebKitWebViewGtk.cpp:
79         (webkitWebViewAuthenticate):
80         (webkitWebViewScriptDialog):
81
82 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
83
84         Unreviewed, rolling out r235954.
85
86         Breaks the watchOS build.
87
88         Reverted changeset:
89
90         "Move IndexedDB to Network Process"
91         https://bugs.webkit.org/show_bug.cgi?id=189415
92         https://trac.webkit.org/changeset/235954
93
94 2018-09-13  Chris Dumez  <cdumez@apple.com>
95
96         Regression(PSON): setting window.opener to null allows process swapping in cases that are not web-compatible
97         https://bugs.webkit.org/show_bug.cgi?id=189590
98         <rdar://problem/44422725>
99
100         Reviewed by Geoffrey Garen.
101
102         If script calls window.open() without 'noopener' and the newly navigated window gets navigated cross-site,
103         we are currently unable to process-swap because the opener has a WindowProxy handle to this new Window and
104         may interact with it (which we currently do not support cross-process). We were dealing with this by not
105         process-swapping if window.opener is not null. This works most of the time but is not sufficient because the
106         opener may get nulled out, while the opener still has a valid WindowProxy handle to its openee.
107
108         Therefore, we now also check for a flag indicating if the frame was opened via window.open() without
109         'nooopener'. We still need to check if the browsing context has an opener for browsing context created
110         via <a target="_blank"> for example (the opener does not have a handle to the new window but the openee
111         has access to its opener).
112
113         * Shared/NavigationActionData.cpp:
114         (WebKit::NavigationActionData::encode const):
115         (WebKit::NavigationActionData::decode):
116         * Shared/NavigationActionData.h:
117         * UIProcess/API/APINavigation.h:
118         (API::Navigation::openedViaWindowOpenWithOpener const):
119         (API::Navigation::setOpenedViaWindowOpenWithOpener):
120         * UIProcess/WebPageProxy.cpp:
121         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
122         * UIProcess/WebProcessPool.cpp:
123         (WebKit::WebProcessPool::processForNavigationInternal):
124         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
125         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
126
127 2018-09-13  Dean Jackson  <dino@grorg.org>
128
129         Generate warnings for Preferences files
130         https://bugs.webkit.org/show_bug.cgi?id=189573
131
132         Reviewed by Sam Weinig.
133
134         Generate the "DO NOT EDIT" warnings, rather than have
135         them in the template (which was confusing).
136
137         While here, simplify some of the templating generation code
138         to avoid duplication.
139
140         * Scripts/GeneratePreferences.rb:
141         * Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb:
142         * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
143         * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
144         * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
145         * Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb:
146         * Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb:
147         * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
148
149 2018-09-13  Keith Rollin  <krollin@apple.com>
150
151         WebPageProxy::reportPageLoadResult can crash on some code paths
152         https://bugs.webkit.org/show_bug.cgi?id=189568
153
154         Reviewed by Chris Dumez.
155
156         WebPageProxy::reportPageLoadResult (which is called from
157         WebPageProxy::didFinishLoadForFrame) can sometimes crash when
158         accessing m_pageLoadStart (a std::optional) in its unloaded state.
159         Normally, m_pageLoadStart is initialized in
160         WebPageProxy::didStartProvisionalLoadForFrame, which one would expect
161         would be called before WebPageProxy::didFinishLoadForFrame. But that
162         turns out to not always be the case. It's not apparent under what
163         conditions didStartProvisionalLoadForFrame will not be called, but
164         it's happening in the wild, leading to crashes now that std::optional
165         asserts in release builds on bad accesses (see
166         https://bugs.webkit.org/show_bug.cgi?id=189568).
167
168         Fix this by checking m_pageLoadState on entry to reportPageLoadResult.
169
170         * UIProcess/WebPageProxy.cpp:
171         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
172         (WebKit::WebPageProxy::didFinishLoadForFrame):
173         (WebKit::WebPageProxy::didFailLoadForFrame):
174         (WebKit::WebPageProxy::reportPageLoadResult):
175
176 2018-09-13  Chris Dumez  <cdumez@apple.com>
177
178         ProcessSwap.BackWithoutSuspendedPage API test hits assertion under WebPageProxy::didCreateMainFrame()
179         https://bugs.webkit.org/show_bug.cgi?id=189599
180
181         Reviewed by Geoffrey Garen.
182
183         The code in WebPageProxy::reattachToWebProcess() was re-initializing m_mainFrame unconditionally in case
184         of a HistoryNavigation. The reason we need to initialize m_mainFrame in reattachToWebProcess() is if the
185         process we're reattaching to already has a WebPage (with a main frame), in which case
186         WebPageProxy::didCreateMainFrame() would not get called to initialize WebPageProxy::m_mainFrame.
187
188         The process we're reattaching to can be in such a state only if it comes from a SuspendedPageProxy (we
189         detached the WebProcessProxy from the WebPageProxy but kept the WebPage in the "suspended" WebProcess).
190         It is true that we're only reattaching to a SuspendedPageProxy's process in the event of history
191         navigations. However, it is not true that all history navigations will use a SuspendedPageProxy's process.
192         For example, no SuspendedPageProxy may be available for the history navigation because the history
193         was restored to a new view from disk, or because the WebBackForwardListItem no longer has a
194         SuspendedPageProxy (we currently only keep a single SuspendedPageProxy for the last HistoryItem).
195
196         Therefore, unconditionally initializating m_mainFrame in reattachToWebProcess() for history navigations
197         is incorrect and we should instead check if we're reattaching to a SuspendedPage's process.
198
199         Change is covered by ProcessSwap.BackWithoutSuspendedPage API test which is no longer crashes and
200         existing Back/Forward PSON API tests which are still passing.
201
202         * UIProcess/WebPageProxy.cpp:
203         (WebKit::WebPageProxy::reattachToWebProcess):
204         (WebKit::WebPageProxy::continueNavigationInNewProcess):
205         * UIProcess/WebPageProxy.h:
206
207 2018-09-13  Chris Dumez  <cdumez@apple.com>
208
209         Add release logging to help debug PSON issues
210         https://bugs.webkit.org/show_bug.cgi?id=189562
211
212         Reviewed by Ryosuke Niwa.
213
214         Add release logging to help debug issues related to process swap on navigation.
215
216         * UIProcess/WebPageProxy.cpp:
217         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
218         * UIProcess/WebProcessPool.cpp:
219         (WebKit::WebProcessPool::processForNavigation):
220         (WebKit::WebProcessPool::processForNavigationInternal):
221         * UIProcess/WebProcessPool.h:
222
223 2018-09-13  Chris Dumez  <cdumez@apple.com>
224
225         Add null check for drawing area in WebPage::didCompletePageTransition() after r235867
226         https://bugs.webkit.org/show_bug.cgi?id=189587
227
228         Reviewed by Geoffrey Garen.
229
230         Add null check for drawing area in WebPage::didCompletePageTransition() after r235867
231         as this is causing crashes on the bots.
232
233         * WebProcess/WebPage/WebPage.cpp:
234         (WebKit::WebPage::didCompletePageTransition):
235
236 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
237
238         Unreviewed, rolling out r235953.
239
240         Caused layout test crashes under GuardMalloc.
241
242         Reverted changeset:
243
244         "Make GraphicsLayers ref-counted, so their tree can persist
245         when disconnected from RenderLayerBackings"
246         https://bugs.webkit.org/show_bug.cgi?id=189521
247         https://trac.webkit.org/changeset/235953
248
249 2018-09-13  Carlos Garcia Campos  <cgarcia@igalia.com>
250
251         [GTK][WPE] Allow to run script dialogs asynchronously in the UI process
252         https://bugs.webkit.org/show_bug.cgi?id=189544
253
254         Reviewed by Michael Catanzaro.
255
256         Script dialogs are sync in the WebProcess, but we don't need to block the UI process while they are running. Our
257         current API doesn't allow it, because it always expects the dialog to be closed in the signal handler. API
258         changes are backwards compatible.
259
260         * UIProcess/API/glib/WebKitScriptDialog.cpp:
261         (webkitScriptDialogCreate): Added to heap allocate a WebKitScriptDialog.
262         (webkitScriptDialogIsRunning): Common implementation here, a script dialog is considered to be running if it has
263         a competion handler pending.
264         (webkit_script_dialog_ref): WebKitScriptDialog is now refcounted.
265         (webkit_script_dialog_unref): Ditto.
266         (webkit_script_dialog_close): New method to notify that we are done with the dialog.
267         * UIProcess/API/glib/WebKitScriptDialogPrivate.h:
268         (_WebKitScriptDialog::_WebKitScriptDialog): Use a single constructor and keep the completion handler.
269         * UIProcess/API/glib/WebKitUIClient.cpp: Do not call the completion handler, pass it to the web view.
270         * UIProcess/API/glib/WebKitWebView.cpp:
271         (webkitWebViewDispose): Close the current script dialog if there's any.
272         (webkit_web_view_class_init): Document how to handle dialogs asynchronously.
273         (webkitWebViewRunJavaScriptAlert): Do not stack allocate the WebKitScriptDialog, create it with
274         webkitScriptDialogCreate() passing the completion handler.
275         (webkitWebViewRunJavaScriptConfirm): Ditto.
276         (webkitWebViewRunJavaScriptPrompt): Ditto.
277         (webkitWebViewRunJavaScriptBeforeUnloadConfirm): Ditto.
278         * UIProcess/API/glib/WebKitWebViewPrivate.h:
279         * UIProcess/API/gtk/WebKitScriptDialog.h:
280         * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:
281         (scriptDialogResponseCallback): Hnadle the response callback.
282         (webkitScriptDialogRun): Do not use gtk_dialog_run(), connect to response signal and show the dialogs instead.
283         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
284         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
285         * UIProcess/API/wpe/WebKitScriptDialogWPE.cpp:
286
287 2018-09-12  Dan Bernstein  <mitz@apple.com>
288
289         Update availability annotations to match the macOS and iOS SDKs in the Xcode 10 GM seed
290         https://bugs.webkit.org/show_bug.cgi?id=189561
291
292         Reviewed by Tim Horton.
293
294         Changed WK_MAC_TBA and WK_IOS_TBA to 10.14 and 12.0, respectively, in all declarations that
295         appear in the GM seed SDKs.
296
297         * Shared/API/Cocoa/_WKRenderingProgressEvents.h:
298         * UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
299         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
300         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
301         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
302         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
303         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
304         * UIProcess/API/Cocoa/WKViewPrivate.h:
305         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
306         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
307         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
308         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
309         * UIProcess/API/Cocoa/_WKAttachment.h:
310         * UIProcess/API/Cocoa/_WKAutomationDelegate.h:
311         * UIProcess/API/Cocoa/_WKAutomationSession.h:
312         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
313         * UIProcess/API/Cocoa/_WKFormInputSession.h:
314         * UIProcess/API/Cocoa/_WKInputDelegate.h:
315         * UIProcess/API/Cocoa/_WKLinkIconParameters.h:
316         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
317         * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
318         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
319         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
320         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
321         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
322
323 2018-09-12  Dan Bernstein  <mitz@apple.com>
324
325         [Cocoa] Complete support for Paste as Quotation
326         https://bugs.webkit.org/show_bug.cgi?id=189504
327
328         Reviewed by Wenson Hsieh.
329
330         * UIProcess/API/Cocoa/WKWebView.mm:
331         (-[WKWebView canPerformAction:withSender:]): Handle _pasteAsQuotation:. It’s not included
332           in FOR_EACH_WKCONTENTVIEW_ACTION, because it’s declared and implemented in the WKPrivate
333           category. If we add more actions in the category, it could make sense to fold them into
334           a new FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION.
335         (-[WKWebView targetForAction:withSender:]): Handle _pasteAsQuotation:.
336         (-[WKWebView _pasteAsQuotation:]): Send to the WebViewImpl or the WKContentView.
337         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared a new _pasteAsQuotation: action.
338
339         * UIProcess/Cocoa/WebViewImpl.mm:
340         (WebKit::selectorExceptionMap): Added a custom mapping from the new selector to the
341           PasteAsQuotation command.
342
343         * UIProcess/ios/WKContentViewInteraction.h: Declare methods for the new action.
344         * UIProcess/ios/WKContentViewInteraction.mm:
345           Forward _pasteAsQuotation: to the WKWebView so that clients get a chance to override its
346           behavior.
347         (-[WKContentView _pasteAsQuotationForWebView:]): Send the command to the page.
348
349 2018-09-12  Sihui Liu  <sihui_liu@apple.com>
350
351         Move IndexedDB to Network Process
352         https://bugs.webkit.org/show_bug.cgi?id=189415
353
354         Reviewed by Geoffrey Garen.
355
356         We are going to eliminate storage process and move its functionality to network process. 
357         The reasons why we want to do this:
358         1. Lower resource usage of having an additional process for storage operations, especially
359         memory. Single storage process takes about 5MB memory on macOS.
360         2. Reduce latency of Service Workers. After enabling Service Workers, we've seen
361         regression in app launch. The launch time of storage process is partly attributed to this:
362         Service Workers delay page loading until receiving response from storage process.
363         3. We choose network process because UI process may have broader access in file system
364         that we don't want the storage operations to have.
365
366         This patch is the first piece towards the goal. It mainly moves indexedDB from storage process
367         to corresponding components of network process. Moving of Service Worker and stopping to 
368         launch storage process will be done in following patches.
369
370         We expect to see the higher cpu and memory usage of network process as it is taking more work,
371         but the overall gain in memory and latency after we completely remove storage process should be 
372         positive.
373
374
375         * CMakeLists.txt:
376         * DerivedSources.make:
377
378         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp.
379         (WebKit::WebIDBConnectionToClient::create):
380         (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
381         (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
382         (WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
383         (WebKit::WebIDBConnectionToClient::messageSenderConnection):
384         (WebKit::WebIDBConnectionToClient::connectionToClient):
385         (WebKit::WebIDBConnectionToClient::didDeleteDatabase):
386         (WebKit::WebIDBConnectionToClient::didOpenDatabase):
387         (WebKit::WebIDBConnectionToClient::didAbortTransaction):
388         (WebKit::WebIDBConnectionToClient::didCommitTransaction):
389         (WebKit::WebIDBConnectionToClient::didCreateObjectStore):
390         (WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
391         (WebKit::WebIDBConnectionToClient::didRenameObjectStore):
392         (WebKit::WebIDBConnectionToClient::didClearObjectStore):
393         (WebKit::WebIDBConnectionToClient::didCreateIndex):
394         (WebKit::WebIDBConnectionToClient::didDeleteIndex):
395         (WebKit::WebIDBConnectionToClient::didRenameIndex):
396         (WebKit::WebIDBConnectionToClient::didPutOrAdd):
397         (WebKit::WebIDBConnectionToClient::handleGetResult):
398         (WebKit::WebIDBConnectionToClient::didGetRecord):
399         (WebKit::WebIDBConnectionToClient::didGetAllRecords):
400         (WebKit::WebIDBConnectionToClient::didGetCount):
401         (WebKit::WebIDBConnectionToClient::didDeleteRecord):
402         (WebKit::WebIDBConnectionToClient::didOpenCursor):
403         (WebKit::WebIDBConnectionToClient::didIterateCursor):
404         (WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
405         (WebKit::WebIDBConnectionToClient::didStartTransaction):
406         (WebKit::WebIDBConnectionToClient::didCloseFromServer):
407         (WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
408         (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
409         (WebKit::WebIDBConnectionToClient::deleteDatabase):
410         (WebKit::WebIDBConnectionToClient::openDatabase):
411         (WebKit::WebIDBConnectionToClient::abortTransaction):
412         (WebKit::WebIDBConnectionToClient::commitTransaction):
413         (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
414         (WebKit::WebIDBConnectionToClient::createObjectStore):
415         (WebKit::WebIDBConnectionToClient::deleteObjectStore):
416         (WebKit::WebIDBConnectionToClient::renameObjectStore):
417         (WebKit::WebIDBConnectionToClient::clearObjectStore):
418         (WebKit::WebIDBConnectionToClient::createIndex):
419         (WebKit::WebIDBConnectionToClient::deleteIndex):
420         (WebKit::WebIDBConnectionToClient::renameIndex):
421         (WebKit::WebIDBConnectionToClient::putOrAdd):
422         (WebKit::WebIDBConnectionToClient::getRecord):
423         (WebKit::WebIDBConnectionToClient::getAllRecords):
424         (WebKit::WebIDBConnectionToClient::getCount):
425         (WebKit::WebIDBConnectionToClient::deleteRecord):
426         (WebKit::WebIDBConnectionToClient::openCursor):
427         (WebKit::WebIDBConnectionToClient::iterateCursor):
428         (WebKit::WebIDBConnectionToClient::establishTransaction):
429         (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
430         (WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
431         (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
432         (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
433         (WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
434         (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
435         (WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
436         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h.
437         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
438         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
439         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
440
441         Code moved from StorageToWebProcessConnection::didReceiveMessage.
442
443         (WebKit::NetworkConnectionToWebProcess::didClose):
444         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
445
446         Network process receives and stores sandbox extension of temporary files for later indexedDB
447         use.
448
449         (WebKit::generateIDBConnectionToServerIdentifier):
450         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
451         (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer):
452         * NetworkProcess/NetworkConnectionToWebProcess.h:
453         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
454         * NetworkProcess/NetworkProcess.cpp:
455         (WebKit::NetworkProcess::NetworkProcess):
456         (WebKit::NetworkProcess::initializeNetworkProcess):
457         (WebKit::NetworkProcess::addWebsiteDataStore):
458         (WebKit::NetworkProcess::fetchWebsiteData):
459         (WebKit::NetworkProcess::deleteWebsiteData):
460         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
461         (WebKit::NetworkProcess::idbServer):
462         (WebKit::NetworkProcess::ensurePathExists):
463         (WebKit::NetworkProcess::postStorageTask):
464         (WebKit::NetworkProcess::performNextStorageTask):
465         (WebKit::NetworkProcess::prepareForAccessToTemporaryFile):
466         (WebKit::NetworkProcess::accessToTemporaryFileComplete):
467         (WebKit::NetworkProcess::indexedDatabaseOrigins):
468         (WebKit::NetworkProcess::addIndexedDatabaseSession):
469         (WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):
470
471         Instead of asking UI process to grant sandbox extension to storage process, now network 
472         process just asks for sandbox extension fot itself.
473
474         (WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles):
475         (WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions):
476         (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
477         (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted.
478         * NetworkProcess/NetworkProcess.h:
479         (WebKit::NetworkProcess::queue):
480         * NetworkProcess/NetworkProcess.messages.in:
481         * NetworkProcess/NetworkProcessCreationParameters.cpp:
482         (WebKit::NetworkProcessCreationParameters::encode const):
483         (WebKit::NetworkProcessCreationParameters::decode):
484         * NetworkProcess/NetworkProcessCreationParameters.h:
485         * Shared/Storage/StorageProcessCreationParameters.cpp:
486         (WebKit::StorageProcessCreationParameters::encode const):
487         (WebKit::StorageProcessCreationParameters::decode):
488         * Shared/Storage/StorageProcessCreationParameters.h:
489         * Shared/WebsiteDataStoreParameters.cpp:
490         (WebKit::WebsiteDataStoreParameters::encode const):
491         (WebKit::WebsiteDataStoreParameters::decode):
492         (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
493         * Shared/WebsiteDataStoreParameters.h:
494         * Sources.txt:
495         * StorageProcess/StorageProcess.cpp:
496         (WebKit::StorageProcess::initializeWebsiteDataStore):
497         (WebKit::StorageProcess::fetchWebsiteData):
498         (WebKit::StorageProcess::deleteWebsiteData):
499         (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
500         (WebKit::StorageProcess::idbServer): Deleted.
501         (WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted.
502         (WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted.
503         (WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted.
504         (WebKit::StorageProcess::indexedDatabaseOrigins): Deleted.
505         (WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted.
506         (WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted.
507         * StorageProcess/StorageProcess.h:
508         (WebKit::StorageProcess::queue): Deleted.
509         * StorageProcess/StorageProcess.messages.in:
510         * StorageProcess/StorageToWebProcessConnection.cpp:
511         (WebKit::StorageToWebProcessConnection::didReceiveMessage):
512         (WebKit::StorageToWebProcessConnection::didClose):
513         (WebKit::generateIDBConnectionToServerIdentifier): Deleted.
514         (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted.
515         (WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted.
516         * StorageProcess/StorageToWebProcessConnection.h:
517         * StorageProcess/StorageToWebProcessConnection.messages.in:
518         * UIProcess/Network/NetworkProcessProxy.cpp:
519         (WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
520         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
521         * UIProcess/Network/NetworkProcessProxy.h:
522         * UIProcess/Network/NetworkProcessProxy.messages.in:
523         * UIProcess/Storage/StorageProcessProxy.cpp:
524         (WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted.
525         * UIProcess/Storage/StorageProcessProxy.h:
526         * UIProcess/Storage/StorageProcessProxy.messages.in:
527         * UIProcess/WebProcessPool.cpp:
528         (WebKit::WebProcessPool::ensureNetworkProcess):
529         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
530         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
531         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
532         (WebKit::WebsiteDataStore::parameters):
533         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
534         (WebKit::computeNetworkProcessAccessTypeForDataFetch):
535         (WebKit::WebsiteDataStore::fetchDataAndApply):
536         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
537         (WebKit::WebsiteDataStore::removeData):
538         (WebKit::WebsiteDataStore::storageProcessParameters):
539         (WebKit::WebsiteDataStore::parameters):
540         * WebKit.xcodeproj/project.pbxproj:
541         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
542         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
543         (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
544         (WebKit::WebIDBConnectionToServer::messageSenderConnection):
545         * WebProcess/Databases/WebDatabaseProvider.cpp:
546         (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
547         * WebProcess/Network/NetworkProcessConnection.cpp:
548         (WebKit::NetworkProcessConnection::didReceiveMessage):
549         (WebKit::NetworkProcessConnection::didClose):
550         (WebKit::NetworkProcessConnection::idbConnectionToServerForSession):
551         * WebProcess/Network/NetworkProcessConnection.h:
552         (WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier):
553         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
554         (WebKit::WebToStorageProcessConnection::didReceiveMessage):
555
556         Code moved from WebToStorageProcessConnection::didReceiveMessage.
557
558         (WebKit::WebToStorageProcessConnection::didClose):
559         (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted.
560         * WebProcess/Storage/WebToStorageProcessConnection.h:
561         (WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted.
562         * WebProcess/WebProcess.cpp:
563         (WebKit::WebProcess::networkProcessConnectionClosed):
564         (WebKit::WebProcess::webToStorageProcessConnectionClosed):
565
566 2018-09-11  Simon Fraser  <simon.fraser@apple.com>
567
568         Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
569         https://bugs.webkit.org/show_bug.cgi?id=189521
570
571         Reviewed by Tim Horton.
572
573         Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.
574         
575         RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.
576         
577         All the other changes are just to adapt to the new ownership patterns.
578         
579         I verified that no GraphicsLayers were leaked or abandoned after this change.
580
581         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
582         (WebKit::WebInspectorClient::~WebInspectorClient):
583         (WebKit::WebInspectorClient::showPaintRect):
584         (WebKit::WebInspectorClient::animationEndedForLayer):
585         * WebProcess/WebCoreSupport/WebInspectorClient.h:
586         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
587         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
588         (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
589         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
590         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
591         (WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
592         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
593
594 2018-09-12  Chris Dumez  <cdumez@apple.com>
595
596         PSON: No process swap on back navigation after URL bar navigation
597         https://bugs.webkit.org/show_bug.cgi?id=189557
598         <rdar://problem/44353108>
599
600         Reviewed by Alex Christensen.
601
602         Our logic in WebProcessPool::processForNavigationInternal() was wrongly using
603         WebBackForwardList::currentItem() as source item of the navigation, instead of
604         using Navigation::fromItem(). In case of back navigation, by the time
605         processForNavigation() is called, the WebBackForwardList's currentItem has already
606         been updated to be the target item, via a Sync IPC from the WebProcess. As a result,
607         the source and target items would be the same in the following check:
608         ` if (currentItem->itemID().processIdentifier == backForwardListItem->itemID().processIdentifier)`
609
610         This would cause us to reuse the same process incorrectly. Our existing API test coverage
611         did not catch this because our target HistoryItem usually has a SuspendedPage and we decide
612         to use the SuspendedPage's process a few lines above in WebProcessPool::processForNavigationInternal().
613
614         * UIProcess/WebProcessPool.cpp:
615         (WebKit::WebProcessPool::processForNavigationInternal):
616
617 2018-09-12  Alex Christensen  <achristensen@webkit.org>
618
619         Make IPC::SharedBufferDataReference a type that decodes into but does not inherit from IPC::DataReference
620         https://bugs.webkit.org/show_bug.cgi?id=189519
621
622         Reviewed by Chris Dumez.
623
624         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
625         * NetworkProcess/NetworkResourceLoader.cpp:
626         (WebKit::NetworkResourceLoader::bufferingTimerFired):
627         (WebKit::NetworkResourceLoader::sendBuffer):
628         * Platform/IPC/DataReference.cpp:
629         (IPC::SharedBufferDataReference::encode const): Deleted.
630         * Platform/IPC/DataReference.h:
631         (IPC::SharedBufferDataReference::SharedBufferDataReference): Deleted.
632         * Platform/IPC/HandleMessage.h:
633         * Platform/IPC/SharedBufferDataReference.h: Added.
634         (IPC::SharedBufferDataReference::SharedBufferDataReference):
635         (IPC::SharedBufferDataReference::encode const):
636         * Scripts/webkit/messages.py:
637         * Shared/API/APIData.h:
638         * StorageProcess/StorageProcess.messages.in:
639         * UIProcess/WebPageProxy.messages.in:
640         * UIProcess/WebURLSchemeTask.cpp:
641         (WebKit::WebURLSchemeTask::didReceiveData):
642         * WebKit.xcodeproj/project.pbxproj:
643         * WebProcess/Network/WebLoaderStrategy.cpp:
644         (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
645         * WebProcess/Network/WebResourceLoader.messages.in:
646         * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
647         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
648         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveBlobChunk):
649         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
650         (WebKit::WebEditorClient::registerAttachmentIdentifier):
651         * WebProcess/WebPage/WebPage.cpp:
652         (WebKit::WebPage::getContentsAsMHTMLData):
653         (WebKit::WebPage::getSelectionAsWebArchiveData):
654         (WebKit::WebPage::getMainResourceDataOfFrame):
655         (WebKit::WebPage::getResourceDataFromFrame):
656         (WebKit::WebPage::getWebArchiveOfFrame):
657         (WebKit::WebPage::drawPagesToPDF):
658         * WebProcess/WebPage/WebPage.messages.in:
659
660 2018-09-11  Dean Jackson  <dino@apple.com>
661
662         Header parsing for experimental and internal debug features
663         https://bugs.webkit.org/show_bug.cgi?id=189486
664         <rdar://problem/44320618>
665
666         Reviewed by Tim Horton.
667
668         Provide key-based (string) access to experimental and internal features.
669
670         * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
671         * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
672         * UIProcess/API/C/WKPreferences.cpp:
673         (WKPreferencesSetExperimentalFeatureForKey):
674         (WKPreferencesResetAllInternalDebugFeatures):
675         (WKPreferencesSetInternalDebugFeatureForKey):
676         * UIProcess/API/C/WKPreferencesRefPrivate.h:
677         * UIProcess/WebPreferences.h:
678
679 2018-09-10  Matt Rajca  <mrajca@apple.com>
680
681         Expose a few WebPlaybackControlsManager-driven PIP APIs to clients
682         https://bugs.webkit.org/show_bug.cgi?id=189478
683         <rdar://problem/44312650>
684
685         Reviewed by Eric Carlson.
686
687         This patch exposes APIs necessary to toggle PIP and query its status from clients of WKWebView.
688         The existing PIP test has been updated to use the new APIs instead of simulating mouse clicks.
689         I also increased the size of the video element in the test page so it gets picked up by the
690         main content heuristics.
691
692         * UIProcess/API/Cocoa/WKWebView.mm:
693         (-[WKWebView _updateMediaPlaybackControlsManager]): Create a media playback controls manager if necessary.
694         (-[WKWebView _isPictureInPictureActive]): Return true if the "active" media element is in PIP.
695         (-[WKWebView _togglePictureInPicture]): Toggle PIP on the "active" media element.
696         (-[WKWebView _canTogglePictureInPicture]): Renamed from...
697         (-[WKWebView _canTogglePictureInPictureForTesting]):
698         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
699         * UIProcess/Cocoa/WebViewImpl.h:
700         * UIProcess/Cocoa/WebViewImpl.mm:
701         (WebKit::WebViewImpl::isPictureInPictureActive): Return true if the "active" media element is in PIP.
702         (WebKit::WebViewImpl::togglePictureInPicture): Toggle PIP on the "active" media element.
703         (WebKit::WebViewImpl::updateMediaPlaybackControlsManager): Let clients create a playback
704          controls manager even when there is no Touch Bar present.
705         (WebKit::WebViewImpl::updateMediaTouchBar): Extract some code into a helper method.
706         (WebKit::WebViewImpl::canTogglePictureInPicture): Renamed from...
707         (WebKit::WebViewImpl::canTogglePictureInPictureForTesting):
708
709 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
710
711         [Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
712         https://bugs.webkit.org/show_bug.cgi?id=189542
713
714         Reviewed by Alex Christensen.
715
716         * UIProcess/win/WebInspectorProxyWin.cpp:
717         (WebKit::WebInspectorProxy::platformCreateFrontendPage): Narrowed initialWindowWidth and initialWindowHeight by using static_cast.
718
719 2018-09-12  Chris Dumez  <cdumez@apple.com>
720
721         Clean up SuspendedPageProxy
722         https://bugs.webkit.org/show_bug.cgi?id=189517
723
724         Reviewed by Alex Christensen.
725
726         Clean up SuspendedPageProxy:
727         1. SuspendedPageProxy does not need to be RefCounted. It is even dangerous given that WebPageProxy
728            owns the SuspendedPageProxy and SuspendedPageProxy has a WebPageProxy& data member. We definitely
729            do not want it to outlive its WebPageProxy.
730         2. The SuspendedPageProxy destructor does not need to be virtual.
731         3. Have WebBackForwardListItem keep a WeakPtr<SuspendedPageProxy> instead of a SuspendedPageProxy*.
732            This is safer and avoid having to explicitly clear the pointer.
733         4. m_finishedSuspending data member does not need a getter and is only needed if !LOG_DISABLED.
734
735         * Shared/WebBackForwardListItem.cpp:
736         (WebKit::WebBackForwardListItem::setSuspendedPage):
737         * Shared/WebBackForwardListItem.h:
738         (WebKit::WebBackForwardListItem::suspendedPage const):
739         * UIProcess/SuspendedPageProxy.cpp:
740         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
741         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
742         (WebKit::SuspendedPageProxy::webProcessDidClose):
743         (WebKit::SuspendedPageProxy::didFinishLoad):
744         * UIProcess/SuspendedPageProxy.h:
745         (WebKit::SuspendedPageProxy::process const):
746         * UIProcess/WebPageProxy.cpp:
747         (WebKit::WebPageProxy::maybeCreateSuspendedPage):
748         (WebKit::WebPageProxy::reattachToWebProcess):
749         * UIProcess/WebPageProxy.h:
750
751 2018-09-12  Guillaume Emont  <guijemont@igalia.com>
752
753         Add IGNORE_WARNING_.* macros
754         https://bugs.webkit.org/show_bug.cgi?id=188996
755
756         Reviewed by Michael Catanzaro.
757
758         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
759         (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
760         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
761         (WebKit::NetworkProcess::platformSyncAllCookies):
762         * PluginProcess/mac/PluginProcessMac.mm:
763         (WebKit::beginModal):
764         * PluginProcess/mac/PluginProcessShim.mm:
765         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
766         (WebKit::NetscapePluginModule::tryLoad):
767         * Shared/ios/ChildProcessIOS.mm:
768         (WebKit::ChildProcess::initializeSandbox):
769         * Shared/mac/ChildProcessMac.mm:
770         (WebKit::compileAndApplySandboxSlowCase):
771         * Shared/mac/ColorSpaceData.mm:
772         (WebKit::ColorSpaceData::decode):
773         * Shared/mac/SandboxExtensionMac.mm:
774         (WebKit::SandboxExtensionImpl::sandboxExtensionForType):
775         * UIProcess/API/Cocoa/WKWebView.mm:
776         (-[WKWebView _web_superAccessibilityAttributeValue:]):
777         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
778         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
779         * UIProcess/API/glib/WebKitWebView.cpp:
780         (webkitWebViewRunAsModal):
781         * UIProcess/API/mac/WKView.mm:
782         (-[WKView _web_superAccessibilityAttributeValue:]):
783         * UIProcess/Cocoa/DownloadClient.mm:
784         (WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
785         * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:
786         (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
787         * UIProcess/Cocoa/NavigationState.mm:
788         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
789         * UIProcess/Cocoa/UIDelegate.mm:
790         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
791         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
792         (WebKit::WebProcessPool::platformInitializeWebProcess):
793         * UIProcess/Cocoa/WebViewImpl.mm:
794         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
795         (WebKit::WebViewImpl::updateWindowAndViewFrames):
796         (WebKit::WebViewImpl::sendDragEndToPage):
797         (WebKit::WebViewImpl::startDrag):
798         (WebKit::WebViewImpl::characterIndexForPoint):
799         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
800         (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
801         (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
802         (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
803         (WebKit::PluginProcessProxy::exitFullscreen):
804         * UIProcess/ios/SmartMagnificationController.mm:
805         * UIProcess/ios/WKGeolocationProviderIOS.mm:
806         * UIProcess/ios/WKLegacyPDFView.mm:
807         * UIProcess/ios/WKPDFPageNumberIndicator.mm:
808         (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
809         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
810         * UIProcess/ios/forms/WKFileUploadPanel.mm:
811         (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
812         * UIProcess/ios/forms/WKFormColorControl.mm:
813         (-[WKColorPopover initWithView:]):
814         * UIProcess/ios/forms/WKFormInputControl.mm:
815         (-[WKDateTimePopover initWithView:datePickerMode:]):
816         * UIProcess/ios/forms/WKFormPopover.h:
817         * UIProcess/ios/forms/WKFormPopover.mm:
818         * UIProcess/ios/forms/WKFormSelectPopover.mm:
819         (-[WKSelectPopover initWithView:hasGroups:]):
820         * UIProcess/mac/PageClientImplMac.mm:
821         (WebKit::PageClientImpl::screenToRootView):
822         (WebKit::PageClientImpl::rootViewToScreen):
823         * UIProcess/mac/WKFullScreenWindowController.mm:
824         (-[WKFullScreenWindowController enterFullScreen:]):
825         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
826         (-[WKFullScreenWindowController exitFullScreen]):
827         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
828         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
829         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
830         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
831         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
832         * UIProcess/mac/WKPrintingView.mm:
833         (-[WKPrintingView _setAutodisplay:]):
834         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
835         (-[WKPrintingView _drawPreview:]):
836         (-[WKPrintingView drawRect:]):
837         * UIProcess/mac/WKTextInputWindowController.mm:
838         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
839         (-[WKTextInputPanel _hasMarkedText]):
840         * UIProcess/mac/WebPopupMenuProxyMac.mm:
841         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
842         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
843         (WebKit::initializeEventRecord):
844         (WebKit::NetscapePlugin::sendComplexTextInput):
845         (WebKit::makeCGLPresentLayerOpaque):
846         (WebKit::NetscapePlugin::nullEventTimerFired):
847         * WebProcess/Plugins/PDF/PDFPlugin.mm:
848         (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
849         (-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
850         (WebKit::PDFPlugin::handleEditingCommand):
851         (WebKit::PDFPlugin::setActiveAnnotation):
852         (WebKit:: const):
853         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
854         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
855         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
856         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
857         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
858         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
859         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
860         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
861         (WebKit::convertImageToBitmap):
862         (WebKit::WebDragClient::declareAndWriteDragImage):
863         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
864         * WebProcess/WebPage/mac/WebPageMac.mm:
865         (WebKit::drawPDFPage):
866
867 2018-09-11  Olivia Barnett  <obarnett@apple.com>
868
869         Implement the Web Share API for mac
870         https://bugs.webkit.org/show_bug.cgi?id=189443
871
872         Reviewed by Tim Horton.
873
874         * Shared/WebPreferencesDefaultValues.h:
875         * UIProcess/API/Cocoa/WKWebView.mm:
876         (-[WKWebView shareSheetDidDismiss:]):
877         * UIProcess/API/Cocoa/WKWebViewInternal.h:
878         * UIProcess/API/mac/WKView.mm:
879         (-[WKView shareSheetDidDismiss:]):
880         * UIProcess/Cocoa/WebViewImpl.h:
881         * UIProcess/Cocoa/WebViewImpl.mm:
882         (WebKit::WebViewImpl::showShareSheet):
883         (WebKit::WebViewImpl::shareSheetDidDismiss):
884         Implemented function for WKShareSheetDelegate.
885
886         * UIProcess/Cocoa/WKShareSheet.h:
887         * UIProcess/Cocoa/WKShareSheet.mm:
888         (-[WKShareSheet initWithView:initWithView:]):
889         (-[WKShareSheet presentWithParameters:completionHandler:]):
890         (-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
891         (-[WKShareSheet _cancel]):
892         (-[WKShareSheet dismiss]):
893         (-[WKShareSheet _dismissDisplayAnimated:]):
894         (-[WKShareSheet invokeShareSheetWithResolution:]):
895         (-[WKShareSheet initWithView:]): Deleted.
896         Added mac platform checks and share sheet functionality.
897
898         * UIProcess/mac/PageClientImplMac.h:
899         * UIProcess/mac/PageClientImplMac.mm:
900         (WebKit::PageClientImpl::showShareSheet):
901         Allows macos to invoke the system share sheet.
902
903 2018-09-07  Dean Jackson  <dino@apple.com>
904
905         Add and expose Internal features from WebKit
906         https://bugs.webkit.org/show_bug.cgi?id=189442
907         <rdar://problem/44243404>
908
909         Reviewed by Simon Fraser.
910
911         Experimental features have become a mess. People are using them for
912         anything that they want to be easily toggled from a host app (e.g.
913         Safari), which means the user-facing menu has become large and
914         confusing.
915
916         Introduce the idea of Internal features, that will be exposed in a way
917         that end-users are not expected to ever see (unless they really want
918         to).
919
920         * CMakeLists.txt: Add new files.
921         * Sources.txt:
922         * SourcesCocoa.txt:
923         * WebKit.xcodeproj/project.pbxproj:
924
925         * DerivedSources.make: Add new generated files.
926         * Scripts/GeneratePreferences.rb: Generate the preferences stuff for Internal Debug features.
927         * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
928         * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb: Added.
929
930         * Shared/API/APIObject.h: New API object for InternalDebugFeature.
931         * Shared/Cocoa/APIObject.mm:
932         (API::Object::newObject):
933
934         * Shared/WebPreferences.yaml: Change some of the existing experimental features to "internal".
935
936         * UIProcess/API/APIInternalDebugFeature.cpp: New API type - just like APIExperimentalFeature.
937         (API::InternalDebugFeature::create):
938         (API::InternalDebugFeature::InternalDebugFeature):
939         (API::InternalDebugFeature::~InternalDebugFeature):
940         * UIProcess/API/APIInternalDebugFeature.h:
941         * UIProcess/API/C/WKAPICast.h:
942
943         * UIProcess/API/Cocoa/WKPreferences.mm: Change the naming of the experimental feature API so that it
944         won't clash with internal debug features. We can remove the old API once Safari has adopted.
945         (+[WKPreferences _internalDebugFeatures]):
946         (-[WKPreferences _isEnabledForInternalDebugFeature:]):
947         (-[WKPreferences _setEnabled:forInternalDebugFeature:]):
948         (-[WKPreferences _isEnabledForFeature:]):
949         (-[WKPreferences _setEnabled:forFeature:]):
950         (-[WKPreferences _isEnabledForExperimentalFeature:]):
951         (-[WKPreferences _setEnabled:forExperimentalFeature:]):
952         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
953
954         * UIProcess/API/Cocoa/_WKInternalDebugFeature.h: New object - same as _WKExperimentalFeature.
955         * UIProcess/API/Cocoa/_WKInternalDebugFeature.mm:
956         (-[_WKInternalDebugFeature dealloc]):
957         (-[_WKInternalDebugFeature description]):
958         (-[_WKInternalDebugFeature name]):
959         (-[_WKInternalDebugFeature key]):
960         (-[_WKInternalDebugFeature details]):
961         (-[_WKInternalDebugFeature defaultValue]):
962         (-[_WKInternalDebugFeature isHidden]):
963         (-[_WKInternalDebugFeature _apiObject]):
964         * UIProcess/API/Cocoa/_WKInternalDebugFeatureInternal.h:
965
966         * UIProcess/WebPreferences.cpp: Add support for Internal Debug features.
967         (WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
968         (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):
969         * UIProcess/WebPreferences.h:
970
971         * UIProcess/WebProcessPool.cpp: Change a comment now that it is an internal feature.
972         (WebKit::WebProcessPool::createWebPage):
973
974 2018-09-11  Eric Carlson  <eric.carlson@apple.com>
975
976         WebPage::close should clear UserMediaPermissionRequestManager
977         https://bugs.webkit.org/show_bug.cgi?id=189369
978         <rdar://problem/44196724>
979
980         Reviewed by Youenn Fablet.
981
982         * WebProcess/WebPage/WebPage.cpp:
983         (WebKit::WebPage::close): Clear m_userMediaPermissionRequestManager.
984
985 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
986
987         [macOS] [WK2] Support changing foreground colors via color panel
988         https://bugs.webkit.org/show_bug.cgi?id=189382
989         <rdar://problem/44227311>
990
991         Reviewed by Ryosuke Niwa.
992
993         Adds support for changing font color in a richly editable element in WebKit2 via NSColorPanel. See below for
994         more detail, as well as the WebCore ChangeLog.
995
996         * UIProcess/API/Cocoa/WKWebView.mm:
997         (-[WKWebView changeColor:]):
998
999         Implement this selector; AppKit calls into this when changing font color using NSColorPanel.
1000
1001         * UIProcess/Cocoa/WebViewImpl.h:
1002         * UIProcess/Cocoa/WebViewImpl.mm:
1003         (WebKit::WebViewImpl::changeFontColorFromSender):
1004
1005         Creates and populates new FontAttributeChanges, with only the foreground color determined by asking the sender
1006         object for its -color.
1007
1008         * WebProcess/WebPage/mac/WebPageMac.mm:
1009
1010         Use the relevant EditAction for the incoming FontAttributeChanges, instead of always specifying
1011         EditAction::ChangeAttributes.
1012
1013         (WebKit::WebPage::changeFontAttributes):
1014
1015 2018-09-11  Myles C. Maxfield  <mmaxfield@apple.com>
1016
1017         Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
1018         https://bugs.webkit.org/show_bug.cgi?id=188008
1019
1020         Reviewed by Alex Christensen.
1021
1022         This patch is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=180307.
1023         Variable fonts have CFDictionaries with non-string keys. We need to support that in our IPC code.
1024
1025         * Shared/cf/ArgumentCodersCF.cpp:
1026         (IPC::encode):
1027         (IPC::decode):
1028
1029 2018-09-11  Adrian Perez de Castro  <aperez@igalia.com>
1030
1031         [WPE][GTK] API documentation is unclear about how to modify requests before sending them
1032         https://bugs.webkit.org/show_bug.cgi?id=189505
1033
1034         Reviewed by Michael Catanzaro.
1035
1036         Add notes to the API documentation to make explicit where modification
1037         of WebKitURIRequest instances affects the request data sent over the
1038         network.
1039
1040         * UIProcess/API/glib/WebKitNavigationAction.cpp: Clarify that
1041         modifications to the associated WebKitURIRequest do not affect the
1042         actual request. Point to WebKitPage::send-request instead.
1043         * UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Ditto.
1044         * UIProcess/API/glib/WebKitWebView.cpp:
1045         (webkit_web_view_class_init): Ditto for the description of the
1046         WebKitWebView::decide-policy signal. Also fix the syntax of example.
1047         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1048         (webkit_web_page_class_init): Indicate that modifications to the
1049         WebKitURIRequest will change the actual network request data.
1050
1051 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1052
1053         Unreviewed, attempt to fix Apple builds after r235903
1054         https://bugs.webkit.org/show_bug.cgi?id=188872
1055
1056         If it really needs to be inlined, it will need to move to the header....
1057
1058         * UIProcess/WebPageProxy.cpp:
1059         (WebKit::WebPageProxy::pageClient const):
1060
1061 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1062
1063         Unreviewed, fix build after r235903
1064         https://bugs.webkit.org/show_bug.cgi?id=188872
1065
1066         This broke all ports except GTK. Need to add a missing header.
1067
1068         * UIProcess/PageClient.h:
1069
1070 2018-09-11  Pablo Saavedra  <psaavedra@igalia.com>
1071
1072         Add missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
1073         https://bugs.webkit.org/show_bug.cgi?id=189506
1074
1075         Reviewed by Tim Horton.
1076
1077         m_pipStandbyElement is only defined in
1078         WebKit/WebProcess/FullScreen/WebFullScreenManager.h
1079         only when ENABLE(VIDEO) (see
1080         https://bugs.webkit.org/show_bug.cgi?id=181338)
1081
1082         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1083         (WebKit::WebFullScreenManager::setPIPStandbyElement):
1084
1085 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1086
1087         WebPageProxy should hold a WeakPtr to its PageClient
1088         https://bugs.webkit.org/show_bug.cgi?id=188872
1089
1090         Reviewed by Ryosuke Niwa.
1091
1092         This ensures the PageClient reference is always valid when used.
1093
1094         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1095         (WebKit::WebPageProxy::startDrag):
1096         (WebKit::WebPageProxy::setDragCaretRect):
1097         * UIProcess/PageClient.h:
1098         * UIProcess/WebPageProxy.cpp:
1099         (WebKit::PageClientProtector::PageClientProtector):
1100         (WebKit::PageClientProtector::~PageClientProtector):
1101         (WebKit::WebPageProxy::WebPageProxy):
1102         (WebKit::m_resetRecentCrashCountTimer):
1103         (WebKit::WebPageProxy::pageClient const):
1104         (WebKit::WebPageProxy::reattachToWebProcess):
1105         (WebKit::WebPageProxy::initializeWebPage):
1106         (WebKit::WebPageProxy::close):
1107         (WebKit::WebPageProxy::didChangeBackForwardList):
1108         (WebKit::WebPageProxy::willGoToBackForwardListItem):
1109         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
1110         (WebKit::WebPageProxy::setViewNeedsDisplay):
1111         (WebKit::WebPageProxy::requestScroll):
1112         (WebKit::WebPageProxy::viewScrollPosition const):
1113         (WebKit::WebPageProxy::updateActivityState):
1114         (WebKit::WebPageProxy::activityStateDidChange):
1115         (WebKit::WebPageProxy::viewDidEnterWindow):
1116         (WebKit::WebPageProxy::dispatchActivityStateChange):
1117         (WebKit::WebPageProxy::layerHostingModeDidChange):
1118         (WebKit::WebPageProxy::viewSize const):
1119         (WebKit::WebPageProxy::startDrag):
1120         (WebKit::WebPageProxy::didPerformDragOperation):
1121         (WebKit::WebPageProxy::processNextQueuedMouseEvent):
1122         (WebKit::WebPageProxy::findPlugin):
1123         (WebKit::WebPageProxy::handleTouchEventSynchronously):
1124         (WebKit::WebPageProxy::handleTouchEvent):
1125         (WebKit::WebPageProxy::preferencesDidChange):
1126         (WebKit::WebPageProxy::didCreateMainFrame):
1127         (WebKit::WebPageProxy::didCreateSubframe):
1128         (WebKit::WebPageProxy::didStartProgress):
1129         (WebKit::WebPageProxy::didChangeProgress):
1130         (WebKit::WebPageProxy::didFinishProgress):
1131         (WebKit::WebPageProxy::didDestroyNavigation):
1132         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
1133         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
1134         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
1135         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
1136         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
1137         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
1138         (WebKit::WebPageProxy::didCommitLoadForFrame):
1139         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
1140         (WebKit::WebPageProxy::didFinishLoadForFrame):
1141         (WebKit::WebPageProxy::didFailLoadForFrame):
1142         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1143         (WebKit::WebPageProxy::didReceiveTitleForFrame):
1144         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
1145         (WebKit::WebPageProxy::didReachLayoutMilestone):
1146         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
1147         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
1148         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
1149         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1150         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1151         (WebKit::WebPageProxy::decidePolicyForResponse):
1152         (WebKit::WebPageProxy::unableToImplementPolicy):
1153         (WebKit::WebPageProxy::didNavigateWithNavigationData):
1154         (WebKit::WebPageProxy::didPerformClientRedirect):
1155         (WebKit::WebPageProxy::didPerformServerRedirect):
1156         (WebKit::WebPageProxy::didUpdateHistoryTitle):
1157         (WebKit::WebPageProxy::closePage):
1158         (WebKit::WebPageProxy::setWindowFrame):
1159         (WebKit::WebPageProxy::getWindowFrame):
1160         (WebKit::WebPageProxy::getWindowFrameWithCallback):
1161         (WebKit::WebPageProxy::screenToRootView):
1162         (WebKit::WebPageProxy::rootViewToScreen):
1163         (WebKit::WebPageProxy::syncRootViewToScreen):
1164         (WebKit::WebPageProxy::accessibilityScreenToRootView):
1165         (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
1166         (WebKit::WebPageProxy::didChangeViewportProperties):
1167         (WebKit::WebPageProxy::runOpenPanel):
1168         (WebKit::WebPageProxy::showShareSheet):
1169         (WebKit::WebPageProxy::handleDownloadRequest):
1170         (WebKit::WebPageProxy::didChangeContentSize):
1171         (WebKit::WebPageProxy::showColorPicker):
1172         (WebKit::WebPageProxy::showDataListSuggestions):
1173         (WebKit::WebPageProxy::compositionWasCanceled):
1174         (WebKit::WebPageProxy::registerInsertionUndoGrouping):
1175         (WebKit::WebPageProxy::canUndoRedo):
1176         (WebKit::WebPageProxy::executeUndoRedo):
1177         (WebKit::WebPageProxy::clearAllEditCommands):
1178         (WebKit::WebPageProxy::setTextIndicator):
1179         (WebKit::WebPageProxy::clearTextIndicator):
1180         (WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
1181         (WebKit::WebPageProxy::showPopupMenu):
1182         (WebKit::WebPageProxy::showContextMenu):
1183         (WebKit::WebPageProxy::registerEditCommand):
1184         (WebKit::WebPageProxy::canUndo):
1185         (WebKit::WebPageProxy::canRedo):
1186         (WebKit::WebPageProxy::setToolTip):
1187         (WebKit::WebPageProxy::setCursor):
1188         (WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves):
1189         (WebKit::WebPageProxy::didReceiveEvent):
1190         (WebKit::WebPageProxy::resetState):
1191         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1192         (WebKit::WebPageProxy::creationParameters):
1193         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
1194         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
1195         (WebKit::WebPageProxy::updateAcceleratedCompositingMode):
1196         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
1197         (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
1198         (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
1199         (WebKit::WebPageProxy::didFinishLoadingDataForCustomContentProvider):
1200         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
1201         (WebKit::WebPageProxy::showCorrectionPanel):
1202         (WebKit::WebPageProxy::dismissCorrectionPanel):
1203         (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
1204         (WebKit::WebPageProxy::recordAutocorrectionResponse):
1205         (WebKit::WebPageProxy::useDarkAppearance const):
1206         (WebKit::WebPageProxy::showDictationAlternativeUI):
1207         (WebKit::WebPageProxy::removeDictationAlternatives):
1208         (WebKit::WebPageProxy::dictationAlternatives):
1209         (WebKit::WebPageProxy::setEditableElementIsFocused):
1210         (WebKit::WebPageProxy::takeViewSnapshot):
1211         (WebKit::WebPageProxy::wrapCryptoKey):
1212         (WebKit::WebPageProxy::unwrapCryptoKey):
1213         (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
1214         (WebKit::WebPageProxy::navigationGestureDidBegin):
1215         (WebKit::WebPageProxy::navigationGestureWillEnd):
1216         (WebKit::WebPageProxy::navigationGestureDidEnd):
1217         (WebKit::WebPageProxy::willRecordNavigationSnapshot):
1218         (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
1219         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1220         (WebKit::WebPageProxy::videoControlsManagerDidChange):
1221         (WebKit::WebPageProxy::handleControlledElementIDResponse const):
1222         (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
1223         (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
1224         (WebKit::WebPageProxy::didHandleAcceptedCandidate):
1225         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
1226         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
1227         (WebKit::WebPageProxy::showPlaybackTargetPicker):
1228         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
1229         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled):
1230         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
1231         (WebKit::WebPageProxy::didChangeBackgroundColor):
1232         (WebKit::WebPageProxy::didRestoreScrollPosition):
1233         (WebKit::WebPageProxy::userInterfaceLayoutDirection):
1234         (WebKit::WebPageProxy::didInsertAttachment):
1235         (WebKit::WebPageProxy::didRemoveAttachment):
1236         * UIProcess/WebPageProxy.h:
1237         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
1238         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
1239         * UIProcess/gtk/WebPageProxyGtk.cpp:
1240         (WebKit::WebPageProxy::viewWidget):
1241         (WebKit::WebPageProxy::editorStateChanged):
1242         * UIProcess/ios/WebPageProxyIOS.mm:
1243         (WebKit::WebPageProxy::computeCustomFixedPositionRect const):
1244         (WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
1245         (WebKit::WebPageProxy::overflowScrollViewDidScroll):
1246         (WebKit::WebPageProxy::overflowScrollWillStartScroll):
1247         (WebKit::WebPageProxy::overflowScrollDidEndScroll):
1248         (WebKit::WebPageProxy::didCommitLayerTree):
1249         (WebKit::WebPageProxy::layerTreeCommitComplete):
1250         (WebKit::WebPageProxy::didReceivePositionInformation):
1251         (WebKit::WebPageProxy::saveImageToLibrary):
1252         (WebKit::WebPageProxy::interpretKeyEvent):
1253         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
1254         (WebKit::WebPageProxy::couldNotRestorePageState):
1255         (WebKit::WebPageProxy::restorePageState):
1256         (WebKit::WebPageProxy::restorePageCenterAndScale):
1257         (WebKit::WebPageProxy::didGetTapHighlightGeometries):
1258         (WebKit::WebPageProxy::startAssistingNode):
1259         (WebKit::WebPageProxy::stopAssistingNode):
1260         (WebKit::WebPageProxy::showInspectorHighlight):
1261         (WebKit::WebPageProxy::hideInspectorHighlight):
1262         (WebKit::WebPageProxy::showInspectorIndication):
1263         (WebKit::WebPageProxy::hideInspectorIndication):
1264         (WebKit::WebPageProxy::enableInspectorNodeSearch):
1265         (WebKit::WebPageProxy::disableInspectorNodeSearch):
1266         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
1267         (WebKit::WebPageProxy::showPlaybackTargetPicker):
1268         (WebKit::WebPageProxy::commitPotentialTapFailed):
1269         (WebKit::WebPageProxy::didNotHandleTapAsClick):
1270         (WebKit::WebPageProxy::didCompleteSyntheticClick):
1271         (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
1272         (WebKit::WebPageProxy::editorStateChanged):
1273         (WebKit::WebPageProxy::showValidationMessage):
1274         (WebKit::WebPageProxy::didHandleStartDataInteractionRequest):
1275         (WebKit::WebPageProxy::didHandleAdditionalDragItemsRequest):
1276         (WebKit::WebPageProxy::didConcludeEditDataInteraction):
1277         (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame):
1278         * UIProcess/mac/WebPageProxyMac.mm:
1279         (WebKit::WebPageProxy::windowAndViewFramesChanged):
1280         (WebKit::WebPageProxy::insertDictatedTextAsync):
1281         (WebKit::WebPageProxy::setPromisedDataForImage):
1282         (WebKit::WebPageProxy::didPerformDictionaryLookup):
1283         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
1284         (WebKit::WebPageProxy::makeFirstResponder):
1285         (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
1286         (WebKit::WebPageProxy::colorSpace):
1287         (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged):
1288         (WebKit::WebPageProxy::setPluginComplexTextInputState):
1289         (WebKit::WebPageProxy::executeSavedCommandBySelector):
1290         (WebKit::WebPageProxy::intrinsicContentSizeDidChange):
1291         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
1292         (WebKit::WebPageProxy::acceleratedCompositingRootLayer const):
1293         (WebKit::WebPageProxy::showPDFContextMenu):
1294         (WebKit::WebPageProxy::showTelephoneNumberMenu):
1295         (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates const):
1296         (WebKit::WebPageProxy::editorStateChanged):
1297         (WebKit::WebPageProxy::startWindowDrag):
1298         (WebKit::WebPageProxy::platformWindow):
1299         (WebKit::WebPageProxy::rootViewToWindow):
1300         (WebKit::WebPageProxy::showValidationMessage):
1301         (WebKit::WebPageProxy::inspectorAttachmentView):
1302         (WebKit::WebPageProxy::remoteObjectRegistry):
1303         * UIProcess/win/WebPageProxyWin.cpp:
1304         (WebKit::WebPageProxy::viewWidget):
1305         * UIProcess/wpe/WebPageProxyWPE.cpp:
1306         (WebKit::WebPageProxy::viewBackend):
1307
1308 2018-09-11  Chris Dumez  <cdumez@apple.com>
1309
1310         Regression(PSON): "Swipe back" snapshot is missing when navigating back cross-process
1311         https://bugs.webkit.org/show_bug.cgi?id=189482
1312         <rdar://problem/44317222>
1313
1314         Reviewed by Geoffrey Garen.
1315
1316         The issue was that when we swap process on navigation, we:
1317         1. Call processDidTerminate() which calls resetState() and clears the displayed content
1318         2. Reattach the WebPageProxy to a new WebProcess
1319         3. Trigger the navigation
1320         4. Take the navigation snapshot
1321
1322         When the navigation snapshot occurs at step 4, the view is already blank in the case of
1323         process swap. To avoid the issue, we take the navigation snapshot earlier, before calling
1324         processDidTerminate() and we suppress the next navigation snapshot as it would be blank.
1325
1326         At some point, we will likely want to display the previous' WebProcess content longer,
1327         until the new WebProcess has something interesting to display. Once this is implemented,
1328         we'll likely be able to drop the early snapshotting logic.
1329
1330         * UIProcess/WebPageProxy.cpp:
1331         (WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
1332         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1333         (WebKit::WebPageProxy::restoreFromSessionState):
1334         (WebKit::WebPageProxy::didCommitLoadForFrame):
1335         * UIProcess/WebPageProxy.h:
1336         (WebKit::WebPageProxy::suppressNextAutomaticNavigationSnapshot):
1337
1338 2018-09-11  Woodrow Wang  <woodrow_wang@apple.com>
1339
1340         Add Web API Statistics Collection
1341         https://bugs.webkit.org/show_bug.cgi?id=187773
1342         <rdar://problem/44155162>
1343
1344         Reviewed by Brent Fulgham.
1345
1346         * Shared/WebCoreArgumentCoders.cpp:
1347         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
1348         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
1349         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
1350
1351 == Rolled over to ChangeLog-2018-09-11 ==