a11cc164319493255190963ee225cca11c0217c4
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-01-22  Chris Dumez  <cdumez@apple.com>
2
3         Drop the legacy FeatureCounter class
4         https://bugs.webkit.org/show_bug.cgi?id=140749
5
6         Reviewed by Andreas Kling.
7
8         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
9         instead.
10
11         * Shared/WebPreferencesDefinitions.h:
12         * UIProcess/API/Cocoa/WKWebView.mm:
13         (-[WKWebView initWithFrame:configuration:]):
14         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
15         (-[WKWebViewConfiguration init]):
16         (-[WKWebViewConfiguration copyWithZone:]):
17         (-[WKWebViewConfiguration _featureCounterEnabled]):
18         (-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
19         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
20         * WebProcess/WebPage/WebPage.cpp:
21         (WebKit::WebPage::updatePreferences):
22         * WebProcess/WebPage/ios/WebPageIOS.mm:
23         (WebKit::WebPage::willStartUserTriggeredZooming):
24
25 2015-01-22  Beth Dakin  <bdakin@apple.com>
26
27         ibtoold crash below -[WebView close]
28         https://bugs.webkit.org/show_bug.cgi?id=140782
29         -and corresponding-
30         rdar://problem/19558472
31
32         Reviewed by Tim Horton.
33
34         Retain the NSImmediateActionGestureRecognizer. This should not be necessary, but 
35         it is because interface builder can mess with our views.
36         * UIProcess/mac/WKImmediateActionController.h:
37         * UIProcess/mac/WKImmediateActionController.mm:
38         (-[WKImmediateActionController willDestroyView:]):
39         (-[WKImmediateActionController _cancelImmediateAction]):
40         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
41         (-[WKImmediateActionController _updateImmediateActionItem]):
42
43 2015-01-22  David Kilzer  <ddkilzer@apple.com>
44
45         [iOS] Fix iphoneos SDK builds for ios-ews queue
46         <http://webkit.org/b/140748>
47
48         Reviewed by Daniel Bates.
49
50         * Platform/spi/ios/BKSProcessAssertionSPI.h: Add -invalidate
51         definition.  Sort @property to the top of BKSProcessAssertion.
52
53 2015-01-22  Shivakumar JM  <shiva.jm@samsung.com>
54
55         Fix build warning in WebKit2/UIProcess module
56         https://bugs.webkit.org/show_bug.cgi?id=140758
57
58         Reviewed by Csaba Osztrogonác.
59
60         Fix build warnings by using UNUSED_PARAM macro
61
62         * UIProcess/API/C/WKPageGroup.cpp:
63         (WKPageGroupAddUserContentFilter):
64         (WKPageGroupRemoveAllUserContentFilters):
65
66 2014-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
67
68         [GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
69         https://bugs.webkit.org/show_bug.cgi?id=138467
70
71         Reviewed by Gustavo Noronha Silva.
72
73         * UIProcess/API/gtk/WebKitContextMenu.cpp:
74         (webkitContextMenuPopulate): Add a version that receives a Vector<WebContextMenuItemData>&.
75         (webkitContextMenuCreate): Change it to receive a const
76         Vector<WebContextMenuItemData>& instead of a API::Array* and also
77         add a another version that receives const Vector<ContextMenuItem>&.
78         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
79         (attachContextMenuClientToView): Use a class derived from
80         API::ContextMenuClient to implement the context menu client.
81         (getContextMenuFromProposedMenu): Deleted.
82         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
83         (webkitContextMenuItemCreate): Change it to receive a const
84         WebContextMenuItemData& and added another version that receives a
85         const ContextMenuItem&.
86         * UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
87         * UIProcess/API/gtk/WebKitContextMenuPrivate.h:
88         * UIProcess/API/gtk/WebKitWebView.cpp:
89         (webkitWebViewPopulateContextMenu): Remove the creation of a
90         WebHitTestResult::Data, since it receives it now as parameter.
91         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
92         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
93         (webkitWebHitTestResultCreate): Change it to receive a const
94         HitTestResult& instead of const InjectedBundleHitTestResult&.
95         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h:
96         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
97         (webkitWebPageCreate): Use a class derived from
98         API::InjectedBundle::PageContextMenuClient to implement the
99         context menu client.
100         (getContextMenuFromDefaultMenu): Deleted.
101
102 2015-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
103
104         Unreviewed. Try to fix Debug build after r178889.
105
106         * UIProcess/API/C/WKPage.cpp: Include Logging.h.
107
108 2015-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
109
110         Add API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
111         https://bugs.webkit.org/show_bug.cgi?id=138466
112
113         Reviewed by Anders Carlsson.
114
115         Move ContextMenuClient to use API classes in both UI and Injected
116         Bundle APIs.
117
118         * CMakeLists.txt: Remove WebPageContextMenuClient.cpp.
119         * UIProcess/API/APIContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/WebPageContextMenuClient.h.
120         (API::ContextMenuClient::~ContextMenuClient):
121         (API::ContextMenuClient::getContextMenuFromProposedMenu):
122         (API::ContextMenuClient::customContextMenuItemSelected):
123         (API::ContextMenuClient::contextMenuDismissed):
124         (API::ContextMenuClient::showContextMenu):
125         (API::ContextMenuClient::hideContextMenu):
126         * UIProcess/API/C/WKPage.cpp:
127         (WKPageSetPageContextMenuClient):
128         * UIProcess/WebPageContextMenuClient.cpp: Removed.
129         * UIProcess/WebPageProxy.cpp:
130         (WebKit::WebPageProxy::WebPageProxy):
131         (WebKit::WebPageProxy::setContextMenuClient):
132         (WebKit::WebPageProxy::close):
133         (WebKit::WebPageProxy::internalShowContextMenu):
134         (WebKit::WebPageProxy::contextMenuItemSelected):
135         (WebKit::WebPageProxy::initializeContextMenuClient): Deleted.
136         * UIProcess/WebPageProxy.h:
137         * WebKit2.xcodeproj/project.pbxproj: Remove deleted files and add
138         new files to compilation.
139         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h.
140         (API::InjectedBundle::PageContextMenuClient::~PageContextMenuClient):
141         (API::InjectedBundle::PageContextMenuClient::getCustomMenuFromDefaultItems):
142         (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu):
143         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
144         (WKBundlePageSetContextMenuClient):
145         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
146         (WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
147         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
148         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
149         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
150         * WebProcess/WebPage/WebContextMenu.cpp:
151         (WebKit::WebContextMenu::menuItemsWithUserData):
152         * WebProcess/WebPage/WebPage.cpp:
153         (WebKit::WebPage::WebPage):
154         (WebKit::WebPage::setInjectedBundleContextMenuClient):
155         (WebKit::WebPage::close):
156         (WebKit::WebPage::initializeInjectedBundleContextMenuClient): Deleted.
157         * WebProcess/WebPage/WebPage.h:
158         (WebKit::WebPage::injectedBundleContextMenuClient):
159         * WebProcess/WebPage/mac/WebPageMac.mm:
160         (WebKit::WebPage::performActionMenuHitTestAtLocation):
161
162 2015-01-20  Jon Honeycutt  <jhoneycutt@apple.com>
163
164         [iOS] WebKitTestRunner: Tests fail due to incorrect web view size
165
166         <https://bugs.webkit.org/show_bug.cgi?id=139736>
167         <rdar://problem/19282196>
168
169         This starts happening after we fail to reset the test controller to
170         consistent values in TestInvocation::invoke(). When we terminate the
171         web process and relaunch it, the new WebPage object created in the web
172         process is using the default ViewportConfiguration with dimensions of
173         1024x768.
174
175         The PageClient on iOS currently notifies the WKWebView and the
176         WKContentView when the web process is relaunched. This patch extends
177         that to also notify the WKView.
178
179         Reviewed by Benjamin Poulain.
180
181         * UIProcess/API/Cocoa/WKViewPrivate.h:
182         Declare -_didRelaunchProcess.
183
184         * UIProcess/API/ios/WKViewIOS.mm:
185         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
186         Call the new method that accepts a WKView.
187         (-[WKView _didRelaunchProcess]):
188         Call -_frameOrBoundsChanged to update the web process's size to the
189         size of the WKView.
190
191         * UIProcess/ios/PageClientImplIOS.h:
192         Add a constructor that takes a WKView, and add a member var to hold it.
193
194         * UIProcess/ios/PageClientImplIOS.mm:
195         (WebKit::PageClientImpl::PageClientImpl):
196         Implement the constructor that takes a WKView.
197         (WebKit::PageClientImpl::didRelaunchProcess):
198         Tell the WKView that the web process relaunched.
199
200         * UIProcess/ios/WKContentView.h:
201         Declare an initializer that takes a WKView.
202
203         * UIProcess/ios/WKContentView.mm:
204         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
205         Split out from -[WKContentView initWithFrame:processPool:configuration:webView:].
206         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
207         Perform some initialization, including creating the PageClient, and
208         call the common initializer.
209         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
210         Ditto.
211
212 2015-01-21  Sam Weinig  <sam@webkit.org>
213
214         Add WKPageGroupRef SPI for user content filters
215         https://bugs.webkit.org/show_bug.cgi?id=140728
216
217         Reviewed by Anders Carlsson.
218
219         While Safari is transitioning to WKUserContentController, it is useful
220         for them to have access to have access to content filters on the page group
221         where they currently have user content related functionality.
222
223         * Shared/WebPageGroupData.cpp:
224         (WebKit::WebPageGroupData::encode):
225         (WebKit::WebPageGroupData::decode):
226         * Shared/WebPageGroupData.h:
227         * UIProcess/API/C/WKPageGroup.cpp:
228         (WKPageGroupAddUserContentFilter):
229         (WKPageGroupRemoveAllUserContentFilters):
230         * UIProcess/API/C/WKPageGroup.h:
231         * UIProcess/WebPageGroup.cpp:
232         (WebKit::WebPageGroup::addUserContentFilter):
233         (WebKit::WebPageGroup::removeAllUserContentFilters):
234         * UIProcess/WebPageGroup.h:
235         * WebProcess/WebPage/WebPageGroupProxy.cpp:
236         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
237         (WebKit::WebPageGroupProxy::addUserContentFilter):
238         (WebKit::WebPageGroupProxy::removeAllUserContentFilters):
239         * WebProcess/WebPage/WebPageGroupProxy.h:
240         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
241
242 2015-01-21  Beth Dakin  <bdakin@apple.com>
243
244         Crash in QuickLook preview delegate method
245         https://bugs.webkit.org/show_bug.cgi?id=140740
246         -and corresponding-
247         rdar://problem/19540806
248
249         Reviewed by Tim Horton.
250
251         Clear out the delegate.
252         * UIProcess/mac/WKImmediateActionController.mm:
253         (-[WKImmediateActionController willDestroyView:]):
254
255 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
256
257         AsyncRequestImpl casting in AsyncRequest::completeRequest() is incorrect
258         https://bugs.webkit.org/show_bug.cgi?id=139724
259
260         Reviewed by Darin Adler.
261
262         AsyncRequestImpl casting in AsyncRequest::completeRequest() relies on
263         the parameter pack to properly determine the type of the AsyncRequestImpl
264         object. The casting result can be incorrect when an argument is passed
265         by reference while the original object was constructed with a callback
266         that expects an argument that's passed by value.
267
268         To avoid this the AsyncRequestImpl template is now instantiated with
269         raw types, with callback parameters remaining raw types in case
270         of being integral (enforcing passing-by-value these arguments when
271         dispatching), and const references being used otherwise (enforcing
272         passing-by-reference).
273
274         This enables casting AsyncRequest objects to the correct AsyncRequestImpl<>
275         by running the parameter pack through std::decay.
276
277         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
278         (WebKit::UniqueIDBDatabase::putRecord):
279         (WebKit::UniqueIDBDatabase::getRecord):
280         (WebKit::UniqueIDBDatabase::openCursor):
281         (WebKit::UniqueIDBDatabase::cursorAdvance):
282         (WebKit::UniqueIDBDatabase::cursorIterate):
283         (WebKit::UniqueIDBDatabase::count):
284         (WebKit::UniqueIDBDatabase::deleteRange):
285         * Shared/AsyncRequest.h:
286         (WebKit::AsyncRequest::completeRequest):
287         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
288         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
289         (WebKit::WebIDBServerConnection::get):
290
291 2015-01-21  Chris Dumez  <cdumez@apple.com>
292
293         [WK2] Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API
294         https://bugs.webkit.org/show_bug.cgi?id=140655
295
296         Reviewed by Anders Carlsson.
297
298         Stop using WKDiagnosticLoggingResultType.h C API header in Cocoa API.
299         Instead, introduce a new _WKDiagnosticLoggingResultType enum in
300         _WKDiagnosticLoggingDelegate.h.
301
302         A few defines mapping WKDiagnosticLoggingResultType enum and its values
303         to the new _WKDiagnosticLoggingResultType are temporarily added until
304         the client-side is transitioned.
305
306         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
307         * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
308         (WebKit::toWKDiagnosticLoggingResultType):
309         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
310
311 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
312
313         [WK2] Use C++ lambdas in ProcessLauncher class
314         https://bugs.webkit.org/show_bug.cgi?id=138186
315
316         Reviewed by Darin Adler.
317
318         Replace uses of WTF::bind() in the ProcessLauncher class with C++ lambdas.
319
320         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
321         (WebKit::ProcessLauncher::launchProcess):
322         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
323         (WebKit::ProcessLauncher::launchProcess):
324         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
325         (WebKit::connectToService):
326         (WebKit::tryPreexistingProcess):
327         (WebKit::createProcess):
328
329 2015-01-21  Zan Dobersek  <zdobersek@igalia.com>
330
331         Clean up ViewUpdateDispatcher
332         https://bugs.webkit.org/show_bug.cgi?id=140619
333
334         Reviewed by Darin Adler.
335
336         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
337         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
338         Replace WTF::bind() with a C++ lambda.
339         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
340         Use WTF::move() to move the HashMap member into the local variable.
341
342 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
343
344         Remove ENABLE(INSPECTOR) ifdef guards
345         https://bugs.webkit.org/show_bug.cgi?id=140668
346
347         Reviewed by Darin Adler.
348
349         * Configurations/FeatureDefines.xcconfig:
350         * Shared/API/c/WKSharedAPICast.h:
351         (WebKit::toAPI):
352         (WebKit::toImpl):
353         * Shared/WebCoreArgumentCoders.cpp:
354         (IPC::ArgumentCoder<ResourceRequest>::encode):
355         (IPC::ArgumentCoder<ResourceRequest>::decode):
356         * UIProcess/API/C/WKInspector.cpp:
357         (WKInspectorGetTypeID):
358         (WKInspectorGetPage):
359         (WKInspectorIsConnected):
360         (WKInspectorIsVisible):
361         (WKInspectorIsFront):
362         (WKInspectorConnect):
363         (WKInspectorShow):
364         (WKInspectorHide):
365         (WKInspectorClose):
366         (WKInspectorShowConsole):
367         (WKInspectorShowResources):
368         (WKInspectorShowMainResourceForFrame):
369         (WKInspectorIsAttached):
370         (WKInspectorAttach):
371         (WKInspectorDetach):
372         (WKInspectorIsProfilingPage):
373         (WKInspectorTogglePageProfiling):
374         * UIProcess/API/C/WKPage.cpp:
375         (WKPageGetInspector):
376         * UIProcess/API/efl/ewk_view.cpp:
377         (ewk_view_inspector_show):
378         (ewk_view_inspector_close):
379         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
380         (TEST_F):
381         * UIProcess/PageClient.h:
382         * UIProcess/WebInspectorProxy.cpp:
383         * UIProcess/WebInspectorProxy.h:
384         * UIProcess/WebInspectorProxy.messages.in:
385         * UIProcess/WebPageProxy.cpp:
386         (WebKit::WebPageProxy::WebPageProxy):
387         (WebKit::WebPageProxy::reattachToWebProcess):
388         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
389         (WebKit::WebPageProxy::resetState):
390         * UIProcess/WebPageProxy.h:
391         * UIProcess/WebPageProxy.messages.in:
392         * UIProcess/WebProcessProxy.cpp:
393         (WebKit::WebProcessProxy::getLaunchOptions):
394         * UIProcess/efl/WebInspectorProxyEfl.cpp:
395         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
396         * UIProcess/ios/PageClientImplIOS.h:
397         * UIProcess/ios/PageClientImplIOS.mm:
398         (WebKit::PageClientImpl::disableInspectorNodeSearch):
399         * UIProcess/ios/WebInspectorProxyIOS.mm:
400         * UIProcess/ios/WebPageProxyIOS.mm:
401         (WebKit::WebPageProxy::disableInspectorNodeSearch):
402         * UIProcess/mac/WebInspectorProxyMac.mm:
403         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
404         (WKBundleInspectorGetTypeID):
405         (WKBundleInspectorShow):
406         (WKBundleInspectorClose):
407         (WKBundleInspectorEvaluateScriptForTest):
408         (WKBundleInspectorSetPageProfilingEnabled):
409         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
410         (WKBundlePageGetInspector):
411         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
412         * WebProcess/WebCoreSupport/WebInspectorClient.h:
413         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
414         * WebProcess/WebPage/WebInspector.cpp:
415         * WebProcess/WebPage/WebInspector.h:
416         * WebProcess/WebPage/WebInspector.messages.in:
417         * WebProcess/WebPage/WebInspectorUI.cpp:
418         * WebProcess/WebPage/WebInspectorUI.h:
419         * WebProcess/WebPage/WebInspectorUI.messages.in:
420         * WebProcess/WebPage/WebPage.cpp:
421         (WebKit::WebPage::WebPage):
422         (WebKit::WebPage::~WebPage):
423         (WebKit::WebPage::close):
424         (WebKit::WebPage::inspectorUI):
425         (WebKit::WebPage::didReceiveMessage):
426         * WebProcess/WebPage/WebPage.h:
427         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
428         * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp:
429         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
430         * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:
431         * WebProcess/WebPage/ios/WebPageIOS.mm:
432         (WebKit::WebPage::disableInspectorNodeSearch):
433         * WebProcess/WebPage/mac/WebInspectorMac.mm:
434         * WebProcess/WebPage/mac/WebInspectorUIMac.mm:
435         * config.h:
436
437 2015-01-20  Martin Hock  <mhock@apple.com>
438
439         [iOS][WK2] Redraw find-in-page indicator on rotation
440         https://bugs.webkit.org/show_bug.cgi?id=140632
441         <rdar://problem/18858394>
442
443         Reviewed by Tim Horton.
444
445         * WebProcess/WebPage/FindController.cpp:
446         (WebKit::FindController::redraw): Add method to redraw find indicator (only used by iOS).
447         * WebProcess/WebPage/FindController.h:
448         * WebProcess/WebPage/WebPage.cpp:
449         (WebKit::WebPage::mainFrameDidLayout):
450         * WebProcess/WebPage/ios/FindControllerIOS.mm:
451         (WebKit::FindController::updateFindIndicator): Redraw should not trigger zoom.
452
453 2015-01-20  David Kilzer  <ddkilzer@apple.com>
454
455         Switch to comparing PLATFORM_NAME in terms of macosx
456         <http://webkit.org/b/139516>
457
458         Reviewed by Timothy Hatcher.
459
460         * WebKit2.xcodeproj/project.pbxproj:
461         * mac/rewrite-availability-macros.sh: Remove the else block that
462         checked for an unknown PLATFORM_NAME.
463
464 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
465
466         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
467         https://bugs.webkit.org/show_bug.cgi?id=140474
468
469         Reviewed by Tim Horton.
470         
471         Add a private method to enable scrolling data collection to WKWebView. When enabled, create
472         a RemoteLayerTreeScrollingPerformanceData object that collects "blank pixel" data on
473         every layer tree commit and scroll, and stores them in a vector. A second SPI call
474         allows retrieval of an NSArray of this data.
475         
476         To allow RemoteLayerTreeScrollingPerformanceData to find the correct layer which
477         contains the main tile grid, we set a layer name on the appropriate layer (even
478         in release builds).
479
480         * UIProcess/API/Cocoa/WKWebView.mm:
481         (-[WKWebView visibleRectInScreenCoordinates]):
482         (-[WKWebView _didCommitLayerTree:]):
483         (-[WKWebView scrollViewDidScroll:]):
484         (-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
485         (-[WKWebView _scrollPerformanceDataCollectionEnabled]):
486         (-[WKWebView _scrollPerformanceData]):
487         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
488         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.h: Added.
489         (WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::BlankPixelCount):
490         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm: Added.
491         (WebKit::RemoteLayerTreeScrollingPerformanceData::RemoteLayerTreeScrollingPerformanceData):
492         (WebKit::RemoteLayerTreeScrollingPerformanceData::~RemoteLayerTreeScrollingPerformanceData):
493         (WebKit::RemoteLayerTreeScrollingPerformanceData::didCommitLayerTree):
494         (WebKit::RemoteLayerTreeScrollingPerformanceData::didScroll):
495         (WebKit::RemoteLayerTreeScrollingPerformanceData::BlankPixelCount::canCoalesce):
496         (WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
497         (WebKit::RemoteLayerTreeScrollingPerformanceData::data):
498         (WebKit::findTileGridContainerLayer):
499         (WebKit::RemoteLayerTreeScrollingPerformanceData::blankPixelCount):
500         * UIProcess/WebPageProxy.cpp:
501         (WebKit::WebPageProxy::WebPageProxy):
502         (WebKit::WebPageProxy::setScrollPerformanceDataCollectionEnabled):
503         * UIProcess/WebPageProxy.h:
504         (WebKit::WebPageProxy::scrollPerformanceDataCollectionEnabled):
505         (WebKit::WebPageProxy::scrollingPerformanceData):
506         * WebKit2.xcodeproj/project.pbxproj:
507
508 2015-01-19  Dean Jackson  <dino@apple.com>
509
510         Support "plus-darker" in mix-blend mode
511         https://bugs.webkit.org/show_bug.cgi?id=140646
512         <rdar://problem/19523370>
513
514         Reviewed by Simon Fraser.
515
516         Output the appropriate blending type when logging.
517
518         * Shared/mac/RemoteLayerTreeTransaction.mm:
519         (WebKit::RemoteLayerTreeTextStream::operator<<):
520
521 2015-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
522
523         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.4 release.
524
525         * gtk/NEWS: Add release notes for 2.7.4.
526
527 2015-01-20  Tomas Popela  <tpopela@redhat.com>
528
529         [GTK] Add API to set the web view editable into WebKit2 GTK+ API
530         https://bugs.webkit.org/show_bug.cgi?id=139443
531
532         Reviewed by Carlos Garcia Campos.
533
534         Provide a way to set the web view editable, without accessing the DOM
535         and setting the contenteditable attribute to elements.
536
537         * UIProcess/API/gtk/WebKitWebView.cpp:
538         (webkitWebViewSetProperty):
539         (webkitWebViewGetProperty):
540         (webkit_web_view_class_init):
541         (webkit_web_view_is_editable):
542         (webkit_web_view_set_editable):
543         * UIProcess/API/gtk/WebKitWebView.h:
544         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
545
546 2015-01-20  Carlos Garcia Campos  <cgarcia@igalia.com>
547
548         [GTK] Add an option to create WebKitWebView snapshots with transparent background
549         https://bugs.webkit.org/show_bug.cgi?id=140617
550
551         Reviewed by Gustavo Noronha Silva.
552
553         Add WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND flag to not
554         fill with white the background before rendering the snapshot.
555
556         * UIProcess/API/gtk/WebKitWebView.cpp:
557         (webkit_web_view_get_snapshot): Pass a TransparentBackground
558         boolean argument to the WEbProcess.
559         * UIProcess/API/gtk/WebKitWebView.h:
560         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
561         (webkitWebPageDidReceiveMessage): Set the FrameView background as
562         transparent when TransparentBackground option is True before
563         rendering the snapshot.
564
565 2015-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
566
567         [GTK] Add API to change the WebKitWebView background color
568         https://bugs.webkit.org/show_bug.cgi?id=140610
569
570         Reviewed by Gustavo Noronha Silva.
571
572         When a color different than the default one (opaque white) is
573         used, the SetDrawsBackground message is sent to the WebProcess with
574         a False value to indicate WebCore to not render backgrounds. The
575         background color passed is saved in the WebPageProxy and used by
576         the backing store to fill the background before the actual
577         contents are rendered in the WebView.
578
579         * UIProcess/API/gtk/WebKitWebView.cpp:
580         (webkit_web_view_set_background_color):
581         (webkit_web_view_get_background_color):
582         * UIProcess/API/gtk/WebKitWebView.h:
583         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
584         * UIProcess/WebPageProxy.cpp:
585         (WebKit::WebPageProxy::WebPageProxy): Initialize m_backgroundColor member.
586         * UIProcess/WebPageProxy.h:
587         (WebKit::WebPageProxy::backgroundColor): Return m_backgroundColor.
588         (WebKit::WebPageProxy::setBackgroundColor): Set m_backgroundColor.
589         * UIProcess/cairo/BackingStoreCairo.cpp:
590         (WebKit::BackingStore::incorporateUpdate): Fill the damage region
591         with the WebPageProxy background color when the WebProcess is not
592         rendering backgrounds. If the background color is not fully opaque
593         we need to clear the region before filling it with the color.
594
595 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
596
597         [SVG -> OTF Converter] Flip the switch on
598         https://bugs.webkit.org/show_bug.cgi?id=140592
599
600         Reviewed by Antti Koivisto.
601
602         * Configurations/FeatureDefines.xcconfig:
603
604 2015-01-19  Mark Rowe  <mrowe@apple.com>
605
606         <https://webkit.org/b/140504> REGRESSION (r178452): Visited link coloring only appears to work in the first web process
607
608         Roll out r178452 since it broke visited link coloring.
609
610         Reviewed by Anders Carlsson.
611
612         * UIProcess/VisitedLinkProvider.cpp:
613         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
614         (WebKit::VisitedLinkProvider::addProcess):
615         (WebKit::VisitedLinkProvider::removeProcess):
616         (WebKit::VisitedLinkProvider::removeAll):
617         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
618         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
619         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
620         (WebKit::VisitedLinkProvider::resizeTable):
621         * UIProcess/VisitedLinkProvider.h:
622         * UIProcess/WebPageProxy.cpp:
623         (WebKit::WebPageProxy::WebPageProxy):
624         (WebKit::WebPageProxy::processDidFinishLaunching):
625         * UIProcess/WebProcessProxy.cpp:
626         (WebKit::WebProcessProxy::disconnect):
627         (WebKit::WebProcessProxy::addVisitedLinkProvider):
628         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
629         * UIProcess/WebProcessProxy.h:
630
631 2015-01-19  Sam Weinig  <sam@webkit.org>
632
633         Sprinkle some CTTE on API::PolicyClient and API::FormClient
634         https://bugs.webkit.org/show_bug.cgi?id=140656
635
636         Reviewed by Tim Horton.
637
638         - Use references rather than pointers where possible.
639         - Store and pass the listeners as Refs.
640         - Make API::FormClient more like API::PolicyClient by making it the
641           responsibility of the client implementation to call the default policy.
642
643         * UIProcess/API/APIFormClient.h:
644         (API::FormClient::willSubmitForm):
645         * UIProcess/API/APIPolicyClient.h:
646         (API::PolicyClient::decidePolicyForNavigationAction):
647         (API::PolicyClient::decidePolicyForNewWindowAction):
648         (API::PolicyClient::decidePolicyForResponse):
649         (API::PolicyClient::unableToImplementPolicy):
650         * UIProcess/API/C/WKPage.cpp:
651         (WKPageSetPagePolicyClient):
652         * UIProcess/API/Cocoa/WKWebView.mm:
653         (-[WKWebView _setFormDelegate:]):
654         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
655         * UIProcess/Cocoa/NavigationState.h:
656         * UIProcess/Cocoa/NavigationState.mm:
657         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
658         (WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):
659         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
660         * UIProcess/WebFormClient.cpp:
661         (WebKit::WebFormClient::willSubmitForm):
662         * UIProcess/WebFormClient.h:
663         * UIProcess/WebFrameProxy.cpp:
664         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
665         (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy):
666         * UIProcess/WebFrameProxy.h:
667         * UIProcess/WebPageProxy.cpp:
668         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
669         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
670         (WebKit::WebPageProxy::decidePolicyForResponse):
671         (WebKit::WebPageProxy::unableToImplementPolicy):
672         (WebKit::WebPageProxy::willSubmitForm):
673
674 2015-01-18  Sam Weinig  <sam@webkit.org>
675
676         Merge API::ProcessPoolConfiguration and _WKProcessPoolConfiguration
677         https://bugs.webkit.org/show_bug.cgi?id=140601
678
679         Reviewed by Anders Carlsson.
680
681         - Converts _WKProcessPoolConfiguration to be backed via API::ProcessPoolConfiguration.
682         - Expands API::ProcessPoolConfiguration to add all the parameters necessary to fully
683           initialize a WebProcessPool. This allows -[WKProcessPool _initWithConfiguration:] to
684           be a simple pass through initializer, which in turn allows us to consider WebProcessPools
685           created on the C++ and Objective-C sides as equivalent.
686         - Makes WebProcessPool own the reference to the API::ProcessPoolConfiguration (rather than
687           the WKProcessPool wrapper).
688
689         * Shared/Cocoa/APIObject.mm:
690         (API::Object::newObject):
691         Create the API::ProcessPoolConfigurations using [_WKProcessPoolConfiguration alloc] as its 
692         storage..
693
694         * UIProcess/API/APIProcessPoolConfiguration.cpp:
695         (API::ProcessPoolConfiguration::create):
696         (API::ProcessPoolConfiguration::createWithLegacyOptions):
697         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
698         (API::ProcessPoolConfiguration::~ProcessPoolConfiguration):
699         (API::ProcessPoolConfiguration::copy):
700         (API::ProcessPoolConfiguration::webProcessPoolConfiguration): Deleted.
701         * UIProcess/API/APIProcessPoolConfiguration.h:
702         Add the remaining initialization parameters and add a convenience create function
703         for configuring legacy WebProcessPools (for use by the C-SPI).
704
705         * UIProcess/API/APIWebsiteDataStore.cpp:
706         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
707         * UIProcess/API/APIWebsiteDataStore.h:
708         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
709         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
710         (API::WebsiteDataStore::defaultDataStoreConfiguration):
711         Expose helper for getting the website data directories for use in the ProcessPoolConfiguration.
712
713         * UIProcess/API/C/WKContext.cpp:
714         (WKContextCreate):
715         (WKContextCreateWithInjectedBundlePath):
716         (WKContextCreateWithConfiguration):
717         Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
718
719         * UIProcess/API/C/WKContextConfigurationRef.cpp:
720         (WKContextConfigurationCreate):
721         Update for ProcessPoolConfiguration::create() returning a Ref. Note, this function
722         was not changed to call ProcessPoolConfiguration::createWithLegacyOptions() since
723         it has not been around long enough to warrant it.
724
725         * UIProcess/API/Cocoa/WKProcessGroup.mm:
726         (-[WKProcessGroup initWithInjectedBundleURL:]):
727         Use ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
728
729         * UIProcess/API/Cocoa/WKProcessPool.mm:
730         (-[WKProcessPool description]):
731         Change to pull the configuration from the underlying API::Object.
732
733         (-[WKProcessPool _configuration]):
734         Change to pull the configuration from the underlying API::Object and call the new
735         copy() helper on it.
736         
737         (-[WKProcessPool _initWithConfiguration:]):
738         Convert to be a simple pass through to API::Object::constructInWrapper.
739
740         (websiteDataDirectoryURL): Deleted.
741         Moved to APIWebsiteDataStore.h
742
743         * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
744         Removes the _WKProcessPoolConfiguration member, now that it is stored on the WebProcessPool.
745         
746         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
747         (-[_WKProcessPoolConfiguration init]):
748         (-[_WKProcessPoolConfiguration dealloc]):
749         Added to support API::Object bridging.
750
751         (-[_WKProcessPoolConfiguration injectedBundleURL]):
752         (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
753         Convert to getting the URL from the underlying object. Moved the exception
754         that used to be on creation of the WKProcessPool.
755
756         (-[_WKProcessPoolConfiguration maximumProcessCount]):
757         (-[_WKProcessPoolConfiguration setMaximumProcessCount:]):
758         Convert to getting the count from the underlying object.
759
760         (-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
761         Convert to constructing the NSArray on demand from the underlying Vector.
762
763         (-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
764         Converts the NSArray to a Vector rather than storing the array.
765
766         * UIProcess/API/Cocoa/_WKProcessPoolConfigurationInternal.h: Added.
767         (API::wrapper):
768         Add boilerplate for API::Object bridging.
769
770         * UIProcess/API/gtk/WebKitWebContext.cpp:
771         (webkitWebContextConstructed):
772         Update to use API::ProcessPoolConfiguration::createWithLegacyOptions() to keep backwards compatibility.
773
774
775         * UIProcess/WebInspectorProxy.cpp:
776         (WebKit::WebInspectorProxy::inspectorProcessPool):
777         Update to call API::ProcessPoolConfiguration::createWithLegacyOptions().
778
779         * UIProcess/WebProcessPool.cpp:
780         (WebKit::WebProcessPool::create):
781         (WebKit::websiteDataStoreConfiguration):
782         (WebKit::WebProcessPool::WebProcessPool):
783         (WebKit::WebProcessPool::applyPlatformSpecificConfigurationDefaults): Deleted.
784         This functionality was moved to the constructor of the API::ProcessPoolConfiguration.
785         * UIProcess/WebProcessPool.h:
786         Changed to take (and store) a API::ProcessPoolConfiguration rather than the WebProcessPoolConfiguration.
787
788         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
789         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
790         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
791         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
792         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
793         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
794         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
795         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
796         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
797         * UIProcess/efl/WebContextEfl.cpp:
798         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
799         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
800         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
801         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
802         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
803         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
804         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
805         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
806         * UIProcess/gtk/WebProcessPoolGtk.cpp:
807         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
808         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
809         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
810         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
811         (WebKit::WebProcessPool::platformDefaultWebSQLDatabaseDirectory): Deleted.
812         (WebKit::WebProcessPool::platformDefaultIndexedDBDatabaseDirectory): Deleted.
813         (WebKit::WebProcessPool::platformDefaultLocalStorageDirectory): Deleted.
814         (WebKit::WebProcessPool::platformDefaultMediaKeysStorageDirectory): Deleted.
815         Renamed to make it clear these were the legacy locations for these directories.
816
817         * WebKit2.xcodeproj/project.pbxproj:
818         Added new files.
819
820 2015-01-19  Beth Dakin  <bdakin@apple.com>
821
822          Speculative build fix.
823
824         * UIProcess/API/mac/WKView.mm:
825         (-[WKView initWithFrame:processPool:configuration:webView:]):
826
827 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
828
829         Adjust naming of action menu SPI
830         https://bugs.webkit.org/show_bug.cgi?id=140644
831         <rdar://problem/19448129>
832
833         Reviewed by Brian Weinstein.
834
835         * UIProcess/API/mac/WKView.mm:
836         (-[WKView initWithFrame:processPool:configuration:webView:]):
837         * UIProcess/mac/WKActionMenuController.mm:
838         (-[WKActionMenuController prepareForMenu:withEvent:]):
839         (-[WKActionMenuController willOpenMenu:withEvent:]):
840         (-[WKActionMenuController didCloseMenu:withEvent:]):
841         (-[WKActionMenuController menuNeedsUpdate:]):
842         (-[WKActionMenuController _updateActionMenuItems]):
843
844 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
845
846         [CoordinatedGraphics] Use C++ lambda instead of WTF::bind() in ThreadedCompositor::updateSceneState()
847         https://bugs.webkit.org/show_bug.cgi?id=140613
848
849         Reviewed by Carlos Garcia Campos.
850
851         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
852         (WebKit::ThreadedCompositor::updateSceneState): Replace the use of WTF::bind() with a C++ lambda.
853
854 2015-01-19  Commit Queue  <commit-queue@webkit.org>
855
856         Unreviewed, rolling out r178653.
857         https://bugs.webkit.org/show_bug.cgi?id=140634
858
859         Broke multiple SVG tests on Mountain Lion (Requested by ap on
860         #webkit).
861
862         Reverted changeset:
863
864         "[SVG -> OTF Converter] Flip the switch on"
865         https://bugs.webkit.org/show_bug.cgi?id=140592
866         http://trac.webkit.org/changeset/178653
867
868 2015-01-19  Dean Jackson  <dino@apple.com>
869
870         Add "override" to fix the build with newer clangs.
871
872         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
873         (WebKit::WebProcessProxy::transformHandlesToObjects):
874         (WebKit::WebProcessProxy::transformObjectsToHandles):
875         * UIProcess/WebProcessProxy.cpp:
876         (WebKit::WebProcessProxy::transformObjectsToHandles):
877         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
878         * WebProcess/cocoa/WebProcessCocoa.mm:
879         (WebKit::WebProcess::transformHandlesToObjects):
880         (WebKit::WebProcess::transformObjectsToHandles):
881
882 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
883
884         [SVG -> OTF Converter] Flip the switch on
885         https://bugs.webkit.org/show_bug.cgi?id=140592
886
887         Reviewed by Antti Koivisto.
888
889         * Configurations/FeatureDefines.xcconfig:
890
891 2015-01-18  Daniel Bates  <dabates@apple.com>
892
893         Attempt to fix the iOS build after <http://trac.webkit.org/changeset/178631>
894         (https://bugs.webkit.org/show_bug.cgi?id=129441)
895
896         * UIProcess/WKInspectorHighlightView.mm:
897         (-[WKInspectorHighlightView update:]): Substitute HighlightType::Node and
898         HighlightType::Rects for HighlightTypeNode and HighlightTypeRects, respectively.
899         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
900         (WebKit::WebInspectorClient::highlight): Pass lvalue reference to WebCore::Highlight
901         instead of pointer in call to InspectorController::getHighlight().
902
903 2015-01-18  Sam Weinig  <sam@webkit.org>
904
905         Fix style issues and add availability macros missed in r178634
906         https://bugs.webkit.org/show_bug.cgi?id=140597
907
908         Reviewed by Dan Bernstein.
909
910         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
911         Add missing availability macros.
912
913         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
914         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
915         (-[_WKUserContentFilter initWithName:serializedRules:]):
916         (-[_WKUserContentFilter _initWithName:serializedRules:]): Deleted.
917         Removed unnecessary leading underscore from init method.
918
919 2015-01-17  Sam Weinig  <sam@webkit.org>
920
921         Add initial experimental user content filtering API
922         https://bugs.webkit.org/show_bug.cgi?id=140584
923
924         Reviewed by Benjamin Poulain.
925
926         Moves content filtering from being per-ProcessPool to per-UserContentController.
927
928         * Shared/API/APIObject.h:
929         * Shared/API/c/WKBase.h:
930         * UIProcess/API/APIUserContentFilter.cpp: Added.
931         (API::UserContentFilter::UserContentFilter):
932         (API::UserContentFilter::~UserContentFilter):
933         * UIProcess/API/APIUserContentFilter.h: Added.
934         * UIProcess/API/C/WKAPICast.h:
935         * UIProcess/API/C/WKUserContentFilterRef.cpp: Added.
936         (WKUserContentFilterGetTypeID):
937         (WKUserContentFilterCreate):
938         * UIProcess/API/C/WKUserContentFilterRef.h: Added.
939         * UIProcess/API/C/WebKit2_C.h:
940         * UIProcess/API/Cocoa/_WKUserContentFilter.h: Added.
941         * UIProcess/API/Cocoa/_WKUserContentFilter.mm: Added.
942         (WKUserContentControllerAddUserContentFilter):
943         (WKUserContentControllerRemoveAllUserContentFilters):
944         (-[_WKUserContentFilter _initWithName:ruleList:]):
945         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h: Added.
946         Add a basic UserContentFilter type and expose it via both the Objective-C API (as _WKUserContentFilter)
947         and via the C SPI (as WKUserContentFilterRef).
948
949         * UIProcess/API/C/WKUserContentControllerRef.h:
950         * UIProcess/API/C/WKUserContentControllerRef.cpp:
951         Add C-SPI to set and remove WKUserContentFilterRefs.
952
953         * UIProcess/API/Cocoa/WKProcessPool.mm:
954         (-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]): Deleted.
955         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
956         * UIProcess/WebProcessPool.cpp:
957         (WebKit::WebProcessPool::processDidFinishLaunching):
958         (WebKit::WebProcessPool::loadContentExtension): Deleted.
959         * UIProcess/WebProcessPool.h:
960         * WebProcess/WebProcess.cpp:
961         (WebKit::WebProcess::loadContentExtension): Deleted.
962         * WebProcess/WebProcess.h:
963         * WebProcess/WebProcess.messages.in:
964         Remove the old SPI for loading content filters that was per-ProcessPool. Content filters now follow
965         the same pattern as UserScripts and UserStyleSheets as being per-UserContentController.
966
967         * UIProcess/API/Cocoa/WKUserContentController.mm:
968         (-[WKUserContentController _addUserContentFilter:]):
969         (-[WKUserContentController _removeAllUserContentFilters]):
970         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
971         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
972         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
973         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
974         (WebKit::WebUserContentControllerProxy::addProcess):
975         (WebKit::WebUserContentControllerProxy::addUserContentFilter):
976         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters):
977         * UIProcess/UserContent/WebUserContentControllerProxy.h:
978         * WebProcess/UserContent/WebUserContentController.cpp:
979         (WebKit::WebUserContentController::addUserContentFilters):
980         (WebKit::WebUserContentController::removeAllUserContentFilters):
981         * WebProcess/UserContent/WebUserContentController.h:
982         * WebProcess/UserContent/WebUserContentController.messages.in:
983         Pipe user content filters over to all the WebProcesses that the UserContentController is
984         connected to.
985
986         * WebKit2.xcodeproj/project.pbxproj:
987         Add new files.
988
989 2015-01-17  Chris Dumez  <cdumez@apple.com>
990
991         [WK2][iOS] Add Cocoa delegate for logging diagnostic messages
992         https://bugs.webkit.org/show_bug.cgi?id=140410
993
994         Reviewed by Sam Weinig.
995
996         Add Cocoa delegate for logging diagnostic messages.
997
998         * UIProcess/API/APIDiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
999         (API::DiagnosticLoggingClient::~DiagnosticLoggingClient):
1000         (API::DiagnosticLoggingClient::logDiagnosticMessage):
1001         (API::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
1002         (API::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
1003         * UIProcess/API/C/WKPage.cpp:
1004         (WKPageSetPageDiagnosticLoggingClient):
1005         * UIProcess/API/Cocoa/WKWebView.mm:
1006         (-[WKWebView initWithFrame:configuration:]):
1007         (-[WKWebView _diagnosticLoggingDelegate]):
1008         (-[WKWebView _setDiagnosticLoggingDelegate:]):
1009         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1010         * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
1011         * UIProcess/Cocoa/DiagnosticLoggingClient.h: Copied from Source/WebKit2/UIProcess/WebPageDiagnosticLoggingClient.h.
1012         * UIProcess/Cocoa/DiagnosticLoggingClient.mm: Added.
1013         (WebKit::DiagnosticLoggingClient::DiagnosticLoggingClient):
1014         (WebKit::DiagnosticLoggingClient::delegate):
1015         (WebKit::DiagnosticLoggingClient::setDelegate):
1016         (WebKit::DiagnosticLoggingClient::logDiagnosticMessage):
1017         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithResult):
1018         (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValue):
1019         * UIProcess/WebPageDiagnosticLoggingClient.cpp:
1020         (WebKit::WebPageDiagnosticLoggingClient::WebPageDiagnosticLoggingClient):
1021         * UIProcess/WebPageDiagnosticLoggingClient.h:
1022         * UIProcess/WebPageProxy.cpp:
1023         (WebKit::WebPageProxy::WebPageProxy):
1024         (WebKit::WebPageProxy::setDiagnosticLoggingClient):
1025         (WebKit::WebPageProxy::close):
1026         (WebKit::WebPageProxy::logDiagnosticMessage):
1027         (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
1028         (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
1029         (WebKit::WebPageProxy::initializeDiagnosticLoggingClient): Deleted.
1030         * UIProcess/WebPageProxy.h:
1031         (WebKit::WebPageProxy::diagnosticLoggingClient):
1032         * WebKit2.xcodeproj/project.pbxproj:
1033
1034 2015-01-17  David Kilzer  <ddkilzer@apple.com>
1035
1036         REGRESSION (r178618): Change to WKWebViewConfiguration broke iOS build
1037         <https://bugs.webkit.org/show_bug.cgi?id=140559>
1038
1039         Blind fix to address the following build failure:
1040
1041             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:79:7: error: interface type cannot be statically allocated
1042                 T m_value;
1043                   ^
1044                   *
1045             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:94:55: note: in instantiation of template class 'LazyInitialized<WKWebViewContentProviderRegistry>' requested here
1046                 LazyInitialized<WKWebViewContentProviderRegistry> _contentProviderRegistry;
1047                                                                   ^
1048             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:53:21: error: assigning to 'WKWebViewContentProviderRegistry *' from incompatible type 'RetainPtr<WKWebViewContentProviderRegistry *>'
1049                         m_value = f();
1050                                 ^ ~~~
1051             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:37: note: in instantiation of function template specialization 'LazyInitialized<WKWebViewContentProviderRegistry>::get<(lambda at Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:222:41)>' requested here
1052                 return _contentProviderRegistry.get([] { return adoptNS([[WKWebViewContentProviderRegistry alloc] init]); });
1053                                                 ^
1054             Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:57:24: error: property 'get' not found on object of type 'WKWebViewContentProviderRegistry *'
1055                     return m_value.get();
1056                                    ^
1057             3 errors generated.
1058
1059         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Change
1060         _contentProviderRegistry to be a LazyInitialized<RetainPtr<>> to
1061         match other instance variables.
1062
1063 2015-01-16  Sam Weinig  <sam@webkit.org>
1064
1065         Add a basic configuration object for WKView
1066         https://bugs.webkit.org/show_bug.cgi?id=140559
1067
1068         Reviewed by Anders Carlsson.
1069
1070         - Adds WKPageConfigurationRef (backed by API::PageConfiguration). WKWebView configuration
1071           is not yet bridged to this, but that will happen soon. For now, it has a few basic
1072           configuration options.
1073         - Adds WKUserContentControllerRef as C-SPI version of WKUserContentController.
1074         - Adds WKUserScriptRef as C-SPI version of WKUserScript.
1075
1076         * Shared/API/APIObject.h:
1077         * Shared/API/c/WKBase.h:
1078         * Shared/API/c/WKSharedAPICast.h:
1079         (WebKit::toWKUserScriptInjectionTime):
1080         * UIProcess/API/APIPageConfiguration.cpp: Added.
1081         (API::PageConfiguration::PageConfiguration):
1082         (API::PageConfiguration::~PageConfiguration):
1083         (API::PageConfiguration::processPool):
1084         (API::PageConfiguration::setProcessPool):
1085         (API::PageConfiguration::userContentController):
1086         (API::PageConfiguration::setUserContentController):
1087         (API::PageConfiguration::pageGroup):
1088         (API::PageConfiguration::setPageGroup):
1089         (API::PageConfiguration::preferences):
1090         (API::PageConfiguration::setPreferences):
1091         (API::PageConfiguration::relatedPage):
1092         (API::PageConfiguration::setRelatedPage):
1093         (API::PageConfiguration::webPageConfiguration):
1094         * UIProcess/API/APIPageConfiguration.h: Added.
1095         (API::PageConfiguration::create):
1096         * UIProcess/API/APIUserScript.cpp: Added.
1097         (API::generateIdentifier):
1098         (API::UserScript::generateUniqueURL):
1099         * UIProcess/API/APIUserScript.h:
1100         * UIProcess/API/C/WKAPICast.h:
1101         * UIProcess/API/C/WKPageConfigurationRef.cpp: Added.
1102         (WKPageConfigurationGetTypeID):
1103         (WKPageConfigurationCreate):
1104         (WKPageConfigurationGetContext):
1105         (WKPageConfigurationSetContext):
1106         (WKPageConfigurationGetPageGroup):
1107         (WKPageConfigurationSetPageGroup):
1108         (WKPageConfigurationGetUserContentController):
1109         (WKPageConfigurationSetUserContentController):
1110         (WKPageConfigurationGetPreferences):
1111         (WKPageConfigurationSetPreferences):
1112         (WKPageConfigurationGetRelatedPage):
1113         (WKPageConfigurationSetRelatedPage):
1114         * UIProcess/API/C/WKPageConfigurationRef.h: Added.
1115         * UIProcess/API/C/WKUserContentControllerRef.cpp: Added.
1116         (WKUserContentControllerGetTypeID):
1117         (WKUserContentControllerCreate):
1118         (WKUserContentControllerCopyUserScripts):
1119         (WKUserContentControllerAddUserScript):
1120         (WKUserContentControllerRemoveAllUserScripts):
1121         * UIProcess/API/C/WKUserContentControllerRef.h: Added.
1122         * UIProcess/API/C/WKUserScriptRef.cpp: Added.
1123         (WKUserScriptGetTypeID):
1124         (WKUserScriptCreateWithSource):
1125         (WKUserScriptCopySource):
1126         (WKUserScriptGetInjectionTime):
1127         (WKUserScriptGetMainFrameOnly):
1128         * UIProcess/API/C/WKUserScriptRef.h: Added.
1129         * UIProcess/API/C/WebKit2_C.h:
1130         * UIProcess/API/Cocoa/WKUserScript.mm:
1131         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
1132         (generateIdentifier): Deleted.
1133         * UIProcess/API/Cocoa/WKViewPrivate.h:
1134         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1135         (LazyInitialized::get):
1136         (LazyInitialized::set):
1137         (LazyInitialized::peek):
1138         * UIProcess/API/mac/WKView.mm:
1139         (-[WKView initWithFrame:configurationRef:]):
1140         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1141         (WebKit::WebUserContentControllerProxy::create):
1142         * WebKit2.xcodeproj/project.pbxproj:
1143
1144 2015-01-16  Anders Carlsson  <andersca@apple.com>
1145
1146         Pass the connection along to WebProcessLifetimeTracker
1147         https://bugs.webkit.org/show_bug.cgi?id=140569
1148
1149         Reviewed by Andreas Kling.
1150
1151         * UIProcess/WebPageProxy.cpp:
1152         (WebKit::WebPageProxy::connectionWillOpen):
1153         (WebKit::WebPageProxy::connectionDidClose):
1154         * UIProcess/WebProcessLifetimeTracker.cpp:
1155         (WebKit::WebProcessLifetimeTracker::connectionWillOpen):
1156         (WebKit::WebProcessLifetimeTracker::connectionDidClose):
1157         (WebKit::WebProcessLifetimeTracker::connectionWillClose): Deleted.
1158         * UIProcess/WebProcessLifetimeTracker.h:
1159
1160 2015-01-16  Anders Carlsson  <andersca@apple.com>
1161
1162         More WebPageProxy CTTE
1163         https://bugs.webkit.org/show_bug.cgi?id=140565
1164
1165         Reviewed by Andreas Kling.
1166
1167         * UIProcess/WebPageProxy.cpp:
1168         (WebKit::WebPageProxy::connectionWillOpen):
1169         (WebKit::WebPageProxy::connectionDidClose):
1170         (WebKit::WebPageProxy::connectionWillClose): Deleted.
1171         * UIProcess/WebPageProxy.h:
1172         * UIProcess/WebProcessProxy.cpp:
1173         (WebKit::WebProcessProxy::connectionWillOpen):
1174         (WebKit::WebProcessProxy::connectionDidClose):
1175
1176 2015-01-16  Anders Carlsson  <andersca@apple.com>
1177
1178         Remove dead code
1179         https://bugs.webkit.org/show_bug.cgi?id=140563
1180
1181         Reviewed by Geoffrey Garen.
1182
1183         * UIProcess/WebProcessPool.cpp:
1184         (WebKit::WebProcessPool::processWillOpenConnection): Deleted.
1185         (WebKit::WebProcessPool::processWillCloseConnection): Deleted.
1186         * UIProcess/WebProcessPool.h:
1187         * UIProcess/WebProcessProxy.cpp:
1188         (WebKit::WebProcessProxy::connectionWillOpen):
1189         (WebKit::WebProcessProxy::connectionDidClose):
1190
1191 2015-01-16  Anders Carlsson  <andersca@apple.com>
1192
1193         Sprinkle some CTTE in ChildProcessProxy member functions
1194         https://bugs.webkit.org/show_bug.cgi?id=140562
1195
1196         Reviewed by Andreas Kling.
1197
1198         * Shared/ChildProcessProxy.cpp:
1199         (WebKit::ChildProcessProxy::didFinishLaunching):
1200         (WebKit::ChildProcessProxy::clearConnection):
1201         (WebKit::ChildProcessProxy::connectionWillOpen):
1202         (WebKit::ChildProcessProxy::connectionDidClose):
1203         (WebKit::ChildProcessProxy::connectionWillClose): Deleted.
1204         * Shared/ChildProcessProxy.h:
1205         * UIProcess/Databases/DatabaseProcessProxy.cpp:
1206         (WebKit::DatabaseProcessProxy::connectionWillOpen): Deleted.
1207         (WebKit::DatabaseProcessProxy::connectionWillClose): Deleted.
1208         * UIProcess/Databases/DatabaseProcessProxy.h:
1209         * UIProcess/Network/NetworkProcessProxy.cpp:
1210         (WebKit::NetworkProcessProxy::connectionWillOpen):
1211         (WebKit::NetworkProcessProxy::connectionWillClose): Deleted.
1212         * UIProcess/Network/NetworkProcessProxy.h:
1213         * UIProcess/WebProcessProxy.cpp:
1214         (WebKit::WebProcessProxy::connectionWillOpen):
1215         (WebKit::WebProcessProxy::connectionDidClose):
1216         (WebKit::WebProcessProxy::connectionWillClose): Deleted.
1217         * UIProcess/WebProcessProxy.h:
1218         * UIProcess/mac/SecItemShimProxy.cpp:
1219         (WebKit::SecItemShimProxy::initializeConnection):
1220         * UIProcess/mac/SecItemShimProxy.h:
1221
1222 2015-01-16  Beth Dakin  <bdakin@apple.com>
1223
1224         Should cancel immediate action sooner in WK2
1225         https://bugs.webkit.org/show_bug.cgi?id=140561
1226         -and corresponding-
1227         rdar://problem/19490114
1228
1229         Reviewed by Tim Horton.
1230
1231         _cancelImmediateActionIfNeeded will cancel the immediate action if there is no 
1232         animation controller or if the DDActionContext doesn’t want to use its actions.
1233         * UIProcess/mac/WKImmediateActionController.mm:
1234         (-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
1235
1236         Call _cancelImmediateActionIfNeeded to cancel earlier.
1237         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]):
1238
1239         Re-factor this code to use the newly-added method _cancelImmediateActionIfNeeded
1240         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1241
1242 2015-01-16  Anders Carlsson  <andersca@apple.com>
1243
1244         Don't try to send SetSession messages before the web page has been constructed in the web process
1245         https://bugs.webkit.org/show_bug.cgi?id=140558
1246
1247         Reviewed by Andreas Kling.
1248
1249         * UIProcess/WebPageProxy.cpp:
1250         (WebKit::WebPageProxy::WebPageProxy):
1251         We already send the session ID along in the page creation parameters so just message the network process
1252         if we need to create an ephemeral session.
1253
1254         (WebKit::WebPageProxy::setSessionID):
1255         Add an isValid call for good measure.
1256
1257 2015-01-16  Anders Carlsson  <andersca@apple.com>
1258
1259         Log unhandled messages in the web process
1260         https://bugs.webkit.org/show_bug.cgi?id=140549
1261
1262         Reviewed by Andreas Kling.
1263
1264         * WebProcess/WebProcess.cpp:
1265         (WebKit::WebProcess::didReceiveSyncMessage):
1266         (WebKit::WebProcess::didReceiveMessage):
1267
1268 2015-01-16  Shivakumar JM  <shiva.jm@samsung.com>
1269
1270         Fix build warning in WebKit2/UIProcess module.
1271         https://bugs.webkit.org/show_bug.cgi?id=140538
1272
1273         Reviewed by Csaba Osztrogonác.
1274
1275         Fix build warnings by removing parameter name from functions
1276
1277         * UIProcess/Storage/StorageManager.cpp:
1278         (WebKit::StorageManager::processWillOpenConnection):
1279         (WebKit::StorageManager::processDidCloseConnection):
1280         * UIProcess/WebProcessPool.cpp:
1281         (WebKit::WebProcessPool::processWillOpenConnection):
1282         (WebKit::WebProcessPool::processWillCloseConnection):
1283
1284 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
1285
1286         Remove ENABLE(SQL_DATABASE) guards
1287         https://bugs.webkit.org/show_bug.cgi?id=140434
1288
1289         Reviewed by Darin Adler.
1290
1291         * Configurations/FeatureDefines.xcconfig:
1292         * Shared/OriginAndDatabases.cpp:
1293         * Shared/OriginAndDatabases.h:
1294         * Shared/WebCoreArgumentCoders.cpp:
1295         * UIProcess/API/C/WKContext.cpp:
1296         (WKContextGetDatabaseManager):
1297         * UIProcess/API/C/WKDatabaseManager.cpp:
1298         (WKDatabaseManagerGetTypeID):
1299         (WKDatabaseManagerGetOriginKey):
1300         (WKDatabaseManagerGetOriginQuotaKey):
1301         (WKDatabaseManagerGetOriginUsageKey):
1302         (WKDatabaseManagerGetDatabaseDetailsKey):
1303         (WKDatabaseManagerGetDatabaseDetailsNameKey):
1304         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
1305         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
1306         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
1307         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
1308         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
1309         (WKDatabaseManagerSetClient):
1310         (WKDatabaseManagerGetDatabasesByOrigin):
1311         (WKDatabaseManagerGetDatabaseOrigins):
1312         (WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
1313         (WKDatabaseManagerDeleteDatabasesForOrigin):
1314         (WKDatabaseManagerDeleteAllDatabases):
1315         (WKDatabaseManagerSetQuotaForOrigin):
1316         * UIProcess/API/efl/EwkView.cpp:
1317         (EwkView::informDatabaseQuotaReached):
1318         * UIProcess/WebDatabaseManagerProxy.cpp:
1319         * UIProcess/WebDatabaseManagerProxy.h:
1320         * UIProcess/WebDatabaseManagerProxy.messages.in:
1321         * UIProcess/WebProcessPool.cpp:
1322         * UIProcess/efl/PageUIClientEfl.cpp:
1323         (WebKit::PageUIClientEfl::PageUIClientEfl):
1324         (WebKit::PageUIClientEfl::exceededDatabaseQuota):
1325         * UIProcess/efl/PageUIClientEfl.h:
1326         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1327         (WebKit::InjectedBundle::clearAllDatabases):
1328         (WebKit::InjectedBundle::setDatabaseQuota):
1329         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1330         (WebKit::WebChromeClient::exceededDatabaseQuota):
1331         * WebProcess/WebCoreSupport/WebChromeClient.h:
1332         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1333         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1334         * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
1335         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp:
1336         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h:
1337         * WebProcess/WebPage/WebPage.cpp:
1338         (WebKit::WebPage::updatePreferences):
1339         * WebProcess/WebProcess.cpp:
1340         (WebKit::WebProcess::WebProcess):
1341
1342 2015-01-15  Anders Carlsson  <andersca@apple.com>
1343
1344         Add a connection parameter to StorageManager willOpen/didClose functions
1345         https://bugs.webkit.org/show_bug.cgi?id=140527
1346
1347         Reviewed by Tim Horton.
1348
1349         Rename processWillCloseConnection to processDidCloseConnection and pass connections
1350         to both functions since in the near future we won't be able to get the connection from 
1351         the web process proxy in these scenarios.
1352
1353         * UIProcess/Storage/StorageManager.cpp:
1354         (WebKit::StorageManager::processWillOpenConnection):
1355         (WebKit::StorageManager::processDidCloseConnection):
1356         (WebKit::StorageManager::processWillCloseConnection): Deleted.
1357         * UIProcess/Storage/StorageManager.h:
1358         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1359         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
1360         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
1361
1362 2015-01-15  Chris Dumez  <cdumez@apple.com>
1363
1364         [WK2] Wire diagnostic logging messages through the UIProcess
1365         https://bugs.webkit.org/show_bug.cgi?id=140486
1366
1367         Reviewed by Sam Weinig.
1368
1369         Wire diagnostic logging messages through the UIProcess.
1370         Eventually, the corresponding bundle API should go away.
1371
1372         * CMakeLists.txt:
1373         Add UIProcess/WebPageDiagnosticLoggingClient.cpp to CMake.
1374
1375         * Shared/API/c/WKDiagnosticLoggingResultType.h:
1376         Extract WKDiagnosticLoggingResultType enumeration from
1377         WKBundlePageDiagnosticLoggingClient.h into its own header so that
1378         it can be shared with the new WKPageDiagnosticLoggingClient.h.
1379
1380         * Shared/API/c/WKSharedAPICast.h:
1381         (WebKit::toAPI):
1382         (WebKit::toDiagnosticLoggingResultType):
1383         Add WebCore::DiagnosticLoggingResultType <-> WKDiagnosticLoggingResultType
1384         casting functions.
1385
1386         * UIProcess/API/C/WKPage.cpp:
1387         (WKPageSetPageDiagnosticLoggingClient):
1388         * UIProcess/API/C/WKPage.h:
1389         Add WKPage API so that the application can set the DiagnosticLoggingClient.
1390
1391         * UIProcess/API/C/WKPageDiagnosticLoggingClient.h: Added.
1392         New WK2 diagnostic logging client that will eventually replace the existing
1393         WKBundlePageDiagnosticLoggingClient.h injected bundle client.
1394
1395         * UIProcess/WebPageDiagnosticLoggingClient.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp.
1396         * UIProcess/WebPageDiagnosticLoggingClient.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
1397         * UIProcess/WebPageProxy.cpp:
1398         * UIProcess/WebPageProxy.h:
1399         Handle new IPC messages for logging diagnostic messages.
1400
1401         * UIProcess/WebPageProxy.messages.in:
1402         Add 3 IPC messages for logging diagnostic messages.
1403
1404         * WebKit2.xcodeproj/project.pbxproj:
1405         Add new files to XCode project.
1406
1407         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
1408         Remove WKDiagnosticLoggingResultType enum as it was moved to its own
1409         header.
1410
1411         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
1412         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
1413         Use WebCore::DiagnosticLoggingResultType enum type instead of
1414         WKDiagnosticLoggingResultType and call toAPI() to convert to
1415         WKDiagnosticLoggingResultType type.
1416
1417         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1418         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
1419         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
1420         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
1421         Send IPC to WebPageProxy in addition to calling the injected bundle client.
1422
1423         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1424         Use new DiagnosticLoggingResultType enum instead of the old LogType one.
1425
1426 2015-01-15  Dan Bernstein  <mitz@apple.com>
1427
1428         Added availability annotations to modern Cocoa SPI.
1429
1430         Rubber-stamped by Anders Carlsson.
1431
1432         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1433
1434 2015-01-15  Anders Carlsson  <andersca@apple.com>
1435
1436         Fix assertions on the Mountain Lion bots.
1437
1438         It is allowed to call addWorkQueueMessageReceiver even if the connection is open
1439         so remove that assertion.
1440
1441         * Platform/IPC/Connection.cpp:
1442         (IPC::Connection::addWorkQueueMessageReceiver):
1443
1444 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
1445
1446         Unreviewed build fix after r178536.
1447
1448         Initialize member variables in the proper order.
1449
1450         * UIProcess/WebPageProxy.cpp:
1451         (WebKit::WebPageProxy::WebPageProxy):
1452
1453 2015-01-15  Enrica Casucci  <enrica@apple.com>
1454
1455         [WK2] Add support for fully editable WKWebView.
1456         https://bugs.webkit.org/show_bug.cgi?id=140515
1457
1458         Reviewed by Anders Carlsson.
1459
1460         WKWebView has now a new property (_editable) to control
1461         the editability of the entire content.
1462
1463         * Shared/WebPageCreationParameters.cpp:
1464         (WebKit::WebPageCreationParameters::encode):
1465         (WebKit::WebPageCreationParameters::decode):
1466         * Shared/WebPageCreationParameters.h:
1467         * UIProcess/API/Cocoa/WKWebView.mm:
1468         (-[WKWebView _isEditable]):
1469         (-[WKWebView _setEditable:]):
1470         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1471         * UIProcess/API/mac/WKView.mm:
1472         * UIProcess/WebPageProxy.cpp:
1473         (WebKit::WebPageProxy::WebPageProxy):
1474         (WebKit::WebPageProxy::setEditable):
1475         (WebKit::WebPageProxy::creationParameters):
1476         * UIProcess/WebPageProxy.h:
1477         (WebKit::WebPageProxy::isEditable):
1478         * WebProcess/WebPage/WebPage.cpp:
1479         (WebKit::WebPage::setEditable):
1480         * WebProcess/WebPage/WebPage.h:
1481         * WebProcess/WebPage/WebPage.messages.in:
1482
1483 2015-01-15  Anders Carlsson  <andersca@apple.com>
1484
1485         Clearing the website data store should clear local storage
1486         https://bugs.webkit.org/show_bug.cgi?id=140507
1487
1488         Reviewed by Andreas Kling.
1489
1490         * Shared/WebsiteData/WebsiteDataTypes.h:
1491         Add WebsiteDataTypeLocalStorage.
1492
1493         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1494         Add WKWebsiteDataTypeLocalStorage
1495
1496         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1497         (toWebsiteDataTypes):
1498         Handle WKWebsiteDataTypeLocalStorage.
1499
1500         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1501         (WebKit::fileModificationTime):
1502         Use an early return.
1503
1504         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
1505         Change this to take an std::chrono::system_clock::time_point and don't
1506         try to modifiy m_origins while iterating it.
1507
1508         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1509         Update declarations.
1510
1511         * UIProcess/Storage/StorageManager.cpp:
1512         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
1513         Change this to take an std::chrono::system_clock::time_point.
1514
1515         * UIProcess/Storage/StorageManager.h:
1516         Update declarations.
1517
1518         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1519         (WebKit::WebsiteDataStore::removeData):
1520         Remove data from the storage manager as well.
1521
1522 2015-01-15  Anders Carlsson  <andersca@apple.com>
1523
1524         Give WebsiteDataStore a StorageManager
1525         https://bugs.webkit.org/show_bug.cgi?id=140505
1526
1527         Reviewed by Andreas Kling.
1528
1529         The process pool storage manager is still around but is only used for clearing data. It will be removed
1530         completely in an upcoming commit.
1531
1532         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1533         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1534         Set up the local storage directory.
1535
1536         * UIProcess/API/Cocoa/WKProcessPool.mm:
1537         (websiteDataDirectoryURL):
1538         Export this so it can be called from APIWebsiteDataStoreCocoa.
1539
1540         * UIProcess/WebPageProxy.cpp:
1541         (WebKit::WebPageProxy::createNewPage):
1542         Call WebsiteDataStore::cloneSessionData instead.
1543
1544         * UIProcess/WebPageProxy.h:
1545         (WebKit::WebPageProxy::websiteDataStore):
1546         Add getter.
1547
1548         * UIProcess/WebProcessPool.cpp:
1549         (WebKit::websiteDataStoreConfiguration):
1550         Update this to take a WebProcessPoolConfiguration object and assign the local storage directory.
1551
1552         (WebKit::WebProcessPool::WebProcessPool):
1553         Pass the configuration to websiteDataStoreConfiguration.
1554
1555         (WebKit::WebProcessPool::processWillOpenConnection):
1556         (WebKit::WebProcessPool::processWillCloseConnection):
1557         Remove storage manager calls.
1558
1559         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1560         (WebKit::WebsiteDataStore::WebsiteDataStore):
1561         When creating a persistent data store, also create a storage manager.
1562
1563         (WebKit::WebsiteDataStore::cloneSessionData):
1564         Clone the session storage namespace.
1565
1566         (WebKit::WebsiteDataStore::webPageWasAdded):
1567         Create a session storage namespace for this page.
1568
1569         (WebKit::WebsiteDataStore::webPageWasRemoved):
1570         Destroy the session storage namespace.
1571
1572         (WebKit::WebsiteDataStore::webProcessWillOpenConnection):
1573         Tell the storage manager about the new process connection.
1574
1575         (WebKit::WebsiteDataStore::webPageWillOpenConnection):
1576         Set the allowed connection.
1577
1578         (WebKit::WebsiteDataStore::webPageDidCloseConnection):
1579         Clear the allowed connection.
1580
1581         (WebKit::WebsiteDataStore::webProcessDidCloseConnection):
1582         Tell the storage manager that the process connection has been closed.
1583
1584         * UIProcess/WebsiteData/WebsiteDataStore.h:
1585         Add new members.
1586
1587 2015-01-15  Anders Carlsson  <andersca@apple.com>
1588
1589         More work on the lifetime observer
1590         https://bugs.webkit.org/show_bug.cgi?id=140500
1591
1592         Reviewed by Andreas Kling.
1593
1594         Add webPageWasAdded/webPageWasRemoved functions; these will be called first and last during the
1595         lifetime of the web page. Also remove removeObserver since nobody is calling it.
1596
1597         * UIProcess/WebProcessLifetimeObserver.h:
1598         (WebKit::WebProcessLifetimeObserver::webPageWasAdded):
1599         (WebKit::WebProcessLifetimeObserver::webPageWasRemoved):
1600         * UIProcess/WebProcessLifetimeTracker.cpp:
1601         (WebKit::WebProcessLifetimeTracker::addObserver):
1602         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
1603         (WebKit::WebProcessLifetimeTracker::removeObserver): Deleted.
1604         * UIProcess/WebProcessLifetimeTracker.h:
1605
1606 2015-01-14  Anders Carlsson  <andersca@apple.com>
1607
1608         Don't pass an allowed connection when creating a session storage namespace
1609         https://bugs.webkit.org/show_bug.cgi?id=140482
1610
1611         Reviewed by Sam Weinig.
1612
1613         Instead, always call setAllowedSessionStorageNamespaceConnection. This will make it easier to
1614         move the storage manager into WebsiteDataStore and make it use the process lifetime observer machinery.
1615
1616         * UIProcess/Storage/StorageManager.cpp:
1617         (WebKit::StorageManager::SessionStorageNamespace::create):
1618         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
1619         (WebKit::StorageManager::createSessionStorageNamespace):
1620         * UIProcess/Storage/StorageManager.h:
1621         * UIProcess/WebPageProxy.cpp:
1622         (WebKit::WebPageProxy::WebPageProxy):
1623
1624 2015-01-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1625
1626         REGRESSION(r177075): [GTK] Creating a second web view disables accelerated compositing in existing web view
1627         https://bugs.webkit.org/show_bug.cgi?id=140494
1628
1629         Reviewed by Gustavo Noronha Silva.
1630
1631         The problem is that r177075 moved the creation of the redirected
1632         XComposite window to realize method, but leaving the call to
1633         webkitWebViewBaseUpdatePreferences() in both places Realize() and
1634         CreateWebPage(). webkitWebViewBaseUpdatePreferences() only updates
1635         the accelerating compositing setting nowadays, depending on
1636         whether the redirected XComposited window could be created or not
1637         (something that depends on whether XRender, XComposite and XDamage
1638         extensions are available in the current display). So, when the
1639         first web view is created, webkitWebViewBaseUpdatePreferences() is
1640         called first from CreateWebPage(), and always disabling
1641         accelerated compositing because the redirected window hasn't been
1642         created yet, and then from Realize() right after the redirected
1643         window is created so that accelerated compositing is enabled. When
1644         the second web view is created the same happens, but since
1645         settings are shared among web views, the first call to
1646         webkitWebViewBaseUpdatePreferences() from CreateWebPage() disables
1647         accelerated compositing and the web page exists accelerated
1648         compositing mode and never enters it again unless the page is
1649         reloaded. I guess the web page should enter accelerated
1650         compositing mode again when the setting is enabled again from
1651         Realize(), but since the setting is global and doesn't depend on
1652         every web view, we should never disable it once it has been
1653         enabled in any case.
1654         Since we want to enable accelerated compositing mode when the
1655         redirected XComposite window has been successfully created, we can
1656         use the SetNativeSurfaceHandleForCompositing message to enable the
1657         setting and remove webkitWebViewBaseUpdatePreferences().
1658
1659         * UIProcess/API/gtk/WebKitWebView.cpp:
1660         (webkitWebViewUpdateSettings):
1661         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1662         (webkitWebViewBaseRealize):
1663         (webkitWebViewBaseCreateWebPage):
1664         (webkitWebViewBaseUpdatePreferences): Deleted.
1665         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1666         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1667         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
1668
1669 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1670
1671         Unreviewed. Fix GTK+ build after r178464.
1672
1673         * UIProcess/API/gtk/WebKitUserContent.cpp:
1674         (_WebKitUserScript::_WebKitUserScript):
1675         (webkitUserScriptGetUserScript):
1676         * UIProcess/API/gtk/WebKitUserContentPrivate.h:
1677
1678 2015-01-14  Sam Weinig  <sam@webkit.org>
1679
1680         Convert WKUserScript to be an API::Object bridged object
1681         https://bugs.webkit.org/show_bug.cgi?id=140471
1682
1683         Reviewed by Dan Bernstein.
1684
1685         * Shared/API/APIObject.h:
1686         * Shared/Cocoa/APIObject.mm:
1687         (API::Object::newObject):
1688         Add Type::UserScript.
1689
1690         * UIProcess/API/APIUserScript.h: Added.
1691         Add API object for UserScripts.
1692
1693         * UIProcess/API/Cocoa/WKUserContentController.mm:
1694         (-[WKUserContentController init]):
1695         (-[WKUserContentController userScripts]):
1696         (-[WKUserContentController addUserScript:]):
1697         (-[WKUserContentController removeAllUserScripts]):
1698         (toWebCoreUserScriptInjectionTime): Deleted.
1699         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1700         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1701         (WebKit::WebUserContentControllerProxy::addProcess):
1702         (WebKit::WebUserContentControllerProxy::addUserScript):
1703         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1704         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1705         (WebKit::WebUserContentControllerProxy::userScripts):
1706         Store the WKUserScripts in the WebUserContentControllerProxy instead of the
1707         Objective-C layer WKUserContentController, to allow creation of the object
1708         from either the Objective-C or C++ sides.
1709
1710         * UIProcess/API/Cocoa/WKUserScript.mm:
1711         (generateIdentifier):
1712         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
1713         (-[WKUserScript source]):
1714         (-[WKUserScript injectionTime]):
1715         (-[WKUserScript isForMainFrameOnly]):
1716         (-[WKUserScript _apiObject]):
1717         * UIProcess/API/Cocoa/WKUserScriptInternal.h:
1718         (API::wrapper):
1719         (API::toWebCoreUserScriptInjectionTime):
1720         (API::toWKUserScriptInjectionTime):
1721         Convert to get properties from the API::UserScript.
1722
1723         * WebKit2.xcodeproj/project.pbxproj:
1724         Add the new file.
1725
1726 2015-01-14  Anders Carlsson  <andersca@apple.com>
1727
1728         Add per page connection callbacks to the lifetime observer
1729         https://bugs.webkit.org/show_bug.cgi?id=140475
1730
1731         Reviewed by Andreas Kling.
1732
1733         * UIProcess/WebProcessLifetimeObserver.cpp:
1734         (WebKit::WebProcessLifetimeObserver::addWebPage):
1735         (WebKit::WebProcessLifetimeObserver::removeWebPage):
1736         * UIProcess/WebProcessLifetimeObserver.h:
1737         (WebKit::WebProcessLifetimeObserver::webPageWillOpenConnection):
1738         (WebKit::WebProcessLifetimeObserver::webPageDidCloseConnection):
1739
1740 2015-01-14  Anders Carlsson  <andersca@apple.com>
1741
1742         Make WebsiteDataStore a WebProcessLifetimeObserver
1743         https://bugs.webkit.org/show_bug.cgi?id=140472
1744
1745         Reviewed by Andreas Kling.
1746
1747         * UIProcess/WebPageProxy.cpp:
1748         (WebKit::WebPageProxy::WebPageProxy):
1749         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1750         (WebKit::WebsiteDataStore::~WebsiteDataStore):
1751         (WebKit::WebsiteDataStore::removeData):
1752         (WebKit::WebsiteDataStore::addWebPage): Deleted.
1753         (WebKit::WebsiteDataStore::removeWebPage): Deleted.
1754         * UIProcess/WebsiteData/WebsiteDataStore.h:
1755
1756 2015-01-14  Chris Dumez  <cdumez@apple.com>
1757
1758         [WK2][iOS] Add private API to toggle diagnostic logging setting
1759         https://bugs.webkit.org/show_bug.cgi?id=140464
1760
1761         Reviewed by Dan Bernstein.
1762
1763         Add private API to toggle diagnostic logging setting for iOS.
1764         Previously, there was only a WK2 private C API for this.
1765
1766         * UIProcess/API/Cocoa/WKPreferences.mm:
1767         (-[WKPreferences _diagnosticLoggingEnabled]):
1768         (-[WKPreferences _setDiagnosticLoggingEnabled:]):
1769         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1770
1771 2015-01-14  Anders Carlsson  <andersca@apple.com>
1772
1773         Switch VisitedLinkProvider over to WebProcessLifetimeObserver
1774         https://bugs.webkit.org/show_bug.cgi?id=140469
1775
1776         Reviewed by Andreas Kling.
1777
1778         * UIProcess/VisitedLinkProvider.cpp:
1779         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
1780         (WebKit::VisitedLinkProvider::removeAll):
1781         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
1782         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
1783         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1784         (WebKit::VisitedLinkProvider::resizeTable):
1785         (WebKit::VisitedLinkProvider::addProcess): Deleted.
1786         (WebKit::VisitedLinkProvider::removeProcess): Deleted.
1787         * UIProcess/VisitedLinkProvider.h:
1788         * UIProcess/WebPageProxy.cpp:
1789         (WebKit::WebPageProxy::WebPageProxy):
1790         (WebKit::WebPageProxy::processDidFinishLaunching):
1791         * UIProcess/WebProcessLifetimeObserver.cpp:
1792         (WebKit::WebProcessLifetimeObserver::processes):
1793         * UIProcess/WebProcessLifetimeObserver.h:
1794         * UIProcess/WebProcessProxy.cpp:
1795         (WebKit::WebProcessProxy::disconnect):
1796         (WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
1797         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
1798         * UIProcess/WebProcessProxy.h:
1799
1800 2015-01-14  Anders Carlsson  <andersca@apple.com>
1801
1802         Add willOpen and didClose member functions to WebProcessLifetimeObserver
1803         https://bugs.webkit.org/show_bug.cgi?id=140449
1804
1805         Reviewed by Andreas Kling.
1806
1807         * UIProcess/VisitedLinkProvider.cpp:
1808         (WebKit::VisitedLinkProvider::addVisitedLinkHash):
1809         (WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
1810         (WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
1811         * UIProcess/VisitedLinkProvider.h:
1812         * UIProcess/WebPageProxy.cpp:
1813         (WebKit::WebPageProxy::WebPageProxy):
1814         (WebKit::WebPageProxy::close):
1815         * UIProcess/WebProcessLifetimeObserver.cpp:
1816         (WebKit::WebProcessLifetimeObserver::addWebPage):
1817         (WebKit::WebProcessLifetimeObserver::removeWebPage):
1818         * UIProcess/WebProcessLifetimeObserver.h:
1819         (WebKit::WebProcessLifetimeObserver::webProcessWillOpenConnection):
1820         (WebKit::WebProcessLifetimeObserver::webProcessDidCloseConnection):
1821
1822 2015-01-14  Dan Bernstein  <mitz@apple.com>
1823
1824         Added availability annotations to some modern Cocoa SPI.
1825
1826         Rubber-stamped by Anders Carlsson.
1827
1828         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1829         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1830
1831 2015-01-14  Hunseop Jeong  <hs85.jeong@samsung.com>
1832
1833         [GTK] Fix build after r178385
1834         https://bugs.webkit.org/show_bug.cgi?id=140429
1835
1836         Reviewed by Csaba Osztrogonác.
1837
1838         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
1839         (_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
1840
1841 2015-01-14  Commit Queue  <commit-queue@webkit.org>
1842
1843         Unreviewed, rolling out r178412.
1844         https://bugs.webkit.org/show_bug.cgi?id=140433
1845
1846         Wrong fix (Requested by KaL on #webkit).
1847
1848         Reverted changeset:
1849
1850         "Unreviewed GTK build fix after r178385."
1851         http://trac.webkit.org/changeset/178412
1852
1853 2015-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1854
1855         [GTK] Do not schedule a redraw for the redirected XComposite window when not in accelerated compositing mode
1856         https://bugs.webkit.org/show_bug.cgi?id=140354
1857
1858         Reviewed by Martin Robinson.
1859
1860         The RedirectedXCompositeWindow uses XDamage to be notified when
1861         the XWindow has been modified. Since the redirected window is
1862         created unconditionally we always receive a XDamage notify when
1863         the window is mapped, and we schedule a redraw in the web view
1864         even when the web view is not in accelerated compositing mode.
1865
1866         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1867         (webkitWebViewBaseRealize): Only call gtk_widget_queue_draw() when
1868         in accelerated compositing mode.
1869
1870 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1871
1872         [GTK] Do not resize the redirected XComposite window when not in accelerated compositing mode
1873         https://bugs.webkit.org/show_bug.cgi?id=140353
1874
1875         Reviewed by Martin Robinson.
1876
1877         We create the redirected XComposite window unconditionally, but
1878         with a size of 1x1 to save memory. However, we are always resizing
1879         it, so in the end we always end up with a XWindow allocated for
1880         the same size of the web view, even for web views that never enter
1881         in accelerated compositing mode.
1882
1883         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1884         (webkitWebViewRenderAcceleratedCompositingResults): Resize the
1885         RedirectedXCompositeWindow to the current web view size to ensure
1886         the sizes match before drawing.
1887         (resizeWebKitWebViewBaseFromAllocation): Only resize the
1888         RedirectedXCompositeWindow when in accelerated compositing mode.
1889         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1890         (WebKit::RedirectedXCompositeWindow::resize): Return early if the
1891         given size is the current size.
1892
1893 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1894
1895         REGRESSION(r177075): Flickering when the WebView is realized
1896         https://bugs.webkit.org/show_bug.cgi?id=140352
1897
1898         Reviewed by Martin Robinson.
1899
1900         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1901         (webkitWebViewBaseRealize): Pass the parent GdkWindow to the
1902         RedirectedXCompositeWindow constructor.
1903         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
1904         (WebKit::supportsXDamageAndXComposite): Get the display from the
1905         given GdkWindow.
1906         (WebKit::RedirectedXCompositeWindow::create): Receive a GdkWindow
1907         instead of the Display and sise that is always 1x1.
1908         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1909         Use the passed in GdkWindow to get the Display, Visual and Depth
1910         instead of using the window as parent and reparent afterwards.
1911         * UIProcess/gtk/RedirectedXCompositeWindow.h:
1912
1913 2015-01-14  Gwang Yoon Hwang  <yoon@igalia.com>
1914
1915         Unreviewed GTK build fix after r178385.
1916
1917         WebUserContentControllerProxy is not RefCounted anymore.
1918
1919         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
1920         (_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
1921
1922 2015-01-13  Chris Dumez  <cdumez@apple.com>
1923
1924         Unreviewed GTK build fix after r178375.
1925
1926         uint64_t navigationID -> API::Navigation*.
1927
1928         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1929
1930 2015-01-13  Chris Dumez  <cdumez@apple.com>
1931
1932         Unreviewed GTK build fix after r178375.
1933
1934         WebFrameProxy is now a reference instead of a pointer.
1935
1936         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1937
1938 2015-01-13  Chris Dumez  <cdumez@apple.com>
1939
1940         Unreviewed GTK build fix after r178375.
1941
1942         WebPageProxy is now a reference instead of a pointer.
1943
1944         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1945
1946 2015-01-13  Anders Carlsson  <andersca@apple.com>
1947
1948         Fill in more of WebProcessLifetimeTracker
1949         https://bugs.webkit.org/show_bug.cgi?id=140418
1950
1951         Reviewed by Andreas Kling.
1952
1953         * UIProcess/WebProcessLifetimeObserver.cpp:
1954         (WebKit::WebProcessLifetimeObserver::WebProcessLifetimeObserver):
1955         (WebKit::WebProcessLifetimeObserver::~WebProcessLifetimeObserver):
1956         (WebKit::WebProcessLifetimeObserver::addWebPage):
1957         (WebKit::WebProcessLifetimeObserver::removeWebPage):
1958         * UIProcess/WebProcessLifetimeObserver.h:
1959         * UIProcess/WebProcessLifetimeTracker.cpp:
1960         (WebKit::WebProcessLifetimeTracker::WebProcessLifetimeTracker):
1961         (WebKit::WebProcessLifetimeTracker::addObserver):
1962         (WebKit::WebProcessLifetimeTracker::connectionWillOpen):
1963         (WebKit::WebProcessLifetimeTracker::connectionWillClose):
1964         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
1965         (WebKit::WebProcessLifetimeTracker::processIsRunning):
1966         * UIProcess/WebProcessLifetimeTracker.h:
1967
1968 2015-01-13  Chris Dumez  <cdumez@apple.com>
1969
1970         Unreviewed iOS build fix after r178375.
1971
1972         LoaderClient::didLayout() now takes a reference to the WebPageProxy
1973         instead of a pointer.
1974
1975         * UIProcess/ios/WebPageProxyIOS.mm:
1976         (WebKit::WebPageProxy::didCommitLayerTree):
1977
1978 2015-01-13  Sam Weinig  <sam@webkit.org>
1979
1980         Convert WebUserContentControllerProxy to an API::Object bridged to WKUserContentController
1981         https://bugs.webkit.org/show_bug.cgi?id=140414
1982
1983         Reviewed by Dan Bernstein.
1984
1985         * Shared/API/APIObject.h:
1986         Add Type::UserContentController.
1987
1988         * Shared/Cocoa/APIObject.mm:
1989         (API::Object::newObject):
1990         Allocate WebUserContentControllerProxy using [WKUserContentController alloc].
1991
1992         * UIProcess/API/Cocoa/WKUserContentController.mm:
1993         (-[WKUserContentController init]):
1994         (-[WKUserContentController dealloc]):
1995         (-[WKUserContentController _apiObject]):
1996         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
1997         (WebKit::wrapper):
1998         Convert to using API::ObjectStorage for the internal WebUserContentControllerProxy.
1999
2000         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2001         (WebKit::WebUserContentControllerProxy::create): Deleted.
2002         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2003         Convert to inherit from API::ObjectImpl<> and remove create function.
2004
2005 2015-01-13  Anders Carlsson  <andersca@apple.com>
2006
2007         Stub out more of the process lifetime tracker code
2008         https://bugs.webkit.org/show_bug.cgi?id=140411
2009
2010         Reviewed by Sam Weinig.
2011
2012         * UIProcess/WebPageProxy.cpp:
2013         (WebKit::WebPageProxy::close):
2014         (WebKit::WebPageProxy::connectionWillOpen):
2015         (WebKit::WebPageProxy::connectionWillClose):
2016         * UIProcess/WebProcessLifetimeTracker.cpp:
2017         (WebKit::WebProcessLifetimeTracker::connectionWillOpen):
2018         (WebKit::WebProcessLifetimeTracker::connectionWillClose):
2019         (WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
2020         * UIProcess/WebProcessLifetimeTracker.h:
2021
2022 2015-01-13  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2023
2024         [CMake] Unreviewed build fix after r178366.
2025
2026         * CMakeLists.txt: Add new files added by r178366.
2027
2028 2015-01-13  Sam Weinig  <sam@webkit.org>
2029
2030         Move more of the Navigation infrastructure down to WebPageProxy
2031         https://bugs.webkit.org/show_bug.cgi?id=140395
2032
2033         Reviewed by Anders Carlsson.
2034
2035         * UIProcess/API/APILoaderClient.h:
2036         (API::LoaderClient::didStartProvisionalLoadForFrame):
2037         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2038         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2039         (API::LoaderClient::didCommitLoadForFrame):
2040         (API::LoaderClient::didFinishDocumentLoadForFrame):
2041         (API::LoaderClient::didFinishLoadForFrame):
2042         (API::LoaderClient::didFailLoadWithErrorForFrame):
2043         (API::LoaderClient::didSameDocumentNavigationForFrame):
2044         (API::LoaderClient::didReceiveTitleForFrame):
2045         (API::LoaderClient::didFirstLayoutForFrame):
2046         (API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
2047         (API::LoaderClient::didRemoveFrameFromHierarchy):
2048         (API::LoaderClient::didDisplayInsecureContentForFrame):
2049         (API::LoaderClient::didRunInsecureContentForFrame):
2050         (API::LoaderClient::didDetectXSSForFrame):
2051         (API::LoaderClient::didLayout):
2052         (API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
2053         (API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
2054         (API::LoaderClient::didStartProgress):
2055         (API::LoaderClient::didChangeProgress):
2056         (API::LoaderClient::didFinishProgress):
2057         (API::LoaderClient::processDidBecomeUnresponsive):
2058         (API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
2059         (API::LoaderClient::processDidBecomeResponsive):
2060         (API::LoaderClient::processDidCrash):
2061         (API::LoaderClient::didChangeBackForwardList):
2062         (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
2063         (API::LoaderClient::willGoToBackForwardListItem):
2064         (API::LoaderClient::pluginLoadPolicy):
2065         (API::LoaderClient::didFailToInitializePlugin):
2066         (API::LoaderClient::didBlockInsecurePluginVersion):
2067         (API::LoaderClient::webGLLoadPolicy):
2068         (API::LoaderClient::resolveWebGLLoadPolicy):
2069         (API::LoaderClient::didDestroyNavigation): Deleted.
2070         * UIProcess/API/C/WKPage.cpp:
2071         (WKPageSetPageLoaderClient):
2072         * UIProcess/Cocoa/NavigationState.h:
2073         * UIProcess/Cocoa/NavigationState.mm:
2074         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
2075         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2076         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2077         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
2078         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
2079         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
2080         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
2081         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
2082         (WebKit::NavigationState::LoaderClient::didLayout):
2083         (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
2084         (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
2085         (WebKit::NavigationState::LoaderClient::processDidCrash):
2086         (WebKit::NavigationState::LoaderClient::didDestroyNavigation): Deleted.
2087         * UIProcess/WebPageProxy.cpp:
2088         (WebKit::WebPageProxy::didChangeBackForwardList):
2089         (WebKit::WebPageProxy::willGoToBackForwardListItem):
2090         (WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
2091         (WebKit::WebPageProxy::findPlugin):
2092         (WebKit::WebPageProxy::didStartProgress):
2093         (WebKit::WebPageProxy::didChangeProgress):
2094         (WebKit::WebPageProxy::didFinishProgress):
2095         (WebKit::WebPageProxy::didDestroyNavigation):
2096         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
2097         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
2098         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
2099         (WebKit::WebPageProxy::didCommitLoadForFrame):
2100         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
2101         (WebKit::WebPageProxy::didFinishLoadForFrame):
2102         (WebKit::WebPageProxy::didFailLoadForFrame):
2103         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
2104         (WebKit::WebPageProxy::didReceiveTitleForFrame):
2105         (WebKit::WebPageProxy::didFirstLayoutForFrame):
2106         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2107         (WebKit::WebPageProxy::didLayout):
2108         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
2109         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2110         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2111         (WebKit::WebPageProxy::didDetectXSSForFrame):
2112         (WebKit::WebPageProxy::webGLPolicyForURL):
2113         (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
2114         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
2115         (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
2116         (WebKit::WebPageProxy::processDidBecomeResponsive):
2117         (WebKit::WebPageProxy::processDidCrash):
2118         (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
2119         (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
2120         (WebKit::WebPageProxy::didFailToInitializePlugin):
2121         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2122         - Moves conversion from navigationID to API::Navigation into WebPageProxy
2123           from NavigationState.
2124         - Changes API::LoaderClient to pass WebPageProxy and WebFrameProxy by reference
2125           rather than pointer, and to take an API::Navigation instead of a navigationID.
2126
2127         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2128         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
2129         Move access of the navigationID to after calling into the client bundle to avoid
2130         passing a navigationID of a deleted navigation to the UIProcess. This problem was
2131         caught via the WebKit2.StopLoadingDuringDidFailProvisionalLoadTest API test, which
2132         now exercises the Navigation code path. Had that test been written using a Navigation
2133         delegate, the issue would have happened prior to this change.
2134
2135 2015-01-13  Anders Carlsson  <andersca@apple.com>
2136
2137         Begin stubbing out a per page process lifetime tracker object
2138         https://bugs.webkit.org/show_bug.cgi?id=140399
2139
2140         Reviewed by Beth Dakin.
2141
2142         This will make it easier for certain objects that track a set of web page proxy objects
2143         (user content controller, visited link provider, data store) to be notified when their
2144         underlying processes come and go.
2145
2146         * UIProcess/WebPageProxy.h:
2147         * UIProcess/WebProcessLifetimeObserver.cpp: Added.
2148         * UIProcess/WebProcessLifetimeObserver.h: Added.
2149         * UIProcess/WebProcessLifetimeTracker.cpp: Added.
2150         (WebKit::WebProcessLifetimeTracker::WebProcessLifetimeTracker):
2151         (WebKit::WebProcessLifetimeTracker::~WebProcessLifetimeTracker):
2152         (WebKit::WebProcessLifetimeTracker::addObserver):
2153         (WebKit::WebProcessLifetimeTracker::removeObserver):
2154         * UIProcess/WebProcessLifetimeTracker.h: Added.
2155         * WebKit2.xcodeproj/project.pbxproj:
2156
2157 2015-01-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2158
2159         [CMake] Unreviewed build fix after r178309.
2160
2161         * CMakeLists.txt: Rename moved files at r178309.
2162
2163 2015-01-11  Sam Weinig  <sam@webkit.org>
2164
2165         Remove support for SharedWorkers
2166         https://bugs.webkit.org/show_bug.cgi?id=140344
2167
2168         Reviewed by Anders Carlsson.
2169
2170         * Configurations/FeatureDefines.xcconfig:
2171         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2172         (WebKit::NetworkProcessPlatformStrategies::createSharedWorkerStrategy): Deleted.
2173         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2174         * WebKit2Prefix.h:
2175         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2176         (WebKit::WebPlatformStrategies::createSharedWorkerStrategy): Deleted.
2177         (WebKit::WebPlatformStrategies::isAvailable): Deleted.
2178         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2179
2180 2015-01-12  Anders Carlsson  <andersca@apple.com>
2181
2182         Move a couple of API files to UIProcess/API.
2183
2184         Rubber-stamped by Tim Horton.
2185
2186         * UIProcess/API/APINavigationData.cpp: Renamed from Source/WebKit2/UIProcess/APINavigationData.cpp.
2187         * UIProcess/API/APINavigationData.h: Renamed from Source/WebKit2/UIProcess/APINavigationData.h.
2188         * UIProcess/API/APIProcessPoolConfiguration.cpp: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp.
2189         * UIProcess/API/APIProcessPoolConfiguration.h: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h.
2190         * UIProcess/API/APISession.cpp: Renamed from Source/WebKit2/UIProcess/APISession.cpp.
2191         * UIProcess/API/APISession.h: Renamed from Source/WebKit2/UIProcess/APISession.h.
2192         * WebKit2.xcodeproj/project.pbxproj:
2193
2194 2015-01-12  Martin Hock  <mhock@apple.com>
2195
2196         [iOS][WK2] Push content bounds on layer tree commit to prevent drawing stale fixed position rects
2197         https://bugs.webkit.org/show_bug.cgi?id=140264
2198         <rdar://problem/18873545>
2199
2200         Reviewed by Benjamin Poulain.
2201
2202         When a resize occurs, we need to push the new content bounds to the web
2203         process or stale fixed position rects may draw incorrectly.
2204
2205         As an example, suppose that WKWebView in UIProcess performs
2206         _frameOrBoundsChanged with new view bounds.
2207         Meanwhile, we'll switch to WebContentProcess and perform layout.
2208         Switching back to UIProcess, _frameOrBoundsChanged calls WKWebView
2209         _updateVisibleContentRects.
2210         _updateVisibleContentRects calls WKContentView didUpdateVisibleRect with
2211         the new bounds.
2212         didUpdateVisibleRects in turn calls WebPageProxyIOS
2213         computeCustomFixedPositionRect.
2214         computeCustomFixedPositionRect asks for the content bounds from
2215         PageClientImplIOS contentsSize which queries WKContentView's bounds
2216         size. But those bounds are stale because the layer tree commit hasn't
2217         occurred yet.
2218
2219         By informing the WKWebView of the updated content size on layer tree
2220         commit, we ensure that the fixed position rects will be drawn correctly.
2221
2222         * UIProcess/ios/WKContentView.mm:
2223         (-[WKContentView _didCommitLayerTree:]): Push new content bounds to the web process.
2224
2225 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
2226
2227         Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
2228         https://bugs.webkit.org/show_bug.cgi?id=136769
2229
2230         Reviewed by Antti Koivisto.
2231
2232         * Configurations/FeatureDefines.xcconfig:
2233
2234 2015-01-12  Zan Dobersek  <zdobersek@igalia.com>
2235
2236         Clean up FrameTree::traverseNext() traversals of main frames
2237         https://bugs.webkit.org/show_bug.cgi?id=140338
2238
2239         Reviewed by Andreas Kling.
2240
2241         There's no reason to pass the main frame as the stayWithin parameter
2242         to FrameTree::traverseNext() when traversing over that same main frame.
2243
2244         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2245         (WebKit::WebContextMenuClient::searchWithSpotlight):
2246
2247 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
2248
2249         Multi-rect TextIndicators are vertically flipped in WebKit1
2250         https://bugs.webkit.org/show_bug.cgi?id=140350
2251         <rdar://problem/19441243>
2252
2253         Reviewed by Beth Dakin.
2254
2255         * Shared/WebCoreArgumentCoders.cpp:
2256         (IPC::ArgumentCoder<TextIndicatorData>::encode):
2257         (IPC::ArgumentCoder<TextIndicatorData>::decode):
2258         Adjust to the field name changes.
2259
2260         * UIProcess/API/mac/WKView.mm:
2261         (-[WKView _setTextIndicator:fadeOut:]):
2262         Convert the textBoundingRect from root view to screen coordinates.
2263
2264         * WebProcess/WebPage/FindController.cpp:
2265         (WebKit::FindController::updateFindIndicator):
2266         (WebKit::FindController::drawRect):
2267         Adjust to the new name, and use contentsToRootView when comparing against
2268         the stored m_findIndicatorRect.
2269
2270 2015-01-11  Ryuan Choi  <ryuan.choi@navercorp.com>
2271
2272         [CoordinatedGraphics] Suspend or resume when visibility is changed
2273         https://bugs.webkit.org/show_bug.cgi?id=140285
2274
2275         Reviewed by Gyuyoung Kim.
2276
2277         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Copied the logic from TiledCoreAnimationDrawingArea.
2278         (WebKit::CoordinatedDrawingArea::viewStateDidChange):
2279         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2280
2281 2015-01-10  Gwang Yoon Hwang  <yoon@igalia.com>
2282
2283         [ThreadedCompositor] Prevent excessive rendering call.
2284         https://bugs.webkit.org/show_bug.cgi?id=140297
2285
2286         Reviewed by Žan Doberšek.
2287
2288         Not to waste CPU time on waiting V-Sync interval, the update timer of
2289         compositing thread should be throttled.
2290
2291         In case of updating scene state, this update timer should be called as
2292         soon as possible. However, when CoordinatedGraphicsScene requests update
2293         viewport to advance the animations, this call should be scheduled for
2294         a next frame.
2295
2296         No new tests. No change in functionality.
2297
2298         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2299         (WebKit::CompositingRunLoop::CompositingRunLoop):
2300         (WebKit::CompositingRunLoop::setUpdateTimer):
2301         (WebKit::CompositingRunLoop::updateTimerFired):
2302         (WebKit::ThreadedCompositor::setNeedsDisplay):
2303         (WebKit::ThreadedCompositor::updateViewport):
2304         (WebKit::ThreadedCompositor::scheduleDisplayImmediately):
2305         (WebKit::ThreadedCompositor::didChangeVisibleRect):
2306         (WebKit::ThreadedCompositor::scheduleDisplayIfNeeded): Deleted.
2307         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2308
2309 2015-01-09  Sam Weinig  <sam@webkit.org>
2310
2311         Try to fix the GTK and EFL builds.
2312
2313         * CMakeLists.txt:
2314
2315 2015-01-09  Anders Carlsson  <andersca@apple.com>
2316
2317         Get rid of the database strategy
2318         https://bugs.webkit.org/show_bug.cgi?id=140322
2319
2320         Reviewed by Sam Weinig.
2321
2322         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2323         (WebKit::NetworkProcessPlatformStrategies::createDatabaseStrategy): Deleted.
2324         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2325         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2326         (WebKit::WebPlatformStrategies::createDatabaseStrategy): Deleted.
2327         (WebKit::WebPlatformStrategies::getDatabaseServer): Deleted.
2328         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2329
2330 2015-01-09  Dan Bernstein  <mitz@apple.com>
2331
2332         [Cocoa] Remove deprecated WKRenderingProgressEvents
2333         https://bugs.webkit.org/show_bug.cgi?id=140325
2334
2335         Reviewed by Anders Carlsson.
2336
2337         * Shared/API/Cocoa/WKRenderingProgressEvents.h: Removed.
2338         * WebKit2.xcodeproj/project.pbxproj:
2339         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2340
2341 2015-01-09  Sam Weinig  <sam@webkit.org>
2342
2343         Move Navigation creation out of the Cocoa layer and down into the WebPageProxy level
2344         https://bugs.webkit.org/show_bug.cgi?id=140319
2345
2346         Reviewed by Anders Carlsson.
2347
2348         - Adds WebNavigationState, a class at the WebPageProxy level to handle the creation
2349           and storage of Navigations. Starts moving some of the functionality from NavigationState
2350           there.
2351
2352         * UIProcess/API/APINavigation.cpp:
2353         (API::Navigation::Navigation):
2354         * UIProcess/API/APINavigation.h:
2355         (API::Navigation::create):
2356         (API::Navigation::navigationID):
2357         Have each Navigation store its navigationID and generate it via the WebNavigationState
2358         that is passed to the constructor.
2359         
2360         * UIProcess/API/Cocoa/WKWebView.mm:
2361         (-[WKWebView loadRequest:]):
2362         (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
2363         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
2364         (-[WKWebView goToBackForwardListItem:]):
2365         (-[WKWebView goBack]):
2366         (-[WKWebView goForward]):
2367         (-[WKWebView reload]):
2368         (-[WKWebView reloadFromOrigin]):
2369         (-[WKWebView _restoreFromSessionStateData:]):
2370         (-[WKWebView _restoreSessionState:andNavigate:]):
2371         Update for WebPageProxy functions returning the Navigations directly, rather than
2372         the navigationID.
2373
2374         * UIProcess/Cocoa/NavigationState.h:
2375         * UIProcess/Cocoa/NavigationState.mm:
2376         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
2377         Remove creation of the load request navigation which is now handled by the WebPageProxy.
2378
2379         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
2380         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2381         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2382         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
2383         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
2384         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
2385         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
2386         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
2387         (WebKit::NavigationState::LoaderClient::didDestroyNavigation):
2388         (WebKit::NavigationState::LoaderClient::processDidCrash):
2389         Change to get/take/remove Navigations from the WebPageProxy's WebNavigationState
2390
2391         (WebKit::NavigationState::createLoadRequestNavigation): Deleted.
2392         (WebKit::NavigationState::createBackForwardNavigation): Deleted.
2393         (WebKit::NavigationState::createReloadNavigation): Deleted.
2394         (WebKit::NavigationState::createLoadDataNavigation): Deleted.
2395         Move Navigation creation to WebNavigationState.
2396
2397         * UIProcess/WebFrameListenerProxy.cpp:
2398         (WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
2399         (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
2400         * UIProcess/WebFrameListenerProxy.h:
2401         (WebKit::WebFrameListenerProxy::navigation):
2402         (WebKit::WebFrameListenerProxy::setNavigation):
2403         (WebKit::WebFrameListenerProxy::navigationID): Deleted.
2404         (WebKit::WebFrameListenerProxy::setNavigationID): Deleted.
2405         * UIProcess/WebFrameProxy.cpp:
2406         (WebKit::WebFrameProxy::receivedPolicyDecision):
2407         * UIProcess/WebFrameProxy.h:
2408         Store a Navigation rather than a navigationID on the WebFrameListenerProxy.
2409
2410         * UIProcess/WebNavigationState.cpp: Added.
2411         (WebKit::WebNavigationState::WebNavigationState):
2412         (WebKit::WebNavigationState::~WebNavigationState):
2413         (WebKit::WebNavigationState::createLoadRequestNavigation):
2414         (WebKit::WebNavigationState::createBackForwardNavigation):
2415         (WebKit::WebNavigationState::createReloadNavigation):
2416         (WebKit::WebNavigationState::createLoadDataNavigation):
2417         (WebKit::WebNavigationState::navigation):
2418         (WebKit::WebNavigationState::takeNavigation):
2419         (WebKit::WebNavigationState::didDestroyNavigation):
2420         (WebKit::WebNavigationState::clearAllNavigations):
2421         * UIProcess/WebNavigationState.h: Added.
2422         (WebKit::WebNavigationState::generateNavigationID):
2423         New class to manage navigations.
2424
2425         * UIProcess/WebPageProxy.cpp:
2426         (WebKit::WebPageProxy::WebPageProxy):
2427         (WebKit::WebPageProxy::reattachToWebProcessForReload):
2428         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2429         (WebKit::WebPageProxy::loadRequest):
2430         (WebKit::WebPageProxy::loadFile):
2431         (WebKit::WebPageProxy::loadData):
2432         (WebKit::WebPageProxy::loadHTMLString):
2433         (WebKit::WebPageProxy::reload):
2434         (WebKit::WebPageProxy::goForward):
2435         (WebKit::WebPageProxy::goBack):
2436         (WebKit::WebPageProxy::goToBackForwardItem):
2437         (WebKit::WebPageProxy::receivedPolicyDecision):
2438         (WebKit::WebPageProxy::restoreFromSessionState):
2439         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2440         (WebKit::WebPageProxy::generateNavigationID): Deleted.
2441         Create navigations directly rather than generating a navigation ID and letting
2442         the API level create Navigation.
2443
2444         * UIProcess/WebPageProxy.h:
2445         (WebKit::WebPageProxy::navigationState):
2446         Add WebNavigationState member and accessor.
2447
2448         * WebKit2.xcodeproj/project.pbxproj:
2449         Add WebNavigationState.h/cpp
2450
2451 2015-01-09  Daniel Bates  <dabates@apple.com>
2452
2453         [iOS] Make DumpRenderTree build with public SDK
2454         https://bugs.webkit.org/show_bug.cgi?id=140311
2455
2456         Reviewed by Sam Weinig.
2457
2458         Add more SPI declarations.
2459
2460         * Platform/spi/ios/UIKitSPI.h:
2461
2462 2015-01-09  Joseph Pecoraro  <pecoraro@apple.com>
2463
2464         Web Inspector: Remove or use TimelineAgent Resource related event types
2465         https://bugs.webkit.org/show_bug.cgi?id=140155
2466
2467         Reviewed by Timothy Hatcher.
2468
2469         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2470         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2471
2472 2015-01-09  Daniel Bates  <dabates@apple.com>
2473
2474         [iOS] Fix the WebKit2 build with the public SDK
2475
2476         Forward declare class WebView.
2477
2478         * Platform/spi/ios/UIKitSPI.h:
2479
2480 2015-01-09  Sam Weinig  <sam@webkit.org>
2481
2482         Make WKNavigation bridged to API::Navigation (Take 2)
2483         https://bugs.webkit.org/show_bug.cgi?id=140272
2484
2485         Reviewed by Dan Bernstein.
2486
2487         * Shared/API/APIObject.h:
2488         Add Navigation.
2489
2490         * Shared/Cocoa/APIObject.mm:
2491         (API::Object::newObject):
2492         Bridge to WKNavigation.
2493
2494         * UIProcess/API/APINavigation.cpp: Added.
2495         (API::Navigation::Navigation):
2496         (API::Navigation::~Navigation):
2497         * UIProcess/API/APINavigation.h: Added.
2498         (API::Navigation::create):
2499         (API::Navigation::request):
2500         Add initial implementation.
2501
2502         * UIProcess/API/Cocoa/WKNavigation.mm:
2503         (-[WKNavigation dealloc]):
2504         (-[WKNavigation _request]):
2505         (-[WKNavigation _apiObject]):
2506         * UIProcess/API/Cocoa/WKNavigationInternal.h:
2507         (API::wrapper):
2508         Implement bridging to API::Navigation and get the request from the underlying object.
2509
2510         * UIProcess/API/Cocoa/WKWebView.mm:
2511         (-[WKWebView loadRequest:]):
2512         (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
2513         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
2514         (-[WKWebView goToBackForwardListItem:]):
2515         (-[WKWebView goBack]):
2516         (-[WKWebView goForward]):
2517         (-[WKWebView reload]):
2518         (-[WKWebView reloadFromOrigin]):
2519         (-[WKWebView _restoreSessionState:andNavigate:]):
2520         * UIProcess/Cocoa/NavigationState.h:
2521         * UIProcess/Cocoa/NavigationState.mm:
2522         (WebKit::NavigationState::createLoadRequestNavigation):
2523         (WebKit::NavigationState::createBackForwardNavigation):
2524         (WebKit::NavigationState::createReloadNavigation):
2525         (WebKit::NavigationState::createLoadDataNavigation):
2526         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
2527         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2528         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2529         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
2530         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
2531         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
2532         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
2533         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
2534         Switch to storing API::Navigations.
2535
2536         * WebKit2.xcodeproj/project.pbxproj:
2537         Add the new files.
2538
2539 2015-01-09  Gwang Yoon Hwang  <yoon@igalia.com>
2540
2541         Rename GraphicsLayerAnimation to TextureMapperAnimation
2542         https://bugs.webkit.org/show_bug.cgi?id=140296
2543
2544         Reviewed by Martin Robinson.
2545
2546         GraphicsLayerAnimation is changed to TextureMapperAnimation
2547         * Scripts/webkit/messages.py:
2548         (headers_for_type):
2549         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2550         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
2551         (IPC::ArgumentCoder<TextureMapperAnimation>::decode):
2552         (IPC::ArgumentCoder<TextureMapperAnimations>::encode):
2553         (IPC::ArgumentCoder<TextureMapperAnimations>::decode):
2554         (IPC::ArgumentCoder<GraphicsLayerAnimation>::encode): Deleted.
2555         (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Deleted.
2556         (IPC::ArgumentCoder<GraphicsLayerAnimations>::encode): Deleted.
2557         (IPC::ArgumentCoder<GraphicsLayerAnimations>::decode): Deleted.
2558         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
2559         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2560
2561 2015-01-08  Enrica Casucci  <enrica@apple.com>
2562
2563         [iOS] Cannot paste an image URL in a plain text field in a page.
2564         https://bugs.webkit.org/show_bug.cgi?id=140274
2565         rdar://problem/18590809
2566
2567         Reviewed by Alexey Proskuryakov.
2568
2569         supportedPasteboardTypesForCurrentSelection should include kUTTypeURL for plain
2570         text controls and WebArchivePboardType for rich text controls.
2571
2572         * UIProcess/ios/WKContentViewInteraction.mm:
2573         (-[WKContentView supportedPasteboardTypesForCurrentSelection]): Remove obsolete and
2574         incorrect FIXME.
2575
2576 2015-01-09  Commit Queue  <commit-queue@webkit.org>
2577
2578         Unreviewed, rolling out r178141.
2579         https://bugs.webkit.org/show_bug.cgi?id=140294
2580
2581         Broke multiple API tests (Requested by ap on #webkit).
2582
2583         Reverted changeset:
2584
2585         "Make WKNavigation bridged to API::Navigation"
2586         https://bugs.webkit.org/show_bug.cgi?id=140272
2587         http://trac.webkit.org/changeset/178141
2588
2589 2015-01-08  Benjamin Poulain  <benjamin@webkit.org>
2590
2591         [WK2] Start a prototype for declarative site specific extensions
2592         https://bugs.webkit.org/show_bug.cgi?id=140160
2593
2594         Reviewed by Andreas Kling.
2595
2596         Provide a small SPI for OS X. This will likely move
2597         to a better place.
2598
2599         * UIProcess/API/Cocoa/WKProcessPool.mm:
2600         (-[WKProcessPool _loadContentExtensionWithIdentifier:serializedRules:successCompletionHandler:errorCompletionHandler:]):
2601         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2602         * UIProcess/WebProcessPool.cpp:
2603         (WebKit::WebProcessPool::processDidFinishLaunching):
2604         (WebKit::WebProcessPool::loadContentExtension):
2605         * UIProcess/WebProcessPool.h:
2606         * WebProcess/WebProcess.cpp:
2607         (WebKit::WebProcess::loadContentExtension):
2608         * WebProcess/WebProcess.h:
2609         * WebProcess/WebProcess.messages.in:
2610
2611 2015-01-08  Sam Weinig  <sam@webkit.org>
2612
2613         Make WKNavigation bridged to API::Navigation
2614         https://bugs.webkit.org/show_bug.cgi?id=140272
2615
2616         Reviewed by Anders Carlsson.
2617
2618         * Shared/API/APIObject.h:
2619         Add Navigation.
2620
2621         * Shared/Cocoa/APIObject.mm:
2622         (API::Object::newObject):
2623         Bridge to WKNavigation.
2624
2625         * UIProcess/API/APINavigation.cpp: Added.
2626         (API::Navigation::Navigation):
2627         (API::Navigation::~Navigation):
2628         * UIProcess/API/APINavigation.h: Added.
2629         (API::Navigation::create):
2630         (API::Navigation::request):
2631         Add initial implementation.
2632
2633         * UIProcess/API/Cocoa/WKNavigation.mm:
2634         (-[WKNavigation dealloc]):
2635         (-[WKNavigation _request]):
2636         (-[WKNavigation _apiObject]):
2637         * UIProcess/API/Cocoa/WKNavigationInternal.h:
2638         (API::wrapper):
2639         Implement bridging to API::Navigation and get the request from the underlying object.
2640
2641         * UIProcess/API/Cocoa/WKWebView.mm:
2642         (-[WKWebView loadRequest:]):
2643         (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
2644         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
2645         (-[WKWebView goToBackForwardListItem:]):
2646         (-[WKWebView goBack]):
2647         (-[WKWebView goForward]):
2648         (-[WKWebView reload]):
2649         (-[WKWebView reloadFromOrigin]):
2650         (-[WKWebView _restoreSessionState:andNavigate:]):
2651         * UIProcess/Cocoa/NavigationState.h:
2652         * UIProcess/Cocoa/NavigationState.mm:
2653         (WebKit::NavigationState::createLoadRequestNavigation):
2654         (WebKit::NavigationState::createBackForwardNavigation):
2655         (WebKit::NavigationState::createReloadNavigation):
2656         (WebKit::NavigationState::createLoadDataNavigation):
2657         (WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
2658         (WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
2659         (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2660         (WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
2661         (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
2662         (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
2663         (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
2664         (WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
2665         Switch to storing API::Navigations.
2666
2667         * WebKit2.xcodeproj/project.pbxproj:
2668         Add the new files.
2669
2670 2015-01-08  Dean Jackson  <dino@apple.com>
2671
2672         Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
2673         https://bugs.webkit.org/show_bug.cgi?id=140232
2674
2675         Yet another attempt to get the Safari 7/8 build to work. I've moved the
2676         stubs back into a place where they can be seen (both definition and implementation).
2677         I also removed the previous workaround.
2678
2679         * Shared/API/c/WKDeprecatedFunctions.cpp:
2680         (WKPreferencesSetApplicationChromeModeEnabled): Deleted.
2681         (WKPreferencesGetApplicationChromeModeEnabled): Deleted.
2682         * Shared/WebPreferencesDefinitions.h:
2683         * UIProcess/API/C/WKPreferences.cpp:
2684         (WKPreferencesSetApplicationChromeModeEnabled):
2685         (WKPreferencesGetApplicationChromeModeEnabled):
2686         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2687
2688 2015-01-08  Dean Jackson  <dino@apple.com>
2689
2690         Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
2691         https://bugs.webkit.org/show_bug.cgi?id=140232
2692
2693         Unreviewed followup to try to get the Mavericks Safari to build.
2694
2695         * Shared/WebPreferencesDefinitions.h: Add the application chrome mode definition.
2696
2697 2015-01-08  Dean Jackson  <dino@apple.com>
2698
2699         Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
2700         https://bugs.webkit.org/show_bug.cgi?id=140232
2701         <rdar://problem/19371010>
2702
2703         Reviewed by Anders Carlsson.
2704
2705         Remove the applicationChromeMode setting, but leave stubs in to make
2706         sure existing binaries don't break.
2707
2708         * Shared/API/c/WKDeprecatedFunctions.cpp:
2709         (WKPreferencesSetApplicationChromeModeEnabled):
2710         (WKPreferencesGetApplicationChromeModeEnabled):
2711         * Shared/WebPreferencesDefinitions.h:
2712         * UIProcess/API/C/WKPreferences.cpp:
2713         (WKPreferencesSetApplicationChromeModeEnabled): Deleted.
2714         (WKPreferencesGetApplicationChromeModeEnabled): Deleted.
2715         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2716         * UIProcess/WebInspectorProxy.cpp:
2717         (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
2718         * WebProcess/WebPage/WebPage.cpp:
2719         (WebKit::WebPage::updatePreferences):
2720
2721 2015-01-08  Gwang Yoon Hwang  <yoon@igalia.com>
2722
2723         [ThreadedCompositor] Update active animations without interrupting the main-thread
2724         https://bugs.webkit.org/show_bug.cgi?id=140245
2725
2726         Reviewed by Martin Robinson.
2727
2728         In the Threaded Compositor, CoordinatedGraphicsScene can directly
2729         request updateViewport to the compositing thread if it has any active
2730         animation.
2731
2732         To keep current behavior of CoordinatedGraphics, this patch modifies
2733         CoordinatedGraphicsScene to remember the constructed thread as a
2734         clientRunLoop, and dispatch updateViewport calls to clientRunLoop.
2735
2736         No new tests. No change in functionality.
2737
2738         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2739         (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
2740         (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2741         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2742         (WebKit::CoordinatedGraphicsScene::updateViewport):
2743         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2744         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2745         (WebKit::ThreadedCompositor::ThreadedCompositor):
2746         (WebKit::ThreadedCompositor::runCompositingThread):
2747
2748 2015-01-08  Gwang Yoon Hwang  <yoon@igalia.com>
2749
2750         [GTK] Seperate updateBackingStore from flushCompositingState.
2751         https://bugs.webkit.org/show_bug.cgi?id=136887
2752
2753         Reviewed by Žan Doberšek.
2754
2755         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2756         (WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
2757         Modified to call GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers
2758
2759 2015-01-07  Gwang Yoon Hwang  <yoon@igalia.com>
2760
2761         [GTK][ThreadedCompositor] Add support for threaded compositor.
2762         https://bugs.webkit.org/show_bug.cgi?id=118265
2763
2764         Reviewed by Martin Robinson.
2765
2766         This patch introduces a threaded compositor for WebKitGTK+.
2767         It is disabled as a default because it is a initial implementation.
2768         The threaded compositor can be enabled using --threaded-compositor
2769         option at compile time.
2770
2771         No new tests, this is an experimental feature.
2772
2773         * PlatformGTK.cmake:
2774         Adds CoodinatedGraphics and threaded compositor related classes to
2775         support threaded compositor
2776
2777         * Shared/DrawingAreaInfo.h:
2778         Use DrawingAreaImpl for threaded compositor
2779
2780         * UIProcess/API/gtk/WebKitSettings.cpp:
2781         (_WebKitSettingsPrivate::_WebKitSettingsPrivate):
2782         Modified to use forceCompositingMode when the threaded compositor used.
2783         If we does not set this mode here, it cannot draw the root content layer.
2784
2785         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp: Added.
2786         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h: Added.
2787         (WebKit::ThreadedCoordinatedLayerTreeHost::rootLayer):
2788         Implements ThreadedCoordinatedLayerTreeHost to use the threaded
2789         compositor. It is basically similar with CoordinatedLayerTreeHost but it uses ThreadedCompositor instead of IPC.
2790
2791         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2792         * UIProcess/PageClient.h:
2793         * UIProcess/WebPageProxy.cpp:
2794         * UIProcess/WebPageProxy.h:
2795         * UIProcess/WebPageProxy.messages.in:
2796         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2797         (WebKit::WebChromeClient::contentsSizeChanged):
2798         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
2799         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2800         * WebProcess/WebPage/DrawingArea.cpp:
2801         (WebKit::DrawingArea::create):
2802         (WebKit::DrawingArea::DrawingArea):
2803         * WebProcess/WebPage/DrawingArea.h:
2804         COORDINATED_GRAPHICS_MULTIPROCESS is introduced to classify IPC specific codes
2805         from Coordinated Graphics.
2806         And COORDINATED_GRAPHICS_THREADED is used to guard the threaded
2807         compositor specific codes.
2808
2809         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2810         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2811         Modified to use forceCompositingMode when the threaded compositor used.
2812         If we does not set this mode here, it will crash because of PageOverlay.
2813         (WebKit::DrawingAreaImpl::mainFrameContentSizeChanged):
2814         (WebKit::DrawingAreaImpl::updateBackingStoreState):
2815         Modified to handle contents / viewport size changes for threaded compositor.
2816         (WebKit::DrawingAreaImpl::attachViewOverlayGraphicsLayer):
2817         Added to support Overlay layer in the threaded compositor.
2818         (WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
2819         Push the surface handle for compositing to the threaded compositor.
2820
2821         * WebProcess/WebPage/DrawingAreaImpl.h: Use COORDINATED_GRAPIHCS_THREADED to guard the threaded compositor related codes.
2822         * WebProcess/WebPage/LayerTreeHost.cpp: Ditto.
2823         * WebProcess/WebPage/LayerTreeHost.h: Ditto.
2824         * WebProcess/WebPage/WebPage.cpp: Ditto.
2825         * WebProcess/WebPage/WebPage.h: Ditto.
2826         * WebProcess/WebPage/WebPage.messages.in: Ditto.
2827
2828         * WebProcess/gtk/WebProcessMainGtk.cpp:
2829             Modified to call XInitThreads to use thread-safe xlib.
2830
2831 2015-01-07  Daniel Bates  <dabates@apple.com>
2832
2833         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2834         https://bugs.webkit.org/show_bug.cgi?id=137371
2835
2836         Reviewed by David Kilzer.
2837
2838         * Configurations/BaseTarget.xcconfig: Append directory $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks to
2839         the list of directories to search for frameworks so that we the linker can find and link against iOS private
2840         frameworks (e.g. AssertionServices).
2841         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2842         (WebKit::NetworkResourceLoader::willCacheResponseAsync): Add PLATFORM(IOS)-guard around call to NetworkDiskCacheMonitor::monitorFileBackingStoreCreation().
2843         * Platform/IPC/mac/ConnectionMac.mm: Add header sys/mman.h.
2844         * Platform/spi/ios/BKSProcessAssertionSPI.h: Added.
2845         * Platform/spi/ios/CorePDFSPI.h: Added.
2846         * Platform/spi/ios/DataDetectorsUISPI.h: Added.
2847         * Platform/spi/ios/ManagedConfigurationSPI.h: Added.
2848         * Platform/spi/ios/TCCSPI.h: Added.
2849         * Platform/spi/ios/TextInputSPI.h: Added.
2850         * Platform/spi/ios/UIKitSPI.h: Added.
2851         * Shared/Downloads/ios/DownloadIOS.mm: Add USE(CFNETWORK)-guard around CFNetwork-specific code and conditionally
2852         include header CFNetwork/CFURLDownload.h.
2853         (WebKit::Download::startWithHandle): Ditto.
2854         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: Include header ServersSPI.h instead
2855         of directly including private headers.
2856         * Shared/ios/NativeWebTouchEventIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
2857         * Shared/mac/SandboxUtilities.cpp: Include header sys/param.h.
2858         * UIProcess/API/Cocoa/WKWebView.mm: Include header UIKitSPI.h instead of directly including private headers.
2859         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Ditto.
2860         * UIProcess/API/Cocoa/WKWebViewInternal.h: Ditto.
2861         * UIProcess/API/ios/WKViewIOS.mm: Ditto.
2862         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Include header ServersSPI.h instead of directly including private headers.
2863         * UIProcess/ios/PageClientImplIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
2864         * UIProcess/ios/ProcessAssertionIOS.mm: Include header BKSProcessAssertionSPI.h instead of directly including private headers.
2865         * UIProcess/ios/SmartMagnificationController.mm: Include header UIKitSPI.h instead of directly including private headers.
2866         * UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
2867         * UIProcess/ios/WKActionSheet.mm: Ditto.
2868         * UIProcess/ios/WKActionSheetAssistant.h: Include header DataDetectorsUISPI.h instead of directly including private headers.
2869         * UIProcess/ios/WKActionSheetAssistant.mm: Include headers TCCSPI.h and UIKitSPI.h instead of directly including private headers.
2870         * UIProcess/ios/WKContentView.mm: Include header UIKitSPI.h instead of directly including private headers. Also, move CALayer SPI
2871         forward declarations to QuartzCoreSPI.h
2872         * UIProcess/ios/WKContentViewInteraction.h: Include header UIKitSPI.h instead of directly including private headers.
2873         * UIProcess/ios/WKContentViewInteraction.mm: Ditto. Also, include headers CoreGraphicsSPI.h, CoreText/CTFont.h, DataDetectorsUISPI.h,
2874         ManagedConfigurationSPI.h, TextInputSPI.h.
2875         * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm: Include header UIKitSPI.h instead of directly including private headers.
2876         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
2877         * UIProcess/ios/WKPDFView.h: Include header CorePDFSPI.h instead of directly including private headers.
2878         * UIProcess/ios/WKPDFView.mm: Ditto. Also, remove header _UIHighlightViewSPI.h and include UIKitSPI.h.
2879         * UIProcess/ios/WKScrollView.h: Include header UIKitSPI.h instead of directly including private headers.
2880         * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Ditto.
2881         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Ditto.
2882         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Ditto.
2883         * UIProcess/ios/forms/WKFileUploadPanel.mm: Ditto.
2884         * UIProcess/ios/forms/WKFormInputControl.mm: Ditto.
2885         * UIProcess/ios/forms/WKFormPopover.mm: Ditto.
2886         * UIProcess/ios/forms/WKFormSelectControl.h: Ditto.
2887         * UIProcess/ios/forms/WKFormSelectControl.mm: Ditto.
2888         * UIProcess/ios/forms/WKFormSelectPicker.mm: Ditto.
2889         * UIProcess/ios/forms/WKFormSelectPopover.mm: Ditto.
2890         * WebKit2.xcodeproj/project.pbxproj:
2891         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: Include headers ServersSPI.h and GraphicsServicesSPI.h instead of
2892         directly including private headers. Also, ignore deprecated declaration for bootstrap_register2().
2893         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: Include header GraphicsServicesSPI.h instead of directly
2894         including private headers.
2895         * config.h: Moved EXTERN_C_BEGIN and EXTERN_C_END macros from here to file wtf/Compiler.h and renamed them to WTF_EXTERN_C_BEGIN
2896         and  WTF_EXTERN_C_END, respectively, so that we can make use of them in SPI wrapper headers (e.g. UIKitSPI.h).
2897
2898 2015-01-07  Simon Fraser  <simon.fraser@apple.com>
2899
2900         Make WebKitAcceleratedDrawingEnabled into a "debug" pref, so that it's read without page group prefixes
2901         https://bugs.webkit.org/show_bug.cgi?id=140221
2902
2903         Reviewed by Sam Weinig.
2904         
2905         Applications should not be toggling WebKitAcceleratedDrawingEnabled; it's really only
2906         useful to toggle for debugging, so make it a debug pref.
2907
2908         * Shared/WebPreferencesDefinitions.h:
2909
2910 2015-01-07  Commit Queue  <commit-queue@webkit.org>
2911
2912         Unreviewed, rolling out r178068.
2913         https://bugs.webkit.org/show_bug.cgi?id=140235
2914
2915         Breaks the iOS build (Requested by enrica on #webkit).
2916
2917         Reverted changeset:
2918
2919         "[iOS] Make WebKit2 build with public iOS SDK and more build
2920         fixes for DRT"
2921         https://bugs.webkit.org/show_bug.cgi?id=137371
2922         http://trac.webkit.org/changeset/178068
2923
2924 2015-01-07  Daniel Bates  <dabates@apple.com>
2925
2926         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2927         https://bugs.webkit.org/show_bug.cgi?id=137371
2928
2929         Reviewed by David Kilzer.
2930
2931         * Configurations/BaseTarget.xcconfig: Append directory $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks to
2932         the list of directories to search for frameworks so that we the linker can find and link against iOS private
2933         frameworks (e.g. AssertionServices).
2934         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2935         (WebKit::NetworkResourceLoader::willCacheResponseAsync): Add PLATFORM(IOS)-guard around call to NetworkDiskCacheMonitor::monitorFileBackingStoreCreation().
2936         * Platform/IPC/mac/ConnectionMac.mm: Add header sys/mman.h.
2937         * Platform/spi/ios/BKSProcessAssertionSPI.h: Added.
2938         * Platform/spi/ios/CorePDFSPI.h: Added.
2939         * Platform/spi/ios/DataDetectorsUISPI.h: Added.
2940         * Platform/spi/ios/ManagedConfigurationSPI.h: Added.
2941         * Platform/spi/ios/TCCSPI.h: Added.
2942         * Platform/spi/ios/TextInputSPI.h: Added.
2943         * Platform/spi/ios/UIKitSPI.h: Added.
2944         * Shared/Downloads/ios/DownloadIOS.mm: Add USE(CFNETWORK)-guard around CFNetwork-specific code and conditionally
2945         include header CFNetwork/CFURLDownload.h.
2946         (WebKit::Download::startWithHandle): Ditto.
2947         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: Include header ServersSPI.h instead
2948         of directly including private headers.
2949         * Shared/ios/NativeWebTouchEventIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
2950         * Shared/mac/SandboxUtilities.cpp: Include header sys/param.h.
2951         * UIProcess/API/Cocoa/WKWebView.mm: Include header UIKitSPI.h instead of directly including private headers.
2952         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Ditto.
2953         * UIProcess/API/Cocoa/WKWebViewInternal.h: Ditto.
2954         * UIProcess/API/ios/WKViewIOS.mm: Ditto.
2955         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Include header ServersSPI.h instead of directly including private headers.
2956         Also, ignore deprecated declaration for bootstrap_register2().
2957         * UIProcess/ios/PageClientImplIOS.mm: Include header UIKitSPI.h instead of directly including private headers.
2958         * UIProcess/ios/ProcessAssertionIOS.mm: Include header BKSProcessAssertionSPI.h instead of directly including private headers.
2959         * UIProcess/ios/SmartMagnificationController.mm: Include header UIKitSPI.h instead of directly including private headers.
2960         * UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
2961         * UIProcess/ios/WKActionSheet.mm: Ditto.
2962         * UIProcess/ios/WKActionSheetAssistant.h: Include header DataDetectorsUISPI.h instead of directly including private headers.
2963         * UIProcess/ios/WKActionSheetAssistant.mm: Include headers TCCSPI.h and UIKitSPI.h instead of directly including private headers.
2964         * UIProcess/ios/WKContentView.mm: Include header UIKitSPI.h instead of directly including private headers. Also, move CALayer SPI
2965         forward declarations to QuartzCoreSPI.h
2966         * UIProcess/ios/WKContentViewInteraction.h: Include header UIKitSPI.h instead of directly including private headers.
2967         * UIProcess/ios/WKContentViewInteraction.mm: Ditto. Also, include headers CoreGraphicsSPI.h, CoreText/CTFont.h, DataDetectorsUISPI.h,
2968         ManagedConfigurationSPI.h, TextInputSPI.h.
2969         * UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm: Include header UIKitSPI.h instead of directly including private headers.
2970         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
2971         * UIProcess/ios/WKPDFView.h: Include header CorePDFSPI.h instead of directly including private headers.
2972         * UIProcess/ios/WKPDFView.mm: Ditto. Also, remove header _UIHighlightViewSPI.h and include UIKitSPI.h.
2973         * UIProcess/ios/WKScrollView.h: Include header UIKitSPI.h instead of directly including private headers.
2974         * UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Ditto.
2975         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Ditto.
2976         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Ditto.
2977         * UIProcess/ios/forms/WKFileUploadPanel.mm: Ditto.
2978         * UIProcess/ios/forms/WKFormInputControl.mm: Ditto.
2979         * UIProcess/ios/forms/WKFormPopover.mm: Ditto.
2980         * UIProcess/ios/forms/WKFormSelectControl.h: Ditto.
2981         * UIProcess/ios/forms/WKFormSelectControl.mm: Ditto.
2982         * UIProcess/ios/forms/WKFormSelectPicker.mm: Ditto.
2983         * UIProcess/ios/forms/WKFormSelectPopover.mm: Ditto.
2984         * WebKit2.xcodeproj/project.pbxproj:
2985         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: Include headers ServersSPI.h and GraphicsServicesSPI.h instead of
2986         directly including private headers.
2987         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: Include header GraphicsServicesSPI.h instead of directly
2988         including private headers.
2989         * config.h: Moved EXTERN_C_BEGIN and EXTERN_C_END macros from here to file wtf/Compiler.h and renamed them to WTF_EXTERN_C_BEGIN
2990         and  WTF_EXTERN_C_END, respectively, so that we can make use of them in SPI wrapper headers (e.g. UIKitSPI.h).
2991
2992 2015-01-07  Beth Dakin  <bdakin@apple.com>
2993
2994         Adopt delegate callbacks so that standardQuickLookMenuItem does not obscure the 
2995         link
2996         https://bugs.webkit.org/show_bug.cgi?id=140206
2997         -and corresponding-
2998         rdar://problem/19300492
2999
3000         Reviewed by Tim Horton.
3001
3002         Providing and item frame will ensure that the original link is not obscured.
3003         * UIProcess/mac/WKImmediateActionController.mm:
3004         (-[WKImmediateActionController menuItem:itemFrameForPoint:]):
3005
3006         For now use a max size that is smaller than the WKView, with the screen’s aspect 
3007         ratio, and scaled down.
3008         (-[WKImmediateActionController menuItem:maxSizeForPoint:]):
3009
3010 2015-01-07  Alexey Proskuryakov  <ap@apple.com>
3011
3012         Release build fix.
3013
3014         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3015
3016 2015-01-06  Alexey Proskuryakov  <ap@apple.com>
3017
3018         [Mac] Secondary WebKit processes get re-exec'ed twice when running under ASan
3019         https://bugs.webkit.org/show_bug.cgi?id=140175
3020
3021         Reviewed by Sam Weinig.
3022
3023         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions):
3024         If the main process is ASanified, add the ASan dynamic library to DYLD_INSERT_LIBRARIES.
3025         This avoids an extra re-exec, which is very annoying when debugging.
3026         The library is linked in using @rpath, so the only reliable way to find its location
3027         is by examining binary images loaded into the current process.
3028
3029 2015-01-07  Zan Dobersek  <zdobersek@igalia.com>
3030
3031         [TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
3032         https://bugs.webkit.org/show_bug.cgi?id=140135
3033
3034         Reviewed by Darin Adler.
3035
3036         GraphicsLayerTextureMapper::layer() now returns a reference,
3037         so the call sites are updated.
3038
3039         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3040         (WebKit::LayerTreeHostGtk::initialize):
3041         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
3042         (WebKit::LayerTreeHostGtk::compositeLayersToContext):
3043
3044 2015-01-06  Gwang Yoon Hwang  <yoon@igalia.com>
3045
3046         Remove the remaining uses of OwnPtr in threaded compositor.
3047         https://bugs.webkit.org/show_bug.cgi?id=140172
3048
3049         Reviewed by Sam Weinig.
3050
3051         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
3052         (WebKit::ThreadedCompositor::runCompositingThread):
3053         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3054
3055 2015-01-06  Timothy Horton  <timothy_horton@apple.com>
3056
3057         View state change callbacks are sometimes dropped on the floor
3058         https://bugs.webkit.org/show_bug.cgi?id=140156
3059         <rdar://problem/19255417>
3060
3061         Reviewed by Anders Carlsson.
3062
3063         * UIProcess/WebPageProxy.cpp:
3064         (WebKit::WebPageProxy::dispatchViewStateChange):
3065         Always send SetViewState to the Web process if we have any
3066         registered view state change callbacks. Otherwise, if nothing changed,
3067         we can end up never calling the callback.
3068
3069 2015-01-06  Timothy Horton  <timothy_horton@apple.com>
3070
3071         Make explicit which TextIndicator animations are driven manually, and which run automatically
3072         https://bugs.webkit.org/show_bug.cgi?id=140113
3073         <rdar://problem/19383425>
3074
3075         Reviewed by Darin Adler.
3076
3077         * UIProcess/mac/PageClientImpl.mm:
3078         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3079         Delete an inaccurate comment.
3080
3081 2015-01-06  Anders Carlsson  <andersca@apple.com>
3082
3083         Remove now unused IndexedDB code
3084         https://bugs.webkit.org/show_bug.cgi?id=140128
3085
3086         Reviewed by Darin Adler.
3087
3088         Remove a function.
3089
3090         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3091         (WebKit::WebPlatformStrategies::createIDBFactoryBackend): Deleted.
3092         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3093
3094 2015-01-06  Darin Adler  <darin@apple.com>
3095
3096         Fix race in FindController code
3097         https://bugs.webkit.org/show_bug.cgi?id=140114
3098
3099         Reviewed by Anders Carlsson.
3100
3101         No idea how to reproduce this. Just ran into the crash in my local testing.
3102
3103         * WebProcess/WebPage/FindController.cpp:
3104         (WebKit::FindController::findString): Use a RefPtr to guarantee the FindController is
3105         not deleted while a this pointer is stored in a function.
3106
3107 2015-01-05  Anders Carlsson  <andersca@apple.com>
3108
3109         Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
3110         https://bugs.webkit.org/show_bug.cgi?id=140108
3111
3112         Reviewed by Darin Adler.
3113
3114         * CMakeLists.txt:
3115         * WebKit2.xcodeproj/project.pbxproj:
3116         * WebProcess/Databases/WebDatabaseProvider.cpp: Added.
3117         (WebKit::databaseProviders):
3118         (WebKit::WebDatabaseProvider::getOrCreate):
3119         (WebKit::WebDatabaseProvider::WebDatabaseProvider):
3120         (WebKit::WebDatabaseProvider::~WebDatabaseProvider):
3121         (WebKit::WebDatabaseProvider::createIDBFactoryBackend):
3122         * WebProcess/Databases/WebDatabaseProvider.h: Added.
3123         * WebProcess/WebPage/WebPage.cpp:
3124         (WebKit::WebPage::WebPage):
3125
3126 2015-01-05  Matt Baker  <mattbaker@apple.com>
3127
3128         Web Inspector: inspector view top inset should not include height of web view banners
3129         https://bugs.webkit.org/show_bug.cgi?id=140076
3130
3131         Reviewed by Anders Carlsson.
3132
3133         Added _totalHeightOfBanners property to WKView, which is used by the WebInspectorProxy
3134         to calculate the correct vertical position of the Inspector view frame. The browser is
3135         responsible for setting the property value whenever banners are installed or uninstalled from
3136         the view.
3137
3138         * UIProcess/API/Cocoa/WKViewPrivate.h:
3139         * UIProcess/API/mac/WKView.mm:
3140         (-[WKView _setTotalHeightOfBanners:]):
3141         (-[WKView _totalHeightOfBanners]):
3142         * UIProcess/mac/WebInspectorProxyMac.mm:
3143         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
3144
3145 2015-01-05  Timothy Horton  <timothy_horton@apple.com>
3146
3147         Implicitly dismissed DD popovers don't clear immediate action state, prematurely dismissing the next DD highlight
3148         https://bugs.webkit.org/show_bug.cgi?id=140088
3149         <rdar://problem/19298391>
3150
3151         Reviewed by Anders Carlsson.
3152
3153         * UIProcess/mac/WKImmediateActionController.mm:
3154         (-[WKImmediateActionController _menuItemForDataDetectedText]):
3155         Instead of just tearing down the TextIndicator, clear all state.
3156
3157 2015-01-05  Csaba Osztrogonác  <ossy@webkit.org>
3158
3159         One more URTBF after r177917.
3160
3161         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3162         * WebProcess/Battery/WebBatteryManager.h:
3163         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
3164         (WebKit::CoordinatedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage):
3165         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
3166         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3167         * WebProcess/WebPage/LayerTreeHost.h:
3168
3169 2015-01-05  Anders Carlsson  <andersca@apple.com>
3170
3171         Get rid of PassRefPtr from IPC::Connection
3172         https://bugs.webkit.org/show_bug.cgi?id=140092
3173
3174         Reviewed by Andreas Kling.
3175
3176         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
3177         (WebKit::DatabaseToWebProcessConnection::DatabaseToWebProcessConnection):
3178         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3179         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
3180         * Platform/IPC/Connection.cpp:
3181         (IPC::Connection::createServerConnection):
3182         (IPC::Connection::createClientConnection):
3183         (IPC::Connection::Connection):
3184         * Platform/IPC/Connection.h:
3185         * PluginProcess/WebProcessConnection.cpp:
3186         (WebKit::WebProcessConnection::WebProcessConnection):
3187         * Shared/ChildProcess.cpp:
3188         (WebKit::ChildProcess::initialize):
3189         * Shared/ChildProcessProxy.cpp:
3190         (WebKit::ChildProcessProxy::didFinishLaunching):
3191         * UIProcess/Plugins/PluginProcessProxy.cpp:
3192         (WebKit::PluginProcessProxy::didFinishLaunching):
3193         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
3194         (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection):
3195         * WebProcess/Network/NetworkProcessConnection.cpp:
3196         (WebKit::NetworkProcessConnection::NetworkProcessConnection):
3197         * WebProcess/Plugins/PluginProcessConnection.cpp:
3198         (WebKit::PluginProcessConnection::PluginProcessConnection):
3199         * WebProcess/WebPage/WebInspector.cpp:
3200         (WebKit::WebInspector::createInspectorPage):
3201         * WebProcess/WebPage/WebInspectorUI.cpp:
3202         (WebKit::WebInspectorUI::establishConnection):
3203
3204 2015-01-05  Csaba Osztrogonác  <ossy@webkit.org>
3205
3206         URTBF after r177917.
3207
3208         * UIProcess/WebBatteryManagerProxy.h:
3209         * UIProcess/WebVibrationProxy.h:
3210
3211 2015-01-05  Anders Carlsson  <andersca@apple.com>
3212
3213         Clean up Connection::SyncMessageState
3214         https://bugs.webkit.org/show_bug.cgi?id=140087
3215
3216         Reviewed by Andreas Kling.
3217
3218         * Platform/IPC/Connection.cpp:
3219         (IPC::Connection::SyncMessageState::syncMessageStateMapMutex):
3220         Change this to return an std::mutex and use std::call_once to initialize it properly.
3221
3222         (IPC::Connection::SyncMessageState::getOrCreate):
3223         Return a Ref.
3224
3225         (IPC::Connection::SyncMessageState::~SyncMessageState):
3226         Use an std::lock_guard.
3227
3228         (IPC::Connection::SyncMessageState::processIncomingMessage):
3229         Replace a bind call with a lambda.
3230
3231         (IPC::Connection::SyncMessageState::dispatchMessages):
3232         ConnectionAndIncomingMessage now holds a Ref<Connection>.
3233
3234         (IPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection):
3235         Change Connection to a reference.
3236
3237         (IPC::Connection::processIncomingMessage):
3238         Change Connection to a reference.
3239
3240 2015-01-05  Anders Carlsson  <andersca@apple.com>
3241
3242         Clean up the storage manager some more
3243         https://bugs.webkit.org/show_bug.cgi?id=140086
3244
3245         Reviewed by Andreas Kling.
3246
3247         Use lambdas instead of WTF::bind and get rid of a couple of internal functions.
3248
3249         * UIProcess/Storage/StorageManager.cpp:
3250         (WebKit::StorageManager::createSessionStorageNamespace):
3251         (WebKit::StorageManager::destroySessionStorageNamespace):
3252         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
3253         (WebKit::StorageManager::cloneSessionStorageNamespace):
3254         (WebKit::StorageManager::processWillCloseConnection):
3255         (WebKit::StorageManager::createSessionStorageNamespaceInternal): Deleted.
3256         (WebKit::StorageManager::destroySessionStorageNamespaceInternal): Deleted.
3257         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal): Deleted.
3258         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal): Deleted.
3259         (WebKit::StorageManager::invalidateConnectionInternal): Deleted.
3260         * UIProcess/Storage/StorageManager.h:
3261
3262 2015-01-05  Anders Carlsson  <andersca@apple.com>
3263
3264         Change more connection pointers to references
3265         https://bugs.webkit.org/show_bug.cgi?id=140085
3266
3267         Reviewed by Andreas Kling.
3268
3269         * UIProcess/Storage/StorageManager.cpp:
3270         (WebKit::StorageManager::StorageArea::addListener):
3271         (WebKit::StorageManager::StorageArea::removeListener):
3272         (WebKit::StorageManager::createLocalStorageMap):
3273         (WebKit::StorageManager::createTransientLocalStorageMap):
3274         (WebKit::StorageManager::createSessionStorageMap):
3275         (WebKit::StorageManager::destroyStorageMap):
3276         (WebKit::StorageManager::getValues):
3277         (WebKit::StorageManager::setItem):
3278         (WebKit::StorageManager::removeItem):
3279         (WebKit::StorageManager::clear):
3280         (WebKit::StorageManager::applicationWillTerminate):
3281         (WebKit::StorageManager::invalidateConnectionInternal):
3282         (WebKit::StorageManager::findStorageArea):
3283         * UIProcess/Storage/StorageManager.h:
3284
3285 2015-01-05  Anders Carlsson  <andersca@apple.com>
3286
3287         Change more of the IPC code to take connections by reference
3288         https://bugs.webkit.org/show_bug.cgi?id=140083
3289
3290         Reviewed by Andreas Kling.
3291
3292         * DatabaseProcess/DatabaseProcess.cpp:
3293         (WebKit::DatabaseProcess::didReceiveMessage):
3294         * DatabaseProcess/DatabaseProcess.h:
3295         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
3296         (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
3297         (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage):
3298         * DatabaseProcess/DatabaseToWebProcessConnection.h:
3299         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
3300         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3301         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
3302         (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
3303         * NetworkProcess/NetworkConnectionToWebProcess.h:
3304         * NetworkProcess/NetworkProcess.cpp:
3305         (WebKit::NetworkProcess::didReceiveMessage):
3306         (WebKit::NetworkProcess::didReceiveSyncMessage):
3307         * NetworkProcess/NetworkProcess.h:
3308         * NetworkProcess/NetworkResourceLoader.h:
3309         * Platform/IPC/Connection.cpp:
3310         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
3311         (IPC::Connection::dispatchSyncMessage):
3312         (IPC::Connection::dispatchMessage):
3313         * Platform/IPC/Connection.h:
3314         (IPC::Connection::waitForAndDispatchImmediately):
3315         * Platform/IPC/MessageReceiver.h:
3316         (IPC::MessageReceiver::didReceiveSyncMessage):
3317         * Platform/IPC/MessageReceiverMap.cpp:
3318         (IPC::MessageReceiverMap::dispatchMessage):
3319         (IPC::MessageReceiverMap::dispatchSyncMessage):
3320         * Platform/IPC/MessageReceiverMap.h:
3321         * PluginProcess/PluginControllerProxy.h:
3322         * PluginProcess/PluginProcess.cpp:
3323         (WebKit::PluginProcess::didReceiveMessage):
3324         * PluginProcess/PluginProcess.h:
3325         * PluginProcess/WebProcessConnection.cpp:
3326         (WebKit::WebProcessConnection::didReceiveMessage):
3327         (WebKit::WebProcessConnection::didReceiveSyncMessage):
3328         * PluginProcess/WebProcessConnection.h:
3329         * Scripts/webkit/messages.py:
3330         (async_message_statement):
3331         (sync_message_statement):
3332         (generate_message_handler):
3333         * Shared/API/Cocoa/RemoteObjectRegistry.h:
3334         * Shared/Authentication/AuthenticationManager.h:
3335         * Shared/ChildProcessProxy.cpp:
3336         (WebKit::ChildProcessProxy::dispatchMessage):
3337         (WebKit::ChildProcessProxy::dispatchSyncMessage):
3338         * Shared/ChildProcessProxy.h:
3339         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3340         * Shared/Plugins/NPObjectMessageReceiver.h:
3341         * Shared/Plugins/NPRemoteObjectMap.cpp:
3342         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
3343         * Shared/Plugins/NPRemoteObjectMap.h:
3344         * Shared/WebConnection.h:
3345         * Shared/mac/SecItemShim.h:
3346         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3347         (WebKit::DatabaseProcessProxy::didReceiveMessage):
3348         * UIProcess/Databases/DatabaseProcessProxy.h:
3349         * UIProcess/Downloads/DownloadProxy.h:
3350         * UIProcess/DrawingAreaProxy.h:
3351         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
3352         * UIProcess/Network/NetworkProcessProxy.cpp:
3353         (WebKit::NetworkProcessProxy::didReceiveMessage):
3354         (WebKit::NetworkProcessProxy::didReceiveSyncMessage):
3355         * UIProcess/Network/NetworkProcessProxy.h:
3356         * UIProcess/Plugins/PluginProcessProxy.h:
3357         * UIProcess/Storage/StorageManager.h:
3358         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3359         * UIProcess/VisitedLinkProvider.h:
3360         * UIProcess/WebApplicationCacheManagerProxy.h:
3361         * UIProcess/WebCookieManagerProxy.h:
3362         * UIProcess/WebDatabaseManagerProxy.h:
3363         * UIProcess/WebFullScreenManagerProxy.h:
3364         * UIProcess/WebGeolocationManagerProxy.h:
3365         * UIProcess/WebIconDatabase.h:
3366         * UIProcess/WebInspectorProxy.h:
3367         * UIProcess/WebMediaCacheManagerProxy.h:
3368         * UIProcess/WebOriginDataManagerProxy.h:
3369         * UIProcess/WebPageProxy.h:
3370         * UIProcess/WebPasteboardProxy.h:
3371         * UIProcess/WebProcessPool.cpp:
3372         (WebKit::WebProcessPool::dispatchMessage):
3373         (WebKit::WebProcessPool::dispatchSyncMessage):
3374         * UIProcess/WebProcessPool.h:
3375         * UIProcess/WebProcessProxy.cpp:
3376         (WebKit::WebProcessProxy::didReceiveMessage):
3377         (WebKit::WebProcessProxy::didReceiveSyncMessage):
3378         * UIProcess/WebProcessProxy.h:
3379         * UIProcess/WebResourceCacheManagerProxy.h:
3380         * UIProcess/ios/SmartMagnificationController.h:
3381         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3382         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3383         * UIProcess/mac/SecItemShimProxy.h:
3384         * UIProcess/mac/ViewGestureController.h:
3385         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
3386         * WebProcess/Cookies/WebCookieManager.h:
3387         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3388         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
3389         (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
3390         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
3391         * WebProcess/FullScreen/WebFullScreenManager.cpp:
3392         (WebKit::WebFullScreenManager::didReceiveMessage):
3393         * WebProcess/FullScreen/WebFullScreenManager.h:
3394         * WebProcess/Geolocation/WebGeolocationManager.h:
3395         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
3396         * WebProcess/MediaCache/WebMediaCacheManager.h:
3397         * WebProcess/Network/NetworkProcessConnection.cpp:
3398         (WebKit::NetworkProcessConnection::didReceiveMessage):
3399         (WebKit::NetworkProcessConnection::didReceiveSyncMessage):
3400         * WebProcess/Network/NetworkProcessConnection.h:
3401         * WebProcess/Network/WebResourceLoader.h:
3402         * WebProcess/Notifications/WebNotificationManager.h:
3403         * WebProcess/OriginData/WebOriginDataManager.h:
3404         * WebProcess/Plugins/PluginProcessConnection.cpp:
3405         (WebKit::PluginProcessConnection::didReceiveMessage):
3406         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
3407         * WebProcess/Plugins/PluginProcessConnection.h:
3408         * WebProcess/Plugins/PluginProcessConnectionManager.h:
3409         * WebProcess/Plugins/PluginProxy.h:
3410         * WebProcess/ResourceCache/WebResourceCacheManager.h:
3411         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
3412         * WebProcess/Storage/StorageAreaMap.h:
3413         * WebProcess/UserContent/WebUserContentController.h:
3414         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3415         * WebProcess/WebPage/DrawingArea.h:
3416         * WebProcess/WebPage/EventDispatcher.h:
3417         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
3418         * WebProcess/WebPage/ViewUpdateDispatcher.h:
3419         * WebProcess/WebPage/VisitedLinkTableController.h:
3420         * WebProcess/WebPage/WebInspector.h:
3421         * WebProcess/WebPage/WebInspectorUI.h:
3422         * WebProcess/WebPage/WebPage.cpp:
3423         (WebKit::WebPage::didReceiveMessage):
3424         (WebKit::WebPage::didReceiveSyncMessage):
3425         * WebProcess/WebPage/WebPage.h:
3426         * WebProcess/WebPage/WebPageGroupProxy.h:
3427         * WebProcess/WebProcess.cpp:
3428         (WebKit::WebProcess::didReceiveSyncMessage):
3429         (WebKit::WebProcess::didReceiveMessage):
3430         * WebProcess/WebProcess.h:
3431         * WebProcess/ios/WebVideoFullscreenManager.h:
3432
3433 2015-01-05  Anders Carlsson  <andersca@apple.com>
3434
3435         Pass IPC::Connection by reference to IPC message handlers
3436         https://bugs.webkit.org/show_bug.cgi?id=140082
3437
3438         Reviewed by Darin Adler.
3439
3440         * Platform/IPC/HandleMessage.h:
3441         (IPC::callMemberFunctionImpl):
3442         (IPC::callMemberFunction):
3443         (IPC::handleMessage):
3444         (IPC::handleMessageDelayed):
3445         * Scripts/webkit/messages.py:
3446         (async_message_statement):
3447         (sync_message_statement):
3448         * UIProcess/Storage/StorageManager.cpp:
3449         (WebKit::StorageManager::createLocalStorageMap):
3450         (WebKit::StorageManager::createTransientLocalStorageMap):
3451         (WebKit::StorageManager::createSessionStorageMap):
3452         (WebKit::StorageManager::destroyStorageMap):
3453         (WebKit::StorageManager::getValues):
3454         (WebKit::StorageManager::setItem):
3455         (WebKit::StorageManager::removeItem):
3456         (WebKit::StorageManager::clear):
3457         * UIProcess/Storage/StorageManager.h:
3458         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3459         (WebKit::WebUserContentControllerProxy::didPostMessage):
3460         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3461         * UIProcess/WebGeolocationManagerProxy.cpp:
3462         (WebKit::WebGeolocationManagerProxy::startUpdating):
3463         (WebKit::WebGeolocationManagerProxy::stopUpdating):
3464         (WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):
3465         * UIProcess/WebGeolocationManagerProxy.h:
3466         * UIProcess/WebOriginDataManagerProxy.cpp:
3467         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
3468         (WebKit::WebOriginDataManagerProxy::didDeleteEntries):
3469         (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries):
3470         * UIProcess/WebOriginDataManagerProxy.h:
3471         * UIProcess/WebProcessPool.cpp:
3472         (WebKit::WebProcessPool::handleMessage):
3473         (WebKit::WebProcessPool::handleSynchronousMessage):
3474         * UIProcess/WebProcessPool.h:
3475         * UIProcess/mac/SecItemShimProxy.cpp:
3476         (WebKit::SecItemShimProxy::secItemRequest):
3477         * UIProcess/mac/SecItemShimProxy.h:
3478
3479 2015-01-04  Anders Carlsson  <andersca@apple.com>
3480
3481         Clean up some of the IPC code
3482         https://bugs.webkit.org/show_bug.cgi?id=140057
3483
3484         Reviewed by Antti Koivisto.
3485
3486         Use std::mutex instead of WTF::Mutex. Change a couple of pointers to references in the connection client.
3487
3488         * DatabaseProcess/DatabaseProcess.cpp:
3489         (WebKit::DatabaseProcess::didClose):
3490         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
3491         * DatabaseProcess/DatabaseProcess.h:
3492         * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
3493         (WebKit::DatabaseToWebProcessConnection::didClose):
3494         (WebKit::DatabaseToWebProcessConnection::didReceiveInvalidMessage):
3495         * DatabaseProcess/DatabaseToWebProcessConnection.h:
3496         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3497         (WebKit::NetworkConnectionToWebProcess::didClose):
3498         (WebKit::NetworkConnectionToWebProcess::didReceiveInvalidMessage):
3499         * NetworkProcess/NetworkConnectionToWebProcess.h:
3500         * NetworkProcess/NetworkProcess.cpp:
3501         (WebKit::NetworkProcess::didClose):
3502         (WebKit::NetworkProcess::didReceiveInvalidMessage):
3503         * NetworkProcess/NetworkProcess.h:
3504         * Platform/IPC/Connection.cpp:
3505         (IPC::Connection::sendMessage):
3506         (IPC::Connection::waitForMessage):
3507         (IPC::Connection::connectionDidClose):
3508         (IPC::Connection::sendOutgoingMessages):
3509         (IPC::Connection::dispatchDidReceiveInvalidMessage):
3510         (IPC::Connection::enqueueIncomingMessage):
3511         (IPC::Connection::dispatchMessage):
3512         (IPC::Connection::dispatchOneMessage):
3513         * Platform/IPC/Connection.h:
3514         * PluginProcess/PluginProcess.cpp:
3515         (WebKit::PluginProcess::didClose):
3516         (WebKit::PluginProcess::didReceiveInvalidMessage):
3517         * PluginProcess/PluginProcess.h:
3518         * PluginProcess/WebProcessConnection.cpp:
3519         (WebKit::WebProcessConnection::didClose):
3520         (WebKit::WebProcessConnection::didReceiveInvalidMessage):
3521         * PluginProcess/WebProcessConnection.h:
3522         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3523         (WebKit::DatabaseProcessProxy::didClose):
3524         (WebKit::DatabaseProcessProxy::didReceiveInvalidMessage):
3525         * UIProcess/Databases/DatabaseProcessProxy.h:
3526         * UIProcess/Network/NetworkProcessProxy.cpp:
3527         (WebKit::NetworkProcessProxy::didClose):
3528         (WebKit::NetworkProcessProxy::didReceiveInvalidMessage):
3529         * UIProcess/Network/NetworkProcessProxy.h:
3530         * UIProcess/Plugins/PluginProcessProxy.cpp:
3531         (WebKit::PluginProcessProxy::didClose):
3532         (WebKit::PluginProcessProxy::didReceiveInvalidMessage):
3533         * UIProcess/Plugins/PluginProcessProxy.h:
3534         * UIProcess/WebProcessProxy.cpp:
3535         (WebKit::WebProcessProxy::didClose):
3536         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
3537         * UIProcess/WebProcessProxy.h:
3538         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
3539         (WebKit::WebToDatabaseProcessConnection::didClose):
3540         (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage):
3541         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
3542         * WebProcess/Network/NetworkProcessConnection.cpp:
3543         (WebKit::NetworkProcessConnection::didClose):
3544         (WebKit::NetworkProcessConnection::didReceiveInvalidMessage):
3545         * WebProcess/Network/NetworkProcessConnection.h:
3546         * WebProcess/Plugins/PluginProcessConnection.cpp:
3547         (WebKit::PluginProcessConnection::didClose):
3548         (WebKit::PluginProcessConnection::didReceiveInvalidMessage):
3549         * WebProcess/Plugins/PluginProcessConnection.h:
3550         * WebProcess/WebPage/WebInspector.h:
3551         * WebProcess/WebPage/WebInspectorUI.h:
3552         * WebProcess/WebProcess.cpp:
3553         (WebKit::WebProcess::didClose):
3554         (WebKit::WebProcess::didReceiveInvalidMessage):
3555         * WebProcess/WebProcess.h:
3556
3557 2015-01-01  Sam Weinig  <sam@webkit.org>
3558
3559         Remove GroupSettings
3560         https://bugs.webkit.org/show_bug.cgi?id=140037
3561
3562         Reviewed by Dan Bernstein.
3563
3564         Remove unused databaseDirectoryIdentifier parameters.
3565
3566         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3567         (WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
3568         (WebKit::WebIDBFactoryBackend::getDatabaseNames):
3569         (WebKit::WebIDBFactoryBackend::deleteDatabase):
3570         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
3571         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3572         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3573         (WebKit::WebPlatformStrategies::createIDBFactoryBackend):
3574         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3575
3576 2015-01-01  Jeff Miller  <jeffm@apple.com>
3577
3578         Update user-visible copyright strings to include 2015
3579         https://bugs.webkit.org/show_bug.cgi?id=139880
3580
3581         Reviewed by Darin Adler.
3582
3583         * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3584         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
3585         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
3586         * Info.plist:
3587         * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3588         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist:
3589         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
3590         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
3591         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
3592         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3593         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3594         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
3595         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3596         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
3597         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
3598         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
3599         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
3600         * mac/Info-WebKit2.plist:
3601
3602 2014-12-31  Sam Weinig  <sam@webkit.org>
3603
3604         Move scrolling code off of WTF::bind
3605         https://bugs.webkit.org/show_bug.cgi?id=140019
3606
3607         Reviewed by Darin Adler.
3608
3609         * WebProcess/WebPage/EventDispatcher.cpp:
3610         (WebKit::EventDispatcher::wheelEvent):
3611         (WebKit::EventDispatcher::touchEvent):
3612         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3613         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
3614
3615 2015-01-01  Darin Adler  <darin@apple.com>
3616
3617         We often misspell identifier as "identifer"
3618         https://bugs.webkit.org/show_bug.cgi?id=140025
3619
3620         Reviewed by Michael Saboff.
3621
3622         * Shared/WebPageGroupData.cpp:
3623         (WebKit::WebPageGroupData::encode):
3624         (WebKit::WebPageGroupData::decode):
3625         * Shared/WebPageGroupData.h:
3626         * UIProcess/WebPageGroup.cpp:
3627         (WebKit::pageGroupData):
3628         (WebKit::WebPageGroup::WebPageGroup):
3629         * UIProcess/WebPageGroup.h:
3630         (WebKit::WebPageGroup::identifier):
3631         * WebProcess/WebPage/WebInspector.cpp:
3632         (WebKit::WebInspector::createInspectorPage):
3633         * WebProcess/WebPage/WebPageGroupProxy.cpp:
3634         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
3635         * WebProcess/WebPage/WebPageGroupProxy.h:
3636         (WebKit::WebPageGroupProxy::identifier):
3637         Fix misspellings.
3638
3639 2014-12-31  Yusuke Suzuki  <utatane.tea@gmail.com>
3640
3641         [GTK] Suppress unused parameter warnings in ui clients
3642         https://bugs.webkit.org/show_bug.cgi?id=140012
3643
3644         Drop the parameter name of WebKitUIClient::isPlayingAudioDidChange
3645         to suppress warnings.
3646
3647         Reviewed by Benjamin Poulain.
3648
3649         * UIProcess/API/gtk/WebKitUIClient.cpp:
3650
3651 2014-12-31  Sam Weinig  <sam@webkit.org>
3652
3653         Remove the remaining uses of OwnPtr from WebKit2
3654         https://bugs.webkit.org/show_bug.cgi?id=140017
3655
3656         Reviewed by Dan Bernstein.
3657
3658         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3659         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
3660         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
3661         (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
3662         (WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
3663         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
3664         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3665         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
3666         * UIProcess/mac/PageClientImpl.h:
3667         * UIProcess/mac/PageClientImpl.mm:
3668         (WebKit::PageClientImpl::PageClientImpl):
3669         * UIProcess/mac/WKFullScreenWindowController.h:
3670         * UIProcess/mac/WKPrintingView.mm:
3671         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
3672         (-[WKPrintingView _askPageToComputePageRects]):
3673         (-[WKPrintingView _drawPreview:]):
3674         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
3675
3676 2014-12-31  Bartlomiej Gajda  <b.gajda@samsung.com>
3677
3678         Fix build warnings after r177792.
3679         https://bugs.webkit.org/show_bug.cgi?id=140005.
3680
3681         Reviewed by Anders Carlsson.
3682
3683         Add UNUSED_PARAM(connection) for async messages.
3684
3685         * Scripts/webkit/messages.py:
3686         (generate_message_handler):
3687
3688 2014-12-31  Zan Dobersek  <zdobersek@igalia.com>
3689
3690         Unreviewed build fix for the GTK port.
3691
3692         Move the ArgumentCodersGtk.h inclusion from WebPageProxy.cpp to
3693         WebPageProxy.h. This makes GTK-specific IPC coders available to
3694         WebPageProxyMessageReceiver, fixing a build error due to missing
3695         ArgumentCoder template specializations for WebCore::DragData type
3696         that is used in the GTK-specific StartDrag message.
3697
3698         * UIProcess/WebPageProxy.cpp:
3699         * UIProcess/WebPageProxy.h:
3700
3701 2014-12-31  Commit Queue  <commit-queue@webkit.org>
3702
3703         Unreviewed, rolling out r177824 and r177826.
3704         https://bugs.webkit.org/show_bug.cgi?id=140011
3705
3706         The new test crashes (Requested by ap on #webkit).
3707
3708         Reverted changesets:
3709
3710         "Too large plugins are crashing."
3711         https://bugs.webkit.org/show_bug.cgi?id=139856
3712         http://trac.webkit.org/changeset/177824
3713
3714         "Fix bug number typo in the previous commit."
3715         http://trac.webkit.org/changeset/177826
3716
3717 2014-12-30  Gabor Rapcsanyi  <rgabor@webkit.org>
3718
3719         Too large plugins are crashing.
3720         https://bugs.webkit.org/show_bug.cgi?id=139868
3721
3722         Reviewed by Darin Adler.
3723
3724         * WebProcess/Plugins/PluginProxy.cpp:
3725         (WebKit::PluginProxy::updateBackingStore): Return false if backingStore cannot be allocated.
3726
3727 2014-12-30  Anders Carlsson  <andersca@apple.com>
3728
3729         Transient local storage namespaces need to ref their storage areas
3730         https://bugs.webkit.org/show_bug.cgi?id=140006
3731         <rdar://problem/19225389>
3732
3733         Reviewed by Sam Weinig.
3734
3735         We need to keep transient storage areas around even if they have no active connections,
3736         so use a RefPtr instead of a raw pointer. This matches what we do for session storage namespaces.
3737
3738         * UIProcess/Storage/StorageManager.cpp:
3739
3740 2014-12-29  Anders Carlsson  <andersca@apple.com>
3741
3742         Remove unneeded StorageNamespace functions
3743         https://bugs.webkit.org/show_bug.cgi?id=139997
3744
3745         Reviewed by Sam Weinig.
3746
3747         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3748         (WebKit::StorageNamespaceImpl::close): Deleted.
3749         (WebKit::StorageNamespaceImpl::clearOriginForDeletion): Deleted.
3750         (WebKit::StorageNamespaceImpl::clearAllOriginsForDeletion): Deleted.
3751         (WebKit::StorageNamespaceImpl::sync): Deleted.
3752         (WebKit::StorageNamespaceImpl::closeIdleLocalStorageDatabases): Deleted.
3753         * WebProcess/Storage/StorageNamespaceImpl.h:
3754
3755 2014-12-29  Anders Carlsson  <andersca@apple.com>
3756
3757         Move storage code from WebCore to WebKit
3758         https://bugs.webkit.org/show_bug.cgi?id=139558
3759
3760         Reviewed by Darin Adler.
3761
3762         * WebProcess/WebProcess.cpp:
3763
3764 2014-12-29  Dan Bernstein  <mitz@apple.com>
3765
3766         Fixed the iOS build.
3767
3768         * WebProcess/WebPage/ios/WebPageIOS.mm:
3769
3770 2014-12-29  Anders Carlsson  <andersca@apple.com>
3771
3772         Another iOS build fix.
3773
3774         * WebProcess/WebPage/ios/WebPageIOS.mm:
3775         (WebKit::WebPage::elementDidFocus):
3776
3777 2014-12-29  Anders Carlsson  <andersca@apple.com>
3778
3779         Turn on transient local storage support again
3780         https://bugs.webkit.org/show_bug.cgi?id=139995
3781
3782         Reviewed by Sam Weinig.
3783
3784         Using transient local storage caused weird crashes in the UI process so that change had to
3785         be backed out - let's turn it on and see if it still happens.
3786
3787         * WebProcess/Storage/WebStorageNamespaceProvider.cpp:
3788         (WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
3789
3790 2014-12-29  Anders Carlsson  <andersca@apple.com>
3791
3792         Remove more old coder code gunk.
3793
3794         Rubber-stamped by Sam Weinig.
3795
3796         * Scripts/webkit/messages.py:
3797         (argument_coder_headers_for_type):
3798         (handler_function): Deleted.
3799
3800 2014-12-29  Anders Carlsson  <andersca@apple.com>
3801
3802         Try to fix the iOS build.
3803
3804         * UIProcess/ios/WebPageProxyIOS.mm:
3805         (WebKit::WebPageProxy::startAssistingNode):
3806         * WebProcess/WebPage/ios/WebPageIOS.mm:
3807         (WebKit::WebPage::elementDidFocus):
3808
3809 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
3810
3811         URTBF after r177805.
3812
3813         * CMakeLists.txt:
3814
3815 2014-12-29  Anders Carlsson  <andersca@apple.com>
3816
3817         Remove the old user message coder code
3818         https://bugs.webkit.org/show_bug.cgi?id=139994
3819
3820         Reviewed by Sam Weinig.
3821
3822         * Platform/IPC/HandleMessage.h:
3823         (IPC::callMemberFunctionImpl): Deleted.
3824         (IPC::callMemberFunction): Deleted.
3825         (IPC::handleMessageVariadic): Deleted.
3826         * Scripts/webkit/messages.py:
3827         (decode_type):
3828         (async_message_statement):
3829         (sync_message_statement):
3830         * Shared/UserMessageCoders.h: Removed.
3831         * Shared/mac/ObjCObjectGraphCoders.h: Removed.
3832         * Shared/mac/ObjCObjectGraphCoders.mm: Removed.
3833         * UIProcess/WebConnectionToWebProcess.cpp:
3834         * UIProcess/WebContextUserMessageCoders.h: Removed.
3835         * UIProcess/WebPageProxy.cpp:
3836         * UIProcess/WebProcessPool.cpp:
3837         * WebKit2.xcodeproj/project.pbxproj:
3838         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3839         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Removed.
3840         * WebProcess/WebConnectionToUIProcess.cpp:
3841         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3842         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3843         * WebProcess/WebPage/WebContextMenu.cpp:
3844         * WebProcess/WebPage/WebPage.cpp:
3845         * WebProcess/WebPage/mac/WebPageMac.mm:
3846         * WebProcess/WebProcess.cpp:
3847
3848 2014-12-29  Sam Weinig  <sam@webkit.org>
3849
3850         Move WebPasteboardProxy from Shared to UIProcess, where it should have been all along
3851         Rubber-stamped by Anders Carlsson.
3852
3853         * Shared/WebPasteboardProxy.cpp: Removed.
3854         * Shared/WebPasteboardProxy.h: Removed.
3855         * Shared/WebPasteboardProxy.messages.in: Removed.
3856         * UIProcess/WebPasteboardProxy.cpp: Copied from Shared/WebPasteboardProxy.cpp.
3857         * UIProcess/WebPasteboardProxy.h: Copied from Shared/WebPasteboardProxy.h.
3858         * UIProcess/WebPasteboardProxy.messages.in: Copied from Shared/WebPasteboardProxy.messages.in.
3859         * WebKit2.xcodeproj/project.pbxproj:
3860
3861 2014-12-29  Sam Weinig  <sam@webkit.org>
3862
3863         Try to fix the iOS build.
3864
3865         * Shared/WebPasteboardProxy.h:
3866
3867 2014-12-29  Anders Carlsson  <andersca@apple.com>
3868
3869         Convert injected bundle message posting to UserData
3870         https://bugs.webkit.org/show_bug.cgi?id=139993
3871
3872         Reviewed by Sam Weinig.
3873
3874         * UIProcess/WebProcessPool.cpp:
3875         (WebKit::WebProcessPool::createNewWebProcess):
3876         (WebKit::WebProcessPool::postMessageToInjectedBundle):
3877         * WebProcess/WebProcess.cpp:
3878         (WebKit::WebProcess::handleInjectedBundleMessage):
3879         (WebKit::WebProcess::postInjectedBundleMessage): Deleted.
3880         * WebProcess/WebProcess.h:
3881         * WebProcess/WebProcess.messages.in:
3882
3883 2014-12-29  Sam Weinig  <sam@webkit.org>
3884
3885         Try to fix the iOS build.
3886
3887         * Shared/WebPasteboardProxy.h:
3888
3889 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
3890
3891         One more speculative buildfix after r177794.
3892
3893         * CMakeLists.txt:
3894
3895 2014-12-29  Sam Weinig  <sam@webkit.org>
3896
3897         Try to fix the iOS build.
3898
3899         * Shared/WebPasteboardProxy.h:
3900
3901 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
3902
3903         Speculative buildfix after r177793.
3904
3905         * WebProcess/soup/WebProcessSoup.cpp:
3906         (WebKit::WebProcess::platformInitializeWebProcess):
3907
3908 2014-12-29  Csaba Osztrogonác  <ossy@webkit.org>
3909
3910         Speculative buildfix after r177794.
3911
3912         * CMakeLists.txt:
3913
3914 2014-12-29  Sam Weinig  <sam@webkit.org>
3915
3916         Removes some unnecessary use of LegacyReceiver
3917         https://bugs.webkit.org/show_bug.cgi?id=139992
3918
3919         Reviewed by Anders Carlsson.
3920
3921         * Shared/WebConnection.cpp:
3922         (WebKit::WebConnection::didReceiveMessage): Deleted.
3923         * Shared/WebConnection.h:
3924         * Shared/WebConnection.messages.in:
3925         * UIProcess/WebProcessPool.cpp:
3926         (WebKit::WebProcessPool::didReceiveMessage): Deleted.
3927         (WebKit::WebProcessPool::didReceiveSyncMessage): Deleted.
3928         * UIProcess/WebProcessPool.h:
3929         * UIProcess/WebProcessPool.messages.in:
3930         Remove unnecessary use of LegacyReceiver.
3931
3932         * UIProcess/WebPageProxy.h:
3933         Remove declarations for functions that don't exist.
3934
3935 2014-12-29  Anders Carlsson  <andersca@apple.com>
3936
3937         Convert all variadic web process messages to UserData
3938         https://bugs.webkit.org/show_bug.cgi?id=139991
3939
3940         Reviewed by Sam Weinig.
3941
3942         * UIProcess/WebPageProxy.cpp:
3943         (WebKit::WebPageProxy::loadRequest):
3944         (WebKit::WebPageProxy::loadFile):
3945         (WebKit::WebPageProxy::loadData):
3946         (WebKit::WebPageProxy::loadHTMLString):
3947         (WebKit::WebPageProxy::loadAlternateHTMLString):
3948         (WebKit::WebPageProxy::loadPlainTextString):
3949         (WebKit::WebPageProxy::loadWebArchiveData):
3950         (WebKit::WebPageProxy::postMessageToInjectedBundle):
3951         * WebProcess/WebPage/WebPage.cpp:
3952         (WebKit::WebPage::loadRequest):
3953         (WebKit::WebPage::loadDataImpl):
3954         (WebKit::WebPage::loadString):
3955         (WebKit::WebPage::loadData):
3956         (WebKit::WebPage::loadHTMLString):
3957         (WebKit::WebPage::loadAlternateHTMLString):
3958         (WebKit::WebPage::loadPlainTextString):
3959         (WebKit::WebPage::loadWebArchiveData):
3960         (WebKit::WebPage::postInjectedBundleMessage):
3961         * WebProcess/WebPage/WebPage.h:
3962         * WebProcess/WebPage/WebPage.messages.in:
3963
3964 2014-12-29  Anders Carlsson  <andersca@apple.com>
3965
3966         Convert all variadic WebProcessProxy message over to UserData
3967         https://bugs.webkit.org/show_bug.cgi?id=139990
3968
3969         Reviewed by Sam Weinig.
3970
3971         * UIProcess/WebPageProxy.cpp:
3972         (WebKit::WebPageProxy::willGoToBackForwardListItem):
3973         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3974         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
3975         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
3976         (WebKit::WebPageProxy::didCommitLoadForFrame):
3977         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
3978         (WebKit::WebPageProxy::didFinishLoadForFrame):
3979         (WebKit::WebPageProxy::didFailLoadForFrame):
3980         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3981         (WebKit::WebPageProxy::didReceiveTitleForFrame):
3982         (WebKit::WebPageProxy::didFirstLayoutForFrame):
3983         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
3984         (WebKit::WebPageProxy::didLayout):
3985         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
3986         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
3987         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
3988         (WebKit::WebPageProxy::didDetectXSSForFrame):
3989         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3990         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
3991         (WebKit::WebPageProxy::decidePolicyForResponse):
3992         (WebKit::WebPageProxy::decidePolicyForResponseSync):
3993         (WebKit::WebPageProxy::unableToImplementPolicy):
3994         (WebKit::WebPageProxy::willSubmitForm):
3995         (WebKit::WebPageProxy::mouseDidMoveOverElement):
3996         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress):
3997         (WebKit::WebPageProxy::didRecognizeLongMousePress):
3998         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress):
3999         (WebKit::WebPageProxy::showContextMenu):
4000         (WebKit::WebPageProxy::internalShowContextMenu):
4001         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
4002         * UIProcess/WebPageProxy.h:
4003         * UIProcess/WebPageProxy.messages.in:
4004         * UIProcess/mac/WebPageProxyMac.mm:
4005         (WebKit::WebPageProxy::showSelectionServiceMenu):
4006         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4007         (WebKit::WebChromeClient::mouseDidMoveOverElement):
4008         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
4009         (WebKit::WebChromeClient::didRecognizeLongMousePress):
4010         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress):
4011         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4012         (WebKit::WebFrameLoaderClient::detachedFromParent2):
4013         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
4014         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
4015         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
4016         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
4017         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
4018         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
4019         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
4020         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
4021         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
4022         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
4023         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
4024         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
4025         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
4026         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
4027         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
4028         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
4029         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
4030         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
4031         (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
4032         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
4033         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
4034         (WebKit::WebFrameLoaderClient::didDetectXSS):
4035         * WebProcess/WebPage/WebContextMenu.cpp:
4036         (WebKit::WebContextMenu::show):
4037         * WebProcess/WebPage/mac/WebPageMac.mm:
4038         (WebKit::WebPage::performActionMenuHitTestAtLocation):
4039
4040 2014-12-29  Sam Weinig  <sam@webkit.org>
4041
4042         Move Pasteboard code out of WebProcessPool and into its own singleton class
4043         https://bugs.webkit.org/show_bug.cgi?id=139987
4044
4045         Reviewed by Anders Carlsson.
4046
4047         * DerivedSources.make:
4048         * Shared/WebPasteboardProxy.cpp: Added.
4049         (WebKit::WebPasteboardProxy::shared):
4050         (WebKit::WebPasteboardProxy::WebPasteboardProxy):
4051         (WebKit::WebPasteboardProxy::addWebProcessProxy):
4052         * Shared/WebPasteboardProxy.h: Added.
4053         * Shared/WebPasteboardProxy.messages.in: Added.
4054         * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: Added.
4055         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
4056         * UIProcess/WebProcessPool.cpp:
4057         (WebKit::WebProcessPool::didReceiveSyncMessage):
4058         (WebKit::WebProcessPool::dummy): Deleted.
4059         * UIProcess/WebProcessPool.h:
4060         * UIProcess/WebProcessPool.messages.in:
4061         * UIProcess/WebProcessProxy.cpp:
4062         (WebKit::WebProcessProxy::WebProcessProxy):