Fixed the build.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-06-14  Dan Bernstein  <mitz@apple.com>
2
3         Fixed the build.
4
5         * mac/postprocess-framework-headers.sh:
6
7 2015-06-14  Michael Catanzaro  <mcatanzaro@igalia.com>
8
9         Format string misuse in DatabaseProcessIDBConnection.cpp and UniqueIDBDatabaseBackingStoreSQLite.cpp
10         https://bugs.webkit.org/show_bug.cgi?id=145960
11
12         Reviewed by Darin Adler.
13
14         Use PRIu64 and PRIi64 to print uint64_t and int64_t, respectively. These things are
15         different types on x86_64 Linux (unsigned long) and on Mac (unsigned long long).
16
17         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
18         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
19         (WebKit::DatabaseProcessIDBConnection::deleteDatabase):
20         (WebKit::DatabaseProcessIDBConnection::openTransaction):
21         (WebKit::DatabaseProcessIDBConnection::beginTransaction):
22         (WebKit::DatabaseProcessIDBConnection::commitTransaction):
23         (WebKit::DatabaseProcessIDBConnection::resetTransaction):
24         (WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
25         (WebKit::DatabaseProcessIDBConnection::changeDatabaseVersion):
26         (WebKit::DatabaseProcessIDBConnection::createObjectStore):
27         (WebKit::DatabaseProcessIDBConnection::deleteObjectStore):
28         (WebKit::DatabaseProcessIDBConnection::clearObjectStore):
29         (WebKit::DatabaseProcessIDBConnection::createIndex):
30         (WebKit::DatabaseProcessIDBConnection::deleteIndex):
31         (WebKit::DatabaseProcessIDBConnection::putRecord):
32         (WebKit::DatabaseProcessIDBConnection::getRecord):
33         (WebKit::DatabaseProcessIDBConnection::count):
34         (WebKit::DatabaseProcessIDBConnection::deleteRange):
35         (WebKit::DatabaseProcessIDBConnection::openCursor):
36         (WebKit::DatabaseProcessIDBConnection::cursorAdvance):
37         (WebKit::DatabaseProcessIDBConnection::cursorIterate):
38         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
39         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
40         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
41         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
42         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
43         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
44         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
45         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
46         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
47         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
48         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
49         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::advanceCursor):
50
51 2015-06-14  Dan Bernstein  <mitz@apple.com>
52
53         [Cocoa] Clean up postprocess-framework-headers.sh
54         https://bugs.webkit.org/show_bug.cgi?id=145962
55
56         Reviewed by Darin Adler.
57
58         * mac/postprocess-framework-headers.sh: Gather all the sed options in a variable, and then
59         run sed only once on each header. Also, correctly exit with the sed return value if it
60         fails.
61
62 2015-06-13  Chris Dumez  <cdumez@apple.com>
63
64         [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
65         https://bugs.webkit.org/show_bug.cgi?id=145948
66
67         Reviewed by Darin Adler.
68
69         API::Navigation objects were leaked on history navigation to
70         HistoryItems in PageCache. In such case, we would create 2 Navigation
71         objects instead of 1 and the first one would be leaked. The reason
72         we create the second one is because we fail to pass along the
73         navigationID from the UIProcess to the WebProcess and then back to the
74         UIProcess. On the IPC back to the UIProcess, the navigationID ends up
75         being 0 so the UIProcess creates a new Navigation object, thinking that
76         the load was triggered by the WebContent process.
77
78         We now pass along the navigationID, even if the HistoryItem is in the
79         PageCache and we end up reusing the cached DocumentLoader, instead of
80         creating a new one. A new updateCachedDocumentLoader() delegate is
81         added to the FrameLoaderClient, similarly to the pre-existing
82         createDocumentLoader() but for the case where the DocumentLoader gets
83         reused.
84
85         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
86         (WebKit::WebFrameLoaderClient::updateCachedDocumentLoader):
87         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
88         * WebProcess/WebPage/WebPage.cpp:
89         (WebKit::WebPage::goForward):
90         (WebKit::WebPage::goBack):
91         (WebKit::WebPage::goToBackForwardItem):
92         (WebKit::WebPage::updateCachedDocumentLoader):
93         * WebProcess/WebPage/WebPage.h:
94
95 2015-06-12  Gavin Barraclough  <barraclough@apple.com>
96
97         Add private API to force page to always run at foreground priority
98         https://bugs.webkit.org/show_bug.cgi?id=145946
99         <rdar://problem/21267221>
100
101         Reviewed by Anders Carlsson.
102
103         * UIProcess/API/Cocoa/WKWebView.mm:
104         (-[WKWebView initWithFrame:configuration:]):
105             - copy _alwaysRunsAtForegroundPriority to WebPageConfiguration.
106         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
107         (-[WKWebViewConfiguration copyWithZone:]):
108         (-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]):
109         (-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]):
110             - added _alwaysRunsAtForegroundPriority.
111         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
112             - added _alwaysRunsAtForegroundPriority.
113         * UIProcess/WebPageProxy.cpp:
114         (WebKit::WebPageProxy::WebPageProxy):
115             - initialize m_alwaysRunsAtForegroundPriority.
116         (WebKit::WebPageProxy::updateActivityToken):
117             - if m_alwaysRunsAtForegroundPriority is set always take the foreground activity token.
118         * UIProcess/WebPageProxy.h:
119             - added m_alwaysRunsAtForegroundPriority, alwaysRunsAtForegroundPriority.
120
121 2015-06-12  Anders Carlsson  <andersca@apple.com>
122
123         Reimplement WKResourceCacheManagerRef on top of WKWebsiteDataStoreRef
124         https://bugs.webkit.org/show_bug.cgi?id=145951
125
126         Reviewed by Darin Adler.
127
128         * UIProcess/API/C/WKContext.cpp:
129         (WKContextGetResourceCacheManager):
130         * UIProcess/API/C/WKResourceCacheManager.cpp:
131         (WKResourceCacheManagerGetTypeID):
132         (toWebsiteDataTypes):
133         (WKResourceCacheManagerGetCacheOrigins):
134         (WKResourceCacheManagerClearCacheForOrigin):
135         (WKResourceCacheManagerClearCacheForAllOrigins):
136
137 2015-06-12  Anders Carlsson  <andersca@apple.com>
138
139         Reimplement WKApplicationCacheManagerRef as WKWebsiteDataStoreRef
140         https://bugs.webkit.org/show_bug.cgi?id=145950
141
142         Reviewed by Dan Bernstein.
143
144         * UIProcess/API/C/WKAPICast.h:
145         * UIProcess/API/C/WKApplicationCacheManager.cpp:
146         (WKApplicationCacheManagerGetTypeID):
147         (WKApplicationCacheManagerGetApplicationCacheOrigins):
148         (WKApplicationCacheManagerDeleteEntriesForOrigin):
149         (WKApplicationCacheManagerDeleteAllEntries):
150         * UIProcess/API/C/WKContext.cpp:
151         (WKContextGetApplicationCacheManager):
152         (WKContextGetPluginSiteDataManager):
153
154 2015-06-12  Anders Carlsson  <andersca@apple.com>
155
156         Clean up IndexedDB website data retrieval and removal
157         https://bugs.webkit.org/show_bug.cgi?id=145941
158
159         Reviewed by Andreas Kling.
160
161         - Use SecurityOrigin instead of SecurityOriginData; It's not possible to pass SecurityOriginData
162         safely between threads.
163         
164         - Use std::chrono instead of double for modification times.
165         
166         - Get rid of endTime since it's not used.
167         
168         - Change deleteIndexedDatabaseEntriesForOrigin to deleteIndexedDatabaseEntriesForOrigins and make it take
169         a vector of origins instead of a single one.
170
171         - Get rid of deleteAllIndexedDatabaseEntries.
172
173         - Change SecurityOriginData::securityOrigin to call isolatedCopy on the origin components, since it's common
174         to pass origins to other threads and we want that to be safe.
175
176         * DatabaseProcess/DatabaseProcess.cpp:
177         (WebKit::DatabaseProcess::fetchWebsiteData):
178         (WebKit::DatabaseProcess::deleteWebsiteData):
179         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
180         (WebKit::DatabaseProcess::indexedDatabaseOrigins):
181         (WebKit::removeAllDatabasesForOriginPath):
182         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigins):
183         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedSince):
184         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins): Deleted.
185         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin): Deleted.
186         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
187         (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries): Deleted.
188         * DatabaseProcess/DatabaseProcess.h:
189         * Shared/SecurityOriginData.cpp:
190         (WebKit::SecurityOriginData::securityOrigin):
191
192 2015-06-12  Antti Koivisto  <antti@apple.com>
193
194         Network Cache: Use SHA1 for header checksum
195         https://bugs.webkit.org/show_bug.cgi?id=145928
196
197         Reviewed by Chris Dumez.
198
199         Use SHA1 everywhere for consistency and robustness.
200
201         * NetworkProcess/cache/NetworkCacheStorage.cpp:
202         (WebKit::NetworkCache::Storage::bodyPathForKey):
203         (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
204         (WebKit::NetworkCache::decodeRecordMetaData):
205         (WebKit::NetworkCache::decodeRecordHeader):
206         (WebKit::NetworkCache::encodeRecordMetaData):
207         (WebKit::NetworkCache::Storage::encodeRecord):
208         (WebKit::NetworkCache::hashData): Deleted.
209
210             This was the last user of 32 bit hashes in cache code.
211
212         * NetworkProcess/cache/NetworkCacheStorage.h:
213
214             Also bump the cache version number as recent changes have changed the format.
215             Old caches would transition fine but this makes it easier to identify which version user has.
216
217 2015-06-12  Simon Fraser  <simon.fraser@apple.com>
218
219         [iOS WK2] Video with reflection crashes WebKit and Safari
220         https://bugs.webkit.org/show_bug.cgi?id=145905
221         rdar://problem/18364939
222
223         Reviewed by Anders Carlsson.
224         
225         On iOS, AVPlayerLayers are contained inside a WebVideoContainerLayer, but
226         the layer type is still LayerTypeAVPlayerLayer.
227         
228         Avoid throwing exceptions when cloning such layers by checking the layer class.
229
230         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
231         (WebKit::PlatformCALayerRemoteCustom::clone):
232
233 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
234
235         [EFL] Fix unused private field warning in WebContextMenuProxyEfl.cpp
236         https://bugs.webkit.org/show_bug.cgi?id=145911
237
238         Reviewed by Darin Adler.
239
240         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
241         (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl): Deleted.
242         * UIProcess/efl/WebContextMenuProxyEfl.h:
243
244 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
245
246         Unreviewed build fix after r185502.
247
248         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
249         GRefPtr.h header has been moved to a different place.
250
251 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
252
253         [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
254         https://bugs.webkit.org/show_bug.cgi?id=145799
255
256         Reviewed by Carlos Garcia Campos.
257
258         Update header inclusions for headers that have been moved
259         to Source/WTF/wtf/glib/.
260
261         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
262         * NetworkProcess/cache/NetworkCacheIOChannel.h:
263         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
264         * NetworkProcess/soup/NetworkProcessSoup.cpp:
265         * PlatformEfl.cmake:
266         * PlatformGTK.cmake:
267         * Shared/Downloads/soup/DownloadSoup.cpp:
268         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
269         * Shared/PrintInfo.h:
270         * Shared/gtk/ArgumentCodersGtk.cpp:
271         * Shared/gtk/ArgumentCodersGtk.h:
272         * Shared/gtk/KeyedDecoder.h:
273         * Shared/gtk/KeyedEncoder.h:
274         * Shared/gtk/ProcessExecutablePathGtk.cpp:
275         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
276         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
277         * UIProcess/API/gtk/WebKitColorChooser.h:
278         * UIProcess/API/gtk/WebKitContextMenu.cpp:
279         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
280         * UIProcess/API/gtk/WebKitCookieManager.cpp:
281         * UIProcess/API/gtk/WebKitDownload.cpp:
282         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
283         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
284         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
285         * UIProcess/API/gtk/WebKitFindController.cpp:
286         * UIProcess/API/gtk/WebKitFormClient.cpp:
287         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
288         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
289         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
290         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
291         * UIProcess/API/gtk/WebKitMimeInfo.cpp:
292         * UIProcess/API/gtk/WebKitNavigationAction.cpp:
293         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
294         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
295         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
296         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
297         * UIProcess/API/gtk/WebKitUIClient.cpp:
298         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
299         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
300         * UIProcess/API/gtk/WebKitWebContext.cpp:
301         * UIProcess/API/gtk/WebKitWebInspector.cpp:
302         * UIProcess/API/gtk/WebKitWebResource.cpp:
303         * UIProcess/API/gtk/WebKitWebView.cpp:
304         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
305         * UIProcess/InspectorServer/WebSocketServer.h:
306         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
307         * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
308         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
309         * UIProcess/Plugins/gtk/PluginInfoCache.h:
310         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
311         * UIProcess/gtk/DragAndDropHandler.cpp:
312         * UIProcess/gtk/GestureController.h:
313         * UIProcess/gtk/InputMethodFilter.cpp:
314         * UIProcess/gtk/InputMethodFilter.h:
315         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
316         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
317         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
318         * UIProcess/gtk/WebProcessPoolGtk.cpp:
319         * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
320         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
321         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
322         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
323         * WebProcess/WebPage/WebPage.h:
324         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
325         * WebProcess/WebPage/gtk/PrinterListGtk.h:
326         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
327         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
328         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
329         * WebProcess/gtk/WebGtkExtensionManager.h:
330         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
331         * WebProcess/soup/WebProcessSoup.cpp:
332         * WebProcess/soup/WebSoupRequestManager.h:
333
334 2015-06-12  Antti Koivisto  <antti@apple.com>
335
336         Network Cache: Use SHA1 for key hash
337         https://bugs.webkit.org/show_bug.cgi?id=143829
338
339         Reviewed by Anders Carlsson.
340
341         For consistency with blobs, use SHA1 instead of MD5.
342
343         * NetworkProcess/cache/NetworkCacheCoders.cpp:
344         (WebKit::NetworkCache::Coder<MD5::Digest>::encode): Deleted.
345         (WebKit::NetworkCache::Coder<MD5::Digest>::decode): Deleted.
346
347             No longer needed.
348
349         * NetworkProcess/cache/NetworkCacheCoders.h:
350         * NetworkProcess/cache/NetworkCacheKey.cpp:
351         (WebKit::NetworkCache::hashString):
352         (WebKit::NetworkCache::Key::computeHash):
353         * NetworkProcess/cache/NetworkCacheKey.h:
354
355 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
356
357         Fix mismatched-tags warning in Source/WebKit2/UIProcess/gtk/InputMethodFilter.h
358         https://bugs.webkit.org/show_bug.cgi?id=145923
359
360         Reviewed by Carlos Garcia Campos.
361
362         * UIProcess/gtk/InputMethodFilter.h:
363
364 2015-06-12  Antti Koivisto  <antti@apple.com>
365
366         Use SHA1 for cache coder checksums
367         https://bugs.webkit.org/show_bug.cgi?id=145880
368
369         Reviewed by Anders Carlsson.
370
371         Make cache data error detection more robust by using SHA1 for checksums.
372
373         * NetworkProcess/cache/NetworkCacheDecoder.cpp:
374         (WebKit::NetworkCache::Decoder::Decoder):
375         (WebKit::NetworkCache::Decoder::decodeFixedLengthData):
376         (WebKit::NetworkCache::Decoder::decodeNumber):
377         (WebKit::NetworkCache::Decoder::verifyChecksum):
378         * NetworkProcess/cache/NetworkCacheDecoder.h:
379         * NetworkProcess/cache/NetworkCacheEncoder.cpp:
380         (WebKit::NetworkCache::Encoder::Encoder):
381         (WebKit::NetworkCache::Encoder::grow):
382         (WebKit::NetworkCache::Encoder::updateChecksumForData):
383         (WebKit::NetworkCache::Encoder::encodeFixedLengthData):
384         (WebKit::NetworkCache::Encoder::encodeNumber):
385         (WebKit::NetworkCache::Encoder::encodeChecksum):
386         * NetworkProcess/cache/NetworkCacheEncoder.h:
387         (WebKit::NetworkCache::Encoder::buffer):
388         (WebKit::NetworkCache::Encoder::bufferSize):
389         (WebKit::NetworkCache::Encoder::updateChecksumForNumber):
390
391 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
392
393         [EFL] Fix deprecated declarations warnings related to WK2 versioned structs
394         https://bugs.webkit.org/show_bug.cgi?id=145913
395
396         Reviewed by Gyuyoung Kim.
397
398         * UIProcess/API/efl/ewk_favicon_database.cpp:
399         (EwkFaviconDatabase::EwkFaviconDatabase):
400         * UIProcess/efl/ContextHistoryClientEfl.cpp:
401         (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
402         * UIProcess/efl/ContextMenuClientEfl.cpp:
403         (ContextMenuClientEfl::ContextMenuClientEfl):
404         * UIProcess/efl/DownloadManagerEfl.cpp:
405         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
406         * UIProcess/efl/FindClientEfl.cpp:
407         (WebKit::FindClientEfl::FindClientEfl):
408         * UIProcess/efl/FormClientEfl.cpp:
409         (WebKit::FormClientEfl::FormClientEfl):
410         * UIProcess/efl/PageUIClientEfl.cpp:
411         (WebKit::PageUIClientEfl::PageUIClientEfl):
412
413 2015-06-11  Mark Lam  <mark.lam@apple.com>
414
415         WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
416         https://bugs.webkit.org/show_bug.cgi?id=145872
417
418         Reviewed by Michael Saboff.
419
420         * WebProcess/InjectedBundle/InjectedBundle.cpp:
421         (WebKit::InjectedBundle::reportException):
422         - Don't assume we have an Exception object.  Let WebCore::reportException() take
423           care of it.
424
425 2015-06-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
426
427         [CMake] Unreviewed build fix after r185479.
428
429         * CMakeLists.txt: Unlist the files that r185479 deleted.
430
431 2015-06-11  Anders Carlsson  <andersca@apple.com>
432
433         Get rid of WebOriginDataManager
434         https://bugs.webkit.org/show_bug.cgi?id=145896
435
436         Reviewed by Andreas Kling.
437
438         * DatabaseProcess/DatabaseProcess.cpp:
439         (WebKit::DatabaseProcess::DatabaseProcess): Deleted.
440         (WebKit::DatabaseProcess::getOrigins): Deleted.
441         (WebKit::DatabaseProcess::deleteEntriesForOrigin): Deleted.
442         (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates): Deleted.
443         (WebKit::DatabaseProcess::deleteAllEntries): Deleted.
444         * DatabaseProcess/DatabaseProcess.h:
445         * DerivedSources.make:
446         * UIProcess/API/C/WKAPICast.h:
447         * UIProcess/API/C/WKContext.cpp:
448         * UIProcess/Databases/DatabaseProcessProxy.cpp:
449         (WebKit::DatabaseProcessProxy::didReceiveMessage): Deleted.
450         * UIProcess/WebOriginDataManagerProxy.cpp: Removed.
451         (WebKit::WebOriginDataManagerProxy::supplementName): Deleted.
452         (WebKit::WebOriginDataManagerProxy::create): Deleted.
453         (WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy): Deleted.
454         (WebKit::WebOriginDataManagerProxy::~WebOriginDataManagerProxy): Deleted.
455         (WebKit::WebOriginDataManagerProxy::processPoolDestroyed): Deleted.
456         (WebKit::WebOriginDataManagerProxy::processDidClose): Deleted.
457         (WebKit::WebOriginDataManagerProxy::shouldTerminate): Deleted.
458         (WebKit::WebOriginDataManagerProxy::refWebContextSupplement): Deleted.
459         (WebKit::WebOriginDataManagerProxy::derefWebContextSupplement): Deleted.
460         (WebKit::CallbackSynchronizer::create): Deleted.
461         (WebKit::CallbackSynchronizer::~CallbackSynchronizer): Deleted.
462         (WebKit::CallbackSynchronizer::taskStarted): Deleted.
463         (WebKit::CallbackSynchronizer::taskCompleted): Deleted.
464         (WebKit::CallbackSynchronizer::CallbackSynchronizer): Deleted.
465         (WebKit::createSynchronizedCallback): Deleted.
466         (WebKit::sendMessageToAllProcessesInProcessPool): Deleted.
467         (WebKit::WebOriginDataManagerProxy::getOrigins): Deleted.
468         (WebKit::WebOriginDataManagerProxy::didGetOrigins): Deleted.
469         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Deleted.
470         (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Deleted.
471         (WebKit::WebOriginDataManagerProxy::didDeleteEntries): Deleted.
472         (WebKit::WebOriginDataManagerProxy::deleteAllEntries): Deleted.
473         (WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Deleted.
474         * UIProcess/WebOriginDataManagerProxy.h: Removed.
475         * UIProcess/WebOriginDataManagerProxy.messages.in: Removed.
476         * UIProcess/WebProcessPool.cpp:
477         * WebKit2.xcodeproj/project.pbxproj:
478         * WebProcess/OriginData/WebOriginDataManager.cpp: Removed.
479         (WebKit::WebOriginDataManager::WebOriginDataManager): Deleted.
480         (WebKit::WebOriginDataManager::getOrigins): Deleted.
481         (WebKit::WebOriginDataManager::deleteEntriesForOrigin): Deleted.
482         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Deleted.
483         (WebKit::WebOriginDataManager::deleteAllEntries): Deleted.
484         * WebProcess/OriginData/WebOriginDataManager.h: Removed.
485         * WebProcess/OriginData/WebOriginDataManager.messages.in: Removed.
486         * WebProcess/OriginData/WebOriginDataManagerSupplement.h: Removed.
487         (WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement): Deleted.
488         (WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement): Deleted.
489         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
490         * WebProcess/WebPage/WebPage.cpp:
491         * WebProcess/WebProcess.cpp:
492         (WebKit::WebProcess::~WebProcess):
493         (WebKit::WebProcess::WebProcess): Deleted.
494         (WebKit::WebProcess::getOrigins): Deleted.
495         (WebKit::WebProcess::deleteEntriesForOrigin): Deleted.
496         (WebKit::WebProcess::deleteEntriesModifiedBetweenDates): Deleted.
497         (WebKit::WebProcess::deleteAllEntries): Deleted.
498         * WebProcess/WebProcess.h:
499         * WebProcess/cocoa/WebProcessCocoa.mm:
500
501 2015-06-11  Matt Rajca  <mrajca@apple.com>
502
503         Media Session: Add plumbing for media control event delivery.
504         https://bugs.webkit.org/show_bug.cgi?id=145859
505
506         Reviewed by Anders Carlsson.
507
508         * UIProcess/API/C/WKPage.cpp:
509         (WKPageHandleMediaEvent):
510         * UIProcess/API/C/WKPagePrivate.h:
511         * UIProcess/WebPageProxy.cpp:
512         (WebKit::WebPageProxy::handleMediaEvent):
513         * UIProcess/WebPageProxy.h:
514         * WebProcess/WebPage/WebPage.cpp:
515         (WebKit::WebPage::handleMediaEvent):
516         * WebProcess/WebPage/WebPage.h:
517         * WebProcess/WebPage/WebPage.messages.in:
518
519 2015-06-11  Myles C. Maxfield  <mmaxfield@apple.com>
520
521         [OS X] Decoding fonts may return nil when using force click
522         https://bugs.webkit.org/show_bug.cgi?id=145890
523
524         Reviewed by Beth Dakin.
525
526         [NSFontDescriptor fontDescriptorWithFontAttributes] might return nil, which
527         causes the encoding of an NSFont to erroneously return true.
528
529         * Shared/mac/ArgumentCodersMac.mm:
530         (IPC::decode):
531
532 2015-06-11  Anders Carlsson  <andersca@apple.com>
533
534         Reimplement WKOriginDataManager in terms of API::WebsiteDataStore
535         https://bugs.webkit.org/show_bug.cgi?id=145889
536
537         Reviewed by Dan Bernstein.
538
539         * UIProcess/API/C/WKAPICast.h:
540         * UIProcess/API/C/WKContext.cpp:
541         (WKContextGetOriginDataManager):
542         * UIProcess/API/C/WKOriginDataManager.cpp:
543         (WKOriginDataManagerGetTypeID):
544         (WKOriginDataManagerGetOrigins):
545         (WKOriginDataManagerDeleteEntriesForOrigin):
546         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
547         (WKOriginDataManagerDeleteAllEntries):
548
549 2015-06-11  Brent Fulgham  <bfulgham@apple.com>
550
551         Full screen video space can be resized to 1pt wide
552         https://bugs.webkit.org/show_bug.cgi?id=145895
553         <rdar://problem/20907914>
554
555         Reviewed by Simon Fraser.
556
557         Prior to the upcoming OS X, full screen mode was not resizable. Now that it is,
558         we need to set a minimum window width that is large enough to hold the media
559         controls. This makes our full-screen video behave the same as the QuickTimeX player.
560
561         * UIProcess/mac/WKFullScreenWindowController.mm:
562         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Active that new
563         kWKLayoutModeDynamicSizeWithMinimumViewSize style, and set the minimum view size to
564         be the width of our media controls, with 20 pixels of padding on either side.
565         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Set the layout
566         mode back to the default style.
567
568 2015-06-11  Jon Lee  <jonlee@apple.com>
569
570         Update media controls JS and CSS to use picture-in-picture
571         https://bugs.webkit.org/show_bug.cgi?id=145827
572         <rdar://problem/21311576>
573
574         Reviewed by Dean Jackson.
575
576         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
577         (InitWebCoreSystemInterface): Deleted GetMediaUIImageData.
578
579 2015-06-11  Alex Christensen  <achristensen@webkit.org>
580
581         Speculative build fix for GTK after r185463.
582
583         * CMakeLists.txt:
584         Remove WebPluginSiteDataManager.cpp from CMake build.
585
586 2015-06-11  Anders Carlsson  <andersca@apple.com>
587
588         Remove WebPluginSiteDataManager
589         https://bugs.webkit.org/show_bug.cgi?id=145884
590
591         Reviewed by Andreas Kling.
592
593         * PluginProcess/PluginProcess.cpp:
594         (WebKit::PluginProcess::clearSiteData): Deleted.
595         * PluginProcess/PluginProcess.h:
596         * PluginProcess/PluginProcess.messages.in:
597         * UIProcess/API/C/WKAPICast.h:
598         * UIProcess/API/C/WKContext.cpp:
599         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
600         * UIProcess/Plugins/PluginProcessManager.cpp:
601         (WebKit::PluginProcessManager::clearSiteData): Deleted.
602         * UIProcess/Plugins/PluginProcessManager.h:
603         * UIProcess/Plugins/PluginProcessProxy.cpp:
604         (WebKit::PluginProcessProxy::clearSiteData): Deleted.
605         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): Deleted.
606         (WebKit::PluginProcessProxy::didFinishLaunching): Deleted.
607         (WebKit::PluginProcessProxy::didClearSiteData): Deleted.
608         * UIProcess/Plugins/PluginProcessProxy.h:
609         * UIProcess/Plugins/PluginProcessProxy.messages.in:
610         * UIProcess/Plugins/WebPluginSiteDataManager.cpp: Removed.
611         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState): Deleted.
612         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin): Deleted.
613         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::didGetSitesWithDataForSinglePlugin): Deleted.
614         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState): Deleted.
615         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::clearSiteDataForNextPlugin): Deleted.
616         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::didClearSiteDataForSinglePlugin): Deleted.
617         (WebKit::WebPluginSiteDataManager::create): Deleted.
618         (WebKit::WebPluginSiteDataManager::WebPluginSiteDataManager): Deleted.
619         (WebKit::WebPluginSiteDataManager::~WebPluginSiteDataManager): Deleted.
620         (WebKit::WebPluginSiteDataManager::invalidate): Deleted.
621         (WebKit::WebPluginSiteDataManager::getSitesWithData): Deleted.
622         (WebKit::WebPluginSiteDataManager::didGetSitesWithData): Deleted.
623         (WebKit::WebPluginSiteDataManager::clearSiteData): Deleted.
624         (WebKit::WebPluginSiteDataManager::didClearSiteData): Deleted.
625         (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin): Deleted.
626         (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins): Deleted.
627         (WebKit::WebPluginSiteDataManager::didClearSiteDataForSinglePlugin): Deleted.
628         (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins): Deleted.
629         * UIProcess/Plugins/WebPluginSiteDataManager.h: Removed.
630         (WebKit::WebPluginSiteDataManager::processPool): Deleted.
631         (WebKit::WebPluginSiteDataManager::clearProcessPool): Deleted.
632         * UIProcess/WebProcessPool.cpp:
633         (WebKit::WebProcessPool::~WebProcessPool): Deleted.
634         * UIProcess/WebProcessPool.h:
635         * UIProcess/WebProcessProxy.cpp:
636         * WebKit2.xcodeproj/project.pbxproj:
637
638 2015-06-11  Anders Carlsson  <andersca@apple.com>
639
640         Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
641         https://bugs.webkit.org/show_bug.cgi?id=145882
642
643         Reviewed by Dan Bernstein.
644
645         * UIProcess/API/C/WKAPICast.h:
646         * UIProcess/API/C/WKContext.cpp:
647         (WKContextGetPluginSiteDataManager):
648         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
649         (WKPluginSiteDataManagerGetTypeID):
650         (WKPluginSiteDataManagerGetSitesWithData):
651         (WKPluginSiteDataManagerClearSiteData):
652         (WKPluginSiteDataManagerClearAllSiteData):
653
654 2015-06-11  Antti Koivisto  <antti@apple.com>
655
656         Network process crashes decoding invalid cache entry on 32bit system
657         https://bugs.webkit.org/show_bug.cgi?id=145842
658         rdar://problem/21228334
659
660         Reviewed by Anders Carlsson.
661
662         After cache scheme changes we may end up decoding invalid cache entries. This is by design,
663         we should just fail decoding and delete these entries.
664
665         However Decoder::bufferIsLargeEnoughToContain test in some cases would allow corrupted large
666         sizes due to overflow in 32bit pointer math and we would crash when allocating a string.
667
668         * NetworkProcess/cache/NetworkCacheCoders.cpp:
669         (WebKit::NetworkCache::Coder<CString>::decode):
670         (WebKit::NetworkCache::decodeStringText):
671         (WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode):
672         (WebKit::NetworkCache::Coder<MD5::Digest>::encode):
673         * NetworkProcess/cache/NetworkCacheCoders.h:
674         * NetworkProcess/cache/NetworkCacheDecoder.cpp:
675         (WebKit::NetworkCache::Decoder::Decoder):
676         (WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain):
677
678             Reshuffle to avoid sum.
679
680         (WebKit::NetworkCache::Decoder::decodeFixedLengthData):
681         * NetworkProcess/cache/NetworkCacheDecoder.h:
682         (WebKit::NetworkCache::Decoder::bufferSize):
683         (WebKit::NetworkCache::Decoder::currentOffset):
684         (WebKit::NetworkCache::Decoder::length): Deleted.
685         (WebKit::NetworkCache::Decoder::isInvalid): Deleted.
686         (WebKit::NetworkCache::Decoder::markInvalid): Deleted.
687
688             Remove these, they are not really used or needed.
689
690 2015-06-10  Anders Carlsson  <andersca@apple.com>
691
692         Rewrite WKPluginSiteDataManager using WebsiteDataStore functions
693         https://bugs.webkit.org/show_bug.cgi?id=145868
694
695         Reviewed by Antti Koivisto.
696
697         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
698         (WKPluginSiteDataManagerGetSitesWithData):
699         (WKPluginSiteDataManagerClearSiteData):
700         (WKPluginSiteDataManagerClearAllSiteData):
701         (toNPClearSiteDataFlags): Deleted.
702         * UIProcess/Plugins/WebPluginSiteDataManager.h:
703         (WebKit::WebPluginSiteDataManager::processPool):
704
705 2015-06-11  Antti Koivisto  <antti@apple.com>
706
707         3% cold PLT regression from network cache on iOS
708         https://bugs.webkit.org/show_bug.cgi?id=145694
709         rdar://problem/21158245
710
711         Reviewed by Chris Dumez.
712
713         Cache does not help in cold page loads but it shouldn't' be hurting either. Write I/O needs to be toned down a bit.
714
715         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
716         (WebKit::NetworkCache::IOChannel::IOChannel):
717         (WebKit::NetworkCache::IOChannel::open):
718
719             Dispatch channels inherit their I/O priority from the target queue. Use background queue for write I/O.
720
721         * NetworkProcess/cache/NetworkCacheStorage.cpp:
722         (WebKit::NetworkCache::Storage::Storage):
723         (WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
724         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
725
726             Only write one file at a time instead of maximum of three.
727
728         (WebKit::NetworkCache::Storage::retrieve):
729
730             For consistency with store prepend new entries here too.
731
732         (WebKit::NetworkCache::Storage::store):
733
734             Delay start of the first write operation by 1s.
735             Prepend instead of append to the pending write deque so retrieveFromMemory lookup finds newest entries first in case of duplicates
736
737         (WebKit::NetworkCache::Storage::traverse):
738         * NetworkProcess/cache/NetworkCacheStorage.h:
739
740 2015-06-10  Yongjun Zhang  <yongjun_zhang@apple.com>
741
742         Don't send touch events on link preview.
743         https://bugs.webkit.org/show_bug.cgi?id=145863
744
745         Disable web touch event recognizer on link preview. We do the same when finding nodes in inspector or when long press gesture
746         is recognized (by _cancelAllTouches). 
747
748         Reviewed by Beth Dakin.
749
750         * UIProcess/ios/WKContentViewInteraction.mm:
751         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Remove touch event gesture recognizer on preview start.
752         (-[WKContentView didDismissPreviewViewController:committing:]): Add the gesture recognizer back on dismiss.
753
754 2015-06-10  Anders Carlsson  <andersca@apple.com>
755
756         WKWebsiteDataStore should handle removing plug-in data for individual records
757         https://bugs.webkit.org/show_bug.cgi?id=145864
758
759         Reviewed by Beth Dakin.
760
761         * PluginProcess/PluginProcess.cpp:
762         (WebKit::PluginProcess::deleteWebsiteDataForHostNames):
763         * PluginProcess/PluginProcess.h:
764         * PluginProcess/PluginProcess.messages.in:
765         * UIProcess/Plugins/PluginProcessManager.cpp:
766         (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):
767         * UIProcess/Plugins/PluginProcessManager.h:
768         * UIProcess/Plugins/PluginProcessProxy.cpp:
769         (WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
770         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
771         (WebKit::PluginProcessProxy::didFinishLaunching):
772         (WebKit::PluginProcessProxy::didDeleteWebsiteDataForHostNames):
773         * UIProcess/Plugins/PluginProcessProxy.h:
774         * UIProcess/Plugins/PluginProcessProxy.messages.in:
775         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
776         (WebKit::WebsiteDataStore::removeData):
777
778 2015-06-10  Anders Carlsson  <andersca@apple.com>
779
780         WKWebsiteDataStore should handle removing plug-in data
781         https://bugs.webkit.org/show_bug.cgi?id=145862
782
783         Reviewed by Sam Weinig.
784
785         * PluginProcess/PluginProcess.cpp:
786         (WebKit::PluginProcess::deleteWebsiteData):
787         * PluginProcess/PluginProcess.h:
788         * PluginProcess/PluginProcess.messages.in:
789         * UIProcess/Plugins/PluginProcessManager.cpp:
790         (WebKit::PluginProcessManager::deleteWebsiteData):
791         * UIProcess/Plugins/PluginProcessManager.h:
792         * UIProcess/Plugins/PluginProcessProxy.cpp:
793         (WebKit::PluginProcessProxy::~PluginProcessProxy):
794         (WebKit::PluginProcessProxy::deleteWebsiteData):
795         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
796         (WebKit::PluginProcessProxy::didFinishLaunching):
797         (WebKit::PluginProcessProxy::didDeleteWebsiteData):
798         * UIProcess/Plugins/PluginProcessProxy.h:
799         * UIProcess/Plugins/PluginProcessProxy.messages.in:
800         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
801         (WebKit::WebsiteDataStore::removeData):
802
803 2015-06-10  Brent Fulgham  <bfulgham@apple.com>
804
805         [WK2] Do not indicate Media Keys are present when they are not
806         https://bugs.webkit.org/show_bug.cgi?id=145713
807         <rdar://problem/19752566>
808
809         Reviewed by Dean Jackson.
810
811         Correct the reporting of Media Key presence by checking for the actual
812         media key file, not just the directory. Sometimes the directory will exist
813         with no media key files (e.g., if a user navigates to the directory using
814         the Finder).
815
816         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
817         (WebKit::computeMediaKeyFile): Moved earlier in file so it could be used by
818         the 'mediaKeyOrigins' method.
819         (WebKit::WebsiteDataStore::mediaKeyOrigins): Only indicate we have a media key
820         origin if the folder actually contains the media key file.
821         (WebKit::WebsiteDataStore::removeMediaKeys): Use the existing 'computeMediaKeyFile',
822         rather than manually building the file from strings.
823
824 2015-06-09  Anders Carlsson  <andersca@apple.com>
825
826         Support fetching website data
827         https://bugs.webkit.org/show_bug.cgi?id=145828
828
829         Reviewed by Darin Adler.
830
831         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
832         (WebKit::WebsiteDataStore::fetchData):
833         (WebKit::WebsiteDataStore::plugins):
834         * UIProcess/WebsiteData/WebsiteDataStore.h:
835
836 2015-06-10  Zan Dobersek  <zdobersek@igalia.com>
837
838         Unreviewed. Fixing the build for the GTK port with Clang.
839
840         * UIProcess/gtk/InputMethodFilter.h: Add the <functional> header inclusion
841         to avoid compilation errors due to missing std::function<>.
842
843 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
844
845         [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
846         https://bugs.webkit.org/show_bug.cgi?id=145840
847
848         Reviewed by Martin Robinson.
849
850         It's currently used only by WebKit2 in the UI process and it's
851         another file built twice because of the GTK2 plugin process.
852
853         * PlatformGTK.cmake:
854         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
855         * UIProcess/gtk/KeyBindingTranslator.cpp: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.cpp.
856         (WebKit::backspaceCallback):
857         (WebKit::selectAllCallback):
858         (WebKit::cutClipboardCallback):
859         (WebKit::copyClipboardCallback):
860         (WebKit::pasteClipboardCallback):
861         (WebKit::toggleOverwriteCallback):
862         (WebKit::popupMenuCallback):
863         (WebKit::showHelpCallback):
864         (WebKit::deleteFromCursorCallback):
865         (WebKit::moveCursorCallback):
866         (WebKit::KeyBindingTranslator::KeyBindingTranslator):
867         (WebKit::KeyBindingTranslator::commandsForKeyEvent):
868         * UIProcess/gtk/KeyBindingTranslator.h: Renamed from Source/WebCore/platform/gtk/KeyBindingTranslator.h.
869         (WebKit::KeyBindingTranslator::addPendingEditorCommand):
870
871 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
872
873         [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
874         https://bugs.webkit.org/show_bug.cgi?id=145598
875
876         Reviewed by Žan Doberšek.
877
878         We are sending GetEditorCommandsForKeyEvent sync message from web
879         process to the UI process for every key pressed. And if the
880         keydown event doesn't handle the key, the message is sent again
881         for the keypress event, so in many cases it happens twice per
882         keypress. We can get the list of commands when the key press event
883         happens in the web view, and send it to the web process as part of
884         the keyboard event like mac port does. In the web process,
885         commands not inserting text will be handled by keydown and the
886         rest in keypress without having to use any other IPC message for that.
887
888         * Shared/NativeWebKeyboardEvent.h: Add command list parameter to
889         the constructor.
890         * Shared/WebEvent.h: Add GTK specific constructor that receives a
891         list of commands and whether the event was handled by input methods.
892         (WebKit::WebKeyboardEvent::commands): Returns the list of commands.
893         * Shared/WebEventConversion.cpp:
894         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
895         Also copy the commands and handledByInputMethod member.
896         * Shared/WebKeyboardEvent.cpp:
897         (WebKit::WebKeyboardEvent::WebKeyboardEvent): Implement GTK
898         specific constructor that receives a list of commands and whether
899         the event was handled by input methods.
900         (WebKit::WebKeyboardEvent::encode): Encode commands and handledByInputMethod.
901         (WebKit::WebKeyboardEvent::decode): Decode commands and handledByInputMethod.
902         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
903         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Add
904         command list parameter to the constructor.
905         * Shared/gtk/WebEventFactory.cpp:
906         (WebKit::WebEventFactory::createWebKeyboardEvent): Use the new
907         WebKeyboardEvent constructor and simplify the code. We don't need
908         to explicitly set VK_PROCESSKEY as windows virtual key code when
909         the event was handled by input methods. The WebCore event handler
910         already does that.
911         * Shared/gtk/WebEventFactory.h:
912         * UIProcess/API/gtk/PageClientImpl.cpp:
913         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Deleted.
914         * UIProcess/API/gtk/PageClientImpl.h:
915         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add a
916         KeyBindingTranslator member.
917         (webkitWebViewBaseKeyPressEvent): Use the new
918         InputMethodFilter::filterKeyEvent() API and get the list of
919         commands for the key when events was not handled by input methods.
920         (webkitWebViewBaseKeyReleaseEvent): Use the new
921         InputMethodFilter::filterKeyEvent() API.
922         * UIProcess/PageClient.h:
923         * UIProcess/WebPageProxy.messages.in: Remove GetEditorCommandsForKeyEvent message.
924         * UIProcess/gtk/InputMethodFilter.cpp:
925         (WebKit::InputMethodFilter::handleKeyboardEvent): Call the
926         completation handler.
927         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults): Ditto.
928         (WebKit::InputMethodFilter::filterKeyEvent): Use a completion
929         handler for the task, so that the caller (the web view) can handle
930         the keyboard event.
931         * UIProcess/gtk/InputMethodFilter.h:
932         * UIProcess/gtk/WebPageProxyGtk.cpp:
933         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Deleted.
934         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
935         (WebKit::WebEditorClient::handleKeyboardEvent): Return earlier if
936         the event was handled by input methods. And get the list of
937         commands from the PlatformKeyboardEvent instead of sending a sync
938         message to the UI process.
939         (WebKit::WebEditorClient::handleInputMethodKeydown): If the event
940         was handled by inpout methods, set the event as default handled so
941         that the WebCore event handler sets VK_PROCESSKEY as windows
942         virtual key code.
943         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Deleted.
944
945 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
946
947         Unreviewed. Fix GTK build after r185412.
948
949         Add missing include.
950
951         * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
952
953 2015-06-10  Antti Koivisto  <antti@apple.com>
954
955         NetworkCache: Delete old cache versions
956         https://bugs.webkit.org/show_bug.cgi?id=145800
957
958         Reviewed by Darin Adler.
959
960         * CMakeLists.txt:
961         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
962         (WebKit::NetworkCache::BlobStorage::synchronize):
963         * NetworkProcess/cache/NetworkCacheFileSystem.cpp: Added.
964         (WebKit::NetworkCache::directoryEntryType):
965         (WebKit::NetworkCache::traverseDirectory):
966
967             Pass entry type as callback argument.
968
969         (WebKit::NetworkCache::deleteDirectoryRecursively):
970
971             Add helper.
972
973         (WebKit::NetworkCache::fileTimes):
974         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
975         * NetworkProcess/cache/NetworkCacheFileSystem.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h.
976
977             Move code to cpp.
978
979         (WebKit::NetworkCache::traverseDirectory): Deleted.
980         (WebKit::NetworkCache::traverseCacheFiles): Deleted.
981         (WebKit::NetworkCache::fileTimes): Deleted.
982         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded): Deleted.
983         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h: Removed.
984         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
985         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
986         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
987         * NetworkProcess/cache/NetworkCacheStorage.cpp:
988         (WebKit::NetworkCache::makeBlobDirectoryPath):
989         (WebKit::NetworkCache::traverseRecordsFiles):
990
991             Move cache hierarchy aware traversal code here from NetworkCacheFileSystem (for better layering).
992             Rename for clarity.
993
994         (WebKit::NetworkCache::deleteEmptyRecordsDirectories):
995
996             Factor to a function.
997
998         (WebKit::NetworkCache::Storage::Storage):
999         (WebKit::NetworkCache::Storage::synchronize):
1000         (WebKit::NetworkCache::Storage::traverse):
1001         (WebKit::NetworkCache::Storage::clear):
1002
1003             Use traverseRecordsFiles for traversal.
1004
1005         (WebKit::NetworkCache::Storage::shrink):
1006         (WebKit::NetworkCache::Storage::deleteOldVersions):
1007
1008             Delete version subdirectories with version number less than the current version.
1009             Remove code for clearing unversioned V1 caches. No one should have them.
1010
1011         * NetworkProcess/cache/NetworkCacheStorage.h:
1012         * UIProcess/API/APIUserContentExtensionStore.cpp:
1013         * WebKit2.xcodeproj/project.pbxproj:
1014
1015 2015-06-10  Zan Dobersek  <zdobersek@igalia.com>
1016
1017         [GTK] Web Inspector is broken
1018         https://bugs.webkit.org/show_bug.cgi?id=145836
1019
1020         Reviewed by Carlos Garcia Campos.
1021
1022         * PlatformGTK.cmake: Thread the InspectorBackendCommands.js file as a separate
1023         dependency of InspectorGResourceBundle.xml. It can't be listed under the InspectorFiles
1024         variable and then searched via the CMake glob command because it probably won't exist
1025         at the time the command is run (since it's copied into the specified path), so it won't
1026         be listed among the dependencies at all.
1027
1028 2015-06-09  Anders Carlsson  <andersca@apple.com>
1029
1030         Fix build.
1031
1032         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1033         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
1034
1035 2015-06-09  Anders Carlsson  <andersca@apple.com>
1036
1037         Change the PluginProcessManager data fetching function to take a completion handler
1038         https://bugs.webkit.org/show_bug.cgi?id=145821
1039
1040         Reviewed by Sam Weinig.
1041
1042         * UIProcess/Plugins/PluginProcessManager.cpp:
1043         (WebKit::PluginProcessManager::fetchWebsiteData):
1044         (WebKit::PluginProcessManager::getSitesWithData): Deleted.
1045         * UIProcess/Plugins/PluginProcessManager.h:
1046         * UIProcess/Plugins/PluginProcessProxy.cpp:
1047         (WebKit::generateCallbackID):
1048         (WebKit::PluginProcessProxy::~PluginProcessProxy):
1049         (WebKit::PluginProcessProxy::fetchWebsiteData):
1050         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
1051         (WebKit::PluginProcessProxy::didFinishLaunching):
1052         (WebKit::PluginProcessProxy::didGetSitesWithData):
1053         (WebKit::PluginProcessProxy::getSitesWithData): Deleted.
1054         * UIProcess/Plugins/PluginProcessProxy.h:
1055         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1056         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
1057
1058 2015-06-09  Anders Carlsson  <andersca@apple.com>
1059
1060         Add code to keep track of plug-in data host names in website data records
1061         https://bugs.webkit.org/show_bug.cgi?id=145818
1062
1063         Reviewed by Andreas Kling.
1064
1065         * Shared/WebsiteData/WebsiteData.cpp:
1066         (WebKit::WebsiteData::encode):
1067         (WebKit::WebsiteData::decode):
1068         * Shared/WebsiteData/WebsiteData.h:
1069         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
1070         (WebKit::WebsiteDataRecord::displayNameForPluginDataHostName):
1071         (WebKit::WebsiteDataRecord::addPluginDataHostName):
1072         (WebKit::WebsiteDataRecord::displayNameForCookieHostName): Deleted.
1073         * UIProcess/WebsiteData/WebsiteDataRecord.h:
1074         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1075         (WebKit::WebsiteDataStore::fetchData):
1076
1077 2015-06-09  Anders Carlsson  <andersca@apple.com>
1078
1079         Add Plug-in type declarations to WKWebsiteDataRecord and friends
1080         https://bugs.webkit.org/show_bug.cgi?id=145816
1081
1082         Reviewed by Andreas Kling.
1083
1084         * Shared/WebsiteData/WebsiteDataTypes.h:
1085         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1086         (dataTypesToString):
1087         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1088         (WebKit::toWebsiteDataTypes):
1089         (WebKit::toWKWebsiteDataTypes):
1090         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
1091
1092 2015-06-09  Antti Koivisto  <antti@apple.com>
1093
1094         REGRESSION(r185262): NetworkCache is in wrong location on OS X
1095         https://bugs.webkit.org/show_bug.cgi?id=145812
1096
1097         Reviewed by Anders Carlsson.
1098
1099         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1100         (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
1101         (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
1102         (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
1103         (WebKit::WebProcessPool::isNetworkCacheEnabled):
1104
1105             Make sure static functions that use NSUserDefaults call registerUserDefaultsIfNeeded() first.
1106
1107 2015-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>
1108
1109         Crash when passing Symbol to NPAPI plugin objects
1110         https://bugs.webkit.org/show_bug.cgi?id=145798
1111
1112         Reviewed by Darin Adler.
1113
1114         When the symbol is passed, `propertyName.publicName()` becomes nullptr.
1115         So dereferencing it causes null dereference errors.
1116         At first, this bug appears in the https://bugs.webkit.org/show_bug.cgi?id=145556,
1117         plugin[@@toStringTag] ("string" + plugin) causes SEGV in plugins/embed-inside-object.html test.
1118
1119         This patch avoids it by early returning when the symbols are passed.
1120         Methods for symbols are not implemented in the NPObject side, so it works correctly.
1121
1122         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1123         (WebKit::npIdentifierFromIdentifier):
1124         (WebKit::JSNPObject::callMethod):
1125         (WebKit::JSNPObject::getOwnPropertySlot):
1126         (WebKit::JSNPObject::put):
1127         (WebKit::JSNPObject::deleteProperty):
1128         (WebKit::JSNPObject::propertyGetter):
1129         (WebKit::JSNPObject::methodGetter):
1130
1131 2015-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1132
1133         [SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
1134         https://bugs.webkit.org/show_bug.cgi?id=145791
1135
1136         Reviewed by Sergio Villar Senin.
1137
1138         Keep using G_PRIORITY_DEFAULT for reads, but use
1139         G_PRIORITY_DEFAULT_IDLE for writes now.
1140
1141         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1142         (WebKit::NetworkCache::outputStreamWriteReadyCallback): Use
1143         G_PRIORITY_DEFAULT_IDLE for write async operations.
1144         (WebKit::NetworkCache::IOChannel::write): Pass
1145         G_PRIORITY_DEFAULT_IDLE to runTaskInQueue().
1146
1147 2015-06-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1148
1149         [SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation
1150         https://bugs.webkit.org/show_bug.cgi?id=145797
1151
1152         Reviewed by Žan Doberšek.
1153
1154         I misunderstood what the WorkQueue parameter meant in the IO
1155         channel operations. It's the queue where the completion handler
1156         should be run, not the whole operation. Since our operations are
1157         already non-blocking, we can just run the read/writes in the main
1158         thread, and schedule the completion handler in the given work
1159         queue when the operation finishes.
1160
1161         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1162         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1163         (WebKit::NetworkCache::inputStreamReadReadyCallback):
1164         (WebKit::NetworkCache::IOChannel::read):
1165         (WebKit::NetworkCache::IOChannel::readSync):
1166         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
1167         (WebKit::NetworkCache::IOChannel::write):
1168
1169 2015-06-09  David Kilzer  <ddkilzer@apple.com>
1170
1171         REGRESSION (r185357): Fix build for iOS 8.x
1172
1173         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1174         (fallbackIconForFile): Add cast prior to iOS 9.
1175
1176 2015-06-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1177
1178         [EFL] Fix a crash on MiniBrowser when running on debug mode
1179         https://bugs.webkit.org/show_bug.cgi?id=145793
1180
1181         Reviewed by Carlos Garcia Campos.
1182
1183         r185314 missed to initialize parameters.diskCacheDirectory with configuration's one.
1184
1185         * UIProcess/efl/WebProcessPoolEfl.cpp:
1186         (WebKit::WebProcessPool::platformInitializeWebProcess):
1187
1188 2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>
1189
1190         [cmake] Fix the style issues in cmake project files
1191         https://bugs.webkit.org/show_bug.cgi?id=145755
1192
1193         Reviewed by Darin Adler.
1194
1195         * CMakeLists.txt:
1196         * PlatformGTK.cmake:
1197         * PlatformMac.cmake:
1198
1199 2015-06-02  Jon Honeycutt  <jhoneycutt@apple.com>
1200
1201         [iOS] UI process memory spike, hang when uploading a very large JPEG
1202
1203         <https://bugs.webkit.org/show_bug.cgi?id=145567>
1204         <rdar://problem/21206699>
1205
1206         When uploading an image, we generate a thumbnail to use for an icon
1207         that sits next to the control. To do this, we load the image and draw
1208         it into a thumbnail-sized canvas. This can be very expensive for large
1209         images.
1210
1211         To fix this, we'll use CGImageSource API, which will allow us to get
1212         any existing thumbnail that exists in the source file.
1213
1214         Reviewed by Darin Adler.
1215
1216         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1217         (squareCropRectForSize):
1218         Use std::round, based on Darin's review feedback that a) rintf is
1219         incorrect in 64-bit systems where CGFloat is a double, b) rintf uses a
1220         variable rounding mode, which is undesirable.
1221         (squareImage):
1222         Changed to take a CGImageRef.
1223         Use RetainPtr and +[UIImage imageWithCGImage:] to match other code in
1224         this file.
1225         (thumbnailSizedImageForImage):
1226         Changed to take a CGImageRef and to use iconSideLength.
1227         (iconForImageFile):
1228         Create an image source for the file, then use CGImageSource API to
1229         generate a thumbnail.
1230         (-[_WKImageFileUploadItem initWithFileURL:originalImage:]): Deleted.
1231         (-[_WKImageFileUploadItem displayImage]):
1232         Use iconForImageFile() rather than trying to generate an icon from the
1233         UIImage.
1234         (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
1235         Removed originalImage parameter; _WKImageFileUploadItem no longer uses
1236         it.
1237         (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
1238         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
1239
1240 2015-06-08  Dan Bernstein  <mitz@apple.com>
1241
1242         [Cocoa] Use generics in framework headers
1243         https://bugs.webkit.org/show_bug.cgi?id=145781
1244
1245         Reviewed by Sam Weinig.
1246
1247         * mac/postprocess-framework-headers.sh: Use the parameter to WK_ARRAY and WK_SET.
1248
1249 2015-06-08  Chris Dumez  <cdumez@apple.com>
1250
1251         Access GCController instance via GCController::singleton() instead of a free function
1252         https://bugs.webkit.org/show_bug.cgi?id=145776
1253
1254         Reviewed by Darin Adler.
1255
1256         Access GCController instance via GCController::singleton() instead of a
1257         free function as per coding style and for consistency with other
1258         singleton classes in the codebase.
1259
1260         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1261         (WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
1262         (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
1263         * WebProcess/WebProcess.cpp:
1264         (WebKit::WebProcess::terminate):
1265         (WebKit::WebProcess::didClose):
1266         (WebKit::WebProcess::garbageCollectJavaScriptObjects):
1267         (WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled):
1268
1269 2015-06-08  Anders Carlsson  <andersca@apple.com>
1270
1271         Include IndexedDB databases in -[WKWebsiteDataStore allWebsiteDataTypes]
1272         https://bugs.webkit.org/show_bug.cgi?id=145775
1273
1274         Reviewed by Simon Fraser.
1275
1276         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1277         (+[WKWebsiteDataStore allWebsiteDataTypes]):
1278
1279 2015-06-08  Anders Carlsson  <andersca@apple.com>
1280
1281         Move the snapshot layer contents SPI to the web view
1282         https://bugs.webkit.org/show_bug.cgi?id=145771
1283
1284         Reviewed by Geoffrey Garen.
1285
1286         We need to potentially ask the web page to take a snapshot of the current item,
1287         so move the SPI to WKWebView and name it appropriately.
1288
1289         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
1290         (-[WKBackForwardListItem _snapshotLayerContents]): Deleted.
1291         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Removed.
1292         * UIProcess/API/Cocoa/WKWebView.mm:
1293         (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
1294         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1295         * WebKit2.xcodeproj/project.pbxproj:
1296
1297 2015-06-08  Brady Eidson  <beidson@apple.com>
1298
1299         Completely remove all IDB properties/constructors when it is disabled at runtime.
1300         rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
1301
1302         Reviewed by Geoffrey Garen.
1303
1304         * WebProcess/WebProcess.cpp:
1305         (WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time.
1306
1307 2015-06-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1308
1309         [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
1310         https://bugs.webkit.org/show_bug.cgi?id=145542
1311
1312         Reviewed by Alexey Proskuryakov.
1313
1314         Add documentation to webkit_web_context_prefetch_dns to indicate that the function does
1315         nothing if the system configuration indicates we should use a proxy to resolve the host.
1316
1317         * UIProcess/API/gtk/WebKitWebContext.cpp:
1318
1319 2015-06-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1320
1321         REGRESSION(r185251): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work when using shared secondary process model after r185251
1322         https://bugs.webkit.org/show_bug.cgi?id=145751
1323
1324         Reviewed by Darin Adler.
1325
1326         In r185251 the CFNetwork cache was disabled in the web process,
1327         but it also removed the disk cache directory web process
1328         initialization parameter. While we support networking in the web
1329         process when shared secondary process model is used, the network
1330         cache should still work. We can remove this if we eventually
1331         switch to use the network process unconditionally.
1332
1333         * Shared/WebProcessCreationParameters.cpp:
1334         (WebKit::WebProcessCreationParameters::encode): Encode disk cache directory.
1335         (WebKit::WebProcessCreationParameters::decode): Decode disk cache directory.
1336         * Shared/WebProcessCreationParameters.h: Bring back disk cache directory only for soup.
1337         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1338         (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize disk cache directory parameter.
1339         * WebProcess/soup/WebProcessSoup.cpp:
1340         (WebKit::WebProcess::platformInitializeWebProcess): Use the disck cache directory parameter again.
1341
1342 2015-06-08  Csaba Osztrogonác  <ossy@webkit.org>
1343
1344         [GTK] Remove the unused scroll function from WebPageGtk.cpp
1345         https://bugs.webkit.org/show_bug.cgi?id=145756
1346
1347         Reviewed by Carlos Garcia Campos.
1348
1349         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1350         (WebKit::scroll): Deleted.
1351
1352 2015-06-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1353
1354         REGRESSION(r185262): [EFL] Modify legacyPlatformDefaultNetworkCacheDirectory() according to network cache
1355         https://bugs.webkit.org/show_bug.cgi?id=145752
1356
1357         Reviewed by Carlos Garcia Campos.
1358
1359         EFL port needs to add different prefix for network cache directory since r185262.
1360         Modify it basedon GTK port fix.
1361
1362         * UIProcess/efl/WebProcessPoolEfl.cpp:
1363         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1364
1365 2015-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1366
1367         REGRESSION(r185262): [GTK] webkit_web_context_set_disk_cache_directory() doesn't work after r185262
1368         https://bugs.webkit.org/show_bug.cgi?id=145735
1369
1370         Reviewed by Darin Adler.
1371
1372         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1373         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Use
1374         the directory name to clear the old cache, since the disk cache
1375         subdirectory is now added in the UI process.
1376         * UIProcess/API/gtk/WebKitWebContext.cpp:
1377         (webkit_web_context_set_disk_cache_directory): Update the
1378         WebProcessPool configuration to override the disk cache directory.
1379         * UIProcess/WebProcessPool.cpp:
1380         (WebKit::WebProcessPool::ensureNetworkProcess): Use the
1381         configuration to get the disk cache directory.
1382         (WebKit::WebProcessPool::WebProcessPool): Remove
1383         m_diskCacheDirectory member initialization.
1384         * UIProcess/WebProcessPool.h: Remove m_diskCacheDirectory member.
1385         * UIProcess/gtk/WebProcessPoolGtk.cpp:
1386         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1387         Append the disk cache subdirectory.
1388
1389 2015-06-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1390
1391         [EFL][GTK] Fix build  break since r185262
1392         https://bugs.webkit.org/show_bug.cgi?id=145724
1393
1394         Unreviewed, fix build break for EFL and GTK ports.
1395
1396         * UIProcess/API/APIWebsiteDataStore.cpp:
1397         (API::WebsiteDataStore::defaultLocalStorageDirectory):
1398         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
1399         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
1400         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
1401         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
1402         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
1403         * UIProcess/efl/WebProcessPoolEfl.cpp:
1404         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1405         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
1406         * WebProcess/soup/WebProcessSoup.cpp:
1407         (WebKit::WebProcess::platformInitializeWebProcess):
1408
1409 2015-06-06  Dan Bernstein  <mitz@apple.com>
1410
1411         Don’t enable manual sandboxing in the iOS Simulator. This should fix all the tests timing out.
1412
1413         * Configurations/DebugRelease.xcconfig:
1414
1415 2015-06-06  Dan Bernstein  <mitz@apple.com>
1416
1417         [iOS] Can’t debug with Development XPC services due to automatic sandboxing
1418         https://bugs.webkit.org/show_bug.cgi?id=145731
1419
1420         Rubber-stamped by Darin Adler.
1421
1422         In iOS, the XPC services are automatically sandboxed based on their entitlements. The
1423         sandbox doesn’t allow them to re-exec, which is necessary for linking against engineering
1424         builds of the WebKit frameworks placed in a non-system location.
1425
1426         The solution is to opt Engineering builds into manual sandboxing.
1427
1428         * Configurations/BaseTarget.xcconfig:
1429         - Add ENABLE_MANUAL_SANDBOXING to
1430           GCC_PREPROCESSOR_DEFINITIONS when WK_MANUAL_SANDBOXING_ENABLED is YES.
1431         - Set WK_MANUAL_SANDBOXING_ENABLED to YES for OS X, because we always use manual
1432           sandboxing on that platform.
1433
1434         * Configurations/DebugRelease.xcconfig: Removed unused definition of DEBUG_OR_RELEASE. Set
1435           WK_MANUAL_SANDBOXING_ENABLED to YES for all engineering builds.
1436
1437         * Configurations/BaseXPCService.xcconfig: Define CODE_SIGN_ENTITLEMENTS for iOS to be empty
1438           if the service is not installed; to use the base entitlements file from Configurations if
1439           manual sandboxing is not enabled; and to use a derived entitlements file, which doesn’t
1440           specify a sandbox profile, if manual sandboxing is enabled.
1441
1442         * Configurations/DatabaseService.Development.xcconfig: Define
1443           WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE and let BaseXPCService.xcconfig define
1444           CODE_SIGN_ENTITLEMENTS for iOS.
1445
1446         * Configurations/DatabaseService.xcconfig: Ditto.
1447         * Configurations/NetworkService.Development.xcconfig: Ditto.
1448         * Configurations/NetworkService.xcconfig: Ditto.
1449         * Configurations/WebContentService.Development.xcconfig: Ditto.
1450         * Configurations/WebContentService.xcconfig: Ditto.
1451
1452         * WebKit2.xcodeproj/project.pbxproj:
1453         - In the Derived Sources target, added a Derive Entitlements for Manual Sandboxing script
1454           build phase. When building for iOS with manual sandboxing enabled, it creates copies of
1455           the iOS entitlements files with a -no-sandbox suffix and the seatbelt-profiles key
1456           removed.
1457         - In the WebKit target, added a Copy iOS Sandbox Profiles for Manual Sandboxing script build
1458           phase. When building for iOS with manual sandboxing enabled, it copies the iOS sandbox
1459           profiles into the framework, so that the services can apply them to themselves at runtime.
1460
1461         * Shared/ios/ChildProcessIOS.mm:
1462         (WebKit::ChildProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) and don’t define it
1463         here.
1464
1465         * WebProcess/cocoa/WebProcessCocoa.mm:
1466         (WebKit::WebProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) instead of defining
1467         and using ENABLE_MANUAL_WEBPROCESS_SANDBOXING here.
1468
1469 2015-06-06  Anders Carlsson  <andersca@apple.com>
1470
1471         Remove support from getting plug-in information from Carbon resources
1472         https://bugs.webkit.org/show_bug.cgi?id=145730
1473
1474         Reviewed by Dan Bernstein.
1475
1476         No current plug-in versions use this feature, and both Chrome and Mozilla for
1477         Mac stopped looking at Carbon resources years ago.
1478
1479         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1480         (WebKit::NetscapePluginModule::getPluginInfo):
1481         (WebKit::ResourceMap::ResourceMap): Deleted.
1482         (WebKit::ResourceMap::~ResourceMap): Deleted.
1483         (WebKit::ResourceMap::isValid): Deleted.
1484         (WebKit::getStringListResource): Deleted.
1485         (WebKit::getPluginInfoFromCarbonResources): Deleted.
1486
1487 2015-06-05  Anders Carlsson  <andersca@apple.com>
1488
1489         Only allow plug-ins to create custom MIME property lists on older versions of OS X
1490         https://bugs.webkit.org/show_bug.cgi?id=145716
1491
1492         Reviewed by Dan Bernstein.
1493
1494         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1495         * Shared/Plugins/Netscape/NetscapePluginModule.h:
1496         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1497         (WebKit::getMIMETypesFromPluginBundle):
1498         * UIProcess/Plugins/PluginProcessProxy.h:
1499         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1500
1501 2015-06-05  Chris Dumez  <cdumez@apple.com>
1502
1503         [WK2][iOS] Limit the number of vnodes used by the WebContent processes
1504         https://bugs.webkit.org/show_bug.cgi?id=145672
1505         <rdar://problem/21126637>
1506
1507         Reviewed by Antti Koivisto.
1508
1509         Have the WebContent process register a vnode pressure handler on iOS,
1510         which calls the memory pressure handler.
1511
1512         On non-critical pressure, it will prune dead resources from the memory
1513         cache, which should free up some vnodes. On critical pressure, the
1514         handler will clear the PageCache and do a JS GC, which should free even
1515         more vnodes.
1516
1517         * WebProcess/cocoa/WebProcessCocoa.mm:
1518         (WebKit::WebProcess::platformInitializeWebProcess):
1519
1520 2015-06-05  Anders Carlsson  <andersca@apple.com>
1521
1522         Fix refacto, don't put IndexedDB databases in the cache directory
1523         https://bugs.webkit.org/show_bug.cgi?id=145714
1524
1525         Reviewed by Antti Koivisto.
1526
1527         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1528         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
1529
1530 2015-06-05  Anders Carlsson  <andersca@apple.com>
1531
1532         Make the network cache directory part of WKContextConfigurationRef
1533         https://bugs.webkit.org/show_bug.cgi?id=145711
1534
1535         Reviewed by Antti Koivisto.
1536
1537         Also, make the UI process be in control of where we place the new network cache.
1538         When using the Modern WebKit API, put the cache in ~/Library/Caches/<Bundle ID>/WebKit/NetworkCache,
1539         and put the cache in ~/Library/Caches/<Bundle ID>/WebKitCache otherwise (this is just for Safari).
1540
1541         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1542         (WebKit::NetworkCache::Storage::open):
1543         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1544         (API::ProcessPoolConfiguration::createWithLegacyOptions):
1545         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
1546         (API::ProcessPoolConfiguration::copy):
1547         * UIProcess/API/APIProcessPoolConfiguration.h:
1548         * UIProcess/API/C/WKContext.cpp:
1549         (WKContextSetDiskCacheDirectory): Deleted.
1550         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1551         (WKContextConfigurationCopyDiskCacheDirectory):
1552         (WKContextConfigurationSetDiskCacheDirectory):
1553         * UIProcess/API/C/WKContextConfigurationRef.h:
1554         * UIProcess/API/C/WKContextPrivate.h:
1555         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1556         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1557         (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1558         (WebKit::WebProcessPool::isNetworkCacheEnabled):
1559         (WebKit::WebProcessPool::platformDefaultDiskCacheDirectory): Deleted.
1560         * UIProcess/WebProcessPool.cpp:
1561         (WebKit::legacyWebsiteDataStoreConfiguration):
1562         (WebKit::WebProcessPool::WebProcessPool):
1563         (WebKit::WebProcessPool::ensureNetworkProcess):
1564         (WebKit::WebProcessPool::diskCacheDirectory): Deleted.
1565         * UIProcess/WebProcessPool.h:
1566
1567 2015-06-05  Anders Carlsson  <andersca@apple.com>
1568
1569         Make the application cache directory part of WKContextConfigurationRef
1570         https://bugs.webkit.org/show_bug.cgi?id=145704
1571
1572         Reviewed by Geoffrey Garen.
1573
1574         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1575         (API::ProcessPoolConfiguration::createWithLegacyOptions):
1576         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
1577         (API::ProcessPoolConfiguration::copy):
1578         * UIProcess/API/APIProcessPoolConfiguration.h:
1579         * UIProcess/API/C/WKContext.cpp:
1580         (WKContextSetApplicationCacheDirectory): Deleted.
1581         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1582         (WKContextConfigurationCopyApplicationCacheDirectory):
1583         (WKContextConfigurationSetApplicationCacheDirectory):
1584         * UIProcess/API/C/WKContextConfigurationRef.h:
1585         * UIProcess/API/C/WKContextPrivate.h:
1586         * UIProcess/WebProcessPool.cpp:
1587         (WebKit::WebProcessPool::WebProcessPool):
1588         (WebKit::WebProcessPool::createNewWebProcess):
1589         (WebKit::WebProcessPool::applicationCacheDirectory): Deleted.
1590         * UIProcess/WebProcessPool.h:
1591
1592 2015-06-05  Mark Lam  <mark.lam@apple.com>
1593
1594         finally blocks should not set the exception stack trace when re-throwing the exception.
1595         https://bugs.webkit.org/show_bug.cgi?id=145525
1596
1597         Reviewed by Geoffrey Garen.
1598
1599         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1600         (WebKit::InjectedBundle::reportException):
1601         - Changed to use the new Exception object.
1602
1603 2015-06-05  Anders Carlsson  <andersca@apple.com>
1604
1605         Disable the CFNetwork cache in the web process
1606         https://bugs.webkit.org/show_bug.cgi?id=145700
1607         rdar://problem/20243343
1608
1609         Reviewed by Geoffrey Garen.
1610
1611         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1612         (WebKit::NetworkCache::Storage::open):
1613         * Shared/WebProcessCreationParameters.cpp:
1614         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
1615         (WebKit::WebProcessCreationParameters::encode): Deleted.
1616         (WebKit::WebProcessCreationParameters::decode): Deleted.
1617         * Shared/WebProcessCreationParameters.h:
1618         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1619         (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
1620         * UIProcess/WebProcessPool.cpp:
1621         (WebKit::WebProcessPool::createNewWebProcess): Deleted.
1622         * WebProcess/WebProcess.cpp:
1623         (WebKit::WebProcess::WebProcess): Deleted.
1624         (WebKit::WebProcess::initializeWebProcess): Deleted.
1625         * WebProcess/WebProcess.h:
1626         * WebProcess/cocoa/WebProcessCocoa.mm:
1627         (WebKit::WebProcess::platformClearResourceCaches):
1628         (WebKit::WebProcess::platformInitializeWebProcess):
1629         (WebKit::WebProcess::platformSetCacheModel): Deleted.
1630         (WebKit::WebProcess::platformTerminate): Deleted.
1631
1632 2015-06-05  Anders Carlsson  <andersca@apple.com>
1633
1634         Consolidate default website data directory computations
1635         https://bugs.webkit.org/show_bug.cgi?id=145698
1636
1637         Reviewed by Andreas Kling.
1638
1639         * UIProcess/API/APIProcessPoolConfiguration.cpp:
1640         (API::ProcessPoolConfiguration::ProcessPoolConfiguration):
1641         * UIProcess/API/APIWebsiteDataStore.h:
1642         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1643         (API::WebsiteDataStore::defaultApplicationCacheDirectory):
1644         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
1645         (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
1646         (API::WebsiteDataStore::defaultLocalStorageDirectory):
1647         (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
1648         (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
1649         (API::WebsiteDataStore::defaultDataStoreConfiguration):
1650         (API::applicationCacheDirectory): Deleted.
1651
1652 2015-06-01  Jon Honeycutt  <jhoneycutt@apple.com>
1653
1654         [iOS] Uploading an animated GIF from the photo library uploads a JPEG
1655
1656         <https://bugs.webkit.org/show_bug.cgi?id=145539>
1657         <rdar://problem/19760877
1658
1659         Selecting a photo from the photo library using UIImagePickerController
1660         results in an NSDictionary with image info and a UIImage with the
1661         image. It's not possible to get the original image data from the
1662         UIImage, only a PNG or JPEG representation, so we were getting a JPEG
1663         representation and uploading that to the server. For animated GIFs,
1664         this meant a JPEG representation of the first frame.
1665
1666         To fix this, we'll get the asset URL, if available, and use the Photos
1667         API to query for the original image data.
1668
1669         Reviewed by Andy Estes and Joe Pecoraro.
1670
1671         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1672         Soft link the Photos framework.
1673
1674         (-[WKFileUploadPanel _uploadItemForImageData:originalImage:imageName:successBlock:failureBlock:]):
1675         Save the image's data to a temporary location, and create a
1676         _WKImageFileUploadItem. Code moved from
1677         -_uploadItemFromMediaInfo:successBlock:failureBlock:.
1678
1679         (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
1680         Get a JPEG representation of the UIImage, and create an upload item
1681         from that data.
1682
1683         (uploadImageNameFromUTI):
1684         Return a filename for the uploaded image based on the UTI.
1685
1686         (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
1687         Fetch the photo asset with the given asset URL. Create an image manager
1688         object, and request the image data for the photo asset. Create an
1689         upload item from that data. If we fail, fall back to a JPEG
1690         representation.
1691
1692         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
1693         Return early if the media item is not an image type. If it is, and we
1694         have an asset URL, try to create an upload item for the native image.
1695         If we don't have an asset URL, use a JPEG representation of the image.
1696
1697 2015-06-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1698
1699         REGRESSION(r185091): Crash happens on indexdb tests
1700         https://bugs.webkit.org/show_bug.cgi?id=145549
1701
1702         Reviewed by Darin Adler.
1703
1704         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Remove leakRef() use.
1705         (WebKit::WebIDBServerConnection::didCreateObjectStore):
1706         (WebKit::WebIDBServerConnection::didCreateIndex):
1707         (WebKit::WebIDBServerConnection::didDeleteIndex):
1708         (WebKit::WebIDBServerConnection::didPutRecord):
1709         (WebKit::WebIDBServerConnection::didGetRecord):
1710         (WebKit::WebIDBServerConnection::didOpenCursor):
1711         (WebKit::WebIDBServerConnection::didAdvanceCursor):
1712         (WebKit::WebIDBServerConnection::didIterateCursor):
1713         (WebKit::WebIDBServerConnection::didCount):
1714         (WebKit::WebIDBServerConnection::didDeleteRange):
1715         (WebKit::WebIDBServerConnection::didClearObjectStore):
1716         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
1717         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
1718
1719 2015-06-04  Joseph Pecoraro  <pecoraro@apple.com>
1720
1721         Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
1722         https://bugs.webkit.org/show_bug.cgi?id=143912
1723
1724         Reviewed by Simon Fraser.
1725
1726         * UIProcess/mac/PageClientImpl.mm:
1727         (WebKit::PageClientImpl::setDragImage):
1728         When using the WKWebView, convert the position from the WKView's
1729         coordinate system to the WKWebView's.
1730
1731         * UIProcess/API/Cocoa/WKWebView.mm:
1732         (-[WKWebView draggingUpdated:]):
1733         * UIProcess/API/mac/WKView.mm:
1734         (-[WKView _dragImageForView:withImage:at:linkDrag:]):
1735         Whitespace cleanup in original drag code.
1736
1737 2015-06-04  Dan Bernstein  <mitz@apple.com>
1738
1739         Fixed the build.
1740
1741         * UIProcess/API/Cocoa/WKErrorPrivate.h:
1742
1743 2015-06-04  Dan Bernstein  <mitz@apple.com>
1744
1745         Renamed the WebKit2SandboxProfiles target to Sandbox Profiles.
1746
1747         Rubber-stamped by Anders Carlsson.
1748
1749         * WebKit2.xcodeproj/project.pbxproj: Renamed the target. For now, added an aggregate
1750         target with the old name that depends on the renamed target. We can remove it once the build
1751         system doesn’t reference to old name.
1752
1753 2015-06-03  Dan Bernstein  <mitz@apple.com>
1754
1755         [Cocoa] Expose interruptedForPolicyChangeError
1756         https://bugs.webkit.org/show_bug.cgi?id=145627
1757
1758         Reviewed by Anders Carlsson.
1759
1760         * UIProcess/API/Cocoa/WKErrorPrivate.h: Added WKErrorCodeFrameLoadInterruptedByPolicyChange with the same value as
1761         kWKErrorCodeFrameLoadInterruptedByPolicyChange.
1762
1763 2015-06-04  Chris Dumez  <cdumez@apple.com>
1764
1765         [WK2] Prune more resources from the MemoryCache before process suspension
1766         https://bugs.webkit.org/show_bug.cgi?id=145633
1767
1768         Reviewed by Andreas Kling.
1769
1770         * NetworkProcess/NetworkProcess.cpp:
1771         (WebKit::NetworkProcess::lowMemoryHandler):
1772         (WebKit::NetworkProcess::initializeNetworkProcess):
1773         (WebKit::NetworkProcess::processWillSuspendImminently):
1774         (WebKit::NetworkProcess::prepareToSuspend):
1775         * NetworkProcess/NetworkProcess.h:
1776         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1777         (WebKit::NetworkProcess::platformLowMemoryHandler):
1778         * PluginProcess/PluginProcess.cpp:
1779         (WebKit::PluginProcess::initializeProcess):
1780
1781         Update low memory handler prototype to match WebCore changes.
1782
1783         * WebProcess/WebProcess.cpp:
1784         (WebKit::WebProcess::actualPrepareToSuspend):
1785
1786         Pass Synchronous::Yes argument to MemoryPressureHandler::releaseMemory()
1787         to request that the memory is free up synchronously (e.g. synchronous
1788         JS garbage collection) as the process is about to be suspended.
1789         Previously, the memory pressure handler was trying to detect this case
1790         by checking if the system was really under memory pressure but this was
1791         a bit hackish and it wouldn't work if the process happened to get
1792         suspended while the system was under memory pressure.
1793
1794 2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1795
1796         [GTK] [Wayland] Build is broken on trunk
1797         https://bugs.webkit.org/show_bug.cgi?id=142879
1798
1799         Reviewed by Carlos Garcia Campos.
1800
1801         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1802         (WebKit::LayerTreeHostGtk::makeContextCurrent): When Wayland target
1803         is enabled GLNativeWindowType is not an u_int64 type.
1804         Cast contextID to avoid a build failure.
1805
1806 2015-06-03  Dan Bernstein  <mitz@apple.com>
1807
1808         Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.
1809
1810         * WebKit2.xcodeproj/project.pbxproj:
1811
1812 2015-06-03  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1813
1814         [EFL] Implement window_object_cleared callback in EwkPageClient.
1815         https://bugs.webkit.org/show_bug.cgi?id=145603
1816
1817         Reviewed by Gyuyoung Kim.
1818
1819         We need to provide right timing for custom JS API that may need to work at the beginning of the page.
1820
1821         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
1822         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
1823         (EwkPage::EwkPage):
1824         (EwkPage::didStartProvisionalLoadForFrame):
1825         (EwkPage::didClearWindowObjectForFrame):
1826         (EwkPage::didFinishDocumentLoadForFrame):
1827         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
1828         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
1829
1830 2015-06-03  Anders Carlsson  <andersca@apple.com>
1831
1832         Add SPI that returns the snapshot layer contents for a given back/forward list item
1833         https://bugs.webkit.org/show_bug.cgi?id=145621
1834
1835         Reviewed by Dan Bernstein.
1836
1837         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
1838         (-[WKBackForwardListItem _snapshotLayerContents]):
1839         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
1840         * UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItemInternal.h.
1841         * WebKit2.xcodeproj/project.pbxproj:
1842
1843 2015-06-02  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1844
1845         [EFL] Implement load_started callback in EwkPageClient.
1846         https://bugs.webkit.org/show_bug.cgi?id=145545
1847
1848         Reviewed by Gyuyoung Kim.
1849
1850         We need to provide load_started callback to web extension module.
1851
1852         * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
1853         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
1854         (EwkPage::EwkPage):
1855         (EwkPage::remove):
1856         (EwkPage::didStartProvisionalLoadForFrame):
1857         (EwkPage::didFinishDocumentLoadForFrame):
1858         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
1859         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
1860
1861 2015-06-02  Gavin Barraclough  <barraclough@apple.com>
1862
1863         PDFs always think they're visible on iOS.
1864         https://bugs.webkit.org/show_bug.cgi?id=145493
1865         <rdar://problem/19668879>
1866
1867         Reviewed by Andreas Kling & Sam Weinig.
1868
1869         The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
1870         that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
1871         the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
1872         (which is in the view hierarchy) does not listen for these events.
1873
1874         Visibility of the page should really just track the visibility of the WKWebView (and when
1875         actually assessing the visibility it largely does - the page client checks the web view's
1876         visibility, bar a FIXME, and the foreground/background check, which needs to change).
1877         So notifications should really just come from the WKWebView.
1878
1879         The WKWebView already listens for the didMoveToWindow notification, it just was only updating
1880         the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
1881         WKContentView can just be removed.
1882
1883         There is one problem with this in that it would reverse the order of the calls to
1884         viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
1885         updating the screen pixel density. To fix this, moving the call to _updateForScreen:
1886         to willMoveToWindow:, to ensure it occurs before the page becomes visible.
1887
1888         This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
1889         within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
1890         to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
1891         IPC traffic).
1892
1893         * UIProcess/API/Cocoa/WKWebView.mm:
1894         (-[WKWebView didMoveToWindow]):
1895             - should update all view state flags.
1896         * UIProcess/API/ios/WKViewIOS.mm:
1897         (-[WKView didMoveToWindow]):
1898             - added to match WKWebView.mm, for WebKitTestRunner.
1899         * UIProcess/ios/WKContentView.mm:
1900         (-[WKContentView willMoveToWindow:]):
1901             - should _updateForScreen:
1902         (-[WKContentView didMoveToWindow]): Deleted.
1903             - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
1904
1905 2015-06-02  Chris Dumez  <cdumez@apple.com>
1906
1907         [iOS][WK2] Always mark layers as volatile for background pages
1908         https://bugs.webkit.org/show_bug.cgi?id=145547
1909         <rdar://problem/20663184>
1910
1911         Reviewed by Simon Fraser.
1912
1913         We previously marked layers as volatile when the WebProcess was about
1914         to be suspended. Most of the time the WebProcess gets suspended when a
1915         page goes into the background. However, it is not always true (see
1916         radar), in which case the layers won't be marked as volatile and use
1917         memory even though they are not visible.
1918
1919         We now mark layers as volatile as soon as the page goes into the
1920         background, instead of relying on the WebProcess suspension mechanism
1921         to do so.
1922
1923         A new ApplicationDidEnterBackground IPC message from the UIProcess to
1924         the WebProcess is added (in addition to the pre-existing
1925         ApplicationWillEnterForeground one). When the WebProcess receives this
1926         message, it will freeze the layer tree state and mark the layers as
1927         volatile (with a timer to keep retrying if needed), similarly to what
1928         is already done in WebProcess::actualPrepareToSuspend().
1929         When the ApplicationWillEnterForeground is received, we unfreeze the
1930         layer tree state. The layers' volatile state will be automatically
1931         updated when they are displayed (see setBufferVolatility() call in
1932         RemoteLayerBackingStore::display()).
1933
1934         * UIProcess/WebPageProxy.h:
1935         * UIProcess/ios/WKContentView.mm:
1936         (-[WKContentView _applicationDidEnterBackground:]):
1937         * UIProcess/ios/WebPageProxyIOS.mm:
1938         (WebKit::WebPageProxy::applicationDidEnterBackground):
1939         * WebProcess/WebPage/WebPage.cpp:
1940         (WebKit::WebPage::WebPage):
1941         (WebKit::WebPage::setLayerTreeStateIsFrozen):
1942         (WebKit::WebPage::markLayersVolatileImmediatelyIfPossible):
1943         * WebProcess/WebPage/WebPage.h:
1944         * WebProcess/WebPage/WebPage.messages.in:
1945         * WebProcess/WebPage/ios/WebPageIOS.mm:
1946         (WebKit::WebPage::volatilityTimerFired):
1947         (WebKit::WebPage::applicationDidEnterBackground):
1948         (WebKit::WebPage::applicationWillEnterForeground):
1949         * WebProcess/WebProcess.cpp:
1950         (WebKit::WebProcess::markAllLayersVolatileIfPossible):
1951         (WebKit::WebProcess::setAllLayerTreeStatesFrozen):
1952
1953 2015-06-02  Brady Eidson  <beidson@apple.com>
1954
1955         WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
1956         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
1957         
1958         Reviewed by Alex Christensen.
1959
1960         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1961         (WebKit::PDFPlugin::clickedLink):
1962         
1963         * WebProcess/Plugins/PluginView.cpp:
1964         (WebKit::PluginView::performFrameLoadURLRequest):
1965         (WebKit::PluginView::loadURL):
1966         
1967         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1968         (WebKit::WebContextMenuClient::searchWithGoogle):
1969         
1970         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1971         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
1972         
1973         * WebProcess/WebPage/WebInspector.cpp:
1974         (WebKit::WebInspector::openInNewTab):
1975         
1976         * WebProcess/WebPage/WebPage.cpp:
1977         (WebKit::WebPage::loadURLInFrame):
1978         (WebKit::WebPage::loadRequest):
1979         (WebKit::WebPage::loadDataImpl):
1980         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
1981
1982 2015-06-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1983
1984         REGRESSION(r185091): Crash happens on indexdb tests
1985         https://bugs.webkit.org/show_bug.cgi?id=145549
1986
1987         Reviewed by Csaba Osztrogonác.
1988
1989         r185091 caused crash on some indexeddb tests. The crash happens because IDBDatabaseError::create() doesn't
1990         dereference count by using ptr(). It makes a crash when dereferencing on ~Ref() destructor. To fix this issue,
1991         this patch uses leakRef() instead of ptr().
1992
1993         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1994         (WebKit::WebIDBServerConnection::didCreateObjectStore):
1995         (WebKit::WebIDBServerConnection::didCreateIndex):
1996         (WebKit::WebIDBServerConnection::didDeleteIndex):
1997         (WebKit::WebIDBServerConnection::didPutRecord):
1998         (WebKit::WebIDBServerConnection::didGetRecord):
1999         (WebKit::WebIDBServerConnection::didOpenCursor):
2000         (WebKit::WebIDBServerConnection::didAdvanceCursor):
2001         (WebKit::WebIDBServerConnection::didIterateCursor):
2002         (WebKit::WebIDBServerConnection::didCount):
2003         (WebKit::WebIDBServerConnection::didDeleteRange):
2004         (WebKit::WebIDBServerConnection::didClearObjectStore):
2005         (WebKit::WebIDBServerConnection::didDeleteObjectStore):
2006         (WebKit::WebIDBServerConnection::didChangeDatabaseVersion):
2007
2008 2015-06-01  Enrica Casucci  <enrica@apple.com>
2009
2010         [iOS] Hardware Keyboard: All combinations for arrow keys with Shift do not extend the selection.
2011         https://bugs.webkit.org/show_bug.cgi?id=145538
2012         rdar://problem/18504199
2013
2014         Reviewed by Darin Adler.
2015
2016         The extend parameter was ignored in all the functions below.
2017
2018         * UIProcess/ios/WKContentViewInteraction.mm:
2019         (-[WKContentView _moveUp:withHistory:]):
2020         (-[WKContentView _moveDown:withHistory:]):
2021         (-[WKContentView _moveLeft:withHistory:]):
2022         (-[WKContentView _moveRight:withHistory:]):
2023         (-[WKContentView _moveToStartOfWord:withHistory:]):
2024         (-[WKContentView _moveToStartOfParagraph:withHistory:]):
2025         (-[WKContentView _moveToStartOfLine:withHistory:]):
2026         (-[WKContentView _moveToStartOfDocument:withHistory:]):
2027         (-[WKContentView _moveToEndOfWord:withHistory:]):
2028         (-[WKContentView _moveToEndOfParagraph:withHistory:]):
2029         (-[WKContentView _moveToEndOfLine:withHistory:]):
2030         (-[WKContentView _moveToEndOfDocument:withHistory:]):
2031
2032 2015-06-01  Anders Carlsson  <andersca@apple.com>
2033
2034         Use xpc_connection_set_oneshot_instance where possible
2035         https://bugs.webkit.org/show_bug.cgi?id=145535
2036         rdar://problem/21109994
2037
2038         Reviewed by Sam Weinig.
2039
2040         Use xpc_connection_set_oneshot_instance where possible; this will make sure that the 
2041         web process instances go away when the web process exits.
2042
2043         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2044         (WebKit::connectToService):
2045         (WebKit::connectToReExecService):
2046
2047 2015-06-01  Enrica Casucci  <enrica@apple.com>
2048
2049         [iOS] Hardware Keyboard: Command + left arrow does not work.
2050         https://bugs.webkit.org/show_bug.cgi?id=145531
2051         rdar://problem/18576402
2052
2053         Reviewed by Anders Carlsson.
2054
2055         We were calling a non existent command (moveToStartOfLine) instead of
2056         moveToBeginningOfLine.
2057
2058         * UIProcess/ios/WKContentViewInteraction.mm:
2059         (-[WKContentView _moveToStartOfLine:withHistory:]):
2060
2061 2015-06-01  Brady Eidson  <beidson@apple.com>
2062
2063         Add WKTR support for "should open external URLs".
2064         https://bugs.webkit.org/show_bug.cgi?id=145505
2065
2066         Reviewed by Darin Adler.
2067
2068         Expose C-spi to allow WKTR to set this bit on new loads:
2069         * UIProcess/API/C/WKPage.cpp:
2070         (WKPageLoadURLWithShouldOpenExternalURLsPolicy):
2071         * UIProcess/API/C/WKPagePrivate.h:
2072         
2073         Expose the bit on NavigationAction for the policy delegate:        
2074         * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
2075         (WKBundleNavigationActionGetShouldOpenExternalURLs):
2076         * WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h: Copied from Tools/WebKitTestRunner/WorkQueueManager.h.
2077
2078         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
2079         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
2080         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2081         (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
2082     
2083         * WebKit2.xcodeproj/project.pbxproj:
2084
2085 2015-06-01  Gavin Barraclough  <barraclough@apple.com>
2086
2087         PDFs always think they're visible on iOS.
2088         https://bugs.webkit.org/show_bug.cgi?id=145493
2089         <rdar://problem/19668879>
2090
2091         Unreviewed roll-out.
2092
2093         Temporarily reverting this change – will need a workaround for test harness craziness.
2094
2095         * UIProcess/API/Cocoa/WKWebView.mm:
2096         (-[WKWebView didMoveToWindow]):
2097         (-[WKWebView setOpaque:]):
2098         * UIProcess/ios/WKContentView.mm:
2099         (-[WKContentView willMoveToWindow:]):
2100         (-[WKContentView didMoveToWindow]):
2101         (-[WKContentView browsingContextController]):
2102
2103 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
2104
2105         [EFL] Remove unused const variable from EwkView.cpp
2106         https://bugs.webkit.org/show_bug.cgi?id=145512
2107
2108         Reviewed by Gyuyoung Kim.
2109
2110         * UIProcess/API/efl/EwkView.cpp:
2111
2112 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
2113
2114         [cmake] Suppress unused parameter warnings in WebKit2 and TestNetscapePlugIn
2115         https://bugs.webkit.org/show_bug.cgi?id=145264
2116
2117         Reviewed by Carlos Garcia Campos.
2118
2119         * CMakeLists.txt: Use COMPILE_FLAGS instead of CMAKE_<C|CXX>_FLAGS to put -Wno-unused-parameter after -Wextra.
2120
2121 2015-05-31  Gavin Barraclough  <barraclough@apple.com>
2122
2123         PDFs always think they're visible on iOS.
2124         https://bugs.webkit.org/show_bug.cgi?id=145493
2125         <rdar://problem/19668879>
2126
2127         Reviewed by Andreas Kling.
2128
2129         The problem here is that WKContentView is currently responsible for notifying the WebPageProxy
2130         that the visibility may have changed, but when a PDF isn't showing the WKContentView isn't in
2131         the view hierarchy and doesn't receive the didMoveToWindow notifications – and the WKPDFView
2132         (which is in the view hierarchy) does not listen for these events.
2133
2134         Visibility of the page should really just track the visibility of the WKWebView (and when
2135         actually assessing the visibility it largely does - the page client checks the web view's
2136         visibility, bar a FIXME, and the foreground/background check, which needs to change).
2137         So notifications should really just come from the WKWebView.
2138
2139         The WKWebView already listens for the didMoveToWindow notification, it just was only updating
2140         the IsInWindow flag. Instead just update all flags, and the call to viewStateDidChange from
2141         WKContentView can just be removed.
2142
2143         There is one problem with this in that it would reverse the order of the calls to
2144         viewStateDidChange & _updateForScreen:, which would mean the the view would become visible before
2145         updating the screen pixel density. To fix this, move the call to _updateForScreen: to
2146         willMoveToWindow:, to ensure it occurs before the page becomes visible.
2147
2148         This will also change behavior on Mac for WKWebView clients, in coalescing all view state changes
2149         within the didMoveToWindow call. This is the direction we intended to go in anyway (the plan is
2150         to remove the mayHaveChanged argument from viewStateDidChange - we're currently adding unnecessary
2151         IPC traffic).
2152
2153         * UIProcess/API/Cocoa/WKWebView.mm:
2154         (-[WKWebView didMoveToWindow]):
2155             - should update all view state flags.
2156         * UIProcess/ios/WKContentView.mm:
2157         (-[WKContentView willMoveToWindow:]):
2158             - should _updateForScreen:
2159         (-[WKContentView didMoveToWindow]): Deleted.
2160             - functionality moved to -[WKWebView didMoveToWindow], -[WKContentView didMoveToWindow].
2161
2162 2015-05-30  Brady Eidson  <beidson@apple.com>
2163
2164         Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
2165         https://bugs.webkit.org/show_bug.cgi?id=145495
2166
2167         Reviewed by Alexey Proskuryakov.
2168
2169         * WebProcess/WebPage/WebPage.cpp:
2170         (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
2171
2172 2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>
2173
2174         Web Inspector: Crash closing a related tab with Web Inspector open while page is refreshing
2175         https://bugs.webkit.org/show_bug.cgi?id=145488
2176
2177         Reviewed by Alexey Proskuryakov.
2178
2179         * WebProcess/WebPage/WebInspector.h:
2180         * WebProcess/WebPage/WebInspector.cpp:
2181         (WebKit::WebInspector::~WebInspector):
2182         Ensure, no matter how we close, that we have invalidated the
2183         frontend connection of which we are the client.
2184
2185         (WebKit::WebInspector::createInspectorPage):
2186         This member variable will never be null.
2187
2188 2015-05-29  Andreas Kling  <akling@apple.com>
2189
2190         [iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
2191         <https://webkit.org/b/145487>
2192         <rdar://problem/20989389>
2193
2194         Reviewed by Benjamin Poulain.
2195
2196         Make sure we don't send WebCore some velocity data with non-zero scaleChangeRate
2197         when we bounce back from being pinch-zoomed past the maximum scale.
2198
2199         This fixes an issue where the bounce-back animation would cause a burst of
2200         unnecessary tile generation.
2201
2202         * WebProcess/WebPage/ios/WebPageIOS.mm:
2203         (WebKit::adjustVelocityDataForBoundedScale):
2204         (WebKit::WebPage::updateVisibleContentRects):
2205
2206 2015-05-29  Jon Lee  <jonlee@apple.com>
2207
2208         Fix preferences for wireless playback
2209         https://bugs.webkit.org/show_bug.cgi?id=145477
2210         rdar://problem/21166767
2211
2212         Reviewed by Anders Carlsson.
2213
2214         * UIProcess/API/C/WKPreferences.cpp: Add missing preference calls in C API.
2215         * UIProcess/API/C/WKPreferencesRef.h:
2216
2217 2015-05-29  Enrica Casucci  <enrica@apple.com>
2218
2219         [iOS] Cursor hidden in text area once it scrolls.
2220         https://bugs.webkit.org/show_bug.cgi?id=145451
2221         rdar://problem/20356413
2222
2223         Reviewed by Simon Fraser.
2224
2225         This patch fixes both the touch scrolling inside the
2226         overflow area as well as the programmatic scroll that
2227         occurs when inserting a new line. The first issue is fixed by
2228         implementing the chrome client methods didLayout,
2229         didStartOverflowScroll and didEndOverflowScroll. The second
2230         required changing the implementation of notifyRevealedSelectionByScrollingFrame.
2231         We not only need to notify the client to redraw the selection,
2232         but we also need to recompute the editorState, because scrolling
2233         might have occurred.
2234         I've removed the NotifyRevealedSelection message that was not needed
2235         any longer, since EditorStateChanged will do exactly what we want.
2236
2237         * UIProcess/WebPageProxy.h:
2238         * UIProcess/WebPageProxy.messages.in:
2239         * UIProcess/ios/WebPageProxyIOS.mm:
2240         (WebKit::WebPageProxy::editorStateChanged):
2241         (WebKit::WebPageProxy::notifyRevealedSelection): Deleted.
2242         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
2243         (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
2244         (WebKit::WebChromeClient::didLayout):
2245         (WebKit::WebChromeClient::didStartOverflowScroll):
2246         (WebKit::WebChromeClient::didEndOverflowScroll):
2247
2248 2015-05-29  Chris Dumez  <cdumez@apple.com>
2249
2250         [iOS] Update WebContent process sandbox profile for AWD logging
2251         https://bugs.webkit.org/show_bug.cgi?id=145473
2252         <rdar://problem/20543269>
2253
2254         Reviewed by Darin Adler.
2255
2256         Update WebContent process sandbox profile for AWD logging.
2257
2258         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2259
2260 2015-05-29  Anders Carlsson  <andersca@apple.com>
2261
2262         WebKit.framework installs or references Mac-only headers on iOS
2263         https://bugs.webkit.org/show_bug.cgi?id=145471
2264         rdar://problem/21161459
2265
2266         Reviewed by Dan Bernstein.
2267
2268         * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
2269         Add an #if !TARGET_OS_IPHONE guard around the entire header.
2270
2271 2015-05-29  Anders Carlsson  <andersca@apple.com>
2272
2273         WKScriptMessageInternal.h should be a project header, not a private header
2274         https://bugs.webkit.org/show_bug.cgi?id=145464
2275         rdar://problem/21161639
2276
2277         Reviewed by Dan Bernstein.
2278
2279         * WebKit2.xcodeproj/project.pbxproj:
2280
2281 2015-05-28  Alexey Proskuryakov  <ap@apple.com>
2282
2283         Clean up VisitedLinkProvider teardown
2284         https://bugs.webkit.org/show_bug.cgi?id=145450
2285         rdar://problem/20244726
2286
2287         Reviewed by Brady Eidson.
2288
2289         * UIProcess/VisitedLinkProvider.cpp:
2290         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2291
2292 2015-05-28  Brady Eidson  <beidson@apple.com>
2293
2294         Change method of signaling "should open external urls" to WebKit.
2295         https://bugs.webkit.org/show_bug.cgi?id=145454
2296
2297         Reviewed by Dan Bernstein.
2298
2299         Making this a property on the request was never a good idea.
2300
2301         Adding a new extensible load SPI seems much better.
2302
2303         * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Removed.
2304         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Removed.
2305
2306         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2307         (-[WKBrowsingContextController loadRequest:userData:]): Since this API is deprecated,
2308           it always gets the default restrictive behavior.
2309
2310         * UIProcess/API/Cocoa/WKWebView.mm:
2311         (-[WKWebView loadRequest:]):
2312         (-[WKWebView loadRequest:withOptions:]): Take an options dictionary that, for now, 
2313           only supports one option.
2314         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2315
2316         * WebKit2.xcodeproj/project.pbxproj:
2317
2318 2015-05-28  Anders Carlsson  <andersca@apple.com>
2319
2320         Make sure that we create the private WebKit.framework symlinks last
2321         https://bugs.webkit.org/show_bug.cgi?id=145442
2322         <rdar://problem/21142213>
2323
2324         Reviewed by Dan Bernstein.
2325
2326         Move the "Add Symlinks in /System/Library/PrivateFrameworks/WebKit.framework" build phase to
2327         the "All" aggregate target. Also update the script now that INSTALL_PATH is different.
2328
2329         * WebKit2.xcodeproj/project.pbxproj:
2330
2331 2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2332
2333         Code clean up for extracting information from the mix of WritingMode and TextDirection
2334         https://bugs.webkit.org/show_bug.cgi?id=143399
2335
2336         Reviewed by Darin Adler.
2337
2338         * Shared/WebPopupItem.h:
2339         * UIProcess/API/C/efl/WKAPICastEfl.h:
2340         * UIProcess/WebPopupMenuProxy.h:
2341         enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
2342         WritingMode.h instead of including TextFlags.h.
2343
2344 2015-05-28  Antti Koivisto  <antti@apple.com>
2345
2346         Disable network cache for old clients
2347         https://bugs.webkit.org/show_bug.cgi?id=145418
2348
2349         Reviewed by Andreas Kling.
2350
2351         Follow-up: Don't do linked-on-or-after checks for iOS Safari.
2352
2353         * UIProcess/Cocoa/VersionChecks.mm:
2354         (WebKit::linkTimeVersion):
2355         (WebKit::linkedOnOrAfter):
2356
2357 2015-05-28  Matt Rajca  <mrajca@apple.com>
2358
2359         Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
2360         https://bugs.webkit.org/show_bug.cgi?id=145415
2361
2362         Reviewed by Eric Carlson.
2363
2364         * Configurations/FeatureDefines.xcconfig:
2365
2366 2015-05-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2367
2368         Unreviewed, Fix build break since r184930.
2369
2370         * UIProcess/Storage/StorageManager.cpp:
2371         (WebKit::StorageManager::createTransientLocalStorageMap): Pass a pointer of SecurityOrigin
2372         in isSameSchemeHostPort().
2373
2374 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
2375
2376         Unreviewed. Fixing the build after r184950.
2377
2378         * UIProcess/Storage/StorageManager.cpp:
2379         (WebKit::StorageManager::createSessionStorageMap): getOrCreateStorageArea()
2380         now expects a Ref<WebCore::SecurityOrigin> object.
2381
2382 2015-05-28  Zan Dobersek  <zdobersek@igalia.com>
2383
2384         [WK2] Handle WebCore::SecurityOrigin objects through Ref<> where possible
2385         https://bugs.webkit.org/show_bug.cgi?id=145373
2386
2387         Reviewed by Andreas Kling.
2388
2389         WebCore::SecurityOrigin creation functions in most cases return a
2390         Ref<WebCore::SecurityOrigin> object. In the WebKit2 layer, those objects
2391         were still largely converted to RefPtr<>s.
2392
2393         This patch switches to using Ref<> where possible. The remaining uses of
2394         RefPtr<WebCore::SecurityOrigin> are present due to HashTables, to-be-copied
2395         Vectors, WebCore::DatabaseManager::origins() API and code where non-null
2396         WebCore::SecurityOrigin can't be guaranteed.
2397
2398         * DatabaseProcess/DatabaseProcess.cpp:
2399         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
2400         * NetworkProcess/NetworkProcess.cpp:
2401         (WebKit::cfURLCacheOrigins):
2402         * UIProcess/Storage/LocalStorageDatabase.cpp:
2403         (WebKit::LocalStorageDatabase::create):
2404         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
2405         (WebKit::LocalStorageDatabase::openDatabase):
2406         (WebKit::LocalStorageDatabase::close):
2407         * UIProcess/Storage/LocalStorageDatabase.h:
2408         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2409         (WebKit::LocalStorageDatabaseTracker::origins):
2410         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2411         * UIProcess/Storage/StorageManager.cpp:
2412         (WebKit::StorageManager::StorageArea::securityOrigin):
2413         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
2414         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
2415         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
2416         (WebKit::StorageManager::StorageArea::create):
2417         (WebKit::StorageManager::StorageArea::StorageArea):
2418         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
2419         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
2420         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
2421         (WebKit::StorageManager::SessionStorageNamespace::origins):
2422         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
2423         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
2424         * UIProcess/WebPageProxy.cpp:
2425         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
2426         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
2427         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
2428         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2429         (WebKit::InjectedBundle::setApplicationCacheOriginQuota):
2430         (WebKit::InjectedBundle::resetApplicationCacheOriginQuota):
2431         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2432         (WebKit::WebResourceCacheManager::returnCacheOrigins):
2433         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
2434         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2435         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
2436         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
2437         (WebKit::WebDatabaseManager::setQuotaForOrigin):
2438
2439 2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>
2440
2441         [iOS] When viewing an MJPEG stream as the main resource, only the first
2442         frame paints
2443
2444         <https://bugs.webkit.org/show_bug.cgi?id=145185>
2445         <rdar://problem/20124694>
2446
2447         Reviewed by Darin Adler.
2448
2449         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2450         (WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
2451         Tell the WebPage that we will replace multipart content.
2452
2453         (WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
2454         Tell the WebPage that we did replace multipart content.
2455
2456         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2457         * WebProcess/WebPage/DrawingArea.h:
2458
2459         * WebProcess/WebPage/WebPage.cpp:
2460         (WebKit::WebPage::willReplaceMultipartContent):
2461         Save the exposed content rect.
2462         (WebKit::WebPage::didReplaceMultipartContent):
2463         Restore the exposed content rect that was saved before this load. This
2464         fixes the issue for WK2.
2465
2466         * WebProcess/WebPage/WebPage.h:
2467
2468         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2469         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2470         (WebKit::RemoteLayerTreeDrawingArea::exposedContentRect):
2471
2472 2015-05-22  Jon Lee  <jonlee@apple.com>
2473
2474         Fix macros for wireless playback
2475         https://bugs.webkit.org/show_bug.cgi?id=145239
2476         rdar://problem/21049541
2477
2478         Reviewed by Anders Carlsson.
2479
2480         Encompass the logic within ENABLE(WIRELESS_TARGET_PLAYBACK). Update property name.
2481
2482         * UIProcess/API/Cocoa/WKWebView.mm:
2483         (-[WKWebView initWithFrame:configuration:]):
2484         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Update names. Add a WKDeprecated
2485         category section.
2486         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2487         (-[WKWebViewConfiguration init]): Update name of variables to reflect new property names.
2488         (-[WKWebViewConfiguration copyWithZone:]): Ditto.
2489         (-[WKWebViewConfiguration mediaPlaybackAllowsAirPlay]): Get and set off of the new
2490         variable.
2491         (-[WKWebViewConfiguration setMediaPlaybackAllowsAirPlay:]): Ditto.
2492         (-[WKWebViewConfiguration mediaPlaybackRequiresUserAction]): Ditto.
2493         (-[WKWebViewConfiguration setMediaPlaybackRequiresUserAction:]): Ditto.
2494
2495 2015-05-27  Brady Eidson  <beidson@apple.com>
2496
2497         Add a "should open urls externally" flag to DocumentLoader.
2498         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
2499
2500         Reviewed by Geoff Garen.
2501
2502         Rename "user initiated" to "should open external URLs":
2503         * Shared/API/Cocoa/_WKNSURLRequestExtras.h:
2504         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
2505         (-[NSURLRequest _web_shouldOpenExternalURLs]):
2506         (-[NSMutableURLRequest _web_setShouldOpenExternalURLs:]):
2507         (-[NSURLRequest _web_isUserInitiated]): Deleted.
2508         (-[NSMutableURLRequest _web_setIsUserInitiated:]): Deleted.
2509         
2510         Hold the new flag as a bool, and encode/decode it across IPC:
2511         * Shared/NavigationActionData.cpp:
2512         (WebKit::NavigationActionData::encode):
2513         (WebKit::NavigationActionData::decode):
2514         (WebKit::NavigationActionData::NavigationActionData): Deleted.
2515         * Shared/NavigationActionData.h:
2516
2517         * UIProcess/API/APINavigationAction.h: Add accessor for the bool flag.
2518
2519         * UIProcess/API/C/WKPage.cpp:
2520         (WKPageLoadURLWithUserData): Use "ShouldNotAllow" in the legacy C API for now.
2521         (WKPageLoadURLRequestWithUserData): Ditto.
2522
2523         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2524         (-[WKBrowsingContextController loadRequest:userData:]): Set the value of the flag
2525           based on whether or not the initiating NSURLRequest was user initiated.
2526
2527         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2528         (-[WKNavigationAction _shouldOpenExternalURLs]): Add accessor for the bool flag.
2529         * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
2530
2531         * UIProcess/API/Cocoa/WKWebView.mm:
2532         (-[WKWebView loadRequest:]): Set the value of the flag based on whether or not the
2533           initiating NSURLRequest was user initiated.
2534
2535         * UIProcess/WebPageProxy.cpp:
2536         (WebKit::WebPageProxy::loadRequest): Pass the value down to the WebProcess to load.
2537         (WebKit::WebPageProxy::loadFile): Ditto, but always with "ShouldNotAllow".
2538         * UIProcess/WebPageProxy.h:
2539
2540         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2541         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Translate 
2542           the NavigationAction flag to a bool in the NavigationActionData object.
2543
2544         * WebProcess/WebPage/WebPage.cpp:
2545         (WebKit::WebPage::loadRequest): Set the value of the flag in the FrameLoadRequest that
2546           will be loaded.
2547         * WebProcess/WebPage/WebPage.h:
2548         * WebProcess/WebPage/WebPage.messages.in:
2549
2550 2015-05-27  Anders Carlsson  <andersca@apple.com>
2551
2552         Can't load local files in WKWebView from containerized app
2553         https://bugs.webkit.org/show_bug.cgi?id=145424
2554         rdar://problem/20831176
2555
2556         Reviewed by Dan Bernstein.
2557
2558         Allow the network process to load local files from its bundle as long as it has
2559         the sandbox extensions to do so.
2560
2561         This was originally added to only allow SSO to read the Info.plist inside its own application
2562         bundle, but being able to read the application bundle from within the network process should be OK.
2563
2564         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2565
2566 2015-05-27  Andreas Kling  <akling@apple.com>
2567
2568         [WK2] Local storage areas should get torn down when they have no remaining references.
2569         <https://webkit.org/b/143339>
2570         <rdar://problem/20156436>
2571
2572         Reviewed by Darin Adler.
2573
2574         Let StorageNamespaceImpl own its StorageAreaMaps weakly instead of through RefPtr.
2575         Ownership is flipped so that StorageAreaMap refs the StorageNamespaceImpl instead.
2576         This allows the StorageAreaMaps to get destroyed once all of its clients are gone.
2577
2578         Practically speaking, this means that the garbage collector now decides when local
2579         storage databases can be closed, instead of us keeping them open for the lifetime
2580         of the web process.
2581
2582         For session storage, it works a bit differently. In the web process, they get torn
2583         down when their last client disappears, but they stay alive in the UI process.
2584         If/when the web process asks the UI process to open session storage for an origin,
2585         the UI process checks if one already exists, and if so, just updates the ID of the
2586         old storage with the new one provided by the web process.
2587
2588         * UIProcess/Storage/StorageManager.cpp:
2589         (WebKit::StorageManager::StorageArea::isSessionStorage):
2590         (WebKit::StorageManager::createTransientLocalStorageMap):
2591         (WebKit::StorageManager::createSessionStorageMap):
2592         (WebKit::StorageManager::destroyStorageMap):
2593         * WebProcess/Storage/StorageAreaImpl.cpp:
2594         (WebKit::StorageAreaImpl::securityOrigin):
2595         * WebProcess/Storage/StorageAreaImpl.h:
2596         * WebProcess/Storage/StorageAreaMap.cpp:
2597         (WebKit::StorageAreaMap::StorageAreaMap):
2598         (WebKit::StorageAreaMap::~StorageAreaMap):
2599         * WebProcess/Storage/StorageAreaMap.h:
2600         (WebKit::StorageAreaMap::securityOrigin):
2601         * WebProcess/Storage/StorageNamespaceImpl.cpp:
2602         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
2603         (WebKit::StorageNamespaceImpl::storageArea):
2604         * WebProcess/Storage/StorageNamespaceImpl.h:
2605
2606 2015-05-27  Antti Koivisto  <antti@apple.com>
2607
2608         Disable network cache for old clients
2609         https://bugs.webkit.org/show_bug.cgi?id=145418
2610         rdar://problem/21126587
2611
2612         Reviewed by Andy Estes.
2613
2614         Old clients might use NSURLCache API to clear the cache. New cache requires use of new APIs.
2615
2616         * UIProcess/Cocoa/VersionChecks.h: Added.
2617         * UIProcess/Cocoa/VersionChecks.mm: Added.
2618
2619             Add linked-on-or-after check mechanism similar to WebKit1.
2620
2621         (WebKit::linkTimeVersion):
2622         (WebKit::linkedOnOrAfter):
2623         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2624         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2625
2626             Use it when deciding whether to enable the cache.
2627
2628         * WebKit2.xcodeproj/project.pbxproj:
2629
2630 2015-05-27  Dean Jackson  <dino@apple.com>
2631
2632         img.currentSrc problem in strict mode with old picturefill
2633         https://bugs.webkit.org/show_bug.cgi?id=144095
2634         <rdar://problem/21087013>
2635
2636         Reviewed by Simon Fraser.
2637
2638         Add a PICTURE_SIZES flag.
2639
2640         * Configurations/FeatureDefines.xcconfig:
2641
2642 2015-05-27  Chris Dumez  <cdumez@apple.com>
2643
2644         Assertion hit in WebPage::didChangeSelection()
2645         https://bugs.webkit.org/show_bug.cgi?id=145413
2646         <rdar://problem/21001129>
2647
2648         Reviewed by Ryosuke Niwa.
2649
2650         We sometimes hit the "ASSERT(layoutCount == view->layoutCount())"
2651         assertion in WebPage::didChangeSelection(). We manage to prevent
2652         synchronous layouts in most cases when calling editorState(). However,
2653         it seems it can still happen in some cases. Crashing in this case seems
2654         overkill and can be annoying to other developers, especially
2655         considering the implications are only on performance.
2656
2657         This patch drops the assertion.
2658
2659         * WebProcess/WebPage/WebPage.cpp:
2660         (WebKit::WebPage::didChangeSelection): Deleted.
2661
2662 2015-05-27  Anders Carlsson  <andersca@apple.com>
2663
2664         Address a follow-up review comment from Darin.
2665
2666         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2667         (WebKit::WebsiteDataStore::removeMediaKeys):
2668
2669 2015-05-26  Anders Carlsson  <andersca@apple.com>
2670
2671         WKWebsiteDataStore should handle media keys
2672         https://bugs.webkit.org/show_bug.cgi?id=145394
2673         rdar://problem/20617794.
2674
2675         Reviewed by Darin Adler.
2676
2677         * Shared/WebsiteData/WebsiteDataTypes.h:
2678         Add WebsiteDataTypeMediaKeys enum.
2679
2680         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2681         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2682         Set up mediaKeysStorageDirectory.
2683
2684         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2685         (dataTypesToString):
2686         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2687         (WebKit::toWebsiteDataTypes):
2688         (WebKit::toWKWebsiteDataTypes):
2689         * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Added.
2690         Add _WKWebsiteDataTypeMediaKeys.
2691
2692         * UIProcess/WebProcessPool.cpp:
2693         (WebKit::legacyWebsiteDataStoreConfiguration):
2694         Set up mediaKeysStorageDirectory.
2695
2696         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2697         (WebKit::WebsiteDataStore::WebsiteDataStore):
2698         Set m_mediaKeysStorageDirectory.
2699
2700         (WebKit::WebsiteDataStore::fetchData):
2701         Make CallbackAggregator ThreadSafeRefCounted.
2702         Handle WebsiteDataTypeMediaKeys by calling mediaKeyOrigins on our background queue.
2703
2704         (WebKit::WebsiteDataStore::removeData):
2705         Make CallbackAggregator ThreadSafeRefCounted.
2706         Handle WebsiteDataTypeMediaKeys by calling removeMediaKeys on our background queue.
2707
2708         (WebKit::WebsiteDataStore::mediaKeyOrigins):
2709         Compute the origins.
2710
2711         (WebKit::computeMediaKeyFile):
2712         Add helper function that returns the media key given a containing directory.
2713
2714         (WebKit::WebsiteDataStore::removeMediaKeys):
2715         Remove media key files.
2716
2717         * UIProcess/WebsiteData/WebsiteDataStore.h:
2718         Add new members.
2719
2720         * WebKit2.xcodeproj/project.pbxproj:
2721         Add new files.
2722
2723 2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2724
2725         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.
2726
2727         * gtk/NEWS: Add release notes for 2.9.2.
2728
2729 2015-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2730
2731         [SOUP] Network Cache: Handle the case when we fail to create the IO stream
2732         https://bugs.webkit.org/show_bug.cgi?id=145406
2733
2734         Reviewed by Sergio Villar Senin.
2735
2736         We were asserting in that case, but it can happen that we
2737         fail to create the stream. It happened to me after r184690, that
2738         changed the NetworkCache::Key hash. Since this was not expected to
2739         happen, the async operation never finished and the completion
2740         handler never called, leaving resources loading forever. We
2741         should make sure we call the completion handler with an error
2742         code, so that the load finishes and the entry is silently removed
2743         from the cache.
2744
2745         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2746         (WebKit::NetworkCache::IOChannel::read):
2747         (WebKit::NetworkCache::IOChannel::readSync):
2748         (WebKit::NetworkCache::IOChannel::write):
2749
2750 2015-05-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2751
2752         Network Cache: Add cache capacity to the totals of JSON file
2753         https://bugs.webkit.org/show_bug.cgi?id=145246
2754
2755         Reviewed by Antti Koivisto.
2756
2757         * NetworkProcess/cache/NetworkCache.cpp:
2758         (WebKit::NetworkCache::Cache::dumpContentsToFile):
2759         * NetworkProcess/cache/NetworkCacheStorage.h:
2760         (WebKit::NetworkCache::Storage::capacity):
2761
2762 2015-05-26  Anders Carlsson  <andersca@apple.com>
2763
2764         Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.
2765
2766         rdar://problem/21111232.
2767
2768         Reviewed by Dan Bernstein.
2769
2770         * WebKit2.xcodeproj/project.pbxproj:
2771
2772 2015-05-26  Hunseop Jeong  <hs85.jeong@samsung.com>
2773
2774         [EFL] webview should be updated from (0,0) when using the evasGL.
2775         https://bugs.webkit.org/show_bug.cgi?id=137948
2776
2777         Reviewed by Gyuyoung Kim.
2778
2779         Changed the point of the start position to update the evasObject
2780         correctly when using the evasGL for graphics backend.
2781
2782         * UIProcess/API/efl/EwkView.cpp:
2783         (EwkView::displayTimerFired):
2784
2785 2015-05-26  Dan Bernstein  <mitz@apple.com>
2786
2787         <rdar://problem/21104551> Update build settings
2788
2789         Reviewed by Anders Carlsson.
2790
2791         * Configurations/DebugRelease.xcconfig:
2792         * Configurations/FeatureDefines.xcconfig:
2793         * Configurations/Version.xcconfig:
2794         * Configurations/WebContentService.Development.xcconfig:
2795         * Configurations/WebContentService.xcconfig:
2796
2797 2015-05-26  Milan Crha  <mcrha@redhat.com>
2798
2799         [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
2800         https://bugs.webkit.org/show_bug.cgi?id=138134
2801
2802         Reviewed by Žan Doberšek.
2803
2804         * PlatformGTK.cmake: Command line with expanded resources exceeds 32KB, which
2805         is a limit on Windows. It's better to expand wildcards inside the python script.
2806
2807 2015-05-25  Dan Bernstein  <mitz@apple.com>
2808
2809         ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
2810         https://bugs.webkit.org/show_bug.cgi?id=145372
2811
2812         Reviewed by Sam Weinig.
2813
2814         * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
2815
2816 2015-05-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2817
2818         [GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
2819         https://bugs.webkit.org/show_bug.cgi?id=140882
2820
2821         Reviewed by Gustavo Noronha Silva.
2822
2823         Add WebKitWebContext:indexed-db-database-directory construct only property.
2824
2825         * UIProcess/API/gtk/WebKitWebContext.cpp:
2826         (webkitWebContextGetProperty):
2827         (webkitWebContextSetProperty):
2828         (webkitWebContextConstructed):
2829         (webkit_web_context_class_init):
2830
2831 2015-05-24  Sam Weinig  <sam@webkit.org>
2832
2833         Crash when using a removed ScriptMessageHandler
2834         <rdar://problem/20888499>
2835         https://bugs.webkit.org/show_bug.cgi?id=145359
2836
2837         Reviewed by Dan Bernstein.
2838
2839         * WebProcess/UserContent/WebUserContentController.cpp:
2840         (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
2841         Invalidate the descriptor when the message handler client (as implemented by WebUserMessageHandlerDescriptorProxy)
2842         goes away. This will happen if a script message handler is removed at the API level or the WebUserContentController
2843         is destroyed (which will happen if all the pages get destroyed).
2844
2845 2015-05-23  Dan Bernstein  <mitz@apple.com>
2846
2847         <rdar://problem/21090327> /S/L/PrivateFrameworks/WebKit.framework is missing Headers and PrivateHeaders symlinks
2848         https://bugs.webkit.org/show_bug.cgi?id=145354
2849
2850         Reviewed by David Kilzer.
2851
2852         * WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
2853         the dylib symlink.
2854
2855 2015-05-23  Sungmann Cho  <sungmann.cho@navercorp.com>
2856
2857         Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
2858         https://bugs.webkit.org/show_bug.cgi?id=145288
2859
2860         Reviewed by Sam Weinig.
2861
2862         * Shared/ShareableResource.cpp:
2863         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
2864         (WebKit::ShareableResource::map):
2865         (WebKit::ShareableResource::create): Deleted.
2866         * Shared/ShareableResource.h:
2867
2868 2015-05-22  Jon Lee  <jonlee@apple.com>
2869
2870         Rename MediaPlaybackAllowsInline
2871         https://bugs.webkit.org/show_bug.cgi?id=145315
2872
2873         Reviewed by Eric Carlson.
2874
2875         Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
2876
2877         * Shared/WebPreferencesDefinitions.h:
2878         * UIProcess/API/C/WKPreferences.cpp:
2879         (WKPreferencesSetMediaPlaybackAllowsInline): Update the call to preferences.
2880         The C API will not change in a future patch.
2881         (WKPreferencesGetMediaPlaybackAllowsInline): Ditto.
2882         * UIProcess/API/Cocoa/WKWebView.mm:
2883         (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
2884         * WebProcess/WebPage/WebPage.cpp:
2885         (WebKit::WebPage::updatePreferences): Ditto.
2886
2887         * UIProcess/API/gtk/WebKitSettings.cpp: Update the call.
2888         (webkit_settings_get_media_playback_allows_inline):
2889         (webkit_settings_set_media_playback_allows_inline):
2890
2891 2015-05-22  Jon Lee  <jonlee@apple.com>
2892
2893         Rename MediaPlaybackAllowsAirPlay
2894         https://bugs.webkit.org/show_bug.cgi?id=145316
2895
2896         Reviewed by Eric Carlson.
2897
2898         In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
2899         to allowsAirPlayForMediaPlayback.
2900
2901         * Shared/WebPreferencesDefinitions.h: Update the name.
2902         * UIProcess/API/Cocoa/WKWebView.mm:
2903         (-[WKWebView initWithFrame:configuration:]): Ditto.
2904         * WebProcess/WebPage/WebPage.cpp:
2905         (WebKit::WebPage::updatePreferences): Update the call to settings.
2906
2907 2015-05-22  Jon Lee  <jonlee@apple.com>
2908
2909         Unreviewed GTK fix after r184802.
2910
2911         * UIProcess/API/gtk/WebKitSettings.cpp:
2912         (webkit_settings_get_media_playback_requires_user_gesture):
2913         (webkit_settings_set_media_playback_requires_user_gesture):
2914
2915 2015-05-22  Jon Lee  <jonlee@apple.com>
2916
2917         Rename MediaPlaybackRequiresUserGesture
2918         https://bugs.webkit.org/show_bug.cgi?id=145314
2919
2920         Reviewed by Anders Carlsson.
2921
2922         In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
2923         to requiresUserGestureForMediaPlayback.
2924
2925         No changes are being made to the API in this patch.
2926
2927         * Shared/WebPreferencesDefinitions.h: Update the name of the macro and the setting.
2928         * UIProcess/API/C/WKPreferences.cpp: The C API will not change in a future patch.
2929         (WKPreferencesSetMediaPlaybackRequiresUserGesture): Update the call to preferences.
2930         (WKPreferencesGetMediaPlaybackRequiresUserGesture): Ditto.
2931         * UIProcess/API/Cocoa/WKWebView.mm:
2932         (-[WKWebView initWithFrame:configuration:]): Update the name of the key.
2933         * WebProcess/WebPage/WebPage.cpp:
2934         (WebKit::WebPage::updatePreferences): Ditto.
2935
2936 2015-05-22  Commit Queue  <commit-queue@webkit.org>
2937
2938         Unreviewed, rolling out r183647.
2939         https://bugs.webkit.org/show_bug.cgi?id=145326
2940
2941         broke some toolbar blurring behavior (Requested by thorton on
2942         #webkit).
2943
2944         Reverted changeset:
2945
2946         "Asynchronous (or timed-out synchronous) resize flashes white
2947         instead of page background color"
2948         https://bugs.webkit.org/show_bug.cgi?id=144468
2949         http://trac.webkit.org/changeset/183647
2950
2951 2015-05-22  Yongjun Zhang  <yongjun_zhang@apple.com>
2952
2953         Image link doesn't create a preview view controller.
2954         https://bugs.webkit.org/show_bug.cgi?id=145320
2955
2956         Also try to create the preview view controller if the hit-tested node
2957         is a image link.
2958
2959         Reviewed by Beth Dakin.
2960
2961         * UIProcess/ios/WKContentViewInteraction.mm:
2962         (-[WKContentView gestureRecognizerShouldBegin:]):
2963         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2964
2965 2015-05-22  Tim Horton  <timothy_horton@apple.com>
2966
2967         Avoid doing an extra layout in some cases while doing scale-to-fit
2968         https://bugs.webkit.org/show_bug.cgi?id=145321
2969         <rdar://problem/21051165>
2970
2971         Reviewed by Beth Dakin.
2972
2973         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2974         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2975         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2976         If we make it to scaleViewToFitDocumentIfNeeded with valid layout,
2977         the view width is still less than the last-known minimum document size,
2978         and the document size hasn't changed, update the view scale without
2979         doing an extra layout, keeping the fixed layout size at the previously
2980         computed minimum document size.
2981
2982 2015-05-22  Beth Dakin  <bdakin@apple.com>
2983
2984         Yellow highlight and DD popover don't go away when scrolling an iframe
2985         https://bugs.webkit.org/show_bug.cgi?id=145312
2986         -and corresponding-
2987         rdar://problem/19692334
2988
2989         Reviewed by Tim Horton.
2990
2991         Match what Lookup already does for their popover and dismiss our popovers on 
2992         scroll.
2993         * UIProcess/API/mac/WKView.mm:
2994         (-[WKView scrollWheel:]):
2995
2996         This should not be needed anymore.
2997         * UIProcess/WebPageProxy.cpp:
2998         (WebKit::WebPageProxy::pageDidScroll):
2999
3000 2015-05-22  Tim Horton  <timothy_horton@apple.com>
3001
3002         Remove action menu support
3003         https://bugs.webkit.org/show_bug.cgi?id=145305
3004         <rdar://problem/21070771>
3005
3006         Reviewed by Anders Carlsson.
3007
3008         * Configurations/WebKit.xcconfig:
3009         * Shared/API/c/WKActionMenuItemTypes.h:
3010         * Shared/API/c/WKActionMenuTypes.h:
3011         * UIProcess/API/Cocoa/WKViewPrivate.h:
3012         * UIProcess/API/mac/WKView.mm:
3013         (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
3014         (-[WKView dealloc]): Deleted.
3015         (-[WKView mouseDown:]): Deleted.
3016         (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
3017         (-[WKView prepareForMenu:withEvent:]): Deleted.
3018         (-[WKView willOpenMenu:withEvent:]): Deleted.
3019         (-[WKView didCloseMenu:withEvent:]): Deleted.
3020         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
3021         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
3022         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
3023         * UIProcess/API/mac/WKViewInternal.h:
3024         * UIProcess/PageClient.h:
3025         * UIProcess/WebPageProxy.cpp:
3026         (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
3027         (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
3028         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
3029         (WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
3030         (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
3031         (WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
3032         * UIProcess/WebPageProxy.h:
3033         * UIProcess/WebPageProxy.messages.in:
3034         * UIProcess/mac/PageClientImpl.h:
3035         * UIProcess/mac/PageClientImpl.mm:
3036         (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
3037         (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
3038         * UIProcess/mac/WKActionMenuController.h: Removed.
3039         * UIProcess/mac/WKActionMenuController.mm: Removed.
3040         * UIProcess/mac/WKImmediateActionController.h:
3041         * UIProcess/mac/WKImmediateActionController.mm:
3042         (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
3043         (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
3044         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
3045         (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
3046         * WebKit2.xcodeproj/project.pbxproj:
3047         * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
3048         (API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
3049         (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
3050         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
3051         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3052         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3053         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
3054         (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
3055         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
3056         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
3057         * WebProcess/WebPage/WebPage.h:
3058         * WebProcess/WebPage/WebPage.messages.in:
3059         * WebProcess/WebPage/WebPageOverlay.cpp:
3060         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
3061         * WebProcess/WebPage/WebPageOverlay.h:
3062         (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
3063         * WebProcess/WebPage/mac/WebPageMac.mm:
3064         (WebKit::textIndicatorTransitionForImmediateAction):
3065         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
3066         (WebKit::textIndicatorTransitionForActionMenu): Deleted.
3067         (WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
3068         (WebKit::WebPage::selectLastActionMenuRange): Deleted.
3069         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
3070         Remove everything, except some enums that clients still refer to.
3071         Also, leave SPI that used to be shared between immediate actions and
3072         action menus intact, even if it had "action menu" in the name. We can
3073         deprecate and rename in another patch... except for the very recently-added
3074         support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2, 
3075         which was not adopted by any clients.
3076
3077 2015-05-22  Brady Eidson  <beidson@apple.com>
3078
3079         Rework how the ResourceRequest user initiated property key is used.
3080         Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
3081
3082         Reviewed by Dan Bernstein.
3083
3084         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
3085         (-[NSURLRequest _web_isUserInitiated]):
3086         (-[NSMutableURLRequest _web_setIsUserInitiated:]):
3087
3088         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3089         (WKResourceRequestIsUserInitiatedKey): Deleted.
3090         (InitWebCoreSystemInterface): Deleted.
3091
3092 2015-05-21  Gavin Barraclough  <barraclough@apple.com>
3093
3094         Networking process sometimes suspended while WebContent runnable
3095         https://bugs.webkit.org/show_bug.cgi?id=145291
3096         <rdar://problem/21033029>
3097
3098         Reviewed by Andreas Kling.
3099
3100         There is an asymmetry in how the Networking process suspension is managed.
3101         We drop the assertion (& suspend the process) whenever the WebProcess says
3102         it is ready to suspend, but we only take the assertion (& resume execution)
3103         when the WebContent process is actually resumed. This leaves a race – where
3104         the WebContent process was willing to be suspended, but the UI app changed
3105         its mind suspending it. Since the WebContent process never actually suspended
3106         (we only prepared it to), we never send a resume, and since we never resume,
3107         we never wake the Networking process.
3108
3109         The fix is pretty clean. A web process should take a token on the networking
3110         process precisely whenever it holds an assertion on the web content process.
3111         This also enables a nice refinement, that when holding a BG assertion on the
3112         WebContent process we only need to hold a BG assertion on the networking
3113         process.
3114
3115         * UIProcess/Network/NetworkProcessProxy.cpp:
3116         (WebKit::NetworkProcessProxy::didSetAssertionState):
3117             - no-op
3118         * UIProcess/Network/NetworkProcessProxy.h:
3119             - added didSetAssertionState.
3120         * UIProcess/ProcessThrottler.cpp:
3121         (WebKit::ProcessThrottler::updateAssertionNow):
3122         (WebKit::ProcessThrottler::updateAssertion):
3123         (WebKit::ProcessThrottler::didConnectToProcess):
3124             - whenever taking/updating the assertion, inform the client via didSetAssertionState.
3125         * UIProcess/ProcessThrottlerClient.h:
3126             - added didSetAssertionState.
3127         * UIProcess/WebProcessProxy.cpp:
3128         (WebKit::WebProcessProxy::didFinishLaunching):
3129             removed initializeNetworkProcessActivityToken - this is taken via ProcessThrottler::didConnectToProcess.
3130         (WebKit::WebProcessProxy::sendProcessDidResume):
3131             - removed call to initializeNetworkProcessActivityToken - updated via didSetAssertionState.
3132         (WebKit::WebProcessProxy::processReadyToSuspend):
3133             - removed update of m_tokenForNetworkProcess - updated via didSetAssertionState.
3134         (WebKit::WebProcessProxy::didSetAssertionState):
3135             - update m_backgroundTokenForNetworkProcess/m_foregroundTokenForNetworkProcess.
3136         (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken): Deleted.
3137             - updated via didSetAssertionState.
3138         * UIProcess/WebProcessProxy.h:
3139             - added didSetAssertionState, added separate FG/BG activity tokens for Networking process.
3140
3141 2015-05-22  Dan Bernstein  <mitz@apple.com>
3142
3143         Fixed the fix for <rdar://problem/20830673> Symlink the WebKit dylib instead of just the framework directory
3144         https://bugs.webkit.org/show_bug.cgi?id=145287
3145
3146         Reviewed by Anders Carlsson.
3147
3148         * WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.
3149
3150 2015-05-21  Brady Eidson  <beidson@apple.com>
3151
3152         Add an "initiated by user gesture" flag to ResourceRequest.
3153         https://bugs.webkit.org/show_bug.cgi?id=145281
3154
3155         Reviewed by Alex Christensen.
3156
3157         Expose a new category on NSURLRequest to allow SPI clients to easily set/get the flag:
3158         * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Added.
3159         * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Added.
3160         (-[NSURLRequest _web_isUserInitiated]):
3161         (-[NSMutableURLRequest _web_setIsUserInitiated:]):
3162
3163         * WebKit2.xcodeproj/project.pbxproj:
3164
3165         Expose the new property key to WebCore:
3166         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3167         (WKResourceRequestIsUserInitiatedKey):
3168         (InitWebCoreSystemInterface):
3169
3170 2015-05-21  Daniel Bates  <dabates@apple.com>
3171
3172         Rollout <http://trac.webkit.org/changeset/183909>
3173         (https://bugs.webkit.org/show_bug.cgi?id=144657)
3174
3175         Revert <http://trac.webkit.org/changeset/183909> since pausing the database
3176         thread prevents in-progress transactions from completing. We need to think
3177         about this change some more.
3178
3179         * UIProcess/WebPageProxy.h:
3180         * UIProcess/ios/WKContentView.mm:
3181         (-[WKContentView _applicationDidEnterBackground:]): Deleted.
3182         * UIProcess/ios/WebPageProxyIOS.mm:
3183         (WebKit::WebPageProxy::applicationDidEnterBackground): Deleted.
3184         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
3185         (WebKit::WebDatabaseManager::setPauseAllDatabases): Deleted.
3186         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
3187         * WebProcess/WebPage/WebPage.h:
3188         * WebProcess/WebPage/WebPage.messages.in:
3189         * WebProcess/WebPage/ios/WebPageIOS.mm:
3190         (WebKit::WebPage::applicationWillEnterForeground): Deleted.
3191         (WebKit::WebPage::applicationDidEnterBackground): Deleted.
3192
3193 2015-05-21  Enrica Casucci  <enrica@apple.com>
3194
3195         [iOS] Crash when taking a snapshot of a large PDF.
3196         https://bugs.webkit.org/show_bug.cgi?id=145286
3197         rdar://problem/20892362
3198
3199         Reviewed by Tim Horton.
3200
3201         The code for the PDF case was incorrectly computing the snapshot rect.
3202         On top of that drawViewHierarchyInRect was ignoring the rect and
3203         always creating an image using the view bounds causing the crash.
3204         We are now always using the IOSurface if we are parented or
3205         an image context when we are not.
3206
3207         * UIProcess/API/Cocoa/WKWebView.mm:
3208         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
3209
3210 2015-05-21  Anders Carlsson  <andersca@apple.com>
3211
3212         Symlink the WebKit dylib instead of just the framework directory
3213         https://bugs.webkit.org/show_bug.cgi?id=145287
3214         rdar://problem/20830673
3215
3216         Reviewed by Dan Bernstein.
3217
3218         * WebKit2.xcodeproj/project.pbxproj:
3219
3220 2015-05-21  Anders Carlsson  <andersca@apple.com>
3221
3222         WKWebsiteDataStore doesn't track and remove iOS Safari's offline application cache entries
3223         https://bugs.webkit.org/show_bug.cgi?id=145279
3224         rdar://problem/20657912
3225
3226         Reviewed by Dan Bernstein.
3227
3228         Special-case iOS Safari and WebApp when computing the default application cache directory.
3229
3230         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3231         (API::applicationCacheDirectory):
3232         (API::WebsiteDataStore::defaultDataStoreConfiguration):
3233
3234 2015-05-21  Brian Weinstein  <bweinstein@apple.com>
3235
3236         Add a _WKWebKitContentExtensionStore initializer that takes a path.
3237         https://bugs.webkit.org/show_bug.cgi?id=145269 and work towards <rdar://problem/21031414>
3238
3239         Reviewed by Anders Carlsson.
3240
3241         * UIProcess/API/APIUserContentExtensionStore.cpp:
3242         (API::UserContentExtensionStore::storeWithPath):
3243         * UIProcess/API/APIUserContentExtensionStore.h:
3244         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
3245         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
3246         (+[_WKUserContentExtensionStore storeWithURL:]):
3247
3248 2015-05-21  Alexey Proskuryakov  <ap@apple.com>
3249
3250         Build fix. Silence some deprecation warnings.
3251
3252         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3253         (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
3254         * UIProcess/ios/forms/WKFormInputControl.mm:
3255         (-[WKDateTimePopover initWithView:datePickerMode:]):
3256         * UIProcess/ios/forms/WKFormPopover.h:
3257         * UIProcess/ios/forms/WKFormPopover.mm:
3258         * UIProcess/ios/forms/WKFormSelectPopover.mm:
3259         (-[WKSelectPopover initWithView:hasGroups:]):
3260
3261 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
3262
3263         [EFL] Remove an unused private field from EwkPopupMenuItem class
3264         https://bugs.webkit.org/show_bug.cgi?id=145249
3265
3266         Reviewed by Gyuyoung Kim.
3267
3268         * UIProcess/API/efl/ewk_popup_menu.cpp:
3269         (EwkPopupMenu::EwkPopupMenu):
3270         * UIProcess/API/efl/ewk_popup_menu_private.h:
3271
3272 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
3273
3274         [EFL] Fix mismatched-tags warnings in UIProcess/API/efl
3275         https://bugs.webkit.org/show_bug.cgi?id=145129
3276
3277         Reviewed by Gyuyoung Kim.
3278
3279         * UIProcess/API/efl/EwkViewCallbacks.h:
3280         * UIProcess/API/efl/ewk_application_cache_manager.h:
3281         * UIProcess/API/efl/ewk_auth_request.h:
3282         * UIProcess/API/efl/ewk_back_forward_list.h:
3283         * UIProcess/API/efl/ewk_back_forward_list_item.h:
3284         * UIProcess/API/efl/ewk_color_picker.h:
3285         * UIProcess/API/efl/ewk_context.h:
3286         * UIProcess/API/efl/ewk_context_menu_item.h:
3287         * UIProcess/API/efl/ewk_cookie_manager.h:
3288         * UIProcess/API/efl/ewk_database_manager.h:
3289         * UIProcess/API/efl/ewk_download_job.h:
3290         * UIProcess/API/efl/ewk_error.h:
3291         * UIProcess/API/efl/ewk_favicon_database.h:
3292         * UIProcess/API/efl/ewk_file_chooser_request.h:
3293         * UIProcess/API/efl/ewk_form_submission_request.h:
3294         * UIProcess/API/efl/ewk_navigation_data.h:
3295         * UIProcess/API/efl/ewk_navigation_policy_decision.h:
3296         * UIProcess/API/efl/ewk_object.h:
3297         * UIProcess/API/efl/ewk_page_group.h:
3298         * UIProcess/API/efl/ewk_popup_menu.h:
3299         * UIProcess/API/efl/ewk_popup_menu_item.h:
3300         * UIProcess/API/efl/ewk_security_origin.h:
3301         * UIProcess/API/efl/ewk_settings.h:
3302         * UIProcess/API/efl/ewk_storage_manager.h:
3303         * UIProcess/API/efl/ewk_url_request.h:
3304         * UIProcess/API/efl/ewk_url_response.h:
3305         * UIProcess/API/efl/ewk_url_scheme_request.h:
3306         * UIProcess/API/efl/ewk_view.h:
3307         * UIProcess/API/efl/ewk_window_features.h:
3308         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
3309         * WebProcess/InjectedBundle/API/efl/ewk_page.h:
3310
3311 2015-05-21  Csaba Osztrogonác  <ossy@webkit.org>
3312
3313         Fix mismatched-tags warnings related to CoordinatedGraphics
3314         https://bugs.webkit.org/show_bug.cgi?id=145130
3315
3316         Reviewed by Darin Adler.
3317
3318         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3319         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
3320         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3321
3322 2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3323
3324         Unreviewed GTK build fix since r184686.
3325
3326         * UIProcess/gtk/WebProcessPoolGtk.cpp:
3327         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
3328         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
3329
3330 2015-05-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3331
3332         Unreviewed EFL build fix since r184686.
3333
3334         * UIProcess/efl/WebProcessPoolEfl.cpp:
3335         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
3336         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
3337
3338 2015-05-20  Chris Dumez  <cdumez@apple.com>
3339
3340         [WK2][iOS] Update WebContent process sandbox profile for AWD logging
3341         https://bugs.webkit.org/show_bug.cgi?id=145229
3342         <rdar://problem/20543269>
3343
3344         Reviewed by Alexey Proskuryakov.
3345
3346         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3347
3348 2015-05-20  Gavin Barraclough  <barraclough@apple.com>
3349
3350         dispatchViewStateChange should not wait for sync reply if the page isn't visible
3351         https://bugs.webkit.org/show_bug.cgi?id=145242
3352         <rdar://problem/20967937>
3353
3354         Reviewed by Ben Poulain.
3355
3356         This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
3357
3358
3359         * UIProcess/WebPageProxy.cpp:
3360         (WebKit::WebPageProxy::dispatchViewStateChange):
3361         (WebKit::WebPageProxy::waitForDidUpdateViewState):
3362
3363 2015-05-20  Marcos Chavarría Teijeiro  <mchavarria@igalia.com>
3364
3365         Enable disk cache for range requests
3366         https://bugs.webkit.org/show_bug.cgi?id=144682
3367
3368         Reviewed by Antti Koivisto.
3369
3370         Add Range header value to the network cache key constructor so we take
3371         into account this value. The 206 response code is also marked to be cached.
3372
3373         * NetworkProcess/cache/NetworkCache.cpp:
3374         (WebKit::NetworkCache::makeCacheKey):
3375         (WebKit::NetworkCache::isStatusCodeCacheableByDefault):
3376         * NetworkProcess/cache/NetworkCacheKey.cpp:
3377         (WebKit::NetworkCache::Key::Key):
3378         (WebKit::NetworkCache::Key::operator=):
3379         (WebKit::NetworkCache::Key::computeHash):
3380         (WebKit::NetworkCache::Key::operator==):
3381         (WebKit::NetworkCache::Key::encode):
3382         (WebKit::NetworkCache::Key::decode):
3383         (WebKit::NetworkCache::Key::stringToHash): Deleted.
3384         * NetworkProcess/cache/NetworkCacheKey.h:
3385
3386 2015-05-20  Anders Carlsson  <andersca@apple.com>
3387
3388         WKWebsiteDataStore API doesn't report webkit.org as using Databases or App Cache after visiting http://www.webkit.org/demos/sticky-notes/
3389         https://bugs.webkit.org/show_bug.cgi?id=145238
3390         rdar://problem/20581175
3391
3392         Reviewed by Tim Horton.
3393
3394         Make sure to set the application cache and WebSQL directories when using the legacy data store.
3395
3396         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3397         (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
3398         (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
3399         Rename this and move it to the right place.
3400
3401         * UIProcess/WebProcessPool.cpp:
3402         (WebKit::legacyWebsiteDataStoreConfiguration):
3403         Rename this and add the application cache and WebSQL directories.
3404
3405         (WebKit::WebProcessPool::WebProcessPool):
3406         Call legacyWebsiteDataStoreConfiguration.
3407
3408         (WebKit::WebProcessPool::applicationCacheDirectory):
3409         Call legacyPlatformDefaultApplicationCacheDirectory.
3410
3411         * UIProcess/WebProcessPool.h:
3412
3413 2015-05-20  Enrica Casucci  <enrica@apple.com>
3414
3415         [iOS] Using CSS viewport units causes incorrect layout.
3416         https://bugs.webkit.org/show_bug.cgi?id=145225
3417         rdar://problem/20924495
3418
3419         Reviewed by Benjamin Poulain.
3420
3421         * WebProcess/WebPage/ios/WebPageIOS.mm:
3422         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
3423
3424 2015-05-20  Tim Horton  <timothy_horton@apple.com>
3425
3426         Allow overriding the waitForDidUpdateViewState timeout
3427         https://bugs.webkit.org/show_bug.cgi?id=145230
3428         <rdar://problem/20990162>
3429
3430         Reviewed by Darin Adler.
3431
3432         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3433         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
3434         Use the value from NSUserDefaults, if it exists.
3435         We'll only check once, so changing the default requires a restart of the UI process.
3436
3437 2015-05-20  Anders Carlsson  <andersca@apple.com>
3438
3439         Make sure we always have a process pool to perform data store operations with
3440         https://bugs.webkit.org/show_bug.cgi?id=145231
3441         rdar://problem/20618248
3442
3443         Reviewed by Tim Horton.
3444
3445         Make sure that we always return a process pool. If we're a legacy C SPI per-context data store,
3446         find the process pool we're a part of and use that. Otherwise, create a new one.
3447     
3448         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3449         (WebKit::WebsiteDataStore::processPools):
3450
3451 2015-05-19  Jer Noble  <jer.noble@apple.com>
3452
3453         Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
3454         https://bugs.webkit.org/show_bug.cgi?id=145193
3455
3456         Reviewed by Eric Carlson.
3457
3458         Use HTMLMediaElementEnums instead of HTMLMediaElement.
3459
3460         * UIProcess/API/Cocoa/WKWebView.mm:
3461         (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
3462         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3463         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3464         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3465         (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
3466         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
3467         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
3468         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
3469         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3470         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
3471         * WebProcess/WebCoreSupport/WebChromeClient.h:
3472         * WebProcess/ios/WebVideoFullscreenManager.h:
3473         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.