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