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