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