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