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