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