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