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