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