The public WK header file should not include WKAPICast.h
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-05-26  Changhun Kang  <temoochin@company100.net>
2
3         The public WK header file should not include WKAPICast.h
4         https://bugs.webkit.org/show_bug.cgi?id=115230
5
6         Reviewed by Darin Adler.
7
8         Otherwise, WebKit internal headers are exposed.
9         No new tests. No change in behavior.
10         * UIProcess/API/C/soup/WKSoupRequestManager.h:
11         * UIProcess/soup/WebSoupRequestManagerClient.h:
12
13 2013-05-26  Andreas Kling  <akling@apple.com>
14
15         FocusController::setFocusedNode() should be setFocusedElement().
16         <http://webkit.org/b/116780>
17
18         Reviewed by Antti Koivisto.
19
20         * WebProcess/Plugins/PluginView.cpp:
21         (WebKit::PluginView::focusPluginElement):
22
23 2013-05-25  Andreas Kling  <akling@apple.com>
24
25         PluginDocument::pluginNode() should be pluginElement() instead.
26         <http://webkit.org/b/116774>
27
28         Reviewed by Anders Carlsson.
29
30         * WebProcess/WebPage/WebPage.cpp:
31         (WebKit::WebPage::focusedPluginViewForFrame):
32
33 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
34
35         Unprefix Page Visibility API
36         https://bugs.webkit.org/show_bug.cgi?id=102340
37
38         Reviewed by Tim Horton.
39         
40         Renaming of the "preview" state to "unloaded".
41
42         * Shared/API/c/WKPageVisibilityTypes.h:
43         * Shared/API/c/WKSharedAPICast.h:
44         (WebKit::toPageVisibilityState):
45
46 2013-05-25  Andreas Kling  <akling@apple.com>
47
48         Move Node::isMouseFocusable() to Element.
49         <http://webkit.org/b/116762>
50
51         Reviewed by Anders Carlsson.
52
53         * WebProcess/WebPage/WebPage.cpp:
54         (WebKit::WebPage::highlightPotentialActivation):
55
56             Check that the potentially activated Node is an Element before asking if it's mouse-focusable.
57
58 2013-05-25  Andreas Kling  <akling@apple.com>
59
60         REGRESSION: WebProcess is terminated when all Safari windows are closed.
61         <rdar://problem/13990901>
62         <http://webkit.org/b/116766>
63
64         Reviewed by Alexey Proskuryakov.
65
66         When closing the last page, only disconnect the web process if we're using a network process.
67         Otherwise there might be session state in the web process getting lost.
68
69         * UIProcess/WebProcessProxy.cpp:
70         (WebKit::WebProcessProxy::removeWebPage):
71
72 2013-05-25  Santosh Mahto  <santosh.ma@samsung.com>
73
74         WebFrameProxy::didFailLoad clears frame title for no apparent reason
75         https://bugs.webkit.org/show_bug.cgi?id=116655
76
77         Reviewed by Alexey Proskuryakov.
78
79         * UIProcess/WebFrameProxy.cpp:
80         (WebKit::WebFrameProxy::didFailLoad):
81
82 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
83
84         [Qt][GTK] Build fix after r150669
85         https://bugs.webkit.org/show_bug.cgi?id=116751
86
87         Reviewed by Christophe Dumez.
88
89         * GNUmakefile.list.am:
90         * Target.pri:
91         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
92         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
93
94 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
95
96         [EFL] Build fix after r150669
97         https://bugs.webkit.org/show_bug.cgi?id=116750
98
99         Reviewed by Anders Carlsson.
100
101         * CMakeLists.txt:
102         * WebProcess/Battery/WebBatteryManager.cpp:
103         (WebKit::WebBatteryManager::registerWebPage):
104         (WebKit::WebBatteryManager::unregisterWebPage):
105         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
106         (WebKit::WebNetworkInfoManager::registerWebPage):
107         (WebKit::WebNetworkInfoManager::unregisterWebPage):
108         (WebKit::WebNetworkInfoManager::bandwidth):
109         (WebKit::WebNetworkInfoManager::metered):
110         * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
111         (WebKit::WebVibrationClient::vibrate):
112         (WebKit::WebVibrationClient::cancelVibration):
113         * WebProcess/soup/WebSoupRequestManager.cpp:
114         (WebKit::WebSoupRequestManager::didReceiveURIRequestData):
115         (WebKit::WebSoupRequestManager::send):
116
117 2013-05-24  Anders Carlsson  <andersca@apple.com>
118
119         MessageSender shouldn't be a class template
120         https://bugs.webkit.org/show_bug.cgi?id=116743
121
122         Reviewed by Andreas Kling.
123
124         Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must
125         implement messageSenderConnection() as well as messageSenderDestinationID().
126
127         This reduces code size and will allow us to be more flexible with MessageSender in the future.
128
129         * NetworkProcess/NetworkResourceLoader.cpp:
130         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
131         (WebKit::NetworkResourceLoader::messageSenderConnection):
132         (WebKit):
133         (WebKit::NetworkResourceLoader::messageSenderDestinationID):
134         * NetworkProcess/NetworkResourceLoader.h:
135         (NetworkResourceLoader):
136         * NetworkProcess/mac/DiskCacheMonitor.h:
137         (DiskCacheMonitor):
138         * NetworkProcess/mac/DiskCacheMonitor.mm:
139         (WebKit::DiskCacheMonitor::messageSenderConnection):
140         (WebKit::DiskCacheMonitor::messageSenderDestinationID):
141         (WebKit):
142         * Platform/CoreIPC/MessageSender.h:
143         (CoreIPC):
144         (MessageSender):
145         (CoreIPC::MessageSender::send):
146         (CoreIPC::MessageSender::sendSync):
147         * Shared/ChildProcess.cpp:
148         (WebKit::ChildProcess::messageSenderConnection):
149         (WebKit):
150         (WebKit::ChildProcess::messageSenderDestinationID):
151         * Shared/ChildProcess.h:
152         (ChildProcess):
153         * Shared/Downloads/Download.cpp:
154         (WebKit::Download::messageSenderConnection):
155         (WebKit):
156         (WebKit::Download::messageSenderDestinationID):
157         * Shared/Downloads/Download.h:
158         (Download):
159         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
160         (WebKit::CustomProtocolManager::initialize):
161         * Shared/WebConnection.h:
162         (WebConnection):
163         * Shared/mac/SecItemShim.cpp:
164         (WebKit::sendSecItemRequest):
165         * UIProcess/WebConnectionToWebProcess.cpp:
166         (WebKit::WebConnectionToWebProcess::hasValidConnection):
167         (WebKit::WebConnectionToWebProcess::messageSenderConnection):
168         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID):
169         * UIProcess/WebConnectionToWebProcess.h:
170         (WebConnectionToWebProcess):
171         * WebKit2.xcodeproj/project.pbxproj:
172         * WebProcess/Geolocation/WebGeolocationManager.cpp:
173         (WebKit::WebGeolocationManager::registerWebPage):
174         (WebKit::WebGeolocationManager::unregisterWebPage):
175         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
176         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
177         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
178         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
179         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
180         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
181         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
182         * WebProcess/InjectedBundle/InjectedBundle.cpp:
183         (WebKit::InjectedBundle::postMessage):
184         (WebKit::InjectedBundle::postSynchronousMessage):
185         * WebProcess/Network/WebResourceLoader.cpp:
186         (WebKit::WebResourceLoader::messageSenderConnection):
187         (WebKit::WebResourceLoader::messageSenderDestinationID):
188         * WebProcess/Network/WebResourceLoader.h:
189         (WebResourceLoader):
190         * WebProcess/Notifications/WebNotificationManager.cpp:
191         (WebKit::WebNotificationManager::show):
192         (WebKit::WebNotificationManager::cancel):
193         (WebKit::WebNotificationManager::clearNotifications):
194         (WebKit::WebNotificationManager::didDestroyNotification):
195         * WebProcess/Plugins/PDF/PDFPlugin.mm:
196         (WebKit::PDFPlugin::writeItemsToPasteboard):
197         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
198         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
199         * WebProcess/Storage/StorageAreaMap.cpp:
200         (WebKit::StorageAreaMap::StorageAreaMap):
201         (WebKit::StorageAreaMap::~StorageAreaMap):
202         (WebKit::StorageAreaMap::setItem):
203         (WebKit::StorageAreaMap::removeItem):
204         (WebKit::StorageAreaMap::clear):
205         (WebKit::StorageAreaMap::loadValuesIfNeeded):
206         * WebProcess/WebConnectionToUIProcess.cpp:
207         (WebKit::WebConnectionToUIProcess::hasValidConnection):
208         (WebKit::WebConnectionToUIProcess::messageSenderConnection):
209         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID):
210         * WebProcess/WebConnectionToUIProcess.h:
211         (WebConnectionToUIProcess):
212         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
213         (WebKit::WebChromeClient::windowRect):
214         (WebKit::WebChromeClient::focusedFrameChanged):
215         (WebKit::WebChromeClient::createWindow):
216         (WebKit::WebChromeClient::toolbarsVisible):
217         (WebKit::WebChromeClient::statusbarVisible):
218         (WebKit::WebChromeClient::menubarVisible):
219         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
220         (WebKit::WebChromeClient::runJavaScriptAlert):
221         (WebKit::WebChromeClient::runJavaScriptConfirm):
222         (WebKit::WebChromeClient::runJavaScriptPrompt):
223         (WebKit::WebChromeClient::shouldInterruptJavaScript):
224         (WebKit::WebChromeClient::exceededDatabaseQuota):
225         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
226         (WebKit::WebColorChooser::WebColorChooser):
227         (WebKit::WebColorChooser::setSelectedColor):
228         (WebKit::WebColorChooser::endChooser):
229         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
230         (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon):
231         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
232         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
233         (WebKit::WebFrameLoaderClient::setTitle):
234         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
235         (WebKit::WebPlatformStrategies::populatePluginCache):
236         (WebKit::WebPlatformStrategies::getTypes):
237         (WebKit::WebPlatformStrategies::bufferForType):
238         (WebKit::WebPlatformStrategies::getPathnamesForType):
239         (WebKit::WebPlatformStrategies::stringForType):
240         (WebKit::WebPlatformStrategies::copy):
241         (WebKit::WebPlatformStrategies::changeCount):
242         (WebKit::WebPlatformStrategies::uniqueName):
243         (WebKit::WebPlatformStrategies::color):
244         (WebKit::WebPlatformStrategies::url):
245         (WebKit::WebPlatformStrategies::addTypes):
246         (WebKit::WebPlatformStrategies::setTypes):
247         (WebKit::WebPlatformStrategies::setBufferForType):
248         (WebKit::WebPlatformStrategies::setPathnamesForType):
249         (WebKit::WebPlatformStrategies::setStringForType):
250         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
251         (WebKit::WebPopupMenu::show):
252         (WebKit::WebPopupMenu::hide):
253         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
254         (WebKit::WebSearchPopupMenu::saveRecentSearches):
255         (WebKit::WebSearchPopupMenu::loadRecentSearches):
256         * WebProcess/WebPage/EventDispatcher.cpp:
257         (WebKit::EventDispatcher::sendDidReceiveEvent):
258         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
259         (WebKit::updateBackForwardItem):
260         (WebKit::WebBackForwardListProxy::itemAtIndex):
261         (WebKit::WebBackForwardListProxy::backListCount):
262         (WebKit::WebBackForwardListProxy::forwardListCount):
263         * WebProcess/WebPage/WebInspector.cpp:
264         (WebKit::WebInspector::createInspectorPage):
265         (WebKit::WebInspector::didClose):
266         (WebKit::WebInspector::bringToFront):
267         (WebKit::WebInspector::inspectedURLChanged):
268         (WebKit::WebInspector::save):
269         (WebKit::WebInspector::append):
270         (WebKit::WebInspector::attachBottom):
271         (WebKit::WebInspector::attachRight):
272         (WebKit::WebInspector::detach):
273         (WebKit::WebInspector::setAttachedWindowHeight):
274         (WebKit::WebInspector::setAttachedWindowWidth):
275         (WebKit::WebInspector::setToolbarHeight):
276         (WebKit::WebInspector::updateDockingAvailability):
277         (WebKit::WebInspector::sendMessageToRemoteFrontend):
278         * WebProcess/WebPage/WebPage.cpp:
279         (WebKit::WebPage::messageSenderConnection):
280         (WebKit):
281         (WebKit::WebPage::messageSenderDestinationID):
282         * WebProcess/WebPage/WebPage.h:
283         (WebPage):
284         * WebProcess/WebPage/mac/WebPageMac.mm:
285         (WebKit::WebPage::executeKeypressCommandsInternal):
286         (WebKit::WebPage::handleEditingKeyboardEvent):
287         * WebProcess/WebProcess.cpp:
288         (WebKit::WebProcess::ensureNetworkProcessConnection):
289         (WebKit::WebProcess::shouldTerminate):
290
291 2013-05-24  Tim Horton  <timothy_horton@apple.com>
292
293         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
294         https://bugs.webkit.org/show_bug.cgi?id=116744
295         <rdar://problem/13973514>
296
297         Reviewed by Simon Fraser.
298
299         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
300         (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
301         Force WebCore to repaint animated images when painting is resumed.
302
303 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
304
305         Remove custom code for webkitAudioContext global constructor getter
306         https://bugs.webkit.org/show_bug.cgi?id=116530
307
308         Reviewed by Geoffrey Garen.
309
310         Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.
311
312         * WebProcess/InjectedBundle/InjectedBundle.cpp:
313         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
314         * WebProcess/WebPage/WebPage.cpp:
315         (WebKit::WebPage::updatePreferences):
316
317 2013-05-24  Thomas Deniau  <deniau@apple.com>
318
319         Add more lines to the context during Dictionary lookups
320         https://bugs.webkit.org/show_bug.cgi?id=115256
321
322         Reviewed by Ryosuke Niwa.
323
324         * WebProcess/WebPage/mac/WebPageMac.mm:
325         (WebKit::WebPage::performDictionaryLookupAtLocation):
326         Instead of using the current paragraph as the context (which stops at
327         line breaks), get a few lines before and after the point, so that the
328         context contains at least four lines in each direction.
329         This way the Dictionary will be able to look up things that extend past
330         the current line.
331
332 2013-05-24  Anders Carlsson  <andersca@apple.com>
333
334         Intermittent crash when typing in Address Bar
335         https://bugs.webkit.org/show_bug.cgi?id=116728
336         <rdar://problem/13976781>
337
338         Reviewed by Sam Weinig.
339
340         If a web process connection has been removed from the storage manager because we disconnected it
341         since there were no more active pages associated with the web process, we'll fail to find it here
342         so just return early instead of crashing.
343
344         * UIProcess/Storage/StorageManager.cpp:
345         (WebKit::StorageManager::destroyStorageMap):
346
347 2013-05-24  Andreas Kling  <akling@apple.com>
348
349         Typing in Safari's unified field causes unnecessary web content repaints.
350         <http://webkit.org/b/116703>
351
352         Reviewed by Andy Estes.
353
354         * WebProcess/WebPage/FindController.cpp:
355         (WebKit::FindController::countStringMatches):
356
357             Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string
358             is found inside the page content, the renderer containing that text will no longer be repainted.
359
360 2013-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
361
362         [WK2][EFL][QT] Build break after r150610
363         https://bugs.webkit.org/show_bug.cgi?id=116699
364
365         Reviewed by Csaba Osztrogonác.
366
367         * UIProcess/WebPageProxy.cpp:
368         (WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy.
369
370 2013-05-23  Anders Carlsson  <andersca@apple.com>
371
372         Shim Flash plug-in to allow its updater to run
373         https://bugs.webkit.org/show_bug.cgi?id=116692
374         <rdar://problem/13938510>
375
376         Reviewed by Sam Weinig.
377
378         * PluginProcess/PluginProcess.h:
379         * PluginProcess/mac/PluginProcessMac.mm:
380         (WebKit::replacedNSConcreteTask_launch):
381         (WebKit::initializeCocoaOverrides):
382         Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess.
383
384         (WebKit::PluginProcess::launchProcess):
385         Send a LaunchProcess message to the UI process.
386
387         * UIProcess/Plugins/PluginProcessProxy.cpp:
388         * UIProcess/Plugins/PluginProcessProxy.h:
389         Remove PluginProcessProxy::didReceiveMessage.
390
391         (PluginProcessProxy):
392         * UIProcess/Plugins/PluginProcessProxy.messages.in:
393         Add LaunchProcess message and remove LegacyReceiver attribute.
394
395         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
396         (WebKit::isFlashUpdater):
397         Helper function to determine whether the process is the flash updater.
398
399         (WebKit::shouldLaunchProcess):
400         Return whether we should launch this process.
401
402         (WebKit::PluginProcessProxy::launchProcess):
403         Determine if we should launch this process and then do so.
404
405 2013-05-23  Anders Carlsson  <andersca@apple.com>
406
407         Don't run all plug-ins unsandboxed
408         https://bugs.webkit.org/show_bug.cgi?id=116690
409         <rdar://problem/13975569>
410
411         Reviewed by Jessie Berlin.
412
413         Remove debugging code.
414
415         * UIProcess/WebPageProxy.cpp:
416         (WebKit::WebPageProxy::findPlugin):
417
418 2013-05-23  Anders Carlsson  <andersca@apple.com>
419
420         Crash in convertMainResourceLoadToDownload when downloading file by option-return
421         https://bugs.webkit.org/show_bug.cgi?id=116451
422
423         Reviewed by Andreas Kling.
424
425         If the main resource loader is null, create a new download instead since there's no existing loader to convert.
426
427         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
428         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
429         * WebProcess/WebPage/WebFrame.cpp:
430         (WebKit::WebFrame::convertMainResourceLoadToDownload):
431
432 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
433
434         <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding
435
436         Reviewed by Dan Bernstein.
437
438         * WebProcess/com.apple.WebProcess.sb.in: Allow this.
439
440 2013-05-23  Gavin Barraclough  <barraclough@apple.com>
441
442         Move posix_spawn onto a zero delay timer
443         https://bugs.webkit.org/show_bug.cgi?id=116682
444
445         Reviewed by Anders Carlson.
446
447         <rdar://problem/13973468>
448
449         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
450         (ReexecInfo):
451             - struct to hold info from the XPC message.
452         (WebKit::reexec):
453             - moved call to posix_spawn out to this helper.
454         (WebKit::reexecCallBack):
455             - calls reexec.
456         (WebKit::XPCServiceEventHandler):
457             - removed call to posix_spawn; schedule a call to reexecCallBack.
458
459 2013-05-23  Csaba Osztrogonác  <ossy@webkit.org>
460
461         [cmake] Fix generating-forwarding-headers rule after r150460
462         https://bugs.webkit.org/show_bug.cgi?id=116659
463
464         Reviewed by Christophe Dumez.
465
466         * CMakeLists.txt: Typo fix.
467
468 2013-05-23  Anton Obzhirov  <a.obzhirov@samsung.com>
469
470         [GTK] Remote Web Inspector sometimes won't serve any content
471         https://bugs.webkit.org/show_bug.cgi?id=116225
472
473         Reviewed by Gustavo Noronha Silva.
474
475         Added an option to use environment variable to set up path to
476         inspector server files. Implementation is similar to InspectorClientGtk
477         implementation.
478
479         * UIProcess/InspectorServer/WebInspectorServer.h:
480         (WebInspectorServer):
481         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
482         (WebKit::WebInspectorServer::platformResourceForPath):
483         (WebKit::WebInspectorServer::inspectorServerFilesPath):
484         (WebKit):
485
486 2013-05-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
487
488         [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
489         https://bugs.webkit.org/show_bug.cgi?id=116657
490
491         Reviewed by Christophe Dumez.
492
493         WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
494         ewk_view_pagination_mode_set|get.
495
496         Besides we don't need to use WebCore namespace anymore.
497
498         * UIProcess/API/efl/ewk_view.cpp:
499         (ewk_view_pagination_mode_set):
500         (ewk_view_pagination_mode_get):
501
502 2013-05-23  Roland Takacs  <rtakacs@inf.u-szeged.hu>
503
504         Support frame instrumentation for coordinated graphics
505         https://bugs.webkit.org/show_bug.cgi?id=115260
506
507         Reviewed by Andreas Kling.
508
509         Enabled supportsFrameInstrumentation on ports that use coordinated graphics
510         by calling didBeginFrame().
511
512         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
513         (WebKit::WebInspectorClient::supportsFrameInstrumentation):
514         (WebKit):
515         * WebProcess/WebCoreSupport/WebInspectorClient.h:
516         (WebInspectorClient):
517         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
518         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
519
520 2013-05-22  Dean Jackson  <dino@apple.com>
521
522         Don't snapshot plugins that can't be snapshotted
523         https://bugs.webkit.org/show_bug.cgi?id=116490
524
525         Reviewed by Tim Horton.
526
527         Some plugins, such as QuickTime, don't support snapshotting. We're
528         planning on another way to capture snapshots, but in the meantime make
529         sure that they don't fail to initialise because they were told to
530         not use accelerated rendering.
531
532         Expose a new message on the plugins so that they can tell the PluginView
533         if they support snapshotting or not.
534
535         * PluginProcess/PluginControllerProxy.cpp:
536         (WebKit::PluginControllerProxy::supportsSnapshotting): New method.
537         * PluginProcess/PluginControllerProxy.h: Ditto.
538         * PluginProcess/PluginControllerProxy.messages.in: Message signature.
539
540         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add supportsSnapshotting.
541         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Ditto.
542         * WebProcess/Plugins/Plugin.h: Ditto - pure virtual here.
543
544         * WebProcess/Plugins/PluginProxy.cpp:
545         (WebKit::PluginProxy::supportsSnapshotting): Send the message to the plugin process and return the results.
546         * WebProcess/Plugins/PluginProxy.h:
547
548         * WebProcess/Plugins/PluginView.cpp:
549         (WebKit::PluginView::didInitializePlugin): If the snapshotting plugin has a layer, make
550             sure to add it to the tree.
551         (WebKit::PluginView::isAcceleratedCompositingEnabled): Snapshotting plugins can use
552             accelerated compositing, just like normal plugins.
553         (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin doesn't allow snapshotting,
554             immediately restart it.
555
556 2013-05-22  Anders Carlsson  <andersca@apple.com>
557
558         Fix crash when closing a page that's trying to access session storage
559         https://bugs.webkit.org/show_bug.cgi?id=116634
560         <rdar://problem/13904054>
561
562         Reviewed by Geoffrey Garen.
563
564         It is possible for the StorageManager to get messages from a web page that has already been closed by the UI process.
565         If that happens, just ignore the messages.
566
567         * UIProcess/Storage/StorageManager.cpp:
568         (WebKit::StorageManager::createSessionStorageMap):
569         (WebKit::StorageManager::getValues):
570         (WebKit::StorageManager::setItem):
571         (WebKit::StorageManager::removeItem):
572         (WebKit::StorageManager::clear):
573         (WebKit::StorageManager::destroySessionStorageNamespaceInternal):
574
575 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
576
577         Crashes in NetworkProcess due to incorrect private browsing session tracking
578         https://bugs.webkit.org/show_bug.cgi?id=116628
579
580         Reviewed by Brady Eidson.
581
582         The current API for private browsing makes it extremely difficult to track sessions.
583         Private browsing is enabled via WKPreferences, but the session is shared, so it
584         has to be maintained while there is any chance that any page group anywhere still
585         needs it.
586
587         This patch fixes some of the issues, but ultimately, I think that we'll just need
588         to deprecate and replace the API.
589
590         * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession):
591         There are valid scenarios where privateBrowsingEnabled is true, but there is no
592         private browsing session. Handle that without crashing, although this unfortunately
593         means that it will be harder to spot logic errors when using a wrong session.
594         (WebKit::NetworkConnectionToWebProcess::registerBlobURL): Removed an obsolete FIXME.
595
596         * NetworkProcess/mac/RemoteNetworkingContext.h: Changed privateBrowsingSession()
597         to return a pointer, as no caller could know when it was safe to call it.
598
599         * NetworkProcess/mac/RemoteNetworkingContext.mm:
600         (WebKit::RemoteNetworkingContext::storageSession): Handle the case where private
601         browsing session is unexpectedly missing without crashing.
602         (WebKit::RemoteNetworkingContext::privateBrowsingSession): Changed to return a pointer.
603
604         * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess):
605         Actually initialize privateBrowsingEnabled creation parameter. It would be very
606         difficult to figure out 100% reliably whether NetworkProcess needs a private browsing
607         session with the current API, but for existing clients, looking at
608         m_privateBrowsingEnterCount is good enough. Certainly better than not initializing.
609
610         * WebProcess/InjectedBundle/InjectedBundle.cpp:
611         (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Added a FIXME.
612
613 2013-05-22  Tim Horton  <timothy_horton@apple.com>
614
615         [wk2] Should be able to make tiled WKViews clip to the view's exposed rect without using autolayout
616         https://bugs.webkit.org/show_bug.cgi?id=116625
617         <rdar://problem/13962816>
618
619         Reviewed by Anders Carlsson.
620
621         The two modes are not dependent; it should be possible to enable
622         clips-to-exposed-rect without using autolayout. This enables apps to
623         make very large tiled WKViews that don't create tiles for the whole
624         area of the view (and also disables scrolling, since that is currently
625         incompatible with clipping to the exposed rect).
626
627         * UIProcess/API/mac/WKView.mm:
628         (-[WKView setFrameSize:]):
629         (-[WKView _updateWindowAndViewFrames]):
630         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
631         (-[WKView enableFrameSizeUpdates]):
632         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
633         Rename _expandsToFitContentViaAutoLayout to _clipsToVisibleRect for accuracy.
634
635         (-[WKView setMinimumWidthForAutoLayout:]):
636         Factor clips-to-sisible-rect toggle out into setShouldClipToVisibleRect.
637
638         (-[WKView shouldClipToVisibleRect]):
639         (-[WKView setShouldClipToVisibleRect:]):
640         Allow setting clips-to-visible-rect without autolayout.
641
642         * UIProcess/API/mac/WKViewPrivate.h:
643         Add shouldClipToVisibleRect property.
644
645 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
646
647         Remove unused private browsing override support
648         <rdar://problem/11969491>
649
650         Rubber-stamped by Sam Weinig.
651
652         Private browsing override is unused, and it complicates tracking of private
653         browsing sessions in UI process (in fact, it doesn't plug into this tracking at all,
654         so we would just assert if we used the API).
655
656         * Shared/WebPageCreationParameters.cpp:
657         (WebKit::WebPageCreationParameters::encode):
658         (WebKit::WebPageCreationParameters::decode):
659         * Shared/WebPageCreationParameters.h:
660         * UIProcess/API/C/WKPage.cpp:
661         * UIProcess/API/C/WKPagePrivate.h:
662         * UIProcess/WebPageProxy.cpp:
663         (WebKit::WebPageProxy::WebPageProxy):
664         (WebKit::WebPageProxy::creationParameters):
665         * UIProcess/WebPageProxy.h:
666         * WebProcess/WebPage/WebPage.cpp:
667         (WebKit::WebPage::WebPage):
668         (WebKit::WebPage::updatePreferences):
669         * WebProcess/WebPage/WebPage.h:
670         * WebProcess/WebPage/WebPage.messages.in:
671
672 2013-05-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
673
674         [EFL][WK2] Change Ewk_Context_Menu_Item's parent menu to raw pointer
675         https://bugs.webkit.org/show_bug.cgi?id=116549
676
677         Reviewed by Christophe Dumez.
678
679         A context menu item should have only a pointer to parent menu instead
680         of owning parent menu.
681
682         * UIProcess/API/efl/ewk_context_menu_item.cpp:
683         (EwkContextMenuItem::EwkContextMenuItem):
684         * UIProcess/API/efl/ewk_context_menu_item_private.h:
685         (EwkContextMenuItem::create):
686         (EwkContextMenuItem::parentMenu):
687         (EwkContextMenuItem):
688
689 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
690
691         [Qt][WK2] Unreviewed buildfix after r150484.
692
693         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
694         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
695
696 2013-05-21  Andreas Kling  <akling@apple.com>
697
698         REGRESSION(r150491): WebKit2.CloseThenTerminate asserting below WebContext::disconnectProcess().
699         <http://webkit.org/b/116588>
700
701         Reviewed by Sam Weinig.
702
703         Do an early return from WebProcessProxy::requestTermination() if there is no child process
704         connection to terminate.
705
706         * UIProcess/WebProcessProxy.cpp:
707         (WebKit::WebProcessProxy::requestTermination):
708
709 2013-05-21  Mark Rowe  <mrowe@apple.com>
710
711         <rdar://problem/13915556> Sluggish scrolling in web content
712
713         Reviewed by Gavin Barraclough.
714
715         * Shared/mac/ChildProcessMac.mm:
716         (WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important.
717
718 2013-05-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
719
720         Fix build break after r150484
721
722         Unreviewed, fix build break on EFL, GTK.
723
724         * UIProcess/Plugins/PluginInfoStore.cpp:
725         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
726         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
727         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
728
729 2013-05-21  Andreas Kling  <akling@apple.com>
730
731         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
732         <http://webkit.org/b/116464>
733         <rdar://problem/10103795>
734
735         Reviewed by Anders Carlsson.
736
737         Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes,
738         just shut down the CoreIPC connection from the UI process. The web process, upon noticing this,
739         will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down.
740
741         (WebKit::WebProcessProxy::removeWebPage):
742
743             When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off
744             eventually, even if the WebPage::Close message never gets properly handled.
745
746         * Shared/ChildProcessProxy.h:
747         * Shared/ChildProcessProxy.cpp:
748         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
749
750             Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race
751             where the exiting web process may get re-used for a new tab.
752
753         * UIProcess/WebProcessProxy.h:
754         * UIProcess/WebProcessProxy.cpp:
755         (WebKit::WebProcessProxy::WebProcessProxy):
756         (WebKit::WebProcessProxy::enableSuddenTermination):
757         (WebKit::WebProcessProxy::disableSuddenTermination):
758
759             Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in
760             response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though.
761
762 2013-05-21  Anders Carlsson  <andersca@apple.com>
763
764         Fix build.
765
766         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
767         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
768         Stop using lambdas :(
769
770 2013-05-21  Anders Carlsson  <andersca@apple.com>
771
772         Provide an API to run sandboxed plug-ins outside of their sandbox
773         https://bugs.webkit.org/show_bug.cgi?id=116578
774
775         Reviewed by Andreas Kling.
776
777         * Platform/CoreIPC/HandleMessage.h:
778         (CoreIPC::callMemberFunction):
779         Add new overload.
780
781         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
782         (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
783         Handle "disable-sandbox".
784
785         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
786         (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
787         Handle "disable-sandbox".
788         
789         * PluginProcess/PluginProcess.h:
790         Move Type to PluginProcessAttributes and remove hash traits for type.
791         
792         * PluginProcess/mac/PluginProcessMac.mm:
793         (WebKit::PluginProcess::platformInitializePluginProcess):
794         Update for new type name.
795
796         (WebKit::PluginProcess::initializeSandbox):
797         Return early if the sandbox is disabled.
798
799         * Shared/Plugins/Netscape/PluginInformation.cpp:
800         (WebKit::getPluginModuleInformation):
801         PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin.
802
803         * Shared/Plugins/PluginModuleInfo.h:
804         Add PluginModuleLoadUnsandboxed.
805
806         * Shared/Plugins/PluginProcessAttributes.h: Added.
807         Add new header with various plug-in process attributes.
808
809         * Shared/Plugins/PluginProcessCreationParameters.h:
810         Change type enum.
811
812         * UIProcess/API/C/WKAPICast.h:
813         (WebKit::toWKPluginLoadPolicy):
814         (WebKit::toPluginModuleLoadPolicy):
815         Handle the unsandboxed enum.
816
817         * UIProcess/API/C/WKPage.h:
818         Add kWKPluginLoadPolicyLoadUnsandboxed.
819
820         * UIProcess/Plugins/PluginInfoStore.h:
821         Rename policyForPlugin to defaultLoadPolicyForPlugin.
822
823         * UIProcess/Plugins/PluginProcessManager.cpp:
824         (WebKit::PluginProcessManager::pluginProcessToken):
825         Add new helper function for getting a token given plug-in attributes.
826
827         (WebKit::PluginProcessManager::getPluginProcessConnection):
828         This now takes a pluginProcessToken.
829
830         (WebKit::PluginProcessManager::getSitesWithData):
831         Make sure to call pluginProcessToken.
832
833         (WebKit::PluginProcessManager::clearSiteData):
834         Ditto.
835
836         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
837         This now takes a token.
838
839         * UIProcess/Plugins/PluginProcessProxy.cpp:
840         (WebKit::PluginProcessProxy::create):
841         (WebKit::PluginProcessProxy::PluginProcessProxy):
842         Pass the PluginProcessAttributes as well as the plug-in process token.
843
844         (WebKit::PluginProcessProxy::getLaunchOptions):
845         Pass the plug-in process attributes to platformGetLaunchOptions.
846
847         (WebKit::PluginProcessProxy::didClose):
848         Pass the token to PluginProcessCrashed.
849
850         (WebKit::PluginProcessProxy::didFinishLaunching):
851         Update for type change.
852
853         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
854         (WebKit::shouldBlockPlugin):
855         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
856         Rename policyForPlugin to defaultLoadPolicyForPlugin.
857
858         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
859         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
860         Set the "disable-sandbox" data if needed.
861
862         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
863         (WebKit::PluginProcessProxy::openPluginPreferencePane):
864         Get the module info from m_pluginProcessAttributes.
865
866         * UIProcess/WebPageProxy.cpp:
867         (WebKit::WebPageProxy::findPlugin):
868         This now returns a token.
869
870         * UIProcess/WebPageProxy.messages.in:
871         FindPlugin now returns a token instead of the path.
872
873         * UIProcess/WebProcessProxy.cpp:
874         (WebKit::WebProcessProxy::getPluginProcessConnection):
875         Pass the token to the plug-in process manager.
876
877         * UIProcess/WebProcessProxy.messages.in:
878         This now takes a token.
879
880         * WebKit2.xcodeproj/project.pbxproj:
881         Add new files.
882
883         * WebProcess/Plugins/PluginProcessConnection.cpp:
884         (WebKit::PluginProcessConnection::PluginProcessConnection):
885         This now takes a token.
886
887         * WebProcess/Plugins/PluginProcessConnection.h:
888         (WebKit::PluginProcessConnection::create):
889         (WebKit::PluginProcessConnection::pluginProcessToken):
890         Create this with a token instead of a path and process type.
891
892         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
893         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
894         This now takes a token.
895
896         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
897         Ditto.
898
899         * WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
900         PluginProcessCrashed now takes a token.
901
902         * WebProcess/Plugins/PluginProxy.cpp:
903         (WebKit::PluginProxy::create):
904         (WebKit::PluginProxy::PluginProxy):
905         These now take tokens.
906
907         (WebKit::PluginProxy::initialize):
908         Pass the token when getting the connection.
909
910         * WebProcess/WebPage/WebPage.cpp:
911         (WebKit::WebPage::createPlugin):
912         Get the token from the UI process and pass it to the PluginProxy.
913
914         (WebKit::WebPage::canPluginHandleResponse):
915         Update now that FindPlugin returns a token.
916
917 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
918
919         [GTK] [CMake] Add support for building WebKit2
920         https://bugs.webkit.org/show_bug.cgi?id=116372
921
922         Reviewed by Gustavo Noronha Silva.
923
924         * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
925         from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
926         dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
927         installed header step.
928         * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
929         list. Fix up forwarding header dependencies now.
930         * PlatformGTK.cmake: Added.
931         * config.h: First check whether this is a CMake build and then fall back to the autotools header.
932
933 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
934
935         [GTK] Compile everything in C++11 mode
936         https://bugs.webkit.org/show_bug.cgi?id=116452
937
938         Reviewed by Anders Carlsson.
939
940         * GNUmakefile.am: Remove the -std=c++11 flags from the various CPPFLAGS lists, the mode is now specified
941         by default for all the C++ source code in SetupCompilerFlags.m4.
942
943 2013-05-21  Jessie Berlin  <jberlin@apple.com>
944
945         Expose a way to know when forms are added to a page or when form controls are added to a form
946         in the injected bundle
947         https://bugs.webkit.org/show_bug.cgi?id=116334
948
949         Reviewed by Alexey Proskuryakov.
950
951         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
952
953         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
954         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
955
956         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
957         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
958         Pass the message along to the client if the client has a handler.
959         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
960         Ditto.
961         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
962
963         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
964         (WebKit::WebChromeClient::didAssociateFormControls):
965         Tell the injected bundle form client for the page.
966         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
967         Ditto.
968         * WebProcess/WebCoreSupport/WebChromeClient.h:
969
970 2013-05-21  Michael Brüning  <michael.bruning@digia.com>
971
972         [Qt][WK2] Fix Mountain Lion builds after r150277.
973         https://bugs.webkit.org/show_bug.cgi?id=116467
974
975         Reviewed by Jocelyn Turcotte.
976
977         * Shared/API/c/WKBase.h:
978
979 2013-05-20  Lucas Forschler  <lforschler@apple.com>
980
981     Rollout r150398.
982
983 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
984
985         [GTK] Fix concatenations of string literals that are not C++11-compliant
986         https://bugs.webkit.org/show_bug.cgi?id=116449
987
988         Reviewed by Martin Robinson.
989
990         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
991         is simply a matter of separating the string and the string literal that are being concatenated with a space.
992
993         * UIProcess/API/gtk/tests/TestPrinting.cpp:
994         (testPrintOperationPrint):
995         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
996         (methodCallCallback):
997
998 2013-05-20  Commit Queue  <commit-queue@webkit.org>
999
1000         Unreviewed, rolling out r150384.
1001         http://trac.webkit.org/changeset/150384
1002         https://bugs.webkit.org/show_bug.cgi?id=116513
1003
1004         Not ready for primetime. (Requested by kling on #webkit).
1005
1006         * UIProcess/WebProcessProxy.cpp:
1007         (WebKit::WebProcessProxy::WebProcessProxy):
1008         (WebKit::WebProcessProxy::removeWebPage):
1009         * UIProcess/WebProcessProxy.h:
1010         (WebProcessProxy):
1011
1012 2013-05-20  Martin Robinson  <mrobinson@igalia.com>
1013
1014         Remove SharedMemoryGtk.cpp
1015         https://bugs.webkit.org/show_bug.cgi?id=116457
1016
1017         Reviewed by Andreas Kling.
1018
1019         * Platform/gtk/SharedMemoryGtk.cpp: Removed.
1020
1021 2013-05-20  Jessie Berlin  <jberlin@apple.com>
1022
1023         Expose a way to know when forms are added to a page or when form controls are added to a form
1024         in the injected bundle
1025         https://bugs.webkit.org/show_bug.cgi?id=116334
1026
1027         Reviewed by Alexey Proskuryakov.
1028
1029         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
1030
1031         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1032         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
1033
1034         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1035         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1036         Pass the message along to the client if the client has a handler.
1037         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
1038         Ditto.
1039         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1040
1041         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1042         (WebKit::WebChromeClient::didAssociateFormControls):
1043         Tell the injected bundle form client for the page.
1044         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
1045         Ditto.
1046         * WebProcess/WebCoreSupport/WebChromeClient.h:
1047
1048 2013-05-20  Tim Horton  <timothy_horton@apple.com>
1049
1050         Clients should have a way to extend rendering suppression
1051         https://bugs.webkit.org/show_bug.cgi?id=116463
1052         <rdar://problem/13738496>
1053
1054         Reviewed by Andy Estes.
1055
1056         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1057         (WKBundlePageExtendIncrementalRenderingSuppression): Added.
1058         (WKBundlePageStopExtendingIncrementalRenderingSuppression): Added.
1059         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1060         These only have any effect if SuppressesIncrementalRendering is also enabled.
1061
1062         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1063         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1064         Inform the FrameView if there are any outstanding rendering suppression tokens.
1065
1066         * WebProcess/WebPage/WebPage.cpp:
1067         (WebKit::WebPage::WebPage):
1068         (WebKit::WebPage::extendIncrementalRenderingSuppression):
1069         Return the next available rendering suppression token.
1070         Add it to the list of active tokens.
1071         Inform the FrameView that we want to suppress rendering.
1072
1073         (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression):
1074         Remove the given token from the list of active tokens.
1075         Un-suppress rendering if appropriate.
1076
1077         * WebProcess/WebPage/WebPage.h:
1078         (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):
1079         Return if there are any active rendering suppression tokens.
1080
1081 2013-05-20  Andreas Kling  <akling@apple.com>
1082
1083         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
1084         <http://webkit.org/b/116464>
1085         <rdar://problem/10103795>
1086
1087         Reviewed by Anders Carlsson.
1088
1089         Give the web process a 10 second chance to exit nicely after closing the last tab belonging to it.
1090         This code only runs if there was something on the page (e.g an unload/beforeunload event handler)
1091         preventing the UI process from killing it right away.
1092
1093         * UIProcess/WebProcessProxy.cpp:
1094         (WebKit::WebProcessProxy::WebProcessProxy):
1095         (WebKit::WebProcessProxy::removeWebPage):
1096         (WebKit::WebProcessProxy::forcefulTerminationTimerFired):
1097         * UIProcess/WebProcessProxy.h:
1098         (WebProcessProxy):
1099
1100 2013-05-20  Anders Carlsson  <andersca@apple.com>
1101
1102         Add helper function for converting a KeyedCodingValue to a CFTypeRef
1103         https://bugs.webkit.org/show_bug.cgi?id=116461
1104
1105         Reviewed by Tim Horton.
1106
1107         * Shared/cf/KeyedCodingValueCF.cpp: Added.
1108         * Shared/cf/KeyedCodingValueCF.h: Added.
1109
1110         * WebKit2.xcodeproj/project.pbxproj:
1111
1112 2013-05-20  Anders Carlsson  <andersca@apple.com>
1113
1114         Begin stubbing out a new KeyedEncoder class
1115         https://bugs.webkit.org/show_bug.cgi?id=116456
1116
1117         Reviewed by Sam Weinig.
1118
1119         This class (and it's coming counterpart, KeyedDecoder) will be used for serializing
1120         object graphs to a tree-like structure of dictionaries. It is up to individual ports to
1121         serialize them further (for example, on Mac they could be serialized to CFPropertyList objects).
1122         
1123         This will be used for serializing session storage state but I hope that it can be used for serializing
1124         back forward state in the future as our current implementation of back forward state serialization
1125         is fragile and depends on our IPC layer's binary encoding(!).
1126         
1127         * Shared/KeyedCodingValue.h: Added.
1128         * Shared/KeyedEncoder.cpp: Added.
1129         * Shared/KeyedEncoder.h: Added.
1130
1131         * WebKit2.xcodeproj/project.pbxproj:
1132
1133 2013-05-19  Sam Weinig  <sam@webkit.org>
1134
1135         Bump WKBundlePageLoaderClient version number so as not to break some clients
1136         https://bugs.webkit.org/show_bug.cgi?id=116426
1137
1138         Reviewed by Anders Carlsson.
1139
1140         * Shared/APIClientTraits.cpp:
1141         (WebKit):
1142         * Shared/APIClientTraits.h:
1143         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1144
1145 2013-05-19  Anders Carlsson  <andersca@apple.com>
1146
1147         Remove link prerendering code
1148         https://bugs.webkit.org/show_bug.cgi?id=116415
1149
1150         Reviewed by Darin Adler.
1151
1152         This code was only used by Chromium and is dead now.
1153
1154         * Configurations/FeatureDefines.xcconfig:
1155
1156 2013-05-18  Anders Carlsson  <andersca@apple.com>
1157
1158         Simplify the StorageArea setter functions
1159         https://bugs.webkit.org/show_bug.cgi?id=116402
1160
1161         Reviewed by Sam Weinig.
1162
1163         Remove security checking code that lives in Storage now.
1164
1165         * WebProcess/Storage/StorageAreaImpl.cpp:
1166         (WebKit::StorageAreaImpl::setItem):
1167         (WebKit::StorageAreaImpl::removeItem):
1168         (WebKit::StorageAreaImpl::clear):
1169         * WebProcess/Storage/StorageAreaImpl.h:
1170
1171 2013-05-18  Sam Weinig  <sam@webkit.org>
1172
1173         Fix some builds.
1174
1175         * UIProcess/API/mac/WKTypeRefWrapper.mm:
1176
1177 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1178
1179         REGRESSION(r150305): WebKit2 build broken with INDEXED_DATABASE enabled
1180         https://bugs.webkit.org/show_bug.cgi?id=116389
1181
1182         Reviewed by Martin Robinson.
1183
1184         There's no longer WebKeyValueStorageManager in the web process
1185         after r150305.
1186
1187         * WebProcess/WebPage/WebPageGroupProxy.cpp:
1188         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
1189
1190 2013-05-17  Sam Weinig  <sam@webkit.org>
1191
1192         Add a way to pass WebKit2 WKTypeRefs in Objective-C style user data messages
1193         https://bugs.webkit.org/show_bug.cgi?id=116345
1194
1195         Reviewed by Anders Carlsson.
1196
1197         In order to efficiently send a WKImageRef to another process when using the
1198         Objective-C WKConnection (or other user data messages), we need a way to encode
1199         WKTypeRefs in the objective-c object graph. Thus was born WKTypeRefWrapper.
1200
1201         * Shared/mac/ObjCObjectGraphCoders.mm:
1202         (WebKit::typeFromObject):
1203         (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
1204         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
1205         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
1206         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
1207         * UIProcess/API/mac/WKTypeRefWrapper.h: Added.
1208         * UIProcess/API/mac/WKTypeRefWrapper.mm: Added.
1209         (-[WKTypeRefWrapper initWithObject:]):
1210         (-[WKTypeRefWrapper object]):
1211         * WebKit2.xcodeproj/project.pbxproj:
1212
1213 2013-05-18  Anders Carlsson  <andersca@apple.com>
1214
1215         Simplify StorageArea getter functions
1216         https://bugs.webkit.org/show_bug.cgi?id=116399
1217
1218         Reviewed by Sam Weinig.
1219
1220         Remove security and private browsing checks.
1221
1222         * WebProcess/Storage/StorageAreaImpl.cpp:
1223         (WebKit::StorageAreaImpl::key):
1224         (WebKit::StorageAreaImpl::item):
1225         (WebKit::StorageAreaImpl::contains):
1226         * WebProcess/Storage/StorageAreaImpl.h:
1227
1228 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
1229
1230         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
1231         https://bugs.webkit.org/show_bug.cgi?id=114554
1232
1233         Reviewed by Gyuyoung Kim.
1234
1235         Using variables as target names is very uncommon in CMake.
1236         The usual way to specify the name of the resulting binary
1237         is to set the OUTPUT_NAME target property.
1238
1239         * CMakeLists.txt:
1240         * PlatformEfl.cmake:
1241         * efl/ewebkit2.pc.in:
1242
1243 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1244
1245         [GTK] Move GTK port off legacy clipboard
1246         https://bugs.webkit.org/show_bug.cgi?id=116221
1247
1248         Reviewed by Martin Robinson.
1249
1250         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Remove ClipboardGtk.h
1251         include.
1252         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
1253         (WebKit::WebDragClient::startDrag): Get the DataObjectGtk from the
1254         Pasteboard associated to the given Clipboard.
1255
1256 2013-05-18  Jinwoo Song  <jinwoo7.song@samsung.com>
1257
1258         [EFL][WK2] Refactor ewk_view_custom_encoding_set/get API
1259         https://bugs.webkit.org/show_bug.cgi?id=116386
1260
1261         Reviewed by Christophe Dumez.
1262
1263         Refactor the API to handle 'const char*' parameter in right way and
1264         enable the unit test which was disabled in r136230 as there is no assertion now.
1265
1266         * UIProcess/API/efl/EwkView.cpp:
1267         (EwkView::setCustomTextEncodingName):
1268         * UIProcess/API/efl/EwkView.h:
1269         (EwkView::customTextEncodingName):
1270         (EwkView):
1271         * UIProcess/API/efl/ewk_view.cpp:
1272         (ewk_view_custom_encoding_set):
1273         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1274         (TEST_F):
1275
1276 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
1277
1278         [CMake] Unreviewed speculative build fix after r150305 and r150306.
1279
1280         * CMakeLists.txt:
1281
1282 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
1283
1284         [Qt][WK2] Unreviewed build fix after r150305 and r150306.
1285
1286         * DerivedSources.pri:
1287         * Target.pri:
1288
1289 2013-05-18  Zan Dobersek  <zdobersek@igalia.com>
1290
1291         Unreviewed build fix for the GTK port after r150305 and r150306.
1292
1293         * GNUmakefile.list.am:
1294
1295 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1296
1297         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
1298         https://bugs.webkit.org/show_bug.cgi?id=116359
1299
1300         The condition was accidentally negated, fixing.
1301
1302         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1303         (WebKit::WebPlatformStrategies::isAvailable):
1304
1305 2013-05-17  Gavin Barraclough  <barraclough@apple.com>
1306
1307         Only allow 1 WebProcess to hold a PageCache
1308         https://bugs.webkit.org/show_bug.cgi?id=116368
1309         <rdar://problem/13392600>
1310
1311         Reviewed by Geoff Garen & Anders Carlson.
1312
1313         * UIProcess/WebContext.cpp:
1314         (WebKit::WebContext::WebContext):
1315         (WebKit::WebContext::processDidSaveToPageCache):
1316         (WebKit):
1317         (WebKit::WebContext::disconnectProcess):
1318         * UIProcess/WebContext.h:
1319             - Added m_processWithPageCache, only allow one process to keep a PageCache.
1320         (WebContext):
1321         * UIProcess/WebPageProxy.cpp:
1322         (WebKit::WebPageProxy::didSaveToPageCache):
1323         (WebKit):
1324         * UIProcess/WebPageProxy.h:
1325         (WebPageProxy):
1326         * UIProcess/WebPageProxy.messages.in:
1327             - Forward didSaveToPageCache to the WebProcessProxy.
1328         * UIProcess/WebProcessProxy.cpp:
1329         (WebKit::WebProcessProxy::addBackForwardItem):
1330         (WebKit::WebProcessProxy::didSaveToPageCache):
1331         (WebKit):
1332         (WebKit::WebProcessProxy::releasePageCache):
1333             - Forward releasePageCache to the WebProcess.
1334             - Forward didSaveToPageCache to the WebContext.
1335         * UIProcess/WebProcessProxy.h:
1336         (WebProcessProxy):
1337         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1338         (WebKit::WebFrameLoaderClient::didSaveToPageCache):
1339             - Forward didSaveToPageCache to the WebPageProxy.
1340         * WebProcess/WebProcess.cpp:
1341         (WebKit::WebProcess::releasePageCache):
1342         (WebKit):
1343         * WebProcess/WebProcess.h:
1344         (WebProcess):
1345         * WebProcess/WebProcess.messages.in:
1346             - Added 'ReleasePageCache' to instruct a web process to drop any cached pages.
1347
1348 2013-05-17  Anders Carlsson  <andersca@apple.com>
1349
1350         Share code between WebKit1 and WebKit2 StorageArea subclasses
1351         https://bugs.webkit.org/show_bug.cgi?id=116367
1352
1353         Reviewed by Andreas Kling.
1354
1355         * WebProcess/Storage/StorageAreaImpl.cpp:
1356         (WebKit::StorageAreaImpl::length):
1357         Remove code that's now in Storage::length.
1358
1359         (WebKit::StorageAreaImpl::storageType):
1360         Make this a virtual member function.
1361
1362         * WebProcess/Storage/StorageAreaImpl.h:
1363
1364 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1365
1366         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
1367         https://bugs.webkit.org/show_bug.cgi?id=116359
1368
1369         Reviewed by Anders Carlsson.
1370
1371         Implement SharedWorkerStrategy::isAvailable.
1372
1373         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1374         (WebKit::WebPlatformStrategies::isAvailable):
1375         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1376
1377 2013-05-17  Beth Dakin  <bdakin@apple.com>
1378
1379         Headers and footers will sometimes disappear and re-appear during page loads
1380         https://bugs.webkit.org/show_bug.cgi?id=116336
1381         -and corresponding-
1382         <rdar://problem/13886753>
1383
1384         Reviewed by Simon Fraser.
1385
1386         This patch changes the WebCore-level API that WebKit uses to create a banner. 
1387         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
1388         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
1389         layer has been created, it will call back into WK2 via ChromeClient. This will 
1390         allow WebCore to re-create the header/footer layers as needed whenever the 
1391         FrameView/RenderLayerCompositor have been destroyed and recreated.
1392
1393         Send the layers over to PageBanner.
1394         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1395         (WebKit::WebChromeClient::didAddHeaderLayer):
1396         (WebKit::WebChromeClient::didAddFooterLayer):
1397         * WebProcess/WebCoreSupport/WebChromeClient.h:
1398         (WebChromeClient):
1399
1400         PageBanner::addToPage() now does much less work since it can’t get the parent 
1401         layer right away. The work that is used to do once it had the parent layer is now 
1402         performed in didAddParentLayer()
1403         * WebProcess/WebPage/PageBanner.cpp:
1404         (WebKit::PageBanner::didAddParentLayer):
1405         * WebProcess/WebPage/PageBanner.h:
1406         * WebProcess/WebPage/mac/PageBannerMac.mm:
1407         (WebKit::PageBanner::addToPage):
1408         (WebKit::PageBanner::didAddParentLayer):
1409
1410 2013-05-17  Anders Carlsson  <andersca@apple.com>
1411
1412         Rename WebKeyValueStorageManagerProxy to WebKeyValueStorageManager
1413         https://bugs.webkit.org/show_bug.cgi?id=116361
1414
1415         Reviewed by Andreas Kling.
1416
1417         There's nothing proxy about this class anymore!
1418
1419         * UIProcess/API/C/WKAPICast.h:
1420         * UIProcess/API/C/WKContext.cpp:
1421         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1422         * UIProcess/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp.
1423         * UIProcess/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h.
1424         * WebKit2.xcodeproj/project.pbxproj:
1425
1426 2013-05-17  Anders Carlsson  <andersca@apple.com>
1427
1428         Remove dead local storage code
1429         https://bugs.webkit.org/show_bug.cgi?id=116360
1430
1431         Reviewed by Beth Dakin.
1432
1433         Storage is all handled in the UI process now so we no longer need a WebKeyValueStorageManager in the web process.
1434
1435         * DerivedSources.make:
1436         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1437         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
1438         (WebKit):
1439         (WebKit::didGetKeyValueStorageOrigins):
1440         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1441         * UIProcess/WebKeyValueStorageManagerProxy.h:
1442         (WebKeyValueStorageManagerProxy):
1443         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Removed.
1444         * WebKit2.xcodeproj/project.pbxproj:
1445         * WebProcess/Storage/WebKeyValueStorageManager.cpp: Removed.
1446         * WebProcess/Storage/WebKeyValueStorageManager.h: Removed.
1447         * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Removed.
1448         * WebProcess/WebPage/WebPage.cpp:
1449         (WebKit::WebPage::updatePreferences):
1450         * WebProcess/WebProcess.cpp:
1451         (WebKit::WebProcess::WebProcess):
1452
1453 2013-05-17  Anders Carlsson  <andersca@apple.com>
1454
1455         Use the UI process storage manager for deleting local storage data
1456         https://bugs.webkit.org/show_bug.cgi?id=116358
1457         <rdar://problem/13852829>
1458
1459         Reviewed by Andreas Kling.
1460
1461         * Shared/WebSecurityOrigin.h:
1462         (WebKit::WebSecurityOrigin::protocol):
1463         (WebKit::WebSecurityOrigin::host):
1464         (WebKit::WebSecurityOrigin::databaseIdentifier):
1465         (WebKit::WebSecurityOrigin::toString):
1466         Remove unneeded consts.
1467
1468         (WebKit::WebSecurityOrigin::securityOrigin):
1469         Add getter.
1470
1471         * UIProcess/Storage/LocalStorageDatabase.cpp:
1472         (WebKit::LocalStorageDatabase::close):
1473         deleteEmptyDatabaseWithOrigin has been renamed to deleteDatabaseWithOrigin.
1474
1475         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1476         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
1477         Rename since this is no longer used only for empty databases.
1478
1479         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
1480         Loop over the tracker database and delete all database files.
1481
1482         * UIProcess/Storage/StorageManager.cpp:
1483         (WebKit::StorageManager::StorageArea::clear):
1484         Clear the map, close the database and tell all event listeners to reset their caches.
1485
1486         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
1487         Loop over all storage areas and call clear on those matching the security origin.
1488
1489         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
1490         Loop over all storage areas and call clear on them.
1491         
1492         (WebKit::StorageManager::deleteEntriesForOrigin):
1493         Dispatch deleteEntriesForOriginInternal on the work queue.
1494
1495         (WebKit::StorageManager::deleteAllEntries):
1496         Dispatch deleteAllEntriesInternal on the work queue.
1497
1498         (WebKit::StorageManager::deleteEntriesForOriginInternal):
1499         Call clearStorageAreasMatchingOrigin on all local storage namespaces and then delete the database.
1500
1501         (WebKit::StorageManager::deleteAllEntriesInternal):
1502         Call clearAllStorageAreas on all local storage namespaces and then delete all databases.
1503
1504         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1505         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
1506         Call out to the storage manager.
1507
1508         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
1509         Ditto.
1510
1511         * WebProcess/Storage/StorageAreaMap.cpp:
1512         (WebKit::StorageAreaMap::clearCache):
1513         Call resetValues which will null out the storage map.
1514
1515         * WebProcess/Storage/StorageAreaMap.messages.in:
1516         Add ClearCache message.
1517
1518 2013-05-17  Anders Carlsson  <andersca@apple.com>
1519
1520         Only import local storage items from the database once
1521         https://bugs.webkit.org/show_bug.cgi?id=116354
1522
1523         Reviewed by Andreas Kling.
1524
1525         We import items from the database over and over, when we only want to do it once. Use a 
1526         boolean flag to guard against doing it more than once. 
1527         
1528         Also, rename importItemsFromDatabase to openDatabaseAndImportItemsIfNeeded since it now
1529         also opens the database (even if it doesn't need to import anything). This is preparation for an
1530         upcoming patch where the database will be closed when it's cleared.
1531
1532         * UIProcess/Storage/StorageManager.cpp:
1533         (StorageManager::StorageArea):
1534         (WebKit::StorageManager::StorageArea::StorageArea):
1535         (WebKit::StorageManager::StorageArea::setItem):
1536         (WebKit::StorageManager::StorageArea::removeItem):
1537         (WebKit::StorageManager::StorageArea::clear):
1538         (WebKit::StorageManager::StorageArea::items):
1539         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
1540
1541 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1542
1543         <rdar://problem/13869765> Lion: Crashes in islcCanLoadInputMethodFromBundleID.
1544
1545         Reviewed by Anders Carlsson.
1546
1547         * WebProcess/com.apple.WebProcess.sb.in: Allow text input directories.
1548
1549 2013-05-17  Anders Carlsson  <andersca@apple.com>
1550
1551         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
1552         https://bugs.webkit.org/show_bug.cgi?id=116346
1553         <rdar://problem/13852829>
1554
1555         Reviewed by Andreas Kling.
1556
1557         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1558         (WebKit::LocalStorageDatabaseTracker::origins):
1559         New helper function to return all the tracked origins.
1560
1561         * UIProcess/Storage/StorageManager.cpp:
1562         (WebKit::StorageManager::StorageManager):
1563         Initialize the UTF-8 encoding.
1564
1565         (WebKit::StorageManager::getOrigins):
1566         Call getOriginsInternal on our queue.
1567
1568         (WebKit::callCallbackFunction):
1569         Helper function for calling the callback function.
1570
1571         (WebKit::StorageManager::getOriginsInternal):
1572         Get the origins and make sure we call the callback with the given function dispatcher.
1573
1574         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
1575         (WebKit::didGetKeyValueStorageOriginsCallback):
1576         Construct the array of WebSecurityOrigin objects and call the callback.
1577
1578         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1579         Call StorageManager::getOrigins.
1580
1581 2013-05-16  Alexey Proskuryakov  <ap@apple.com>
1582
1583         Text input is largely broken when there are subframes loading
1584         http://bugs.webkit.org/show_bug.cgi?id=59121
1585         <rdar://problem/9320468>
1586
1587         Reviewed by Darin Adler.
1588
1589         * UIProcess/PageClient.h:
1590         * UIProcess/API/mac/PageClientImpl.h:
1591         * UIProcess/API/mac/PageClientImpl.mm:
1592         (WebKit::PageClientImpl::updateSecureInputState): Separated secure input state
1593         updating into a separate function. Removed updateTextInputState, we don't need
1594         to go through PageClient to implement its behavior at all.
1595         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added a FIXME.
1596
1597         * UIProcess/API/mac/WKView.mm:
1598         * UIProcess/API/mac/WKViewInternal.h:
1599         Removed _updateTextInputStateIncludingSecureInputState.
1600
1601         * UIProcess/WebPageProxy.h: Added m_temporarilyClosedComposition, which helps
1602         to figure out that WebCore decided to close a composition. The issue is that WebCore
1603         would first send an EditorState with hasComposition set to false, and with
1604         shouldIgnoreCompositionSelectionChange set to true, at which time we forget the
1605         previous m_editorState, but can't make any decisions based on this transient state.
1606         We should find a way to simplify this (maybe not send these updates with
1607         shouldIgnoreCompositionSelectionChange at all?)
1608
1609         * UIProcess/WebPageProxy.cpp:
1610         (WebKit::WebPageProxy::WebPageProxy): Initialize m_temporarilyClosedComposition.
1611         (WebKit::WebPageProxy::didCommitLoadForFrame): Removed the code to kill a composition
1612         when any frame commits a load, which made no sense (along with surrounding code,
1613         which will unfortunately survive longer).
1614         (WebKit::WebPageProxy::editorStateChanged): Implemented state updating here,
1615         we don't need to go to WKView.mm to implement this logic. Figure out when WebCore
1616         discards a composition, and notify input methods about this.
1617         (WebKit::WebPageProxy::resetStateAfterProcessExited): Reset m_temporarilyClosedComposition.
1618         Added some FIXMEs.
1619
1620 2013-05-17  Manuel Rego Casasnovas  <rego@igalia.com>
1621
1622         [WK2] Add support for selectTrailingWhitespaceEnabled setting
1623         https://bugs.webkit.org/show_bug.cgi?id=112426
1624
1625         Reviewed by Ryosuke Niwa.
1626
1627         * Shared/WebPreferencesStore.h:
1628         (WebKit): Add macro for selectTrailingWhitespaceEnabled.
1629         * UIProcess/API/C/WKPreferences.cpp:
1630         (WKPreferencesSetSelectTrailingWhitespaceEnabled):
1631         (WKPreferencesGetSelectTrailingWhitespaceEnabled): Implement methods
1632         using the new setting.
1633         * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
1634         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1635         (WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled): Implement
1636         method delegating in WebPage.
1637         * WebProcess/WebPage/WebPage.cpp:
1638         (WebKit::WebPage::updatePreferences): Set
1639         selectTrailingWhitespaceEnabled setting.
1640         (WebKit::WebPage::setSmartInsertDeleteEnabled): Set
1641         selectTrailingWhitespaceEnabled as they are mutually exclusive.
1642         (WebKit):
1643         (WebKit::WebPage::isSelectTrailingWhitespaceEnabled): Implement method
1644         using settings.
1645         (WebKit::WebPage::setSelectTrailingWhitespaceEnabled): Implement method
1646         using settings and set smartInsertDeleteEnabled as they are mutually
1647         exclusive.
1648         * WebProcess/WebPage/WebPage.h:
1649         (WebPage): Add new methods headers.
1650
1651 2013-05-17  Brady Eidson  <beidson@apple.com>
1652
1653         Fix crash introduced by http://trac.webkit.org/changeset/150282
1654         Followup to https://bugs.webkit.org/show_bug.cgi?id=116253
1655
1656         Reviewed by Andreas Kling.
1657
1658         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1659         (WebKit::WebChromeClient::focusedFrameChanged): Frame might be null.
1660
1661 2013-05-17  Brady Eidson  <beidson@apple.com>
1662
1663         Replace WebFrameLoaderClient static_casts with a function that might return null.
1664         https://bugs.webkit.org/show_bug.cgi?id=116253
1665
1666         The general approach here is:
1667         1 - Introduce a toWebFrameLoaderClient() function to convert FrameLoaderClients, and that may return null.
1668         2 - Adopt toWebFrameLoaderClient() everywhere we used to do a direct static_cast<WebFrameLoaderClient*>
1669         3 - In functions that already support a "return 0" scenario, a failed cast results in a return 0.
1670         4 - In other functions that assume no failure to get the WebFrameLoaderClient, add an ASSERT.
1671
1672         Reviewed by Alexey Proskuryakov.
1673
1674         Add the utility function to cast:
1675         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1676         (WebKit::toWebFrameLoaderClient):
1677
1678         Adopt it everywhere:
1679         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1680         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1681
1682         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1683         (WebKit::InjectedBundleNodeHandle::documentFrame):
1684         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
1685         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
1686
1687         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1688         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1689
1690         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1691         (WebKit::InjectedBundleDOMWindowExtension::frame):
1692
1693         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1694         (WebKit::InjectedBundleHitTestResult::frame):
1695         (WebKit::InjectedBundleHitTestResult::targetFrame):
1696
1697         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1698         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1699
1700         * WebProcess/Plugins/PluginView.cpp:
1701         (WebKit::webPage):
1702         (WebKit::PluginView::performFrameLoadURLRequest):
1703
1704         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1705         (WebKit::WebChromeClient::focusedNodeChanged):
1706         (WebKit::WebChromeClient::focusedFrameChanged):
1707         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1708         (WebKit::WebChromeClient::runJavaScriptAlert):
1709         (WebKit::WebChromeClient::runJavaScriptConfirm):
1710         (WebKit::WebChromeClient::runJavaScriptPrompt):
1711         (WebKit::WebChromeClient::print):
1712         (WebKit::WebChromeClient::exceededDatabaseQuota):
1713         (WebKit::WebChromeClient::runOpenPanel):
1714
1715         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1716         (WebKit::WebEditorClient::textFieldDidBeginEditing):
1717         (WebKit::WebEditorClient::textFieldDidEndEditing):
1718         (WebKit::WebEditorClient::textDidChangeInTextField):
1719         (WebKit::WebEditorClient::textDidChangeInTextArea):
1720         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
1721         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
1722
1723         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1724         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
1725         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
1726
1727         * WebProcess/WebPage/WebFrame.cpp:
1728         (WebKit::WebFrame::contentsAsString):
1729         (WebKit::WebFrame::parentFrame):
1730         (WebKit::WebFrame::childFrames):
1731         (WebKit::WebFrame::frameForContext):
1732         (WebKit::WebFrameFilter::shouldIncludeSubframe):
1733
1734         * WebProcess/WebPage/WebPage.cpp:
1735         (WebKit::WebPage::mainFrameHasCustomRepresentation):
1736
1737 2013-05-17  Sam Weinig  <sam@webkit.org>
1738
1739         Expose new load-with-userData API to Objective-C
1740         https://bugs.webkit.org/show_bug.cgi?id=116335
1741
1742         Reviewed by Anders Carlsson.
1743
1744         - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData:
1745           loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData.
1746         - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped
1747           in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks.
1748
1749         * Shared/API/c/WKBase.h:
1750         * Shared/API/c/WKSharedAPICast.h:
1751         * Shared/API/c/mac/WKBaseMac.h: Added.
1752         * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added.
1753         * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added.
1754         (WKObjCTypeWrapperGetTypeID):
1755         (WKObjCTypeWrapperCreate):
1756         (WKObjCTypeWrapperGetObject):
1757         * UIProcess/API/mac/WKBrowsingContextController.h:
1758         * UIProcess/API/mac/WKBrowsingContextController.mm:
1759         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
1760         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
1761         (-[WKBrowsingContextController loadRequest:]):
1762         (-[WKBrowsingContextController loadRequest:userData:]):
1763         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
1764         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
1765         (-[WKBrowsingContextController loadHTMLString:baseURL:]):
1766         (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
1767         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]):
1768         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
1769         * WebKit2.xcodeproj/project.pbxproj:
1770
1771 2013-05-17  Sam Weinig  <sam@webkit.org>
1772
1773         Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs
1774         https://bugs.webkit.org/show_bug.cgi?id=116325
1775
1776         Reviewed by Simon Fraser.
1777
1778         * UIProcess/API/C/WKPage.cpp:
1779         (WKPageLoadData):
1780         (WKPageLoadDataWithUserData):
1781         Add new SPI.
1782
1783         * UIProcess/API/C/WKPage.h:
1784         * UIProcess/WebPageProxy.cpp:
1785         (WebKit::WebPageProxy::loadData):
1786         * UIProcess/WebPageProxy.h:
1787         Pipe through to the WebProcess.
1788
1789         * WebProcess/WebPage/WebPage.h:
1790         * WebProcess/WebPage/WebPage.messages.in:
1791         * WebProcess/WebPage/WebPage.cpp:
1792         (WebKit::WebPage::loadDataImpl):
1793         (WebKit::WebPage::loadData):
1794         (WebKit::WebPage::loadHTMLString):
1795         (WebKit::WebPage::loadAlternateHTMLString):
1796         (WebKit::WebPage::loadPlainTextString):
1797         (WebKit::WebPage::loadWebArchiveData):
1798         Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict
1799         from IPC magic.
1800
1801
1802 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1803
1804         [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item
1805         https://bugs.webkit.org/show_bug.cgi?id=116321
1806
1807         Reviewed by Christophe Dumez.
1808
1809         During sub menu creation, after initializing m_parentMenu, parentMenu
1810         pointer became null which may cause segfaults. This patch fixes it by
1811         using m_parentMenu.
1812
1813         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1814         (EwkContextMenuItem::EwkContextMenuItem):
1815
1816 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1817
1818         [EFL][WK2] Support sub menu in ewk context menus
1819         https://bugs.webkit.org/show_bug.cgi?id=114729
1820
1821         Reviewed by Christophe Dumez.
1822
1823         Added submenu support in EwkContextMenu and an API function to receive
1824         Ewk_Context_Menu from submenu context menu item. A test case was added
1825         for new API function.
1826         EwkContextMenu is now an EwkObject allowing multiple instances of submenu
1827         to be used in different submenu type context menu items.
1828
1829         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1830         (EwkContextMenuItem::EwkContextMenuItem):
1831         (ewk_context_menu_item_new):
1832         (ewk_context_menu_item_parent_menu_get):
1833         (ewk_context_menu_item_submenu_get):
1834         * UIProcess/API/efl/ewk_context_menu_item.h:
1835         * UIProcess/API/efl/ewk_context_menu_item_private.h:
1836         (EwkContextMenuItem::create):
1837         (EwkContextMenuItem::parentMenu):
1838         (EwkContextMenuItem::subMenu):
1839         (EwkContextMenuItem):
1840         * UIProcess/API/efl/ewk_context_menu_private.h:
1841         (EwkContextMenu::ewkView):
1842         (EwkContextMenu):
1843         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1844         (showContextMenu):
1845
1846 2013-05-17  Zoltan Arvai  <zarvai@inf.u-szeged.hu>, Ádám Kallai  <kadam@inf.u-szeged.hu>
1847
1848         [Qt] Unreviewed build fix.
1849
1850         Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest.
1851
1852         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1853         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1854
1855 2013-05-16  Beth Dakin  <bdakin@apple.com>
1856
1857         Remove WKBundlePageGetHeaderLayer/Footer SPI
1858         https://bugs.webkit.org/show_bug.cgi?id=116254
1859
1860         Reviewed by Benjamin Poulain.
1861
1862         We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 
1863         recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer.
1864
1865         * WebKit2.xcodeproj/project.pbxproj:
1866         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed.
1867         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed.
1868         * WebProcess/WebPage/WebPage.h:
1869         (WebPage):
1870         * WebProcess/WebPage/mac/WebPageMac.mm:
1871         (WebKit):
1872         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
1873
1874 2013-05-14  Sam Weinig  <sam@webkit.org>
1875
1876         Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them
1877         https://bugs.webkit.org/show_bug.cgi?id=116132
1878
1879         Reviewed by Anders Carlsson.
1880
1881         Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions,
1882         willLoadURLRequest and willLoadDataRequest to let the bundle access them.
1883
1884         Adds WebKit2WillLoadTest.* API tests.
1885
1886         * UIProcess/API/C/WKPage.cpp:
1887         (WKPageLoadURLWithUserData):
1888         (WKPageLoadURLRequestWithUserData):
1889         (WKPageLoadFile):
1890         (WKPageLoadFileWithUserData):
1891         (WKPageLoadHTMLStringWithUserData):
1892         (WKPageLoadAlternateHTMLStringWithUserData):
1893         (WKPageLoadPlainTextStringWithUserData):
1894         (WKPageLoadWebArchiveDataWithUserData):
1895         * UIProcess/API/C/WKPage.h:
1896         * UIProcess/WebPageProxy.cpp:
1897         * UIProcess/WebPageProxy.h:
1898         (WebPageProxy):
1899         * WebKit2.xcodeproj/project.pbxproj:
1900         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1901         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1902         (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
1903         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
1904         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1905         (WebCore):
1906         (InjectedBundlePageLoaderClient):
1907         * WebProcess/WebPage/WebPage.cpp:
1908         * WebProcess/WebPage/WebPage.h:
1909         * WebProcess/WebPage/WebPage.messages.in:
1910
1911 2013-05-16  Manuel Rego Casasnovas  <rego@igalia.com>
1912
1913         [GTK] Fix memory leak in WebKitBackForwardList
1914         https://bugs.webkit.org/show_bug.cgi?id=116222
1915
1916         Reviewed by Carlos Garcia Campos.
1917
1918         Due to the use of leakRef() the ImmutableArray is not being released
1919         automatically. Adding a local variable in the methods to make sure that
1920         the ImmutableArray is freed.
1921
1922         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1923         (webkit_back_forward_list_get_back_list_with_limit): Add local variable
1924         RefPtr and pass the ImmutableArray to
1925         WebKitBackForwardList::webkitBackForwardListCreateList() using
1926         RefPtr::get().
1927         (webkit_back_forward_list_get_forward_list_with_limit): Ditto.
1928
1929 2013-05-16  Commit Queue  <commit-queue@webkit.org>
1930
1931         Unreviewed, rolling out r150034.
1932         http://trac.webkit.org/changeset/150034
1933         https://bugs.webkit.org/show_bug.cgi?id=116257
1934
1935         This work around doesn't work due to another bug NSUndoManager
1936         has (Requested by rniwa on #webkit).
1937
1938         * UIProcess/API/mac/PageClientImpl.mm:
1939         (WebKit::PageClientImpl::registerEditCommand):
1940
1941 2013-05-16  Tim Horton  <timothy_horton@apple.com>
1942
1943         PDFPlugins don't load when plugins are disabled, but they should
1944         https://bugs.webkit.org/show_bug.cgi?id=75790
1945         <rdar://problem/11650197>
1946
1947         Reviewed by Anders Carlsson.
1948
1949         Support loading "application" plug-ins even if plug-ins are explicitly disabled.
1950
1951         Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can
1952         be loaded even if plug-ins are disabled.
1953
1954         * Platform/CoreIPC/HandleMessage.h:
1955         (CoreIPC::callMemberFunction):
1956         Add a 5-argument, 3-reply version of callMemberFunction.
1957
1958         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1959         (WebKit::NetscapePluginModule::getPluginInfo):
1960         NPAPI plug-ins are not application plug-ins.
1961
1962         * Shared/WebCoreArgumentCoders.cpp:
1963         (CoreIPC::::encode):
1964         (CoreIPC::::decode):
1965         Encode/decode the new isApplicationPlugin field on PluginInfo.
1966
1967         * UIProcess/Plugins/PluginInfoStore.cpp:
1968         (WebKit::PluginInfoStore::findPluginForMIMEType):
1969         (WebKit::PluginInfoStore::findPluginForExtension):
1970         (WebKit::PluginInfoStore::findPlugin):
1971         * UIProcess/Plugins/PluginInfoStore.h:
1972         (PluginInfoStore):
1973         Give PluginInfoStore's findPlugin method and its private helper
1974         methods an argument allowing them to only match application plug-ins.
1975
1976         (WebKit::WebPageProxy::findPlugin):
1977         * UIProcess/WebPageProxy.h:
1978         (WebPageProxy):
1979         * UIProcess/WebPageProxy.messages.in:
1980         Add an argument allowing findPlugin to restrict its search to only application plug-ins.
1981
1982         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1983         (WebKit::WebFrameLoaderClient::objectContentType):
1984         Previously, this caller depended on pluginData() returning null if
1985         plug-ins were disabled. Since that is no longer the case, we have to
1986         check if we can use plug-ins, and otherwise ignore non-application-plug-ins.
1987
1988         * WebProcess/WebPage/WebPage.cpp:
1989         (WebKit::WebPage::createPlugin):
1990         When going to search for a plug-in, ask subframeLoader whether or not
1991         it's OK to use ordinary non-application plug-ins, and pass that information
1992         on to the UIProcess when performing the search.
1993
1994         (WebKit::WebPage::canPluginHandleResponse): Ditto.
1995         (WebKit::WebPage::canShowMIMEType):
1996         Ensure that canShowMIMEType returns true if we have an application plug-in
1997         that can display a particular MIME type, even if we're not allowed to load plug-ins.
1998
1999 2013-05-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2000
2001         [EFL][WK2] Make Ewk_Context_Menu Ewk_Object
2002         https://bugs.webkit.org/show_bug.cgi?id=116097
2003
2004         Reviewed by Gyuyoung Kim.
2005
2006         Changed Ewk_Context_Menu to be an Ewk_Object so pointer to menu
2007         object can be shared between different modules.
2008
2009         * UIProcess/API/efl/EwkView.cpp:
2010         (EwkView::showContextMenu):
2011         * UIProcess/API/efl/EwkView.h:
2012         (EwkView):
2013         * UIProcess/API/efl/ewk_context_menu.cpp:
2014         (EwkContextMenu::appendItem):
2015         (EwkContextMenu::removeItem):
2016         (ewk_context_menu_new):
2017         (ewk_context_menu_new_with_items):
2018         (ewk_context_menu_item_append):
2019         (ewk_context_menu_item_remove):
2020         (ewk_context_menu_hide):
2021         (ewk_context_menu_items_get):
2022         (ewk_context_menu_item_select):
2023         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2024         (EwkContextMenuItem::EwkContextMenuItem):
2025         (ewk_context_menu_item_new_with_submenu):
2026         * UIProcess/API/efl/ewk_context_menu_item_private.h:
2027         (EwkContextMenuItem):
2028         * UIProcess/API/efl/ewk_context_menu_private.h:
2029         (EwkContextMenu):
2030         (EwkContextMenu::create):
2031         * UIProcess/API/efl/ewk_defines.h:
2032
2033 2013-05-16  Andreas Kling  <akling@apple.com>
2034
2035         Page::chrome() should return a reference.
2036         <http://webkit.org/b/116185>
2037
2038         Reviewed by Anders Carlsson.
2039
2040 2013-05-16  Brady Eidson  <beidson@apple.com>
2041
2042         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
2043         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
2044
2045         Reviewed by Sam Weinig.
2046
2047         * NetworkProcess/SchedulableLoader.cpp:
2048         (WebKit::SchedulableLoader::SchedulableLoader): ASSERT that either there’s a frame and page ID, or
2049           that the client cannot be asked for credentials.
2050
2051         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2052         (WebKit::WebResourceLoadScheduler::scheduleLoad): Only cast the FrameLoaderClient and get WebFrame/WebPage
2053           if that is actually possible. Set the clientCredentialPolicy based on whether or not WebFrame/WebPage are
2054           available since they are needed to ask the UIProcess for credentials. ASSERT that either there’s both
2055           a frame and page ID or that the client won’t be asked for credentials.
2056
2057 2013-05-16  Timothy Hatcher  <timothy@apple.com>
2058
2059         Make the Find Banner in Safari work again with the docked Web Inspector.
2060
2061         https://webkit.org/b/116182
2062         rdar://problem/13857423
2063
2064         Reviewed by Benjamin Poulain.
2065
2066         * UIProcess/mac/WebInspectorProxyMac.mm:
2067         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2068         (WebKit::WebInspectorProxy::platformDetach):
2069         Preserve the top position of the inspected view so banners in Safari still work.
2070
2071 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2072
2073         [wk2] didGetImageForFindMatch can return a null image
2074         https://bugs.webkit.org/show_bug.cgi?id=116251
2075         <rdar://problem/13277246>
2076
2077         Reviewed by Simon Fraser.
2078
2079         Don't send didGetImageForFindMatch if we didn't get an image for
2080         the find match, which can happen if the selection is not visible.
2081
2082         * WebProcess/WebPage/FindController.cpp:
2083         (WebKit::FindController::getImageForFindMatch):
2084
2085 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2086
2087         [wk2] Minimum layout width is lost if the WebProcess crashes
2088         https://bugs.webkit.org/show_bug.cgi?id=116202
2089         <rdar://problem/13202320>
2090
2091         Reviewed by Darin Adler.
2092
2093         Send the minimum layout width to the WebProcess upon initialization,
2094         so that crashed-and-restarted WebProcesses have the correct width.
2095
2096         * Shared/WebPageCreationParameters.cpp:
2097         (WebKit::WebPageCreationParameters::encode):
2098         (WebKit::WebPageCreationParameters::decode):
2099         * Shared/WebPageCreationParameters.h:
2100         (WebPageCreationParameters):
2101         Add minimumLayoutWidth WebPage creation parameter.
2102
2103         * UIProcess/WebPageProxy.cpp:
2104         (WebKit::WebPageProxy::creationParameters):
2105         Send the current minimumLayoutWidth to the WebPage when it's created.
2106
2107         (WebKit::WebPageProxy::setMinimumLayoutWidth):
2108         Store minimumLayoutWidth changes that come in while the WebProcess is
2109         not valid, so that the correct width is sent once it is restarted.
2110
2111         * WebProcess/WebPage/WebPage.cpp:
2112         (WebKit::WebPage::WebPage):
2113         Set minimumLayoutWidth to the value provided by our creation parameters.
2114
2115 2013-05-16  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2116
2117         [Win] Unreviewed buildfix after r150161.
2118
2119         'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC,
2120         because it is also defined in MS SDK 7.1 winioctl.h.
2121
2122         * UIProcess/InspectorServer/HTTPRequest.cpp:
2123         (WebKit::HTTPRequest::HTTPRequest):
2124
2125 2013-05-16  Andras Becsi  <andras.becsi@digia.com>
2126
2127         [WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
2128         https://bugs.webkit.org/show_bug.cgi?id=116018
2129
2130         Rubber-stamped by Jocelyn Turcotte.
2131
2132         * Shared/Plugins/Netscape/PluginInformation.cpp:
2133         (WebKit::getPluginModuleInformation):
2134
2135 2013-05-15  Simon Cooper  <scooper@apple.com>
2136
2137         Enable printing in plugins
2138         https://bugs.webkit.org/show_bug.cgi?id=116201
2139         <rdar://problem/12347902>
2140
2141         Reviewed by Alexey Proskuryakov.
2142
2143         Add the printing entitlement so that legacy printing drivers can
2144         customize the print panel. Update the printing rules and enable them
2145         for the plugins.
2146
2147         * Configurations/PluginService.entitlements:
2148         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2149         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2150         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2151         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2152
2153 2013-05-15  Anders Carlsson  <andersca@apple.com>
2154
2155         Move HTTPRequest class to WebKit2
2156         https://bugs.webkit.org/show_bug.cgi?id=116192
2157
2158         Reviewed by Darin Adler.
2159
2160         Move HTTPRequest to WebKit2 and put it in the WebKit namespace.
2161
2162         * CMakeLists.txt:
2163         * GNUmakefile.list.am:
2164         * Target.pri:
2165         * UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp.
2166         * UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h.
2167         * UIProcess/InspectorServer/WebInspectorServer.cpp:
2168         * UIProcess/InspectorServer/WebInspectorServer.h:
2169         (WebInspectorServer):
2170         * UIProcess/InspectorServer/WebSocketServerClient.h:
2171         (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
2172         (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
2173         (WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
2174         * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
2175         * UIProcess/InspectorServer/WebSocketServerConnection.h:
2176         (WebKit):
2177         (WebSocketServerConnection):
2178
2179 2013-05-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2180
2181         [GTK] [WebKit2] enable displaying console.log messages to system console
2182         https://bugs.webkit.org/show_bug.cgi?id=115578
2183
2184         Reviewed by Martin Robinson.
2185
2186         Add a setting to enable/disable displaying of page messages to system
2187         console. Property is called enable-write-console-messages-to-stdout.
2188         Getter API function is
2189         webkit_settings_get_enable_write_console_messages_to_stdout
2190         Setter API function is
2191         webkit_settings_set_enable_write_console_messages_to_stdout
2192
2193         * UIProcess/API/gtk/WebKitSettings.cpp:
2194         (webKitSettingsSetProperty):
2195         (webKitSettingsGetProperty):
2196         (webkit_settings_class_init):
2197         (webkit_settings_get_enable_write_console_messages_to_stdout):
2198         (webkit_settings_set_enable_write_console_messages_to_stdout):
2199         * UIProcess/API/gtk/WebKitSettings.h:
2200         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2201         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2202         (testWebKitSettings):
2203
2204 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
2205
2206         Process suppression should throttle scripted animations
2207         https://bugs.webkit.org/show_bug.cgi?id=115812
2208
2209         Reviewed by Simon Fraser.
2210
2211         <rdar://problem/13799726>
2212
2213         * WebProcess/WebPage/WebPage.cpp:
2214         (WebKit::WebPage::setThrottled):
2215         (WebKit):
2216         * WebProcess/WebPage/WebPage.h:
2217         (WebPage):
2218             - Added setThrottled, forwards to WebCore::Page.
2219         * WebProcess/WebProcess.cpp:
2220         (WebKit):
2221         (WebKit::WebProcess::setProcessSuppressionEnabled):
2222         * WebProcess/WebProcess.h:
2223         (WebProcess):
2224             - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled.
2225
2226 2013-05-15  Anders Carlsson  <andersca@apple.com>
2227
2228         WKPageGetPluginInformationDisplayNameKey doesn't return the right key
2229         https://bugs.webkit.org/show_bug.cgi?id=116188
2230
2231         Reviewed by Andreas Kling.
2232
2233         * UIProcess/API/C/WKPage.cpp:
2234         (WKPageGetPluginInformationDisplayNameKey):
2235
2236 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2237
2238         More fixing after WebProcessShim renaming in r149074.
2239
2240         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
2241         (WebContentServiceInitializer): Updated a comment to mention the shim by its new name.
2242
2243 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2244
2245         <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
2246         launching Safari
2247
2248         Reviewed by Anders Carlsson.
2249
2250         * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.
2251
2252 2013-05-13  Anders Carlsson  <andersca@apple.com>
2253
2254         Frame::editor() should return a reference
2255         https://bugs.webkit.org/show_bug.cgi?id=116037
2256
2257         Reviewed by Darin Adler.
2258
2259         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2260         (WebKit::WebContextMenuClient::searchWithGoogle):
2261         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2262         (WebKit::WebEditorClient::updateGlobalSelection):
2263         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
2264         (WebKit::WebEditorClient::handleInputMethodKeydown):
2265         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2266         (WebKit::WebEditorClient::executePendingEditorCommands):
2267         (WebKit::WebEditorClient::handleKeyboardEvent):
2268         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2269         (WebKit::WebContextMenuClient::searchWithGoogle):
2270         (WebKit::WebContextMenuClient::searchWithSpotlight):
2271         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2272         (WebKit::changeWordCase):
2273         * WebProcess/WebPage/WebFrame.cpp:
2274         (WebKit::WebFrame::selectionAsString):
2275         (WebKit::WebFrame::setTextDirection):
2276         * WebProcess/WebPage/WebPage.cpp:
2277         (WebKit::WebPage::editorState):
2278         (WebKit::WebPage::executeEditingCommand):
2279         (WebKit::WebPage::isEditingCommandEnabled):
2280         (WebKit::WebPage::validateCommand):
2281         (WebKit::WebPage::handleEditingKeyboardEvent):
2282         (WebKit::WebPage::advanceToNextMisspelling):
2283         (WebKit::WebPage::uppercaseWord):
2284         (WebKit::WebPage::lowercaseWord):
2285         (WebKit::WebPage::capitalizeWord):
2286         (WebKit::WebPage::replaceSelectionWithText):
2287         (WebKit::WebPage::handleAlternativeTextUIResult):
2288         (WebKit::WebPage::setCompositionForTesting):
2289         (WebKit::WebPage::hasCompositionForTesting):
2290         (WebKit::WebPage::confirmCompositionForTesting):
2291         (WebKit::WebPage::setComposition):
2292         (WebKit::WebPage::cancelComposition):
2293         * WebProcess/WebPage/efl/WebPageEfl.cpp:
2294         (WebKit::WebPage::confirmComposition):
2295         (WebKit::WebPage::setComposition):
2296         (WebKit::WebPage::cancelComposition):
2297         * WebProcess/WebPage/mac/WebPageMac.mm:
2298         (WebKit::WebPage::executeKeypressCommandsInternal):
2299         (WebKit::WebPage::handleEditingKeyboardEvent):
2300         (WebKit::WebPage::setComposition):
2301         (WebKit::WebPage::confirmComposition):
2302         (WebKit::WebPage::cancelComposition):
2303         (WebKit::WebPage::insertText):
2304         (WebKit::WebPage::insertDictatedText):
2305         (WebKit::WebPage::getMarkedRange):
2306         (WebKit::WebPage::firstRectForCharacterRange):
2307         (WebKit::WebPage::readSelectionFromPasteboard):
2308         (WebKit::WebPage::getStringSelectionForPasteboard):
2309         (WebKit::WebPage::getDataSelectionForPasteboard):
2310
2311 2013-05-15  Anders Carlsson  <andersca@apple.com>
2312
2313         Need a way for NPAPI plug-ins to open preference panes
2314         https://bugs.webkit.org/show_bug.cgi?id=116173
2315         <rdar://problem/13503848>
2316
2317         Reviewed by Sam Weinig.
2318
2319         * PluginProcess/PluginControllerProxy.h:
2320         Add openPluginPreferencePane().
2321
2322         * PluginProcess/mac/PluginControllerProxyMac.mm:
2323         (WebKit::PluginControllerProxy::openPluginPreferencePane):
2324         Send OpenPluginPreferencePane to the UI process.
2325
2326         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2327         (WebKit::NetscapePluginModule::getPluginInfo):
2328         Get the preference pane path.
2329         
2330         * Shared/Plugins/PluginModuleInfo.h:
2331         Add preferencePanePath member variable.
2332
2333         * UIProcess/Plugins/PluginProcessProxy.h:
2334         Add openPluginPreferencePane message handler.
2335
2336         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2337         ADd OpenPluginPreferencePane message.
2338
2339         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2340         (WebKit::PluginProcessProxy::openPluginPreferencePane):
2341         Get the path to the preference pane and use LS to open it.
2342
2343         * WebKit2.xcodeproj/project.pbxproj:
2344         Add new files.
2345
2346         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2347         (WebKit::NPN_GetValue):
2348         Handle WKNVPlugInContainer.
2349
2350         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2351         Add WKNVPlugInContainer member variable.
2352
2353         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2354         (WebKit::NetscapePlugin::openPluginPreferencePane):
2355         Call through to the plug-in controller.
2356
2357         (WebKit::NetscapePlugin::plugInContainer):
2358         Create a WKNPAPIPlugInContainer object if necessary.
2359
2360         (WebKit::NetscapePlugin::platformDestroy):
2361         Invalidate the WKNPAPIPlugInContainer object.
2362
2363         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
2364         New file with the protocol definition.
2365
2366         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
2367         (-[WKNPAPIPlugInContainer dealloc]):
2368         Assert that the plug-in is null (that we've been invalidated).
2369
2370         (-[WKNPAPIPlugInContainer _invalidate]):
2371         Set the plug-in to null.
2372
2373         (-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
2374         Call through to the plug-in.
2375
2376         * WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
2377         New file with the interface declaration for the object that implements the protocol.
2378
2379         * WebProcess/Plugins/PluginController.h:
2380         Add openPluginPreferencePane member function.
2381
2382         * WebProcess/Plugins/PluginView.cpp:
2383         (WebKit::PluginView::openPluginPreferencePane):
2384         Add stub; this should never be called since we always go through the UI process.
2385
2386 2013-05-15  Alexey Proskuryakov  <ap@apple.com>
2387
2388         [WK2][Mac] Split resetTextInputState into two functions
2389         https://bugs.webkit.org/show_bug.cgi?id=116174
2390
2391         Reviewed by Anders Carlsson.
2392
2393         Splitting resetTextInputState into resetSecureInputState and
2394         notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
2395         won't be happening simultaneously.
2396
2397         * UIProcess/API/mac/PageClientImpl.h:
2398         * UIProcess/API/mac/PageClientImpl.mm:
2399         (WebKit::PageClientImpl::resetSecureInputState):
2400         (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2401         * UIProcess/API/mac/WKView.mm:
2402         (-[WKView resignFirstResponder]):
2403         (-[WKView _resetSecureInputState]):
2404         (-[WKView _notifyInputContextAboutDiscardedComposition]):
2405         * UIProcess/API/mac/WKViewInternal.h:
2406         * UIProcess/PageClient.h:
2407         * UIProcess/WebPageProxy.cpp:
2408         (WebKit::WebPageProxy::didCommitLoadForFrame):
2409
2410 2013-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2411
2412         [GTK] Add padding to all public class structs for future expansion without breaking ABI
2413         https://bugs.webkit.org/show_bug.cgi?id=112565
2414
2415         Reviewed by Anders Carlsson.
2416
2417         Use 4 pointers for most of the classes that are unlikely to grow
2418         and 8 for WebKitWebView and WebKitWebContext.
2419
2420         * UIProcess/API/gtk/WebKitBackForwardList.h:
2421         (_WebKitBackForwardListClass):
2422         * UIProcess/API/gtk/WebKitBackForwardListItem.h:
2423         (_WebKitBackForwardListItemClass):
2424         * UIProcess/API/gtk/WebKitContextMenu.h:
2425         (_WebKitContextMenuClass):
2426         * UIProcess/API/gtk/WebKitContextMenuItem.h:
2427         (_WebKitContextMenuItemClass):
2428         * UIProcess/API/gtk/WebKitCookieManager.h:
2429         (_WebKitCookieManagerClass):
2430         * UIProcess/API/gtk/WebKitDownload.h:
2431         (_WebKitDownloadClass):
2432         * UIProcess/API/gtk/WebKitFaviconDatabase.h:
2433         (_WebKitFaviconDatabaseClass):
2434         * UIProcess/API/gtk/WebKitFileChooserRequest.h:
2435         (_WebKitFileChooserRequestClass):
2436         * UIProcess/API/gtk/WebKitFindController.h:
2437         (_WebKitFindControllerClass):
2438         * UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
2439         (_WebKitFormSubmissionRequestClass):
2440         * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
2441         (_WebKitGeolocationPermissionRequestClass):
2442         * UIProcess/API/gtk/WebKitHitTestResult.h:
2443         (_WebKitHitTestResultClass):
2444         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
2445         (_WebKitNavigationPolicyDecisionClass):
2446         * UIProcess/API/gtk/WebKitPlugin.h:
2447         (_WebKitPluginClass):
2448         * UIProcess/API/gtk/WebKitPolicyDecision.h:
2449         (_WebKitPolicyDecisionClass):
2450         * UIProcess/API/gtk/WebKitPrintOperation.h:
2451         (_WebKitPrintOperationClass):
2452         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
2453         (_WebKitResponsePolicyDecisionClass):
2454         * UIProcess/API/gtk/WebKitSecurityManager.h:
2455         (_WebKitSecurityManagerClass):
2456         * UIProcess/API/gtk/WebKitSettings.h:
2457         (_WebKitSettingsClass):
2458         * UIProcess/API/gtk/WebKitURIRequest.h:
2459         (_WebKitURIRequestClass):
2460         * UIProcess/API/gtk/WebKitURIResponse.h:
2461         (_WebKitURIResponseClass):
2462         * UIProcess/API/gtk/WebKitURISchemeRequest.h:
2463         (_WebKitURISchemeRequestClass):
2464         * UIProcess/API/gtk/WebKitWebContext.h:
2465         (_WebKitWebContextClass):
2466         * UIProcess/API/gtk/WebKitWebInspector.h:
2467         (_WebKitWebInspectorClass):
2468         * UIProcess/API/gtk/WebKitWebResource.h:
2469         (_WebKitWebResourceClass):
2470         * UIProcess/API/gtk/WebKitWebView.h:
2471         (_WebKitWebViewClass):
2472         * UIProcess/API/gtk/WebKitWebViewBase.h:
2473         (_WebKitWebViewBaseClass):
2474         * UIProcess/API/gtk/WebKitWebViewGroup.h:
2475         (_WebKitWebViewGroupClass):
2476         * UIProcess/API/gtk/WebKitWindowProperties.h:
2477         (_WebKitWindowPropertiesClass):
2478
2479 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2480
2481         Remove WTF_USE_PLATFORM_STRATEGIES
2482         https://bugs.webkit.org/show_bug.cgi?id=114431
2483
2484         Reviewed by Darin Adler.
2485
2486         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2487         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2488         * WebProcess/WebProcess.cpp:
2489         (WebKit::WebProcess::WebProcess):
2490
2491 2013-05-14  Simon Cooper  <scooper@apple.com>
2492
2493         Add a preference that can disable the fake SYSV SHM shim
2494         https://bugs.webkit.org/show_bug.cgi?id=116127
2495         <rdar://problem/13810524>
2496
2497         Reviewed by Alexey Proskuryakov.
2498
2499         * PluginProcess/mac/PluginProcessShim.mm:
2500         (WebKit::shim_disabled):
2501         (WebKit::shim_shmdt):
2502         (WebKit::shim_shmat):
2503         (WebKit::shim_shmget):
2504         (WebKit::shim_shmctl):
2505
2506 2013-05-14  Tim Horton  <timothy_horton@apple.com>
2507
2508         [wk2] Not updating tiled backing coverage when main frame scrollability changes
2509         https://bugs.webkit.org/show_bug.cgi?id=116123
2510         <rdar://problem/13836559>
2511
2512         Reviewed by Simon Fraser.
2513
2514         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2515         (TiledCoreAnimationDrawingArea):
2516         Add updateMainFrameClipsToExposedRect.
2517
2518         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2519         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2520         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2521         Remove m_clipsToExposedRect. We don't actually need it.
2522
2523         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
2524         Call updateMainFrameClipsToExposedRect so that we can always update
2525         tiled backing coverage and can factor out our calls to setClipsToExposedRect.
2526
2527         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
2528         Factor out setClipsToExposedRect calls to here, and also call
2529         FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
2530         backing is informed to allow overdraw in the UI-process-scrolling case.
2531
2532         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2533         Use updateMainFrameClipsToExposedRect.
2534
2535 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
2536
2537         [Mac] Add a testing shim for secure event input functions
2538         https://bugs.webkit.org/show_bug.cgi?id=116122
2539
2540         Reviewed by Mark Rowe.
2541
2542         Moved DyldInterpose.h to WebCore, as we now use it there too.
2543
2544         * PluginProcess/mac/PluginProcessShim.mm:
2545         * Shared/mac/CookieStorageShimLibrary.cpp:
2546         * Shared/mac/DyldInterpose.h: Removed.
2547         * WebKit2.xcodeproj/project.pbxproj:
2548         * WebProcess/mac/SecItemShimLibrary.mm:
2549
2550 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2551
2552         [Win] REGRESSION(r149944): mmap is not available on Windows
2553         https://bugs.webkit.org/show_bug.cgi?id=116015
2554
2555         Reviewed by Anders Carlsson.
2556
2557         Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
2558         using mmap is not necessary and maybe not available.
2559
2560         * Platform/CoreIPC/ArgumentEncoder.cpp:
2561         (CoreIPC::allocBuffer):
2562         (CoreIPC::freeBuffer):
2563         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
2564         (CoreIPC::ArgumentEncoder::grow):
2565
2566 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
2567
2568         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
2569         https://bugs.webkit.org/show_bug.cgi?id=115921
2570
2571         Reviewed by Gustavo Noronha Silva.
2572
2573         * GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.
2574
2575 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2576
2577         [WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
2578         https://bugs.webkit.org/show_bug.cgi?id=116039
2579
2580         Reviewed by Benjamin Poulain.
2581
2582         According to the documentation, DeleteTimerQueueTimer can be expected to return
2583         false with an ERROR_IO_PENDING error when called from the timer's callback.
2584
2585         * Platform/win/WorkQueueWin.cpp:
2586         (WorkQueue::timerCallback):
2587
2588 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
2589
2590         Remove unused "type" field from DictionaryPopupInfo
2591         https://bugs.webkit.org/show_bug.cgi?id=116011
2592
2593         Reviewed by Darin Adler.
2594
2595         It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.
2596
2597         * Shared/DictionaryPopupInfo.cpp:
2598         (WebKit::DictionaryPopupInfo::encode):
2599         (WebKit::DictionaryPopupInfo::decode):
2600         * Shared/DictionaryPopupInfo.h:
2601         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2602         (WebKit::PDFPlugin::showDefinitionForAttributedString):
2603         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2604         (WebKit::WebContextMenuClient::lookUpInDictionary):
2605         * WebProcess/WebPage/WebPage.h:
2606         * WebProcess/WebPage/mac/WebPageMac.mm:
2607         (WebKit::WebPage::performDictionaryLookupAtLocation):
2608         (WebKit::WebPage::performDictionaryLookupForSelection):
2609         (WebKit::WebPage::performDictionaryLookupForRange):
2610
2611 2013-05-14  Michael Brüning  <michael.bruning@digia.com>
2612
2613         [WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
2614         https://bugs.webkit.org/show_bug.cgi?id=110218
2615
2616         Reviewed by Darin Adler.
2617
2618         Make the WebPageProxy::creationParameters use the accessor
2619         deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
2620         directly. This will restore the custom device scale factor when
2621         reattaching to the WebProcess after a crash.
2622
2623         Moreover, it will enable the Qt and ELF ports to use the
2624         existing C API for overriding the device scale factor instead
2625         of using the WebPageProxy directly or adding new C API to set
2626         the intrinsic device scale factor.
2627
2628         * UIProcess/API/efl/EwkView.cpp:
2629         (EwkView::setDeviceScaleFactor):
2630         * UIProcess/API/qt/qquickwebpage.cpp:
2631         (QQuickWebPage::updatePaintNode):
2632         * UIProcess/WebPageProxy.cpp:
2633         (WebKit::WebPageProxy::creationParameters):
2634
2635 2013-05-13  Alex Christensen  <achristensen@apple.com>
2636
2637         Added testRunner.setPrinting.
2638         https://bugs.webkit.org/show_bug.cgi?id=42693
2639         rdar://problem/8213845
2640
2641         Reviewed by Darin Adler.
2642
2643         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2644         (WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
2645         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2646         Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
2647         * WebProcess/WebPage/WebPage.cpp:
2648         (WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
2649         * WebProcess/WebPage/WebPage.h:
2650         Added renderTreeExternalRepresentationForPrinting declaration.
2651
2652 2013-05-13  Timothy Hatcher  <timothy@apple.com>
2653
2654         Add support for updating the Web Inspector toolbar height.
2655
2656         https://bugs.webkit.org/show_bug.cgi?id=115996
2657
2658         Reviewed by Joseph Pecoraro and Benjamin Poulain.
2659
2660         * UIProcess/WebInspectorProxy.h:
2661         (WebKit::WebInspectorProxy::setToolbarHeight):
2662         (WebInspectorProxy):
2663         * UIProcess/WebInspectorProxy.messages.in:
2664         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2665         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2666         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2667         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2668         (WebKit):
2669         * UIProcess/mac/WebInspectorProxyMac.mm:
2670         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2671         * UIProcess/qt/WebInspectorProxyQt.cpp:
2672         (WebKit::WebInspectorProxy::platformSetToolbarHeight):
2673         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2674         (WebKit::WebInspectorFrontendClient::setToolbarHeight):
2675         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
2676         (WebInspectorFrontendClient):
2677         * WebProcess/WebPage/WebInspector.cpp:
2678         (WebKit::WebInspector::setToolbarHeight):
2679         * WebProcess/WebPage/WebInspector.h:
2680
2681 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2682
2683         Sometimes NSUndoManager can get into an inconsistent state
2684         https://bugs.webkit.org/show_bug.cgi?id=116050
2685
2686         Reviewed by Enrica Casucci.
2687
2688         Always group undo items to work around a bug in NSUndoManager that manifests
2689         when we call removeAllActionsWithTarget.
2690
2691         * UIProcess/API/mac/PageClientImpl.mm:
2692         (WebKit::PageClientImpl::registerEditCommand):
2693
2694 2013-05-13  Anders Carlsson  <andersca@apple.com>
2695
2696         [WK2] Crash in WebKit::StorageAreaMap::didSetItem()
2697         https://bugs.webkit.org/show_bug.cgi?id=116026
2698
2699         Reviewed by Andreas Kling.
2700
2701         Make sure that we ignore any leftover messages from the UI process after we've reset
2702         the storage map. Achieve this by keeping a seed count in the StorageAreaMap object that's incremented
2703         everytime the map is reset. Associate every storage area change with the seed and ignore any incoming 
2704         notification messages from the UI process if the seeds are different.
2705
2706         * Platform/CoreIPC/HandleMessage.h:
2707         (CoreIPC):
2708         (CoreIPC::callMemberFunction):
2709         * UIProcess/Storage/StorageManager.cpp:
2710         (WebKit::StorageManager::getValues):
2711         (WebKit::StorageManager::setItem):
2712         (WebKit::StorageManager::removeItem):
2713         (WebKit::StorageManager::clear):
2714         * UIProcess/Storage/StorageManager.h:
2715         (StorageManager):
2716         * UIProcess/Storage/StorageManager.messages.in:
2717         * WebProcess/Storage/StorageAreaMap.cpp:
2718         (WebKit::StorageAreaMap::StorageAreaMap):
2719         (WebKit::StorageAreaMap::setItem):
2720         (WebKit::StorageAreaMap::removeItem):
2721         (WebKit::StorageAreaMap::clear):
2722         (WebKit::StorageAreaMap::resetValues):
2723         (WebKit::StorageAreaMap::loadValuesIfNeeded):
2724         (WebKit::StorageAreaMap::didGetValues):
2725         (WebKit::StorageAreaMap::didSetItem):
2726         (WebKit::StorageAreaMap::didRemoveItem):
2727         (WebKit::StorageAreaMap::didClear):
2728         (WebKit::StorageAreaMap::applyChange):
2729         * WebProcess/Storage/StorageAreaMap.h:
2730         (StorageAreaMap):
2731         * WebProcess/Storage/StorageAreaMap.messages.in:
2732
2733 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2734
2735         [WK2][CoordinatedGraphics] Avoid dispensable calls to WebView::updateViewportSize()
2736         https://bugs.webkit.org/show_bug.cgi?id=116045
2737
2738         Reviewed by Darin Adler.
2739
2740         * UIProcess/CoordinatedGraphics/WebView.cpp:
2741         (WebKit::WebView::setSize):
2742
2743 2013-05-13  Jon Lee  <jonlee@apple.com>
2744
2745         [WK2] Notification manager removal should not be tied to termination of web processes
2746         https://bugs.webkit.org/show_bug.cgi?id=116038
2747         <rdar://problem/10968680>
2748
2749         Reviewed by Ryosuke Niwa.
2750
2751         WebNotificationManagerProxy incorrectly removes the manager when web processes close.
2752         Since it is a supplemental on the web context, the manager should only be removed
2753         when the context is destroyed.
2754
2755         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2756         * UIProcess/Notifications/WebNotificationManagerProxy.h: Remove implementation of
2757         processDidClose().
2758
2759 2013-05-13  Martin Robinson  <mrobinson@igalia.com>
2760
2761         [GTK] [WebKit2] Use a template file for generated GObject enum files
2762         https://bugs.webkit.org/show_bug.cgi?id=115867
2763
2764         Reviewed by Carlos Garcia Campos.
2765
2766         * GNUmakefile.am: Use a template file instead of specifying portions of the file on the command-line.
2767         * UIProcess/API/gtk/WebKitEnumTypes.cpp.template: Added.
2768         * UIProcess/API/gtk/WebKitEnumTypes.h.template: Added.
2769         * UIProcess/API/gtk/WebKitFindController.cpp: We can no longer rely on WebKitEnumTypes.h to pull in WebKitWebView.h.
2770
2771 2013-05-13  Noam Rosenthal  <noam@webkit.org>
2772
2773         [CoordGfx] requestAnimationFrame performance issues
2774         https://bugs.webkit.org/show_bug.cgi?id=112345
2775
2776         Reviewed by Jocelyn Turcotte.
2777
2778         Changed the logic of requestAnimationFrame in Coordinated Graphics.
2779         We don't send any IPC messages for requestAnimationFrame. Instead, we do one of two things:
2780         - If there is already a frame pending in the UI process, do nothing, as the animations would
2781           be serviced when the frame is returned to the web process.
2782         - If there is no frame pending, we schedule a flush, making sure that that flush occurs at 
2783           least 1/60 seconds after the last animation service, so that we don't get an infinite loop
2784           of flushes.
2785
2786         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2787         (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame):
2788         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
2789         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2790         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2791         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
2792         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
2793         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2794         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
2795
2796 2013-05-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2797
2798         [WK2][CoordinatedGraphics] WKView needs API for handling opacity
2799         https://bugs.webkit.org/show_bug.cgi?id=116032
2800
2801         Reviewed by Kenneth Rohde Christiansen.
2802
2803         Add WKViewSetOpacity and WKViewOpacity APIs and use them in
2804         WebView.cpp.
2805
2806         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
2807         (WKViewSetOpacity):
2808         (WKViewOpacity):
2809         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
2810         * UIProcess/CoordinatedGraphics/WebView.cpp:
2811         (WebKit::WebView::WebView):
2812         (WebKit::WebView::paintToCurrentGLContext):
2813         * UIProcess/CoordinatedGraphics/WebView.h:
2814         (WebKit::WebView::setOpacity):
2815         (WebKit::WebView::opacity):
2816         (WebView):
2817
2818 2013-05-13  Zan Dobersek  <zdobersek@igalia.com>
2819
2820         [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess
2821         https://bugs.webkit.org/show_bug.cgi?id=115918
2822
2823         Reviewed by Gustavo Noronha Silva.
2824
2825         Due to layer violations and circular dependencies the WebKitPluginProcess requires for the
2826         libraries containing the built code of the intertwining Platform and WebCore layers to be
2827         specified multiple times when linking. This can be avoided by packing the two layers' archives
2828         into one big archive, named after the WebCore layer due to no clear boundary between it and the
2829         Platform layer. The big archive can then be specified only once when linking, simplifying the code
2830         and suppressing all the layering violations so they do not cause build problems.
2831
2832         First the libtool libraries that the WebCore layer (as required by the WebKitPluginProcess) depends on
2833         are specified. These are then used as dependencies for the archive creation rule as well as the list
2834         from which the archive file paths are constructed and then used to dump the member files from these archives.
2835         The member files are then added to the big archive. The latter is added to the list of libraries the
2836         WebKitPluginProcess requires to successfully link.
2837
2838         * GNUmakefile.am:
2839
2840 2013-05-13  Zalan Bujtas  <zalan@apple.com>
2841
2842         WebProcess consuming very high CPU on linkedin.com
2843         https://bugs.webkit.org/show_bug.cgi?id=115601
2844
2845         Reviewed by Andreas Kling.
2846
2847         Disable WEB_TIMING_MINIMAL.
2848         Turn off window.performance and performance.now(). Some JS frameworks expect
2849         additional Web Timing APIs, when performance.now() is available.
2850
2851         * Configurations/FeatureDefines.xcconfig:
2852
2853 2013-05-12  Anders Carlsson  <andersca@apple.com>
2854
2855         Stop including UnusedParam.h
2856         https://bugs.webkit.org/show_bug.cgi?id=116003
2857
2858         Reviewed by Sam Weinig.
2859
2860         UnusedParam.h is empty now so there's no need to include it anymore.
2861
2862         * UIProcess/API/C/WKContext.cpp:
2863         * UIProcess/API/C/WKInspector.cpp:
2864         * UIProcess/API/C/WKPage.cpp:
2865         * UIProcess/API/efl/ewk_text_checker.cpp:
2866         * UIProcess/API/efl/ewk_view.cpp:
2867         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2868         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2869         * UIProcess/mac/WKFullScreenWindowController.mm:
2870         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2871         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2872
2873 2013-05-12  Andreas Kling  <akling@apple.com>
2874
2875         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
2876         <http://webkit.org/b/115988>
2877         <rdar://problem/13870943>
2878
2879         Reviewed by Anders Carlsson.
2880
2881         Let WebCore control the UI process's suppression of the sudden termination mechanism.
2882         This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
2883         over to the UI process where the appropriate NSProcessInfo calls are made.
2884
2885         We also use this information when deciding whether to insta-kill a web process when its last
2886         page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
2887         by the UI process.
2888
2889         * UIProcess/WebProcessProxy.cpp:
2890         (WebKit::WebProcessProxy::WebProcessProxy):
2891         (WebKit::WebProcessProxy::removeWebPage):
2892         (WebKit::WebProcessProxy::enableSuddenTermination):
2893         (WebKit::WebProcessProxy::disableSuddenTermination):
2894         * UIProcess/WebProcessProxy.h:
2895         (WebProcessProxy):
2896         * UIProcess/WebProcessProxy.messages.in:
2897         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2898         (WebKit::WebChromeClient::enableSuddenTermination):
2899         (WebKit::WebChromeClient::disableSuddenTermination):
2900         * WebProcess/WebCoreSupport/WebChromeClient.h:
2901         (WebChromeClient):
2902
2903 2013-05-12  Alexey Proskuryakov  <ap@apple.com>
2904
2905         <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
2906
2907         Reviewed by Dan Bernstein.
2908
2909         * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).
2910
2911 2013-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2912
2913         [GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
2914         https://bugs.webkit.org/show_bug.cgi?id=115914
2915
2916         Reviewed by Martin Robinson.
2917
2918         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2919         (webkitWebViewBaseRealize):
2920
2921 2013-05-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2922
2923         Unreviewed build fix after r149944.
2924
2925         * Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).
2926
2927 2013-05-11  Anders Carlsson  <andersca@apple.com>
2928
2929         Don't pass malloced pointers as out-of-line data when sending Mach messages
2930         https://bugs.webkit.org/show_bug.cgi?id=115970
2931         <rdar://problem/13144680>
2932
2933         Reviewed by Sam Weinig.
2934
2935         Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
2936         since that gives us fresh zero-filled memory that we can safely share.
2937
2938         * Platform/CoreIPC/ArgumentEncoder.cpp:
2939         (CoreIPC::ArgumentEncoder::ArgumentEncoder):
2940         Set up the buffer pointers to point to the inline buffer.
2941
2942         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
2943         Unmap the buffer if necessary.
2944
2945         (CoreIPC::ArgumentEncoder::grow):
2946         Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
2947         current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
2948         or big in which case we'll end up doing less allocations + memory copying.
2949
2950         * Platform/CoreIPC/ArgumentEncoder.h:
2951         (ArgumentEncoder):
2952
2953 2013-05-11  Zan Dobersek  <zdobersek@igalia.com>
2954
2955         Unreviewed GTK build fix after r149904.
2956
2957         * GNUmakefile.list.am: Adding missing build targets.
2958
2959 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2960
2961         Unreviewed, Fix WK2 EFL build after r149904.
2962
2963         Add new PluginInformation.cpp file to CMake.
2964
2965         * CMakeLists.txt:
2966
2967 2013-05-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2968
2969         Unreviewed, fix WK2 EFL build after r149904.
2970
2971         Add new WKPluginInformation.cpp file to CMake.
2972
2973         * CMakeLists.txt:
2974
2975 2013-05-11  Andreas Kling  <akling@apple.com>
2976
2977         When possible, terminate web processes immediately when closing their last page.
2978         <http://webkit.org/b/115964>
2979         <rdar://problem/13869266>
2980
2981         Reviewed by Geoffrey Garen.
2982
2983         When we're using a network process, there's no need for the UI process to wait for web processes
2984         to clear resource caches and terminate nicely.
2985
2986         We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.
2987
2988         * UIProcess/WebProcessProxy.cpp:
2989         (WebKit::WebProcessProxy::removeWebPage):
2990
2991             Terminate the child process immediately if possible.
2992
2993         * UIProcess/WebProcessProxy.h:
2994         (WebKit::WebProcessProxy::canTerminateChildProcess):
2995         (WebKit::WebProcessProxy::shouldTerminate):
2996
2997             Broke out the logic from the shouldTerminate() IPC message handler into a separate function
2998             so we can call it from removeWebPage().
2999
3000 2013-05-11  Anders Carlsson  <andersca@apple.com>
3001
3002         Crash when terminating a process that has not been fully launched
3003         https://bugs.webkit.org/show_bug.cgi?id=115962
3004         <rdar://problem/13660916>
3005
3006         Reviewed by Andreas Kling.
3007
3008         Handle terminating a process that has not been fully launched.
3009
3010         * UIProcess/Launcher/ProcessLauncher.cpp:
3011         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3012         If we have been invalidated, dispose the connection identifier.
3013
3014         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3015         (WebKit::ProcessLauncher::terminateProcess):
3016         If we're still launching the process, invalidate so the client won't get an unexpected
3017         didFinishLaunching callback.
3018
3019         * UIProcess/WebProcessProxy.cpp:
3020         (WebKit::WebProcessProxy::requestTermination):
3021         Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).
3022
3023 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
3024
3025         Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
3026         https://bugs.webkit.org/show_bug.cgi?id=115564
3027
3028         Reviewed by Benjamin Poulain.
3029
3030         Implement InspectorFrontendHost's save() and append() methods for
3031         Mac WebKit2. Add canSave() for all ports.
3032
3033         * UIProcess/WebInspectorProxy.cpp:
3034         (WebKit::WebInspectorProxy::save):
3035         (WebKit):
3036         (WebKit::WebInspectorProxy::append):
3037         * UIProcess/WebInspectorProxy.h:
3038         (WebInspectorProxy):
3039         * UIProcess/WebInspectorProxy.messages.in:
3040         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3041         (WebKit::WebInspectorProxy::platformSave):
3042         (WebKit):
3043         (WebKit::WebInspectorProxy::platformAppend):
3044         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3045         (WebKit::WebInspectorProxy::platformSave):
3046         (WebKit):
3047         (WebKit::WebInspectorProxy::platformAppend):
3048         * UIProcess/mac/WebInspectorProxyMac.mm:
3049         (WebKit::WebInspectorProxy::platformSave):
3050         (WebKit):
3051         (WebKit::WebInspectorProxy::platformAppend):
3052         * UIProcess/qt/WebInspectorProxyQt.cpp:
3053         (WebKit::WebInspectorProxy::platformSave):
3054         (WebKit):
3055         (WebKit::WebInspectorProxy::platformAppend):
3056         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3057         (WebKit::WebInspectorFrontendClient::canSave):
3058         (WebKit):
3059         (WebKit::WebInspectorFrontendClient::save):
3060         (WebKit::WebInspectorFrontendClient::append):
3061         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
3062         (WebInspectorFrontendClient):
3063         * WebProcess/WebPage/WebInspector.cpp:
3064         (WebKit::WebInspector::save):
3065         (WebKit):
3066         (WebKit::WebInspector::append):
3067         (WebKit::WebInspector::didSave):
3068         (WebKit::WebInspector::didAppend):
3069         * WebProcess/WebPage/WebInspector.h:
3070         (WebInspector):
3071         * WebProcess/WebPage/WebInspector.messages.in:
3072         * WebProcess/WebPage/efl/WebInspectorEfl.cpp:
3073         (WebKit::WebInspector::canSave):
3074         (WebKit):
3075         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
3076         (WebKit::WebInspector::canSave):
3077         (WebKit):
3078         * WebProcess/WebPage/mac/WebInspectorMac.mm:
3079         (WebKit::WebInspector::canSave):
3080         (WebKit):
3081         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
3082         (WebKit::WebInspector::canSave):
3083         (WebKit):
3084
3085 2013-05-10  Remy Demarest  <rdemarest@apple.com>
3086
3087         Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
3088         https://bugs.webkit.org/show_bug.cgi?id=115940
3089
3090         Reviewed by Darin Adler.
3091
3092         * WebKit2.xcodeproj/project.pbxproj:
3093         Move WKPluginInformation.h file from the framework's Project Headers to
3094         Private Headers.
3095
3096 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3097
3098         [Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
3099
3100         * Target.pri:
3101
3102 2013-05-10  Simon Cooper  <scooper@apple.com>
3103
3104         Fix AppleConnect issues for WiFi interfaces
3105         <rdar://problem/13776227&13776240&13776281>
3106         https://bugs.webkit.org/show_bug.cgi?id=115932
3107
3108         Reviewed by Alexey Proskuryakov.
3109
3110         Add support for WiFi interfaces for the AppleConnect plugin.
3111         Remove the FIXME.
3112
3113         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3114
3115 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3116
3117         [Qt][Mac] Unreviewed speculative build fix after r149904.
3118
3119         * Target.pri:
3120
3121 2013-05-10  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3122
3123         [Qt] Unreviewed buildfix after r149904.
3124
3125         * Target.pri:
3126
3127 2013-05-09  Sam Weinig  <sam@webkit.org>
3128
3129         Unify plug-in information dictionaries
3130         <rdar://problem/13852080>
3131         https://bugs.webkit.org/show_bug.cgi?id=115891
3132
3133         Reviewed by Anders Carlsson.
3134
3135         This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
3136         and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.
3137
3138         All the old keys will continue to work, but have been deprecated in favor of new keys defined in 
3139         WKPluginInformation.h
3140
3141         * Shared/API/c/WKPluginInformation.cpp: Added.
3142         * Shared/API/c/WKPluginInformation.h: Added.
3143         Export new keys as SPI.
3144
3145         * Shared/Plugins/Netscape/PluginInformation.h: Added.
3146         * Shared/Plugins/Netscape/PluginInformation.cpp: Added.
3147         (WebKit::pluginInformationBundleIdentifierKey):
3148         (WebKit::pluginInformationBundleVersionKey):
3149         (WebKit::pluginInformationPathKey):
3150         (WebKit::pluginInformationDisplayNameKey):
3151         (WebKit::pluginInformationDefaultLoadPolicyKey):
3152         (WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
3153         (WebKit::pluginInformationHasSandboxProfileKey):
3154         (WebKit::pluginInformationFrameURLKey):
3155         (WebKit::pluginInformationMIMETypeKey):
3156         (WebKit::pluginInformationPageURLKey):
3157         (WebKit::pluginInformationPluginspageAttributeURLKey):
3158         (WebKit::pluginInformationPluginURLKey):
3159         Add new keys.
3160
3161         (WebKit::pluginModuleInformation):
3162         (WebKit::createPluginInformationDictionary):
3163         Add creation functions to simplify multiple sites.
3164
3165         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
3166         (WebKit::platformPluginModuleInformation):
3167         Add platform specific data to the dictionary.
3168
3169         * UIProcess/API/C/WKPage.cpp:
3170         (WKPageGetPluginInformationBundleIdentifierKey):
3171         (WKPageGetPluginInformationBundleVersionKey):
3172         (WKPageGetPluginInformationDisplayNameKey):
3173         (WKPageGetPluginInformationFrameURLKey):
3174         (WKPageGetPluginInformationMIMETypeKey):
3175         (WKPageGetPluginInformationPageURLKey):
3176         (WKPageGetPluginInformationPluginspageAttributeURLKey):
3177         (WKPageGetPluginInformationPluginURLKey):
3178         * UIProcess/API/C/WKPage.h:
3179         Deprecate the old keys.
3180
3181         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3182         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3183         (WKContextCopyPlugInInfoForBundleIdentifier):
3184         (WKContextGetInfoForInstalledPlugIns):
3185         Simplify by using the new createPluginInformationDictionary functions.
3186
3187         (WKPlugInInfoPathKey):
3188         (WKPlugInInfoBundleIdentifierKey):
3189         (WKPlugInInfoVersionKey):
3190         (WKPlugInInfoLoadPolicyKey):
3191         (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
3192         (WKPlugInInfoIsSandboxedKey):
3193         Deprecate the old keys.
3194
3195         * UIProcess/WebLoaderClient.cpp:
3196         (WebKit::WebLoaderClient::didFailToInitializePlugin):
3197         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
3198         (WebKit::WebLoaderClient::pluginLoadPolicy):
3199         * UIProcess/WebLoaderClient.h:
3200         * UIProcess/WebUIClient.cpp:
3201         (WebKit::WebUIClient::unavailablePluginButtonClicked):
3202         * UIProcess/WebUIClient.h:
3203         Optimize for the most recent callback type which takes a dictionary,
3204         and pull out the necessary bits from it for deprecated callbacks as necessary.
3205
3206         * UIProcess/WebPageProxy.h:
3207         * UIProcess/WebPageProxy.cpp:
3208         (WebKit::WebPageProxy::findPlugin):
3209         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
3210         (WebKit::WebPageProxy::didFailToInitializePlugin):
3211         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
3212         Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.
3213
3214         * WebKit2.xcodeproj/project.pbxproj:
3215         Add new files.
3216
3217 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
3218
3219         Web Inspector: implement runOpenPanel callback for WebKit2 inspector
3220         https://bugs.webkit.org/show_bug.cgi?id=115865
3221
3222         Reviewed by Sam Weinig.
3223
3224         * UIProcess/WebInspectorProxy.h:
3225         (WebKit::WebInspectorProxy::inspectorWindow):
3226         Add an accessor for m_inspectorWindow.
3227
3228         * UIProcess/mac/WebInspectorProxyMac.mm:
3229         (WebKit::runOpenPanel):
3230         Show the open panel dialog when requested.
3231
3232         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3233         Register the callback when the inspector page is created.
3234
3235 2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3236
3237         [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
3238         https://bugs.webkit.org/show_bug.cgi?id=115928
3239
3240         Reviewed by Kenneth Rohde Christiansen.
3241
3242         WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.
3243
3244         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3245         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3246         * UIProcess/API/C/efl/WKViewEfl.cpp:
3247         (WKViewSetThemePath):
3248         * UIProcess/API/C/efl/WKViewEfl.h:
3249         * UIProcess/CoordinatedGraphics/WebView.cpp:
3250         * UIProcess/CoordinatedGraphics/WebView.h:
3251         (WebView):
3252         * UIProcess/efl/ViewClientEfl.cpp:
3253         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3254         * UIProcess/efl/WebViewEfl.cpp:
3255         (WebKit::WebViewEfl::setThemePath):
3256         * UIProcess/efl/WebViewEfl.h:
3257         (WebViewEfl):
3258
3259 2013-05-10  Jer Noble  <jer.noble@apple.com>
3260
3261         REGRESSION (r149439): Video turns blank upon entering full screen for the first time
3262         https://bugs.webkit.org/show_bug.cgi?id=115617
3263
3264         Reviewed by Eric Carlson.
3265
3266         Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
3267         platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
3268         first-full screen behavior.
3269
3270         * UIProcess/API/mac/WKView.mm:
3271         (-[WKView createFullScreenWindow]):
3272
3273 2013-05-10  Zan Dobersek  <zdobersek@igalia.com>
3274
3275         [WK2] Make the WebSoupRequestManager a supplement to the WebProcess
3276         https://bugs.webkit.org/show_bug.cgi?id=115717
3277
3278         Reviewed by Andreas Kling.
3279
3280         WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
3281         by the WebProcess. This removes the need for the m_soupRequestManager member variable in
3282         the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
3283         of which instances are controlled by the WebProcess class.
3284
3285         * WebProcess/WebProcess.cpp:
3286         (WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
3287         * WebProcess/WebProcess.h:
3288         (WebProcess): Remove the m_soupRequestManager member variable and its getter method.
3289         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
3290         (webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
3291         (webkitSoupRequestGenericSendFinish): Ditto.
3292         * WebProcess/soup/WebProcessSoup.cpp:
3293         (WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
3294         * WebProcess/soup/WebSoupRequestManager.cpp:
3295         (WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
3296         * WebProcess/soup/WebSoupRequestManager.h:
3297         (WebSoupRequestManager): Inherit from the WebProcessSupplement interface.
3298
3299 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3300
3301         [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
3302         https://bugs.webkit.org/show_bug.cgi?id=115904
3303
3304         Reviewed by Martin Robinson.
3305
3306         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
3307         (startTestServerMonitor):
3308         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
3309         (startTestServerMonitor):
3310
3311 2013-05-09  Anders Carlsson  <andersca@apple.com>
3312
3313         Fix build.
3314
3315         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
3316
3317 2013-05-09  Anders Carlsson  <andersca@apple.com>
3318
3319         Enable UI process storage
3320         https://bugs.webkit.org/show_bug.cgi?id=115879
3321         <rdar://problem/12239765>
3322
3323         Reviewed by Beth Dakin.
3324
3325         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3326         Flip the switch.
3327
3328 2013-05-09  Anders Carlsson  <andersca@apple.com>
3329
3330         Remove extra spaces between right angle brackets in template declarations
3331         https://bugs.webkit.org/show_bug.cgi?id=115877
3332
3333         Reviewed by Beth Dakin.
3334
3335         C++11 doesn't require spaces between right angle brackets so remove all of them.
3336
3337         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
3338         (WebKit::NetworkBlobRegistry::registerBlobURL):
3339         (WebKit::NetworkBlobRegistry::sandboxExtensions):
3340         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
3341         (NetworkBlobRegistry):
3342         * NetworkProcess/HostRecord.h:
3343         (HostRecord):
3344         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3345         (WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
3346         (WebKit::NetworkConnectionToWebProcess::didClose):
3347         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
3348         * NetworkProcess/NetworkConnectionToWebProcess.h:
3349         (NetworkConnectionToWebProcess):
3350         * NetworkProcess/NetworkProcess.h:
3351         (NetworkProcess):
3352         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
3353         (WebKit::NetworkResourceLoadScheduler::servePendingRequests):
3354         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
3355         * NetworkProcess/NetworkResourceLoadScheduler.h:
3356         * NetworkProcess/SchedulableLoader.cpp:
3357         (WebKit::SchedulableLoader::SchedulableLoader):
3358         * NetworkProcess/SchedulableLoader.h:
3359         (SchedulableLoader):
3360         * Platform/CoreIPC/ArgumentCoders.h:
3361         * Platform/CoreIPC/Connection.cpp:
3362         (Connection::SyncMessageState):
3363         (CoreIPC::Connection::waitForMessage):
3364         (CoreIPC::Connection::processIncomingMessage):
3365         * Platform/CoreIPC/Connection.h:
3366         (Connection):
3367         * Platform/WorkQueue.h:
3368         (WorkQueue):
3369         * PluginProcess/PluginProcess.h:
3370         (PluginProcess):
3371         * Scripts/webkit2/messages_unittest.py:
3372         (CoreIPC):
3373         * Shared/BlockingResponseMap.h:
3374         (BlockingResponseMap):
3375         * Shared/ChildProcessProxy.h:
3376         (ChildProcessProxy):
3377         * Shared/ImmutableArray.cpp:
3378         (WebKit::ImmutableArray::ImmutableArray):
3379         * Shared/ImmutableArray.h:
3380         (WebKit::ImmutableArray::adopt):
3381         (ImmutableArray):
3382         * Shared/ImmutableDictionary.cpp:
3383         (WebKit::ImmutableDictionary::keys):
3384         * Shared/ImmutableDictionary.h:
3385         (ImmutableDictionary):
3386         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
3387         (CustomProtocolManager):
3388         * Shared/SecurityOriginData.cpp:
3389         (WebKit::performAPICallbackWithSecurityOriginDataVector):
3390         * Shared/SessionState.cpp:
3391         * Shared/StatisticsData.h:
3392         (StatisticsData):
3393         * Shared/UserMessageCoders.h:
3394         (WebKit::UserMessageDecoder::baseDecode):
3395         * Shared/WebArchive.cpp:
3396         (WebKit::WebArchive::WebArchive):
3397         (WebKit::WebArchive::subresources):
3398         (WebKit::WebArchive::subframeArchives):
3399         * Shared/WebContextMenuItem.cpp:
3400         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
3401         * Shared/WebOpenPanelParameters.cpp:
3402         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
3403         (WebKit::WebOpenPanelParameters::selectedFileNames):
3404         * Shared/mac/ArgumentCodersMac.mm:
3405         (CoreIPC::encode):
3406         * SharedWorkerProcess/SharedWorkerProcess.h:
3407         (SharedWorkerProcess):
3408         * UIProcess/API/mac/WKPrintingView.h:
3409         (WebFrameProxy):
3410         * UIProcess/API/mac/WKPrintingView.mm:
3411         (-[WKPrintingView _drawPreview:]):
3412         * UIProcess/API/mac/WKView.mm:
3413         (WebKit):
3414         * UIProcess/Downloads/DownloadProxyMap.cpp:
3415         (WebKit::DownloadProxyMap::processDidClose):
3416         * UIProcess/Downloads/DownloadProxyMap.h:
3417         (DownloadProxyMap):
3418         * UIProcess/GeolocationPermissionRequestManagerProxy.h:
3419         (GeolocationPermissionRequestManagerProxy):
3420         * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
3421         (DynamicLinkerEnvironmentExtractor):
3422         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
3423         (CustomProtocolManagerProxy):
3424         * UIProcess/Network/NetworkProcessProxy.h:
3425         (NetworkProcessProxy):
3426         * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h:
3427         (NotificationPermissionRequestManagerProxy):
3428         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3429         (WebNotificationManagerProxy):
3430         * UIProcess/Plugins/PluginProcessManager.h:
3431         (PluginProcessManager):
3432         * UIProcess/Plugins/PluginProcessProxy.h:
3433         (PluginProcessProxy):
3434         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
3435         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
3436         * UIProcess/Plugins/WebPluginSiteDataManager.h:
3437         (WebPluginSiteDataManager):
3438         * UIProcess/SharedWorkers/SharedWorkerProcessManager.h:
3439         (SharedWorkerProcessManager):
3440         * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h:
3441         (SharedWorkerProcessProxy):
3442         * UIProcess/StatisticsRequest.cpp:
3443         (WebKit::StatisticsRequest::completedRequest):
3444         * UIProcess/Storage/StorageManager.cpp:
3445         (StorageManager::StorageArea):
3446         (WebKit::StorageManager::StorageArea::dispatchEvents):
3447         (StorageManager::SessionStorageNamespace):
3448         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
3449         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
3450         (WebKit::StorageManager::createLocalStorageMap):
3451         (WebKit::StorageManager::createSessionStorageMap):
3452         (WebKit::StorageManager::destroyStorageMap):
3453         (WebKit::StorageManager::invalidateConnectionInternal):
3454         (WebKit::StorageManager::findStorageArea):
3455         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
3456         * UIProcess/Storage/StorageManager.h:
3457         (StorageManager):
3458         * UIProcess/WebApplicationCacheManagerProxy.h:
3459         (WebApplicationCacheManagerProxy):
3460         * UIProcess/WebBackForwardList.cpp:
3461         (WebKit::WebBackForwardList::addItem):
3462         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
3463         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
3464         (WebKit::WebBackForwardList::clear):
3465         * UIProcess/WebBackForwardList.h:
3466         (WebKit):
3467         * UIProcess/WebContext.cpp:
3468         (WebKit::WebContext::createNewWebProcess):
3469         (WebKit::WebContext::enableProcessTermination):
3470         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
3471         * UIProcess/WebContext.h:
3472         (WebContext):
3473         * UIProcess/WebCookieManagerProxy.cpp:
3474         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
3475         * UIProcess/WebCookieManagerProxy.h:
3476         (WebCookieManagerProxy):
3477         * UIProcess/WebDatabaseManagerProxy.cpp:
3478         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
3479         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
3480         * UIProcess/WebDatabaseManagerProxy.h:
3481         (WebDatabaseManagerProxy):
3482         * UIProcess/WebFormClient.cpp:
3483         (WebKit::WebFormClient::willSubmitForm):
3484         * UIProcess/WebFormClient.h:
3485         (WebFormClient):
3486         * UIProcess/WebKeyValueStorageManagerProxy.h:
3487         (WebKeyValueStorageManagerProxy):
3488         * UIProcess/WebLoaderClient.cpp:
3489         (WebKit::WebLoaderClient::didChangeBackForwardList):
3490         * UIProcess/WebLoaderClient.h:
3491         (WebLoaderClient):
3492         * UIProcess/WebMediaCacheManagerProxy.cpp:
3493         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
3494         * UIProcess/WebMediaCacheManagerProxy.h:
3495         (WebMediaCacheManagerProxy):
3496         * UIProcess/WebPageContextMenuClient.cpp:
3497         (WebKit::WebPageContextMenuClient::showContextMenu):
3498         * UIProcess/WebPageProxy.cpp:
3499         (ExceededDatabaseQuotaRecords):
3500         (WebKit::WebPageProxy::relatedPages):
3501         (WebKit::WebPageProxy::didChangeBackForwardList):
3502         (WebKit::WebPageProxy::handleWheelEvent):
3503         (WebKit::WebPageProxy::processNextQueuedWheelEvent):
3504         (WebKit::WebPageProxy::findStringMatches):
3505         (WebKit::WebPageProxy::willSubmitForm):
3506         (WebKit::WebPageProxy::pluginInformationDictionary):
3507         (WebKit::WebPageProxy::didFindStringMatches):
3508         (WebKit::WebPageProxy::didReceiveEvent):
3509         * UIProcess/WebPageProxy.h:
3510         (WebPageProxy):
3511         * UIProcess/WebPageProxy.messages.in:
3512         * UIProcess/WebProcessProxy.cpp:
3513         (WebKit::WebProcessProxy::disconnect):
3514         (WebKit::WebProcessProxy::didClose):
3515         (WebKit::WebProcessProxy::didBecomeUnresponsive):
3516         (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive):
3517         (WebKit::WebProcessProxy::didBecomeResponsive):
3518         (WebKit::WebProcessProxy::disconnectFramesFromPage):
3519         (WebKit::WebProcessProxy::frameCountInPage):
3520         * UIProcess/WebProcessProxy.h:
3521         (WebProcessProxy):
3522         * UIProcess/WebResourceCacheManagerProxy.h:
3523         (WebResourceCacheManagerProxy):
3524         * UIProcess/mac/WebContextMenuProxyMac.mm:
3525         (WebKit::populateNSMenu):
3526         (WebKit::nsMenuItemVector):
3527         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
3528         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
3529         * WebProcess/Geolocation/WebGeolocationManager.cpp:
3530         (WebKit::WebGeolocationManager::didChangePosition):
3531         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
3532         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
3533         (WebIconDatabaseProxy):
3534         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
3535         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3536         (WebKit::InjectedBundle::originsWithApplicationCache):
3537         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
3538         (WebKit::InjectedBundleBackForwardListItem::children):
3539         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
3540         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
3541         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
3542         (InjectedBundlePageEditorClient):
3543         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3544         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
3545         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
3546         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
3547         (InjectedBundlePageFormClient):
3548         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3549         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
3550         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3551         (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired):
3552         (WebKit::WebResourceLoadScheduler::networkProcessCrashed):
3553         * WebProcess/Network/WebResourceLoadScheduler.h:
3554         (WebResourceLoadScheduler):
3555         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
3556         (NotificationPermissionRequestManager):
3557         * WebProcess/Notifications/WebNotificationManager.h:
3558         (WebNotificationManager):
3559         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3560         (WebKit::NPRuntimeObjectMap::invalidate):
3561         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
3562         (NPRuntimeObjectMap):
3563         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3564         (WebKit::NetscapePlugin::stopAllStreams):
3565         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3566         (NetscapePlugin):
3567         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3568         (NetscapePluginStream):
3569         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
3570         (getAllScriptsInPDFDocument):
3571         (WebKit::SimplePDFPlugin::runScriptsInPDFDocument):
3572         * WebProcess/Plugins/PluginProcessConnectionManager.h:
3573         (PluginProcessConnectionManager):
3574         * WebProcess/Plugins/PluginView.cpp:
3575         (WebKit::PluginView::cancelAllStreams):
3576         * WebProcess/Plugins/PluginView.h:
3577         (PluginView):
3578         * WebProcess/Storage/StorageAreaMap.cpp:
3579         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
3580         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
3581         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3582         (WebKit::StorageNamespaceImpl::storageArea):
3583         * WebProcess/Storage/StorageNamespaceImpl.h:
3584         (StorageNamespaceImpl):
3585         * WebProcess/Storage/WebKeyValueStorageManager.cpp:
3586         (WebKit::keyValueStorageOriginIdentifiers):
3587         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3588         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
3589         (WebKit::WebDatabaseManager::getDatabaseOrigins):
3590         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3591         (WebKit::WebEditorClient::getClientPasteboardDataForRange):
3592         * WebProcess/WebCoreSupport/WebEditorClient.h:
3593         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3594         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
3595         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3596         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
3597         * WebProcess/WebPage/EventDispatcher.h:
3598         (EventDispatcher):
3599         * WebProcess/WebPage/FindController.cpp:
3600         (WebKit::FindController::findStringMatches):
3601         * WebProcess/WebPage/FindController.h:
3602         (FindController):
3603         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3604         (WebKit):
3605         * WebProcess/WebPage/WebFrame.cpp:
3606         (WebKit::WebFrame::childFrames):
3607         * WebProcess/WebPage/WebPage.cpp:
3608         (WebKit::WebPage::trackedRepaintRects):
3609         * WebProcess/WebPage/WebPage.h:
3610         (WebKit):
3611         (WebPage):
3612         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3613         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3614         (TiledCoreAnimationDrawingArea):
3615         * WebProcess/WebProcess.cpp:
3616         (WebKit::WebProcess::visitedLinkStateChanged):
3617         (WebKit::WebProcess::allVisitedLinkStateChanged):
3618         (WebKit::WebProcess::focusedWebPage):
3619         (WebKit::WebProcess::createWebPage):
3620         (WebKit::WebProcess::didClose):
3621         (WebKit::WebProcess::webPageGroup):
3622         (WebKit::addCaseFoldedCharacters):
3623         (WebKit::getWebCoreMemoryCacheStatistics):
3624         (WebKit::WebProcess::setTextCheckerState):
3625         * WebProcess/WebProcess.h:
3626         (WebProcess):
3627
3628 2013-05-09  Anders Carlsson  <andersca@apple.com>
3629
3630         Implement WebPlatformStrategies::transientLocalStorageNamespace
3631         https://bugs.webkit.org/show_bug.cgi?id=115876
3632         <rdar://problem/13852871>
3633
3634         Reviewed by Beth Dakin.
3635
3636         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3637         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
3638         Return a session storage namespace for a random page when UI process storage is enabled,
3639         otherwise call the base class implementation.
3640
3641 2013-05-09  Anders Carlsson  <andersca@apple.com>
3642
3643         Use explicit qualifiers for names in the std:: namespace
3644         https://bugs.webkit.org/show_bug.cgi?id=115868
3645
3646         Reviewed by Andreas Kling.
3647
3648         * Shared/mac/ArgumentCodersMac.mm:
3649         (CoreIPC::encode):
3650         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
3651         (WKPluginSiteDataManagerClearAllSiteData):
3652         * UIProcess/Plugins/PluginInfoStore.cpp:
3653         (WebKit::PluginInfoStore::findPluginForExtension):
3654         * UIProcess/WebFrameProxy.cpp:
3655         * UIProcess/WebProcessProxy.cpp:
3656         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3657         (WebKit::parsePostBuffer):
3658         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3659         (WebKit::NetscapePlugin::loadURL):
3660         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3661         (WebKit::NetscapePluginStream::deliverDataToPlugin):
3662         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
3663         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3664         * WebProcess/WebPage/FindController.cpp:
3665         (WebKit::FindController::countStringMatches):
3666         (WebKit::FindController::updateFindUIAfterPageScroll):
3667         * WebProcess/WebPage/WebPage.cpp:
3668         * WebProcess/WebPage/mac/WebPageMac.mm:
3669         (WebKit::drawPDFPage):
3670         * WebProcess/mac/WebProcessMac.mm:
3671
3672 2013-05-09  Max Feil  <mfeil@rim.com>
3673
3674         shouldUsePluginDocument() needs to be respected when a document is created
3675         https://bugs.webkit.org/show_bug.cgi?id=110308
3676
3677         Reviewed by Rob Buis.
3678
3679         Renaming shouldUsePluginDocument() to shouldAlwaysUsePluginDocument()
3680         for clarity.
3681
3682         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3683         (WebKit::WebFrameLoaderClient::shouldAlwaysUsePluginDocument):
3684         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3685         (WebFrameLoaderClient):
3686
3687 2013-05-09  Timothy Hatcher  <timothy@apple.com>
3688
3689         Make dragging off a tab in Safari with a docked Inspector reattach the Inspector.
3690
3691         https://webkit.org/b/115832
3692         rdar://problem/13605661
3693
3694         Reviewed by Benjamin Poulain.
3695
3696         * UIProcess/mac/WebInspectorProxyMac.mm:
3697         (WebKit::WebInspectorProxy::platformBringToFront):
3698         If the Web Inspector is no longer in the same window as the inspected view,
3699         then we need to reopen the Inspector to get it attached to the right window.
3700
3701 2013-05-08  Anders Carlsson  <andersca@apple.com>
3702
3703         Fix a typo in a comment.
3704
3705         Rubber-stamped by Darin Adler.
3706
3707         * WebProcess/WebProcess.cpp:
3708         (WebKit::WebProcess::initializeConnection):
3709
3710 2013-05-08  Anders Carlsson  <andersca@apple.com>
3711
3712         Remove bogus StorageAreaMap assertions
3713         https://bugs.webkit.org/show_bug.cgi?id=115838
3714
3715         Reviewed by Sam Weinig.
3716
3717         It is possible for didGetValues, and didClear to be called even if m_hasPendingClear is false so remove the assertions.
3718
3719         * WebProcess/Storage/StorageAreaMap.cpp:
3720         (WebKit::StorageAreaMap::didGetValues):
3721         (WebKit::StorageAreaMap::didClear):
3722
3723 2013-05-08  Anders Carlsson  <andersca@apple.com>
3724
3725         Handle incoming clear operations
3726         https://bugs.webkit.org/show_bug.cgi?id=115829
3727
3728         Reviewed by Sam Weinig.
3729
3730         Handle clear by building up a new storage map with our pending changes.
3731
3732         * WebProcess/Storage/StorageAreaMap.cpp:
3733         (WebKit::StorageAreaMap::applyChange):
3734
3735 2013-05-08  Anders Carlsson  <andersca@apple.com>
3736
3737         Don't apply changes while we're clearing the database
3738         https://bugs.webkit.org/show_bug.cgi?id=115826
3739
3740         Reviewed by Darin Adler.
3741
3742         * UIProcess/Storage/LocalStorageDatabase.cpp:
3743         (WebKit::LocalStorageDatabase::openDatabase):
3744         Only call didOpenDatabaseWithOrigin if we actually did open the database.
3745
3746         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
3747         Create the database if needed.
3748
3749         * UIProcess/Storage/StorageManager.cpp:
3750         (WebKit::StorageManager::getValues):
3751         Send back a DidGetValues message.
3752
3753         * WebProcess/Storage/StorageAreaMap.cpp:
3754         (WebKit::StorageAreaMap::StorageAreaMap):
3755         Initialize m_hasPendingClear.
3756
3757         (WebKit::StorageAreaMap::clear):
3758         Set m_hasPendingClear to true.
3759
3760         (WebKit::StorageAreaMap::resetValues):
3761         Set m_hasPendingClear back to false.
3762
3763         (WebKit::StorageAreaMap::loadValuesIfNeeded):
3764         Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.
3765
3766         (WebKit::StorageAreaMap::didGetValues):
3767         Set m_hasPendingClear back to false.
3768
3769         (WebKit::StorageAreaMap::didClear):
3770         Set m_hasPendingClear back to false.
3771
3772         (WebKit::StorageAreaMap::applyChange):
3773         Don't apply the change if m_hasPendingClear is true.
3774
3775         * WebProcess/Storage/StorageAreaMap.messages.in:
3776         Add DidGetValues message.
3777
3778 2013-05-08  Andy Estes  <aestes@apple.com>
3779
3780         [WebKit2] REGRESSION (Custom Protocols): Reproducible crash when navigating to URL with an invalid scheme
3781         https://bugs.webkit.org/show_bug.cgi?id=115790
3782
3783         Reviewed by Alexey Proskuryakov.
3784
3785         NSMutableSet does not support adding or removing nil objects, and
3786         WTF::HashSet does not support adding, removing, or checking for null
3787         WTF::Strings.
3788
3789         For the NSMutableSet case, make sure that we don't try to add or remove
3790         nil NSStrings.
3791
3792         For the WTF::HashSet case, NSURL will return a nil NSString if we ask
3793         it for its scheme when it is invalid, which we will convert to a null
3794         WTF::String. Don't try to check if our HashSet of registered schemes
3795         contains a null String.
3796
3797         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
3798         (WebKit::CustomProtocolManager::registerScheme): Assert that the scheme
3799         isn't null. We reject null schemes at the WKBrowsingContextController level.
3800         (WebKit::CustomProtocolManager::unregisterScheme): Ditto.
3801         (WebKit::CustomProtocolManager::supportsScheme): If scheme is null, return false.
3802         * UIProcess/API/mac/WKBrowsingContextController.mm:
3803         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]): Do not register a nil scheme.
3804         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]): Ditto.
3805
3806 2013-05-08  Anders Carlsson  <andersca@apple.com>
3807
3808         Apply remote changes to storage maps locally
3809         https://bugs.webkit.org/show_bug.cgi?id=115825
3810
3811         Reviewed by Beth Dakin.
3812
3813         * WebProcess/Storage/StorageAreaMap.cpp:
3814         (WebKit::StorageAreaMap::resetValues):
3815         Clear the pending values map.
3816
3817         (WebKit::StorageAreaMap::didSetItem):
3818         If we failed to set the item, forget everything we know about this storage map.
3819         Otherwise, remove the pending item.
3820
3821         (WebKit::StorageAreaMap::didRemoveItem):
3822         Remove the pending item.
3823
3824         (WebKit::StorageAreaMap::shouldApplyChangeForKey):
3825         Helper function that returns whether a change for a given key should be applied.
3826
3827         (WebKit::StorageAreaMap::applyChange):
3828         Apply the change. Currently only adds and removes are handled.
3829
3830         (WebKit::StorageAreaMap::dispatchStorageEvent):
3831         Apply the change locally as well if needed.
3832
3833         * WebProcess/Storage/StorageAreaMap.h:
3834
3835 2013-05-08  Anders Carlsson  <andersca@apple.com>
3836
3837         Assert at compile time that we don't pass Objective-C object pointers to adoptCF
3838         https://bugs.webkit.org/show_bug.cgi?id=115823
3839
3840         Reviewed by Geoffrey Garen.
3841
3842         Fix adoptNS/adoptCF mismatches. For the adopt(leakRef()) case we'd ideally want a static_pointer_cast overload for RetainPtr,
3843         but this will do for now.
3844         
3845         * Shared/mac/ArgumentCodersMac.mm:
3846         (CoreIPC::decode):
3847
3848 2013-05-08  Sam Weinig  <sam@webkit.org>
3849
3850         Add SPI to determine if a plugin is sandboxed
3851         https://bugs.webkit.org/show_bug.cgi?id=115810
3852
3853         Reviewed by Anders Carlsson.
3854
3855         * PluginProcess/mac/PluginProcessMac.mm:
3856         (WebKit::PluginProcess::initializeSandbox):
3857         * Shared/Plugins/mac/PluginSandboxProfile.h: Added.
3858         * Shared/Plugins/mac/PluginSandboxProfile.mm: Added.
3859         (WebKit::pluginSandboxProfileDefaultDirectory):
3860         (WebKit::pluginSandboxProfileDirectories):
3861         (WebKit::pluginSandboxProfileName):
3862         (WebKit::pluginSandboxCommonProfile):
3863         (WebKit::pluginSandboxProfileForDirectory):
3864         (WebKit::pluginSandboxProfile):
3865         (WebKit::pluginHasSandboxProfileForDirectory):
3866         (WebKit::pluginHasSandboxProfile):
3867         Move sandbox code to its own file and refactor to use cocoa. Also adds pluginHasSandboxProfile function
3868         which uses the newly refactored code.
3869
3870         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3871         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3872         (WKPlugInInfoIsSandboxedKey):
3873         (createInfoDictionary):
3874         Add WKPlugInInfoIsSandboxedKey.
3875
3876         * WebKit2.xcodeproj/project.pbxproj:
3877         Add new files.
3878
3879 2013-05-08  Anders Carlsson  <andersca@apple.com>
3880
3881         Safari unexpectedly quits with invalid message from the web process with message ID 0x323002f (WebPageProxy.DecidePolicyForNavigationAction)
3882         https://bugs.webkit.org/show_bug.cgi?id=115814
3883         <rdar://problem/12331258>
3884
3885         Reviewed by Andreas Kling.
3886
3887         To ensure that any asynchronous messages are delivered to the UI process before
3888         synchronous messages (except when doing so would lead to a deadlock), Call
3889         setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the UI process connections.
3890
3891         * WebProcess/WebProcess.cpp:
3892         (WebKit::WebProcess::initializeConnection):
3893
3894 2013-05-08  Tim Horton  <timothy_horton@apple.com>
3895
3896         Coalesce WKView visibleRect changes
3897         https://bugs.webkit.org/show_bug.cgi?id=115792
3898         <rdar://problem/13776842>
3899
3900         Reviewed by Simon Fraser.
3901
3902         The system can call renewGState much more often than we actually want
3903         to update the WebProcess' notion of the exposed rect. Most importantly,
3904         within an autolayout pass it is called many times, and often sees
3905         [WKView visibleRect] be an intermediate value which will never be
3906         flushed to the screen. We only care about the final value, so we should
3907         wait until AppKit has finished - with a zero-delay timer - to inform the
3908         WebProcess of exposed rect changes.
3909
3910         * UIProcess/WebPageProxy.cpp:
3911         (WebKit::WebPageProxy::WebPageProxy):
3912         Add exposedRectChangedTimer.
3913         (WebKit::WebPageProxy::close):
3914         Cancel exposedRectChangedTimer when tearing down the WebPageProxy.
3915         * UIProcess/WebPageProxy.h:
3916         (WebPageProxy):
3917         Add exposedRectChangedTimerFired, the timer itself, and two rects:
3918         the most recent exposed rect from the WKView, and the last one we actually
3919         sent across to the WebProcess.
3920         * UIProcess/mac/WebPageProxyMac.mm:
3921         (WebKit::WebPageProxy::viewExposedRectChanged):
3922         Instead of immediately sending exposed rect changes to the WebProcess,
3923         start a zero-delay timer to do so.
3924         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
3925         Once the zero-delay timer fires, send the new exposed rect to the WebProcess.
3926
3927 2013-05-08  Alexey Proskuryakov  <ap@apple.com>
3928
3929         <rdar://problem/13776220> 13A451: PluginProcess(2225) deny file-read-data ~/Library/InputManagers
3930         <rdar://problem/13642510> PluginProcess logs sandbox violations initializing TextServices
3931
3932         Reviewed by Anders Carlsson.
3933
3934         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Allow more
3935         TextServices and NSInputManager directories.
3936
3937 2013-05-08  Anders Carlsson  <andersca@apple.com>
3938
3939         Remove BinarySemaphoreWin.cpp.
3940
3941         Rubber-stamped by Beth Dakin.
3942
3943         BinarySemaphoreWin has been moved to WTF, but the original was never removed.
3944
3945         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed.
3946
3947 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
3948
3949         [WK2] Make the WebNetworkInfoManager a supplement to the WebProcess
3950         https://bugs.webkit.org/show_bug.cgi?id=115716
3951
3952         Reviewed by Andreas Kling.
3953
3954         WebNetworkInfoManager should inherit from WebProcessSupplement and should be used
3955         as such by the WebProcess. This removes the need for the m_networkInfoManager member
3956         variable in the WebProcess class and brings the WebNetworkInfoManager in line with
3957         other manager classes of which instances are controlled by the WebProcess class.
3958
3959         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
3960         (WebKit::WebNetworkInfoManager::supplementName): Specify the supplement's name.
3961         (WebKit):
3962         * WebProcess/NetworkInfo/WebNetworkInfoManager.h:
3963         (WebKit): Alphabetically reorder the two forwarding declarations.
3964         (WebNetworkInfoManager): Inherit from the WebProcessSupplement interface.
3965         * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp:
3966         (WebKit::WebNetworkInfoClient::bandwidth): Access the WebNetworkInfoManager as a supplement.
3967         (WebKit::WebNetworkInfoClient::metered): Ditto.
3968         (WebKit::WebNetworkInfoClient::startUpdating): Ditto.
3969         (WebKit::WebNetworkInfoClient::stopUpdating): Ditto.
3970         (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): Ditto.
3971         * WebProcess/WebProcess.cpp:
3972         (WebKit::WebProcess::WebProcess): Add the WebNetworkInfoManager instance as a supplement.
3973         * WebProcess/WebProcess.h:
3974         (WebProcess): Remove the m_networkInfoManager member variable and its getter method.
3975
3976 2013-05-08  Zan Dobersek  <zdobersek@igalia.com>
3977
3978         [WK2] Make the WebBatteryManager a supplement to the WebProcess
3979         https://bugs.webkit.org/show_bug.cgi?id=115715
3980
3981         Reviewed by Andreas Kling.
3982
3983         WebBatteryManager should inherit from WebProcessSupplement and should be used as such
3984         by the WebProcess. This removes the need for the m_batteryManager member variable in
3985         the WebProcess class and brings the WebBatteryManager in line with other manager classes
3986         of which instances are controlled by the WebProcess class.
3987
3988         * WebProcess/Battery/WebBatteryManager.cpp:
3989         (WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
3990         (WebKit):
3991         * WebProcess/Battery/WebBatteryManager.h:
3992         (WebBatteryManager): Inherit from the WebProcessSupplement interface.
3993         * WebProcess/WebCoreSupport/WebBatteryClient.cpp:
3994         (WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
3995         (WebKit::WebBatteryClient::stopUpdating): Ditto.
3996         (WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
3997         * WebProcess/WebProcess.cpp:
3998         (WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
3999         * WebProcess/WebProcess.h:
4000         (WebProcess): Remove the m_batteryManager member variable and its getter method.
4001
4002 2013-05-06  Darin Adler  <darin@apple.com>
4003
4004         Use adoptCF and adoptNS in more places
4005         https://bugs.webkit.org/show_bug.cgi?id=115657
4006
4007         Reviewed by Sam Weinig.
4008
4009         * Shared/Downloads/cfnet/DownloadCFNet.cpp:
4010         (WebKit::Download::useCredential):
4011         (WebKit::Download::start):
4012         (WebKit::Download::startWithHandle):
4013         (WebKit::Download::cancel):
4014         (WebKit::Download::didDecideDestination):
4015         Use adoptCF and adoptNS.
4016
4017 2013-05-06  Sam Weinig  <sam@webkit.org>
4018
4019         Add SPI to get an array of all the installed plug-ins
4020         https://bugs.webkit.org/show_bug.cgi?id=115688
4021
4022         Reviewed by Anders Carlsson.
4023
4024         * UIProcess/API/C/mac/WKContextPrivateMac.h:
4025         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
4026         (createInfoDictionary):
4027         Extract creation of info dictionary into helper.
4028         (WKContextCopyPlugInInfoForBundleIdentifier):
4029         Modified to use the new helper.
4030         (WKContextGetInfoForInstalledPlugIns):
4031         Added.
4032
4033 2013-05-07  Anders Carlsson  <andersca@apple.com>
4034
4035         Clean up KeyframeValueList and related classes
4036         https://bugs.webkit.org/show_bug.cgi?id=115738
4037
4038         Reviewed by Simon Fraser.
4039
4040         Update for WebCore changes.
4041
4042         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
4043         (CoreIPC::::decode):
4044
4045 2013-05-07  Anders Carlsson  <andersca@apple.com>
4046
4047         Add and remove databases and origins from the database tracker
4048         https://bugs.webkit.org/show_bug.cgi?id=115752
4049
4050         Reviewed by Andreas Kling.
4051
4052         * UIProcess/Storage/LocalStorageDatabase.cpp:
4053         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
4054         Rename m_databaseFilename to m_databasePath.
4055
4056         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
4057         Rename m_databaseFilename to m_databasePath.
4058
4059         * UIProcess/Storage/LocalStorageDatabase.h:
4060         Rename m_databaseFilename to m_databasePath.
4061
4062         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
4063         (WebKit::LocalStorageDatabaseTracker::databasePath):
4064         Rename databaseFilename to databasePath.
4065
4066         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
4067         Call addDatabaseWithOriginIdentifier.
4068
4069         (WebKit::LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin):
4070         Call removeDatabaseWithOriginIdentifier.
4071
4072         (WebKit::LocalStorageDatabaseTracker::trackerDatabasePath):
4073         Call databasePath instead of databaseFile.
4074
4075         (WebKit::LocalStorageDatabaseTracker::openTrackerDatabase):
4076         Bail if the database is already open.
4077
4078         (WebKit::LocalStorageDatabaseTracker::updateTrackerDatabaseFromLocalStorageDatabaseFiles):
4079         Call addDatabaseWithOriginIdentifier if this is an origin we don't know about.
4080
4081         (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
4082         Add the database to the Origins table.
4083
4084         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
4085         remove the database from the Origins table and delete it.
4086
4087         (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
4088         Helper function that looks up a database path given its identifier.
4089         
4090         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
4091         Rename databaseFile to databasePath.
4092
4093 2013-05-07  Anders Carlsson  <andersca@apple.com>
4094
4095         The storage database tracker should know when databases come and go
4096         https://bugs.webkit.org/show_bug.cgi?id=115748
4097
4098         Reviewed by Andreas Kling.
4099
4100         * UIProcess/Storage/LocalStorageDatabase.cpp:
4101         (WebKit::LocalStorageDatabase::openDatabase):
4102         If we've opened the database successfully, call LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin.
4103
4104         (WebKit::LocalStorageDatabase::tryToOpenDatabase):
4105         Remove a FIXME; we run all storage related things on the same thread.
4106
4107         (WebKit::LocalStorageDatabase::close):
4108         Close the database. If it's empty, call LocalStorageDatabaseTracker::deleteEmptyDatabaseWithOrigin.
4109
4110         (WebKit::LocalStorageDatabase::databaseIsEmpty):
4111         Helper function for determining whether a database is empty.
4112         
4113         * UIProcess/Storage/LocalStorageDatabase.h:
4114         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
4115         (WebKit::LocalStorageDatabaseTracker::databaseFilename):
4116         Add ".localstorage" to the filename.
4117
4118         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
4119         (WebKit::LocalStor