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