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