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