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