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