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