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