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