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