a711a1c99726cbed367cb6f71333c62b4065ad1a
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-01-30  Dan Bernstein  <mitz@apple.com>
2
3         [Cocoa] Get rid of many WK_ macros for nullability
4         https://bugs.webkit.org/show_bug.cgi?id=153718
5
6         Sam Weinig reviewed an earlier version of this change, and Simon Fraser rubber-stamped this version.
7
8         * Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
9           WK_NULLABLE, WK_NULL_UNSPECIFIED, and WK_NULLABLE_PROPERTY. Removed the
10           !__has_feature(assume_nonnull) case.
11
12         * mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
13           chanegd to rewrite WK_NULLABLE_SPECIFIER to the modern _Nullable instead of __nullable.
14
15         Replaced instances of the above macros with their expansions.
16
17         * UIProcess/API/Cocoa/WKBackForwardList.h:
18         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
19         * UIProcess/API/Cocoa/WKError.h:
20         * UIProcess/API/Cocoa/WKFrameInfo.h:
21         * UIProcess/API/Cocoa/WKNavigationAction.h:
22         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
23         * UIProcess/API/Cocoa/WKNavigationResponse.h:
24         * UIProcess/API/Cocoa/WKScriptMessage.h:
25         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
26         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
27         * UIProcess/API/Cocoa/WKUIDelegate.h:
28         * UIProcess/API/Cocoa/WKUserContentController.h:
29         * UIProcess/API/Cocoa/WKUserScript.h:
30         * UIProcess/API/Cocoa/WKWebView.h:
31         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
32         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
33         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
34         * UIProcess/API/Cocoa/WKWindowFeatures.h:
35         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
36         * UIProcess/API/Cocoa/_WKElementInfo.h:
37         * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
38         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
39
40 2016-01-30  Dan Bernstein  <mitz@apple.com>
41
42         Reverted r195914, because at least one of the build.webkit.org builders still uses a compiler that doesn’t understand _Nullable.
43
44         * Shared/API/Cocoa/WKFoundation.h:
45         * UIProcess/API/Cocoa/WKBackForwardList.h:
46         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
47         * UIProcess/API/Cocoa/WKError.h:
48         * UIProcess/API/Cocoa/WKFrameInfo.h:
49         * UIProcess/API/Cocoa/WKNavigationAction.h:
50         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
51         * UIProcess/API/Cocoa/WKNavigationResponse.h:
52         * UIProcess/API/Cocoa/WKScriptMessage.h:
53         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
54         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
55         * UIProcess/API/Cocoa/WKUIDelegate.h:
56         * UIProcess/API/Cocoa/WKUserContentController.h:
57         * UIProcess/API/Cocoa/WKUserScript.h:
58         * UIProcess/API/Cocoa/WKWebView.h:
59         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
60         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
61         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
62         * UIProcess/API/Cocoa/WKWindowFeatures.h:
63         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
64         * UIProcess/API/Cocoa/_WKElementInfo.h:
65         * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
66         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
67         * mac/postprocess-framework-headers.sh:
68
69 2016-01-30  Commit Queue  <commit-queue@webkit.org>
70
71         Unreviewed, rolling out r195911.
72         https://bugs.webkit.org/show_bug.cgi?id=153723
73
74         Caused frequent assertion failures on bots (Requested by ap on
75         #webkit).
76
77         Reverted changeset:
78
79         "Replace CaseFoldingHash with ASCIICaseInsensitiveHash"
80         https://bugs.webkit.org/show_bug.cgi?id=153639
81         http://trac.webkit.org/changeset/195911
82
83 2016-01-30  Dan Bernstein  <mitz@apple.com>
84
85         [Cocoa] Get rid of WK_ macros for nullability
86         https://bugs.webkit.org/show_bug.cgi?id=153718
87
88         Reviewed by Sam Weinig.
89
90         * Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
91           WK_NULLABLE, WK_NULL_UNSPECIFIED, WK_NULLABLE_SPECIFIER, and WK_NULLABLE_PROPERTY.
92
93         * mac/postprocess-framework-headers.sh: Removed rules for rewriting those macros.
94
95         Replaced instances of those macros with their expansions, but using the modern _Nullable
96         instead of __nullable:
97
98         * UIProcess/API/Cocoa/WKBackForwardList.h:
99         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
100         * UIProcess/API/Cocoa/WKError.h:
101         * UIProcess/API/Cocoa/WKFrameInfo.h:
102         * UIProcess/API/Cocoa/WKNavigationAction.h:
103         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
104         * UIProcess/API/Cocoa/WKNavigationResponse.h:
105         * UIProcess/API/Cocoa/WKScriptMessage.h:
106         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
107         * UIProcess/API/Cocoa/WKSecurityOrigin.h:
108         * UIProcess/API/Cocoa/WKUIDelegate.h:
109         * UIProcess/API/Cocoa/WKUserContentController.h:
110         * UIProcess/API/Cocoa/WKUserScript.h:
111         * UIProcess/API/Cocoa/WKWebView.h:
112         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
113         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
114         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
115         * UIProcess/API/Cocoa/WKWindowFeatures.h:
116         * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
117         * UIProcess/API/Cocoa/_WKElementInfo.h:
118         * UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
119         * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
120
121 2016-01-30  Darin Adler  <darin@apple.com>
122
123         Replace CaseFoldingHash with ASCIICaseInsensitiveHash
124         https://bugs.webkit.org/show_bug.cgi?id=153639
125
126         Reviewed by Filip Pizlo.
127
128         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Use ASCIICaseInsensitiveHash
129         for MIME types. MIME types are all ASCII.
130
131         * UIProcess/Plugins/PlugInAutoStartProvider.h: Use ASCIICaseInsensitiveHash for
132         origins. Origin strings should use ASCII case insensitive matching and should not
133         fold non-ASCII case.
134
135         * WebProcess/WebPage/WebPage.h: Use ASCIICaseInsensitiveHash for MIME types.
136         MIME types are all ASCII.
137
138         * WebProcess/WebProcess.cpp:
139         (WebKit::addCaseFoldedCharacters): Use ASCIICaseInsensitiveHash to hash plug-in
140         origin strings. (See rationale above.)
141         (WebKit::hashForPlugInOrigin): Updated comment.
142
143 2016-01-30  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>
144
145         [GTK] Use configured python executable when executing generate-inspector-gresource-manifest.py
146         https://bugs.webkit.org/show_bug.cgi?id=153712
147
148         Reviewed by Michael Catanzaro.
149
150         * PlatformGTK.cmake:
151
152 2016-01-29  Ada Chan  <adachan@apple.com>
153
154         Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
155         https://bugs.webkit.org/show_bug.cgi?id=153665
156
157         Reviewed by Dan Bernstein.
158
159         * Configurations/FeatureDefines.xcconfig:
160
161 2016-01-29  Dan Bernstein  <mitz@apple.com>
162
163         Don’t use the “.Development” suffix for engineering builds targeting iOS devices, because the XPC cache is only aware of the unsuffixed service identifiers.
164
165         Reviewed by Chris Dumez.
166
167         * Configurations/DebugRelease.xcconfig:
168
169 2016-01-29  Enrica Casucci  <enrica@apple.com>
170
171         One more iOS build fix.
172
173         Unreviewed.
174
175         * Platform/spi/ios/UIKitSPI.h:
176
177 2016-01-29  Enrica Casucci  <enrica@apple.com>
178
179         iOS build fix after r195826.
180
181         Unreviewed.
182
183         * Platform/spi/ios/UIKitSPI.h:
184
185 2016-01-29  Enrica Casucci  <enrica@apple.com>
186
187         Disable text interaction with pencil.
188         https://bugs.webkit.org/show_bug.cgi?id=153655
189         rdar://problem/24337778
190
191         Reviewed by Tim Horton.
192
193         * Platform/spi/ios/UIKitSPI.h:
194         * UIProcess/ios/WKContentViewInteraction.mm:
195         (-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):
196         (-[WKContentView _singleTapCommited:]):
197
198 2016-01-29  Mario Sanchez Prada  <mario@endlessm.com>
199
200         [GTK] WebProcess crashes when quickly attempting many DnD operations
201         https://bugs.webkit.org/show_bug.cgi?id=138468
202
203         Reviewed by Michael Catanzaro.
204
205         Guard all the new DnD-related code under GTK_CHECK_VERSION #if's to
206         make sure we don't bump the required version of GTK+ up to 3.16, and
207         it's buildable again with GTK+ >= 3.6.
208
209         * UIProcess/gtk/DragAndDropHandler.cpp:
210         (WebKit::DragAndDropHandler::DragAndDropHandler):
211         (WebKit::DragAndDropHandler::startDrag):
212         (WebKit::DragAndDropHandler::fillDragData):
213         (WebKit::DragAndDropHandler::finishDrag):
214         * UIProcess/gtk/DragAndDropHandler.h:
215
216 2016-01-28  Antti Koivisto  <antti@apple.com>
217
218         Enable background tab suspension by default on OSX
219         https://bugs.webkit.org/show_bug.cgi?id=153629
220         <rdar://problem/24402895>
221
222         Reviewed by Andreas Kling.
223
224         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
225         (WebKit::registerUserDefaultsIfNeeded):
226
227 2016-01-28  Dan Bernstein  <mitz@apple.com>
228
229         [Cocoa] Use the non-Development variants of XPC services for development
230         https://bugs.webkit.org/show_bug.cgi?id=152545
231
232         Reviewed by Darin Adler.
233
234         The purpose of the Development variants of the WebKit XPC services is to allow the service
235         to link against the development WebKit dylibs rather than the system ones. Instead, we
236         accomplish this here by including dyld environment load commands in the normal services
237         when the WebKit dylibs are expected to be relocated. A new build setting,
238         WK_RELOCATABLE_FRAMEWORKS, controls this.
239
240         To make it easy to identify engineering builds of the services at runtime, they can be
241         given a distinctive suffix. A new build setting, WK_XPC_SERVICE_SUFFIX, controls this.
242
243         * Configurations/DebugRelease.xcconfig: Set WK_RELOCATABLE_FRAMEWORKS to YES and
244           WK_XPC_SERVICE_SUFFIX to ".Development".
245
246         * Configurations/BaseTarget.xcconfig: Make the quoted value of the WK_XPC_SERVICE_SUFFIX
247           build setting available as a preprocessor macro.
248
249         * Configurations/BaseXPCService.xcconfig:
250           - Simplify the definition of INSTALL_PATH now that there are no Development variants.
251           - Define WK_RELOCATABLE_FRAMEWORKS_LDFLAGS when building relocatable frameworks to include
252             -dyld_env options setting DYLD_FRAMEWORK_PATH to point to the directory containing
253             WebKit.framework and DYLD_LIBRARY_PATH to the framework’\80\99s Frameworks subdirectory. When
254             not building relocatable frameworks, define WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to include
255             a -headerpad option allowing dyld environment load commands to be added after the fact.
256           - Add WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to OTHER_LDFLAGS.
257           - Define WK_XPC_SERVICE_INSERT_LIBRARIES_DIR when building relocatable frameworks to be
258             the path to the Frameworks subdirectory of the WebKit framework containing the service.
259             When not building relocatable frameworks, define it to the absolute path of the
260             Frameworks subdirectory of the installed WebKit framework.
261
262         * Configurations/DatabaseService.xcconfig: Append WK_XPC_SERVICE_SUFFIX to PRODUCT_NAME,
263           and remove no-longer-used definition of WK_XPC_SERVICE_VARIANT.
264         * Configurations/NetworkService.xcconfig: Append WK_XPC_SERVICE_SUFFIX to PRODUCT_NAME, add
265           WK_RELOCATABLE_FRAMEWORKS_LDFLAGS to OTHER_LDFLAGS, and remove no-longer-used definition
266           of WK_XPC_SERVICE_VARIANT.
267         * Configurations/PluginService.32.xcconfig: Ditto.
268         * Configurations/PluginService.64.xcconfig: Ditto.
269         * Configurations/WebContentService.xcconfig: Ditto.
270
271         * Configurations/DatabaseService.Development.xcconfig: Removed.
272         * Configurations/NetworkService.Development.xcconfig: Removed.
273         * Configurations/PluginService.32.Development.xcconfig: Removed.
274         * Configurations/PluginService.64.Development.xcconfig: Removed.
275         * Configurations/WebContentService.Development.xcconfig: Removed.
276
277         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development: Removed.
278         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist: Removed.
279         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: Set
280           CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix.
281
282         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development: Removed.
283         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist: Removed.
284         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist: Removed.
285         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Set
286           CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix. Use
287           WK_XPC_SERVICE_INSERT_LIBRARIES_DIR in the value of DYLD_INSERT_LIBRARIES.
288         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Set
289           CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix.
290         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Ditto.
291
292         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
293         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development: Removed.
294         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: Removed.
295
296         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development: Removed.
297         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist: Removed.
298         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: Removed.
299         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Set
300           CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix. Use
301           WK_XPC_SERVICE_INSERT_LIBRARIES_DIR in the value of DYLD_INSERT_LIBRARIES.
302         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Set
303           CFBundleIdentifier to PRODUCT_NAME in order to include the optional suffix.
304         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
305
306         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: Removed.
307
308         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
309         (WebKit::XPCServiceEventHandler): If stdout and stderr file descriptors are included in the
310           bootstrap message, hook them up to the serviceâ\80\99s stdout and stderr, like the Development
311           services do.
312         (main): Moved code from XPCServiceMain.Development.mm to handle the optional
313           OverrideLanguages array.
314
315         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
316         (WebKit::addDYLDEnvironmentAdditions): Addressed a FIXME.
317         (WebKit::serviceName): Removed forDevelopment argument and .Development service names.
318           Added WK_XPC_SERVICE_SUFFIX to the names.
319         (WebKit::connectToService): Updated for removal of forDevelopment argument. Removed
320           "framework-executable-path" key from the bootstrap message, because it was only used in
321           the Development variants.
322         (WebKit::connectToReExecService): Deleted.
323         (WebKit::createService): Removed call to connectToReExecService. Instead pass forDevelopment
324           to connectToService.
325
326         * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files. Removed targets
327           for Development services. Removed Development services from script build phase that copies
328           services into the framework in engineering builds, and made it respect
329           WK_XPC_SERVICE_SUFFIX.
330
331 2016-01-28  Enrica Casucci  <enrica@apple.com>
332
333         Should avoid navigation for some data detector urls.
334         https://bugs.webkit.org/show_bug.cgi?id=153600
335
336         Reviewed by Tim Horton.
337
338         When a tap is commited, we normally generate a synthetic click if
339         the node responds to click events.
340         This patch adds the logic to prevent that from happening if the node
341         is a data detector link with certain characteristics (calendar event, telephone, etc.).
342         If this is the case, we compute the interaction information as position, send it
343         over to the UI process and notify that we did not handle the tap.
344         The page client is now also notified of this event and can show the data detector sheet if
345         appropriate.
346
347         * UIProcess/PageClient.h:
348         * UIProcess/ios/PageClientImplIOS.h:
349         * UIProcess/ios/PageClientImplIOS.mm:
350         (WebKit::PageClientImpl::toolTipChanged):
351         (WebKit::PageClientImpl::didNotHandleTapAsClick):
352         (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
353         * UIProcess/ios/WKContentViewInteraction.h:
354         * UIProcess/ios/WKContentViewInteraction.mm:
355         (-[WKContentView clearSelection]):
356         (-[WKContentView _didNotHandleTapAsClick:]):
357         (-[WKContentView _positionInformationDidChange:]):
358         * UIProcess/ios/WebPageProxyIOS.mm:
359         (WebKit::WebPageProxy::didNotHandleTapAsClick):
360         * WebProcess/WebPage/ios/WebPageIOS.mm:
361         (WebKit::WebPage::commitPotentialTap):
362
363 2016-01-28  Brent Fulgham  <bfulgham@apple.com>
364
365         [iOS] Update Web Process sandbox profile for audiodeviceclock access
366         https://bugs.webkit.org/show_bug.cgi?id=153571
367         <rdar://problem/24134612>
368
369         Reviewed by Alexey Proskuryakov.
370
371         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
372
373 2016-01-26  Ada Chan  <adachan@apple.com>
374
375         Get WebVideoFullscreenManager and related classes to also compile for Mac platform
376         with video presentation mode support.
377         https://bugs.webkit.org/show_bug.cgi?id=153221
378
379         Reviewed by Eric Carlson.
380
381         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
382         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
383         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
384         Enabled also for Mac with video presentation mode support.
385         (-[WKLayerHostView makeBackingLayer]):
386         Make sure this view uses CALayerHost for its layer.
387         (WebKit::WebVideoFullscreenManagerProxy::invalidate):
388         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
389         (WebKit::WebVideoFullscreenManagerProxy::ensureInterface):
390         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
391         Replace WebCore::WebVideoFullscreenInterfaceAVKit with PlatformWebVideoFullscreenInterface.
392         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
393         +[UIWindow _synchronizeDrawingAcrossProcesses] is not available on Mac.
394
395         * UIProcess/WebPageProxy.cpp:
396         (WebKit::WebPageProxy::WebPageProxy):
397         (WebKit::WebPageProxy::reattachToWebProcess):
398         (WebKit::WebPageProxy::viewDidLeaveWindow):
399         (WebKit::WebPageProxy::resetState):
400         * UIProcess/WebPageProxy.h:
401         The code that creates m_videoFullscreenManager is now enabled also on Mac with video
402         presentation mode support.
403
404         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
405         * WebProcess/WebCoreSupport/WebChromeClient.h:
406         Enable the API related to the video fullscreen layer also on Mac with video presentation
407         mode support.
408
409         * WebProcess/WebPage/WebPage.cpp:
410         * WebProcess/WebPage/WebPage.h:
411         The code that creates m_videoFullscreenManager is now enabled also on Mac with video
412         presentation mode support.
413
414         * WebProcess/cocoa/WebVideoFullscreenManager.h:
415         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
416         * WebProcess/cocoa/WebVideoFullscreenManager.mm:
417         Enabled also for Mac with video presentation mode support.
418         (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen):
419         Return false for now on Mac.
420
421 2016-01-28  Darin Adler  <darin@apple.com>
422
423         Remove equalIgnoringCase since all callers really wanted equalIgnoringASCIICase
424         https://bugs.webkit.org/show_bug.cgi?id=153411
425
426         Reviewed by Ryosuke Niwa.
427
428         * Shared/API/c/WKString.cpp:
429         (WKStringIsEqualToUTF8CStringIgnoringCase): Use equalIgnoringASCIICase.
430         This is a change in behavior for callers who passed non-ASCII letters to
431         this function and expected case insensitive comparison.
432
433         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
434         (WebKit::PDFPlugin::streamDidReceiveResponse): Use equalIgnoringASCIICase.
435         No change in behavior because this is just checking a fixed ASCII MIME type.
436         (WebKit::PDFPlugin::manualStreamDidReceiveResponse): Ditto.
437         * WebProcess/Plugins/PDF/PDFPlugin.mm:
438         (WebKit::PDFPlugin::streamDidReceiveResponse): Ditto.
439         (WebKit::PDFPlugin::manualStreamDidReceiveResponse): Ditto.
440
441 2016-01-27  Alex Christensen  <achristensen@webkit.org>
442
443         Fix CMake build after r195722.
444
445         * PlatformMac.cmake:
446         Include new file.
447
448 2016-01-27  Dan Bernstein  <mitz@apple.com>
449
450         Fix other builds.
451
452         * Configurations/WebKit.xcconfig:
453
454 2016-01-27  Anders Carlsson  <andersca@apple.com>
455
456         Fix build.
457
458         * Configurations/WebKit.xcconfig:
459
460 2016-01-27  Krzysztof Czech  <k.czech@samsung.com>
461
462         [EFL] Remove unused accessibility related code
463         https://bugs.webkit.org/show_bug.cgi?id=153543
464
465         Reviewed by Darin Adler.
466
467         Do not need to load external library to expose WebKit's
468         accessibility tree. There have been changes in EFL/Elementary
469         in terms of support of accessibility and we should follow those.
470
471         * WebProcess/efl/WebProcessMainEfl.cpp:
472         (eailLibraryPath): Deleted.
473         (eail): Deleted.
474
475 2016-01-27  Enrica Casucci  <enrica@apple.com>
476
477         Cache results of data detection in the UI process when load completes.
478         https://bugs.webkit.org/show_bug.cgi?id=153560
479
480         Reviewed by Tim Horton.
481
482         This patch changes when the results of data detections are sent to the
483         UIProcess. Before this change, they were only provided as part of
484         InteractionInformationAtPosition, which is populated when long press
485         gesture is triggered.
486         We need to have the results available if the client wants to allow navigation
487         to a data detector link, in order to allow them to retrieve the full url.
488         With this change, we now send the results as soon as they are computed
489         and keep them in the WebPageProxy object so that they can be fetched when
490         necessary from a WKWebView private interface.
491
492         * Shared/Cocoa/DataDetectionResult.h: Added.
493         * Shared/Cocoa/DataDetectionResult.mm: Added.
494         (WebKit::DataDetectionResult::encode):
495         (WebKit::DataDetectionResult::decode):
496         * UIProcess/API/Cocoa/WKWebView.mm:
497         (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
498         (-[WKWebView _dataDetectionResults]):
499         (-[WKWebView _didRelaunchProcess]):
500         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
501         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
502         (WebKit::WebPageProxy::setDataDetectionResult):
503         (WebKit::WebPageProxy::saveRecentSearches):
504         * UIProcess/WebPageProxy.h:
505         (WebKit::WebPageProxy::websiteDataStore):
506         (WebKit::WebPageProxy::dataDetectionResults):
507         (WebKit::WebPageProxy::scrollingCoordinatorProxy):
508         * UIProcess/WebPageProxy.messages.in:
509         * UIProcess/ios/WKContentViewInteraction.h:
510         * UIProcess/ios/WKContentViewInteraction.mm:
511         (-[WKContentView ensurePositionInformationIsUpToDate:]):
512         (-[WKContentView _dataDetectionResults]):
513         (-[WKContentView gestureRecognizerShouldBegin:]):
514         * WebKit2.xcodeproj/project.pbxproj:
515         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
516         (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
517         (WebKit::WebFrameLoaderClient::dispatchDidFinishDataDetection):
518         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading):
519         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
520         * WebProcess/WebPage/WebPage.cpp:
521         (WebKit::WebPage::updatePreferences):
522         (WebKit::WebPage::setDataDetectionResults):
523         (WebKit::WebPage::willCommitLayerTree):
524         * WebProcess/WebPage/WebPage.h:
525         (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):
526
527 2016-01-27  Anders Carlsson  <andersca@apple.com>
528
529         Include the right WebKitAdditions files
530         https://bugs.webkit.org/show_bug.cgi?id=153572
531
532         Reviewed by Tim Horton.
533
534         * UIProcess/WebPageProxy.cpp:
535         (WebKit::WebPageProxy::WebPageProxy):
536         (WebKit::WebPageProxy::reattachToWebProcess):
537
538 2016-01-27  Daniel Bates  <dabates@apple.com>
539
540         Move ContentSecurityPolicy.{cpp, h} to its own directory
541         https://bugs.webkit.org/show_bug.cgi?id=153527
542         <rdar://problem/24359892>
543
544         Reviewed by Sam Weinig.
545
546         Add ${WEBCORE_DIR}/page/csp to the list of WebKit2 include directories.
547
548         * CMakeLists.txt:
549
550 2016-01-27  Anders Carlsson  <andersca@apple.com>
551
552         Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy
553         https://bugs.webkit.org/show_bug.cgi?id=153550
554
555         Reviewed by Sam Weinig.
556
557         * DerivedSources.make:
558         Add the ability for WebKitAdditions to add new message receivers.
559
560         * Shared/Cocoa/WebKitAdditions.mm: Added.
561         Add addition files.
562
563         * Shared/WebCoreArgumentCoders.h:
564         Add extension points.
565
566         * UIProcess/WebPageProxy.cpp:
567         (WebKit::WebPageProxy::WebPageProxy):
568         (WebKit::WebPageProxy::reattachToWebProcess):
569         (WebKit::WebPageProxy::resetState):
570         Add extension points.
571
572         * UIProcess/WebPageProxy.h:
573         Add extension points.
574
575         * WebKit2.xcodeproj/project.pbxproj:
576         Add new files.
577
578         * WebProcess/WebPage/WebPage.cpp:
579         Add extension points.
580
581 2016-01-27  Chris Dumez  <cdumez@apple.com>
582
583         window.atob() should ignore spaces in input
584         https://bugs.webkit.org/show_bug.cgi?id=153522
585         <rdar://problem/24357822>
586
587         Reviewed by Benjamin Poulain.
588
589         * UIProcess/mac/WebInspectorProxyMac.mm:
590         (WebKit::WebInspectorProxy::platformSave):
591
592 2016-01-27  Ryosuke Niwa  <rniwa@webkit.org>
593
594         Add API to access closed shadowRoot in InjectedBundle
595         https://bugs.webkit.org/show_bug.cgi?id=153533
596
597         Reviewed by Antti Koivisto.
598
599         Added WKBundleScriptWorldMakeAllShadowRootsOpen to make all shadow roots open.
600         This is needed to keep supporting certain browser-level features such as autofill.
601
602         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
603         (WKBundleScriptWorldMakeAllShadowRootsOpen): Added.
604         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
605         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
606         (WebKit::InjectedBundleScriptWorld::makeAllShadowRootsOpen): Added.
607         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
608
609 2016-01-27  Zhuo Li  <zachli@apple.com>
610
611         Need ability to specify alternate image for AutoFill button in input fields.
612         https://bugs.webkit.org/show_bug.cgi?id=153116.
613         rdar://problem/23384854.
614
615         Reviewed by Darin Adler.
616
617         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
618         (toAutoFillButtonType): Convert the WebKit AutoFill button type enum to WebCore AutoFill button
619         type enum.
620         (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabledWithButtonType): Added to be able to specify
621         what the AutoFill button type is. None means the AutoFill button is not shown.
622         (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled): Deprecate this method.
623         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Declare an AutoFill button type enum.
624         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
625         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled): None means the AutoFill button is not enabled.
626         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabledWithButtonType): Use the new parameter to specify
627         what the AutoFill button type is.
628         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
629
630 2016-01-27  Dan Bernstein  <mitz@apple.com>
631
632         More trying to fix the build.
633
634         * Configurations/WebKit.xcconfig:
635
636 2016-01-27  Alexey Proskuryakov  <ap@apple.com>
637
638         Remove ENABLE_CURRENTSRC
639         https://bugs.webkit.org/show_bug.cgi?id=153545
640
641         Reviewed by Simon Fraser.
642
643         * Configurations/FeatureDefines.xcconfig:
644
645 2016-01-27  Sam Weinig  <sam@webkit.org>
646
647         Try to fix the build.
648
649         * Configurations/WebKit.xcconfig:
650
651 2016-01-26  Sam Weinig  <sam@webkit.org>
652
653         Attempt to force a rebuild.
654
655         * DerivedSources.make:
656
657 2016-01-26  Tim Horton  <timothy_horton@apple.com>
658
659         REGRESSION (r194557): Keyboard shortcuts stop working after the WKWebView is unparented and reparented
660         https://bugs.webkit.org/show_bug.cgi?id=153492
661         <rdar://problem/24138989>
662
663         Reviewed by Dan Bernstein.
664
665         * UIProcess/ios/WKContentViewInteraction.h:
666         * UIProcess/ios/WKContentViewInteraction.mm:
667         (-[WKContentView canBecomeFirstResponder]):
668         (-[WKContentView becomeFirstResponder]):
669         (-[WKContentView resignFirstResponder]):
670         When WKWebView is unparented, WKContentView will attempt to resignFirstResponder upwards,
671         first asking WKWebView. After r194557, WKWebView will accept first responder and forward
672         it on to the WKContentView, which will happily accept it again, despite being the view
673         that's trying to resign. This will cause us to completely lose first responder,
674         where it was actually supposed to propagate up above WKWebView to the client.
675
676         Keep track of when WKContentView is resigning first responder, and don't
677         let it become first responder while it is doing so, breaking the cycle.
678
679         * UIProcess/ios/WKContentView.h:
680         * UIProcess/API/Cocoa/WKWebView.mm:
681         (-[WKWebView canBecomeFirstResponder]):
682         If the WKContentView is currently in the process of resigning first responder status,
683         we shouldn't accept it, because clients expect to receive it.
684
685 2016-01-26  I-Ting Liu  <iting_liu@apple.com>
686
687         Implement wildcard matching for plug-in policy host.
688         https://bugs.webkit.org/show_bug.cgi?id=153090
689
690         Reviewed by Darin Adler.
691
692         WebPlatformStrategies decides the plug-in load policy for a host by looking
693         for a matched hostname in the list of plug-in policies sent by Safari. This
694         patch adds support for wildcard matching -- if there's a policy with hostname
695         "*.example.com," the policy for "foo.example.com" would be replaced with that
696         of "*.example.com" if there's no policy for this hostname. If there is more
697         than one wildcard hostname, the host with the longest wildcard hostname will
698         be used.
699
700         This patch adds a helper function in StringUtilites that matches a string to
701         another string, which may contain wildcard ('*') characters.
702
703         * Platform/mac/StringUtilities.h:
704         - Add WebKit::stringMatchesWildcardString.
705         - Remove #if ENABLE(TELEPHONE_NUMBER_DETECTION) && PLATFORM(MAC) flag so that
706         the compiler allows exposing StringUtilities.h.
707         - Add #if __OBJC__ to allow the file to be included in WebPltformStrategies.cpp
708
709         * Platform/mac/StringUtilities.mm:
710         (WebKit::stringMatchesWildcardString):
711         Return true if the entire first given String matches the second. The second string 
712         may contain wildcard characters.
713         (WebKit::wildcardRegexPatternString):
714         Return the regex expression from a wildcard string by replacing the wildcard
715         character ('*') with (".*") and escaping regular expression metacharacters.
716         (WebKit::formattedPhoneNumberString):
717         To expose StringUtilities.h for tests, we removed #if ENABLE(TELEPHONE_NUMBER_DETECTION)
718         && PLATFORM(MAC) flag in the header. Add a function that returns nil for
719         #if !(ENABLE(TELEPHONE_NUMBER_DETECTION) && PLATFORM(MAC)) to fix the removal
720         of the flag in the header file.
721
722         * WebKit2.xcodeproj/project.pbxproj:
723         Change the file attribute of StringUtilities.h from Project to Private for
724         testing in TestWebKitAPI.
725
726         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
727         (WebKit::WebPlatformStrategies::longestMatchedWildcardHostForHost):
728         Return the wildcard hostname whose matched substring with the host is the longest.
729         (WebKit::WebPlatformStrategies::replaceHostWithMatchedWildcardHost):
730         Replace the look-up host with a matched wildcard host if there is a match and that
731         the matched wildcard host's plug-in identifier is the same as that of the host.
732         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
733         Try to replace the look-up host with the wildcard host if there's no policy for
734         the host. Restructure the function to reduce hashmap lookup.
735
736         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
737         Declare the methods.
738
739 2016-01-26  Anders Carlsson  <andersca@apple.com>
740
741         Remove -d flag from make invocation.
742
743         * WebKit2.xcodeproj/project.pbxproj:
744
745 2016-01-26  Joseph Pecoraro  <pecoraro@apple.com>
746
747         Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
748         https://bugs.webkit.org/show_bug.cgi?id=153509
749         <rdar://problem/24354291>
750
751         Reviewed by Andreas Kling.
752
753         * WebProcess/WebPage/WebPage.cpp:
754         (WebKit::WebPage::updatePreferences):
755         Rename the ENABLE flag.
756
757 2016-01-26  Commit Queue  <commit-queue@webkit.org>
758
759         Unreviewed, rolling out r195602.
760         https://bugs.webkit.org/show_bug.cgi?id=153526
761
762         broke more than it fixed (Requested by thorton on #webkit).
763
764         Reverted changeset:
765
766         "REGRESSION (r194557): Keyboard shortcuts stop working after
767         the WKWebView is unparented and reparented"
768         https://bugs.webkit.org/show_bug.cgi?id=153492
769         http://trac.webkit.org/changeset/195602
770
771 2016-01-26  Anders Carlsson  <andersca@apple.com>
772
773         WebKitAdditions should be able to modify derived source rules
774         https://bugs.webkit.org/show_bug.cgi?id=153514
775
776         Reviewed by Tim Horton.
777
778         * Configurations/BaseTarget.xcconfig:
779         * Configurations/WebKit.xcconfig:
780         Set WEBKITADDITIONS_HEADER_SEARCH_PATHS.
781
782         * DerivedSources.make:
783         Move the path computation earlier and include WebKitDerivedSourcesAdditions.make.
784
785         * WebKit2.xcodeproj/project.pbxproj:
786         Pass our WebKitAdditions paths as include paths to make.
787
788 2016-01-26  Anders Carlsson  <andersca@apple.com>
789
790         Add a private WKUIDelegate method for getting a presenting view controller for a WKWebView on iOS
791         https://bugs.webkit.org/show_bug.cgi?id=153510
792
793         Reviewed by Dan Bernstein.
794
795         * UIProcess/API/APIUIClient.h:
796         (API::UIClient::presentingViewController):
797         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
798         * UIProcess/Cocoa/UIDelegate.h:
799         * UIProcess/Cocoa/UIDelegate.mm:
800         (WebKit::UIDelegate::setDelegate):
801         (WebKit::UIDelegate::UIClient::presentingViewController):
802
803 2016-01-26  Dean Jackson  <dino@apple.com>
804
805         [iOS] Documents without an explicit width should not get fast tapping
806         https://bugs.webkit.org/show_bug.cgi?id=153465
807         <rdar://problem/23962529>
808
809         Reviewed by Simon Fraser (and Wenson Hseih).
810
811         As the title says, documents that do not set a viewport should
812         not get the fast click behaviour. There were complaints that we broke
813         double-tap to scroll in ImageDocuments where the image was narrow and long.
814
815         The fix is to just keep a flag that tells the UI process if the
816         width was explicit. However, it turns out that those ImageDocuments
817         are given an explicit device-width, which is fine for scaling but
818         really should behave as auto for fast tapping. So we also need
819         to tell the UIProcess if the viewport arguments came from an
820         ImageDocument.
821
822         * Shared/mac/RemoteLayerTreeTransaction.h: Add two new flags into
823         the transaction.
824         (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidthWasExplicit):
825         (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidthWasExplicit):
826         (WebKit::RemoteLayerTreeTransaction::viewportMetaTagCameFromImageDocument):
827         (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagCameFromImageDocument):
828         * Shared/mac/RemoteLayerTreeTransaction.mm:
829         (WebKit::RemoteLayerTreeTransaction::encode):
830         (WebKit::RemoteLayerTreeTransaction::decode):
831         (WebKit::RemoteLayerTreeTransaction::description):
832
833         * UIProcess/API/Cocoa/WKWebView.mm:
834         (-[WKWebView _didCommitLayerTree:]): Notice whether or not the viewport
835         width was explicit.
836         (-[WKWebView _allowsDoubleTapGestures]): Return yes if the width
837         was not explicit, or if the viewport came from an ImageDocument.
838         * WebProcess/WebPage/WebPage.cpp:
839         (WebKit::WebPage::willCommitLayerTree):
840
841 2016-01-26  Tim Horton  <timothy_horton@apple.com>
842
843         REGRESSION (r194557): Keyboard shortcuts stop working after the WKWebView is unparented and reparented
844         https://bugs.webkit.org/show_bug.cgi?id=153492
845         <rdar://problem/24138989>
846
847         Reviewed by Dan Bernstein.
848
849         * UIProcess/ios/WKContentViewInteraction.h:
850         * UIProcess/ios/WKContentViewInteraction.mm:
851         (-[WKContentView canBecomeFirstResponder]):
852         (-[WKContentView becomeFirstResponder]):
853         (-[WKContentView resignFirstResponder]):
854         When WKWebView is unparented, WKContentView will attempt to resignFirstResponder upwards,
855         first asking WKWebView. After r194557, WKWebView will accept first responder and forward
856         it on to the WKContentView, which will happily accept it again, despite being the view
857         that's trying to resign. This will cause us to completely lose first responder,
858         where it was actually supposed to propagate up above WKWebView to the client.
859
860         Keep track of when WKContentView is resigning first responder, and don't
861         let it become first responder while it is doing so, breaking the cycle.
862
863 2016-01-25  Ada Chan  <adachan@apple.com>
864
865         Move WebVideoFullscreenManager and related classes from iOS specific folders to cocoa folders
866         https://bugs.webkit.org/show_bug.cgi?id=153473
867
868         Reviewed by Eric Carlson.
869
870         * DerivedSources.make:
871         Add new paths.
872         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h.
873         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in.
874         * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm.
875         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
876         Fix a style error by moving the opening curly brace to the same line as the for statement.
877         * WebKit2.xcodeproj/project.pbxproj:
878         Update due to changes to the file locations.
879         * WebProcess/cocoa/WebVideoFullscreenManager.h: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h.
880         * WebProcess/cocoa/WebVideoFullscreenManager.messages.in: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.messages.in.
881         * WebProcess/cocoa/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm.
882         (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
883         Fix a style error by adding a missing space after a comma.
884
885 2016-01-26  Daniel Bates  <dabates@apple.com>
886
887         WebKitTestRunner: Credential cache is not cleared between tests
888         https://bugs.webkit.org/show_bug.cgi?id=153407
889         <rdar://problem/24280834>
890
891         Reviewed by Alexey Proskuryakov.
892
893         Expose SPI to call CredentialStorage::clearCredentials() on the default network storage
894         session to clear cached credentials.
895
896         * NetworkProcess/NetworkProcess.cpp:
897         (WebKit::NetworkProcess::clearCachedCredentials): Added.
898         * NetworkProcess/NetworkProcess.h:
899         * NetworkProcess/NetworkProcess.messages.in: Added message ClearCachedCredentials().
900         * UIProcess/API/C/WKContext.cpp:
901         (WKContextClearCachedCredentials): Added.
902         * UIProcess/API/C/WKContextPrivate.h:
903         * UIProcess/WebProcessPool.cpp:
904         (WebKit::WebProcessPool::clearCachedCredentials): Notify all web processes and the
905         network process to clear cached credentials.
906         * UIProcess/WebProcessPool.h:
907         * WebProcess/WebProcess.cpp:
908         (WebKit::WebProcess::clearCachedCredentials): Clear cached credentials in the default
909         network storage session.
910         * WebProcess/WebProcess.h:
911         * WebProcess/WebProcess.messages.in: Added message ClearCachedCredentials().
912
913 2016-01-26  Mario Sanchez Prada  <mario@endlessm.com>
914
915         [GTK] WebProcess crashes when quickly attempting many DnD operations
916         https://bugs.webkit.org/show_bug.cgi?id=138468
917
918         Reviewed by Michael Catanzaro.
919
920         Do not allow different DnD operations over the same element at the
921         same time, so that any new attempt to DnD an element happening before
922         a previous attempt has ended will take precedence, cancelling the older
923         operation before going ahead with the new one.
924
925         This is consistent with how WebCore::EventHandler handles DnD operations,
926         preventing the web process from crashing in scenarios where the user might
927         try to perform many DnD operations over the same element very quickly.
928
929         * UIProcess/gtk/DragAndDropHandler.cpp:
930         (WebKit::DragAndDropHandler::DragAndDropHandler): Initialized new member.
931         (WebKit::DragAndDropHandler::startDrag): Ensure a previous DnD operation
932         is cancelled before handling the new one that has just started.
933         (WebKit::DragAndDropHandler::fillDragData): Protect against calling this
934         function from webkitWebViewBaseDragDataGet for already cancelled operations.
935         (WebKit::DragAndDropHandler::finishDrag): Protect against calling this
936         function from webkitWebViewBaseDragEnd for already cancelled operations.
937         * UIProcess/gtk/DragAndDropHandler.h:
938
939 2016-01-25  Enrica Casucci  <enrica@apple.com>
940
941         Add support for DataDetectors in WK (iOS).
942         https://bugs.webkit.org/show_bug.cgi?id=152989
943         rdar://problem/22855960
944
945         Reviewed by Tim Horton.
946
947         Moving InteractionInformationAtPosition files to platform folder,
948         since this is only used on iOS and changing from .cpp to .mm.
949         The structure is extended to include data detection specific fields
950         and the relevant encode/decode functions have been updated to
951         handle the new fields.
952         The patch also adds a new WKUIDelegatePrivate method to allow
953         the client to provide additional context for data detection actions.
954
955         * Platform/spi/ios/UIKitSPI.h:
956         * Shared/InteractionInformationAtPosition.cpp: Removed.
957         * Shared/InteractionInformationAtPosition.h: Removed.
958         * Shared/ios/InteractionInformationAtPosition.h: Copied from Shared/InteractionInformationAtPosition.h.
959         * Shared/ios/InteractionInformationAtPosition.mm: Copied from Shared/InteractionInformationAtPosition.cpp.
960         (WebKit::InteractionInformationAtPosition::encode):
961         (WebKit::InteractionInformationAtPosition::decode):
962         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
963         * UIProcess/WebPageProxy.h:
964         * UIProcess/ios/WKActionSheetAssistant.h:
965         * UIProcess/ios/WKActionSheetAssistant.mm:
966         (-[WKActionSheetAssistant showDataDetectorsSheet]):
967         * UIProcess/ios/WKContentViewInteraction.mm:
968         (-[WKContentView actionSheetAssistantDidStopInteraction:]):
969         (-[WKContentView dataDetectionContextForActionSheetAssistant:]):
970         (-[WKContentView selectedTextForActionSheetAssistant:]):
971         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
972         * UIProcess/ios/WebPageProxyIOS.mm:
973         * WebKit2.xcodeproj/project.pbxproj:
974         * WebProcess/WebPage/ios/WebPageIOS.mm:
975         (WebKit::WebPage::getPositionInformation):
976
977 2016-01-25  Commit Queue  <commit-queue@webkit.org>
978
979         Unreviewed, rolling out r195543.
980         https://bugs.webkit.org/show_bug.cgi?id=153451
981
982         regressed performance of test bots by ~6% (Requested by dydz
983         on #webkit).
984
985         Reverted changeset:
986
987         "WebKitTestRunner: Credential cache is not cleared between
988         tests"
989         https://bugs.webkit.org/show_bug.cgi?id=153407
990         http://trac.webkit.org/changeset/195543
991
992 2016-01-25  Chris Dumez  <cdumez@apple.com>
993
994         [WK2][NetworkCache] Enable speculative revalidation
995         https://bugs.webkit.org/show_bug.cgi?id=153443
996         <rdar://problem/23092196>
997
998         Reviewed by Antti Koivisto.
999
1000         Enable speculative revalidation to better evaluate performance and
1001         robustness.
1002
1003         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1004         (WebKit::registerUserDefaultsIfNeeded):
1005
1006 2016-01-25  Beth Dakin  <bdakin@apple.com>
1007
1008         Handle soft spaces after accepted candidates
1009         https://bugs.webkit.org/show_bug.cgi?id=153331
1010         -and corresponding-
1011         rdar://problem/23958418
1012
1013         Reviewed by Darin Adler.
1014
1015         New member variable m_softSpaceRange keeps track to the NSRange of a soft 
1016         space if the last text that was inserted has a soft space at the end.
1017         * UIProcess/Cocoa/WebViewImpl.h:
1018         * UIProcess/Cocoa/WebViewImpl.mm:
1019         (WebKit::WebViewImpl::WebViewImpl):
1020
1021         The space at the end of candidates is a soft space. If that space exists, 
1022         cache the range of the space in m_softSpaceRange.
1023         (WebKit::WebViewImpl::handleAcceptedCandidate):
1024
1025         When new text is inserted, find out if it is being inserted right after a 
1026         soft space. If it is, then [NSSpellChecker deletesAutospaceBeforeString] will 
1027         tell us if the space needs to be removed. If that is the case, then set the 
1028         replacementString to the soft space.
1029         (WebKit::WebViewImpl::insertText):
1030
1031 2016-01-25  Daniel Bates  <dabates@apple.com>
1032
1033         WebKitTestRunner: Credential cache is not cleared between tests
1034         https://bugs.webkit.org/show_bug.cgi?id=153407
1035         <rdar://problem/24280834>
1036
1037         Reviewed by Brady Eidson.
1038
1039         Add SPI to call NetworkStorageSession::switchToNewTestingSession() to create a new testing session.
1040         The new testing session will have an empty credential cache.
1041
1042         * NetworkProcess/NetworkProcess.cpp:
1043         (WebKit::NetworkProcess::switchToNewTestingSession): Added.
1044         * NetworkProcess/NetworkProcess.h:
1045         * NetworkProcess/NetworkProcess.messages.in: Added message SwitchToNewTestingSession().
1046         * UIProcess/API/C/WKContext.cpp:
1047         (WKContextResetTestingNetworkSession): Added.
1048         * UIProcess/API/C/WKContextPrivate.h:
1049         * UIProcess/WebProcessPool.cpp:
1050         (WebKit::WebProcessPool::resetTestingNetworkSession): Added.
1051         * UIProcess/WebProcessPool.h:
1052         * WebProcess/WebProcess.cpp:
1053         (WebKit::WebProcess::switchToNewTestingSession): Added.
1054         * WebProcess/WebProcess.h:
1055         * WebProcess/WebProcess.messages.in: Added message SwitchToNewTestingSession().
1056
1057 2016-01-22  Ryosuke Niwa  <rniwa@webkit.org>
1058
1059         document.createElement should be able to create a custom element
1060         https://bugs.webkit.org/show_bug.cgi?id=153173
1061
1062         Reviewed by Darin Adler.
1063
1064         Use createElementForBindings here since this is for SPI.
1065
1066         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
1067         (-[WKDOMDocument createElement:]):
1068         (-[WKDOMDocument createTextNode:]):
1069
1070 2016-01-24  Alex Christensen  <achristensen@webkit.org>
1071
1072         Report upload progress to NetworkLoadClient when using NetworkSession
1073         https://bugs.webkit.org/show_bug.cgi?id=153388
1074
1075         Reviewed by Darin Adler.
1076
1077         This fixes http/tests/xmlhttprequest/upload-onload-event.html and a few other tests.
1078
1079         * NetworkProcess/NetworkLoad.cpp:
1080         (WebKit::NetworkLoad::didBecomeDownload):
1081         (WebKit::NetworkLoad::didSendData):
1082         (WebKit::NetworkLoad::didReceiveResponseAsync):
1083         * NetworkProcess/NetworkLoad.h:
1084         * NetworkProcess/NetworkSession.h:
1085         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
1086         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1087         (-[WKNetworkSessionDelegate initWithNetworkSession:]):
1088         (-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
1089         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1090
1091 2016-01-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1092
1093         Reduce PassRefPtr uses in dom - 4
1094         https://bugs.webkit.org/show_bug.cgi?id=153270
1095
1096         Reviewed by Darin Adler.
1097
1098         As a step to remove PassRefPtr uses, this patch reduces the uses in WebCore/dom.
1099
1100         * WebProcess/Plugins/PluginView.cpp:
1101         (WebKit::PluginView::focusPluginElement):
1102
1103 2016-01-23  Alex Christensen  <achristensen@webkit.org>
1104
1105         CMake build fix after r195494.
1106
1107         * PlatformMac.cmake:
1108         WebKit2 needs to be able to find DataDetectors.h.
1109
1110 2016-01-23  Alex Christensen  <achristensen@webkit.org>
1111
1112         Use credentials from a URL with NetworkSession like we did with ResourceHandle
1113         https://bugs.webkit.org/show_bug.cgi?id=153328
1114
1115         Reviewed by Alexey Proskuryakov.
1116
1117         * NetworkProcess/NetworkLoad.cpp:
1118         (WebKit::NetworkLoad::NetworkLoad):
1119         createDataTaskWithRequest is being removed, so use std::make_unique<NetworkDataTask> directly instead.
1120         Also, create the task even if we are deferring loading.  Don't call resume if we are deferring loading.
1121         * NetworkProcess/NetworkSession.h:
1122         Callbacks are not just used in NetworkSessionTaskClient, so declare them outside.
1123         The NetworkDataTask now takes a ResourceRequest so we can strip its credentials.
1124         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1125         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1126         Try credentials stored with the NetworkDataTask before asking the client for credentials.
1127         (WebKit::NetworkSession::~NetworkSession):
1128         (WebKit::NetworkSession::dataTaskForIdentifier):
1129         (WebKit::NetworkSession::takeDownloadID):
1130         (WebKit::NetworkDataTask::NetworkDataTask):
1131         Strip the credentials from the url before creating the task because we do not know the authentication type.
1132         We will use these credentials when a challenge is received.
1133         (WebKit::NetworkDataTask::~NetworkDataTask):
1134         (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
1135         If we have credentials from the initial URL, try using them if it is appropriate.
1136         (WebKit::NetworkDataTask::cancel):
1137         (WebKit::NetworkSession::createDataTaskWithRequest): Deleted.
1138         * Shared/Authentication/AuthenticationManager.h:
1139
1140 2016-01-22  Dan Bernstein  <mitz@apple.com>
1141
1142         <rdar://problem/24304228> REGRESSION (r184215): Staged XPC services load non-staged shims
1143         https://bugs.webkit.org/show_bug.cgi?id=153389
1144
1145         Reviewed by Alexey Proskuryakov.
1146
1147         * Configurations/Shim.xcconfig: Don’t override the install name when using a staged install path.
1148
1149 2016-01-22  Enrica Casucci  <enrica@apple.com>
1150
1151         Add support for DataDetectors in WK (iOS).
1152         https://bugs.webkit.org/show_bug.cgi?id=152989
1153         rdar://problem/22855960
1154
1155         Reviewed by Tim Horton.
1156
1157         * UIProcess/API/Cocoa/WKWebView.mm:
1158         (fromWKDataDetectorTypes): Changed parameter to uint64_t to
1159         successfully compare against WKDataDetectorTypeAll.
1160
1161 2016-01-17  Ada Chan  <adachan@apple.com>
1162
1163         Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
1164         https://bugs.webkit.org/show_bug.cgi?id=153220
1165
1166         Reviewed by Eric Carlson.
1167
1168         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1169         (WebKit::WebChromeClient::supportsVideoFullscreen):
1170         * WebProcess/WebCoreSupport/WebChromeClient.h:
1171
1172 2016-01-22  Tim Horton  <timothy_horton@apple.com>
1173
1174         Reproducible "Unhanded web process message 'WebUserContentController:AddUserScripts'" and friends
1175         https://bugs.webkit.org/show_bug.cgi?id=153193
1176         <rdar://problem/24222034>
1177
1178         Reviewed by Darin Adler.
1179
1180         The WebPageProxy constructor assumes that if its WebProcess is already running,
1181         it can add itself to the existing WebUserContentController(Proxy) and all will be well.
1182
1183         However, if the API client constructs a different WKUserContentController for two views,
1184         and forces them both into the same process, WebPageProxy's constructor sends a message
1185         with a WebUserContentController ID that doesn't exist yet on the WebProcess side
1186         (because createWebPage, which usually brings it up, hasn't happened yet), and we 
1187         drop the message on the floor (and get the aforementioned logging).
1188
1189         * UIProcess/WebPageProxy.cpp:
1190         (WebKit::WebPageProxy::WebPageProxy):
1191         (WebKit::WebPageProxy::initializeWebPageAfterProcessLaunch):
1192         Instead of connecting our WebUserContentControllerProxy and WebVisitedLinkStoreProxy
1193         to our WebProcessProxy in the constructor, when doing so might send messages
1194         to the WebProcess that arrive before their corresponding WebProcess objects have
1195         been created, do this in initializeWebPageAfterProcessLaunch, which always runs
1196         during-or-after inititalizeWebPage (and always after the CreateWebPage message goes out).
1197
1198         (WebKit::WebPageProxy::initializeWebPage):
1199         Mark us as needing initializeWebPageAfterProcessLaunch run, and run it right now
1200         if the WebProcess is already up.
1201         (WebKit::WebPageProxy::processDidFinishLaunching):
1202         If the WebProcess wasn't up at the end of initializeWebPage, we'll eventually end up here
1203         after it is launched, and will initializeWebPageAfterProcessLaunch.
1204
1205         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1206         If the WebProcess dies, we don't want to initializeWebPageAfterProcessLaunch
1207         until after initializeWebPage runs again, so make sure the flag isn't set.
1208
1209         * UIProcess/WebPageProxy.h:
1210
1211 2016-01-22  Darin Adler  <darin@apple.com>
1212
1213         Reduce use of equalIgnoringCase to just ignore ASCII case
1214         https://bugs.webkit.org/show_bug.cgi?id=153266
1215
1216         Reviewed by Ryosuke Niwa.
1217
1218         * UIProcess/PageLoadState.cpp:
1219         (WebKit::PageLoadState::hasOnlySecureContent): Use the protocolIs
1220         function from WebCore instead of calling startsWith.
1221         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1222         (WebKit::NetscapePlugin::initialize): Use equalLettersIgnoringASCIICase.
1223
1224 2016-01-21  Brent Fulgham  <bfulgham@apple.com>
1225
1226         [Mac] Tooltips do not honor some types of obscuring windows
1227         https://bugs.webkit.org/show_bug.cgi?id=153263
1228         <rdar://problem/21423972>
1229
1230         Reviewed by Simon Fraser.
1231
1232         Recognize that the current WebView is obscured by comparing the current event's Window Number against
1233         the Window Number of the current WebView. If they don't match, something is in the way.
1234
1235         * UIProcess/Cocoa/WebViewImpl.h:
1236         * UIProcess/Cocoa/WebViewImpl.mm:
1237         (WebKit::WebViewImpl::windowIsFrontWindowUnderMouse): Added.
1238         * UIProcess/PageClient.h:
1239         (WebKit::PageClient::windowIsFrontWindowUnderMouse):
1240         * UIProcess/WebPageProxy.cpp:
1241         (WebKit::WebPageProxy::handleMouseEvent): Check if the current WebView is obscured. If it
1242         is, clear the tooltip and return.
1243         * UIProcess/mac/PageClientImpl.h:
1244         * UIProcess/mac/PageClientImpl.mm:
1245         (WebKit::PageClientImpl::windowIsFrontWindowUnderMouse): Added.
1246
1247 2016-01-22  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1248
1249         Remove PassRefPtr from ResourceRequest and FormData
1250         https://bugs.webkit.org/show_bug.cgi?id=153229
1251
1252         Reviewed by Chris Dumez.
1253
1254         * NetworkProcess/NetworkResourceLoadParameters.cpp:
1255         (WebKit::NetworkResourceLoadParameters::decode):
1256         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1257         (WebKit::NetworkCache::Entry::Entry):
1258
1259 2016-01-21  Simon Fraser  <simon.fraser@apple.com>
1260
1261         REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top
1262         https://bugs.webkit.org/show_bug.cgi?id=136019
1263
1264         Reviewed by Dan Bernstein.
1265
1266         Now call frameView.positionForRootContentLayer(), and add a FIXME questioning the
1267         behavior in horizontal b-t documents. However, this code isn't hit now that we always
1268         do extended backgrounds, so never have shadow layers.
1269
1270         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1271         (WebKit::shadowLayerPositionForFrame):
1272
1273 2016-01-21  Dean Jackson  <dino@apple.com>
1274
1275         Move _allowsDoubleTapGestures implementation out of category
1276         https://bugs.webkit.org/show_bug.cgi?id=153329
1277         <rdar://problem/24289768>
1278
1279         Reviewed by Simon Fraser.
1280
1281         We were generating a linker warning because the implementation
1282         was located inside the WKPrivate category.
1283
1284         * UIProcess/API/Cocoa/WKWebView.mm:
1285         (-[WKWebView _allowsDoubleTapGestures]): Move this out of
1286         the category.
1287
1288 2016-01-21  Dean Jackson  <dino@apple.com>
1289
1290         [iOS] Crash in _endPotentialTapAndEnableDoubleTapGesturesIfNecessary
1291         https://bugs.webkit.org/show_bug.cgi?id=153326
1292         <rdar://problem/24264339>
1293
1294         Reviewed by Anders Carlsson.
1295
1296         UIKit's UIGestureRecognizer could call back into the WKContentView
1297         after the associated WKWebView has disappeared. The fix is to
1298         explicitly null the WKWebView reference as we deallocate.
1299
1300         * UIProcess/API/Cocoa/WKWebView.mm:
1301         (-[WKWebView dealloc]): Tell the WKContentView we are going away.
1302         * UIProcess/ios/WKContentView.h:
1303         * UIProcess/ios/WKContentView.mm:
1304         (-[WKContentView _webViewDestroyed]):
1305         * UIProcess/ios/WKContentViewInteraction.mm:
1306         (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
1307         Only do something if the WKWebView is still around.
1308
1309 2016-01-21  Beth Dakin  <bdakin@apple.com>
1310
1311         Add the ability to update WebKitAdditions to WK2
1312         https://bugs.webkit.org/show_bug.cgi?id=153320
1313         -and corresponding-
1314         rdar://problem/23639629
1315
1316         Reviewed by Anders Carlsson.
1317
1318         * UIProcess/API/Cocoa/WKWebView.mm:
1319         * UIProcess/API/mac/WKView.mm:
1320         * UIProcess/Cocoa/WebViewImpl.h:
1321         (WebKit::WebViewImpl::createWeakPtr):
1322         * UIProcess/Cocoa/WebViewImpl.mm:
1323         (WebKit::WebViewImpl::updateWebViewImplAdditions):
1324         (WebKit::WebViewImpl::showCandidates):
1325         (WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
1326         (WebKit::trackingAreaOptions):
1327         (WebKit::WebViewImpl::~WebViewImpl):
1328         (WebKit::WebViewImpl::becomeFirstResponder):
1329         (WebKit::WebViewImpl::selectionDidChange):
1330         (WebKit::WebViewImpl::handleRequestedCandidates):
1331         (WebKit::textCheckingResultFromNSTextCheckingResult):
1332
1333 2016-01-19  Ada Chan  <adachan@apple.com>
1334
1335         Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
1336         https://bugs.webkit.org/show_bug.cgi?id=153218
1337
1338         Reviewed by Eric Carlson.
1339
1340         * Configurations/FeatureDefines.xcconfig:
1341
1342 2016-01-20  Alex Christensen  <achristensen@webkit.org>
1343
1344         Fix CMake build after r195300.
1345
1346         * PlatformMac.cmake:
1347         Include editing/mac to find DataDetection.h.
1348
1349 2016-01-20  Alex Christensen  <achristensen@webkit.org>
1350
1351         Ask UI Process before sending redirect requests when downloading
1352         https://bugs.webkit.org/show_bug.cgi?id=153041
1353
1354         Reviewed by Darin Adler.
1355
1356         * NetworkProcess/Downloads/DownloadManager.cpp:
1357         (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
1358         (WebKit::DownloadManager::continueWillSendRequest):
1359         (WebKit::DownloadManager::convertHandleToDownload):
1360         * NetworkProcess/Downloads/DownloadManager.h:
1361         * NetworkProcess/Downloads/PendingDownload.cpp:
1362         (WebKit::PendingDownload::willSendRedirectedRequest):
1363         (WebKit::PendingDownload::continueWillSendRequest):
1364         * NetworkProcess/NetworkProcess.cpp:
1365         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
1366         (WebKit::NetworkProcess::continueWillSendRequest):
1367         (WebKit::NetworkProcess::setCacheModel):
1368         * NetworkProcess/NetworkProcess.h:
1369         * NetworkProcess/NetworkProcess.messages.in:
1370         * UIProcess/API/APIDownloadClient.h:
1371         (API::DownloadClient::didCancel):
1372         (API::DownloadClient::processDidCrash):
1373         (API::DownloadClient::canAuthenticateAgainstProtectionSpace):
1374         (API::DownloadClient::willSendRequest):
1375         * UIProcess/Downloads/DownloadProxy.cpp:
1376         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
1377         (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
1378         (WebKit::DownloadProxy::willSendRequest):
1379         (WebKit::DownloadProxy::didReceiveResponse):
1380         * UIProcess/Downloads/DownloadProxy.h:
1381         * UIProcess/Downloads/DownloadProxy.messages.in:
1382
1383 2016-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1384
1385         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.4 release.
1386
1387         * gtk/NEWS: Add release notes for 2.11.4.
1388
1389 2016-01-19  Enrica Casucci  <enrica@apple.com>
1390
1391         Add support for DataDetectors in WK (iOS).
1392         https://bugs.webkit.org/show_bug.cgi?id=152989
1393         rdar://problem/22855960
1394
1395         Reviewed by Tim Horton.
1396
1397         This is the first step toward implementing Data Detectors support
1398         in WK2. The patch adds a new property to the configuration
1399         object to indicate the type of detection desired and propagates
1400         to the WebProcess.
1401
1402         * Configurations/FeatureDefines.xcconfig:
1403         * Shared/WebPreferencesDefinitions.h:
1404         * UIProcess/API/Cocoa/WKWebView.mm:
1405         (fromWKDataDetectorTypes):
1406         (-[WKWebView initWithFrame:configuration:]):
1407         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1408         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1409         (-[WKWebViewConfiguration copyWithZone:]):
1410         * WebProcess/WebPage/WebPage.cpp:
1411         (WebKit::WebPage::updatePreferences):
1412
1413 2016-01-19  Commit Queue  <commit-queue@webkit.org>
1414
1415         Unreviewed, rolling out r195300.
1416         https://bugs.webkit.org/show_bug.cgi?id=153244
1417
1418         enrica wants more time to fix Windows (Requested by thorton on
1419         #webkit).
1420
1421         Reverted changeset:
1422
1423         "Add support for DataDetectors in WK (iOS)."
1424         https://bugs.webkit.org/show_bug.cgi?id=152989
1425         http://trac.webkit.org/changeset/195300
1426
1427 2016-01-19  Enrica Casucci  <enrica@apple.com>
1428
1429         Add support for DataDetectors in WK (iOS).
1430         https://bugs.webkit.org/show_bug.cgi?id=152989
1431         rdar://problem/22855960
1432
1433         Reviewed by Tim Horton.
1434
1435         This is the first step toward implementing Data Detectors support
1436         in WK2. The patch adds a new property to the configuration
1437         object to indicate the type of detection desired and propagates
1438         to the WebProcess.
1439
1440         * Configurations/FeatureDefines.xcconfig:
1441         * Shared/WebPreferencesDefinitions.h:
1442         * UIProcess/API/Cocoa/WKWebView.mm:
1443         (-[WKWebView initWithFrame:configuration:]):
1444         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1445         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1446         (-[WKWebViewConfiguration copyWithZone:]):
1447         * WebKit2.xcodeproj/project.pbxproj:
1448         * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: Added.
1449         (WebKit::WebPage::fromWKDataDetectorTypes):
1450         * WebProcess/WebPage/WebPage.cpp:
1451         (WebKit::WebPage::updatePreferences):
1452         * WebProcess/WebPage/WebPage.h:
1453
1454 2016-01-19  Commit Queue  <commit-queue@webkit.org>
1455
1456         Unreviewed, rolling out r187471.
1457         https://bugs.webkit.org/show_bug.cgi?id=153236
1458
1459         purportedly caused a significant memory regression and want to
1460         see if that is true (Requested by thorton on #webkit).
1461
1462         Reverted changeset:
1463
1464         "First in-window viewStateChange synchronously blocks despite
1465         not previously being in-window"
1466         https://bugs.webkit.org/show_bug.cgi?id=147344
1467         http://trac.webkit.org/changeset/187471
1468
1469 2016-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1470
1471         [GTK] Runtime critical warnings when loading a URL after a session restore
1472         https://bugs.webkit.org/show_bug.cgi?id=153233
1473
1474         Reviewed by Michael Catanzaro.
1475
1476         This happens when doing a normal load after restoring the back
1477         forward list from session state and the list contained forward
1478         items. In that case the forward items are removed from the list
1479         and we try to reference a WebBackForwardListItem wrapper that
1480         hasn't been created. We create the wrappers on demand, and when
1481         the back forward list is populated from session state, items are
1482         added to the list without creating their wrappers. That was not
1483         possible before, and that's why we assumed that any item that is
1484         removed from the list should have a wrapper already created.
1485
1486         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1487         (webkitBackForwardListChanged): If we don't have a wrapper for the
1488         removed item, create a new one to be passed to the signal, but
1489         without adding it to the map.
1490
1491 2016-01-19  Ryosuke Niwa  <rniwa@webkit.org>
1492
1493         CharacterData::setData doesn't need ExceptionCode as an out argument
1494         https://bugs.webkit.org/show_bug.cgi?id=153225
1495
1496         Reviewed by Antti Koivisto.
1497
1498         * WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
1499         (-[WKDOMText setData:]):
1500
1501 2016-01-18  Ryuan Choi  <ryuan.choi@navercorp.com>
1502
1503         [EFL] Remove wkView() from EwkView
1504         https://bugs.webkit.org/show_bug.cgi?id=152604
1505
1506         Reviewed by Gyuyoung Kim.
1507
1508         * UIProcess/API/efl/EwkView.cpp:
1509         (EwkViewEventHandler<EVAS_CALLBACK_SHOW>::handleEvent):
1510         (EwkViewEventHandler<EVAS_CALLBACK_HIDE>::handleEvent):
1511         (EwkView::EwkView):
1512         (EwkView::create):
1513         (EwkView::wkPage):
1514         (EwkView::isVisible):
1515         (EwkView::setVisible):
1516         (EwkView::setDeviceScaleFactor):
1517         (EwkView::deviceSize):
1518         (EwkView::displayTimerFired):
1519         (EwkView::setViewportPosition):
1520         (EwkView::requestExitFullScreen):
1521         (EwkView::contentsSize):
1522         (EwkView::setThemePath):
1523         (EwkView::feedTouchEvent):
1524         (EwkView::createGLSurface):
1525         (EwkView::showContextMenu):
1526         (EwkView::requestPopupMenu):
1527         (EwkView::webView):
1528         (EwkView::handleEvasObjectCalculate):
1529         (EwkView::handleEvasObjectColorSet):
1530         (EwkView::handleEwkViewFocusIn):
1531         (EwkView::handleEwkViewFocusOut):
1532         (EwkView::feedTouchEvents):
1533         (EwkView::takeSnapshot):
1534         (EwkView::scrollBy):
1535         (EwkView::setBackgroundColor):
1536         (EwkView::backgroundColor):
1537         * UIProcess/API/efl/EwkView.h:
1538         (EwkView::wkView): Deleted.
1539         * UIProcess/API/efl/GestureRecognizer.cpp:
1540         (WebKit::GestureHandler::handleSingleTap):
1541         * UIProcess/API/efl/ewk_view.cpp:
1542         (EWKViewCreate):
1543         (EWKViewGetWKView):
1544         (ewk_view_fullscreen_exit):
1545         (ewk_view_layout_fixed_set):
1546         (ewk_view_layout_fixed_get):
1547         (ewk_view_layout_fixed_size_set):
1548         (ewk_view_layout_fixed_size_get):
1549         (ewk_view_bg_color_get):
1550         (ewk_view_contents_size_get):
1551         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1552         (WebKit::PageViewportControllerClientEfl::setPageScaleFactor):
1553         * UIProcess/efl/ViewClientEfl.cpp:
1554         (WebKit::ViewClientEfl::webProcessDidRelaunch):
1555         (WebKit::ViewClientEfl::ViewClientEfl):
1556         (WebKit::ViewClientEfl::~ViewClientEfl):
1557
1558 2016-01-18  Zan Dobersek  <zdobersek@igalia.com>
1559
1560         Sink the Vector<uint8_t> buffer into the SerializedScriptValue constructor
1561         https://bugs.webkit.org/show_bug.cgi?id=142634
1562
1563         Reviewed by Darin Adler.
1564
1565         Update API::SerializedScriptValue::adopt() to take in a Vector<uint8_t>
1566         rvalue, moving it into the WebCore::SerializedScriptValue::adopt() call.
1567
1568         Update other places that are affected by the SerializedScriptValue changes.
1569
1570         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1571         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
1572         * Shared/API/APISerializedScriptValue.h:
1573         (API::SerializedScriptValue::adopt):
1574         * Shared/UserData.cpp:
1575         (WebKit::UserData::decode):
1576         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1577         (WebKit::WebUserContentControllerProxy::didPostMessage):
1578         * UIProcess/WebPageProxy.cpp:
1579         (WebKit::WebPageProxy::scriptValueCallback):
1580         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1581         (WebKit::applyFrameState):
1582
1583 2016-01-18  Olivier Blin  <olivier.blin@softathome.com>
1584
1585         [EFL][GTK][WK2] Fix UIProcess build with GStreamer and without VIDEO
1586         https://bugs.webkit.org/show_bug.cgi?id=153135
1587
1588         Reviewed by Michael Catanzaro.
1589
1590         GStreamer builds fail when WebAudio is enabled but VIDEO disabled.
1591
1592         This change makes the flag more consistent around the
1593         decicePolicyForInstallMissingMediaPluginsPermissionRequest() method:
1594         ENABLE(VIDEO) && USE(GSTREAMER) everywhere, while the code used to
1595         test either one or the other.
1596
1597         This does not enable InstallMissingMediaPlugins for WebAudio, since no
1598         code makes use of this in WebKitWebAudioSourceGStreamer.
1599
1600         It also fixes a naming typo for the following method:
1601         decidePolicyForInstallMissingMediaPluginsPermissionRequest()
1602
1603         * UIProcess/API/gtk/PageClientImpl.cpp:
1604         (WebKit::PageClientImpl::decidePolicyForInstallMissingMediaPluginsPermissionRequest):
1605         * UIProcess/API/gtk/PageClientImpl.h:
1606         * UIProcess/PageClient.h:
1607         * UIProcess/efl/WebViewEfl.h:
1608         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
1609         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
1610
1611 2016-01-17  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>
1612
1613         Add quotes around ${CMAKE_SHARED_LINKER_FLAGS} in case it is unset
1614         https://bugs.webkit.org/show_bug.cgi?id=153175
1615
1616         Reviewed by Michael Catanzaro.
1617
1618         * PlatformGTK.cmake:
1619
1620 2016-01-16  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>
1621
1622         Remove a now-irrelevant darwin build hack
1623         https://bugs.webkit.org/show_bug.cgi?id=153117
1624
1625         Reviewed by Michael Catanzaro.
1626
1627         * PlatformGTK.cmake:
1628
1629 2016-01-16  Jon Honeycutt  <jhoneycutt@apple.com>
1630
1631         [iOS] Replace deprecated -[UIDocumentMenuViewController
1632         _setIgnoreApplicationEntitlementForImport:]
1633
1634         <https://bugs.webkit.org/show_bug.cgi?id=145690>
1635         <rdar://problem/20636577>
1636
1637         Reviewed by Brent Fulgham.
1638
1639         * Platform/spi/ios/UIKitSPI.h:
1640         Replace deprecated SPI with newer SPI.
1641
1642         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1643         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
1644         (-[WKFileUploadPanel _showDocumentPickerMenu]):
1645         Ditto.
1646
1647 2016-01-16  Michael Catanzaro  <mcatanzaro@igalia.com>
1648
1649         [GTK] Unreviewed. Fix a typo in an API comment.
1650
1651         * UIProcess/API/gtk/WebKitWebViewSessionState.cpp:
1652
1653 2016-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1654
1655         [GTK] GVariant runtime critical errors when encoding session data
1656         https://bugs.webkit.org/show_bug.cgi?id=153130
1657
1658         Reviewed by Michael Catanzaro.
1659
1660         It happens when the FrameState has children, because the recursive
1661         serialization is wrong. Also fix serialization of
1662         documentSequenceNumber and itemSequenceNumber that are gint64, not
1663         guint64.
1664
1665         * UIProcess/API/gtk/WebKitWebViewSessionState.cpp:
1666         (encodeFrameState): Let the caller open/init the given
1667         builder. Use a new builder to encode child states recursively.
1668         (encodePageState): Do the builder open/close for the FrameState encoding.
1669         (decodeFrameState): Get the variant of every child.
1670
1671 2016-01-15  Michael Catanzaro  <mcatanzaro@igalia.com>
1672
1673         Fix internal Windows build
1674         https://bugs.webkit.org/show_bug.cgi?id=153142
1675
1676         Unreviewed addition to Alex's JSC patch, which was reviewed by Brent Fulgham. Pass
1677         -I${JAVASCRIPTCORE_DIR} to g-ir-scanner.
1678
1679         * PlatformGTK.cmake:
1680
1681 2016-01-14  Simon Fraser  <simon.fraser@apple.com>
1682
1683         Remove workaround for rdar://problem/23623670
1684         https://bugs.webkit.org/show_bug.cgi?id=153107
1685         rdar://problem/23633319
1686
1687         Reviewed by Tim Horton.
1688
1689         Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
1690         back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.
1691
1692         * Shared/mac/RemoteLayerBackingStore.mm:
1693         (WebKit::RemoteLayerBackingStore::display):
1694
1695 2016-01-14  Beth Dakin  <bdakin@apple.com>
1696
1697         WK1 and WK2 should share more candidate request code
1698         https://bugs.webkit.org/show_bug.cgi?id=153108
1699
1700         Reviewed by Simon Fraser.
1701
1702         requestCandidatesForSelection() does not need to be exposed as an 
1703         EditorClient function. WK1 can just call invoke this code from the existing 
1704         respondToChangedSelection EditorClient function, which is what WK2 does.
1705         * WebProcess/WebCoreSupport/WebEditorClient.h:
1706
1707 2016-01-14  Beth Dakin  <bdakin@apple.com>
1708
1709         WK2: Request completion candidates when needed
1710         https://bugs.webkit.org/show_bug.cgi?id=153040
1711         -and corresponding-
1712         rdar://problem/24155631
1713
1714         Reviewed by Enrica Casucci and Tim Horton.
1715
1716         Mac needs to support postLayoutData in order to have some layout-related 
1717         editing information to request candidates. This patch re-shuffles some items 
1718         in the struct so that they can be shared by Mac and iOS, and it adds 3 new 
1719         items for Mac only.
1720         * Shared/EditorState.cpp:
1721         (WebKit::EditorState::encode):
1722         (WebKit::EditorState::decode):
1723         (WebKit::EditorState::PostLayoutData::encode):
1724         (WebKit::EditorState::PostLayoutData::decode):
1725         * Shared/EditorState.h:
1726
1727         Request and handle candidates here in WebViewImpl, and cache the 
1728         m_lastStringForCandidateRequest so that we can ensure the results we receive 
1729         were received in a timely enough manner that they are still for the same 
1730         String.
1731         * UIProcess/Cocoa/WebViewImpl.h:
1732         * UIProcess/Cocoa/WebViewImpl.mm:
1733         (WebKit::WebViewImpl::selectionDidChange):
1734
1735         When selection changes, request new candidates.
1736         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
1737
1738         Once candidates have been received, we ask the sharedSpellChecker to show 
1739         them.
1740         (WebKit::WebViewImpl::handleRequestedCandidates):
1741
1742         If a candidate is accepted, we ask the WebProcess to accept it, so we start 
1743         by converting the NSTextCheckingResult to a WebCore::TextCheckingResult.
1744         (WebKit::textCheckingResultFromNSTextCheckingResult):
1745         (WebKit::WebViewImpl::handleAcceptedCandidate):
1746
1747         Ask the WebProcess to handle accepting the candidate.
1748         * UIProcess/WebPageProxy.cpp:
1749         (WebKit::WebPageProxy::handleAcceptedCandidate):
1750         * UIProcess/WebPageProxy.h:
1751         * WebProcess/WebPage/WebPage.h:
1752         (WebKit::WebPage:: handleAcceptedCandidate):
1753         * WebProcess/WebPage/WebPage.messages.in:
1754
1755         Now that Mac has some postLayoutData in the EditorState, fill that in in 
1756         platformEditorState().
1757         * WebProcess/WebPage/mac/WebPageMac.mm:
1758         (WebKit::WebPage::platformEditorState):
1759
1760         Ask WebCore::Editor to handle the accepted candidate.
1761         (WebKit::WebPage::handleAcceptedCandidate):
1762
1763 2016-01-14  Commit Queue  <commit-queue@webkit.org>
1764
1765         Unreviewed, rolling out r195002.
1766         https://bugs.webkit.org/show_bug.cgi?id=153098
1767
1768         Crashes many/most editing tests (Requested by ap on #webkit).
1769
1770         Reverted changeset:
1771
1772         "WK2: Request completion candidates when needed"
1773         https://bugs.webkit.org/show_bug.cgi?id=153040
1774         http://trac.webkit.org/changeset/195002
1775
1776 2016-01-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1777
1778         [EFL][GTK][SeccompFilter] Fix build break when enabling --seccomp-filters
1779         https://bugs.webkit.org/show_bug.cgi?id=153094
1780
1781         Reviewed by Csaba Osztrogonác.
1782
1783         diskCacheDirectory and cookiePersistentStoragePath were removed by r192796.
1784         But SyscallPolicy::addDefaultWebProcessPolicy has added directory permission
1785         to the removed paths.
1786
1787         It looks two paths needs to be handled by network process.
1788
1789         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1790         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Deleted.
1791
1792 2016-01-13  Alex Christensen  <achristensen@webkit.org>
1793
1794         Implement custom protocols when using NetworkSession
1795         https://bugs.webkit.org/show_bug.cgi?id=153078
1796
1797         Reviewed by Andy Estes.
1798
1799         * NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1800         (WebKit::generateCustomProtocolID):
1801         (+[WKCustomProtocol canInitWithRequest:]):
1802         (+[WKCustomProtocol canonicalRequestForRequest:]):
1803         (-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
1804         (-[WKCustomProtocol startLoading]):
1805         (-[WKCustomProtocol stopLoading]):
1806         There's no need to have a static pointer when we can use NetworkProcess::singleton to access 
1807         the process-global CustomProtocolManager, and add null checks because that's a good thing to do.
1808         (WebKit::CustomProtocolManager::CustomProtocolManager):
1809         Call UTF8Encoding when creating the CustomProtocolManager on the main thread to make sure it exists
1810         for when we decode URLS in ResourceResponses from IPC later, which is done on a different WorkQueue.
1811         (WebKit::CustomProtocolManager::initializeConnection):
1812         (WebKit::CustomProtocolManager::initialize):
1813         (WebKit::CustomProtocolManager::removeCustomProtocol):
1814         (WebKit::CustomProtocolManager::registerProtocolClass):
1815         (WebKit::CustomProtocolManager::registerScheme):
1816         * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
1817         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1818         (WebKit::NetworkSession::NetworkSession):
1819         Call registerProtocolClass to set configuration.protocolClasses if there is a CustomProtocolManager.
1820
1821 2016-01-13  Beth Dakin  <bdakin@apple.com>
1822
1823         WK2: Request completion candidates when needed
1824         https://bugs.webkit.org/show_bug.cgi?id=153040
1825         -and corresponding-
1826         rdar://problem/24155631
1827
1828         Reviewed by Enrica Casucci.
1829
1830         Mac needs to support postLayoutData in order to have some layout-related 
1831         editing information to request candidates. This patch re-shuffles some items 
1832         in the struct so that they can be shared by Mac and iOS, and it adds 3 new 
1833         items for Mac only.
1834         * Shared/EditorState.cpp:
1835         (WebKit::EditorState::encode):
1836         (WebKit::EditorState::decode):
1837         (WebKit::EditorState::PostLayoutData::encode):
1838         (WebKit::EditorState::PostLayoutData::decode):
1839         * Shared/EditorState.h:
1840
1841         Request and handle candidates here in WebViewImpl, and cache the 
1842         m_lastStringForCandidateRequest so that we can ensure the results we receive 
1843         were received in a timely enough manner that they are still for the same 
1844         String.
1845         * UIProcess/Cocoa/WebViewImpl.h:
1846         * UIProcess/Cocoa/WebViewImpl.mm:
1847         (WebKit::WebViewImpl::selectionDidChange):
1848
1849         When selection changes, request new candidates.
1850         (WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
1851
1852         Once candidates have been received, we ask the sharedSpellChecker to show 
1853         them.
1854         (WebKit::WebViewImpl::handleRequestedCandidates):
1855
1856         If a candidate is accepted, we ask the WebProcess to accept it, so we start 
1857         by converting the NSTextCheckingResult to a WebCore::TextCheckingResult.
1858         (WebKit::textCheckingResultFromNSTextCheckingResult):
1859         (WebKit::WebViewImpl::handleAcceptedCandidate):
1860
1861         Ask the WebProcess to handle accepting the candidate.
1862         * UIProcess/WebPageProxy.cpp:
1863         (WebKit::WebPageProxy::handleAcceptedCandidate):
1864         * UIProcess/WebPageProxy.h:
1865         * WebProcess/WebPage/WebPage.h:
1866         (WebKit::WebPage:: handleAcceptedCandidate):
1867         * WebProcess/WebPage/WebPage.messages.in:
1868
1869         Now that Mac has some postLayoutData in the EditorState, fill that in in 
1870         platformEditorState().
1871         * WebProcess/WebPage/mac/WebPageMac.mm:
1872         (WebKit::WebPage::platformEditorState):
1873
1874         Ask WebCore::Editor to handle the accepted candidate.
1875         (WebKit::WebPage::handleAcceptedCandidate):
1876
1877 2016-01-12  Geoffrey Garen  <ggaren@apple.com>
1878
1879         WebKit2 should have an API for eagerly querying whether the web process is responsive
1880         https://bugs.webkit.org/show_bug.cgi?id=153037
1881
1882         Reviewed by Tim Horton.
1883
1884         WebKit2 provides a delegate notification when the web process doesn't
1885         respond to a message after a while. But there's no way to send a message
1886         eagerly and check for reply.
1887
1888         We want this new mechanism so that navigation can terminate the web
1889         process eagerly if it is hung.
1890
1891         * UIProcess/API/C/WKPage.cpp:
1892         (WKPageGetWebProcessIsResponsive):
1893         * UIProcess/API/C/WKPagePrivate.h: This is the new API.
1894
1895         * UIProcess/WebPageProxy.cpp:
1896         (WebKit::WebPageProxy::sendWheelEvent): Updated for interface change.
1897
1898         (WebKit::WebPageProxy::getWebProcessIsResponsive): Calls through to the
1899         web process proxy. We claim that we are responsive when there is no
1900         web process because we assume that a fresh web process will not hang.
1901
1902         * UIProcess/WebPageProxy.h:
1903
1904         * UIProcess/WebProcessProxy.cpp:
1905         (WebKit::WebProcessProxy::WebProcessProxy):
1906         (WebKit::WebProcessProxy::didBecomeUnresponsive): Keep a flag indicating
1907         whether the process is unresponsive so that we can fire unresponsiveness
1908         callbacks immediately for a hung process instead of waiting another 3s.
1909
1910         (WebKit::WebProcessProxy::didBecomeResponsive): We don't fire responsiveness
1911         callbacks inside didBecomeResponsive because we assume that a responsive
1912         web process will invoke didReceiveMainThreadPing -- and we fire the
1913         callbacks there.
1914
1915         (WebKit::WebProcessProxy::getIsResponsive): If the web process is already
1916         known to be unresponsive, fire the callback right away. Otherwise, queue
1917         it up to fire once we have an answer from a main thread ping.
1918
1919         (WebKit::WebProcessProxy::didReceiveMainThreadPing): Fire any pending
1920         callbacks when we learn that the web process is responsive.
1921
1922         * UIProcess/WebProcessProxy.h:
1923
1924 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1925
1926         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.3 release.
1927
1928         * gtk/NEWS: Add release notes for 2.11.3.
1929
1930 2016-01-12  Geoffrey Garen  <ggaren@apple.com>
1931
1932         WebPageProxy should reattach to the web process before navigating
1933         https://bugs.webkit.org/show_bug.cgi?id=153026
1934
1935         Reviewed by Anders Carlsson.
1936
1937         This fixes a crash (and lots of other corruption) when force-quitting
1938         the web process during navigation.
1939
1940         Some objects (like ViewGestureController) use one-time initialization
1941         to point to a ChildProcessProxy -- and, by design, we destroy them when
1942         the ChildProcessProxy becomes invalid (i.e., crashes or quits).
1943
1944         If we navigate *before* creating a new, valid ChildProcessProxy, then
1945         we accidentally re-create these objects pointing to the old, invalid
1946         ChildProcessProxy.
1947
1948         We need to wait until we have a valid ChildProcessProxy before we
1949         initialize these objects.
1950
1951         * UIProcess/WebPageProxy.cpp:
1952         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Navigate after
1953         reattaching to the web process so that lazily allocated helper objects
1954         point to the right ChildProcessProxy.
1955
1956 2016-01-12  Ryosuke Niwa  <rniwa@webkit.org>
1957
1958         Add a build flag for custom element
1959         https://bugs.webkit.org/show_bug.cgi?id=153005
1960
1961         Reviewed by Alex Christensen.
1962
1963         * Configurations/FeatureDefines.xcconfig:
1964
1965 2016-01-12  Alex Christensen  <achristensen@webkit.org>
1966
1967         Ask for UI Process approval of ProtectionSpace when authenticating downloads with NetworkSession
1968         https://bugs.webkit.org/show_bug.cgi?id=152999
1969
1970         Reviewed by Brady Eidson.
1971
1972         * DerivedSources.make:
1973         I mistakenly added PendingDownload.messages.in in r194810, but this will not be needed because
1974         the PendingDownload is not a MessageReceiver.  Rather, the NetworkProcess receives the messages
1975         and forwards their contents to the PendingDownload through its DownloadManager.
1976         * NetworkProcess/Downloads/DownloadManager.cpp:
1977         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
1978         (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
1979         (WebKit::DownloadManager::convertHandleToDownload):
1980         * NetworkProcess/Downloads/DownloadManager.h:
1981         * NetworkProcess/Downloads/PendingDownload.cpp:
1982         (WebKit::PendingDownload::continueWillSendRequest):
1983         (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
1984         Instead of taking a shortcut I added in r194810, send a message to the UI process and wait for its
1985         asynchronous reply to determine if we can authenticate against this protection space.
1986         (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
1987         (WebKit::PendingDownload::didConvertToDownload):
1988         * NetworkProcess/Downloads/PendingDownload.h:
1989         * NetworkProcess/Downloads/PendingDownload.messages.in: Removed.
1990         * NetworkProcess/NetworkProcess.cpp:
1991         (WebKit::NetworkProcess::cancelDownload):
1992         (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
1993         (WebKit::NetworkProcess::setCacheModel):
1994         * NetworkProcess/NetworkProcess.h:
1995         * NetworkProcess/NetworkProcess.messages.in:
1996         * Shared/Authentication/AuthenticationManager.h:
1997         * UIProcess/API/APIDownloadClient.h:
1998         (API::DownloadClient::didFail):
1999         (API::DownloadClient::didCancel):
2000         (API::DownloadClient::processDidCrash):
2001         (API::DownloadClient::canAuthenticateAgainstProtectionSpace):
2002         * UIProcess/Downloads/DownloadProxy.cpp:
2003         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2004         (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
2005         (WebKit::DownloadProxy::didReceiveResponse):
2006         * UIProcess/Downloads/DownloadProxy.h:
2007         * UIProcess/Downloads/DownloadProxy.messages.in:
2008         * WebKit2.xcodeproj/project.pbxproj:
2009
2010 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2011
2012         Move ChildProcessProxy from Shared to UIProcess
2013         https://bugs.webkit.org/show_bug.cgi?id=125570
2014
2015         Reviewed by Darin Adler.
2016
2017         ChildProcessProxy is only used by the UI process.
2018
2019         * CMakeLists.txt:
2020         * PlatformGTK.cmake:
2021         * UIProcess/ChildProcessProxy.cpp: Renamed from Source/WebKit2/Shared/ChildProcessProxy.cpp.
2022         (WebKit::ChildProcessProxy::ChildProcessProxy):
2023         (WebKit::ChildProcessProxy::~ChildProcessProxy):
2024         (WebKit::ChildProcessProxy::fromConnection):
2025         (WebKit::ChildProcessProxy::getLaunchOptions):
2026         (WebKit::ChildProcessProxy::connect):
2027         (WebKit::ChildProcessProxy::terminate):
2028         (WebKit::ChildProcessProxy::state):
2029         (WebKit::ChildProcessProxy::sendMessage):
2030         (WebKit::ChildProcessProxy::addMessageReceiver):
2031         (WebKit::ChildProcessProxy::removeMessageReceiver):
2032         (WebKit::ChildProcessProxy::dispatchMessage):
2033         (WebKit::ChildProcessProxy::dispatchSyncMessage):
2034         (WebKit::ChildProcessProxy::didFinishLaunching):
2035         (WebKit::ChildProcessProxy::shutDownProcess):
2036         (WebKit::ChildProcessProxy::connectionWillOpen):
2037         * UIProcess/ChildProcessProxy.h: Renamed from Source/WebKit2/Shared/ChildProcessProxy.h.
2038         (WebKit::ChildProcessProxy::connection):
2039         (WebKit::ChildProcessProxy::processIdentifier):
2040         (WebKit::ChildProcessProxy::canSendMessage):
2041         (WebKit::ChildProcessProxy::send):
2042         (WebKit::ChildProcessProxy::sendSync):
2043         * WebKit2.xcodeproj/project.pbxproj:
2044
2045 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2046
2047         [GTK] UI process crashes if webkit_web_view_get_tls_info is called before internal load-committed event
2048         https://bugs.webkit.org/show_bug.cgi?id=142375
2049
2050         Reviewed by Michael Catanzaro.
2051
2052         Remove all the hacks to emit delayed load events now that the
2053         page cache resource load delegates are consistent with all other
2054         resource loads.
2055
2056         * UIProcess/API/gtk/WebKitWebView.cpp:
2057         (webkitWebViewLoadChanged):
2058         (webkitWebViewResourceLoadStarted):
2059         (webkit_web_view_get_tls_info): Add a g_return_val_if_fail to
2060         prevent this function from being misused.
2061         (webkitWebViewDisconnectMainResourceResponseChangedSignalHandler): Deleted.
2062         (webkitWebViewDispose): Deleted.
2063         (webkitWebViewEmitLoadChanged): Deleted.
2064         (webkitWebViewEmitDelayedLoadEvents): Deleted.
2065         (mainResourceResponseChangedCallback): Deleted.
2066         (waitForMainResourceResponseIfWaitingForResource): Deleted.
2067
2068 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2069
2070         REGRESSION(r190717): [GTK] Popup menus stop working after being dismissed without selecting an item
2071         https://bugs.webkit.org/show_bug.cgi?id=152977
2072
2073         Reviewed by Michael Catanzaro.
2074
2075         This happens since r190717 when you open a popup menu and without
2076         selecting any option it's dismissed (press ESC or click somewhere
2077         else). This is because I removed the code to track when the menu
2078         is unmapped, thinking that it was no longer necessary. But we need
2079         to send the DidChangeSelectedIndexForActivePopupMenu to the
2080         WebProcess with -1 as index to keep the web process in sync.
2081
2082         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
2083         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
2084         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
2085         (WebKit::WebPopupMenuProxyGtk::cancelTracking):
2086         (WebKit::WebPopupMenuProxyGtk::menuItemActivated):
2087         (WebKit::WebPopupMenuProxyGtk::dismissMenuTimerFired):
2088         (WebKit::WebPopupMenuProxyGtk::menuUnmappedCallback):
2089         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
2090
2091 2016-01-09  Andy Estes  <aestes@apple.com>
2092
2093         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
2094         https://bugs.webkit.org/show_bug.cgi?id=152950
2095         rdar://problem/24066652
2096
2097         Reviewed by Tim Horton.
2098
2099         Added a alwaysRevalidatedURLSchemes property to _WKProcessPoolConfiguration. Taught WebProcess to add these
2100         schemes to SchemeRegistry when initializing a new web process.
2101
2102         * Shared/API/Cocoa/WKFoundation.h: Added a newline to force re-postprocessing.
2103         * Shared/WebProcessCreationParameters.cpp:
2104         (WebKit::WebProcessCreationParameters::encode):
2105         (WebKit::WebProcessCreationParameters::decode):
2106         * Shared/WebProcessCreationParameters.h:
2107         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2108         (API::ProcessPoolConfiguration::copy):
2109         * UIProcess/API/APIProcessPoolConfiguration.h:
2110         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2111         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2112         (-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]):
2113         (-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]):
2114         * UIProcess/WebProcessPool.cpp:
2115         (WebKit::WebProcessPool::createNewWebProcess):
2116         * UIProcess/WebProcessPool.h:
2117         * WebProcess/WebProcess.cpp:
2118         (WebKit::WebProcess::initializeWebProcess):
2119         (WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated):
2120         * WebProcess/WebProcess.h:
2121
2122 2016-01-11  Anders Carlsson  <andersca@apple.com>
2123
2124         Get rid of CFMakeCollectable, it is a no-op
2125         https://bugs.webkit.org/show_bug.cgi?id=152988
2126
2127         Reviewed by Sam Weinig.
2128
2129         * Shared/Cocoa/WKNSString.mm:
2130         * Shared/Cocoa/WKNSURL.mm:
2131         (-[WKNSURL _web_createTarget]):
2132
2133 2016-01-11  Commit Queue  <commit-queue@webkit.org>
2134
2135         Unreviewed, rolling out r194866.
2136         https://bugs.webkit.org/show_bug.cgi?id=152986
2137
2138         This change broke the mac build (Requested by ryanhaddad on
2139         #webkit).
2140
2141         Reverted changeset:
2142
2143         "[Cocoa] Add SPI to opt out a URL scheme from the memory
2144         cache"
2145         https://bugs.webkit.org/show_bug.cgi?id=152950
2146         http://trac.webkit.org/changeset/194866
2147
2148 2016-01-11  Andy Estes  <aestes@apple.com>
2149
2150         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
2151         https://bugs.webkit.org/show_bug.cgi?id=152950
2152         rdar://problem/24066652
2153
2154         Reviewed by Tim Horton.
2155
2156         Added a alwaysRevalidatedURLSchemes property to _WKProcessPoolConfiguration. Taught WebProcess to add these
2157         schemes to SchemeRegistry when initializing a new web process.
2158
2159         * Shared/WebProcessCreationParameters.cpp:
2160         (WebKit::WebProcessCreationParameters::encode):
2161         (WebKit::WebProcessCreationParameters::decode):
2162         * Shared/WebProcessCreationParameters.h:
2163         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2164         (API::ProcessPoolConfiguration::copy):
2165         * UIProcess/API/APIProcessPoolConfiguration.h:
2166         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2167         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2168         (-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]):
2169         (-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]):
2170         * UIProcess/WebProcessPool.cpp:
2171         (WebKit::WebProcessPool::createNewWebProcess):
2172         * UIProcess/WebProcessPool.h:
2173         * WebProcess/WebProcess.cpp:
2174         (WebKit::WebProcess::initializeWebProcess):
2175         (WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated):
2176         * WebProcess/WebProcess.h:
2177
2178 2016-01-11  Alex Christensen  <achristensen@webkit.org>
2179
2180         Fix Mac CMake build after r194810.
2181
2182         * PlatformMac.cmake:
2183         PendingDownload isn't needed until NETWORK_SESSION is used by default.
2184         I'll figure this out when I make the switch.
2185
2186 2016-01-11  Mario Sanchez Prada  <mario@endlessm.com>
2187
2188         [WK2][GTK] Propagate motion-notify-event signals from the WebView
2189         https://bugs.webkit.org/show_bug.cgi?id=152974
2190
2191         Reviewed by Carlos Garcia Campos.
2192
2193         Always propagate motion-notify-event signals, regardless of what the
2194         web process does, so that we can listen for those events (which does
2195         not act on specific targets inside the webview) from the container
2196         widget too, and not just from the WebView itself.
2197
2198         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2199         (webkitWebViewBaseMotionNotifyEvent): Ensure the signal gets propagated.
2200
2201 2016-01-10  Dan Bernstein  <mitz@apple.com>
2202
2203         [Cocoa] Disable header postprocessing when building for El Capitan
2204         https://bugs.webkit.org/show_bug.cgi?id=152962
2205
2206         Reviewed by Anders Carlsson.
2207
2208         * Configurations/WebKit.xcconfig:
2209
2210 2016-01-09  Dan Bernstein  <mitz@apple.com>
2211
2212         [Cocoa] Allow overriding the frameworks directory independently of using a staging install path
2213         https://bugs.webkit.org/show_bug.cgi?id=152926
2214
2215         Reviewed by Tim Horton.
2216
2217         Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
2218         where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
2219         WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
2220
2221         Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
2222
2223         * Configurations/BaseTarget.xcconfig:
2224         - Add quotes to account for spaces.
2225         - Define WEBKIT_FRAMEWORKS_DIR and UMBRELLA_FRAMEWORKS_DIR based on
2226           WK_OVERRIDE_FRAMEWORKS_DIR.
2227
2228         * WebKit2.xcodeproj/project.pbxproj:
2229         - In the Migrate WebKitLegacy Headers build phase, work around make’s inability to handle
2230           spaces in paths by creating a symlink to WEBKIT_LEGACY_PRIVATE_HEADERS_DIR under
2231           BUILT_PRODUCTS_DIR and using the symlink as the value of
2232           WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
2233         - In the Postprocess WKBase.h and Postprocess WKFoundation.h build phases, add quotes to
2234           account for spaces.
2235
2236         * mac/MigrateHeadersFromWebKitLegacy.make:
2237           Use a BUILT_PRODUCTS_DIR-based path to the framework instead of a TARGET_BUILD_DIR-based
2238           one in order to avoid spaces.
2239
2240         * mac/postprocess-framework-headers.sh:
2241           Add quotes to account for spaces.
2242
2243 2016-01-08  Alex Christensen  <achristensen@webkit.org>
2244
2245         Implement download authentication with NetworkSession
2246         https://bugs.webkit.org/show_bug.cgi?id=152878
2247
2248         Reviewed by Brady Eidson.
2249
2250         * DerivedSources.make:
2251         * NetworkProcess/Downloads/Download.h:
2252         * NetworkProcess/Downloads/DownloadManager.cpp:
2253         (WebKit::DownloadManager::startDownload):
2254         * NetworkProcess/Downloads/PendingDownload.cpp: Added.
2255         (WebKit::PendingDownload::PendingDownload):
2256         (WebKit::PendingDownload::willSendRedirectedRequest):
2257         (WebKit::PendingDownload::continueWillSendRequest):
2258         (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
2259         (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
2260         (WebKit::PendingDownload::didConvertToDownload):
2261         (WebKit::PendingDownload::messageSenderConnection):
2262         (WebKit::PendingDownload::messageSenderDestinationID):
2263         * NetworkProcess/Downloads/PendingDownload.h:
2264         (WebKit::PendingDownload::PendingDownload): Deleted.
2265         * NetworkProcess/Downloads/PendingDownload.messages.in: Added.
2266         * NetworkProcess/NetworkLoad.cpp:
2267         (WebKit::NetworkLoad::continueWillSendRequest):
2268         The completion handler should always be called.  If m_currentRequest is null, then the request will not proceed, which is the same as canceling it.
2269         (WebKit::NetworkLoad::setPendingDownloadID):
2270         (WebKit::NetworkLoad::setPendingDownload):
2271         (WebKit::NetworkLoad::willPerformHTTPRedirection):
2272         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2273         If this load is going to become a download, then call the PendingDownload version of didReceiveAuthenticationChallenge to communicate with the 
2274         UI process directly because there wasn't necessarily a web process associated with this request that will become a download.
2275         * NetworkProcess/NetworkLoad.h:
2276         (WebKit::NetworkLoad::pendingDownloadID):
2277         * NetworkProcess/NetworkSession.h:
2278         (WebKit::NetworkDataTask::client):
2279         (WebKit::NetworkDataTask::pendingDownloadID):
2280         (WebKit::NetworkDataTask::pendingDownload):
2281         (WebKit::NetworkDataTask::setPendingDownloadID):
2282         (WebKit::NetworkDataTask::setPendingDownload):
2283         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2284         * PlatformMac.cmake:
2285         * Shared/Authentication/AuthenticationManager.cpp:
2286         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
2287         * Shared/Authentication/AuthenticationManager.h:
2288         * WebKit2.xcodeproj/project.pbxproj:
2289         * WebProcess/Network/WebResourceLoader.cpp:
2290         (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
2291         Removed unnecessary protection and move null check to before using the pointer it checks.
2292
2293 2016-01-07  Simon Fraser  <simon.fraser@apple.com>
2294
2295         Use an appropriate buffer format for swipe snapshots
2296         https://bugs.webkit.org/show_bug.cgi?id=152880
2297         rdar://problem/23728299
2298
2299         Reviewed by Tim Horton.
2300         
2301         Choose an appropriate buffer format for swipe snapshots, and avoid converting
2302         them to YUV422.
2303
2304         * UIProcess/API/Cocoa/WKWebView.mm:
2305         (WebKit::bufferFormat):
2306         (-[WKWebView _takeViewSnapshot]):
2307
2308 2016-01-07  Alex Christensen  <achristensen@webkit.org>
2309
2310         Progress towards implementing downloads with NetworkSession
2311         https://bugs.webkit.org/show_bug.cgi?id=152760
2312
2313         Reviewed by Brady Eidson.
2314
2315         * NetworkProcess/Downloads/Download.cpp:
2316         (WebKit::Download::Download):
2317         There's no need to store the unused NetworkSession&.
2318         (WebKit::Download::didStart):
2319         (WebKit::Download::didReceiveAuthenticationChallenge):
2320         Downloads with NetworkSession are NetworkLoads until the response is received, which is after authentication
2321         challenges are handled by NetworkLoad's code.
2322         (WebKit::Download::didReceiveResponse):
2323         * NetworkProcess/Downloads/Download.h:
2324         * NetworkProcess/Downloads/DownloadManager.cpp:
2325         (WebKit::DownloadManager::startDownload):
2326         Create a PendingDownload, which is basically a NetworkLoad that knows that it will become a Download 
2327         when the response is received, regardless of whether or not there is a Content-Disposition header.
2328         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
2329         * NetworkProcess/Downloads/DownloadManager.h:
2330         * NetworkProcess/Downloads/PendingDownload.h: Added.
2331         (WebKit::PendingDownload::PendingDownload):
2332         Added a new NetworkLoadClient for requests that will become downloads.
2333         A PendingDownload contains a NetworkLoad so we can always keep them together
2334         and so it can handle setting its pending download id.
2335         * WebKit2.xcodeproj/project.pbxproj:
2336         * NetworkProcess/NetworkLoad.cpp:
2337         (WebKit::NetworkLoad::NetworkLoad):
2338         Avoid dereferencing a pointer if the NetworkSession hadn't been created when a NetworkLoad starts.
2339         This shouldn't be possible, but it's good to not assume that all pointers are non-null.
2340         (WebKit::NetworkLoad::cancel):
2341         Add a null check in case the constructor doesn't make m_task.
2342         (WebKit::NetworkLoad::convertTaskToDownload):
2343         (WebKit::NetworkLoad::setPendingDownloadID):
2344         Added for downloads that start with startDownload.  The pending DownloadID is used to indicate that
2345         this request should always become a download, regardless of whether or not the response has a 
2346         Content-Disposition header.
2347         (WebKit::NetworkLoad::willPerformHTTPRedirection):
2348         (WebKit::NetworkLoad::didReceiveResponse):
2349         * NetworkProcess/NetworkLoad.h:
2350         There's no need to store a DownloadID here.  It's stored in the NetworkDataTask (m_task).
2351         * NetworkProcess/NetworkSession.h:
2352         (WebKit::NetworkDataTask::client):
2353         (WebKit::NetworkDataTask::pendingDownloadID):
2354         (WebKit::NetworkDataTask::setPendingDownloadID):
2355         (WebKit::NetworkDataTask::downloadID): Deleted.
2356         (WebKit::NetworkDataTask::setDownloadID): Deleted.
2357         Renamed downloadID and setDownloadID to pendingDownloadID and setPendingDownloadID, respectively,
2358         to indicate their use.  They are not the current downloadID, but they are the downloadID of the download
2359         that will happen once the response is received and PolicyDownload will be returned in the completion handler.
2360         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2361         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2362         Call dataTaskBecameDownloadTask after didBecomeDownload because the networkDataTask is deleted by removing it 
2363         from m_pendingDownloads in dataTaskBecameDownloadTask.
2364
2365 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
2366
2367         Add a setting and preferences to enable display-list drawing. Does nothing yet.
2368         https://bugs.webkit.org/show_bug.cgi?id=152807
2369
2370         Reviewed by Zalan Bujtas.
2371         
2372         WK2 debug pref for display-list drawing, defaults to off.
2373
2374         * Shared/WebPreferencesDefinitions.h:
2375         * UIProcess/API/Cocoa/WKPreferences.mm:
2376         (-[WKPreferences _displayListDrawingEnabled]):
2377         (-[WKPreferences _setDisplayListDrawingEnabled:]):
2378         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2379         * WebProcess/WebPage/WebPage.cpp:
2380         (WebKit::WebPage::updatePreferences):
2381
2382 2016-01-06  Daniel Bates  <dabates@apple.com>
2383
2384         Use code signed identifier as part of user directory suffix
2385         https://bugs.webkit.org/show_bug.cgi?id=152310
2386         <rdar://problem/13352225>
2387
2388         As pointed out by Sam Weinig, the year is 2016! I inadvertently added the copyright year 2015 instead of 2016.
2389
2390         * Shared/mac/ChildProcessMac.mm:
2391
2392 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
2393
2394         [iOS] Revert overflow:hidden on the body affecting viewport scale (r186786)
2395         https://bugs.webkit.org/show_bug.cgi?id=152803
2396         rdar://problem/22242515
2397
2398         Reviewed by Tim Horton.
2399
2400         You can't assume that if an author uses overflow:hidden on the body, they have no
2401         content outside the body that is important. Sites like Google Translate put
2402         abspos elements outside the body.
2403         
2404         So revert the change.
2405
2406         * WebProcess/WebPage/WebPage.cpp:
2407         (WebKit::WebPage::mainFrameDidLayout): Go back to using contents size.
2408
2409 2016-01-06  Anders Carlsson  <andersca@apple.com>
2410
2411         Add a smart block pointer
2412         https://bugs.webkit.org/show_bug.cgi?id=152799
2413
2414         Reviewed by Tim Horton.
2415
2416         Use WTF::BlockPtr.
2417
2418         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2419         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2420         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2421         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2422
2423 2016-01-06  Daniel Bates  <dabates@apple.com>
2424
2425         Use code signed identifier as part of user directory suffix
2426         https://bugs.webkit.org/show_bug.cgi?id=152310
2427         <rdar://problem/13352225>
2428
2429         Reviewed by Brent Fulgham.
2430
2431         * Shared/mac/ChildProcessMac.mm:
2432         (WebKit::findSecCodeForProcess): Added.
2433         (WebKit::ChildProcess::initializeSandbox): Modified to use an identifier
2434         from the code signature of the app/tool as part of the user directory suffix.
2435
2436 2016-01-06  Brian Burg  <bburg@apple.com>
2437
2438         Add a WebKit SPI for registering an automation controller with RemoteInspector
2439         https://bugs.webkit.org/show_bug.cgi?id=151576
2440
2441         Reviewed by Dan Bernstein and Joseph Pecoraro.
2442
2443         _WKAutomationDelegate is a new SPI that allows WKProcessPool clients to decide
2444         policy and implement actions for remote automation.
2445
2446         The SPI's implementation connects the client's delegate to RemoteInspector::Client.
2447         This allows the delegate to handle some commands, such as requestAutomationSession,
2448         that come over XPC from an external test runner but are not associated with a specific
2449         automation target.
2450
2451         * PlatformMac.cmake:
2452         * UIProcess/API/APIAutomationClient.h: Added. Boilerplate for WebKit::AutomationClient.
2453         (API::AutomationClient::~AutomationClient):
2454         (API::AutomationClient::allowsRemoteAutomation):
2455         (API::AutomationClient::requestAutomationSession):
2456         * UIProcess/API/Cocoa/WKProcessPool.mm:
2457         (-[WKProcessPool _automationDelegate]): Added.
2458         (-[WKProcessPool _setAutomationDelegate:]): Added.
2459         (-[WKProcessPool _automationCapabilitiesDidChange]): Added.
2460         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Add delegate.
2461         * UIProcess/API/Cocoa/_WKAutomationDelegate.h: Added.
2462
2463             This is a new delegate SPI of WKProcessPool; it corresponds to AutomationClient.
2464
2465         * UIProcess/Cocoa/AutomationClient.h: Added.
2466         * UIProcess/Cocoa/AutomationClient.mm: Added.
2467
2468             This implements a bridge between RemoteInspector::Client and _WKAutomationDelegate.
2469             Since the delegate can be called from JavaScriptCore, save the delegating
2470             WKProcessPool and pass it as the self parameter to delegate methods.
2471
2472         (WebKit::AutomationClient::AutomationClient):
2473         (WebKit::AutomationClient::~AutomationClient):
2474
2475             This client automatically registers and unregisters as a RemoteInspector::Client.
2476
2477         (WebKit::AutomationClient::remoteAutomationAllowed):
2478         (WebKit::AutomationClient::requestAutomationSession):
2479
2480             Forward requests from RemoteInspector to the automation delegate.
2481
2482         * UIProcess/WebProcessPool.cpp:
2483         (WebKit::WebProcessPool::WebProcessPool):
2484         (WebKit::WebProcessPool::setAutomationClient): Added.
2485         (WebKit::WebProcessPool::updateAutomationCapabilities): Added, it notifies RemoteInspector.
2486         * UIProcess/WebProcessPool.h:
2487         * WebKit2.xcodeproj/project.pbxproj:
2488
2489 2016-01-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2490
2491         [EFL] Set WebKit2 process output name
2492         https://bugs.webkit.org/show_bug.cgi?id=152773
2493
2494         Reviewed by Benjamin Poulain.
2495
2496         If we add *WebKit* prefix to each WK2 process, it is more clear when checking what process is running.
2497         So this patch sets wk2 process output name.
2498
2499         * PlatformEfl.cmake:
2500
2501 2016-01-05  Alex Christensen  <achristensen@webkit.org>
2502
2503         Implement defersLoading with NetworkSession
2504         https://bugs.webkit.org/show_bug.cgi?id=151818
2505
2506         Reviewed by Darin Adler.
2507
2508         * NetworkProcess/NetworkLoad.cpp:
2509         (WebKit::NetworkLoad::NetworkLoad):
2510         (WebKit::NetworkLoad::setDefersLoading):
2511         * NetworkProcess/NetworkSession.h:
2512         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2513         (WebKit::NetworkDataTask::resume):
2514         (WebKit::NetworkDataTask::suspend):
2515
2516 2016-01-05  Tim Horton  <timothy_horton@apple.com>
2517
2518         REGRESSION (r192432): Keyboard repeat doesn't work anymore for arrow keys/spacebar
2519         https://bugs.webkit.org/show_bug.cgi?id=152767
2520         <rdar://problem/24017380>
2521
2522         Reviewed by Dan Bernstein.
2523
2524         * UIProcess/ios/WKContentViewInteraction.mm:
2525         (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):
2526         Instead of always bailing, call [super _handleKeyUIEvent:] if we aren't
2527         in an editable area, because we won't have done so in _handleKeyUIEvent.
2528
2529         It's important that the event makes it to the root UIResponder (even if
2530         we handled it!) for key repeat to function.
2531
2532         The double-scrolling case is still fixed because we notice the resent
2533         event coming back in to us and bail if we've already seen it.
2534
2535 2016-01-05  Jer Noble  <jer.noble@apple.com>
2536
2537         [Mac] Exiting fullscreen via Mission Control leaves fullcreen window frontmost on desktop
2538         https://bugs.webkit.org/show_bug.cgi?id=152733
2539
2540         Reviewed by Eric Carlson.
2541
2542         Rather than ignore -windowDidExitFullScreen: notifications when fullscreen exit was
2543         not initiated by WebKit (and the -window:startCustomAnimationToEnterFullScreenWithDuration:
2544         method was not called), continue to exit fullscreen normally.
2545
2546         * UIProcess/mac/WKFullScreenWindowController.mm:
2547         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2548
2549 2016-01-05  Alex Christensen  <achristensen@webkit.org>
2550
2551         Clean up download code
2552         https://bugs.webkit.org/show_bug.cgi?id=152739
2553
2554         Reviewed by Brady Eidson.
2555
2556         * NetworkProcess/Downloads/DownloadManager.cpp:
2557         (WebKit::DownloadManager::DownloadManager):
2558         (WebKit::DownloadManager::didCreateDownload):
2559         (WebKit::DownloadManager::didDestroyDownload):
2560         (WebKit::DownloadManager::downloadProxyConnection):
2561         (WebKit::DownloadManager::downloadsAuthenticationManager):
2562         * NetworkProcess/Downloads/DownloadManager.h:
2563         Keep a Client& instead of a Client*.
2564         * NetworkProcess/NetworkProcess.cpp:
2565         (WebKit::NetworkProcess::downloadManager):
2566         * NetworkProcess/NetworkSession.h:
2567         m_sessionID is not used. There is no need to store the sessionID if it is only used in the NetworkSession constructor.
2568         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2569         (WebKit::NetworkSession::defaultSession):
2570         (WebKit::NetworkSession::NetworkSession):
2571
2572 2016-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2573
2574         [GTK] Allow to save and restore session
2575         https://bugs.webkit.org/show_bug.cgi?id=115600
2576
2577         Reviewed by Michael Catanzaro.
2578
2579         Add new API to get and resore the web view session state.
2580
2581         * PlatformGTK.cmake: Add new files to compilation.
2582         * UIProcess/API/gtk/WebKitWebView.cpp:
2583         (webkit_web_view_get_session_state): Create a new
2584         WebKitWebViewSessionState representing the current session state.
2585         (webkit_web_view_restore_session_state): Restore the web view
2586         session state from the given WebKitWebViewSessionState.
2587         * UIProcess/API/gtk/WebKitWebView.h:
2588         * UIProcess/API/gtk/WebKitWebViewSessionState.cpp: Added.
2589         (_WebKitWebViewSessionState::_WebKitWebViewSessionState):
2590         (toExternalURLsPolicy):
2591         (toWebCoreExternalURLsPolicy):
2592         (toHTMLBodyElementType):
2593         (toHTTPBodyElementType):
2594         (encodeHTTPBody):
2595         (encodeFrameState):
2596         (encodePageState):
2597         (encodeBackForwardListItemState):
2598         (encodeBackForwardListState):
2599         (encodeSessionState):
2600         (decodeHTTPBody):
2601         (decodeFrameState):
2602         (decodeBackForwardListItemState):
2603         (decodeSessionState):
2604         (webkitWebViewSessionStateCreate):
2605         (webkitWebViewSessionStateGetSessionState):
2606         (webkit_web_view_session_state_new): Create a
2607         WebKitWebViewSessionState from serialized data.
2608         (webkit_web_view_session_state_ref):
2609         (webkit_web_view_session_state_unref):
2610         (webkit_web_view_session_state_serialize): Serialize the WebKitWebViewSessionState.
2611         * UIProcess/API/gtk/WebKitWebViewSessionState.h: Added.
2612         * UIProcess/API/gtk/WebKitWebViewSessionStatePrivate.h: Added.
2613         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
2614         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_web_view_session_state_get_type.
2615         * UIProcess/API/gtk/webkit2.h: Include WebKitWebViewSessionState.h.
2616
2617 2016-01-04  Alex Christensen  <achristensen@webkit.org>
2618
2619         Use unique_ptr for NetworkDataTasks and references for NetworkSessionTaskClients
2620         https://bugs.webkit.org/show_bug.cgi?id=152724
2621
2622         Reviewed by Andy Estes.
2623
2624         There is no reason to have a NetworkSessionTaskClient* instead of a 
2625         NetworkSessionTaskClient& just so we can clear it in the NetworkLoad destructor, 
2626         which immediately calls ~NetworkDataTask.
2627         Also, NetworkDataTasks are owned only by the NetworkLoad, so there's no reason to refcount them.
2628
2629         * NetworkProcess/Downloads/Download.h:
2630         * NetworkProcess/Downloads/DownloadManager.h:
2631         * NetworkProcess/NetworkLoad.cpp:
2632         (WebKit::NetworkLoad::~NetworkLoad):
2633         * NetworkProcess/NetworkLoad.h:
2634         * NetworkProcess/NetworkSession.h:
2635         (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
2636         (WebKit::NetworkDataTask::client):
2637         (WebKit::NetworkDataTask::downloadID):
2638         (WebKit::NetworkDataTask::setDownloadID):
2639         (WebKit::NetworkDataTask::clearClient): Deleted.
2640         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2641         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2642         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2643         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
2644         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2645         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
2646         (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
2647         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2648         (WebKit::NetworkSession::~NetworkSession):
2649         (WebKit::NetworkSession::createDataTaskWithRequest):
2650         (WebKit::NetworkSession::dataTaskForIdentifier):
2651         (WebKit::NetworkDataTask::NetworkDataTask):
2652
2653 2016-01-04  Alex Christensen  <achristensen@webkit.org>
2654
2655         Progress towards implementing downloads with NetworkSession
2656         https://bugs.webkit.org/show_bug.cgi?id=152716
2657
2658         Reviewed by Brady Eidson.
2659
2660         * NetworkProcess/Downloads/Download.h:
2661         * NetworkProcess/Downloads/DownloadID.h:
2662         (WebKit::DownloadID::DownloadID):
2663         (WebKit::DownloadID::operator==):
2664         (WebKit::DownloadID::operator!=):
2665         (WebKit::DownloadID::downloadID):
2666         * NetworkProcess/Downloads/DownloadManager.cpp:
2667         (WebKit::DownloadManager::startDownload):
2668         * NetworkProcess/Downloads/DownloadManager.h:
2669         (WebKit::DownloadManager::download):
2670         (WebKit::DownloadManager::isDownloading):
2671         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
2672         (WebKit::Download::resume):
2673         (WebKit::Download::platformInvalidate):
2674         (WebKit::Download::platformDidFinish):
2675         (WebKit::Download::start): Deleted.
2676         * NetworkProcess/NetworkSession.h:
2677         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2678         (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
2679         (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
2680         (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
2681         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
2682         (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
2683         (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
2684         (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
2685         (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]):
2686         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2687
2688         When using NSURLSession, a data task is converted to a download task after the connection has already
2689         been established, the headers have been received, and WebCore looks at the response and decides that
2690         this connection should become a download.  We call the didReceiveResponse to match the behavior of 
2691         NSURLDownload, but this could be cleaned up later to match what is actually happening.  We also do not
2692         need to tell the download to start because it has already started.
2693
2694         (WebKit::NetworkSession::dataTaskForIdentifier):
2695         (WebKit::NetworkSession::addDownloadID):
2696         (WebKit::NetworkSession::downloadID):
2697         (WebKit::NetworkSession::takeDownloadID):
2698         (WebKit::NetworkDataTask::NetworkDataTask):
2699
2700         NSURLSessionDownloadTask taskIdentifiers are unique to that NSURLSession, but we have one global DownloadManager
2701         in the NetworkProcess.  We need to have each NetworkSession keep a map of taskIdentifiers to global DownloadID.
2702
2703 2016-01-04  Tim Horton  <timothy_horton@apple.com>
2704
2705         Turn on gesture events when building for Yosemite
2706         https://bugs.webkit.org/show_bug.cgi?id=152704
2707         rdar://problem/24042472
2708
2709         Reviewed by Anders Carlsson.
2710
2711         * Configurations/FeatureDefines.xcconfig:
2712
2713 2016-01-04  Tim Horton  <timothy_horton@apple.com>
2714
2715         Hardware keyboard key-commands stop responding when viewing PDFs
2716         https://bugs.webkit.org/show_bug.cgi?id=152712
2717         <rdar://problem/23014457>
2718
2719         Reviewed by Dan Bernstein.
2720
2721         Maintain first responder status through any content view swapping, by
2722         making WKWebView become first responder if needed, and pushing first
2723         responder status down to the swapped-in content view if possible.
2724
2725         * UIProcess/API/Cocoa/WKWebView.mm:
2726         (-[WKWebView becomeFirstResponder]):
2727         Make the current content view first responder instead of the WKContentView,
2728         in case we have a custom content view installed.
2729
2730         (-[WKWebView canBecomeFirstResponder]):
2731         WKWebView can always become first responder, even if none of its children can.
2732         This makes it so that if a custom content view can't become first responder,
2733         WKWebView will take the responsibility.
2734
2735         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2736         Return the responsibility of being first responder to the newly-installed
2737         content view if WKWebView is currently the first responder (either because
2738         of tab switching or because the previous content view did not support
2739         being first responder), if it supports being first responder.
2740
2741 2016-01-04  Commit Queue  <commit-queue@webkit.org>
2742
2743         Unreviewed, rolling out r194544.
2744         https://bugs.webkit.org/show_bug.cgi?id=152711
2745
2746         This change caused assertions in existing inspector tests
2747         (Requested by ryanhaddad on #webkit).
2748
2749         Reverted changeset:
2750
2751         "Web Inspector: reproducible debug ASSERT when inspecting the
2752         inspector (WK2)"
2753         https://bugs.webkit.org/show_bug.cgi?id=152080
2754         http://trac.webkit.org/changeset/194544
2755
2756 2016-01-04  Alex Christensen  <achristensen@webkit.org>
2757
2758         Fix Mac CMake build after r194378.
2759
2760         * CMakeLists.txt:
2761
2762 2016-01-04  Brian Burg  <bburg@apple.com>
2763
2764         Web Inspector: reproducible debug ASSERT when inspecting the inspector (WK2)
2765         https://bugs.webkit.org/show_bug.cgi?id=152080
2766
2767         Reviewed by Timothy Hatcher.
2768
2769         We hit an assert underneath ChildProcessProxy::addMessageReceiver when opening Inspector[2]
2770         because we try to add WebInpectorProxy as a message receiver twice for the same process.
2771
2772         On investigating, I found several interrelated issues that caused this state of affairs:
2773
2774          - WebInspectorProxy adds message receivers for inspector page's WebProcess and the
2775         inspected page's WebProcess. When inspecting the inspector, we mistakenly add a receiver
2776         again because the inspector is now the inspected page.
2777          - We mixed up process ids when adding message receivers.
2778          - invalidate() is re-entrant, causing us to try and double-remove the message receiver.
2779
2780         Fix this by removing add/remove of message recievers for the inspector page when then
2781         inspected page is itself an inspector page. In that case, the receivers are managed by
2782         the inspector page's WebInspectorProxy instance.
2783
2784         * UIProcess/WebInspectorProxy.cpp:
2785         (WebKit::WebInspectorProxy::invalidate): Re-arrange to guard against useless reentrancy.
2786         (WebKit::WebInspectorProxy::didRelaunchInspectorPageProcess):
2787         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
2788         (WebKit::WebInspectorProxy::didClose):
2789
2790 2016-01-04  Alex Christensen  <achristensen@webkit.org>
2791
2792         Build fix after r194536 when using NetworkSession.
2793
2794         * NetworkProcess/Downloads/DownloadManager.cpp:
2795         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
2796         (WebKit::DownloadManager::convertHandleToDownload):
2797         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2798         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2799         WTFMove changed underneath me.
2800
2801 2016-01-04  Alex Christensen  <achristensen@webkit.org>
2802
2803         Progress towards implementing downloads with NetworkSession
2804         https://bugs.webkit.org/show_bug.cgi?id=152576
2805
2806         Reviewed by Brady Eidson.
2807
2808         * NetworkProcess/Downloads/Download.cpp:
2809         (WebKit::Download::Download):
2810         (WebKit::Download::~Download):
2811         (WebKit::Download::didStart):
2812         (WebKit::Download::didReceiveAuthenticationChallenge):
2813         * NetworkProcess/Downloads/Download.h:
2814         (WebKit::Download::downloadID):
2815         * NetworkProcess/Downloads/DownloadManager.cpp:
2816         (WebKit::DownloadManager::startDownload):
2817         (WebKit::DownloadManager::dataTaskBecameDownloadTask):
2818         (WebKit::DownloadManager::convertHandleToDownload):
2819         * NetworkProcess/Downloads/DownloadManager.h:
2820         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2821         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2822         * NetworkProcess/NetworkLoad.cpp:
2823         (WebKit::NetworkLoad::convertTaskToDownload):
2824         * NetworkProcess/NetworkLoad.h:
2825         * NetworkProcess/NetworkSession.h:
2826         (WebKit::NetworkDataTask::client):
2827         (WebKit::NetworkDataTask::clearClient):
2828         (WebKit::NetworkDataTask::downloadID):
2829         (WebKit::NetworkDataTask::setDownloadID):
2830         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2831         (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
2832         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
2833
2834 2016-01-04  Michael Catanzaro  <mcatanzaro@igalia.com>
2835
2836         [GTK] Rename _WebKitWebContextPrivate.context to _WebKitWebContextPrivate.processPool
2837         https://bugs.webkit.org/show_bug.cgi?id=152672
2838
2839         Reviewed by Carlos Garcia Campos.
2840
2841         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
2842         (attachDownloadClientToContext):
2843         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
2844         (attachInjectedBundleClientToContext):
2845         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
2846         (registerSecurityPolicyForURIScheme):
2847         * UIProcess/API/gtk/WebKitWebContext.cpp:
2848         (webkitWebContextConstructed):
2849         (webkitWebContextDispose):
2850         (webkit_web_context_set_cache_model):
2851         (webkit_web_context_get_cache_model):
2852         (webkit_web_context_clear_cache):
2853         (webkit_web_context_get_cookie_manager):
2854         (ensureFaviconDatabase):
2855         (webkit_web_context_set_favicon_database_directory):
2856         (webkit_web_context_set_additional_plugins_directory):
2857         (webkitWebContextGetPluginThread):
2858         (webkit_web_context_set_tls_errors_policy):
2859         (webkit_web_context_set_disk_cache_directory):
2860         (webkit_web_context_prefetch_dns):
2861         (webkit_web_context_allow_tls_certificate_for_host):
2862         (webkit_web_context_set_process_model):
2863         (webkit_web_context_set_web_process_count_limit):
2864         (webkitWebContextStartDownload):
2865         (webkitWebContextGetProcessPool):
2866         (webkitWebContextCreatePageForWebView):
2867         (webkitWebContextGetContext): Deleted.
2868         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2869
2870 2016-01-03  Simon Fraser  <simon.fraser@apple.com>
2871
2872         Rename scrollPosition(Scrollbar*) to scrollOffset(ScrollbarOrientation)
2873         https://bugs.webkit.org/show_bug.cgi?id=152666
2874
2875         Reviewed by Dan Bernstein.
2876
2877         Scrollbar values take offsets (zero-based), so rename the accessor used
2878         by scrollbars to set their value, and pass in an orientation, rather than
2879         a pointer to the scrollbar.
2880
2881         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
2882         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
2883         (WebKit::PDFPlugin::scrollOffset):
2884         (WebKit::PDFPlugin::scrollPosition): Renamed.
2885
2886 2015-12-31  Andy Estes  <aestes@apple.com>
2887
2888         Replace WTF::move with WTFMove
2889         https://bugs.webkit.org/show_bug.cgi?id=152601
2890
2891         Reviewed by Brady Eidson.
2892
2893         * DatabaseProcess/DatabaseProcess.cpp:
2894         (WebKit::DatabaseProcess::postDatabaseTask):
2895         (WebKit::DatabaseProcess::fetchWebsiteData):
2896         (WebKit::DatabaseProcess::deleteWebsiteData):
2897         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
2898         (WebKit::DatabaseProcess::indexedDatabaseOrigins):
2899         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
2900         (WebKit::UniqueIDBDatabase::postTransactionOperation):
2901         (WebKit::UniqueIDBDatabase::postMainThreadTask):
2902         (WebKit::UniqueIDBDatabase::postDatabaseTask):
2903         * NetworkProcess/Downloads/DownloadManager.cpp:
2904         (WebKit::DownloadManager::startDownload):
2905         (WebKit::DownloadManager::convertHandleToDownload):
2906         (WebKit::DownloadManager::resumeDownload):
2907         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
2908         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
2909         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2910         (WebKit::NetworkBlobRegistry::registerBlobURL):
2911         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2912         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
2913         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2914         * NetworkProcess/NetworkLoad.cpp:
2915         (WebKit::NetworkLoad::didReceiveData):
2916         (WebKit::NetworkLoad::didReceiveBuffer):
2917         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2918         * NetworkProcess/NetworkProcess.cpp:
2919         (WebKit::fetchDiskCacheEntries):
2920         (WebKit::NetworkProcess::fetchWebsiteData):
2921         (WebKit::NetworkProcess::deleteWebsiteData):
2922         (WebKit::clearDiskCacheEntries):
2923         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2924         * NetworkProcess/NetworkResourceLoader.cpp:
2925         (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
2926         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2927         (WebKit::NetworkResourceLoader::retrieveCacheEntry):
2928         (WebKit::NetworkResourceLoader::didFinishLoading):
2929         (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
2930         (WebKit::NetworkResourceLoader::validateCacheEntry):
2931         * NetworkProcess/NetworkResourceLoader.h:
2932         * NetworkProcess/cache/NetworkCache.cpp:
2933         (WebKit::NetworkCache::Cache::retrieve):
2934         (WebKit::NetworkCache::Cache::store):
2935         (WebKit::NetworkCache::Cache::clear):
2936         * NetworkProcess/cache/NetworkCacheCoders.h:
2937         * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
2938         (WebKit::NetworkCache::Data::empty):
2939         (WebKit::NetworkCache::Data::subrange):
2940         (WebKit::NetworkCache::concatenate):
2941         (WebKit::NetworkCache::Data::adoptMap):
2942         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2943         (WebKit::NetworkCache::Entry::Entry):
2944         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2945         (WebKit::NetworkCache::runTaskInQueue):
2946         (WebKit::NetworkCache::fillDataFromReadBuffer):
2947         (WebKit::NetworkCache::IOChannel::readSyncInThread):
2948         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
2949         (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
2950         (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
2951         (WebKit::NetworkCache::SpeculativeLoad::didComplete):
2952         * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
2953         (WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry):
2954         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
2955         (WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::takeCacheEntry):
2956         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create):
2957         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::setExistingSubresourcesEntry):
2958         (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
2959         (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
2960         (WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
2961         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage):
2962         (WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
2963         (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
2964         (WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):
2965         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2966         (WebKit::NetworkCache::Statistics::queryWasEverRequested):
2967         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2968         (WebKit::NetworkCache::Storage::ReadOperation::finish):
2969         (WebKit::NetworkCache::Storage::synchronize):
2970         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2971         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2972         (WebKit::NetworkCache::Storage::retrieve):
2973         (WebKit::NetworkCache::Storage::store):
2974         (WebKit::NetworkCache::Storage::traverse):
2975         (WebKit::NetworkCache::Storage::clear):
2976         * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
2977         (WebKit::NetworkCache::SubresourcesEntry::SubresourcesEntry):
2978         (WebKit::NetworkCache::SubresourcesEntry::updateSubresourceKeys):
2979         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2980         (WebKit::NetworkDataTask::NetworkDataTask):
2981         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2982         (WebKit::NetworkProcess::clearDiskCache):
2983         * Platform/IPC/ArgumentCoders.h:
2984         (IPC::ArgumentCoder<WTF::Optional<T>>::decode):
2985         * Platform/IPC/ArgumentDecoder.cpp:
2986         (IPC::ArgumentDecoder::ArgumentDecoder):
2987         * Platform/IPC/ArgumentEncoder.cpp:
2988         (IPC::ArgumentEncoder::addAttachment):
2989         (IPC::ArgumentEncoder::releaseAttachments):
2990         * Platform/IPC/Attachment.cpp:
2991         (IPC::Attachment::encode):
2992         * Platform/IPC/Connection.cpp:
2993         (IPC::Connection::SyncMessageState::processIncomingMessage):
2994         (IPC::Connection::SyncMessageState::dispatchMessages):
2995         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
2996         (IPC::Connection::sendMessage):
2997         (IPC::Connection::sendSyncReply):
2998         (IPC::Connection::waitForMessage):
2999         (IPC::Connection::sendSyncMessage):
3000         (IPC::Connection::sendSyncMessageFromSecondaryThread):
3001         (IPC::Connection::waitForSyncReply):
3002         (IPC::Connection::processIncomingSyncReply):
3003         (IPC::Connection::processIncomingMessage):
3004         (IPC::Connection::sendOutgoingMessages):
3005         (IPC::Connection::dispatchSyncMessage):
3006         (IPC::Connection::enqueueIncomingMessage):
3007         (IPC::Connection::dispatchOneMessage):
3008         * Platform/IPC/Connection.h:
3009         (IPC::Connection::Identifier::Identifier):
3010         (IPC::Connection::send):
3011         (IPC::Connection::sendSync):
3012         * Platform/IPC/HandleMessage.h:
3013         (IPC::handleMessage):
3014         (IPC::handleMessageDelayed):
3015         * Platform/IPC/MessageDecoder.cpp:
3016         (IPC::MessageDecoder::MessageDecoder):
3017         (IPC::MessageDecoder::setImportanceAssertion):
3018         (IPC::MessageDecoder::unwrapForTesting):
3019         * Platform/IPC/MessageDecoder.h:
3020         (IPC::MessageDecoder::setMessageProcessingToken):
3021         * Platform/IPC/MessageEncoder.cpp:
3022         (IPC::MessageEncoder::wrapForTesting):
3023         * Platform/IPC/MessageRecorder.cpp:
3024         (IPC::MessageRecorder::recordOutgoingMessage):
3025         (IPC::MessageRecorder::recordIncomingMessage):
3026         (IPC::MessageRecorder::MessageProcessingToken::MessageProcessingToken):
3027         * Platform/IPC/MessageSender.cpp:
3028         (IPC::MessageSender::sendMessage):
3029         * Platform/IPC/MessageSender.h:
3030         (IPC::MessageSender::send):
3031         (IPC::MessageSender::sendSync):
3032         * Platform/IPC/glib/GSocketMonitor.cpp:
3033         (IPC::GSocketMonitor::start):
3034         * Platform/IPC/mac/ConnectionMac.mm:
3035         (IPC::Connection::open):
3036         (IPC::createMessageDecoder):
3037         (IPC::Connection::receiveSourceEventHandler):
3038         * Platform/IPC/unix/ConnectionUnix.cpp:
3039         (IPC::Connection::processMessage):
3040         * Platform/unix/SharedMemoryUnix.cpp:
3041         (WebKit::SharedMemory::Handle::decode):
3042         (WebKit::SharedMemory::Handle::releaseAttachment):
3043         (WebKit::SharedMemory::Handle::adoptAttachment):
3044         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
3045         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
3046         * PluginProcess/PluginProcess.cpp:
3047         (WebKit::PluginProcess::initializePluginProcess):
3048         * PluginProcess/WebProcessConnection.cpp:
3049         (WebKit::WebProcessConnection::addPluginControllerProxy):
3050         (WebKit::WebProcessConnection::createPluginInternal):
3051         * PluginProcess/mac/PluginProcessMac.mm:
3052         (WebKit::PluginProcess::platformInitializePluginProcess):
3053         * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
3054         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
3055         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
3056         (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
3057         (Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
3058         * Scripts/webkit/MessageReceiver-expected.cpp:
3059         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply):
3060         (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
3061         (Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply):
3062         (Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
3063         * Scripts/webkit/messages.py:
3064         (generate_message_handler):
3065         * Shared/API/APIArray.cpp:
3066         (API::Array::create):
3067         (API::Array::createStringArray):
3068         (API::Array::copy):
3069         * Shared/API/APIArray.h:
3070         * Shared/API/APIDictionary.cpp:
3071         (API::Dictionary::create):
3072         (API::Dictionary::Dictionary):
3073         (API::Dictionary::keys):
3074         * Shared/API/APIPageGroupHandle.cpp:
3075         (API::PageGroupHandle::create):
3076         (API::PageGroupHandle::PageGroupHandle):
3077         (API::PageGroupHandle::decode):
3078         * Shared/API/APIString.h:
3079         * Shared/API/APIURL.h:
3080         (API::URL::create):
3081         (API::URL::URL):
3082         * Shared/API/Cocoa/RemoteObjectInvocation.h:
3083         (WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
3084         * Shared/API/Cocoa/RemoteObjectInvocation.mm:
3085         (WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
3086         (WebKit::RemoteObjectInvocation::decode):
3087         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3088         (ensureObjectStream):
3089         (createEncodedObject):
3090         * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3091         (initializeMethod):
3092         (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]):
3093         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
3094         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
3095         * Shared/API/c/WKArray.cpp:
3096         (WKArrayCreate):
3097         (WKArrayCreateAdoptingValues):
3098         * Shared/API/c/WKDictionary.cpp:
3099         (WKDictionaryCreate):
3100         * Shared/API/c/WKSharedAPICast.h:
3101         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
3102         * Shared/APIWebArchive.mm:
3103         (API::WebArchive::WebArchive):
3104         (API::WebArchive::subresources):
3105         (API::WebArchive::subframeArchives):
3106         * Shared/AsyncRequest.cpp:
3107         (WebKit::AsyncRequest::AsyncRequest):
3108         (WebKit::AsyncRequest::setAbortHandler):
3109         * Shared/AsyncRequest.h:
3110         * Shared/BlockingResponseMap.h:
3111         (BlockingResponseMap::didReceiveResponse):
3112         * Shared/ChildProcessProxy.cpp:
3113         (WebKit::ChildProcessProxy::sendMessage):
3114         (WebKit::ChildProcessProxy::didFinishLaunching):
3115         * Shared/ChildProcessProxy.h:
3116         (WebKit::ChildProcessProxy::send):
3117         (WebKit::ChildProcessProxy::sendSync):
3118         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
3119         (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
3120         (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
3121         (WebKit::CoordinatedGraphicsScene::createLayer):
3122         (WebKit::CoordinatedGraphicsScene::syncRemoteContent):
3123         (WebKit::CoordinatedGraphicsScene::appendUpdate):
3124         * Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:
3125         (WebKit::ThreadSafeCoordinatedSurface::create):
3126         (WebKit::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
3127         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3128         (WebKit::CompositingRunLoop::CompositingRunLoop):
3129         (WebKit::CompositingRunLoop::callOnCompositingRunLoop):
3130         (WebKit::ThreadedCompositor::callOnCompositingThread):
3131         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3132         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
3133         (WebKit::XPCServiceInitializer):
3134         * Shared/Plugins/Netscape/PluginInformation.cpp:
3135         (WebKit::createPluginInformationDictionary):
3136         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
3137         (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
3138         * Shared/SessionTracker.cpp:
3139         (WebKit::SessionTracker::setSession):
3140         * Shared/UserData.cpp:
3141         (WebKit::UserData::UserData):
3142         (WebKit::transformGraph):
3143         (WebKit::UserData::decode):
3144         * Shared/WebBackForwardListItem.cpp:
3145         (WebKit::WebBackForwardListItem::create):
3146         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3147         * Shared/WebBackForwardListItem.h:
3148         (WebKit::WebBackForwardListItem::setPageState):
3149         * Shared/WebCompiledContentExtension.cpp:
3150         (WebKit::WebCompiledContentExtension::create):
3151         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
3152         * Shared/WebCompiledContentExtensionData.h:
3153         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
3154         * Shared/WebContextMenuItem.cpp:
3155         (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
3156         * Shared/WebCoreArgumentCoders.cpp:
3157         (IPC::ArgumentCoder<UserStyleSheet>::decode):
3158         (IPC::ArgumentCoder<UserScript>::decode):
3159         (IPC::ArgumentCoder<FilterOperations>::decode):
3160         (IPC::ArgumentCoder<BlobPart>::decode):
3161         * Shared/WebKeyboardEvent.cpp:
3162         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
3163         * Shared/WebPreferencesStore.h:
3164         (WebKit::WebPreferencesStore::Value::Value):
3165         * Shared/WebRenderLayer.cpp:
3166         (WebKit::WebRenderLayer::createArrayFromLayerList):
3167         * Shared/WebRenderObject.cpp:
3168         (WebKit::WebRenderObject::WebRenderObject):
3169         * Shared/WebTouchEvent.cpp:
3170         (WebKit::WebTouchEvent::WebTouchEvent):
3171         * Shared/efl/WebEventFactory.cpp:
3172         (WebKit::WebEventFactory::createWebTouchEvent):
3173         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
3174         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
3175         * Shared/gtk/NativeWebTouchEventGtk.cpp:
3176         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
3177         * Shared/gtk/WebContextMenuItemGtk.cpp:
3178         (WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
3179         * Shared/gtk/WebEventFactory.cpp:
3180         (WebKit::WebEventFactory::createWebKeyboardEvent):
3181         (WebKit::WebEventFactory::createWebTouchEvent):
3182         * Shared/linux/SeccompFilters/OpenSyscall.cpp:
3183         (WebKit::OpenSyscall::createFromOpenatContext):
3184         (WebKit::OpenSyscall::createFromCreatContext):
3185         (WebKit::OpenSyscallResult::encode):
3186         * Shared/mac/ObjCObjectGraph.mm:
3187         (WebKit::ObjCObjectGraph::decode):
3188         * Shared/mac/RemoteLayerBackingStore.mm:
3189         (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
3190         (WebKit::RemoteLayerBackingStore::Buffer::discard):
3191         * Shared/mac/RemoteLayerTreeTransaction.h:
3192         (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
3193         * Shared/mac/RemoteLayerTreeTransaction.mm:
3194         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
3195         (WebKit::RemoteLayerTreeTransaction::decode):
3196         (WebKit::RemoteLayerTreeTransaction::setCreatedLayers):
3197         (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs):
3198         (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore):
3199         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3200         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3201         * UIProcess/API/APIProcessPoolConfiguration.h:
3202         * UIProcess/API/APISessionState.cpp:
3203         (API::SessionState::create):
3204         (API::SessionState::SessionState):
3205         * UIProcess/API/APIUserContentExtension.cpp:
3206         (API::UserContentExtension::UserContentExtension):
3207         * UIProcess/API/APIUserContentExtension.h:
3208         * UIProcess/API/APIUserContentExtensionStore.cpp:
3209         (API::compiledToFile):
3210         (API::createExtension):
3211         (API::UserContentExtensionStore::compileContentExtension):
3212         * UIProcess/API/APIUserScript.h:
3213         * UIProcess/API/APIWebsiteDataRecord.cpp:
3214         (API::WebsiteDataRecord::create):
3215         (API::WebsiteDataRecord::WebsiteDataRecord):
3216         * UIProcess/API/APIWebsiteDataStore.cpp:
3217         (API::WebsiteDataStore::create):
3218         (API::WebsiteDataStore::WebsiteDataStore):
3219         * UIProcess/API/C/WKApplicationCacheManager.cpp:
3220         (WKApplicationCacheManagerGetApplicationCacheOrigins):
3221         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3222         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
3223         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
3224         * UIProcess/API/C/WKPage.cpp:
3225         (WKPageCopySessionState):
3226         (WKPageRestoreFromSessionState):
3227         (WKPageSetPageContextMenuClient):
3228         (WKPageSetPageFindMatchesClient):
3229         (WKPageSetPageLoaderClient):
3230         (WebKit::RunJavaScriptAlertResultListener::create):
3231         (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
3232         (WebKit::RunJavaScriptConfirmResultListener::create):
3233         (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
3234         (WebKit::RunJavaScriptPromptResultListener::create):
3235         (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
3236         (WKPageSetPageUIClient):
3237         (WKPageSetPageNavigationClient):
3238         (WKPageCopyRelatedPages):
3239         * UIProcess/API/C/WKResourceCacheManager.cpp:
3240         (WKResourceCacheManagerGetCacheOrigins):
3241         * UIProcess/API/C/WKSessionStateRef.cpp:
3242         (WKSessionStateCreateFromData):
3243         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3244         (WKContextGetInfoForInstalledPlugIns):
3245         * UIProcess/API/C/mac/WKPagePrivateMac.mm:
3246         (-[WKObservablePageState initWithPage:]):
3247         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
3248         (createWKArray):
3249         * UIProcess/API/Cocoa/WKWebView.mm:
3250         (-[WKWebView initWithFrame:configuration:]):
3251         (-[WKWebView _takeViewSnapshot]):
3252         (-[WKWebView _restoreFromSessionStateData:]):
3253         (-[WKWebView _setInputDelegate:]):
3254         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3255         (LazyInitialized::set):
3256         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3257         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3258         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3259         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
3260         * UIProcess/API/Cocoa/_WKSessionState.mm:
3261         (-[_WKSessionState _initWithSessionState:]):
3262         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
3263         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
3264         * UIProcess/API/efl/ewk_database_manager.cpp:
3265         (EwkDatabaseManager::getDatabaseOrigins):
3266         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
3267         (webkitContextMenuItemToWebContextMenuItemGtk):
3268         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3269         (webkit_file_chooser_request_select_files):
3270         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
3271         (WebKitNotificationProvider::notificationCloseCallback):
3272         * UIProcess/API/gtk/WebKitWebContext.cpp:
3273         (webkit_web_context_prefetch_dns):
3274         (webkitWebContextCreatePageForWebView):
3275         * UIProcess/API/gtk/WebKitWebView.cpp:
3276         (webkit_web_view_get_snapshot):
3277         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3278         (webkitWebViewBaseTouchEvent):
3279         (webkitWebViewBaseCreateWebPage):
3280         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
3281         (webkitWebsiteDataManagerCreate):
3282         (webkitWebsiteDataManagerGetDataStore):
3283         * UIProcess/API/mac/WKView.mm:
3284         (-[WKView initWithFrame:processPool:configuration:webView:]):
3285         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3286         (-[WKView initWithFrame:configurationRef:]):
3287         * UIProcess/Cocoa/NavigationState.mm:
3288         (WebKit::tryAppLink):
3289         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
3290         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
3291         * UIProcess/Cocoa/WebViewImpl.mm:
3292         (WebKit::WebViewImpl::WebViewImpl):
3293         (WebKit::WebViewImpl::takeViewSnapshot):
3294         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3295         (WebKit::CoordinatedLayerTreeHostProxy::dispatchUpdate):
3296         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3297         (WebKit::DatabaseProcessProxy::fetchWebsiteData):
3298         (WebKit::DatabaseProcessProxy::deleteWebsiteData):
3299         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
3300         * UIProcess/GenericCallback.h:
3301         (WebKit::CallbackMap::put):
3302         * UIProcess/InspectorServer/WebSocketServer.cpp:
3303         (WebKit::WebSocketServer::didAcceptConnection):
3304         * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
3305         (WebKit::connectionCallback):
3306         * UIProcess/Network/NetworkProcessProxy.cpp:
3307         (WebKit::NetworkProcessProxy::fetchWebsiteData):
3308         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3309         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
3310         * UIProcess/Notifications/WebNotificationProvider.cpp:
3311         (WebKit::WebNotificationProvider::clearNotifications):
3312         * UIProcess/PageLoadState.cpp:
3313         (WebKit::PageLoadState::Transaction::Transaction):
3314         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
3315         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
3316         * UIProcess/Plugins/PluginProcessManager.cpp:
3317         (WebKit::PluginProcessManager::pluginProcessToken):
3318         (WebKit::PluginProcessManager::fetchWebsiteData):
3319         (WebKit::PluginProcessManager::deleteWebsiteData):
3320         (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
3321         * UIProcess/Plugins/PluginProcessProxy.cpp:
3322         (WebKit::PluginProcessProxy::fetchWebsiteData):
3323         (WebKit::PluginProcessProxy::deleteWebsiteData):
3324         (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
3325         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3326         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
3327         * UIProcess/StatisticsRequest.cpp:
3328         (WebKit::StatisticsRequest::completedRequest):
3329         * UIProcess/Storage/LocalStorageDatabase.cpp:
3330         (WebKit::LocalStorageDatabase::create):
3331         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
3332         * UIProcess/Storage/StorageManager.cpp:
3333         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
3334         (WebKit::StorageManager::StorageArea::create):
3335         (WebKit::StorageManager::StorageArea::StorageArea):
3336         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
3337         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
3338         (WebKit::StorageManager::getSessionStorageOrigins):
3339         (WebKit::StorageManager::getLocalStorageOrigins):
3340         (WebKit::StorageManager::getLocalStorageOriginDetails):
3341         (WebKit::StorageManager::createTransientLocalStorageMap):
3342         (WebKit::StorageManager::createSessionStorageMap):
3343         * UIProcess/UserContent/WebScriptMessageHandler.cpp:
3344         (WebKit::WebScriptMessageHandler::create):
3345         (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
3346         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3347         (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
3348         * UIProcess/ViewGestureController.cpp:
3349         (WebKit::ViewGestureController::SnapshotRemovalTracker::start):
3350         (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately):
3351         * UIProcess/WebBackForwardList.cpp:
3352         (WebKit::WebBackForwardList::addItem):
3353         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
3354         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
3355         (WebKit::WebBackForwardList::removeAllItems):
3356         (WebKit::WebBackForwardList::clear):
3357         (WebKit::WebBackForwardList::restoreFromState):
3358         * UIProcess/WebCookieManagerProxy.cpp:
3359         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
3360         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
3361         * UIProcess/WebFormClient.cpp:
3362         (WebKit::WebFormClient::willSubmitForm):
3363         * UIProcess/WebFrameListenerProxy.h:
3364         (WebKit::WebFrameListenerProxy::setNavigation):
3365         * UIProcess/WebFrameProxy.h:
3366         (WebKit::WebFrameProxy::contentFilterDidBlockLoad):
3367         * UIProcess/WebGrammarDetail.cpp:
3368         (WebKit::WebGrammarDetail::guesses):
3369         * UIProcess/WebInspectorProxy.cpp:
3370         (WebKit::WebInspectorProxy::createInspectorPage):
3371         * UIProcess/WebMediaCacheManagerProxy.cpp:
3372         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
3373         * UIProcess/WebPageProxy.cpp:
3374         (WebKit::ExceededDatabaseQuotaRecords::add):
3375         (WebKit::WebPageProxy::create):
3376         (WebKit::WebPageProxy::WebPageProxy):
3377         (WebKit::WebPageProxy::setHistoryClient):
3378         (WebKit::WebPageProxy::setNavigationClient):
3379         (WebKit::WebPageProxy::setLoaderClient):
3380         (WebKit::WebPageProxy::setPolicyClient):
3381         (WebKit::WebPageProxy::setFormClient):
3382         (WebKit::WebPageProxy::setUIClient):
3383         (WebKit::WebPageProxy::setFindClient):
3384         (WebKit::WebPageProxy::setFindMatchesClient):
3385         (WebKit::WebPageProxy::setDiagnosticLoggingClient):
3386         (WebKit::WebPageProxy::setContextMenuClient):
3387         (WebKit::WebPageProxy::reattachToWebProcessForReload):
3388         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3389         (WebKit::WebPageProxy::loadRequest):
3390         (WebKit::WebPageProxy::loadFile):
3391         (WebKit::WebPageProxy::loadData):
3392         (WebKit::WebPageProxy::loadHTMLString):
3393         (WebKit::WebPageProxy::reload):
3394         (WebKit::WebPageProxy::didChangeBackForwardList):
3395         (WebKit::WebPageProxy::setInitialFocus):
3396         (WebKit::WebPageProxy::validateCommand):
3397         (WebKit::WebPageProxy::handleWheelEvent):
3398         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
3399         (WebKit::WebPageProxy::restoreFromSessionState):
3400         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
3401         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
3402         (WebKit::WebPageProxy::getSourceForFrame):
3403         (WebKit::WebPageProxy::getContentsAsString):
3404         (WebKit::WebPageProxy::getBytecodeProfile):
3405         (WebKit::WebPageProxy::getContentsAsMHTMLData):
3406         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
3407         (WebKit::WebPageProxy::getSelectionAsWebArchiveData):
3408         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
3409         (WebKit::WebPageProxy::getResourceDataFromFrame):
3410         (WebKit::WebPageProxy::getWebArchiveOfFrame):
3411         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3412         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
3413         (WebKit::WebPageProxy::decidePolicyForResponse):
3414         (WebKit::WebPageProxy::sendMessage):
3415         (WebKit::WebPageProxy::exceededDatabaseQuota):
3416         (WebKit::WebPageProxy::getMarkedRangeAsync):
3417         (WebKit::WebPageProxy::getSelectedRangeAsync):
3418         (WebKit::WebPageProxy::characterIndexForPointAsync):
3419         (WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
3420         (WebKit::WebPageProxy::takeSnapshot):
3421         * UIProcess/WebProcessPool.cpp:
3422         (WebKit::WebProcessPool::setHistoryClient):
3423         (WebKit::WebProcessPool::setDownloadClient):
3424         (WebKit::WebProcessPool::createWebPage):
3425         (WebKit::WebProcessPool::getStatistics):
3426         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
3427         * UIProcess/WebProcessProxy.cpp:
3428         (WebKit::WebProcessProxy::createWebPage):
3429         (WebKit::WebProcessProxy::addBackForwardItem):
3430         (WebKit::WebProcessProxy::fetchWebsiteData):
3431         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
3432         (WebKit::WebsiteDataRecord::add):
3433         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3434         (WebKit::WebsiteDataStore::create):
3435         (WebKit::WebsiteDataStore::WebsiteDataStore):
3436         (WebKit::WebsiteDataStore::fetchData):
3437         (WebKit::WebsiteDataStore::removeData):
3438         (WebKit::WebsiteDataStore::mediaKeyOrigins):
3439         * UIProcess/efl/InputMethodContextEfl.cpp:
3440         (WebKit::InputMethodContextEfl::InputMethodContextEfl):
3441         * UIProcess/efl/InputMethodContextEfl.h:
3442         (WebKit::InputMethodContextEfl::create):
3443         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
3444         (WebKit::WebContextMenuProxyEfl::showContextMenu):
3445         * UIProcess/efl/WebUIPopupMenuClient.cpp:
3446         (WebUIPopupMenuClient::showPopupMenu):
3447         * UIProcess/gtk/InputMethodFilter.cpp:
3448         (WebKit::InputMethodFilter::filterKeyEvent):
3449         * UIProcess/gtk/KeyBindingTranslator.cpp:
3450         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
3451         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
3452         (WebKit::XDamageNotifier::add):
3453         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
3454         (WebKit::RedirectedXCompositeWindow::surface):
3455         * UIProcess/ios/WKActionSheetAssistant.mm:
3456         (-[WKActionSheetAssistant showImageSheet]):
3457         (-[WKActionSheetAssistant showLinkSheet]):
3458         * UIProcess/ios/WKContentView.mm:
3459         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
3460         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
3461         * UIProcess/ios/WKContentViewInteraction.mm:
3462         (-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
3463         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3464         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
3465         (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
3466         * UIProcess/ios/WKPDFView.mm:
3467         (-[WKPDFView actionSheetAssistant:decideActionsForElement:defaultActions:]):
3468         * UIProcess/ios/WebPageProxyIOS.mm:
3469         (WebKit::WebPageProxy::selectWithGesture):
3470         (WebKit::WebPageProxy::updateSelectionWithTouches):
3471         (WebKit::WebPageProxy::requestAutocorrectionData):
3472         (WebKit::WebPageProxy::applyAutocorrection):
3473         (WebKit::WebPageProxy::executeEditCommand):
3474         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
3475         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
3476         (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
3477         (WebKit::WebPageProxy::selectPositionAtPoint):
3478         (WebKit::WebPageProxy::beginSelectionInDirection):
3479         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
3480         (WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
3481         (WebKit::WebPageProxy::requestDictationContext):
3482         (WebKit::WebPageProxy::requestAutocorrectionContext):
3483         (WebKit::WebPageProxy::getLookupContextAtPoint):
3484         (WebKit::WebPageProxy::selectWithTwoTouches):
3485         (WebKit::WebPageProxy::moveSelectionByOffset):
3486         (WebKit::WebPageProxy::focusNextAssistedNode):
3487         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3488         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3489         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
3490         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3491         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
3492         * UIProcess/mac/LegacySessionStateCoding.cpp:
3493         (WebKit::HistoryEntryDataEncoder::finishEncoding):
3494         (WebKit::decodeFormData):
3495         (WebKit::decodeBackForwardTreeNode):
3496         (WebKit::decodeSessionHistoryEntries):
3497         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3498         (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
3499         * UIProcess/mac/ViewGestureController.h:
3500         (WebKit::ViewGestureController::setCustomSwipeViews):
3501         * UIProcess/mac/ViewGestureControllerMac.mm:
3502         (WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
3503         * UIProcess/mac/ViewSnapshotStore.mm:
3504         (WebKit::ViewSnapshot::create):
3505         (WebKit::ViewSnapshot::ViewSnapshot):
3506         (WebKit::ViewSnapshot::setSurface):
3507         * UIProcess/mac/WebPageProxyMac.mm:
3508         (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
3509         (WebKit::WebPageProxy::fontAtSelection):
3510         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3511         (contextMenuItems):
3512         (WKBundlePageCopyOriginsWithApplicationCache):
3513         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3514         (WKBundlePageOverlayCreate):
3515         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
3516         (EwkExtension::didCreatePage):
3517         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3518         (webkitFrameGetOrCreate):
3519         (didInitiateLoadForResource):
3520         (willSendRequestForFrame):
3521         (didReceiveResponseForResource):
3522         (didReceiveContentLengthForResource):
3523         (didFinishLoadForResource):
3524         (didFailLoadForResource):
3525         (webkitWebPageDidReceiveMessage):
3526         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3527         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
3528         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3529         (WebKit::InjectedBundle::addUserScript):
3530         (WebKit::InjectedBundle::addUserStyleSheet):
3531         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
3532         (WebKit::InjectedBundleBackForwardListItem::children):
3533         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
3534         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
3535         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3536         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
3537         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
3538         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
3539         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
3540         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
3541         * WebProcess/Network/WebResourceLoader.cpp:
3542         (WebKit::WebResourceLoader::willSendRequest):
3543         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3544         (WebKit::NPN_PostURL):
3545         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3546         (WebKit::NetscapePlugin::scheduleTimer):
3547         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3548         (WebKit::convertStringToKeyCodes):
3549         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
3550         (WebKit::PDFPlugin::PDFPlugin):
3551         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3552         (-[WKPDFHUDAnimationDelegate initWithAnimationCompletionHandler:]):
3553         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
3554         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement):
3555         * WebProcess/Storage/StorageAreaMap.cpp:
3556         (WebKit::StorageAreaMap::create):
3557         (WebKit::StorageAreaMap::StorageAreaMap):
3558         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3559         (WebKit::StorageNamespaceImpl::storageArea):
3560         * WebProcess/UserContent/WebUserContentController.cpp:
3561         (WebKit::WebUserContentController::addUserContentExtensions):
3562         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
3563         (WebKit::toHTTPBody):
3564         (WebKit::toFrameState):
3565         (WebKit::applyFrameState):
3566         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3567         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3568         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3569         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3570         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
3571         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
3572         * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
3573         (WebKit::WebPasteboardOverrides::addOverride):
3574         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3575         (WebKit::WebEditorClient::executePendingEditorCommands):
3576         * WebProcess/WebPage/FindController.cpp:
3577         (WebKit::FindController::findStringMatches):
3578         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
3579         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
3580         * WebProcess/WebPage/WebFrame.cpp:
3581         (WebKit::WebFrame::createSubframe):
3582         (WebKit::WebFrame::create):
3583         (WebKit::WebFrame::WebFrame):
3584         (WebKit::WebFrame::didReceivePolicyDecision):
3585         (WebKit::WebFrame::childFrames):
3586         (WebKit::WebFrame::createSelectionSnapshot):
3587         * WebProcess/WebPage/WebPage.cpp:
3588         (WebKit::WebPage::setInjectedBundleContextMenuClient):
3589         (WebKit::WebPage::setInjectedBundleFormClient):
3590         (WebKit::WebPage::setInjectedBundleUIClient):
3591         (WebKit::WebPage::trackedRepaintRects):
3592         (WebKit::WebPage::createDocumentLoader):
3593         * WebProcess/WebPage/WebPageGroupProxy.cpp:
3594         (WebKit::WebPageGroupProxy::addUserContentExtension):
3595         * WebProcess/WebPage/WebPageOverlay.cpp:
3596         (WebKit::WebPageOverlay::create):
3597         (WebKit::WebPageOverlay::WebPageOverlay):
3598         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3599         (WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
3600         * WebProcess/WebPage/ios/WebPageIOS.mm:
3601         (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF):
3602         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
3603         (WebKit::PlatformCAAnimationRemote::setTimingFunction):
3604         (WebKit::PlatformCAAnimationRemote::setValues):
3605         (WebKit::PlatformCAAnimationRemote::setTimingFunctions):
3606         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3607         (WebKit::RemoteLayerTreeContext::layerWasCreated):
3608         (WebKit::RemoteLayerTreeContext::buildTransaction):
3609         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3610         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3611         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
3612         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
3613         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
3614         * WebProcess/WebProcess.cpp:
3615         (WebKit::WebProcess::initializeWebProcess):
3616         (WebKit::WebProcess::transformObjectsToHandles):
3617         * WebProcess/cocoa/WebProcessCocoa.mm:
3618         (WebKit::WebProcess::platformInitializeWebProcess):
3619         * WebProcess/ios/WebVideoFullscreenManager.mm:
3620         (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
3621         (WebKit::WebVideoFullscreenManager::createModelAndInterface):
3622         (WebKit::WebVideoFullscreenManager::setSeekableRanges):
3623         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
3624         (webkitSoupRequestInputStreamDidFailWithError):
3625
3626 2016-01-01  Simon Fraser  <simon.fraser@apple.com>
3627
3628         Fix the iOS and EFL builds, after an over-eager commit-queue commit.
3629
3630         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3631         (WebKit::WebFrameLoaderClient::restoreViewState):
3632         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3633         (WebKit::WebPage::restorePageState):
3634
3635 2016-01-01  Simon Fraser  <simon.fraser@apple.com>
3636
3637         Fix naming in HistoryItem to refer to scrollPositions
3638         https://bugs.webkit.org/show_bug.cgi?id=152646
3639
3640         Reviewed by Zalan Bujtas.
3641         
3642         HistoryItem stores a scrollPosition, so call it that.
3643         
3644         No behavior change.
3645
3646         * Shared/SessionState.cpp:
3647         (WebKit::FrameState::encode):
3648         (WebKit::FrameState::decode):
3649         * Shared/SessionState.h:
3650         * UIProcess/mac/LegacySessionStateCoding.cpp:
3651         (WebKit::encodeFrameStateNode):
3652         (WebKit::decodeBackForwardTreeNode):
3653         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
3654         (WebKit::toFrameState):
3655         (WebKit::applyFrameState):
3656
3657 2016-01-01  Simon Fraser  <simon.fraser@apple.com>
3658
3659         Fix reload and programmatic scrolling in RTL documents
3660         https://bugs.webkit.org/show_bug.cgi?id=152639
3661
3662         Reviewed by Zalan Bujtas.
3663
3664         Reloading a left-scrolled RTL document would cause the content to appear
3665         at an odd offset, and programmatic sideways scrolls in RTL documents also
3666         jumped to the wrong location.
3667         
3668         Fix by resolving offset/position confusion in ScrollableArea::scrollPositionChanged()
3669         and the scrolling tree.
3670         
3671         ScrollableArea::scrollPositionChanged() was erroneously passing a scrollPosition
3672         to setScrollOffset(). 
3673         
3674         ScrollingTreeFrameScrollingNode* were confused about offsets and positions. It
3675         turns out that the layer position is just -scrollPosition, but minimumScrollPosition()
3676         and maximumScrollPosition() need fixing to return positions, not offsets.
3677         
3678         ScrollingTreeFrameScrollingNode::viewToContentsOffset() was also doing incorrect
3679         math with scrollOrigin, which was detected by a failing test.
3680         
3681         Add more logging to the Scrolling channel.
3682
3683         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
3684         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
3685         (WebKit::PDFPlugin::setScrollOffset):
3686
3687 2016-01-01  Michael Catanzaro  <mcatanzaro@igalia.com>
3688
3689         [SOUP] REGRESSION(r192761): Broke resource URIs for applications that use g_resource_load in a web extension
3690         https://bugs.webkit.org/show_bug.cgi?id=152634
3691
3692         Reviewed by Carlos Garcia Campos.
3693
3694         Load GResource URIs locally, not in the network process. Applications expect calling
3695         g_resource_load in a web extension to make it possible to load resource URIs, but that
3696         doesn't work now that the network process is in use. Loading them locally solves this.
3697
3698         * WebProcess/Network/WebLoaderStrategy.cpp:
3699         (WebKit::WebLoaderStrategy::scheduleLoad):
3700
3701 2016-01-01  Jeff Miller  <jeffm@apple.com>
3702
3703         Update user-visible copyright strings to include 2016
3704         https://bugs.webkit.org/show_bug.cgi?id=152531
3705
3706         Reviewed by Alexey Proskuryakov.
3707
3708         * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3709         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
3710         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
3711         * Info.plist:
3712         * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3713         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist:
3714         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
3715         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist:
3716         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
3717         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
3718         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3719         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist:
3720         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3721         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
3722         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3723         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
3724         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
3725         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
3726         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
3727         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
3728
3729 2015-12-31  Simon Fraser  <simon.fraser@apple.com>
3730
3731         Rename documentScrollOffsetRelativeTo* functions
3732         https://bugs.webkit.org/show_bug.cgi?id=152632
3733
3734         Reviewed by Zalan Bujtas.
3735
3736         ScrollView::documentScrollOffsetRelativeTo* functions return scroll positions,
3737         not offsets, so rename them and fix their return types, and fix callers. Make
3738         their code more similar.
3739
3740         * WebProcess/WebPage/WebPage.cpp:
3741         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
3742         (WebKit::WebPage::plugInIntersectsSearchRect):
3743
3744 2015-12-31  Simon Fraser  <simon.fraser@apple.com>
3745
3746         [iOS WK2] Fix incorrect scrollPosition handling
3747         https://bugs.webkit.org/show_bug.cgi?id=152630
3748
3749         Reviewed by Zalan Bujtas.
3750         
3751         WebPage::updateVisibleContentRects() was setting the ScrollView's scroll position
3752         to a scrollOffset, which was counteracted by ScrollView::unobscuredContentRect()
3753         adding the scrollOrigin to the scrollPosition, which resulted in the correct
3754         rects, but an incorrect scrollPosition. Fix.
3755
3756         * WebProcess/WebPage/ios/WebPageIOS.mm:
3757         (WebKit::WebPage::updateVisibleContentRects):
3758
3759 2015-12-31  Michael Catanzaro  <mcatanzaro@igalia.com>
3760
3761         Unreviewed, fix a log message
3762
3763         * WebProcess/Network/WebResourceLoader.cpp:
3764         (WebKit::WebResourceLoader::didReceiveResponse):
3765
3766 2015-12-31  David Kilzer  <ddkilzer@apple.com>
3767
3768         Stop using USE(CFNETWORK) path on iOS
3769         https://bugs.webkit.org/show_bug.cgi?id=142540
3770
3771         Step 1/2: Do everything but turn off USE(CFNETWORK) internally.
3772
3773         Original patch by Antti Koivisto <antti@apple.com> on 2015-03-10
3774         Reviewed by Daniel Bates.
3775
3776         * NetworkProcess/Downloads/ios/DownloadIOS.mm: This is now the
3777         USE(CFNETWORK) && !USE(NETWORK_SESSION) code path.
3778         * NetworkProcess/Downloads/mac/DownloadMac.mm: This is now the
3779         !USE(CFNETWORK) && !USE(NETWORK_SESSION) code path.  Make use of
3780         NSURLDownloadSPI.h.  Ignore a deprecated delcaration warning now
3781         that we're using actual header declarations internally.
3782         * NetworkProcess/NetworkProcess.cpp:
3783         (WebKit::NetworkProcess::initializeNetworkProcess): Update for
3784         iOS to use NSURLConnection loader.
3785
3786 2015-12-31  Andy Estes  <aestes@apple.com>
3787
3788         Fix warnings uncovered by migrating to WTF_MOVE
3789         https://bugs.webkit.org/show_bug.cgi?id=152601
3790
3791         Reviewed by Daniel Bates.
3792
3793         * UIProcess/API/APIUIClient.h:
3794         (API::UIClient::actionsForElement): Moving a return value passed to the function by value is redundant, since it
3795         will be implicitly moved in this case.
3796         * UIProcess/Cocoa/UIDelegate.mm:
3797         (WebKit::UIDelegate::UIClient::actionsForElement): Ditto.
3798
3799 2015-12-30  Simon Fraser  <simon.fraser@apple.com>
3800
3801         Add explicit conversions between scrollOffset and scrollPostion, and use them in a few places
3802         https://bugs.webkit.org/show_bug.cgi?id=152594
3803
3804         Reviewed by Sam Weinig.
3805
3806         Add functions to ScrollableArea to convert between scrollPosition and scrollOffset,
3807         and use them in places where code did the math with scrollOrigin.
3808
3809         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3810         (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
3811         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3812         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
3813
3814 2015-12-30  Zan Dobersek  <zdobersek@igalia.com>
3815
3816         [TexMap] Clean up TextureMapperAnimation, TextureMapperAnimations
3817         https://bugs.webkit.org/show_bug.cgi?id=152112
3818
3819         Reviewed by Darin Adler.
3820
3821         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3822         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
3823
3824 2015-12-29  Simon Fraser  <simon.fraser@apple.com>
3825
3826         Remove ScrollView::scrollOffset() in preparation for scrollOffset vs. scrollPosition clarification
3827         https://bugs.webkit.org/show_bug.cgi?id=152589
3828
3829         Reviewed by Sam Weinig.
3830
3831         Current code uses scrollOffset vs. scrollPosition interchangeably, and confusingly.
3832         Longer term, I plan to make "scrollPosition" be the value that is relative to the 
3833         contents, i.e. affected by scrollOrigin, and "scrollOffset" be the zero-based value
3834         that's used to set scrollbar values.
3835         
3836         To prepare for this, remove ScrollView::scrollOffset(), which is just the
3837         scrollPosition as an IntSize.
3838         
3839         Add some typedefs in ScrollableArea, which will slowly propagate through the
3840         code as position vs. offset is clarified.
3841
3842         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3843         (WebKit::InjectedBundleRangeHandle::renderedImage):
3844         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
3845         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
3846         (WebKit::PDFPlugin::scrollPosition):
3847         (WebKit::PDFPlugin::minimumScrollPosition):
3848         (WebKit::PDFPlugin::maximumScrollPosition):
3849         * WebProcess/WebPage/WebFrame.cpp:
3850         (WebKit::WebFrame::scrollOffset):
3851         * WebProcess/WebPage/WebPage.cpp:
3852         (WebKit::WebPage::scrollMainFrameIfNotAtMaxScrollPosition):
3853         (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
3854
3855 2015-12-25  Andy Estes  <aestes@apple.com>
3856
3857         Stop moving local objects in return statements
3858         https://bugs.webkit.org/show_bug.cgi?id=152557
3859
3860         Reviewed by Brady Eidson.
3861
3862         Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.
3863
3864         Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
3865         I found these issues by temporarily replacing WTF::move with std::move and recompiling.
3866
3867         * UIProcess/WebPageProxy.cpp:
3868         (WebKit::ExceededDatabaseQuotaRecords::createRecord):
3869
3870 2015-12-26  Joonghun Park  <jh718.park@samsung.com>
3871
3872         [WK2][EFL] Use eina_file_path_join at platformDefaultIconDatabasePath in WebProcessPoolEfl
3873         https://bugs.webkit.org/show_bug.cgi?id=152565
3874
3875         Reviewed by Gyuyoung Kim.
3876
3877         Use eina_file_path_join and EINA_PATH_SEP_S at platformDefaultIconDatabasePath
3878         instead of operator+ and separator "/" respectively
3879         to concatenate paths.
3880
3881         * UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp:
3882         * UIProcess/efl/WebProcessPoolEfl.cpp:
3883         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
3884
3885 2015-12-25  David Kilzer  <ddkilzer@apple.com>
3886
3887         ResourceError should store failingURL as URL instead of String to avoid reparsing and to address FIXME comments in ResourceErrorCF.cpp and ResourceErrorMac.mm
3888         <http://webkit.org/b/146391>
3889
3890         Reviewed by Antti Koivisto.
3891
3892         * NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp:
3893         (WebKit::platformDownloadNetworkError):
3894         * NetworkProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp:
3895         (WebKit::platformDownloadNetworkError):
3896         * NetworkProcess/Downloads/soup/DownloadSoup.cpp:
3897         (WebKit::DownloadClient::didReceiveResponse):
3898         * NetworkProcess/Downloads/soup/DownloadSoupErrors.h:
3899         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3900         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
3901         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
3902         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
3903         (LoaderClient::didFailProvisionalLoadWithErrorForFrame):
3904         (LoaderClient::didFailLoadWithErrorForFrame):
3905         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
3906         (webkit_uri_scheme_request_finish_error):
3907         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
3908         (WebKit::internalError):
3909         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
3910         (WebKit::internalError):
3911         - Update for type change of 'failingURL' argument to
3912           ResourceError().
3913
3914 2015-12-23  Simon Fraser  <simon.fraser@apple.com>
3915
3916         Use "constrainedBetween" in more places
3917         https://bugs.webkit.org/show_bug.cgi?id=152543
3918
3919         Reviewed by Zalan Bujtas.
3920
3921         Replace code that contrains points via shrunkTo/expandedTo() with calls
3922         to constrainedBetween(), and implement constrainedBetween() on IntPoint,
3923         FloatPoint and LayoutPoint.
3924
3925         Convert some functions that return points to more modern syntax.
3926
3927         * UIProcess/API/Cocoa/WKWebView.mm:
3928         (constrainContentOffset):
3929
3930 2015-12-22  Hunseop Jeong  <hs85.jeong@samsung.com>
3931
3932         [EFL] ewk_application_cache_manager test failed after r193812
3933         https://bugs.webkit.org/show_bug.cgi?id=152498
3934
3935         Reviewed by Gyuyoung Kim.
3936
3937         Need to enable the offline_web_application_cache for the ewk_application_cache_manager test.
3938
3939         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
3940         (TEST_F):
3941
3942 2015-12-22  Andy Estes  <aestes@apple.com>
3943
3944         [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
3945         https://bugs.webkit.org/show_bug.cgi?id=152463
3946
3947         Reviewed by Alexey Proskuryakov.
3948
3949         Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward
3950         declared in CFNetworkSPI.h.
3951
3952         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3953         (WebKit::initializeNetworkSettings):
3954         * NetworkProcess/mac/NetworkProcessMac.mm:
3955         (WebKit::overrideSystemProxies):
3956         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3957         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
3958         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3959         (InitWebCoreSystemInterface):
3960
3961 2015-12-22  Brent Fulgham  <bfulgham@apple.com>
3962
3963         Allow JavaScript to iterate over plugins for local SecurityOrigins
3964         https://bugs.webkit.org/show_bug.cgi?id=152489
3965
3966         Reviewed by Alexey Proskuryakov.
3967
3968         The 'getWebVisiblePluginInfo' is filtering plugins, even when we want to list
3969         all plugins. To avoid this, we check the Document's SecurityOrigin. If no such
3970         origin exists, we construct a SecurityOrigin from the URL.
3971         
3972         If the relevant SecurityOrigin satsifies 'isLocal', we show all plugins.
3973
3974         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3975         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
3976
3977 2015-12-21  Hunseop Jeong  <hs85.jeong@samsung.com>
3978
3979         [EFL] test_ewk2_context failed after r192808
3980         https://bugs.webkit.org/show_bug.cgi?id=151846
3981
3982         Reviewed by Gyuyoung Kim.
3983
3984         As we can make the single WebProcess behavior by setting the miximum number
3985         of WebProcess to 1 after r192808, I remove the ewk_context_process_model_{set|get}
3986         apis and add the ewk_context_web_process_count_limit_{set|get} apis and tests.
3987
3988         * UIProcess/API/efl/ewk_context.cpp:
3989         (EwkContext::EwkContext):
3990         (EwkContext::setProcessCountLimit):
3991         (EwkContext::processCountLimit):
3992         (ewk_context_web_process_count_limit_set):
3993         (ewk_context_web_process_count_limit_get):
3994         (EwkContext::setProcessModel): Deleted.
3995         (EwkContext::processModel): Deleted.
3996         (ewk_context_process_model_set): Deleted.
3997         (ewk_context_process_model_get): Deleted.
3998         * UIProcess/API/efl/ewk_context.h:
3999         * UIProcess/API/efl/ewk_context_private.h:
4000         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
4001         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
4002         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
4003         (TEST_F): Changed the ewk_context_{web|network}_process_model tests to
4004         ewk_context_{web|network}_process_count_limit tests.
4005
4006 2015-12-21  Joonghun Park  <jh718.park@samsung.com>
4007
4008         [WK2][EFL] Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
4009         to refactor APIWebsiteDataStoreEfl
4010         https://bugs.webkit.org/show_bug.cgi?id=152475
4011
4012         Reviewed by Gyuyoung Kim.
4013
4014         Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
4015         instead of to use efreet_cache_home_get
4016         and efreet_data_home_get directly.
4017         And also use EINA_PATH_SEP_S instead of "/" as directory separator,
4018         and WebCore::pathByAppendingComponent instead of operator+.