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