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