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