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