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