17f9d94bffabcd1e3ea66f6e230c7aa95ee101a2
[WebKit-https.git] / Source / WebKit / ChangeLog
1 2018-02-27  Ryan Haddad  <ryanhaddad@apple.com>
2
3         Unreviewed, rolling out r229055.
4
5         Breaks internal builds.
6
7         Reverted changeset:
8
9         "Stop using deprecated CADisplay SPI"
10         https://bugs.webkit.org/show_bug.cgi?id=183150
11         https://trac.webkit.org/changeset/229055
12
13 2018-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
14
15         [Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
16         https://bugs.webkit.org/show_bug.cgi?id=183100
17         <rdar://problem/37840987>
18
19         Reviewed by Tim Horton.
20
21         Add new SPI hooks to provide finer control over certain aspects of the shrink-to-fit viewport heuristic.
22         Currently, in certain cases of iPad multitasking, Safari allows shrinking content to fit by default. This means
23         that even when "width=device-width" is used, if the contents of the page are too wide to fit within the
24         viewport's width, we'll adjust the initial scale such that the viewport can fit all of the content.
25
26         However, in certain viewport dimensions, this heuristic is insufficient to ensure that pages are laid out and
27         displayed properly within the viewport. Namely, one could imagine that an element with a hard-coded width that
28         is larger than the real viewport width would cause all other elements with dimensions relative to the body to be
29         excessively shrunk down once shrink-to-fit is applied, so the page would still look broken even if the contents
30         of the page all fit within the viewport.
31
32         To mitigate this, we decouple the notions of minimum layout size from the size of the actual viewport (which we
33         simply refer to as "view size"). This allows us to introduce a mechanism where we lay out the page at a given
34         minimum layout size that is larger than the size of the view; later, when we determine the initial scale, we
35         then apply shrink-to-fit scaling using the view size rather than the minimum layout size. This grants us the
36         ability to lay out content as if our view were large, but still ensure that the contents of the page fit within
37         the actual view.
38
39         * Shared/VisibleContentRectUpdateInfo.cpp:
40         (WebKit::VisibleContentRectUpdateInfo::encode const):
41         (WebKit::VisibleContentRectUpdateInfo::decode):
42         (WebKit::operator<<):
43         * Shared/VisibleContentRectUpdateInfo.h:
44         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
45         (WebKit::VisibleContentRectUpdateInfo::forceHorizontalShrinkToFit const):
46         (WebKit::operator==):
47
48         Plumb the forceHorizontalShrinkToFit flag through VisibleContentRectUpdateInfo.
49
50         * Shared/WebPageCreationParameters.cpp:
51         (WebKit::WebPageCreationParameters::encode const):
52         (WebKit::WebPageCreationParameters::decode):
53         * Shared/WebPageCreationParameters.h:
54
55         Plumb viewSize through IPC to WebPage.
56
57         * UIProcess/API/Cocoa/WKWebView.mm:
58         (-[WKWebView _initializeWithConfiguration:]):
59
60         Start off WKWebView flags at their initial values.
61
62         (-[WKWebView _minimumAllowedLayoutWidth]):
63         (-[WKWebView _setMinimumAllowedLayoutWidth:]):
64
65         This provides the minimum width at which the page will lay out, such that if the view width dips below this
66         value, we'll use this minimum allowed layout width instead. 0 by default.
67
68         (-[WKWebView activeMinimumLayoutSizes:]):
69
70         Refactor this from a static function to a helper method on WKWebView that computes both the minimum layout size
71         (which takes minimum allowed layout width into account) as well as the real view size. Refactor all call sites
72         to use this new method, and also propagate the view size down via IPC, alongside the minimum layout size.
73
74         (-[WKWebView _dispatchSetMinimumLayoutSize:viewSize:]):
75         (-[WKWebView _frameOrBoundsChanged]):
76         (-[WKWebView _setMinimumLayoutSizeOverride:]):
77         (-[WKWebView _setForceHorizontalViewportShrinkToFit:]):
78         (-[WKWebView _forceHorizontalViewportShrinkToFit]):
79
80         Setting this flag to YES forces us to always shrink-to-fit in the horizontal axis. NO by default.
81
82         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
83         (-[WKWebView _endAnimatedResize]):
84         (activeMinimumLayoutSize): Deleted.
85
86         More refactoring to replace activeMinimumLayoutSize() with -activeMinimumLayoutSizes:.
87
88         (-[WKWebView _dispatchSetMinimumLayoutSize:]): Deleted.
89         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
90         * UIProcess/WebPageProxy.cpp:
91         (WebKit::WebPageProxy::creationParameters):
92         * UIProcess/WebPageProxy.h:
93         * UIProcess/ios/WKContentView.mm:
94         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
95
96         Pass _forceHorizontalViewportShrinkToFit into the visible content rect update.
97
98         * UIProcess/ios/WebPageProxyIOS.mm:
99         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
100         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
101
102         Plumb viewSize alongside the existing minimumLayoutSize.
103
104         * WebProcess/WebPage/WebPage.cpp:
105         (WebKit::m_credentialsMessenger):
106         * WebProcess/WebPage/WebPage.h:
107         * WebProcess/WebPage/WebPage.messages.in:
108         * WebProcess/WebPage/ios/WebPageIOS.mm:
109         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
110         (WebKit::WebPage::dynamicViewportSizeUpdate):
111         (WebKit::WebPage::updateVisibleContentRects):
112
113         Set forceHorizontalShrinkToFit on the viewport configuration here.
114
115 2018-02-27  Tim Horton  <timothy_horton@apple.com>
116
117         Stop using deprecated CADisplay SPI
118         https://bugs.webkit.org/show_bug.cgi?id=183150
119         <rdar://problem/37918297>
120
121         Reviewed by Simon Fraser.
122
123         * Platform/spi/ios/FrontBoardServicesSPI.h: Added.
124         * Platform/spi/ios/UIKitSPI.h:
125         * UIProcess/API/Cocoa/WKWebView.mm:
126         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
127         * WebKit.xcodeproj/project.pbxproj:
128         Switch to the more modern way of getting the display name.
129
130 2018-02-26  Youenn Fablet  <youenn@apple.com>
131
132         Caches::m_storage should be set to null in case of error at initialization time
133         https://bugs.webkit.org/show_bug.cgi?id=183068
134
135         Reviewed by Chris Dumez.
136
137         In case of error, we need to set m_storage back to nullptr so that
138         next tries to initialize it will restart from scratch.
139         If we do not set it to nullptr, we end up storing the initialize
140         callback in a queue and the callback will never be called.
141
142         This is difficult to test as we need the following conditions:
143         - we need to have an error case, like a disk writing error
144         - we need the web app to open a cache in two different pages/frames at about the same time.
145
146         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
147         (WebKit::CacheStorage::Caches::initialize):
148
149 2018-02-26  Commit Queue  <commit-queue@webkit.org>
150
151         Unreviewed, rolling out r226330.
152         https://bugs.webkit.org/show_bug.cgi?id=183152
153
154         incorrectly assumes enumeration callback happens once
155         (Requested by alexchristensen on #webkit).
156
157         Reverted changeset:
158
159         "Use BlockPtrs and lambdas instead of new/delete to pass
160         parameters to blocks in WebViewImpl::performDragOperation"
161         https://bugs.webkit.org/show_bug.cgi?id=180795
162         https://trac.webkit.org/changeset/226330
163
164 2018-02-26  Ryosuke Niwa  <rniwa@webkit.org>
165
166         Release assertion in WebPage::updatePreferences
167         https://bugs.webkit.org/show_bug.cgi?id=183075
168
169         Reviewed by Youenn Fablet and Chris Dumez.
170
171         Replaced the release assertion added in r228589 with a more graceful disabling of the feature when the entitlement is missing.
172
173         * StorageProcess/StorageProcess.cpp:
174         (WebKit::StorageProcess::didReceiveMessage): Added an early exit with an entitlement check to disable the feature.
175         (WebKit::StorageProcess::initializeWebsiteDataStore): Ditto.
176         (WebKit::StorageProcess::createStorageToWebProcessConnection): Replaced the release assertion with a debug assertion.
177         (WebKit::StorageProcess::swServerForSession): Removed the assertion. This code can be reached when the service worker is disabled.
178         (WebKit::StorageProcess::registerSWServerConnection): Replaced the release assertion with a debug assertion.
179         * WebProcess/WebPage/WebPage.cpp:
180         (WebKit::WebPage::updatePreferences): Disable the feature instead of crashing when the entitlement is missing.
181
182 2018-02-26  Chris Dumez  <cdumez@apple.com>
183
184         Regression(r223431): Crash under didReceiveChallenge in NetworkSessionCocoa
185         https://bugs.webkit.org/show_bug.cgi?id=183134
186         <rdar://problem/36339049>
187
188         Reviewed by Alex Christensen.
189
190         Like other delegates functions in this file, it is possible for didReceiveChallenge to get called
191         after _session has been nulled out. Other delegate functions already had early returns when
192         _session is null. However, such early return was missing in didReceiveChallenge.
193
194         This patch ends the early return to didReceiveChallenge so that we do not end up calling
195         _session->downloadID(taskIdentifier) on a null _session.
196
197         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
198         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
199
200 2018-02-26  Youenn Fablet  <youenn@apple.com>
201
202         MessagePort is not always destroyed in the right thread
203         https://bugs.webkit.org/show_bug.cgi?id=183053
204
205         Reviewed by Chris Dumez.
206
207         Update code to pass a lambda to MessagePort::existingMessagePortForIdentifier.
208
209         * WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:
210         (WebKit::WebMessagePortChannelProvider::checkProcessLocalPortForActivity):
211         * WebProcess/WebProcess.cpp:
212         (WebKit::WebProcess::messagesAvailableForPort):
213
214 2018-02-25  Alexey Proskuryakov  <ap@apple.com>
215
216         Font smoothing doesn't get disabled if the preference is set before launching WebContent process
217         https://bugs.webkit.org/show_bug.cgi?id=183108
218
219         Reviewed by Tim Horton.
220
221         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):
222         Fix the bug. While at it, also avoid the anti-pattern in setAlwaysUsesComplexTextCodePath.
223
224 2018-02-25  Philippe Normand  <pnormand@igalia.com>
225
226         Unreviewed GTK Debug build fix after r228942.
227
228         * UIProcess/API/glib/IconDatabase.cpp:
229         (WebKit::IconDatabase::iconDatabaseSyncThread):
230         (WebKit::IconDatabase::syncThreadMainLoop):
231         (WebKit::IconDatabase::readFromDatabase):
232         (WebKit::IconDatabase::writeToDatabase):
233         (WebKit::IconDatabase::cleanupSyncThread):
234
235 2018-02-25  Chris Dumez  <cdumez@apple.com>
236
237         Service workers do not work well inside Web.app
238         https://bugs.webkit.org/show_bug.cgi?id=183105
239         <rdar://problem/37864140>
240
241         Reviewed by Youenn Fablet.
242
243         * StorageProcess/StorageProcess.cpp:
244         (WebKit::StorageProcess::didReceiveMessage):
245         We were failing to forward IPC messages to the ChildProcess class here. As a result,
246         the ChildProcess::RegisterURLSchemeServiceWorkersCanHandle IPC was being ignored
247         by the StorageProcess.
248
249 2018-02-24  Zan Dobersek  <zdobersek@igalia.com>
250
251         Unreviewed WPE breakage fix.
252
253         * WebProcess/wpe/WebProcessMainWPE.cpp: Call g_set_prgname() in WebProcess 
254         to prepare the GLib state for subsequent GStreamer initialization.
255
256 2018-02-23  John Wilander  <wilander@apple.com>
257
258         Introduce ITP debug logging as an opt-in developer feature
259         https://bugs.webkit.org/show_bug.cgi?id=183065
260         <rdar://problem/37803761>
261
262         Reviewed by Brent Fulgham.
263
264         * Platform/Logging.h:
265             Added a dedicated channel for Resource Load Statistics debug logging
266             since this will be part of a developer-facing feature and should not
267             be mixed with general Resource Load Statistics logging.
268         * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
269         (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
270             Now picks up the user default setting for
271             ResourceLoadStatisticsDebugLoggingEnabled.
272         * UIProcess/WebResourceLoadStatisticsStore.cpp:
273         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
274             Now logs for which domains it purges website data if
275             ResourceLoadStatisticsDebugLoggingEnabled is set.
276         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
277             Now logs for which domains it partitions and blocks cookies
278             in third-party contexts if ResourceLoadStatisticsDebugLoggingEnabled
279             is set.
280         * UIProcess/WebResourceLoadStatisticsStore.h:
281
282 2018-02-23  Brent Fulgham  <bfulgham@apple.com>
283
284         [macOS] Correct sandbox violation during media playback
285         https://bugs.webkit.org/show_bug.cgi?id=183092
286         <rdar://problem/37718495>
287
288         Reviewed by Eric Carlson.
289
290         * WebProcess/com.apple.WebProcess.sb.in:
291
292 2018-02-23  Yousuke Kimoto  <yousuke.kimoto@sony.com>
293
294         [MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on wincairo webkit
295         https://bugs.webkit.org/show_bug.cgi?id=182873
296
297         Reviewed by Yusuke Suzuki.
298
299         * UIProcess/WebResourceLoadStatisticsStore.h:
300
301 2018-02-23  Carlos Garcia Campos  <cgarcia@igalia.com>
302
303         [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
304         https://bugs.webkit.org/show_bug.cgi?id=173655
305         <rdar://problem/37706341>
306
307         Reviewed by Philippe Normand.
308
309         Actually pass the gst command line options to the WebProcess. The options in /proc/self/cmdline are separated by
310         null characters, so we are effectively passing always the first option only, which is the program name. Then, in
311         the web process we always ignore the first option and providing WebProcess unconditionally, so we were doing
312         nothing.
313
314         * UIProcess/gtk/WebProcessPoolGtk.cpp:
315         (WebKit::WebProcessPool::platformInitializeWebProcess): Use WebCore::extractGStreamerOptionsFromCommandLine()
316         * UIProcess/wpe/WebProcessPoolWPE.cpp:
317         (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
318         * WebProcess/soup/WebProcessSoup.cpp:
319         (WebKit::WebProcess::platformInitializeWebProcess): Move the vector.
320
321 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
322
323         Remove currentTime() / currentTimeMS()
324         https://bugs.webkit.org/show_bug.cgi?id=183052
325
326         Reviewed by Mark Lam.
327
328         * NetworkProcess/cache/CacheStorageEngineCache.cpp:
329         * PluginProcess/WebProcessConnection.cpp:
330         * Shared/WebProcessCreationParameters.h:
331         * Shared/linux/WebMemorySamplerLinux.cpp:
332         (WebKit::WebMemorySampler::sampleWebKit const):
333         * Shared/mac/WebMemorySampler.mac.mm:
334         (WebKit::WebMemorySampler::sampleWebKit const):
335         * UIProcess/API/C/WKContext.cpp:
336         (WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
337         * UIProcess/API/glib/IconDatabase.cpp:
338         (WebKit::IconDatabase::setIconDataForIconURL):
339         (WebKit::IconDatabase::synchronousLoadDecisionForIconURL):
340         (WebKit::IconDatabase::performURLImport):
341         * UIProcess/DrawingAreaProxyImpl.cpp:
342         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
343         (WebKit::expirationTimeFromNow):
344         (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
345         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy const):
346         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):
347         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsFilteringOutEntriesAddedAfterTime):
348         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
349         (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
350         * UIProcess/Plugins/PlugInAutoStartProvider.h:
351         * UIProcess/WebProcessPool.cpp:
352         (WebKit::WebProcessPool::processDidFinishLaunching):
353         (WebKit::WebProcessPool::startMemorySampler):
354         (WebKit::WebProcessPool::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
355         * UIProcess/WebProcessPool.h:
356         * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
357         (API::InjectedBundle::PageLoaderClient::willPerformClientRedirectForFrame):
358         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
359         (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
360         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
361         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
362         (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
363         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
364         * WebProcess/WebProcess.cpp:
365         (WebKit::m_webSQLiteDatabaseTracker):
366         (WebKit::WebProcess::isPlugInAutoStartOriginHash):
367         (WebKit::WebProcess::plugInDidStartFromOrigin):
368         (WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
369         (WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
370         (WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
371         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
372         * WebProcess/WebProcess.h:
373         * WebProcess/WebProcess.messages.in:
374         * WebProcess/cocoa/WebProcessCocoa.mm:
375         * WebProcess/wpe/WebProcessMainWPE.cpp:
376
377 2018-02-22  Matt Baker  <mattbaker@apple.com>
378
379         Web Inspector: REGRESSION (r228349): ImageBitmap builtin is now runtime guarded
380         https://bugs.webkit.org/show_bug.cgi?id=183056
381         <rdar://problem/37799067>
382
383         Reviewed by Joseph Pecoraro.
384
385         * WebProcess/WebPage/WebInspectorUI.cpp:
386         (WebKit::WebInspectorUI::WebInspectorUI):
387
388 2018-02-22  Youenn Fablet  <youenn@apple.com>
389
390         Caches::initialize should call all pending initialization callbacks in case of error
391         https://bugs.webkit.org/show_bug.cgi?id=183062
392
393         Reviewed by Chris Dumez.
394
395         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
396         (WebKit::CacheStorage::Caches::initialize):
397         (WebKit::CacheStorage::Caches::initializeSize):
398
399 2018-02-22  Youenn Fablet  <youenn@apple.com>
400
401         CacheStorage::Engine::Caches::writeRecord is not always calling the completion handler
402         https://bugs.webkit.org/show_bug.cgi?id=183055
403
404         Reviewed by Chris Dumez.
405
406         Add a completion handler to Storage::store.
407         Use it instead in Caches::writeRecord.
408         This ensures that the Cache add/put promise will be called once all write operations have been done.
409
410         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
411         (WebKit::CacheStorage::Caches::writeRecord):
412         * NetworkProcess/cache/NetworkCacheStorage.cpp:
413         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
414         (WebKit::NetworkCache::Storage::finishWriteOperation):
415         (WebKit::NetworkCache::Storage::store):
416         * NetworkProcess/cache/NetworkCacheStorage.h:
417         (WebKit::NetworkCache::Storage::store):
418
419 2018-02-22  Ryosuke Niwa  <rniwa@webkit.org>
420
421         Add an entitlement check for service worker on iOS
422         https://bugs.webkit.org/show_bug.cgi?id=182865
423
424         Reviewed by Dan Bernstein.
425
426         Addressed Dan's comment by using xpc_connection_copy_entitlement_value instead of obtaining the audit token first.
427
428         * Shared/mac/SandboxUtilities.h:
429         * Shared/mac/SandboxUtilities.mm:
430         (WebKit::connectedProcessHasEntitlement):
431         * StorageProcess/ios/StorageProcessIOS.mm:
432         (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const):
433         * WebProcess/WebPage/ios/WebPageIOS.mm:
434         (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const):
435
436 2018-02-22  Youenn Fablet  <youenn@apple.com>
437
438         Fetch event release assert should take into account the fetch mode
439         https://bugs.webkit.org/show_bug.cgi?id=183047
440
441         Reviewed by Chris Dumez.
442
443         In case of navigation tasks, we should use the request URL and not the origin of the loading client.
444
445         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
446         (WebKit::isValidFetch):
447         (WebKit::WebSWContextManagerConnection::startFetch):
448
449 2018-02-22  Yousuke Kimoto  <yousuke.kimoto@sony.com>
450
451         [WinCairo] Fix compile errors in WebPageWin.cpp and WebProcessWin.cpp due to WebCore forwarding header paths
452         https://bugs.webkit.org/show_bug.cgi?id=182969
453
454         Reviewed by Konstantin Tokarev.
455
456         * WebProcess/WebPage/win/WebPageWin.cpp:
457         * WebProcess/win/WebProcessWin.cpp:
458
459 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
460
461         Remove sleep(double) and sleepMS(double) interfaces
462         https://bugs.webkit.org/show_bug.cgi?id=183038
463
464         Reviewed by Mark Lam.
465
466         * PluginProcess/WebProcessConnection.cpp:
467         (WebKit::WebProcessConnection::createPluginAsynchronously):
468         * UIProcess/linux/MemoryPressureMonitor.cpp:
469         (WebKit::pollIntervalForUsedMemoryPercentage):
470         (WebKit::MemoryPressureMonitor::MemoryPressureMonitor):
471         * WebProcess/wpe/WebProcessMainWPE.cpp:
472
473 2018-02-22  Youenn Fablet  <youenn@apple.com>
474
475         Add release logging for CacheStorage::Engine disk related functions
476         https://bugs.webkit.org/show_bug.cgi?id=183042
477
478         Reviewed by Chris Dumez.
479
480         * NetworkProcess/cache/CacheStorageEngine.cpp:
481         (WebKit::CacheStorage::Engine::writeFile):
482         (WebKit::CacheStorage::Engine::readFile):
483
484 2018-02-22  Matt Lewis  <jlewis3@apple.com>
485
486         Unreviewed, rolling out r228902.
487
488         This broke internal builds.
489
490         Reverted changeset:
491
492         "[Cocoa] Web Automation: provide a way to ask clients the type
493         of a JavaScript dialog"
494         https://bugs.webkit.org/show_bug.cgi?id=182660
495         https://trac.webkit.org/changeset/228902
496
497 2018-02-22  Youenn Fablet  <youenn@apple.com>
498
499         Add release asserts for service worker fetch and postMessage events
500         https://bugs.webkit.org/show_bug.cgi?id=183025
501         rdar://problem/37765052
502
503         Reviewed by Daniel Bates.
504
505         Add assertion to protect interception of a fetch load by a service worker with
506         a different origin from the page.
507
508         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
509         (WebKit::WebSWContextManagerConnection::startFetch):
510
511 2018-02-22  Ms2ger  <Ms2ger@igalia.com>
512
513         [GTK][WPE] Fix some build errors in service workers code
514         https://bugs.webkit.org/show_bug.cgi?id=182966
515
516         Reviewed by Žan Doberšek.
517
518         * CMakeLists.txt: add missing files.
519         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp: add missing includes.
520         * UIProcess/ServiceWorkerProcessProxy.cpp: use #include rather than #import in C++; add missing ifdef.
521         * UIProcess/ServiceWorkerProcessProxy.h: add missing ifdef.
522         * WebProcess/Storage/WebSWClientConnection.cpp: add missing includes.
523         * WebProcess/Storage/WebSWContextManagerConnection.cpp: add missing includes.
524         (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
525           call the function that exists outside cocoa.
526
527 2018-02-21  Per Arne Vollan  <pvollan@apple.com>
528
529         The WebContent process should not use NSScreen in the screenAvailableRect/screenRect implementations.
530         https://bugs.webkit.org/show_bug.cgi?id=182855
531
532         Reviewed by Brent Fulgham.
533
534         On macOS, the functions screenAvailableRect and screenRect is implemented using NSScreen, which is communicating
535         with the WindowServer. To avoid this WindowServer communication from the WebContent process when calling
536         screenAvailableRect and screenRect, it is possible to let the UIProcess send a message to the WebContent
537         process whenever there is a change in the display properties, and have the WebContent process cache these
538         display properties. This message should also be sent to a newly started WebContent process.
539
540         * UIProcess/WebProcessPool.cpp:
541         (WebKit::displayReconfigurationCallBack):
542         (WebKit::registerDisplayConfigurationCallback):
543         (WebKit::WebProcessPool::initializeNewWebProcess):
544         (WebKit::WebProcessPool::warmInitialProcess):
545         * WebProcess/WebProcess.cpp:
546         (WebKit::WebProcess::setScreenProperties):
547         * WebProcess/WebProcess.h:
548         * WebProcess/WebProcess.messages.in:
549
550 2018-02-21  Christopher Reid  <chris.reid@sony.com>
551
552         [Curl] Curl Cookie Database File should be configurable using NetworkProcessCreationParameters
553         https://bugs.webkit.org/show_bug.cgi?id=182751
554
555         Reviewed by Youenn Fablet.
556
557         Adding a cookiePersistentStorageFile parameter to Curl's NetworkProcessCreationParameters.
558         This parameter is based on Soup's cookiePersistentStoragePath.
559         This parameter is not used yet, it is added to prepare for WinCairo WebKit support.
560
561         * NetworkProcess/NetworkProcessCreationParameters.cpp:
562         * NetworkProcess/NetworkProcessCreationParameters.h:
563         * NetworkProcess/curl/NetworkProcessCurl.cpp:
564         * WebProcess/Cookies/WebCookieManager.h:
565         * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp:
566
567 2018-02-21  Brian Burg  <bburg@apple.com>
568
569         [Cocoa] Web Automation: provide a way to ask clients the type of a JavaScript dialog
570         https://bugs.webkit.org/show_bug.cgi?id=182660
571         <rdar://problem/37408183>
572
573         Reviewed by Tim Horton and Carlos Garcia Campos.
574
575         Add another delegate method to ask what type of dialog is being shown.
576         This is used to implement §18.4 Step 5, where sending text to a dialog
577         without a prompt will return several different kinds of errors.
578
579         No new tests, covered by web platform tests once Safari side has landed.
580
581         * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: Update FIXME radar numbers.
582         * UIProcess/Cocoa/AutomationSessionClient.h:
583         * UIProcess/Cocoa/AutomationSessionClient.mm:
584         (WebKit::AutomationSessionClient::AutomationSessionClient):
585         (WebKit::toImpl):
586         (WebKit::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
587         If there is no current dialog to be checked, the client can return the 'None'
588         type. This gets converted into a std::nullopt and causes a command error later.
589
590 2018-02-21  Yousuke Kimoto  <yousuke.kimoto@sony.com>
591
592         [WinCairo] Fix compile errors of WebProcess and NetworkProcess due to no implementation for windows
593         https://bugs.webkit.org/show_bug.cgi?id=182870
594
595         Reviewed by Youenn Fablet.
596
597         * NetworkProcess/NetworkProcess.cpp:
598         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
599         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
600         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
601         * WebProcess/WebPage/WebInspector.cpp:
602         (WebKit::WebInspector::openFrontendConnection):
603         * WebProcess/WebPage/WebInspectorUI.cpp:
604         (WebKit::WebInspectorUI::establishConnection):
605         * WebProcess/WebProcess.cpp:
606         (WebKit::WebProcess::ensureNetworkProcessConnection):
607
608 2018-02-21  Don Olmstead  <don.olmstead@sony.com>
609
610         [CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
611         https://bugs.webkit.org/show_bug.cgi?id=182883
612
613         Reviewed by Per Arne Vollan.
614
615         * config.h:
616
617 2018-02-21  Brian Burg  <bburg@apple.com>
618
619         Web Automation: failed provisional loads cause "Navigate To" command to hang
620         https://bugs.webkit.org/show_bug.cgi?id=183007
621         <rdar://problem/37751819>
622
623         Reviewed by Andy Estes.
624
625         This hang was revealed by WPT test current_url.py::get_current_url_file_protocol. Now the
626         test simply fails because Safari chooses a policy of 'Ignore' for externally-opened files.
627         I filed an upstream issue with the test here: https://github.com/w3c/webdriver/issues/1232
628
629         * UIProcess/WebPageProxy.cpp:
630         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
631         Notify the session that the load failed in the frame, just like we do
632         for non-provisional failed loads and successful loads.
633
634 2018-02-20  Nan Wang  <n_wang@apple.com>
635
636         AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
637         https://bugs.webkit.org/show_bug.cgi?id=182752
638         <rdar://problem/37518233>
639
640         Reviewed by Ryosuke Niwa.
641
642         * UIProcess/PageClient.h:
643         * UIProcess/WebPageProxy.h:
644         * UIProcess/WebPageProxy.messages.in:
645         * UIProcess/ios/PageClientImplIOS.h:
646         * UIProcess/ios/PageClientImplIOS.mm:
647         (WebKit::PageClientImpl::assistiveTechnologyMakeFirstResponder):
648         * UIProcess/ios/WebPageProxyIOS.mm:
649         (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
650         * UIProcess/mac/PageClientImplMac.h:
651         * UIProcess/mac/PageClientImplMac.mm:
652         (WebKit::PageClientImpl::assistiveTechnologyMakeFirstResponder):
653         * UIProcess/mac/WebPageProxyMac.mm:
654         (WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
655         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
656         (WebKit::WebChromeClient::assistiveTechnologyMakeFirstResponder):
657         * WebProcess/WebCoreSupport/WebChromeClient.h:
658
659 2018-02-14  Brian Burg  <bburg@apple.com>
660
661         Web Automation: combine session commands to resize and move top-level browsing contexts
662         https://bugs.webkit.org/show_bug.cgi?id=182749
663         <rdar://problem/37515170>
664
665         Reviewed by Andy Estes.
666
667         Since moving and resizing the window are both accomplished by setting the window frame,
668         and the W3C WebDriver specification has a Get/Set Window Rect command, it's time to
669         deduplicate these two methods which basically do the same thing.
670
671         Adopt modern JSON::Value getters that return std::optional<float>. I have been trying
672         to move the protocol over to this style wholesale, but it is probably easier to do
673         this conversion in smaller pieces. And so, I have started to do so.
674
675         This change is covered by existing WebDriver tests.
676
677         * UIProcess/Automation/Automation.json: Add new command.
678         * UIProcess/Automation/WebAutomationSession.cpp:
679         (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Added.
680         (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext): Deleted.
681         (WebKit::WebAutomationSession::moveWindowOfBrowsingContext): Deleted.
682         * UIProcess/Automation/WebAutomationSession.h:
683
684 2018-02-20  Brian Burg  <bburg@apple.com>
685
686         ASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a second time
687         https://bugs.webkit.org/show_bug.cgi?id=182991
688         <rdar://problem/37620578>
689
690         Reviewed by Timothy Hatcher.
691
692         Sometimes when running more than one session end-to-end with the same browser instance,
693         UIProcess would crash under addMessageReceiver because another WebAutomationSession was still
694         registered. This is hard to reproduce, but upon code inspection, the receiver management code
695         is somewhat problematic because it only runs when the WebAutomationSession destructor runs.
696         In some cases the client could retain two sessions and cause the first one to never remove itself
697         as the message receiver.
698
699         Instead of unregistering the session as a message receiver underneath the session's destructor,
700         do this whenever a new session supplants an old session since there is only one active session at a time.
701
702         * UIProcess/Automation/WebAutomationSession.cpp:
703         (WebKit::WebAutomationSession::~WebAutomationSession):
704         * UIProcess/WebProcessPool.cpp:
705         (WebKit::WebProcessPool::setAutomationSession):
706
707 2018-02-20  Tim Horton  <timothy_horton@apple.com>
708
709         Introduce HAVE(IOSURFACE_ACCELERATOR)
710         https://bugs.webkit.org/show_bug.cgi?id=182955
711         <rdar://problem/37699510>
712
713         Reviewed by Sam Weinig.
714
715         * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
716         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
717         * Shared/cg/ShareableBitmapCG.cpp:
718         * UIProcess/API/Cocoa/WKWebView.mm:
719         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
720         * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
721         * UIProcess/mac/ViewSnapshotStore.h:
722         * UIProcess/mac/ViewSnapshotStore.mm:
723
724 2018-02-20  Chris Dumez  <cdumez@apple.com>
725
726         Provisional load may get committed before receiving the decidePolicyForNavigationResponse response
727         https://bugs.webkit.org/show_bug.cgi?id=182720
728         <rdar://problem/37515204>
729
730         Reviewed by Alex Christensen.
731
732         * WebProcess/Network/WebResourceLoader.cpp:
733         (WebKit::WebResourceLoader::didReceiveResponse):
734         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
735         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
736         * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
737         (WebKit::WebURLSchemeTaskProxy::didReceiveResponse):
738
739 2018-02-20  Matt Lewis  <jlewis3@apple.com>
740
741         Unreviewed, rolling out r228829.
742
743         This caused a consistent failure in the API test
744         WebKit.InteractionDeadlockAfterCrash on iOS Simulator
745
746         Reverted changeset:
747
748         "Switch to UIWKTextInteractionAssistant for non-editable text"
749         https://bugs.webkit.org/show_bug.cgi?id=182834
750         https://trac.webkit.org/changeset/228829
751
752 2018-02-20  Megan Gardner  <megan_gardner@apple.com>
753
754         Switch to UIWKTextInteractionAssistant for non-editable text
755         https://bugs.webkit.org/show_bug.cgi?id=182834
756         
757         Reviewed by Wenson Hsieh and Tim Horton.
758         
759         Switching to only using the UIWKTextInteractionAssistant. Only character granularity is now supported. 
760         Also keep the from regressing gating the keyboard bring up on user interaction. The presents of a  
761         textInteractionAssistant can no longer be used as proxy for the presence of the keyboard.
762
763         * UIProcess/ios/WKContentViewInteraction.mm:
764         (-[WKContentView useSelectionAssistantWithGranularity:]):
765         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
766
767 2018-02-20  John Wilander  <wilander@apple.com>
768
769         Make WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() call WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed() in a proper callback
770         https://bugs.webkit.org/show_bug.cgi?id=182719
771         <rdar://problem/37517370>
772
773         Reviewed by Brent Fulgham.
774
775         This will allow the page notification, statistics pruning, and persistence write
776         to be done at the right time and hopefully stabilize the layout tests including:
777         http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html
778
779         * UIProcess/WebResourceLoadStatisticsStore.cpp:
780         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
781             Now takes a callback parameter.
782         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
783         * UIProcess/WebResourceLoadStatisticsStore.h:
784             Now calls WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed()
785             in a callback provided to WebResourceLoadStatisticsStore::removeDataRecords().
786
787 2018-02-20  Zan Dobersek  <zdobersek@igalia.com>
788
789         [Cairo] Drop target GraphicsContext usage in Cairo operations
790         https://bugs.webkit.org/show_bug.cgi?id=182964
791
792         Reviewed by Carlos Garcia Campos.
793
794         The GraphicsContext parameters in various Cairo operations are not used
795         anymore, so they can be removed. Callsites are updated to reflect this.
796
797         * Shared/cairo/ShareableBitmapCairo.cpp:
798         (WebKit::ShareableBitmap::paint):
799         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
800         (WebKit::convertCairoSurfaceToShareableBitmap):
801
802 2018-02-20  Philippe Normand  <pnormand@igalia.com>
803
804         [GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
805         https://bugs.webkit.org/show_bug.cgi?id=173655
806
807         Reviewed by Xabier Rodriguez-Calvar.
808
809         The FIXME in GStreamerUtilities.cpp asks to pass the command line
810         parameters to the GStreamer initialization function.
811
812         Based on initial patch by: Vanessa Chipirrás Navalón  <vchipirras@igalia.com>
813
814         * Shared/WebProcessCreationParameters.cpp:
815         (WebKit::WebProcessCreationParameters::encode const):
816         (WebKit::WebProcessCreationParameters::decode):
817         * Shared/WebProcessCreationParameters.h: Define the vector which contains the GStreamer options.
818         * UIProcess/gtk/WebProcessPoolGtk.cpp:
819         (WebKit::WebProcessPool::platformInitializeWebProcess): Read from cmdline file
820         the GStreamer options written by console.
821         * WebProcess/soup/WebProcessSoup.cpp:
822         (WebKit::WebProcess::platformInitializeWebProcess): Call initializeGStreamer() method passing
823         the vector which contains the options.
824
825 2018-02-20  Yousuke Kimoto  <yousuke.kimoto@sony.com>
826
827         [Win] Fix MSVC's treating __attribute__((warn_unused_result))
828         https://bugs.webkit.org/show_bug.cgi?id=182479
829
830         Reviewed by Darin Adler.
831
832         Since MSVC doesn't understand "__attribute__", "_Check_return_" is used instead.
833         If clang and VisualStudio 2017 are used, a macro with "__attriute__" will be chosen.
834
835         * UIProcess/API/cpp/WKRetainPtr.h:
836
837 2018-02-19  Brady Eidson  <beidson@apple.com>
838
839         Add WebProcessPool option for process swapping on navigation.
840         https://bugs.webkit.org/show_bug.cgi?id=182945
841
842         Reviewed by Alex Christensen.
843
844         Just the most basic groundwork for testing a new WK2 feature.
845
846         * UIProcess/API/APIProcessPoolConfiguration.h:
847
848         * UIProcess/API/C/WKContextConfigurationRef.cpp:
849         (WKContextConfigurationProcessSwapsOnNavigation):
850         (WKContextConfigurationSetProcessSwapsOnNavigation):
851         * UIProcess/API/C/WKContextConfigurationRef.h:
852
853         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
854         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
855         (-[_WKProcessPoolConfiguration setProcessSwapsOnNavigation:]):
856         (-[_WKProcessPoolConfiguration processSwapsOnNavigation]):
857
858 2018-02-19  Daniel Bates  <dabates@apple.com>
859
860         Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
861         https://bugs.webkit.org/show_bug.cgi?id=182905
862         <rdar://problem/37676775>
863
864         Reviewed by Alex Christensen.
865
866         Return nullptr when querying for the scheme handler of the null string.
867
868         Before a navigation is performed WebKit checks if the destination URL is associated with an app
869         unless the embedding client overrides the WKNavigationDelegate delegate callback -webView:decidePolicyForNavigationAction:decisionHandler.
870         If the URL is not associated with an app then WebKit may fall back to checking if the embedding
871         client registered a scheme handler for it. Currently we assume that the scheme is a non-null
872         string when checking the scheme handler registry. However the scheme can be a null string if
873         it is part of a malformed URL. And this leads to bad news bears when we try to use it to look
874         for a scheme handler. Instead check that the scheme is a non-null string before checking to see
875         if it is in the scheme handler registry.
876
877         * UIProcess/WebPageProxy.cpp:
878         (WebKit::WebPageProxy::urlSchemeHandlerForScheme):
879
880 2018-02-19  Eric Carlson  <eric.carlson@apple.com>
881
882         [Extra zoom mode] Don't allow PiP media playback
883         https://bugs.webkit.org/show_bug.cgi?id=182930
884         <rdar://problem/37676259>
885
886         Reviewed by Andy Estes.
887
888         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
889         (-[WKWebViewConfiguration init]): Don't enable PiP mode. Require user interaction for
890         all media types.
891
892 2018-02-19  Ryan Haddad  <ryanhaddad@apple.com>
893
894         Unreviewed, rolling out r228696.
895
896         The API test added with this change is timing out on macOS.
897
898         Reverted changeset:
899
900         "Null pointer dereference in
901         WebPageProxy::urlSchemeHandlerForScheme()"
902         https://bugs.webkit.org/show_bug.cgi?id=182905
903         https://trac.webkit.org/changeset/228696
904
905 2018-02-19  Daniel Bates  <dabates@apple.com>
906
907         Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
908         https://bugs.webkit.org/show_bug.cgi?id=182905
909
910         Reviewed by Alex Christensen.
911
912         Return nullptr when querying for the scheme handler of the null string.
913
914         Before a navigation is performed WebKit checks if the destination URL is associated with an app
915         unless the embedding client overrides the WKNavigationDelegate delegate callback -webView:decidePolicyForNavigationAction:decisionHandler.
916         If the URL is not associated with an app then WebKit may fall back to checking if the embedding
917         client registered a scheme handler for it. Currently we assume that the scheme is a non-null
918         string when checking the scheme handler registry. However the scheme can be a null string if
919         it is part of a malformed URL. And this leads to bad news bears when we try to use it to look
920         for a scheme handler. Instead check that the scheme is a non-null string before checking to see
921         if it is in the scheme handler registry.
922
923         * UIProcess/WebPageProxy.cpp:
924         (WebKit::WebPageProxy::urlSchemeHandlerForScheme):
925
926 2018-02-19  Ms2ger  <Ms2ger@igalia.com>
927
928         Explicitly qualify some method calls on this in lamdas in Service Worker code.
929         https://bugs.webkit.org/show_bug.cgi?id=182875
930
931         Reviewed by Chris Dumez.
932
933         This is necessary for the code to build with GCC 5. Other code already
934         appears to have been adapted similarly.
935
936         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
937         (WebKit::WebSWServerConnection::startFetch):
938
939 2018-02-18  Reza Abbasian  <rabbasian@apple.com>
940
941         Set the appropriate AutoFill context for suggested passwords.
942         https://bugs.webkit.org/show_bug.cgi?id=182718
943         <rdar://problem/36326863>
944
945         Reviewed by Wenson Hsieh and Tim Horton.
946
947         Before starting the input session, call the new delegate to query if AutoFill password suggestion assistance
948         is required for the focused element.
949
950         * UIProcess/API/Cocoa/_WKFormInputSession.h:
951         * UIProcess/API/Cocoa/_WKInputDelegate.h:
952         Introduce a new delegate to be called  before starting an input session to query if AutoFill password suggestion
953         assistance is required for the focused element.
954         * UIProcess/ios/WKContentViewInteraction.h:
955         * UIProcess/ios/WKContentViewInteraction.mm:
956         (-[WKFormInputSession initWithContentView:focusedElementInfo:requiresStrongPasswordAssistance:]):
957         (-[WKFormInputSession requiresStrongPasswordAssistance]):
958         (-[WKContentView cleanupInteraction]):
959         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
960         Call the delegate to find out if AutoFill suggested password assistance is required.
961         (-[WKContentView _stopAssistingNode]):
962         (-[WKContentView _autofillContext]): If the first responder is a password element and requires
963         assistance for AutoFill suggested password, set the appropriate AutoFill context.
964         (-[WKFormInputSession initWithContentView:focusedElementInfo:]): Deleted.
965
966 2018-02-17  Wenson Hsieh  <wenson_hsieh@apple.com>
967
968         [Extra zoom mode] Form control values are stale after dismissing and representing input view controllers
969         https://bugs.webkit.org/show_bug.cgi?id=182877
970         <rdar://problem/37604395>
971
972         Reviewed by Tim Horton.
973
974         Currently, when presenting an input view controller for a focused element, we populate the initial form control
975         value using the WKContentView's assisted node information when it was last focused. However, if the user edits
976         the value of a form control, dismisses to the form control view controller (while the element is still focused)
977         and then begins editing the field again, the initial text will be the previous value of the input, since the
978         AssistedNodeInformation isn't up to date.
979
980         To fix this, we introduce a mechanism to update WKContentView's AssistedNodeInformation for the current assisted
981         node. This overwrites _assistedNodeInformation with new information computed from the web process, as long as
982         the assisted node before and after the request is made in the UI process has not changed. We accomplish this by
983         adding an identifier to AssistedNodeInformation, which is monotonically incremented when an element is focused
984         in the web process. The UI process may then use this identifier to determine whether AssistedNodeInformations
985         are describing the same focused element.
986
987         One interesting consideration here is that a normal AssistedNodeInformation update (propagated when focusing an
988         element) may be deferred in the UI process until the next layer tree commit. In the absence of the assisted node
989         identifier check, one could imagine a scenario in which the assisted node information in the UI process gets
990         "updated" from a new value to an old value:
991
992         1. The web process focuses an element and sends AssistedNodeInformation `A`.
993         2. WKContentView calls -updateCurrentAssistedNodeInformation.
994         3. The web process sends AssistedNodeInformation `B`.
995         4. `A` is received in the UI process, but deferred.
996         5. The UI process receives `B` and sets _assistedNodeInformation to `B`.
997         6. The UI process calls -_startAssistingNode: and sets _assistedNodeInformation to `A`.
998
999         This would mean that the _assistedNodeInformation is set to an earlier value, `A`, after being set to a later
1000         value, `B`. However, because the AssistedNodeInformation identifier in step (2) refers to the assisted node
1001         prior to step (1), the assisted node identifier in (5) would not match this identifier, and we would simply bail
1002         instead of overwriting assisted node information.
1003
1004         We use this AssistedNodeInformation update mechanism after inserting text via input view controllers, and also
1005         after reentering edit mode from the focused form control view controller. This fixes two issues where changing
1006         the size of the focused element after editing it results in the focused form overlay highlighting a stale frame,
1007         and also when setting the initial text when reentering edit mode for a form control that is already focused.
1008
1009         * Shared/AssistedNodeInformation.cpp:
1010         (WebKit::AssistedNodeInformation::encode const):
1011         (WebKit::AssistedNodeInformation::decode):
1012         * Shared/AssistedNodeInformation.h:
1013
1014         Add a new monotonically increasing identifier (per WebPage) which associates a AssistedNodeInformation with a
1015         focused element. In the event that the web process crashes and relaunches (thus resetting this identifier),
1016         AssistedNodeInformation state in the UI process is now also reset (see -cleanupInteraction), so we won't end up
1017         confusing AssistedNodeInformations computed by different WebPages between a web process crash.
1018
1019         * UIProcess/WebPageProxy.h:
1020
1021         A bit of related refactoring here to remove an unnecessary bool flag that indicates whether we have a deferred
1022         assisted node information. Instead, just use the presence of m_deferredNodeAssistanceArguments.
1023
1024         * UIProcess/WebPageProxy.messages.in:
1025
1026         Add a AssistedNodeInformationCallback IPC message.
1027
1028         * UIProcess/ios/WKContentViewInteraction.mm:
1029         (-[WKContentView cleanupInteraction]):
1030
1031         Clear out the previous AssistedNodeInformation. See above for details.
1032
1033         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1034         (-[WKContentView updateCurrentAssistedNodeInformation:]):
1035
1036         Tries to update AssistedNodeInformation for the current assisted node, invoking the completion callback when
1037         finished. This may result in the assisted node information not being updated due to the current assisted node
1038         changing in the time between the start of the request and the information being received in the UI process.
1039
1040         (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1041
1042         Refactored from -presentViewControllerForAssistedNode:, such that it no longer takes an AssistedNodeInformation
1043         as an argument, but rather just uses WKContentView's current _assistedNodeInformation. This was just being
1044         called with _assistedNodeInformation from all call sites anyways.
1045
1046         (-[WKContentView textInputController:didCommitText:]):
1047
1048         Request an AssistedNodeInformation update after setting the value of a form control; if the assisted node hasn't
1049         changed, update the focused form control overlay. This is needed to handle cases where the focused element's
1050         frame may have changed after inserting text (e.g. due to line wrapping), and the focused form control overlay
1051         needs to be updated to reflect this change.
1052
1053         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
1054
1055         Request an AssistedNodeInformation update before reentering edit mode; if the assisted node hasn't changed since
1056         the start of the request, present the appropriate input view controller.
1057
1058         (-[WKContentView presentViewControllerForAssistedNode:]): Deleted.
1059         * UIProcess/ios/WebPageProxyIOS.mm:
1060         (WebKit::WebPageProxy::assistedNodeInformationCallback):
1061         (WebKit::WebPageProxy::requestAssistedNodeInformation):
1062         (WebKit::WebPageProxy::didCommitLayerTree):
1063         (WebKit::WebPageProxy::startAssistingNode):
1064         (WebKit::WebPageProxy::stopAssistingNode):
1065         * WebProcess/WebPage/WebPage.cpp:
1066         (WebKit::WebPage::elementDidFocus):
1067
1068         Increment the assisted node identifier.
1069
1070         * WebProcess/WebPage/WebPage.h:
1071         * WebProcess/WebPage/WebPage.messages.in:
1072         * WebProcess/WebPage/ios/WebPageIOS.mm:
1073         (WebKit::WebPage::requestAssistedNodeInformation):
1074
1075         Compute and return an AssistedNodeInformation.
1076
1077         (WebKit::WebPage::getAssistedNodeInformation):
1078
1079 2018-02-16  Dean Jackson  <dino@apple.com>
1080
1081         Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa
1082         https://bugs.webkit.org/show_bug.cgi?id=182894
1083
1084         Reviewed by Tim Horton.
1085
1086         Rename OPENGL_ES_2 to OPENGL_ES.
1087
1088         * CMakeLists.txt:
1089         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1090         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
1091         (WebKit::AcceleratedBackingStoreWayland::paint):
1092         * UIProcess/gtk/WaylandCompositor.cpp:
1093         (WebKit::WaylandCompositor::initializeEGL):
1094
1095 2018-02-16  Ryosuke Niwa  <rniwa@webkit.org>
1096
1097         Add an entitlement check for service worker on iOS
1098         https://bugs.webkit.org/show_bug.cgi?id=182865
1099         <rdar://problem/37505903>
1100
1101         Reviewed by Brady Eidson.
1102
1103         Added an entitlement check to enable service workers on iOS.
1104
1105         * Shared/mac/SandboxUtilities.h:
1106         * Shared/mac/SandboxUtilities.mm:
1107         (WebKit::connectedProcessHasEntitlement): Added.
1108         * StorageProcess/StorageProcess.cpp:
1109         (WebKit::StorageProcess::createStorageToWebProcessConnection): Enforce the entitlement check by crashing
1110         when this code is executed without the parent process having the service worker entitlement. This should
1111         never happen unless someone is trying to bypass the entitlement check in UI Process since we ordinarily
1112         disable service worker gracefully in WKWebView _initializeWithConfiguration.
1113         (WebKit::StorageProcess::swServerForSession): Ditto.
1114         (WebKit::StorageProcess::registerSWServerConnection): Ditto.
1115         * StorageProcess/StorageProcess.h:
1116         (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Added.
1117         * StorageProcess/ios/StorageProcessIOS.mm:
1118         (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Added.
1119         * UIProcess/API/Cocoa/WKWebView.mm:
1120         (-[WKWebView _initializeWithConfiguration:]): Disable the service workers when the entitlement is
1121         missing from the current process. The entitlement is enforced by WebContent and Storage process.
1122         This check avoids crashing WebContent process and gracefully disabling the feature.
1123         * WebProcess/WebPage/WebPage.cpp:
1124         (WebKit::WebPage::updatePreferences): Enforce the entitlement check.
1125         * WebProcess/WebPage/WebPage.h:
1126         (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): Added.
1127         * WebProcess/WebPage/ios/WebPageIOS.mm:
1128         (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): Added.
1129
1130 2018-02-16  Youenn Fablet  <youenn@apple.com>
1131
1132         Allow specifying which plug-ins are supported
1133         https://bugs.webkit.org/show_bug.cgi?id=182748
1134
1135         Reviewed by Chris Dumez.
1136
1137         Add a C and ObjC API to set which plug-ins are specified.
1138         Plug-ins may be allowed by origin of the main page or for all origins.
1139
1140         If the API to set a supported plug-in is called, WebKit enters a mode
1141         where it will block any plug-in that is not on the list.
1142
1143         The list of supported plug-ins is stored in UIProcess and sent to WebProcess.
1144         This allows to compute the list of visible plug-ins according supported plugins.
1145
1146         PluginInfoStore is storing the list of supported plugins and can
1147         answer whether a plug-in creation request is to be made unsupported or not.
1148         It also creates the structure sent to WebProcess for computing plugin visibility.
1149
1150         Updated ArgumentCoders to accept modern HashSet decoders.
1151
1152         * Platform/IPC/ArgumentCoders.h:
1153         * UIProcess/API/C/WKContext.cpp:
1154         (WKContextAddSupportedPlugin):
1155         (WKContextClearSupportedPlugins):
1156         * UIProcess/API/C/WKContextPrivate.h:
1157         * UIProcess/API/Cocoa/WKProcessPool.mm:
1158         (-[WKProcessPool _addSupportedPlugin:named:withMimeTypes:withExtensions:]):
1159         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1160         * UIProcess/Plugins/PluginInfoStore.cpp:
1161         (WebKit::PluginInfoStore::isSupportedPlugin):
1162         (WebKit::PluginInfoStore::SupportedPlugins::isSupported):
1163         (WebKit::PluginInfoStore::SupportedPlugin::isSupported):
1164         (WebKit::PluginInfoStore::supportedPluginNames):
1165         (WebKit::PluginInfoStore::addSupportedPlugin):
1166         * UIProcess/Plugins/PluginInfoStore.h:
1167         (WebKit::PluginInfoStore::clearSupportedPlugins):
1168         * UIProcess/WebPageProxy.cpp:
1169         (WebKit::WebPageProxy::findPlugin):
1170         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
1171         * UIProcess/WebPageProxy.h:
1172         * UIProcess/WebPageProxy.messages.in:
1173         * UIProcess/WebProcessPool.cpp:
1174         (WebKit::WebProcessPool::addSupportedPlugin):
1175         (WebKit::WebProcessPool::clearSupportedPlugins):
1176         * UIProcess/WebProcessPool.h:
1177         * UIProcess/WebProcessProxy.cpp:
1178         (WebKit::WebProcessProxy::getPlugins):
1179         * UIProcess/WebProcessProxy.h:
1180         * UIProcess/WebProcessProxy.messages.in:
1181         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
1182         (WebKit::WebPluginInfoProvider::getPluginInfo):
1183         (WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
1184         (WebKit::WebPluginInfoProvider::populatePluginCache):
1185         * WebProcess/Plugins/WebPluginInfoProvider.h:
1186         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1187         (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton const):
1188         * WebProcess/WebPage/WebPage.cpp:
1189         (WebKit::WebPage::createPlugin):
1190         (WebKit::WebPage::canPluginHandleResponse):
1191
1192 2018-02-16  Jiewen Tan  <jiewen_tan@apple.com>
1193
1194         [WebAuthN] Implement PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
1195         https://bugs.webkit.org/show_bug.cgi?id=182771
1196         <rdar://problem/36459988>
1197
1198         Reviewed by Brent Fulgham.
1199
1200         This patch utilizes LocalAuthentication Framework to determine if biometrics
1201         are enrolled on a device, which is the user verifying platform authenticator.
1202         To do so, it links the framework to WebKit.
1203
1204         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
1205         (WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailable):
1206         (WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailableReply):
1207         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
1208         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
1209         * UIProcess/CredentialManagement/cocoa/WebCredentialsMessengerProxyCocoa.mm:
1210         (WebKit::WebCredentialsMessengerProxy::platformIsUserVerifyingPlatformAuthenticatorAvailable):
1211         * WebKit.xcodeproj/project.pbxproj:
1212         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
1213         (WebKit::WebCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailable):
1214         (WebKit::WebCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailableReply):
1215         * WebProcess/CredentialManagement/WebCredentialsMessenger.h:
1216         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:
1217
1218 2018-02-16  Per Arne Vollan  <pvollan@apple.com>
1219
1220         Implement stopping of run loop in the WebContent process when using NSRunLoop.
1221         https://bugs.webkit.org/show_bug.cgi?id=182499
1222         <rdar://problem/37247424>
1223
1224         Reviewed by Brent Fulgham.
1225
1226         Add the method ChildProcess::stopNSRunLoop to end the WebContent process by executing a block
1227         with 'exit(0)' on the main run loop. 
1228
1229         * Shared/ChildProcess.h:
1230         * Shared/mac/ChildProcessMac.mm:
1231         (WebKit::ChildProcess::stopNSRunLoop):
1232         * WebProcess/cocoa/WebProcessCocoa.mm:
1233         (WebKit::WebProcess::platformInitializeWebProcess):
1234         (WebKit::WebProcess::stopRunLoop):
1235
1236 2018-02-16  Yousuke Kimoto  <yousuke.kimoto@sony.com>
1237
1238         [WinCario] Add NetworkSessionCurl
1239         https://bugs.webkit.org/show_bug.cgi?id=182680
1240
1241         Reviewed by Konstantin Tokarev.
1242
1243         * NetworkProcess/NetworkSession.cpp:
1244         (WebKit::NetworkSession::create):
1245         * PlatformWin.cmake:
1246
1247 2018-02-16  Chris Dumez  <cdumez@apple.com>
1248
1249         ASSERTION FAILED: !m_processes[i] || *m_processes[i] == process in MessagePortChannel::entanglePortWithProcess()
1250         https://bugs.webkit.org/show_bug.cgi?id=182054
1251         <rdar://problem/36871207>
1252
1253         Reviewed by Brady Eidson.
1254
1255         Pipe postMessage messages to and from service workers via the UIProcess instead of going
1256         directly to the StorageProcess. This is temporarily needed to avoid races due to the
1257         MessagePort registry currently living in the UIProcess and postMessage messages potentially
1258         sending MessagePort objects.
1259
1260         This change is covered by tests on the bots that currently flakily crash in debug.
1261
1262         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
1263         * StorageProcess/StorageProcess.cpp:
1264         (WebKit::StorageProcess::postMessageToServiceWorker):
1265         * StorageProcess/StorageProcess.h:
1266         * StorageProcess/StorageProcess.messages.in:
1267         * UIProcess/WebProcessPool.cpp:
1268         (WebKit::WebProcessPool::postMessageToServiceWorkerClient):
1269         (WebKit::WebProcessPool::postMessageToServiceWorker):
1270         * UIProcess/WebProcessPool.h:
1271         * UIProcess/WebProcessPool.messages.in:
1272         * WebProcess/Storage/WebSWClientConnection.cpp:
1273         (WebKit::WebSWClientConnection::postMessageToServiceWorker):
1274         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1275         (WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
1276
1277 2018-02-16  Wenson Hsieh  <wenson_hsieh@apple.com>
1278
1279         [Extra zoom mode] Add basic support for <input type='date'> using date picker UI
1280         https://bugs.webkit.org/show_bug.cgi?id=182847
1281         <rdar://problem/35143111>
1282
1283         Reviewed by Tim Horton.
1284
1285         Add support for presenting date pickers when focusing a date input.
1286
1287         * UIProcess/ios/WKContentViewInteraction.h:
1288         * UIProcess/ios/WKContentViewInteraction.mm:
1289         (-[WKContentView _stopAssistingNode]):
1290         (-[WKContentView dismissAllInputViewControllers]):
1291
1292         Pull logic to dismiss input view controllers into a single helper.
1293
1294         (-[WKContentView presentDatePickerViewController:]):
1295         (-[WKContentView dismissDatePickerViewController:]):
1296         (-[WKContentView presentViewControllerForAssistedNode:]):
1297         (-[WKContentView textInputController:didCommitText:]):
1298         (-[WKContentView _wheelChangedWithEvent:]):
1299
1300         Delegate wheel events to the date picker.
1301
1302         * UIProcess/ios/forms/WKDatePickerViewController.h: Added.
1303         * UIProcess/ios/forms/WKDatePickerViewController.mm: Added.
1304
1305         Add harness files for the WKDatePickerViewController implementation in WebKitAdditions.
1306
1307         * WebKit.xcodeproj/project.pbxproj:
1308
1309 2018-02-15  Youenn Fablet  <youenn@apple.com>
1310
1311         Resources loaded from service workers are not downloadable
1312         https://bugs.webkit.org/show_bug.cgi?id=182848
1313
1314         Reviewed by Chris Dumez.
1315
1316         Downloads are not supporting resources loaded through service worker.
1317         As a temporary solution, we will let network process handle it.
1318         Note that this would not work if the URL can only be loaded through service worker.
1319         Note also that for navigation loads, if the content type is the default one (application/octet-stream) we are overriding it to
1320         text/html as we do not support mime sniffing yet from service worker responses.
1321         This might interfere with automatic downloads from navigation.
1322
1323         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1324         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1325
1326 2018-02-15  Megan Gardner  <megan_gardner@apple.com>
1327
1328         Support scrolling for non-editable web-selection and start autoscroll when near screen edges
1329         https://bugs.webkit.org/show_bug.cgi?id=182815
1330
1331         Add support for autoscrolling during a selection. This also takes into account the edges of the screen
1332         and starts autoscrolling when you get close, while still allowing autoscrolling when you are past the bounds
1333         of the WebView.
1334
1335         Reviewed by Tim Horton.
1336
1337         * UIProcess/ios/WKContentViewInteraction.mm:
1338         (-[WKContentView startAutoscroll:]):
1339         (-[WKContentView resignFirstResponderForWebView]):
1340         (-[WKContentView useSelectionAssistantWithGranularity:]):
1341         (-[WKContentView selectedTextRange]):
1342         * UIProcess/ios/WebPageProxyIOS.mm:
1343         (WebKit::WebPageProxy::startAutoscrollAtPosition):
1344         * WebProcess/WebPage/ios/WebPageIOS.mm:
1345         (WebKit::WebPage::startAutoscrollAtPosition):
1346         (WebKit::WebPage::cancelAutoscroll):
1347
1348 2018-02-15  John Wilander  <wilander@apple.com>
1349
1350         Resource Load Statistics: Make sure WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can ingest older plist versions and not reset the database
1351         https://bugs.webkit.org/show_bug.cgi?id=182812
1352         <rdar://problem/37511406>
1353
1354         Reviewed by Brent Fulgham.
1355
1356         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1357         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
1358             Now does the following:
1359             - Logs when there is a model version mismatch.
1360             - Does not ingest statistics if the version on disk is newer than the supported one.
1361             - Does ingest statistics if the version on disk is older than the supported one.
1362             - Passes on the version found on disk to WebCore::ResourceLoadStatistics::decode().
1363
1364 2018-02-15  Jiewen Tan  <jiewen_tan@apple.com>
1365
1366         [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting
1367         https://bugs.webkit.org/show_bug.cgi?id=181946
1368         <rdar://problem/37258262>
1369
1370         Reviewed by Chris Dumez.
1371
1372         Dummy WebCredentialsMessenger and WebCredentialsMessengerProxy are crafted to establish
1373         a message exchange channel between UIProcess and WebProcess.
1374
1375         * DerivedSources.make:
1376         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1377         (WebKit::WebCredentialsMessengerProxy::WebCredentialsMessengerProxy):
1378         (WebKit::WebCredentialsMessengerProxy::~WebCredentialsMessengerProxy):
1379         (WebKit::WebCredentialsMessengerProxy::makeCredential):
1380         (WebKit::WebCredentialsMessengerProxy::getAssertion):
1381         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1382         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in: Added.
1383         * UIProcess/WebPageProxy.cpp:
1384         (WebKit::m_configurationPreferenceValues):
1385         (WebKit::WebPageProxy::reattachToWebProcess):
1386         (WebKit::WebPageProxy::resetState):
1387         * UIProcess/WebPageProxy.h:
1388         * WebKit.xcodeproj/project.pbxproj:
1389         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1390         (WebKit::WebCredentialsMessenger::WebCredentialsMessenger):
1391         (WebKit::WebCredentialsMessenger::~WebCredentialsMessenger):
1392         (WebKit::WebCredentialsMessenger::makeCredential):
1393         (WebKit::WebCredentialsMessenger::getAssertion):
1394         (WebKit::WebCredentialsMessenger::makeCredentialReply):
1395         (WebKit::WebCredentialsMessenger::getAssertionReply):
1396         * WebProcess/CredentialManagement/WebCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1397         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in: Added.
1398         * WebProcess/WebPage/WebPage.cpp:
1399         (WebKit::m_credentialsMessenger):
1400         (WebKit::m_cpuLimit): Deleted.
1401         * WebProcess/WebPage/WebPage.h:
1402
1403 2018-02-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1404
1405         [WPE] Unify build of platform-specific files in WebKit layer
1406         https://bugs.webkit.org/show_bug.cgi?id=182696
1407
1408         Reviewed by Žan Doberšek.
1409
1410         This is easy, because all needed changes were made in the previously-landed patch.
1411
1412         * CMakeLists.txt:
1413         * PlatformWPE.cmake:
1414
1415 2018-02-15  Don Olmstead  <don.olmstead@sony.com>
1416
1417         WebCore headers should not be included relatively within dependent projects
1418         https://bugs.webkit.org/show_bug.cgi?id=182805
1419
1420         Reviewed by Chris Dumez.
1421
1422         * NetworkProcess/capture/NetworkCaptureManager.cpp:
1423         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
1424         * Shared/gtk/WebEventFactory.cpp:
1425         * UIProcess/API/gtk/PageClientImpl.cpp:
1426         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1427         * UIProcess/gtk/WebPageProxyGtk.cpp:
1428         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1429         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1430         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
1431         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1432         * WebProcess/WebPage/wpe/WebPageWPE.cpp:
1433
1434 2018-02-15  Matt Lewis  <jlewis3@apple.com>
1435
1436         Unreviewed, rolling out r228495.
1437
1438         This caused mulitple perf tests to fail consistently.
1439
1440         Reverted changeset:
1441
1442         "Resource Load Statistics: Make sure
1443         WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can
1444         ingest older plist versions and not reset the database"
1445         https://bugs.webkit.org/show_bug.cgi?id=182812
1446         https://trac.webkit.org/changeset/228495
1447
1448 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
1449
1450         Default definition of InjectedBundle::PlatformBundle should not be Windows-specific.
1451         https://bugs.webkit.org/show_bug.cgi?id=182810
1452
1453         Reviewed by Michael Catanzaro.
1454
1455         This branch was added in r228455, but should not be limited to OS(WINDOWS).
1456
1457         * WebProcess/InjectedBundle/InjectedBundle.h:
1458
1459 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
1460
1461         Default implementations of nativeEvent() should be platform-agnostic.
1462         https://bugs.webkit.org/show_bug.cgi?id=182806
1463
1464         Reviewed by Darin Adler.
1465
1466         * Shared/NativeWebKeyboardEvent.h:
1467         * Shared/NativeWebMouseEvent.h:
1468         * Shared/NativeWebWheelEvent.h:
1469
1470 2018-02-14  John Wilander  <wilander@apple.com>
1471
1472         Resource Load Statistics: Make sure WebResourceLoadStatisticsStore::mergeWithDataFromDecoder() can ingest older plist versions and not reset the database
1473         https://bugs.webkit.org/show_bug.cgi?id=182812
1474         <rdar://problem/37511406>
1475
1476         Reviewed by Brent Fulgham.
1477
1478         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1479         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
1480             Now does the following:
1481             - Logs when there is a model version mismatch.
1482             - Does not ingest statistics if the version on disk is newer than the supported one.
1483             - Does ingest statistics if the version on disk is older than the supported one.
1484             - Passes on the version found on disk to WebCore::ResourceLoadStatistics::decode().
1485
1486 2018-02-14  Daniel Bates  <dabates@apple.com>
1487
1488         Disallow cross-origin subresources from asking for credentials
1489         https://bugs.webkit.org/show_bug.cgi?id=182579
1490         <rdar://problem/36162271>
1491
1492         Reviewed by Andy Estes.
1493
1494         Add a private preference to toggle allowing non-mixed content cross-origin subresources to load.
1495         WebKitTestRunner toggles this preference when it sees the test option allowCrossOriginSubresourcesToAskForCredential.
1496
1497         * Shared/WebPreferences.yaml:
1498         * UIProcess/API/C/WKPreferences.cpp:
1499         (WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials):
1500         (WKPreferencesGetAllowCrossOriginSubresourcesToAskForCredentials):
1501         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1502
1503 2018-02-14  John Wilander  <wilander@apple.com>
1504
1505         Make maximumParallelReadCount static to fix lambda capture error in WebKit::NetworkCache::Storage::traverse()
1506         https://bugs.webkit.org/show_bug.cgi?id=182797
1507         <rdar://problem/37540594>
1508
1509         Reviewed by Tim Horton.
1510
1511         This capture was added in r228455 and causes a build failure when
1512         run with -Wunused-lambda-capture. Xcode also warns about it.
1513
1514         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1515         (WebKit::NetworkCache::Storage::traverse):
1516
1517 2018-02-14  Ryosuke Niwa  <rniwa@webkit.org>
1518
1519         EventDispatcher::wheelEvent uses a wrong enum values in switch
1520         https://bugs.webkit.org/show_bug.cgi?id=182796
1521
1522         Reviewed by Chris Dumez.
1523
1524         EventDispatcher::wheelEvent is using PlatformWheelEventPhaseBegan and PlatformWheelEventPhaseEnded
1525         but the enum type of wheelEvent.phase() is WebWheelEvent::Phase.
1526
1527         The enum values are indentical for both so there is no behavioral change.
1528
1529         * WebProcess/WebPage/EventDispatcher.cpp:
1530         (WebKit::EventDispatcher::wheelEvent):
1531
1532 2018-02-14  Maureen Daum  <mdaum@apple.com>
1533
1534         Add C SPI for support of Website Data Store in Website Policies
1535         https://bugs.webkit.org/show_bug.cgi?id=182698
1536         <rdar://problem/37412008>
1537
1538         Reviewed by Andy Estes.
1539
1540         Expand the API added for _WKWebsitePolicies.websiteDataStore in r225989 and r226325
1541         to be available in the C API. In the ObjC API, we handle setting the website data
1542         store in NavigationState::NavigationClient::decidePolicyForNavigationAction. There
1543         we throw an exception if setting the website data store isn't supported, and then
1544         change the website data store. The equivalent place to do this work in the C API is
1545         in WKFramePolicyListenerUseWithPolicies. However, instead of throwing exceptions,
1546         release asserts are used.
1547
1548         * UIProcess/API/C/WKFramePolicyListener.cpp:
1549         (WKFramePolicyListenerUseWithPolicies):
1550         If the website policies data contains a website data store, do the same checks that
1551         are done in NavigationState::NavigationClient::decidePolicyForNavigationAction. Namely,
1552         that it is a valid website data store and it is a policy decision for a main frame navigation.
1553         If these checks are met, change the website data store.
1554         * UIProcess/API/C/WKPage.cpp:
1555         (WKPageUpdateWebsitePolicies):
1556         * UIProcess/API/C/WKWebsitePolicies.cpp:
1557         (WKWebsitePoliciesGetDataStore):
1558         (WKWebsitePoliciesSetDataStore):
1559         * UIProcess/API/C/WKWebsitePolicies.h:
1560         * UIProcess/WebFrameListenerProxy.cpp:
1561         (WebKit::WebFrameListenerProxy::changeWebsiteDataStore):
1562         (WebKit::WebFrameListenerProxy::isMainFrame):
1563         Expose whether the frame proxy is for a main frame, which is required to verify that
1564         website policies only specify a website data store for main frame policy decisions.
1565         * UIProcess/WebFrameListenerProxy.h:
1566         * UIProcess/WebFramePolicyListenerProxy.cpp:
1567         * UIProcess/WebFrameProxy.cpp:
1568         (WebKit::WebFrameProxy::changeWebsiteDataStore):
1569         * UIProcess/WebFrameProxy.h:
1570
1571 2018-02-14  Ryan Haddad  <ryanhaddad@apple.com>
1572
1573         Unreviewed, rolling out r228444.
1574
1575         Introduced API and Layout test failures.
1576
1577         Reverted changeset:
1578
1579         "[WebAuthN] Revisit the whole async model of task dispatching,
1580         timeout and aborting"
1581         https://bugs.webkit.org/show_bug.cgi?id=181946
1582         https://trac.webkit.org/changeset/228444
1583
1584 2018-02-13  Yousuke Kimoto  <yousuke.kimoto@sony.com>
1585
1586         [WinCairo] Fix build errors which come from including headers and not suitable implementation for windows
1587         https://bugs.webkit.org/show_bug.cgi?id=182679
1588
1589         Reviewed by Michael Catanzaro.
1590
1591         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
1592         (WebKit::NetworkCache::BlobStorage::add):
1593         * NetworkProcess/cache/NetworkCacheData.cpp:
1594         (WebKit::NetworkCache::Data::mapToFile const):
1595         (WebKit::NetworkCache::mapFile):
1596         (WebKit::NetworkCache::adoptAndMapFile):
1597         (WebKit::NetworkCache::readOrMakeSalt):
1598         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
1599         (WebKit::NetworkCache::directoryEntryType):
1600         (WebKit::NetworkCache::traverseDirectory):
1601         (WebKit::NetworkCache::fileTimes):
1602         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
1603         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1604         (WebKit::NetworkCache::Storage::traverse):
1605         * NetworkProcess/win/SystemProxyWin.h:
1606         * Platform/IPC/Attachment.h:
1607         * Platform/Module.h:
1608         * Platform/SharedMemory.h:
1609         * PluginProcess/WebProcessConnection.cpp:
1610         * Shared/API/c/WKBase.h:
1611         * Shared/ChildProcess.cpp:
1612         * Shared/WebCoreArgumentCoders.h:
1613         * UIProcess/ProcessAssertion.h:
1614         * WebProcess/InjectedBundle/InjectedBundle.h:
1615         * WebProcess/WebProcess.cpp:
1616
1617 2018-02-13  Commit Queue  <commit-queue@webkit.org>
1618
1619         Unreviewed, rolling out r228431.
1620         https://bugs.webkit.org/show_bug.cgi?id=182766
1621
1622         Regressed CMake build stability (Requested by dolmstead on
1623         #webkit).
1624
1625         Reverted changeset:
1626
1627         "[CMake] Make WebCore headers copies"
1628         https://bugs.webkit.org/show_bug.cgi?id=182512
1629         https://trac.webkit.org/changeset/228431
1630
1631 2018-02-13  Jiewen Tan  <jiewen_tan@apple.com>
1632
1633         [WebAuthN] Revisit the whole async model of task dispatching, timeout and aborting
1634         https://bugs.webkit.org/show_bug.cgi?id=181946
1635         <rdar://problem/37258262>
1636
1637         Reviewed by Chris Dumez.
1638
1639         Dummy WebCredentialsMessenger and WebCredentialsMessengerProxy are crafted to establish
1640         a message exchange channel between UIProcess and WebProcess.
1641
1642         * DerivedSources.make:
1643         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1644         (WebKit::WebCredentialsMessengerProxy::WebCredentialsMessengerProxy):
1645         (WebKit::WebCredentialsMessengerProxy::~WebCredentialsMessengerProxy):
1646         (WebKit::WebCredentialsMessengerProxy::makeCredential):
1647         (WebKit::WebCredentialsMessengerProxy::getAssertion):
1648         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1649         * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in: Added.
1650         * UIProcess/WebPageProxy.cpp:
1651         (WebKit::m_configurationPreferenceValues):
1652         (WebKit::WebPageProxy::reattachToWebProcess):
1653         * UIProcess/WebPageProxy.h:
1654         * WebKit.xcodeproj/project.pbxproj:
1655         * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1656         (WebKit::WebCredentialsMessenger::WebCredentialsMessenger):
1657         (WebKit::WebCredentialsMessenger::~WebCredentialsMessenger):
1658         (WebKit::WebCredentialsMessenger::makeCredential):
1659         (WebKit::WebCredentialsMessenger::getAssertion):
1660         (WebKit::WebCredentialsMessenger::makeCredentialReply):
1661         (WebKit::WebCredentialsMessenger::getAssertionReply):
1662         * WebProcess/CredentialManagement/WebCredentialsMessenger.h: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.h.
1663         * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in: Added.
1664         * WebProcess/WebPage/WebPage.cpp:
1665         (WebKit::m_credentialsMessenger):
1666         (WebKit::m_cpuLimit): Deleted.
1667         * WebProcess/WebPage/WebPage.h:
1668
1669 2018-02-13  Youenn Fablet  <youenn@apple.com>
1670
1671         Add support for configuring WebsiteDatastore service worker and cache storage path
1672         https://bugs.webkit.org/show_bug.cgi?id=182674
1673
1674         Reviewed by Chris Dumez.
1675
1676         Beef up WKWebsiteDataStoreConfiguration to easily set the WebsiteDataStore
1677         service worker registration and cache storage directory path.
1678
1679         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1680         (-[WKWebsiteDataStore _initWithConfiguration:]):
1681         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
1682         * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
1683         (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
1684         (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
1685         (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
1686         (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
1687
1688 2018-02-13  Brian Burg  <bburg@apple.com>
1689
1690         Web Automation: don't return an error if resizing/moving a window has no effect
1691         https://bugs.webkit.org/show_bug.cgi?id=182742
1692
1693         Reviewed by Tim Horton.
1694
1695         * UIProcess/Automation/WebAutomationSession.cpp:
1696         (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
1697         (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
1698         Unify the behavior for all ports. Don't raise an error if the command was
1699         idempotent (by mistake or not). It should not be an error to re-maximize a window.
1700
1701 2018-02-13  Don Olmstead  <don.olmstead@sony.com>
1702
1703         [CMake] Make WebCore headers copies
1704         https://bugs.webkit.org/show_bug.cgi?id=182512
1705
1706         Reviewed by Keith Miller.
1707
1708         * CMakeLists.txt:
1709         * NetworkProcess/capture/NetworkCaptureManager.cpp:
1710         * NetworkProcess/webrtc/NetworkRTCMonitor.h:
1711         * PlatformWPE.cmake:
1712         * Scripts/generate-forwarding-headers.pl:
1713         * Shared/gtk/WebEventFactory.cpp:
1714         * UIProcess/API/gtk/PageClientImpl.cpp:
1715         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1716         * UIProcess/gtk/WebPageProxyGtk.cpp:
1717         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1718         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1719         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
1720         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1721         * WebProcess/WebPage/wpe/WebPageWPE.cpp:
1722
1723 2018-02-13  Brent Fulgham  <bfulgham@apple.com>
1724
1725         [iOS] whitelist iokit-get-properties
1726         https://bugs.webkit.org/show_bug.cgi?id=182722
1727         <rdar://problem/30929165>
1728
1729         Reviewed by Eric Carlson.
1730
1731         Update the iOS sandbox to block access to IOKit properties that are not needed for
1732         legitimate WebContent process use. This brings the iOS sandbox in line with the
1733         work done under macOS.
1734
1735         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1736
1737 2018-02-12  John Wilander  <wilander@apple.com>
1738
1739         Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources
1740         https://bugs.webkit.org/show_bug.cgi?id=182664
1741         <rdar://problem/37372572>
1742
1743         Reviewed by Brent Fulgham.
1744
1745         * Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
1746         (WebKit::ResourceLoadStatisticsClassifier::hasPrevalentResourceCharacteristics):
1747             Unique top frame redirects now counts toward classification as prevalent.
1748         * Shared/WebCoreArgumentCoders.cpp:
1749         (IPC::ArgumentCoder<ResourceLoadStatistics>::encode):
1750         (IPC::ArgumentCoder<ResourceLoadStatistics>::decode):
1751         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1752         (WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
1753         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
1754         (WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
1755             Test infrastructure.
1756         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
1757         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1758             Bumped the statistics model to 11 because of the added fields.
1759         (WebKit::WebResourceLoadStatisticsStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain):
1760             This function back traces redirect chains to classify domains
1761             that have redirected to a newly classified prevalent resource.
1762         (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
1763             Now uses the new convenience function WebResourceLoadStatisticsStore::setPrevalentResource().
1764         (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
1765             New convenience function to make sure we always call
1766             WebResourceLoadStatisticsStore::recursivelyGetAllDomainsThatHaveRedirectedToThisDomain()
1767             and capture redirect chains backward.
1768         (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
1769         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
1770         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
1771         (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom):
1772         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo):
1773         (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom):
1774             Test infrastructure.
1775         * UIProcess/WebResourceLoadStatisticsStore.h:
1776
1777 2018-02-12  Antti Koivisto  <antti@apple.com>
1778
1779         Update NetworkCache::Storage::lastStableVersion after r226349
1780         https://bugs.webkit.org/show_bug.cgi?id=182723
1781         <rdar://problem/37469554>
1782         
1783         Reviewed by Ryosuke Niwa.
1784
1785         * NetworkProcess/cache/NetworkCacheStorage.h:
1786
1787         Allow deleting version 11 caches.
1788
1789 2018-02-12  Wenson Hsieh  <wenson_hsieh@apple.com>
1790
1791         [Extra zoom mode] Add support for <input type='time'> using time picker UI
1792         https://bugs.webkit.org/show_bug.cgi?id=182683
1793         <rdar://problem/35143162>
1794
1795         Reviewed by Tim Horton.
1796
1797         Adds support for showing a time picker when an input of type time is focused in extra zoomed mode.
1798
1799         * UIProcess/ios/WKContentViewInteraction.h:
1800         * UIProcess/ios/WKContentViewInteraction.mm:
1801         (-[WKContentView _stopAssistingNode]):
1802         (-[WKContentView presentTimePickerViewController:]):
1803         (-[WKContentView dismissTimePickerViewController:]):
1804
1805         Add helpers to dismiss and present the time picker view controller.
1806
1807         (-[WKContentView presentViewControllerForAssistedNode:]):
1808
1809         When focusing InputType::Time, present a time picker. Additionally, tweak the logic here to use the generic text
1810         input view controller as a fallback when the other input view controllers (number pads, select menus and time
1811         pickers thus far) are not relevant. This prevents us from completely being unable to edit form controls that are
1812         currently unsupported.
1813
1814         (-[WKContentView textInputController:didCommitText:]):
1815         (-[WKContentView textInputControllerDidRequestDismissal:]):
1816
1817         Tweak WKContentView for changes to WKTextFormControlViewControllerDelegate.
1818
1819         (-[WKContentView actionNameForFocusedFormControlController:]):
1820
1821         Adjust this implementation to hide the focused form control "Go" button for selects and time inputs. This
1822         currently doesn't work for these form controls because it relies on implicit form submission; this should be
1823         fixed by future changes, after which we should revert this adjustment.
1824
1825         (-[WKContentView _wheelChangedWithEvent:]):
1826
1827         Delegate wheel events to the time picker if needed.
1828
1829         (-[WKContentView textInputController:didRequestDismissalWithAction:]): Deleted.
1830
1831         Renamed to -textInputControllerDidRequestDismissal:.
1832
1833         * UIProcess/ios/forms/WKTimePickerViewController.h: Added.
1834         * UIProcess/ios/forms/WKTimePickerViewController.mm: Added.
1835         * WebKit.xcodeproj/project.pbxproj:
1836
1837 2018-02-11  Michael Catanzaro  <mcatanzaro@igalia.com>
1838
1839         [GTK] Unify builds for platform-specific files in WebKit layer
1840         https://bugs.webkit.org/show_bug.cgi?id=182450
1841
1842         Reviewed by Carlos Garcia Campos.
1843
1844         Add most GTK-specific sources to unified build. API files are exempted, except for the DOM
1845         API. Files shared with PluginProcessGTK2 are also exempted. Finally, files with name
1846         conflicts in headers, which appears difficult to fix, are also exempted.
1847
1848         * CMakeLists.txt:
1849         * NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:
1850         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1851         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1852         * NetworkProcess/soup/NetworkSessionSoup.cpp:
1853         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
1854         * Platform/classifier/ResourceLoadStatisticsClassifier.cpp:
1855         * PlatformGTK.cmake:
1856         * PluginProcess/unix/PluginControllerProxyUnix.cpp:
1857         * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
1858         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1859         * Shared/CoordinatedGraphics/SimpleViewportController.cpp:
1860         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1861         * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
1862         * Shared/Plugins/unix/PluginSearchPath.cpp:
1863         * Shared/cairo/ShareableBitmapCairo.cpp:
1864         * Shared/glib/WebContextMenuItemGlib.cpp:
1865         * Shared/glib/WebErrorsGlib.cpp:
1866         * Shared/gtk/ArgumentCodersGtk.cpp:
1867         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
1868         * Shared/gtk/ProcessExecutablePathGtk.cpp:
1869         * Shared/gtk/WebErrorsGtk.cpp:
1870         * Shared/gtk/WebEventFactory.cpp:
1871         * Shared/linux/WebMemorySamplerLinux.cpp:
1872         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1873         * Shared/soup/WebErrorsSoup.cpp:
1874         * SourcesGTK.txt: Added.
1875         * UIProcess/AcceleratedDrawingAreaProxy.cpp:
1876         * UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp:
1877         * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
1878         * UIProcess/BackingStore.cpp:
1879         * UIProcess/DrawingAreaProxyImpl.cpp:
1880         * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
1881         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1882         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1883         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1884         * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
1885         * UIProcess/WebStorage/StorageManager.cpp:
1886         * UIProcess/cairo/BackingStoreCairo.cpp:
1887         * UIProcess/gtk/AcceleratedBackingStore.cpp:
1888         * UIProcess/gtk/DragAndDropHandler.cpp:
1889         * UIProcess/gtk/GestureController.cpp:
1890         * UIProcess/gtk/HardwareAccelerationManager.cpp:
1891         * UIProcess/gtk/InputMethodFilter.cpp:
1892         * UIProcess/gtk/TextCheckerGtk.cpp:
1893         * UIProcess/gtk/WaylandCompositor.cpp:
1894         * UIProcess/gtk/WebColorPickerGtk.cpp:
1895         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1896         * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
1897         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1898         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
1899         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
1900         (webkit_dom_attr_dom_event_target_init):
1901         (webkit_dom_attr_set_property):
1902         (webkit_dom_attr_get_property):
1903         (webkit_dom_attr_class_init):
1904         (webkit_dom_event_target_init): Deleted.
1905         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1906         (webkit_dom_cdata_section_dom_event_target_init):
1907         (webkit_dom_event_target_init): Deleted.
1908         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
1909         (webkit_dom_css_rule_set_property):
1910         (webkit_dom_css_rule_get_property):
1911         (webkit_dom_css_rule_class_init):
1912         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
1913         (webkit_dom_css_rule_list_get_property):
1914         (webkit_dom_css_rule_list_class_init):
1915         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
1916         (webkit_dom_css_style_declaration_set_property):
1917         (webkit_dom_css_style_declaration_get_property):
1918         (webkit_dom_css_style_declaration_class_init):
1919         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
1920         (webkit_dom_css_style_sheet_get_property):
1921         (webkit_dom_css_style_sheet_class_init):
1922         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
1923         (webkit_dom_css_value_set_property):
1924         (webkit_dom_css_value_get_property):
1925         (webkit_dom_css_value_class_init):
1926         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1927         (webkit_dom_character_data_dom_event_target_init):
1928         (webkit_dom_character_data_set_property):
1929         (webkit_dom_character_data_get_property):
1930         (webkit_dom_character_data_class_init):
1931         (webkit_dom_event_target_init): Deleted.
1932         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
1933         (webkit_dom_client_rect_get_property):
1934         (webkit_dom_client_rect_class_init):
1935         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
1936         (webkit_dom_client_rect_list_get_property):
1937         (webkit_dom_client_rect_list_class_init):
1938         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1939         (webkit_dom_comment_dom_event_target_init):
1940         (webkit_dom_event_target_init): Deleted.
1941         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
1942         (webkit_dom_dom_selection_get_property):
1943         (webkit_dom_dom_selection_class_init):
1944         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
1945         (webkit_dom_dom_token_list_set_property):
1946         (webkit_dom_dom_token_list_get_property):
1947         (webkit_dom_dom_token_list_class_init):
1948         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1949         (webkit_dom_dom_window_dom_event_target_init):
1950         (webkit_dom_dom_window_set_property):
1951         (webkit_dom_dom_window_get_property):
1952         (webkit_dom_dom_window_class_init):
1953         (webkit_dom_event_target_init): Deleted.
1954         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
1955         (webkit_dom_document_dom_event_target_init):
1956         (webkit_dom_document_set_property):
1957         (webkit_dom_document_get_property):
1958         (webkit_dom_document_class_init):
1959         (webkit_dom_event_target_init): Deleted.
1960         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1961         (webkit_dom_document_fragment_dom_event_target_init):
1962         (webkit_dom_document_fragment_get_property):
1963         (webkit_dom_document_fragment_class_init):
1964         (webkit_dom_event_target_init): Deleted.
1965         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1966         (webkit_dom_document_type_dom_event_target_init):
1967         (webkit_dom_document_type_get_property):
1968         (webkit_dom_document_type_class_init):
1969         (webkit_dom_event_target_init): Deleted.
1970         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1971         (webkit_dom_element_dom_event_target_init):
1972         (webkit_dom_element_set_property):
1973         (webkit_dom_element_get_property):
1974         (webkit_dom_element_class_init):
1975         (webkit_dom_event_target_init): Deleted.
1976         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
1977         (webkit_dom_event_set_property):
1978         (webkit_dom_event_get_property):
1979         (webkit_dom_event_class_init):
1980         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
1981         (webkit_dom_file_get_property):
1982         (webkit_dom_file_class_init):
1983         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
1984         (webkit_dom_file_list_get_property):
1985         (webkit_dom_file_list_class_init):
1986         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1987         (webkit_dom_html_anchor_element_dom_event_target_init):
1988         (webkit_dom_html_anchor_element_set_property):
1989         (webkit_dom_html_anchor_element_get_property):
1990         (webkit_dom_html_anchor_element_class_init):
1991         (webkit_dom_event_target_init): Deleted.
1992         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1993         (webkit_dom_html_applet_element_dom_event_target_init):
1994         (webkit_dom_html_applet_element_set_property):
1995         (webkit_dom_html_applet_element_get_property):
1996         (webkit_dom_html_applet_element_class_init):
1997         (webkit_dom_event_target_init): Deleted.
1998         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1999         (webkit_dom_html_area_element_dom_event_target_init):
2000         (webkit_dom_html_area_element_set_property):
2001         (webkit_dom_html_area_element_get_property):
2002         (webkit_dom_html_area_element_class_init):
2003         (webkit_dom_event_target_init): Deleted.
2004         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
2005         (webkit_dom_html_br_element_dom_event_target_init):
2006         (webkit_dom_html_br_element_set_property):
2007         (webkit_dom_html_br_element_get_property):
2008         (webkit_dom_html_br_element_class_init):
2009         (webkit_dom_event_target_init): Deleted.
2010         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
2011         (webkit_dom_html_base_element_dom_event_target_init):
2012         (webkit_dom_html_base_element_set_property):
2013         (webkit_dom_html_base_element_get_property):
2014         (webkit_dom_html_base_element_class_init):
2015         (webkit_dom_event_target_init): Deleted.
2016         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
2017         (webkit_dom_html_body_element_dom_event_target_init):
2018         (webkit_dom_html_body_element_set_property):
2019         (webkit_dom_html_body_element_get_property):
2020         (webkit_dom_html_body_element_class_init):
2021         (webkit_dom_event_target_init): Deleted.
2022         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
2023         (webkit_dom_html_button_element_dom_event_target_init):
2024         (webkit_dom_html_button_element_set_property):
2025         (webkit_dom_html_button_element_get_property):
2026         (webkit_dom_html_button_element_class_init):
2027         (webkit_dom_event_target_init): Deleted.
2028         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
2029         (webkit_dom_html_canvas_element_dom_event_target_init):
2030         (webkit_dom_html_canvas_element_set_property):
2031         (webkit_dom_html_canvas_element_get_property):
2032         (webkit_dom_html_canvas_element_class_init):
2033         (webkit_dom_event_target_init): Deleted.
2034         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
2035         (webkit_dom_html_collection_get_property):
2036         (webkit_dom_html_collection_class_init):
2037         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
2038         (webkit_dom_html_d_list_element_dom_event_target_init):
2039         (webkit_dom_html_d_list_element_set_property):
2040         (webkit_dom_html_d_list_element_get_property):
2041         (webkit_dom_html_d_list_element_class_init):
2042         (webkit_dom_event_target_init): Deleted.
2043         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
2044         (webkit_dom_html_directory_element_dom_event_target_init):
2045         (webkit_dom_html_directory_element_set_property):
2046         (webkit_dom_html_directory_element_get_property):
2047         (webkit_dom_html_directory_element_class_init):
2048         (webkit_dom_event_target_init): Deleted.
2049         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
2050         (webkit_dom_html_div_element_dom_event_target_init):
2051         (webkit_dom_html_div_element_set_property):
2052         (webkit_dom_html_div_element_get_property):
2053         (webkit_dom_html_div_element_class_init):
2054         (webkit_dom_event_target_init): Deleted.
2055         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
2056         (webkit_dom_html_document_dom_event_target_init):
2057         (webkit_dom_html_document_set_property):
2058         (webkit_dom_html_document_get_property):
2059         (webkit_dom_html_document_class_init):
2060         (webkit_dom_event_target_init): Deleted.
2061         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
2062         (webkit_dom_html_element_dom_event_target_init):
2063         (webkit_dom_html_element_set_property):
2064         (webkit_dom_html_element_get_property):
2065         (webkit_dom_html_element_class_init):
2066         (webkit_dom_event_target_init): Deleted.
2067         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
2068         (webkit_dom_html_embed_element_dom_event_target_init):
2069         (webkit_dom_html_embed_element_set_property):
2070         (webkit_dom_html_embed_element_get_property):
2071         (webkit_dom_html_embed_element_class_init):
2072         (webkit_dom_event_target_init): Deleted.
2073         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
2074         (webkit_dom_html_field_set_element_dom_event_target_init):
2075         (webkit_dom_html_field_set_element_get_property):
2076         (webkit_dom_html_field_set_element_class_init):
2077         (webkit_dom_event_target_init): Deleted.
2078         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
2079         (webkit_dom_html_font_element_dom_event_target_init):
2080         (webkit_dom_html_font_element_set_property):
2081         (webkit_dom_html_font_element_get_property):
2082         (webkit_dom_html_font_element_class_init):
2083         (webkit_dom_event_target_init): Deleted.
2084         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
2085         (webkit_dom_html_form_element_dom_event_target_init):
2086         (webkit_dom_html_form_element_set_property):
2087         (webkit_dom_html_form_element_get_property):
2088         (webkit_dom_html_form_element_class_init):
2089         (webkit_dom_event_target_init): Deleted.
2090         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
2091         (webkit_dom_html_frame_element_dom_event_target_init):
2092         (webkit_dom_html_frame_element_set_property):
2093         (webkit_dom_html_frame_element_get_property):
2094         (webkit_dom_html_frame_element_class_init):
2095         (webkit_dom_event_target_init): Deleted.
2096         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
2097         (webkit_dom_html_frame_set_element_dom_event_target_init):
2098         (webkit_dom_html_frame_set_element_set_property):
2099         (webkit_dom_html_frame_set_element_get_property):
2100         (webkit_dom_html_frame_set_element_class_init):
2101         (webkit_dom_event_target_init): Deleted.
2102         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
2103         (webkit_dom_html_hr_element_dom_event_target_init):
2104         (webkit_dom_html_hr_element_set_property):
2105         (webkit_dom_html_hr_element_get_property):
2106         (webkit_dom_html_hr_element_class_init):
2107         (webkit_dom_event_target_init): Deleted.
2108         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
2109         (webkit_dom_html_head_element_dom_event_target_init):
2110         (webkit_dom_html_head_element_set_property):
2111         (webkit_dom_html_head_element_get_property):
2112         (webkit_dom_html_head_element_class_init):
2113         (webkit_dom_event_target_init): Deleted.
2114         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
2115         (webkit_dom_html_heading_element_dom_event_target_init):
2116         (webkit_dom_html_heading_element_set_property):
2117         (webkit_dom_html_heading_element_get_property):
2118         (webkit_dom_html_heading_element_class_init):
2119         (webkit_dom_event_target_init): Deleted.
2120         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
2121         (webkit_dom_html_html_element_dom_event_target_init):
2122         (webkit_dom_html_html_element_set_property):
2123         (webkit_dom_html_html_element_get_property):
2124         (webkit_dom_html_html_element_class_init):
2125         (webkit_dom_event_target_init): Deleted.
2126         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
2127         (webkit_dom_html_iframe_element_dom_event_target_init):
2128         (webkit_dom_html_iframe_element_set_property):
2129         (webkit_dom_html_iframe_element_get_property):
2130         (webkit_dom_html_iframe_element_class_init):
2131         (webkit_dom_event_target_init): Deleted.
2132         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
2133         (webkit_dom_html_image_element_dom_event_target_init):
2134         (webkit_dom_html_image_element_set_property):
2135         (webkit_dom_html_image_element_get_property):
2136         (webkit_dom_html_image_element_class_init):
2137         (webkit_dom_event_target_init): Deleted.
2138         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
2139         (webkit_dom_html_input_element_dom_event_target_init):
2140         (webkit_dom_html_input_element_set_property):
2141         (webkit_dom_html_input_element_get_property):
2142         (webkit_dom_html_input_element_class_init):
2143         (webkit_dom_event_target_init): Deleted.
2144         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
2145         (webkit_dom_html_li_element_dom_event_target_init):
2146         (webkit_dom_html_li_element_set_property):
2147         (webkit_dom_html_li_element_get_property):
2148         (webkit_dom_html_li_element_class_init):
2149         (webkit_dom_event_target_init): Deleted.
2150         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
2151         (webkit_dom_html_label_element_dom_event_target_init):
2152         (webkit_dom_html_label_element_set_property):
2153         (webkit_dom_html_label_element_get_property):
2154         (webkit_dom_html_label_element_class_init):
2155         (webkit_dom_event_target_init): Deleted.
2156         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
2157         (webkit_dom_html_legend_element_dom_event_target_init):
2158         (webkit_dom_html_legend_element_set_property):
2159         (webkit_dom_html_legend_element_get_property):
2160         (webkit_dom_html_legend_element_class_init):
2161         (webkit_dom_event_target_init): Deleted.
2162         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
2163         (webkit_dom_html_link_element_dom_event_target_init):
2164         (webkit_dom_html_link_element_set_property):
2165         (webkit_dom_html_link_element_get_property):
2166         (webkit_dom_html_link_element_class_init):
2167         (webkit_dom_event_target_init): Deleted.
2168         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
2169         (webkit_dom_html_map_element_dom_event_target_init):
2170         (webkit_dom_html_map_element_set_property):
2171         (webkit_dom_html_map_element_get_property):
2172         (webkit_dom_html_map_element_class_init):
2173         (webkit_dom_event_target_init): Deleted.
2174         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
2175         (webkit_dom_html_marquee_element_dom_event_target_init):
2176         (webkit_dom_event_target_init): Deleted.
2177         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
2178         (webkit_dom_html_menu_element_dom_event_target_init):
2179         (webkit_dom_html_menu_element_set_property):
2180         (webkit_dom_html_menu_element_get_property):
2181         (webkit_dom_html_menu_element_class_init):
2182         (webkit_dom_event_target_init): Deleted.
2183         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
2184         (webkit_dom_html_meta_element_dom_event_target_init):
2185         (webkit_dom_html_meta_element_set_property):
2186         (webkit_dom_html_meta_element_get_property):
2187         (webkit_dom_html_meta_element_class_init):
2188         (webkit_dom_event_target_init): Deleted.
2189         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
2190         (webkit_dom_html_mod_element_dom_event_target_init):
2191         (webkit_dom_html_mod_element_set_property):
2192         (webkit_dom_html_mod_element_get_property):
2193         (webkit_dom_html_mod_element_class_init):
2194         (webkit_dom_event_target_init): Deleted.
2195         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
2196         (webkit_dom_html_o_list_element_dom_event_target_init):
2197         (webkit_dom_html_o_list_element_set_property):
2198         (webkit_dom_html_o_list_element_get_property):
2199         (webkit_dom_html_o_list_element_class_init):
2200         (webkit_dom_event_target_init): Deleted.
2201         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
2202         (webkit_dom_html_object_element_dom_event_target_init):
2203         (webkit_dom_html_object_element_set_property):
2204         (webkit_dom_html_object_element_get_property):
2205         (webkit_dom_html_object_element_class_init):
2206         (webkit_dom_event_target_init): Deleted.
2207         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
2208         (webkit_dom_html_opt_group_element_dom_event_target_init):
2209         (webkit_dom_html_opt_group_element_set_property):
2210         (webkit_dom_html_opt_group_element_get_property):
2211         (webkit_dom_html_opt_group_element_class_init):
2212         (webkit_dom_event_target_init): Deleted.
2213         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
2214         (webkit_dom_html_option_element_dom_event_target_init):
2215         (webkit_dom_html_option_element_set_property):
2216         (webkit_dom_html_option_element_get_property):
2217         (webkit_dom_html_option_element_class_init):
2218         (webkit_dom_event_target_init): Deleted.
2219         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
2220         (webkit_dom_html_options_collection_set_property):
2221         (webkit_dom_html_options_collection_get_property):
2222         (webkit_dom_html_options_collection_class_init):
2223         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
2224         (webkit_dom_html_paragraph_element_dom_event_target_init):
2225         (webkit_dom_html_paragraph_element_set_property):
2226         (webkit_dom_html_paragraph_element_get_property):
2227         (webkit_dom_html_paragraph_element_class_init):
2228         (webkit_dom_event_target_init): Deleted.
2229         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
2230         (webkit_dom_html_param_element_dom_event_target_init):
2231         (webkit_dom_html_param_element_set_property):
2232         (webkit_dom_html_param_element_get_property):
2233         (webkit_dom_html_param_element_class_init):
2234         (webkit_dom_event_target_init): Deleted.
2235         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
2236         (webkit_dom_html_pre_element_dom_event_target_init):
2237         (webkit_dom_html_pre_element_set_property):
2238         (webkit_dom_html_pre_element_get_property):
2239         (webkit_dom_html_pre_element_class_init):
2240         (webkit_dom_event_target_init): Deleted.
2241         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
2242         (webkit_dom_html_quote_element_dom_event_target_init):
2243         (webkit_dom_html_quote_element_set_property):
2244         (webkit_dom_html_quote_element_get_property):
2245         (webkit_dom_html_quote_element_class_init):
2246         (webkit_dom_event_target_init): Deleted.
2247         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
2248         (webkit_dom_html_script_element_dom_event_target_init):
2249         (webkit_dom_html_script_element_set_property):
2250         (webkit_dom_html_script_element_get_property):
2251         (webkit_dom_html_script_element_class_init):
2252         (webkit_dom_event_target_init): Deleted.
2253         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
2254         (webkit_dom_html_select_element_dom_event_target_init):
2255         (webkit_dom_html_select_element_set_property):
2256         (webkit_dom_html_select_element_get_property):
2257         (webkit_dom_html_select_element_class_init):
2258         (webkit_dom_event_target_init): Deleted.
2259         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
2260         (webkit_dom_html_style_element_dom_event_target_init):
2261         (webkit_dom_html_style_element_set_property):
2262         (webkit_dom_html_style_element_get_property):
2263         (webkit_dom_html_style_element_class_init):
2264         (webkit_dom_event_target_init): Deleted.
2265         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
2266         (webkit_dom_html_table_caption_element_dom_event_target_init):
2267         (webkit_dom_html_table_caption_element_set_property):
2268         (webkit_dom_html_table_caption_element_get_property):
2269         (webkit_dom_html_table_caption_element_class_init):
2270         (webkit_dom_event_target_init): Deleted.
2271         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
2272         (webkit_dom_html_table_cell_element_dom_event_target_init):
2273         (webkit_dom_html_table_cell_element_set_property):
2274         (webkit_dom_html_table_cell_element_get_property):
2275         (webkit_dom_html_table_cell_element_class_init):
2276         (webkit_dom_event_target_init): Deleted.
2277         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
2278         (webkit_dom_html_table_col_element_dom_event_target_init):
2279         (webkit_dom_html_table_col_element_set_property):
2280         (webkit_dom_html_table_col_element_get_property):
2281         (webkit_dom_html_table_col_element_class_init):
2282         (webkit_dom_event_target_init): Deleted.
2283         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
2284         (webkit_dom_html_table_element_dom_event_target_init):
2285         (webkit_dom_html_table_element_set_property):
2286         (webkit_dom_html_table_element_get_property):
2287         (webkit_dom_html_table_element_class_init):
2288         (webkit_dom_event_target_init): Deleted.
2289         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
2290         (webkit_dom_html_table_row_element_dom_event_target_init):
2291         (webkit_dom_html_table_row_element_set_property):
2292         (webkit_dom_html_table_row_element_get_property):
2293         (webkit_dom_html_table_row_element_class_init):
2294         (webkit_dom_html_table_row_element_insert_cell):
2295         (webkit_dom_event_target_init): Deleted.
2296         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
2297         (webkit_dom_html_table_section_element_dom_event_target_init):
2298         (webkit_dom_html_table_section_element_set_property):
2299         (webkit_dom_html_table_section_element_get_property):
2300         (webkit_dom_html_table_section_element_class_init):
2301         (webkit_dom_event_target_init): Deleted.
2302         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
2303         (webkit_dom_html_text_area_element_dom_event_target_init):
2304         (webkit_dom_html_text_area_element_set_property):
2305         (webkit_dom_html_text_area_element_get_property):
2306         (webkit_dom_html_text_area_element_class_init):
2307         (webkit_dom_event_target_init): Deleted.
2308         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
2309         (webkit_dom_html_title_element_dom_event_target_init):
2310         (webkit_dom_html_title_element_set_property):
2311         (webkit_dom_html_title_element_get_property):
2312         (webkit_dom_html_title_element_class_init):
2313         (webkit_dom_event_target_init): Deleted.
2314         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
2315         (webkit_dom_html_u_list_element_dom_event_target_init):
2316         (webkit_dom_html_u_list_element_set_property):
2317         (webkit_dom_html_u_list_element_get_property):
2318         (webkit_dom_html_u_list_element_class_init):
2319         (webkit_dom_event_target_init): Deleted.
2320         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
2321         (webkit_dom_keyboard_event_get_property):
2322         (webkit_dom_keyboard_event_class_init):
2323         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
2324         (webkit_dom_media_list_set_property):
2325         (webkit_dom_media_list_get_property):
2326         (webkit_dom_media_list_class_init):
2327         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
2328         (webkit_dom_mouse_event_get_property):
2329         (webkit_dom_mouse_event_class_init):
2330         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
2331         (webkit_dom_named_node_map_get_property):
2332         (webkit_dom_named_node_map_class_init):
2333         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
2334         (webkit_dom_node_dom_event_target_init):
2335         (webkit_dom_node_set_property):
2336         (webkit_dom_node_get_property):
2337         (webkit_dom_node_class_init):
2338         (webkit_dom_event_target_init): Deleted.
2339         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
2340         (webkit_dom_node_iterator_get_property):
2341         (webkit_dom_node_iterator_class_init):
2342         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
2343         (webkit_dom_node_list_get_property):
2344         (webkit_dom_node_list_class_init):
2345         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.cpp:
2346         (webkitDOMObjectSetProperty):
2347         (webkit_dom_object_class_init):
2348         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
2349         (webkit_dom_processing_instruction_dom_event_target_init):
2350         (webkit_dom_processing_instruction_get_property):
2351         (webkit_dom_processing_instruction_class_init):
2352         (webkit_dom_event_target_init): Deleted.
2353         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
2354         (webkit_dom_range_get_property):
2355         (webkit_dom_range_class_init):
2356         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
2357         (webkit_dom_style_sheet_set_property):
2358         (webkit_dom_style_sheet_get_property):
2359         (webkit_dom_style_sheet_class_init):
2360         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
2361         (webkit_dom_style_sheet_list_get_property):
2362         (webkit_dom_style_sheet_list_class_init):
2363         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
2364         (webkit_dom_text_dom_event_target_init):
2365         (webkit_dom_text_get_property):
2366         (webkit_dom_text_class_init):
2367         (webkit_dom_event_target_init): Deleted.
2368         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
2369         (webkit_dom_tree_walker_get_property):
2370         (webkit_dom_tree_walker_class_init):
2371         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
2372         (webkit_dom_ui_event_get_property):
2373         (webkit_dom_ui_event_class_init):
2374         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
2375         (webkit_dom_wheel_event_get_property):
2376         (webkit_dom_wheel_event_class_init):
2377         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
2378         (webkit_dom_xpath_result_get_property):
2379         (webkit_dom_xpath_result_class_init):
2380         * WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp:
2381         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
2382         * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:
2383         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2384         * WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp:
2385         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2386         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
2387         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2388         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2389         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2390         * WebProcess/WebPage/AcceleratedSurface.cpp:
2391         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
2392         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2393         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
2394         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2395         * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:
2396         * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
2397         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2398         * WebProcess/gtk/WaylandCompositorDisplay.cpp:
2399         * WebProcess/gtk/WebProcessMainGtk.cpp:
2400
2401 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2402
2403         WebDriver: addCookie command should prepend a dot to domain if missing
2404         https://bugs.webkit.org/show_bug.cgi?id=182328
2405         <rdar://problem/37116398>
2406
2407         Reviewed by Michael Catanzaro.
2408
2409         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
2410
2411         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
2412
2413         * UIProcess/Automation/WebAutomationSession.cpp:
2414         (WebKit::WebAutomationSession::addSingleCookie):
2415
2416 2018-02-11  Yousuke Kimoto  <yousuke.kimoto@sony.com>
2417
2418         [WinCairo] Add WKBaseWin.h
2419         https://bugs.webkit.org/show_bug.cgi?id=182681
2420
2421         Reviewed by Yusuke Suzuki.
2422
2423         * PlatformWin.cmake:
2424         * Shared/API/c/win/WKBaseWin.h: Added.
2425
2426 2018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
2427
2428         Remove invalidated WebPage::handleEditingKeyboardEvent default implementation after r228260.
2429         https://bugs.webkit.org/show_bug.cgi?id=182663
2430
2431         Reviewed by Chris Dumez.
2432
2433         This would need to be updated to turn `keyEvent` into `underlyingPlatformEvent`;
2434         instead, we can remove it, as it's only for Windows, which doesn't yet support WK2.
2435
2436         * WebProcess/WebPage/WebPage.cpp:
2437         (WebKit::WebPage::handleEditingKeyboardEvent): Deleted.
2438
2439 2018-02-09  Nan Wang  <n_wang@apple.com>
2440
2441         AX: Accessibility is not notified when a web process cancels the suspension
2442         https://bugs.webkit.org/show_bug.cgi?id=182659
2443
2444         Reviewed by Ryosuke Niwa.
2445
2446         We were notifying Accessibility with the web process suspended information in actualPrepareToSuspend
2447         and processDidResume. However, the suspension can be canceled during the prepare call. So that we
2448         should also post a notification in cancelPrepareToSuspend.
2449
2450         * WebProcess/WebProcess.cpp:
2451         (WebKit::WebProcess::cancelPrepareToSuspend):
2452
2453 2018-02-09  Brent Fulgham  <bfulgham@apple.com>
2454
2455         Sandbox violating attempting to read log formatting preference file
2456         https://bugs.webkit.org/show_bug.cgi?id=182648
2457         <rdar://problem/36629495>
2458
2459         Reviewed by Eric Carlson.
2460
2461         Various frameworks attempt to read logging format information from /usr/local/lib/log. The sandbox is blocking
2462         this, generating log spam and preventing some logging features from working properly. We should allow read
2463         access to this path.
2464
2465         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2466         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2467         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2468         * WebProcess/com.apple.WebProcess.sb.in:
2469
2470 2018-02-08  Chris Dumez  <cdumez@apple.com>
2471
2472         There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
2473         https://bugs.webkit.org/show_bug.cgi?id=182524
2474         <rdar://problem/9057327>
2475
2476         Reviewed by Ryosuke Niwa.
2477
2478         Add C API on WKBundleScriptWorld and Cocoa API on WKWebProcessPlugInScriptWorld to
2479         disable the [OverrideBuiltins] behavior on a given script world.
2480
2481         The [OverrideBuiltins] behavior [1] is legacy behavior that is needed for Web compatibility
2482         but allowing the client to disable this behavior in a given world makes development easier
2483         and running injected script on uncontrolled content a lot more reliable.
2484
2485         [1] https://heycam.github.io/webidl/#OverrideBuiltins
2486
2487         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
2488         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
2489         (-[WKWebProcessPlugInScriptWorld disableOverrideBuiltinsBehavior]):
2490         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
2491         (WKBundleScriptWorldDisableOverrideBuiltinsBehavior):
2492         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
2493         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
2494         (WebKit::InjectedBundleScriptWorld::disableOverrideBuiltinsBehavior):
2495         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
2496
2497 2018-02-08  Ross Kirsling  <ross.kirsling@sony.com>
2498
2499         Remove WebProcessPool::platformInitialize stub.
2500         https://bugs.webkit.org/show_bug.cgi?id=182621
2501
2502         Reviewed by Alex Christensen.
2503
2504         The #if here could be simplified to PLATFORM(WIN), but Windows too will need a proper implementation
2505         as part of WK2 support, so this stub shouldn't need to exist at all.
2506
2507         * UIProcess/WebProcessPool.cpp:
2508         (WebKit::WebProcessPool::platformInitialize): Deleted.
2509
2510 2018-02-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2511
2512         TestController should not exercise cocoa-specific resource load statistics APIs
2513         https://bugs.webkit.org/show_bug.cgi?id=182355
2514
2515         Reviewed by Alex Christensen.
2516
2517         Remove the Cocoa testing SPI, since it's redundant with the C API. Also, add a couple
2518         missing cookie partitioning callbacks to the C API.
2519
2520         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
2521         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
2522         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
2523         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
2524         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2525         (-[WKWebsiteDataStore _resourceLoadStatisticsSetLastSeen:forHost:]): Deleted.
2526         (-[WKWebsiteDataStore _resourceLoadStatisticsSetIsPrevalentResource:forHost:]): Deleted.
2527         (-[WKWebsiteDataStore _resourceLoadStatisticsIsPrevalentResource:completionHandler:]): Deleted.
2528         (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsSubFrameUnder:topFrameHost:completionHandler:]): Deleted.
2529         (-[WKWebsiteDataStore _resourceLoadStatisticsIsRegisteredAsRedirectingTo:hostRedirectedTo:completionHandler:]): Deleted.
2530         (-[WKWebsiteDataStore _resourceLoadStatisticsSetHadUserInteraction:forHost:]): Deleted.
2531         (-[WKWebsiteDataStore _resourceLoadStatisticsSetHasHadNonRecentUserInteractionForHost:]): Deleted.
2532         (-[WKWebsiteDataStore _resourceLoadStatisticsHadUserInteraction:completionHandler:]): Deleted.
2533         (-[WKWebsiteDataStore _resourceLoadStatisticsSetIsGrandfathered:forHost:]): Deleted.
2534         (-[WKWebsiteDataStore _resourceLoadStatisticsIsGrandfathered:completionHandler:]): Deleted.
2535         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubframeUnderTopFrameOrigin:forHost:]): Deleted.
2536         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUnderTopFrameOrigin:forHost:]): Deleted.
2537         (-[WKWebsiteDataStore _resourceLoadStatisticsSetSubresourceUniqueRedirectTo:forHost:]): Deleted.
2538         (-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveUserInteraction:]): Deleted.
2539         (-[WKWebsiteDataStore _resourceLoadStatisticsSetTimeToLiveCookiePartitionFree:]): Deleted.
2540         (-[WKWebsiteDataStore _resourceLoadStatisticsSetMinimumTimeBetweenDataRecordsRemoval:]): Deleted.
2541         (-[WKWebsiteDataStore _resourceLoadStatisticsSetGrandfatheringTime:]): Deleted.
2542         (-[WKWebsiteDataStore _resourceLoadStatisticsSetMaxStatisticsEntries:]): Deleted.
2543         (-[WKWebsiteDataStore _resourceLoadStatisticsSetPruneEntriesDownTo:]): Deleted.
2544         (-[WKWebsiteDataStore _resourceLoadStatisticsProcessStatisticsAndDataRecords]): Deleted.
2545         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]): Deleted.
2546         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
2547         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]): Deleted.
2548         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
2549         (-[WKWebsiteDataStore _resourceLoadStatisticsSubmitTelemetry]): Deleted.
2550         (-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenDataRecordsWereScanned:]): Deleted.
2551         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldClassifyResourcesBeforeDataRecordsRemoval:]): Deleted.
2552         (-[WKWebsiteDataStore _resourceLoadStatisticsSetNotifyPagesWhenTelemetryWasCaptured:]): Deleted.
2553         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): Deleted.
2554         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore:]): Deleted.
2555         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Deleted.
2556         (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:completionHandler:]): Deleted.
2557         (-[WKWebsiteDataStore _resourceLoadStatisticsResetToConsistentState]): Deleted.
2558         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
2559
2560 2018-02-08  Don Olmstead  <don.olmstead@sony.com>
2561
2562         Remove JavaScriptCore/ForwardingHeaders directory
2563         https://bugs.webkit.org/show_bug.cgi?id=182594
2564
2565         Reviewed by Mark Lam.
2566
2567         * PlatformGTK.cmake:
2568
2569 2018-02-08  Tim Horton  <timothy_horton@apple.com>
2570
2571         Make WebKit public headers modules-safe
2572         https://bugs.webkit.org/show_bug.cgi?id=182611
2573         <rdar://problem/37160164>
2574
2575         Reviewed by Dan Bernstein.
2576
2577         * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
2578         * UIProcess/API/Cocoa/WKSnapshotConfiguration.h:
2579         Import headers without which these WebKit headers can not be used alone.
2580
2581         * WebKit.xcodeproj/project.pbxproj:
2582         Make WKWindowFeaturesPrivate a private header like it was supposed to be.
2583
2584 2018-02-08  Matt Lewis  <jlewis3@apple.com>
2585
2586         Unreviewed, rolling out r228262.
2587
2588         This broke an internal build alongside r228261.
2589
2590         Reverted changeset:
2591
2592         "WebDriver: addCookie command should prepend a dot to domain
2593         if missing"
2594         https://bugs.webkit.org/show_bug.cgi?id=182328
2595         https://trac.webkit.org/changeset/228262
2596
2597 2018-02-08  Miguel Gomez  <magomez@igalia.com>
2598
2599         [GTK] WaylandCompositor misusing eglGetProcAddress
2600         https://bugs.webkit.org/show_bug.cgi?id=182490
2601
2602         Reviewed by Michael Catanzaro.
2603
2604         Check that the appropriate extensions are available before calling eglGetProcAddress, as even
2605         getting a non null value from it, the functionality can be disabled at runtime.
2606
2607         * UIProcess/gtk/WaylandCompositor.cpp:
2608         (WebKit::WaylandCompositor::initializeEGL):
2609
2610 2018-02-08  Frederic Wang  <fwang@igalia.com>
2611
2612         Add scrolling node types to distinguish main frames and subframes.
2613         https://bugs.webkit.org/show_bug.cgi?id=182533
2614
2615         Reviewed by Simon Fraser.
2616
2617         * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: Replace the case of
2618         FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
2619         (WebKit::encodeNodeAndDescendants):
2620         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
2621         (WebKit::dump):
2622         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: Ditto.
2623         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2624         * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: Ditto and pass the node type to the
2625         constructor of the frame scrolling node.
2626         (WebKit::RemoteScrollingTree::createScrollingTreeNode):
2627         * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: Replace the case of
2628         FrameScrollingNode with MainFrameScrollingNode and SubframeScrollingNode.
2629         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2630         * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: In order to
2631         determine whether the node is a main frame or subframe, use the node type instead of checking
2632         whether the node as a parent.
2633         (WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll):
2634
2635 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2636
2637         WebDriver: addCookie command should prepend a dot to domain if missing
2638         https://bugs.webkit.org/show_bug.cgi?id=182328
2639         <rdar://problem/37116398>
2640
2641         Reviewed by Michael Catanzaro.
2642
2643         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
2644
2645         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
2646
2647         * UIProcess/Automation/WebAutomationSession.cpp:
2648         (WebKit::WebAutomationSession::addSingleCookie):
2649
2650 2018-01-13  Darin Adler  <darin@apple.com>
2651
2652         Event improvements
2653         https://bugs.webkit.org/show_bug.cgi?id=179591
2654
2655         Reviewed by Chris Dumez.
2656
2657         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
2658         (webkit_dom_wheel_event_init_wheel_event): Updated to call initWebKitWheelEvent.
2659
2660         * WebProcess/Plugins/PluginView.cpp: Removed include of ScriptValue.h.
2661
2662         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2663         (WebKit::WebEditorClient::executePendingEditorCommands):
2664         Updated for name change from keyEvent to underlyingPlatformEvent.
2665         (WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.
2666         * WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
2667         (WebKit::WebEditorClient::handleKeyboardEvent): Ditto.
2668         (WebKit::WebEditorClient::handleInputMethodKeydown): Ditto.
2669
2670         * WebProcess/WebPage/WebPage.cpp: Removed include of ScriptValue.h.
2671
2672         * WebProcess/WebPage/ios/WebPageIOS.mm:
2673         (WebKit::WebPage::handleEditingKeyboardEvent): Updated for name change from
2674         keyEvent to underlyingPlatformEvent.
2675         * WebProcess/WebPage/mac/WebPageMac.mm:
2676         (WebKit::WebPage::executeKeypressCommandsInternal): Ditto.
2677         (WebKit::WebPage::handleEditingKeyboardEvent): Ditto.
2678
2679 2018-02-07  Antti Koivisto  <antti@apple.com> and Youenn Fablet  <youenn@apple.com>
2680
2681         REGRESSION(r227758): Webpage fails to load due to crash in com.apple.WebKit: WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse + 267
2682         https://bugs.webkit.org/show_bug.cgi?id=182532
2683         <rdar://problem/36414017>
2684
2685         Reviewed by Chris Dumez.
2686
2687         No test case, don't know how to make one. The repro involves multipart HTTP streaming and details are hazy.
2688         We were calling a function that was WTFMoved away just a few lines above.
2689
2690         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2691         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2692
2693 2018-02-07  Tim Horton  <timothy_horton@apple.com>
2694
2695         Evernote device management web view sometimes displays at the wrong scale
2696         https://bugs.webkit.org/show_bug.cgi?id=182590
2697         <rdar://problem/36633687>
2698
2699         Reviewed by Simon Fraser.
2700
2701         Evernote implements the WKWebView's scroll view's delegate method
2702         viewForZoomingInScrollView: and returns nil. This results in
2703         WKScrollView's zoomScale always returning 1, no matter what the
2704         WKContentView's actual scale is. This will result in us never updating
2705         the WKContentView's scale to 1. When loading a page that has a few
2706         scale changes during load but ends up at scale 1, we get stuck at whatever
2707         intermediate scale immediately preceded settling on 1.
2708
2709         Fix this by not forwarding viewForZoomingInScrollView: to the external
2710         WKScrollView delegate; we are in charge of the contents of the scroll
2711         view (including which view scrollView's zoomScale should track), and
2712         overriding viewForZoomingInScrollView: is only ever going to lead to
2713         a broken WebKit.
2714
2715         * UIProcess/ios/WKScrollView.mm:
2716         (shouldForwardScrollViewDelegateMethodToExternalDelegate):
2717         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
2718         (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
2719
2720 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2721
2722         [Extra zoom mode] Delegate scrolling from the content view to input view controllers
2723         https://bugs.webkit.org/show_bug.cgi?id=182534
2724         <rdar://problem/37276625>
2725
2726         Reviewed by Tim Horton.
2727
2728         Override -_wheelChangedWithEvent: on the content view, and give extra zoomed input view controllers a chance to
2729         handle the event.
2730
2731         * Platform/spi/ios/UIKitSPI.h:
2732         * UIProcess/ios/WKContentViewInteraction.mm:
2733         (-[WKContentView _wheelChangedWithEvent:]):
2734
2735 2018-02-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2736
2737         [Extra zoom mode] Implement multiple and single select menus
2738         https://bugs.webkit.org/show_bug.cgi?id=182525
2739         <rdar://problem/35143016>
2740
2741         Reviewed by Tim Horton.
2742
2743         Add support for presenting picker views when focusing single or multiple select elements. See changes below for
2744         additional detail.
2745
2746         * UIProcess/ios/WKContentViewInteraction.h:
2747         * UIProcess/ios/WKContentViewInteraction.mm:
2748         (-[WKContentView _startAssistingKeyboard]):
2749
2750         Move logic for presenting view controllers when focusing elements out of _startAssistingKeyboard, and into
2751         _startAssistingNode:(...). This is because _startAssistingKeyboard is only invoked for certain types of focused
2752         element types; importantly, this set excludes select elements. Putting the call to present the focused view
2753         controller there also didn't make much since, considering that these new view controllers are not tied to
2754         keyboards in any way.
2755
2756         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
2757         (-[WKContentView _stopAssistingNode]):
2758
2759         Dismiss any select menu that is being presented.
2760
2761         (-[WKContentView presentSelectMenuViewController:]):
2762         (-[WKContentView dismissSelectMenuViewController:]):
2763
2764         Introduce idempotent helpers for presenting and dismissing the select menu view controller.
2765
2766         (-[WKContentView presentViewControllerForAssistedNode:]):
2767         (-[WKContentView selectMenu:didSelectItemAtIndex:]):
2768
2769         For single select menus. Called when the user selects a row.
2770
2771         (-[WKContentView didCancelSelectionInSelectMenu:]):
2772         (-[WKContentView numberOfItemsInSelectMenu:]):
2773         (-[WKContentView selectMenu:displayTextForItemAtIndex:]):
2774
2775         Indicates the text value to show at a given index.
2776
2777         (-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):
2778
2779         For multiple select menus, invoked when an item is checked. The `checked` parameter indicates whether or not the
2780         item is now checked.
2781
2782         (-[WKContentView selectMenuSupportsMultipleSelection:]):
2783
2784         Indicates whether this select menu is single-item-only, or allows multiple items to be selected (checked).
2785
2786         (-[WKContentView selectMenu:hasCheckedOptionAtIndex:]):
2787
2788         For multiple select menus. Determines whether an option at the given index is checked.
2789
2790         (-[WKContentView startingIndexForSelectMenu:]):
2791
2792         Determines the index to instantly scroll to when presenting the select menu.
2793
2794         * UIProcess/ios/forms/WKSelectMenuViewController.h: Added.
2795         * UIProcess/ios/forms/WKSelectMenuViewController.mm: Added.
2796
2797         Add new harness files for WKSelectMenuViewController's header and implementation (see WebKitAdditions).
2798
2799         * WebKit.xcodeproj/project.pbxproj:
2800
2801 2018-02-07  Brent Fulgham  <bfulgham@apple.com>
2802
2803         Improve NetworkResourceLoader logging to capture redirect cases
2804         https://bugs.webkit.org/show_bug.cgi?id=182573
2805         <rdar://problem/37316714>
2806
2807         Reviewed by Chris Dumez.
2808
2809         Add logging for cookie partitioning or blocking during redirects.
2810
2811         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2812         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
2813
2814 2018-02-07  John Wilander  <wilander@apple.com>
2815
2816         Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode
2817         https://bugs.webkit.org/show_bug.cgi?id=182559
2818         <rdar://problem/36990337>
2819
2820         Reviewed by Andy Estes.
2821
2822         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
2823         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
2824         (WebKit::NetworkDataTaskCocoa::isThirdPartyRequest):
2825             New convenience function. Checks whether the resource shares
2826             partition with the first party.
2827         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
2828             Now strips the referrer to just the origin for:
2829             1. All third party requests in private mode.
2830             2. Third party requests to domains that ITP blocks cookies for.
2831         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
2832             Now strips the referrer in redirects to just the origin for:
2833             1. All third party requests in private mode.
2834             2. Third party requests to domains that ITP blocks cookies for.
2835
2836 2018-02-07  Daniel Bates  <dabates@apple.com>
2837
2838         Log error when authentication challenge is blocked due to an insecure request
2839         https://bugs.webkit.org/show_bug.cgi?id=182358
2840
2841         Reviewed by Andy Estes.
2842
2843         Have network process notify the web process when it blocks an authentication challenge.
2844
2845         * NetworkProcess/NetworkLoad.cpp:
2846         (WebKit::NetworkLoad::completeAuthenticationChallenge):
2847         * NetworkProcess/NetworkLoadClient.h:
2848         (WebKit::NetworkLoadClient::didBlockAuthenticationChallenge):
2849         * NetworkProcess/NetworkResourceLoader.cpp:
2850         (WebKit::NetworkResourceLoader::didBlockAuthenticationChallenge):
2851         * NetworkProcess/NetworkResourceLoader.h:
2852         * WebProcess/Network/WebResourceLoader.cpp:
2853         (WebKit::WebResourceLoader::didBlockAuthenticationChallenge):
2854         * WebProcess/Network/WebResourceLoader.h:
2855         * WebProcess/Network/WebResourceLoader.messages.in:
2856
2857 2018-02-07  Chris Dumez  <cdumez@apple.com>
2858
2859         IndexedDB in service workers is using a memory backed store
2860         https://bugs.webkit.org/show_bug.cgi?id=182574
2861         <rdar://problem/37316205>
2862
2863         Reviewed by Youenn Fablet.
2864
2865         Make sure we pass a proper WebDatabaseProvider to the ServiceWorkerProcess via
2866         PageConfiguration. Otherwise, we end up using the default EmptyDatabaseProvider
2867         which uses an InProcessIDBServer and a memory-backed store for IndexedDB.
2868
2869         * UIProcess/ServiceWorkerProcessProxy.cpp:
2870         (WebKit::ServiceWorkerProcessProxy::start):
2871         * UIProcess/WebProcessPool.h:
2872         * WebProcess/Storage/WebSWContextManagerConnection.cpp:
2873         (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
2874         (WebKit::WebSWContextManagerConnection::installServiceWorker):
2875         * WebProcess/Storage/WebSWContextManagerConnection.h:
2876         * WebProcess/WebProcess.cpp:
2877         (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess):
2878         * WebProcess/WebProcess.h:
2879         * WebProcess/WebProcess.messages.in:
2880
2881 2018-02-07  Michael Catanzaro  <mcatanzaro@igalia.com>
2882
2883         [GTK] Typo in a translatable string
2884         https://bugs.webkit.org/show_bug.cgi?id=182570
2885
2886         Unreviewed. Fix a typo.
2887
2888         * UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
2889         (webkit_website_data_manager_class_init):
2890
2891 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
2892
2893         Remove WebCore/ForwardingHeaders directory
2894         https://bugs.webkit.org/show_bug.cgi?id=182347
2895
2896         Reviewed by Keith Miller.
2897
2898         * Platform/mac/StringUtilities.mm:
2899         * Shared/Cocoa/WebKit2InitializeCocoa.mm:
2900         * Shared/WebKit2Initialize.cpp:
2901         * Shared/linux/WebMemorySamplerLinux.cpp:
2902         * Shared/mac/WebMemorySampler.mac.mm:
2903         * UIProcess/WebProcessPool.cpp:
2904         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
2905         * WebProcess/InjectedBundle/API/glib/WebKitConsoleMessagePrivate.h:
2906         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2907         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2908         * WebProcess/Plugins/PluginProcessConnection.cpp:
2909         * WebProcess/Plugins/PluginView.cpp:
2910         * WebProcess/WebPage/WebInspector.h:
2911         * WebProcess/WebPage/WebPage.cpp:
2912         * WebProcess/cocoa/WebProcessCocoa.mm:
2913
2914 2018-02-06  Chris Dumez  <cdumez@apple.com>
2915
2916         Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https.html is a flaky failure on macOS and iOS
2917         https://bugs.webkit.org/show_bug.cgi?id=181392
2918         <rdar://problem/36384136>
2919
2920         Reviewed by Youenn Fablet.
2921
2922         All tasks from the StorageProcess to the WebContent process to update registrations
2923         and service workers state are posted to the runloop. However, the fetch callbacks
2924         do not do so. This means that fetch results might come in out of order with regards
2925         to the registration / service worker state updates. The test was flaky because an
2926         intercepted load would sometimes finish before the task to update the service worker
2927         state to "activated" was processed by the runloop. We address the issue by having
2928         the ServiceWorkerClientFetch callbacks schedule tasks to the runloop too.
2929
2930         * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2931         (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
2932         (WebKit::ServiceWorkerClientFetch::didReceiveData):
2933         (WebKit::ServiceWorkerClientFetch::didFinish):
2934         (WebKit::ServiceWorkerClientFetch::didFail):
2935         (WebKit::ServiceWorkerClientFetch::didNotHandle):
2936
2937 2018-02-06  Brent Fulgham  <bfulgham@apple.com>
2938
2939         [macOS] Correct sandbox violation triggered by Chase.com
2940         https://bugs.webkit.org/show_bug.cgi?id=182519
2941         <rdar://problem/37121757>
2942
2943         Reviewed by Eric Carlson.
2944
2945         Hitting a sandbox violation when attempting to check status of IOAV*En/Decode support.
2946
2947         * WebProcess/com.apple.WebProcess.sb.in:
2948
2949 2018-02-06  Jeff Miller  <jeffm@apple.com>
2950
2951         Add WKNavigationDelegate SPI to tell the client when an insecure plug-in is blocked
2952         https://bugs.webkit.org/show_bug.cgi?id=182540
2953
2954         Reviewed by Alex Christensen.
2955
2956         * UIProcess/API/APILoaderClient.h:
2957         (API::LoaderClient::didBlockInsecurePluginVersion):
2958         Changed to take a dictionary reference.
2959
2960         * UIProcess/API/APINavigationClient.h:
2961         (API::NavigationClient::didBlockInsecurePluginVersion):
2962         Added.
2963
2964         * UIProcess/API/C/WKPage.cpp:
2965         (WKPageSetPageLoaderClient):
2966         Changed didBlockInsecurePluginVersion() to take a dictionary reference.
2967
2968         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2969         Added -_webView:didBlockInsecurePluginVersionWithInfo:.
2970
2971         * UIProcess/Cocoa/NavigationState.h:
2972         * UIProcess/Cocoa/NavigationState.mm:
2973         (WebKit::NavigationState::setNavigationDelegate):
2974         Initialize webViewDidBlockInsecurePluginVersionWithInfo.
2975
2976         (WebKit::NavigationState::NavigationClient::didBlockInsecurePluginVersion):
2977         Added.
2978
2979         * UIProcess/WebPageProxy.cpp:
2980         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2981         Remove check for PLATFORM(COCOA) (we don't check for this in didFailToInitializePlugin() where we
2982         also use createPluginInformationDictionary()) and ENABLE(NETSCAPE_PLUGIN_API) (we're already inside
2983         an #if ENABLE(NETSCAPE_PLUGIN_API block) and use auto for pluginInformation. Attempt to use the
2984         navigation client before the loader client.
2985
2986 2018-02-06  Youenn Fablet  <youenn@apple.com>
2987
2988         HasServiceWorkerRegistration bit should be sent when creating a new page
2989         https://bugs.webkit.org/show_bug.cgi?id=182410
2990
2991         Reviewed by Chris Dumez.
2992
2993         Move the bit computation at page creation time.
2994         This allows computing the bit based on the web site data store and not only on the pool configuration.
2995         WebPage uses that bit to activate service worker registration matching for the whole process.
2996
2997         In case there is a service worker process proxy created, the bit is set to true by default.
2998
2999         Bit is computed by checking for database file presence.
3000         This information is cached in a map for efficiency reasons and cleared when a service worker process proxy is created.
3001
3002         * Shared/WebPageCreationParameters.cpp:
3003         (WebKit::WebPageCreationParameters::encode const):
3004         (WebKit::WebPageCreationParameters::decode):
3005         * Shared/WebPageCreationParameters.h:
3006         * Shared/WebProcessCreationParameters.cpp:
3007         (WebKit::WebProcessCreationParameters::encode const):
3008         (WebKit::WebProcessCreationParameters::decode):
3009         * Shared/WebProcessCreationParameters.h:
3010         * UIProcess/WebPageProxy.cpp:
3011         (WebKit::WebPageProxy::initializeWebPage):
3012         * UIProcess/WebProcessPool.cpp:
3013         (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
3014         (WebKit::WebProcessPool::initializeNewWebProcess):
3015         (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
3016         * WebProcess/WebPage/WebPage.cpp:
3017         (WebKit::m_cpuLimit):
3018         * WebProcess/WebProcess.cpp:
3019         (WebKit::WebProcess::initializeWebProcess):
3020
3021 2018-02-06  Michael Catanzaro  <mcatanzaro@igalia.com>
3022
3023         Unreviewed, fix format specifiers added in r228116
3024         https://bugs.webkit.org/show_bug.cgi?id=182456
3025         <rdar://problem/37181006>
3026
3027         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
3028         (WebKit::CacheStorageEngineConnection::open):
3029         (WebKit::CacheStorageEngineConnection::remove):
3030         (WebKit::CacheStorageEngineConnection::caches):
3031         (WebKit::CacheStorageEngineConnection::retrieveRecords):
3032         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
3033         (WebKit::CacheStorageEngineConnection::putRecords):
3034         (WebKit::CacheStorageEngineConnection::reference):
3035         (WebKit::CacheStorageEngineConnection::dereference):
3036
3037 2018-02-05  Chris Dumez  <cdumez@apple.com>
3038
3039         Avoid unnecessarily constructing RunLoops for GC AutomaticThreads in Connection::sendMessage() after r228001
3040         https://bugs.webkit.org/show_bug.cgi?id=182494
3041         <rdar://problem/37147632>
3042
3043         Reviewed by Ryosuke Niwa.
3044
3045         Somebody fixed a GC crash in r228001 by allowing RunLoop::current() to be called from a
3046         GC thread. However, this is still unnecessarily inefficient. Calling RunLoop::current()
3047         will construct RunLoops for background GC threads (WTF::AutomaticThreads). This patches
3048         updates the IPC code to call isMainThread() instead of RunLoop::isMain() in
3049         Connection::sendMessage(). This should mean the same thing since this code runs in
3050         WebKit2 and should be more efficient as it ends up simply calling pthread_main_np(),
3051         without constructing a RunLoop.
3052
3053         * Platform/IPC/Connection.cpp:
3054         (IPC::Connection::sendMessage):
3055
3056 2018-02-05  Ryosuke Niwa  <rniwa@webkit.org>
3057
3058         Release assertion in inlineVideoFrame
3059         https://bugs.webkit.org/show_bug.cgi?id=182513
3060         <rdar://problem/37159363>
3061
3062         Reviewed by Zalan Bujtas.
3063
3064         Fixed the bug. Don't try to update the layout when there is no live render tree or active DOM objects
3065         had been stopped: i.e. during a document destruction.
3066
3067         * WebProcess/cocoa/VideoFullscreenManager.mm:
3068         (WebKit::inlineVideoFrame):
3069
3070 2018-02-05  Yousuke Kimoto  <yousuke.kimoto@sony.com>
3071
3072         [WinCairo] Refine WebKitLegacy and WebKit build for wincairo
3073         https://bugs.webkit.org/show_bug.cgi?id=182478
3074
3075         Reviewed by Alex Christensen.
3076
3077         Fixed a typo of forwarding header path for InjectedBundle and copying header
3078         method, which should use FLATTENED.
3079
3080         * PlatformWin.cmake: Fix a typo of a forwarding header path for InjectedBundle and use FLATTENED.
3081
3082 2018-02-05  Youenn Fablet  <youenn@apple.com>
3083
3084         WebsiteDataStore::resolveDirectoriesIfNecessary() should not overwrite its resolved serviceWorkerRegistrationDirectory  if already set
3085         https://bugs.webkit.org/show_bug.cgi?id=182514
3086
3087         Reviewed by Chris Dumez.
3088
3089         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3090         (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
3091
3092 2018-02-05  Brent Fulgham  <bfulgham@apple.com>
3093
3094         [iOS] Storage process is using the wrong sandbox profile filename
3095         https://bugs.webkit.org/show_bug.cgi?id=182500
3096         <rdar://problem/37232614>
3097
3098         Reviewed by David Kilzer.
3099
3100         The iOS entitlements file was still referencing the old Databases sandbox profile, even though the
3101         process has been renamed 'Storage'.
3102
3103         * Configurations/Databases-iOS.entitlements:
3104
3105 2018-02-05  Ryosuke Niwa  <rniwa@webkit.org>
3106
3107         Add DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen
3108         https://bugs.webkit.org/show_bug.cgi?id=182458
3109
3110         Reviewed by Chris Dumez.
3111
3112         Added DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen
3113         which are found to get sent from WebContent process while ScriptDisallowedScope is present
3114         by a work-in-progress patch on webkit.org/b/182449.
3115
3116         * WebProcess/Plugins/WebPluginInfoProvider.cpp:
3117         (WebKit::WebPluginInfoProvider::populatePluginCache):
3118         * WebProcess/WebPage/WebPage.cpp:
3119         (WebKit::WebPage::rootViewToScreen):
3120
3121 2018-02-05  Commit Queue  <commit-queue@webkit.org>
3122
3123         Unreviewed, rolling out r227964 and r228087.
3124         https://bugs.webkit.org/show_bug.cgi?id=182508
3125
3126         These introduced an API test  failure with
3127         URLTest.HostIsIPAddress alongside commit r228086 (Requested by
3128         mlewis13 on #webkit).
3129
3130         Reverted changesets:
3131
3132         "[SOUP] Ensure domain is valid when converting a WebCore
3133         Cookie to Soup"
3134         https://bugs.webkit.org/show_bug.cgi?id=182328
3135         https://trac.webkit.org/changeset/227964
3136
3137         "WebDriver: addCookie command should prepend a dot to domain
3138         if missing"
3139         https://bugs.webkit.org/show_bug.cgi?id=182328
3140         https://trac.webkit.org/changeset/228087
3141
3142 2018-02-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3143
3144         [Extra zoom mode] Implement number pad UI when editing `tel` and `number` inputs
3145         https://bugs.webkit.org/show_bug.cgi?id=182472
3146         <rdar://problem/35143057>
3147
3148         Reviewed by Tim Horton.
3149
3150         Allows the user to edit numeric input types using a number pad. See below comments for more detail.
3151
3152         * UIProcess/ios/WKContentViewInteraction.h:
3153         * UIProcess/ios/WKContentViewInteraction.mm:
3154         (-[WKContentView _startAssistingKeyboard]):
3155         (-[WKContentView _stopAssistingNode]):
3156
3157         Dismiss the number pad, if it is present.
3158
3159         (-[WKContentView dismissNumberPadViewController:]):
3160         (-[WKContentView presentNumberPadViewController:]):
3161
3162         Add new helpers for showing and hiding the number pad view controller.
3163
3164         (-[WKContentView presentViewControllerForAssistedNode:]):
3165         (-[WKContentView textInputController:didRequestDismissalWithAction:]):
3166
3167         Dismiss the number pad, if it is present.
3168
3169         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
3170         (-[WKContentView shouldPresentTextInputViewController:]): Deleted.
3171
3172         Remove -shouldPresentTextInputViewController and replace it with -presentViewControllerForAssistedNode:, which
3173         presents the appropriate view controller given "assisted" node information.
3174
3175         * UIProcess/ios/forms/WKNumberPadView.h: Added.
3176         * UIProcess/ios/forms/WKNumberPadView.mm: Added.
3177         * UIProcess/ios/forms/WKNumberPadViewController.h: Added.
3178         * UIProcess/ios/forms/WKNumberPadViewController.mm: Added.
3179
3180         Add "WebKitAdditions harness" files for the new number pad view and view controller classes.
3181
3182         * WebKit.xcodeproj/project.pbxproj:
3183
3184 2018-02-05  Youenn Fablet  <youenn@apple.com>
3185
3186         Add logging to CacheStorageEngineConnection
3187         https://bugs.webkit.org/show_bug.cgi?id=182456
3188
3189         Reviewed by Chris Dumez.
3190
3191         * NetworkProcess/cache/CacheStorageEngineConnection.cpp:
3192         (WebKit::CacheStorageEngineConnection::open):
3193         (WebKit::CacheStorageEngineConnection::remove):
3194         (WebKit::CacheStorageEngineConnection::caches):
3195         (WebKit::CacheStorageEngineConnection::retrieveRecords):
3196         (WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
3197         (WebKit::CacheStorageEngineConnection::putRecords):
3198         (WebKit::CacheStorageEngineConnection::reference):
3199         (WebKit::CacheStorageEngineConnection::dereference):
3200         * Platform/Logging.h:
3201
3202 2018-02-05  Daniel Bates  <dabates@apple.com>
3203
3204         REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
3205         https://bugs.webkit.org/show_bug.cgi?id=182491
3206         <rdar://problem/36533447>
3207
3208         Reviewed by Brent Fulgham.
3209
3210         Exempt Nike from the XHR header restrictions in r222795.
3211
3212         Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
3213         However Nike also depends on such functionality.
3214
3215         * UIProcess/API/Cocoa/WKWebView.mm:
3216         (shouldAllowSettingAnyXHRHeaderFromFileURLs):
3217
3218 2018-02-02  Brent Fulgham  <bfulgham@apple.com>
3219
3220         Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
3221         https://bugs.webkit.org/show_bug.cgi?id=182455
3222         <rdar://problem/36626601>
3223
3224         Reviewed by Chris Dumez.
3225
3226         Refactor "logCookieInformation" so that it can be used for resource loads and DOM cookie
3227         manipulation. Place the generally useful logic in a static method that can be invoked
3228         from other places in the NetworkProcess.
3229
3230         Call the new refactored method from NetworkConnectionToWebProcess::setCookiesFromDOM so
3231         we can perform logging there as well.
3232
3233         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3234         (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Call the new logging method
3235         (when enabled).
3236         * NetworkProcess/NetworkResourceLoader.cpp:
3237         (WebKit::NetworkResourceLoader::shouldLogCookieInformation): Changed to static method.
3238         (WebKit::escapeForJSON): Made a static function so it could be shared between multiple
3239         methods.
3240         (WebKit::NetworkResourceLoader::logCookieInformation const): Refactor into two methods.
3241         (WebKit::NetworkResourceLoader::logCookieInformation): Ditto.
3242         (WebKit::NetworkResourceLoader::shouldLogCookieInformation const): Deleted.
3243         * NetworkProcess/NetworkResourceLoader.h:
3244         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3245         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Switch to user-enabled release logging
3246         to track partitioning and blocking behavior.
3247
3248 2018-02-05  John Wilander  <wilander@apple.com>
3249
3250         Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
3251         https://bugs.webkit.org/show_bug.cgi?id=181601
3252         <rdar://problem/36475837>
3253
3254         Reviewed by Alex Christensen.
3255
3256         http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
3257         was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
3258         it's possible to check access even if a frame doesn't respond timely to
3259         postMessage after detach and attach.
3260
3261         * NetworkProcess/NetworkProcess.cpp:
3262         (WebKit::NetworkProcess::getAllStorageAccessEntries):
3263         * NetworkProcess/NetworkProcess.h:
3264         * NetworkProcess/NetworkProcess.messages.in:
3265         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3266         (-[WKWebsiteDataStore _getAllStorageAccessEntries:]):
3267         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3268         * UIProcess/Network/NetworkProcessProxy.cpp:
3269         (WebKit::NetworkProcessProxy::getAllStorageAccessEntries):
3270         (WebKit::NetworkProcessProxy::allStorageAccessEntriesResult):
3271         * UIProcess/Network/NetworkProcessProxy.h:
3272         * UIProcess/Network/NetworkProcessProxy.messages.in:
3273         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3274         (WebKit::WebsiteDataStore::getAllStorageAccessEntries):
3275         * UIProcess/WebsiteData/WebsiteDataStore.h:
3276
3277 2018-02-05  Daniel Bates  <dabates@apple.com>
3278
3279         Disallow evaluating JavaScript from NPP_Destroy() in WebKit
3280         https://bugs.webkit.org/show_bug.cgi?id=181889
3281         <rdar://problem/36674701>
3282
3283         Reviewed by Brent Fulgham.
3284
3285         Make the behavior of WebKit match the behavior of WebKitLegacy on Mac.
3286
3287         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3288         (WebKit::NPObjectMessageReceiver::hasMethod):
3289         (WebKit::NPObjectMessageReceiver::invoke):
3290         (WebKit::NPObjectMessageReceiver::invokeDefault):
3291         (WebKit::NPObjectMessageReceiver::hasProperty):
3292         (WebKit::NPObjectMessageReceiver::getProperty):
3293         (WebKit::NPObjectMessageReceiver::setProperty):
3294         (WebKit::NPObjectMessageReceiver::removeProperty):
3295         (WebKit::NPObjectMessageReceiver::enumerate):
3296         (WebKit::NPObjectMessageReceiver::construct):
3297         Bail out if the plugin is executing NPP_Destroy().
3298
3299         * WebProcess/Plugins/Plugin.cpp:
3300         (WebKit::Plugin::destroyPlugin):
3301         * WebProcess/Plugins/Plugin.h:
3302         (WebKit::Plugin::isBeingDestroyed const):
3303         Move bookkeeping of whether the plugin is being destroyed from PluginView
3304         to here. This makes it straightforward for NPObjectMessageReceiver to query
3305         this information.
3306
3307         * WebProcess/Plugins/PluginView.cpp:
3308         (WebKit::PluginView::~PluginView):
3309         (WebKit::PluginView::destroyPluginAndReset):
3310         (WebKit::PluginView::recreateAndInitialize):
3311         (WebKit::PluginView::protectPluginFromDestruction):
3312         (WebKit::PluginView::unprotectPluginFromDestruction):
3313         Move bookkeeping of whether the plugin is being destroyed from here
3314         to Plugin.
3315
3316         * WebProcess/Plugins/PluginView.h:
3317         (WebKit::PluginView::isBeingDestroyed const): Turn around and ask the plugin if it
3318         is being destroyed, if we have one.
3319
3320 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3321
3322         WebDriver: addCookie command should prepend a dot to domain if missing
3323         https://bugs.webkit.org/show_bug.cgi?id=182328
3324         <rdar://problem/37116398>
3325
3326         Reviewed by Michael Catanzaro.
3327
3328         RFC 2965: If an explicitly specified value does not start with a dot, the user agent supplies a leading dot.
3329
3330         Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
3331
3332         * UIProcess/Automation/WebAutomationSession.cpp:
3333         (WebKit::WebAutomationSession::addSingleCookie):
3334
3335 2018-02-03  Tim Horton  <timothy_horton@apple.com>
3336
3337         UI process sometimes crashes under -[WKContentView _lookupForWebView:]
3338         https://bugs.webkit.org/show_bug.cgi?id=182460
3339         <rdar://problem/33260602>
3340
3341         Reviewed by Wenson Hsieh.
3342
3343         * UIProcess/ios/WKContentViewInteraction.mm:
3344         (-[WKContentView _lookupForWebView:]):
3345         If you have a range selection, but no rects for the selection, retrieving
3346         the 0th element of selectionRects will crash the UI process. To fix, in
3347         this case, use the rect for the starting caret instead.
3348
3349         It doesn't seem like the presentationRect is actually currently used for
3350         the Lookup service, so the only impact is that we shouldn't crash anymore.
3351
3352 2018-02-02  Michael Catanzaro  <mcatanzaro@igalia.com>
3353
3354         Remove remaining dead !USE(NETWORK_SESSION) code
3355         https://bugs.webkit.org/show_bug.cgi?id=182451
3356
3357         Reviewed by Alex Christensen.
3358
3359         DownloadCurl.cpp and AuthenticationManagerSoup.cpp have been dead code since NETWORK_SESSION
3360         became mandatory.
3361
3362         * NetworkProcess/Downloads/curl/DownloadCurl.cpp: Removed.
3363         * PlatformGTK.cmake:
3364         * PlatformWPE.cmake:
3365         * PlatformWin.cmake:
3366         * Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Removed.
3367
3368 2018-02-02  Youenn Fablet  <youenn@apple.com>
3369
3370         CacheStorage should check for origin file presence when computing the origin of a folder
3371         https://bugs.webkit.org/show_bug.cgi?id=182454
3372
3373         Reviewed by Chris Dumez.
3374
3375         In case caches is opened for an origin but no cache is added, we do not have a caches name file but we do have an origin filename.
3376         We should be checking the origin filename anyway since we will be reading it afterwards.
3377
3378         * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
3379         (WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
3380
3381 2018-02-02  Youenn Fablet  <youenn@apple.com>
3382
3383         Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
3384         https://bugs.webkit.org/show_bug.cgi?id=182403
3385         <rdar://problem/36673358>
3386
3387         Reviewed by Alex Christensen.
3388
3389         * UIProcess/WebProcessPool.cpp:
3390         (WebKit::legacyWebsiteDataStoreConfiguration): Setting serviceWorkerRegistrationDirectory for legacy stores.
3391
3392 2018-02-02  Youenn Fablet  <youenn@apple.com>
3393
3394         Clearing all service worker registrations should wait for importing service worker registration to finish
3395         https://bugs.webkit.org/show_bug.cgi?id=182407
3396
3397         Reviewed by Chris Dumez.
3398
3399         Updating API to take a completion handler.
3400
3401         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3402         (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
3403         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
3404
3405 2018-02-02  Fujii Hironori  <Hironori.Fujii@sony.com>
3406
3407         [Win] MSVC doesn't seem to like "friend class NeverDestroyed<Foo>"
3408         https://bugs.webkit.org/show_bug.cgi?id=182081
3409
3410         Reviewed by Yusuke Suzuki.
3411
3412         The template friend class, which belongs to a different namespace,
3413         can't access private member if its friend declaration is specified
3414         without the namespace and with class keyword.
3415
3416         Replaced "friend class NeverDestroyed<Foo>" with "friend NeverDestroyed<Foo>".
3417
3418         * NetworkProcess/NetworkProcess.h:
3419         * NetworkProcess/capture/NetworkCaptureManager.h:
3420         * PluginProcess/PluginProcess.h:
3421         * Shared/CallbackID.h:
3422         * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
3423         * StorageProcess/StorageProcess.h:
3424         * UIProcess/Plugins/PluginProcessManager.h:
3425         * UIProcess/Plugins/gtk/PluginInfoCache.h:
3426         * UIProcess/WebPageProxy.cpp:
3427         * UIProcess/WebPasteboardProxy.h:
3428         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
3429         * UIProcess/gtk/HardwareAccelerationManager.h:
3430         * UIProcess/gtk/WaylandCompositor.h:
3431         * UIProcess/linux/MemoryPressureMonitor.h:
3432         * UIProcess/mac/ServicesController.h:
3433         * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:
3434         * WebProcess/Plugins/WebPluginInfoProvider.h:
3435         * WebProcess/WebCoreSupport/WebPasteboardOverrides.h:
3436         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3437
3438 2018-02-02  Youenn Fablet  <youenn@apple.com>
3439
3440         Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
3441         https://bugs.webkit.org/show_bug.cgi?id=182403
3442
3443         Reviewed by Alex Christensen.
3444
3445         WebsiteDataStore is the place to set configuration information such as service worker registration path.
3446         This patch updates WebKit code accordingly.
3447         By default, the service worker registration path is in a Caches subfolder, similarly to cache API path.
3448
3449         * UIProcess/API/APIProcessPoolConfiguration.cpp:
3450         (API::ProcessPoolConfiguration::createWithLegacyOptions):
3451         (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
3452         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
3453         (API::ProcessPoolConfiguration::copy):
3454         * UIProcess/API/APIProcessPoolConfiguration.h:
3455         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3456         (WKContextConfigurationCopyServiceWorkerDatabaseDirectory): Deleted.
3457         (WKContextConfigurationSetServiceWorkerDatabaseDirectory): Deleted.
3458         * UIProcess/API/C/WKContextConfigurationRef.h:
3459         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3460         (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
3461         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3462         (-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]):
3463         (-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]):
3464         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3465         * UIProcess/WebProcessPool.cpp:
3466         (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
3467         (WebKit::WebProcessPool::initializeNewWebProcess):
3468         * UIProcess/WebsiteData/WebsiteDataStore.h:
3469         (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
3470         (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
3471         * UIProcess/gtk/WebProcessPoolGtk.cpp:
3472         * UIProcess/gtk/WebProcessPoolWPE.cpp:
3473
3474 2018-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
3475
3476         [Extra Zoom Mode] Implement support for indirect mainframe scrolling
3477         https://bugs.webkit.org/show_bug.cgi?id=182421
3478         <rdar://problem/35142694>
3479
3480         Reviewed by Tim Horton.
3481
3482         Makes a few small adjustments to WKScrollView to improve mainframe scrolling, and disable the pinch gesture for
3483         zooming. See below for more details.
3484
3485         * UIProcess/API/Cocoa/WKWebView.mm:
3486
3487         Remove a now-unneeded WebKitAdditions import.
3488
3489         * UIProcess/ios/WKScrollView.mm:
3490         (-[WKScrollView initWithFrame:]):
3491
3492         Add imports for -Before and -After versions of WKScrollViewAdditions.
3493
3494         (-[WKScrollView addGestureRecognizer:]):
3495
3496         Override -addGestureRecognizer here to prevent touches on the pinch gesture recognizer from being recognized.
3497         I chose this approach instead of just disabling the gesture in -initWithFrame: because (1) the pinch gesture
3498         recognizer is lazily created when setting minimum or maximum zoom scales, rather than immediately in
3499         -initWithFrame:, and (2) even if we set the -enabled to NO, UIKit later resets it to YES in other codepaths.
3500
3501 2018-02-01  Tim Horton  <timothy_horton@apple.com>
3502
3503         WebKit fails to build (_startAssistingNode has conflicting parameters)
3504         https://bugs.webkit.org/show_bug.cgi?id=182417
3505         <rdar://problem/36965318>
3506
3507         Reviewed by Dan Bernstein.
3508
3509         * UIProcess/ios/WKContentViewInteraction.h:
3510         Use Big BOOL like in the implementation.
3511
3512 2018-02-01  Brent Fulgham  <bfulgham@apple.com>
3513
3514         Improve NetworkResourceLogger to report blocked (versus non-partitioned) cookies
3515         https://bugs.webkit.org/show_bug.cgi?id=182408
3516         <rdar://problem/36918028>
3517
3518         Reviewed by Chris Dumez.
3519
3520         Update the logging method to report blocked origins, rather than logging them as non-partitioned
3521         loads that have no cookies or other content.
3522
3523         * NetworkProcess/NetworkResourceLoader.cpp:
3524         (WebKit::NetworkResourceLoader::logCookieInformation const):
3525
3526 2018-02-01  David Kilzer  <ddkilzer@apple.com>
3527
3528         REGRESSION (r222824): UI process crashes in WebKit::WebBackForwardList::backItem const
3529         <https://webkit.org/b/182409>
3530         <rdar://problem/35495094>
3531
3532         Reviewed by Alex Christensen.
3533
3534         * UIProcess/WebBackForwardList.cpp:
3535         (WebKit::WebBackForwardList::goToItem): Fix typo so the for loop
3536         actually checks each value in m_entries.
3537
3538 2018-02-01  Youenn Fablet  <youenn@apple.com>
3539
3540         Delay service worker process creation until actually needed by SWServer
3541         https://bugs.webkit.org/show_bug.cgi?id=182301
3542
3543         Reviewed by Chris Dumez.
3544
3545         Do not create a service worker process at creation of the first SWServerConnection.
3546         Wait for a WebProcess message that needs it:
3547         - postMessage message
3548         - fetchEvent message
3549         - job scheduling.
3550
3551         * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3552         (WebKit::WebSWServerConnection::startFetch):
3553         (WebKit::WebSWServerConnection::postMessageToServiceWorker):
3554         (WebKit::WebSWServerConnection::scheduleJobInServer):
3555         * StorageProcess/ServiceWorker/WebSWServerConnection.h:
3556         * StorageProcess/StorageToWebProcessConnection.cpp:
3557         (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
3558
3559 2018-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
3560
3561         [Extra zoom mode] Implement basic support for interacting with text form controls
3562         https://bugs.webkit.org/show_bug.cgi?id=182401
3563         <rdar://problem/35143035>
3564
3565         Reviewed by Tim Horton.
3566
3567         Add UI support for interacting with and editing text form controls when extra zoom mode is enabled. See below
3568         for more details.
3569
3570         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3571         (-[WKWebViewConfiguration init]):
3572         (-[WKWebViewConfiguration encodeWithCoder:]):
3573         (-[WKWebViewConfiguration initWithCoder:]):
3574         (-[WKWebViewConfiguration copyWithZone:]):
3575         (-[WKWebViewConfiguration _textInteractionGesturesEnabled]):
3576         (-[WKWebViewConfiguration _setTextInteractionGesturesEnabled:]):
3577         (-[WKWebViewConfiguration _longPressActionsEnabled]):
3578         (-[WKWebViewConfiguration _setLongPressActionsEnabled:]):
3579
3580         Introduce two new web view configuration flags: `textInteractionGesturesEnabled` and `longPressActionsEnabled`.
3581         The former determines whether text interaction gestures (i.e. text selection, moving the caret, showing UI for
3582         IME, etc.) are enabled. The latter determines whether or not long press actions (i.e. touch callout, share
3583         sheet, etc.) are enabled. These are disabled by default only in extra zoom mode.
3584
3585         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
3586         * UIProcess/WebPageProxy.cpp:
3587         (WebKit::WebPageProxy::setTextAsync):
3588
3589         Add a way to set the text value of a currently edited text form control. This will either set the text value of
3590         an input, a. la. autofill, or overwrite the contents of a contenteditable area by selecting everything and
3591         inserting the given text.
3592
3593         * UIProcess/WebPageProxy.h:
3594         (WebKit::WebPageProxy::focusNextAssistedNode):
3595
3596         Add a default argument for the completion callback.
3597
3598         * UIProcess/ios/WKContentViewInteraction.h:
3599         * UIProcess/ios/WKContentViewInteraction.mm:
3600         (-[WKContentView setupInteraction]):
3601         (-[WKContentView _displayFormNodeInputView]):
3602         (-[WKContentView _actionForLongPressFromPositionInformation:]):
3603         (-[WKContentView hasSelectablePositionAtPoint:]):
3604         (-[WKContentView pointIsNearMarkedText:]):
3605         (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
3606         (-[WKContentView insertionPointColor]):
3607
3608         Respect the web view configuration flags above by bailing early from text interaction and long press action
3609         sheet methods.
3610
3611         (-[WKContentView _startAssistingKeyboard]):
3612         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
3613
3614         Add a flag indicating whether we are in the process of changing focus from one node to another. We use this to
3615         decide whether or not we want to present the text input view controller right away, or just reload the focused
3616         form control overlay. When we stop "assisting" a node, we also keep the focused form control overlay up if we're
3617         only changing focus to another form control.
3618
3619         (-[WKContentView _stopAssistingNode]):
3620         (-[WKContentView presentFocusedFormControlViewController:]):
3621         (-[WKContentView dismissFocusedFormControlViewController:]):
3622         (-[WKContentView shouldPresentTextInputViewController:]):
3623         (-[WKContentView presentTextInputViewController:]):
3624         (-[WKContentView dismissTextInputViewController:]):
3625
3626         Introduce helpers for managing presentation of the focused form control overlay and text input view controller.
3627         All -present and -dismiss helpers here are idempotent. These view controllers are presented from the content
3628         view's view controller for fullscreen presentation.
3629
3630         (-[WKContentView textInputController:didCommitText:]):
3631         (-[WKContentView textInputController:didRequestDismissalWithAction:]):
3632         (-[WKContentView focusedFormControlControllerDidSubmit:]):
3633         (-[WKContentView focusedFormControlControllerDidCancel:]):
3634         (-[WKContentView focusedFormControlControllerDidBeginEditing:]):
3635         (-[WKContentView highlightedRectForFocusedFormControlController:inCoordinateSpace:]):
3636         (-[WKContentView actionNameForFocusedFormControlController:]):
3637         (-[WKContentView focusedFormControlControllerDidRequestNextNode:]):
3638         (-[WKContentView focusedFormControlControllerDidRequestPreviousNode:]):
3639         (-[WKContentView hasNextNodeForFocusedFormControlController:]):
3640         (-[WKContentView hasPreviousNodeForFocusedFormControlController:]):
3641
3642         Implement delegate methods for the focused form control and text input view controllers. This mainly involves
3643         straightforward plumbing of pieces of AssistedNodeInformation on the content view.
3644
3645         (-[WKContentView pointIsInAssistedNode:]): Deleted.
3646
3647         Remove a method that was still implemented only for binary compatibility with iOS 10.
3648
3649         * WebProcess/WebPage/WebPage.cpp:
3650         (WebKit::WebPage::setTextAsync):
3651         * WebProcess/WebPage/WebPage.h:
3652         * WebProcess/WebPage/WebPage.messages.in:
3653
3654 2018-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3655
3656         [GTK] Shift + mouse scroll should scroll horizontally
3657         https://bugs.webkit.org/show_bug.cgi?id=181629
3658
3659         Reviewed by Michael Catanzaro.
3660
3661         Swap scroll direction when Shift is pressed for consistency with GtkScrolledWindow.
3662
3663         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3664         (webkitWebViewBaseScrollEvent):
3665
3666 2018-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3667
3668         REGRESSION(r227893): fast/events/touch/touch-stale-node-crash.html and other tests crash
3669         https://bugs.webkit.org/show_bug.cgi?id=182350
3670
3671         Reviewed by Carlos Alberto Lopez Perez.
3672
3673         Ensure events synthesized from touch gestures have a valid window, screen and device.
3674
3675         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3676         * UIProcess/gtk/GestureController.h: Add virtual destructor to GestureControllerclient.
3677
3678 2018-01-31  Simon Fraser  <simon.fraser@apple.com>
3679
3680         Use different debug red colors for different contexts
3681         https://bugs.webkit.org/show_bug.cgi?id=182362
3682
3683         Reviewed by Tim Horton.
3684         
3685         Pure red is used elsehwere in the system as a debug color indicator, so use different
3686         shades of red for WebKit in the two places where we paint a reddish wash in debug builds,
3687         so they are identifiable.
3688
3689         * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
3690         (WebKit::RemoteLayerBackingStore::drawInContext):
3691
3692 2018-01-31  Don Olmstead  <don.olmstead@sony.com>
3693
3694         [CMake] Make JavaScriptCore headers copies
3695         https://bugs.webkit.org/show_bug.cgi?id=182303
3696
3697         Reviewed by Alex Christensen.
3698
3699         * CMakeLists.txt:
3700         * Scripts/generate-forwarding-headers.pl:
3701
3702 2018-01-31  Alex Christensen  <achristensen@webkit.org>
3703
3704         Unreviewed, rolling out r227942.
3705
3706         r227875 should not have been rolled out.
3707
3708         Reverted changeset:
3709
3710         "Unreviewed, rolling out r227875."
3711         https://bugs.webkit.org/show_bug.cgi?id=182357
3712         https://trac.webkit.org/changeset/227942
3713
3714 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
3715
3716         Unreviewed, rolling out r227875.
3717         https://bugs.webkit.org/show_bug.cgi?id=182357
3718
3719         Missing cross-platform TestController implementation
3720
3721         Reverted changeset:
3722
3723         "Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()"
3724         https://bugs.webkit.org/show_bug.cgi?id=181958
3725         https://trac.webkit.org/changeset/227875
3726
3727         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3728         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
3729         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
3730         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3731         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
3732         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
3733         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]): Deleted.
3734         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]): Deleted.
3735         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3736         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3737         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3738         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
3739         (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
3740         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
3741         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
3742         (WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains):
3743         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
3744         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
3745         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
3746         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
3747         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
3748         * UIProcess/WebResourceLoadStatisticsStore.h:
3749
3750 2018-01-31  Brent Fulgham  <bfulgham@apple.com>
3751
3752         Follow-up to r227939.
3753         https://bugs.webkit.org/show_bug.cgi?id=182354
3754         <rdar://problem/37046844>
3755
3756         Make sure the correct sandbox is used on iOS as well.
3757
3758         * StorageProcess/ios/StorageProcessIOS.mm:
3759         (WebKit::StorageProcess::initializeSandbox):
3760
3761 2018-01-31  Brent Fulgham  <bfulgham@apple.com>
3762
3763         REGRESSION(r220094): com.apple.WebKit.Storage lost its sandbox
3764         https://bugs.webkit.org/show_bug.cgi?id=182354
3765         <rdar://problem/37046844>
3766
3767         Reviewed by Ryosuke Niwa.
3768
3769         The Database process was renamed to Storage, but it's sandbox was not updated.
3770
3771         * Configurations/WebKit.xcconfig: Update for sandbox rename.
3772         * DerivedSources.make: Ditto.
3773         * Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Removed.
3774         * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Copied from Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
3775         * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Removed.
3776         * StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Copied from StorageProcess/mac/com.apple.WebKit.Databases.sb.in.
3777         * WebKit.xcodeproj/project.pbxproj: Update for sandbox rename.
3778
3779 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
3780
3781         REGRESSION(r227223): http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html, http/tests/resourceLoadStatistics/grandfathering.html timing out on GTK, WPE
3782         https://bugs.webkit.org/show_bug.cgi?id=182222
3783
3784         Reviewed by Alex Christensen.
3785
3786         Add callbacks to notify when resource load statistics deletion is complete.
3787
3788         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3789         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
3790         (WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
3791         * UIProcess/API/C/WKWebsiteDataStoreRef.h:
3792
3793 2018-01-31  Tim Horton  <timothy_horton@apple.com>
3794
3795         Occasional null deref under WebPageProxy::updateBackingStoreDiscardableState()
3796         https://bugs.webkit.org/show_bug.cgi?id=182349
3797         <rdar://problem/27822258>
3798
3799         Reviewed by Simon Fraser.
3800
3801         * UIProcess/WebPageProxy.cpp:
3802         (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
3803         m_drawingArea can be null during process launch and relaunch.
3804
3805         Cocoa ports don't use the result of setBackingStoreIsDiscardable(),
3806         but they do run this code to keep it up to date.
3807
3808 2018-01-31  Michael Catanzaro  <mcatanzaro@igalia.com>
3809
3810         [GTK] Move gir and typelib generation into ENABLE_INTROSPECTION conditional
3811         https://bugs.webkit.org/show_bug.cgi?id=182308
3812
3813         Reviewed by Carlos Garcia Campos.
3814
3815         * PlatformGTK.cmake:
3816
3817 2018-01-31  Youenn Fablet  <youenn@apple.com>
3818
3819         Remove StorageToWebProcessConnection::removeSWServerConnection
3820         https://bugs.webkit.org/show_bug.cgi?id=182305
3821
3822         Reviewed by Chris Dumez.
3823
3824         * StorageProcess/StorageToWebProcessConnection.cpp:
3825         (WebKit::StorageToWebProcessConnection::removeSWServerConnection): Deleted.
3826         * StorageProcess/StorageToWebProcessConnection.h:
3827         * StorageProcess/StorageToWebProcessConnection.messages.in:
3828
3829 2018-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3830
3831         REGRESSION(r227544): [GTK] contextMenuEvent is NULL on CONTEXT_MENU call
3832         https://bugs.webkit.org/show_bug.cgi?id=182224
3833
3834         Reviewed by Michael Catanzaro.
3835
3836         Move the gestures handling to WebKitWebViewBase. This patch adds GestureControllerClient class, created and
3837         implemented by WebKitWebViewBase and used by GestureController instead of the WebPageProxy. This way we ensure
3838         events are handled consistently.
3839
3840         * UIProcess/API/gtk/PageClientImpl.cpp:
3841         (WebKit::PageClientImpl::doneWithTouchEvent): Cast the GdkEvent since GestureController no longer works wirth
3842         const GdkEvents.
3843         (WebKit::PageClientImpl::zoom): Use webkit_web_view_set_zoom_level() in case of WebKitWebView or
3844         WebPageProxy::setPageZoomFactor() otherwise.
3845         * UIProcess/API/gtk/PageClientImpl.h:
3846         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3847         (ClickCounter::currentClickCountForGdkButtonEvent): Receive a GdkEvent to avoid casts.
3848         (webkitWebViewBaseHandleMouseEvent): Helper function to handle mouse events.
3849         (webkitWebViewBaseButtonPressEvent): Use webkitWebViewBaseHandleMouseEvent.
3850         (webkitWebViewBaseButtonReleaseEvent): Ditto.
3851         (webkitWebViewBaseHandleWheelEvent): Helper function to handle wheel events.
3852         (webkitWebViewBaseScrollEvent): Use webkitWebViewBaseHandleWheelEvent.
3853         (webkitWebViewBaseMotionNotifyEvent): Use webkitWebViewBaseHandleMouseEvent.
3854         (webkitWebViewBaseCrossingNotifyEvent): Ditto.
3855         (webkitWebViewBaseGestureController): Pass the widget and client to GestureController.
3856         * UIProcess/gtk/GestureController.cpp:
3857         (WebKit::GestureController::GestureController): Receives a widget and client now.
3858         (WebKit::GestureController::handleEvent): Remove the const.
3859         (WebKit::GestureController::Gesture::Gesture): Initialize client.
3860         (WebKit::GestureController::Gesture::handleEvent): Remove the const.
3861         (WebKit::GestureController::DragGesture::startDrag): Use the client instead of WebPageProxy.
3862         (WebKit::GestureController::DragGesture::handleDrag): Ditto.
3863         (WebKit::GestureController::DragGesture::handleTap): Ditto.
3864         (WebKit::GestureController::DragGesture::begin): Ignore the const returned by gtk_gesture_get_last_event().
3865         (WebKit::GestureController::DragGesture::update): Ditto.
3866         (WebKit::GestureController::DragGesture::end): Ditto.
3867         (WebKit::GestureController::DragGesture::DragGesture): Receives a widget and client now.
3868         (WebKit::GestureController::SwipeGesture::startMomentumScroll): Use the client instead of WebPageProxy.
3869         (WebKit::GestureController::SwipeGesture::swipe): Ignore the const returned by gtk_gesture_get_last_event().
3870         (WebKit::GestureController::SwipeGesture::SwipeGesture): Receives a widget and client now.
3871         (WebKit::GestureController::ZoomGesture::begin): Start the zoom.
3872         (WebKit::GestureController::ZoomGesture::startZoom): Use the client instead of WebPageProxy.
3873         (WebKit::GestureController::ZoomGesture::handleZoom): Ditto.
3874         (WebKit::GestureController::ZoomGesture::ZoomGesture): Receives a widget and client now.
3875         (WebKit::GestureController::LongPressGesture::longPressed): Use the client instead of WebKitWebView.
3876         (WebKit::GestureController::LongPressGesture::pressed): Ignore the const returned by gtk_gesture_get_last_event().
3877         (WebKit::GestureController::LongPressGesture::LongPressGesture): Receives a widget and client now.
3878         (WebKit::GestureController::Gesture::simulateMouseClick): Deleted.
3879         (WebKit::createScrollEvent): Deleted.
3880         * UIProcess/gtk/GestureController.h:
3881
3882 2018-01-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3883
3884         Web Automation: cookies returned by automation should have expiry time in seconds
3885         https://bugs.webkit.org/show_bug.cgi?id=182293
3886
3887         Reviewed by Brian Burg.
3888
3889         When creating a WebCore::Cookie from a WebDriver object we convert the given expiry time to milliseconds, but
3890         when creating a WebDriver object from a WebCore::Cookie we are keeping the milliseconds. We should convert to
3891         seconds for consistency, so that the WebDriver always handles seconds.
3892
3893         Fixes: imported/w3c/webdriver/tests/cookies/get_named_cookie.py::test_get_named_cookie
3894
3895         * UIProcess/Automation/WebAutomationSession.cpp:
3896         (WebKit::buildObjectForCookie): Convert expiry to seconds.
3897
3898 2018-01-31  Ryosuke Niwa  <rniwa@webkit.org>
3899
3900         Unreviewed iOS build fix.
3901
3902         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3903
3904 2018-01-30  John Wilander  <wilander@apple.com>
3905
3906         Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()
3907         https://bugs.webkit.org/show_bug.cgi?id=181958
3908         https://bugs.webkit.org/show_bug.cgi?id=182072
3909         <rdar://problem/36801804>
3910         <rdar://problem/36845795>
3911
3912         Reviewed by Brent Fulgham.
3913
3914         Because of the asynchronous nature of XPC and cookies,
3915         we need callbacks in these TestRunner functions so that
3916         the layout tests can wait for state changes to finish
3917         before checking test conditions.
3918
3919         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
3920         (WKWebsiteDataStoreStatisticsUpdateCookiePartitioning):
3921         (WKWebsiteDataStoreSetStatisticsShouldPartitionCookiesForHost):
3922         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3923         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning]):
3924         (-[WKWebsiteDataStore _resourceLoadStatisticsUpdateCookiePartitioning:]):
3925         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:]):
3926         (-[WKWebsiteDataStore _resourceLoadStatisticsSetShouldPartitionCookies:forHost:completionHandler:]):
3927         * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
3928         * UIProcess/WebResourceLoadStatisticsStore.cpp:
3929         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
3930         (WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
3931         (WebKit::WebResourceLoadStatisticsStore::logNonRecentUserInteraction):
3932         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdate):
3933         (WebKit::WebResourceLoadStatisticsStore::scheduleCookiePartitioningUpdateForDomains):
3934         (WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains):
3935         (WebKit::WebResourceLoadStatisticsStore::mergeWithDataFromDecoder):
3936         (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
3937         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
3938         (WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains):
3939         (WebKit::WebResourceLoadStatisticsStore::clearPartitioningStateForDomains):
3940         * UIProcess/WebResourceLoadStatisticsStore.h:
3941
3942 2018-01-30  Ryosuke Niwa  <rniwa@webkit.org>
3943
3944         REGRESSION(r227550): Resource timing API is disabled on macOS
3945         https://bugs.webkit.org/show_bug.cgi?id=182318
3946
3947         Reviewed by Chris Dumez.
3948
3949         Resource timing API should be enabled by default all versions of macOS we support now.
3950
3951         * Shared/WebPreferences.yaml:
3952         * Shared/WebPreferencesDefaultValues.h:
3953
3954 2018-01-30  Tim Horton  <timothy_horton@apple.com>
3955
3956         WKWebView layout is sometimes wrong after rotation on iPhone X
3957         https://bugs.webkit.org/show_bug.cgi?id=182304
3958         <rdar://problem/34158671>
3959
3960         Reviewed by Simon Fraser.
3961
3962         * Platform/spi/ios/UIKitSPI.h:
3963         * UIProcess/API/Cocoa/WKWebView.mm:
3964         (-[WKWebView _computedContentInset]):
3965         (-[WKWebView _scrollViewSystemContentInset]):
3966         (activeMinimumLayoutSize):
3967         It turns out that it is not always safe to look at the safe area insets of
3968         children from inside layoutSubviews, even after the call to super.
3969
3970         Instead, make use of the fact that WKScrollView and WKWebView have identical
3971         coordinate spaces, and map WKWebView's safe area insets into the WKScrollView.
3972         It's safe to use the scroll view's affected-edges and contentScrollInset,
3973         because those aren't updated at the same outside-of-layout time that
3974         safe area insets are.
3975
3976         We could alternatively move all calls to activeMinimumLayoutSize outside
3977         of layoutSubviews, but that seems like a larger and riskier change.
3978
3979         All attempts to write a test have failed; this depends heavily on use of
3980         autolayout and the mechanism by which the system updates system-owned
3981         safe area insets during device rotation.
3982
3983 2018-01-30  Don Olmstead  <don.olmstead@sony.com>
3984
3985         JSExports.h should be included as <JavaScriptCore/JSExportMacros.h>
3986         https://bugs.webkit.org/show_bug.cgi?id=182312
3987
3988         Reviewed by Michael Catanzaro.
3989
3990         * config.h:
3991
3992 2018-01-30  Brent Fulgham  <bfulgham@apple.com>
3993
3994         Add telemetry to track storage access API adoption
3995         https://bugs.webkit.org/show_bug.cgi?id=182197
3996         <rdar://problem/35803309>
3997
3998         Reviewed by Chris Dumez.
3999
4000         Part 2: Add telemetry for the Storage Access API case
4001
4002         This change increments a counter when an origin is loaded in a first part context because
4003         it was granted Storage Access API permissions.