1 2015-06-14 Dan Bernstein <mitz@apple.com>
5 * mac/postprocess-framework-headers.sh:
7 2015-06-14 Michael Catanzaro <mcatanzaro@igalia.com>
9 Format string misuse in DatabaseProcessIDBConnection.cpp and UniqueIDBDatabaseBackingStoreSQLite.cpp
10 https://bugs.webkit.org/show_bug.cgi?id=145960
12 Reviewed by Darin Adler.
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).
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):
51 2015-06-14 Dan Bernstein <mitz@apple.com>
53 [Cocoa] Clean up postprocess-framework-headers.sh
54 https://bugs.webkit.org/show_bug.cgi?id=145962
56 Reviewed by Darin Adler.
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
62 2015-06-13 Chris Dumez <cdumez@apple.com>
64 [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
65 https://bugs.webkit.org/show_bug.cgi?id=145948
67 Reviewed by Darin Adler.
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.
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
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:
95 2015-06-12 Gavin Barraclough <barraclough@apple.com>
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>
101 Reviewed by Anders Carlsson.
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.
121 2015-06-12 Anders Carlsson <andersca@apple.com>
123 Reimplement WKResourceCacheManagerRef on top of WKWebsiteDataStoreRef
124 https://bugs.webkit.org/show_bug.cgi?id=145951
126 Reviewed by Darin Adler.
128 * UIProcess/API/C/WKContext.cpp:
129 (WKContextGetResourceCacheManager):
130 * UIProcess/API/C/WKResourceCacheManager.cpp:
131 (WKResourceCacheManagerGetTypeID):
132 (toWebsiteDataTypes):
133 (WKResourceCacheManagerGetCacheOrigins):
134 (WKResourceCacheManagerClearCacheForOrigin):
135 (WKResourceCacheManagerClearCacheForAllOrigins):
137 2015-06-12 Anders Carlsson <andersca@apple.com>
139 Reimplement WKApplicationCacheManagerRef as WKWebsiteDataStoreRef
140 https://bugs.webkit.org/show_bug.cgi?id=145950
142 Reviewed by Dan Bernstein.
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):
154 2015-06-12 Anders Carlsson <andersca@apple.com>
156 Clean up IndexedDB website data retrieval and removal
157 https://bugs.webkit.org/show_bug.cgi?id=145941
159 Reviewed by Andreas Kling.
161 - Use SecurityOrigin instead of SecurityOriginData; It's not possible to pass SecurityOriginData
162 safely between threads.
164 - Use std::chrono instead of double for modification times.
166 - Get rid of endTime since it's not used.
168 - Change deleteIndexedDatabaseEntriesForOrigin to deleteIndexedDatabaseEntriesForOrigins and make it take
169 a vector of origins instead of a single one.
171 - Get rid of deleteAllIndexedDatabaseEntries.
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.
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):
192 2015-06-12 Antti Koivisto <antti@apple.com>
194 Network Cache: Use SHA1 for header checksum
195 https://bugs.webkit.org/show_bug.cgi?id=145928
197 Reviewed by Chris Dumez.
199 Use SHA1 everywhere for consistency and robustness.
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.
210 This was the last user of 32 bit hashes in cache code.
212 * NetworkProcess/cache/NetworkCacheStorage.h:
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.
217 2015-06-12 Simon Fraser <simon.fraser@apple.com>
219 [iOS WK2] Video with reflection crashes WebKit and Safari
220 https://bugs.webkit.org/show_bug.cgi?id=145905
221 rdar://problem/18364939
223 Reviewed by Anders Carlsson.
225 On iOS, AVPlayerLayers are contained inside a WebVideoContainerLayer, but
226 the layer type is still LayerTypeAVPlayerLayer.
228 Avoid throwing exceptions when cloning such layers by checking the layer class.
230 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
231 (WebKit::PlatformCALayerRemoteCustom::clone):
233 2015-06-12 Csaba Osztrogonác <ossy@webkit.org>
235 [EFL] Fix unused private field warning in WebContextMenuProxyEfl.cpp
236 https://bugs.webkit.org/show_bug.cgi?id=145911
238 Reviewed by Darin Adler.
240 * UIProcess/efl/WebContextMenuProxyEfl.cpp:
241 (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl): Deleted.
242 * UIProcess/efl/WebContextMenuProxyEfl.h:
244 2015-06-12 Zan Dobersek <zdobersek@igalia.com>
246 Unreviewed build fix after r185502.
248 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
249 GRefPtr.h header has been moved to a different place.
251 2015-06-12 Zan Dobersek <zdobersek@igalia.com>
253 [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
254 https://bugs.webkit.org/show_bug.cgi?id=145799
256 Reviewed by Carlos Garcia Campos.
258 Update header inclusions for headers that have been moved
259 to Source/WTF/wtf/glib/.
261 * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
262 * NetworkProcess/cache/NetworkCacheIOChannel.h:
263 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
264 * NetworkProcess/soup/NetworkProcessSoup.cpp:
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:
334 2015-06-12 Antti Koivisto <antti@apple.com>
336 Network Cache: Use SHA1 for key hash
337 https://bugs.webkit.org/show_bug.cgi?id=143829
339 Reviewed by Anders Carlsson.
341 For consistency with blobs, use SHA1 instead of MD5.
343 * NetworkProcess/cache/NetworkCacheCoders.cpp:
344 (WebKit::NetworkCache::Coder<MD5::Digest>::encode): Deleted.
345 (WebKit::NetworkCache::Coder<MD5::Digest>::decode): Deleted.
349 * NetworkProcess/cache/NetworkCacheCoders.h:
350 * NetworkProcess/cache/NetworkCacheKey.cpp:
351 (WebKit::NetworkCache::hashString):
352 (WebKit::NetworkCache::Key::computeHash):
353 * NetworkProcess/cache/NetworkCacheKey.h:
355 2015-06-12 Csaba Osztrogonác <ossy@webkit.org>
357 Fix mismatched-tags warning in Source/WebKit2/UIProcess/gtk/InputMethodFilter.h
358 https://bugs.webkit.org/show_bug.cgi?id=145923
360 Reviewed by Carlos Garcia Campos.
362 * UIProcess/gtk/InputMethodFilter.h:
364 2015-06-12 Antti Koivisto <antti@apple.com>
366 Use SHA1 for cache coder checksums
367 https://bugs.webkit.org/show_bug.cgi?id=145880
369 Reviewed by Anders Carlsson.
371 Make cache data error detection more robust by using SHA1 for checksums.
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):
391 2015-06-12 Csaba Osztrogonác <ossy@webkit.org>
393 [EFL] Fix deprecated declarations warnings related to WK2 versioned structs
394 https://bugs.webkit.org/show_bug.cgi?id=145913
396 Reviewed by Gyuyoung Kim.
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):
413 2015-06-11 Mark Lam <mark.lam@apple.com>
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
418 Reviewed by Michael Saboff.
420 * WebProcess/InjectedBundle/InjectedBundle.cpp:
421 (WebKit::InjectedBundle::reportException):
422 - Don't assume we have an Exception object. Let WebCore::reportException() take
425 2015-06-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
427 [CMake] Unreviewed build fix after r185479.
429 * CMakeLists.txt: Unlist the files that r185479 deleted.
431 2015-06-11 Anders Carlsson <andersca@apple.com>
433 Get rid of WebOriginDataManager
434 https://bugs.webkit.org/show_bug.cgi?id=145896
436 Reviewed by Andreas Kling.
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:
501 2015-06-11 Matt Rajca <mrajca@apple.com>
503 Media Session: Add plumbing for media control event delivery.
504 https://bugs.webkit.org/show_bug.cgi?id=145859
506 Reviewed by Anders Carlsson.
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:
519 2015-06-11 Myles C. Maxfield <mmaxfield@apple.com>
521 [OS X] Decoding fonts may return nil when using force click
522 https://bugs.webkit.org/show_bug.cgi?id=145890
524 Reviewed by Beth Dakin.
526 [NSFontDescriptor fontDescriptorWithFontAttributes] might return nil, which
527 causes the encoding of an NSFont to erroneously return true.
529 * Shared/mac/ArgumentCodersMac.mm:
532 2015-06-11 Anders Carlsson <andersca@apple.com>
534 Reimplement WKOriginDataManager in terms of API::WebsiteDataStore
535 https://bugs.webkit.org/show_bug.cgi?id=145889
537 Reviewed by Dan Bernstein.
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):
549 2015-06-11 Brent Fulgham <bfulgham@apple.com>
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>
555 Reviewed by Simon Fraser.
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.
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.
568 2015-06-11 Jon Lee <jonlee@apple.com>
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>
574 Reviewed by Dean Jackson.
576 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
577 (InitWebCoreSystemInterface): Deleted GetMediaUIImageData.
579 2015-06-11 Alex Christensen <achristensen@webkit.org>
581 Speculative build fix for GTK after r185463.
584 Remove WebPluginSiteDataManager.cpp from CMake build.
586 2015-06-11 Anders Carlsson <andersca@apple.com>
588 Remove WebPluginSiteDataManager
589 https://bugs.webkit.org/show_bug.cgi?id=145884
591 Reviewed by Andreas Kling.
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:
638 2015-06-11 Anders Carlsson <andersca@apple.com>
640 Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
641 https://bugs.webkit.org/show_bug.cgi?id=145882
643 Reviewed by Dan Bernstein.
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):
654 2015-06-11 Antti Koivisto <antti@apple.com>
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
660 Reviewed by Anders Carlsson.
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.
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.
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):
678 Reshuffle to avoid sum.
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.
688 Remove these, they are not really used or needed.
690 2015-06-10 Anders Carlsson <andersca@apple.com>
692 Rewrite WKPluginSiteDataManager using WebsiteDataStore functions
693 https://bugs.webkit.org/show_bug.cgi?id=145868
695 Reviewed by Antti Koivisto.
697 * UIProcess/API/C/WKPluginSiteDataManager.cpp:
698 (WKPluginSiteDataManagerGetSitesWithData):
699 (WKPluginSiteDataManagerClearSiteData):
700 (WKPluginSiteDataManagerClearAllSiteData):
701 (toNPClearSiteDataFlags): Deleted.
702 * UIProcess/Plugins/WebPluginSiteDataManager.h:
703 (WebKit::WebPluginSiteDataManager::processPool):
705 2015-06-11 Antti Koivisto <antti@apple.com>
707 3% cold PLT regression from network cache on iOS
708 https://bugs.webkit.org/show_bug.cgi?id=145694
709 rdar://problem/21158245
711 Reviewed by Chris Dumez.
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.
715 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
716 (WebKit::NetworkCache::IOChannel::IOChannel):
717 (WebKit::NetworkCache::IOChannel::open):
719 Dispatch channels inherit their I/O priority from the target queue. Use background queue for write I/O.
721 * NetworkProcess/cache/NetworkCacheStorage.cpp:
722 (WebKit::NetworkCache::Storage::Storage):
723 (WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
724 (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
726 Only write one file at a time instead of maximum of three.
728 (WebKit::NetworkCache::Storage::retrieve):
730 For consistency with store prepend new entries here too.
732 (WebKit::NetworkCache::Storage::store):
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
737 (WebKit::NetworkCache::Storage::traverse):
738 * NetworkProcess/cache/NetworkCacheStorage.h:
740 2015-06-10 Yongjun Zhang <yongjun_zhang@apple.com>
742 Don't send touch events on link preview.
743 https://bugs.webkit.org/show_bug.cgi?id=145863
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).
748 Reviewed by Beth Dakin.
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.
754 2015-06-10 Anders Carlsson <andersca@apple.com>
756 WKWebsiteDataStore should handle removing plug-in data for individual records
757 https://bugs.webkit.org/show_bug.cgi?id=145864
759 Reviewed by Beth Dakin.
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):
778 2015-06-10 Anders Carlsson <andersca@apple.com>
780 WKWebsiteDataStore should handle removing plug-in data
781 https://bugs.webkit.org/show_bug.cgi?id=145862
783 Reviewed by Sam Weinig.
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):
803 2015-06-10 Brent Fulgham <bfulgham@apple.com>
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>
809 Reviewed by Dean Jackson.
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
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.
824 2015-06-09 Anders Carlsson <andersca@apple.com>
826 Support fetching website data
827 https://bugs.webkit.org/show_bug.cgi?id=145828
829 Reviewed by Darin Adler.
831 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
832 (WebKit::WebsiteDataStore::fetchData):
833 (WebKit::WebsiteDataStore::plugins):
834 * UIProcess/WebsiteData/WebsiteDataStore.h:
836 2015-06-10 Zan Dobersek <zdobersek@igalia.com>
838 Unreviewed. Fixing the build for the GTK port with Clang.
840 * UIProcess/gtk/InputMethodFilter.h: Add the <functional> header inclusion
841 to avoid compilation errors due to missing std::function<>.
843 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
845 [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
846 https://bugs.webkit.org/show_bug.cgi?id=145840
848 Reviewed by Martin Robinson.
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.
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):
871 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
873 [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
874 https://bugs.webkit.org/show_bug.cgi?id=145598
876 Reviewed by Žan Doberšek.
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.
888 * Shared/NativeWebKeyboardEvent.h: Add command list parameter to
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
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
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
943 (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Deleted.
945 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
947 Unreviewed. Fix GTK build after r185412.
951 * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
953 2015-06-10 Antti Koivisto <antti@apple.com>
955 NetworkCache: Delete old cache versions
956 https://bugs.webkit.org/show_bug.cgi?id=145800
958 Reviewed by Darin Adler.
961 * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
962 (WebKit::NetworkCache::BlobStorage::synchronize):
963 * NetworkProcess/cache/NetworkCacheFileSystem.cpp: Added.
964 (WebKit::NetworkCache::directoryEntryType):
965 (WebKit::NetworkCache::traverseDirectory):
967 Pass entry type as callback argument.
969 (WebKit::NetworkCache::deleteDirectoryRecursively):
973 (WebKit::NetworkCache::fileTimes):
974 (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
975 * NetworkProcess/cache/NetworkCacheFileSystem.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h.
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):
991 Move cache hierarchy aware traversal code here from NetworkCacheFileSystem (for better layering).
994 (WebKit::NetworkCache::deleteEmptyRecordsDirectories):
996 Factor to a function.
998 (WebKit::NetworkCache::Storage::Storage):
999 (WebKit::NetworkCache::Storage::synchronize):
1000 (WebKit::NetworkCache::Storage::traverse):
1001 (WebKit::NetworkCache::Storage::clear):
1003 Use traverseRecordsFiles for traversal.
1005 (WebKit::NetworkCache::Storage::shrink):
1006 (WebKit::NetworkCache::Storage::deleteOldVersions):
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.
1011 * NetworkProcess/cache/NetworkCacheStorage.h:
1012 * UIProcess/API/APIUserContentExtensionStore.cpp:
1013 * WebKit2.xcodeproj/project.pbxproj:
1015 2015-06-10 Zan Dobersek <zdobersek@igalia.com>
1017 [GTK] Web Inspector is broken
1018 https://bugs.webkit.org/show_bug.cgi?id=145836
1020 Reviewed by Carlos Garcia Campos.
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.
1028 2015-06-09 Anders Carlsson <andersca@apple.com>
1032 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1033 (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::getSitesWithDataForNextPlugin):
1035 2015-06-09 Anders Carlsson <andersca@apple.com>
1037 Change the PluginProcessManager data fetching function to take a completion handler
1038 https://bugs.webkit.org/show_bug.cgi?id=145821
1040 Reviewed by Sam Weinig.
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):
1058 2015-06-09 Anders Carlsson <andersca@apple.com>
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
1063 Reviewed by Andreas Kling.
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):
1077 2015-06-09 Anders Carlsson <andersca@apple.com>
1079 Add Plug-in type declarations to WKWebsiteDataRecord and friends
1080 https://bugs.webkit.org/show_bug.cgi?id=145816
1082 Reviewed by Andreas Kling.
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:
1092 2015-06-09 Antti Koivisto <antti@apple.com>
1094 REGRESSION(r185262): NetworkCache is in wrong location on OS X
1095 https://bugs.webkit.org/show_bug.cgi?id=145812
1097 Reviewed by Anders Carlsson.
1099 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1100 (WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
1101 (WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
1102 (WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
1103 (WebKit::WebProcessPool::isNetworkCacheEnabled):
1105 Make sure static functions that use NSUserDefaults call registerUserDefaultsIfNeeded() first.
1107 2015-06-09 Yusuke Suzuki <utatane.tea@gmail.com>
1109 Crash when passing Symbol to NPAPI plugin objects
1110 https://bugs.webkit.org/show_bug.cgi?id=145798
1112 Reviewed by Darin Adler.
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.
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.
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):
1131 2015-06-09 Carlos Garcia Campos <cgarcia@igalia.com>
1133 [SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
1134 https://bugs.webkit.org/show_bug.cgi?id=145791
1136 Reviewed by Sergio Villar Senin.
1138 Keep using G_PRIORITY_DEFAULT for reads, but use
1139 G_PRIORITY_DEFAULT_IDLE for writes now.
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().
1147 2015-06-09 Carlos Garcia Campos <cgarcia@igalia.com>
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
1152 Reviewed by Žan Doberšek.
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.
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):
1169 2015-06-09 David Kilzer <ddkilzer@apple.com>
1171 REGRESSION (r185357): Fix build for iOS 8.x
1173 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1174 (fallbackIconForFile): Add cast prior to iOS 9.
1176 2015-06-09 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1178 [EFL] Fix a crash on MiniBrowser when running on debug mode
1179 https://bugs.webkit.org/show_bug.cgi?id=145793
1181 Reviewed by Carlos Garcia Campos.
1183 r185314 missed to initialize parameters.diskCacheDirectory with configuration's one.
1185 * UIProcess/efl/WebProcessPoolEfl.cpp:
1186 (WebKit::WebProcessPool::platformInitializeWebProcess):
1188 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
1190 [cmake] Fix the style issues in cmake project files
1191 https://bugs.webkit.org/show_bug.cgi?id=145755
1193 Reviewed by Darin Adler.
1196 * PlatformGTK.cmake:
1197 * PlatformMac.cmake:
1199 2015-06-02 Jon Honeycutt <jhoneycutt@apple.com>
1201 [iOS] UI process memory spike, hang when uploading a very large JPEG
1203 <https://bugs.webkit.org/show_bug.cgi?id=145567>
1204 <rdar://problem/21206699>
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
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.
1214 Reviewed by Darin Adler.
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.
1222 Changed to take a CGImageRef.
1223 Use RetainPtr and +[UIImage imageWithCGImage:] to match other code in
1225 (thumbnailSizedImageForImage):
1226 Changed to take a CGImageRef and to use iconSideLength.
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
1234 (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
1235 Removed originalImage parameter; _WKImageFileUploadItem no longer uses
1237 (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
1238 (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]):
1240 2015-06-08 Dan Bernstein <mitz@apple.com>
1242 [Cocoa] Use generics in framework headers
1243 https://bugs.webkit.org/show_bug.cgi?id=145781
1245 Reviewed by Sam Weinig.
1247 * mac/postprocess-framework-headers.sh: Use the parameter to WK_ARRAY and WK_SET.
1249 2015-06-08 Chris Dumez <cdumez@apple.com>
1251 Access GCController instance via GCController::singleton() instead of a free function
1252 https://bugs.webkit.org/show_bug.cgi?id=145776
1254 Reviewed by Darin Adler.
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.
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):
1269 2015-06-08 Anders Carlsson <andersca@apple.com>
1271 Include IndexedDB databases in -[WKWebsiteDataStore allWebsiteDataTypes]
1272 https://bugs.webkit.org/show_bug.cgi?id=145775
1274 Reviewed by Simon Fraser.
1276 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1277 (+[WKWebsiteDataStore allWebsiteDataTypes]):
1279 2015-06-08 Anders Carlsson <andersca@apple.com>
1281 Move the snapshot layer contents SPI to the web view
1282 https://bugs.webkit.org/show_bug.cgi?id=145771
1284 Reviewed by Geoffrey Garen.
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.
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:
1297 2015-06-08 Brady Eidson <beidson@apple.com>
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
1302 Reviewed by Geoffrey Garen.
1304 * WebProcess/WebProcess.cpp:
1305 (WebKit::WebProcess::WebProcess): Enable IDB at runtime if it's enabled at compile time.
1307 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>
1309 [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
1310 https://bugs.webkit.org/show_bug.cgi?id=145542
1312 Reviewed by Alexey Proskuryakov.
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.
1317 * UIProcess/API/gtk/WebKitWebContext.cpp:
1319 2015-06-08 Carlos Garcia Campos <cgarcia@igalia.com>
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
1324 Reviewed by Darin Adler.
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.
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.
1342 2015-06-08 Csaba Osztrogonác <ossy@webkit.org>
1344 [GTK] Remove the unused scroll function from WebPageGtk.cpp
1345 https://bugs.webkit.org/show_bug.cgi?id=145756
1347 Reviewed by Carlos Garcia Campos.
1349 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1350 (WebKit::scroll): Deleted.
1352 2015-06-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1354 REGRESSION(r185262): [EFL] Modify legacyPlatformDefaultNetworkCacheDirectory() according to network cache
1355 https://bugs.webkit.org/show_bug.cgi?id=145752
1357 Reviewed by Carlos Garcia Campos.
1359 EFL port needs to add different prefix for network cache directory since r185262.
1360 Modify it basedon GTK port fix.
1362 * UIProcess/efl/WebProcessPoolEfl.cpp:
1363 (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
1365 2015-06-07 Carlos Garcia Campos <cgarcia@igalia.com>
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
1370 Reviewed by Darin Adler.
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.
1389 2015-06-07 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1391 [EFL][GTK] Fix build break since r185262
1392 https://bugs.webkit.org/show_bug.cgi?id=145724
1394 Unreviewed, fix build break for EFL and GTK ports.
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):
1409 2015-06-06 Dan Bernstein <mitz@apple.com>
1411 Don’t enable manual sandboxing in the iOS Simulator. This should fix all the tests timing out.
1413 * Configurations/DebugRelease.xcconfig:
1415 2015-06-06 Dan Bernstein <mitz@apple.com>
1417 [iOS] Can’t debug with Development XPC services due to automatic sandboxing
1418 https://bugs.webkit.org/show_bug.cgi?id=145731
1420 Rubber-stamped by Darin Adler.
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.
1426 The solution is to opt Engineering builds into manual sandboxing.
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.
1434 * Configurations/DebugRelease.xcconfig: Removed unused definition of DEBUG_OR_RELEASE. Set
1435 WK_MANUAL_SANDBOXING_ENABLED to YES for all engineering builds.
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.
1442 * Configurations/DatabaseService.Development.xcconfig: Define
1443 WK_XPC_SERVICE_IOS_ENTITLEMENTS_BASE and let BaseXPCService.xcconfig define
1444 CODE_SIGN_ENTITLEMENTS for iOS.
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.
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
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.
1461 * Shared/ios/ChildProcessIOS.mm:
1462 (WebKit::ChildProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) and don’t define it
1465 * WebProcess/cocoa/WebProcessCocoa.mm:
1466 (WebKit::WebProcess::initializeSandbox): Use ENABLE(MANUAL_SANDBOXING) instead of defining
1467 and using ENABLE_MANUAL_WEBPROCESS_SANDBOXING here.
1469 2015-06-06 Anders Carlsson <andersca@apple.com>
1471 Remove support from getting plug-in information from Carbon resources
1472 https://bugs.webkit.org/show_bug.cgi?id=145730
1474 Reviewed by Dan Bernstein.
1476 No current plug-in versions use this feature, and both Chrome and Mozilla for
1477 Mac stopped looking at Carbon resources years ago.
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.
1487 2015-06-05 Anders Carlsson <andersca@apple.com>
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
1492 Reviewed by Dan Bernstein.
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:
1501 2015-06-05 Chris Dumez <cdumez@apple.com>
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>
1507 Reviewed by Antti Koivisto.
1509 Have the WebContent process register a vnode pressure handler on iOS,
1510 which calls the memory pressure handler.
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
1517 * WebProcess/cocoa/WebProcessCocoa.mm:
1518 (WebKit::WebProcess::platformInitializeWebProcess):
1520 2015-06-05 Anders Carlsson <andersca@apple.com>
1522 Fix refacto, don't put IndexedDB databases in the cache directory
1523 https://bugs.webkit.org/show_bug.cgi?id=145714
1525 Reviewed by Antti Koivisto.
1527 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
1528 (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
1530 2015-06-05 Anders Carlsson <andersca@apple.com>
1532 Make the network cache directory part of WKContextConfigurationRef
1533 https://bugs.webkit.org/show_bug.cgi?id=145711
1535 Reviewed by Antti Koivisto.
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).
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:
1567 2015-06-05 Anders Carlsson <andersca@apple.com>
1569 Make the application cache directory part of WKContextConfigurationRef
1570 https://bugs.webkit.org/show_bug.cgi?id=145704
1572 Reviewed by Geoffrey Garen.
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:
1592 2015-06-05 Mark Lam <mark.lam@apple.com>
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
1597 Reviewed by Geoffrey Garen.
1599 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1600 (WebKit::InjectedBundle::reportException):
1601 - Changed to use the new Exception object.
1603 2015-06-05 Anders Carlsson <andersca@apple.com>
1605 Disable the CFNetwork cache in the web process
1606 https://bugs.webkit.org/show_bug.cgi?id=145700
1607 rdar://problem/20243343
1609 Reviewed by Geoffrey Garen.
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.
1632 2015-06-05 Anders Carlsson <andersca@apple.com>
1634 Consolidate default website data directory computations
1635 https://bugs.webkit.org/show_bug.cgi?id=145698
1637 Reviewed by Andreas Kling.
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.
1652 2015-06-01 Jon Honeycutt <jhoneycutt@apple.com>
1654 [iOS] Uploading an animated GIF from the photo library uploads a JPEG
1656 <https://bugs.webkit.org/show_bug.cgi?id=145539>
1657 <rdar://problem/19760877
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.
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.
1669 Reviewed by Andy Estes and Joe Pecoraro.
1671 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1672 Soft link the Photos framework.
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:.
1679 (-[WKFileUploadPanel _uploadItemForJPEGRepresentationOfImage:successBlock:failureBlock:]):
1680 Get a JPEG representation of the UIImage, and create an upload item
1683 (uploadImageNameFromUTI):
1684 Return a filename for the uploaded image based on the UTI.
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
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.
1697 2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1699 REGRESSION(r185091): Crash happens on indexdb tests
1700 https://bugs.webkit.org/show_bug.cgi?id=145549
1702 Reviewed by Darin Adler.
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):
1719 2015-06-04 Joseph Pecoraro <pecoraro@apple.com>
1721 Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
1722 https://bugs.webkit.org/show_bug.cgi?id=143912
1724 Reviewed by Simon Fraser.
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.
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.
1737 2015-06-04 Dan Bernstein <mitz@apple.com>
1741 * UIProcess/API/Cocoa/WKErrorPrivate.h:
1743 2015-06-04 Dan Bernstein <mitz@apple.com>
1745 Renamed the WebKit2SandboxProfiles target to Sandbox Profiles.
1747 Rubber-stamped by Anders Carlsson.
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.
1753 2015-06-03 Dan Bernstein <mitz@apple.com>
1755 [Cocoa] Expose interruptedForPolicyChangeError
1756 https://bugs.webkit.org/show_bug.cgi?id=145627
1758 Reviewed by Anders Carlsson.
1760 * UIProcess/API/Cocoa/WKErrorPrivate.h: Added WKErrorCodeFrameLoadInterruptedByPolicyChange with the same value as
1761 kWKErrorCodeFrameLoadInterruptedByPolicyChange.
1763 2015-06-04 Chris Dumez <cdumez@apple.com>
1765 [WK2] Prune more resources from the MemoryCache before process suspension
1766 https://bugs.webkit.org/show_bug.cgi?id=145633
1768 Reviewed by Andreas Kling.
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):
1781 Update low memory handler prototype to match WebCore changes.
1783 * WebProcess/WebProcess.cpp:
1784 (WebKit::WebProcess::actualPrepareToSuspend):
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.
1794 2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
1796 [GTK] [Wayland] Build is broken on trunk
1797 https://bugs.webkit.org/show_bug.cgi?id=142879
1799 Reviewed by Carlos Garcia Campos.
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.
1806 2015-06-03 Dan Bernstein <mitz@apple.com>
1808 Made WKBackForwardListItemPrivate.h a private header after it was added as internal in r185183.
1810 * WebKit2.xcodeproj/project.pbxproj:
1812 2015-06-03 Hyungwook Lee <hyungwook.lee@navercorp.com>
1814 [EFL] Implement window_object_cleared callback in EwkPageClient.
1815 https://bugs.webkit.org/show_bug.cgi?id=145603
1817 Reviewed by Gyuyoung Kim.
1819 We need to provide right timing for custom JS API that may need to work at the beginning of the page.
1821 * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
1822 * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
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:
1830 2015-06-03 Anders Carlsson <andersca@apple.com>
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
1835 Reviewed by Dan Bernstein.
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:
1843 2015-06-02 Hyungwook Lee <hyungwook.lee@navercorp.com>
1845 [EFL] Implement load_started callback in EwkPageClient.
1846 https://bugs.webkit.org/show_bug.cgi?id=145545
1848 Reviewed by Gyuyoung Kim.
1850 We need to provide load_started callback to web extension module.
1852 * UIProcess/API/efl/tests/extensions/extension_sample.cpp:
1853 * WebProcess/InjectedBundle/API/efl/ewk_page.cpp:
1856 (EwkPage::didStartProvisionalLoadForFrame):
1857 (EwkPage::didFinishDocumentLoadForFrame):
1858 * WebProcess/InjectedBundle/API/efl/ewk_page.h:
1859 * WebProcess/InjectedBundle/API/efl/ewk_page_private.h:
1861 2015-06-02 Gavin Barraclough <barraclough@apple.com>
1863 PDFs always think they're visible on iOS.
1864 https://bugs.webkit.org/show_bug.cgi?id=145493
1865 <rdar://problem/19668879>
1867 Reviewed by Andreas Kling & Sam Weinig.
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.
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.
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.
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.
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
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].
1905 2015-06-02 Chris Dumez <cdumez@apple.com>
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>
1911 Reviewed by Simon Fraser.
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.
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
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()).
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):
1953 2015-06-02 Brady Eidson <beidson@apple.com>
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
1958 Reviewed by Alex Christensen.
1960 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1961 (WebKit::PDFPlugin::clickedLink):
1963 * WebProcess/Plugins/PluginView.cpp:
1964 (WebKit::PluginView::performFrameLoadURLRequest):
1965 (WebKit::PluginView::loadURL):
1967 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1968 (WebKit::WebContextMenuClient::searchWithGoogle):
1970 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1971 (WebKit::WebFrameLoaderClient::dispatchCreatePage):
1973 * WebProcess/WebPage/WebInspector.cpp:
1974 (WebKit::WebInspector::openInNewTab):
1976 * WebProcess/WebPage/WebPage.cpp:
1977 (WebKit::WebPage::loadURLInFrame):
1978 (WebKit::WebPage::loadRequest):
1979 (WebKit::WebPage::loadDataImpl):
1980 (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
1982 2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1984 REGRESSION(r185091): Crash happens on indexdb tests
1985 https://bugs.webkit.org/show_bug.cgi?id=145549
1987 Reviewed by Csaba Osztrogonác.
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().
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):
2008 2015-06-01 Enrica Casucci <enrica@apple.com>
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
2014 Reviewed by Darin Adler.
2016 The extend parameter was ignored in all the functions below.
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:]):
2032 2015-06-01 Anders Carlsson <andersca@apple.com>
2034 Use xpc_connection_set_oneshot_instance where possible
2035 https://bugs.webkit.org/show_bug.cgi?id=145535
2036 rdar://problem/21109994
2038 Reviewed by Sam Weinig.
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.
2043 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2044 (WebKit::connectToService):
2045 (WebKit::connectToReExecService):
2047 2015-06-01 Enrica Casucci <enrica@apple.com>
2049 [iOS] Hardware Keyboard: Command + left arrow does not work.
2050 https://bugs.webkit.org/show_bug.cgi?id=145531
2051 rdar://problem/18576402
2053 Reviewed by Anders Carlsson.
2055 We were calling a non existent command (moveToStartOfLine) instead of
2056 moveToBeginningOfLine.
2058 * UIProcess/ios/WKContentViewInteraction.mm:
2059 (-[WKContentView _moveToStartOfLine:withHistory:]):
2061 2015-06-01 Brady Eidson <beidson@apple.com>
2063 Add WKTR support for "should open external URLs".
2064 https://bugs.webkit.org/show_bug.cgi?id=145505
2066 Reviewed by Darin Adler.
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:
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.
2078 * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
2079 (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
2080 * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2081 (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
2083 * WebKit2.xcodeproj/project.pbxproj:
2085 2015-06-01 Gavin Barraclough <barraclough@apple.com>
2087 PDFs always think they're visible on iOS.
2088 https://bugs.webkit.org/show_bug.cgi?id=145493
2089 <rdar://problem/19668879>
2091 Unreviewed roll-out.
2093 Temporarily reverting this change – will need a workaround for test harness craziness.
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]):
2103 2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
2105 [EFL] Remove unused const variable from EwkView.cpp
2106 https://bugs.webkit.org/show_bug.cgi?id=145512
2108 Reviewed by Gyuyoung Kim.
2110 * UIProcess/API/efl/EwkView.cpp:
2112 2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
2114 [cmake] Suppress unused parameter warnings in WebKit2 and TestNetscapePlugIn
2115 https://bugs.webkit.org/show_bug.cgi?id=145264
2117 Reviewed by Carlos Garcia Campos.
2119 * CMakeLists.txt: Use COMPILE_FLAGS instead of CMAKE_<C|CXX>_FLAGS to put -Wno-unused-parameter after -Wextra.
2121 2015-05-31 Gavin Barraclough <barraclough@apple.com>
2123 PDFs always think they're visible on iOS.
2124 https://bugs.webkit.org/show_bug.cgi?id=145493
2125 <rdar://problem/19668879>
2127 Reviewed by Andreas Kling.
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.
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.
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.
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.
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
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].
2162 2015-05-30 Brady Eidson <beidson@apple.com>
2164 Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
2165 https://bugs.webkit.org/show_bug.cgi?id=145495
2167 Reviewed by Alexey Proskuryakov.
2169 * WebProcess/WebPage/WebPage.cpp:
2170 (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
2172 2015-05-29 Joseph Pecoraro <pecoraro@apple.com>
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
2177 Reviewed by Alexey Proskuryakov.
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.
2185 (WebKit::WebInspector::createInspectorPage):
2186 This member variable will never be null.
2188 2015-05-29 Andreas Kling <akling@apple.com>
2190 [iOS] When bouncing back from max pinch zoom scale, scaleChangeRate should be 0.
2191 <https://webkit.org/b/145487>
2192 <rdar://problem/20989389>
2194 Reviewed by Benjamin Poulain.
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.
2199 This fixes an issue where the bounce-back animation would cause a burst of
2200 unnecessary tile generation.
2202 * WebProcess/WebPage/ios/WebPageIOS.mm:
2203 (WebKit::adjustVelocityDataForBoundedScale):
2204 (WebKit::WebPage::updateVisibleContentRects):
2206 2015-05-29 Jon Lee <jonlee@apple.com>
2208 Fix preferences for wireless playback
2209 https://bugs.webkit.org/show_bug.cgi?id=145477
2210 rdar://problem/21166767
2212 Reviewed by Anders Carlsson.
2214 * UIProcess/API/C/WKPreferences.cpp: Add missing preference calls in C API.
2215 * UIProcess/API/C/WKPreferencesRef.h:
2217 2015-05-29 Enrica Casucci <enrica@apple.com>
2219 [iOS] Cursor hidden in text area once it scrolls.
2220 https://bugs.webkit.org/show_bug.cgi?id=145451
2221 rdar://problem/20356413
2223 Reviewed by Simon Fraser.
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.
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):
2248 2015-05-29 Chris Dumez <cdumez@apple.com>
2250 [iOS] Update WebContent process sandbox profile for AWD logging
2251 https://bugs.webkit.org/show_bug.cgi?id=145473
2252 <rdar://problem/20543269>
2254 Reviewed by Darin Adler.
2256 Update WebContent process sandbox profile for AWD logging.
2258 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2260 2015-05-29 Anders Carlsson <andersca@apple.com>
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
2266 Reviewed by Dan Bernstein.
2268 * UIProcess/API/C/mac/WKInspectorPrivateMac.h:
2269 Add an #if !TARGET_OS_IPHONE guard around the entire header.
2271 2015-05-29 Anders Carlsson <andersca@apple.com>
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
2277 Reviewed by Dan Bernstein.
2279 * WebKit2.xcodeproj/project.pbxproj:
2281 2015-05-28 Alexey Proskuryakov <ap@apple.com>
2283 Clean up VisitedLinkProvider teardown
2284 https://bugs.webkit.org/show_bug.cgi?id=145450
2285 rdar://problem/20244726
2287 Reviewed by Brady Eidson.
2289 * UIProcess/VisitedLinkProvider.cpp:
2290 (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2292 2015-05-28 Brady Eidson <beidson@apple.com>
2294 Change method of signaling "should open external urls" to WebKit.
2295 https://bugs.webkit.org/show_bug.cgi?id=145454
2297 Reviewed by Dan Bernstein.
2299 Making this a property on the request was never a good idea.
2301 Adding a new extensible load SPI seems much better.
2303 * Shared/API/Cocoa/_WKNSURLRequestExtras.h: Removed.
2304 * Shared/API/Cocoa/_WKNSURLRequestExtras.mm: Removed.
2306 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2307 (-[WKBrowsingContextController loadRequest:userData:]): Since this API is deprecated,
2308 it always gets the default restrictive behavior.
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:
2316 * WebKit2.xcodeproj/project.pbxproj:
2318 2015-05-28 Anders Carlsson <andersca@apple.com>
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>
2324 Reviewed by Dan Bernstein.
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.
2329 * WebKit2.xcodeproj/project.pbxproj:
2331 2015-05-28 Said Abou-Hallawa <sabouhallawa@apple.com>
2333 Code clean up for extracting information from the mix of WritingMode and TextDirection
2334 https://bugs.webkit.org/show_bug.cgi?id=143399
2336 Reviewed by Darin Adler.
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.
2344 2015-05-28 Antti Koivisto <antti@apple.com>
2346 Disable network cache for old clients
2347 https://bugs.webkit.org/show_bug.cgi?id=145418
2349 Reviewed by Andreas Kling.
2351 Follow-up: Don't do linked-on-or-after checks for iOS Safari.
2353 * UIProcess/Cocoa/VersionChecks.mm:
2354 (WebKit::linkTimeVersion):
2355 (WebKit::linkedOnOrAfter):
2357 2015-05-28 Matt Rajca <mrajca@apple.com>
2359 Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
2360 https://bugs.webkit.org/show_bug.cgi?id=145415
2362 Reviewed by Eric Carlson.
2364 * Configurations/FeatureDefines.xcconfig:
2366 2015-05-28 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2368 Unreviewed, Fix build break since r184930.
2370 * UIProcess/Storage/StorageManager.cpp:
2371 (WebKit::StorageManager::createTransientLocalStorageMap): Pass a pointer of SecurityOrigin
2372 in isSameSchemeHostPort().
2374 2015-05-28 Zan Dobersek <zdobersek@igalia.com>
2376 Unreviewed. Fixing the build after r184950.
2378 * UIProcess/Storage/StorageManager.cpp:
2379 (WebKit::StorageManager::createSessionStorageMap): getOrCreateStorageArea()
2380 now expects a Ref<WebCore::SecurityOrigin> object.
2382 2015-05-28 Zan Dobersek <zdobersek@igalia.com>
2384 [WK2] Handle WebCore::SecurityOrigin objects through Ref<> where possible
2385 https://bugs.webkit.org/show_bug.cgi?id=145373
2387 Reviewed by Andreas Kling.
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.
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.
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):
2439 2015-05-19 Jon Honeycutt <jhoneycutt@apple.com>
2441 [iOS] When viewing an MJPEG stream as the main resource, only the first
2444 <https://bugs.webkit.org/show_bug.cgi?id=145185>
2445 <rdar://problem/20124694>
2447 Reviewed by Darin Adler.
2449 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2450 (WebKit::WebFrameLoaderClient::willReplaceMultipartContent):
2451 Tell the WebPage that we will replace multipart content.
2453 (WebKit::WebFrameLoaderClient::didReplaceMultipartContent):
2454 Tell the WebPage that we did replace multipart content.
2456 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2457 * WebProcess/WebPage/DrawingArea.h:
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.
2466 * WebProcess/WebPage/WebPage.h:
2468 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2469 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2470 (WebKit::RemoteLayerTreeDrawingArea::exposedContentRect):
2472 2015-05-22 Jon Lee <jonlee@apple.com>
2474 Fix macros for wireless playback
2475 https://bugs.webkit.org/show_bug.cgi?id=145239
2476 rdar://problem/21049541
2478 Reviewed by Anders Carlsson.
2480 Encompass the logic within ENABLE(WIRELESS_TARGET_PLAYBACK). Update property name.
2482 * UIProcess/API/Cocoa/WKWebView.mm:
2483 (-[WKWebView initWithFrame:configuration:]):
2484 * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Update names. Add a WKDeprecated
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
2491 (-[WKWebViewConfiguration setMediaPlaybackAllowsAirPlay:]): Ditto.
2492 (-[WKWebViewConfiguration mediaPlaybackRequiresUserAction]): Ditto.
2493 (-[WKWebViewConfiguration setMediaPlaybackRequiresUserAction:]): Ditto.
2495 2015-05-27 Brady Eidson <beidson@apple.com>
2497 Add a "should open urls externally" flag to DocumentLoader.
2498 rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
2500 Reviewed by Geoff Garen.
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.
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:
2517 * UIProcess/API/APINavigationAction.h: Add accessor for the bool flag.
2519 * UIProcess/API/C/WKPage.cpp:
2520 (WKPageLoadURLWithUserData): Use "ShouldNotAllow" in the legacy C API for now.
2521 (WKPageLoadURLRequestWithUserData): Ditto.
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.
2527 * UIProcess/API/Cocoa/WKNavigationAction.mm:
2528 (-[WKNavigationAction _shouldOpenExternalURLs]): Add accessor for the bool flag.
2529 * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
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.
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:
2540 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2541 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Translate
2542 the NavigationAction flag to a bool in the NavigationActionData object.
2544 * WebProcess/WebPage/WebPage.cpp:
2545 (WebKit::WebPage::loadRequest): Set the value of the flag in the FrameLoadRequest that
2547 * WebProcess/WebPage/WebPage.h:
2548 * WebProcess/WebPage/WebPage.messages.in:
2550 2015-05-27 Anders Carlsson <andersca@apple.com>
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
2556 Reviewed by Dan Bernstein.
2558 Allow the network process to load local files from its bundle as long as it has
2559 the sandbox extensions to do so.
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.
2564 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2566 2015-05-27 Andreas Kling <akling@apple.com>
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>
2572 Reviewed by Darin Adler.
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.
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
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.
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:
2606 2015-05-27 Antti Koivisto <antti@apple.com>
2608 Disable network cache for old clients
2609 https://bugs.webkit.org/show_bug.cgi?id=145418
2610 rdar://problem/21126587
2612 Reviewed by Andy Estes.
2614 Old clients might use NSURLCache API to clear the cache. New cache requires use of new APIs.
2616 * UIProcess/Cocoa/VersionChecks.h: Added.
2617 * UIProcess/Cocoa/VersionChecks.mm: Added.
2619 Add linked-on-or-after check mechanism similar to WebKit1.
2621 (WebKit::linkTimeVersion):
2622 (WebKit::linkedOnOrAfter):
2623 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2624 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2626 Use it when deciding whether to enable the cache.
2628 * WebKit2.xcodeproj/project.pbxproj:
2630 2015-05-27 Dean Jackson <dino@apple.com>
2632 img.currentSrc problem in strict mode with old picturefill
2633 https://bugs.webkit.org/show_bug.cgi?id=144095
2634 <rdar://problem/21087013>
2636 Reviewed by Simon Fraser.
2638 Add a PICTURE_SIZES flag.
2640 * Configurations/FeatureDefines.xcconfig:
2642 2015-05-27 Chris Dumez <cdumez@apple.com>
2644 Assertion hit in WebPage::didChangeSelection()
2645 https://bugs.webkit.org/show_bug.cgi?id=145413
2646 <rdar://problem/21001129>
2648 Reviewed by Ryosuke Niwa.
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.
2657 This patch drops the assertion.
2659 * WebProcess/WebPage/WebPage.cpp:
2660 (WebKit::WebPage::didChangeSelection): Deleted.
2662 2015-05-27 Anders Carlsson <andersca@apple.com>
2664 Address a follow-up review comment from Darin.
2666 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2667 (WebKit::WebsiteDataStore::removeMediaKeys):
2669 2015-05-26 Anders Carlsson <andersca@apple.com>
2671 WKWebsiteDataStore should handle media keys
2672 https://bugs.webkit.org/show_bug.cgi?id=145394
2673 rdar://problem/20617794.
2675 Reviewed by Darin Adler.
2677 * Shared/WebsiteData/WebsiteDataTypes.h:
2678 Add WebsiteDataTypeMediaKeys enum.
2680 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2681 (API::WebsiteDataStore::defaultDataStoreConfiguration):
2682 Set up mediaKeysStorageDirectory.
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.
2692 * UIProcess/WebProcessPool.cpp:
2693 (WebKit::legacyWebsiteDataStoreConfiguration):
2694 Set up mediaKeysStorageDirectory.
2696 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2697 (WebKit::WebsiteDataStore::WebsiteDataStore):
2698 Set m_mediaKeysStorageDirectory.
2700 (WebKit::WebsiteDataStore::fetchData):
2701 Make CallbackAggregator ThreadSafeRefCounted.
2702 Handle WebsiteDataTypeMediaKeys by calling mediaKeyOrigins on our background queue.
2704 (WebKit::WebsiteDataStore::removeData):
2705 Make CallbackAggregator ThreadSafeRefCounted.
2706 Handle WebsiteDataTypeMediaKeys by calling removeMediaKeys on our background queue.
2708 (WebKit::WebsiteDataStore::mediaKeyOrigins):
2709 Compute the origins.
2711 (WebKit::computeMediaKeyFile):
2712 Add helper function that returns the media key given a containing directory.
2714 (WebKit::WebsiteDataStore::removeMediaKeys):
2715 Remove media key files.
2717 * UIProcess/WebsiteData/WebsiteDataStore.h:
2720 * WebKit2.xcodeproj/project.pbxproj:
2723 2015-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
2725 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.2 release.
2727 * gtk/NEWS: Add release notes for 2.9.2.
2729 2015-05-27 Carlos Garcia Campos <cgarcia@igalia.com>
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
2734 Reviewed by Sergio Villar Senin.
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
2745 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
2746 (WebKit::NetworkCache::IOChannel::read):
2747 (WebKit::NetworkCache::IOChannel::readSync):
2748 (WebKit::NetworkCache::IOChannel::write):
2750 2015-05-26 Carlos Garcia Campos <cgarcia@igalia.com>
2752 Network Cache: Add cache capacity to the totals of JSON file
2753 https://bugs.webkit.org/show_bug.cgi?id=145246
2755 Reviewed by Antti Koivisto.
2757 * NetworkProcess/cache/NetworkCache.cpp:
2758 (WebKit::NetworkCache::Cache::dumpContentsToFile):
2759 * NetworkProcess/cache/NetworkCacheStorage.h:
2760 (WebKit::NetworkCache::Storage::capacity):
2762 2015-05-26 Anders Carlsson <andersca@apple.com>
2764 Add a symlink for every file inside /S/L/F/WebKit.framework to the PrivateFrameworks mirror.
2766 rdar://problem/21111232.
2768 Reviewed by Dan Bernstein.
2770 * WebKit2.xcodeproj/project.pbxproj:
2772 2015-05-26 Hunseop Jeong <hs85.jeong@samsung.com>
2774 [EFL] webview should be updated from (0,0) when using the evasGL.
2775 https://bugs.webkit.org/show_bug.cgi?id=137948
2777 Reviewed by Gyuyoung Kim.
2779 Changed the point of the start position to update the evasObject
2780 correctly when using the evasGL for graphics backend.
2782 * UIProcess/API/efl/EwkView.cpp:
2783 (EwkView::displayTimerFired):
2785 2015-05-26 Dan Bernstein <mitz@apple.com>
2787 <rdar://problem/21104551> Update build settings
2789 Reviewed by Anders Carlsson.
2791 * Configurations/DebugRelease.xcconfig:
2792 * Configurations/FeatureDefines.xcconfig:
2793 * Configurations/Version.xcconfig:
2794 * Configurations/WebContentService.Development.xcconfig:
2795 * Configurations/WebContentService.xcconfig:
2797 2015-05-26 Milan Crha <mcrha@redhat.com>
2799 [GTK] Expand wildcards inside generate-inspector-gresource-manifest.py
2800 https://bugs.webkit.org/show_bug.cgi?id=138134
2802 Reviewed by Žan Doberšek.
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.
2807 2015-05-25 Dan Bernstein <mitz@apple.com>
2809 ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
2810 https://bugs.webkit.org/show_bug.cgi?id=145372
2812 Reviewed by Sam Weinig.
2814 * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
2816 2015-05-25 Carlos Garcia Campos <cgarcia@igalia.com>
2818 [GTK] Add construct property to WebKitWebContext to set the IndexedDB database directory
2819 https://bugs.webkit.org/show_bug.cgi?id=140882
2821 Reviewed by Gustavo Noronha Silva.
2823 Add WebKitWebContext:indexed-db-database-directory construct only property.
2825 * UIProcess/API/gtk/WebKitWebContext.cpp:
2826 (webkitWebContextGetProperty):
2827 (webkitWebContextSetProperty):
2828 (webkitWebContextConstructed):
2829 (webkit_web_context_class_init):
2831 2015-05-24 Sam Weinig <sam@webkit.org>
2833 Crash when using a removed ScriptMessageHandler
2834 <rdar://problem/20888499>
2835 https://bugs.webkit.org/show_bug.cgi?id=145359
2837 Reviewed by Dan Bernstein.
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).
2845 2015-05-23 Dan Bernstein <mitz@apple.com>
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
2850 Reviewed by David Kilzer.
2852 * WebKit2.xcodeproj/project.pbxproj: Create Headers and PrivateHeaders symlinks alongside
2855 2015-05-23 Sungmann Cho <sungmann.cho@navercorp.com>
2857 Rename ShareableResource::create(Handle&) to map(Handle&) to match SharedMemory.
2858 https://bugs.webkit.org/show_bug.cgi?id=145288
2860 Reviewed by Sam Weinig.
2862 * Shared/ShareableResource.cpp:
2863 (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
2864 (WebKit::ShareableResource::map):
2865 (WebKit::ShareableResource::create): Deleted.
2866 * Shared/ShareableResource.h:
2868 2015-05-22 Jon Lee <jonlee@apple.com>
2870 Rename MediaPlaybackAllowsInline
2871 https://bugs.webkit.org/show_bug.cgi?id=145315
2873 Reviewed by Eric Carlson.
2875 Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
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.
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):
2891 2015-05-22 Jon Lee <jonlee@apple.com>
2893 Rename MediaPlaybackAllowsAirPlay
2894 https://bugs.webkit.org/show_bug.cgi?id=145316
2896 Reviewed by Eric Carlson.
2898 In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
2899 to allowsAirPlayForMediaPlayback.
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.
2907 2015-05-22 Jon Lee <jonlee@apple.com>
2909 Unreviewed GTK fix after r184802.
2911 * UIProcess/API/gtk/WebKitSettings.cpp:
2912 (webkit_settings_get_media_playback_requires_user_gesture):
2913 (webkit_settings_set_media_playback_requires_user_gesture):
2915 2015-05-22 Jon Lee <jonlee@apple.com>
2917 Rename MediaPlaybackRequiresUserGesture
2918 https://bugs.webkit.org/show_bug.cgi?id=145314
2920 Reviewed by Anders Carlsson.
2922 In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
2923 to requiresUserGestureForMediaPlayback.
2925 No changes are being made to the API in this patch.
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.
2936 2015-05-22 Commit Queue <commit-queue@webkit.org>
2938 Unreviewed, rolling out r183647.
2939 https://bugs.webkit.org/show_bug.cgi?id=145326
2941 broke some toolbar blurring behavior (Requested by thorton on
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
2951 2015-05-22 Yongjun Zhang <yongjun_zhang@apple.com>
2953 Image link doesn't create a preview view controller.
2954 https://bugs.webkit.org/show_bug.cgi?id=145320
2956 Also try to create the preview view controller if the hit-tested node
2959 Reviewed by Beth Dakin.
2961 * UIProcess/ios/WKContentViewInteraction.mm:
2962 (-[WKContentView gestureRecognizerShouldBegin:]):
2963 (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2965 2015-05-22 Tim Horton <timothy_horton@apple.com>
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>
2971 Reviewed by Beth Dakin.
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.
2982 2015-05-22 Beth Dakin <bdakin@apple.com>
2984 Yellow highlight and DD popover don't go away when scrolling an iframe
2985 https://bugs.webkit.org/show_bug.cgi?id=145312
2987 rdar://problem/19692334
2989 Reviewed by Tim Horton.
2991 Match what Lookup already does for their popover and dismiss our popovers on
2993 * UIProcess/API/mac/WKView.mm:
2994 (-[WKView scrollWheel:]):
2996 This should not be needed anymore.
2997 * UIProcess/WebPageProxy.cpp:
2998 (WebKit::WebPageProxy::pageDidScroll):
3000 2015-05-22 Tim Horton <timothy_horton@apple.com>
3002 Remove action menu support
3003 https://bugs.webkit.org/show_bug.cgi?id=145305
3004 <rdar://problem/21070771>
3006 Reviewed by Anders Carlsson.
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.
3077 2015-05-22 Brady Eidson <beidson@apple.com>
3079 Rework how the ResourceRequest user initiated property key is used.
3080 Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
3082 Reviewed by Dan Bernstein.
3084 * Shared/API/Cocoa/_WKNSURLRequestExtras.mm:
3085 (-[NSURLRequest _web_isUserInitiated]):
3086 (-[NSMutableURLRequest _web_setIsUserInitiated:]):
3088 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3089 (WKResourceRequestIsUserInitiatedKey): Deleted.
3090 (InitWebCoreSystemInterface): Deleted.
3092 2015-05-21 Gavin Barraclough <barraclough@apple.com>
3094 Networking process sometimes suspended while WebContent runnable
3095 https://bugs.webkit.org/show_bug.cgi?id=145291
3096 <rdar://problem/21033029>
3098 Reviewed by Andreas Kling.
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.
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
3115 * UIProcess/Network/NetworkProcessProxy.cpp:
3116 (WebKit::NetworkProcessProxy::didSetAssertionState):
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.
3141 2015-05-22 Dan Bernstein <mitz@apple.com>
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
3146 Reviewed by Anders Carlsson.
3148 * WebKit2.xcodeproj/project.pbxproj: Give the symlink the correct destination.
3150 2015-05-21 Brady Eidson <beidson@apple.com>
3152 Add an "initiated by user gesture" flag to ResourceRequest.
3153 https://bugs.webkit.org/show_bug.cgi?id=145281
3155 Reviewed by Alex Christensen.
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:]):
3163 * WebKit2.xcodeproj/project.pbxproj:
3165 Expose the new property key to WebCore:
3166 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3167 (WKResourceRequestIsUserInitiatedKey):
3168 (InitWebCoreSystemInterface):
3170 2015-05-21 Daniel Bates <dabates@apple.com>
3172 Rollout <http://trac.webkit.org/changeset/183909>
3173 (https://bugs.webkit.org/show_bug.cgi?id=144657)
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.
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.
3193 2015-05-21 Enrica Casucci <enrica@apple.com>
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
3199 Reviewed by Tim Horton.
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.
3207 * UIProcess/API/Cocoa/WKWebView.mm:
3208 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
3210 2015-05-21 Anders Carlsson <andersca@apple.com>
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
3216 Reviewed by Dan Bernstein.
3218 * WebKit2.xcodeproj/project.pbxproj:
3220 2015-05-21 Anders Carlsson <andersca@apple.com>
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
3226 Reviewed by Dan Bernstein.
3228 Special-case iOS Safari and WebApp when computing the default application cache directory.
3230 * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3231 (API::applicationCacheDirectory):
3232 (API::WebsiteDataStore::defaultDataStoreConfiguration):
3234 2015-05-21 Brian Weinstein <bweinstein@apple.com>
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>
3239 Reviewed by Anders Carlsson.
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:]):
3248 2015-05-21 Alexey Proskuryakov <ap@apple.com>
3250 Build fix. Silence some deprecation warnings.
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:]):
3261 2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
3263 [EFL] Remove an unused private field from EwkPopupMenuItem class
3264 https://bugs.webkit.org/show_bug.cgi?id=145249
3266 Reviewed by Gyuyoung Kim.
3268 * UIProcess/API/efl/ewk_popup_menu.cpp:
3269 (EwkPopupMenu::EwkPopupMenu):
3270 * UIProcess/API/efl/ewk_popup_menu_private.h:
3272 2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
3274 [EFL] Fix mismatched-tags warnings in UIProcess/API/efl
3275 https://bugs.webkit.org/show_bug.cgi?id=145129
3277 Reviewed by Gyuyoung Kim.
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:
3311 2015-05-21 Csaba Osztrogonác <ossy@webkit.org>
3313 Fix mismatched-tags warnings related to CoordinatedGraphics
3314 https://bugs.webkit.org/show_bug.cgi?id=145130
3316 Reviewed by Darin Adler.
3318 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
3319 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
3320 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
3322 2015-05-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3324 Unreviewed GTK build fix since r184686.
3326 * UIProcess/gtk/WebProcessPoolGtk.cpp:
3327 (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
3328 (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
3330 2015-05-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3332 Unreviewed EFL build fix since r184686.
3334 * UIProcess/efl/WebProcessPoolEfl.cpp:
3335 (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory): Add *legacy* prefix.
3336 (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory): Deleted.
3338 2015-05-20 Chris Dumez <cdumez@apple.com>
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>
3344 Reviewed by Alexey Proskuryakov.
3346 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3348 2015-05-20 Gavin Barraclough <barraclough@apple.com>
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>
3354 Reviewed by Ben Poulain.
3356 This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
3359 * UIProcess/WebPageProxy.cpp:
3360 (WebKit::WebPageProxy::dispatchViewStateChange):
3361 (WebKit::WebPageProxy::waitForDidUpdateViewState):
3363 2015-05-20 Marcos Chavarría Teijeiro <mchavarria@igalia.com>
3365 Enable disk cache for range requests
3366 https://bugs.webkit.org/show_bug.cgi?id=144682
3368 Reviewed by Antti Koivisto.
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.
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:
3386 2015-05-20 Anders Carlsson <andersca@apple.com>
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
3392 Reviewed by Tim Horton.
3394 Make sure to set the application cache and WebSQL directories when using the legacy data store.
3396 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3397 (WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
3398 (WebKit::WebProcessPool::platformDefaultApplicationCacheDirectory):
3399 Rename this and move it to the right place.
3401 * UIProcess/WebProcessPool.cpp:
3402 (WebKit::legacyWebsiteDataStoreConfiguration):
3403 Rename this and add the application cache and WebSQL directories.
3405 (WebKit::WebProcessPool::WebProcessPool):
3406 Call legacyWebsiteDataStoreConfiguration.
3408 (WebKit::WebProcessPool::applicationCacheDirectory):
3409 Call legacyPlatformDefaultApplicationCacheDirectory.
3411 * UIProcess/WebProcessPool.h:
3413 2015-05-20 Enrica Casucci <enrica@apple.com>
3415 [iOS] Using CSS viewport units causes incorrect layout.
3416 https://bugs.webkit.org/show_bug.cgi?id=145225
3417 rdar://problem/20924495
3419 Reviewed by Benjamin Poulain.
3421 * WebProcess/WebPage/ios/WebPageIOS.mm:
3422 (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
3424 2015-05-20 Tim Horton <timothy_horton@apple.com>
3426 Allow overriding the waitForDidUpdateViewState timeout
3427 https://bugs.webkit.org/show_bug.cgi?id=145230
3428 <rdar://problem/20990162>
3430 Reviewed by Darin Adler.
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.
3437 2015-05-20 Anders Carlsson <andersca@apple.com>
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
3443 Reviewed by Tim Horton.
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.
3448 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3449 (WebKit::WebsiteDataStore::processPools):
3451 2015-05-19 Jer Noble <jer.noble@apple.com>
3453 Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
3454 https://bugs.webkit.org/show_bug.cgi?id=145193
3456 Reviewed by Eric Carlson.
3458 Use HTMLMediaElementEnums instead of HTMLMediaElement.
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.