Expose and test fixedLayoutSize via modern WebKit SPI
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-04-07  Tim Horton  <timothy_horton@apple.com>
2
3         Expose and test fixedLayoutSize via modern WebKit SPI
4         https://bugs.webkit.org/show_bug.cgi?id=143500
5
6         Reviewed by Simon Fraser.
7
8         * UIProcess/API/Cocoa/WKViewPrivate.h:
9         * UIProcess/API/Cocoa/WKWebView.mm:
10         (-[WKWebView _isFixedLayoutEnabled]):
11         (-[WKWebView _setFixedLayoutEnabled:]):
12         (-[WKWebView _fixedLayoutSize]):
13         (-[WKWebView _setFixedLayoutSize:]):
14         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
15         * UIProcess/API/mac/WKView.mm:
16         (-[WKView _isFixedLayoutEnabled]):
17         (-[WKView _setFixedLayoutEnabled:]):
18         (-[WKView _fixedLayoutSize]):
19         (-[WKView _setFixedLayoutSize:]):
20         Add API for adjusting the fixed layout size, and whether or not we use it.
21
22         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
23         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
24         Repair a mistake I made in r139822, where I brought odd TILED_BACKING_STORE-only
25         logic (which disables scrollbars if fixedLayoutSize is enabled) to the rest of the ports.
26         Put it back as TILED_BACKING_STORE-only.
27
28         Persist the fixedLayoutSize through view creation; we already persist the enabled state,
29         but not the size, which doesn't make any sense.
30
31         * WebProcess/WebPage/WebPage.cpp:
32         (WebKit::WebPage::fixedLayoutSize):
33         * WebProcess/WebPage/WebPage.h:
34         Add a fixedLayoutSize() getter.
35
36 2015-04-07  Brady Eidson  <beidson@apple.com>
37
38         ContextMenuItem refactoring
39         https://bugs.webkit.org/show_bug.cgi?id=143485
40
41         Reviewed by Beth Dakin.
42
43         * Shared/mac/NativeContextMenuItem.mm:
44         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
45
46 2015-04-07  Simon Fraser  <simon.fraser@apple.com>
47
48         Add a new setting, AntialiasedFontDilationEnabled, exposed via WK2.
49         https://bugs.webkit.org/show_bug.cgi?id=143495
50
51         Reviewed by Tim Horton.
52         
53         Exposed the antialiasedFontDilationEnabled setting via WK C SPI and Objective-C SPI.
54
55         * Shared/WebPreferencesDefinitions.h:
56         * UIProcess/API/C/WKPreferences.cpp:
57         (WKPreferencesSetAntialiasedFontDilationEnabled):
58         (WKPreferencesGetAntialiasedFontDilationEnabled):
59         * UIProcess/API/C/WKPreferencesRefPrivate.h:
60         * UIProcess/API/Cocoa/WKPreferences.mm:
61         (-[WKPreferences _antialiasedFontDilationEnabled]):
62         (-[WKPreferences _setAntialiasedFontDilationEnabled:]):
63         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
64         * WebProcess/WebPage/WebPage.cpp:
65         (WebKit::WebPage::updatePreferences):
66
67 2015-04-07  Beth Dakin  <bdakin@apple.com>
68
69         Should only propagate pressure events with relevant phases
70         https://bugs.webkit.org/show_bug.cgi?id=143494
71         -and corresponding-
72         rdar://problem/20453738
73
74         Reviewed by Tim Horton.
75
76         We only care about the changed, began, and ended phases. 
77         * UIProcess/API/mac/WKView.mm:
78         (-[WKView pressureChangeWithEvent:]):
79
80 2015-04-07  Jer Noble  <jer.noble@apple.com>
81
82         Unreviewed build fix; make calls to new SPI conditional on iOS version.
83
84         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
85         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
86
87 2015-04-06  Anders Carlsson  <andersca@apple.com>
88
89         Create the web inspector process pool lazily
90         https://bugs.webkit.org/show_bug.cgi?id=143456
91         rdar://problem/20146520
92
93         Reviewed by Mark Lam.
94
95         Add and implement WebInspectorProxy::isInspectorProcessPool instead of always creating the inspector process pool
96         when trying to determine if a given process pool is the inspector process pool.
97
98         This should speed up initialization somewhat and avoid creating a storage manager for example.
99
100         * UIProcess/WebInspectorProxy.cpp:
101         (WebKit::WebInspectorProxy::inspectorProcessPool):
102         (WebKit::WebInspectorProxy::isInspectorProcessPool):
103         * UIProcess/WebInspectorProxy.h:
104         * UIProcess/WebProcessProxy.cpp:
105         (WebKit::WebProcessProxy::getLaunchOptions):
106
107 2015-04-06  Brady Eidson  <beidson@apple.com>
108
109         Combine ActionMenuHitTestResult with WebHitTestResult
110         https://bugs.webkit.org/show_bug.cgi?id=143444
111
112         Reviewed by Beth Dakin.
113
114         * Shared/mac/ActionMenuHitTestResult.h: Removed.
115         * Shared/mac/ActionMenuHitTestResult.mm: Removed.
116
117         * Shared/WebHitTestResult.cpp:
118         (WebKit::WebHitTestResult::Data::Data):
119         (WebKit::WebHitTestResult::Data::encode):
120         (WebKit::WebHitTestResult::Data::decode):
121         (WebKit::WebHitTestResult::Data::platformEncode):
122         (WebKit::WebHitTestResult::Data::platformDecode):
123         * Shared/WebHitTestResult.h:
124         * Shared/mac/WebHitTestResult.mm: Added.
125         (WebKit::WebHitTestResult::Data::platformEncode):
126         (WebKit::WebHitTestResult::Data::platformDecode):
127
128         * UIProcess/API/mac/WKView.mm:
129         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]):
130         (-[WKView _didPerformActionMenuHitTest:forImmediateAction:userData:]): Deleted.
131         * UIProcess/API/mac/WKViewInternal.h:
132         * UIProcess/PageClient.h:
133         * UIProcess/WebPageProxy.cpp:
134         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
135         * UIProcess/WebPageProxy.h:
136         * UIProcess/WebPageProxy.messages.in:
137         * UIProcess/mac/PageClientImpl.h:
138         * UIProcess/mac/PageClientImpl.mm:
139         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
140         * UIProcess/mac/WKActionMenuController.h:
141         * UIProcess/mac/WKActionMenuController.mm:
142         (-[WKActionMenuController willDestroyView:]):
143         (-[WKActionMenuController _clearActionMenuState]):
144         (-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
145         (-[WKActionMenuController _hitTestResultDataImage]):
146         (-[WKActionMenuController _defaultMenuItemsForImage]):
147         (-[WKActionMenuController _copyImage:]):
148         (-[WKActionMenuController _addImageToPhotos:]):
149         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
150         (-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions]):
151         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
152         (-[WKActionMenuController _webHitTestResult]):
153         (-[WKActionMenuController _defaultMenuItems]):
154         (-[WKActionMenuController _hitTestResultImage]): Deleted.
155         * UIProcess/mac/WKImmediateActionController.h:
156         * UIProcess/mac/WKImmediateActionController.mm:
157         (-[WKImmediateActionController willDestroyView:]):
158         (-[WKImmediateActionController _clearImmediateActionState]):
159         (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]):
160         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
161         (-[WKImmediateActionController _webHitTestResult]):
162         (-[WKImmediateActionController _defaultAnimationController]):
163         (-[WKImmediateActionController _updateImmediateActionItem]):
164         (-[WKImmediateActionController _menuItemForDataDetectedText]):
165         (-[WKImmediateActionController _animationControllerForText]):
166         (-[WKImmediateActionController didPerformActionMenuHitTest:userData:]): Deleted.
167         * WebKit2.xcodeproj/project.pbxproj:
168         * WebProcess/WebPage/mac/WebPageMac.mm:
169         (WebKit::WebPage::performActionMenuHitTestAtLocation):
170
171 2015-04-06  Jer Noble  <jer.noble@apple.com>
172
173         Synchronize fullscreen animation between processes.
174         https://bugs.webkit.org/show_bug.cgi?id=143131
175
176         Reviewed by Simon Fraser.
177
178         Support synchronize resizing by animating within the UIProcess. Since setVideoLayerFrameFenced() is now only
179         ever called from within a 0-duration transaction, make that the official contract of the function and wrap
180         the WebProcess side of that method in its own 0-duration transaction.
181
182         * Platform/spi/ios/BackBoardServicesSPI.h: Added.
183         * Platform/spi/ios/UIKitSPI.h:
184         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
185         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
186         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Remember the initial rect.
187         (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Added; simple getter.
188         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): Use a different synchronization fence primative.
189             Save the cached frame value.
190         (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Added; simple getter.
191         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity): Save the cached gravity value.
192         * WebKit2.xcodeproj/project.pbxproj:
193         * WebProcess/ios/WebVideoFullscreenManager.mm:
194         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): Wrap in a 0-length transaction.
195
196 2015-04-06  Chris Dumez  <cdumez@apple.com>
197
198         [WK2][iOS] Regression(r182323): ASSERTION FAILED: WebCore::SQLiteDatabaseTracker::hasTransactionInProgress() in NetworkCache::Statistics::initialize()
199         https://bugs.webkit.org/show_bug.cgi?id=143451
200         <rdar://problem/20437994>
201
202         Reviewed by Anders Carlsson.
203
204         Initialize WebProcess::m_webSQLiteDatabaseTracker and
205         NetworkProcess::m_webSQLiteDatabaseTracker in their respective class
206         constructors instead of doing it later in the initializeWebProcess() /
207         initializeNetworkProcess() methods.
208
209         If we do it later, it can happen that the tracker gets set after
210         a SQLiteTransactionInProgressAutoCounter initialization and before
211         the actual transaction. When this happens, the
212         SQLiteTransactionInProgressAutoCounter variable fails to increment the
213         transaction count. Then when the transaction is executed,
214         SQLiteDatabaseTracker::hasTransactionInProgress() can return false.
215         This would lead to possible assertions on start up on iOS.
216
217         * NetworkProcess/NetworkProcess.cpp:
218         (WebKit::NetworkProcess::NetworkProcess):
219         (WebKit::NetworkProcess::initializeNetworkProcess):
220         * NetworkProcess/NetworkProcess.h:
221         * WebProcess/WebProcess.cpp:
222         (WebKit::WebProcess::WebProcess):
223         (WebKit::WebProcess::initializeConnection):
224         * WebProcess/WebProcess.h:
225
226 2015-04-06  Beth Dakin  <bdakin@apple.com>
227
228         https://trac.webkit.org/changeset/182338 introduced a build failure that I 
229         attempted to fix with https://trac.webkit.org/changeset/182341 , but that disabled 
230         the feature accidentally.  This should do the right thing.
231
232         * UIProcess/API/mac/WKView.mm:
233         (-[WKView pressureChangeWithEvent:]):
234
235 2015-04-06  Commit Queue  <commit-queue@webkit.org>
236
237         Unreviewed, rolling out r182296.
238         https://bugs.webkit.org/show_bug.cgi?id=143448
239
240         This will disturb network cache efficacy logging, we should
241         reland this later. (Requested by cdumez__ on #webkit).
242
243         Reverted changeset:
244
245         "[WK2][NetworkCache] Drop HTTP method from NetworkCache::Key"
246         https://bugs.webkit.org/show_bug.cgi?id=143348
247         http://trac.webkit.org/changeset/182296
248
249 2015-04-06  Žan Doberšek  <zdobersek@igalia.com>
250
251         [WK2] API::Array::copy() should move the resulting Vector<> of copies into the Array::create() call
252         https://bugs.webkit.org/show_bug.cgi?id=143413
253
254         Reviewed by Darin Adler.
255
256         Move the Vector<> object containing the copied elements into the Array::create()
257         call, avoiding copying all the elements again.
258
259         While here, change the Vector<> parameters for Array::create() and the Array
260         constructor to rvalue references. This will ensure that the passed-in object
261         is moved into the Array::create() call if possible, or explicitly copied
262         otherwise. The constructor is moved into the header for inlining opportunities
263         and the unnecessary parameter in the create(Vector<>&&) method declaration
264         removed.
265
266         * Shared/API/APIArray.cpp:
267         (API::Array::create):
268         (API::Array::copy):
269         (API::Array::Array): Deleted.
270         * Shared/API/APIArray.h:
271
272 2015-04-06  Žan Doberšek  <zdobersek@igalia.com>
273
274         UserScript, UserStyleSheet constructors should take in Vector<String> rvalues
275         https://bugs.webkit.org/show_bug.cgi?id=143411
276
277         Reviewed by Darin Adler.
278
279         Move the whitelist and blacklist Vector<String> objects into the
280         UserScript and UserStyleSheet constructors in ArgumentCoder<T>::decode
281         functions.
282
283         * Shared/WebCoreArgumentCoders.cpp:
284         (IPC::ArgumentCoder<UserStyleSheet>::decode):
285         (IPC::ArgumentCoder<UserScript>::decode):
286
287 2015-04-05  Darin Adler  <darin@apple.com>
288
289         [Mac] Spins seen in WKSetApplicationInformationItem, so it should not be called on the main thread
290         https://bugs.webkit.org/show_bug.cgi?id=143423
291         rdar://problem/18773785
292
293         Reviewed by Alexey Proskuryakov.
294
295         * WebProcess/cocoa/WebProcessCocoa.mm:
296         (WebKit::origin): Factored out this helper function from updateActivePages below, so
297         the function below is easier to read.
298         (WebKit::WebProcess::updateActivePages): Refactored to use the new origin function.
299         Use dispatch_async to call WKSetApplicationInformationItem without blocking.
300
301 2015-04-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
302
303         Use constants of sqlite3 directly for status of SQL result in webdatabase
304         https://bugs.webkit.org/show_bug.cgi?id=143329
305
306         Reviewed by Darin Adler.
307
308         In webdatabase, it has used own constant variables as well as using sqlite3 constants directly.
309         If sqlite3 constants are changed in the library, we should modify many files as well. Besides
310         it can cause to use if~else statement which consumes more cpu cycles compared to switch~case.
311
312         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
313         (WebKit::SQLiteIDBCursor::createSQLiteStatement):
314         (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
315         (WebKit::SQLiteIDBCursor::bindArguments):
316         (WebKit::SQLiteIDBCursor::internalAdvanceOnce):
317         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
318         (WebKit::createOrMigrateRecordsTableIfNecessary):
319         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
320         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
321         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::changeDatabaseVersion):
322         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createObjectStore):
323         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore):
324         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
325         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
326         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
327         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKeyNumber):
328         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGeneratorNumber):
329         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
330         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
331         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord):
332         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord):
333         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
334         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
335         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
336         (WebKit::NetworkCache::executeSQLStatement):
337         (WebKit::NetworkCache::Statistics::initialize):
338         (WebKit::NetworkCache::Statistics::queryWasEverRequested):
339         (WebKit::NetworkCache::Statistics::addHashesToDatabase):
340         (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
341         * UIProcess/Storage/LocalStorageDatabase.cpp:
342         (WebKit::LocalStorageDatabase::importItems):
343         (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
344         (WebKit::LocalStorageDatabase::databaseIsEmpty):
345         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
346         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
347         (WebKit::LocalStorageDatabaseTracker::importOriginIdentifiers):
348         (WebKit::LocalStorageDatabaseTracker::addDatabaseWithOriginIdentifier):
349         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
350         (WebKit::LocalStorageDatabaseTracker::pathForDatabaseWithOriginIdentifier):
351         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp:
352         (webkitSoupCookieJarSqliteLoad):
353         (webkitSoupCookieJarSqliteInsertCookie):
354         (webkitSoupCookieJarSqliteDeleteCookie):
355
356 2015-04-05  Simon Fraser  <simon.fraser@apple.com>
357
358         Remove "go ahead and" from comments
359         https://bugs.webkit.org/show_bug.cgi?id=143421
360
361         Reviewed by Darin Adler, Benjamin Poulain.
362
363         Remove the phrase "go ahead and" from comments where it doesn't add
364         anything (which is almost all of them).
365
366         * Platform/unix/EnvironmentUtilities.cpp:
367         (WebKit::EnvironmentUtilities::stripValuesEndingWithString):
368         * PluginProcess/PluginProcess.cpp:
369         (WebKit::PluginProcess::didClose):
370         * UIProcess/API/mac/WKView.mm:
371         (-[WKView insertText:replacementRange:]):
372         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
373         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
374         (WebKit::LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier):
375
376 2015-04-05  Antti Koivisto  <antti@apple.com>
377
378         Bloom filter should support longer hashes
379         https://bugs.webkit.org/show_bug.cgi?id=143419
380
381         Reviewed by Dan Bernstein.
382
383         Use the hash digest directly in the contents filter instead of going via shortHash.
384
385         * NetworkProcess/cache/NetworkCacheKey.h:
386         (WebKit::NetworkCache::Key::hash):
387         (WebKit::NetworkCache::Key::shortHash): Deleted.
388         (WebKit::NetworkCache::Key::toShortHash): Deleted.
389
390             No longer needed.
391
392         * NetworkProcess/cache/NetworkCacheStorage.cpp:
393         (WebKit::NetworkCache::Storage::synchronize):
394         (WebKit::NetworkCache::Storage::addToContentsFilter):
395         (WebKit::NetworkCache::Storage::mayContain):
396         * NetworkProcess/cache/NetworkCacheStorage.h:
397
398 2015-04-05  Antti Koivisto  <antti@apple.com>
399
400         Network cache Bloom filter is too big
401         https://bugs.webkit.org/show_bug.cgi?id=143400
402
403         Follow-up: Fix an ineffective assert.
404
405         * NetworkProcess/cache/NetworkCacheStorage.cpp:
406         (WebKit::NetworkCache::Storage::setMaximumSize): Average resource size is closer to 50KB than 50MB.
407
408 2015-04-05  Antti Koivisto  <antti@apple.com>
409
410         Rename Cache::setMaximumSize to setCapacity
411         https://bugs.webkit.org/show_bug.cgi?id=143418
412
413         Reviewed by Dan Bernstein.
414
415         * NetworkProcess/cache/NetworkCache.cpp:
416         (WebKit::NetworkCache::Cache::setCapacity):
417         (WebKit::NetworkCache::Cache::setMaximumSize): Deleted.
418         * NetworkProcess/cache/NetworkCache.h:
419         * NetworkProcess/cache/NetworkCacheStorage.cpp:
420         (WebKit::NetworkCache::Storage::retrieve):
421         (WebKit::NetworkCache::Storage::store):
422         (WebKit::NetworkCache::Storage::update):
423         (WebKit::NetworkCache::Storage::setCapacity):
424         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
425         (WebKit::NetworkCache::Storage::shrink):
426         (WebKit::NetworkCache::Storage::setMaximumSize): Deleted.
427         * NetworkProcess/cache/NetworkCacheStorage.h:
428         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
429         (WebKit::NetworkProcess::platformSetCacheModel):
430
431 2015-04-04  Antti Koivisto  <antti@apple.com>
432
433         Network cache Bloom filter is too big
434         https://bugs.webkit.org/show_bug.cgi?id=143400
435
436         Reviewed by Chris Dumez.
437
438         It is currently 1MB.
439
440         This patch switches the cache from a counting filter (CountingBloomFilter) to a bit filter (BloomFilter).
441
442         It also reduces the filter size from 2^20 to 2^18 elements which is good for ~26000 cache entries while
443         still keeping false positive rate below 1%. The current cache capacity allows around 4000 entries
444         with typical web contents.
445
446         The new filter size is 32KB.
447
448         * NetworkProcess/cache/NetworkCacheStorage.cpp:
449         (WebKit::NetworkCache::Storage::Storage):
450         (WebKit::NetworkCache::Storage::synchronize):
451
452             Turn initialization function into general purpose synchronization function.
453
454         (WebKit::NetworkCache::Storage::addToContentsFilter):
455
456             Collect newly added hashes so we don't miss entries that were added during synchronization.
457
458         (WebKit::NetworkCache::Storage::mayContain):
459         (WebKit::NetworkCache::Storage::remove):
460         (WebKit::NetworkCache::Storage::retrieve):
461         (WebKit::NetworkCache::Storage::store):
462         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
463         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
464         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
465         (WebKit::NetworkCache::Storage::setMaximumSize):
466         (WebKit::NetworkCache::Storage::clear):
467         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
468         (WebKit::NetworkCache::Storage::shrink):
469
470             Non-counting Bloom filter does not support removals so this requires a new strategy.
471
472             Shrink code now simply deletes entries. The filter is updated by calling synchronize() at the end.
473             While we could synchronize the filter during traversal it is better to just have one function for that.
474
475         (WebKit::NetworkCache::Storage::initialize): Deleted.
476         * NetworkProcess/cache/NetworkCacheStorage.h:
477         (WebKit::NetworkCache::Storage::mayContain):
478         (WebKit::NetworkCache::Storage::cacheMayContain): Deleted.
479
480 2015-04-04  Andy Estes  <aestes@apple.com>
481
482         [Content Filtering] Blocked page is not always displayed when it should be
483         https://bugs.webkit.org/show_bug.cgi?id=143410
484
485         Reviewed by Andreas Kling.
486
487         * UIProcess/WebFrameProxy.cpp:
488         (WebKit::WebFrameProxy::didStartProvisionalLoad): Stopped clearing m_contentFilterUnblockHandler here.
489         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Started doing it here instead.
490
491 2015-04-04  Chris Dumez  <cdumez@apple.com>
492
493         [WK2][Cocoa] Add a way to temporarily disable the WebKit Network Cache for testing
494         https://bugs.webkit.org/show_bug.cgi?id=143392
495         <rdar://problem/20315669>
496
497         Reviewed by Antti Koivisto.
498
499         Add a way to temporarily disable the WebKit Network Cache for testing.
500         It will be used temporarily for comparing page load times with and
501         without the WebKit network disk cache enabled.
502
503         This is in addition to the existing "WebKitNetworkCacheEnabled"
504         NSUserDefaults:
505         webkitNetworkCacheIsEnabled = [defaults boolForKey:WebKitNetworkCacheEnabledDefaultsKey]
506             && ![defaults boolForKey:WebKitNetworkCacheTemporarilyDisabledForTestingKey];
507
508         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
509         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
510
511 2015-04-04  Simon Fraser  <simon.fraser@apple.com>
512
513         REGRESSION (r182215): Feedly crashes when closing article
514         https://bugs.webkit.org/show_bug.cgi?id=143405
515         rdar://problem/20382734, rdar://problem/20395497
516
517         Reviewed by Tim Horton.
518         
519         Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
520         is bad, because it can cause FrameView::layout() to get called in the middle of
521         RenderObject destruction, which leaves the render tree in a bad state.
522         
523         Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.
524         
525         AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
526         a flag to say that the non-fast region needs to be recomputed, and that schedules
527         a scrolling tree commit. When the commit happens, we recompute the region. If the
528         region didn't change, and no other changes are pending, there's no need to commit.
529
530         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
531         (WebKit::RemoteScrollingCoordinator::buildTransaction):
532         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
533         (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Outdent #ifdefs.
534
535 2015-04-03  Beth Dakin  <bdakin@apple.com>
536
537         Attempted build fix.
538
539         * UIProcess/API/mac/WKView.mm:
540
541 2015-04-03  Simon Fraser  <simon.fraser@apple.com>
542
543         Fix the firing of the ReachedSessionRestorationRenderTreeSizeThreshold milestone on iOS
544         https://bugs.webkit.org/show_bug.cgi?id=143394
545
546         Reviewed by Tim Horton.
547         
548         A client reshuffle at some point broke the dispatch of the ReachedSessionRestorationRenderTreeSizeThreshold
549         milestone. Fix by using WebPageProxy::didLayout() to fire the milestone.
550
551         * UIProcess/ios/WebPageProxyIOS.mm:
552         (WebKit::WebPageProxy::didCommitLayerTree):
553
554 2015-04-03  Beth Dakin  <bdakin@apple.com>
555
556         https://bugs.webkit.org/show_bug.cgi?id=143387
557         Improvements to webkitmouseforce web API
558         -and corresponding-
559         rdar://problem/20281808
560         rdar://problem/20281853
561
562         Reviewed by Darin Adler.
563
564         This patch:
565         1. Dispatches webkitmouseforceup and webkitmouseforceclick at the right time.
566         2. Dispatches webkitmouseforcechanged from mousedown all the way through through 
567         mouseup.
568         3. Uses force values from pressureChangeWithEvent instead of the immediate action 
569         gesture recognizer.
570
571         Listen for this NSResponder method, and pass the relevant info to WebPageProxy to 
572         dispatch to the web process.
573         * UIProcess/API/mac/WKView.mm:
574         (-[WKView pressureChangeWithEvent:]):
575         * UIProcess/WebPageProxy.cpp:
576         (WebKit::WebPageProxy::inputDeviceForceDidChange):
577         (WebKit::WebPageProxy::immediateActionDidUpdate):
578         * UIProcess/WebPageProxy.h:
579
580         The web process still needs to know when the immediate action gesture recognizer 
581         is updating, but it doesn’t need the force information. That will come from 
582         pressureChangeWithEvent.
583         * UIProcess/mac/WKImmediateActionController.mm:
584         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
585
586         Cache m_lastForceStage so that we can determine if we are 
587         transitioning to a new stage.
588         * WebProcess/WebPage/WebPage.cpp:
589         (WebKit::WebPage::WebPage):
590         * WebProcess/WebPage/WebPage.h:
591
592         New message for InputDeviceForceDidChange and modified message for 
593         ImmediateActionDidUpdate
594         * WebProcess/WebPage/WebPage.messages.in:
595
596         inputDeviceForceDidChange now takes care of dispatching mouseforcechanged, 
597         mouseforcedown, mouseforceup, and mouseforceclick.
598         * WebProcess/WebPage/mac/WebPageMac.mm:
599         (WebKit::WebPage::inputDeviceForceDidChange):
600
601         We still need to keep track of the ImmediateActionStages in WebCore::EventHandler 
602         so that we can have the right default behavior on mouseup based on whether or not 
603         that action began and was completed. (In other words, to ensure we don’t navigate 
604         to a link after force clicking it.)
605         (WebKit::WebPage::immediateActionDidUpdate):
606         (WebKit::WebPage::immediateActionDidComplete):
607
608 2015-04-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
609
610         InjectedBundleNodeHandle::renderedImage() needs to be exposed from the Cocoa WebAPI layer.
611         https://bugs.webkit.org/show_bug.cgi?id=143341.
612
613         Reviewed by Anders Carlsson.
614
615         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
616         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
617         (-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Expose rendered
618         image injected bundle API from the Cocoa layer. A node in the page can be
619         rendered to an NSImage on MacOS and to a UIImage on iOS.
620
621 2015-04-03  Chris Dumez  <cdumez@apple.com>
622
623         [WK2][iOS] We should prevent NetworkProcess suspension while it has pending SQL transactions
624         https://bugs.webkit.org/show_bug.cgi?id=143278
625         <rdar://problem/20180799>
626
627         Reviewed by Anders Carlsson.
628
629         Prevent NetworkProcess suspension while it has pending SQL transactions,
630         similarly to what we already did for WebProcesses. This patch moves the
631         WebSQLiteDatabaseTracker from WebProcess/ to Shared/ and make it usable
632         by the NetworkProcess class as well.
633
634         Whenever there are locked files to due SQL transactions, the
635         NetworkProcess will send an IPC message to the NetworkProcessProxy
636         which will hold a background process assertion until the NetworkProcess'
637         SQL transactions are complete. This way, it is no longer possible for
638         the NetworkProcess to get suspended while SQL transactions are running
639         and a database file is locked.
640
641         * NetworkProcess/NetworkProcess.cpp:
642         (WebKit::NetworkProcess::initializeNetworkProcess):
643         * NetworkProcess/NetworkProcess.h:
644         * Shared/WebSQLiteDatabaseTracker.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp.
645         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
646         (WebKit::m_childProcessType):
647         (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
648         (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
649         (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):
650         * Shared/WebSQLiteDatabaseTracker.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h.
651         * UIProcess/Network/NetworkProcessProxy.cpp:
652         (WebKit::NetworkProcessProxy::didClose):
653         (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
654         * UIProcess/Network/NetworkProcessProxy.h:
655         * UIProcess/Network/NetworkProcessProxy.messages.in:
656         * WebKit2.xcodeproj/project.pbxproj:
657         * WebProcess/WebProcess.cpp:
658         (WebKit::WebProcess::WebProcess):
659         (WebKit::WebProcess::initializeConnection):
660         * WebProcess/WebProcess.h:
661
662 2015-04-03  Antti Koivisto  <antti@apple.com>
663
664         Add non-counting Bloom filter implementation
665         https://bugs.webkit.org/show_bug.cgi?id=143366
666
667         Reviewed by Sam Weinig.
668
669         * NetworkProcess/cache/NetworkCacheStorage.h:
670
671 2015-04-03  Zan Dobersek  <zdobersek@igalia.com>
672
673         Fix the EFL and GTK build after r182243
674         https://bugs.webkit.org/show_bug.cgi?id=143361
675
676         Reviewed by Csaba Osztrogonác.
677
678         * PlatformGTK.cmake: Add a custom command that copies the
679         InspectorBackendCommands.js file into the proper directory
680         under DerivedSources/WebInspectorUI/.
681
682 2015-04-03  Philippe Normand  <pnormand@igalia.com>
683
684         Unreviewed, GTK build fix.
685
686         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
687         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
688         * UIProcess/gtk/WebContextMenuProxyGtk.h:
689
690 2015-04-02  Csaba Osztrogonác  <ossy@webkit.org>
691
692         Typo fix.
693
694         * PlatformGTK.cmake:
695
696 2015-04-02  Csaba Osztrogonác  <ossy@webkit.org>
697
698         URTBF after r182303, stub NativeContextMenuItem implemetations added for EFL and GTK.
699
700         * PlatformEfl.cmake:
701         * PlatformGTK.cmake:
702         * Shared/efl/NativeContextMenuItemEfl.cpp: Added.
703         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
704         * Shared/gtk/NativeContextMenuItemGtk.cpp: Added.
705         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
706
707 2015-04-02  Timothy Horton  <timothy_horton@apple.com>
708
709         De-PLATFORM(IOS)-ify LayerHostingContext::setFencePort
710         https://bugs.webkit.org/show_bug.cgi?id=143342
711
712         * Platform/mac/LayerHostingContext.h:
713         * Platform/mac/LayerHostingContext.mm:
714         Actually, not available on Mavericks. Fix the build.
715
716 2015-04-02  Brady Eidson  <beidson@apple.com>
717
718         Unreviewed: Re-applied change after rollout.
719
720         Expose the "Share" menu for text selections on platforms where it's available.
721         rdar://problem/20034174 and https://bugs.webkit.org/show_bug.cgi?id=143318
722
723         * Shared/API/c/WKContextMenuItemTypes.h: Add a constant for the Share menu.
724         * Shared/API/c/WKSharedAPICast.h:
725         (WebKit::toAPI):
726         (WebKit::toImpl):
727
728         * Shared/ContextMenuContextData.cpp:
729         (WebKit::ContextMenuContextData::ContextMenuContextData):
730         (WebKit::ContextMenuContextData::encode):
731         (WebKit::ContextMenuContextData::decode):
732         * Shared/ContextMenuContextData.h:
733         (WebKit::ContextMenuContextData::selectedText):
734
735         Add a "cross platform" menu item wrapper, right now only for NSMenuItem.
736         * Shared/NativeContextMenuItem.h:
737         (WebKit::NativeContextMenuItem::~NativeContextMenuItem):
738         (WebKit::NativeContextMenuItem::nsMenuItem):
739         * Shared/mac/NativeContextMenuItem.mm:
740         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
741
742         Let WebContextMenuItem hold on to a NativeContextMenuItem to maintain full fidelity of the platform.
743         * Shared/WebContextMenuItem.cpp:
744         (WebKit::WebContextMenuItem::WebContextMenuItem):
745         * Shared/WebContextMenuItem.h:
746         (WebKit::WebContextMenuItem::create):
747         (WebKit::WebContextMenuItem::nativeContextMenuItem):
748
749         * UIProcess/API/APIContextMenuClient.h:
750         (API::ContextMenuClient::getContextMenuFromProposedMenu):
751         (API::ContextMenuClient::showContextMenu):
752
753         * UIProcess/API/C/WKPage.cpp:
754         (WKPageSetPageContextMenuClient):
755
756         * UIProcess/WebContextMenuProxy.h:
757
758         * UIProcess/WebPageProxy.cpp:
759         (WebKit::WebPageProxy::internalShowContextMenu): Translate the placeholder item from the web process into the
760           native Share menu before consulting the context menu client. Also create the API items here so the native NSMenuItem
761           can be attached to them.
762
763         * UIProcess/mac/WebContextMenuProxyMac.h:
764         * UIProcess/mac/WebContextMenuProxyMac.mm:
765         (-[WKMenuTarget forwardContextMenuAction:]):
766         (WebKit::nsMenuItem):
767         (WebKit::nsMenuItemVector):
768         (WebKit::WebContextMenuProxyMac::populate):
769         (WebKit::WebContextMenuProxyMac::showContextMenu):
770
771         * WebKit2.xcodeproj/project.pbxproj:
772
773         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
774         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
775         (WebKit::WebContextMenuClient::shareSelectedTextMenuItem): In the web process, mark the Share menu's place in the
776           context menu with a placeholder item. It will be translated into the real Share menu in the UI process.
777
778 2015-04-02  Commit Queue  <commit-queue@webkit.org>
779
780         Unreviewed, rolling out r182293.
781         https://bugs.webkit.org/show_bug.cgi?id=143355
782
783         Broke GTK and EFL builds. (Requested by bfulgham on #webkit).
784
785         Reverted changeset:
786
787         "Expose the "Share" menu for text selections on platforms
788         where it's available."
789         https://bugs.webkit.org/show_bug.cgi?id=143318
790         http://trac.webkit.org/changeset/182293
791
792 2015-04-02  Chris Dumez  <cdumez@apple.com>
793
794         [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
795         https://bugs.webkit.org/show_bug.cgi?id=143348
796
797         Reviewed by Antti Koivisto.
798
799         Drop HTTP method from NetworkCache::Key as we only cache GET responses
800         for now. Even when we start caching HEAD responses, we likely will not
801         want the method to be part of the key because:
802         - A HEAD response can be used to update the headers of a previously cached response to GET
803         - A cached GET response may be used to satisfy subsequent HEAD requests
804
805         * NetworkProcess/cache/NetworkCache.cpp:
806         (WebKit::NetworkCache::makeCacheKey):
807         * NetworkProcess/cache/NetworkCacheKey.cpp:
808         (WebKit::NetworkCache::Key::Key):
809         (WebKit::NetworkCache::Key::operator=):
810         (WebKit::NetworkCache::Key::computeHash):
811         (WebKit::NetworkCache::Key::operator==):
812         (WebKit::NetworkCache::Key::encode):
813         (WebKit::NetworkCache::Key::decode):
814         * NetworkProcess/cache/NetworkCacheKey.h:
815         (WebKit::NetworkCache::Key::method): Deleted.
816
817 2015-04-02  Jer Noble  <jer.noble@apple.com>
818
819         [Mac][WK2] Fullscreen animation incorrect when initiated on non-primary monitor
820         https://bugs.webkit.org/show_bug.cgi?id=143237
821
822         Reviewed by Brent Fulgham.
823
824         The animation calculations have an implicit assumptions of a screen whose origin is 0,0. Account
825         for the screen origin by passing the window's screen's frame into the zoomAnimation() and maskAnimation()
826         methods.
827
828         * UIProcess/mac/WKFullScreenWindowController.mm:
829         (-[WKFullScreenWindowController initWithWindow:webView:]):
830         (zoomAnimation):
831         (maskAnimation):
832         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
833         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
834
835 2015-04-02  Brady Eidson  <beidson@apple.com>
836
837         Expose the "Share" menu for text selections on platforms where it's available.
838         rdar://problem/20034174 and https://bugs.webkit.org/show_bug.cgi?id=143318
839
840         Reviewed by Sam Weinig.
841
842         * Shared/API/c/WKContextMenuItemTypes.h: Add a constant for the Share menu.
843         * Shared/API/c/WKSharedAPICast.h:
844         (WebKit::toAPI):
845         (WebKit::toImpl):
846
847         * Shared/ContextMenuContextData.cpp:
848         (WebKit::ContextMenuContextData::ContextMenuContextData):
849         (WebKit::ContextMenuContextData::encode):
850         (WebKit::ContextMenuContextData::decode):
851         * Shared/ContextMenuContextData.h:
852         (WebKit::ContextMenuContextData::selectedText):
853
854         Add a "cross platform" menu item wrapper, right now only for NSMenuItem.
855         * Shared/NativeContextMenuItem.h:
856         (WebKit::NativeContextMenuItem::~NativeContextMenuItem):
857         (WebKit::NativeContextMenuItem::nsMenuItem):
858         * Shared/mac/NativeContextMenuItem.mm:
859         (WebKit::NativeContextMenuItem::NativeContextMenuItem):
860
861         Let WebContextMenuItem hold on to a NativeContextMenuItem to maintain full fidelity of the platform.
862         * Shared/WebContextMenuItem.cpp:
863         (WebKit::WebContextMenuItem::WebContextMenuItem):
864         * Shared/WebContextMenuItem.h:
865         (WebKit::WebContextMenuItem::create):
866         (WebKit::WebContextMenuItem::nativeContextMenuItem):
867
868         * UIProcess/API/APIContextMenuClient.h:
869         (API::ContextMenuClient::getContextMenuFromProposedMenu):
870         (API::ContextMenuClient::showContextMenu):
871
872         * UIProcess/API/C/WKPage.cpp:
873         (WKPageSetPageContextMenuClient):
874
875         * UIProcess/WebContextMenuProxy.h:
876
877         * UIProcess/WebPageProxy.cpp:
878         (WebKit::WebPageProxy::internalShowContextMenu): Translate the placeholder item from the web process into the
879           native Share menu before consulting the context menu client. Also create the API items here so the native NSMenuItem
880           can be attached to them.
881
882         * UIProcess/mac/WebContextMenuProxyMac.h:
883         * UIProcess/mac/WebContextMenuProxyMac.mm:
884         (-[WKMenuTarget forwardContextMenuAction:]):
885         (WebKit::nsMenuItem):
886         (WebKit::nsMenuItemVector):
887         (WebKit::WebContextMenuProxyMac::populate):
888         (WebKit::WebContextMenuProxyMac::showContextMenu):
889
890         * WebKit2.xcodeproj/project.pbxproj:
891
892         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
893         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
894         (WebKit::WebContextMenuClient::shareSelectedTextMenuItem): In the web process, mark the Share menu's place in the
895           context menu with a placeholder item. It will be translated into the real Share menu in the UI process.
896
897 2015-04-02  Timothy Horton  <timothy_horton@apple.com>
898
899         De-PLATFORM(IOS)-ify LayerHostingContext::setFencePort
900         https://bugs.webkit.org/show_bug.cgi?id=143342
901
902         Reviewed by Myles C. Maxfield.
903
904         * Platform/mac/LayerHostingContext.h:
905         * Platform/mac/LayerHostingContext.mm:
906         (WebKit::LayerHostingContext::setFencePort):
907         There's nothing iOS specific about this.
908
909 2015-04-02  Oliver Hunt  <oliver@apple.com>
910
911         Ensure that we always set network ATS context in the network process
912         https://bugs.webkit.org/show_bug.cgi?id=143343
913
914         Reviewed by Dan Bernstein.
915
916         If a custom cache location or size we were early returning before setting
917         the CFNetwork ATS context. This is clearly an error.
918
919         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
920         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
921
922 2015-04-02  Alexey Proskuryakov  <ap@apple.com>
923
924         Make checkURLReceivedFromWebProcess not rely on details of platform URL implementation.
925         https://bugs.webkit.org/show_bug.cgi?id=143222
926         rdar://problem/19978997
927
928         Reviewed by Sam Weinig.
929
930         * UIProcess/WebProcessProxy.cpp:
931         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
932
933 2015-04-02  Yusuke Suzuki  <utatane.tea@gmail.com>
934
935         Clean up EnumerationMode to easily extend
936         https://bugs.webkit.org/show_bug.cgi?id=143276
937
938         Reviewed by Geoffrey Garen.
939
940         Use default EnumerationMode().
941
942         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
943         (WebKit::NPJSObject::enumerate):
944
945 2015-04-02  Chris Dumez  <cdumez@apple.com>
946
947         [WK2][iOS] Update the WebContent process' sandbox profile for AWD
948         https://bugs.webkit.org/show_bug.cgi?id=143340
949         <rdar://problem/20375170>
950
951         Reviewed by Alexey Proskuryakov.
952
953         Update the WebContent process' sandbox profile for AWD.
954
955         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
956
957 2015-04-01  Antti Koivisto  <antti@apple.com>
958
959         Use std::chrono types to represent time in response and cache classes
960         https://bugs.webkit.org/show_bug.cgi?id=143316
961
962         Reviewed by Andreas Kling.
963
964         * NetworkProcess/NetworkResourceLoader.cpp:
965         (WebKit::NetworkResourceLoader::didFinishLoading):
966         * NetworkProcess/cache/NetworkCache.cpp:
967         (WebKit::NetworkCache::responseHasExpired):
968         (WebKit::NetworkCache::responseNeedsRevalidation):
969         (WebKit::NetworkCache::makeStoreDecision):
970         (WebKit::NetworkCache::Cache::store):
971         * NetworkProcess/cache/NetworkCacheEntry.cpp:
972         (WebKit::NetworkCache::Entry::Entry):
973         (WebKit::NetworkCache::Entry::asJSON):
974         * NetworkProcess/cache/NetworkCacheEntry.h:
975         (WebKit::NetworkCache::Entry::timeStamp):
976         * NetworkProcess/cache/NetworkCacheStorage.cpp:
977         (WebKit::NetworkCache::decodeRecordMetaData):
978         (WebKit::NetworkCache::decodeRecord):
979
980             Sanity check the timestamp on decode.
981
982         (WebKit::NetworkCache::encodeRecordMetaData):
983         (WebKit::NetworkCache::encodeRecordHeader):
984         (WebKit::NetworkCache::Storage::traverse):
985         * NetworkProcess/cache/NetworkCacheStorage.h:
986         * WebProcess/Plugins/PluginView.cpp:
987         (WebKit::lastModifiedDateMS):
988         (WebKit::PluginView::Stream::didReceiveResponse):
989         (WebKit::PluginView::manualLoadDidReceiveResponse):
990         (WebKit::lastModifiedDate): Deleted.
991
992 2015-04-01  Chris Dumez  <cdumez@apple.com>
993
994         [WK2][Cocoa] Add didFailProvisionalLoadWithErrorForFrame callback to WKWebProcessPlugInLoadDelegate
995         https://bugs.webkit.org/show_bug.cgi?id=143319
996         <rdar://problem/19463834>
997
998         Reviewed by Dan Bernstein.
999
1000         Add didFailProvisionalLoadWithErrorForFrame callback to
1001         WKWebProcessPlugInLoadDelegate so that the client side can track all
1002         types page load completions:
1003         - didFailProvisionalLoadWithErrorForFrame
1004         - didFailLoadWithErrorForFrame
1005         - didFinishLoadForFrame
1006
1007         Note that this event is already exposed on UIProcess side via the
1008         WKPageLoaderClient.didFailLoadWithErrorForFrame callback.
1009
1010         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
1011         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1012         (didFailProvisionalLoadWithErrorForFrame):
1013         (setUpPageLoaderClient):
1014
1015 2015-04-01  Enrica Casucci  <enrica@apple.com>
1016
1017         Injected bundle messages should be at the page level.
1018         https://bugs.webkit.org/show_bug.cgi?id=143283
1019
1020         Reviewed by Alexey Proskuryakov.
1021
1022         All the messages between the injected bundle and the UI
1023         process should be page level messages instead of context.
1024         The author of this patch is Tim Horton, I just finished it.
1025
1026         * UIProcess/API/C/WKPage.cpp:
1027         (WKPageSetPageInjectedBundleClient):
1028         * UIProcess/API/C/WKPage.h:
1029         * UIProcess/API/C/WKPageInjectedBundleClient.h: Added.
1030         * UIProcess/API/Cocoa/WKWebView.mm:
1031         (-[WKWebView _pageForTesting]):
1032         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1033         * UIProcess/WebPageInjectedBundleClient.cpp: Added.
1034         (WebKit::WebPageInjectedBundleClient::didReceiveMessageFromInjectedBundle):
1035         (WebKit::WebPageInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle):
1036         * UIProcess/WebPageInjectedBundleClient.h: Added.
1037         * UIProcess/WebPageProxy.cpp:
1038         (WebKit::WebPageProxy::setInjectedBundleClient):
1039         (WebKit::WebPageProxy::handleMessage):
1040         (WebKit::WebPageProxy::handleSynchronousMessage):
1041         * UIProcess/WebPageProxy.h:
1042         (WebKit::WebPageProxy::injectedBundleClient):
1043         * UIProcess/WebPageProxy.messages.in:
1044         * UIProcess/WebProcessPool.cpp:
1045         (WebKit::WebProcessPool::handleMessage):
1046         * WebKit2.xcodeproj/project.pbxproj:
1047         * CMakeLists.txt:
1048         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1049         (WKBundlePagePostMessage):
1050         (WKBundlePagePostSynchronousMessage):
1051         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1052         * WebProcess/WebPage/WebPage.cpp:
1053         (WebKit::WebPage::postMessage):
1054         (WebKit::WebPage::postSynchronousMessage):
1055         * WebProcess/WebPage/WebPage.h:
1056
1057 2015-04-01  Alexey Proskuryakov  <ap@apple.com>
1058
1059         [iOS] WebContent should have access to the entirety of its caches directory
1060         https://bugs.webkit.org/show_bug.cgi?id=143312
1061         rdar://problem/20314916
1062
1063         Reviewed by Oliver Hunt.
1064
1065         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1066         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1067         * Shared/Network/NetworkProcessCreationParameters.cpp:
1068         (WebKit::NetworkProcessCreationParameters::encode):
1069         (WebKit::NetworkProcessCreationParameters::decode):
1070         * Shared/Network/NetworkProcessCreationParameters.h:
1071         * Shared/WebProcessCreationParameters.cpp:
1072         (WebKit::WebProcessCreationParameters::encode):
1073         (WebKit::WebProcessCreationParameters::decode):
1074         * Shared/WebProcessCreationParameters.h:
1075         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1076         (WebKit::WebProcessPool::networkingCachesDirectory):
1077         (WebKit::WebProcessPool::webContentCachesDirectory):
1078         (WebKit::WebProcessPool::openGLCacheDirectory): Deleted.
1079         (WebKit::WebProcessPool::networkingHSTSDatabasePath): Deleted.
1080         (WebKit::WebProcessPool::webContentHSTSDatabasePath): Deleted.
1081         * UIProcess/WebProcessPool.cpp:
1082         (WebKit::WebProcessPool::ensureNetworkProcess):
1083         (WebKit::WebProcessPool::createNewWebProcess):
1084         * UIProcess/WebProcessPool.h:
1085         * WebProcess/cocoa/WebProcessCocoa.mm:
1086         (WebKit::WebProcess::platformInitializeWebProcess):
1087
1088 2015-04-01  Timothy Horton  <timothy_horton@apple.com>
1089
1090         Smart magnification gesture sometimes shoots to the middle of the page
1091         https://bugs.webkit.org/show_bug.cgi?id=143296
1092         <rdar://problem/18209280>
1093
1094         Reviewed by Dean Jackson.
1095
1096         * UIProcess/mac/ViewGestureControllerMac.mm:
1097         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
1098         Constrain the target rect to the viewport, and if it had overflowed the viewport,
1099         scroll halfway towards the gesture origin.
1100
1101 2015-03-31  Simon Fraser  <simon.fraser@apple.com>
1102
1103         Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
1104         https://bugs.webkit.org/show_bug.cgi?id=143288
1105         rdar://problem/16049624
1106
1107         Reviewed by Beth Dakin.
1108
1109         Remove the wheel event counting that Document does, and passes into the scrolling tree.
1110         The ScrollingTree now just uses the non-fast scrollable region to determine when to
1111         fast scroll on pages with wheel event handlers.
1112         
1113         If a handler includes position:fixed renderers, we just cover the whole document
1114         with the slow-scrolling region currently. This could be improved.
1115
1116         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1117         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1118         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
1119         (WebKit::RemoteScrollingTreeTextStream::dump):
1120         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1121         (WebKit::WebChromeClient::wheelEventHandlersChanged):
1122         (WebKit::WebChromeClient::numWheelEventHandlersChanged): Deleted.
1123         * WebProcess/WebCoreSupport/WebChromeClient.h:
1124         * WebProcess/WebPage/WebPage.cpp:
1125         (WebKit::WebPage::WebPage):
1126         (WebKit::WebPage::wheelEventHandlersChanged):
1127         (WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
1128         (WebKit::WebPage::numWheelEventHandlersChanged): Deleted.
1129         * WebProcess/WebPage/WebPage.h:
1130
1131 2015-03-31  Dan Bernstein  <mitz@apple.com>
1132
1133         <rdar://problem/20365675> [iOS] Include Add to Reading List link action only where supported
1134         https://bugs.webkit.org/show_bug.cgi?id=143289
1135
1136         Reviewed by Tim Horton.
1137
1138         * UIProcess/API/Cocoa/_WKElementAction.h: Excluded _WKElementActionTypeAddToReadingList from
1139         the _WKElementActionType enum when Reading List is not supported.
1140
1141         * UIProcess/API/Cocoa/_WKElementAction.mm:
1142         (+[_WKElementAction elementActionWithType:customTitle:]): Made Add to Reading List code
1143         conditional on HAVE(SAFARI_SERVICES_FRAMEWORK).
1144
1145         * UIProcess/ios/WKActionSheetAssistant.mm:
1146         (-[WKActionSheetAssistant showImageSheet]): Ditto.
1147         (-[WKActionSheetAssistant showLinkSheet]): Ditto.
1148
1149         * config.h: Defined HAVE_SAFARI_SERVICES_FRAMEWORK.
1150
1151 2015-03-31  Timothy Horton  <timothy_horton@apple.com>
1152
1153         TextIndicator for <span> inside an <a> only highlights the <span>, should highlight the whole <a>
1154         https://bugs.webkit.org/show_bug.cgi?id=143287
1155         <rdar://problem/20318342>
1156
1157         Reviewed by Beth Dakin.
1158
1159         * WebProcess/WebPage/mac/WebPageMac.mm:
1160         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1161         Instead of just highlighting the hit element, highlight the whole
1162         element that the link URL comes from.
1163
1164 2015-03-31  Timothy Horton  <timothy_horton@apple.com>
1165
1166         WKView should stop using endGestureWithEvent
1167         https://bugs.webkit.org/show_bug.cgi?id=143285
1168         <rdar://problem/20357007>
1169
1170         Reviewed by Simon Fraser.
1171
1172         * UIProcess/API/mac/WKView.mm:
1173         (-[WKView magnifyWithEvent:]):
1174         (-[WKView endGestureWithEvent:]): Deleted.
1175         * UIProcess/mac/ViewGestureController.h:
1176         * UIProcess/mac/ViewGestureControllerMac.mm:
1177         (WebKit::ViewGestureController::endMagnificationGesture):
1178         (WebKit::ViewGestureController::endActiveGesture): Deleted.
1179         While there is no visible symptom, it is recommended that we check
1180         the phase of normal magnification events instead of using the
1181         special gesture end events.
1182
1183 2015-03-31  Timothy Horton  <timothy_horton@apple.com>
1184
1185         Swipes occur in the wrong direction in RTL
1186         https://bugs.webkit.org/show_bug.cgi?id=143257
1187         <rdar://problem/20300862>
1188
1189         Reviewed by Simon Fraser.
1190
1191         * UIProcess/ios/ViewGestureControllerIOS.mm:
1192         (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
1193         When choosing which edge to attach our gesture recognizers to,
1194         flip them in RTL.
1195
1196         (-[WKSwipeTransitionController directionForTransition:]):
1197         (WebKit::ViewGestureController::beginSwipeGesture):
1198         (WebKit::ViewGestureController::canSwipeInDirection):
1199         * UIProcess/mac/ViewGestureController.h:
1200         * UIProcess/mac/ViewGestureControllerMac.mm:
1201         (WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
1202         (WebKit::ViewGestureController::trackSwipeGesture):
1203         (WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
1204         (WebKit::ViewGestureController::beginSwipeGesture):
1205         (WebKit::ViewGestureController::handleSwipeGesture):
1206         Adjust SwipeDirection to be in logical back-forward list direction
1207         instead of physical edge direction.
1208
1209 2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
1210
1211         Move ExpansionBehaviorFlags and TextDirection to their own file
1212         https://bugs.webkit.org/show_bug.cgi?id=143273
1213
1214         Reviewed by Simon Fraser.
1215
1216         This is a mechanical change. It just moves code around.
1217
1218         This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
1219
1220         * Shared/WebPopupItem.h:
1221         * UIProcess/API/C/efl/WKAPICastEfl.h:
1222         * UIProcess/API/efl/EwkView.h:
1223         * UIProcess/WebPopupMenuProxy.h:
1224         * UIProcess/efl/WebUIPopupMenuClient.h:
1225
1226 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
1227
1228         Clean up Identifier factories to clarify the meaning of StringImpl*
1229         https://bugs.webkit.org/show_bug.cgi?id=143146
1230
1231         Reviewed by Filip Pizlo.
1232
1233         Just change to Identifier::fromString.
1234
1235         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1236         (WebKit::JSNPObject::getOwnPropertyNames):
1237         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1238         (WebKit::identifierFromIdentifierRep):
1239
1240 2015-03-31  Timothy Horton  <timothy_horton@apple.com>
1241
1242         WebKit briefly shows wrong webpage after swiping back (gigaom.com, or any site on a slow network)
1243         https://bugs.webkit.org/show_bug.cgi?id=143256
1244         <rdar://problem/19458648>
1245
1246         Reviewed by Dan Bernstein.
1247
1248         Instead of allowing a flash of the previous page when the swipe snapshot
1249         timeouts fire (removing the snapshot before the new page is loaded), show
1250         the snapshotted background color.
1251
1252         This fixes the problem on iOS, where UI-side compositing makes it easy to fix,
1253         but not yet on OS X.
1254
1255         * UIProcess/API/Cocoa/WKWebView.mm:
1256         (baseScrollViewBackgroundColor):
1257         (scrollViewBackgroundColor):
1258         If the ViewGestureController returns a valid background color, use that
1259         instead of the page's background color.
1260
1261         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1262         Expose _updateScrollViewBackground.
1263
1264         * UIProcess/PageClient.h:
1265         * UIProcess/ios/PageClientImplIOS.h:
1266         * UIProcess/ios/PageClientImplIOS.mm:
1267         (WebKit::PageClientImpl::didChangeBackgroundColor):
1268         * UIProcess/mac/PageClientImpl.h:
1269         * UIProcess/mac/PageClientImpl.mm:
1270         (WebKit::PageClientImpl::didChangeBackgroundColor):
1271         * UIProcess/WebPageProxy.cpp:
1272         (WebKit::WebPageProxy::didChangeBackgroundColor):
1273         * UIProcess/WebPageProxy.h:
1274         Add and plumb didChangeBackgroundColor, which calls
1275         _updateScrollViewBackground on iOS.
1276         
1277         * UIProcess/ios/ViewGestureControllerIOS.mm:
1278         (WebKit::ViewGestureController::endSwipeGesture):
1279         Hide the content of the drawing area until the next commit. This way,
1280         even if the snapshot is removed (say, because a timeout fired), we won't
1281         ever show the old page content (but we will show background color).
1282
1283         Store the background color associated with the current snapshot.
1284
1285         Let WKWebView know that it needs to recompute the background color.
1286
1287         (WebKit::ViewGestureController::removeSwipeSnapshot):
1288         Clear the background color so that the next time we commit, WKWebView
1289         will get an invalid color from ViewGestureController and fall back
1290         to the page's extended background color instead.
1291
1292         * UIProcess/mac/ViewGestureController.h:
1293         (WebKit::ViewGestureController::backgroundColorForCurrentSnapshot):
1294         * UIProcess/mac/ViewGestureControllerMac.mm:
1295         (WebKit::ViewGestureController::beginSwipeGesture):
1296         (WebKit::ViewGestureController::removeSwipeSnapshot):
1297         Keep backgroundColorForCurrentSnapshot up to date on Mac too, even
1298         though we don't use it yet.
1299
1300 2015-03-31  Timothy Horton  <timothy_horton@apple.com>
1301
1302         [iOS] Rotating PDF in Safari scrolls to the wrong position
1303         https://bugs.webkit.org/show_bug.cgi?id=143259
1304         <rdar://problem/19872693>
1305
1306         Reviewed by Dan Bernstein.
1307
1308         * UIProcess/ios/WKPDFView.mm:
1309         (-[WKPDFView web_setMinimumSize:]):
1310         Maintan the relative top/left within the rescaled document.
1311
1312 2015-03-31  Chris Dumez  <cdumez@apple.com>
1313
1314         [WK2][iOS] Extend ProcessThrottler use to the NetworkProcess
1315         https://bugs.webkit.org/show_bug.cgi?id=143249
1316         <rdar://problem/20231539>
1317
1318         Reviewed by Gavin Barraclough.
1319
1320         Extend ProcessThrottler use to the NetworkProcess instead of only the
1321         WebProcesses. This is needed so that the NetworkProcess gets notified
1322         before suspension. We now use this notification to free-up memory
1323         before suspending by calling the critical memory pressure handler, as
1324         we already do for WebProcesses (rdar://problem/20231539). In the
1325         future, this infrastructure will be used to delay suspension until the
1326         pending SQL transactions are done as well (rdar://problem/20180799).
1327
1328         Previously, the NetworkProcessProxy would hold a foreground assertion
1329         on behalf of the NetworkProcess but would never release that assertion.
1330         In this patch, we change this so that WebProcessProxies hold assertions
1331         on behalf of the NetworkProcess, and release those assertions before
1332         suspending. As a result, the NetworkProcess gets suspended when all
1333         WebProcesses are suspended.
1334
1335         * NetworkProcess/NetworkProcess.cpp:
1336         (WebKit::NetworkProcess::processWillSuspend):
1337         (WebKit::NetworkProcess::cancelProcessWillSuspend):
1338         (WebKit::NetworkProcess::processDidResume):
1339         * NetworkProcess/NetworkProcess.h:
1340         * NetworkProcess/NetworkProcess.messages.in:
1341         * UIProcess/Network/NetworkProcessProxy.cpp:
1342         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
1343         (WebKit::NetworkProcessProxy::didFinishLaunching):
1344         (WebKit::NetworkProcessProxy::sendProcessWillSuspend):
1345         (WebKit::NetworkProcessProxy::sendCancelProcessWillSuspend):
1346         (WebKit::NetworkProcessProxy::didCancelProcessSuspension):
1347         (WebKit::NetworkProcessProxy::sendProcessDidResume):
1348         (WebKit::NetworkProcessProxy::processReadyToSuspend):
1349         * UIProcess/Network/NetworkProcessProxy.h:
1350         (WebKit::NetworkProcessProxy::throttler):
1351         * UIProcess/Network/NetworkProcessProxy.messages.in:
1352         * UIProcess/ProcessThrottler.cpp:
1353         (WebKit::ProcessThrottler::ProcessThrottler):
1354         (WebKit::ProcessThrottler::didConnectToProcess):
1355         (WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
1356         * UIProcess/ProcessThrottler.h:
1357         * UIProcess/ProcessThrottlerClient.h: Added.
1358         (WebKit::ProcessThrottlerClient::~ProcessThrottlerClient):
1359         * UIProcess/WebProcessPool.cpp:
1360         (WebKit::WebProcessPool::ensureNetworkProcess):
1361         * UIProcess/WebProcessPool.h:
1362         * UIProcess/WebProcessProxy.cpp:
1363         (WebKit::WebProcessProxy::didFinishLaunching):
1364         (WebKit::WebProcessProxy::initializeNetworkProcessActivityToken):
1365         (WebKit::WebProcessProxy::sendProcessDidResume):
1366         (WebKit::WebProcessProxy::processReadyToSuspend):
1367         * UIProcess/WebProcessProxy.h:
1368         * WebKit2.xcodeproj/project.pbxproj:
1369
1370 2015-03-31  Csaba Osztrogonác  <ossy@webkit.org>
1371
1372         Unreviewed, revert accidental change by r182138.
1373
1374         * Scripts/generate-forwarding-headers.pl:
1375         (createForwardingHeadersForFramework):
1376
1377 2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1378
1379         Unreviewed. Fix GTK+ build with REDIRECTED_XCOMPOSITE_WINDOW disabled in X11 platform.
1380
1381         Also fix some unused parameter warnings when
1382         REDIRECTED_XCOMPOSITE_WINDOW is disabled.
1383
1384         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1385         (webkitWebViewRenderAcceleratedCompositingResults):
1386         (resizeWebKitWebViewBaseFromAllocation):
1387
1388 2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1389
1390         [GTK] DnD icon/widget has odd background
1391         https://bugs.webkit.org/show_bug.cgi?id=143217
1392
1393         Reviewed by Martin Robinson.
1394
1395         Use gtk_drag_set_icon_surface() to set the drag icon image,
1396         instead of DragIcon class.
1397
1398         * UIProcess/API/gtk/WebKitWebView.cpp:
1399         * UIProcess/gtk/DragAndDropHandler.cpp:
1400         (WebKit::DragAndDropHandler::startDrag):
1401         * UIProcess/gtk/DragAndDropHandler.h:
1402
1403 2015-03-30  Commit Queue  <commit-queue@webkit.org>
1404
1405         Unreviewed, rolling out r182172.
1406         https://bugs.webkit.org/show_bug.cgi?id=143250
1407
1408         Since this class is an API object, we don't know for sure when
1409         it will be destroyed. (Requested by kling on #webkit).
1410
1411         Reverted changeset:
1412
1413         "WebBackForwardList doesn't need to manually clear the
1414         snapshot of an entry when removing it."
1415         https://bugs.webkit.org/show_bug.cgi?id=143231
1416         http://trac.webkit.org/changeset/182172
1417
1418 2015-03-30  Andreas Kling  <akling@apple.com>
1419
1420         WebBackForwardList doesn't need to manually clear the snapshot of an entry when removing it.
1421         <https://webkit.org/b/143231>
1422
1423         Reviewed by Tim Horton.
1424
1425         Now that we don't keep WebBackForwardListItem objects alive forever, it's not necessary
1426         to clear the snapshot when removing them from the WebBackForwardList, since the entire
1427         object will be deleted shortly after that anyway.
1428
1429         * UIProcess/WebBackForwardList.cpp:
1430         (WebKit::WebBackForwardList::didRemoveItem):
1431
1432 2015-03-30  Enrica Casucci  <enrica@apple.com>
1433
1434         [iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects.
1435         https://bugs.webkit.org/show_bug.cgi?id=143234
1436         <rdar://problem/18571345>
1437
1438         Reviewed by Tim Horton.
1439
1440         This is a speculative fix that adds a null check before referencing the range.
1441         In both places where the check has been added the range returned by the call
1442         that should create it could be null.
1443
1444         * WebProcess/WebPage/ios/WebPageIOS.mm:
1445         (WebKit::WebPage::platformEditorState):
1446
1447 2015-03-30  Sam Weinig  <sam@webkit.org>
1448
1449         [Content Extensions] Flesh out the UserContentExtensionStore
1450         https://bugs.webkit.org/show_bug.cgi?id=143123
1451
1452         Reviewed by Benjamin Poulain.
1453
1454         * Shared/WebCompiledContentExtension.cpp:
1455         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
1456         * Shared/WebCompiledContentExtensionData.cpp:
1457         (WebKit::WebCompiledContentExtensionData::encode):
1458         (WebKit::WebCompiledContentExtensionData::decode):
1459         * Shared/WebCompiledContentExtensionData.h:
1460         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
1461         Switch the order in memory of actions and bytecode (and switch the order of the
1462         variables as well, to keep it clear). This will become necessary when streaming
1463         the data to disk, as actions are created before the bytecode and we would have to keep them
1464         in memory until the bytecode was finished compiling if they didn't come before in the file.
1465
1466         * UIProcess/API/APIUserContentExtensionStore.h:
1467         * UIProcess/API/APIUserContentExtensionStore.cpp:
1468         (API::UserContentExtensionStore::defaultStore):
1469         Add accessor for the processes default shared store.
1470
1471         (API::constructedPath):
1472         Helper for constructing the path to a file in the store based on identifier.
1473
1474         (API::encodeContentExtensionMetaData):
1475         (API::decodeContentExtensionMetaData):
1476         Helpers for encoding/decoding the file metadata (version, bytecode size, actions size).
1477
1478         (API::openAndMapContentExtension):
1479         Helper to open and map a filed back content extension.
1480
1481         (API::writeDataToFile):
1482         Helper to write a Data object to a file.
1483
1484         (API::compiledToFile):
1485         Helper to run the content extension compiler and write it to disk. It first
1486         writes it to a temporary file and then does an atomic rename operation to put
1487         the file in the final location. Doing this means that if the process crashes while
1488         the compile is taking place, the partially written file won't end up in the cache, 
1489         but rather, will be cleaned up by the OS.
1490  
1491         (API::UserContentExtensionStore::lookupContentExtension):
1492         API entry point to lookup an extension that has been compiled to disk. On a background queue,
1493         it attempts to open and map the extension (based on the identifier passed in) and return it
1494         to the caller via the callback function passed in.
1495         
1496         (API::UserContentExtensionStore::compileContentExtension):
1497         API entry point to compile an extension and write it to store. On a background queue, it 
1498         compiles the file to disk and if successful, returns the memory mapped data via the callback
1499         function passed in.
1500
1501         (API::UserContentExtensionStore::removeContentExtension):
1502         API entry point to remove an extension from the store. On a background queue, it 
1503         unlinks the extension (based on the identifier passed in) and tells the caller it completed
1504         the action vial the callback function passed in.
1505
1506         (API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
1507         Helper for testing which synchronously unlinks all the files in the store.
1508
1509         (API::userContentExtensionStoreErrorCategory):
1510         std::error_code adaptor for some generic errors that can happen in the store. We will want
1511         to flesh these out further.
1512
1513         * UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm: Added.
1514         (API::UserContentExtensionStore::defaultStorePath):
1515         Helper to get the platform specific path for the store.
1516
1517         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
1518         (WKUserContentExtensionStoreGetTypeID):
1519         Add ENABLE(CONTENT_EXTENSIONS) guards.
1520
1521         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
1522         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
1523         (-[_WKUserContentExtensionStore dealloc]):
1524         (+[_WKUserContentExtensionStore defaultStore]):
1525         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
1526         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
1527         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
1528         (-[_WKUserContentExtensionStore _removeAllContentExtensions]):
1529         (-[_WKUserContentExtensionStore init]): Deleted.
1530         * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:
1531         * UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h: Added.
1532         SPI wrappers for the store.
1533
1534         * WebKit2.xcodeproj/project.pbxproj:
1535         Add new files.
1536
1537 2015-03-30  Antti Koivisto  <antti@apple.com>
1538
1539         Don't cache resources that are very unlikely to be reused
1540         https://bugs.webkit.org/show_bug.cgi?id=143226
1541
1542         Reviewed by Chris Dumez.
1543
1544         Follow-up to cover Cache-control: no-cache case which also has zero cache lifetime.
1545
1546         * NetworkProcess/cache/NetworkCache.cpp:
1547         (WebKit::NetworkCache::makeStoreDecision):
1548
1549 2015-03-30  Antti Koivisto  <antti@apple.com>
1550
1551         Include cache entry worth to json dump
1552         https://bugs.webkit.org/show_bug.cgi?id=143202
1553
1554         Follow-up fix.
1555
1556         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1557         (WebKit::NetworkCache::computeRecordWorth):
1558
1559             This accidentally gave the error case worth 1 rather than 0 as it should be.
1560
1561 2015-03-30  Antti Koivisto  <antti@apple.com>
1562
1563         Don't cache resources that are very unlikely to be reused
1564         https://bugs.webkit.org/show_bug.cgi?id=143226
1565         <rdar://problem/20347160>
1566
1567         Reviewed by Geoff Garen.
1568
1569         We are writing lots of resources to the cache that are never used again.
1570
1571         In browse-around-randomly test this reduced number of cache entries created by ~20% and bytes written by ~5%.
1572
1573         * NetworkProcess/cache/NetworkCache.cpp:
1574         (WebKit::NetworkCache::makeUseDecision):
1575         (WebKit::NetworkCache::makeRetrieveDecision):
1576
1577             Rename for clarity.
1578
1579         (WebKit::NetworkCache::makeStoreDecision):
1580
1581             Store only if the resource has non-zero expiration or has validation headers.
1582
1583             Very High priority resources (main resources) keep the existing policy to minimize impact
1584             on back navigation and tab restore.
1585
1586         (WebKit::NetworkCache::Cache::retrieve):
1587         (WebKit::NetworkCache::Cache::store):
1588         (WebKit::NetworkCache::canUse): Deleted.
1589         (WebKit::NetworkCache::canRetrieve): Deleted.
1590         (WebKit::NetworkCache::canStore): Deleted.
1591         * NetworkProcess/cache/NetworkCache.h:
1592         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1593         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
1594
1595 2015-03-30  Tim Horton  <timothy_horton@apple.com>
1596
1597         Swipe snapshot removed too early (jumps around) on arstechnica and NYT
1598         https://bugs.webkit.org/show_bug.cgi?id=143199
1599         <rdar://problem/18420467>
1600
1601         Reviewed by Dan Bernstein.
1602
1603         Make ViewGestureControllerIOS's snapshot removal timing behave more like the Mac version.
1604
1605         * UIProcess/API/Cocoa/WKWebView.mm:
1606         (-[WKWebView _didCommitLayerTree:]):
1607         Let ViewGestureController know when the page has finished state restoration.
1608
1609         (-[WKWebView _didFinishLoadForMainFrame]):
1610         (-[WKWebView _didSameDocumentNavigationForMainFrame:]):
1611         Forward these to ViewGestureController.
1612
1613         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1614         * UIProcess/ios/PageClientImplIOS.mm:
1615         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1616         Forward didFinishLoadForMainFrame to WKWebView.
1617
1618         * UIProcess/ios/ViewGestureControllerIOS.mm:
1619         (WebKit::ViewGestureController::ViewGestureController):
1620         (WebKit::ViewGestureController::endSwipeGesture):
1621         Split the swipe snapshot removal state into a bunch of bools.
1622
1623         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
1624         (WebKit::ViewGestureController::setRenderTreeSize):
1625         (WebKit::ViewGestureController::removeSwipeSnapshotIfReady):
1626         (WebKit::ViewGestureController::removeSwipeSnapshot):
1627         Unify the snapshot removal logic into one function; removeSwipeSnapshotIfReady
1628         completely owns the decision. For now, we're waiting for everything, but
1629         we can do better in the future (using firstVisuallyNonEmptyLayout like Mac used to).
1630
1631         (WebKit::ViewGestureController::didRestoreScrollPosition):
1632         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
1633         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
1634         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
1635         Add more conditions for swipe snapshot removal. We'll now wait for
1636         didFinishLoadForMainFrame (or didSameDocumentNavigationForMainFrame),
1637         for active loads to finish, and for the scroll position to be restored.
1638         This brings the iOS implementation in line with the slightly better Mac
1639         implementation, and also sets the stage for deduplication of all of this code.
1640         
1641         * UIProcess/mac/ViewGestureController.h:
1642         * UIProcess/mac/ViewGestureControllerMac.mm:
1643         (WebKit::ViewGestureController::ViewGestureController):
1644
1645 2015-03-30  Chris Dumez  <cdumez@apple.com>
1646
1647         [WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
1648         https://bugs.webkit.org/show_bug.cgi?id=143159
1649         <rdar://problem/20333296>
1650
1651         Reviewed by Antti Koivisto.
1652
1653         Add support for "Cache-Control: max-stale" request header:
1654         https://tools.ietf.org/html/rfc7234#section-5.2.1.2
1655
1656         * NetworkProcess/cache/NetworkCache.cpp:
1657         (WebKit::NetworkCache::responseHasExpired):
1658         (WebKit::NetworkCache::requestRequiresRevalidation):
1659         (WebKit::NetworkCache::canUse):
1660
1661 2015-03-30  Csaba Osztrogonác  <ossy@webkit.org>
1662
1663         [EFL][GTK] WebKit2's generate-forwarding-headers.pl should fail if clashing headers found
1664         https://bugs.webkit.org/show_bug.cgi?id=142909
1665
1666         Reviewed by Philippe Normand.
1667
1668         * Scripts/generate-forwarding-headers.pl:
1669         (createForwardingHeadersForFramework):
1670
1671 2015-03-29  Antti Koivisto  <antti@apple.com>
1672
1673         Include cache entry worth to json dump
1674         https://bugs.webkit.org/show_bug.cgi?id=143202
1675
1676         Reviewed by Darin Adler.
1677
1678         This is useful for analyzing cache performance.
1679         Also include the body size, total item count and average worth.
1680
1681         * NetworkProcess/cache/NetworkCache.cpp:
1682         (WebKit::NetworkCache::Cache::traverse):
1683         (WebKit::NetworkCache::Cache::dumpContentsToFile):
1684         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1685         (WebKit::NetworkCache::Entry::asJSON):
1686         * NetworkProcess/cache/NetworkCacheEntry.h:
1687         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1688         (WebKit::NetworkCache::Storage::traverse):
1689
1690             Add flags for specificying what sort of information is needed.
1691
1692         (WebKit::NetworkCache::computeRecordWorth):
1693
1694             Factor to a function.
1695
1696         (WebKit::NetworkCache::deletionProbability):
1697         * NetworkProcess/cache/NetworkCacheStorage.h:
1698
1699 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
1700
1701         Fix iOS scrollperf crash after a web process crash
1702         https://bugs.webkit.org/show_bug.cgi?id=143110
1703
1704         Reviewed by Dean Jackson.
1705         
1706         When we destroy the drawing area after a web process crash, we also need to destroy
1707         the scrollingPerformanceData which has a reference to the drawing area.
1708
1709         * UIProcess/WebPageProxy.cpp:
1710         (WebKit::WebPageProxy::resetState):
1711
1712 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
1713
1714         Convert arguments to ScrollingCoordinator functions to references
1715         https://bugs.webkit.org/show_bug.cgi?id=143198
1716
1717         Reviewed by Darin Adler.
1718
1719         Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
1720         references, and use references in a few other places.
1721
1722         * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
1723         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1724         (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
1725
1726 2015-03-29  Enrica Casucci  <enrica@apple.com>
1727
1728         [iOS WK2] WKContentView should implement _selectionClipRect
1729         https://bugs.webkit.org/show_bug.cgi?id=143143
1730         rdar://problem/20330075
1731
1732         Reviewed by Benjamin Poulain.
1733
1734         UIKit checks if the text delegate responds to this selector
1735         to retrieve the clipping rectangle for the editable element
1736         where the selection is being create.
1737
1738         * UIProcess/ios/WKContentViewInteraction.mm:
1739         (-[WKContentView _selectionClipRect]):
1740
1741 2015-03-29  Antti Koivisto  <antti@apple.com>
1742
1743         Use st_mtime instead of st_atime to track file access time
1744         https://bugs.webkit.org/show_bug.cgi?id=143200
1745
1746         Reviewed by Darin Adler.
1747
1748         On OS X atime updates automatically on read so calling Storage::traverse() would always ends up updating access times
1749         for all cache entries to the current time. This would make entry worth computation produce unexpected results.
1750         We update mtime manually on successful cache retrieve only so switching to it fixes the problem.
1751
1752         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1753         (WebKit::NetworkCache::fileTimes):
1754         (WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
1755         (WebKit::NetworkCache::updateFileAccessTimeIfNeeded): Deleted.
1756         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1757         (WebKit::NetworkCache::Storage::updateFileModificationTime):
1758         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1759         (WebKit::NetworkCache::deletionProbability):
1760         (WebKit::NetworkCache::Storage::updateFileAccessTime): Deleted.
1761         * NetworkProcess/cache/NetworkCacheStorage.h:
1762
1763 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
1764
1765         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
1766         https://bugs.webkit.org/show_bug.cgi?id=142386
1767
1768         Reviewed by Žan Doberšek.
1769
1770         TextureMapper and TextureMapperGL are bloated and tightly coupled with
1771         BitmapTexture. We should move these classes to seperated file of their own.
1772         Also, this patch removes friend relationship from TextureMapperGL and  its
1773         subsidiary classes.
1774
1775         The main purpose of this refactoring is to expose BitmapTexturePool to
1776         renderers of platformlayers like Video and Canvas. By doing this, each
1777         renderer can acquire textures from the global texture pool to paint
1778         their contents directly.
1779
1780         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Include BitmapTextureGL.h explicitly
1781
1782 2015-03-27  Anders Carlsson  <andersca@apple.com>
1783
1784         Use a typedef for the WKPluginLoadClientPolicy enum
1785         https://bugs.webkit.org/show_bug.cgi?id=143161
1786
1787         Reviewed by Tim Horton.
1788
1789         * UIProcess/API/C/WKPluginLoadPolicy.h:
1790
1791 2015-03-27  Chris Dumez  <cdumez@apple.com>
1792
1793         [WK2][NetworkCache] Use WTF::WorkQueue abstraction inside NetworkCacheStatistics
1794         https://bugs.webkit.org/show_bug.cgi?id=143154
1795
1796         Reviewed by Antti Koivisto.
1797
1798         Use WTF::WorkQueue abstraction inside NetworkCacheStatistics, like we
1799         already do in NetworkCacheStorage.
1800
1801         * NetworkProcess/cache/NetworkCacheStatistics.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm.
1802         (WebKit::NetworkCache::executeSQLCommand):
1803         (WebKit::NetworkCache::executeSQLStatement):
1804         (WebKit::NetworkCache::Statistics::open):
1805         (WebKit::NetworkCache::Statistics::Statistics):
1806         (WebKit::NetworkCache::Statistics::initialize):
1807         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
1808         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
1809         (WebKit::NetworkCache::Statistics::recordRetrievalRequest):
1810         (WebKit::NetworkCache::Statistics::recordNotCachingResponse):
1811         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
1812         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
1813         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
1814         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
1815         (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
1816         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
1817         (WebKit::NetworkCache::Statistics::markAsRequested):
1818         (WebKit::NetworkCache::Statistics::writeTimerFired):
1819         (WebKit::NetworkCache::Statistics::queryWasEverRequested):
1820         (WebKit::NetworkCache::Statistics::clear):
1821         (WebKit::NetworkCache::Statistics::addHashesToDatabase):
1822         (WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
1823         * NetworkProcess/cache/NetworkCacheStatistics.h:
1824         (WebKit::NetworkCache::Statistics::serialBackgroundIOQueue):
1825         * WebKit2.xcodeproj/project.pbxproj:
1826
1827 2015-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1828
1829         Safari clears selection when its window gets activated via mouse down
1830         https://bugs.webkit.org/show_bug.cgi?id=143157
1831
1832         Reviewed by Anders Carlsson.
1833
1834         The bug was caused by PlatformMouseEvent created in WebKit2 not having its event number
1835         even though we were correctly calling setActivationEventNumber in WebPage::acceptsFirstMouse.
1836
1837         Fixed the bug by storing [NSEvent eventNumber] in WebMouseEvent on Mac in WebKit2 as done in WebKit1.
1838
1839         * Shared/WebEvent.h:
1840         (WebKit::WebMouseEvent::eventNumber):
1841         * Shared/WebEventConversion.cpp:
1842         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
1843         * Shared/WebMouseEvent.cpp:
1844         (WebKit::WebMouseEvent::WebMouseEvent):
1845         (WebKit::WebMouseEvent::encode):
1846         (WebKit::WebMouseEvent::decode):
1847         * Shared/mac/WebEventFactory.mm:
1848         (WebKit::WebEventFactory::createWebMouseEvent):
1849
1850 2015-03-27  Anders Carlsson  <andersca@apple.com>
1851
1852         Only do the Connection::setShouldCloseConnectionOnMachExceptions() hack where necessary
1853         https://bugs.webkit.org/show_bug.cgi?id=143141
1854         rdar://problem/19471284
1855
1856         Reviewed by Andreas Kling.
1857
1858         * Platform/IPC/Connection.h:
1859         * Platform/IPC/mac/ConnectionMac.mm:
1860         (IPC::Connection::platformInvalidate):
1861         (IPC::Connection::platformInitialize):
1862         (IPC::Connection::open):
1863         * Shared/ChildProcessProxy.cpp:
1864         (WebKit::ChildProcessProxy::didFinishLaunching):
1865         * UIProcess/Plugins/PluginProcessProxy.cpp:
1866         (WebKit::PluginProcessProxy::didFinishLaunching):
1867
1868 2015-03-27  Tim Horton  <timothy_horton@apple.com>
1869
1870         Implement iOS WebKit2 PDF Find-in-Page
1871         https://bugs.webkit.org/show_bug.cgi?id=143065
1872         <rdar://problem/16793370>
1873
1874         Reviewed by Dan Bernstein.
1875
1876         * Platform/spi/ios/CorePDFSPI.h:
1877         Add some SPI.
1878
1879         * UIProcess/API/Cocoa/WKWebView.mm:
1880         (-[WKWebView _countStringMatches:options:maxCount:]):
1881         (-[WKWebView _findString:options:maxCount:]):
1882         (-[WKWebView _hideFindUI]):
1883         If we have a custom content view, forward find-in-page methods to it.
1884         
1885         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1886         * UIProcess/API/Cocoa/_WKFindOptions.h:
1887         Move _WKFindOptions into its own file.
1888
1889         * UIProcess/Cocoa/WKWebViewContentProvider.h:
1890         Add find-related methods to the WKWebViewContentProvider protocol.
1891
1892         * UIProcess/ios/WKPDFView.mm:
1893         (-[WKPDFView web_initWithFrame:webView:]):
1894         (-[WKPDFView dealloc]):
1895         Maintain a dispatch queue for searching the PDF.
1896
1897         (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
1898         Fix a type.
1899
1900         (-[WKPDFView _ensureViewForPage:]):
1901         Split the code to create/parent a page view out from _revalidateViews,
1902         so that the find code can create/parent the targetted UIPDFPageView
1903         in order to install the find highlight in it, but before it is scrolled into view.
1904
1905         (-[WKPDFView _revalidateViews]):
1906         Use the stored page index instead of counting again.
1907         Don't unparent page views that have find-in-page highlights in them, because
1908         we won't know enough to recreate them later.
1909
1910         (-[WKPDFView _computePageAndDocumentFrames]):
1911         Put the page index in PDFPageInfo, for reference elsewhere.
1912
1913         (-[WKPDFView _stringCompareOptionsFromWKFindOptions:]):
1914         (-[WKPDFView _computeMatchesForString:options:maxCount:completionHandler:]):
1915         Asynchronously (and on our serial queue) search the PDF for the given string.
1916         We'll cache the most recent results to avoid searching more than once,
1917         cancel existing searches when another begins (since it's a serial queue,
1918         this ensures we'll only have one search active at a time).
1919
1920         (-[WKPDFView web_countStringMatches:options:maxCount:]):
1921         Count the number of matches for the given string, and inform the FindClient
1922         of the result.
1923
1924         (-[WKPDFView _didFindMatch:]):
1925         When we find a match, create a view for it, highlight the match, and
1926         zoom so that it's in-view.
1927
1928         (-[WKPDFView web_findString:options:maxCount:]):
1929         Incrementally search the document for the given string. We do an incremental
1930         search even if we have all of the results so that we can anchor the search
1931         in the right place if the new string is a prefix of the old string, etc.
1932         Wrap around appropriately when searching past the beginning or end of the
1933         document. If we have all of the results (there were less than maxCount results),
1934         look through the cached matches for the incrementally-found result and
1935         report its index to the client.
1936
1937         (-[WKPDFView web_hideFindUI]):
1938         Dismiss the selection and clear some state so we start the next search afresh.
1939
1940         * WebKit2.xcodeproj/project.pbxproj:
1941
1942 2015-03-27  Andreas Kling  <akling@apple.com>
1943
1944         WebProcessProxy should not retain WebBackForwardListItems forever.
1945         <https://webkit.org/b/143152>
1946         <rdar://problem/19925709>
1947
1948         Reviewed by Anders Carlsson.
1949
1950         Have WebProcessProxy actually forget about a WebBackForwardListItem after it's removed from
1951         the WebBackForwardList.
1952
1953         This ensures that we don't accumulate too many of these objects, which can get quite large
1954         due to the session state encoded in them.
1955
1956         We already have graceful handling of the case where an incoming IPC message references
1957         a removed back/forward list item.
1958
1959         * UIProcess/WebBackForwardList.cpp:
1960         (WebKit::WebBackForwardList::didRemoveItem):
1961         * UIProcess/WebPageProxy.cpp:
1962         (WebKit::WebPageProxy::backForwardRemovedItem):
1963         * UIProcess/WebProcessProxy.cpp:
1964         (WebKit::WebProcessProxy::removeBackForwardItem):
1965         * UIProcess/WebProcessProxy.h:
1966
1967 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
1968
1969         Use the correct timebase to log scrollperf blank pixel counts on iOS
1970         https://bugs.webkit.org/show_bug.cgi?id=143149
1971
1972         Reviewed by Tim Horton.
1973         
1974         MobileSafari and WebKit need to collect scrollperf data using the same timebase;
1975         MobileSafari can't call WTF::monotonicallyIncreasingTime(), so use CFAbsoluteTimeGetCurrent()
1976         everywhere.
1977
1978         * UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm:
1979         (WebKit::RemoteLayerTreeScrollingPerformanceData::appendBlankPixelCount):
1980
1981 2015-03-27  Chris Dumez  <cdumez@apple.com>
1982
1983         [WK2][NetworkCache] Rename requestNeedsRevalidation() to requestRequiresRevalidation()
1984         https://bugs.webkit.org/show_bug.cgi?id=143137
1985
1986         Reviewed by Antti Koivisto.
1987
1988         Rename requestNeedsRevalidation() to requestRequiresRevalidation() as I
1989         think it is more accurate. It is not the request that needs revalidating.
1990         The requests just requires us to revalidate the response.
1991
1992         * NetworkProcess/cache/NetworkCache.cpp:
1993         (WebKit::NetworkCache::requestRequiresRevalidation):
1994         (WebKit::NetworkCache::canUse):
1995         (WebKit::NetworkCache::requestNeedsRevalidation): Deleted.
1996
1997 2015-03-27  Oliver Hunt  <oliver@apple.com>
1998
1999         Forward additional CFNetwork ATS information to child processes
2000         https://bugs.webkit.org/show_bug.cgi?id=143136
2001
2002         Reviewed by Anders Carlsson.
2003
2004         Add additional process creation parameter information, and pass it
2005         to the child processes that actually use CFNetwork.
2006
2007         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2008         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2009         * Shared/Network/NetworkProcessCreationParameters.cpp:
2010         (WebKit::NetworkProcessCreationParameters::encode):
2011         (WebKit::NetworkProcessCreationParameters::decode):
2012         * Shared/Network/NetworkProcessCreationParameters.h:
2013         * Shared/Plugins/PluginProcessCreationParameters.cpp:
2014         (WebKit::PluginProcessCreationParameters::encode):
2015         (WebKit::PluginProcessCreationParameters::decode):
2016         * Shared/Plugins/PluginProcessCreationParameters.h:
2017         * Shared/WebProcessCreationParameters.cpp:
2018         (WebKit::WebProcessCreationParameters::encode):
2019         (WebKit::WebProcessCreationParameters::decode):
2020         * Shared/WebProcessCreationParameters.h:
2021         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2022         (WebKit::WebProcessPool::platformInitializeWebProcess):
2023         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
2024         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2025         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2026         * WebProcess/cocoa/WebProcessCocoa.mm:
2027         (WebKit::WebProcess::platformInitializeWebProcess):
2028
2029 2015-03-27  Chris Dumez  <cdumez@apple.com>
2030
2031         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
2032         https://bugs.webkit.org/show_bug.cgi?id=143125
2033         <rdar://problem/20321172>
2034
2035         Reviewed by Antti Koivisto.
2036
2037         We Previously only cached responses with status codes that are cacheable
2038         by default [1]. However, RFC 7234 [2] allows us to cache responses with
2039         other status codes, as long as they have explicit headers allowing
2040         caching:
2041         - 'Expires' header field
2042         - 'max-age' response directive
2043
2044         This patch updates our caching policy accordingly to improve efficiency.
2045
2046         [1] http://tools.ietf.org/html/rfc7231#page-48
2047         [2] http://tools.ietf.org/html/rfc7234#section-4.3.2
2048
2049         Test: http/tests/cache/disk-cache/disk-cache-307-status-code.html
2050
2051         * NetworkProcess/cache/NetworkCache.cpp:
2052         (WebKit::NetworkCache::canStore):
2053
2054 2015-03-26  Antti Koivisto  <antti@apple.com>
2055
2056         Respect cache-control directives in request
2057         https://bugs.webkit.org/show_bug.cgi?id=143121
2058         rdar://problem/19714040
2059
2060         Reviewed by Chris Dumez.
2061
2062         Better support for https://tools.ietf.org/html/rfc7234#section-5.2.1
2063
2064         * NetworkProcess/cache/NetworkCache.cpp:
2065         (WebKit::NetworkCache::canUse):
2066
2067             Consider requests with Cache-control: no-cache and max-age=0 expired.
2068
2069         (WebKit::NetworkCache::canStore):
2070
2071             Don't store requests with Cache-control: no-store.
2072
2073         (WebKit::NetworkCache::Cache::store):
2074         * NetworkProcess/cache/NetworkCache.h:
2075         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
2076         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
2077
2078 2015-03-25  Jon Honeycutt  <jhoneycutt@apple.com>
2079
2080         iOS file upload panel menu items need icons
2081         <https://bugs.webkit.org/show_bug.cgi?id=143042>
2082         <rdar://problem/20178678>
2083
2084         Reviewed by Andy Estes.
2085
2086         * Platform/spi/ios/UIKitSPI.h:
2087         Declare new SPI methods _UIImageGetWebKitTakePhotoOrVideoIcon and
2088         _UIImageGetWebKitPhotoLibraryIcon().
2089
2090         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2091         (photoLibraryIcon):
2092         (cameraIcon):
2093         If UIKit SPI exists, use it. Otherwise, return nil.
2094
2095         (-[WKFileUploadPanel _showDocumentPickerMenu]):
2096         Use icons.
2097
2098 2015-03-26  Enrica Casucci  <enrica@apple.com>
2099
2100         OS X build fix after r182037.
2101
2102         Unreviewed.
2103
2104         * UIProcess/API/mac/WKView.mm:
2105         (-[WKView _addFontPanelObserver]):
2106         (-[WKView removeWindowObservers]):
2107         (-[WKView observeValueForKeyPath:ofObject:change:context:]):
2108
2109 2015-03-26  Enrica Casucci  <enrica@apple.com>
2110
2111         iOS build fix after r182037.
2112
2113         Unreviewed.
2114
2115         * UIProcess/API/Cocoa/WKWebView.mm:
2116         (-[WKWebView _setEditable:]):
2117
2118 2015-03-26  Enrica Casucci  <enrica@apple.com>
2119
2120         REGRESSION(r1807689): Slower startup time for WKWebView.
2121         https://bugs.webkit.org/show_bug.cgi?id=143115
2122         rdar://problem/20233711
2123
2124         Reviewed by Anders Carlsson.
2125
2126         In http://trac.webkit.org/changeset/180768 we added an observer to
2127         track visibility of the NSFontPanel to ensure we could fetch the font
2128         information for the current selection when the panel first becomes visible.
2129         It turns out that adding the observer requires the shared font panel
2130         object to be created.
2131         That is apparently a very expensive operation that is regressing
2132         the initialization time for the WKWebView.
2133         We should initialize the NSFontPanel lazily, only when we make the entire
2134         view editable.
2135
2136         * UIProcess/API/Cocoa/WKWebView.mm:
2137         (-[WKWebView _setEditable:]):
2138         * UIProcess/API/mac/WKView.mm:
2139         (-[WKView addWindowObserversForWindow:]):
2140         (-[WKView _addFontPanelObserver]):
2141         (-[WKView removeWindowObservers]):
2142         (-[WKView observeValueForKeyPath:ofObject:change:context:]):
2143         * UIProcess/API/mac/WKViewInternal.h:
2144
2145 2015-03-26  Alex Christensen  <achristensen@webkit.org>
2146
2147         Progress towards CMake on Mac.
2148         https://bugs.webkit.org/show_bug.cgi?id=143112
2149
2150         Reviewed by Chris Dumez.
2151
2152         * CMakeLists.txt:
2153         * PlatformMac.cmake:
2154         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2155
2156 2015-03-26  Chris Dumez  <cdumez@apple.com>
2157
2158         [WK2][Cocoa] Add private API to override the network disk cache size
2159         https://bugs.webkit.org/show_bug.cgi?id=143113
2160         <rdar://problem/20315669>
2161
2162         Reviewed by Antti Koivisto.
2163
2164         Add private API to let the client override the network disk cache size.
2165         By default, the network disk cache is automatically determined based on
2166         the CacheModel and the available disk space. However, for testing
2167         purposes, it can be used for the client-side to be able to override
2168         the disk cache size.
2169
2170         * NetworkProcess/NetworkProcess.cpp:
2171         (WebKit::NetworkProcess::initializeNetworkProcess):
2172         * NetworkProcess/NetworkProcess.h:
2173         * NetworkProcess/cache/NetworkCache.cpp:
2174         (WebKit::NetworkCache::Cache::setMaximumSize):
2175         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2176         (WebKit::NetworkProcess::platformSetCacheModel):
2177         * Shared/Network/NetworkProcessCreationParameters.cpp:
2178         (WebKit::NetworkProcessCreationParameters::encode):
2179         (WebKit::NetworkProcessCreationParameters::decode):
2180         * Shared/Network/NetworkProcessCreationParameters.h:
2181         * UIProcess/API/APIProcessPoolConfiguration.cpp:
2182         (API::ProcessPoolConfiguration::copy):
2183         * UIProcess/API/APIProcessPoolConfiguration.h:
2184         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
2185         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
2186         (-[_WKProcessPoolConfiguration diskCacheSizeOverride]):
2187         (-[_WKProcessPoolConfiguration setDiskCacheSizeOverride:]):
2188         * UIProcess/WebProcessPool.cpp:
2189         (WebKit::WebProcessPool::WebProcessPool):
2190         (WebKit::WebProcessPool::ensureNetworkProcess):
2191         * UIProcess/WebProcessPool.h:
2192
2193 2015-03-26  Andreas Kling  <akling@apple.com>
2194
2195         [Darwin] Boost the web process QoS level while handling a synchronous IPC message.
2196         <https://webkit.org/b/142988>
2197         <rdar://problem/20264346>
2198
2199         Reviewed by Antti Koivisto and Anders Carlsson.
2200
2201         Add a mechanism for IPC::Connection to boost the main thread for the duration
2202         of processing a synchronous message.
2203
2204         This fixes an issue where the UI process would block on a synchronous request
2205         to the web process that was being carried out at a lower QoS level.
2206
2207         * Platform/IPC/Connection.cpp:
2208         (IPC::Connection::Connection): Save the main thread's pthread_t while we have
2209         a chance to retreive it.
2210
2211         (IPC::Connection::processIncomingMessage): Optionally boost the main thread when
2212         processing an incoming message with the IsSyncMessage flag set.
2213
2214         * Platform/IPC/Connection.h:
2215         (IPC::Connection::setShouldBoostMainThreadOnSyncMessage): Added. When this mode is
2216         enabled, Connection will give a temporary QoS override to the main thread when
2217         receiving a synchronous message. Ownership of the override is handed to the
2218         MessageDecoder, which resets the main thread QoS in its destructor.
2219
2220         * Platform/IPC/MessageDecoder.cpp:
2221         (IPC::MessageDecoder::~MessageDecoder): Remove any QoS override owned by this message.
2222
2223         * Platform/IPC/MessageDecoder.h:
2224         (IPC::MessageDecoder::setQOSClassOverride): Added. Takes ownership of a QoS override
2225         to make sure it stays in effect until this message has been dispatched.
2226
2227         * WebProcess/WebProcess.cpp:
2228         (WebKit::WebProcess::initializeConnection): Set up main thread QoS boosting for the
2229         web process's connection to the UI process.
2230
2231 2015-03-26  Ryosuke Niwa  <rniwa@webkit.org>
2232
2233         Cursor doesn't change back to pointer when leaving Mail
2234         https://bugs.webkit.org/show_bug.cgi?id=132038
2235
2236         Reviewed by Anders Carlsson.
2237
2238         Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
2239         AppKit will reset the cursor as it leaves the WebView.
2240
2241         We use nil cursor here since we manually update the cursor by calling [NSCursor set].
2242
2243         * UIProcess/API/mac/WKView.mm:
2244         (-[WKView initWithFrame:processPool:configuration:webView:]):
2245         * UIProcess/mac/PageClientImpl.mm:
2246         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
2247
2248 2015-03-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2249
2250         [Linux] SeccompFilters: improve the port-agnostic whitelist
2251         https://bugs.webkit.org/show_bug.cgi?id=140064
2252
2253         Reviewed by Žan Doberšek.
2254
2255         Allow the web process to access several files and directories that it
2256         was previously prohibited from accessing. This makes the web process
2257         much less likely to break.
2258
2259         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
2260         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
2261
2262 2015-03-26  Antti Koivisto  <antti@apple.com>
2263
2264         Remove unneeded isConditionalRequest check from NetworkResourceLoader
2265         https://bugs.webkit.org/show_bug.cgi?id=143096
2266
2267         Reviewed by Anders Carlsson.
2268
2269         This check is leftover from implementation that allowed disk cache to validate conditional
2270         request itself. The case can't happen as NetworkCache canRetrieve test does not allow
2271         conditional requests in the first place.
2272
2273         * NetworkProcess/NetworkResourceLoader.cpp:
2274         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2275         (WebKit::isConditionalRequest): Deleted.
2276
2277 2015-03-26  Antti Koivisto  <antti@apple.com>
2278
2279         Rename Storage::Entry to Storage::Record
2280         https://bugs.webkit.org/show_bug.cgi?id=143101
2281
2282         Reviewed by Chris Dumez.
2283
2284         Lets have just one type called Entry in the cache code.
2285
2286         * NetworkProcess/cache/NetworkCache.cpp:
2287         (WebKit::NetworkCache::Cache::retrieve):
2288         (WebKit::NetworkCache::Cache::store):
2289         (WebKit::NetworkCache::Cache::update):
2290         (WebKit::NetworkCache::Cache::traverse):
2291         (WebKit::NetworkCache::Cache::dumpContentsToFile):
2292         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2293         (WebKit::NetworkCache::Entry::Entry):
2294         (WebKit::NetworkCache::Entry::encodeAsStorageRecord):
2295         (WebKit::NetworkCache::Entry::decodeStorageRecord):
2296         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
2297         (WebKit::NetworkCache::Entry::buffer):
2298         (WebKit::NetworkCache::Entry::shareableResourceHandle):
2299         (WebKit::NetworkCache::Entry::encode): Deleted.
2300         (WebKit::NetworkCache::Entry::decode): Deleted.
2301         (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry): Deleted.
2302         * NetworkProcess/cache/NetworkCacheEntry.h:
2303         (WebKit::NetworkCache::Entry::sourceStorageRecord):
2304         (WebKit::NetworkCache::Entry::sourceStorageEntry): Deleted.
2305         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2306         (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
2307         (WebKit::NetworkCache::decodeRecordMetaData):
2308         (WebKit::NetworkCache::decodeRecordHeader):
2309         (WebKit::NetworkCache::decodeRecord):
2310         (WebKit::NetworkCache::encodeRecordMetaData):
2311         (WebKit::NetworkCache::encodeRecordHeader):
2312         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2313         (WebKit::NetworkCache::retrieveFromMemory):
2314         (WebKit::NetworkCache::Storage::store):
2315         (WebKit::NetworkCache::Storage::update):
2316         (WebKit::NetworkCache::Storage::traverse):
2317         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
2318         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
2319         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
2320         (WebKit::NetworkCache::EntryMetaData::EntryMetaData): Deleted.
2321         (WebKit::NetworkCache::decodeEntryMetaData): Deleted.
2322         (WebKit::NetworkCache::decodeEntryHeader): Deleted.
2323         (WebKit::NetworkCache::decodeEntry): Deleted.
2324         (WebKit::NetworkCache::encodeEntryMetaData): Deleted.
2325         (WebKit::NetworkCache::encodeEntryHeader): Deleted.
2326         * NetworkProcess/cache/NetworkCacheStorage.h:
2327
2328 2015-03-26  Chris Dumez  <cdumez@apple.com>
2329
2330         [WK2] Let the compiler generate the NetworkCache::Key move constructor
2331         https://bugs.webkit.org/show_bug.cgi?id=143079
2332
2333         Reviewed by Antti Koivisto.
2334
2335         Let the compiler generate the NetworkCache::Key move constructor. The
2336         generated one will do exactly the same thing as the one we had except
2337         that it will move the m_hash member as well. I don't see any reason why
2338         we weren't moving this member before (it is an std::array<uint8_t, 16>).
2339
2340         Also have the compiler generate a move assignment operator for
2341         consistency. Although it is not currently useful, it could be at some
2342         point.
2343
2344         * NetworkProcess/cache/NetworkCacheKey.cpp:
2345         (WebKit::NetworkCache::Key::Key): Deleted.
2346         * NetworkProcess/cache/NetworkCacheKey.h:
2347
2348 2015-03-26  Chris Dumez  <cdumez@apple.com>
2349
2350         [WK2][NetworkCache] Compute if a cached response has expired only when actually needed
2351         https://bugs.webkit.org/show_bug.cgi?id=143070
2352
2353         Reviewed by Antti Koivisto.
2354
2355         Compute if a cached response has expired only when actually needed:
2356         - This is not a history navigation
2357         and
2358         - It does not have "Cache-Control: no-cache" header
2359
2360         Previously, we would always determine if the response has expired and
2361         we often end up not using this information.
2362
2363         * NetworkProcess/cache/NetworkCache.cpp:
2364         (WebKit::NetworkCache::responseHasExpired):
2365         (WebKit::NetworkCache::canUse):
2366
2367 2015-03-26  Zan Dobersek  <zdobersek@igalia.com>
2368
2369         Avoid the Vector<> copy in WebTouchEvent constructor
2370         https://bugs.webkit.org/show_bug.cgi?id=143043
2371
2372         Reviewed by Carlos Garcia Campos.
2373
2374         Have the WebTouchEvent accept a Vector<> rvalue.
2375         The relevant code is updated so the Vector<> object is moved
2376         through the call chain and finally into the WebTouchEvent constructor.
2377
2378         * Shared/NativeWebTouchEvent.h:
2379         * Shared/WebEvent.h:
2380         * Shared/WebTouchEvent.cpp:
2381         (WebKit::WebTouchEvent::WebTouchEvent):
2382         * Shared/efl/WebEventFactory.cpp:
2383         (WebKit::WebEventFactory::createWebTouchEvent):
2384         * Shared/gtk/NativeWebTouchEventGtk.cpp:
2385         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2386         * Shared/gtk/WebEventFactory.cpp:
2387         (WebKit::WebEventFactory::createWebTouchEvent):
2388         * Shared/gtk/WebEventFactory.h:
2389         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2390         (webkitWebViewBaseTouchEvent):
2391
2392 2015-03-25  Chris Dumez  <cdumez@apple.com>
2393
2394         [WK2] WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always call the FramePolicyFunction
2395         https://bugs.webkit.org/show_bug.cgi?id=143036
2396         <rdar://problem/20252438>
2397         <rdar://problem/13811738>
2398
2399         Reviewed by Alexey Proskuryakov.
2400
2401         WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always
2402         call the FramePolicyFunction. Previously, it would fail to do in 2
2403         cases:
2404         - m_frame->page() returns null
2405         or
2406         - webPage->sendSync() returns false
2407
2408         If the FramePolicyFunction is not called, we will fail to clear the
2409         callback in the PolicyChecker and
2410         DocumentLoader::continueAfterContentPolicy() will not be called.
2411
2412         DocumentLoader::continueAfterContentPolicy() is in charge of resetting
2413         m_waitingForContentPolicy flag to false. This could therefore explain
2414         the following assertion being hit in DocumentLoader::detachFromFrame()
2415         (see <rdar://problem/20252438>):
2416         RELEASE_ASSERT(!m_waitingForContentPolicy)
2417
2418         Also, as the PolicyChecker callback is not cleared, it could make it
2419         possible for DocumentLoader::continueAfterContentPolicy() to be called
2420         *after* the load is finished, when later canceling the PolicyCallback:
2421         FrameLoader::stopAllLoaders()
2422          -> PolicyChecker::stopCheck()
2423           -> PolicyCallback::cancel()
2424            -> DocumentLoader::continueAfterContentPolicy(PolicyIgnore)
2425
2426         Calling continueAfterContentPolicy(PolicyIgnore) after the load is
2427         finished would be bad and could explain some of the crashes we've seen
2428         in DocumentLoader::continueAfterContentPolicy() ->
2429         DocumentLoader:: stopLoadingForPolicyChange() (see
2430         <rdar://problem/13811738>).
2431
2432         This patch also applies the same fix to
2433         dispatchDecidePolicyForNewWindowAction() and
2434         dispatchDecidePolicyForNavigationAction() as they use the same pattern.
2435
2436         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2437         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2438         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2439         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2440
2441 2015-03-25  Tim Horton  <timothy_horton@apple.com>
2442
2443         Add a preference to prevent "user-scalable=no" from having any effect
2444         https://bugs.webkit.org/show_bug.cgi?id=143032
2445
2446         Reviewed by Sam Weinig.
2447
2448         * Shared/WebPreferencesDefinitions.h:
2449         * WebProcess/WebPage/WebPage.cpp:
2450         (WebKit::WebPage::updatePreferences):
2451         Add a preference and push it to the ViewportConfiguration.
2452
2453 2015-03-25  Beth Dakin  <bdakin@apple.com>
2454
2455         REGRESSION (r181660): Force click url preview doesn't have a TextIndicator in Mail
2456         https://bugs.webkit.org/show_bug.cgi?id=143064
2457         -and corresponding-
2458         rdar://problem/20251440
2459
2460         Reviewed by Tim Horton.
2461
2462         The TextIndicator was getting set to nil by the call to 
2463         _dismissContentRelativeChildWindows in mouseDown. That line of code was added by 
2464         http://trac.webkit.org/changeset/177242 to work around a bug in another component 
2465         that has now been resolved, so it no longer appears to be necessary. 
2466
2467         * UIProcess/API/mac/WKView.mm:
2468         (-[WKView mouseDown:]):
2469
2470 2015-03-25  Anders Carlsson  <andersca@apple.com>
2471
2472         Add network and application cache directories to WebsiteDataStore
2473         https://bugs.webkit.org/show_bug.cgi?id=143063
2474
2475         Reviewed by Sam Weinig.
2476
2477         Create a WebKit directory under ~/Library/Caches/<Bundle ID> for non-sandboxed applications,
2478         and ~/Library/Caches for sandboxed applications. Create NetworkCache and OfflineWebApplicationCache
2479         subdirectories. These directories will be used with the modern WebKit API.
2480
2481         * UIProcess/API/APIWebsiteDataStore.h:
2482         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
2483         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
2484         (API::WebsiteDataStore::defaultDataStoreConfiguration):
2485         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2486         (WebKit::WebsiteDataStore::WebsiteDataStore):
2487         * UIProcess/WebsiteData/WebsiteDataStore.h:
2488
2489 2015-03-25  Sam Weinig  <sam@webkit.org>
2490
2491         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
2492
2493         * Shared/WebCompiledContentExtension.cpp:
2494         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
2495         * UIProcess/API/C/WKUserContentFilterRef.cpp:
2496         (WKUserContentFilterCreate):
2497         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2498         (-[_WKUserContentFilter initWithName:serializedRules:]):
2499
2500 2015-03-25  Sam Weinig  <sam@webkit.org>
2501
2502         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
2503         https://bugs.webkit.org/show_bug.cgi?id=143059
2504
2505         Reviewed by Alex Christensen.
2506
2507         * Shared/WebCompiledContentExtension.cpp:
2508         * Shared/WebCompiledContentExtension.h:
2509         (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient):
2510         (WebKit::LegacyContentExtensionCompilationClient::writeBytecode):
2511         (WebKit::LegacyContentExtensionCompilationClient::writeActions):
2512         Add subclass of ContentExtensionCompilationClient for use with the non-file backed content
2513         extensions.
2514
2515         * UIProcess/API/C/WKUserContentFilterRef.cpp:
2516         (WKUserContentFilterCreate):
2517         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2518         (-[_WKUserContentFilter initWithName:serializedRules:]):
2519         Update to use the new interface of compileRuleList().
2520
2521 2015-03-25  Ryosuke Niwa  <rniwa@webkit.org>
2522
2523         Web Inspector: Switching tabs to window with inspector open prohibits typing into console
2524         https://bugs.webkit.org/show_bug.cgi?id=126800
2525
2526         Reviewed by Anders Carlsson.
2527
2528         This is a regression from r85356 and r83814. These two patches made WKWebView clear its selection
2529         when WKView resigns the first responder without ever restoring it even if WKView later becomes
2530         the first responder again. This is problematic when a text field or a editing host element had been
2531         focused and selected prior to the resignation since the editing code uses the selection to determine
2532         the editability of the element.
2533
2534         Fixed the bug by restoring selection in [WKView becomeFirstResponder] if the selection is empty.
2535
2536         * UIProcess/API/mac/WKView.mm:
2537         (-[WKView becomeFirstResponder]):
2538         * UIProcess/WebPageProxy.cpp:
2539         (WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
2540         * UIProcess/WebPageProxy.h:
2541         * WebProcess/WebPage/WebPage.cpp:
2542         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
2543         * WebProcess/WebPage/WebPage.h:
2544         * WebProcess/WebPage/WebPage.messages.in:
2545
2546 2015-03-25  Beth Dakin  <bdakin@apple.com>
2547
2548         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
2549         force preview
2550         https://bugs.webkit.org/show_bug.cgi?id=143057
2551         -and corresponding-
2552         rdar://problem/20251436
2553
2554         Reviewed by Tim Horton.
2555
2556         Always call _page->immediateActionDidUpdate() so that the EventHandler’s 
2557         ImmediateActionStage is appropriately updated.
2558         * UIProcess/mac/WKImmediateActionController.mm:
2559         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
2560
2561         Update the EventHandler’s ImmediateActionStage.
2562         * WebProcess/WebPage/mac/WebPageMac.mm:
2563         (WebKit::WebPage::immediateActionDidUpdate):
2564
2565 2015-03-25  Antti Koivisto  <antti@apple.com>
2566
2567         Separate entry decoding from validation
2568         https://bugs.webkit.org/show_bug.cgi?id=143052
2569
2570         Reviewed by Chris Dumez.
2571
2572         Make NetworkCache::Cache a class and move it to a file of its own.
2573         Move the encoding/decoding code there.
2574
2575         * NetworkProcess/NetworkProcess.cpp:
2576         (WebKit::fetchDiskCacheEntries):
2577         (WebKit::clearDiskCacheEntries):
2578         * NetworkProcess/NetworkResourceLoader.cpp:
2579         (WebKit::sendReplyToSynchronousRequest):
2580         (WebKit::NetworkResourceLoader::start):
2581         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
2582         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
2583         (WebKit::NetworkResourceLoader::validateCacheEntry):
2584         * NetworkProcess/NetworkResourceLoader.h:
2585         * NetworkProcess/cache/NetworkCache.cpp:
2586         (WebKit::NetworkCache::collectVaryingRequestHeaders):
2587         (WebKit::NetworkCache::canUse):
2588
2589             Focused function for deciding if we can use a cache entry and if it needs validation.
2590
2591         (WebKit::NetworkCache::Cache::retrieve):
2592         (WebKit::NetworkCache::Cache::store):
2593         (WebKit::NetworkCache::Cache::update):
2594         (WebKit::NetworkCache::Cache::traverse):
2595         (WebKit::NetworkCache::encodeStorageEntry): Deleted.
2596         (WebKit::NetworkCache::decodeStorageEntry): Deleted.
2597         * NetworkProcess/cache/NetworkCache.h:
2598         * NetworkProcess/cache/NetworkCacheEntry.cpp: Added.
2599         (WebKit::NetworkCache::Entry::Entry):
2600         (WebKit::NetworkCache::Entry::encode):
2601         (WebKit::NetworkCache::Entry::decode):
2602         (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry):
2603         (WebKit::NetworkCache::Entry::buffer):
2604         (WebKit::NetworkCache::Entry::shareableResourceHandle):
2605         (WebKit::NetworkCache::Entry::needsValidation):
2606         (WebKit::NetworkCache::Entry::setNeedsValidation):
2607         * NetworkProcess/cache/NetworkCacheEntry.h: Added.
2608         (WebKit::NetworkCache::Entry::key):
2609         (WebKit::NetworkCache::Entry::timeStamp):
2610         (WebKit::NetworkCache::Entry::response):
2611         (WebKit::NetworkCache::Entry::varyingRequestHeaders):
2612         (WebKit::NetworkCache::Entry::sourceStorageEntry):
2613         * NetworkProcess/cache/NetworkCacheStatistics.h:
2614         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
2615         (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
2616         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
2617         * WebKit2.xcodeproj/project.pbxproj:
2618
2619 2015-03-25  David Hyatt  <hyatt@apple.com>
2620
2621         Add a pref to enable the new block-inside-inline model
2622         https://bugs.webkit.org/show_bug.cgi?id=143050
2623
2624         Reviewed by Sam Weinig.
2625
2626         * Shared/WebPreferencesDefinitions.h:
2627         * UIProcess/API/C/WKPreferences.cpp:
2628         (WKPreferencesSetNewBlockInsideInlineModelEnabled):
2629         (WKPreferencesGetNewBlockInsideInlineModelEnabled):
2630         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2631         * WebProcess/WebPage/WebPage.cpp:
2632         (WebKit::WebPage::updatePreferences):
2633
2634 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
2635
2636         [WK2] WebUserMediaClient::pageDestroyed() virtual method should be marked as override
2637         https://bugs.webkit.org/show_bug.cgi?id=143046
2638
2639         Reviewed by Carlos Garcia Campos.
2640
2641         * WebProcess/WebCoreSupport/WebUserMediaClient.h: Mark the WebUserMediaClient::pageDestroyed()
2642         method, inherited from the WebCore::UserMediaClient, as an override.
2643
2644 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
2645
2646         [GTK][WK2] WebPageProxy::failedToShowPopupMenu() virtual method should be marked as override
2647         https://bugs.webkit.org/show_bug.cgi?id=143045
2648
2649         Reviewed by Carlos Garcia Campos.
2650
2651         * UIProcess/WebPageProxy.h: Mark the failedToShowPopupMenu(), inherited from
2652         the WebPopupMenuProxy::Client class, as overridden.
2653
2654 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
2655
2656         [WK2] Clean up DrawingAreaImpl vtable overrides
2657         https://bugs.webkit.org/show_bug.cgi?id=143044
2658
2659         Reviewed by Carlos Garcia Campos.
2660
2661         Declare virtual methods of the DrawingAreaImpl class as overridden where necessary.
2662
2663         * WebProcess/WebPage/DrawingAreaImpl.h:
2664         (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Deleted.
2665         (WebKit::DrawingAreaImpl::layerTreeHost): Deleted.
2666
2667 2015-03-24  Ryosuke Niwa  <rniwa@webkit.org>
2668
2669         Inspector doesn't get focused when opened in dock mode
2670         https://bugs.webkit.org/show_bug.cgi?id=143030
2671
2672         Reviewed by Anders Carlsson.
2673
2674         The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
2675         which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
2676         subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.
2677
2678         * UIProcess/mac/WebInspectorProxyMac.mm:
2679         (WebKit::WebInspectorProxy::platformBringToFront):
2680         (WebKit::WebInspectorProxy::platformAttach):
2681
2682 2015-03-24  Chris Dumez  <cdumez@apple.com>
2683
2684         [WK2] Responses with 302 HTTP Status Code should not be cached
2685         https://bugs.webkit.org/show_bug.cgi?id=143028
2686         <rdar://problem/19714040>
2687
2688         Reviewed by Antti Koivisto.
2689
2690         Responses with 302 HTTP Status Code should not be cached as per
2691         RFC 7231:
2692         http://tools.ietf.org/html/rfc7231#section-6.1
2693
2694         This patch updates our disk cache policy accordingly.
2695
2696         Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html
2697
2698         * NetworkProcess/cache/NetworkCache.cpp:
2699         (WebKit::NetworkCache::canStore):
2700
2701 2015-03-24  Anders Carlsson  <andersca@apple.com>
2702
2703         Fix crash in WebKit::RemoteObjectRegistry::sendInvocation
2704         https://bugs.webkit.org/show_bug.cgi?id=143027
2705         rdar://problem/20208674
2706
2707         Reviewed by Sam Weinig.
2708
2709         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2710         (-[WKWebProcessPlugInBrowserContextController dealloc]):
2711         Make sure to invalidate the _WKRemoteObjectRegistry like we do in the UI process.
2712
2713 2015-03-24  Chris Dumez  <cdumez@apple.com>
2714
2715         [WK2] Responses with 204 HTTP Status Code should be cacheable by default
2716         https://bugs.webkit.org/show_bug.cgi?id=143020
2717         <rdar://problem/20281529>
2718
2719         Reviewed by Antti Koivisto.
2720
2721         Make responses with 204 HTTP Status Code cacheable by default, as
2722         per RFC 7231:
2723         http://tools.ietf.org/html/rfc7231#section-6.3.5
2724
2725         Test: http/tests/cache/disk-cache/disk-cache-204-status-code.html
2726
2727         * NetworkProcess/cache/NetworkCache.cpp:
2728         (WebKit::NetworkCache::canStore):
2729
2730 2015-03-24  Enrica Casucci  <enrica@apple.com>
2731
2732         [iOS] Remove unused keyboard code in WKSelectPopover class.
2733         https://bugs.webkit.org/show_bug.cgi?id=143021
2734
2735         Reviewed by Joseph Pecoraro.
2736
2737         WKSelectPopover created an instance of UIKeyboard that was
2738         initialized in initWithView but never used. Removing the
2739         obsolete code.
2740
2741         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2742         (-[WKSelectPopover initWithView:hasGroups:]):
2743
2744 2015-03-24  Dan Bernstein  <mitz@apple.com>
2745
2746         WebKit2 part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
2747         https://bugs.webkit.org/show_bug.cgi?id=143023
2748
2749         Reviewed by Tim Horton.
2750
2751         * UIProcess/API/Cocoa/WKWebView.mm:
2752         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): If the view is in a
2753         window, use CARenderServerRenderLayerWithTransform to synchronously capture a snapshot of
2754         its layer tree into an IOSurfcae, then call the completion handler with an image created
2755         from the IOSurface.
2756
2757 2015-03-24  Beth Dakin  <bdakin@apple.com>
2758
2759         Add events related to force click gesture
2760         https://bugs.webkit.org/show_bug.cgi?id=142836
2761         -and corresponding-
2762         rdar://problem/20210239
2763
2764         Reviewed by Dean Jackson.
2765
2766         ActionMenuHitTestResult has a new bool indicating whether to not the HitTestResult 
2767         will prevent default. 
2768         * Shared/mac/ActionMenuHitTestResult.h:
2769         * Shared/mac/ActionMenuHitTestResult.mm:
2770         (WebKit::ActionMenuHitTestResult::encode):
2771         (WebKit::ActionMenuHitTestResult::decode):
2772
2773         Send immediateActionDidUpdate and the normalized force over the the WebProcess.
2774         * UIProcess/WebPageProxy.cpp:
2775         (WebKit::WebPageProxy::immediateActionDidUpdate):
2776         * UIProcess/WebPageProxy.h:
2777
2778         We need a dummy animation controller when web content is overriding the default 
2779         behavior.
2780         * UIProcess/mac/WKImmediateActionController.mm:
2781
2782         Send along the update information.
2783         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
2784
2785         Use the dummy animation controller if default has been prevented.
2786         (-[WKImmediateActionController _defaultAnimationController]):
2787         (-[WKImmediateActionController _updateImmediateActionItem]):
2788
2789         Keep track of whether m_lastActionMenuHitTes prevented the default immediate 
2790         action behavior.
2791         * WebProcess/WebPage/WebPage.cpp:
2792         (WebKit::WebPage::WebPage):
2793         * WebProcess/WebPage/WebPage.h:
2794         * WebProcess/WebPage/WebPage.messages.in:
2795
2796         Call dispatchMouseForceMayBegin() at hit test time.
2797         * WebProcess/WebPage/mac/WebPageMac.mm:
2798         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2799
2800         Call dispatchMouseForceChanged() if appropriate.
2801         (WebKit::WebPage::immediateActionDidUpdate):
2802
2803         Call dispatchMouseForceCancelled() if appropriate.
2804         (WebKit::WebPage::immediateActionDidCancel):
2805
2806         Call dispatchMouseForceDown() if appropriate.
2807         (WebKit::WebPage::immediateActionDidComplete):
2808
2809 2015-03-24  Anders Carlsson  <andersca@apple.com>
2810
2811         Fix designated initializer violations
2812         https://bugs.webkit.org/show_bug.cgi?id=143016
2813         rdar://problem/20268858
2814
2815         Reviewed by Dan Bernstein.
2816
2817         Move -[WKProcessPool _initWithConfiguration:] to a class extension so we can make it the designated initializer.
2818
2819         * UIProcess/API/Cocoa/WKProcessPool.mm:
2820         (-[WKProcessPool _initWithConfiguration:]):
2821         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2822
2823 2015-03-24  Chris Dumez  <cdumez@apple.com>
2824
2825         [WK2] Responses with 404 HTTP Status Code should be cacheable by default
2826         https://bugs.webkit.org/show_bug.cgi?id=143014
2827         <rdar://problem/20280310>
2828
2829         Reviewed by Antti Koivisto.
2830
2831         Make responses with 404 HTTP Status Code cacheable by default, as
2832         per RFC 7231:
2833         http://tools.ietf.org/html/rfc7231#section-6.5.4
2834
2835         Test: http/tests/cache/disk-cache/disk-cache-404-status-code.html
2836
2837         * NetworkProcess/cache/NetworkCache.cpp:
2838         (WebKit::NetworkCache::canStore):
2839
2840 2015-03-24  Chris Dumez  <cdumez@apple.com>
2841
2842         [WK2] Remove NetworkCache FIXME comment about caching responses to OPTIONS requests
2843         https://bugs.webkit.org/show_bug.cgi?id=143009
2844
2845         Reviewed by Andreas Kling.
2846
2847         Remove NetworkCache FIXME comment about caching responses to OPTIONS
2848         method as RFC 7234 says "Responses to the OPTIONS method are not
2849         cacheable" [1].
2850
2851         [1] http://tools.ietf.org/html/rfc7231#page-31
2852
2853         * NetworkProcess/cache/NetworkCache.cpp:
2854         (WebKit::NetworkCache::canRetrieve):
2855
2856 2015-03-24  Chris Dumez  <cdumez@apple.com>
2857
2858         [WK2] NetworkCache retrievals fail for entries with no body
2859         https://bugs.webkit.org/show_bug.cgi?id=142979
2860         <rdar://problem/20264100>
2861
2862         Reviewed by Antti Koivisto.
2863
2864         NetworkCache retrievals were failing for entries with no body because
2865         decodeEntry() doesn't correctly handle this case. In particular, the
2866         following check fails:
2867         "metaData.bodyOffset + metaData.bodySize == fileData.size()".
2868         This is because bodyOffset is pageSize-aligned.
2869
2870         As a result, the following resource on apple.com is stored in the cache
2871         but we fail to reuse it and reload it from the network every time:
2872         http://images.apple.com/home/styles/promos.css
2873
2874         This patch updates decodeEntry() to create a null Data object for the
2875         body if bodySize is 0.
2876
2877         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
2878         (WebKit::NetworkCache::Data::data):
2879         Do not attempt to initialize m_data if m_dispatchData is null as the
2880         call to dispatch_data_create_map() would then crash. We now return
2881         null in this case. This is needed as decodeStorageEntry() in
2882         NetworkCache.cpp constructs a SharedBuffer from
2883         storageEntry.body.data() and the body may be null.
2884
2885         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2886         (WebKit::NetworkCache::decodeEntry):
2887
2888 2015-03-24  Chris Dumez  <cdumez@apple.com>
2889
2890         [WK2] The WebKit network cache does not cache responses with "Content-Disposition: attachment" header
2891         https://bugs.webkit.org/show_bug.cgi?id=142989
2892         <rdar://problem/20265992>
2893
2894         Reviewed by Antti Koivisto.
2895
2896         Update our WebKit network cache policy to cache responses with
2897         "Content-Disposition: attachment" header. There is no reason we cannot
2898         cache these and our memory cache already does.
2899
2900         This was causing a decent amount of cache misses in the wild. I have
2901         noticed for example that when loading disney.com, we fail to cache the
2902         following resources because of this policy:
2903         http://pagead2.googlesyndication.com/pagead/osd.js
2904         http://pagead2.googlesyndication.com/pagead/show_companion_ad.js
2905
2906         Those resources have Cache-Control headers that indicate they are meant
2907         to be cacheable.
2908
2909         Test: http/tests/cache/disk-cache-validation-attachment.html
2910
2911         * NetworkProcess/cache/NetworkCache.cpp:
2912         (WebKit::NetworkCache::canStore):
2913
2914 2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>
2915
2916         Unreviewed, another attempt to fix 32-bit build after r181881.
2917
2918         * UIProcess/WebInspectorProxy.h:
2919
2920 2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>
2921
2922         Unreviewed, attempt to fix 32-bit build after r181881.
2923
2924         * UIProcess/API/Cocoa/WKViewPrivate.h:
2925         * UIProcess/API/mac/WKView.mm:
2926
2927 2015-03-19  Timothy Hatcher  <timothy@apple.com>
2928
2929         Web Inspector: Support attaching to another view other than the WKView
2930         https://bugs.webkit.org/show_bug.cgi?id=142892
2931
2932         Reviewed by Tim Horton.
2933
2934         * UIProcess/API/C/WKInspector.cpp:
2935         (WKInspectorAttach): Drive by fix so it used the last attachment side.
2936
2937         * UIProcess/API/Cocoa/WKViewPrivate.h:
2938         * UIProcess/API/mac/WKView.mm:
2939         (-[WKView _inspectorAttachmentView]): Added.
2940         (-[WKView _setInspectorAttachmentView:]): Added.
2941
2942         * UIProcess/WebInspectorProxy.cpp:
2943         (WebKit::WebInspectorProxy::createInspectorPage):
2944         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
2945         Use platformCanAttach as a final check incase there is a different
2946         attachment view that the platform knows about.
2947
2948         * UIProcess/WebInspectorProxy.h:
2949         (WebKit::WebInspectorProxy::attachmentSide): Added.
2950         (WebKit::WebInspectorProxy::platformCanAttach): Added.
2951
2952         * UIProcess/mac/WebInspectorProxyMac.mm:
2953         (WebKit::WebInspectorProxy::attachmentViewDidChange): Added.
2954         (WebKit::WebInspectorProxy::closeTimerFired):
2955         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2956         (WebKit::WebInspectorProxy::platformCanAttach):
2957         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
2958         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2959         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
2960         (WebKit::WebInspectorProxy::platformAttach):
2961         (WebKit::WebInspectorProxy::platformDetach):
2962         Use the _inspectorAttachmentView and change how the frame change notification
2963         is observed and follow the attachment view as it changes.
2964
2965 2015-03-23  Tim Horton  <timothy_horton@apple.com>
2966
2967         Images shared to photos via action menu are padded with zeroes at the end
2968         https://bugs.webkit.org/show_bug.cgi?id=142985
2969
2970         Reviewed by Anders Carlsson.
2971
2972         * Shared/mac/ActionMenuHitTestResult.h:
2973         * Shared/mac/ActionMenuHitTestResult.mm:
2974         (WebKit::ActionMenuHitTestResult::encode):
2975         (WebKit::ActionMenuHitTestResult::decode):
2976         * WebProcess/WebPage/mac/WebPageMac.mm:
2977         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2978         Send the size of the image separately from the SharedMemory.
2979         The SharedMemory's size can be rounded up, so we need to keep the original
2980         size around in order to write the data to disk.
2981
2982         * UIProcess/mac/WKActionMenuController.mm:
2983         (-[WKActionMenuController _hitTestResultImage]):
2984         (-[WKActionMenuController _addImageToPhotos:]):
2985         Use the image size instead of the SharedMemory size.
2986
2987 2015-03-23  Enrica Casucci  <enrica@apple.com>
2988
2989         [iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.
2990         https://bugs.webkit.org/show_bug.cgi?id=142913
2991         rdar://problem/16400033
2992
2993         Reviewed by Sam Weinig.
2994
2995         When looking for the best candidate range at the given position,
2996         we should skip nodes that don't have a renderer.
2997         This is a speculative fix.
2998
2999         * WebProcess/WebPage/ios/WebPageIOS.mm:
3000         (WebKit::WebPage::rangeForWebSelectionAtPosition):
3001
3002 2015-03-23  Alexey Proskuryakov  <ap@apple.com>
3003
3004         REGRESSION (Yosemite): WKView visibility notifications are messed up
3005         https://bugs.webkit.org/show_bug.cgi?id=142945
3006
3007         Reviewed by Tim Horton.
3008
3009         As these notifications cannot be used by NSView subclasses, create a separate
3010         object for observing them.
3011
3012         * UIProcess/API/mac/WKView.mm:
3013         (-[WKWindowVisibilityObserver initWithView:]):
3014         (-[WKWindowVisibilityObserver startObserving:]):
3015         (-[WKWindowVisibilityObserver stopObserving:]):
3016         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
3017         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
3018         (-[WKView addWindowObserversForWindow:]):
3019         (-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
3020         which we never start to observe.
3021         (-[WKView initWithFrame:processPool:configuration:webView:]):
3022         * UIProcess/API/mac/WKViewInternal.h:
3023
3024 2015-03-23  Anders Carlsson  <andersca@apple.com>
3025
3026         Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
3027         https://bugs.webkit.org/show_bug.cgi?id=133692
3028         rdar://problem/17255947
3029
3030         Reviewed by Alexey Proskuryakov.
3031
3032         Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript
3033         where we need the plug-in to stay around after the call.
3034
3035         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3036         (WebKit::NPObjectMessageReceiver::invoke):
3037         (WebKit::NPObjectMessageReceiver::invokeDefault):
3038         (WebKit::NPObjectMessageReceiver::getProperty):
3039         (WebKit::NPObjectMessageReceiver::setProperty):
3040         (WebKit::NPObjectMessageReceiver::construct):
3041
3042 2015-03-23  Anders Carlsson  <andersca@apple.com>
3043
3044         Put the WK_NULLABLE_SPECIFIER in the right place for block parameters
3045         https://bugs.webkit.org/show_bug.cgi?id=142975
3046         rdar://problem/19863930
3047
3048         Reviewed by Dan Bernstein.
3049
3050         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
3051         * UIProcess/API/Cocoa/WKUIDelegate.h:
3052         * UIProcess/API/Cocoa/WKWebView.h:
3053
3054 2015-03-23  Tim Horton  <timothy_horton@apple.com>
3055
3056         Add a share item to the link action menu
3057         https://bugs.webkit.org/show_bug.cgi?id=142961
3058         <rdar://problem/19198374>
3059
3060         Reviewed by Beth Dakin.
3061
3062         * UIProcess/mac/WKActionMenuController.mm:
3063         (-[WKActionMenuController _hitLinkURL]):
3064         Factor out _hitLinkURL from various places.
3065
3066         (-[WKActionMenuController _openURLFromActionMenu:]):
3067         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
3068         (-[WKActionMenuController _defaultMenuItemsForVideo]):
3069         (-[WKActionMenuController _defaultMenuItemsForImage]):
3070         (-[WKActionMenuController _createActionMenuItemForTag:]):
3071         (-[WKActionMenuController _createShareActionMenuItemForTag:withItems:]):
3072         Adopt -[NSMenuItem standardShareMenuItemWithItems].
3073         All of the null-checking is unnecessary as it's impossible to enter
3074         these functions with a null image/etc.
3075
3076         (-[WKActionMenuController _defaultMenuItemsForLink]):
3077         * Shared/API/c/WKActionMenuItemTypes.h:
3078         Add a 'Share' item to the link menu.
3079
3080 2015-03-23  Zan Dobersek  <zdobersek@igalia.com>
3081
3082         [GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
3083         https://bugs.webkit.org/show_bug.cgi?id=142964
3084
3085         Reviewed by Carlos Garcia Campos.
3086
3087         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3088         (ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
3089         instead of C's abs(). The templated nature of std::abs() ensures the proper
3090         computation that matches the types of the passed-in values, and shuts down
3091         a warning when compiling with Clang.
3092
3093 2015-03-23  Zan Dobersek  <zdobersek@igalia.com>
3094
3095         [GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
3096         https://bugs.webkit.org/show_bug.cgi?id=142963
3097
3098         Reviewed by Carlos Garcia Campos.
3099
3100         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
3101         (webkitBackForwardListChanged): This function only reads from the passed-in
3102         Vector of removed items, so only a const lvalue reference to the Vector
3103         is needed.
3104         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
3105
3106 2015-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3107
3108         [GTK] Add a configure option to build without Redirected XComposite Window
3109         https://bugs.webkit.org/show_bug.cgi?id=142865
3110
3111         Reviewed by Žan Doberšek.
3112
3113         Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
3114         USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).
3115
3116         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3117         (webkitWebViewBaseRealize): Use the XID of the WebKitWebView
3118         window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
3119         is disabled.
3120         (webkitWebViewRenderAcceleratedCompositingResults):
3121         (resizeWebKitWebViewBaseFromAllocation):
3122         (webkitWebViewBaseEnterAcceleratedCompositingMode):
3123         (webkitWebViewBaseExitAcceleratedCompositingMode):
3124         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
3125         * UIProcess/gtk/RedirectedXCompositeWindow.h:
3126
3127 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
3128
3129         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
3130         https://bugs.webkit.org/show_bug.cgi?id=142940
3131
3132         Reviewed by Sam Weinig.
3133
3134         * WebProcess/WebPage/mac/WebPageMac.mm:
3135         (WebKit::WebPage::playbackTargetSelected): Argument to didChoosePlaybackTarget is now const.
3136
3137 2015-03-22  Anders Carlsson  <andersca@apple.com>
3138
3139         _WKWebsiteDataStore should clear WebSQL databases
3140         https://bugs.webkit.org/show_bug.cgi?id=142947
3141         rdar://problem/20242174
3142
3143         Reviewed by Sam Weinig.
3144
3145         * Shared/WebsiteData/WebsiteDataTypes.h:
3146         Add WebsiteDataTypeWebSQLDatabases.
3147
3148         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
3149         (API::WebsiteDataStore::defaultDataStoreConfiguration):
3150         Initialize configuration.webSQLDatabaseDirectory.
3151
3152         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3153         Add WKWebsiteDataTypeWebSQLDatabases.
3154
3155         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
3156         (dataTypesToString):
3157         Handle WKWebsiteDataTypeWebSQLDatabases.
3158
3159         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
3160         (WebKit::toWebsiteDataTypes):
3161         (WebKit::toWKWebsiteDataTypes):
3162         Handle WKWebsiteDataTypeWebSQLDatabases and WebsiteDataTypes::WebsiteDataTypeWebSQLDatabases.
3163
3164         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3165         (WebKit::WebsiteDataStore::WebsiteDataStore):
3166         Initialize m_webSQLDatabaseDirectory and add a queue member variable.
3167
3168         (WebKit::WebsiteDataStore::fetchData):
3169         Fetch database origins.
3170     
3171         (WebKit::WebsiteDataStore::removeData):
3172         Remove databases.
3173
3174         * UIProcess/WebsiteData/WebsiteDataStore.h:
3175         Add new members.
3176
3177 2015-03-22  Dan Bernstein  <mitz@apple.com>
3178
3179         [iOS] Expose WebPageProxy::setInitialFocus as SPI
3180         https://bugs.webkit.org/show_bug.cgi?id=142951
3181
3182         Reviewed by Anders Carlsson.
3183
3184         * UIProcess/API/Cocoa/WKWebView.mm:
3185         (-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): New SPI.
3186         Just calls through to WKWebContentView, but allows a nil completion handler.
3187         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3188
3189         * UIProcess/API/mac/WKView.mm:
3190         (-[WKView becomeFirstResponder]): Pass an empty lambda for the new callback parameter to
3191         WebPageProxy::setInitialFocus.
3192
3193         * UIProcess/WebPageProxy.cpp:
3194         (WebKit::WebPageProxy::setInitialFocus): Added a void callback parameter and made sure to
3195         call it.
3196         * UIProcess/WebPageProxy.h:
3197
3198         * UIProcess/ios/WKContentViewInteraction.h:
3199         * UIProcess/ios/WKContentViewInteraction.mm:
3200         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
3201         Added. Calls WebPageProxy::setInitialFocus, and once that completes, checks if anything was
3202         focused and if so, becomes first responder, then calls the completion handler.
3203
3204         * WebProcess/WebPage/WebPage.cpp:
3205         (WebKit::WebPage::setInitialFocus): Added a callbackID parameter, and made sure to send the
3206         callback message. Added a temporary change of m_userIsInteracting to true, so that the UI
3207         process won’t ignore any StartAssistingNode message resulting from the focus change.
3208         * WebProcess/WebPage/WebPage.h:
3209
3210         * WebProcess/WebPage/WebPage.messages.in: Added a callbackID parameter to SetInitialFocus.
3211
3212 2015-03-21  Dean Jackson  <dino@apple.com>
3213
3214         Remove the prefix for CSS Transforms
3215         https://bugs.webkit.org/show_bug.cgi?id=142927
3216         <rdar://problem/11568151>
3217
3218         Reviewed by Simon Fraser.
3219
3220         Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
3221
3222         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3223         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
3224
3225 2015-03-21  Csaba Osztrogonác  <ossy@webkit.org>
3226
3227         [EFL][GTK] Make WebKit2's generate-forwarding-headers.pl less verbose
3228         https://bugs.webkit.org/show_bug.cgi?id=142908
3229
3230         Reviewed by Žan Doberšek.
3231
3232         * Scripts/generate-forwarding-headers.pl:
3233         (createForwardingHeadersForFramework):
3234
3235 2015-03-21  Commit Queue  <commit-queue@webkit.org>
3236
3237         Unreviewed, rolling out r181824.
3238         https://bugs.webkit.org/show_bug.cgi?id=142935
3239
3240         Broke Windows build (Requested by ap on #webkit).
3241
3242         Reverted changeset:
3243
3244         "Remove the prefix for CSS Transforms"
3245         https://bugs.webkit.org/show_bug.cgi?id=142927
3246         http://trac.webkit.org/changeset/181824
3247
3248 2015-03-20  Dean Jackson  <dino@apple.com>
3249
3250         Remove the prefix for CSS Transforms
3251         https://bugs.webkit.org/show_bug.cgi?id=142927
3252         <rdar://problem/11568151>
3253
3254         Reviewed by Simon Fraser.
3255
3256         Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
3257
3258         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3259         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
3260
3261 2015-03-20  Chris Dumez  <cdumez@apple.com>
3262
3263         [WK2] NetworkCache retrievals sometimes fail on browser startup
3264         https://bugs.webkit.org/show_bug.cgi?id=142925
3265         <rdar://problem/20245368>
3266
3267         Reviewed by Antti Koivisto.
3268
3269         NetworkCache retrievals sometimes fail on browser startup for resources
3270         that are actually cached. The reason is that we are using a bloom filter
3271         for performance reasons to avoid unnecessary disk I/O and this bloom
3272         filter is populated on start up in a background thread by traversing the
3273         cache files on disk. However, when restoring the tabs on start-up we
3274         sometimes query this bloom filter before it is completely populated and
3275         we thus fail to retrieve cached entries because we think they don't
3276         exist and don't check the disk.
3277
3278         This patch adds an "isPopulatingContentsFilter" flag that is turned ON
3279         on start up while we are populating the bloon filter. We then bypass
3280         the bloom filter and send queries directly to disk on start up if this
3281         flag is ON.
3282
3283         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3284         (WebKit::NetworkCache::Storage::initialize):
3285         (WebKit::NetworkCache::Storage::retrieve):
3286         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
3287         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
3288         * NetworkProcess/cache/NetworkCacheStorage.h:
3289         (WebKit::NetworkCache::Storage::cacheMayContain):
3290
3291 2015-03-20  Chris Dumez  <cdumez@apple.com>
3292
3293         [WK2] Allow stale content when restoring the browser's session state
3294         https://bugs.webkit.org/show_bug.cgi?id=142916
3295         <rdar://problem/20243493>
3296
3297         Reviewed by Darin Adler.
3298
3299         Allow stale content when restoring the browser's session state
3300         (restoring all tabs from previous session), e.g.
3301         - Via History > Reopen All windows from previous session on Safari
3302         - Happens on startup for MobileSafari
3303
3304         I have verified that using "Open in tabs" on a bookmarks folder
3305         still does fresh loads (rdar://problem/8131355) as it is not using
3306         the restoreFromSessionState() code path.
3307
3308         * UIProcess/WebPageProxy.cpp:
3309         (WebKit::WebPageProxy::reattachToWebProcessForReload):
3310         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3311         (WebKit::WebPageProxy::goForward):
3312         (WebKit::WebPageProxy::goBack):
3313         (WebKit::WebPageProxy::goToBackForwardItem):
3314         (WebKit::WebPageProxy::restoreFromSessionState):
3315         * UIProcess/WebPageProxy.h:
3316         * WebProcess/WebPage/WebPage.cpp:
3317         (WebKit::WebPage::goToBackForwardItem):
3318         * WebProcess/WebPage/WebPage.h:
3319         * WebProcess/WebPage/WebPage.messages.in:
3320
3321 2015-03-20  Beth Dakin  <bdakin@apple.com>
3322
3323         [Immediate Actions] Should re-enable immediate actions for iBooks
3324         https://bugs.webkit.org/show_bug.cgi?id=142915
3325         -and corresponding-
3326         rdar://problem/19585689
3327
3328         Reviewed by Tim Horton.
3329
3330         * UIProcess/API/mac/WKView.mm:
3331         (-[WKView initWithFrame:processPool:configuration:webView:]):
3332
3333 2015-03-20  Alex Christensen  <achristensen@webkit.org>
3334
3335         Progress towards CMake on Mac.
3336         https://bugs.webkit.org/show_bug.cgi?id=136003
3337
3338         Reviewed by Chris Dumez.
3339
3340         * PlatformMac.cmake:
3341         Add include directories and forwarding headers.
3342         * Shared/API/APIObject.h:
3343         (API::ObjectImpl::operator new):
3344         * UIProcess/DrawingAreaProxy.h:
3345         (WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
3346         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
3347         Fix some unused parameter warnings.
3348
3349 2015-03-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3350
3351         [CMake] Remove duplicated cmake function calls in WebKit2/CMakeLists.txt
3352         https://bugs.webkit.org/show_bug.cgi?id=142901
3353
3354         Reviewed by Csaba Osztrogonác.
3355
3356         add_depencencies(), install() can support multiple targets or location.
3357         We don't need to call it twice.
3358
3359         * CMakeLists.txt: Additionaly move -DBUILDING_WEBKIT to PlatformGTK.cmake,
3360         because it is only used by GTK port.
3361
3362 2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
3363
3364         [GTK] Disable accelerated compositing on Wayland
3365         https://bugs.webkit.org/show_bug.cgi?id=142877
3366
3367         Reviewed by Carlos Garcia Campos.
3368
3369         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3370         (webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
3371         accelerated compositing on Wayland until the proper support for it lands.
3372
3373 2015-03-19  Andy Estes  <aestes@apple.com>
3374
3375         [Content Filtering] Add tests for unblock requests
3376         https://bugs.webkit.org/show_bug.cgi?id=142900
3377
3378         Reviewed by Andreas Kling.
3379
3380         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
3381         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::contentFilterDidBlockLoad.
3382         * UIProcess/WebFrameProxy.cpp:
3383         (WebKit::WebFrameProxy::didStartProvisionalLoad): Assigned a default-constructed ContentFilterUnblockHandler instead of calling clear().
3384         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Renamed from contentFilterDidHandleNavigationAction.
3385         Updated to use ContentFilterUnblockHandler's new API.
3386         (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Deleted.
3387         * UIProcess/WebFrameProxy.h:
3388         (WebKit::WebFrameProxy::contentFilterDidBlockLoad): Renamed from setContentFilterUnblockHandler.
3389         (WebKit::WebFrameProxy::setContentFilterUnblockHandler): Deleted.
3390         * UIProcess/WebPageProxy.cpp:
3391         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Called WebFrameProxy::didHandleContentFilterUnblockNavigation.
3392         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3393         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): If the unblock handler needs the UI process,
3394         send WebPageProxy::ContentFilterDidBlockLoadForFrame. Oterwise, call PolicyChecker::setContentFilterUnblockHandler.
3395
3396 2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
3397
3398         [GTK] Properly guard X11-specific code in BackingStore::createBackend()
3399         https://bugs.webkit.org/show_bug.cgi?id=142875
3400
3401         Reviewed by Martin Robinson.
3402
3403         * UIProcess/cairo/BackingStoreCairo.cpp:
3404         (WebKit::BackingStore::createBackend): Guard the GTK- and X11-specific
3405         bit of code with PLATFORM(GTK) and PLATFORM(X11). Testing GDK_WINDOWING_X11
3406         ensures that the GTK+ dependency has X11 support, but does not ensure
3407         that WebKitGTK+ has been configured to build for X11 environments (which
3408         is what PLATFORM(X11) ensures).
3409
3410 2015-03-19  Chris Dumez  <cdumez@apple.com>
3411
3412         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
3413         https://bugs.webkit.org/show_bug.cgi?id=142893
3414         <rdar://problem/19633737>
3415         <rdar://problem/19869257>
3416
3417         Reviewed by Antti Koivisto.
3418
3419         Allow stale content when restoring a killed / crashed WebProcess
3420         (similarly to a history navigation). This is actually what was intended
3421         as we call WebPage::goToBackForwardItem() in this case, which uses
3422         IndexedBackForward load type. However, this value was then ignored in
3423         FrameLoader::loadDifferentDocumentItem().
3424
3425         This patch gets rid of the special casing in
3426         FrameLoader::loadDifferentDocumentItem() and makes it clear at call
3427         sites when calling goToBackForwardItem() if we should allow stale
3428         content or not. If goToBackForwardItem() is called with the
3429         allowStaleContent flag off, we'll keep using the IndexedBackForward
3430         frame load type. However, if the flag is on, we'll use the Standard
3431         frame load type and do a fresh load.
3432
3433         * UIProcess/WebPageProxy.cpp:
3434         (WebKit::WebPageProxy::reattachToWebProcessForReload):
3435         Set allowStaleContent flag to true as we want to allow stale content
3436         when reloading a WebProcess after it crashed or was killed (behavior
3437         change).
3438
3439         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3440         Add allowStaleContent parameter so that call sites can decide which
3441         policy to use.
3442
3443         (WebKit::WebPageProxy::goForward):
3444         (WebKit::WebPageProxy::goBack):
3445         Set allowStaleContent flag to true as this is our policy for history
3446         navigations.
3447
3448         (WebKit::WebPageProxy::goToBackForwardItem):
3449         Add allowStaleContent parameter so that the call site can let us know
3450         what to do. This is useful as this is called not only for indexed
3451         back / forward navigations (allowing stale content) but also for
3452         restoring session state (forbidding state content:
3453         <rdar://problem/8131355>).
3454
3455         (WebKit::WebPageProxy::restoreFromSessionState):
3456         Call goToBackForwardItem() with allowStaleContent flag set to false
3457         as users expect fresh contents in this case. This method is called
3458         when:
3459         - Tabs are restored on Safari / MobileSafari startup
3460         - Tabs are restored via "History > Reopen All windows from last session"
3461
3462         * UIProcess/WebPageProxy.h:
3463         * WebProcess/WebPage/WebPage.cpp:
3464         (WebKit::WebPage::goToBackForwardItem):
3465         Add allowStaleContent parameter and use "Standard" frame load type
3466         instead of "IndexedBackForward" if it is false. This is needed as
3467         "IndexedBackForward" frame load type allows using stale content.
3468
3469         * WebProcess/WebPage/WebPage.h:
3470         * WebProcess/WebPage/WebPage.messages.in:
3471         Add allowStaleContent flag to GoToBackForwardItem message.
3472
3473 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
3474
3475         [Mac] Move MediaPlaybackTargetPicker
3476         https://bugs.webkit.org/show_bug.cgi?id=142889
3477
3478         Move WebMediaPlaybackTargetPickerProxy to WebCore so it can be used by
3479         both WK2 and WK1.
3480
3481         Reviewed by Tim Horton.
3482
3483         * UIProcess/PageClient.h:
3484         * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: Removed.
3485         * UIProcess/WebMediaPlaybackTargetPickerProxy.h: Removed.