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