4542b4a02c028709fc78644d41c7d0f5e226755e
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
4         https://bugs.webkit.org/show_bug.cgi?id=115904
5
6         Reviewed by Martin Robinson.
7
8         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
9         (startTestServerMonitor):
10         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
11         (startTestServerMonitor):
12
13 2013-05-09  Anders Carlsson  <andersca@apple.com>
14
15         Fix build.
16
17         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
18
19 2013-05-09  Anders Carlsson  <andersca@apple.com>
20
21         Enable UI process storage
22         https://bugs.webkit.org/show_bug.cgi?id=115879
23         <rdar://problem/12239765>
24
25         Reviewed by Beth Dakin.
26
27         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
28         Flip the switch.
29
30 2013-05-09  Anders Carlsson  <andersca@apple.com>
31
32         Remove extra spaces between right angle brackets in template declarations
33         https://bugs.webkit.org/show_bug.cgi?id=115877
34
35         Reviewed by Beth Dakin.
36
37         C++11 doesn't require spaces between right angle brackets so remove all of them.
38
39         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
40         (WebKit::NetworkBlobRegistry::registerBlobURL):
41         (WebKit::NetworkBlobRegistry::sandboxExtensions):
42         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
43         (NetworkBlobRegistry):
44         * NetworkProcess/HostRecord.h:
45         (HostRecord):
46         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
47         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
48         (WebKit::NetworkConnectionToWebProcess::didClose):
49         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
50         * NetworkProcess/NetworkConnectionToWebProcess.h:
51         (NetworkConnectionToWebProcess):
52         * NetworkProcess/NetworkProcess.h:
53         (NetworkProcess):
54         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
55         (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
56         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
57         * NetworkProcess/NetworkResourceLoadScheduler.h:
58         * NetworkProcess/SchedulableLoader.cpp:
59         (WebKit::SchedulableLoader::SchedulableLoader):
60         * NetworkProcess/SchedulableLoader.h:
61         (SchedulableLoader):
62         * Platform/CoreIPC/ArgumentCoders.h:
63         * Platform/CoreIPC/Connection.cpp:
64         (Connection::SyncMessageState):
65         (CoreIPC::Connection::waitForMessage):
66         (CoreIPC::Connection::processIncomingMessage):
67         * Platform/CoreIPC/Connection.h:
68         (Connection):
69         * Platform/WorkQueue.h:
70         (WorkQueue):
71         * PluginProcess/PluginProcess.h:
72         (PluginProcess):
73         * Scripts/webkit2/messages_unittest.py:
74         (CoreIPC):
75         * Shared/BlockingResponseMap.h:
76         (BlockingResponseMap):
77         * Shared/ChildProcessProxy.h:
78         (ChildProcessProxy):
79         * Shared/ImmutableArray.cpp:
80         (WebKit::ImmutableArray::ImmutableArray):
81         * Shared/ImmutableArray.h:
82         (WebKit::ImmutableArray::adopt):
83         (ImmutableArray):
84         * Shared/ImmutableDictionary.cpp:
85         (WebKit::ImmutableDictionary::keys):
86         * Shared/ImmutableDictionary.h:
87         (ImmutableDictionary):
88         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
89         (CustomProtocolManager):
90         * Shared/SecurityOriginData.cpp:
91         (WebKit::performAPICallbackWithSecurityOriginDataVector):
92         * Shared/SessionState.cpp:
93         * Shared/StatisticsData.h:
94         (StatisticsData):
95         * Shared/UserMessageCoders.h:
96         (WebKit::UserMessageDecoder::baseDecode):
97         * Shared/WebArchive.cpp:
98         (WebKit::WebArchive::WebArchive):
99         (WebKit::WebArchive::subresources):
100         (WebKit::WebArchive::subframeArchives):
101         * Shared/WebContextMenuItem.cpp:
102         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
103         * Shared/WebOpenPanelParameters.cpp:
104         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
105         (WebKit::WebOpenPanelParameters::selectedFileNames):
106         * Shared/mac/ArgumentCodersMac.mm:
107         (CoreIPC::encode):
108         * SharedWorkerProcess/SharedWorkerProcess.h:
109         (SharedWorkerProcess):
110         * UIProcess/API/mac/WKPrintingView.h:
111         (WebFrameProxy):
112         * UIProcess/API/mac/WKPrintingView.mm:
113         (-[WKPrintingView _drawPreview:]):
114         * UIProcess/API/mac/WKView.mm:
115         (WebKit):
116         * UIProcess/Downloads/DownloadProxyMap.cpp:
117         (WebKit::DownloadProxyMap::processDidClose):
118         * UIProcess/Downloads/DownloadProxyMap.h:
119         (DownloadProxyMap):
120         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
121         (GeolocationPermissionRequestManagerProxy):
122         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
123         (DynamicLinkerEnvironmentExtractor):
124         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
125         (CustomProtocolManagerProxy):
126         * UIProcess/Network/NetworkProcessProxy.h:
127         (NetworkProcessProxy):
128         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
129         (NotificationPermissionRequestManagerProxy):
130         * UIProcess/Notifications/WebNotificationManagerProxy.h:
131         (WebNotificationManagerProxy):
132         * UIProcess/Plugins/PluginProcessManager.h:
133         (PluginProcessManager):
134         * UIProcess/Plugins/PluginProcessProxy.h:
135         (PluginProcessProxy):
136         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
137         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
138         * UIProcess/Plugins/WebPluginSiteDataManager.h:
139         (WebPluginSiteDataManager):
140         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
141         (SharedWorkerProcessManager):
142         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
143         (SharedWorkerProcessProxy):
144         * UIProcess/StatisticsRequest.cpp:
145         (WebKit::StatisticsRequest::completedRequest):
146         * UIProcess/Storage/StorageManager.cpp:
147         (StorageManager::StorageArea):
148         (WebKit::StorageManager::StorageArea::dispatchEvents):
149         (StorageManager::SessionStorageNamespace):
150         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
151         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
152         (WebKit::StorageManager::createLocalStorageMap):
153         (WebKit::StorageManager::createSessionStorageMap):
154         (WebKit::StorageManager::destroyStorageMap):
155         (WebKit::StorageManager::invalidateConnectionInternal):
156         (WebKit::StorageManager::findStorageArea):
157         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
158         * UIProcess/Storage/StorageManager.h:
159         (StorageManager):
160         * UIProcess/WebApplicationCacheManagerProxy.h:
161         (WebApplicationCacheManagerProxy):
162         * UIProcess/WebBackForwardList.cpp:
163         (WebKit::WebBackForwardList::addItem):
164         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
165         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
166         (WebKit::WebBackForwardList::clear):
167         * UIProcess/WebBackForwardList.h:
168         (WebKit):
169         * UIProcess/WebContext.cpp:
170         (WebKit::WebContext::createNewWebProcess):
171         (WebKit::WebContext::enableProcessTermination):
172         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
173         * UIProcess/WebContext.h:
174         (WebContext):
175         * UIProcess/WebCookieManagerProxy.cpp:
176         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
177         * UIProcess/WebCookieManagerProxy.h:
178         (WebCookieManagerProxy):
179         * UIProcess/WebDatabaseManagerProxy.cpp:
180         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
181         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
182         * UIProcess/WebDatabaseManagerProxy.h:
183         (WebDatabaseManagerProxy):
184         * UIProcess/WebFormClient.cpp:
185         (WebKit::WebFormClient::willSubmitForm):
186         * UIProcess/WebFormClient.h:
187         (WebFormClient):
188         * UIProcess/WebKeyValueStorageManagerProxy.h:
189         (WebKeyValueStorageManagerProxy):
190         * UIProcess/WebLoaderClient.cpp:
191         (WebKit::WebLoaderClient::didChangeBackForwardList):
192         * UIProcess/WebLoaderClient.h:
193         (WebLoaderClient):
194         * UIProcess/WebMediaCacheManagerProxy.cpp:
195         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
196         * UIProcess/WebMediaCacheManagerProxy.h:
197         (WebMediaCacheManagerProxy):
198         * UIProcess/WebPageContextMenuClient.cpp:
199         (WebKit::WebPageContextMenuClient::showContextMenu):
200         * UIProcess/WebPageProxy.cpp:
201         (ExceededDatabaseQuotaRecords):
202         (WebKit::WebPageProxy::relatedPages):
203         (WebKit::WebPageProxy::didChangeBackForwardList):
204         (WebKit::WebPageProxy::handleWheelEvent):
205         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
206         (WebKit::WebPageProxy::findStringMatches):
207         (WebKit::WebPageProxy::willSubmitForm):
208         (WebKit::WebPageProxy::pluginInformationDictionary):
209         (WebKit::WebPageProxy::didFindStringMatches):
210         (WebKit::WebPageProxy::didReceiveEvent):
211         * UIProcess/WebPageProxy.h:
212         (WebPageProxy):
213         * UIProcess/WebPageProxy.messages.in:
214         * UIProcess/WebProcessProxy.cpp:
215         (WebKit::WebProcessProxy::disconnect):
216         (WebKit::WebProcessProxy::didClose):
217         (WebKit::WebProcessProxy::didBecomeUnresponsive):
218         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
219         (WebKit::WebProcessProxy::didBecomeResponsive):
220         (WebKit::WebProcessProxy::disconnectFramesFromPage):
221         (WebKit::WebProcessProxy::frameCountInPage):
222         * UIProcess/WebProcessProxy.h:
223         (WebProcessProxy):
224         * UIProcess/WebResourceCacheManagerProxy.h:
225         (WebResourceCacheManagerProxy):
226         * UIProcess/mac/WebContextMenuProxyMac.mm:
227         (WebKit::populateNSMenu):
228         (WebKit::nsMenuItemVector):
229         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
230         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
231         * WebProcess/Geolocation/WebGeolocationManager.cpp:
232         (WebKit::WebGeolocationManager::didChangePosition):
233         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
234         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
235         (WebIconDatabaseProxy):
236         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
237         * WebProcess/InjectedBundle/InjectedBundle.cpp:
238         (WebKit::InjectedBundle::originsWithApplicationCache):
239         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
240         (WebKit::InjectedBundleBackForwardListItem::children):
241         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
242         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
243         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
244         (InjectedBundlePageEditorClient):
245         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
246         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
247         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
248         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
249         (InjectedBundlePageFormClient):
250         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
251         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
252         * WebProcess/Network/WebResourceLoadScheduler.cpp:
253         (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
254         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
255         * WebProcess/Network/WebResourceLoadScheduler.h:
256         (WebResourceLoadScheduler):
257         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
258         (NotificationPermissionRequestManager):
259         * WebProcess/Notifications/WebNotificationManager.h:
260         (WebNotificationManager):
261         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
262         (WebKit::NPRuntimeObjectMap::invalidate):
263         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
264         (NPRuntimeObjectMap):
265         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
266         (WebKit::NetscapePlugin::stopAllStreams):
267         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
268         (NetscapePlugin):
269         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
270         (NetscapePluginStream):
271         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
272         (getAllScriptsInPDFDocument):
273         (WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
274         * WebProcess/Plugins/PluginProcessConnectionManager.h:
275         (PluginProcessConnectionManager):
276         * WebProcess/Plugins/PluginView.cpp:
277         (WebKit::PluginView::cancelAllStreams):
278         * WebProcess/Plugins/PluginView.h:
279         (PluginView):
280         * WebProcess/Storage/StorageAreaMap.cpp:
281         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
282         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
283         * WebProcess/Storage/StorageNamespaceImpl.cpp:
284         (WebKit::StorageNamespaceImpl::storageArea):
285         * WebProcess/Storage/StorageNamespaceImpl.h:
286         (StorageNamespaceImpl):
287         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
288         (WebKit::keyValueStorageOriginIdentifiers):
289         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
290         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
291         (WebKit::WebDatabaseManager::getDatabaseOrigins):
292         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
293         (WebKit::WebEditorClient::getClientPasteboardDataForRange):
294         * WebProcess/WebCoreSupport/WebEditorClient.h:
295         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
296         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
297         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
298         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
299         * WebProcess/WebPage/EventDispatcher.h:
300         (EventDispatcher):
301         * WebProcess/WebPage/FindController.cpp:
302         (WebKit::FindController::findStringMatches):
303         * WebProcess/WebPage/FindController.h:
304         (FindController):
305         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
306         (WebKit):
307         * WebProcess/WebPage/WebFrame.cpp:
308         (WebKit::WebFrame::childFrames):
309         * WebProcess/WebPage/WebPage.cpp:
310         (WebKit::WebPage::trackedRepaintRects):
311         * WebProcess/WebPage/WebPage.h:
312         (WebKit):
313         (WebPage):
314         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
315         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
316         (TiledCoreAnimationDrawingArea):
317         * WebProcess/WebProcess.cpp:
318         (WebKit::WebProcess::visitedLinkStateChanged):
319         (WebKit::WebProcess::allVisitedLinkStateChanged):
320         (WebKit::WebProcess::focusedWebPage):
321         (WebKit::WebProcess::createWebPage):
322         (WebKit::WebProcess::didClose):
323         (WebKit::WebProcess::webPageGroup):
324         (WebKit::addCaseFoldedCharacters):
325         (WebKit::getWebCoreMemoryCacheStatistics):
326         (WebKit::WebProcess::setTextCheckerState):
327         * WebProcess/WebProcess.h:
328         (WebProcess):
329
330 2013-05-09  Anders Carlsson  <andersca@apple.com>
331
332         Implement WebPlatformStrategies::transientLocalStorageNamespace
333         https://bugs.webkit.org/show_bug.cgi?id=115876
334         <rdar://problem/13852871>
335
336         Reviewed by Beth Dakin.
337
338         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
339         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
340         Return a session storage namespace for a random page when UI process storage is enabled,
341         otherwise call the base class implementation.
342
343 2013-05-09  Anders Carlsson  <andersca@apple.com>
344
345         Use explicit qualifiers for names in the std:: namespace
346         https://bugs.webkit.org/show_bug.cgi?id=115868
347
348         Reviewed by Andreas Kling.
349
350         * Shared/mac/ArgumentCodersMac.mm:
351         (CoreIPC::encode):
352         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
353         (WKPluginSiteDataManagerClearAllSiteData):
354         * UIProcess/Plugins/PluginInfoStore.cpp:
355         (WebKit::PluginInfoStore::findPluginForExtension):
356         * UIProcess/WebFrameProxy.cpp:
357         * UIProcess/WebProcessProxy.cpp:
358         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
359         (WebKit::parsePostBuffer):
360         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
361         (WebKit::NetscapePlugin::loadURL):
362         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
363         (WebKit::NetscapePluginStream::deliverDataToPlugin):
364         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
365         * WebProcess/WebPage/DrawingAreaImpl.cpp:
366         * WebProcess/WebPage/FindController.cpp:
367         (WebKit::FindController::countStringMatches):
368         (WebKit::FindController::updateFindUIAfterPageScroll):
369         * WebProcess/WebPage/WebPage.cpp:
370         * WebProcess/WebPage/mac/WebPageMac.mm:
371         (WebKit::drawPDFPage):
372         * WebProcess/mac/WebProcessMac.mm:
373
374 2013-05-09  Max Feil  <mfeil@rim.com>
375
376         shouldUsePluginDocument() needs to be respected when a document is created
377         https://bugs.webkit.org/show_bug.cgi?id=110308
378
379         Reviewed by Rob Buis.
380
381         Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
382         for clarity.
383
384         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
385         (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
386         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
387         (WebFrameLoaderClient):
388
389 2013-05-09  Timothy Hatcher  <timothy@apple.com>
390
391         Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.
392
393         https://webkit.org/b/115832
394         rdar://problem/13605661
395
396         Reviewed by Benjamin Poulain.
397
398         * UIProcess/mac/WebInspectorProxyMac.mm:
399         (WebKit::WebInspectorProxy::platformBringToFront):
400         If the Web Inspector is no longer in the same window as the inspected view,
401         then we need to reopen the Inspector to get it attached to the right window.
402
403 2013-05-08  Anders Carlsson  <andersca@apple.com>
404
405         Fix a typo in a comment.
406
407         Rubber-stamped by Darin Adler.
408
409         * WebProcess/WebProcess.cpp:
410         (WebKit::WebProcess::initializeConnection):
411
412 2013-05-08  Anders Carlsson  <andersca@apple.com>
413
414         Remove bogus StorageAreaMap assertions
415         https://bugs.webkit.org/show_bug.cgi?id=115838
416
417         Reviewed by Sam Weinig.
418
419         It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.
420
421         * WebProcess/Storage/StorageAreaMap.cpp:
422         (WebKit::StorageAreaMap::didGetValues):
423         (WebKit::StorageAreaMap::didClear):
424
425 2013-05-08  Anders Carlsson  <andersca@apple.com>
426
427         Handle incoming clear operations
428         https://bugs.webkit.org/show_bug.cgi?id=115829
429
430         Reviewed by Sam Weinig.
431
432         Handle clear by building up a new storage map with our pending changes.
433
434         * WebProcess/Storage/StorageAreaMap.cpp:
435         (WebKit::StorageAreaMap::applyChange):
436
437 2013-05-08  Anders Carlsson  <andersca@apple.com>
438
439         Don't apply changes while we're clearing the database
440         https://bugs.webkit.org/show_bug.cgi?id=115826
441
442         Reviewed by Darin Adler.
443
444         * UIProcess/Storage/LocalStorageDatabase.cpp:
445         (WebKit::LocalStorageDatabase::openDatabase):
446         Only call didOpenDatabaseWithOrigin if we actually did open the database.
447
448         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
449         Create the database if needed.
450
451         * UIProcess/Storage/StorageManager.cpp:
452         (WebKit::StorageManager::getValues):
453         Send back a DidGetValues message.
454
455         * WebProcess/Storage/StorageAreaMap.cpp:
456         (WebKit::StorageAreaMap::StorageAreaMap):
457         Initialize m_hasPendingClear.
458
459         (WebKit::StorageAreaMap::clear):
460         Set m_hasPendingClear to true.
461
462         (WebKit::StorageAreaMap::resetValues):
463         Set m_hasPendingClear back to false.
464
465         (WebKit::StorageAreaMap::loadValuesIfNeeded):
466         Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.
467
468         (WebKit::StorageAreaMap::didGetValues):
469         Set m_hasPendingClear back to false.
470
471         (WebKit::StorageAreaMap::didClear):
472         Set m_hasPendingClear back to false.
473
474         (WebKit::StorageAreaMap::applyChange):
475         Don't apply the change if m_hasPendingClear is true.
476
477         * WebProcess/Storage/StorageAreaMap.messages.in:
478         Add DidGetValues message.
479
480 2013-05-08  Andy Estes  <aestes@apple.com>
481
482         [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
483         https://bugs.webkit.org/show_bug.cgi?id=115790
484
485         Reviewed by Alexey Proskuryakov.
486
487         NSMutableSet does not support adding or removing nil objects, and
488         WTF::HashSet does not support adding, removing, or checking for null
489         WTF::Strings.
490
491         For the NSMutableSet case, make sure that we don't try to add or remove
492         nil NSStrings.
493
494         For the WTF::HashSet case, NSURL will return a nil NSString if we ask
495         it for its scheme when it is invalid, which we will convert to a null
496         WTF::String. Don't try to check if our HashSet of registered schemes
497         contains a null String.
498
499         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
500         (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
501         isn't null. We reject null schemes at the WKBrowsingContextController level.
502         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
503         (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
504         * UIProcess/API/mac/WKBrowsingContextController.mm:
505         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
506         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.
507
508 2013-05-08  Anders Carlsson  <andersca@apple.com>
509
510         Apply remote changes to storage maps locally
511         https://bugs.webkit.org/show_bug.cgi?id=115825
512
513         Reviewed by Beth Dakin.
514
515         * WebProcess/Storage/StorageAreaMap.cpp:
516         (WebKit::StorageAreaMap::resetValues):
517         Clear the pending values map.
518
519         (WebKit::StorageAreaMap::didSetItem):
520         If we failed to set the item, forget everything we know about this storage map.
521         Otherwise, remove the pending item.
522
523         (WebKit::StorageAreaMap::didRemoveItem):
524         Remove the pending item.
525
526         (WebKit::StorageAreaMap::shouldApplyChangeForKey):
527         Helper function that returns whether a change for a given key should be applied.
528
529         (WebKit::StorageAreaMap::applyChange):
530         Apply the change. Currently only adds and removes are handled.
531
532         (WebKit::StorageAreaMap::dispatchStorageEvent):
533         Apply the change locally as well if needed.
534
535         * WebProcess/Storage/StorageAreaMap.h:
536
537 2013-05-08  Anders Carlsson  <andersca@apple.com>
538
539         Assert at compile time that we don't pass Objective-C object pointers to adoptCF
540         https://bugs.webkit.org/show_bug.cgi?id=115823
541
542         Reviewed by Geoffrey Garen.
543
544         Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
545         but this will do for now.
546         
547         * Shared/mac/ArgumentCodersMac.mm:
548         (CoreIPC::decode):
549
550 2013-05-08  Sam Weinig  <sam@webkit.org>
551
552         Add SPI to determine if a plugin is sandboxed
553         https://bugs.webkit.org/show_bug.cgi?id=115810
554
555         Reviewed by Anders Carlsson.
556
557         * PluginProcess/mac/PluginProcessMac.mm:
558         (WebKit::PluginProcess::initializeSandbox):
559         * Shared/Plugins/mac/PluginSandboxProfile.h: Added.
560         * Shared/Plugins/mac/PluginSandboxProfile.mm: Added.
561         (WebKit::pluginSandboxProfileDefaultDirectory):
562         (WebKit::pluginSandboxProfileDirectories):
563         (WebKit::pluginSandboxProfileName):
564         (WebKit::pluginSandboxCommonProfile):
565         (WebKit::pluginSandboxProfileForDirectory):
566         (WebKit::pluginSandboxProfile):
567         (WebKit::pluginHasSandboxProfileForDirectory):
568         (WebKit::pluginHasSandboxProfile):
569         Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function
570         which uses the newly refactored code.
571
572         * UIProcess/API/C/mac/WKContextPrivateMac.h:
573         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
574         (WKPlugInInfoIsSandboxedKey):
575         (createInfoDictionary):
576         Add WKPlugInInfoIsSandboxedKey.
577
578         * WebKit2.xcodeproj/project.pbxproj:
579         Add new files.
580
581 2013-05-08  Anders Carlsson  <andersca@apple.com>
582
583         Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction)
584         https://bugs.webkit.org/show_bug.cgi?id=115814
585         <rdar://problem/12331258>
586
587         Reviewed by Andreas Kling.
588
589         To ensure that any asynchronous messages are delivered to the UI process before
590         synchronous messages (except when doing so would lead to a deadlock), Call
591         setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections.
592
593         * WebProcess/WebProcess.cpp:
594         (WebKit::WebProcess::initializeConnection):
595
596 2013-05-08  Tim Horton  <timothy_horton@apple.com>
597
598         Coalesce WKView visibleRect changes
599         https://bugs.webkit.org/show_bug.cgi?id=115792
600         <rdar://problem/13776842>
601
602         Reviewed by Simon Fraser.
603
604         The system can call renewGState much more often than we actually want
605         to update the WebProcess' notion of the exposed rect. Most importantly,
606         within an autolayout pass it is called many times, and often sees
607         [WKView visibleRect] be an intermediate value which will never be
608         flushed to the screen. We only care about the final value, so we should
609         wait until AppKit has finished - with a zero-delay timer - to inform the
610         WebProcess of exposed rect changes.
611
612         * UIProcess/WebPageProxy.cpp:
613         (WebKit::WebPageProxy::WebPageProxy):
614         Add exposedRectChangedTimer.
615         (WebKit::WebPageProxy::close):
616         Cancel exposedRectChangedTimer when tearing down the WebPageProxy.
617         * UIProcess/WebPageProxy.h:
618         (WebPageProxy):
619         Add exposedRectChangedTimerFired, the timer itself, and two rects:
620         the most recent exposed rect from the WKView, and the last one we actually
621         sent across to the WebProcess.
622         * UIProcess/mac/WebPageProxyMac.mm:
623         (WebKit::WebPageProxy::viewExposedRectChanged):
624         Instead of immediately sending exposed rect changes to the WebProcess,
625         start a zero-delay timer to do so.
626         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
627         Once the zero-delay timer fires, send the new exposed rect to the WebProcess.
628
629 2013-05-08  Alexey Proskuryakov  <ap@apple.com>
630
631         <rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers
632         <rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices
633
634         Reviewed by Anders Carlsson.
635
636         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more
637         TextServices and NSInputManager directories.
638
639 2013-05-08  Anders Carlsson  <andersca@apple.com>
640
641         Remove BinarySemaphoreWin.cpp.
642
643         Rubber-stamped by Beth Dakin.
644
645         BinarySemaphoreWin has been moved to WTF, but the original was never removed.
646
647         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed.
648
649 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
650
651         [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
652         https://bugs.webkit.org/show_bug.cgi?id=115716
653
654         Reviewed by Andreas Kling.
655
656         WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
657         as such by the WebProcess. This removes the need for the m_networkInfoManager member
658         variable in the WebProcess class and brings the WebNetworkInfoManager in line with
659         other manager classes of which instances are controlled by the WebProcess class.
660
661         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
662         (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
663         (WebKit):
664         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
665         (WebKit): Alphabetically reorder the two forwarding declarations.
666         (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
667         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
668         (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
669         (WebKit::WebNetworkInfoClient::metered): Ditto.
670         (WebKit::WebNetworkInfoClient::startUpdating): Ditto.
671         (WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
672         (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
673         * WebProcess/WebProcess.cpp:
674         (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
675         * WebProcess/WebProcess.h:
676         (WebProcess): Remove the m_networkInfoManager member variable and its getter method.
677
678 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
679
680         [WK2] Make the WebBatteryManager a supplement to the WebProcess
681         https://bugs.webkit.org/show_bug.cgi?id=115715
682
683         Reviewed by Andreas Kling.
684
685         WebBatteryManager should inherit from WebProcessSupplement and should be used as such
686         by the WebProcess. This removes the need for the m_batteryManager member variable in
687         the WebProcess class and brings the WebBatteryManager in line with other manager classes
688         of which instances are controlled by the WebProcess class.
689
690         * WebProcess/Battery/WebBatteryManager.cpp:
691         (WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
692         (WebKit):
693         * WebProcess/Battery/WebBatteryManager.h:
694         (WebBatteryManager): Inherit from the WebProcessSupplement interface.
695         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
696         (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
697         (WebKit::WebBatteryClient::stopUpdating): Ditto.
698         (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
699         * WebProcess/WebProcess.cpp:
700         (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
701         * WebProcess/WebProcess.h:
702         (WebProcess): Remove the m_batteryManager member variable and its getter method.
703
704 2013-05-06  Darin Adler  <darin@apple.com>
705
706         Use adoptCF and adoptNS in more places
707         https://bugs.webkit.org/show_bug.cgi?id=115657
708
709         Reviewed by Sam Weinig.
710
711         * Shared/Downloads/cfnet/DownloadCFNet.cpp:
712         (WebKit::Download::useCredential):
713         (WebKit::Download::start):
714         (WebKit::Download::startWithHandle):
715         (WebKit::Download::cancel):
716         (WebKit::Download::didDecideDestination):
717         Use adoptCF and adoptNS.
718
719 2013-05-06  Sam Weinig  <sam@webkit.org>
720
721         Add SPI to get an array of all the installed plug-ins
722         https://bugs.webkit.org/show_bug.cgi?id=115688
723
724         Reviewed by Anders Carlsson.
725
726         * UIProcess/API/C/mac/WKContextPrivateMac.h:
727         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
728         (createInfoDictionary):
729         Extract creation of info dictionary into helper.
730         (WKContextCopyPlugInInfoForBundleIdentifier):
731         Modified to use the new helper.
732         (WKContextGetInfoForInstalledPlugIns):
733         Added.
734
735 2013-05-07  Anders Carlsson  <andersca@apple.com>
736
737         Clean up KeyframeValueList and related classes
738         https://bugs.webkit.org/show_bug.cgi?id=115738
739
740         Reviewed by Simon Fraser.
741
742         Update for WebCore changes.
743
744         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
745         (CoreIPC::::decode):
746
747 2013-05-07  Anders Carlsson  <andersca@apple.com>
748
749         Add and remove databases and origins from the database tracker
750         https://bugs.webkit.org/show_bug.cgi?id=115752
751
752         Reviewed by Andreas Kling.
753
754         * UIProcess/Storage/LocalStorageDatabase.cpp:
755         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
756         Rename m_databaseFilename to m_databasePath.
757
758         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
759         Rename m_databaseFilename to m_databasePath.
760
761         * UIProcess/Storage/LocalStorageDatabase.h:
762         Rename m_databaseFilename to m_databasePath.
763
764         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
765         (WebKit::LocalStorageDatabaseTracker::databasePath):
766         Rename databaseFilename to databasePath.
767
768         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
769         Call addDatabaseWithOriginIdentifier.
770
771         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
772         Call removeDatabaseWithOriginIdentifier.
773
774         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
775         Call databasePath instead of databaseFile.
776
777         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
778         Bail if the database is already open.
779
780         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
781         Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.
782
783         (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
784         Add the database to the Origins table.
785
786         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
787         remove the database from the Origins table and delete it.
788
789         (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
790         Helper function that looks up a database path given its identifier.
791         
792         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
793         Rename databaseFile to databasePath.
794
795 2013-05-07  Anders Carlsson  <andersca@apple.com>
796
797         The storage database tracker should know when databases come and go
798         https://bugs.webkit.org/show_bug.cgi?id=115748
799
800         Reviewed by Andreas Kling.
801
802         * UIProcess/Storage/LocalStorageDatabase.cpp:
803         (WebKit::LocalStorageDatabase::openDatabase):
804         If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.
805
806         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
807         Remove a FIXME; we run all storage related things on the same thread.
808
809         (WebKit::LocalStorageDatabase::close):
810         Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.
811
812         (WebKit::LocalStorageDatabase::databaseIsEmpty):
813         Helper function for determining whether a database is empty.
814         
815         * UIProcess/Storage/LocalStorageDatabase.h:
816         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
817         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
818         Add ".localstorage" to the filename.
819
820         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
821         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
822         Add empty stubs.
823
824 2013-05-07  Brady Eidson  <beidson@apple.com>
825
826         Add JoinExistingSession to the Networking XPC.
827         <rdar://problem/12902288> and https://bugs.webkit.org/show_bug.cgi?id=114991
828
829         Reviewed by Sam Weinig.
830
831         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
832         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
833
834 2013-05-07  Anders Carlsson  <andersca@apple.com>
835
836         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
837         https://bugs.webkit.org/show_bug.cgi?id=115711
838
839         Reviewed by Andreas Kling.
840
841         Handle setting the local storage directory more than once.
842
843         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
844         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
845         Close the database (if necessary) and clear the origins map before importing the origin identifiers.
846
847 2013-05-07  Antoine Quint  <graouts@apple.com>
848
849         Re-establish autostart timeout extension on user interaction
850         https://bugs.webkit.org/show_bug.cgi?id=113232
851
852         Change WebProcess::pluginDidReceiveUserInteraction to use a tuple of
853         (pluginOrigin, pageOrigin, mimeType) arguments like the other similar
854         WebProcess methods and gather these arguments from the PlugInView's
855         plug-in element.
856
857         Reviewed by Dean Jackson.
858
859         * WebProcess/Plugins/PluginView.cpp:
860         (WebKit::PluginView::pluginDidReceiveUserInteraction):
861         Cast the m_pluginElement to a HTMLPlugInImageElement so we can obtain the
862         tuple of (pluginOrigin, pageOrigin, mimeType) to pass to pluginDidReceiveUserInteraction().
863
864         * WebProcess/WebProcess.cpp:
865         (WebKit::WebProcess::plugInDidReceiveUserInteraction):
866         * WebProcess/WebProcess.h:
867         (WebProcess):
868         Update method signature to a tuple of (pluginOrigin, pageOrigin, mimeType)
869         and obtain the plug-in origin hash from that.
870
871 2013-05-07  Anders Carlsson  <andersca@apple.com>
872
873         Each local storage database should know its origin
874         https://bugs.webkit.org/show_bug.cgi?id=115737
875
876         Reviewed by Andreas Kling.
877
878         Store the security origin in a member variable. It'll be used to communicate database state changes to the tracker.
879
880         * UIProcess/Storage/LocalStorageDatabase.cpp:
881         (WebKit::LocalStorageDatabase::create):
882         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
883         * UIProcess/Storage/LocalStorageDatabase.h:
884         (LocalStorageDatabase):
885
886 2013-05-07  Brady Eidson  <beidson@apple.com>
887
888         Remove some unnecessary soft linking in NetworkProcess. (Take 2)
889         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
890
891         Reviewed by Dean Jackson and owned by Andreas Kling.
892
893         As a followup to r149651, include the private headers conditionally.
894         Also, fix a bug introduced with r149651 (bool vs CFBooleanRef).
895
896         * NetworkProcess/mac/DiskCacheMonitor.mm:
897         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
898         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
899
900 2013-05-07  Jinwoo Song  <jinwoo7.song@samsung.com>
901
902         [EFL][WK2] Add ewk APIs for setting and getting user agent
903         https://bugs.webkit.org/show_bug.cgi?id=114429
904
905         Reviewed by Andreas Kling.
906
907         Provide ewk_view_user_agent_get/set APIs which wraps WK APIs.
908
909         * UIProcess/API/efl/EwkView.cpp:
910         (EwkView::EwkView):
911         (EwkView::setUserAgent):
912         * UIProcess/API/efl/EwkView.h:
913         (EwkView::userAgent):
914         (EwkView):
915         * UIProcess/API/efl/ewk_view.cpp:
916         (ewk_view_user_agent_get):
917         (ewk_view_user_agent_set):
918         * UIProcess/API/efl/ewk_view.h:
919         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
920         (TEST_F):
921
922 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
923
924         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
925         https://bugs.webkit.org/show_bug.cgi?id=115646
926
927         Reviewed by Darin Adler.
928
929         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
930         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
931         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
932         (WebKit::NetworkResourceLoadScheduler::hostForURL):
933         * Shared/ImmutableDictionary.h:
934         (WebKit::ImmutableDictionary::get):
935         * UIProcess/Storage/StorageManager.cpp:
936         (WebKit::StorageManager::createSessionStorageMap):
937         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
938         (WebKit::StorageManager::findStorageArea):
939         * UIProcess/WebContext.h:
940         (WebKit::WebContext::supplement):
941         * UIProcess/WebProcessProxy.cpp:
942         (WebKit::WebProcessProxy::webBackForwardItem):
943         (WebKit::WebProcessProxy::webFrame):
944         * UIProcess/efl/DownloadManagerEfl.cpp:
945         (WebKit::DownloadManagerEfl::ewkDownloadJob):
946         * WebProcess/Network/WebResourceLoadScheduler.h:
947         (WebKit::WebResourceLoadScheduler::webResourceLoaderForIdentifier):
948         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
949         (WebKit::NetscapePlugin::streamFromID):
950         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
951         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
952         * WebProcess/Plugins/PluginView.cpp:
953         (WebKit::PluginView::cancelStreamLoad):
954         * WebProcess/WebPage/EventDispatcher.cpp:
955         (WebKit::EventDispatcher::wheelEvent):
956         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
957         (WebKit::WebBackForwardListProxy::itemForID):
958         (WebKit::WebBackForwardListProxy::itemAtIndex):
959         * WebProcess/WebPage/WebPage.cpp:
960         (WebKit::WebPage::webUndoStep):
961         (WebKit::WebPage::didFinishCheckingText):
962         (WebKit::WebPage::didCancelCheckingText):
963         * WebProcess/WebProcess.cpp:
964         (WebKit::WebProcess::webPage):
965         (WebKit::WebProcess::webPageGroup):
966             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
967
968 2013-05-06  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
969
970         [Qt] Unreviewed buildfix after r149637.
971
972         * Target.pri:
973
974 2013-05-06  Ryosuke Niwa  <rniwa@webkit.org>
975
976         REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
977         https://bugs.webkit.org/show_bug.cgi?id=115711    
978
979         Rubber-stamped by Anders Carlsson.
980
981         Temporarily removed the assertion. Andres is going to investigate it tomorrow.
982
983         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
984         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
985
986 2013-05-06  Darin Adler  <darin@apple.com>
987
988         Use OwnPtr instead of deleteAllValues in KeyframeValueList
989         https://bugs.webkit.org/show_bug.cgi?id=115652
990
991         Reviewed by Simon Fraser.
992
993         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
994         (CoreIPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Added adoptPtr
995         next to new when calling KeyframeValueList::insert.
996
997 2013-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
998
999         Unreviewed, build fix on EFL port
1000
1001         * CMakeLists.txt: Add LocalStorageDatabaseTracker.cpp
1002
1003 2013-05-06  Philippe Normand  <pnormand@igalia.com>
1004
1005         Unreviewed, GTK build fix after r149637.
1006
1007         * GNUmakefile.list.am: Add LocalStorageDatabaseTracker sources to
1008         the build.
1009
1010 2013-05-06  Brady Eidson  <beidson@apple.com>
1011
1012         Remove some unnecessary soft linking in NetworkProcess.
1013         <rdar://problem/13821779> and https://bugs.webkit.org/show_bug.cgi?id=115683
1014
1015         Reviewed by Sam Weinig.
1016
1017         Replace some unneeded soft linking with forward declarations.
1018
1019         * NetworkProcess/mac/DiskCacheMonitor.mm:
1020         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
1021         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1022         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse):
1023         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
1024
1025 2013-05-06  Anders Carlsson  <andersca@apple.com>
1026
1027         More work on LocalStorageDatabaseTracker
1028         https://bugs.webkit.org/show_bug.cgi?id=115680
1029
1030         Reviewed by Andreas Kling.
1031
1032         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1033         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
1034         Call the new databaseFilename that takes a string.
1035
1036         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
1037         Assert that we don't call this more than once. Dispatch a call to import origin identifiers.
1038
1039         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
1040         New helper function that returns the tracker database path.
1041
1042         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
1043         Open the database and create the Origins table if needed.
1044
1045         (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
1046         Open the database and import the origin identifiers from it, then synchronize it with whatever files are on disk.
1047
1048         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
1049         Bring the tracker database up to date from the database files on disk.
1050
1051         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1052         (LocalStorageDatabaseTracker):
1053
1054 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
1055
1056         <rdar://problem/13479806> [Mac] Pass information about open pages to LaunchServices
1057         https://bugs.webkit.org/show_bug.cgi?id=115665
1058
1059         Reviewed by Darin Adler.
1060
1061         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): Moved repeated
1062         check for frame->isMainFrame() to the top, matching oter similar functions.
1063         Call updateActivePages().
1064
1065         * WebProcess/WebProcess.cpp:
1066         (WebKit::WebProcess::networkProcessConnectionClosed): Removed an obsolete FIXME.
1067         (WebKit::WebProcess::updateActivePages): Empty implementation for platforms
1068         that don't need to do anything here.
1069
1070         * WebProcess/WebProcess.h: Added updateActivePages().
1071
1072         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
1073         Collect user visible origins of pages in the process and pass them to LS.
1074
1075 2013-05-06  Mark Rowe  <mrowe@apple.com>
1076
1077         <rdar://problem/13775921> Switch off a deprecated API.
1078
1079         Reviewed by Oliver Hunt.
1080
1081         * Shared/mac/ChildProcessMac.mm:
1082         (WebKit::ChildProcess::setProcessSuppressionEnabled): When disabling process suppression,
1083         begin an activity that doesn't disable idle sleep, sudden termination or automatic termination.
1084         When enabling process suppression, end the activity.
1085
1086 2013-05-06  Anders Carlsson  <andersca@apple.com>
1087
1088         Move local storage directory handling to LocalStorageDatabaseTracker
1089         https://bugs.webkit.org/show_bug.cgi?id=115676
1090
1091         Reviewed by Andreas Kling.
1092
1093         * UIProcess/Storage/LocalStorageDatabase.cpp:
1094         (WebKit::LocalStorageDatabase::create):
1095         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1096         * UIProcess/Storage/LocalStorageDatabase.h:
1097         (WebCore):
1098         (LocalStorageDatabase):
1099         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1100         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
1101         (WebKit):
1102         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
1103         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
1104         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1105         (WebCore):
1106         (LocalStorageDatabaseTracker):
1107         * UIProcess/Storage/StorageManager.cpp:
1108         (WebKit::StorageManager::StorageArea::StorageArea):
1109         (WebKit::StorageManager::setLocalStorageDirectory):
1110         * UIProcess/Storage/StorageManager.h:
1111         (StorageManager):
1112
1113 2013-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
1114
1115         [GTK] Add webkit_uri_scheme_request_finish_error
1116         https://bugs.webkit.org/show_bug.cgi?id=94316
1117
1118         Reviewed by Anders Carlsson.
1119
1120         This new method will allow to finish WebKitURISchemeRequest with a
1121         GError that will be passed to the WebKitWebView through the
1122         "load-failed" signal.
1123
1124         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1125         (webkit_uri_scheme_request_finish_error): Implement new method using
1126         WebSoupRequestManagerProxy::didFailURIRequest().
1127         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Add new method header.
1128         * UIProcess/API/gtk/WebKitWebContext.cpp: Include the usage of the new
1129         method in the code example at webkit_web_context_register_uri_scheme()
1130         documentation.
1131         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
1132         method.
1133         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
1134         (loadFailedCallback): Set m_error to monitor it from the tests.
1135         (LoadTrackingTest::loadURI): Clear m_error before each load.
1136         (LoadTrackingTest::loadHtml): Ditto.
1137         (LoadTrackingTest::loadPlainText): Ditto.
1138         (LoadTrackingTest::loadRequest): Ditto.
1139         (LoadTrackingTest::reload): Ditto.
1140         (LoadTrackingTest::goBack): Ditto.
1141         (LoadTrackingTest::goForward): Ditto.
1142         * UIProcess/API/gtk/tests/LoadTrackingTest.h: Add new member m_error.
1143         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
1144         (testWebContextURIScheme): Modify test to check the behavior of the new
1145         method.
1146         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
1147         (WebKit::WebSoupRequestManagerProxy::didFailURIRequest):
1148         (WebKit): Implement new method using
1149         WebSoupRequestManager::DidFailURIRequest().
1150         * UIProcess/soup/WebSoupRequestManagerProxy.h:
1151         (WebSoupRequestManagerProxy): Add new method header.
1152         * WebProcess/soup/WebSoupRequestManager.cpp:
1153         (WebKit):
1154         (WebKit::WebSoupRequestManager::didFailURIRequest): Implement new method
1155         setting the error and completing the request.
1156         * WebProcess/soup/WebSoupRequestManager.h:
1157         (WebSoupRequestManager): Add new method header.
1158         * WebProcess/soup/WebSoupRequestManager.messages.in: Add new method
1159         signature.
1160
1161 2013-05-06  Anders Carlsson  <andersca@apple.com>
1162
1163         Every LocalStorageDatabase should know about its tracker
1164         https://bugs.webkit.org/show_bug.cgi?id=115673
1165
1166         Reviewed by Andreas Kling.
1167
1168         * UIProcess/Storage/LocalStorageDatabase.cpp:
1169         (WebKit::LocalStorageDatabase::create):
1170         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1171         * UIProcess/Storage/LocalStorageDatabase.h:
1172         * UIProcess/Storage/StorageManager.cpp:
1173         (WebKit::StorageManager::StorageArea::StorageArea):
1174
1175 2013-05-06  Anders Carlsson  <andersca@apple.com>
1176
1177         Add LocalStorageDatabaseTracker class
1178         https://bugs.webkit.org/show_bug.cgi?id=115671
1179
1180         Reviewed by Andreas Kling.
1181
1182         Somewhat unsurprisingly, this class will be used for tracking local storage databases.
1183
1184         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp: Added.
1185         (WebKit::LocalStorageDatabaseTracker::create):
1186         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
1187         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
1188         * UIProcess/Storage/LocalStorageDatabaseTracker.h: Added.
1189         (LocalStorageDatabaseTracker):
1190         
1191         * UIProcess/Storage/StorageManager.cpp:
1192         (WebKit::StorageManager::StorageManager):
1193         Create a local storage database tracker.
1194
1195         * WebKit2.xcodeproj/project.pbxproj:
1196         Add new files.
1197
1198 2013-05-06  Anders Carlsson  <andersca@apple.com>
1199
1200         Handle closing the local storage database
1201         https://bugs.webkit.org/show_bug.cgi?id=115669
1202
1203         Reviewed by Beth Dakin.
1204
1205         * UIProcess/Storage/LocalStorageDatabase.cpp:
1206         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1207         Initialize m_isClosed.
1208     
1209         (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
1210         Assert that m_isClosed is false.
1211
1212         (WebKit::LocalStorageDatabase::close):
1213         Set m_isClosed to true and write any pending changes to disk.
1214
1215         (WebKit::LocalStorageDatabase::updateDatabase):
1216         Compute the changed items and pass them to updateDatabaseWithChangedItems.
1217
1218         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
1219         Split out the code that actually writes to the database from updateDatabase and into this function.
1220
1221         * UIProcess/Storage/LocalStorageDatabase.h:
1222         * UIProcess/Storage/StorageManager.cpp:
1223         (WebKit::StorageManager::StorageArea::~StorageArea):
1224         Call close().
1225
1226 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
1227
1228         [WK2] Make the WebNetworkInfoManagerProxy a supplement to the WebContext
1229         https://bugs.webkit.org/show_bug.cgi?id=115654
1230
1231         Reviewed by Andreas Kling.
1232
1233         Rather than holding a RefPtr to the WebNetworkInfoManagerProxy object in WebContext, change the WebNetworkInfoManagerProxy
1234         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
1235         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
1236
1237         * UIProcess/API/C/WKContext.cpp:
1238         (WKContextGetNetworkInfoManager): Retrieve the WebNetworkInfoManagerProxy object from the suppplements of the WebContext.
1239         * UIProcess/WebContext.cpp:
1240         (WebKit::WebContext::WebContext): Add the WebNetworkInfoManagerProxy object as a supplement instead of assigning it to
1241         the now-removed member variable.
1242         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
1243         supplements vector.
1244         (WebKit::WebContext::disconnectProcess): Ditto.
1245         * UIProcess/WebContext.h:
1246         (WebContext): Remove the WebNetworkInfoManagerProxy RefPtr member variable and its getter method.
1247         * UIProcess/WebNetworkInfoManagerProxy.cpp:
1248         (WebKit::WebNetworkInfoManagerProxy::supplementName): Specift the supplement's name.
1249         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy): Initialize as a WebContextSupplement.
1250         (WebKit::WebNetworkInfoManagerProxy::providerDidChangeNetworkInformation): Adjust to use the context() method instead of
1251         accessing the private m_context directly.
1252         (WebKit::WebNetworkInfoManagerProxy::contextDestroyed): Stop updating when invoked.
1253         (WebKit::WebNetworkInfoManagerProxy::processDidClose): Ditto.
1254         (WebKit::WebNetworkInfoManagerProxy::refWebContextSupplement): Call APIObject::ref.
1255         (WebKit::WebNetworkInfoManagerProxy::derefWebContextSupplement): Call APIObject::deref.
1256         * UIProcess/WebNetworkInfoManagerProxy.h:
1257         (WebNetworkInfoManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
1258
1259 2013-05-06  Alexey Proskuryakov  <ap@apple.com>
1260
1261         <rdar://problem/13479806> [Mac] Pass plug-in bundle ID to LaunchServices
1262         https://bugs.webkit.org/show_bug.cgi?id=115483
1263
1264         Reviewed by Darin Adler.
1265
1266         * PluginProcess/PluginProcess.h: Added m_pluginBundleIdentifier. We now need it
1267         in multiple places, so it's easier to pre-compute it.
1268
1269         * PluginProcess/mac/PluginProcessMac.mm:
1270         (WebKit::loadSandboxProfileForDirectory): Changed to use precomputed bundle ID.
1271         (WebKit::loadSandboxProfile): Ditto.
1272         (WebKit::PluginProcess::platformInitializeProcess): Pre-compute bundle ID.
1273         (WebKit::PluginProcess::initializeProcessName): Pass it to LaunchServices.
1274         (WebKit::PluginProcess::initializeSandbox): Pass precomputed bundle ID instead of
1275         a path.
1276
1277 2013-05-06  Anders Carlsson  <andersca@apple.com>
1278
1279         Handle removeItem and clear in LocalStorageDatabase
1280         https://bugs.webkit.org/show_bug.cgi?id=115664
1281
1282         Reviewed by Darin Adler.
1283
1284         * UIProcess/Storage/LocalStorageDatabase.cpp:
1285         (WebKit::LocalStorageDatabase::removeItem):
1286         Call itemDidChange with a null value, indicating that we want to remove this item.
1287
1288         (WebKit::LocalStorageDatabase::clear):
1289         Clear items, set m_shouldClearItems and schedule a database update.
1290
1291         (WebKit::LocalStorageDatabase::updateDatabase):
1292         If m_shouldClearItems is true, clear all items.
1293
1294         * UIProcess/Storage/StorageManager.cpp:
1295         (WebKit::StorageManager::StorageArea::removeItem):
1296         Call through to the local storage database.
1297
1298         (WebKit::StorageManager::StorageArea::clear):
1299         Ditto.
1300
1301 2013-05-06  Anders Carlsson  <andersca@apple.com>
1302
1303         Write storage changes to disk
1304         https://bugs.webkit.org/show_bug.cgi?id=115660
1305
1306         Reviewed by Andreas Kling.
1307
1308         * UIProcess/Storage/LocalStorageDatabase.cpp:
1309         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1310         Initialize new member variables.
1311
1312         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
1313         Disable database threading checks.
1314
1315         (WebKit::LocalStorageDatabase::importItems):
1316         Only import the items once.
1317
1318         (WebKit::LocalStorageDatabase::setItem):
1319         Call itemDidChange.
1320
1321         (WebKit::LocalStorageDatabase::itemDidChange):
1322         Record the change and schedule a database update.
1323
1324         (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
1325         Use WorkQueue::dispatchAfterDelay to schedule a datbase update.
1326
1327         (WebKit::LocalStorageDatabase::updateDatabase):
1328         Write changes to disk. If there are more than 100 pending items, only write the first 100 and then schedule
1329         another database update for the remaining items.
1330
1331         * UIProcess/Storage/LocalStorageDatabase.h:
1332         Add new member variables.
1333
1334         * UIProcess/Storage/StorageManager.cpp:
1335         (WebKit::StorageManager::StorageArea::setItem):
1336         Call LocalStorageDatabase::setItem.
1337
1338 2013-05-06  Zan Dobersek  <zdobersek@igalia.com>
1339
1340         [WK2] Make the WebBatteryManagerProxy a supplement to the WebContext
1341         https://bugs.webkit.org/show_bug.cgi?id=115625
1342
1343         Reviewed by Andreas Kling.
1344
1345         Rather than holding a RefPtr to the WebBatteryManagerProxy object in WebContext, change the WebBatteryManagerProxy
1346         to implement the WebContextSupplement interface and handle the object as such in WebContext, simplifying its
1347         construction and cleanup, removing the specific RefPtr member variable and its correlating getter method.
1348
1349         * UIProcess/API/C/WKContext.cpp:
1350         (WKContextGetBatteryManager): Retrieve the WebBatteryManagerProxy object from the supplements of the WebContext.
1351         * UIProcess/WebBatteryManagerProxy.cpp:
1352         (WebKit::WebBatteryManagerProxy::supplementName): Specify the supplement's name.
1353         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy): Initialize as a WebContextSupplementable.
1354         (WebKit::WebBatteryManagerProxy::providerDidChangeBatteryStatus): Adjust to use the context() method instead of accessing
1355         the private m_context directly.
1356         (WebKit::WebBatteryManagerProxy::providerUpdateBatteryStatus): Ditto.
1357         (WebKit::WebBatteryManagerProxy::contextDestroyed): Stop updating when invoked.
1358         (WebKit::WebBatteryManagerProxy::processDidClose): Ditto.
1359         (WebKit::WebBatteryManagerProxy::refWebContextSupplement): Call APIObject::ref.
1360         (WebKit::WebBatteryManagerProxy::derefWebContextSupplement): Call APIObject::deref.
1361         (WebKit::WebBatteryManagerProxy::startUpdating): Fire up the provider if not yet updating.
1362         (WebKit::WebBatteryManagerProxy::stopUpdating): Wind down the provider if updating.
1363         * UIProcess/WebBatteryManagerProxy.h:
1364         (WebBatteryManagerProxy): Inherit from WebContextSupplement, declare the newly-inherited methods.
1365         * UIProcess/WebContext.cpp:
1366         (WebKit::WebContext::WebContext): Add the WebBatteryManagerProxy object as a supplement instead of assigning it to
1367         the now-removed member variable.
1368         (WebKit::WebContext::~WebContext): No need for the specific cleanup, the equivalent is achieved when iterating through the
1369         supplements vector.
1370         (WebKit::WebContext::disconnectProcess): Ditto.
1371         * UIProcess/WebContext.h:
1372         (WebContext): Remove the WebBatteryManagerProxy RefPtr member variable and its getter method.
1373
1374 2013-05-06  Antoine Quint  <graouts@apple.com>
1375
1376         Manage the presentation of the snapshotted plug-in using JavaScript
1377         https://bugs.webkit.org/show_bug.cgi?id=115548
1378
1379         Reviewed by Dean Jackson.
1380
1381         Expose a new plugInExtraScript method to support the injection of
1382         a JS file from the chrome client to customize the rendering of a
1383         snapshotted plug-in's shadow tree. Additionally, it is expected
1384         the chrome client will want to provide localized strings taking
1385         into account the snapshotted plug-in's mime-type, so we're adding
1386         this as a parameter to both plugInStartLabelTitle and
1387         plugInStartLabelSubtitle methods.
1388
1389         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1390         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1391         (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle):
1392         (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle):
1393         (WebKit::InjectedBundlePageUIClient::plugInExtraScript):
1394         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1395         (InjectedBundlePageUIClient):
1396         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1397         (WebKit::WebChromeClient::plugInStartLabelTitle):
1398         (WebKit::WebChromeClient::plugInStartLabelSubtitle):
1399         (WebKit::WebChromeClient::plugInExtraScript):
1400         * WebProcess/WebCoreSupport/WebChromeClient.h:
1401         (WebChromeClient):
1402
1403 2013-05-05  Chris Fleizach  <cfleizach@apple.com>
1404
1405         WEB SPEECH: deny file-read-data /Library/Speech/Synthesizers
1406         https://bugs.webkit.org/show_bug.cgi?id=115621
1407
1408         Reviewed by Alexey Proskuryakov.
1409
1410         Allow access to the location where 3rd party speech synthesizers are stored.
1411
1412         * WebProcess/com.apple.WebProcess.sb.in:
1413
1414 2013-05-05  Tim Horton  <timothy_horton@apple.com>
1415
1416         [wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
1417         https://bugs.webkit.org/show_bug.cgi?id=115577
1418         <rdar://problem/13762583>
1419
1420         Reviewed by Darin Adler.
1421
1422         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1423         (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor):
1424         Invalidate the page overlay layers' device scale factor when
1425         TiledCoreAnimationDrawingArea is notified that it has changed.
1426
1427 2013-05-05  Anders Carlsson  <andersca@apple.com>
1428
1429         Remove the Vector::append overload that takes a Vector
1430         https://bugs.webkit.org/show_bug.cgi?id=115535
1431
1432         Reviewed by Andreas Kling.
1433
1434         Use Vector::appendVector instead.
1435
1436         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1437         (WebKit::NetworkBlobRegistry::registerBlobURL):
1438         * NetworkProcess/SchedulableLoader.cpp:
1439         (WebKit::SchedulableLoader::SchedulableLoader):
1440         * Platform/CoreIPC/Connection.cpp:
1441         (CoreIPC::Connection::SyncMessageState::dispatchMessages):
1442         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1443         (WebKit::PluginInfoStore::pluginsDirectories):
1444
1445 2013-05-04  Sam Weinig  <sam@webkit.org>
1446
1447         Fix * placement in a few functions as noticed by Mark Rowe.
1448
1449         Rubber-stamped by Dan Bernstein.
1450
1451         * WebProcess/WebPage/PageBanner.h:
1452         (PageBanner):
1453         * WebProcess/WebPage/mac/PageBannerMac.mm:
1454         (WebKit::PageBanner::create):
1455         (WebKit::PageBanner::PageBanner):
1456
1457 2013-05-04  Sam Weinig  <sam@webkit.org>
1458
1459         REGRESSION(r148312): Crash when calling WKPageClose(page) followed by WKPageTerminate(page)
1460         <rdar://problem/13702008>
1461         https://bugs.webkit.org/show_bug.cgi?id=115607
1462
1463         Reviewed by Benjamin Poulain.
1464
1465         API Test: WebKit2.CloseThenTerminate
1466
1467         * UIProcess/WebPageProxy.cpp:
1468         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1469         Don't try to reset the state if the page is closed, it won't work and its not worth it.
1470
1471 2013-05-04  Beth Dakin  <bdakin@apple.com>
1472
1473         https://bugs.webkit.org/show_bug.cgi?id=115574
1474         Crash using new WKBundlePageSetHeaderBanner() API to set a banner to null
1475
1476         Reviewed by Darin Adler.
1477
1478         Don't call addToPage() on a null banner.
1479         * WebProcess/WebPage/WebPage.cpp:
1480         (WebKit::WebPage::setHeaderPageBanner):
1481         (WebKit::WebPage::setFooterPageBanner):
1482
1483 2013-05-03  Alexey Proskuryakov  <ap@apple.com>
1484
1485         <rdar://problem/13806836> Tweak sandbox profile.
1486
1487         Reviewed by Dan Bernstein.
1488
1489         * WebProcess/com.apple.WebProcess.sb.in:
1490
1491 2013-05-03  Tim Horton  <timothy_horton@apple.com>
1492
1493         PDFPlugin: Changes being made to active annotation aren't saved when the PDF is exported
1494         https://bugs.webkit.org/show_bug.cgi?id=115544
1495         <rdar://problem/13801789>
1496
1497         Reviewed by Alexey Proskuryakov.
1498
1499         Commit changes to the active annotation (if there is one) before
1500         returning the live PDF data, so that said changes are represented
1501         in the exported or printed output.
1502
1503         * WebProcess/Plugins/PDF/PDFPlugin.h: Override liveData.
1504         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1505         (WebKit::PDFPlugin::liveData): Commit the active annotation if there is one.
1506         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1507         (SimplePDFPlugin): Make liveData virtual.
1508
1509 2013-05-03  Tim Horton  <timothy_horton@apple.com>
1510
1511         Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
1512         https://bugs.webkit.org/show_bug.cgi?id=115056
1513         <rdar://problem/13719543>
1514
1515         Reviewed by Simon Fraser.
1516
1517         Null-check m_page. In theory, we shouldn't get here, because we stop
1518         the timer at the only point where m_page is cleared, but crash logs say
1519         we're still crashing here.
1520
1521         * WebProcess/WebPage/WebPage.cpp:
1522         (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
1523
1524 2013-05-03  Tim Horton  <timothy_horton@apple.com>
1525
1526         Remove some "what" comments from FindController
1527         https://bugs.webkit.org/show_bug.cgi?id=115546
1528
1529         Reviewed by Andreas Kling.
1530
1531         * WebProcess/WebPage/FindController.cpp:
1532         (WebKit::FindController::countStringMatches):
1533         (WebKit::FindController::updateFindUIAfterPageScroll):
1534         (WebKit::FindController::willMoveToWebPage):
1535         (WebKit::FindController::mouseEvent):
1536         Remove or reword some comments.
1537
1538 2013-05-02  Andy Estes  <aestes@apple.com>
1539
1540         [WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
1541         https://bugs.webkit.org/show_bug.cgi?id=115539
1542
1543         Reviewed by Alexey Proskuryakov.
1544
1545         It turns out that calling NSURLProtocolClient methods from a different
1546         thread than the one running the NSURLConnection run loop is unsafe.
1547         Although I can't capture it reliably in a test case, doing so can
1548         sometimes result in a load timing out because the call to
1549         -[NSURLProtocolClient URLProtocolDidFinishLoading:] was ignored by
1550         NSURLConnection.
1551
1552         Fix this by dispatching these methods on the NSURLConnection resource
1553         load run loop. This matches where NSURLProtocolClient methods are
1554         dispatched by typical NSURLProtocol implementations, and in my testing
1555         this solves the timeout issue.
1556
1557         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Declare
1558         dispatchOnResourceLoaderRunLoop().
1559         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
1560         Declare +[NSURLConnection resourceLoaderRunLoop] on a category of
1561         NSURLConnection. Also include the header that declares it if it's present.
1562         (WebKit::CustomProtocolManager::didFailWithError): Call the
1563         NSURLProtocolClient method via dispatchOnResourceLoaderRunLoop().
1564         (WebKit::CustomProtocolManager::didLoadData): Ditto.
1565         (WebKit::CustomProtocolManager::didReceiveResponse): Ditto.
1566         (WebKit::CustomProtocolManager::didFinishLoading): Ditto.
1567         (WebKit::CustomProtocolManager::dispatchOnResourceLoaderRunLoop):
1568         Dispatch a block on the NSURLConnection resource loader run loop and
1569         then wake up the run loop.
1570
1571 2013-05-02  Brady Eidson  <beidson@apple.com>
1572
1573         REGRESSION (149389) Main resources converted to downloads are immediately cancelled.
1574         <rdar://problem/13795795> and https://bugs.webkit.org/show_bug.cgi?id=115530
1575
1576         Reviewed by Alexey Proskuryakov.
1577
1578         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1579         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Call didConvertHandleToDownload
1580           on the NetworkResourceLoader.
1581
1582         * NetworkProcess/NetworkResourceLoader.cpp:
1583         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1584         (WebKit::NetworkResourceLoader::didConvertHandleToDownload): Set m_handleConvertedToDownload to true.
1585         (WebKit::NetworkResourceLoader::abort): Only cancel the handle if m_handleConvertedToDownload is false.
1586         * NetworkProcess/NetworkResourceLoader.h:
1587
1588 2013-05-02  Alexey Proskuryakov  <ap@apple.com>
1589
1590         <rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
1591         https://bugs.webkit.org/show_bug.cgi?id=115520
1592
1593         Reviewed by Darin Adler.
1594
1595         * Shared/mac/WebCoreArgumentCodersMac.mm:
1596         (CoreIPC::::encodePlatformData):
1597         (CoreIPC::::decodePlatformData):
1598         Send the encoding fallback array over IPC, so that it's present when NetworkProcess does its loading.
1599
1600 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
1601
1602         REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
1603         broken when second argument is nil
1604         https://bugs.webkit.org/show_bug.cgi?id=115505
1605         <rdar://problem/13787297>
1606
1607         Reviewed by Darin Adler.
1608
1609         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
1610         to assumeReadAccessToBaseURL, as this is what it takes.
1611
1612 2013-05-01  Ryosuke Niwa  <rniwa@webkit.org>
1613
1614         [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
1615         https://bugs.webkit.org/show_bug.cgi?id=115463
1616
1617         Reviewed by Darin Adler.
1618
1619         Observe the default notification center and propagate the changes to TextCheckerState and
1620         to all WebProcesses when system preferences are updated.
1621
1622         * UIProcess/TextChecker.h:
1623         * UIProcess/WebContext.h:
1624         * UIProcess/mac/TextCheckerMac.mm:
1625         (WebKit::shouldAutomaticTextReplacementBeEnabled):
1626         (WebKit::shouldAutomaticSpellingCorrectionBeEnabled):
1627         (WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
1628         (WebKit::shouldAutomaticDashSubstitutionBeEnabled):
1629         (WebKit::initializeState):
1630         (WebKit::TextChecker::didChangeAutomaticTextReplacementEnabled):
1631         (WebKit::TextChecker::didChangeAutomaticSpellingCorrectionEnabled):
1632         (WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
1633         (WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):
1634         * UIProcess/mac/WebContextMac.mm:
1635         (WebKit::WebContext::registerNotificationObservers):
1636         (WebKit::WebContext::unregisterNotificationObservers):
1637
1638 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
1639
1640         [GTK] Fix build break after r149449
1641         https://bugs.webkit.org/show_bug.cgi?id=115500
1642
1643         Reviewed by Gustavo Noronha Silva.
1644
1645         Unreviewed GTK build fix
1646
1647         * GNUmakefile.list.am: Added LocalStorageDatabase.[cpp|h] to the list of
1648         sources.
1649
1650 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
1651
1652         [GTK] [WebKit2] Documentation for webkit_web_view_run_javascript should indicate what happens when JavaScript is disabled
1653         https://bugs.webkit.org/show_bug.cgi?id=115492
1654
1655         Reviewed by Xan Lopez.
1656
1657         * UIProcess/API/gtk/WebKitWebView.cpp: Clarify the documentation.
1658
1659 2013-05-01  Tim Horton  <timothy_horton@apple.com>
1660
1661         Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
1662         https://bugs.webkit.org/show_bug.cgi?id=115487
1663
1664         Reviewed by Darin Adler.
1665
1666         * UIProcess/WebContext.cpp:
1667         * UIProcess/WebContext.h:
1668         Remove pdfAndPostScriptMIMETypes.
1669
1670         * UIProcess/WebFrameProxy.cpp:
1671         (WebKit::WebFrameProxy::canShowMIMEType): Move PDF bits to WebPageProxy.
1672         (WebKit::WebFrameProxy::isDisplayingPDFDocument):
1673         Make use of WebCore's newfound knowledge of PDF and PostScript MIME types,
1674         so we don't have to duplicate it unnecessarily in WebKit2.
1675
1676         * UIProcess/WebPageProxy.cpp:
1677         (WebKit::WebPageProxy::canShowMIMEType):
1678         Add code which used to be in WebFrameProxy::canShowMIMEType, and adapt it
1679         to use WebCore's knowledge of PDF and PostScript MIME types.
1680
1681         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
1682         (WebKit::SimplePDFPlugin::pluginInfo):
1683         We previously supported the "text/pdf" MIME type for PDFViewController,
1684         so SimplePDFPlugin and PDFPlugin should support it as well.
1685
1686         * WebProcess/WebPage/WebPage.cpp:
1687         (WebKit::WebPage::createPlugin):
1688         Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType.
1689
1690         * WebProcess/WebPage/WebPage.h:
1691         (WebPage):
1692         Remove pdfAndPostScriptMIMETypes.
1693
1694         * WebProcess/WebPage/mac/WebPageMac.mm:
1695         (WebKit::WebPage::platformPreferencesDidChange):
1696         Adopt getPDFAndPostScriptMIMETypes instead of duplicating the list in WebKit2.
1697
1698 2013-05-01  Anders Carlsson  <andersca@apple.com>
1699
1700         Implement LocalStorageDatabase::importItems
1701         https://bugs.webkit.org/show_bug.cgi?id=115493
1702
1703         Reviewed by Andreas Kling.
1704
1705         Fetch items and insert them in the storage map.
1706         * UIProcess/Storage/LocalStorageDatabase.cpp:
1707         (WebKit::LocalStorageDatabase::importItems):
1708
1709 2013-05-01  Anders Carlsson  <andersca@apple.com>
1710
1711         Begin work on loading items from the local storage database
1712         https://bugs.webkit.org/show_bug.cgi?id=115489
1713
1714         Reviewed by Andreas Kling.
1715
1716         Some of the LocalStorageDatabase code is originally from WebCore,
1717         but has been simplified due to the fact that we don't need to load
1718         database data asynchronously since we're already running on a non-main thread.
1719
1720         * UIProcess/Storage/LocalStorageDatabase.cpp:
1721         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1722         (WebKit::LocalStorageDatabase::openDatabase):
1723         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
1724         (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):
1725         (WebKit::LocalStorageDatabase::importItems):
1726
1727         * UIProcess/Storage/LocalStorageDatabase.h:
1728         (WebKit::StorageManager::StorageArea::setItem):
1729         (WebKit::StorageManager::StorageArea::removeItem):
1730         (WebKit::StorageManager::StorageArea::clear):
1731         (WebKit::StorageManager::StorageArea::items):
1732         Call importItemsFromDatabase().
1733         
1734         (WebKit::StorageManager::StorageArea::importItemsFromDatabase):
1735         Ask the database to import the items.
1736
1737 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
1738
1739         [EFL] Unreviewed buildfix after r149449.
1740
1741         * CMakeLists.txt:
1742
1743 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1744
1745         [Qt] Unreviewed buildfix after r149449.
1746
1747         * Target.pri:
1748
1749 2013-05-01  Anders Carlsson  <andersca@apple.com>
1750
1751         Add LocalStorageDatabase class
1752         https://bugs.webkit.org/show_bug.cgi?id=115486
1753
1754         Reviewed by Sam Weinig.
1755
1756         The LocalStorageDatabase class will persist local storage data to disk.
1757
1758         * UIProcess/Storage/LocalStorageDatabase.cpp:
1759         * UIProcess/Storage/LocalStorageDatabase.h: Added.
1760
1761         * UIProcess/Storage/StorageManager.cpp:
1762         (StorageManager::StorageArea):
1763         (WebKit::StorageManager::LocalStorageNamespace::storageManager):
1764         Add getter.
1765
1766         (StorageManager::LocalStorageNamespace):
1767         (WebKit::StorageManager::StorageArea::StorageArea):
1768         If this is a local storage area, create a LocalStorageDatabase.
1769
1770         (WebKit::StorageManager::LocalStorageNamespace::databaseFilename):
1771         Helper function for getting the name of the database for the given origin.
1772
1773         * WebKit2.xcodeproj/project.pbxproj:
1774         Add new files.
1775
1776 2013-05-01  Alexey Proskuryakov  <ap@apple.com>
1777
1778         <rdar://problem/13781156> Launching NetworkProcess broken on some OS versions.
1779
1780         Reviewed by Anders Carlsson.
1781
1782         Adapt to LaunchServices changes.
1783
1784         * Shared/mac/ChildProcessMac.mm:
1785         (WebKit::ChildProcess::setApplicationIsDaemon):
1786
1787 2013-05-01  Martin Robinson  <mrobinson@igalia.com>
1788
1789         [GTK] [WebKit2] Add a setting to control whether or not accelerated 2D canvas is enabled
1790         https://bugs.webkit.org/show_bug.cgi?id=114394
1791
1792         Reviewed by Anders Carlsson.
1793
1794         Add a setting to control accelerated 2D canvas, which determines whether
1795         or not to consider rendering HTML canvas with hardware acceleration.
1796
1797         * UIProcess/API/gtk/WebKitSettings.cpp:
1798         (webKitSettingsSetProperty): Added support for enable-accelerated-2d-canvas property.
1799         (webKitSettingsGetProperty): Added support for enable-accelerated-2d-canvas property.
1800         (webkit_settings_class_init): Added support for enable-accelerated-2d-canvas property.
1801         (webkit_settings_get_enable_accelerated_2d_canvas): Added.
1802         (webkit_settings_set_enable_accelerated_2d_canvas): Added.
1803         * UIProcess/API/gtk/WebKitSettings.h: New methods.
1804         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new methods to the documentation.
1805         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1806         (testWebKitSettings): Added a simple test for the setting.
1807
1808 2013-04-30  Jer Noble  <jer.noble@apple.com>
1809
1810         Entering full screen mode shows desktop linen instead of WKView the first time.
1811         https://bugs.webkit.org/show_bug.cgi?id=115433
1812         <rdar://problem/13774540>
1813
1814         Reviewed by Eric Carlson.
1815
1816         For certain types of windows created by subclasses of WKView, the window in question fails to paint
1817         when created with a zero-size rect. Create the window with an initial size of the active screen frame
1818         as that is the likely destination size.
1819
1820         * UIProcess/API/mac/WKView.mm:
1821         (-[WKView createFullScreenWindow]):
1822
1823 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1824
1825         [Qt][Win] Fix build after r149416.
1826         https://bugs.webkit.org/show_bug.cgi?id=115474
1827
1828         Reviewed by Anders Carlsson.
1829
1830         * Platform/CoreIPC/Connection.h:
1831         (Connection):
1832         * Platform/CoreIPC/win/ConnectionWin.cpp:
1833         (CoreIPC::Connection::dispatchSentMessagesUntil):
1834
1835 2013-05-01  Sergio Villar Senin  <svillar@igalia.com>
1836
1837         Unreviewed GTK build fix after r149417.
1838
1839         * GNUmakefile.list.am: Added PageBanner.[cpp|h] to the list of
1840         sources.
1841
1842 2013-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
1843
1844         [EFL] Unreviewed buildfix after r149416 and r149417.
1845
1846         Unreviewed build fix.
1847
1848         * CMakeLists.txt:
1849
1850 2013-05-01  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1851
1852         [Qt] Unreviewed buildfix after r149416 and r149417.
1853
1854         * Target.pri:
1855
1856 2013-04-30  Dongwoo Joshua Im  <dw.im@samsung.com>
1857
1858         [EFL] Unreviewed, EFL build fix after r149416
1859         https://bugs.webkit.org/show_bug.cgi?id=115467
1860
1861         Unreviewed build fix.
1862
1863         * CMakeLists.txt: Remove non-existing file, BinarySemaphore.cpp, from the list.
1864
1865 2013-04-30  Simon Cooper  <scooper@apple.com>
1866
1867         ipc-posix-shm backwards compatibility 
1868         https://bugs.webkit.org/show_bug.cgi?id=115448
1869         <rdar://problem/13743037>
1870
1871         Reviewed by Alexey Proskuryakov.
1872
1873         Add compatibility for older ipc-posix-shm operations, but prefer the
1874         newer names when writing profiles.
1875
1876         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1877
1878 2013-04-30  Philippe Normand  <pnormand@igalia.com>
1879
1880         Unreviewed, GTK build fix after r149416.
1881
1882         * GNUmakefile.list.am: Remove references to non-existant
1883         BinarySemaphore module.
1884
1885 2013-04-28  Alexey Proskuryakov  <ap@apple.com>
1886
1887         <rdar://problem/13574729> Implement file path restrictions in WebKit Objective C API
1888         https://bugs.webkit.org/show_bug.cgi?id=115321
1889
1890         Reviewed by Darin Adler.
1891
1892         * UIProcess/API/C/WKPage.cpp:
1893         * UIProcess/API/C/WKPage.h: 
1894         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile):
1895         * UIProcess/WebPageProxy.h:
1896         Added and implemented a C API to load a file while only opening sandbox for
1897         a specific directory.
1898
1899         * UIProcess/API/mac/WKBrowsingContextController.h: Fixed a typo in a comment.
1900
1901         * UIProcess/API/mac/WKBrowsingContextController.mm:
1902         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
1903         Respect allowedDirectory argument. Updated the function to raise an exception for
1904         incorrect input, as decribed in header file.
1905
1906 2013-04-29  Sam Weinig  <sam@webkit.org>
1907
1908         Add API to allow WebKit2 banners to get mouse events
1909         https://bugs.webkit.org/show_bug.cgi?id=115395
1910
1911         Reviewed by Beth Dakin.
1912
1913         * Shared/API/c/WKBase.h:
1914         * Shared/APIObject.h:
1915         Add banner type.
1916
1917         * WebKit2.xcodeproj/project.pbxproj:
1918         Add files.
1919
1920         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1921         Add conversion.
1922
1923         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1924         (WKBundlePageSetTopOverhangImage):
1925         (WKBundlePageSetBottomOverhangImage):
1926         Fix parameter names to be consistent.
1927
1928         (WKBundlePageSetHeaderBanner):
1929         (WKBundlePageSetFooterBanner):
1930         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1931         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp: Added.
1932         (WKBundlePageBannerGetTypeID):
1933         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h: Added.
1934         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h: Added.
1935         * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Added.
1936         (PageBannerClientImpl):
1937         (PageBannerClientImpl::create):
1938         (PageBannerClientImpl::PageBannerClientImpl):
1939         (PageBannerClientImpl::pageBannerDestroyed):
1940         (PageBannerClientImpl::mouseEvent):
1941         (WKBundlePageBannerCreateBannerWithCALayer):
1942         (WKBundlePageBannerGetLayer):
1943         Add banner API.
1944
1945         * WebProcess/WebPage/PageBanner.h: Added.
1946         * WebProcess/WebPage/PageBanner.cpp: Added.
1947         (WebKit::PageBanner::~PageBanner):
1948         (WebKit::PageBanner::addToPage):
1949         (WebKit::PageBanner::detachFromPage):
1950         (WebKit::PageBanner::didChangeDeviceScaleFactor):
1951         (WebKit::PageBanner::mouseEvent):
1952         Add non-mac implementations.
1953
1954         * WebProcess/WebPage/WebPage.cpp:
1955         (WebKit::WebPage::~WebPage):
1956         (WebKit::WebPage::setHeaderPageBanner):
1957         (WebKit::WebPage::headerPageBanner):
1958         (WebKit::WebPage::setFooterPageBanner):
1959         (WebKit::WebPage::footerPageBanner):
1960         (WebKit::WebPage::mouseEvent):
1961         (WebKit::WebPage::mouseEventSyncForTesting):
1962         * WebProcess/WebPage/WebPage.h:
1963         Add banner setter/getters and give the banners a chance to handle mouse events.
1964
1965         * WebProcess/WebPage/mac/PageBannerMac.mm: Added.
1966         (WebKit::PageBanner::create):
1967         (WebKit::PageBanner::PageBanner):
1968         (WebKit::PageBanner::addToPage):
1969         (WebKit::PageBanner::detachFromPage):
1970         (WebKit::PageBanner::didChangeDeviceScaleFactor):
1971         (WebKit::PageBanner::mouseEvent):
1972         (WebKit::PageBanner::layer):
1973         Add Mac implementation.
1974
1975         * WebProcess/WebPage/mac/WebPageMac.mm:
1976         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
1977         Notify banners when the device scale changes.
1978
1979 2013-04-30  Anders Carlsson  <andersca@apple.com>
1980
1981         Remove the WebKit2 BinarySemaphore class
1982         https://bugs.webkit.org/show_bug.cgi?id=115458
1983
1984         Reviewed by Benjamin Poulain.
1985
1986         Remove the WK2 specific BinarySemaphore class and use the one from WTF.
1987
1988         * Platform/CoreIPC/BinarySemaphore.cpp: Removed.
1989         * Platform/CoreIPC/BinarySemaphore.h: Removed.
1990         * Platform/CoreIPC/Connection.cpp:
1991         * Platform/CoreIPC/Connection.h:
1992         * WebKit2.xcodeproj/project.pbxproj:
1993
1994 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
1995
1996         <rdar://problem/13757475> WebProcess deny ipc-posix-shm-read-data CFPBS:A2:
1997
1998         Reviewed by Anders Carlsson.
1999
2000         * WebProcess/com.apple.WebProcess.sb.in: Allow pbs shared memory.
2001
2002 2013-04-30  Alexey Proskuryakov  <ap@apple.com>
2003
2004         [Mac] Don't open window server connection in network process
2005         https://bugs.webkit.org/show_bug.cgi?id=115446
2006
2007         Reviewed by Anders Carlsson.
2008
2009         * NetworkProcess/NetworkProcess.cpp:
2010         (WebKit::NetworkProcess::initializeProcess):
2011         * NetworkProcess/NetworkProcess.h:
2012         * NetworkProcess/mac/NetworkProcessMac.mm:
2013         (WebKit::NetworkProcess::initializeProcess):
2014         (WebKit::NetworkProcess::initializeProcessName):
2015         Instead of shutting down a connection after setting process name, just prevent
2016         it from being created.
2017
2018         * Shared/ChildProcess.h:
2019         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsDaemon):
2020         Expose a function for client processes to call if they don't run an NSApplication
2021         run loop.
2022
2023         * OfflineStorageProcess/OfflineStorageProcess.cpp:
2024         (WebKit::OfflineStorageProcess::initializeProcess):
2025         * OfflineStorageProcess/OfflineStorageProcess.h:
2026         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
2027         (WebKit::OfflineStorageProcess::initializeProcess):
2028         (WebKit::OfflineStorageProcess::initializeProcessName):
2029         * SharedWorkerProcess/SharedWorkerProcess.cpp:
2030         (WebKit::SharedWorkerProcess::initializeProcess):
2031         (WebKit::SharedWorkerProcess::initializeProcessName):
2032         * SharedWorkerProcess/SharedWorkerProcess.h:
2033         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
2034         (WebKit::SharedWorkerProcess::initializeProcess):
2035         (WebKit::SharedWorkerProcess::initializeProcessName):
2036         Match NetworkProcess for consistency.
2037
2038         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeProcessName):
2039         Don't null check UI process name. First, it can't be null, and second, some other
2040         processes already don't have this check.
2041
2042 2013-04-30  Tim Horton  <timothy_horton@apple.com>
2043
2044         Disable deprecation warnings around some NSProcessInfo API.
2045
2046         Rubber-stamped by Brady Eidson.
2047
2048         * Shared/mac/ChildProcessMac.mm:
2049         (WebKit::ChildProcess::setProcessSuppressionEnabled):
2050
2051 2013-04-30  Brady Eidson  <beidson@apple.com>
2052
2053         [WK2] Threads get stuck in NetworkProcess when canceling loads in WebProcess.
2054         <rdar://problem/13757687> and https://bugs.webkit.org/show_bug.cgi?id=115319
2055
2056         Written and reviewed by both Alexey Proskuryakov and Brady Eidson.
2057
2058         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2059         (WebKit::NetworkConnectionToWebProcess::didClose): Call abort() on all loaders
2060           instead of connectionToWebProcessDidClose()
2061         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Instead of removing
2062           the loader from the scheduler, call abort() which will also end up removing it.
2063
2064         * NetworkProcess/SchedulableLoader.h: Add a virtual abort() call.
2065
2066         * NetworkProcess/NetworkResourceLoader.cpp:
2067         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Added a messageFlags argument so 
2068           callers can pass DispatchMessageEvenWhenWaitingForSyncReply.
2069         (WebKit::NetworkResourceLoader::abort): Combined "abortInProgressLoad" and "cleanup" to
2070           be a general purpose "cancel"
2071         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2072         (WebKit::NetworkResourceLoader::willSendRequestAsync):
2073         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
2074         * NetworkProcess/NetworkResourceLoader.h:
2075
2076         * NetworkProcess/SyncNetworkResourceLoader.cpp:
2077         (WebKit::SyncNetworkResourceLoader::abort):
2078         * NetworkProcess/SyncNetworkResourceLoader.h:
2079
2080         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2081         (WebKit::WebResourceLoadScheduler::remove): Remove an obsolete/incorrect comment.
2082
2083         * WebProcess/Network/WebResourceLoader.cpp:
2084         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Add comment stressing
2085           the importance of this null check so it's not removed again.
2086
2087 2013-04-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2088
2089         [WK2][GTK] MiniBrowser won't play video in <embed> tag
2090         https://bugs.webkit.org/show_bug.cgi?id=113107
2091
2092         Reviewed by Anders Carlsson.
2093
2094         The wrong clip region is used for windowed plugins, because it's
2095         translated to window frame coords again.
2096
2097         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2098         (WebKit::NetscapePlugin::platformGeometryDidChange): Do not move
2099         the current clip region.
2100
2101 2013-04-30  Timothy Hatcher  <timothy@apple.com>
2102
2103         Make the Inspector dock to right button work in the WebKit nightlies on Safari 6.0.4.
2104
2105         https://webkit.org/b/115428
2106
2107         Reviewed by Joseph Pecoraro.
2108
2109         * UIProcess/mac/WebInspectorProxyMac.mm:
2110         (WebKit::WebInspectorProxy::createInspectorWindow): Reduce the required Safari version.
2111         (WebKit::WebInspectorProxy::platformDetach): Simplify the frame restoring code so it
2112         works on Safari 6.0.4.
2113
2114 2013-04-30  Artur Moryc  <a.moryc@samsung.com>
2115
2116         [WK2][EFL] Spelling marker disappears while selection is being changed
2117         https://bugs.webkit.org/show_bug.cgi?id=115165
2118
2119         Reviewed by Anders Carlsson.
2120
2121         The marker for a misspelled word disappears while the cursor is being navigated along the word.
2122
2123         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2124         (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
2125
2126 2013-04-30  Zalan Bujtas  <zalan@apple.com>
2127
2128         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
2129         https://bugs.webkit.org/show_bug.cgi?id=111244
2130
2131         Reviewed by David Kilzer.
2132         
2133         Enable performance.now() as a minimal subset of Web Timing API. 
2134         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
2135         number of milliseconds from the start of the navigation of the current document.
2136         JS libraries use this API to check against the requestAnimationFrame() timestamp.
2137
2138         * Configurations/FeatureDefines.xcconfig:
2139
2140 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
2141
2142         WEB SPEECH: need to identify the default voice per language
2143         https://bugs.webkit.org/show_bug.cgi?id=115366
2144
2145         Reviewed by Tim Horton.
2146
2147         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2148         (InitWebCoreSystemInterface):
2149
2150 2013-04-29  Benjamin Poulain  <benjamin@webkit.org>
2151
2152         [WK2] Streamline the use of strings in WebProcess::getWebCoreStatistics
2153         https://bugs.webkit.org/show_bug.cgi?id=115315
2154
2155         Reviewed by Geoffrey Garen.
2156
2157         Remove a couple of unjustified DEFINE_STATIC_LOCAL.
2158         Use ASCIILiteral when allocating new String.
2159
2160         * WebProcess/WebProcess.cpp:
2161         (WebKit::getWebCoreMemoryCacheStatistics):
2162         (WebKit::WebProcess::getWebCoreStatistics):
2163
2164 2013-04-29  Anders Carlsson  <andersca@apple.com>
2165
2166         Remove StorageTracker::originsLoaded
2167         https://bugs.webkit.org/show_bug.cgi?id=115382
2168
2169         Reviewed by Sam Weinig.
2170
2171         Add m_didFinishLoadingOrigins.
2172
2173         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
2174         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
2175         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2176         (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins):
2177         * WebProcess/Storage/WebKeyValueStorageManager.h:
2178         (WebKeyValueStorageManager):
2179
2180 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
2181
2182         WEB SPEECH Update seatbelt profile to work with speech synthesis
2183         https://bugs.webkit.org/show_bug.cgi?id=115368
2184
2185         Reviewed by Alexey Proskuryakov.
2186
2187         * WebProcess/com.apple.WebProcess.sb.in:
2188
2189 2013-04-28  Beth Dakin  <bdakin@apple.com>
2190
2191         Need a LayoutMilestone to fire when we have done our first paint after suppressing 
2192         incremental layout
2193         https://bugs.webkit.org/show_bug.cgi?id=115330
2194         -and corresponding-
2195         <rdar://problem/12722365>
2196
2197         Reviewed by Simon Fraser.
2198
2199         Two new millstones.
2200         * Shared/API/c/WKPageLoadTypes.h:
2201         * Shared/API/c/WKSharedAPICast.h:
2202         (WebKit::toWKLayoutMilestones):
2203         (WebKit::toLayoutMilestones):
2204
2205         This null-check is necessary now since this code ends up running at 
2206         WebFrame::init() time while we're setting up the Document. 
2207         setVisualUpdatesAllowed(true) has always been called as a part of that process, 
2208         and now the updateLayout(), ends up calling this code too, but we don't actually 
2209         have a mainFrame yet since it's still being created.
2210         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2211         (WebKit::findLargestFrameInFrameSet):
2212
2213 2013-04-29  Brady Eidson  <beidson@apple.com>
2214
2215         REGRESSION: We see authentication challenge sheets for favicon requests.
2216         <rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
2217
2218         Reviewed by Alexey Proskuryakov.
2219
2220         Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
2221         * Shared/Network/NetworkResourceLoadParameters.cpp:
2222         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
2223         (WebKit::NetworkResourceLoadParameters::encode):
2224         (WebKit::NetworkResourceLoadParameters::decode):
2225         * Shared/Network/NetworkResourceLoadParameters.h:
2226
2227         Pass along the ClientCredentialPolicy to the NetworkProcess:
2228         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2229         (WebKit::WebResourceLoadScheduler::scheduleLoad):
2230         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2231         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
2232         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2233
2234         Have the SchedulableLoader remember the ClientCredentialPolicy:
2235         * NetworkProcess/SchedulableLoader.cpp:
2236         (WebKit::SchedulableLoader::SchedulableLoader):
2237         * NetworkProcess/SchedulableLoader.h:
2238         (WebKit::SchedulableLoader::clientCredentialPolicy):
2239
2240         Don’t message for credentials if the ClientCredentialPolicy forbids it:
2241         * NetworkProcess/NetworkResourceLoader.cpp:
2242         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
2243         * NetworkProcess/NetworkResourceLoader.h:
2244
2245         Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
2246         * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
2247         (WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
2248         * NetworkProcess/NetworkProcessPlatformStrategies.h:
2249
2250 2013-04-29  Jer Noble  <jer.noble@apple.com>
2251
2252         Unreviewed build fix. Point the Network process towards its own version of SecItemShim.dyld.
2253
2254         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist:
2255
2256 2013-04-29  Alexey Proskuryakov  <ap@apple.com>
2257
2258         Threads get stuck in NetworkProcess when canceling loads
2259         https://bugs.webkit.org/show_bug.cgi?id=115319
2260
2261         Backing out part of the fix, as it's causing crashes.
2262
2263         * WebProcess/Network/WebResourceLoader.cpp:
2264         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2265
2266 2013-04-29  Noam Rosenthal  <noam@webkit.org>
2267
2268         Get rid of "non-composited contents" in CoordinatedLayerTreeHost
2269         https://bugs.webkit.org/show_bug.cgi?id=110355
2270
2271         Reviewed by Jocelyn Turcotte.
2272
2273         Instead of using a special non-composited contents layer, we let RenderLayerCompositor create
2274         a proper GraphicsLayer for that content.
2275         CoordinatedLayerTreeHost now needs to find the main contents layer for the purpose of setting
2276         the trajectory vector and applying the cover rect.
2277
2278         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2279         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2280         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
2281             Don't create the non-composited layer, instead keep a raw pointer to the root
2282             compositing layer created by the WebCore compositor.
2283
2284         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
2285         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
2286         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
2287         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
2288         (WebKit::CoordinatedLayerTreeHost::paintContents):
2289         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
2290         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2291             Remove non-composited layer specialization.
2292
2293 2013-04-29  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2294
2295         [Qt] Build fix. Enabling c++11 for Qt WK2 after r149259.
2296         https://bugs.webkit.org/show_bug.cgi?id=115345
2297
2298         Reviewed by Anders Carlsson.
2299
2300         * WebKit2.pri:
2301
2302 2013-04-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2303
2304         [WK2][EFL] Skip cancel fullscreen request if not made from FullScreen API
2305         https://bugs.webkit.org/show_bug.cgi?id=108201
2306
2307         Reviewed by Andreas Kling.
2308
2309         Adds a check on WebFullScreenManagerProxyEfl whether fullscreen mode was
2310         set from FullScreen API or not, so it can skip cancelling fullscreen
2311         request if fullscreen mode was set by application, preventing
2312         WebProcess' FullScreenManager from crashing.
2313
2314         EFL unit test available: ewk_view_cancel_full_screen_request.
2315
2316         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
2317         (WKViewExitFullScreen):
2318         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
2319         WKViewExitFullScreen now returns a bool, indicating whether the
2320         operation has succeeded or not.
2321
2322         * UIProcess/API/efl/ewk_view.cpp:
2323         (ewk_view_fullscreen_exit):
2324         Skip request if not in fullscreen mode.
2325
2326         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2327         (TEST_F):
2328         Added ewk_view_cancel_full_screen_request unit test.
2329
2330         * UIProcess/CoordinatedGraphics/WebView.cpp:
2331         (WebKit::WebView::exitFullScreen):
2332         * UIProcess/CoordinatedGraphics/WebView.h:
2333         (WebView):
2334         exitFullScreen now returns a bool, indicating whether the operation has
2335         succeeded or not.
2336
2337         * UIProcess/WebFullScreenManagerProxy.cpp:
2338         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
2339         * UIProcess/WebFullScreenManagerProxy.h:
2340         (WebFullScreenManagerProxy):
2341         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
2342         (WebKit::WebFullScreenManagerProxy::isFullScreen):
2343         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
2344         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
2345         Added m_hasRequestedFullScreen boolean flag to EFL port. Used to
2346         indicate if fullscreen mode is enabled, as well as sanity checks on both
2347         {enter,exit}FullScreen functions.
2348
2349 2013-04-29  Anders Carlsson  <andersca@apple.com>
2350
2351         Stop using range-based for syntax
2352         https://bugs.webkit.org/show_bug.cgi?id=115356
2353
2354         Reviewed by Andreas Kling.
2355
2356         * PluginProcess/WebProcessConnection.cpp:
2357         (WebKit::WebProcessConnection::didClose):
2358
2359 2013-04-29  Sergio Correia  <sergio.correia@openbossa.org>
2360
2361         [EFL][WK2]: WebProcessMain: hide call to ecore_x_shutdown() under guard
2362         https://bugs.webkit.org/show_bug.cgi?id=115295
2363
2364         Reviewed by Andreas Kling.
2365
2366         Since the mentioned function is declared in a header that is included
2367         conditionally depending on HAVE_ECORE_X being defined.
2368
2369         * WebProcess/efl/WebProcessMainEfl.cpp:
2370         (WebKit::WebProcessMainEfl):
2371
2372 2013-04-29  Jinwoo Song  <jinwoo7.song@samsung.com>
2373
2374         [WK2] Remove build warnings by -Wunused-parameter
2375         https://bugs.webkit.org/show_bug.cgi?id=115344
2376
2377         Reviewed by Noam Rosenthal.
2378
2379         Fix build warnigs -Wunused-parameter.
2380
2381         * UIProcess/CoordinatedGraphics/WebView.cpp:
2382         (WebKit::WebView::createContextMenuProxy):
2383         * UIProcess/DrawingAreaProxy.h:
2384         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
2385         * UIProcess/WebPageProxy.cpp:
2386         (WebKit::WebPageProxy::connectionWillClose):
2387
2388 2013-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2389
2390         Unreviewed. Fix make distcheck.
2391
2392         * GNUmakefile.list.am: Add missing header files to compilation.
2393
2394 2013-04-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2395
2396         Unreviewed fix build break on EFL port since r149259.
2397
2398         In EFL port, there is a non-compatible code when compiling based on C++11. This is a trivial build fix.
2399
2400         I got a confirm from Sam about landing a trivial build fix patch without sign-off from
2401         WK2 owner.
2402
2403         * UIProcess/API/efl/EwkViewCallbacks.h:
2404
2405 2013-04-28  Dean Jackson  <dino@apple.com>
2406
2407         [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
2408         https://bugs.webkit.org/show_bug.cgi?id=115310
2409
2410         Reviewed by Simon Fraser.
2411
2412         Remove ENABLE_HIGH_DPI_CANVAS_macosx.
2413
2414         * Configurations/FeatureDefines.xcconfig:
2415
2416 2013-04-28  Sam Weinig  <sam@webkit.org>
2417
2418         [WebKit2] Adopt new API for detecting window occlusion
2419         https://bugs.webkit.org/show_bug.cgi?id=115334
2420
2421         Reviewed by Simon Fraser.
2422
2423         Switch off of WKSI for window occlusion and use the new NSWindowDidChangeOcclusionState notification
2424         instead.
2425
2426         * UIProcess/API/mac/WKView.mm:
2427         (-[WKView dealloc]):
2428         (-[WKView addWindowObserversForWindow:]):
2429         (-[WKView removeWindowObservers]):
2430         (-[WKView viewWillMoveToWindow:]):
2431         (-[WKView viewDidMoveToWindow]):
2432         (-[WKView _windowDidOrderOnScreen:]):
2433         (-[WKView _windowDidChangeOcclusionState:]):
2434         (-[WKView _setIsWindowOccluded:]):
2435         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2436         (-[WKView windowOcclusionDetectionEnabled]):
2437         (-[WKView setWindowOcclusionDetectionEnabled:]):
2438         Only compile occlusion detection code where supported and remove calls to register/deregister
2439         for detection callbacks, now that NSWindow will handle that for us. We also no longer need to
2440         track all the WKViews, as that was only required to lookup the view that matched the window number
2441         returned from the occlusion callback.
2442
2443 2013-04-26  Anders Carlsson  <andersca@apple.com>
2444
2445         Use OwnPtr<PluginControllerProxy> for storing plug-in controllers in WebProcessConnection
2446         https://bugs.webkit.org/show_bug.cgi?id=115259
2447
2448         Reviewed by Andreas Kling.
2449
2450         * PluginProcess/WebProcessConnection.cpp:
2451         (WebKit::WebProcessConnection::addPluginControllerProxy):
2452         (WebKit::WebProcessConnection::removePluginControllerProxy):
2453         (WebKit::WebProcessConnection::didClose):
2454         * PluginProcess/WebProcessConnection.h:
2455         (WebProcessConnection):
2456
2457 2013-04-27  Jessie Berlin  <jberlin@apple.com>
2458
2459         Build fix.
2460
2461         * NetworkProcess/NetworkResourceLoader.cpp:
2462         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2463         Do not declare another variable with the same name.
2464
2465 2013-04-27  Darin Adler  <darin@apple.com>
2466
2467         Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
2468         https://bugs.webkit.org/show_bug.cgi?id=115307
2469
2470         Reviewed by Geoffrey Garen.
2471
2472         This change was done by a global replace followed by compiling and inspecting for
2473         cases that needed to be tweaked by hand.
2474
2475         * Platform/cg/CGUtilities.cpp:
2476         (WebKit::paintBitmapContext):
2477         * Platform/mac/ModuleMac.mm:
2478         (WebKit::Module::load):
2479         (WebKit::Module::platformFunctionPointer):
2480         * PluginProcess/mac/PluginProcessMac.mm:
2481         (WebKit::PluginProcess::initializeSandbox):
2482         * Shared/API/c/mac/WKURLRequestNS.mm:
2483         (WKURLRequestCreateWithNSURLRequest):
2484         * Shared/API/c/mac/WKURLResponseNS.mm:
2485         (WKURLResponseCreateWithNSURLResponse):
2486         * Shared/Downloads/mac/DownloadMac.mm:
2487         (WebKit::Download::start):
2488         (WebKit::Download::startWithHandle):
2489         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
2490         (WebKit::ChildProcessMain):
2491         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2492         (WebKit::getPluginArchitecture):
2493         (WebKit::contentsOfPropertyListAtURL):
2494         (WebKit::getMIMETypesFromPluginBundle):
2495         (WebKit::getStringListResource):
2496         (WebKit::NetscapePluginModule::getPluginInfo):
2497         * Shared/ShareableResource.cpp:
2498         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
2499         * Shared/cf/ArgumentCodersCF.cpp:
2500         (CoreIPC::decode):
2501         (CoreIPC::encode):
2502         * Shared/cg/ShareableBitmapCG.cpp:
2503         (WebKit::ShareableBitmap::createGraphicsContext):
2504         (WebKit::ShareableBitmap::makeCGImageCopy):
2505         (WebKit::ShareableBitmap::makeCGImage):
2506         (WebKit::ShareableBitmap::createCGImage):
2507         * Shared/mac/ArgumentCodersMac.mm:
2508         (CoreIPC::decode):
2509         * Shared/mac/PlatformCertificateInfo.mm:
2510         (WebKit::PlatformCertificateInfo::dump):
2511         * Shared/mac/WebCoreArgumentCodersMac.mm:
2512         (CoreIPC::::encodePlatformData):
2513         (CoreIPC::::decodePlatformData):
2514         * UIProcess/API/mac/FindIndicatorWindow.mm:
2515         (WebKit::FindIndicatorWindow::setFindIndicator):
2516         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
2517         * UIProcess/API/mac/PDFViewController.mm:
2518         (-[WKPDFView initWithFrame:PDFViewController:]):
2519         (WebKit::PDFViewController::PDFViewController):
2520         (WebKit::convertPostScriptDataSourceToPDF):
2521         (WebKit::PDFViewController::setPDFDocumentData):
2522         * UIProcess/API/mac/PageClientImpl.mm:
2523         (WebKit::PageClientImpl::PageClientImpl):
2524         (WebKit::PageClientImpl::registerEditCommand):
2525         (WebKit::PageClientImpl::setDragImage):
2526         * UIProcess/API/mac/WKBrowsingContextController.mm:
2527         (didFailProvisionalLoadWithErrorForFrame):
2528         (didFailLoadWithErrorForFrame):
2529         * UIProcess/API/mac/WKConnection.mm:
2530         (didReceiveMessage):
2531         * UIProcess/API/mac/WKPrintingView.mm:
2532         (-[WKPrintingView drawRect:]):
2533         * UIProcess/API/mac/WKView.mm:
2534         (-[WKView browsingContextController]):
2535         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
2536         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
2537         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
2538         (-[WKView fullScreenWindowController]):
2539         (-[WKView _executeSavedCommandBySelector:]):
2540         (-[WKView printOperationWithPrintInfo:forFrame:]):
2541         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2542         (WebKit::createProcess):
2543         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2544         (WebKit::PluginInfoStore::pluginPathsInDirectory):
2545         (WebKit::PluginInfoStore::getMIMETypeForExtension):
2546         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2547         (WebKit::PluginProcessProxy::beginModal):
2548         * UIProcess/cf/WebBackForwardListCF.cpp:
2549         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
2550         * UIProcess/cf/WebPageProxyCF.cpp:
2551         (WebKit::WebPageProxy::sessionStateData):
2552         (WebKit::WebPageProxy::restoreFromSessionStateData):
2553         (WebKit::WebPageProxy::saveRecentSearches):
2554         (WebKit::WebPageProxy::loadRecentSearches):
2555         * UIProcess/cf/WebPreferencesCF.cpp:
2556         (WebKit::cfStringFromWebCoreString):
2557         (WebKit::setStringValueIfInUserDefaults):
2558         (WebKit::setBoolValueIfInUserDefaults):
2559         (WebKit::setUInt32ValueIfInUserDefaults):
2560         (WebKit::setDoubleValueIfInUserDefaults):
2561         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
2562         (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
2563         (WebKit::WebPreferences::platformUpdateFloatValueForKey):
2564         * UIProcess/mac/BackingStoreMac.mm:
2565         (WebKit::BackingStore::resetScrolledRect):
2566         (WebKit::BackingStore::backingStoreContext):
2567         * UIProcess/mac/CorrectionPanel.mm:
2568         (WebKit::CorrectionPanel::handleAcceptedReplacement):
2569         * UIProcess/mac/TextCheckerMac.mm:
2570         (WebKit::TextChecker::checkTextOfParagraph):
2571         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2572         * UIProcess/mac/WKFullScreenWindowController.mm:
2573         (-[WKFullScreenWindowController enterFullScreen:]):
2574         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2575         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2576         * UIProcess/mac/WebContextMac.mm:
2577         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
2578         * UIProcess/mac/WebContextMenuProxyMac.mm:
2579         (WebKit::nsMenuItemVector):
2580         (WebKit::WebContextMenuProxyMac::populate):
2581         * UIProcess/mac/WebInspectorProxyMac.mm:
2582         (WebKit::WebInspectorProxy::createInspectorWindow):
2583         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2584         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2585         (WebKit::WebPopupMenuProxyMac::populate):
2586         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2587         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2588         (WebKit::InjectedBundle::load):
2589         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2590         (WebKit::NetscapePlugin::updatePluginLayer):
2591         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
2592         (WebKit::PluginProxy::pluginLayer):
2593         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2594         (WebKit::PDFPlugin::PDFPlugin):
2595         (WebKit::PDFPlugin::createScrollbar):
2596         (WebKit::PDFPlugin::pdfDocumentDidLoad):
2597         (WebKit::PDFPlugin::writeItemsToPasteboard):
2598         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
2599         (getAllScriptsInPDFDocument):
2600         (WebKit::SimplePDFPlugin::pdfDocumentDidLoad):
2601         (WebKit::SimplePDFPlugin::streamDidReceiveData):
2602         (WebKit::SimplePDFPlugin::manualStreamDidReceiveData):
2603         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2604         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
2605         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
2606         (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
2607         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
2608         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2609         (WebKit::createNSError):
2610         * WebProcess/WebPage/WebPage.cpp:
2611         (WebKit::WebPage::drawPagesToPDF):
2612         * WebProcess/WebPage/mac/WebPageMac.mm:
2613         (WebKit::WebPage::performDictionaryLookupForRange):
2614         (WebKit::cachedResponseForURL):
2615         (WebKit::WebPage::drawPagesToPDFFromPDFDocument):
2616         * WebProcess/mac/WebProcessMac.mm:
2617         (WebKit::WebProcess::platformSetCacheModel):
2618         Use adoptCF and adoptNS free functions.
2619
2620 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
2621
2622         <rdar://problem/13757007> Crashes in NetworkResourceLoader::didReceiveResponseAsync
2623         https://bugs.webkit.org/show_bug.cgi?id=115318
2624
2625         Reviewed by Darin Adler.
2626
2627         sendAbortingOnFailure may actually fail, and abort the request, making m_handle null.
2628
2629         * NetworkProcess/NetworkResourceLoader.cpp:
2630         (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Null check m_handle after
2631         sending a message, because the request will cancelled when connection is invalid.
2632         (WebKit::NetworkResourceLoader::didReceiveBuffer): Assert that m_handle matches
2633         the handle that we are called with.
2634         (WebKit::NetworkResourceLoader::didFinishLoading): Ditto.
2635         (WebKit::NetworkResourceLoader::didFail): Ditto.
2636         (WebKit::NetworkResourceLoader::willSendRequestAsync): Ditto.
2637         (WebKit::NetworkResourceLoader::didSendData): Ditto.
2638         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Ditto.
2639         (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Ditto.
2640         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Ditto.
2641         (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Ditto.
2642         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Ditto.
2643
2644 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
2645
2646         <rdar://problem/13757687> Threads get stuck in NetworkProcess when canceling loads
2647         https://bugs.webkit.org/show_bug.cgi?id=115319
2648
2649         Reviewed by Darin Adler.
2650
2651         WebResourceLoader was second-guessing NetworkProcess as to whether it needs a response
2652         to DidReceiveResponseWithCertificateInfo, and it was guessing wrong if the load was
2653         alrady canceled on WebProcess side.
2654
2655         * NetworkProcess/NetworkResourceLoader.cpp:
2656         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2657         * WebProcess/Network/WebResourceLoader.cpp:
2658         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2659         * WebProcess/Network/WebResourceLoader.h:
2660         * WebProcess/Network/WebResourceLoader.messages.in:
2661
2662 2013-04-27  Alexey Proskuryakov  <ap@apple.com>
2663
2664         Regression tests that reference a non-local resource crash with NetworkProcess enabled
2665         https://bugs.webkit.org/show_bug.cgi?id=115290
2666
2667         Reviewed by Sam Weinig.
2668
2669         Covered by fast/dom/icon-url-change.html and many other existing tests.
2670
2671         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2672         (WebKit::WebResourceLoadScheduler::remove): Handle this case. Architecturally, it
2673         would be better if SubresourceLoad::create just created an object an didn't do
2674         further checks before returning a pointer, but changing that is beyond the scope
2675         of the fix.
2676
2677 2013-04-26  Yael Aharon  <yael.aharon@intel.com>
2678
2679         [WK2][EFL] Build break after r149212
2680         https://bugs.webkit.org/show_bug.cgi?id=115294
2681
2682         Reviewed by Simon Fraser.
2683         r144672 bumped up the revision of WKContextClient API, and introduced a version array
2684         APIClientTraits<WKContextClient>::interfaceSizesByVersion .
2685         In r149212, the version was bumped back down and the version array was emptied but not removed.
2686         This causes a warning "array subscript is below array bounds", and in EFL the warning is
2687         treated as error.
2688
2689         * Shared/APIClientTraits.cpp:
2690         (WebKit):
2691         * Shared/APIClientTraits.h:
2692
2693 2013-04-26  Martin Robinson  <mrobinson@igalia.com>
2694
2695         [GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
2696         https://bugs.webkit.org/show_bug.cgi?id=99081
2697
2698         Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain.
2699
2700         Add methods to WebKitWebViewGroup to add and remove user style sheets.
2701         This allows clients to inject style sheets into pages with a set of
2702         rules for when those style sheets apply.
2703
2704         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
2705         (toImmutableArray): Added this helper which converts the GList* parameters into
2706         ImmutableArrays for use with the WebKit2 internal API.
2707         (webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet.
2708         (webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets.
2709         * UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations.
2710         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation.
2711         * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API.
2712         (isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL.
2713         (fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist.
2714         (removeOldInjectedStyleSheetsAndResetLists): Function to start afresh.
2715         (testWebViewGroupInjectedStyleSheet): The actual test.
2716         (serverCallback): Server callback for use with the test. We cannot use loadHTML or
2717         loadAlternateHTML, because that checks the whitelist and blacklist against about:blank.
2718         (beforeAll): Initialize the server and new test.
2719         (afterAll): Clean up the server.
2720
2721 2013-04-26  Simon Cooper  <scooper@apple.com>
2722
2723         Permit ~/Library or ~/Library/Preferences to be symlinks
2724         https://bugs.webkit.org/show_bug.cgi?id=115142
2725         <rdar://problem/12953603>
2726
2727         Reviewed by Alexey Proskuryakov.
2728
2729         Pass in two new parameters which are the resolved paths to ~/Library
2730         and ~/Library/Preferences. Added new expansion functions and
2731         substituted the new functions for home-regex, home-subpath and
2732         home-literal for places referencing resources in "~/Library" or
2733         "~/Library/Preferences".
2734
2735         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
2736         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2737         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2738         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2739         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2740         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2741         * Shared/mac/ChildProcessMac.mm:
2742         (WebKit::ChildProcess::initializeSandbox):
2743
2744 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2745
2746         [WK2] WKContextClient doesn't need to be versioned yet
2747         https://bugs.webkit.org/show_bug.cgi?id=115279
2748
2749         Reviewed by Anders Carlsson.
2750
2751         * Shared/APIClientTraits.cpp:
2752         * Shared/APIClientTraits.h:
2753         * UIProcess/API/C/WKContext.h:
2754
2755 2013-04-26  Anders Carlsson  <andersca@apple.com>
2756
2757         Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess
2758         https://bugs.webkit.org/show_bug.cgi?id=115277
2759         <rdar://problem/12890184>
2760
2761         Reviewed by Sam Weinig.
2762
2763         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2764         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2765         Ask the download manager to convert the main resource load to a download.
2766
2767         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2768         Add new message.
2769
2770         * NetworkProcess/NetworkResourceLoader.h:
2771         (WebKit::NetworkResourceLoader::handle):
2772         Add getter.
2773
2774         * Shared/Downloads/mac/DownloadMac.mm:
2775         (dispatchOnMainThread):
2776         Helper function that ensures that a given block is called on the main thread.
2777
2778         (-[WKDownloadAsDelegate downloadDidBegin:]):
2779         (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
2780         (-[WKDownloadAsDelegate download:didReceiveResponse:]):
2781         (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
2782         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
2783         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
2784         (-[WKDownloadAsDelegate download:didCreateDestination:]):
2785         (-[WKDownloadAsDelegate downloadDidFinish:]):
2786         (-[WKDownloadAsDelegate download:didFailWithError:]):
2787         Use dispatchOnMainThread.
2788
2789         * UIProcess/WebPageProxy.cpp:
2790         (WebKit::WebPageProxy::receivedPolicyDecision):
2791         Remove code that cancels the current load and starts a new download.
2792
2793         * WebProcess/WebPage/WebFrame.cpp:
2794         (WebKit::WebFrame::convertMainResourceLoadToDownload):
2795         Send the ConvertMainResourceLoadToDownload message to the network process.
2796
2797 2013-04-25  Roger Fong  <roger_fong@apple.com>
2798
2799         Disable sub-pixel layout on mac.
2800         https://bugs.webkit.org/show_bug.cgi?id=114999.
2801
2802         Reviewed by Simon Fraser.
2803
2804         * Configurations/FeatureDefines.xcconfig:
2805
2806 2013-04-26  Simon Fraser  <simon.fraser@apple.com>
2807
2808         Inspector window is often blank when opened
2809         https://bugs.webkit.org/show_bug.cgi?id=115220
2810
2811         Reviewed by Tim Horton.
2812         
2813         After disabling tiled scrolling and accelerated drawing in r149006, the
2814         Inspector window was often missing its content after opening. This only
2815         happened when the user has a preference on disk to use accelerated drawing
2816         in the Inspector.
2817         
2818         The missing content was caused by a failure to connect the correct contextID
2819         for remote layer hosting. On window creation, we hook up a context using
2820         WindowServer layer hosting (the default), but then switch back to app-hosted
2821         layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
2822         but that can be re-entered via its call to sendUpdateBackingStoreState(). In
2823         that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
2824         with a stale layerTreeContext.
2825         
2826         Fix by moving the code that exits/enters accelerated compositing mode to before
2827         the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
2828         use of a possibly stale layerTreeContext.
2829
2830         * UIProcess/DrawingAreaProxyImpl.cpp:
2831         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2832
2833 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2834
2835         Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
2836         https://bugs.webkit.org/show_bug.cgi?id=115273
2837
2838         Reviewed by Anders Carlsson.
2839
2840         Covered by multiple existing tests (when using NetworkProcess), including:
2841         - http/tests/fileapi/blob-url-in-subframe.html
2842         - http/tests/fileapi/create-blob-url-from-data-url.html
2843
2844         * NetworkProcess/NetworkResourceLoader.cpp:
2845         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
2846         Work around BlobResourceHandle badness.
2847
2848 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2849
2850         [WK2] Remove NetworkResourceLoader::cleanupOnMainThread
2851         https://bugs.webkit.org/show_bug.cgi?id=115268
2852
2853         Reviewed by Brady Eidson.
2854
2855         All cleanup() callers are now on main thread, and this indirection only complicates debugging.
2856
2857         * NetworkProcess/NetworkResourceLoader.cpp:
2858         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
2859         (WebKit::NetworkResourceLoader::abortInProgressLoad):
2860         (WebKit::NetworkResourceLoader::didFinishLoading):
2861         (WebKit::NetworkResourceLoader::didFail):
2862         * NetworkProcess/NetworkResourceLoader.h:
2863
2864 2013-04-26  Andy Estes  <aestes@apple.com>
2865
2866         [WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads
2867         https://bugs.webkit.org/show_bug.cgi?id=115267
2868
2869         Reviewed by Alexey Proskuryakov.
2870
2871         * Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes.
2872         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2873         (WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes.
2874         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
2875         (WebKit::CustomProtocolManager::supportsScheme): Ditto.
2876
2877 2013-04-26  Alexey Proskuryakov  <ap@apple.com>
2878
2879         Blobs are not associated with connection when there are no sandbox extensions
2880         https://bugs.webkit.org/show_bug.cgi?id=115264
2881
2882         Reviewed by Brady Eidson.
2883
2884         Covered by multiple fast/files tests when using NetworkProcess.
2885
2886         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
2887         (WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error.
2888
2889 2013-04-25  Andy Estes  <aestes@apple.com>
2890
2891         [WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
2892         https://bugs.webkit.org/show_bug.cgi?id=115223
2893
2894         Reviewed by Darin Adler.
2895
2896         When WebKit performs a synchronous load on the Mac, it spins a nested
2897         run loop in a mode that only accepts input from the NSURLConnection
2898         performing the load. When the load is for a custom protocol in WebKit2,
2899         we proxy it to the UI process via CoreIPC messages, but the response
2900         messages from the UI process are never processed as long as the run
2901         loop is in a non-common mode (and we wouldn't want to process messages
2902         that could re-enter WebCore in the middle of loading, anyway). Since
2903         these messages never make it back to the NSURLConnection handling the
2904         request, the connection eventually times out.
2905
2906         Fix this by using a work queue to handle custom protocol messages in
2907         the networking process. The work queue can process incoming custom
2908         protocol messages while the main thread is blocked.
2909
2910         * NetworkProcess/NetworkProcess.cpp:
2911         (WebKit::NetworkProcess::initializeConnection): Called
2912         initializeConnection() on all the NetworkProcess's supplements.
2913         * Shared/ChildProcessSupplement.h: Added a base class for
2914         NetworkProcessSupplement and WebProcessSupplement which defines
2915         initializeConnection and provides an empty default implementation.
2916         (WebKit::ChildProcessSupplement::~ChildProcessSupplement):
2917         (WebKit::ChildProcessSupplement::initializeConnection):
2918         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2919         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2920         (WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a
2921         work queue for message processing.
2922         (WebKit::CustomProtocolManager::initializeConnection): Added the work
2923         queue as a message receiver on the CoreIPC connection.
2924         (WebKit::CustomProtocolManager::initialize): If we're in the web
2925         process and the network process is being used, unregister and destroy
2926         the work queue we previously created. It'd be better to not create it
2927         in the first place, but we have to register our work queue with the
2928         CoreIPC connection before it is established, which is before the UI
2929         process has told us whether the network process is in use.
2930         * Shared/Network/NetworkProcessSupplement.h: Inherited from
2931         ChildProcessSupplement.
2932         * WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h.
2933         * WebProcess/WebProcess.cpp:
2934         (WebKit::WebProcess::initializeConnection): Called
2935         initializeConnection() on all the WebProcess's supplements.
2936         * WebProcess/WebProcessSupplement.h: Inherited from
2937         ChildProcessSupplement.
2938
2939 2013-04-26  Eduardo Lima Mitev  <elima@igalia.com>
2940
2941         [GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
2942         https://bugs.webkit.org/show_bug.cgi?id=115240
2943
2944         Reviewed by Martin Robinson.
2945
2946         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux
2947
2948 2013-04-25  Zan Dobersek  <zdobersek@igalia.com>
2949
2950         [GTK] Plugin process broken due to a missing symbol
2951         https://bugs.webkit.org/show_bug.cgi?id=114901
2952
2953         Reviewed by Gustavo Noronha Silva.
2954
2955         Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
2956         multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
2957         references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
2958         are specified in various ways.
2959
2960         The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
2961         this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
2962         gamepad dependencies' libraries are also added to the binary's LDADD list.
2963
2964         * GNUmakefile.am:
2965         * GNUmakefile.list.am: Add a few missing files to the build.
2966
2967 2013-04-24  Chris Fleizach  <cfleizach@apple.com>
2968
2969         WEB SPEECH: language support does not work as expected
2970         https://bugs.webkit.org/show_bug.cgi?id=115119
2971
2972         Reviewed by Alexey Proskuryakov.
2973
2974         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2975         (InitWebCoreSystemInterface):
2976
2977 2013-04-25  Anders Carlsson  <andersca@apple.com>
2978
2979         Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
2980         https://bugs.webkit.org/show_bug.cgi?id=115207
2981
2982         Reviewed by Beth Dakin.
2983
2984         In preparation for adding a new async DecidePolicyForResponse message,
2985         rename the current one to DecidePolicyForResponseSync. Also split out the async part
2986         into a separate WebPageProxy::decidePolicyForResponse member function.
2987
2988         * UIProcess/WebPageProxy.cpp:
2989         (WebKit::WebPageProxy::WebPageProxy):
2990         (WebKit::WebPageProxy::receivedPolicyDecision):
2991         (WebKit::WebPageProxy::decidePolicyForResponse):
2992         (WebKit::WebPageProxy::decidePolicyForResponseSync):
2993         * UIProcess/WebPageProxy.h:
2994         (WebPageProxy):
2995         * UIProcess/WebPageProxy.messages.in:
2996         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2997         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2998
2999 2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
3000
3001         Web Inspector: ConsoleMessage should include line and column number where possible
3002         https://bugs.webkit.org/show_bug.cgi?id=114929
3003
3004         Reviewed by Timothy Hatcher.
3005
3006         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3007         (WebKit::WebChromeClient::addMessageToConsole):
3008         * WebProcess/WebCoreSupport/WebChromeClient.h:
3009
3010 2013-04-25  Brady Eidson  <beidson@apple.com>
3011
3012         Thread safety issues in WKCustomProtocol.
3013         <rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185
3014
3015         Reviewed by Alexey Proskuryakov.
3016
3017         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3018
3019         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
3020         (WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex.
3021         (WebKit::CustomProtocolManager::removeCustomProtocol): Ditto.
3022         (WebKit::CustomProtocolManager::didFailWithError):
3023         (WebKit::CustomProtocolManager::didLoadData):
3024         (WebKit::CustomProtocolManager::didReceiveResponse):
3025         (WebKit::CustomProtocolManager::didFinishLoading):
3026         (WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return
3027           a RetainPtr instead of a raw pointer.
3028
3029 2013-04-25  Jer Noble  <jer.noble@apple.com>
3030
3031         Further build fixes: correct two more misnames of WebProcessShim.dyld.
3032
3033         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
3034         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
3035         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
3036
3037 2013-04-25  Martin Robinson  <mrobinson@igalia.com>
3038
3039         Make gobject-introspection warnings non-fatal
3040         https://bugs.webkit.org/show_bug.cgi?id=115184
3041
3042         Reviewed by Carlos Garcia Campos.
3043
3044         * GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld
3045         until we get to a point where gobject-introspection gives consistent warnings.
3046
3047 2013-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3048
3049         [GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
3050         https://bugs.webkit.org/show_bug.cgi?id=111265
3051
3052         Reviewed by Anders Carlsson.
3053
3054         In the current API the settings are always shared by all web
3055         views, because they are always created on the default page
3056         group. This makes impossible to have different settings on
3057         different web views. Expose the page group in the API,
3058         so that users can create web views on a group different than the
3059         default one to have their own settings.
3060
3061         * GNUmakefile.list.am: Add new files to compilation.
3062         * UIProcess/API/gtk/WebKitSettings.cpp:
3063         (webkitSettingsGetPreferences): Helper private method to get the
3064         WebPreferences wrapped by a WebKitSettings object.
3065         * UIProcess/API/gtk/WebKitSettingsPrivate.h:
3066         * UIProcess/API/gtk/WebKitWebContext.cpp:
3067         (_WebKitWebContextPrivate): Add a default WebKitWebViewGroup.
3068         (webkitWebContextCreatePageForWebView): Create the WebPageProxy
3069         with the WebPageGroup of the given WebKitWebViewGroup.
3070         (webkitWebContextGetDefaultWebViewGroup): Helper private method to
3071         get the default WebKitWebViewGroup.
3072         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
3073         * UIProcess/API/gtk/WebKitWebView.cpp:
3074         (_WebKitWebViewPrivate): Add a WebKitWebViewGroup in case the view
3075         is created with a group.
3076         (webkitWebViewUpdateSettings): Keep a reference of the group
3077         settings to be able to disconnect the signals when the settings
3078         object is replaced in the view group and connect to the signals
3079         for the custom settings.
3080         (webkitWebViewSettingsChanged): Disconnect the signals for the
3081         previous settings and set the new settings.
3082         (webkitWebViewDisconnectSettingsChangedSignalHandler): Disconnect
3083         notify::settings signal of WebKitWebViewGroup.
3084         (webkitWebViewConstructed): Pass the current WebKitWebViewGroup to
3085         webkitWebContextCreatePageForWebView().
3086         (webkitWebViewSetProperty): Add setter for group property.
3087         (webkitWebViewGetProperty): Add getter for group property.
3088         (webkitWebViewDispose): Call
3089         webkitWebViewDisconnectSettingsChangedSignalHandler().
3090         (webkit_web_view_class_init): Add WebKitWebView:group property.
3091         (webkitWebViewHandleAuthenticationChallenge): Use
3092         webkit_web_view_get_settings().
3093         (webkit_web_view_new_with_group): Create a new web view with the
3094         given WebKitWebViewGroup.
3095         (webkit_web_view_get_group): Return the current WebKitWebViewGroup
3096         or the default one if the view was not created with
3097         webkit_web_view_new_with_group().
3098         (webkit_web_view_set_settings): Set the settings of the current
3099         WebKitWebViewGroup.
3100         (webkit_web_view_get_settings): Get the settings of the current
3101         WebKitWebViewGroup.
3102         (webkit_web_view_set_zoom_level): Use
3103         webkit_web_view_get_settings().
3104         (webkit_web_view_get_zoom_level): Ditto.
3105         * UIProcess/API/gtk/WebKitWebView.h:
3106         * UIProcess/API/gtk/WebKitWebViewGroup.cpp: Added.
3107         (_WebKitWebViewGroupPrivate):
3108         (webkitWebViewGroupSetProperty):
3109         (webkitWebViewGroupGetProperty):
3110         (webkitWebViewGroupConstructed):
3111         (webkit_web_view_group_class_init):
3112         (webkitWebViewGroupAttachSettingsToPageGroup): Set the
3113         WebPreferences of the current WebKitSettings to the WebPageGroup.
3114         (webkitWebViewGroupCreate): Create a new WebKitWebViewGroup for
3115         the given WebPageGroup.
3116         (webkitWebViewGroupGetPageGroup): Helper private method to get the
3117         WebPageGroup wrapped by the WebKitWebViewGroup.
3118         (webkit_web_view_group_new): Create a new WebKitWebViewGroup.
3119         (webkit_web_view_group_get_name): Return the name of a
3120         WebKitWebViewGroup.
3121         (webkit_web_view_group_get_settings): Get the settings of a
3122         WebKitWebViewGroup.
3123         (webkit_web_view_group_set_settings): Set new settings of a
3124         WebKitWebViewGroup.
3125         * UIProcess/API/gtk/WebKitWebViewGroup.h: Added.
3126         (_WebKitWebViewGroup):
3127         (_WebKitWebViewGroupClass):
3128         * UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Added.
3129         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
3130         WebKitWebViewGroup section.
3131         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3132         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
3133         webkit_web_view_group_get_type.
3134         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
3135         compilation.
3136         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3137         (testWebViewSettings): We can't watch settings in the default view
3138         group anymore, because they are not released with the web view but
3139         with the web context that is freed after the Test destructor.
3140         * UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added.
3141         (testWebViewGroupDefault):
3142         (testWebViewGroupNewGroup):
3143         (testWebViewNewWithGroup):
3144         (testWebViewGroupSettings):
3145         (beforeAll):
3146         (afterAll):
3147         * UIProcess/API/gtk/webkit2.h: Include WebKitWebViewGroup.h.
3148
3149 2013-04-25  Jer Noble  <jer.noble@apple.com>
3150
3151         Unreviewed build fix: Fix the name of DyldInterpose.h in
3152         SecItemShimLibrary.mm, fix the name of WebProcessShim.dyld in
3153         WebContentServiceEntryPoint.mm, and stop linking against libWTF.a
3154         directly (which means removing ASSERTs from
3155         CookieStorageShimLibrary.cpp).
3156
3157         * Shared/mac/CookieStorageShimLibrary.cpp:
3158         (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL):
3159         (WebKit::WebKitCookieStorageShimInitialize):
3160         * WebKit2.xcodeproj/project.pbxproj:
3161         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3162         (WebContentServiceInitializer):
3163         * WebProcess/mac/SecItemShimLibrary.mm:
3164
3165 2013-04-24  Tim Horton  <timothy_horton@apple.com>
3166
3167         PDFPlugin: Cursor should become an i-beam when over selectable text
3168         https://bugs.webkit.org/show_bug.cgi?id=115018
3169         <rdar://problem/12645012>
3170
3171         Reviewed by Alexey Proskuryakov.
3172
3173         * WebProcess/Plugins/PDF/PDFPlugin.h:
3174         Add updateCursor(), the UpdateCursorMode and HitTestResult enums, and
3175         storage for the last PDF hit test result.
3176         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3177         (WebKit::PDFPlugin::updateCursor):
3178         Hit test the PDF. If there is a word under the cursor, use the I-beam cursor,
3179         otherwise, use the default pointer cursor. This approximates PDFKit's behavior,
3180         though does not match it precisely in the case of annotations.
3181         Only send the cursor update to the UIProcess if it is a change, or if
3182         we're explicitly asked to update.
3183         (WebKit::PDFPlugin::handleMouseEvent):
3184         If we're processing a mouse moved event, update the cursor if needed.
3185         (WebKit::PDFPlugin::handleMouseEnterEvent):
3186         If the cursor just moved over the PDFPlugin, force-update the cursor,
3187         even if it matches the previously-set cursor (because something else
3188         likely updated the cursor while it was not over the PDFPlugin).
3189
3190 2013-04-24  Tim Horton  <timothy_horton@apple.com>
3191
3192         Page Overlays shouldn't waste time flushing layers if we're not going to use it
3193         https://bugs.webkit.org/show_bug.cgi?id=115145
3194
3195         Reviewed by Simon Fraser.
3196
3197         Don't flush the page overlay layer when it's installed - it starts out
3198         with paintContents=false, so we don't really need a CALayer yet. We'll
3199         flush later if need be.
3200
3201         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3202         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
3203
3204 2013-04-24  Jer Noble  <jer.noble@apple.com>
3205
3206         Further unreviewed build fix; CFNetwork.framework is the one which Lion
3207         refuses to link against.
3208
3209         * WebKit2.xcodeproj/project.pbxproj:
3210
3211 2013-04-24  Jer Noble  <jer.noble@apple.com>
3212
3213         Unreviewed build fix; link against CoreServices.framework instead of against
3214         CoreFoundation.framework directly, to make the linker happy on Lion.
3215
3216         * WebKit2.xcodeproj/project.pbxproj:
3217
3218 2013-04-22  Jer Noble  <jer.noble@apple.com>
3219
3220         WWDC session videos don’t play at developer.apple.com
3221         https://bugs.webkit.org/show_bug.cgi?id=114858
3222
3223         Reviewed by Eric Carlson. Rubber stamped by Brady Eidson.
3224
3225         AVFoundation uses CFNetwork to store and retrieve cookies from the global store.
3226         However, in the case where network access happens in the NetworkProcess, session
3227         cookies are stored in-memory, and are not accessable in the WebProcess. Until such
3228         a time as AVFoundation can provide an API which would allow us to provide cookies
3229         for a specific request, we will interpose the CFNetwork method which they use to
3230         retrieve the cookie string from the cookie store for their pending request.
3231
3232         Duplicate the previous SecItemShim target to a new, WebProcessShim target. This
3233         target includes the SecItemShim functionality, but will add a new shim for cookie
3234         retrieval:
3235         * Shared/mac/CookieStorageShimLibrary.h: Added
3236         (CookieStorageShimCallbacks):
3237         * Shared/mac/CookieStorageShimLibrary.cpp: Added.
3238         (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class.
3239         (WebKit::ShimProtector::~ShimProtector):
3240         (WebKit::ShimProtector::count):
3241         (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose
3242             the CFNetwork call, and pass to the registered callback.
3243         (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks.
3244
3245         Add a helper singleton class which will talk to the shim through the 
3246         registered callbacks:
3247         * Shared/mac/CookieStorageShim.h: Added
3248         (WebKit::CookieStorageShim::CookieStorageShim):
3249         * Shared/mac/CookieStorageShim.cpp: Added.
3250         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request
3251             over to the NetworkProcess.
3252         (WebKit::CookieStorageShim::shared): Simple singleton.
3253         (WebKit::CookieStorageShim::initialize): Call the library initializer.
3254
3255         Initialize the shim only when the WebProcess is delegating network loading
3256         to the NetworkProcess:
3257         * WebProcess/WebProcess.cpp:
3258         (WebKit::WebProcess::initializeWebProcess):
3259
3260         Rename the WebProcess's shim from SecItemShim -> WebProcessShim:
3261         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3262         (WebKit::addDYLDEnvironmentAdditions):
3263         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
3264         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
3265         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
3266         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3267         (WebContentServiceInitializer):
3268
3269         As the DYLD_INTERPOSE macro is used in multiple files now, put it in its
3270         own header:
3271         * Shared/mac/DyldInterpose.h: Added.
3272         * PluginProcess/mac/PluginProcessShim.mm:
3273         * WebProcess/mac/SecItemShimLibrary.mm:
3274
3275         Add new files to the project:
3276         * WebKit2.xcodeproj/project.pbxproj:
3277
3278 2013-04-24  Byungwoo Lee  <bw80.lee@samsung.com>
3279
3280         [EFL] Fix build error after r148963.
3281         https://bugs.webkit.org/show_bug.cgi?id=115126
3282
3283         Reviewed by Laszlo Gombos.
3284
3285         Generate forwarding headers for 'CoordinatedGraphics' to generate WKView.h
3286
3287         * PlatformEfl.cmake:
3288
3289 2013-04-24  Anders Carlsson  <andersca@apple.com>
3290
3291         Crash when trying to determine the length of an invalid message
3292         https://bugs.webkit.org/show_bug.cgi?id=115127
3293         <rdar://problem/13700736>
3294
3295         Reviewed by Beth Dakin.
3296
3297         Use message instead of incomingMessage since incomingMessage will always be null.
3298
3299         * Platform/CoreIPC/Connection.cpp:
3300         (CoreIPC::Connection::processIncomingMessage):
3301
3302 2013-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3303
3304         [GTK] Use stamp files for generate-forwarding-headers makefile rules
3305         https://bugs.webkit.org/show_bug.cgi?id=115118
3306
3307         Reviewed by Martin Robinson.
3308
3309         Use a stamp file for the WebKit2 forwarding generator rule. Also
3310         fix the rule dependencies that pointed to a non existent variable.
3311
3312         * GNUmakefile.am:
3313
3314 2013-04-24  Zan Dobersek  <zdobersek@igalia.com>
3315
3316         [GTK][WK2] Implement LayerTreeHostGtk::pageBackgroundTransparencyChanged
3317         https://bugs.webkit.org/show_bug.cgi?id=115094
3318
3319         Reviewed by Tim Horton.
3320
3321         The method was introduced in r149004 (and a stub implementation for the GTK port added in r149017).
3322         Implement the method for the GTK port in the same manner it is implemented under the Mac port,
3323         calling setContentsOpaque on the non-composited content layer.
3324
3325         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3326         (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
3327
3328 2013-04-24  Simon Cooper  <scooper@apple.com>
3329
3330         <rdar://problem/13614117> Refine the Flash Player profile
3331         https://bugs.webkit.org/show_bug.cgi?id=115016
3332
3333         Reviewed by Alexey Proskuryakov.
3334
3335         Add some refinements to the Flash Player profile. Make a non-/ home
3336         directory work. Fixes that allow file uploading via user selected files.
3337
3338         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
3339
3340 2013-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3341
3342         [WebKit2] Add CoordinatedGraphics to the list of platforms in generate-forwarding-headers.pl
3343         https://bugs.webkit.org/show_bug.cgi?id=115098
3344
3345         Reviewed by Martin Robinson.
3346
3347         r148963 introduced a new WKView.h header in a directory not listed
3348         as a platform prefix in generate-forwarding-headers.pl.
3349
3350         * Scripts/generate-forwarding-headers.pl: Replace unused chromium
3351         plaform prefix with CoordinatedGraphics that is used now.
3352
3353 2013-04-24  Seokju Kwon  <seokju.kwon@gmail.com>
3354
3355         Web Inspector: Add number to list from remote web inspector.
3356         https://bugs.webkit.org/show_bug.cgi?id=115014
3357
3358         Reviewed by Benjamin Poulain.
3359
3360         * UIProcess/InspectorServer/front-end/inspectorPageIndex.html:
3361
3362 2013-04-24  Vlad Vasilyeu  <vasvlad@gmail.com>
3363
3364         --minimal build fails with error: Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h:44:36: error: decode is not a member of WebCore::TextCheckingResult
3365         https://bugs.webkit.org/show_bug.cgi?id=114367
3366
3367         Reviewed by Benjamin Poulain.
3368
3369         Include WebCoreArgumentCoders.h to WebEditorClientEfl.cpp from
3370         WebKit2/Shared/ for successfully building with option --minimal
3371
3372         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
3373
3374 == Rolled over to ChangeLog-2013-04-24 ==