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