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