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