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