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