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