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