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