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