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