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