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