b3578f9394e83587ec5387de1f077da48796da8a
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-09-12  Dan Bernstein  <mitz@apple.com>
2
3         [Cocoa] Complete support for Paste as Quotation
4         https://bugs.webkit.org/show_bug.cgi?id=189504
5
6         Reviewed by Wenson Hsieh.
7
8         * UIProcess/API/Cocoa/WKWebView.mm:
9         (-[WKWebView canPerformAction:withSender:]): Handle _pasteAsQuotation:. It’s not included
10           in FOR_EACH_WKCONTENTVIEW_ACTION, because it’s declared and implemented in the WKPrivate
11           category. If we add more actions in the category, it could make sense to fold them into
12           a new FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION.
13         (-[WKWebView targetForAction:withSender:]): Handle _pasteAsQuotation:.
14         (-[WKWebView _pasteAsQuotation:]): Send to the WebViewImpl or the WKContentView.
15         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared a new _pasteAsQuotation: action.
16
17         * UIProcess/Cocoa/WebViewImpl.mm:
18         (WebKit::selectorExceptionMap): Added a custom mapping from the new selector to the
19           PasteAsQuotation command.
20
21         * UIProcess/ios/WKContentViewInteraction.h: Declare methods for the new action.
22         * UIProcess/ios/WKContentViewInteraction.mm:
23           Forward _pasteAsQuotation: to the WKWebView so that clients get a chance to override its
24           behavior.
25         (-[WKContentView _pasteAsQuotationForWebView:]): Send the command to the page.
26
27 2018-09-12  Sihui Liu  <sihui_liu@apple.com>
28
29         Move IndexedDB to Network Process
30         https://bugs.webkit.org/show_bug.cgi?id=189415
31
32         Reviewed by Geoffrey Garen.
33
34         We are going to eliminate storage process and move its functionality to network process. 
35         The reasons why we want to do this:
36         1. Lower resource usage of having an additional process for storage operations, especially
37         memory. Single storage process takes about 5MB memory on macOS.
38         2. Reduce latency of Service Workers. After enabling Service Workers, we've seen
39         regression in app launch. The launch time of storage process is partly attributed to this:
40         Service Workers delay page loading until receiving response from storage process.
41         3. We choose network process because UI process may have broader access in file system
42         that we don't want the storage operations to have.
43
44         This patch is the first piece towards the goal. It mainly moves indexedDB from storage process
45         to corresponding components of network process. Moving of Service Worker and stopping to 
46         launch storage process will be done in following patches.
47
48         We expect to see the higher cpu and memory usage of network process as it is taking more work,
49         but the overall gain in memory and latency after we completely remove storage process should be 
50         positive.
51
52
53         * CMakeLists.txt:
54         * DerivedSources.make:
55
56         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp.
57         (WebKit::WebIDBConnectionToClient::create):
58         (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
59         (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
60         (WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
61         (WebKit::WebIDBConnectionToClient::messageSenderConnection):
62         (WebKit::WebIDBConnectionToClient::connectionToClient):
63         (WebKit::WebIDBConnectionToClient::didDeleteDatabase):
64         (WebKit::WebIDBConnectionToClient::didOpenDatabase):
65         (WebKit::WebIDBConnectionToClient::didAbortTransaction):
66         (WebKit::WebIDBConnectionToClient::didCommitTransaction):
67         (WebKit::WebIDBConnectionToClient::didCreateObjectStore):
68         (WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
69         (WebKit::WebIDBConnectionToClient::didRenameObjectStore):
70         (WebKit::WebIDBConnectionToClient::didClearObjectStore):
71         (WebKit::WebIDBConnectionToClient::didCreateIndex):
72         (WebKit::WebIDBConnectionToClient::didDeleteIndex):
73         (WebKit::WebIDBConnectionToClient::didRenameIndex):
74         (WebKit::WebIDBConnectionToClient::didPutOrAdd):
75         (WebKit::WebIDBConnectionToClient::handleGetResult):
76         (WebKit::WebIDBConnectionToClient::didGetRecord):
77         (WebKit::WebIDBConnectionToClient::didGetAllRecords):
78         (WebKit::WebIDBConnectionToClient::didGetCount):
79         (WebKit::WebIDBConnectionToClient::didDeleteRecord):
80         (WebKit::WebIDBConnectionToClient::didOpenCursor):
81         (WebKit::WebIDBConnectionToClient::didIterateCursor):
82         (WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
83         (WebKit::WebIDBConnectionToClient::didStartTransaction):
84         (WebKit::WebIDBConnectionToClient::didCloseFromServer):
85         (WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
86         (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
87         (WebKit::WebIDBConnectionToClient::deleteDatabase):
88         (WebKit::WebIDBConnectionToClient::openDatabase):
89         (WebKit::WebIDBConnectionToClient::abortTransaction):
90         (WebKit::WebIDBConnectionToClient::commitTransaction):
91         (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
92         (WebKit::WebIDBConnectionToClient::createObjectStore):
93         (WebKit::WebIDBConnectionToClient::deleteObjectStore):
94         (WebKit::WebIDBConnectionToClient::renameObjectStore):
95         (WebKit::WebIDBConnectionToClient::clearObjectStore):
96         (WebKit::WebIDBConnectionToClient::createIndex):
97         (WebKit::WebIDBConnectionToClient::deleteIndex):
98         (WebKit::WebIDBConnectionToClient::renameIndex):
99         (WebKit::WebIDBConnectionToClient::putOrAdd):
100         (WebKit::WebIDBConnectionToClient::getRecord):
101         (WebKit::WebIDBConnectionToClient::getAllRecords):
102         (WebKit::WebIDBConnectionToClient::getCount):
103         (WebKit::WebIDBConnectionToClient::deleteRecord):
104         (WebKit::WebIDBConnectionToClient::openCursor):
105         (WebKit::WebIDBConnectionToClient::iterateCursor):
106         (WebKit::WebIDBConnectionToClient::establishTransaction):
107         (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
108         (WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
109         (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
110         (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
111         (WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
112         (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
113         (WebKit::WebIDBConnectionToClient::getAllDatabaseNames):
114         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h.
115         * NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
116         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
117         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
118
119         Code moved from StorageToWebProcessConnection::didReceiveMessage.
120
121         (WebKit::NetworkConnectionToWebProcess::didClose):
122         (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
123
124         Network process receives and stores sandbox extension of temporary files for later indexedDB
125         use.
126
127         (WebKit::generateIDBConnectionToServerIdentifier):
128         (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
129         (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer):
130         * NetworkProcess/NetworkConnectionToWebProcess.h:
131         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
132         * NetworkProcess/NetworkProcess.cpp:
133         (WebKit::NetworkProcess::NetworkProcess):
134         (WebKit::NetworkProcess::initializeNetworkProcess):
135         (WebKit::NetworkProcess::addWebsiteDataStore):
136         (WebKit::NetworkProcess::fetchWebsiteData):
137         (WebKit::NetworkProcess::deleteWebsiteData):
138         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
139         (WebKit::NetworkProcess::idbServer):
140         (WebKit::NetworkProcess::ensurePathExists):
141         (WebKit::NetworkProcess::postStorageTask):
142         (WebKit::NetworkProcess::performNextStorageTask):
143         (WebKit::NetworkProcess::prepareForAccessToTemporaryFile):
144         (WebKit::NetworkProcess::accessToTemporaryFileComplete):
145         (WebKit::NetworkProcess::indexedDatabaseOrigins):
146         (WebKit::NetworkProcess::addIndexedDatabaseSession):
147         (WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):
148
149         Instead of asking UI process to grant sandbox extension to storage process, now network 
150         process just asks for sandbox extension fot itself.
151
152         (WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles):
153         (WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions):
154         (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
155         (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted.
156         * NetworkProcess/NetworkProcess.h:
157         (WebKit::NetworkProcess::queue):
158         * NetworkProcess/NetworkProcess.messages.in:
159         * NetworkProcess/NetworkProcessCreationParameters.cpp:
160         (WebKit::NetworkProcessCreationParameters::encode const):
161         (WebKit::NetworkProcessCreationParameters::decode):
162         * NetworkProcess/NetworkProcessCreationParameters.h:
163         * Shared/Storage/StorageProcessCreationParameters.cpp:
164         (WebKit::StorageProcessCreationParameters::encode const):
165         (WebKit::StorageProcessCreationParameters::decode):
166         * Shared/Storage/StorageProcessCreationParameters.h:
167         * Shared/WebsiteDataStoreParameters.cpp:
168         (WebKit::WebsiteDataStoreParameters::encode const):
169         (WebKit::WebsiteDataStoreParameters::decode):
170         (WebKit::WebsiteDataStoreParameters::privateSessionParameters):
171         * Shared/WebsiteDataStoreParameters.h:
172         * Sources.txt:
173         * StorageProcess/StorageProcess.cpp:
174         (WebKit::StorageProcess::initializeWebsiteDataStore):
175         (WebKit::StorageProcess::fetchWebsiteData):
176         (WebKit::StorageProcess::deleteWebsiteData):
177         (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
178         (WebKit::StorageProcess::idbServer): Deleted.
179         (WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted.
180         (WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted.
181         (WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted.
182         (WebKit::StorageProcess::indexedDatabaseOrigins): Deleted.
183         (WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted.
184         (WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted.
185         * StorageProcess/StorageProcess.h:
186         (WebKit::StorageProcess::queue): Deleted.
187         * StorageProcess/StorageProcess.messages.in:
188         * StorageProcess/StorageToWebProcessConnection.cpp:
189         (WebKit::StorageToWebProcessConnection::didReceiveMessage):
190         (WebKit::StorageToWebProcessConnection::didClose):
191         (WebKit::generateIDBConnectionToServerIdentifier): Deleted.
192         (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted.
193         (WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted.
194         * StorageProcess/StorageToWebProcessConnection.h:
195         * StorageProcess/StorageToWebProcessConnection.messages.in:
196         * UIProcess/Network/NetworkProcessProxy.cpp:
197         (WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
198         (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
199         * UIProcess/Network/NetworkProcessProxy.h:
200         * UIProcess/Network/NetworkProcessProxy.messages.in:
201         * UIProcess/Storage/StorageProcessProxy.cpp:
202         (WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted.
203         * UIProcess/Storage/StorageProcessProxy.h:
204         * UIProcess/Storage/StorageProcessProxy.messages.in:
205         * UIProcess/WebProcessPool.cpp:
206         (WebKit::WebProcessPool::ensureNetworkProcess):
207         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
208         (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
209         * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
210         (WebKit::WebsiteDataStore::parameters):
211         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
212         (WebKit::computeNetworkProcessAccessTypeForDataFetch):
213         (WebKit::WebsiteDataStore::fetchDataAndApply):
214         (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
215         (WebKit::WebsiteDataStore::removeData):
216         (WebKit::WebsiteDataStore::storageProcessParameters):
217         (WebKit::WebsiteDataStore::parameters):
218         * WebKit.xcodeproj/project.pbxproj:
219         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
220         (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
221         (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
222         (WebKit::WebIDBConnectionToServer::messageSenderConnection):
223         * WebProcess/Databases/WebDatabaseProvider.cpp:
224         (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
225         * WebProcess/Network/NetworkProcessConnection.cpp:
226         (WebKit::NetworkProcessConnection::didReceiveMessage):
227         (WebKit::NetworkProcessConnection::didClose):
228         (WebKit::NetworkProcessConnection::idbConnectionToServerForSession):
229         * WebProcess/Network/NetworkProcessConnection.h:
230         (WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier):
231         * WebProcess/Storage/WebToStorageProcessConnection.cpp:
232         (WebKit::WebToStorageProcessConnection::didReceiveMessage):
233
234         Code moved from WebToStorageProcessConnection::didReceiveMessage.
235
236         (WebKit::WebToStorageProcessConnection::didClose):
237         (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted.
238         * WebProcess/Storage/WebToStorageProcessConnection.h:
239         (WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted.
240         * WebProcess/WebProcess.cpp:
241         (WebKit::WebProcess::networkProcessConnectionClosed):
242         (WebKit::WebProcess::webToStorageProcessConnectionClosed):
243
244 2018-09-11  Simon Fraser  <simon.fraser@apple.com>
245
246         Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
247         https://bugs.webkit.org/show_bug.cgi?id=189521
248
249         Reviewed by Tim Horton.
250
251         Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.
252         
253         RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.
254         
255         All the other changes are just to adapt to the new ownership patterns.
256         
257         I verified that no GraphicsLayers were leaked or abandoned after this change.
258
259         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
260         (WebKit::WebInspectorClient::~WebInspectorClient):
261         (WebKit::WebInspectorClient::showPaintRect):
262         (WebKit::WebInspectorClient::animationEndedForLayer):
263         * WebProcess/WebCoreSupport/WebInspectorClient.h:
264         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
265         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
266         (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
267         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
268         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
269         (WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
270         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
271
272 2018-09-12  Chris Dumez  <cdumez@apple.com>
273
274         PSON: No process swap on back navigation after URL bar navigation
275         https://bugs.webkit.org/show_bug.cgi?id=189557
276         <rdar://problem/44353108>
277
278         Reviewed by Alex Christensen.
279
280         Our logic in WebProcessPool::processForNavigationInternal() was wrongly using
281         WebBackForwardList::currentItem() as source item of the navigation, instead of
282         using Navigation::fromItem(). In case of back navigation, by the time
283         processForNavigation() is called, the WebBackForwardList's currentItem has already
284         been updated to be the target item, via a Sync IPC from the WebProcess. As a result,
285         the source and target items would be the same in the following check:
286         ` if (currentItem->itemID().processIdentifier == backForwardListItem->itemID().processIdentifier)`
287
288         This would cause us to reuse the same process incorrectly. Our existing API test coverage
289         did not catch this because our target HistoryItem usually has a SuspendedPage and we decide
290         to use the SuspendedPage's process a few lines above in WebProcessPool::processForNavigationInternal().
291
292         * UIProcess/WebProcessPool.cpp:
293         (WebKit::WebProcessPool::processForNavigationInternal):
294
295 2018-09-12  Alex Christensen  <achristensen@webkit.org>
296
297         Make IPC::SharedBufferDataReference a type that decodes into but does not inherit from IPC::DataReference
298         https://bugs.webkit.org/show_bug.cgi?id=189519
299
300         Reviewed by Chris Dumez.
301
302         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
303         * NetworkProcess/NetworkResourceLoader.cpp:
304         (WebKit::NetworkResourceLoader::bufferingTimerFired):
305         (WebKit::NetworkResourceLoader::sendBuffer):
306         * Platform/IPC/DataReference.cpp:
307         (IPC::SharedBufferDataReference::encode const): Deleted.
308         * Platform/IPC/DataReference.h:
309         (IPC::SharedBufferDataReference::SharedBufferDataReference): Deleted.
310         * Platform/IPC/HandleMessage.h:
311         * Platform/IPC/SharedBufferDataReference.h: Added.
312         (IPC::SharedBufferDataReference::SharedBufferDataReference):
313         (IPC::SharedBufferDataReference::encode const):
314         * Scripts/webkit/messages.py:
315         * Shared/API/APIData.h:
316         * StorageProcess/StorageProcess.messages.in:
317         * UIProcess/WebPageProxy.messages.in:
318         * UIProcess/WebURLSchemeTask.cpp:
319         (WebKit::WebURLSchemeTask::didReceiveData):
320         * WebKit.xcodeproj/project.pbxproj:
321         * WebProcess/Network/WebLoaderStrategy.cpp:
322         (WebKit::WebLoaderStrategy::storeDerivedDataToCache):
323         * WebProcess/Network/WebResourceLoader.messages.in:
324         * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
325         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
326         (WebKit::WebServiceWorkerFetchTaskClient::didReceiveBlobChunk):
327         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
328         (WebKit::WebEditorClient::registerAttachmentIdentifier):
329         * WebProcess/WebPage/WebPage.cpp:
330         (WebKit::WebPage::getContentsAsMHTMLData):
331         (WebKit::WebPage::getSelectionAsWebArchiveData):
332         (WebKit::WebPage::getMainResourceDataOfFrame):
333         (WebKit::WebPage::getResourceDataFromFrame):
334         (WebKit::WebPage::getWebArchiveOfFrame):
335         (WebKit::WebPage::drawPagesToPDF):
336         * WebProcess/WebPage/WebPage.messages.in:
337
338 2018-09-11  Dean Jackson  <dino@apple.com>
339
340         Header parsing for experimental and internal debug features
341         https://bugs.webkit.org/show_bug.cgi?id=189486
342         <rdar://problem/44320618>
343
344         Reviewed by Tim Horton.
345
346         Provide key-based (string) access to experimental and internal features.
347
348         * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
349         * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
350         * UIProcess/API/C/WKPreferences.cpp:
351         (WKPreferencesSetExperimentalFeatureForKey):
352         (WKPreferencesResetAllInternalDebugFeatures):
353         (WKPreferencesSetInternalDebugFeatureForKey):
354         * UIProcess/API/C/WKPreferencesRefPrivate.h:
355         * UIProcess/WebPreferences.h:
356
357 2018-09-10  Matt Rajca  <mrajca@apple.com>
358
359         Expose a few WebPlaybackControlsManager-driven PIP APIs to clients
360         https://bugs.webkit.org/show_bug.cgi?id=189478
361         <rdar://problem/44312650>
362
363         Reviewed by Eric Carlson.
364
365         This patch exposes APIs necessary to toggle PIP and query its status from clients of WKWebView.
366         The existing PIP test has been updated to use the new APIs instead of simulating mouse clicks.
367         I also increased the size of the video element in the test page so it gets picked up by the
368         main content heuristics.
369
370         * UIProcess/API/Cocoa/WKWebView.mm:
371         (-[WKWebView _updateMediaPlaybackControlsManager]): Create a media playback controls manager if necessary.
372         (-[WKWebView _isPictureInPictureActive]): Return true if the "active" media element is in PIP.
373         (-[WKWebView _togglePictureInPicture]): Toggle PIP on the "active" media element.
374         (-[WKWebView _canTogglePictureInPicture]): Renamed from...
375         (-[WKWebView _canTogglePictureInPictureForTesting]):
376         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
377         * UIProcess/Cocoa/WebViewImpl.h:
378         * UIProcess/Cocoa/WebViewImpl.mm:
379         (WebKit::WebViewImpl::isPictureInPictureActive): Return true if the "active" media element is in PIP.
380         (WebKit::WebViewImpl::togglePictureInPicture): Toggle PIP on the "active" media element.
381         (WebKit::WebViewImpl::updateMediaPlaybackControlsManager): Let clients create a playback
382          controls manager even when there is no Touch Bar present.
383         (WebKit::WebViewImpl::updateMediaTouchBar): Extract some code into a helper method.
384         (WebKit::WebViewImpl::canTogglePictureInPicture): Renamed from...
385         (WebKit::WebViewImpl::canTogglePictureInPictureForTesting):
386
387 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
388
389         [Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
390         https://bugs.webkit.org/show_bug.cgi?id=189542
391
392         Reviewed by Alex Christensen.
393
394         * UIProcess/win/WebInspectorProxyWin.cpp:
395         (WebKit::WebInspectorProxy::platformCreateFrontendPage): Narrowed initialWindowWidth and initialWindowHeight by using static_cast.
396
397 2018-09-12  Chris Dumez  <cdumez@apple.com>
398
399         Clean up SuspendedPageProxy
400         https://bugs.webkit.org/show_bug.cgi?id=189517
401
402         Reviewed by Alex Christensen.
403
404         Clean up SuspendedPageProxy:
405         1. SuspendedPageProxy does not need to be RefCounted. It is even dangerous given that WebPageProxy
406            owns the SuspendedPageProxy and SuspendedPageProxy has a WebPageProxy& data member. We definitely
407            do not want it to outlive its WebPageProxy.
408         2. The SuspendedPageProxy destructor does not need to be virtual.
409         3. Have WebBackForwardListItem keep a WeakPtr<SuspendedPageProxy> instead of a SuspendedPageProxy*.
410            This is safer and avoid having to explicitly clear the pointer.
411         4. m_finishedSuspending data member does not need a getter and is only needed if !LOG_DISABLED.
412
413         * Shared/WebBackForwardListItem.cpp:
414         (WebKit::WebBackForwardListItem::setSuspendedPage):
415         * Shared/WebBackForwardListItem.h:
416         (WebKit::WebBackForwardListItem::suspendedPage const):
417         * UIProcess/SuspendedPageProxy.cpp:
418         (WebKit::SuspendedPageProxy::SuspendedPageProxy):
419         (WebKit::SuspendedPageProxy::~SuspendedPageProxy):
420         (WebKit::SuspendedPageProxy::webProcessDidClose):
421         (WebKit::SuspendedPageProxy::didFinishLoad):
422         * UIProcess/SuspendedPageProxy.h:
423         (WebKit::SuspendedPageProxy::process const):
424         * UIProcess/WebPageProxy.cpp:
425         (WebKit::WebPageProxy::maybeCreateSuspendedPage):
426         (WebKit::WebPageProxy::reattachToWebProcess):
427         * UIProcess/WebPageProxy.h:
428
429 2018-09-12  Guillaume Emont  <guijemont@igalia.com>
430
431         Add IGNORE_WARNING_.* macros
432         https://bugs.webkit.org/show_bug.cgi?id=188996
433
434         Reviewed by Michael Catanzaro.
435
436         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
437         (WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
438         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
439         (WebKit::NetworkProcess::platformSyncAllCookies):
440         * PluginProcess/mac/PluginProcessMac.mm:
441         (WebKit::beginModal):
442         * PluginProcess/mac/PluginProcessShim.mm:
443         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
444         (WebKit::NetscapePluginModule::tryLoad):
445         * Shared/ios/ChildProcessIOS.mm:
446         (WebKit::ChildProcess::initializeSandbox):
447         * Shared/mac/ChildProcessMac.mm:
448         (WebKit::compileAndApplySandboxSlowCase):
449         * Shared/mac/ColorSpaceData.mm:
450         (WebKit::ColorSpaceData::decode):
451         * Shared/mac/SandboxExtensionMac.mm:
452         (WebKit::SandboxExtensionImpl::sandboxExtensionForType):
453         * UIProcess/API/Cocoa/WKWebView.mm:
454         (-[WKWebView _web_superAccessibilityAttributeValue:]):
455         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
456         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
457         * UIProcess/API/glib/WebKitWebView.cpp:
458         (webkitWebViewRunAsModal):
459         * UIProcess/API/mac/WKView.mm:
460         (-[WKView _web_superAccessibilityAttributeValue:]):
461         * UIProcess/Cocoa/DownloadClient.mm:
462         (WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
463         * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:
464         (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
465         * UIProcess/Cocoa/NavigationState.mm:
466         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
467         * UIProcess/Cocoa/UIDelegate.mm:
468         (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
469         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
470         (WebKit::WebProcessPool::platformInitializeWebProcess):
471         * UIProcess/Cocoa/WebViewImpl.mm:
472         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
473         (WebKit::WebViewImpl::updateWindowAndViewFrames):
474         (WebKit::WebViewImpl::sendDragEndToPage):
475         (WebKit::WebViewImpl::startDrag):
476         (WebKit::WebViewImpl::characterIndexForPoint):
477         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
478         (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
479         (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
480         (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
481         (WebKit::PluginProcessProxy::exitFullscreen):
482         * UIProcess/ios/SmartMagnificationController.mm:
483         * UIProcess/ios/WKGeolocationProviderIOS.mm:
484         * UIProcess/ios/WKLegacyPDFView.mm:
485         * UIProcess/ios/WKPDFPageNumberIndicator.mm:
486         (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
487         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
488         * UIProcess/ios/forms/WKFileUploadPanel.mm:
489         (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
490         * UIProcess/ios/forms/WKFormColorControl.mm:
491         (-[WKColorPopover initWithView:]):
492         * UIProcess/ios/forms/WKFormInputControl.mm:
493         (-[WKDateTimePopover initWithView:datePickerMode:]):
494         * UIProcess/ios/forms/WKFormPopover.h:
495         * UIProcess/ios/forms/WKFormPopover.mm:
496         * UIProcess/ios/forms/WKFormSelectPopover.mm:
497         (-[WKSelectPopover initWithView:hasGroups:]):
498         * UIProcess/mac/PageClientImplMac.mm:
499         (WebKit::PageClientImpl::screenToRootView):
500         (WebKit::PageClientImpl::rootViewToScreen):
501         * UIProcess/mac/WKFullScreenWindowController.mm:
502         (-[WKFullScreenWindowController enterFullScreen:]):
503         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
504         (-[WKFullScreenWindowController exitFullScreen]):
505         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
506         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
507         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
508         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
509         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
510         * UIProcess/mac/WKPrintingView.mm:
511         (-[WKPrintingView _setAutodisplay:]):
512         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
513         (-[WKPrintingView _drawPreview:]):
514         (-[WKPrintingView drawRect:]):
515         * UIProcess/mac/WKTextInputWindowController.mm:
516         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
517         (-[WKTextInputPanel _hasMarkedText]):
518         * UIProcess/mac/WebPopupMenuProxyMac.mm:
519         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
520         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
521         (WebKit::initializeEventRecord):
522         (WebKit::NetscapePlugin::sendComplexTextInput):
523         (WebKit::makeCGLPresentLayerOpaque):
524         (WebKit::NetscapePlugin::nullEventTimerFired):
525         * WebProcess/Plugins/PDF/PDFPlugin.mm:
526         (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
527         (-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
528         (WebKit::PDFPlugin::handleEditingCommand):
529         (WebKit::PDFPlugin::setActiveAnnotation):
530         (WebKit:: const):
531         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
532         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
533         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
534         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
535         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
536         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
537         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
538         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
539         (WebKit::convertImageToBitmap):
540         (WebKit::WebDragClient::declareAndWriteDragImage):
541         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
542         * WebProcess/WebPage/mac/WebPageMac.mm:
543         (WebKit::drawPDFPage):
544
545 2018-09-11  Olivia Barnett  <obarnett@apple.com>
546
547         Implement the Web Share API for mac
548         https://bugs.webkit.org/show_bug.cgi?id=189443
549
550         Reviewed by Tim Horton.
551
552         * Shared/WebPreferencesDefaultValues.h:
553         * UIProcess/API/Cocoa/WKWebView.mm:
554         (-[WKWebView shareSheetDidDismiss:]):
555         * UIProcess/API/Cocoa/WKWebViewInternal.h:
556         * UIProcess/API/mac/WKView.mm:
557         (-[WKView shareSheetDidDismiss:]):
558         * UIProcess/Cocoa/WebViewImpl.h:
559         * UIProcess/Cocoa/WebViewImpl.mm:
560         (WebKit::WebViewImpl::showShareSheet):
561         (WebKit::WebViewImpl::shareSheetDidDismiss):
562         Implemented function for WKShareSheetDelegate.
563
564         * UIProcess/Cocoa/WKShareSheet.h:
565         * UIProcess/Cocoa/WKShareSheet.mm:
566         (-[WKShareSheet initWithView:initWithView:]):
567         (-[WKShareSheet presentWithParameters:completionHandler:]):
568         (-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
569         (-[WKShareSheet _cancel]):
570         (-[WKShareSheet dismiss]):
571         (-[WKShareSheet _dismissDisplayAnimated:]):
572         (-[WKShareSheet invokeShareSheetWithResolution:]):
573         (-[WKShareSheet initWithView:]): Deleted.
574         Added mac platform checks and share sheet functionality.
575
576         * UIProcess/mac/PageClientImplMac.h:
577         * UIProcess/mac/PageClientImplMac.mm:
578         (WebKit::PageClientImpl::showShareSheet):
579         Allows macos to invoke the system share sheet.
580
581 2018-09-07  Dean Jackson  <dino@apple.com>
582
583         Add and expose Internal features from WebKit
584         https://bugs.webkit.org/show_bug.cgi?id=189442
585         <rdar://problem/44243404>
586
587         Reviewed by Simon Fraser.
588
589         Experimental features have become a mess. People are using them for
590         anything that they want to be easily toggled from a host app (e.g.
591         Safari), which means the user-facing menu has become large and
592         confusing.
593
594         Introduce the idea of Internal features, that will be exposed in a way
595         that end-users are not expected to ever see (unless they really want
596         to).
597
598         * CMakeLists.txt: Add new files.
599         * Sources.txt:
600         * SourcesCocoa.txt:
601         * WebKit.xcodeproj/project.pbxproj:
602
603         * DerivedSources.make: Add new generated files.
604         * Scripts/GeneratePreferences.rb: Generate the preferences stuff for Internal Debug features.
605         * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
606         * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb: Added.
607
608         * Shared/API/APIObject.h: New API object for InternalDebugFeature.
609         * Shared/Cocoa/APIObject.mm:
610         (API::Object::newObject):
611
612         * Shared/WebPreferences.yaml: Change some of the existing experimental features to "internal".
613
614         * UIProcess/API/APIInternalDebugFeature.cpp: New API type - just like APIExperimentalFeature.
615         (API::InternalDebugFeature::create):
616         (API::InternalDebugFeature::InternalDebugFeature):
617         (API::InternalDebugFeature::~InternalDebugFeature):
618         * UIProcess/API/APIInternalDebugFeature.h:
619         * UIProcess/API/C/WKAPICast.h:
620
621         * UIProcess/API/Cocoa/WKPreferences.mm: Change the naming of the experimental feature API so that it
622         won't clash with internal debug features. We can remove the old API once Safari has adopted.
623         (+[WKPreferences _internalDebugFeatures]):
624         (-[WKPreferences _isEnabledForInternalDebugFeature:]):
625         (-[WKPreferences _setEnabled:forInternalDebugFeature:]):
626         (-[WKPreferences _isEnabledForFeature:]):
627         (-[WKPreferences _setEnabled:forFeature:]):
628         (-[WKPreferences _isEnabledForExperimentalFeature:]):
629         (-[WKPreferences _setEnabled:forExperimentalFeature:]):
630         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
631
632         * UIProcess/API/Cocoa/_WKInternalDebugFeature.h: New object - same as _WKExperimentalFeature.
633         * UIProcess/API/Cocoa/_WKInternalDebugFeature.mm:
634         (-[_WKInternalDebugFeature dealloc]):
635         (-[_WKInternalDebugFeature description]):
636         (-[_WKInternalDebugFeature name]):
637         (-[_WKInternalDebugFeature key]):
638         (-[_WKInternalDebugFeature details]):
639         (-[_WKInternalDebugFeature defaultValue]):
640         (-[_WKInternalDebugFeature isHidden]):
641         (-[_WKInternalDebugFeature _apiObject]):
642         * UIProcess/API/Cocoa/_WKInternalDebugFeatureInternal.h:
643
644         * UIProcess/WebPreferences.cpp: Add support for Internal Debug features.
645         (WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
646         (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):
647         * UIProcess/WebPreferences.h:
648
649         * UIProcess/WebProcessPool.cpp: Change a comment now that it is an internal feature.
650         (WebKit::WebProcessPool::createWebPage):
651
652 2018-09-11  Eric Carlson  <eric.carlson@apple.com>
653
654         WebPage::close should clear UserMediaPermissionRequestManager
655         https://bugs.webkit.org/show_bug.cgi?id=189369
656         <rdar://problem/44196724>
657
658         Reviewed by Youenn Fablet.
659
660         * WebProcess/WebPage/WebPage.cpp:
661         (WebKit::WebPage::close): Clear m_userMediaPermissionRequestManager.
662
663 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
664
665         [macOS] [WK2] Support changing foreground colors via color panel
666         https://bugs.webkit.org/show_bug.cgi?id=189382
667         <rdar://problem/44227311>
668
669         Reviewed by Ryosuke Niwa.
670
671         Adds support for changing font color in a richly editable element in WebKit2 via NSColorPanel. See below for
672         more detail, as well as the WebCore ChangeLog.
673
674         * UIProcess/API/Cocoa/WKWebView.mm:
675         (-[WKWebView changeColor:]):
676
677         Implement this selector; AppKit calls into this when changing font color using NSColorPanel.
678
679         * UIProcess/Cocoa/WebViewImpl.h:
680         * UIProcess/Cocoa/WebViewImpl.mm:
681         (WebKit::WebViewImpl::changeFontColorFromSender):
682
683         Creates and populates new FontAttributeChanges, with only the foreground color determined by asking the sender
684         object for its -color.
685
686         * WebProcess/WebPage/mac/WebPageMac.mm:
687
688         Use the relevant EditAction for the incoming FontAttributeChanges, instead of always specifying
689         EditAction::ChangeAttributes.
690
691         (WebKit::WebPage::changeFontAttributes):
692
693 2018-09-11  Myles C. Maxfield  <mmaxfield@apple.com>
694
695         Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
696         https://bugs.webkit.org/show_bug.cgi?id=188008
697
698         Reviewed by Alex Christensen.
699
700         This patch is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=180307.
701         Variable fonts have CFDictionaries with non-string keys. We need to support that in our IPC code.
702
703         * Shared/cf/ArgumentCodersCF.cpp:
704         (IPC::encode):
705         (IPC::decode):
706
707 2018-09-11  Adrian Perez de Castro  <aperez@igalia.com>
708
709         [WPE][GTK] API documentation is unclear about how to modify requests before sending them
710         https://bugs.webkit.org/show_bug.cgi?id=189505
711
712         Reviewed by Michael Catanzaro.
713
714         Add notes to the API documentation to make explicit where modification
715         of WebKitURIRequest instances affects the request data sent over the
716         network.
717
718         * UIProcess/API/glib/WebKitNavigationAction.cpp: Clarify that
719         modifications to the associated WebKitURIRequest do not affect the
720         actual request. Point to WebKitPage::send-request instead.
721         * UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Ditto.
722         * UIProcess/API/glib/WebKitWebView.cpp:
723         (webkit_web_view_class_init): Ditto for the description of the
724         WebKitWebView::decide-policy signal. Also fix the syntax of example.
725         * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
726         (webkit_web_page_class_init): Indicate that modifications to the
727         WebKitURIRequest will change the actual network request data.
728
729 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
730
731         Unreviewed, attempt to fix Apple builds after r235903
732         https://bugs.webkit.org/show_bug.cgi?id=188872
733
734         If it really needs to be inlined, it will need to move to the header....
735
736         * UIProcess/WebPageProxy.cpp:
737         (WebKit::WebPageProxy::pageClient const):
738
739 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
740
741         Unreviewed, fix build after r235903
742         https://bugs.webkit.org/show_bug.cgi?id=188872
743
744         This broke all ports except GTK. Need to add a missing header.
745
746         * UIProcess/PageClient.h:
747
748 2018-09-11  Pablo Saavedra  <psaavedra@igalia.com>
749
750         Add missing #if ENABLE(VIDEO) WebProcess/FullScreen/WebFullScreenManager.cpp
751         https://bugs.webkit.org/show_bug.cgi?id=189506
752
753         Reviewed by Tim Horton.
754
755         m_pipStandbyElement is only defined in
756         WebKit/WebProcess/FullScreen/WebFullScreenManager.h
757         only when ENABLE(VIDEO) (see
758         https://bugs.webkit.org/show_bug.cgi?id=181338)
759
760         * WebProcess/FullScreen/WebFullScreenManager.cpp:
761         (WebKit::WebFullScreenManager::setPIPStandbyElement):
762
763 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
764
765         WebPageProxy should hold a WeakPtr to its PageClient
766         https://bugs.webkit.org/show_bug.cgi?id=188872
767
768         Reviewed by Ryosuke Niwa.
769
770         This ensures the PageClient reference is always valid when used.
771
772         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
773         (WebKit::WebPageProxy::startDrag):
774         (WebKit::WebPageProxy::setDragCaretRect):
775         * UIProcess/PageClient.h:
776         * UIProcess/WebPageProxy.cpp:
777         (WebKit::PageClientProtector::PageClientProtector):
778         (WebKit::PageClientProtector::~PageClientProtector):
779         (WebKit::WebPageProxy::WebPageProxy):
780         (WebKit::m_resetRecentCrashCountTimer):
781         (WebKit::WebPageProxy::pageClient const):
782         (WebKit::WebPageProxy::reattachToWebProcess):
783         (WebKit::WebPageProxy::initializeWebPage):
784         (WebKit::WebPageProxy::close):
785         (WebKit::WebPageProxy::didChangeBackForwardList):
786         (WebKit::WebPageProxy::willGoToBackForwardListItem):
787         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
788         (WebKit::WebPageProxy::setViewNeedsDisplay):
789         (WebKit::WebPageProxy::requestScroll):
790         (WebKit::WebPageProxy::viewScrollPosition const):
791         (WebKit::WebPageProxy::updateActivityState):
792         (WebKit::WebPageProxy::activityStateDidChange):
793         (WebKit::WebPageProxy::viewDidEnterWindow):
794         (WebKit::WebPageProxy::dispatchActivityStateChange):
795         (WebKit::WebPageProxy::layerHostingModeDidChange):
796         (WebKit::WebPageProxy::viewSize const):
797         (WebKit::WebPageProxy::startDrag):
798         (WebKit::WebPageProxy::didPerformDragOperation):
799         (WebKit::WebPageProxy::processNextQueuedMouseEvent):
800         (WebKit::WebPageProxy::findPlugin):
801         (WebKit::WebPageProxy::handleTouchEventSynchronously):
802         (WebKit::WebPageProxy::handleTouchEvent):
803         (WebKit::WebPageProxy::preferencesDidChange):
804         (WebKit::WebPageProxy::didCreateMainFrame):
805         (WebKit::WebPageProxy::didCreateSubframe):
806         (WebKit::WebPageProxy::didStartProgress):
807         (WebKit::WebPageProxy::didChangeProgress):
808         (WebKit::WebPageProxy::didFinishProgress):
809         (WebKit::WebPageProxy::didDestroyNavigation):
810         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
811         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
812         (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
813         (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
814         (WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
815         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
816         (WebKit::WebPageProxy::didCommitLoadForFrame):
817         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
818         (WebKit::WebPageProxy::didFinishLoadForFrame):
819         (WebKit::WebPageProxy::didFailLoadForFrame):
820         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
821         (WebKit::WebPageProxy::didReceiveTitleForFrame):
822         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
823         (WebKit::WebPageProxy::didReachLayoutMilestone):
824         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
825         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
826         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
827         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
828         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
829         (WebKit::WebPageProxy::decidePolicyForResponse):
830         (WebKit::WebPageProxy::unableToImplementPolicy):
831         (WebKit::WebPageProxy::didNavigateWithNavigationData):
832         (WebKit::WebPageProxy::didPerformClientRedirect):
833         (WebKit::WebPageProxy::didPerformServerRedirect):
834         (WebKit::WebPageProxy::didUpdateHistoryTitle):
835         (WebKit::WebPageProxy::closePage):
836         (WebKit::WebPageProxy::setWindowFrame):
837         (WebKit::WebPageProxy::getWindowFrame):
838         (WebKit::WebPageProxy::getWindowFrameWithCallback):
839         (WebKit::WebPageProxy::screenToRootView):
840         (WebKit::WebPageProxy::rootViewToScreen):
841         (WebKit::WebPageProxy::syncRootViewToScreen):
842         (WebKit::WebPageProxy::accessibilityScreenToRootView):
843         (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
844         (WebKit::WebPageProxy::didChangeViewportProperties):
845         (WebKit::WebPageProxy::runOpenPanel):
846         (WebKit::WebPageProxy::showShareSheet):
847         (WebKit::WebPageProxy::handleDownloadRequest):
848         (WebKit::WebPageProxy::didChangeContentSize):
849         (WebKit::WebPageProxy::showColorPicker):
850         (WebKit::WebPageProxy::showDataListSuggestions):
851         (WebKit::WebPageProxy::compositionWasCanceled):
852         (WebKit::WebPageProxy::registerInsertionUndoGrouping):
853         (WebKit::WebPageProxy::canUndoRedo):
854         (WebKit::WebPageProxy::executeUndoRedo):
855         (WebKit::WebPageProxy::clearAllEditCommands):
856         (WebKit::WebPageProxy::setTextIndicator):
857         (WebKit::WebPageProxy::clearTextIndicator):
858         (WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
859         (WebKit::WebPageProxy::showPopupMenu):
860         (WebKit::WebPageProxy::showContextMenu):
861         (WebKit::WebPageProxy::registerEditCommand):
862         (WebKit::WebPageProxy::canUndo):
863         (WebKit::WebPageProxy::canRedo):
864         (WebKit::WebPageProxy::setToolTip):
865         (WebKit::WebPageProxy::setCursor):
866         (WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves):
867         (WebKit::WebPageProxy::didReceiveEvent):
868         (WebKit::WebPageProxy::resetState):
869         (WebKit::WebPageProxy::resetStateAfterProcessExited):
870         (WebKit::WebPageProxy::creationParameters):
871         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
872         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
873         (WebKit::WebPageProxy::updateAcceleratedCompositingMode):
874         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
875         (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
876         (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
877         (WebKit::WebPageProxy::didFinishLoadingDataForCustomContentProvider):
878         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
879         (WebKit::WebPageProxy::showCorrectionPanel):
880         (WebKit::WebPageProxy::dismissCorrectionPanel):
881         (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
882         (WebKit::WebPageProxy::recordAutocorrectionResponse):
883         (WebKit::WebPageProxy::useDarkAppearance const):
884         (WebKit::WebPageProxy::showDictationAlternativeUI):
885         (WebKit::WebPageProxy::removeDictationAlternatives):
886         (WebKit::WebPageProxy::dictationAlternatives):
887         (WebKit::WebPageProxy::setEditableElementIsFocused):
888         (WebKit::WebPageProxy::takeViewSnapshot):
889         (WebKit::WebPageProxy::wrapCryptoKey):
890         (WebKit::WebPageProxy::unwrapCryptoKey):
891         (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
892         (WebKit::WebPageProxy::navigationGestureDidBegin):
893         (WebKit::WebPageProxy::navigationGestureWillEnd):
894         (WebKit::WebPageProxy::navigationGestureDidEnd):
895         (WebKit::WebPageProxy::willRecordNavigationSnapshot):
896         (WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
897         (WebKit::WebPageProxy::isPlayingMediaDidChange):
898         (WebKit::WebPageProxy::videoControlsManagerDidChange):
899         (WebKit::WebPageProxy::handleControlledElementIDResponse const):
900         (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
901         (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
902         (WebKit::WebPageProxy::didHandleAcceptedCandidate):
903         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
904         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
905         (WebKit::WebPageProxy::showPlaybackTargetPicker):
906         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
907         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled):
908         (WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
909         (WebKit::WebPageProxy::didChangeBackgroundColor):
910         (WebKit::WebPageProxy::didRestoreScrollPosition):
911         (WebKit::WebPageProxy::userInterfaceLayoutDirection):
912         (WebKit::WebPageProxy::didInsertAttachment):
913         (WebKit::WebPageProxy::didRemoveAttachment):
914         * UIProcess/WebPageProxy.h:
915         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
916         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
917         * UIProcess/gtk/WebPageProxyGtk.cpp:
918         (WebKit::WebPageProxy::viewWidget):
919         (WebKit::WebPageProxy::editorStateChanged):
920         * UIProcess/ios/WebPageProxyIOS.mm:
921         (WebKit::WebPageProxy::computeCustomFixedPositionRect const):
922         (WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
923         (WebKit::WebPageProxy::overflowScrollViewDidScroll):
924         (WebKit::WebPageProxy::overflowScrollWillStartScroll):
925         (WebKit::WebPageProxy::overflowScrollDidEndScroll):
926         (WebKit::WebPageProxy::didCommitLayerTree):
927         (WebKit::WebPageProxy::layerTreeCommitComplete):
928         (WebKit::WebPageProxy::didReceivePositionInformation):
929         (WebKit::WebPageProxy::saveImageToLibrary):
930         (WebKit::WebPageProxy::interpretKeyEvent):
931         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
932         (WebKit::WebPageProxy::couldNotRestorePageState):
933         (WebKit::WebPageProxy::restorePageState):
934         (WebKit::WebPageProxy::restorePageCenterAndScale):
935         (WebKit::WebPageProxy::didGetTapHighlightGeometries):
936         (WebKit::WebPageProxy::startAssistingNode):
937         (WebKit::WebPageProxy::stopAssistingNode):
938         (WebKit::WebPageProxy::showInspectorHighlight):
939         (WebKit::WebPageProxy::hideInspectorHighlight):
940         (WebKit::WebPageProxy::showInspectorIndication):
941         (WebKit::WebPageProxy::hideInspectorIndication):
942         (WebKit::WebPageProxy::enableInspectorNodeSearch):
943         (WebKit::WebPageProxy::disableInspectorNodeSearch):
944         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
945         (WebKit::WebPageProxy::showPlaybackTargetPicker):
946         (WebKit::WebPageProxy::commitPotentialTapFailed):
947         (WebKit::WebPageProxy::didNotHandleTapAsClick):
948         (WebKit::WebPageProxy::didCompleteSyntheticClick):
949         (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
950         (WebKit::WebPageProxy::editorStateChanged):
951         (WebKit::WebPageProxy::showValidationMessage):
952         (WebKit::WebPageProxy::didHandleStartDataInteractionRequest):
953         (WebKit::WebPageProxy::didHandleAdditionalDragItemsRequest):
954         (WebKit::WebPageProxy::didConcludeEditDataInteraction):
955         (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame):
956         * UIProcess/mac/WebPageProxyMac.mm:
957         (WebKit::WebPageProxy::windowAndViewFramesChanged):
958         (WebKit::WebPageProxy::insertDictatedTextAsync):
959         (WebKit::WebPageProxy::setPromisedDataForImage):
960         (WebKit::WebPageProxy::didPerformDictionaryLookup):
961         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
962         (WebKit::WebPageProxy::makeFirstResponder):
963         (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
964         (WebKit::WebPageProxy::colorSpace):
965         (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged):
966         (WebKit::WebPageProxy::setPluginComplexTextInputState):
967         (WebKit::WebPageProxy::executeSavedCommandBySelector):
968         (WebKit::WebPageProxy::intrinsicContentSizeDidChange):
969         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
970         (WebKit::WebPageProxy::acceleratedCompositingRootLayer const):
971         (WebKit::WebPageProxy::showPDFContextMenu):
972         (WebKit::WebPageProxy::showTelephoneNumberMenu):
973         (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates const):
974         (WebKit::WebPageProxy::editorStateChanged):
975         (WebKit::WebPageProxy::startWindowDrag):
976         (WebKit::WebPageProxy::platformWindow):
977         (WebKit::WebPageProxy::rootViewToWindow):
978         (WebKit::WebPageProxy::showValidationMessage):
979         (WebKit::WebPageProxy::inspectorAttachmentView):
980         (WebKit::WebPageProxy::remoteObjectRegistry):
981         * UIProcess/win/WebPageProxyWin.cpp:
982         (WebKit::WebPageProxy::viewWidget):
983         * UIProcess/wpe/WebPageProxyWPE.cpp:
984         (WebKit::WebPageProxy::viewBackend):
985
986 2018-09-11  Chris Dumez  <cdumez@apple.com>
987
988         Regression(PSON): "Swipe back" snapshot is missing when navigating back cross-process
989         https://bugs.webkit.org/show_bug.cgi?id=189482
990         <rdar://problem/44317222>
991
992         Reviewed by Geoffrey Garen.
993
994         The issue was that when we swap process on navigation, we:
995         1. Call processDidTerminate() which calls resetState() and clears the displayed content
996         2. Reattach the WebPageProxy to a new WebProcess
997         3. Trigger the navigation
998         4. Take the navigation snapshot
999
1000         When the navigation snapshot occurs at step 4, the view is already blank in the case of
1001         process swap. To avoid the issue, we take the navigation snapshot earlier, before calling
1002         processDidTerminate() and we suppress the next navigation snapshot as it would be blank.
1003
1004         At some point, we will likely want to display the previous' WebProcess content longer,
1005         until the new WebProcess has something interesting to display. Once this is implemented,
1006         we'll likely be able to drop the early snapshotting logic.
1007
1008         * UIProcess/WebPageProxy.cpp:
1009         (WebKit::WebPageProxy::recordAutomaticNavigationSnapshot):
1010         (WebKit::WebPageProxy::continueNavigationInNewProcess):
1011         (WebKit::WebPageProxy::restoreFromSessionState):
1012         (WebKit::WebPageProxy::didCommitLoadForFrame):
1013         * UIProcess/WebPageProxy.h:
1014         (WebKit::WebPageProxy::suppressNextAutomaticNavigationSnapshot):
1015
1016 2018-09-11  Woodrow Wang  <woodrow_wang@apple.com>
1017
1018         Add Web API Statistics Collection
1019         https://bugs.webkit.org/show_bug.cgi?id=187773
1020         <rdar://problem/44155162>
1021
1022         Reviewed by Brent Fulgham.
1023
1024         * Shared/WebCoreArgumentCoders.cpp:
1025         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
1026         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
1027         * UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
1028
1029 == Rolled over to ChangeLog-2018-09-11 ==