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