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