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