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