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