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