Cursor doesn't change back to pointer when leaving Mail
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-03-26  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Cursor doesn't change back to pointer when leaving Mail
4         https://bugs.webkit.org/show_bug.cgi?id=132038
5
6         Reviewed by Anders Carlsson.
7
8         Fixed the bug by adding a cursor rect and making the primary tracking area update the cursor so that
9         AppKit will reset the cursor as it leaves the WebView.
10
11         We use nil cursor here since we manually update the cursor by calling [NSCursor set].
12
13         * UIProcess/API/mac/WKView.mm:
14         (-[WKView initWithFrame:processPool:configuration:webView:]):
15         * UIProcess/mac/PageClientImpl.mm:
16         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
17
18 2015-03-26  Michael Catanzaro  <mcatanzaro@igalia.com>
19
20         [Linux] SeccompFilters: improve the port-agnostic whitelist
21         https://bugs.webkit.org/show_bug.cgi?id=140064
22
23         Reviewed by Žan Doberšek.
24
25         Allow the web process to access several files and directories that it
26         was previously prohibited from accessing. This makes the web process
27         much less likely to break.
28
29         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
30         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
31
32 2015-03-26  Antti Koivisto  <antti@apple.com>
33
34         Remove unneeded isConditionalRequest check from NetworkResourceLoader
35         https://bugs.webkit.org/show_bug.cgi?id=143096
36
37         Reviewed by Anders Carlsson.
38
39         This check is leftover from implementation that allowed disk cache to validate conditional
40         request itself. The case can't happen as NetworkCache canRetrieve test does not allow
41         conditional requests in the first place.
42
43         * NetworkProcess/NetworkResourceLoader.cpp:
44         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
45         (WebKit::isConditionalRequest): Deleted.
46
47 2015-03-26  Antti Koivisto  <antti@apple.com>
48
49         Rename Storage::Entry to Storage::Record
50         https://bugs.webkit.org/show_bug.cgi?id=143101
51
52         Reviewed by Chris Dumez.
53
54         Lets have just one type called Entry in the cache code.
55
56         * NetworkProcess/cache/NetworkCache.cpp:
57         (WebKit::NetworkCache::Cache::retrieve):
58         (WebKit::NetworkCache::Cache::store):
59         (WebKit::NetworkCache::Cache::update):
60         (WebKit::NetworkCache::Cache::traverse):
61         (WebKit::NetworkCache::Cache::dumpContentsToFile):
62         * NetworkProcess/cache/NetworkCacheEntry.cpp:
63         (WebKit::NetworkCache::Entry::Entry):
64         (WebKit::NetworkCache::Entry::encodeAsStorageRecord):
65         (WebKit::NetworkCache::Entry::decodeStorageRecord):
66         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
67         (WebKit::NetworkCache::Entry::buffer):
68         (WebKit::NetworkCache::Entry::shareableResourceHandle):
69         (WebKit::NetworkCache::Entry::encode): Deleted.
70         (WebKit::NetworkCache::Entry::decode): Deleted.
71         (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry): Deleted.
72         * NetworkProcess/cache/NetworkCacheEntry.h:
73         (WebKit::NetworkCache::Entry::sourceStorageRecord):
74         (WebKit::NetworkCache::Entry::sourceStorageEntry): Deleted.
75         * NetworkProcess/cache/NetworkCacheStorage.cpp:
76         (WebKit::NetworkCache::RecordMetaData::RecordMetaData):
77         (WebKit::NetworkCache::decodeRecordMetaData):
78         (WebKit::NetworkCache::decodeRecordHeader):
79         (WebKit::NetworkCache::decodeRecord):
80         (WebKit::NetworkCache::encodeRecordMetaData):
81         (WebKit::NetworkCache::encodeRecordHeader):
82         (WebKit::NetworkCache::Storage::dispatchReadOperation):
83         (WebKit::NetworkCache::retrieveFromMemory):
84         (WebKit::NetworkCache::Storage::store):
85         (WebKit::NetworkCache::Storage::update):
86         (WebKit::NetworkCache::Storage::traverse):
87         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
88         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
89         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
90         (WebKit::NetworkCache::EntryMetaData::EntryMetaData): Deleted.
91         (WebKit::NetworkCache::decodeEntryMetaData): Deleted.
92         (WebKit::NetworkCache::decodeEntryHeader): Deleted.
93         (WebKit::NetworkCache::decodeEntry): Deleted.
94         (WebKit::NetworkCache::encodeEntryMetaData): Deleted.
95         (WebKit::NetworkCache::encodeEntryHeader): Deleted.
96         * NetworkProcess/cache/NetworkCacheStorage.h:
97
98 2015-03-26  Chris Dumez  <cdumez@apple.com>
99
100         [WK2] Let the compiler generate the NetworkCache::Key move constructor
101         https://bugs.webkit.org/show_bug.cgi?id=143079
102
103         Reviewed by Antti Koivisto.
104
105         Let the compiler generate the NetworkCache::Key move constructor. The
106         generated one will do exactly the same thing as the one we had except
107         that it will move the m_hash member as well. I don't see any reason why
108         we weren't moving this member before (it is an std::array<uint8_t, 16>).
109
110         Also have the compiler generate a move assignment operator for
111         consistency. Although it is not currently useful, it could be at some
112         point.
113
114         * NetworkProcess/cache/NetworkCacheKey.cpp:
115         (WebKit::NetworkCache::Key::Key): Deleted.
116         * NetworkProcess/cache/NetworkCacheKey.h:
117
118 2015-03-26  Chris Dumez  <cdumez@apple.com>
119
120         [WK2][NetworkCache] Compute if a cached response has expired only when actually needed
121         https://bugs.webkit.org/show_bug.cgi?id=143070
122
123         Reviewed by Antti Koivisto.
124
125         Compute if a cached response has expired only when actually needed:
126         - This is not a history navigation
127         and
128         - It does not have "Cache-Control: no-cache" header
129
130         Previously, we would always determine if the response has expired and
131         we often end up not using this information.
132
133         * NetworkProcess/cache/NetworkCache.cpp:
134         (WebKit::NetworkCache::responseHasExpired):
135         (WebKit::NetworkCache::canUse):
136
137 2015-03-26  Zan Dobersek  <zdobersek@igalia.com>
138
139         Avoid the Vector<> copy in WebTouchEvent constructor
140         https://bugs.webkit.org/show_bug.cgi?id=143043
141
142         Reviewed by Carlos Garcia Campos.
143
144         Have the WebTouchEvent accept a Vector<> rvalue.
145         The relevant code is updated so the Vector<> object is moved
146         through the call chain and finally into the WebTouchEvent constructor.
147
148         * Shared/NativeWebTouchEvent.h:
149         * Shared/WebEvent.h:
150         * Shared/WebTouchEvent.cpp:
151         (WebKit::WebTouchEvent::WebTouchEvent):
152         * Shared/efl/WebEventFactory.cpp:
153         (WebKit::WebEventFactory::createWebTouchEvent):
154         * Shared/gtk/NativeWebTouchEventGtk.cpp:
155         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
156         * Shared/gtk/WebEventFactory.cpp:
157         (WebKit::WebEventFactory::createWebTouchEvent):
158         * Shared/gtk/WebEventFactory.h:
159         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
160         (webkitWebViewBaseTouchEvent):
161
162 2015-03-25  Chris Dumez  <cdumez@apple.com>
163
164         [WK2] WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always call the FramePolicyFunction
165         https://bugs.webkit.org/show_bug.cgi?id=143036
166         <rdar://problem/20252438>
167         <rdar://problem/13811738>
168
169         Reviewed by Alexey Proskuryakov.
170
171         WebFrameLoaderClient::dispatchDecidePolicyForResponse() should always
172         call the FramePolicyFunction. Previously, it would fail to do in 2
173         cases:
174         - m_frame->page() returns null
175         or
176         - webPage->sendSync() returns false
177
178         If the FramePolicyFunction is not called, we will fail to clear the
179         callback in the PolicyChecker and
180         DocumentLoader::continueAfterContentPolicy() will not be called.
181
182         DocumentLoader::continueAfterContentPolicy() is in charge of resetting
183         m_waitingForContentPolicy flag to false. This could therefore explain
184         the following assertion being hit in DocumentLoader::detachFromFrame()
185         (see <rdar://problem/20252438>):
186         RELEASE_ASSERT(!m_waitingForContentPolicy)
187
188         Also, as the PolicyChecker callback is not cleared, it could make it
189         possible for DocumentLoader::continueAfterContentPolicy() to be called
190         *after* the load is finished, when later canceling the PolicyCallback:
191         FrameLoader::stopAllLoaders()
192          -> PolicyChecker::stopCheck()
193           -> PolicyCallback::cancel()
194            -> DocumentLoader::continueAfterContentPolicy(PolicyIgnore)
195
196         Calling continueAfterContentPolicy(PolicyIgnore) after the load is
197         finished would be bad and could explain some of the crashes we've seen
198         in DocumentLoader::continueAfterContentPolicy() ->
199         DocumentLoader:: stopLoadingForPolicyChange() (see
200         <rdar://problem/13811738>).
201
202         This patch also applies the same fix to
203         dispatchDecidePolicyForNewWindowAction() and
204         dispatchDecidePolicyForNavigationAction() as they use the same pattern.
205
206         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
207         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
208         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
209         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
210
211 2015-03-25  Tim Horton  <timothy_horton@apple.com>
212
213         Add a preference to prevent "user-scalable=no" from having any effect
214         https://bugs.webkit.org/show_bug.cgi?id=143032
215
216         Reviewed by Sam Weinig.
217
218         * Shared/WebPreferencesDefinitions.h:
219         * WebProcess/WebPage/WebPage.cpp:
220         (WebKit::WebPage::updatePreferences):
221         Add a preference and push it to the ViewportConfiguration.
222
223 2015-03-25  Beth Dakin  <bdakin@apple.com>
224
225         REGRESSION (r181660): Force click url preview doesn't have a TextIndicator in Mail
226         https://bugs.webkit.org/show_bug.cgi?id=143064
227         -and corresponding-
228         rdar://problem/20251440
229
230         Reviewed by Tim Horton.
231
232         The TextIndicator was getting set to nil by the call to 
233         _dismissContentRelativeChildWindows in mouseDown. That line of code was added by 
234         http://trac.webkit.org/changeset/177242 to work around a bug in another component 
235         that has now been resolved, so it no longer appears to be necessary. 
236
237         * UIProcess/API/mac/WKView.mm:
238         (-[WKView mouseDown:]):
239
240 2015-03-25  Anders Carlsson  <andersca@apple.com>
241
242         Add network and application cache directories to WebsiteDataStore
243         https://bugs.webkit.org/show_bug.cgi?id=143063
244
245         Reviewed by Sam Weinig.
246
247         Create a WebKit directory under ~/Library/Caches/<Bundle ID> for non-sandboxed applications,
248         and ~/Library/Caches for sandboxed applications. Create NetworkCache and OfflineWebApplicationCache
249         subdirectories. These directories will be used with the modern WebKit API.
250
251         * UIProcess/API/APIWebsiteDataStore.h:
252         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
253         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
254         (API::WebsiteDataStore::defaultDataStoreConfiguration):
255         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
256         (WebKit::WebsiteDataStore::WebsiteDataStore):
257         * UIProcess/WebsiteData/WebsiteDataStore.h:
258
259 2015-03-25  Sam Weinig  <sam@webkit.org>
260
261         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
262
263         * Shared/WebCompiledContentExtension.cpp:
264         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
265         * UIProcess/API/C/WKUserContentFilterRef.cpp:
266         (WKUserContentFilterCreate):
267         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
268         (-[_WKUserContentFilter initWithName:serializedRules:]):
269
270 2015-03-25  Sam Weinig  <sam@webkit.org>
271
272         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
273         https://bugs.webkit.org/show_bug.cgi?id=143059
274
275         Reviewed by Alex Christensen.
276
277         * Shared/WebCompiledContentExtension.cpp:
278         * Shared/WebCompiledContentExtension.h:
279         (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient):
280         (WebKit::LegacyContentExtensionCompilationClient::writeBytecode):
281         (WebKit::LegacyContentExtensionCompilationClient::writeActions):
282         Add subclass of ContentExtensionCompilationClient for use with the non-file backed content
283         extensions.
284
285         * UIProcess/API/C/WKUserContentFilterRef.cpp:
286         (WKUserContentFilterCreate):
287         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
288         (-[_WKUserContentFilter initWithName:serializedRules:]):
289         Update to use the new interface of compileRuleList().
290
291 2015-03-25  Ryosuke Niwa  <rniwa@webkit.org>
292
293         Web Inspector: Switching tabs to window with inspector open prohibits typing into console
294         https://bugs.webkit.org/show_bug.cgi?id=126800
295
296         Reviewed by Anders Carlsson.
297
298         This is a regression from r85356 and r83814. These two patches made WKWebView clear its selection
299         when WKView resigns the first responder without ever restoring it even if WKView later becomes
300         the first responder again. This is problematic when a text field or a editing host element had been
301         focused and selected prior to the resignation since the editing code uses the selection to determine
302         the editability of the element.
303
304         Fixed the bug by restoring selection in [WKView becomeFirstResponder] if the selection is empty.
305
306         * UIProcess/API/mac/WKView.mm:
307         (-[WKView becomeFirstResponder]):
308         * UIProcess/WebPageProxy.cpp:
309         (WebKit::WebPageProxy::restoreSelectionInFocusedEditableElement):
310         * UIProcess/WebPageProxy.h:
311         * WebProcess/WebPage/WebPage.cpp:
312         (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
313         * WebProcess/WebPage/WebPage.h:
314         * WebProcess/WebPage/WebPage.messages.in:
315
316 2015-03-25  Beth Dakin  <bdakin@apple.com>
317
318         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
319         force preview
320         https://bugs.webkit.org/show_bug.cgi?id=143057
321         -and corresponding-
322         rdar://problem/20251436
323
324         Reviewed by Tim Horton.
325
326         Always call _page->immediateActionDidUpdate() so that the EventHandler’s 
327         ImmediateActionStage is appropriately updated.
328         * UIProcess/mac/WKImmediateActionController.mm:
329         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
330
331         Update the EventHandler’s ImmediateActionStage.
332         * WebProcess/WebPage/mac/WebPageMac.mm:
333         (WebKit::WebPage::immediateActionDidUpdate):
334
335 2015-03-25  Antti Koivisto  <antti@apple.com>
336
337         Separate entry decoding from validation
338         https://bugs.webkit.org/show_bug.cgi?id=143052
339
340         Reviewed by Chris Dumez.
341
342         Make NetworkCache::Cache a class and move it to a file of its own.
343         Move the encoding/decoding code there.
344
345         * NetworkProcess/NetworkProcess.cpp:
346         (WebKit::fetchDiskCacheEntries):
347         (WebKit::clearDiskCacheEntries):
348         * NetworkProcess/NetworkResourceLoader.cpp:
349         (WebKit::sendReplyToSynchronousRequest):
350         (WebKit::NetworkResourceLoader::start):
351         (WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
352         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
353         (WebKit::NetworkResourceLoader::validateCacheEntry):
354         * NetworkProcess/NetworkResourceLoader.h:
355         * NetworkProcess/cache/NetworkCache.cpp:
356         (WebKit::NetworkCache::collectVaryingRequestHeaders):
357         (WebKit::NetworkCache::canUse):
358
359             Focused function for deciding if we can use a cache entry and if it needs validation.
360
361         (WebKit::NetworkCache::Cache::retrieve):
362         (WebKit::NetworkCache::Cache::store):
363         (WebKit::NetworkCache::Cache::update):
364         (WebKit::NetworkCache::Cache::traverse):
365         (WebKit::NetworkCache::encodeStorageEntry): Deleted.
366         (WebKit::NetworkCache::decodeStorageEntry): Deleted.
367         * NetworkProcess/cache/NetworkCache.h:
368         * NetworkProcess/cache/NetworkCacheEntry.cpp: Added.
369         (WebKit::NetworkCache::Entry::Entry):
370         (WebKit::NetworkCache::Entry::encode):
371         (WebKit::NetworkCache::Entry::decode):
372         (WebKit::NetworkCache::Entry::initializeBufferFromStorageEntry):
373         (WebKit::NetworkCache::Entry::buffer):
374         (WebKit::NetworkCache::Entry::shareableResourceHandle):
375         (WebKit::NetworkCache::Entry::needsValidation):
376         (WebKit::NetworkCache::Entry::setNeedsValidation):
377         * NetworkProcess/cache/NetworkCacheEntry.h: Added.
378         (WebKit::NetworkCache::Entry::key):
379         (WebKit::NetworkCache::Entry::timeStamp):
380         (WebKit::NetworkCache::Entry::response):
381         (WebKit::NetworkCache::Entry::varyingRequestHeaders):
382         (WebKit::NetworkCache::Entry::sourceStorageEntry):
383         * NetworkProcess/cache/NetworkCacheStatistics.h:
384         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
385         (WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
386         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
387         * WebKit2.xcodeproj/project.pbxproj:
388
389 2015-03-25  David Hyatt  <hyatt@apple.com>
390
391         Add a pref to enable the new block-inside-inline model
392         https://bugs.webkit.org/show_bug.cgi?id=143050
393
394         Reviewed by Sam Weinig.
395
396         * Shared/WebPreferencesDefinitions.h:
397         * UIProcess/API/C/WKPreferences.cpp:
398         (WKPreferencesSetNewBlockInsideInlineModelEnabled):
399         (WKPreferencesGetNewBlockInsideInlineModelEnabled):
400         * UIProcess/API/C/WKPreferencesRefPrivate.h:
401         * WebProcess/WebPage/WebPage.cpp:
402         (WebKit::WebPage::updatePreferences):
403
404 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
405
406         [WK2] WebUserMediaClient::pageDestroyed() virtual method should be marked as override
407         https://bugs.webkit.org/show_bug.cgi?id=143046
408
409         Reviewed by Carlos Garcia Campos.
410
411         * WebProcess/WebCoreSupport/WebUserMediaClient.h: Mark the WebUserMediaClient::pageDestroyed()
412         method, inherited from the WebCore::UserMediaClient, as an override.
413
414 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
415
416         [GTK][WK2] WebPageProxy::failedToShowPopupMenu() virtual method should be marked as override
417         https://bugs.webkit.org/show_bug.cgi?id=143045
418
419         Reviewed by Carlos Garcia Campos.
420
421         * UIProcess/WebPageProxy.h: Mark the failedToShowPopupMenu(), inherited from
422         the WebPopupMenuProxy::Client class, as overridden.
423
424 2015-03-25  Zan Dobersek  <zdobersek@igalia.com>
425
426         [WK2] Clean up DrawingAreaImpl vtable overrides
427         https://bugs.webkit.org/show_bug.cgi?id=143044
428
429         Reviewed by Carlos Garcia Campos.
430
431         Declare virtual methods of the DrawingAreaImpl class as overridden where necessary.
432
433         * WebProcess/WebPage/DrawingAreaImpl.h:
434         (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Deleted.
435         (WebKit::DrawingAreaImpl::layerTreeHost): Deleted.
436
437 2015-03-24  Ryosuke Niwa  <rniwa@webkit.org>
438
439         Inspector doesn't get focused when opened in dock mode
440         https://bugs.webkit.org/show_bug.cgi?id=143030
441
442         Reviewed by Anders Carlsson.
443
444         The bug was caused by platformBringToFront and platformAttach calling makeFirstResponder on WKWebView,
445         which aren't intended to become the first responder. Fixed the bug by calling makeFirstResponder on the WKView
446         subview of the WKWebView, which is intended to be used as the first responder on behalf of the web view.
447
448         * UIProcess/mac/WebInspectorProxyMac.mm:
449         (WebKit::WebInspectorProxy::platformBringToFront):
450         (WebKit::WebInspectorProxy::platformAttach):
451
452 2015-03-24  Chris Dumez  <cdumez@apple.com>
453
454         [WK2] Responses with 302 HTTP Status Code should not be cached
455         https://bugs.webkit.org/show_bug.cgi?id=143028
456         <rdar://problem/19714040>
457
458         Reviewed by Antti Koivisto.
459
460         Responses with 302 HTTP Status Code should not be cached as per
461         RFC 7231:
462         http://tools.ietf.org/html/rfc7231#section-6.1
463
464         This patch updates our disk cache policy accordingly.
465
466         Test: http/tests/cache/disk-cache/disk-cache-302-status-code.html
467
468         * NetworkProcess/cache/NetworkCache.cpp:
469         (WebKit::NetworkCache::canStore):
470
471 2015-03-24  Anders Carlsson  <andersca@apple.com>
472
473         Fix crash in WebKit::RemoteObjectRegistry::sendInvocation
474         https://bugs.webkit.org/show_bug.cgi?id=143027
475         rdar://problem/20208674
476
477         Reviewed by Sam Weinig.
478
479         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
480         (-[WKWebProcessPlugInBrowserContextController dealloc]):
481         Make sure to invalidate the _WKRemoteObjectRegistry like we do in the UI process.
482
483 2015-03-24  Chris Dumez  <cdumez@apple.com>
484
485         [WK2] Responses with 204 HTTP Status Code should be cacheable by default
486         https://bugs.webkit.org/show_bug.cgi?id=143020
487         <rdar://problem/20281529>
488
489         Reviewed by Antti Koivisto.
490
491         Make responses with 204 HTTP Status Code cacheable by default, as
492         per RFC 7231:
493         http://tools.ietf.org/html/rfc7231#section-6.3.5
494
495         Test: http/tests/cache/disk-cache/disk-cache-204-status-code.html
496
497         * NetworkProcess/cache/NetworkCache.cpp:
498         (WebKit::NetworkCache::canStore):
499
500 2015-03-24  Enrica Casucci  <enrica@apple.com>
501
502         [iOS] Remove unused keyboard code in WKSelectPopover class.
503         https://bugs.webkit.org/show_bug.cgi?id=143021
504
505         Reviewed by Joseph Pecoraro.
506
507         WKSelectPopover created an instance of UIKeyboard that was
508         initialized in initWithView but never used. Removing the
509         obsolete code.
510
511         * UIProcess/ios/forms/WKFormSelectPopover.mm:
512         (-[WKSelectPopover initWithView:hasGroups:]):
513
514 2015-03-24  Dan Bernstein  <mitz@apple.com>
515
516         WebKit2 part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
517         https://bugs.webkit.org/show_bug.cgi?id=143023
518
519         Reviewed by Tim Horton.
520
521         * UIProcess/API/Cocoa/WKWebView.mm:
522         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): If the view is in a
523         window, use CARenderServerRenderLayerWithTransform to synchronously capture a snapshot of
524         its layer tree into an IOSurfcae, then call the completion handler with an image created
525         from the IOSurface.
526
527 2015-03-24  Beth Dakin  <bdakin@apple.com>
528
529         Add events related to force click gesture
530         https://bugs.webkit.org/show_bug.cgi?id=142836
531         -and corresponding-
532         rdar://problem/20210239
533
534         Reviewed by Dean Jackson.
535
536         ActionMenuHitTestResult has a new bool indicating whether to not the HitTestResult 
537         will prevent default. 
538         * Shared/mac/ActionMenuHitTestResult.h:
539         * Shared/mac/ActionMenuHitTestResult.mm:
540         (WebKit::ActionMenuHitTestResult::encode):
541         (WebKit::ActionMenuHitTestResult::decode):
542
543         Send immediateActionDidUpdate and the normalized force over the the WebProcess.
544         * UIProcess/WebPageProxy.cpp:
545         (WebKit::WebPageProxy::immediateActionDidUpdate):
546         * UIProcess/WebPageProxy.h:
547
548         We need a dummy animation controller when web content is overriding the default 
549         behavior.
550         * UIProcess/mac/WKImmediateActionController.mm:
551
552         Send along the update information.
553         (-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):
554
555         Use the dummy animation controller if default has been prevented.
556         (-[WKImmediateActionController _defaultAnimationController]):
557         (-[WKImmediateActionController _updateImmediateActionItem]):
558
559         Keep track of whether m_lastActionMenuHitTes prevented the default immediate 
560         action behavior.
561         * WebProcess/WebPage/WebPage.cpp:
562         (WebKit::WebPage::WebPage):
563         * WebProcess/WebPage/WebPage.h:
564         * WebProcess/WebPage/WebPage.messages.in:
565
566         Call dispatchMouseForceMayBegin() at hit test time.
567         * WebProcess/WebPage/mac/WebPageMac.mm:
568         (WebKit::WebPage::performActionMenuHitTestAtLocation):
569
570         Call dispatchMouseForceChanged() if appropriate.
571         (WebKit::WebPage::immediateActionDidUpdate):
572
573         Call dispatchMouseForceCancelled() if appropriate.
574         (WebKit::WebPage::immediateActionDidCancel):
575
576         Call dispatchMouseForceDown() if appropriate.
577         (WebKit::WebPage::immediateActionDidComplete):
578
579 2015-03-24  Anders Carlsson  <andersca@apple.com>
580
581         Fix designated initializer violations
582         https://bugs.webkit.org/show_bug.cgi?id=143016
583         rdar://problem/20268858
584
585         Reviewed by Dan Bernstein.
586
587         Move -[WKProcessPool _initWithConfiguration:] to a class extension so we can make it the designated initializer.
588
589         * UIProcess/API/Cocoa/WKProcessPool.mm:
590         (-[WKProcessPool _initWithConfiguration:]):
591         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
592
593 2015-03-24  Chris Dumez  <cdumez@apple.com>
594
595         [WK2] Responses with 404 HTTP Status Code should be cacheable by default
596         https://bugs.webkit.org/show_bug.cgi?id=143014
597         <rdar://problem/20280310>
598
599         Reviewed by Antti Koivisto.
600
601         Make responses with 404 HTTP Status Code cacheable by default, as
602         per RFC 7231:
603         http://tools.ietf.org/html/rfc7231#section-6.5.4
604
605         Test: http/tests/cache/disk-cache/disk-cache-404-status-code.html
606
607         * NetworkProcess/cache/NetworkCache.cpp:
608         (WebKit::NetworkCache::canStore):
609
610 2015-03-24  Chris Dumez  <cdumez@apple.com>
611
612         [WK2] Remove NetworkCache FIXME comment about caching responses to OPTIONS requests
613         https://bugs.webkit.org/show_bug.cgi?id=143009
614
615         Reviewed by Andreas Kling.
616
617         Remove NetworkCache FIXME comment about caching responses to OPTIONS
618         method as RFC 7234 says "Responses to the OPTIONS method are not
619         cacheable" [1].
620
621         [1] http://tools.ietf.org/html/rfc7231#page-31
622
623         * NetworkProcess/cache/NetworkCache.cpp:
624         (WebKit::NetworkCache::canRetrieve):
625
626 2015-03-24  Chris Dumez  <cdumez@apple.com>
627
628         [WK2] NetworkCache retrievals fail for entries with no body
629         https://bugs.webkit.org/show_bug.cgi?id=142979
630         <rdar://problem/20264100>
631
632         Reviewed by Antti Koivisto.
633
634         NetworkCache retrievals were failing for entries with no body because
635         decodeEntry() doesn't correctly handle this case. In particular, the
636         following check fails:
637         "metaData.bodyOffset + metaData.bodySize == fileData.size()".
638         This is because bodyOffset is pageSize-aligned.
639
640         As a result, the following resource on apple.com is stored in the cache
641         but we fail to reuse it and reload it from the network every time:
642         http://images.apple.com/home/styles/promos.css
643
644         This patch updates decodeEntry() to create a null Data object for the
645         body if bodySize is 0.
646
647         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
648         (WebKit::NetworkCache::Data::data):
649         Do not attempt to initialize m_data if m_dispatchData is null as the
650         call to dispatch_data_create_map() would then crash. We now return
651         null in this case. This is needed as decodeStorageEntry() in
652         NetworkCache.cpp constructs a SharedBuffer from
653         storageEntry.body.data() and the body may be null.
654
655         * NetworkProcess/cache/NetworkCacheStorage.cpp:
656         (WebKit::NetworkCache::decodeEntry):
657
658 2015-03-24  Chris Dumez  <cdumez@apple.com>
659
660         [WK2] The WebKit network cache does not cache responses with "Content-Disposition: attachment" header
661         https://bugs.webkit.org/show_bug.cgi?id=142989
662         <rdar://problem/20265992>
663
664         Reviewed by Antti Koivisto.
665
666         Update our WebKit network cache policy to cache responses with
667         "Content-Disposition: attachment" header. There is no reason we cannot
668         cache these and our memory cache already does.
669
670         This was causing a decent amount of cache misses in the wild. I have
671         noticed for example that when loading disney.com, we fail to cache the
672         following resources because of this policy:
673         http://pagead2.googlesyndication.com/pagead/osd.js
674         http://pagead2.googlesyndication.com/pagead/show_companion_ad.js
675
676         Those resources have Cache-Control headers that indicate they are meant
677         to be cacheable.
678
679         Test: http/tests/cache/disk-cache-validation-attachment.html
680
681         * NetworkProcess/cache/NetworkCache.cpp:
682         (WebKit::NetworkCache::canStore):
683
684 2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>
685
686         Unreviewed, another attempt to fix 32-bit build after r181881.
687
688         * UIProcess/WebInspectorProxy.h:
689
690 2015-03-23  Joseph Pecoraro  <pecoraro@apple.com>
691
692         Unreviewed, attempt to fix 32-bit build after r181881.
693
694         * UIProcess/API/Cocoa/WKViewPrivate.h:
695         * UIProcess/API/mac/WKView.mm:
696
697 2015-03-19  Timothy Hatcher  <timothy@apple.com>
698
699         Web Inspector: Support attaching to another view other than the WKView
700         https://bugs.webkit.org/show_bug.cgi?id=142892
701
702         Reviewed by Tim Horton.
703
704         * UIProcess/API/C/WKInspector.cpp:
705         (WKInspectorAttach): Drive by fix so it used the last attachment side.
706
707         * UIProcess/API/Cocoa/WKViewPrivate.h:
708         * UIProcess/API/mac/WKView.mm:
709         (-[WKView _inspectorAttachmentView]): Added.
710         (-[WKView _setInspectorAttachmentView:]): Added.
711
712         * UIProcess/WebInspectorProxy.cpp:
713         (WebKit::WebInspectorProxy::createInspectorPage):
714         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
715         Use platformCanAttach as a final check incase there is a different
716         attachment view that the platform knows about.
717
718         * UIProcess/WebInspectorProxy.h:
719         (WebKit::WebInspectorProxy::attachmentSide): Added.
720         (WebKit::WebInspectorProxy::platformCanAttach): Added.
721
722         * UIProcess/mac/WebInspectorProxyMac.mm:
723         (WebKit::WebInspectorProxy::attachmentViewDidChange): Added.
724         (WebKit::WebInspectorProxy::closeTimerFired):
725         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
726         (WebKit::WebInspectorProxy::platformCanAttach):
727         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
728         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
729         (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
730         (WebKit::WebInspectorProxy::platformAttach):
731         (WebKit::WebInspectorProxy::platformDetach):
732         Use the _inspectorAttachmentView and change how the frame change notification
733         is observed and follow the attachment view as it changes.
734
735 2015-03-23  Tim Horton  <timothy_horton@apple.com>
736
737         Images shared to photos via action menu are padded with zeroes at the end
738         https://bugs.webkit.org/show_bug.cgi?id=142985
739
740         Reviewed by Anders Carlsson.
741
742         * Shared/mac/ActionMenuHitTestResult.h:
743         * Shared/mac/ActionMenuHitTestResult.mm:
744         (WebKit::ActionMenuHitTestResult::encode):
745         (WebKit::ActionMenuHitTestResult::decode):
746         * WebProcess/WebPage/mac/WebPageMac.mm:
747         (WebKit::WebPage::performActionMenuHitTestAtLocation):
748         Send the size of the image separately from the SharedMemory.
749         The SharedMemory's size can be rounded up, so we need to keep the original
750         size around in order to write the data to disk.
751
752         * UIProcess/mac/WKActionMenuController.mm:
753         (-[WKActionMenuController _hitTestResultImage]):
754         (-[WKActionMenuController _addImageToPhotos:]):
755         Use the image size instead of the SharedMemory size.
756
757 2015-03-23  Enrica Casucci  <enrica@apple.com>
758
759         [iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.
760         https://bugs.webkit.org/show_bug.cgi?id=142913
761         rdar://problem/16400033
762
763         Reviewed by Sam Weinig.
764
765         When looking for the best candidate range at the given position,
766         we should skip nodes that don't have a renderer.
767         This is a speculative fix.
768
769         * WebProcess/WebPage/ios/WebPageIOS.mm:
770         (WebKit::WebPage::rangeForWebSelectionAtPosition):
771
772 2015-03-23  Alexey Proskuryakov  <ap@apple.com>
773
774         REGRESSION (Yosemite): WKView visibility notifications are messed up
775         https://bugs.webkit.org/show_bug.cgi?id=142945
776
777         Reviewed by Tim Horton.
778
779         As these notifications cannot be used by NSView subclasses, create a separate
780         object for observing them.
781
782         * UIProcess/API/mac/WKView.mm:
783         (-[WKWindowVisibilityObserver initWithView:]):
784         (-[WKWindowVisibilityObserver startObserving:]):
785         (-[WKWindowVisibilityObserver stopObserving:]):
786         (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
787         (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
788         (-[WKView addWindowObserversForWindow:]):
789         (-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
790         which we never start to observe.
791         (-[WKView initWithFrame:processPool:configuration:webView:]):
792         * UIProcess/API/mac/WKViewInternal.h:
793
794 2015-03-23  Anders Carlsson  <andersca@apple.com>
795
796         Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
797         https://bugs.webkit.org/show_bug.cgi?id=133692
798         rdar://problem/17255947
799
800         Reviewed by Alexey Proskuryakov.
801
802         Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript
803         where we need the plug-in to stay around after the call.
804
805         * Shared/Plugins/NPObjectMessageReceiver.cpp:
806         (WebKit::NPObjectMessageReceiver::invoke):
807         (WebKit::NPObjectMessageReceiver::invokeDefault):
808         (WebKit::NPObjectMessageReceiver::getProperty):
809         (WebKit::NPObjectMessageReceiver::setProperty):
810         (WebKit::NPObjectMessageReceiver::construct):
811
812 2015-03-23  Anders Carlsson  <andersca@apple.com>
813
814         Put the WK_NULLABLE_SPECIFIER in the right place for block parameters
815         https://bugs.webkit.org/show_bug.cgi?id=142975
816         rdar://problem/19863930
817
818         Reviewed by Dan Bernstein.
819
820         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
821         * UIProcess/API/Cocoa/WKUIDelegate.h:
822         * UIProcess/API/Cocoa/WKWebView.h:
823
824 2015-03-23  Tim Horton  <timothy_horton@apple.com>
825
826         Add a share item to the link action menu
827         https://bugs.webkit.org/show_bug.cgi?id=142961
828         <rdar://problem/19198374>
829
830         Reviewed by Beth Dakin.
831
832         * UIProcess/mac/WKActionMenuController.mm:
833         (-[WKActionMenuController _hitLinkURL]):
834         Factor out _hitLinkURL from various places.
835
836         (-[WKActionMenuController _openURLFromActionMenu:]):
837         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
838         (-[WKActionMenuController _defaultMenuItemsForVideo]):
839         (-[WKActionMenuController _defaultMenuItemsForImage]):
840         (-[WKActionMenuController _createActionMenuItemForTag:]):
841         (-[WKActionMenuController _createShareActionMenuItemForTag:withItems:]):
842         Adopt -[NSMenuItem standardShareMenuItemWithItems].
843         All of the null-checking is unnecessary as it's impossible to enter
844         these functions with a null image/etc.
845
846         (-[WKActionMenuController _defaultMenuItemsForLink]):
847         * Shared/API/c/WKActionMenuItemTypes.h:
848         Add a 'Share' item to the link menu.
849
850 2015-03-23  Zan Dobersek  <zdobersek@igalia.com>
851
852         [GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
853         https://bugs.webkit.org/show_bug.cgi?id=142964
854
855         Reviewed by Carlos Garcia Campos.
856
857         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
858         (ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
859         instead of C's abs(). The templated nature of std::abs() ensures the proper
860         computation that matches the types of the passed-in values, and shuts down
861         a warning when compiling with Clang.
862
863 2015-03-23  Zan Dobersek  <zdobersek@igalia.com>
864
865         [GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
866         https://bugs.webkit.org/show_bug.cgi?id=142963
867
868         Reviewed by Carlos Garcia Campos.
869
870         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
871         (webkitBackForwardListChanged): This function only reads from the passed-in
872         Vector of removed items, so only a const lvalue reference to the Vector
873         is needed.
874         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
875
876 2015-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
877
878         [GTK] Add a configure option to build without Redirected XComposite Window
879         https://bugs.webkit.org/show_bug.cgi?id=142865
880
881         Reviewed by Žan Doberšek.
882
883         Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
884         USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).
885
886         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
887         (webkitWebViewBaseRealize): Use the XID of the WebKitWebView
888         window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
889         is disabled.
890         (webkitWebViewRenderAcceleratedCompositingResults):
891         (resizeWebKitWebViewBaseFromAllocation):
892         (webkitWebViewBaseEnterAcceleratedCompositingMode):
893         (webkitWebViewBaseExitAcceleratedCompositingMode):
894         * UIProcess/gtk/RedirectedXCompositeWindow.cpp:
895         * UIProcess/gtk/RedirectedXCompositeWindow.h:
896
897 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
898
899         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
900         https://bugs.webkit.org/show_bug.cgi?id=142940
901
902         Reviewed by Sam Weinig.
903
904         * WebProcess/WebPage/mac/WebPageMac.mm:
905         (WebKit::WebPage::playbackTargetSelected): Argument to didChoosePlaybackTarget is now const.
906
907 2015-03-22  Anders Carlsson  <andersca@apple.com>
908
909         _WKWebsiteDataStore should clear WebSQL databases
910         https://bugs.webkit.org/show_bug.cgi?id=142947
911         rdar://problem/20242174
912
913         Reviewed by Sam Weinig.
914
915         * Shared/WebsiteData/WebsiteDataTypes.h:
916         Add WebsiteDataTypeWebSQLDatabases.
917
918         * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
919         (API::WebsiteDataStore::defaultDataStoreConfiguration):
920         Initialize configuration.webSQLDatabaseDirectory.
921
922         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
923         Add WKWebsiteDataTypeWebSQLDatabases.
924
925         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
926         (dataTypesToString):
927         Handle WKWebsiteDataTypeWebSQLDatabases.
928
929         * UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
930         (WebKit::toWebsiteDataTypes):
931         (WebKit::toWKWebsiteDataTypes):
932         Handle WKWebsiteDataTypeWebSQLDatabases and WebsiteDataTypes::WebsiteDataTypeWebSQLDatabases.
933
934         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
935         (WebKit::WebsiteDataStore::WebsiteDataStore):
936         Initialize m_webSQLDatabaseDirectory and add a queue member variable.
937
938         (WebKit::WebsiteDataStore::fetchData):
939         Fetch database origins.
940     
941         (WebKit::WebsiteDataStore::removeData):
942         Remove databases.
943
944         * UIProcess/WebsiteData/WebsiteDataStore.h:
945         Add new members.
946
947 2015-03-22  Dan Bernstein  <mitz@apple.com>
948
949         [iOS] Expose WebPageProxy::setInitialFocus as SPI
950         https://bugs.webkit.org/show_bug.cgi?id=142951
951
952         Reviewed by Anders Carlsson.
953
954         * UIProcess/API/Cocoa/WKWebView.mm:
955         (-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): New SPI.
956         Just calls through to WKWebContentView, but allows a nil completion handler.
957         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
958
959         * UIProcess/API/mac/WKView.mm:
960         (-[WKView becomeFirstResponder]): Pass an empty lambda for the new callback parameter to
961         WebPageProxy::setInitialFocus.
962
963         * UIProcess/WebPageProxy.cpp:
964         (WebKit::WebPageProxy::setInitialFocus): Added a void callback parameter and made sure to
965         call it.
966         * UIProcess/WebPageProxy.h:
967
968         * UIProcess/ios/WKContentViewInteraction.h:
969         * UIProcess/ios/WKContentViewInteraction.mm:
970         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
971         Added. Calls WebPageProxy::setInitialFocus, and once that completes, checks if anything was
972         focused and if so, becomes first responder, then calls the completion handler.
973
974         * WebProcess/WebPage/WebPage.cpp:
975         (WebKit::WebPage::setInitialFocus): Added a callbackID parameter, and made sure to send the
976         callback message. Added a temporary change of m_userIsInteracting to true, so that the UI
977         process won’t ignore any StartAssistingNode message resulting from the focus change.
978         * WebProcess/WebPage/WebPage.h:
979
980         * WebProcess/WebPage/WebPage.messages.in: Added a callbackID parameter to SetInitialFocus.
981
982 2015-03-21  Dean Jackson  <dino@apple.com>
983
984         Remove the prefix for CSS Transforms
985         https://bugs.webkit.org/show_bug.cgi?id=142927
986         <rdar://problem/11568151>
987
988         Reviewed by Simon Fraser.
989
990         Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
991
992         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
993         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
994
995 2015-03-21  Csaba Osztrogonác  <ossy@webkit.org>
996
997         [EFL][GTK] Make WebKit2's generate-forwarding-headers.pl less verbose
998         https://bugs.webkit.org/show_bug.cgi?id=142908
999
1000         Reviewed by Žan Doberšek.
1001
1002         * Scripts/generate-forwarding-headers.pl:
1003         (createForwardingHeadersForFramework):
1004
1005 2015-03-21  Commit Queue  <commit-queue@webkit.org>
1006
1007         Unreviewed, rolling out r181824.
1008         https://bugs.webkit.org/show_bug.cgi?id=142935
1009
1010         Broke Windows build (Requested by ap on #webkit).
1011
1012         Reverted changeset:
1013
1014         "Remove the prefix for CSS Transforms"
1015         https://bugs.webkit.org/show_bug.cgi?id=142927
1016         http://trac.webkit.org/changeset/181824
1017
1018 2015-03-20  Dean Jackson  <dino@apple.com>
1019
1020         Remove the prefix for CSS Transforms
1021         https://bugs.webkit.org/show_bug.cgi?id=142927
1022         <rdar://problem/11568151>
1023
1024         Reviewed by Simon Fraser.
1025
1026         Rename AnimatedPropertyWebkitTransform to AnimatedPropertyTransform.
1027
1028         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1029         (IPC::ArgumentCoder<TextureMapperAnimation>::encode):
1030
1031 2015-03-20  Chris Dumez  <cdumez@apple.com>
1032
1033         [WK2] NetworkCache retrievals sometimes fail on browser startup
1034         https://bugs.webkit.org/show_bug.cgi?id=142925
1035         <rdar://problem/20245368>
1036
1037         Reviewed by Antti Koivisto.
1038
1039         NetworkCache retrievals sometimes fail on browser startup for resources
1040         that are actually cached. The reason is that we are using a bloom filter
1041         for performance reasons to avoid unnecessary disk I/O and this bloom
1042         filter is populated on start up in a background thread by traversing the
1043         cache files on disk. However, when restoring the tabs on start-up we
1044         sometimes query this bloom filter before it is completely populated and
1045         we thus fail to retrieve cached entries because we think they don't
1046         exist and don't check the disk.
1047
1048         This patch adds an "isPopulatingContentsFilter" flag that is turned ON
1049         on start up while we are populating the bloon filter. We then bypass
1050         the bloom filter and send queries directly to disk on start up if this
1051         flag is ON.
1052
1053         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1054         (WebKit::NetworkCache::Storage::initialize):
1055         (WebKit::NetworkCache::Storage::retrieve):
1056         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
1057         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
1058         * NetworkProcess/cache/NetworkCacheStorage.h:
1059         (WebKit::NetworkCache::Storage::cacheMayContain):
1060
1061 2015-03-20  Chris Dumez  <cdumez@apple.com>
1062
1063         [WK2] Allow stale content when restoring the browser's session state
1064         https://bugs.webkit.org/show_bug.cgi?id=142916
1065         <rdar://problem/20243493>
1066
1067         Reviewed by Darin Adler.
1068
1069         Allow stale content when restoring the browser's session state
1070         (restoring all tabs from previous session), e.g.
1071         - Via History > Reopen All windows from previous session on Safari
1072         - Happens on startup for MobileSafari
1073
1074         I have verified that using "Open in tabs" on a bookmarks folder
1075         still does fresh loads (rdar://problem/8131355) as it is not using
1076         the restoreFromSessionState() code path.
1077
1078         * UIProcess/WebPageProxy.cpp:
1079         (WebKit::WebPageProxy::reattachToWebProcessForReload):
1080         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1081         (WebKit::WebPageProxy::goForward):
1082         (WebKit::WebPageProxy::goBack):
1083         (WebKit::WebPageProxy::goToBackForwardItem):
1084         (WebKit::WebPageProxy::restoreFromSessionState):
1085         * UIProcess/WebPageProxy.h:
1086         * WebProcess/WebPage/WebPage.cpp:
1087         (WebKit::WebPage::goToBackForwardItem):
1088         * WebProcess/WebPage/WebPage.h:
1089         * WebProcess/WebPage/WebPage.messages.in:
1090
1091 2015-03-20  Beth Dakin  <bdakin@apple.com>
1092
1093         [Immediate Actions] Should re-enable immediate actions for iBooks
1094         https://bugs.webkit.org/show_bug.cgi?id=142915
1095         -and corresponding-
1096         rdar://problem/19585689
1097
1098         Reviewed by Tim Horton.
1099
1100         * UIProcess/API/mac/WKView.mm:
1101         (-[WKView initWithFrame:processPool:configuration:webView:]):
1102
1103 2015-03-20  Alex Christensen  <achristensen@webkit.org>
1104
1105         Progress towards CMake on Mac.
1106         https://bugs.webkit.org/show_bug.cgi?id=136003
1107
1108         Reviewed by Chris Dumez.
1109
1110         * PlatformMac.cmake:
1111         Add include directories and forwarding headers.
1112         * Shared/API/APIObject.h:
1113         (API::ObjectImpl::operator new):
1114         * UIProcess/DrawingAreaProxy.h:
1115         (WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
1116         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1117         Fix some unused parameter warnings.
1118
1119 2015-03-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1120
1121         [CMake] Remove duplicated cmake function calls in WebKit2/CMakeLists.txt
1122         https://bugs.webkit.org/show_bug.cgi?id=142901
1123
1124         Reviewed by Csaba Osztrogonác.
1125
1126         add_depencencies(), install() can support multiple targets or location.
1127         We don't need to call it twice.
1128
1129         * CMakeLists.txt: Additionaly move -DBUILDING_WEBKIT to PlatformGTK.cmake,
1130         because it is only used by GTK port.
1131
1132 2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
1133
1134         [GTK] Disable accelerated compositing on Wayland
1135         https://bugs.webkit.org/show_bug.cgi?id=142877
1136
1137         Reviewed by Carlos Garcia Campos.
1138
1139         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1140         (webkitWebViewBaseCreateWebPage): As was done in the past, we should disable
1141         accelerated compositing on Wayland until the proper support for it lands.
1142
1143 2015-03-19  Andy Estes  <aestes@apple.com>
1144
1145         [Content Filtering] Add tests for unblock requests
1146         https://bugs.webkit.org/show_bug.cgi?id=142900
1147
1148         Reviewed by Andreas Kling.
1149
1150         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
1151         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::contentFilterDidBlockLoad.
1152         * UIProcess/WebFrameProxy.cpp:
1153         (WebKit::WebFrameProxy::didStartProvisionalLoad): Assigned a default-constructed ContentFilterUnblockHandler instead of calling clear().
1154         (WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation): Renamed from contentFilterDidHandleNavigationAction.
1155         Updated to use ContentFilterUnblockHandler's new API.
1156         (WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Deleted.
1157         * UIProcess/WebFrameProxy.h:
1158         (WebKit::WebFrameProxy::contentFilterDidBlockLoad): Renamed from setContentFilterUnblockHandler.
1159         (WebKit::WebFrameProxy::setContentFilterUnblockHandler): Deleted.
1160         * UIProcess/WebPageProxy.cpp:
1161         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Called WebFrameProxy::didHandleContentFilterUnblockNavigation.
1162         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1163         (WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): If the unblock handler needs the UI process,
1164         send WebPageProxy::ContentFilterDidBlockLoadForFrame. Oterwise, call PolicyChecker::setContentFilterUnblockHandler.
1165
1166 2015-03-20  Zan Dobersek  <zdobersek@igalia.com>
1167
1168         [GTK] Properly guard X11-specific code in BackingStore::createBackend()
1169         https://bugs.webkit.org/show_bug.cgi?id=142875
1170
1171         Reviewed by Martin Robinson.
1172
1173         * UIProcess/cairo/BackingStoreCairo.cpp:
1174         (WebKit::BackingStore::createBackend): Guard the GTK- and X11-specific
1175         bit of code with PLATFORM(GTK) and PLATFORM(X11). Testing GDK_WINDOWING_X11
1176         ensures that the GTK+ dependency has X11 support, but does not ensure
1177         that WebKitGTK+ has been configured to build for X11 environments (which
1178         is what PLATFORM(X11) ensures).
1179
1180 2015-03-19  Chris Dumez  <cdumez@apple.com>
1181
1182         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
1183         https://bugs.webkit.org/show_bug.cgi?id=142893
1184         <rdar://problem/19633737>
1185         <rdar://problem/19869257>
1186
1187         Reviewed by Antti Koivisto.
1188
1189         Allow stale content when restoring a killed / crashed WebProcess
1190         (similarly to a history navigation). This is actually what was intended
1191         as we call WebPage::goToBackForwardItem() in this case, which uses
1192         IndexedBackForward load type. However, this value was then ignored in
1193         FrameLoader::loadDifferentDocumentItem().
1194
1195         This patch gets rid of the special casing in
1196         FrameLoader::loadDifferentDocumentItem() and makes it clear at call
1197         sites when calling goToBackForwardItem() if we should allow stale
1198         content or not. If goToBackForwardItem() is called with the
1199         allowStaleContent flag off, we'll keep using the IndexedBackForward
1200         frame load type. However, if the flag is on, we'll use the Standard
1201         frame load type and do a fresh load.
1202
1203         * UIProcess/WebPageProxy.cpp:
1204         (WebKit::WebPageProxy::reattachToWebProcessForReload):
1205         Set allowStaleContent flag to true as we want to allow stale content
1206         when reloading a WebProcess after it crashed or was killed (behavior
1207         change).
1208
1209         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1210         Add allowStaleContent parameter so that call sites can decide which
1211         policy to use.
1212
1213         (WebKit::WebPageProxy::goForward):
1214         (WebKit::WebPageProxy::goBack):
1215         Set allowStaleContent flag to true as this is our policy for history
1216         navigations.
1217
1218         (WebKit::WebPageProxy::goToBackForwardItem):
1219         Add allowStaleContent parameter so that the call site can let us know
1220         what to do. This is useful as this is called not only for indexed
1221         back / forward navigations (allowing stale content) but also for
1222         restoring session state (forbidding state content:
1223         <rdar://problem/8131355>).
1224
1225         (WebKit::WebPageProxy::restoreFromSessionState):
1226         Call goToBackForwardItem() with allowStaleContent flag set to false
1227         as users expect fresh contents in this case. This method is called
1228         when:
1229         - Tabs are restored on Safari / MobileSafari startup
1230         - Tabs are restored via "History > Reopen All windows from last session"
1231
1232         * UIProcess/WebPageProxy.h:
1233         * WebProcess/WebPage/WebPage.cpp:
1234         (WebKit::WebPage::goToBackForwardItem):
1235         Add allowStaleContent parameter and use "Standard" frame load type
1236         instead of "IndexedBackForward" if it is false. This is needed as
1237         "IndexedBackForward" frame load type allows using stale content.
1238
1239         * WebProcess/WebPage/WebPage.h:
1240         * WebProcess/WebPage/WebPage.messages.in:
1241         Add allowStaleContent flag to GoToBackForwardItem message.
1242
1243 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
1244
1245         [Mac] Move MediaPlaybackTargetPicker
1246         https://bugs.webkit.org/show_bug.cgi?id=142889
1247
1248         Move WebMediaPlaybackTargetPickerProxy to WebCore so it can be used by
1249         both WK2 and WK1.
1250
1251         Reviewed by Tim Horton.
1252
1253         * UIProcess/PageClient.h:
1254         * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: Removed.
1255         * UIProcess/WebMediaPlaybackTargetPickerProxy.h: Removed.
1256         * UIProcess/WebPageProxy.cpp:
1257         (WebKit::WebPageProxy::devicePickerProxy):
1258         * UIProcess/WebPageProxy.h:
1259         * UIProcess/mac/PageClientImpl.h:
1260         * UIProcess/mac/PageClientImpl.mm:
1261         (WebKit::PageClientImpl::createPlaybackTargetPicker):
1262         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Removed.
1263         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Removed.
1264         * WebKit2.xcodeproj/project.pbxproj:
1265
1266 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
1267
1268         32-bit build fix after r181770.
1269
1270         * UIProcess/mac/WKFullScreenWindowController.mm:
1271         (-[WKFullScreenWindowController initWithWindow:webView:]):
1272
1273 2015-03-19  Anders Carlsson  <andersca@apple.com>
1274
1275         Add support for deleting individual cache entries
1276         https://bugs.webkit.org/show_bug.cgi?id=142886
1277
1278         Reviewed by Antti Koivisto.
1279
1280         * NetworkProcess/NetworkProcess.cpp:
1281         (WebKit::fetchDiskCacheEntries):
1282         Remove an unnecessary call to cfURLCacheOrigins().
1283
1284         (WebKit::clearDiskCacheEntries):
1285         Helper function for clearing disk cache entries. This handles both the old and new cache implementations.
1286
1287         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
1288         Call clearDiskCacheEntries if needed.
1289
1290 2015-03-19  Jer Noble  <jer.noble@apple.com>
1291
1292         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
1293         https://bugs.webkit.org/show_bug.cgi?id=142132
1294
1295         Reviewed by Tim Horton.
1296
1297         Use CALayer animations for the transition into and out of fullscreen.
1298
1299         The fullscreen transition consists of three separate animations:
1300         1. An opacity animation for the black backdrop behind the fullscreen content
1301         2. A scale/translation animation from fullscreen element's initial screen to its final one.
1302         3. A clip animation from the fullscreen element's initial aspect ratio to its final one.
1303
1304         The opacity animation will apply to the fullscreen window's content view's layer's
1305         background color. To separately animate the transform and mask of the web view's content, a
1306         layer-backed subview is added to the content view, and the scale/translation & clip
1307         animations are applied to its transform property and mask layer respectively.
1308
1309         Utility methods to create each animation have been added, and each includes a parameter for
1310         the direction of the animation, so that the same methods can be used for entering and
1311         exiting fullscreen transitions.
1312
1313         The user-visible changes to this new transition are when the aspect ratios of the initial
1314         and final screen locations are different: previously the transition would use a scale
1315         transform to "squish" the fullscreen content into the initial aspect ratio. The new
1316         transition instead "clips" the fullscreen content to the initial aspect ratio. For common
1317         operations such a <video> element with a different aspect ratio than the screen, this makes
1318         the black letterbox "grow" during the transition, and makes the transition overall much
1319         smoother.
1320
1321         * UIProcess/mac/WKFullScreenWindowController.h:
1322         * UIProcess/mac/WKFullScreenWindowController.mm:
1323         (-[WKFullScreenWindowController initWithWindow:webView:]): Create and initialze the clipping view.
1324         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): _backgroundWindow was removed.
1325         (-[WKFullScreenWindowController enterFullScreen:]): Add the webView to the _clipView, not the contentView.
1326         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): _backgroundWindow,
1327                 _fadeAnimation, and _scaleAnimation are all removed.
1328         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
1329         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.  Hide the contentView's
1330                 layer. Pause visibility updates.
1331         (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Resume visibility updates.
1332         (-[WKFullScreenWindowController close]): _fadeAnimation and _scaleAnimation are removed.
1333         (-[WKFullScreenWindowController customWindowsToEnterFullScreenForWindow:]): Return only the fullscreen
1334                 window.
1335         (-[WKFullScreenWindowController customWindowsToExitFullScreenForWindow:]): Ditto.
1336         (zoomAnimation): Added.
1337         (maskAnimation): Added.
1338         (fadeAnimation): Added.
1339         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Use the utility
1340                 methods above to set up the animation.
1341         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
1342         (createBackgroundFullscreenWindow): Deleted.
1343         (windowFrameFromApparentFrames): Deleted.
1344
1345 2015-03-19  Enrica Casucci  <enrica@apple.com>
1346
1347         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
1348         https://bugs.webkit.org/show_bug.cgi?id=142801
1349         rdar://problem/19982527
1350
1351         Reviewed by Tim Horton.
1352
1353         This patch adds all the necessary support to write attachment elements into
1354         the pasteboard, including the promised type in WK2.
1355
1356         * UIProcess/API/mac/WKView.mm:
1357         (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]):
1358         (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]):
1359         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
1360         (-[WKView _setPromisedData:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
1361         * UIProcess/API/mac/WKViewInternal.h:
1362         * UIProcess/PageClient.h:
1363         * UIProcess/WebPageProxy.h:
1364         * UIProcess/WebPageProxy.messages.in:
1365         * UIProcess/mac/PageClientImpl.h:
1366         * UIProcess/mac/PageClientImpl.mm:
1367         (WebKit::PageClientImpl::setPromisedDataForImage):
1368         (WebKit::PageClientImpl::setPromisedDataForAttachment):
1369         (WebKit::PageClientImpl::setPromisedData): Deleted.
1370         * UIProcess/mac/WebPageProxyMac.mm:
1371         (WebKit::WebPageProxy::setPromisedDataForImage):
1372         (WebKit::WebPageProxy::setPromisedDataForAttachment):
1373         (WebKit::WebPageProxy::setPromisedData): Deleted.
1374         * WebProcess/WebCoreSupport/WebDragClient.h:
1375         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1376         (WebKit::WebDragClient::declareAndWriteAttachment):
1377         (WebKit::WebDragClient::declareAndWriteDragImage):
1378
1379 2015-03-19  Anders Carlsson  <andersca@apple.com>
1380
1381         Cache::remove should take a Key instead of an entry
1382         https://bugs.webkit.org/show_bug.cgi?id=142878
1383
1384         Reviewed by Antti Koivisto.
1385
1386         * NetworkProcess/cache/NetworkCache.cpp:
1387         (WebKit::NetworkCache::Cache::remove):
1388         * NetworkProcess/cache/NetworkCache.h:
1389
1390 2015-03-19  Chris Dumez  <cdumez@apple.com>
1391
1392         Clean up DOMTimer related settings
1393         https://bugs.webkit.org/show_bug.cgi?id=142837
1394
1395         Reviewed by Darin Adler.
1396
1397         Stop setting the DOMTimers' default minimum interval to 4ms as this
1398         is now the default.
1399
1400         * WebProcess/WebPage/WebPage.cpp:
1401         (WebKit::WebPage::WebPage):
1402
1403 2015-03-19  Chris Dumez  <cdumez@apple.com>
1404
1405         The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
1406         https://bugs.webkit.org/show_bug.cgi?id=142831
1407         <rdar://problem/20209957>
1408
1409         Reviewed by Antti Koivisto.
1410
1411         The network cache should ignore "no-cache" and "must-revalidate" as
1412         Cache-Control policy for history navigations to avoid unnecessary
1413         revalidation in this case. Our memory cache already behaves this way.
1414
1415         On history navigation, our disk cache implementation currently
1416         revalidates unconditionally resources if "cache-control: no-cache" is
1417         used. It also revalidates expired resources if "cache-control:
1418         must-revalidate" is used. This is sub-optimal.
1419
1420         RFC 7234 does not require us to do so [1]:
1421         """
1422           User agents often have history mechanisms, such as "Back" buttons and
1423           history lists, that can be used to redisplay a representation
1424           retrieved earlier in a session.
1425
1426           The freshness model (Section 4.2) does not necessarily apply to
1427           history mechanisms.  That is, a history mechanism can display a
1428           previous representation even if it has expired.
1429         """
1430
1431         Chrome and IE9+ [2] already ignore "cache-control: must-revalidate" on history navigation.
1432
1433         [1] https://tools.ietf.org/html/rfc7234#page-32
1434         [2] http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx
1435
1436         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
1437
1438         * NetworkProcess/cache/NetworkCache.cpp:
1439         (WebKit::NetworkCache::decodeStorageEntry):
1440
1441 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
1442
1443         Don't paint PDFs on every scroll
1444         https://bugs.webkit.org/show_bug.cgi?id=142857
1445         rdar://problem/20130207
1446
1447         Reviewed by Tim Horton.
1448         
1449         Don't push a scale factor onto the PDF layer controller if it hasn't
1450         changed, since doing so causes a repaint.
1451
1452         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1453         (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1454
1455 2015-03-18  Anders Carlsson  <andersca@apple.com>
1456
1457         Use && instead of & when deciding if the network cache should be cleared
1458         https://bugs.webkit.org/show_bug.cgi?id=142845
1459
1460         Reviewed by Antti Koivisto.
1461
1462         * NetworkProcess/NetworkProcess.cpp:
1463         (WebKit::NetworkProcess::deleteWebsiteData):
1464
1465 2015-03-18  Anders Carlsson  <andersca@apple.com>
1466
1467         Add WKContextGetWebsiteDataStore API
1468         https://bugs.webkit.org/show_bug.cgi?id=142832
1469         rdar://problem/16544715
1470
1471         Reviewed by Sam Weinig.
1472
1473         Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.
1474
1475         * Shared/API/c/WKBase.h:
1476         Add new declaration.
1477
1478         * UIProcess/API/APIWebsiteDataStore.cpp:
1479         (API::WebsiteDataStore::create):
1480         * UIProcess/API/APIWebsiteDataStore.h:
1481         Add a new function that takes a configuration.
1482
1483         * UIProcess/API/C/WKAPICast.h:
1484         Add cast.
1485
1486         * UIProcess/API/C/WKContext.cpp:
1487         (WKContextGetWebsiteDataStore):
1488         Return the context's website data store.
1489
1490         * UIProcess/API/C/WKContext.h:
1491         Add new declaration.
1492
1493         * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
1494         * UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
1495         Add new files.
1496
1497         * UIProcess/WebKeyValueStorageManager.cpp:
1498         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1499         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1500         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1501         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1502         Update now that WebProcessPool holds on to an API::WebsiteDataStore.
1503
1504         * UIProcess/WebProcessPool.cpp:
1505         (WebKit::WebProcessPool::WebProcessPool):
1506         (WebKit::WebProcessPool::createWebPage):
1507         * UIProcess/WebProcessPool.h:
1508         WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.
1509
1510         * WebKit2.xcodeproj/project.pbxproj:
1511         Add new files.
1512
1513 2015-03-18  Tim Horton  <timothy_horton@apple.com>
1514
1515         Cannot invoke action menus anymore
1516         https://bugs.webkit.org/show_bug.cgi?id=142797
1517         <rdar://problem/20032670>
1518
1519         * UIProcess/API/mac/WKView.mm:
1520         Need one more respondsToSelector check.
1521
1522 2015-03-18  Chris Dumez  <cdumez@apple.com>
1523
1524         [WK2] Log the number of network cache requests that we have never seen before
1525         https://bugs.webkit.org/show_bug.cgi?id=142828
1526         <rdar://problem/19632130>
1527
1528         Reviewed by Antti Koivisto.
1529
1530         Log the number of network cache requests that we have never seen before
1531         using diagnostic logging.
1532
1533         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1534         (WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
1535         (WebKit::NetworkCache::Statistics::recordRetrievalFailure):
1536
1537 2015-03-17  Antti Koivisto  <antti@apple.com>
1538
1539         Prune least valuable cache entries first
1540         https://bugs.webkit.org/show_bug.cgi?id=142810
1541         rdar://problem/19632130
1542
1543         Reviewed by Darin Adler.
1544
1545         When pruning the cache estimate relative value of each entry using formula
1546
1547         age = current time - creation time
1548         accessAge = last access time - creation time
1549         value = accessAge / age
1550
1551         That is, we value entries that have been accessed recently and survived in the cache longest.
1552
1553         The most valuable entries don't get deleted at all while the deletion probablity ramps up for
1554         lower value entries.
1555
1556         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1557         (WebKit::NetworkCache::fileTimes):
1558
1559             Get the creation time and access time for a file.
1560
1561         (WebKit::NetworkCache::updateFileAccessTimeIfNeeded):
1562
1563             Update access time manually if the file system doesn't do it automatically.
1564
1565         * NetworkProcess/cache/NetworkCacheIOChannel.h:
1566         (WebKit::NetworkCache::IOChannel::path):
1567         (WebKit::NetworkCache::IOChannel::type):
1568         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1569         (WebKit::NetworkCache::IOChannel::IOChannel):
1570         (WebKit::NetworkCache::IOChannel::open):
1571
1572             Remember the file path and move most of the work to constructor.
1573
1574         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1575         (WebKit::NetworkCache::Storage::Storage):
1576         (WebKit::NetworkCache::Storage::remove):
1577         (WebKit::NetworkCache::Storage::updateFileAccessTime):
1578         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1579         (WebKit::NetworkCache::deletionProbability):
1580
1581             Compute the probability based on entry age and access time.
1582
1583         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
1584         * NetworkProcess/cache/NetworkCacheStorage.h:
1585         (WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
1586         (WebKit::NetworkCache::Storage::deleteQueue): Deleted.
1587
1588             More generic name.
1589
1590 2015-03-18  Chris Dumez  <cdumez@apple.com>
1591
1592         [WK2] Log total number of network cache queries using diagnostic logging
1593         https://bugs.webkit.org/show_bug.cgi?id=142803
1594         <rdar://problem/19632130>
1595
1596         Reviewed by Antti Koivisto.
1597
1598         Log total number of network cache queries using diagnostic logging.
1599
1600         * NetworkProcess/cache/NetworkCache.cpp:
1601         (WebKit::NetworkCache::Cache::retrieve):
1602         * NetworkProcess/cache/NetworkCacheStatistics.h:
1603         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1604         (WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):
1605
1606 2015-03-18  Chris Dumez  <cdumez@apple.com>
1607
1608         [WK2] We should not even try the network cache for non-HTTP protocol requests
1609         https://bugs.webkit.org/show_bug.cgi?id=142802
1610         <rdar://problem/19632130>
1611
1612         Reviewed by Antti Koivisto.
1613
1614         We should not even try the network cache for non-HTTP protocol requests
1615         and the network cache cannot handle those.
1616
1617         * NetworkProcess/NetworkResourceLoader.cpp:
1618         (WebKit::NetworkResourceLoader::start):
1619         * NetworkProcess/cache/NetworkCache.cpp:
1620         (WebKit::NetworkCache::canRetrieve):
1621         (WebKit::NetworkCache::Cache::retrieve):
1622         * NetworkProcess/cache/NetworkCache.h:
1623         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
1624         (WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
1625
1626 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
1627
1628         Ignore some deprecation warnings
1629         https://bugs.webkit.org/show_bug.cgi?id=142813
1630
1631         Reviewed by Mark Rowe.
1632
1633         Fixing the deprecations is tracked by: <rdar://problem/20201450>
1634
1635         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1636         (WebKit::WebPopupMenuProxyMac::populate):
1637
1638 2015-03-17  Ryuan Choi  <ryuan.choi@navercorp.com>
1639
1640         [EFL] Expose JavaScript binding interface through ewk_extension
1641         https://bugs.webkit.org/show_bug.cgi?id=142033
1642
1643         Reviewed by Gyuyoung Kim.
1644
1645         * PlatformEfl.cmake:
1646         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
1647         * UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
1648         (EWK2ContextTestWithExtension::messageReceivedCallback):
1649         (EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
1650         (TEST_F):
1651         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
1652         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
1653         (EwkExtension::didCreatePage):
1654         (EwkExtension::willDestroyPage):
1655         * WebProcess/InjectedBundle/API/efl/ewk_extension.h:
1656         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
1657         * WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
1658         (toEwkPage):
1659         (EwkPage::EwkPage):
1660         (EwkPage::append):
1661         (EwkPage::remove):
1662         (EwkPage::didFinishDocumentLoadForFrame):
1663         (ewk_page_js_global_context_get):
1664         (ewk_page_client_register):
1665         (ewk_page_client_unregister):
1666         * WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
1667         * WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
1668         (EwkPage::page):
1669         * efl/ewebkit2-extension.pc.in:
1670
1671 2015-03-17  Tim Horton  <timothy_horton@apple.com>
1672
1673         Cannot invoke action menus anymore
1674         https://bugs.webkit.org/show_bug.cgi?id=142797
1675         <rdar://problem/20032670>
1676
1677         * UIProcess/API/mac/WKView.mm:
1678         Need a respondsToSelector check.
1679
1680 2015-03-17  Tim Horton  <timothy_horton@apple.com>
1681
1682         Cannot invoke action menus anymore
1683         https://bugs.webkit.org/show_bug.cgi?id=142797
1684         <rdar://problem/20032670>
1685
1686         Reviewed by Beth Dakin.
1687
1688         * UIProcess/API/mac/WKView.mm:
1689         Don't process mouse events that would make an action menu; call super
1690         and let AppKit take care of it. We have to duplicate the macro so that
1691         we can avoid calling super for the internal-only methods.
1692         Also, otherMouseMoved is simply not a thing, so remove it.
1693
1694 2015-03-17  Beth Dakin  <bdakin@apple.com>
1695
1696         DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
1697         10.10.2
1698         https://bugs.webkit.org/show_bug.cgi?id=142700
1699         -and corresponding-
1700         rdar://problem/20165168
1701
1702         Reviewed by Tim Horton.
1703
1704         No need to tell the WKImmediateActionController about mouse down any more since we 
1705         are expecting it at the beginning of an immediate action interaction.
1706         * UIProcess/API/mac/WKView.mm:
1707         (-[WKView mouseDown:]):
1708
1709         Set the delaysPrimaryMouseButtonEvents to NO for the 
1710         _immediateActionGestureRecognizer. This will cause AppKit to send up the mouse 
1711         events at the expected time.
1712         (-[WKView initWithFrame:processPool:configuration:webView:]):
1713
1714         WebCore::EventHandler now needs to know if an immediate action cancelled or 
1715         completed. This plumbs that information down.
1716         * UIProcess/WebPageProxy.cpp:
1717         (WebKit::WebPageProxy::immediateActionDidCancel):
1718         (WebKit::WebPageProxy::immediateActionDidComplete):
1719         * UIProcess/WebPageProxy.h:
1720         * UIProcess/mac/WKImmediateActionController.h:
1721         * UIProcess/mac/WKImmediateActionController.mm:
1722         (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
1723         (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
1724         (-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
1725         * WebProcess/WebPage/WebPage.h:
1726         * WebProcess/WebPage/WebPage.messages.in:
1727
1728         Call EventHandler::setImmediateActionStage() with the appropriate stage.
1729         * WebProcess/WebPage/mac/WebPageMac.mm:
1730         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1731         (WebKit::WebPage::immediateActionDidCancel):
1732         (WebKit::WebPage::immediateActionDidComplete):
1733
1734 2015-03-17  Timothy Horton  <timothy_horton@apple.com>
1735
1736         Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
1737         https://bugs.webkit.org/show_bug.cgi?id=142776
1738         <rdar://problem/18921338>
1739
1740         Reviewed by Alexey Proskuryakov.
1741
1742         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1743         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
1744         * WebProcess/WebCoreSupport/WebChromeClient.h:
1745         Adjust to the new signature.
1746
1747 2015-03-17  Antti Koivisto  <antti@apple.com>
1748
1749         Disk cache should support Vary: Cookie
1750         https://bugs.webkit.org/show_bug.cgi?id=142770
1751         rdar://problem/19764945
1752
1753         Reviewed by Anders Carlsson.
1754
1755         Cookies are not part of the original request but are added by the networking layer when submitting the request.
1756         Fetch them explicitly when resolving Vary: Cookie.
1757
1758         The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
1759         not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
1760         reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.
1761
1762         * NetworkProcess/cache/NetworkCache.cpp:
1763         (WebKit::NetworkCache::headerValueForVary):
1764         (WebKit::NetworkCache::encodeStorageEntry):
1765         (WebKit::NetworkCache::verifyVaryingRequestHeaders):
1766
1767 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
1768
1769         [WK2] Use C++ lambdas in IPC::Connection
1770         https://bugs.webkit.org/show_bug.cgi?id=138018
1771
1772         Reviewed by Anders Carlsson.
1773
1774         Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.
1775
1776         * Platform/IPC/Connection.cpp:
1777         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1778         (IPC::Connection::invalidate):
1779         (IPC::Connection::sendMessage):
1780         (IPC::Connection::processIncomingMessage): Simplify the error messages so we
1781         don't have to format strings on-the-fly, removing the issues of cross-thread
1782         string copying altogether.
1783         (IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
1784         of the StringReference type.
1785         (IPC::Connection::enqueueIncomingMessage):
1786         * Platform/IPC/Connection.h:
1787         * Platform/IPC/mac/ConnectionMac.mm:
1788         (IPC::Connection::receiveSourceEventHandler):
1789         * Platform/IPC/unix/ConnectionUnix.cpp:
1790         (IPC::Connection::open):
1791
1792 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
1793
1794         [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
1795         https://bugs.webkit.org/show_bug.cgi?id=142530
1796
1797         Reviewed by Darin Adler.
1798
1799         * CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
1800         in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
1801         possible due to the new forwarding header for ANGLE's ShaderLang.h.
1802
1803 2015-03-17  Gwang Yoon Hwang  <yoon@igalia.com>
1804
1805         REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
1806
1807         Unreviewed build fix.
1808
1809         * WebProcess/WebPage/LayerTreeHost.h:
1810         Remove duplicated declaration of setNativeSurfaceHandleForCompositing.
1811
1812 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
1813
1814         Enable ES6 classes by default
1815         https://bugs.webkit.org/show_bug.cgi?id=142774
1816
1817         Reviewed by Gavin Barraclough.
1818
1819         * Configurations/FeatureDefines.xcconfig:
1820
1821 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
1822
1823         Don't pass nil as a fireDate for NSTimer
1824         https://bugs.webkit.org/show_bug.cgi?id=142765
1825
1826         Reviewed by Dan Bernstein.
1827
1828         While we're here, switch to a selector that conforms to documented NSTimer API.
1829
1830         * UIProcess/mac/WKFullScreenWindowController.mm:
1831         (-[WKFullScreenWindowController cancelOperation:]):
1832         Set the timer's fireDate as the future date matching the former interval; update the selector.
1833         (-[WKFullScreenWindowController _watchdogTimerFired:]):
1834         Timer callback; wrap -exitFullScreen.
1835
1836 2015-03-16  Alex Christensen  <achristensen@webkit.org>
1837
1838         Progress towards CMake on Mac
1839         https://bugs.webkit.org/show_bug.cgi?id=142747
1840
1841         Reviewed by Chris Dumez.
1842
1843         * PlatformMac.cmake:
1844         Started adding Mac-specific directories and headers.
1845
1846 2015-03-16  Alexey Proskuryakov  <ap@apple.com>
1847
1848         ASSERT(m_plugin) on plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
1849         https://bugs.webkit.org/show_bug.cgi?id=142637
1850
1851         Reviewed by Dean Jackson.
1852
1853         * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired):
1854         m_plugin can be legitimately null.
1855
1856 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
1857
1858         One more URTBF after r181578.
1859
1860         * WebProcess/WebPage/WebPage.cpp:
1861         (WebKit::WebPage::updatePreferences):
1862
1863 2015-03-16  Csaba Osztrogonác  <ossy@webkit.org>
1864
1865         URTBF after r181578.
1866
1867         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1868         (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled): Copy/paste error fixed.
1869
1870 2015-03-16  Dean Jackson  <dino@apple.com>
1871
1872         Expose WK2 preference for Animation Triggers runtime flag
1873         https://bugs.webkit.org/show_bug.cgi?id=142744
1874
1875         Reviewed by Anders Carlsson.
1876
1877         Expose CSSAnimationTriggersEnabled, linking it to the runtime enabled
1878         feature flag.
1879
1880         * Shared/WebPreferencesDefinitions.h:
1881         * UIProcess/API/C/WKPreferences.cpp:
1882         (WKPreferencesSetCSSAnimationTriggersEnabled):
1883         (WKPreferencesGetCSSAnimationTriggersEnabled):
1884         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1885         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1886         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1887         (WebKit::InjectedBundle::setCSSAnimationTriggersEnabled):
1888         * WebProcess/InjectedBundle/InjectedBundle.h:
1889         * WebProcess/WebPage/WebPage.cpp:
1890         (WebKit::WebPage::updatePreferences):
1891
1892 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
1893
1894         Allow clients to selectively disable plug-ins
1895         https://bugs.webkit.org/show_bug.cgi?id=142506
1896
1897         Reviewed by Anders Carlsson.
1898
1899         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
1900         from the page). As part of this:
1901
1902         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
1903            set of plug-ins.
1904
1905         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
1906            down the stack.
1907
1908         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
1909            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
1910
1911         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
1912
1913         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
1914         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
1915
1916         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1917         (WebKit::NetscapePluginModule::getPluginInfo):
1918         Set new PluginInfo members.
1919
1920         * Shared/WebCoreArgumentCoders.cpp:
1921         (IPC::ArgumentCoder<PluginInfo>::encode):
1922         Handle new PluginInfo members.
1923         (IPC::ArgumentCoder<PluginInfo>::decode):
1924         Ditto.
1925
1926         * Shared/WebProcessCreationParameters.h:
1927         Declare a member to store client plug-in policies.
1928
1929         * Shared/WebProcessCreationParameters.cpp:
1930         (WebKit::WebProcessCreationParameters::encode):
1931         Encode the policies.
1932         (WebKit::WebProcessCreationParameters::decode):
1933         Decode the policies.
1934
1935         * UIProcess/API/C/WKAPICast.h:
1936         (WebKit::toWKPluginLoadClientPolicy):
1937         Teach how to cast between WebCore and WebKit2 policy definitions.
1938         (WebKit::toPluginLoadClientPolicy):
1939         Ditto.
1940
1941         * UIProcess/API/C/WKPluginLoadPolicy.h:
1942         Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
1943
1944         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1945         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1946         (WKContextSetPluginLoadClientPolicy):
1947         New function; wrap WebProcessPool::setPluginLoadClientPolicy().
1948         (WKContextClearPluginClientPolicies):
1949         New function; wrap WebProcessPool::clearPluginClientPolicies().
1950
1951         * UIProcess/WebProcessPool.h:
1952         * UIProcess/WebProcessPool.cpp:
1953         (WebKit::WebProcessPool::createNewWebProcess):
1954         Copy any client plug-in policies to the new process' creation parameters.
1955         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
1956         Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
1957         (WebKit::WebProcessPool::clearPluginClientPolicies):
1958         Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
1959
1960         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1961         (WebKit::PDFPlugin::pluginInfo):
1962         Set new PluginInfo member.
1963
1964         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1965         (WebKit::pluginSupportsExtension):
1966         Adopt getWebVisibleMimesAndPluginIndices().
1967         (WebKit::WebFrameLoaderClient::objectContentType):
1968         Update to reflect reflect function rename.
1969
1970         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1971         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1972         (WebKit::WebPlatformStrategies::getPluginInfo):
1973         Pass the Page to populatePluginCache().
1974         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
1975         New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
1976         to block on the current page.
1977         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
1978         New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
1979         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
1980         New member function; empty m_hostsToPluginIdentifierData.
1981         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
1982         New member function; look up the most specific policy for the given plug-in and host.
1983         (WebKit::WebPlatformStrategies::populatePluginCache):
1984         If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
1985         been populated since the Page, and therefore host, may change.
1986
1987         * WebProcess/WebPage/WebPage.cpp:
1988         (WebKit::WebPage::canShowMIMEType):
1989         Update to reflect function rename.
1990
1991         * WebProcess/WebProcess.h:
1992         * WebProcess/WebProcess.cpp:
1993         (WebKit::WebProcess::initializeWebProcess):
1994         Enumerate and process the client plug-in policies in the creation parameters.
1995         (WebKit::WebProcess::setPluginLoadClientPolicy):
1996         New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
1997         (WebKit::WebProcess::clearPluginClientPolicies):
1998         New member function; wrap PluginStrategy::clearPluginClientPolicies().
1999
2000         * WebProcess/WebProcess.messages.in:
2001         Add messages for setting and clearing policies.
2002
2003 2015-03-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2004
2005         Unreviewed. Add new Notification classes to GTK+ API documentation.
2006
2007         Add WebKitNotification and WebKitNotificationPermissionRequest to
2008         the documentation and fix some other typos causing warnings when
2009         generating HTML documentation.
2010
2011         * UIProcess/API/gtk/WebKitUserContent.cpp:
2012         * UIProcess/API/gtk/WebKitWebView.cpp:
2013         (webkit_web_view_class_init):
2014         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
2015
2016 2015-03-16  Przemyslaw Piorkowski  <p.piorkowski@samsung.com>
2017
2018         [EFL][WK2] REGRESSION(r178526): test_ewk2_storage_manager has been failed for a long time
2019         https://bugs.webkit.org/show_bug.cgi?id=141249
2020
2021         Reviewed by Gyuyoung Kim.
2022
2023         * PlatformEfl.cmake: Enable test_ewk2_storage_manager for EFL port - it is passing now.
2024
2025 2015-03-16  David Kilzer  <ddkilzer@apple.com>
2026
2027         [iOS] REGRESSION (r181511): Most layout tests crash with a NULL deref
2028
2029         Follow-up fix for:
2030         [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
2031         <http://webkit.org/b/142702>
2032
2033         * UIProcess/ios/PageClientImplIOS.mm:
2034         (WebKit::PageClientImpl::isViewWindowActive): Add NULL check for m_webView.
2035         (WebKit::PageClientImpl::isViewFocused): Ditto.
2036
2037 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
2038
2039         Clean up related to wheelEvent names
2040         https://bugs.webkit.org/show_bug.cgi?id=142713
2041
2042         Reviewed by Anders Carlsson.
2043
2044         Add EventNames::isWheelEventType() and use it in places that test for the
2045         two wheel event names.
2046
2047         * WebProcess/Plugins/PluginView.cpp:
2048         (WebKit::PluginView::handleEvent):
2049
2050 2015-03-15  Dan Bernstein  <mitz@apple.com>
2051
2052         [iOS] Presenting a modal sheet on top of a WKWebView causes it to lose focused, active state
2053         https://bugs.webkit.org/show_bug.cgi?id=142702
2054
2055         Reviewed by Anders Carlsson.
2056
2057         * UIProcess/API/Cocoa/WKWebView.mm:
2058         (-[WKWebView becomeFirstResponder]): Override to delegate first responder status to the
2059         WKContentView if possible.
2060         (-[WKWebView _retainActiveFocusedState]): New SPI that prevents view hierarchy changes from
2061         affecting the active and focused state of the view. Increments a counter ivar and returns a
2062         completion block (which callers must call when they’re done) that decrements it back.
2063         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared new _activeFocusedStateRetainCount ivar
2064         with @package access.
2065         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
2066
2067         * UIProcess/ios/PageClientImplIOS.mm:
2068         (WebKit::PageClientImpl::isViewWindowActive): Return true if active/focused state is to be
2069         maintained despite not being visible.
2070         (WebKit::PageClientImpl::isViewFocused): Return true if active/focused state is to be
2071         maintained despite not being active.
2072
2073         * UIProcess/ios/WKContentViewInteraction.mm:
2074         (-[WKContentView resignFirstResponder]): Don’t blur the assisted node if active/focused
2075         state is to be maintained.
2076
2077 2015-03-14  Simon Fraser  <simon.fraser@apple.com>
2078
2079         Clean up use of flags in localToContainer-type functions
2080         https://bugs.webkit.org/show_bug.cgi?id=142704
2081
2082         Reviewed by Alexey Proskuryakov.
2083         
2084         Pass UseTransforms explicitly to localToContainerPoint()
2085
2086         * WebProcess/WebPage/ios/WebPageIOS.mm:
2087         (WebKit::WebPage::getAssistedNodeInformation):
2088
2089 2015-03-14  Brent Fulgham  <bfulgham@apple.com>
2090
2091         [iOS] scroll snap points are animating to the wrong positions.
2092         https://bugs.webkit.org/show_bug.cgi?id=142705
2093         <rdar://problem/20136946>
2094
2095         Reviewed by Simon Fraser.
2096
2097         Scroll snapping was landing in the wrong place on iOS because of two problems:
2098         (1) It was searching for the closest snap offset point using unscaled 'screen' pixels,
2099         which caused it to always choose one of the earliest snap point options.
2100         (2) It was then selecting a scaled snap point coordinate and passing it back to UIKit
2101         to animate the snap. This caused it to select a target point beyond the 'screen' pixel
2102         we want to hit.
2103         
2104         The solution to both problems are to scale the scroll destination UIKit suggests so that
2105         we search among the scaled points with a valid value. Then, we need to scale the returned
2106         value back to screen units before handing it back to UIKit to process.
2107
2108         * UIProcess/API/Cocoa/WKWebView.mm:
2109         (-[WKWebView scrollViewWillBeginDragging:]): Drive-by fix. Get rid of extra ';' at
2110         the end of the line.
2111         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
2112         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling):
2113
2114 2015-03-14  Dean Jackson  <dino@apple.com>
2115
2116         Feature flag for Animations Level 2
2117         https://bugs.webkit.org/show_bug.cgi?id=142699
2118         <rdar://problem/20165097>
2119
2120         Reviewed by Brent Fulgham.
2121
2122         Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
2123
2124         * Configurations/FeatureDefines.xcconfig:
2125
2126 2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2127
2128         [GStreamer] share GL context in pipeline
2129         https://bugs.webkit.org/show_bug.cgi?id=142693
2130
2131         Reviewed by Philippe Normand.
2132
2133         * WebProcess/gtk/WebProcessMainGtk.cpp: Enable XInitThreads() if
2134         GSTREAMER_GL is used, since GstGL elements use another thread for
2135         queuing GL operations.
2136
2137 2015-03-13  Alex Christensen  <achristensen@webkit.org>
2138
2139         Progress towards CMake on Mac.
2140         https://bugs.webkit.org/show_bug.cgi?id=142680
2141
2142         Reviewed by Gyuyoung Kim.
2143
2144         * PlatformMac.cmake: Added.
2145
2146 2015-03-13  Commit Queue  <commit-queue@webkit.org>
2147
2148         Unreviewed, rolling out r181483.
2149         https://bugs.webkit.org/show_bug.cgi?id=142688
2150
2151         Caused use-after-free on many tests (Requested by ap on
2152         #webkit).
2153
2154         Reverted changeset:
2155
2156         "Allow clients to selectively disable plug-ins"
2157         https://bugs.webkit.org/show_bug.cgi?id=142506
2158         http://trac.webkit.org/changeset/181483
2159
2160 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
2161
2162         [Mac] Enable WIRELESS_PLAYBACK_TARGET
2163         https://bugs.webkit.org/show_bug.cgi?id=142635
2164
2165         Reviewed by Darin Adler.
2166
2167         * Configurations/FeatureDefines.xcconfig:
2168
2169 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
2170
2171         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
2172         https://bugs.webkit.org/show_bug.cgi?id=142664
2173         <rdar://problem/18859470>
2174
2175         Reviewed by Benjamin Poulain.
2176
2177         * UIProcess/ios/WKScrollView.mm:
2178         (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
2179         Now that the WKContentView can (without pinching) be smaller than the unobscured
2180         region of the WKWebView, we need to take that into account when deciding where
2181         to retarget scrolling.
2182
2183 2015-03-13  Mark Lam  <mark.lam@apple.com>
2184
2185         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
2186         <https://webkit.org/b/142674>
2187
2188         Reviewed by Filip Pizlo.
2189
2190         * WebProcess/WebPage/EventDispatcher.cpp:
2191         (WebKit::EventDispatcher::EventDispatcher):
2192         * WebProcess/WebPage/EventDispatcher.h:
2193         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
2194         (WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
2195         * WebProcess/WebPage/ViewUpdateDispatcher.h:
2196
2197 2015-03-10  Conrad Shultz  <conrad_shultz@apple.com>
2198
2199         Allow clients to selectively disable plug-ins
2200         https://bugs.webkit.org/show_bug.cgi?id=142506
2201
2202         Reviewed by Anders Carlsson.
2203
2204         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
2205         from the page). As part of this:
2206
2207         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
2208            set of plug-ins.
2209
2210         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
2211            down the stack.
2212
2213         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
2214            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
2215
2216         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
2217
2218         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
2219         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
2220
2221         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2222         (WebKit::NetscapePluginModule::getPluginInfo):
2223         Set new PluginInfo members.
2224
2225         * Shared/WebCoreArgumentCoders.cpp:
2226         (IPC::ArgumentCoder<PluginInfo>::encode):
2227         Handle new PluginInfo members.
2228         (IPC::ArgumentCoder<PluginInfo>::decode):
2229         Ditto.
2230
2231         * Shared/WebProcessCreationParameters.h:
2232         Declare a member to store client plug-in policies.
2233
2234         * Shared/WebProcessCreationParameters.cpp:
2235         (WebKit::WebProcessCreationParameters::encode):
2236         Encode the policies.
2237         (WebKit::WebProcessCreationParameters::decode):
2238         Decode the policies.
2239
2240         * UIProcess/API/C/WKAPICast.h:
2241         (WebKit::toWKPluginLoadClientPolicy):
2242         Teach how to cast between WebCore and WebKit2 policy definitions.
2243         (WebKit::toPluginLoadClientPolicy):
2244         Ditto.
2245
2246         * UIProcess/API/C/WKPluginLoadPolicy.h:
2247         Declare WKPluginLoadClientPolicy, matching PluginLoadClientPolicy in WebCore.
2248
2249         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2250         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2251         (WKContextSetPluginLoadClientPolicy):
2252         New function; wrap WebProcessPool::setPluginLoadClientPolicy().
2253         (WKContextClearPluginClientPolicies):
2254         New function; wrap WebProcessPool::clearPluginClientPolicies().
2255
2256         * UIProcess/WebProcessPool.h:
2257         * UIProcess/WebProcessPool.cpp:
2258         (WebKit::WebProcessPool::createNewWebProcess):
2259         Copy any client plug-in policies to the new process' creation parameters.
2260         (WebKit::WebProcessPool::setPluginLoadClientPolicy):
2261         Send SetPluginLoadClientPolicy to all processes and stash the passed-in policy info.
2262         (WebKit::WebProcessPool::clearPluginClientPolicies):
2263         Send ClearPluginClientPolicies to all processes and clear any stashed policy info.
2264
2265         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2266         (WebKit::PDFPlugin::pluginInfo):
2267         Set new PluginInfo member.
2268
2269         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2270         (WebKit::pluginSupportsExtension):
2271         Adopt getWebVisibleMimesAndPluginIndices().
2272         (WebKit::WebFrameLoaderClient::objectContentType):
2273         Update to reflect reflect function rename.
2274
2275         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2276         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2277         (WebKit::WebPlatformStrategies::getPluginInfo):
2278         Pass the Page to populatePluginCache().
2279         (WebKit::WebPlatformStrategies::getWebVisiblePluginInfo):
2280         New member function; wrap getPluginInfo(); if appropriate, filter out plug-ins the client has asked
2281         to block on the current page.
2282         (WebKit::WebPlatformStrategies::setPluginLoadClientPolicy):
2283         New member function; map empty inputs to a wildcard character and insert the new policy into the nested map.
2284         (WebKit::WebPlatformStrategies::clearPluginClientPolicies):
2285         New member function; empty m_hostsToPluginIdentifierData.
2286         (WebKit::WebPlatformStrategies::pluginLoadClientPolicyForHost):
2287         New member function; look up the most specific policy for the given plug-in and host.
2288         (WebKit::WebPlatformStrategies::populatePluginCache):
2289         If appropriate, set the client load policy on the plug-ins; do this irrespective of whether the cache has
2290         been populated since the Page, and therefore host, may change.
2291
2292         * WebProcess/WebPage/WebPage.cpp:
2293         (WebKit::WebPage::canShowMIMEType):
2294         Update to reflect function rename.
2295
2296         * WebProcess/WebProcess.h:
2297         * WebProcess/WebProcess.cpp:
2298         (WebKit::WebProcess::initializeWebProcess):
2299         Enumerate and process the client plug-in policies in the creation parameters.
2300         (WebKit::WebProcess::setPluginLoadClientPolicy):
2301         New member function; wrap PluginStrategy::setPluginLoadClientPolicy.
2302         (WebKit::WebProcess::clearPluginClientPolicies):
2303         New member function; wrap PluginStrategy::clearPluginClientPolicies().
2304
2305         * WebProcess/WebProcess.messages.in:
2306         Add messages for setting and clearing policies.
2307
2308 2015-03-12  Jon Honeycutt  <jhoneycutt@apple.com>
2309
2310         Use UIDocumentMenuViewController to allow selection of files from
2311         iCloud Drive in WKFileUploadPanel
2312
2313         Part of <https://bugs.webkit.org/show_bug.cgi?id=142596> WebKit on
2314         iOS should support file upload from iCloud Drive
2315         <rdar://problem/12178991>
2316
2317         Reviewed by Andy Estes.
2318
2319         * Platform/spi/ios/UIKitSPI.h:
2320         Include UIDocumentMenuViewController_Private.h if it exists. If not,
2321         declare this new SPI.
2322
2323         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2324         (fallbackIconForFile):
2325         Create a UIDocumentInteractionController for the file, and return a
2326         thumbnail image from its smallest icon.
2327
2328         (iconForImageFile):
2329         If we can get a UIImage from the file, create a thumbnail from it.
2330         Otherwise, call fallbackIconForFile().
2331
2332         (iconForVideoFile):
2333         Code moved from -[_WKVideoFileUploadItem displayImage].
2334
2335         (iconForFile):
2336         Get the file's extension, and get the extension's preferred UTI. If the
2337         UTI is an image type, call iconForImageFile(). If it's a video type,
2338         call iconForVideoFile(). Otherwise, return the fallback icon.
2339
2340         (-[_WKFileUploadItem initWithFileURL:]):
2341         Added an initializer that takes a file URL.
2342
2343         (-[_WKFileUploadItem fileURL]):
2344         (-[_WKImageFileUploadItem initWithFileURL:originalImage:]):
2345         (-[_WKVideoFileUploadItem displayImage]):
2346         (WKFileUploadPanel):
2347         Inherit from UIDocumentPickerDelegate and UIDocumentMenuDelegate. Add
2348         an ivar for the document menu controller.
2349
2350         (-[WKFileUploadPanel dealloc]):
2351         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
2352         If instances of UIDocumentMenuViewController respond to
2353         -_setIgnoreApplicationEntitlementForImport:, meaning we can disable the
2354         assertion that the current app has the iCloud Documents entitlement,
2355         then show the document picker menu. Otherwise, show the current source
2356         selection UI. The runtime check will be removed when a newer UIKit is
2357         available.
2358
2359         (UTIsForMIMETypes):
2360         Return the UTIs for the <input> element's "accept" attribute's MIME
2361         type list.
2362
2363         (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
2364         Call UTIsForMIMETypes(). Fall back to available source types for this
2365         picker type.
2366
2367         (-[WKFileUploadPanel _documentPickerMenuMediaTypes]):
2368         Call UTIsForMIMETypes(). Fall back to the all-encompassing
2369         "public.item" UTI.
2370
2371         (-[WKFileUploadPanel _photoLibraryButtonLabel]):
2372         (-[WKFileUploadPanel _cameraButtonLabel]):
2373         Factored out of -_showMediaSourceSelectionSheet. Return the
2374         appropriate label for the camera button, based on whether it can take a
2375         photo or video, or return nil if the camera is not available.
2376
2377         (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
2378         Changed to use -_cameraButtonLabel and
2379         -_presentForCurrentInterfaceIdiom:.
2380
2381         (-[WKFileUploadPanel _showDocumentPickerMenu]):
2382         Create a UIDocumentMenuViewController, and populate it with options to
2383         open the photo library or take a picture or video. If iCloud Drive or
2384         other document sources are available, they will be added automatically.
2385
2386         (-[WKFileUploadPanel _presentForCurrentInterfaceIdiom:]):
2387         (-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
2388         (-[WKFileUploadPanel documentMenuWasCancelled:]):
2389         (-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
2390         (-[WKFileUploadPanel documentPickerWasCancelled:]):
2391         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2392
2393         (-[_WKImageFileUploadItem initWithFilePath:originalImage:]): Deleted.
2394         (-[_WKImageFileUploadItem fileURL]): Deleted.
2395         (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]): Deleted.
2396         (-[_WKVideoFileUploadItem fileURL]): Deleted.
2397
2398 2015-03-11  Enrica Casucci  <enrica@apple.com>
2399
2400         Adopt new API for keyboard event handling.
2401         https://bugs.webkit.org/show_bug.cgi?id=142602
2402         rdar://problem/19966087
2403
2404         Reviewed by Sam Weinig.
2405
2406         Adopts the new API.
2407
2408         * UIProcess/ios/WKContentViewInteraction.mm:
2409         (-[WKContentView _didHandleKeyEvent:]):
2410
2411 2015-03-12  Alexey Proskuryakov  <ap@apple.com>
2412
2413         testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
2414         https://bugs.webkit.org/show_bug.cgi?id=138687
2415
2416         Reviewed by Carlos Garcia Campos.
2417
2418         * UIProcess/WebCookieManagerProxy.cpp:
2419         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Don't change system-wide
2420         cookie accept policy when in testing mode. Also, update the policy in WebProcesses too,
2421         as we still do some networking there.
2422
2423         * UIProcess/WebProcessPool.h:
2424         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2425         (WKBundleSetAlwaysAcceptCookies): Deleted.
2426         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2427         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2428         (WebKit::InjectedBundle::setAlwaysAcceptCookies): Deleted.
2429         * WebProcess/InjectedBundle/InjectedBundle.h:
2430         Remove WKBundleSetAlwaysAcceptCookies SPI, as WKTR now uses an API in UI process.
2431
2432 2015-03-12  Anders Carlsson  <andersca@apple.com>
2433
2434         WKErrorDomain should be declared nonnull
2435         https://bugs.webkit.org/show_bug.cgi?id=142628
2436
2437         Reviewed by Antti Koivisto.
2438
2439         Add WK_ASSUME_NONNULL_BEGIN and WK_ASSUME_NONNULL_END so everything will be implicitly nonnull.
2440
2441         * UIProcess/API/Cocoa/WKError.h:
2442
2443 2015-03-12  Ian Henderson  <ian@ianhenderson.org>
2444
2445         PDFs don't snapshot properly in iOS Safari
2446         https://bugs.webkit.org/show_bug.cgi?id=142623
2447
2448         Reviewed by Tim Horton.
2449
2450         * UIProcess/API/Cocoa/WKWebView.mm:
2451         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2452         If we have a _customContentView, use UIView snapshotting instead of
2453         trying to snapshot the web page.
2454
2455 2015-03-12  Eric Carlson  <eric.carlson@apple.com>
2456
2457         [Mac] Update AirPlay handling
2458         https://bugs.webkit.org/show_bug.cgi?id=142541
2459
2460         Unreviewed, respond to post-review comments and add previously reviewed changes
2461         missed by a bungled merge.
2462
2463         * Shared/mac/WebCoreArgumentCodersMac.mm:
2464         * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp:
2465         (WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy):
2466         * UIProcess/mac/PageClientImpl.h:
2467         * UIProcess/mac/PageClientImpl.mm:
2468         (WebKit::PageClientImpl::createPlaybackTargetPicker):
2469         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added.
2470         * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added.
2471         * WebKit2.xcodeproj/project.pbxproj:
2472         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2473         * WebProcess/WebCoreSupport/WebChromeClient.h:
2474         * WebProcess/WebPage/WebPage.h:
2475         * WebProcess/WebPage/WebPage.messages.in:
2476         * WebProcess/WebPage/mac/WebPageMac.mm:
2477         * WebProcess/com.apple.WebProcess.sb.in:
2478
2479 2015-03-11  Antti Koivisto  <antti@apple.com>
2480
2481         Cache traversal missing large entries
2482         https://bugs.webkit.org/show_bug.cgi?id=142601
2483
2484         Reviewed by Andreas Kling.
2485
2486         When traversing cache entries we only read the header data from disk. This didn't work
2487         correctly for entries larger than the read size.
2488
2489         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2490         (WebKit::NetworkCache::IOChannel::read):
2491
2492             Partial reads only receive one callback with 'done' set to true.
2493             Ensure we actually return data in this case.
2494
2495         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2496         (WebKit::NetworkCache::decodeEntryHeader):
2497
2498             Add some logging.
2499
2500 2015-03-11  Eric Carlson  <eric.carlson@apple.com>
2501
2502         [Mac] Update AirPlay handling
2503         https://bugs.webkit.org/show_bug.cgi?id=142541
2504
2505         Reviewed by Sam Weinig.
2506
2507         * Shared/WebCoreArgumentCoders.h:
2508         * Shared/mac/WebCoreArgumentCodersMac.mm:
2509         (IPC::ArgumentCoder<AVPlaybackTarget>::encode):
2510         (IPC::ArgumentCoder<AVPlaybackTarget>::decode):
2511         * UIProcess/PageClient.h:
2512         * UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added.
2513         (WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy):
2514         (WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy):
2515         (WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker):
2516         (WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets):
2517         (WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets):
2518         * UIProcess/WebAVPlaybackTargetPickerProxy.h: Added.
2519         (WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client):
2520         * UIProcess/WebPageProxy.cpp:
2521         (WebKit::WebPageProxy::devicePickerProxy):
2522         (WebKit::WebPageProxy::showPlaybackTargetPicker):
2523         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets):
2524         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets):
2525         (WebKit::WebPageProxy::didChoosePlaybackTarget):
2526         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
2527         * UIProcess/WebPageProxy.h:
2528         * UIProcess/WebPageProxy.messages.in:
2529         * UIProcess/mac/PageClientImpl.h:
2530         * UIProcess/mac/PageClientImpl.mm:
2531         (WebKit::PageClientImpl::createPlaybackTargetPicker):
2532         * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added.
2533         * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added.
2534         (WebKit::WebAVPlaybackTargetPickerProxyMac::create):
2535         (WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac):
2536         (WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac):
2537         (WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired):
2538         (WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange):
2539         (WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker):
2540         (WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker):
2541         (WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange):
2542         (WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets):
2543         (WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets):
2544         (-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]):
2545         (-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]):
2546         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
2547         * WebKit2.xcodeproj/project.pbxproj:
2548         * WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added.
2549         (WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker):
2550         (WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker):
2551         (WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring):
2552         (WebKit::WebAVPlaybackTargetPicker::addClient):
2553         (WebKit::WebAVPlaybackTargetPicker::removeClient):
2554         (WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget):
2555         (WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange):
2556         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2557         (WebKit::WebChromeClient::showPlaybackTargetPicker):
2558         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets):
2559         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets):
2560         * WebProcess/WebCoreSupport/WebChromeClient.h:
2561         * WebProcess/WebPage/WebPage.h:
2562         * WebProcess/WebPage/WebPage.messages.in:
2563         * WebProcess/WebPage/mac/WebPageMac.mm:
2564         (WebKit::WebPage::playbackTargetSelected):
2565         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
2566         * WebProcess/com.apple.WebProcess.sb.in:
2567
2568 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
2569
2570         Fix the build
2571
2572         Unreviewed.
2573
2574         * Shared/Downloads/mac/DownloadMac.mm:
2575         (WebKit::Download::start):
2576         (WebKit::Download::resume):
2577
2578 2015-03-10  Sam Weinig  <sam@webkit.org>
2579
2580         Allow adding a button in input elements for auto fill related functionality
2581         <rdar://problem/19782066>
2582         https://bugs.webkit.org/show_bug.cgi?id=142564
2583
2584         Reviewed by Anders Carlsson.
2585
2586         - Adds new SPI to respond to clicks on the AutoFill button (both bundle and UIProcess).
2587         - Adds new SPI to enable/disable the display of the AutoFill button on an element.
2588         - Adds new SPI to get the bounds of the AutoFill button.
2589         - Updates spelling of AutoFill to be consistent.
2590
2591         * UIProcess/API/APIUIClient.h:
2592         (API::UIClient::didClickAutoFillButton):
2593         * UIProcess/API/C/WKPage.cpp:
2594         (WKPageSetPageUIClient):
2595         * UIProcess/API/C/WKPageUIClient.h:
2596         * UIProcess/WebPageProxy.cpp:
2597         (WebKit::WebPageProxy::handleAutoFillButtonClick):
2598         * UIProcess/WebPageProxy.h:
2599         * UIProcess/WebPageProxy.messages.in:
2600         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
2601         (API::InjectedBundle::PageUIClient::didClickAutoFillButton):
2602         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2603         (WebKit::InjectedBundlePageUIClient::didClickAutoFillButton):
2604         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2605         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2606         (WebKit::WebChromeClient::handleAutoFillButtonClick):
2607         * WebProcess/WebCoreSupport/WebChromeClient.h:
2608         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
2609         Pipe the didClickAutoFillButton to the SPI layer.
2610
2611         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2612         (-[WKWebProcessPlugInNodeHandle HTMLInputElementIsAutoFilled]):
2613         (-[WKWebProcessPlugInNodeHandle setHTMLInputElementIsAutoFilled:]):
2614         Update for new spelling of AutoFill.
2615
2616         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
2617         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2618         (WKBundleNodeHandleGetHTMLInputElementAutoFilled):
2619         (WKBundleNodeHandleSetHTMLInputElementAutoFilled):
2620         Added. Replaces WKBundleNodeHandleGetHTMLInputElementAutofilled/WKBundleNodeHandleSetHTMLInputElementAutofilled
2621         which are now deprecated due to inconsistent spelling of AutoFill.
2622
2623         (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonEnabled):
2624         (WKBundleNodeHandleSetHTMLInputElementAutoFillButtonEnabled):
2625         (WKBundleNodeHandleGetHTMLInputElementAutoFillButtonBounds):
2626         Added.
2627
2628         (WKBundleNodeHandleGetHTMLInputElementAutofilled):
2629         (WKBundleNodeHandleSetHTMLInputElementAutofilled):
2630         Deprecated.
2631
2632         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2633         (WebKit::InjectedBundleNodeHandle::getOrCreate):
2634         (WebKit::InjectedBundleNodeHandle::create):
2635         (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
2636         (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
2637         (WebKit::InjectedBundleNodeHandle::coreNode):
2638         (WebKit::InjectedBundleNodeHandle::document):
2639         (WebKit::InjectedBundleNodeHandle::elementBounds):
2640         (WebKit::InjectedBundleNodeHandle::renderRect):
2641         (WebKit::InjectedBundleNodeHandle::renderedImage):
2642         (WebKit::InjectedBundleNodeHandle::visibleRange):
2643         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
2644         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFilled):
2645         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFilled):
2646         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutoFillButtonEnabled):
2647         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutoFillButtonEnabled):
2648         (WebKit::InjectedBundleNodeHandle::htmlInputElementAutoFillButtonBounds):
2649         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
2650         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
2651         (WebKit::InjectedBundleNodeHandle::isTextField):
2652         (WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
2653         (WebKit::InjectedBundleNodeHandle::documentFrame):
2654         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
2655         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
2656         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled): Deleted.
2657         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled): Deleted.
2658         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2659         Fix-up InjectedBundleNodeHandle to store its underlying Node in a Ref, rather than a RefPtr.
2660         Add helpers to implement the new SPI for WKBundleNodeHandleRef.
2661
2662 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
2663
2664         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
2665         https://bugs.webkit.org/show_bug.cgi?id=142549
2666
2667         Reviewed by Simon Fraser.
2668
2669         * Shared/WebPreferencesDefinitions.h:
2670         * WebProcess/WebPage/WebPage.cpp:
2671         (WebKit::WebPage::updatePreferences):
2672         Flip the pref on by default.
2673
2674 2015-03-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2675
2676         [GTK] Do not look for child processes in the UI process binary path
2677         https://bugs.webkit.org/show_bug.cgi?id=135752
2678
2679         Reviewed by Gustavo Noronha Silva.
2680
2681         It's only useful for internal tools and tests, but never when
2682         installed, since we don't install the processes in the bin dir but
2683         in the libexec dir.
2684
2685         * Shared/gtk/ProcessExecutablePathGtk.cpp:
2686         (WebKit::findWebKitProcess): Only look or the executables in the
2687         UI process binary path or WEBKIT_EXEC_PATH for development builds.
2688         * UIProcess/API/gtk/WebKitWebContext.cpp:
2689         (injectedBundleDirectory): Only check
2690         WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.
2691
2692 2015-03-10  Antti Koivisto  <antti@apple.com>
2693
2694         Add interface to delete disk cache entries
2695         https://bugs.webkit.org/show_bug.cgi?id=142546
2696
2697         Reviewed by Anders Carlsson.
2698
2699         * NetworkProcess/cache/NetworkCache.cpp:
2700         (WebKit::NetworkCache::Cache::remove):
2701         * NetworkProcess/cache/NetworkCache.h:
2702         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2703         (WebKit::NetworkCache::Storage::Storage):
2704         (WebKit::NetworkCache::Storage::remove):
2705
2706             Move deletion to a serial queue so we can't create large number of threads.
2707
2708         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2709         (WebKit::NetworkCache::Storage::dispatchHeaderWriteOperation):
2710         (WebKit::NetworkCache::Storage::removeEntry): Deleted.
2711         * NetworkProcess/cache/NetworkCacheStorage.h:
2712         (WebKit::NetworkCache::Storage::deleteQueue):
2713
2714 2015-03-10  Chris Dumez  <cdumez@apple.com>
2715
2716         5 tests fail on Apple Mac WK2 performance bots
2717         https://bugs.webkit.org/show_bug.cgi?id=142485
2718
2719         Reviewed by Andreas Kling.
2720
2721         Only log errors in debug builds if SandboxExtension::createHandle() fails
2722         so that performance tests don't fail because of it. Such error is not
2723         fatal and is expected under certain circumstances. In particular,
2724         SandboxExtension::createHandle() is sometimes called for non-existing
2725         files (e.g. from NetworkResourceLoadParameters::encode()).
2726
2727         * Shared/mac/SandboxExtensionMac.mm:
2728         (WebKit::SandboxExtension::createHandle):
2729
2730 2015-03-10  Timothy Horton  <timothy_horton@apple.com>
2731
2732         Fix the build
2733
2734         * Shared/Downloads/ios/DownloadIOS.mm:
2735         (WebKit::Download::startWithHandle):
2736         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2737         (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
2738
2739 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2740
2741         [GTK] Contents not shown when entering AC mode unless the window is resized
2742         https://bugs.webkit.org/show_bug.cgi?id=142347
2743
2744         Reviewed by Žan Doberšek.
2745
2746         The problem is once again that we are now creating the redirected
2747         X window in realize method. When entering AC mode we resize the
2748         redirected window to the drawing area size. Since the size hasn't
2749         changed from the drawing area point of view, the web process is
2750         not notified. The WebProcess always uses the window size, instead
2751         of the root layer size, to make sure it's in sync, see the comment
2752         in LayerTreeHostGtk::compositeLayersToContext(). So, we need to
2753         enforce a resize when we change the size of the redirected window
2754         when entering AC mode.
2755
2756         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2757         (webkitWebViewBaseEnterAcceleratedCompositingMode):
2758         * UIProcess/DrawingAreaProxyImpl.h:
2759         (WebKit::DrawingAreaProxyImpl::forceResize):
2760
2761 2015-03-10  Csaba Osztrogonác  <ossy@webkit.org>
2762
2763         [cmake] Handle unused parameter warnings as build errors except in WebKit2
2764         https://bugs.webkit.org/show_bug.cgi?id=142338
2765
2766         Reviewed by Gyuyoung Kim.
2767
2768         * CMakeLists.txt:
2769
2770 2015-03-10  Dan Bernstein  <mitz@apple.com>
2771
2772         WebKit2 part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
2773         https://bugs.webkit.org/show_bug.cgi?id=142461
2774
2775         Reviewed by Sam Weinig.
2776
2777         * UIProcess/API/Cocoa/WKWebView.mm:
2778         (-[WKWebView initWithFrame:configuration:]): Initialize
2779         webPageConfiguration.treatsSHA1SignedCertificatesAsInsecure from the WKWebViewConfiguration.
2780
2781         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2782         Added _treatsSHA1SignedCertificatesAsInsecure ivar.
2783         (-[WKWebViewConfiguration copyWithZone:]): Copy _treatsSHA1SignedCertificatesAsInsecure.
2784         (-[WKWebViewConfiguration _treatsSHA1SignedCertificatesAsInsecure]): Added this getter.
2785         (-[WKWebViewConfiguration _setTreatsSHA1SignedCertificatesAsInsecure:]): Added this setter.
2786
2787         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared new
2788         _treatsSHA1SignedCertificatesAsInsecure property.
2789
2790         * UIProcess/PageLoadState.cpp:
2791         (WebKit::PageLoadState::didCommitLoad): Use new hasInsecureContent parameter to initialize
2792         hasInsecureContent parameter in the uncommitted state.
2793         * UIProcess/PageLoadState.h:
2794
2795         * UIProcess/WebPageProxy.cpp:
2796         (WebKit::WebPageProxy::WebPageProxy): Initialize new m_treatsSHA1CertificatesAsInsecure
2797         member variable from the WebPageConfiguration.
2798         (WebKit::WebPageProxy::didCommitLoadForFrame): Pass true for the new hasInsecureContent to
2799         PageLoadState::didCommitLoad if we are treating SHA1-signed certificates as insecure and
2800         the certificate info contains a non-root SHA1-signed certificate.
2801         * UIProcess/WebPageProxy.h: Added m_treatsSHA1CertificatesAsInsecure member variable.
2802
2803 2015-03-09  Geoffrey Garen  <ggaren@apple.com>
2804
2805         bmalloc: tryFastMalloc shouldn't crash
2806         https://bugs.webkit.org/show_bug.cgi?id=142443
2807
2808         Reviewed by Anders Carlsson.
2809
2810         Part 1: Stop using tryFastRealloc.
2811
2812         * Shared/ShareableBitmap.cpp:
2813         (WebKit::ShareableBitmap::resize): Deleted.
2814         * Shared/ShareableBitmap.h: Removed the resize function because it has
2815         no clients.
2816
2817         * WebProcess/Plugins/PluginProxy.cpp:
2818         (WebKit::PluginProxy::updateBackingStore): Changed to allocate a new
2819         backing store instead of resizing the old one. This has three advantages:
2820
2821         (1) Might be more memory-efficient, since you don't have to keep the old
2822         one around while allocating the new one.
2823
2824         (2) Avoids the overhead of realloc() copying the contents of the old
2825         backing store even though we only want uninitialized memory.
2826
2827         (3) Makes resize failure consistent with initial allocation failure.
2828         Previously, while initial allocation failure would set the backing store
2829         to null, resize failure would keep the old wrong backing store and then
2830         tell it not to paint. Now, resize failure also sets the backing store to
2831         null.
2832
2833 2015-03-09  Martin Robinson  <mrobinson@igalia.com>
2834
2835         [EFL] Move DispatchQueue to WTF
2836         https://bugs.webkit.org/show_bug.cgi?id=142493
2837
2838         Reviewed by Csaba Osztrogonác.
2839
2840         * PlatformEfl.cmake: Remove DispatchQueue from the source list.
2841
2842 2015-03-08  Dean Jackson  <dino@apple.com>
2843
2844         [iOS Media] Video buffer progress missing on iPhones
2845         https://bugs.webkit.org/show_bug.cgi?id=142462
2846
2847         Reviewed by Eric Carlson.
2848
2849         Coordinate the SetBufferedTime message between the Web and UI
2850         processes.
2851
2852         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
2853         * WebProcess/ios/WebVideoFullscreenManager.h:
2854         * WebProcess/ios/WebVideoFullscreenManager.mm:
2855         (WebKit::WebVideoFullscreenManager::setBufferedTime):
2856
2857 2015-03-08  Sam Weinig  <sam@webkit.org>
2858
2859         [Content Extensions] Add scaffolding for the WKUserContentExtensionStore
2860         https://bugs.webkit.org/show_bug.cgi?id=142464
2861
2862         Reviewed by Dan Bernstein.
2863
2864         * Shared/API/APIObject.h:
2865         Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).
2866
2867         * Shared/API/c/WKBase.h:
2868         Add the WKUserContentExtensionStoreRef C-SPI type.
2869
2870         * Shared/Cocoa/APIObject.mm:
2871         (API::Object::newObject):
2872         Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
2873         needed shortly).
2874
2875         * UIProcess/API/APIUserContentExtensionStore.cpp: Added.
2876         (API::UserContentExtensionStore::UserContentExtensionStore):
2877         (API::UserContentExtensionStore::~UserContentExtensionStore):
2878         * UIProcess/API/APIUserContentExtensionStore.h: Added.
2879         Stub out the UserContentExtensionStore.
2880
2881         * UIProcess/API/C/WKAPICast.h:
2882         Add casting for the UserContentExtensionStore.
2883
2884         * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp: Added.
2885         (WKUserContentExtensionStoreGetTypeID):
2886         * UIProcess/API/C/WKUserContentExtensionStoreRef.h: Added.
2887         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h: Added.
2888         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: Added.
2889         (-[_WKUserContentExtensionStore init]):
2890         (-[_WKUserContentExtensionStore dealloc]):
2891         (-[_WKUserContentExtensionStore _apiObject]):
2892         * UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Added.
2893         (WebKit::wrapper):
2894         Stub out SPI for the UserContentExtensionStore.
2895
2896         * WebKit2.xcodeproj/project.pbxproj:
2897         * CMakeLists.txt:
2898         Add new files.
2899
2900 2015-03-08  Sam Weinig  <sam@webkit.org>
2901
2902         AX: Expose a frame's accessible name through WK2 C SPI
2903         <rdar://problem/19653068>
2904         https://bugs.webkit.org/show_bug.cgi?id=142468
2905
2906         Reviewed by Dan Bernstein.
2907
2908         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2909         (WKBundleFrameSetAccessibleName):
2910         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2911         * WebProcess/WebPage/WebFrame.cpp:
2912         (WebKit::WebFrame::setAccessibleName):
2913         * WebProcess/WebPage/WebFrame.h:
2914         Add SPI to set a frame's accessible name. This matches the Legacy WebKit SPI -[WebFrame setAccessibleName:]. 
2915
2916 2015-03-08  Sam Weinig  <sam@webkit.org>
2917
2918         [Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
2919         https://bugs.webkit.org/show_bug.cgi?id=142458
2920
2921         Reviewed by Dan Bernstein.
2922
2923         * Shared/WebCompiledContentExtensionData.cpp:
2924         (WebKit::WebCompiledContentExtensionData::encode):
2925         (WebKit::WebCompiledContentExtensionData::decode):
2926         * Shared/WebCompiledContentExtensionData.h:
2927         (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
2928         Store the compiled data as a SharedMemory block with offset/size pairs for the
2929         bytecode and actions. While the bytecode offset is currently always 0, this won't
2930         be the case when we map these in from files due to metadata that will be placed
2931         at the top of the files.
2932
2933         * Shared/WebCompiledContentExtension.h:
2934         * Shared/WebCompiledContentExtension.cpp:
2935         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
2936         Temporary creation helper. In subsequent patches, this will be removed and replaced
2937         by always passing in shared/mapped data.
2938
2939         (WebKit::WebCompiledContentExtension::create):
2940         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
2941         (WebKit::WebCompiledContentExtension::bytecode):
2942         (WebKit::WebCompiledContentExtension::bytecodeLength):
2943         (WebKit::WebCompiledContentExtension::actions):
2944         (WebKit::WebCompiledContentExtension::actionsLength):
2945         Convert to work with the new WebCompiledContentExtension format.
2946         
2947         * UIProcess/API/C/WKUserContentFilterRef.cpp:
2948         (WKUserContentFilterCreate):
2949         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2950         (-[_WKUserContentFilter initWithName:serializedRules:]):
2951         Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
2952
2953         * WebProcess/UserContent/WebUserContentController.cpp:
2954         (WebKit::WebUserContentController::addUserContentExtensions):
2955         * WebProcess/WebPage/WebPageGroupProxy.cpp:
2956         (WebKit::WebPageGroupProxy::addUserContentExtension):
2957         Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.
2958
2959 2015-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2960
2961         Remove willDestroyFrame in WKBundlePageLoaderClient
2962         https://bugs.webkit.org/show_bug.cgi?id=142389
2963
2964         Reviewed by Anders Carlsson.
2965
2966         I added willDestroyFrame in r154540 but I realized recently that
2967         it has never actually worked. Adding the callback to
2968         WKBundlePageLoaderClient was the first mistake, since frames are
2969         handled by WebProcess and DidDestroyFrame message is indeed a
2970         WebProcessProxy not a WebPageProxy one. Second mistake was calling
2971         the callback from WebFrameLoaderClient::frameLoaderDestroyed(),
2972         since at that point the frame has already been detached from the
2973         page and so WebFrame::page() always returns nullptr. So, this in
2974         fact dead code and since r180211 nobody is using it.
2975
2976         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
2977         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2978         (webkitWebPageCreate): Use verion 6 instead of version 7 of loader client.
2979         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2980         (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): Deleted.
2981         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2982         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
2983
2984 2015-03-06  Sam Weinig  <sam@webkit.org>
2985
2986         [Content Extensions] Move compiling of content extensions to the UIProcess
2987         https://bugs.webkit.org/show_bug.cgi?id=142402
2988
2989         Reviewed by Benjamin Poulain.
2990
2991         * Shared/API/APIObject.h:
2992         Rename UserContentFilter type to UserContentExtension to match new unified naming.
2993
2994         * Shared/WebCompiledContentExtension.cpp: Added.
2995         (WebKit::WebCompiledContentExtension::create):
2996         (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
2997         (WebKit::WebCompiledContentExtension::~WebCompiledContentExtension):
2998         (WebKit::WebCompiledContentExtension::bytecode):
2999         (WebKit::WebCompiledContentExtension::bytecodeLength):
3000         (WebKit::WebCompiledContentExtension::actions):
3001         (WebKit::WebCompiledContentExtension::actionsLength):
3002         * Shared/WebCompiledContentExtension.h: Added.
3003         Add new WebKit2 implementation of CompiledContentExtension. Right now it is the same as the old
3004         WebCore based CompiledContentExtension, but in subsequent patches, it will use shared/file backed
3005         memory.
3006
3007         * Shared/WebCompiledContentExtensionData.cpp: Added.
3008         (WebKit::WebCompiledContentExtensionData::encode):
3009         (WebKit::WebCompiledContentExtensionData::decode):
3010         * Shared/WebCompiledContentExtensionData.h: Added.
3011         Add encodable/decodable holder for the compiled content extension data for use in IPC. Right
3012         now it is doing the naive thing and always copying the data, but in subsequent patches, it will
3013         use shared/file backed memory.
3014
3015         * Shared/WebPageGroupData.cpp:
3016         (WebKit::WebPageGroupData::encode):
3017         (WebKit::WebPageGroupData::decode):
3018         * Shared/WebPageGroupData.h:
3019         Rename member to match new unification on the name userContentExtension. Change the value from
3020         the serialized JSON (as a String) to WebCompiledContentExtensionData.
3021
3022         * UIProcess/API/APIUserContentExtension.cpp: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.cpp.
3023         (API::UserContentExtension::UserContentExtension):
3024         (API::UserContentExtension::~UserContentExtension):
3025         (API::UserContentFilter::UserContentFilter): Deleted.
3026         (API::UserContentFilter::~UserContentFilter): Deleted.
3027         * UIProcess/API/APIUserContentExtension.h: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.h.
3028         * UIProcess/API/APIUserContentFilter.cpp: Removed.
3029         * UIProcess/API/APIUserContentFilter.h: Removed.
3030         Renamed UserContentFilter to APIUserContentExtension. Updated to store the compiled extension (as a WebCompiledContentExtension)
3031         rather than the serialized JSON.
3032
3033         * UIProcess/API/C/WKAPICast.h:
3034         * UIProcess/API/C/WKPageGroup.cpp:
3035         (WKPageGroupAddUserContentFilter):
3036         (WKPageGroupRemoveUserContentFilter):
3037         (WKPageGroupRemoveAllUserContentFilters):
3038         * UIProcess/API/C/WKUserContentControllerRef.cpp:
3039         (WKUserContentControllerAddUserContentFilter):
3040         (WKUserContentControllerRemoveAllUserContentFilters):
3041         * UIProcess/API/Cocoa/WKUserContentController.mm:
3042         (-[WKUserContentController _addUserContentFilter:]):
3043         (-[WKUserContentController _removeUserContentFilter:]):
3044         (-[WKUserContentController _removeAllUserContentFilters]):
3045         Update for rename of APIUserContentFilter -> UserContentExtension.
3046
3047         * UIProcess/API/C/WKUserContentFilterRef.cpp:
3048         (WKUserContentFilterGetTypeID):
3049         (WKUserContentFilterCreate):
3050         Update for rename of APIUserContentFilter -> UserContentExtension. Also make WKUserContentFilterCreate eagerly
3051         compile rule list to a WebCompiledContentExtensionData.
3052
3053         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
3054         (-[_WKUserContentFilter initWithName:serializedRules:]):
3055         (-[_WKUserContentFilter dealloc]):
3056         (-[_WKUserContentFilter _apiObject]):
3057         Update for rename of APIUserContentFilter -> UserContentExtension. Also make initWithName:serializedRules: eagerly
3058         compile rule list to a WebCompiledContentExtensionData.
3059
3060         * UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
3061         (WebKit::wrapper):
3062         Update for rename of APIUserContentFilter -> UserContentExtension.
3063
3064         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3065         (WebKit::WebUserContentControllerProxy::addProcess):
3066         (WebKit::WebUserContentControllerProxy::addUserContentExtension):
3067         (WebKit::WebUserContentControllerProxy::removeUserContentExtension):
3068         (WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions):
3069         (WebKit::WebUserContentControllerProxy::addUserContentFilter): Deleted.
3070         (WebKit::WebUserContentControllerProxy::removeUserContentFilter): Deleted.
3071         (WebKit::WebUserContentControllerProxy::removeAllUserContentFilters): Deleted.
3072         * UIProcess/UserContent/WebUserContentControllerProxy.h:
3073         * UIProcess/WebPageGroup.cpp:
3074         (WebKit::WebPageGroup::addUserContentExtension):
3075         (WebKit::WebPageGroup::removeUserContentExtension):
3076         (WebKit::WebPageGroup::removeAllUserContentExtensions):
3077         (WebKit::WebPageGroup::addUserContentFilter): Deleted.
3078         (WebKit::WebPageGroup::removeUserContentFilter): Deleted.
3079         (WebKit::WebPageGroup::removeAllUserContentFilters): Deleted.
3080         * UIProcess/WebPageGroup.h:
3081         * WebKit2.xcodeproj/project.pbxproj:
3082         * WebProcess/UserContent/WebUserContentController.cpp:
3083         (WebKit::WebUserContentController::addUserContentExtensions):
3084         (WebKit::WebUserContentController::removeUserContentExtension):
3085         (WebKit::WebUserContentController::removeAllUserContentExtensions):
3086         (WebKit::WebUserContentController::addUserContentFilters): Deleted.
3087         (WebKit::WebUserContentController::removeUserContentFilter): Deleted.
3088         (WebKit::WebUserContentController::removeAllUserContentFilters): Deleted.
3089         * WebProcess/UserContent/WebUserContentController.h:
3090         * WebProcess/UserContent/WebUserContentController.messages.in:
3091         * WebProcess/WebPage/WebPageGroupProxy.cpp:
3092         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
3093         (WebKit::WebPageGroupProxy::addUserContentExtension):
3094         (WebKit::WebPageGroupProxy::removeUserContentExtension):
3095         (WebKit::WebPageGroupProxy::removeAllUserContentExtensions):
3096         (WebKit::WebPageGroupProxy::addUserContentFilter): Deleted.
3097         (WebKit::WebPageGroupProxy::removeUserContentFilter): Deleted.
3098         (WebKit::WebPageGroupProxy::removeAllUserContentFilters): Deleted.
3099         * WebProcess/WebPage/WebPageGroupProxy.h:
3100         * WebProcess/WebPage/WebPageGroupProxy.messages.in:
3101         Pipe the compiled extension from the UIProcess to the WebProcess.
3102
3103 2015-03-06  Dean Jackson  <dino@apple.com>
3104
3105         Support "plus-lighter" in mix-blend mode
3106         https://bugs.webkit.org/show_bug.cgi?id=142416
3107         <rdar://problem/19993979>
3108
3109         Reviewed by Darin Adler and Sam Weinig.
3110
3111         Output the appropriate blending type when logging.
3112
3113         * Shared/mac/RemoteLayerTreeTransaction.mm:
3114         (WebKit::RemoteLayerTreeTextStream::operator<<):
3115
3116 2015-03-06  Beth Dakin  <bdakin@apple.com>
3117
3118         REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
3119         https://bugs.webkit.org/show_bug.cgi?id=142371
3120         -and corresponding-
3121         rdar://problem/20059224
3122
3123         Reviewed by Tim Horton.
3124
3125         This patch has the WKImmediateActionController keep track of whether or not it has 
3126         an active immediate action. Then we only call into Lookup and DD if the window is 
3127         key OR if the WKView’s immediateActionController has an active action.
3128         * UIProcess/API/mac/WKView.mm:
3129         (-[WKView _dismissContentRelativeChildWindows]):
3130         * UIProcess/mac/WKImmediateActionController.h:
3131         * UIProcess/mac/WKImmediateActionController.mm:
3132         (-[WKImmediateActionController initWithPage:view:recognizer:]):
3133         (-[WKImmediateActionController willDestroyView:]):
3134         (-[WKImmediateActionController _clearImmediateActionState]):
3135         (-[WKImmediateActionController hasActiveImmediateAction]):
3136         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
3137
3138 2015-03-06  Jeremy Jones  <jeremyj@apple.com>
3139
3140         Scroll to make the video element visible when exiting fullscreen.
3141         https://bugs.webkit.org/show_bug.cgi?id=141439
3142
3143         Reviewed by Simon Fraser.
3144
3145         This patch will restore interface state when exiting fullscreen.
3146         Adds preparedToReturnToInline to continue exiting once the interface is updated.
3147
3148         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3149         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3150         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3151         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
3152         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
3153         (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): added.
3154         * WebProcess/ios/WebVideoFullscreenManager.h:
3155         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
3156         * WebProcess/ios/WebVideoFullscreenManager.mm:
3157         (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
3158
3159 2015-03-06  Antti Koivisto  <antti@apple.com>
3160
3161         Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
3162         https://bugs.webkit.org/show_bug.cgi?id=142401
3163
3164         Rubber-stamped by Anders Carlsson.
3165
3166         It is now fully cross-platform.
3167
3168         * NetworkProcess/cache/NetworkCacheStorage.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm.
3169         (WebKit::NetworkCache::Storage::shrinkIfNeeded):
3170         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm: Removed.
3171         * WebKit2.xcodeproj/project.pbxproj:
3172
3173 2015-03-06  Antti Koivisto  <antti@apple.com>
3174
3175         Don't use dispatch_semaphore in NetworkCacheStorage
3176         https://bugs.webkit.org/show_bug.cgi?id=142395
3177
3178         Reviewed by Anders Carlsson.
3179
3180         * NetworkProcess/cache/NetworkCacheIOChannel.h:
3181         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3182         (WebKit::NetworkCache::IOChannel::read):
3183         (WebKit::NetworkCache::IOChannel::readSync):
3184
3185             Add readSync to encapsulate the semaphore.
3186
3187         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3188         (WebKit::NetworkCache::Storage::traverse):
3189
3190 2015-03-06  Antti Koivisto  <antti@apple.com>
3191
3192         Move dispatch_data use behind NetworkCache::Data abstraction
3193         https://bugs.webkit.org/show_bug.cgi?id=142392
3194
3195         Reviewed by Anders Carlsson.
3196
3197         * NetworkProcess/cache/NetworkCacheData.h:
3198         (WebKit::NetworkCache::DispatchPtr::DispatchPtr):
3199         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
3200         (WebKit::NetworkCache::Data::Data):
3201         (WebKit::NetworkCache::Data::apply):
3202         (WebKit::NetworkCache::Data::subrange):
3203         (WebKit::NetworkCache::concatenate):
3204         (WebKit::NetworkCache::mapFile):
3205         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3206         (WebKit::NetworkCache::IOChannel::read):
3207         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3208         (WebKit::NetworkCache::hashData):
3209         (WebKit::NetworkCache::decodeEntryMetaData):
3210         (WebKit::NetworkCache::decodeEntryHeader):
3211         (WebKit::NetworkCache::decodeEntry):
3212         (WebKit::NetworkCache::encodeEntryMetaData):
3213         (WebKit::NetworkCache::encodeEntryHeader):
3214         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
3215         (WebKit::NetworkCache::mapFile): Deleted.
3216
3217 2015-03-06  Antti Koivisto  <antti@apple.com>
3218
3219         Use WTF abstraction for page size in NetworkCacheStorage
3220         https://bugs.webkit.org/show_bug.cgi?id=142396
3221
3222         Reviewed by Darin Adler.
3223
3224         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3225         (WebKit::NetworkCache::decodeEntryMetaData):
3226         (WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
3227
3228 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3229
3230         [iOS] SVG fonts are garbled
3231         https://bugs.webkit.org/show_bug.cgi?id=142377
3232
3233         Reviewed by Simon Fraser.
3234
3235         * Configurations/FeatureDefines.xcconfig:
3236
3237 2015-03-06  Zan Dobersek  <zdobersek@igalia.com>
3238
3239         Unguarded GTK-specific member and method usage in DrawingAreaImpl
3240         https://bugs.webkit.org/show_bug.cgi?id=142391
3241
3242         Reviewed by Carlos Garcia Campos.
3243
3244         r180924 introduced unguarded use of m_nativeSurfaceHandleForCompositing
3245         and LayerTreeHost::setNativeSurfaceHandleForCompositing() in DrawingAreaImpl.
3246         Definitions for both of these are guarded with USE(TEXTURE_MAPPER_GL) and PLATFORM(GTK),
3247         so their use should be as well.
3248
3249         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3250         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
3251
3252 2015-03-06  David Kilzer  <ddkilzer@apple.com>
3253
3254         REGRESSION (r181140): WebKit2 fails to build on Mavericks buildbot
3255
3256         Work around Xcode dependency tracking issues by making changes
3257         to source files that need to be recompiled.
3258
3259         * NetworkProcess/NetworkProcess.cpp: Update copyright.  Include
3260         NetworkCache.h since it didn't appear to be included by
3261         NetworkCacheCoders.h.
3262         * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Update copyright.
3263
3264 2015-03-05  Antti Koivisto  <antti@apple.com>
3265
3266         Move disk cache classes to namespace
3267         https://bugs.webkit.org/show_bug.cgi?id=142339
3268
3269         Reviewed by Anders Carlsson.
3270
3271         Move everything to NetworkCache namespace. 
3272
3273 2015-03-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3274
3275         REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect
3276         https://bugs.webkit.org/show_bug.cgi?id=142345
3277
3278         Reviewed by Martin Robinson.
3279
3280         This was caused by r180924 that postpones the creation of the
3281         TextureMapper, which could cause that a layer has not yet a size
3282         when TextureMapper::paint() is called. This patch moves the
3283         creation of the TextureMapper to
3284         LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that
3285         it's created as soon as it's possible to create. This method is
3286         called by the drawing area right after creating the
3287         LayerTreeHostGtk if it already have a handler, or when the handle
3288         is received from the UI process.
3289
3290         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3291         (WebKit::LayerTreeHostGtk::initialize): Remove the
3292         nsureTextureMapper call because at this point the layer context ID
3293         is always 0, so it's impossible to create the TextureMapper.
3294         (WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the
3295         ensureTextureMapper call from here too, since at this point, if we
3296         have a context, we should also have a TextureMapper. Add an ASSERT
3297         right before using the TextureMapper.
3298         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
3299         Create the TextureMapper here.
3300         (WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted.
3301         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3302
3303 2015-03-05  Anders Carlsson  <andersca@apple.com>
3304
3305         WKWebView Encoder for remote object communication does not implement encodeInt32:forKey:
3306         https://bugs.webkit.org/show_bug.cgi?id=142356
3307         rdar://problem/20058952
3308
3309         Reviewed by Tim Horton.
3310
3311         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3312         (-[WKRemoteObjectEncoder encodeInt32:forKey:]):
3313         (-[WKRemoteObjectDecoder decodeInt32ForKey:]):
3314
3315 2015-03-05  Chris Dumez  <cdumez@apple.com>
3316
3317         NetworkCache efficacy logging is using too much CPU
3318         https://bugs.webkit.org/show_bug.cgi?id=142186
3319         <rdar://problem/19632080>
3320
3321         Reviewed by Antti Koivisto.
3322
3323         NetworkCache efficacy logging was using too much CPU mostly due to
3324         database writes. Logging was using ~11.3% of the NetworkProcess'
3325         CPU usage (~9.2% for writes / ~1.3% for reads).
3326
3327         This patch buffers writes requests in memory and only writes them
3328         to disk every 10 seconds. We are thus writing to this less frequently
3329         and writing more at once, in a single SQL transaction. After this
3330         change, efficacy logging only accounts for ~3.5% of the NetworkProcess'
3331         CPU activity (1.5% for writes / 1.2% for reads).
3332
3333         Now that CPU usage is more acceptable, this patch re-enables the
3334         network cache efficicy logging.
3335
3336         * NetworkProcess/cache/NetworkCacheStatistics.h:
3337
3338         * NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
3339         (WebKit::executeSQLCommand):
3340         (WebKit::executeSQLStatement):
3341         Call step() instead of executeCommand() because:
3342         - The input statement is already prepared.
3343         - step() does not finalize() the statement and thus we caller can
3344           reuse it after calling reset().
3345
3346         (WebKit::NetworkCacheStatistics::NetworkCacheStatistics):
3347         (WebKit::NetworkCacheStatistics::initialize):
3348         (WebKit::NetworkCacheStatistics::bootstrapFromNetworkCache):
3349         (WebKit::NetworkCacheStatistics::recordNotCachingResponse):
3350         (WebKit::NetworkCacheStatistics::recordNotUsingCacheForRequest):
3351         (WebKit::NetworkCacheStatistics::recordRetrievalFailure):
3352         (WebKit::NetworkCacheStatistics::markAsRequested):
3353         (WebKit::NetworkCacheStatistics::writeTimerFired):
3354         (WebKit::NetworkCacheStatistics::queryWasEverRequested):
3355         (WebKit::NetworkCacheStatistics::addHashesToDatabase):
3356         (WebKit::NetworkCacheStatistics::addStoreDecisionsToDatabase):
3357         (WebKit::NetworkCacheStatistics::addHashToDatabase): Deleted.
3358
3359         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3360         (WebKit::registerUserDefaultsIfNeeded):
3361         Re-enable the network cache efficacy logging.
3362
3363 2015-03-05  Antti Koivisto  <antti@apple.com>
3364
3365         Switch NetworkCacheStorage to WorkQueue abstraction
3366         https://bugs.webkit.org/show_bug.cgi?id=142337
3367
3368         Reviewed by Anders Carlsson.
3369
3370         Don't use dispatch_async directly.
3371
3372         * NetworkProcess/cache/NetworkCacheStorage.h:
3373         (WebKit::NetworkCacheStorage::ioQueue):
3374         (WebKit::NetworkCacheStorage::backgroundIOQueue):
3375         * NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
3376         (WebKit::NetworkCacheStorage::NetworkCacheStorage):
3377         (WebKit::NetworkCacheStorage::initialize):
3378         (WebKit::NetworkCacheStorage::removeEntry):
3379         (WebKit::NetworkCacheStorage::dispatchReadOperation):
3380         (WebKit::retrieveFromMemory):
3381         (WebKit::NetworkCacheStorage::traverse):
3382         (WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
3383         (WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):
3384         (WebKit::NetworkCacheStorage::clear):
3385         (WebKit::NetworkCacheStorage::shrinkIfNeeded):
3386         (WebKit::NetworkCacheStorage::deleteOldVersions):
3387
3388 2015-03-05  Lukasz Bialek  <l.bialek@samsung.com>
3389
3390         [EFL][WK2] Crash when "Download Linked File" from MiniBrowser context menu is clicked
3391         https://bugs.webkit.org/show_bug.cgi?id=131162
3392
3393         Reviewed by Gyuyoung Kim.
3394
3395         "Download Linked File" crashes because of null-pointer exception of Download Job.
3396         Due to architectural difficulties, easy fix is not possible (EwkView is needed in
3397         DownloadManager to create DownloadJobs and it is only used to notify the client 
3398         about download (finished, error, cancel) via smart callback using EwkView (Evas_Object).
3399
3400         Propose a new callbacks which are view independent and detach EFL's DownloadManager
3401         from EwkView. It makes DownloadManagerEFL consistent with WKContextDownload.
3402         Fix the crash and restore download functionality.
3403
3404         * PlatformEfl.cmake:
3405         Enable newly reimplemented tests
3406         * UIProcess/API/efl/EwkViewCallbacks.h:
3407         Remove old callback mechanism
3408         * UIProcess/API/efl/ewk_context.cpp:
3409         (ewk_context_download_callbacks_set):
3410         * UIProcess/API/efl/ewk_context.h:
3411         Declare new callback functions and registration functions
3412         * UIProcess/API/efl/ewk_download_job.cpp:
3413         (EwkDownloadJob::EwkDownloadJob):
3414         (EwkDownloadJob::view): Deleted.
3415         * UIProcess/API/efl/ewk_download_job.h:
3416         * UIProcess/API/efl/ewk_download_job_private.h:
3417         (EwkDownloadJob::create):
3418         Remove EwkView dependency
3419         * UIProcess/API/efl/ewk_view.h:
3420         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
3421         Alter tests to new callback mechanism
3422         * UIProcess/efl/DownloadManagerEfl.cpp:
3423         (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
3424         (WebKit::DownloadManagerEfl::didStart):
3425         (WebKit::DownloadManagerEfl::didFail):
3426         (WebKit::DownloadManagerEfl::didCancel):
3427         (WebKit::DownloadManagerEfl::didFinish):
3428         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
3429         (WebKit::DownloadManagerEfl::registerDownloadJob):
3430         (WebKit::DownloadManagerEfl::setCallbacks):
3431         * UIProcess/efl/DownloadManagerEfl.h:
3432         * UIProcess/efl/WebViewEfl.cpp:
3433         (WebKit::WebViewEfl::handleDownloadRequest):
3434         Add support of new callback mechanism
3435
3436 2015-03-05  Michael Catanzaro  <mcatanzaro@igalia.com>
3437
3438         [SOUP] Disable RC4
3439         https://bugs.webkit.org/show_bug.cgi?id=140014
3440
3441         Reviewed by Carlos Garcia Campos.
3442
3443         Disallow RC4-based ciphersuites when performing TLS negotiation,
3444         because it is no longer considered secure.
3445
3446         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
3447         (main):
3448         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
3449         (main):
3450
3451 2015-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
3452
3453         Hide Promise with runtime flags under Cocoa JSContext API
3454         https://bugs.webkit.org/show_bug.cgi?id=141965
3455
3456         Reviewed by Filip Pizlo.
3457
3458         Add new JSC runtime flag, PromiseDisabled.
3459
3460         * UIProcess/API/C/WKPreferencesRefPrivate.h:
3461         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3462
3463 2015-03-04  Beth Dakin  <bdakin@apple.com>
3464
3465         Attempted build fix.
3466
3467         * UIProcess/API/Cocoa/WKViewPrivate.h:
3468
3469 2015-03-04  Beth Dakin  <bdakin@apple.com>
3470
3471         Message UI process when contentSize changes
3472         https://bugs.webkit.org/show_bug.cgi?id=142294
3473         -and corresponding-
3474         rdar://problem/19963165
3475
3476         Reviewed by Andreas Kling.
3477
3478         This patch un-ifdefs the didChangeContentSize message so&