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