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