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