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