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