[CMake] [GTK] Organize and clean up unused CMake variables
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2
3         [CMake] [GTK] Organize and clean up unused CMake variables
4         https://bugs.webkit.org/show_bug.cgi?id=144364
5
6         Reviewed by Gyuyoung Kim.
7
8         * PlatformGTK.cmake: Add variables specific to this project.
9         * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
10         * webkit2gtk.pc.in: Ditto.
11
12 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
13
14         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
15         https://bugs.webkit.org/show_bug.cgi?id=144388
16
17         Reviewed by Brady Eidson.
18
19         Move the WebContextMenuClient::shareMenuItem() implementation to
20         platform files, since platforms not supporting share menu item
21         should return a null ContextMenuIem instead.
22
23         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
24         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
25         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
26         (WebKit::WebContextMenuClient::shareMenuItem):
27         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
28         (WebKit::WebContextMenuClient::shareMenuItem):
29         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
30         (WebKit::WebContextMenuClient::shareMenuItem):
31
32 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
33
34         REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
35         https://bugs.webkit.org/show_bug.cgi?id=144381
36
37         Reviewed by Darin Adler.
38
39         A requester enum value is passed now as part of the
40         ResourceRequest, but it's not encoded/decoded for soup.
41
42         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
43         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
44         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
45
46 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
47
48         [SOUP] Use xattrs to get/set the creation time of disk cache files
49         https://bugs.webkit.org/show_bug.cgi?id=144251
50
51         Reviewed by Martin Robinson.
52
53         The network process disk cache uses the creation time to compute a
54         worth value used to determine the order in which cached resources
55         are deleted when the cache is shrunk. In some operating systems
56         like Linux there's no st_birthtime in struct stat, but since cache
57         files are always created and deleted by us, we could use a custom
58         xattr to store and retrieve the creation time of cached resources.
59
60         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
61         (WebKit::NetworkCache::fileTimes):
62         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
63         (WebKit::NetworkCache::IOChannel::IOChannel):
64
65 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
66
67         Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
68         https://bugs.webkit.org/show_bug.cgi?id=144337
69
70         Reviewed by Antti Koivisto.
71
72         We send a buffer or a memory mapped handler to the web process
73         depending on whether the resource body is mapped or not, but we
74         are always creating a shared buffer even for mapped resources.
75         Split initializeBufferFromStorageRecord() moving the mapped memory
76         handler initialization to its own method.
77
78         * NetworkProcess/cache/NetworkCacheEntry.cpp:
79         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
80         Initialize the mapped memory handler if the body data is mapped.
81         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
82         Initialize the buffer by wrapping the mapped memory if the body
83         data is mapped, or using the body data directly otherwise.
84         (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
85         initializeShareableResourceHandleFromStorageRecord() if the
86         handler is null.
87         * NetworkProcess/cache/NetworkCacheEntry.h:
88
89 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
90
91         Make a non-static version of FrameView::yPositionForRootContentLayer()
92         https://bugs.webkit.org/show_bug.cgi?id=144375
93
94         Reviewed by Andy Estes.
95
96         There were two calls to the static FrameView::yPositionForRootContentLayer()
97         which passed in all the arguments for the same FrameView. Make a member
98         function for convenience.
99
100         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
101         (WebKit::shadowLayerPositionForFrame):
102
103 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
104
105         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
106         https://bugs.webkit.org/show_bug.cgi?id=143001
107
108         Reviewed by Gyuyoung Kim.
109
110         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
111         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
112         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
113         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
114         * WebProcess/WebCoreSupport/WebChromeClient.h:
115         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
116         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
117         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
118         * WebProcess/WebPage/WebPage.cpp:
119         (WebKit::WebPage::setSize):
120         (WebKit::WebPage::setUseFixedLayout):
121         (WebKit::WebPage::canHandleUserEvents):
122         * WebProcess/WebPage/WebPage.h:
123
124 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
125
126         [TextIndicator] Yellow highlight takes too long to fade out on scroll
127         https://bugs.webkit.org/show_bug.cgi?id=144358
128         <rdar://problem/19451011>
129
130         Reviewed by Beth Dakin.
131
132         * UIProcess/API/Cocoa/WKViewPrivate.h:
133         * UIProcess/API/mac/WKView.mm:
134         (-[WKView renewGState]):
135         (-[WKView viewDidMoveToWindow]):
136         (-[WKView _dictionaryLookupPopoverWillClose:]):
137         (-[WKView _setTextIndicator:]):
138         (-[WKView _setTextIndicator:withLifetime:]):
139         (-[WKView _clearTextIndicatorWithAnimation:]):
140         (-[WKView magnifyWithEvent:]):
141         (-[WKView smartMagnifyWithEvent:]):
142         (-[WKView setMagnification:centeredAtPoint:]):
143         (-[WKView setMagnification:]):
144         (-[WKView _dismissContentRelativeChildWindows]):
145         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
146         (-[WKView _setTextIndicator:fadeOut:]): Deleted.
147         * UIProcess/API/mac/WKViewInternal.h:
148         * UIProcess/PageClient.h:
149         * UIProcess/WebPageProxy.cpp:
150         (WebKit::WebPageProxy::pageDidScroll):
151         (WebKit::WebPageProxy::setTextIndicator):
152         (WebKit::WebPageProxy::clearTextIndicator):
153         * UIProcess/WebPageProxy.h:
154         * UIProcess/WebPageProxy.messages.in:
155         * UIProcess/ios/PageClientImplIOS.h:
156         * UIProcess/ios/PageClientImplIOS.mm:
157         (WebKit::PageClientImpl::setTextIndicator):
158         (WebKit::PageClientImpl::clearTextIndicator):
159         * UIProcess/mac/PageClientImpl.h:
160         * UIProcess/mac/PageClientImpl.mm:
161         (WebKit::PageClientImpl::setTextIndicator):
162         (WebKit::PageClientImpl::clearTextIndicator):
163         (WebKit::PageClientImpl::didPerformDictionaryLookup):
164         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
165         * UIProcess/mac/WKActionMenuController.mm:
166         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
167         * UIProcess/mac/WKImmediateActionController.mm:
168         (-[WKImmediateActionController _defaultAnimationController]):
169         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
170         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
171         (-[WKImmediateActionController _animationControllerForText]):
172         * WebProcess/WebPage/FindController.cpp:
173         (WebKit::FindController::updateFindIndicator):
174         Make _setTextIndicator take a reference.
175         Add a variant of _setTextIndicator that takes a Lifetime.
176         Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
177         Make dismissContentRelativeChildWindows take a parameter indicating
178         whether the dismissal should include animation or not (currently
179         only applies to TextIndicator).
180         Don't animate when dismissal occurs because of scrolling, zooming,
181         or other things in which the content will have changed significantly
182         underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
183
184 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
185
186         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
187         https://bugs.webkit.org/show_bug.cgi?id=144304
188
189         Reviewed by Geoffrey Garen.
190
191         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
192
193         * Configurations/FeatureDefines.xcconfig:
194
195 2015-04-28  Commit Queue  <commit-queue@webkit.org>
196
197         Unreviewed, rolling out r183514.
198         https://bugs.webkit.org/show_bug.cgi?id=144359
199
200         It broke cloop test bots (Requested by mcatanzaro on #webkit).
201
202         Reverted changeset:
203
204         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
205         https://bugs.webkit.org/show_bug.cgi?id=144304
206         http://trac.webkit.org/changeset/183514
207
208 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
209
210         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
211         https://bugs.webkit.org/show_bug.cgi?id=144304
212
213         Reviewed by Geoffrey Garen.
214
215         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
216
217         * Configurations/FeatureDefines.xcconfig:
218
219 2015-04-28  Enrica Casucci  <enrica@apple.com>
220
221         Add support for lookup on iOS.
222         https://bugs.webkit.org/show_bug.cgi?id=144342
223         rdar://problem/19994090
224
225         Reviewed by Tim Horton.
226
227         * UIProcess/WebPageProxy.h:
228         * UIProcess/ios/WKContentViewInteraction.mm:
229         (-[WKContentView _lookup:]):
230         (-[WKContentView canPerformAction:withSender:]):
231         * UIProcess/ios/WebPageProxyIOS.mm:
232         (WebKit::WebPageProxy::getLookupContextAtPoint):
233         * WebProcess/WebPage/WebPage.h:
234         * WebProcess/WebPage/WebPage.messages.in:
235         * WebProcess/WebPage/ios/WebPageIOS.mm:
236         (WebKit::WebPage::getLookupContextAtPoint):
237
238 2015-04-28  Brady Eidson  <beidson@apple.com>
239
240         Consolidate most "frame load" arguments into FrameLoadRequest.
241         https://bugs.webkit.org/show_bug.cgi?id=144276
242
243         Reviewed by Alexey Proskuryakov.
244
245         * WebProcess/Plugins/PluginView.cpp:
246         (WebKit::PluginView::loadURL):
247         
248         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
249         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
250         
251         * WebProcess/WebPage/WebInspector.cpp:
252         (WebKit::WebInspector::openInNewTab):
253
254 2015-04-28  Chris Dumez  <cdumez@apple.com>
255
256         [WK2][Mac] Update WebContent process' sandbox profile for AWD
257         https://bugs.webkit.org/show_bug.cgi?id=144315
258         <rdar://problem/20719293>
259
260         Reviewed by Alexey Proskuryakov.
261
262         Update sandbox profile for AWD similarly to what was done for iOS in
263         r182278.
264
265         * WebProcess/com.apple.WebProcess.sb.in:
266
267 2015-04-28  Antti Koivisto  <antti@apple.com>
268
269         Network Cache: Disk cache getting filled by YouTube video data
270         https://bugs.webkit.org/show_bug.cgi?id=144259
271
272         Reviewed by Darin Adler.
273
274         MSE media is loaded via XHR and tends to eventually fill the cache.
275
276         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
277         We can reduce disk writes and keep more useful resources around by not caching them
278
279         * NetworkProcess/NetworkResourceLoader.cpp:
280         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
281         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
282         * NetworkProcess/cache/NetworkCache.cpp:
283         (WebKit::NetworkCache::makeStoreDecision):
284
285             Don't store if the requester is XHR and response has video or audio content type.
286
287         * NetworkProcess/cache/NetworkCache.h:
288         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
289         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
290         * Shared/Network/NetworkResourceLoadParameters.cpp:
291         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
292         (WebKit::NetworkResourceLoadParameters::encode):
293         (WebKit::NetworkResourceLoadParameters::decode):
294         * Shared/Network/NetworkResourceLoadParameters.h:
295
296             The requester type is now part of the ResourceRequest, no need for separate parameter.
297
298         * Shared/mac/WebCoreArgumentCodersMac.mm:
299         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
300         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
301         * WebProcess/Network/WebResourceLoadScheduler.cpp:
302         (WebKit::WebResourceLoadScheduler::scheduleLoad):
303
304 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
305
306         [WK2] API::UserContentURLPattern creation functions should return Ref<>
307         https://bugs.webkit.org/show_bug.cgi?id=144225
308
309         Reviewed by Darin Adler.
310
311         Have API::UserContentURLPattern creation functions return Ref<>.
312         Call-sites are also updated, using and operating on the returned Ref<>
313         object where possible.
314
315         * Shared/API/APIUserContentURLPattern.h:
316         (API::UserContentURLPattern::create):
317         * Shared/API/c/WKUserContentURLPattern.cpp:
318         (WKUserContentURLPatternCreate):
319
320 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
321
322         [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
323         https://bugs.webkit.org/show_bug.cgi?id=144224
324
325         Reviewed by Darin Adler.
326
327         Have API::URLRequest and API::URLResponse creation functions return Ref<>.
328         The call-sites are also updated, using and operating on the returned Ref<> object
329         where possible.
330
331         * Shared/API/APIURLRequest.h:
332         (API::URLRequest::create):
333         * Shared/API/APIURLResponse.h:
334         (API::URLResponse::create):
335         * Shared/API/c/WKURLRequest.cpp:
336         (WKURLRequestCreateWithWKURL):
337         * Shared/API/c/mac/WKURLRequestNS.mm:
338         (WKURLRequestCreateWithNSURLRequest):
339         * Shared/API/c/mac/WKURLResponseNS.mm:
340         (WKURLResponseCreateWithNSURLResponse):
341         * UIProcess/API/C/WKContext.cpp:
342         (WKContextSetDownloadClient):
343         * UIProcess/API/C/WKDownload.cpp:
344         (WKDownloadCopyRequest):
345         * UIProcess/API/C/WKNavigationDataRef.cpp:
346         (WKNavigationDataCopyOriginalRequest):
347         * UIProcess/API/C/WKPage.cpp:
348         (WKPageSetPagePolicyClient):
349         (WKPageSetPageUIClient):
350         * UIProcess/Cocoa/NavigationState.mm:
351         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
352         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
353         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
354         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
355         (willSendRequestForFrame):
356         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
357         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
358         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
359         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
360
361 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
362
363         [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
364         https://bugs.webkit.org/show_bug.cgi?id=144223
365
366         Reviewed by Darin Adler.
367
368         Have API::Point, API::Size and API::Rect creation functions return Ref<>.
369         Call-sites are also updated, using and operating on the returned Ref<> object
370         where possible.
371
372         * Shared/API/APIGeometry.h:
373         (API::Size::create):
374         (API::Point::create):
375         (API::Rect::create):
376         * Shared/API/c/WKGeometry.cpp:
377         (WKPointCreate):
378         (WKSizeCreate):
379         (WKRectCreate):
380
381 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
382
383         [WK2] API::Error creation functions should return Ref<>
384         https://bugs.webkit.org/show_bug.cgi?id=144222
385
386         Reviewed by Darin Adler.
387
388         Have API::Error creation functions return Ref<>.
389         The call-sites are also updated, using and operating
390         on the returned Ref<> object where possible.
391
392         * Shared/API/APIError.h:
393         (API::Error::create):
394         * Shared/API/c/cf/WKErrorCF.cpp:
395         (WKErrorCreateWithCFError):
396         * UIProcess/API/C/WKOriginDataManager.cpp:
397         (WKOriginDataManagerDeleteEntriesForOrigin):
398         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
399         (WKOriginDataManagerDeleteAllEntries):
400         * UIProcess/API/C/WKPage.cpp:
401         (toGenericCallbackFunction):
402         (WKPageForceRepaint):
403         (WKPageValidateCommand):
404         (WKPageComputePagesForPrinting):
405         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
406         (WKPluginSiteDataManagerClearSiteData):
407         (WKPluginSiteDataManagerClearAllSiteData):
408         * UIProcess/GenericCallback.h:
409         (WebKit::toGenericCallbackFunction):
410         * UIProcess/WebPageProxy.cpp:
411         (WebKit::WebPageProxy::printFinishedCallback):
412
413 2015-04-27  Sungmann Cho  <sungmann.cho@navercorp.com>
414
415         [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
416         https://bugs.webkit.org/show_bug.cgi?id=144312
417
418         Reviewed by Martin Robinson.
419
420         No new tests, no behavior change.
421
422         * UIProcess/API/gtk/WebKitNotificationProvider.h:
423
424 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
425
426         PDF action menu fixes
427         https://bugs.webkit.org/show_bug.cgi?id=144299
428         <rdar://problem/20702215>
429
430         Reviewed by Tim Horton.
431
432         Make two corrections to how PDFs are handled:
433         1. When calculating the view rect for the user's selection, make sure
434         that we get coordinates for the correct PDF page. The existing code assumed
435         that the current PDFLayerControler's current page was correct, but this will
436         not be true if you zoom the PDF out so that several pages are displayed at
437         once. Each selection keeps track of the page it is referenced against.
438         
439         2. Revise the offsets calculated for the TextIndicator to take into account
440         the font descender (as well as the ascender), and to adjust by the scaled
441         amount of margin around the selected text.
442
443         * WebProcess/Plugins/PDF/PDFPlugin.mm:
444         (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
445         the coordinates.
446         * WebProcess/WebPage/mac/WebPageMac.mm:
447         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
448         and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
449
450 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
451
452         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
453         https://bugs.webkit.org/show_bug.cgi?id=144193
454
455         Reviewed by Darin Adler.
456
457         * CMakeLists.txt:
458
459 2015-04-24  Jon Honeycutt  <jhoneycutt@apple.com>
460
461         Context menus are not reshown after an orientation change
462
463         <https://bugs.webkit.org/show_bug.cgi?id=144143>
464         <rdar://problem/20679931>
465
466         Reviewed by Darin Adler.
467
468         * UIProcess/ios/WKActionSheet.mm:
469         (-[WKActionSheet updateSheetPosition]):
470         Return early if we're still in a rotation, not if the rotation is
471         complete.
472
473 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
474
475         [WK2] API::Dictionary creation functions should return Ref<>
476         https://bugs.webkit.org/show_bug.cgi?id=144221
477
478         Reviewed by Darin Adler.
479
480         Have API::Dictionary creation functions return Ref<>.
481         The call-sites are also updated, using and operating
482         on the returned Ref<> object where possible.
483
484         * Shared/API/APIDictionary.cpp:
485         (API::Dictionary::create):
486         * Shared/API/APIDictionary.h:
487         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
488         (createEncodedObject):
489         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
490         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
491         * Shared/API/c/WKDictionary.cpp:
492         (WKDictionaryCreate):
493         * Shared/API/c/WKMutableDictionary.cpp:
494         (WKMutableDictionaryCreate):
495         * Shared/Plugins/Netscape/PluginInformation.cpp:
496         (WebKit::createPluginInformationDictionary):
497         * Shared/Plugins/Netscape/PluginInformation.h:
498         * UIProcess/API/C/WKPage.cpp:
499         (WKPageSetPageUIClient):
500         * UIProcess/API/gtk/WebKitWebContext.cpp:
501         (webkit_web_context_prefetch_dns):
502         * UIProcess/API/gtk/WebKitWebView.cpp:
503         (webkit_web_view_get_snapshot):
504         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
505         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
506         * UIProcess/Plugins/PlugInAutoStartProvider.h:
507         * UIProcess/StatisticsRequest.cpp:
508         (WebKit::createDictionaryFromHashMap):
509         (WebKit::StatisticsRequest::completedRequest):
510         * UIProcess/WebFormClient.cpp:
511         (WebKit::WebFormClient::willSubmitForm):
512         * UIProcess/WebPageProxy.cpp:
513         (WebKit::WebPageProxy::didFailToInitializePlugin):
514         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
515         (didInitiateLoadForResource):
516         (willSendRequestForFrame):
517         (didReceiveResponseForResource):
518         (didReceiveContentLengthForResource):
519         (didFinishLoadForResource):
520         (didFailLoadForResource):
521         (webkitWebPageDidReceiveMessage):
522         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
523         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
524         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
525
526 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
527
528         [WK2] API::Data creation functions should return Ref<>
529         https://bugs.webkit.org/show_bug.cgi?id=144220
530
531         Reviewed by Darin Adler.
532
533         Have API::Data creation functions return Ref<>.
534         The call-sites are also updated, using and operating
535         on the returned Ref<> object where possible.
536
537         * Shared/API/APIData.h:
538         (API::Data::createWithoutCopying):
539         (API::Data::create):
540         * Shared/API/c/WKData.cpp:
541         (WKDataCreate):
542         * Shared/API/c/mac/WKWebArchive.cpp:
543         (WKWebArchiveCopyData):
544         * Shared/API/c/mac/WKWebArchiveResource.cpp:
545         (WKWebArchiveResourceCopyData):
546         * Shared/APIWebArchive.h:
547         * Shared/APIWebArchive.mm:
548         (API::WebArchive::data):
549         * Shared/APIWebArchiveResource.h:
550         * Shared/APIWebArchiveResource.mm:
551         (API::WebArchiveResource::data):
552         * Shared/Cocoa/APIDataCocoa.mm:
553         (API::Data::createWithoutCopying):
554         * UIProcess/API/Cocoa/WKWebView.mm:
555         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
556         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
557         (webkitURISchemeRequestReadCallback):
558         * UIProcess/API/gtk/WebKitWebView.cpp:
559         (webkit_web_view_load_bytes):
560         * UIProcess/Downloads/DownloadProxy.cpp:
561         (WebKit::createData):
562         * UIProcess/WebPageProxy.cpp:
563         (WebKit::WebPageProxy::dataCallback):
564         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
565
566 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
567
568         [WK2] API::URL creation functions should return Ref<>
569         https://bugs.webkit.org/show_bug.cgi?id=144219
570
571         Reviewed by Darin Adler.
572
573         Have API::URL creation functions return Ref<>.
574         The call-sites are also updated, using and operating in the
575         returned Ref<> object, where possible.
576
577         * Shared/API/APIURL.h:
578         (API::URL::create):
579         * Shared/API/c/WKSharedAPICast.h:
580         (WebKit::toCopiedURLAPI):
581         * Shared/API/c/WKURL.cpp:
582         (WKURLCreateWithUTF8CString):
583         (WKURLCreateWithBaseURL):
584         * UIProcess/API/gtk/WebKitWebResource.cpp:
585         (webkit_web_resource_get_data):
586         * UIProcess/WebIconDatabase.cpp:
587         (WebKit::WebIconDatabase::didChangeIconForPageURL):
588         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
589         * WebProcess/WebPage/WebPage.cpp:
590         (WebKit::WebPage::userAgent):
591
592 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
593
594         [WK2] API::String creation functions should return Ref<>
595         https://bugs.webkit.org/show_bug.cgi?id=144218
596
597         Reviewed by Darin Adler.
598
599         Have API::String creation functions return Ref<>.
600         The call-sites are also updated, using and operating on the returned
601         Ref<> object, where possible.
602
603         * Shared/API/APIString.h:
604         * Shared/API/c/WKPluginInformation.cpp:
605         (WKPluginInformationBundleIdentifierKey):
606         (WKPluginInformationBundleVersionKey):
607         (WKPluginInformationBundleShortVersionKey):
608         (WKPluginInformationPathKey):
609         (WKPluginInformationDisplayNameKey):
610         (WKPluginInformationDefaultLoadPolicyKey):
611         (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
612         (WKPluginInformationHasSandboxProfileKey):
613         (WKPluginInformationFrameURLKey):
614         (WKPluginInformationMIMETypeKey):
615         (WKPluginInformationPageURLKey):
616         (WKPluginInformationPluginspageAttributeURLKey):
617         (WKPluginInformationPluginURLKey):
618         (WKPlugInInformationReplacementObscuredKey):
619         * Shared/API/c/WKSharedAPICast.h:
620         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
621         (WebKit::toCopiedAPI):
622         * Shared/API/c/WKString.cpp:
623         (WKStringCreateWithUTF8CString):
624         (WKStringCreateWithJSString):
625         * UIProcess/API/C/WKDatabaseManager.cpp:
626         (WKDatabaseManagerGetOriginKey):
627         (WKDatabaseManagerGetOriginQuotaKey):
628         (WKDatabaseManagerGetOriginUsageKey):
629         (WKDatabaseManagerGetDatabaseDetailsKey):
630         (WKDatabaseManagerGetDatabaseDetailsNameKey):
631         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
632         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
633         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
634         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
635         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
636         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
637         (WKKeyValueStorageManagerGetOriginKey):
638         (WKKeyValueStorageManagerGetCreationTimeKey):
639         (WKKeyValueStorageManagerGetModificationTimeKey):
640         * UIProcess/API/C/WKPage.cpp:
641         (WKPageGetSessionHistoryURLValueType):
642         (WKPageGetSessionBackForwardListItemValueType):
643         (toGenericCallbackFunction):
644         (WKPageValidateCommand):
645         * UIProcess/WebProcessPool.cpp:
646         (WebKit::WebProcessPool::didReceiveInvalidMessage):
647
648 2015-04-27  Brady Eidson  <beidson@apple.com>
649
650         Make 'enum NavigationType' be an enum class
651         https://bugs.webkit.org/show_bug.cgi?id=144270
652
653         Reviewed by Alex Christensen.
654
655         * Shared/API/c/WKSharedAPICast.h:
656         (WebKit::toAPI):
657         
658         * Shared/NavigationActionData.cpp:
659         (WebKit::NavigationActionData::NavigationActionData):
660         
661         * UIProcess/API/Cocoa/WKNavigationAction.mm:
662         (toWKNavigationType):
663         
664         * UIProcess/API/gtk/WebKitPrivate.cpp:
665         (toWebKitNavigationType):
666         
667         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
668         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
669         
670         * WebProcess/WebPage/WebInspector.cpp:
671         (WebKit::WebInspector::openInNewTab):
672
673 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
674
675         REGRESSION(r182879): Images and video can no longer be downloaded
676         https://bugs.webkit.org/show_bug.cgi?id=144267
677         <rdar://problem/20702844>
678
679         Reviewed by Simon Fraser.
680
681         * UIProcess/mac/WKActionMenuController.mm:
682         (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
683         "!WebCore::protocolIs(..., "file")" for image and media downloads.
684
685 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
686
687         [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
688         https://bugs.webkit.org/show_bug.cgi?id=143874
689
690         Reviewed by Gyuyoung Kim.
691
692         * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
693         * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
694
695 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
696
697         [SOUP] Add initial implementation of NetworkProcess disk cache
698         https://bugs.webkit.org/show_bug.cgi?id=143872
699
700         Reviewed by Martin Robinson.
701
702         Implement the platform specific parts of the disk cache
703         implementation for Soup. It's mainly NetworkCache::Data and
704         NetworkCache::IOChannel.
705
706         * CMakeLists.txt:
707         * NetworkProcess/cache/NetworkCache.cpp:
708         (WebKit::NetworkCache::dumpFileChanged):
709         (WebKit::NetworkCache::Cache::initialize):
710         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
711         * NetworkProcess/cache/NetworkCacheData.h:
712         (WebKit::NetworkCache::Data::soupBuffer):
713         * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
714         (WebKit::NetworkCache::Data::Data):
715         (WebKit::NetworkCache::Data::empty):
716         (WebKit::NetworkCache::Data::data):
717         (WebKit::NetworkCache::Data::isNull):
718         (WebKit::NetworkCache::Data::apply):
719         (WebKit::NetworkCache::Data::subrange):
720         (WebKit::NetworkCache::concatenate):
721         (WebKit::NetworkCache::MapWrapper::~MapWrapper):
722         (WebKit::NetworkCache::deleteMapWrapper):
723         (WebKit::NetworkCache::mapFile):
724         (WebKit::NetworkCache::Data::adoptMap):
725         (WebKit::NetworkCache::computeSHA1):
726         (WebKit::NetworkCache::bytesEqual):
727         * NetworkProcess/cache/NetworkCacheIOChannel.h:
728         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
729         (WebKit::NetworkCache::IOChannel::IOChannel):
730         (WebKit::NetworkCache::IOChannel::open):
731         (WebKit::NetworkCache::fillDataFromReadBuffer):
732         (WebKit::NetworkCache::inputStreamReadReadyCallback):
733         (WebKit::NetworkCache::IOChannel::read):
734         (WebKit::NetworkCache::IOChannel::readSync):
735         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
736         (WebKit::NetworkCache::IOChannel::write):
737         * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
738         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
739         * NetworkProcess/soup/NetworkProcessSoup.cpp:
740         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
741         (WebKit::NetworkProcess::platformSetCacheModel):
742         (WebKit::NetworkProcess::clearDiskCache):
743         * PlatformGTK.cmake:
744
745 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
746
747         [ES6] Implement ES6 template literals
748         https://bugs.webkit.org/show_bug.cgi?id=142691
749
750         Reviewed by Darin Adler.
751
752         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
753
754         * Configurations/FeatureDefines.xcconfig:
755
756 2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>
757
758         Remove PluginView::renderer().
759         https://bugs.webkit.org/show_bug.cgi?id=144216
760
761         Reviewed by Darin Adler.
762
763         Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
764
765         No new tests, no behavior change.
766
767         * WebProcess/Plugins/PDF/PDFPlugin.mm:
768         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
769         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
770         * WebProcess/Plugins/PluginView.cpp:
771         (WebKit::PluginView::renderer): Deleted.
772         * WebProcess/Plugins/PluginView.h:
773
774 2015-04-26  Doug Russell  <d_russell@apple.com>
775
776         AX: richer text change notifications (142719)
777         https://bugs.webkit.org/show_bug.cgi?id=142719
778
779         Reviewed by Darin Adler.
780
781         Richer accessibility value change notifications. Introduce AXTextEditType,
782         postTextStateChangeNotification and postTextReplacementNotification to give assistive
783         tech apps more reliable context for responding to changes in web content. Also implement
784         a mechanism to post value changes in password form fields in coalesced ticks to thwart
785         analyzing the cadence of changes.
786
787         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
788         and an overload of postTextReplacementNotification to give assistive tech apps more
789         reliable context for responding to changes in web content selection. Also block posting
790         selection changes on password fields.
791
792         * UIProcess/WebEditCommandProxy.cpp:
793         (WebKit::WebEditCommandProxy::nameForEditAction):
794
795 2015-04-26  Dan Bernstein  <mitz@apple.com>
796
797         <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
798         https://bugs.webkit.org/show_bug.cgi?id=144233
799
800         Reviewed by Simon Fraser.
801
802         Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
803
804         * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
805         and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
806         we can just do it in the target’s Link Binary With Libraries build phase.
807
808         * Configurations/PluginService.64.xcconfig: Ditto.
809
810         * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
811         Binariy With Libraries build phases (one service already had WebKit).
812
813 2015-04-26  Dan Bernstein  <mitz@apple.com>
814
815         Fixed the build.
816
817         * UIProcess/ios/forms/WKFileUploadPanel.mm:
818         (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
819         of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
820
821 2015-04-25  Tim Horton  <timothy_horton@apple.com>
822
823         Further update gesture swipe shadow style
824         https://bugs.webkit.org/show_bug.cgi?id=144215
825         <rdar://problem/19295843>
826
827         Reviewed by Dan Bernstein.
828
829         * Resources/mac/SwipeShadow.png: Removed.
830         * Resources/mac/SwipeShadow@2x.png: Removed.
831         * UIProcess/mac/ViewGestureController.h:
832         * UIProcess/mac/ViewGestureControllerMac.mm:
833         (WebKit::ViewGestureController::beginSwipeGesture):
834         * WebKit2.xcodeproj/project.pbxproj:
835         Use a CAGradientLayer instead of PNGs for the swipe shadow.
836
837 2015-04-25  Dan Bernstein  <mitz@apple.com>
838
839         WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
840         https://bugs.webkit.org/show_bug.cgi?id=144201
841
842         Reviewed by Darin Adler.
843
844         Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
845         9876.5.
846
847         * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
848         headers, look for "9876_5" rather than "TBA".
849
850 2015-04-24  Timothy Hatcher  <timothy@apple.com>
851
852         Web Inspector: Remove native window dock controls
853         https://bugs.webkit.org/show_bug.cgi?id=144184
854
855         Reviewed by Joseph Pecoraro.
856
857         * Resources/DockBottom.pdf: Removed.
858         * Resources/DockBottomLegacy.pdf: Removed.
859         * Resources/DockRight.pdf: Removed.
860         * Resources/DockRightLegacy.pdf: Removed.
861         * UIProcess/WebInspectorProxy.h:
862         * UIProcess/mac/WebInspectorProxyMac.mm:
863         (WebKit::WebInspectorProxy::createInspectorWindow):
864         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
865         * WebKit2.xcodeproj/project.pbxproj:
866
867 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
868
869         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
870         https://bugs.webkit.org/show_bug.cgi?id=144182
871
872         Reviewed by Simon Fraser.
873
874         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
875
876 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
877
878         Have the web inspector report accurate memory use for layers with detached backing store
879         https://bugs.webkit.org/show_bug.cgi?id=144179
880
881         Reviewed by Dean Jackson.
882         
883         Remote layers can make their backing store volatile, so the backing only contributes
884         to reported memory use when attached.
885
886         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
887
888 2015-04-24  Andreas Kling  <akling@apple.com>
889
890         theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
891         <https://webkit.org/b/144175>
892         <rdar://problem/20694585>
893
894         Reviewed by Anders Carlsson.
895
896         Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
897         IPC request to the UI process that would give the same result, but spend way
898         more time and CPU cycles to do so.
899
900         With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
901
902         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
903         (WebKit::WebChromeClient::windowRect):
904
905 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
906
907         TextIndicator for embedded PDFs is slightly offset
908         https://bugs.webkit.org/show_bug.cgi?id=144172
909         <rdar://problem/20691304>
910
911         Reviewed by Tim Horton.
912
913         When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
914         step where the font ascent was used to adjust the origin used for the TextIndicator. This
915         patch determines the correct ascent for the range of characters in the selection, and
916         adjusts the offset by the difference between the ascent and the height of the selection rect.
917         
918         Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
919         an equivalent text bounding box by insetting the rect by half the size of the ascent.
920
921         * WebProcess/Plugins/PDF/PDFPlugin.mm:
922         (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
923         * WebProcess/Plugins/PDF/PDFPlugin.h:
924         * WebProcess/WebPage/mac/WebPageMac.mm:
925         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
926         font ascent and scale factor into account.
927
928 2015-04-24  David Kilzer  <ddkilzer@apple.com>
929
930         REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
931
932         Fixes the following build failures:
933
934             WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
935                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
936                                                         ^~~~~~~~~~~~~~~~~~~~~~
937             WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
938                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
939                        ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
940
941         * Platform/spi/ios/UIKitSPI.h:
942         (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
943
944 2015-04-24  Anders Carlsson  <andersca@apple.com>
945
946         Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
947         https://bugs.webkit.org/show_bug.cgi?id=144171
948
949         Reviewed by Tim Horton.
950
951         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
952         (-[WKWebViewConfiguration _websiteDataStore]):
953         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
954         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
955         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
956         (-[_WKWebsiteDataStore initWithDataStore:]):
957         (+[_WKWebsiteDataStore defaultDataStore]):
958         (+[_WKWebsiteDataStore nonPersistentDataStore]):
959         (-[_WKWebsiteDataStore isNonPersistent]):
960         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
961         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
962         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
963         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
964         * WebKit2.xcodeproj/project.pbxproj:
965
966 2015-04-24  Tim Horton  <timothy_horton@apple.com>
967
968         WKPDFView does not support password-protected PDFs
969         https://bugs.webkit.org/show_bug.cgi?id=144162
970         <rdar://problem/18411512>
971
972         Reviewed by Andy Estes.
973
974         * Platform/spi/ios/UIKitSPI.h:
975         Add some SPI.
976
977         * UIProcess/ios/WKPDFView.h:
978         * UIProcess/ios/WKPDFView.mm:
979         (-[WKPDFView _didLoadPDFDocument]):
980         (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
981         Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
982         and initial setup of the page views out into _didLoadPDFDocument.
983
984         If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
985         we'll continue on to _didLoadPDFDocument as previously.
986
987         (-[WKPDFView web_setMinimumSize:]):
988         Resize the password UI instead of the PDF pages if we have it.
989
990         (-[WKPDFView _computePageAndDocumentFrames]):
991         Don't bother doing any work revalidating PDF pages if the document is locked.
992
993         (-[WKPDFView _updatePasswordEntryField]):
994         Make sure that the UIDocumentPassword view is always the size of the scrollview.
995         This takes care of rotation.
996
997         (-[WKPDFView _keyboardDidShow:]):
998         Make sure that we scroll the password field around, if necessary, to keep it
999         on screen when editing begins.
1000
1001         (-[WKPDFView _showPasswordEntryField]):
1002         (-[WKPDFView _hidePasswordEntryField]):
1003         Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
1004         while it's up. The UIDocumentPassword view is installed into the scroll view
1005         to match UIWebView behavior.
1006
1007         (-[WKPDFView userDidEnterPassword:forPasswordView:]):
1008         (-[WKPDFView didBeginEditingPassword:inView:]):
1009         (-[WKPDFView didEndEditingPassword:inView:]):
1010         (-[WKPDFView _didFailToUnlock]):
1011         Pop up a dialog informing the user that they entered the wrong password.
1012
1013         (-[WKPDFView _tryToUnlockWithPassword:]):
1014         Try to unlock the document. If it succeeds, hide the unlock UI and go back to
1015         _didLoadPDFDocument.
1016
1017 2015-04-24  Commit Queue  <commit-queue@webkit.org>
1018
1019         Unreviewed, rolling out r183266.
1020         https://bugs.webkit.org/show_bug.cgi?id=144164
1021
1022         Broke 32-bit build and a test. (Requested by ap on #webkit).
1023
1024         Reverted changeset:
1025
1026         "AX: richer text change notifications (142719)"
1027         https://bugs.webkit.org/show_bug.cgi?id=142719
1028         http://trac.webkit.org/changeset/183266
1029
1030 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
1031
1032         REGRESSION: WebKit2.ActionMenusTest API test fails
1033         https://bugs.webkit.org/show_bug.cgi?id=144149
1034         <rdar://problem/20677770>
1035
1036         Reviewed by Tim Horton.
1037
1038         Tested by TestWebKitAPI 
1039
1040         The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
1041         was receiving from root view to the plugin view. Consequently, full page PDFs
1042         did hit testing correctly, but an <embed> PDF would not.
1043
1044         Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
1045         expect 'root view' coordinates and perform the requisite conversions, rather
1046         than expecting 'plugin view' coordinates.
1047
1048         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1049         (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
1050         for the input.
1051         (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
1052         coordinates to the PDF's view coordinate space.
1053         * WebProcess/WebPage/mac/WebPageMac.mm:
1054         (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
1055         not content coordinates.
1056
1057 2015-04-24  Anders Carlsson  <andersca@apple.com>
1058
1059         Address a review comment from Joe Pecoraro.
1060
1061         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1062
1063 2015-04-24  Anders Carlsson  <andersca@apple.com>
1064
1065         Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
1066         https://bugs.webkit.org/show_bug.cgi?id=144158
1067
1068         Reviewed by Beth Dakin.
1069
1070         * UIProcess/API/APIWebsiteDataStore.cpp:
1071         (API::WebsiteDataStore::isPersistent):
1072         (API::WebsiteDataStore::isNonPersistent): Deleted.
1073         * UIProcess/API/APIWebsiteDataStore.h:
1074         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1075         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1076         (-[WKWebsiteDataStore isPersistent]):
1077         (-[WKWebsiteDataStore isNonPersistent]): Deleted.
1078         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
1079         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
1080         (-[_WKWebsiteDataStore isNonPersistent]):
1081         * UIProcess/WebsiteData/WebsiteDataStore.h:
1082
1083 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
1084
1085         Immediate action not functional for embedded PDFs
1086         https://bugs.webkit.org/show_bug.cgi?id=143952
1087         <rdar://problem/19842365>        
1088
1089         Reviewed by Tim Horton.
1090
1091         Add a new method to retrieve appropriate dictionary lookup content and update the
1092         hit test result with relevant dictionary content and the bounding rect of the
1093         selection.
1094
1095         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
1096         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
1097         * WebProcess/Plugins/PDF/PDFPlugin.h:
1098         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1099         (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
1100         convert PDF 'in page' units to the equivalent view units.
1101         (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
1102         (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
1103         its bounding rect and return the result in view units.
1104         * WebProcess/Plugins/Plugin.h:
1105         * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
1106         * WebProcess/Plugins/PluginProxy.h: Add stub.
1107         * WebProcess/Plugins/PluginView.cpp: 
1108         (WebKit::PluginView::viewRectForSelection): Added.
1109         * WebProcess/Plugins/PluginView.h:
1110         * WebProcess/WebPage/WebPage.h:
1111         * WebProcess/WebPage/mac/WebPageMac.mm:
1112         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
1113         (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
1114         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
1115         with relevant dictionary lookup content, and mark the result as a text node (if
1116         appropriate).
1117
1118 2015-04-24  Jer Noble  <jer.noble@apple.com>
1119
1120         [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
1121         https://bugs.webkit.org/show_bug.cgi?id=144153
1122
1123         Reviewed by Alexey Proskuryakov.
1124
1125         Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
1126
1127         * UIProcess/WebPageProxy.cpp:
1128         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1129
1130 2015-04-24  Antti Koivisto  <antti@apple.com>
1131
1132         CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
1133         https://bugs.webkit.org/show_bug.cgi?id=144147
1134
1135         Reviewed by Chris Dumez.
1136
1137         Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
1138         This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
1139         RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
1140
1141         Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
1142         ReadOperation: count the active operations in progress and delete WriteOperation when everything is
1143         finished. This way we don't need to copy the function out from WriteOperation.
1144
1145         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1146         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
1147         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
1148
1149             Move definition here from the header.
1150
1151         (WebKit::NetworkCache::Storage::~Storage):
1152         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1153
1154             Increment the operation count when storing a blob, call finishWriteOperation when done.
1155
1156         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1157         (WebKit::NetworkCache::Storage::finishReadOperation):
1158
1159             Count active operations instead of finished operations. This makes the code clearer.
1160
1161         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1162         (WebKit::NetworkCache::Storage::finishWriteOperation):
1163
1164             Mirror the way ReadOperations work.
1165
1166         * NetworkProcess/cache/NetworkCacheStorage.h:
1167         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
1168
1169 2015-04-24  Timothy Hatcher  <timothy@apple.com>
1170
1171         REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
1172         https://bugs.webkit.org/show_bug.cgi?id=144150
1173
1174         Reviewed by Brian Burg.
1175
1176         * WebProcess/WebPage/WebInspectorUI.cpp:
1177         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
1178         instead of strings by not using the string version of evaluateCommandOnLoad.
1179
1180 2015-04-23  Anders Carlsson  <andersca@apple.com>
1181
1182         Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
1183         https://bugs.webkit.org/show_bug.cgi?id=144138
1184
1185         Reviewed by Darin Adler.
1186
1187         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1188         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1189         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1190         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1191         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
1192         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
1193
1194 2015-04-24  Doug Russell  <d_russell@apple.com>
1195
1196         AX: richer text change notifications (142719)
1197         https://bugs.webkit.org/show_bug.cgi?id=142719
1198
1199         Reviewed by Darin Adler.
1200
1201         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
1202
1203         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
1204
1205         * UIProcess/WebEditCommandProxy.cpp:
1206         (WebKit::WebEditCommandProxy::nameForEditAction):
1207
1208 2015-04-24  Darin Adler  <darin@apple.com>
1209
1210         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
1211         https://bugs.webkit.org/show_bug.cgi?id=128007
1212
1213         Reviewed by Anders Carlsson.
1214
1215         * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
1216         needed that was inherited from OwnPtr.h before.
1217
1218 2015-04-24  Antti Koivisto  <antti@apple.com>
1219
1220         Network Cache: Make path functions members
1221         https://bugs.webkit.org/show_bug.cgi?id=144146
1222
1223         Reviewed by Carlos Garcia Campos.
1224
1225         This simplifies the code.
1226
1227         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1228         (WebKit::NetworkCache::Storage::partitionPathForKey):
1229         (WebKit::NetworkCache::Storage::recordPathForKey):
1230         (WebKit::NetworkCache::Storage::bodyPathForKey):
1231         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
1232         (WebKit::NetworkCache::Storage::remove):
1233         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1234         (WebKit::NetworkCache::Storage::finishReadOperation):
1235         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1236         (WebKit::NetworkCache::partitionPathForKey): Deleted.
1237         (WebKit::NetworkCache::recordPathForKey): Deleted.
1238         (WebKit::NetworkCache::bodyPathForKey): Deleted.
1239         * NetworkProcess/cache/NetworkCacheStorage.h:
1240
1241 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1242
1243         Unreviewed. Remove incorrect assert after r183189.
1244
1245         In this case the assert was already there, but it's incorrect
1246         because we are handling uninitialized attachments below in the
1247         same function, and also when sending messages. So, if it's ok to
1248         send uninitialized attachments, it's ok to receive them. This
1249         didn't fail before r183189, because we were only invaliding the
1250         attachments by setting the file descriptor to -1, and they were
1251         handled as null attachments. After r183189, the move operator
1252         resets the moved attachment leaving it uninitialized again.
1253
1254         * Platform/IPC/unix/ConnectionUnix.cpp:
1255         (IPC::Connection::processMessage):
1256
1257 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1258
1259         [SOUP] Use a webkit subdirectory for the disk cache
1260         https://bugs.webkit.org/show_bug.cgi?id=144048
1261
1262         Reviewed by Martin Robinson.
1263
1264         Recent versions of libsoup remove any file in cache dir not
1265         referenced by the index when the cache is loaded to workaround
1266         leaked resources when load/dump is unbalanced for whatever reason,
1267         like a crash. We currently use $XDG_CACHE_HOME/app-name as default
1268         disk cache directory, but that directory could be used by apps to
1269         cache other things, and the soup cache might end up deleting other
1270         stuff. The soup cache assumes the given directory is only for the
1271         disk cache, so we should ensure that.
1272
1273         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1274         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
1275         webkit to the given disk cache and clear the previous soup cache if it exists.
1276         * WebProcess/soup/WebProcessSoup.cpp:
1277         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
1278
1279 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1280
1281         Unreviewed. Remove incorrect ASSERT added in r183176.
1282
1283         We allow to encode null attachments.
1284
1285         * Platform/unix/SharedMemoryUnix.cpp:
1286         (WebKit::SharedMemory::Handle::releaseAttachment):
1287
1288 2015-04-23  Dan Bernstein  <mitz@apple.com>
1289
1290         <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
1291
1292         Reviewed by Andy Estes.
1293
1294         * mac/postprocess-framework-headers.sh:
1295
1296 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
1297
1298         Make it possible to detach GraphicsLayerCA backing store
1299         https://bugs.webkit.org/show_bug.cgi?id=144140
1300
1301         Reviewed by Tim Horton.
1302         
1303         This changes makes it possible to denote a GraphicsLayerCA's backing store
1304         as "attached" or not. When not attached, the backing store is made volatile
1305         and can be purged. This will be used in a future patch.
1306
1307         * Shared/mac/RemoteLayerBackingStore.mm:
1308         (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
1309         (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
1310         returns true, this indicates that the backing store was brought out of the
1311         "unreachable" list, so return true even if the backing store doesn't require
1312         painting.
1313         * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
1314         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1315         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1316         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
1317         if the caller will need to submit the backing store in the current transaction.
1318         (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
1319         explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
1320         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1321         (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
1322         store, and it's attached.
1323         * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
1324         * Shared/mac/RemoteLayerTreeTransaction.mm:
1325         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1326         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1327         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1328         (WebKit::dumpChangedLayers):
1329         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1330         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
1331         on the backing store if it's attached.
1332         (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
1333         (WebKit::PlatformCALayerRemote::backingStoreAttached):
1334         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1335         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1336         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1337         (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
1338
1339 2015-04-23  Tim Horton  <timothy_horton@apple.com>
1340
1341         Quick Look preview popover is not dismissed on scroll in Mail
1342         https://bugs.webkit.org/show_bug.cgi?id=144119
1343         <rdar://problem/19752045>
1344
1345         Reviewed by Anders Carlsson.
1346
1347         * UIProcess/API/mac/WKView.mm:
1348         (-[WKView renewGState]):
1349         If we have a TextIndicator, dismiss all content relative child windows
1350         on renewGState, not just the TextIndicator itself.
1351
1352         This will fix cases like Mail, where WebKit isn't driving the scrolling,
1353         and we have no way (except renewGState) to know that scrolling is happening.
1354
1355 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
1356
1357         Changing TiledBacking velocity should schedule a tile revalidation
1358         https://bugs.webkit.org/show_bug.cgi?id=144123
1359
1360         Reviewed by Tim Horton.
1361         
1362         Drive-by fix: use the FrameView& that we have already.
1363
1364         * WebProcess/WebPage/ios/WebPageIOS.mm:
1365         (WebKit::WebPage::updateVisibleContentRects):
1366
1367 2015-04-23  Jer Noble  <jer.noble@apple.com>
1368
1369         [Mac] Disable QTKit by default on future OS X.
1370         https://bugs.webkit.org/show_bug.cgi?id=144082
1371
1372         Reviewed by Darin Adler.
1373
1374         QTKitEnabled defaults to false.
1375
1376         * Shared/WebPreferencesDefinitions.h:
1377
1378 2015-04-23  Jer Noble  <jer.noble@apple.com>
1379
1380         [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
1381         https://bugs.webkit.org/show_bug.cgi?id=144120
1382
1383         Reviewed by Eric Carlson.
1384
1385         Tweak the curve to ease-in faster when the fullscreen animation duration is short.
1386
1387         * UIProcess/mac/WKFullScreenWindowController.mm:
1388         (timingFunctionForDuration):
1389         (zoomAnimation):
1390         (maskAnimation):
1391         (fadeAnimation):
1392
1393 2015-04-23  Enrica Casucci  <enrica@apple.com>
1394
1395         iOS build fix after r183208.
1396
1397         Unreviewed.
1398
1399         * UIProcess/ios/WKContentViewInteraction.mm:
1400
1401 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
1402
1403         [iOS] WebKit services should inherit environment variables for home
1404         https://bugs.webkit.org/show_bug.cgi?id=144078
1405         rdar://problem/20571678
1406
1407         Reviewed by Dan Bernstein.
1408
1409         Pass current environment variables as XPC bootstrap. Also while at it, made
1410         _CFBundleSetupXPCBootstrap not soft linked.
1411
1412         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1413         (main):
1414         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1415         (WebKit::connectToService):
1416
1417 2015-04-23  Enrica Casucci  <enrica@apple.com>
1418
1419         Support share button.
1420         https://bugs.webkit.org/show_bug.cgi?id=144077
1421         rdar://problem/19772892
1422
1423         Reviewed by Darin Adler.
1424
1425         * UIProcess/ios/WKContentViewInteraction.mm:
1426         (-[WKContentView _share:]):
1427         (-[WKContentView canPerformAction:withSender:]):
1428         (-[WKContentView _define:]):
1429         (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
1430         (-[WKContentView moveByOffset:]):
1431         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
1432         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
1433         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
1434         (-[WKContentView accessoryTab:]):
1435         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
1436         (-[WKContentView executeEditCommandWithCallback:]):
1437
1438 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1439
1440         [UNIX] Do not allow copies of IPC::Attachment
1441         https://bugs.webkit.org/show_bug.cgi?id=144096
1442
1443         Reviewed by Darin Adler.
1444
1445         It ensures that the file descriptor ownership is always correctly
1446         transferred. This way we can remove the dispose() method to
1447         explicitly close the file descriptor and always close it in the
1448         Attachment destructor (unless explicitly transferred to
1449         IPC::Connection or SharedMemory). It simplifies the code and
1450         ensure we don't leak file descriptors.
1451
1452         * Platform/IPC/ArgumentDecoder.cpp:
1453         (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
1454         explicitly dispose attachments.
1455         (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
1456         * Platform/IPC/ArgumentEncoder.cpp:
1457         (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
1458         explicitly dispose attachments.
1459         (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
1460         (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
1461         * Platform/IPC/ArgumentEncoder.h:
1462         * Platform/IPC/Attachment.cpp:
1463         (IPC::Attachment::encode): Move a copy of the attachment, and
1464         reset the file descriptor, since the ownership is passed to the encoder.
1465         * Platform/IPC/Attachment.h: Make copy constructor and assignment
1466         private to not allow public copies. The only copy allowed is done
1467         by Attachment::encode(). Make m_fileDescriptor mutable so that we
1468         can reset it in Attachment::encode() after passing the ownership
1469         to the encoder.
1470         * Platform/IPC/unix/AttachmentUnix.cpp:
1471         (IPC::Attachment::~Attachment): Close the file descriptor if it
1472         hasn't been released explicitly.
1473         (IPC::Attachment::dispose): Deleted.
1474         * Platform/IPC/unix/ConnectionUnix.cpp:
1475         (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
1476         (IPC::Connection::sendOutgoingMessage): Ditto.
1477         (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
1478         (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
1479         * Platform/unix/SharedMemoryUnix.cpp:
1480         (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
1481         (WebKit::SharedMemory::Handle::clear): Reset the attachment.
1482         * UIProcess/WebInspectorProxy.cpp:
1483         (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
1484         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1485         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1486         Call releaseFileDescriptor() instead of fileDescritpro() since the
1487         ownership is passed to the connection.
1488
1489 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
1490
1491         Build fix.
1492
1493         * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
1494
1495 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1496
1497         Unreviewed. Fix debug build after r183176.
1498
1499         * Platform/unix/SharedMemoryUnix.cpp:
1500         (WebKit::SharedMemory::Handle::decode):
1501         (WebKit::SharedMemory::createHandle):
1502
1503 2015-04-23  Andreas Kling  <akling@apple.com>
1504
1505         There should only be one way to get the system memory size.
1506         <https://webkit.org/b/144081>
1507
1508         Reviewed by Antti Koivisto.
1509
1510         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1511         (WebKit::NetworkProcess::platformSetCacheModel):
1512         (WebKit::memorySize): Deleted.
1513         * WebProcess/cocoa/WebProcessCocoa.mm:
1514         (WebKit::WebProcess::platformSetCacheModel):
1515         (WebKit::memorySize): Deleted.
1516
1517 2015-04-23  Chris Dumez  <cdumez@apple.com>
1518
1519         [WK2] WebDiagnosticLoggingClient is leaking
1520         https://bugs.webkit.org/show_bug.cgi?id=144089
1521         <rdar://problem/19706214>
1522
1523         Reviewed by Darin Adler.
1524
1525         WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
1526         constructor but there is no code destroying it.
1527
1528         This patch adds a new xxxDestroyed() virtual function to
1529         DiagnosticLoggingClient and that is overriden in
1530         WebDiagnosticLoggingClient to call "delete this". This is the same
1531         pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
1532         WebProgressTrackerClient).
1533
1534         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
1535         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
1536         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
1537
1538 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1539
1540         [UNIX] Simplify the file descriptor handling in SharedMemory
1541         https://bugs.webkit.org/show_bug.cgi?id=144046
1542
1543         Reviewed by Darin Adler.
1544
1545         Simplify the file descriptor handling and clarify its ownership by
1546         using IPC::Attachment in SharedMemory::Handle instead of fd and
1547         size members. SharedMemory::Handle::adoptFromAttachment() has been
1548         renamed as SharedMemory::Handle::adoptAttachment() and receives an
1549         IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
1550         has been renamed as SharedMemory::Handle::releaseAttachment().
1551
1552         * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
1553         * Platform/IPC/Connection.h:
1554         (IPC::Connection::identifierIsNull): A file descriptor is null
1555         when it's -1 no 0.
1556         * Platform/IPC/unix/AttachmentUnix.cpp:
1557         (IPC::Attachment::Attachment):
1558         (IPC::Attachment::operator=):
1559         (IPC::Attachment::dispose): Reset the file descriptor after
1560         closing it.
1561         * Platform/IPC/unix/ConnectionUnix.cpp:
1562         (IPC::Connection::processMessage): Use
1563         SharedMemory::Handle::adoptAttachment() that receives an
1564         IPC::Attachment now.
1565         (IPC::Connection::sendOutgoingMessage): Use
1566         SharedMemory::Handle::releaseAttachment().
1567         * Platform/SharedMemory.h:
1568         * Platform/unix/SharedMemoryUnix.cpp:
1569         (WebKit::SharedMemory::Handle::Handle): Remove initializers for
1570         file descriptor and size members.
1571         (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
1572         (WebKit::SharedMemory::Handle::isNull): Handle is null if the
1573         attachment file descriptor is -1.
1574         (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
1575         (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
1576         (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
1577         using move.
1578         (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
1579         (WebKit::SharedMemory::map): Use
1580         IPC::Attachment::releaseFileDescriptor() instead of manually
1581         changing the member.
1582         (WebKit::SharedMemory::createHandle): Initialize the handle
1583         attachment with the duplicated file descriptor and size.
1584
1585 2015-04-22  Darin Adler  <darin@apple.com>
1586
1587         Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
1588         https://bugs.webkit.org/show_bug.cgi?id=143943
1589
1590         Reviewed by Anders Carlsson.
1591
1592         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
1593         Removed unneeded include.
1594
1595 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
1596
1597         VisibleSelection should only accept Range by reference
1598         https://bugs.webkit.org/show_bug.cgi?id=144047
1599
1600         Reviewed by Tim Horton.
1601
1602         Update all uses of VisibleSelection to pass a Range reference instead
1603         of a Range pointer.
1604
1605         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1606         (WebKit::InjectedBundleRangeHandle::renderedImage):
1607         * WebProcess/WebPage/FindController.cpp:
1608         (WebKit::FindController::getImageForFindMatch):
1609         (WebKit::FindController::selectFindMatch):
1610         * WebProcess/WebPage/WebPage.cpp:
1611         (WebKit::WebPage::insertTextAsync):
1612         (WebKit::WebPage::setCompositionAsync):
1613         * WebProcess/WebPage/mac/WebPageMac.mm:
1614         (WebKit::WebPage::insertDictatedTextAsync):
1615
1616 2015-04-22  Anders Carlsson  <andersca@apple.com>
1617
1618         Add WK_ARRAY and WK_SET annotations
1619         https://bugs.webkit.org/show_bug.cgi?id=144075
1620         rdar://problem/19417770
1621
1622         Reviewed by Dan Bernstein.
1623
1624         * Shared/API/Cocoa/WKFoundation.h:
1625         * UIProcess/API/Cocoa/WKBackForwardList.h:
1626         * UIProcess/API/Cocoa/WKUserContentController.h:
1627         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1628         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
1629         * mac/postprocess-framework-headers.sh:
1630
1631 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
1632
1633         Unreviewed build fix after r183136.
1634
1635         * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
1636         'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
1637
1638 2015-04-21  Brent Fulgham  <bfulgham@apple.com>
1639
1640         Extend action menus to support PDF
1641         https://bugs.webkit.org/show_bug.cgi?id=143895
1642         <rdar://problem/19003333>
1643
1644         Reviewed by Tim Horton.
1645
1646         If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
1647         content is under the mouse. For now, we only support copying text and handling URLs.
1648
1649         If no text is selected, use the dictionary lookup service to find a semantically appropriate
1650         selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
1651         views. If some text is already selected, and the mouse is over the existing selection, continue
1652         using the selected text. Otherwise, discard the old selection and select the most appropriate
1653         region under the mouse pointer.
1654
1655         * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
1656         * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
1657         * UIProcess/mac/WKActionMenuController.mm:
1658         (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
1659         (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
1660         menu entries.
1661         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
1662         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
1663         'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
1664         * WebProcess/Plugins/PDF/PDFPlugin.h:
1665         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1666         (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
1667         (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
1668         (WebKit::PDFPlugin::lookupTextAtLocation): Added.
1669         * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
1670         * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
1671         * WebProcess/Plugins/PluginView.cpp:
1672         (WebKit::PluginView::getSelectionForWordAtPoint): Added.
1673         (WebKit::PluginView::existingSelectionContainsPoint): Added.
1674         (WebKit::PluginView::lookupTextAtLocation): Added.
1675         * WebProcess/Plugins/PluginView.h:
1676         * WebProcess/WebPage/mac/WebPageMac.mm:
1677         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
1678         relevant content to support later action menu handling.
1679
1680 2015-04-22  Eric Carlson  <eric.carlson@apple.com>
1681
1682         Update AirPlay sandbox rules
1683         https://bugs.webkit.org/show_bug.cgi?id=144062
1684         <rdar://problem/19869448>
1685
1686         Reviewed by Alexey Proskuryakov.
1687
1688         * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
1689
1690 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
1691
1692         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
1693         https://bugs.webkit.org/show_bug.cgi?id=144052
1694         rdar://problem/19754404
1695
1696         Reviewed by Darin Adler.
1697
1698         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1699         (main): Make XPC transaction tracking work again after a re-exec.
1700
1701 2015-04-22  Zan Dobersek  <zdobersek@igalia.com>
1702
1703         [WK2] Have API::Array creation methods return Ref<>
1704         https://bugs.webkit.org/show_bug.cgi?id=143933
1705
1706         Reviewed by Darin Adler.
1707
1708         API::Array::create() and API::Array::createStringArray() should return Ref<> objects
1709         as the return values are never null. It's up to the caller to implicitly convert the
1710         returned objects to RefPtr<> if so required. All the call-sites have been updated to
1711         reflect that.
1712
1713         * Shared/API/APIArray.cpp:
1714         (API::Array::create):
1715         (API::Array::createStringArray):
1716         (API::Array::copy):
1717         * Shared/API/APIArray.h:
1718         * Shared/API/APIDictionary.cpp:
1719         (API::Dictionary::keys):
1720         * Shared/API/APIDictionary.h:
1721         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1722         (ensureObjectStream):
1723         * Shared/API/c/WKArray.cpp:
1724         (WKArrayCreate):
1725         (WKArrayCreateAdoptingValues):
1726         * Shared/API/c/WKContextMenuItem.cpp:
1727         (WKContextMenuCopySubmenuItems):
1728         * Shared/API/c/WKDictionary.cpp:
1729         (WKDictionaryCopyKeys):
1730         * Shared/API/c/WKMutableArray.cpp:
1731         (WKMutableArrayCreate):
1732         * Shared/Cocoa/WKNSDictionary.mm:
1733         (-[WKNSDictionary keyEnumerator]):
1734         * Shared/SecurityOriginData.cpp:
1735         (WebKit::performAPICallbackWithSecurityOriginDataVector):
1736         * Shared/WebContextMenuItem.cpp:
1737         (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
1738         * Shared/WebContextMenuItem.h:
1739         * Shared/WebOpenPanelParameters.cpp:
1740         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
1741         (WebKit::WebOpenPanelParameters::selectedFileNames):
1742         * Shared/WebOpenPanelParameters.h:
1743         * UIProcess/API/C/WKBackForwardListRef.cpp:
1744         (WKBackForwardListCopyBackListWithLimit):
1745         (WKBackForwardListCopyForwardListWithLimit):
1746         * UIProcess/API/C/WKGrammarDetail.cpp:
1747         (WKGrammarDetailCopyGuesses):
1748         * UIProcess/API/C/WKOpenPanelParameters.cpp:
1749         (WKOpenPanelParametersCopyAcceptedMIMETypes):
1750         (WKOpenPanelParametersCopySelectedFileNames):
1751         * UIProcess/API/C/WKPage.cpp:
1752         (WKPageSetPageContextMenuClient):
1753         (WKPageCopyRelatedPages):
1754         * UIProcess/API/Cocoa/WKBackForwardList.mm:
1755         (-[WKBackForwardList backList]):
1756         (-[WKBackForwardList forwardList]):
1757         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1758         (createWKArray):
1759         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1760         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
1761         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
1762         (webkit_back_forward_list_get_back_list_with_limit):
1763         (webkit_back_forward_list_get_forward_list_with_limit):
1764         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
1765         (webkit_file_chooser_request_get_mime_types):
1766         (webkit_file_chooser_request_get_mime_types_filter):
1767         (webkit_file_chooser_request_select_files):
1768         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
1769         (WebKitNotificationProvider::notificationCloseCallback):
1770         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1771         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
1772         * UIProcess/Notifications/WebNotificationProvider.cpp:
1773         (WebKit::WebNotificationProvider::clearNotifications):
1774         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1775         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
1776         * UIProcess/StatisticsRequest.cpp:
1777         (WebKit::StatisticsRequest::completedRequest):
1778         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1779         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1780         * UIProcess/WebBackForwardList.cpp:
1781         (WebKit::WebBackForwardList::backList):
1782         (WebKit::WebBackForwardList::forwardList):
1783         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
1784         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
1785         * UIProcess/WebBackForwardList.h:
1786         * UIProcess/WebCookieManagerProxy.cpp:
1787         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
1788         * UIProcess/WebDatabaseManagerProxy.cpp:
1789         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1790         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
1791         * UIProcess/WebGrammarDetail.cpp:
1792         (WebKit::WebGrammarDetail::guesses):
1793         * UIProcess/WebGrammarDetail.h:
1794         * UIProcess/WebKeyValueStorageManager.cpp:
1795         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1796         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
1797         * UIProcess/WebMediaCacheManagerProxy.cpp:
1798         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
1799         * UIProcess/WebOriginDataManagerProxy.cpp:
1800         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
1801         * UIProcess/WebPageProxy.cpp:
1802         (WebKit::WebPageProxy::didFindStringMatches):
1803         * UIProcess/WebProcessPool.cpp:
1804         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
1805         * UIProcess/ios/forms/WKFileUploadPanel.mm:
1806         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
1807         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
1808         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1809         (-[WKWebProcessPlugInFrame childFrames]):
1810         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
1811         (WKBundleBackForwardListItemCopyChildren):
1812         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1813         (WKBundleFrameCopyChildFrames):
1814         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1815         (WKBundlePageCopyTrackedRepaintRects):
1816         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
1817         (WebKit::InjectedBundleBackForwardListItem::children):
1818         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
1819         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1820         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1821         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1822         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
1823         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1824         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
1825         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1826         (WebKit::findLargestFrameInFrameSet):
1827         * WebProcess/WebPage/WebFrame.cpp:
1828         (WebKit::WebFrame::childFrames):
1829         * WebProcess/WebPage/WebFrame.h:
1830         * WebProcess/WebPage/WebPage.cpp:
1831         (WebKit::WebPage::trackedRepaintRects):
1832         * WebProcess/WebPage/WebPage.h:
1833
1834 2015-04-21  Eric Carlson  <eric.carlson@apple.com>
1835
1836         [Mac] Use one playback target for all web processes
1837         https://bugs.webkit.org/show_bug.cgi?id=144009
1838
1839         Reviewed by Tim Horton.
1840
1841         Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
1842         picker.
1843
1844         * UIProcess/PageClient.h:
1845         * UIProcess/WebPageProxy.cpp:
1846         (WebKit::WebPageProxy::WebPageProxy):
1847         (WebKit::WebPageProxy::resetState):
1848         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1849         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
1850         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
1851         (WebKit::WebPageProxy::showPlaybackTargetPicker):
1852         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
1853         (WebKit::WebPageProxy::setPlaybackTarget):
1854         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
1855         (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
1856         (WebKit::WebPageProxy::devicePickerProxy): Deleted.
1857         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
1858         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
1859         (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
1860         * UIProcess/WebPageProxy.h:
1861         (WebKit::WebPageProxy::isPlayingAudio):
1862         * UIProcess/WebPageProxy.messages.in:
1863         * UIProcess/mac/PageClientImpl.h:
1864         * UIProcess/mac/PageClientImpl.mm:
1865         (WebKit::PageClientImpl::mediaSessionManager):
1866         (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
1867         * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
1868         (WebKit::WebMediaSessionManagerMac::singleton):
1869         (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
1870         (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
1871         (WebKit::WebMediaSessionManagerMac::targetPicker):
1872         * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
1873         * WebProcess/Plugins/PluginView.h:
1874         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1875         (WebKit::WebChromeClient::isPlayingMediaDidChange):
1876         (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
1877         (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
1878         (WebKit::WebChromeClient::showPlaybackTargetPicker):
1879         (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
1880         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
1881         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
1882         * WebProcess/WebCoreSupport/WebChromeClient.h:
1883         * WebProcess/WebPage/WebPage.h:
1884         * WebProcess/WebPage/WebPage.messages.in:
1885         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1886         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
1887         * WebProcess/WebPage/mac/WebPageMac.mm:
1888         (WebKit::WebPage::playbackTargetSelected):
1889         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
1890         (WebKit::WebPage::setShouldPlayToPlaybackTarget):
1891
1892 2015-04-21  Anders Carlsson  <andersca@apple.com>
1893
1894         WKWebsiteDataStore doesn't track and remove IndexedDB databases
1895         https://bugs.webkit.org/show_bug.cgi?id=144032
1896         rdar://problem/20242856
1897
1898         Reviewed by Tim Horton.
1899
1900         * DatabaseProcess/DatabaseProcess.cpp:
1901         (WebKit::DatabaseProcess::fetchWebsiteData):
1902         (WebKit::DatabaseProcess::deleteWebsiteData):
1903         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
1904         * DatabaseProcess/DatabaseProcess.h:
1905         * DatabaseProcess/DatabaseProcess.messages.in:
1906         * Shared/WebsiteData/WebsiteDataTypes.h:
1907         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
1908         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
1909         (dataTypesToString):
1910         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
1911         (WebKit::toWebsiteDataTypes):
1912         (WebKit::toWKWebsiteDataTypes):
1913         * UIProcess/Databases/DatabaseProcessProxy.cpp:
1914         (WebKit::generateCallbackID):
1915         (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
1916         (WebKit::DatabaseProcessProxy::fetchWebsiteData):
1917         (WebKit::DatabaseProcessProxy::deleteWebsiteData):
1918         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
1919         (WebKit::DatabaseProcessProxy::didClose):
1920         (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
1921         (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
1922         (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
1923         * UIProcess/Databases/DatabaseProcessProxy.h:
1924         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1925         * UIProcess/WebProcessPool.h:
1926         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1927         (WebKit::WebsiteDataStore::fetchData):
1928         (WebKit::WebsiteDataStore::removeData):
1929
1930 2015-04-21  Anders Carlsson  <andersca@apple.com>
1931
1932         Add module maps for WebKit
1933         https://bugs.webkit.org/show_bug.cgi?id=144026
1934         rdar://problem/19665428
1935
1936         Reviewed by Dan Bernstein.
1937
1938         * Configurations/WebKit.xcconfig:
1939         * Modules/OSX.modulemap: Added.
1940         * Modules/iOS.modulemap: Added.
1941
1942 2015-04-21  Tim Horton  <timothy_horton@apple.com>
1943
1944         Long pause under _takeViewSnapshot when screen updates are disabled
1945         https://bugs.webkit.org/show_bug.cgi?id=144017
1946         <rdar://problem/20548397>
1947
1948         Reviewed by Simon Fraser.
1949
1950         * UIProcess/API/mac/WKView.mm:
1951         (-[WKView _takeViewSnapshot]):
1952         Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
1953         the next commit, and can succeed while screen updates are disabled
1954         without blocking.
1955
1956 2015-04-21  Chris Dumez  <cdumez@apple.com>
1957
1958         [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
1959         https://bugs.webkit.org/show_bug.cgi?id=144014
1960
1961         Reviewed by Antti Koivisto.
1962
1963         Better account of resource revalidations in efficacy logging.
1964         Prevously, resources that were in the cache but needed revalidation
1965         were counted as retrieval successes, which is not entirely accurate.
1966
1967         We now distinguish "is in the cache and is directly usable" from
1968         "is in the cache but needs revalidation". We also log how many of these
1969         revalidations are successful.
1970
1971         * NetworkProcess/NetworkResourceLoader.cpp:
1972         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1973         * NetworkProcess/cache/NetworkCache.cpp:
1974         (WebKit::NetworkCache::Cache::update):
1975         * NetworkProcess/cache/NetworkCache.h:
1976         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1977         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
1978         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
1979         * NetworkProcess/cache/NetworkCacheStatistics.h:
1980
1981 2015-04-21  Dan Bernstein  <mitz@apple.com>
1982
1983         [Cocoa] Framework header postprocessing should respect additional definitions
1984         https://bugs.webkit.org/show_bug.cgi?id=144018
1985
1986         Reviewed by Anders Carlsson.
1987
1988         * mac/postprocess-framework-headers.sh: Read definitons from
1989         /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
1990         have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
1991         sed.
1992
1993 2015-04-21  Anders Carlsson  <andersca@apple.com>
1994
1995         Fix block signatures
1996         https://bugs.webkit.org/show_bug.cgi?id=144002
1997
1998         Reviewed by Andreas Kling.
1999
2000         * UIProcess/API/Cocoa/WKUIDelegate.h:
2001         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2002         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2003         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2004         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2005         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2006         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2007         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2008         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2009         * UIProcess/ios/WKPDFView.mm:
2010         (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
2011         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2012         (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
2013         (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
2014         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2015
2016 2015-04-21  Timothy Horton  <timothy_horton@apple.com>
2017
2018         PDFs still don't snapshot properly in iOS Safari
2019         https://bugs.webkit.org/show_bug.cgi?id=143976
2020         <rdar://problem/18283459>
2021
2022         Reviewed by Anders Carlsson.
2023
2024         * UIProcess/WebPageProxy.cpp:
2025         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
2026         * UIProcess/WebPageProxy.h:
2027         * UIProcess/API/Cocoa/WKWebView.mm:
2028         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
2029         Inform the client that we've passed all reasonable layout milestones
2030         as soon as the custom content provider has been handed its data.
2031         WKPDFView, the only custom content provider, synchronously lays out
2032         its subviews upon initial receipt of data, so this works fine for it.
2033         This ensures that clients that normally depend on layout milestones firing
2034         won't break when a custom content view is installed.
2035
2036         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2037         Fall back to renderInContext: if the custom content view is not parented
2038         when a snapshot is requested.
2039
2040 2015-04-21  Dan Bernstein  <mitz@apple.com>
2041
2042         Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
2043
2044         Reviewed by Anders Carlsson.
2045
2046         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
2047         (-[WKBackForwardListItem _item]):
2048         (-[WKBackForwardListItem _apiObject]):
2049         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
2050
2051 2015-04-21  Chris Dumez  <cdumez@apple.com>
2052
2053         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
2054         https://bugs.webkit.org/show_bug.cgi?id=143970
2055
2056         Reviewed by Darin Adler.
2057
2058         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
2059         constructor explicit as it copies the vector and it is easy to call it
2060         by mistake.
2061
2062         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
2063         (WebKit::WebIDBServerConnection::setIndexKeys):
2064         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2065
2066 2015-04-20  Dan Bernstein  <mitz@apple.com>
2067
2068         Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
2069         https://bugs.webkit.org/show_bug.cgi?id=143973
2070
2071         Reviewed by Anders Carlsson.
2072
2073         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
2074         delegate methods.
2075
2076         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
2077         property.
2078         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
2079         (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
2080         useful to delegates getting an array of nodes via the new method.
2081
2082         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2083         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
2084         shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
2085
2086 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
2087
2088         Cleanup some StringBuilder use
2089         https://bugs.webkit.org/show_bug.cgi?id=143550
2090
2091         Reviewed by Darin Adler.
2092
2093         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2094         (WebKit::buildObjectStoreStatement):
2095         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2096         (WebKit::v2RecordsTableSchema):
2097         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
2098         (WebKit::uniqueDatabaseIdentifier):
2099         * UIProcess/API/APIUserScript.cpp:
2100         (API::UserScript::generateUniqueURL):
2101         * UIProcess/WebProcessPool.cpp:
2102         (WebKit::WebProcessPool::didReceiveInvalidMessage):
2103         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
2104         (WebKit::combinedSecurityOriginIdentifier):
2105
2106 2015-04-20  Anders Carlsson  <andersca@apple.com>
2107
2108         Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
2109         https://bugs.webkit.org/show_bug.cgi?id=143966
2110
2111         Reviewed by Dan Bernstein.
2112
2113         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2114         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
2115         (dataTypesToString):
2116         (-[WKWebsiteDataRecord dataTypes]):
2117         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
2118         (WebKit::toWebsiteDataTypes):
2119         (WebKit::toWKWebsiteDataTypes):
2120         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2121         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2122         (+[WKWebsiteDataStore allWebsiteDataTypes]):
2123         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2124         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2125         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2126         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2127         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2128         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2129         (toWKWebsiteDataTypes):
2130         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2131         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2132         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2133
2134 2015-04-20  Beth Dakin  <bdakin@apple.com>
2135
2136         Should remove mouseForceClick and mouseForceCancelled from DOM force events
2137         https://bugs.webkit.org/show_bug.cgi?id=143904
2138         -and corresponding-
2139         rdar://problem/20578842
2140
2141         Reviewed by Dan Bernstein.
2142
2143         * WebProcess/WebPage/mac/WebPageMac.mm:
2144         (WebKit::WebPage::immediateActionDidCancel):
2145
2146 2015-04-20  Tim Horton  <timothy_horton@apple.com>
2147
2148         Implement immediate action support for tel: and mailto: URLs
2149         https://bugs.webkit.org/show_bug.cgi?id=143916
2150         <rdar://problem/19721711>
2151
2152         Reviewed by Darin Adler.
2153
2154         * Shared/API/c/WKImmediateActionTypes.h:
2155         * UIProcess/mac/WKImmediateActionController.mm:
2156         (-[WKImmediateActionController _defaultAnimationController]):
2157         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
2158         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
2159         (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
2160         Add _animationControllerForDataDetectedLink and use it when
2161         building immediate actions for tel: and mailto: links.
2162
2163 2015-04-20  Alex Christensen  <achristensen@webkit.org>
2164
2165         Properly report errors from _WKUserContentExtensionStore.
2166         https://bugs.webkit.org/show_bug.cgi?id=143808
2167
2168         Reviewed by Darin Adler.
2169
2170         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
2171         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
2172         (-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
2173         (-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
2174
2175 2015-04-18  Simon Fraser  <simon.fraser@apple.com>
2176
2177         REGRESSION (r181656): Animated tiled layers are missing content
2178         https://bugs.webkit.org/show_bug.cgi?id=143911
2179         rdar://problem/20596328
2180
2181         Reviewed by Darin Adler.
2182         
2183         After r181656, all requestAnimationFrame was falling back to timers, and not
2184         using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
2185         fumble.
2186         
2187         Replace this confusing Optional<> code with simpler code that just forces the
2188         clients to make a DisplayRefreshMonitor if they can, first asking
2189         ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
2190         
2191         Make lots of things into references, and use C++11 initialization in some places.
2192
2193         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2194         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
2195         * WebProcess/WebCoreSupport/WebChromeClient.h:
2196
2197 2015-04-18  Dan Bernstein  <mitz@apple.com>
2198
2199         SwipeShadow images are installed on iOS
2200         https://bugs.webkit.org/show_bug.cgi?id=143915
2201
2202         Reviewed by Tim Horton.
2203
2204         * Configurations/WebKit.xcconfig: Added Resources/Mac/* to
2205         EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
2206         individual patterns.
2207         * Resources/SwipeShadow.png: Moved to mac.
2208         * Resources/SwipeShadow@2x.png: Moved to mac.
2209         * Resources/mac: Added.
2210         * Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
2211         * Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
2212         * WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
2213         SwipeShadow*.png into it. Updated for file moves.
2214
2215 2015-04-18  Chris Dumez  <cdumez@apple.com>
2216
2217         Fix NetworkCache Statistics database bootstrapping after r182803
2218         https://bugs.webkit.org/show_bug.cgi?id=143890
2219
2220         Reviewed by Darin Adler.
2221
2222         Update the NetworkCache Statistics database bootstrapping code to use
2223         the records path instead of the version path. Also check that the
2224         filenames in the folder are valid hashes to discard the *-body files.
2225
2226         * NetworkProcess/cache/NetworkCache.cpp:
2227         (WebKit::NetworkCache::Cache::recordsPath):
2228         (WebKit::NetworkCache::Cache::storagePath): Deleted.
2229         * NetworkProcess/cache/NetworkCache.h:
2230         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2231         (WebKit::NetworkCache::Statistics::initialize):
2232         (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
2233         (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
2234
2235 2015-04-17  Tim Horton  <timothy_horton@apple.com>
2236
2237         Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
2238         https://bugs.webkit.org/show_bug.cgi?id=143901
2239         <rdar://problem/20488655>
2240
2241         Reviewed by Anders Carlsson.
2242
2243         * Platform/IPC/Connection.cpp:
2244         (IPC::Connection::waitForMessage):
2245         InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
2246         a sync message arrives while waiting, but it should also avoid waiting
2247         if there's a sync message already in the queue when the waiting starts,
2248         as that will have the same nasty effect.
2249
2250         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2251         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2252         If a synchronous message comes in from the Web process while we're waiting,
2253         cancel our synchronous wait for DidUpdateGeometry. This will cause the size
2254         change to not synchronize with the Web process' painting, but that is better
2255         than pointlessly blocking for 500ms.
2256
2257 2015-04-17  Chris Dumez  <cdumez@apple.com>
2258
2259         Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
2260         https://bugs.webkit.org/show_bug.cgi?id=143899
2261         <rdar://problem/20584215>
2262
2263         Reviewed by Anders Carlsson.
2264
2265         WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
2266         check that m_page.corePage() was non-null before dereferencing, thus
2267         causing crashes when it is null.
2268
2269         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2270         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
2271         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
2272         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
2273
2274 2015-04-17  Yongjun Zhang  <yongjun_zhang@apple.com>
2275
2276         WebKit client should be able to add view controller for link preview.
2277         https://bugs.webkit.org/show_bug.cgi?id=143686
2278
2279         Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
2280         for link preview and react to the dismissal of this view controller. Also connect WKContentView to
2281         preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
2282         in WKUIDelegatePrivate.
2283
2284         Reviewed by Beth Dakin.
2285
2286         * Platform/spi/ios/UIKitSPI.h:
2287         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2288         * UIProcess/ios/WKContentView.mm:
2289         (-[WKContentView willMoveToWindow:]):
2290         * UIProcess/ios/WKContentViewInteraction.h:
2291         * UIProcess/ios/WKContentViewInteraction.mm:
2292         (-[WKContentView cleanupInteraction]):
2293         (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2294         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
2295         (-[WKContentView gestureRecognizerShouldBegin:]):
2296         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2297         (-[WKContentView commitPreviewViewController:]):
2298         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
2299         (-[WKContentView didDismissPreviewViewController:committing:]):
2300
2301 2015-04-17  Beth Dakin  <bdakin@apple.com>
2302
2303         Force mouse events should go through normal mouse event handling code paths
2304         https://bugs.webkit.org/show_bug.cgi?id=143749
2305         -and corresponding-
2306         rdar://problem/20472895
2307
2308         Reviewed by Dean Jackson.
2309
2310         This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
2311         NSEventTypePressures that is gets and sends those down to the web process.
2312
2313         Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
2314         NSEventTypePressure, the new name makes it clear how the second parameter differs 
2315         from the first.
2316         * Shared/NativeWebMouseEvent.h:
2317
2318         New event types for the new types of events.
2319         * Shared/WebEvent.h:
2320         * Shared/WebEventConversion.cpp:
2321         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2322         * Shared/mac/NativeWebMouseEventMac.mm:
2323         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2324         * Shared/mac/WebEventFactory.h:
2325
2326         All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
2327         events into WebMouseEvents is taken care of here.
2328         * Shared/mac/WebEventFactory.mm:
2329         (WebKit::mouseButtonForEvent):
2330         (WebKit::globalPointForEvent):
2331         (WebKit::pointForEvent):
2332         (WebKit::WebEventFactory::createWebMouseEvent):
2333
2334         Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
2335         and handle it.
2336         * UIProcess/API/mac/WKView.mm:
2337         (-[WKView pressureChangeWithEvent:]):
2338
2339         Handle the new types.
2340         * UIProcess/WebPageProxy.cpp:
2341         (WebKit::WebPageProxy::didReceiveEvent):
2342
2343         Can delete inputDeviceForceDidChange since it’s no longer used.
2344         (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2345         * UIProcess/WebPageProxy.h:
2346
2347         Handle the new types of mouse events properly.
2348         * WebProcess/WebPage/WebPage.cpp:
2349         (WebKit::handleMouseEvent):
2350
2351         Delete inputDeviceForceDidChange() and m_lastForceStage.
2352         * WebProcess/WebPage/WebPage.h:
2353         * WebProcess/WebPage/WebPage.messages.in:
2354         * WebProcess/WebPage/mac/WebPageMac.mm:
2355         (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2356
2357         Handle new WebEvent types.
2358         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2359
2360 2015-04-17  Commit Queue  <commit-queue@webkit.org>
2361
2362         Unreviewed, rolling out r182912 and r182920.
2363         https://bugs.webkit.org/show_bug.cgi?id=143881
2364
2365         Build breakage in some configurations (Requested by ap on
2366         #webkit).
2367
2368         Reverted changesets:
2369
2370         "Force mouse events should go through normal mouse event
2371         handling code paths"
2372         https://bugs.webkit.org/show_bug.cgi?id=143749
2373         http://trac.webkit.org/changeset/182912
2374
2375         http://trac.webkit.org/changeset/182920
2376
2377 2015-04-17  Antti Koivisto  <antti@apple.com>
2378
2379         Network Cache: Read resource record and body in parallel
2380         https://bugs.webkit.org/show_bug.cgi?id=143879
2381
2382         Reviewed by Chris Dumez.
2383
2384         We currently first fetch the record file and then fetch the body blob if needed.
2385         We can do both operations in parallel to reduce latency.
2386
2387         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2388         (WebKit::NetworkCache::traverseCacheFiles):
2389
2390             Do all validation in the client.
2391
2392         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2393         (WebKit::NetworkCache::Storage::synchronize):
2394
2395             Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
2396             Delete any unknown file in cache directory.
2397
2398         (WebKit::NetworkCache::Storage::addToRecordFilter):
2399
2400             More informative name for record filter.
2401
2402         (WebKit::NetworkCache::Storage::mayContain):
2403         (WebKit::NetworkCache::Storage::readRecord):
2404         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2405         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2406
2407             Start record read IO and body blob read IO in parallel.
2408
2409         (WebKit::NetworkCache::Storage::finishReadOperation):
2410
2411             The read is finished when we have both the record and the blob.
2412
2413         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2414         (WebKit::NetworkCache::Storage::retrieve):
2415         (WebKit::NetworkCache::Storage::store):
2416         (WebKit::NetworkCache::Storage::traverse):
2417         (WebKit::NetworkCache::Storage::clear):
2418         (WebKit::NetworkCache::Storage::shrink):
2419         (WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
2420         (WebKit::NetworkCache::Storage::decodeRecord): Deleted.
2421         * NetworkProcess/cache/NetworkCacheStorage.h:
2422         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2423
2424             ReadOperation is now mutable and gathers the read result.
2425
2426 2015-04-16  Anders Carlsson  <andersca@apple.com>
2427
2428         Stop installing WebKit2.framework
2429         https://bugs.webkit.org/show_bug.cgi?id=143860
2430         rdar://problem/18298491
2431
2432         Reviewed by Dan Bernstein.
2433
2434         * Configurations/WebKit2.xcconfig:
2435         Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.
2436
2437 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2438
2439         Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
2440
2441         * NetworkProcess/cache/NetworkCacheEntry.cpp:
2442         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
2443         (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
2444
2445 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2446
2447         [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
2448         https://bugs.webkit.org/show_bug.cgi?id=143867
2449
2450         Reviewed by Sergio Villar Senin.
2451
2452         Encode/Decode the ResourceRequest cache policy.
2453
2454         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2455         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2456         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2457
2458 2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>
2459
2460         Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
2461         https://bugs.webkit.org/show_bug.cgi?id=143750
2462
2463         Reviewed by Darin Adler.
2464
2465         No new tests, no behavior change.
2466
2467         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2468         (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2469
2470 2015-04-16  Brady Eidson  <beidson@apple.com>
2471
2472         Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
2473         https://bugs.webkit.org/show_bug.cgi?id=143834
2474
2475         Reviewed by Anders Carlsson.
2476
2477         * UIProcess/API/APIUserContentExtensionStore.cpp:
2478         (API::compiledToFile): Use moveFile() instead of renameFile()
2479
2480 2015-04-16  Anders Carlsson  <andersca@apple.com>
2481
2482         Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
2483         https://bugs.webkit.org/show_bug.cgi?id=143844
2484
2485         Reviewed by Dan Bernstein.
2486
2487         * Shared/API/Cocoa/WKFoundation.h:
2488         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2489         (-[WKWebViewConfiguration _validate]):
2490         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2491         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
2492         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2493         * mac/postprocess-framework-headers.sh:
2494
2495 2015-04-16  Alex Christensen  <achristensen@webkit.org>
2496
2497         Removed unused WKUserContentFilterRef.
2498         https://bugs.webkit.org/show_bug.cgi?id=143852
2499
2500         Reviewed by Sam Weinig.
2501
2502         * Shared/WebCompiledContentExtension.cpp:
2503         (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
2504         (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
2505         (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
2506         (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
2507         * Shared/WebCompiledContentExtension.h:
2508         * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
2509         * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
2510         * UIProcess/API/C/WebKit2_C.h:
2511         * UIProcess/API/Cocoa/_WKUserContentFilter.h:
2512         * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
2513         (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
2514         * WebKit2.xcodeproj/project.pbxproj:
2515
2516 2015-04-16  Beth Dakin  <bdakin@apple.com>
2517
2518         Rubber-stamped by Tim Horton.
2519
2520         Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should 
2521         make sure to use the most up-to-date pressure information when setting the force 
2522         on a WebMouseEvent.
2523
2524         * Shared/mac/WebEventFactory.mm:
2525         (WebKit::WebEventFactory::createWebMouseEvent):
2526
2527 2015-04-13  Jer Noble  <jer.noble@apple.com>
2528
2529         [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
2530         https://bugs.webkit.org/show_bug.cgi?id=143680
2531
2532         Reviewed by Simon Fraser.
2533
2534         The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
2535         single video element and its full screen state. With multiple animations in and out of fullscreen combined with
2536         multiple fullscreen modes, this assumption no longer holds true.
2537
2538         Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
2539         /hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
2540         WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
2541         communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
2542         WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
2543         are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
2544         WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.
2545
2546         Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
2547         manager or manager proxy, and each method on the context simply calls the matching method on the manager and
2548         passes its contextId as a parameter.
2549
2550         Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
2551         cross-process messages.
2552
2553         On the other side, the manager and proxy also have a map between contextIds and their matching
2554         WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
2555         WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).
2556
2557         While this change is large by LoC, it is almost entirely boilerplate.  The new and interesting pieces are these:
2558
2559         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2560         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
2561         (WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
2562         (WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
2563         (WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
2564             a new model and interface object.
2565         (WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
2566         (WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
2567         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if 
2568             any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
2569             exit fullscreen.
2570         * WebProcess/ios/WebVideoFullscreenManager.mm:
2571         (WebKit::nextContextId): Static, incrementing counter used as a contextId source.
2572         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
2573         (WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
2574         (WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
2575         (WebKit::WebVideoFullscreenManager::ensureModelAndInterface):  Added. Lazily create, and add to the m_contextMap
2576             a new model and interface object.
2577         (WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
2578         (WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().
2579
2580         New classes and methods which just forward on to their owning objects:
2581
2582         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2583         (WebKit::WebVideoFullscreenModelContext::create):
2584         (WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
2585         (WebKit::WebVideoFullscreenModelContext::invalidate):
2586         (WebKit::WebVideoFullscreenModelContext::layerHost):
2587         (WebKit::WebVideoFullscreenModelContext::setLayerHost):
2588         (WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
2589         (WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
2590         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2591         (WebKit::WebVideoFullscreenModelContext::play):
2592         (WebKit::WebVideoFullscreenModelContext::pause):
2593         (WebKit::WebVideoFullscreenModelContext::togglePlayState):
2594         (WebKit::WebVideoFullscreenModelContext::beginScrubbing):
2595         (WebKit::WebVideoFullscreenModelContext::endScrubbing):
2596         (WebKit::WebVideoFullscreenModelContext::seekToTime):
2597         (WebKit::WebVideoFullscreenModelContext::fastSeek):
2598         (WebKit::WebVideoFullscreenModelContext::beginScanningForward):
2599         (WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
2600         (WebKit::WebVideoFullscreenModelContext::endScanning):
2601         (WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
2602         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
2603         (WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
2604         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
2605         (WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
2606         (WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
2607         (WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
2608         (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
2609         (WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
2610         (WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
2611         (WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
2612         (WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
2613         (WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
2614         * WebProcess/ios/WebVideoFullscreenManager.h:
2615         (WebKit::WebVideoFullscreenInterfaceContext::create):
2616         (WebKit::WebVideoFullscreenInterfaceContext::invalidate):
2617         (WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
2618         (WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
2619         (WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
2620         (WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
2621         (WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
2622         (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
2623         (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
2624         (WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
2625         (WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
2626         * WebProcess/ios/WebVideoFullscreenManager.mm:
2627         (WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
2628         (WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
2629         (WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
2630         (WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
2631         (WebKit::WebVideoFullscreenInterfaceContext::setDuration):
2632         (WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
2633         (WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
2634         (WebKit::WebVideoFullscreenInterfaceContext::setRate):
2635         (WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
2636         (WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
2637         (WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
2638         (WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
2639         (WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
2640         (WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):
2641
2642         Cross-process methods which now take a contextId parameter:
2643
2644         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2645         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2646         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
2647         (WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
2648         (WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
2649         (WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
2650         (WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
2651         (WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
2652         (WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
2653         (WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
2654         (WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
2655         (WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
2656         (WebKit::WebVideoFullscreenManagerProxy::setDuration):
2657         (WebKit::WebVideoFullscreenManagerProxy::setRate):
2658         (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
2659         (WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
2660         (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
2661         (WebKit::WebVideoFullscreenManagerProxy::play):
2662         (WebKit::WebVideoFullscreenManagerProxy::pause):
2663         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
2664         (WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
2665         (WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
2666         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
2667         (WebKit::WebVideoFullscreenManagerProxy::fastSeek):
2668         (WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
2669         (WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
2670         (WebKit::WebVideoFullscreenManagerProxy::endScanning):
2671         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2672         (WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
2673         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2674         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2675         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
2676         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2677         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
2678         (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
2679         (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
2680         (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
2681         (WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
2682         (WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
2683         (WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
2684         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2685         * WebProcess/ios/WebVideoFullscreenManager.mm:
2686         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
2687         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
2688         (WebKit::WebVideoFullscreenManager::resetMediaState):
2689         (WebKit::WebVideoFullscreenManager::setDuration):
2690         (WebKit::WebVideoFullscreenManager::setCurrentTime):
2691         (WebKit::WebVideoFullscreenManager::setBufferedTime):
2692         (WebKit::WebVideoFullscreenManager::setRate):
2693         (WebKit::WebVideoFullscreenManager::setVideoDimensions):
2694         (WebKit::WebVideoFullscreenManager::setSeekableRanges):
2695         (WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
2696         (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
2697         (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
2698         (WebKit::WebVideoFullscreenManager::setExternalPlayback):
2699         (WebKit::WebVideoFullscreenManager::play):
2700         (WebKit::WebVideoFullscreenManager::pause):
2701         (WebKit::WebVideoFullscreenManager::togglePlayState):
2702         (WebKit::WebVideoFullscreenManager::beginScrubbing):
2703         (WebKit::WebVideoFullscreenManager::endScrubbing):
2704         (WebKit::WebVideoFullscreenManager::seekToTime):
2705         (WebKit::WebVideoFullscreenManager::fastSeek):
2706         (WebKit::WebVideoFullscreenManager::beginScanningForward):
2707         (WebKit::WebVideoFullscreenManager::beginScanningBackward):
2708         (WebKit::WebVideoFullscreenManager::endScanning):
2709         (WebKit::WebVideoFullscreenManager::requestExitFullscreen):
2710         (WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
2711         (WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
2712         (WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
2713         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2714         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2715         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2716         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
2717         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
2718         (WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
2719         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
2720         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
2721
2722 2015-04-16  Beth Dakin  <bdakin@apple.com>
2723
2724         Force mouse events should go through normal mouse event handling code paths
2725         https://bugs.webkit.org/show_bug.cgi?id=143749
2726         -and corresponding-
2727         rdar://problem/20472895
2728
2729         Reviewed by Dean Jackson.
2730
2731         This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the 
2732         NSEventTypePressures that is gets and sends those down to the web process.
2733
2734         Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an 
2735         NSEventTypePressure, the new name makes it clear how the second parameter differs 
2736         from the first.
2737         * Shared/NativeWebMouseEvent.h:
2738
2739         New event types for the new types of events.
2740         * Shared/WebEvent.h:
2741         * Shared/WebEventConversion.cpp:
2742         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2743         * Shared/mac/NativeWebMouseEventMac.mm:
2744         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
2745         * Shared/mac/WebEventFactory.h:
2746
2747         All of the square-peg, round-hole problems of massaging the NSEventTypePressures 
2748         events into WebMouseEvents is taken care of here.
2749         * Shared/mac/WebEventFactory.mm:
2750         (WebKit::mouseButtonForEvent):
2751         (WebKit::globalPointForEvent):
2752         (WebKit::pointForEvent):
2753         (WebKit::WebEventFactory::createWebMouseEvent):
2754
2755         Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent 
2756         and handle it.
2757         * UIProcess/API/mac/WKView.mm:
2758         (-[WKView pressureChangeWithEvent:]):
2759
2760         Handle the new types.
2761         * UIProcess/WebPageProxy.cpp:
2762         (WebKit::WebPageProxy::didReceiveEvent):
2763
2764         Can delete inputDeviceForceDidChange since it’s no longer used.
2765         (WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
2766         * UIProcess/WebPageProxy.h:
2767
2768         Handle the new types of mouse events properly.
2769         * WebProcess/WebPage/WebPage.cpp:
2770         (WebKit::handleMouseEvent):
2771
2772         Delete inputDeviceForceDidChange() and m_lastForceStage.
2773         * WebProcess/WebPage/WebPage.h:
2774         * WebProcess/WebPage/WebPage.messages.in:
2775         * WebProcess/WebPage/mac/WebPageMac.mm:
2776         (WebKit::WebPage::inputDeviceForceDidChange): Deleted.
2777
2778         Handle new WebEvent types.
2779         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2780
2781 2015-04-16  Dan Bernstein  <mitz@apple.com>
2782
2783         <rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.
2784
2785         Reviewed by Tim Horton.
2786
2787         * WebKit2.xcodeproj/project.pbxproj:
2788
2789 2015-04-16  Timothy Horton  <timothy_horton@apple.com>
2790
2791         Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
2792         https://bugs.webkit.org/show_bug.cgi?id=143740
2793         <rdar://problem/20468540>
2794
2795         Reviewed by Dan Bernstein.
2796
2797         In the C SPI, add three WKPageLoaderClient callbacks for the three
2798         navigation gesture events (did begin, will end, did end).
2799
2800         * UIProcess/API/C/WKPageLoaderClient.h:
2801         Add the callbacks.
2802
2803         * UIProcess/API/APILoaderClient.h:
2804         (API::LoaderClient::navigationGestureDidBegin):
2805         (API::LoaderClient::navigationGestureWillEnd):
2806         (API::LoaderClient::navigationGestureDidEnd):
2807         * UIProcess/WebPageProxy.cpp:
2808         (WebKit::WebPageProxy::navigationGestureDidBegin):
2809         (WebKit::WebPageProxy::navigationGestureWillEnd):
2810         (WebKit::WebPageProxy::navigationGestureDidEnd):
2811         Dispatch navigation gesture events to the loader client as well as
2812         (after a bounce through the PageClient) the navigation delegate.
2813
2814         * UIProcess/API/C/WKPage.cpp:
2815         (WKPageSetPageLoaderClient):
2816         Call the callbacks.
2817
2818         * UIProcess/mac/ViewGestureController.h:
2819         * UIProcess/mac/ViewGestureControllerMac.mm:
2820         (WebKit::ViewGestureController::trackSwipeGesture):
2821         (WebKit::ViewGestureController::willEndSwipeGesture):
2822         While we were already informing WebPageProxy of 'did begin' and 'did end'
2823         navigation gesture events, we were missing 'will end'. Add it.
2824
2825 2015-04-16  Tim Horton  <timothy_horton@apple.com>
2826
2827         Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
2828         https://bugs.webkit.org/show_bug.cgi?id=143812
2829         <rdar://problem/19866038>
2830
2831         Reviewed by Simon Fraser.
2832
2833         * Shared/VisibleContentRectUpdateInfo.h:
2834         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2835         No cats in transaction (more of these below, too).
2836
2837         * UIProcess/WebPageProxy.h:
2838         * UIProcess/WebPageProxy.messages.in:
2839         * UIProcess/ios/WebPageProxyIOS.mm:
2840         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2841         (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
2842         * WebProcess/WebPage/WebPage.h:
2843         * WebProcess/WebPage/WebPage.messages.in:
2844         * WebProcess/WebPage/ios/WebPageIOS.mm:
2845         (WebKit::WebPage::handleTap):
2846         (WebKit::WebPage::commitPotentialTap):
2847         (WebKit::WebPage::dynamicViewportSizeUpdate):
2848         Add an incrementing ID to dynamicViewportSizeUpdates. The UI process keeps
2849         the current ID, and it is bounced through the Web process (dynamicViewportSizeUpdates)
2850         back to the UI process (dynamicViewportUpdateChangedTarget). If we have
2851         dispatched another dynamicViewportSizeUpdate in the interim, ignore
2852         the intermediate target.
2853
2854 2015-04-16  Sungmann Cho  <sungmann.cho@navercorp.com>
2855
2856         Remove PluginController::isPluginVisible().
2857         https://bugs.webkit.org/show_bug.cgi?id=143830
2858
2859         Reviewed by Darin Adler.
2860
2861         PluginController::isPluginVisible() was introduced by http://webkit.org/b/60285.
2862         This method had been used only for WebKit2 on Windows, and no one uses it now.
2863         So we can remove it.
2864
2865         No new tests, no behavior change.
2866
2867         * PluginProcess/PluginControllerProxy.cpp:
2868         (WebKit::PluginControllerProxy::isPluginVisible): Deleted.
2869         * PluginProcess/PluginControllerProxy.h:
2870         * WebProcess/Plugins/PluginController.h:
2871         * WebProcess/Plugins/PluginView.cpp:
2872         (WebKit::PluginView::isPluginVisible): Deleted.
2873         * WebProcess/Plugins/PluginView.h:
2874
2875 2015-04-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2876
2877         [EFL] Disable a flaky ewk_context_network_process_model() API test
2878         https://bugs.webkit.org/show_bug.cgi?id=143824
2879
2880         Reviewed by Csaba Osztrogonác.
2881
2882         ewk_context_network_process_model has been often failed. Though Bug 142967
2883         was filed to fix this issue, it is not solved yet. To maintain EFL bot, this patch
2884         disables it until fixing it.
2885
2886         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2887         (TEST_F):
2888
2889 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
2890
2891         [WK2] Forwarding headers generator shouldn't generate unnecessary headers
2892         https://bugs.webkit.org/show_bug.cgi?id=143820
2893
2894         Reviewed by Carlos Garcia Campos.
2895
2896         * Scripts/generate-forwarding-headers.pl:
2897         (collectNeededHeaders):
2898
2899 2015-04-16  Csaba Osztrogonác  <ossy@webkit.org>
2900
2901         [GTK] Run forwarding headers generator unconditionally
2902         https://bugs.webkit.org/show_bug.cgi?id=143819
2903
2904         Reviewed by Carlos Garcia Campos.
2905
2906         * PlatformGTK.cmake:
2907
2908 2015-04-15  Brent Fulgham  <bfulgham@apple.com>
2909
2910         [Mac] Disable "Save to Downloads" option for local files
2911         https://bugs.webkit.org/show_bug.cgi?id=143794
2912
2913         Reviewed by Tim Horton.
2914
2915         Disable the Image and Media download options if the download
2916         target is a local file. We can only download web resources;
2917         anything else is actually a no-op.
2918
2919         * UIProcess/mac/WKActionMenuController.mm:
2920         (-[WKActionMenuController _defaultMenuItemsForVideo]):
2921         (-[WKActionMenuController _defaultMenuItemsForImage]):
2922
2923 2015-04-15  Anders Carlsson  <andersca@apple.com>
2924
2925         Make websiteDataStore on WKWebViewConfiguration public
2926         https://bugs.webkit.org/show_bug.cgi?id=143810
2927
2928         Reviewed by Dan Bernstein.
2929
2930         * UIProcess/API/Cocoa/WKWebView.mm:
2931         (-[WKWebView initWithFrame:configuration:]):
2932         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2933         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2934         (-[WKWebViewConfiguration copyWithZone:]):
2935         (-[WKWebViewConfiguration websiteDataStore]):
2936         (-[WKWebViewConfiguration setWebsiteDataStore:]):
2937         (-[WKWebViewConfiguration _websiteDataStore]):
2938         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2939
2940 2015-04-15  Anders Carlsson  <andersca@apple.com>
2941
2942         Make WKWebsiteDataStore public
2943         https://bugs.webkit.org/show_bug.cgi?id=143805
2944
2945         Reviewed by Dan Bernstein.
2946
2947         Rename the current _WKWebsiteDataStore to WKWebsiteDataStore. Make init unavailable and tighten up the
2948         types of the defaultDataStore and nonPersistentDataStore class methods.
2949         
2950         Add a new _WKWebsiteDataStore @interface and @implementation that derives from WKWebsiteDataStore
2951         and forwards the defaultDataStore and nonPersistentDataStore method calls.
2952
2953         * Shared/API/Cocoa/WebKit.h:
2954         * Shared/Cocoa/APIObject.mm:
2955         (API::Object::newObject):
2956         * UIProcess/API/Cocoa/WKWebView.mm:
2957         (-[WKWebView initWithFrame:configuration:]):
2958         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2959         (-[WKWebViewConfiguration _websiteDataStore]):
2960         * UIProcess/API/Cocoa/WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
2961         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm.
2962         (+[WKWebsiteDataStore defaultDataStore]):
2963         (+[WKWebsiteDataStore nonPersistentDataStore]):
2964         (-[WKWebsiteDataStore dealloc]):
2965         (-[WKWebsiteDataStore isNonPersistent]):
2966         (toSystemClockTime):
2967         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2968         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2969         (toWebsiteDataRecords):
2970         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2971         (-[WKWebsiteDataStore _apiObject]):
2972         * UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h.
2973         (WebKit::wrapper):
2974         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2975         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2976         (+[_WKWebsiteDataStore defaultDataStore]):
2977         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2978         (-[_WKWebsiteDataStore dealloc]): Deleted.
2979         (-[_WKWebsiteDataStore isNonPersistent]): Deleted.
2980         (toWebsiteDataTypes): Deleted.
2981         (toSystemClockTime): Deleted.
2982         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]): Deleted.
2983         (-[_WKWebsiteDataStore _apiObject]): Deleted.
2984         * WebKit2.xcodeproj/project.pbxproj:
2985
2986 2015-04-15  Timothy Horton  <timothy_horton@apple.com>
2987
2988         Custom CSS cursors do not use -webkit-image-set on retina displays
2989         https://bugs.webkit.org/show_bug.cgi?id=120783
2990
2991         Reviewed by Beth Dakin.
2992         Patch by Evan Wallace <evan.exe@gmail.com>.
2993
2994         Serialize the cursor image scale for SetCursor messages so custom
2995         CSS cursors work with -webkit-image-set on retina displays.
2996
2997         * Shared/WebCoreArgumentCoders.cpp:
2998         (CoreIPC::ArgumentCoder<Cursor>::encode):
2999         (CoreIPC::ArgumentCoder<Cursor>::decode):
3000
3001 2015-04-15  Alex Christensen  <achristensen@webkit.org>
3002
3003         Progress towards CMake on Mac.
3004         https://bugs.webkit.org/show_bug.cgi?id=143785
3005
3006         Reviewed by Csaba Osztrogonác.
3007
3008         * CMakeLists.txt:
3009         * PlatformEfl.cmake:
3010         * PlatformGTK.cmake:
3011
3012 2015-04-15  Anders Carlsson  <andersca@apple.com>
3013
3014         Make WKWebsiteDataRecord public
3015         https://bugs.webkit.org/show_bug.cgi?id=143796
3016
3017         Reviewed by Dan Bernstein.
3018
3019         Rename _WKWebsiteDataRecord and associated files to WKWebsiteDataRecord and
3020         add a new _WKWebsiteDataRecord.h with a class @interface declaration that just
3021         inherits from WKWebsiteDataRecord. We don't need an @implementation since nobody is expected
3022         to allocate _WKWebsiteDataRecord objects.
3023
3024         * Shared/API/Cocoa/WebKit.h:
3025         * Shared/Cocoa/APIObject.mm:
3026         (API::Object::newObject):
3027         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h.
3028         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm.
3029         (-[WKWebsiteDataRecord dealloc]):
3030         (dataTypesToString):
3031         (-[WKWebsiteDataRecord description]):
3032         (-[WKWebsiteDataRecord displayName]):
3033         (-[WKWebsiteDataRecord dataTypes]):
3034         (-[WKWebsiteDataRecord _apiObject]):
3035         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h.
3036         (WebKit::wrapper):
3037         (WebKit::toWebsiteDataTypes):
3038         (WebKit::toWKWebsiteDataTypes):
3039         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3040         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3041         (toWebsiteDataRecords):
3042         * WebKit2.xcodeproj/project.pbxproj:
3043
3044 2015-04-13  Jer Noble  <jer.noble@apple.com>
3045
3046         [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
3047         https://bugs.webkit.org/show_bug.cgi?id=143674
3048
3049         Reviewed by Darin Adler.
3050
3051         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3052         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Takes a reference.
3053         (WebKit::WebChromeClient::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3054         (WebKit::WebChromeClient::exitVideoFullscreen): Deleted.
3055         * WebProcess/WebCoreSupport/WebChromeClient.h:
3056         * WebProcess/ios/WebVideoFullscreenManager.h:
3057         * WebProcess/ios/WebVideoFullscreenManager.mm:
3058         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
3059         (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement): Renamed from exitVideoFullscreen().
3060         (WebKit::WebVideoFullscreenManager::didEnterFullscreen): Pass a reference.
3061         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
3062         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.
3063
3064 2015-04-15  Antti Koivisto  <antti@apple.com>
3065
3066         Network Cache: Inline small body data to record file
3067         https://bugs.webkit.org/show_bug.cgi?id=143783
3068
3069         Reviewed by Chris Dumez.
3070
3071         We currently save all body data as separate files. We can improve space efficiency and do less reads and writes
3072         by inlining smaller resource bodies with the header.
3073
3074         * NetworkProcess/cache/NetworkCacheIOChannel.h:
3075         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3076         (WebKit::NetworkCache::IOChannel::read):
3077         (WebKit::NetworkCache::IOChannel::readSync):
3078         (WebKit::NetworkCache::IOChannel::write):
3079
3080             Add WorkQueue argument to allow specifying which queue the result is submitted to.
3081
3082         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3083         (WebKit::NetworkCache::decodeRecordMetaData):
3084
3085             Add a boolean indicating whether the body is inlined.
3086
3087         (WebKit::NetworkCache::decodeRecordHeader):
3088         (WebKit::NetworkCache::Storage::decodeRecord):
3089         (WebKit::NetworkCache::encodeRecordMetaData):
3090         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
3091         (WebKit::NetworkCache::Storage::encodeRecord):
3092         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3093
3094             Read the record first, then read the blob if needed.
3095             Submit the read operation directly from the main queue. Only thing we do is opening an IO channel
3096             and that uses O_NONBLOCK.
3097             Process the read results in the IO work queue where we now do the blob retrieval.
3098
3099         (WebKit::NetworkCache::shouldStoreBodyAsBlob):
3100
3101             The current threshold for saving a separate blob is 16KB.
3102
3103         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3104         (WebKit::NetworkCache::Storage::traverse):
3105         (WebKit::NetworkCache::createRecord): Deleted.
3106         (WebKit::NetworkCache::encodeRecordHeader): Deleted.
3107         * NetworkProcess/cache/NetworkCacheStorage.h:
3108
3109 2015-04-15  Tim Horton  <timothy_horton@apple.com>
3110
3111         Non-local keyboards don't update scroll view parameters
3112         https://bugs.webkit.org/show_bug.cgi?id=143791
3113         <rdar://problem/18974020>
3114
3115         * Platform/spi/ios/UIKitSPI.h:
3116         Fix the build.
3117
3118 2015-04-15  Tim Horton  <timothy_horton@apple.com>
3119
3120         Non-local keyboards don't update scroll view parameters
3121         https://bugs.webkit.org/show_bug.cgi?id=143791
3122         <rdar://problem/18974020>
3123
3124         Reviewed by Enrica Casucci.
3125
3126         * UIProcess/API/Cocoa/WKWebView.mm:
3127         (-[WKWebView _shouldUpdateKeyboardWithInfo:]):
3128         (-[WKWebView _keyboardWillChangeFrame:]):
3129         (-[WKWebView _keyboardWillShow:]):
3130         Make sure that we update scroll view parameters (obscured insets, etc.)
3131         if we have a non-local keyboard, in addition to the cases where we have an assisted node.
3132
3133 2015-04-15  Dan Bernstein  <mitz@apple.com>
3134
3135         <rdar://problem/20549298> No matching __NSi_ definition for postprocessed value of WK_{MAC,IOS}_TBA
3136         https://bugs.webkit.org/show_bug.cgi?id=143786
3137
3138         Reviewed by Anders Carlsson.
3139
3140         * Shared/API/Cocoa/WKFoundation.h: Added a placeholder for the postprocessing script to
3141         insert a definition of __NSi_* for the current deployment target. Import CoreFoundation.h so
3142         that we can check if the macro is already defined.
3143         * WebKit2.xcodeproj/project.pbxproj: In the Postprocess WKFoundation.h script build phase,
3144         replace the placeholder with a definition of __NSi_{current deployment target} if not
3145         already defined.
3146
3147 2015-04-14  Anders Carlsson  <andersca@apple.com>
3148
3149         Make creating send rights from shared memory more robust
3150         https://bugs.webkit.org/show_bug.cgi?id=143730
3151         rdar://problem/16595870
3152
3153         Reviewed by Darin Adler.
3154
3155         This cleans up creation of handles and send rights and also fixes a bug where it would be impossible
3156         to send more than 128 MB of shared memory in a single object.
3157
3158         * Platform/SharedMemory.h:
3159         * Platform/mac/SharedMemoryMac.cpp:
3160         (WebKit::makeMemoryEntry):
3161         New helper function that creates a memory entry send right. This uses MAP_MEM_VM_SHARE which ensures
3162         that memory objects larger than 128 MB will be handled correctly.
3163
3164         (WebKit::SharedMemory::create):
3165         Call makeMemoryEntry.
3166
3167         (WebKit::SharedMemory::createHandle):
3168         Call createSendRight.
3169
3170         (WebKit::SharedMemory::createSendRight):
3171         Call makeMemoryEntry and add the necessary assertions.
3172
3173 2015-04-15  Eric Carlson  <eric.carlson@apple.com>
3174
3175         Generalize "isPlayingAudio" to include other media characteristics
3176         https://bugs.webkit.org/show_bug.cgi?id=143713
3177
3178         Reviewed by Jer Noble.
3179
3180         * UIProcess/API/C/WKPage.cpp:
3181         (toGenericCallbackFunction): Scope CallbackBase.
3182         (WKPageForceRepaint): Ditto.
3183         (WKPageValidateCommand): Ditto.
3184         (WKPageComputePagesForPrinting): Ditto.
3185
3186         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
3187         (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
3188
3189         * UIProcess/API/mac/WKView.mm:
3190         (-[WKView becomeFirstResponder]): Ditto.
3191         (-[WKView updateFontPanelIfNeeded]): Ditto.
3192         (-[WKView validateUserInterfaceItem:]): Ditto.
3193         (-[WKView startSpeaking:]): Ditto.
3194         (-[WKView selectedRangeWithCompletionHandler:]): Ditto.
3195         (-[WKView markedRangeWithCompletionHandler:]): Ditto.
3196         (-[WKView hasMarkedTextWithCompletionHandler:]): Ditto.
3197         (-[WKView attributedSubstringForProposedRange:completionHandler:]): Ditto.
3198         (-[WKView firstRectForCharacterRange:completionHandler:]): Ditto.
3199         (-[WKView characterIndexForPoint:completionHandler:]): Ditto.
3200
3201         * UIProcess/WebPageProxy.cpp:
3202         (WebKit::WebPageProxy::isPlayingMediaDidChange): Rename from isPlayingAudioDidChange.
3203         (WebKit::WebPageProxy::isPlayingAudioDidChange): Deleted.
3204         * UIProcess/WebPageProxy.h:
3205
3206         * UIProcess/WebPageProxy.messages.in:
3207
3208         * UIProcess/mac/WKFullScreenWindowController.mm:
3209         (-[WKFullScreenWindowController dealloc]): Scope CallbackBase.
3210         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.
3211
3212         * UIProcess/mac/WKPrintingView.mm:
3213         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
3214         (-[WKPrintingView _askPageToComputePageRects]): Ditto.
3215         (-[WKPrintingView _drawPreview:]): Ditto.
3216
3217         * WebProcess/Plugins/PluginView.cpp:
3218         (WebKit::PluginView::setPluginIsPlayingAudio):
3219         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3220         (WebKit::WebChromeClient::isPlayingMediaDidChange):
3221         (WebKit::WebChromeClient::isPlayingAudioDidChange): Deleted.
3222         * WebProcess/WebCoreSupport/WebChromeClient.h:
3223
3224 2015-04-15  Antti Koivisto  <antti@apple.com>
3225
3226         Network Cache: Add thread-safe accessors for storage paths
3227         https://bugs.webkit.org/show_bug.cgi?id=143668
3228
3229         Reviewed by Darin Adler.
3230
3231         Less need to use StringCapture.
3232
3233         * NetworkProcess/cache/NetworkCache.cpp:
3234         (WebKit::NetworkCache::Cache::dumpFilePath):
3235         (WebKit::NetworkCache::Cache::storagePath):
3236         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3237         (WebKit::NetworkCache::makeRecordsDirectoryPath):
3238         (WebKit::NetworkCache::Storage::Storage):
3239         (WebKit::NetworkCache::Storage::basePath):
3240         (WebKit::NetworkCache::Storage::versionPath):
3241         (WebKit::NetworkCache::Storage::recordsPath):
3242         (WebKit::NetworkCache::Storage::synchronize):
3243         (WebKit::NetworkCache::Storage::remove):
3244         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3245         (WebKit::NetworkCache::Storage::finishReadOperation):
3246         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3247         (WebKit::NetworkCache::Storage::traverse):
3248         (WebKit::NetworkCache::Storage::clear):
3249         (WebKit::NetworkCache::Storage::shrink):
3250         (WebKit::NetworkCache::Storage::deleteOldVersions):
3251         (WebKit::NetworkCache::makeRecordDirectoryPath): Deleted.
3252         * NetworkProcess/cache/NetworkCacheStorage.h:
3253         (WebKit::NetworkCache::Storage::baseDirectoryPath): Deleted.
3254         (WebKit::NetworkCache::Storage::directoryPath): Deleted.
3255
3256 2015-04-14  Tim Horton  <timothy_horton@apple.com>
3257
3258         Update gesture swipe shadow style
3259         https://bugs.webkit.org/show_bug.cgi?id=143616
3260         <rdar://problem/19295843>
3261
3262         Reviewed by Darin Adler.
3263
3264         * UIProcess/mac/ViewGestureController.h:
3265         * UIProcess/mac/ViewGestureControllerMac.mm:
3266         (WebKit::ViewGestureController::beginSwipeGesture):
3267         For the modern shadow style, use a layer stretched along the edge of the swiping content
3268         with the newly added PNGs as the layer contents.
3269
3270         Add a dimming layer over the lower layer of content which fades in/out
3271         during the swipe.
3272
3273         (WebKit::ViewGestureController::handleSwipeGesture):
3274         Fade the dimming layer in and out during the entire swipe.
3275         Fade the shadow layer out during the last few pixels of the swipe.
3276
3277         (WebKit::ViewGestureController::removeSwipeSnapshot):
3278         Unparent the new layers.
3279
3280         * WebKit2.xcodeproj/project.pbxproj:
3281         * Resources/SwipeShadow.png:
3282         * Resources/SwipeShadow@2x.png:
3283         Add the new resources.
3284
3285 2015-04-14  Brian Weinstein  <bweinstein@apple.com>
3286
3287         Add SPI to clear HSTS hosts added since a date.
3288         https://bugs.webkit.org/show_bug.cgi?id=143726
3289         and
3290         rdar://problem/16664597
3291
3292         Reviewed by Anders Carlsson.
3293
3294         * UIProcess/API/C/mac/WKContextPrivateMac.h:
3295         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3296         (WKContextResetHSTSHostsAddedAfterDate): Call into the WebProcessPool.
3297         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3298         (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Call CFNetwork SPI to clear HSTS hosts added
3299         after the given date.
3300         * UIProcess/WebProcessPool.h:
3301
3302 2015-04-14  Anders Carlsson  <andersca@apple.com>
3303
3304         More work on making the SharedMemory interface more sane
3305         https://bugs.webkit.org/show_bug.cgi?id=143718
3306
3307         Reviewed by Andreas Kling.
3308
3309         Get rid of m_shouldVMDeallocateData. The idea is that shared memory created by calling
3310         SharedMemory::allocate has a non-null m_data pointer, and a null m_port. Shared memory created
3311         by calling SharedMemory::create with a pointer and a length has a non-null port but a null m_data
3312         since the data can be unmapped by the caller and we don't want to hold on to dangling pointers.
3313
3314         * Platform/SharedMemory.h:
3315         (WebKit::SharedMemory::data):
3316         * Platform/mac/SharedMemoryMac.cpp:
3317         (WebKit::SharedMemory::allocate):
3318         (WebKit::SharedMemory::create):
3319         (WebKit::SharedMemory::map):
3320         (WebKit::SharedMemory::~SharedMemory):
3321         (WebKit::SharedMemory::createHandle):
3322
3323 2015-04-14  Antti Koivisto  <antti@apple.com>
3324
3325         Network Cache: Deduplicate body data
3326         https://bugs.webkit.org/show_bug.cgi?id=143652
3327
3328         Reviewed by Darin Adler.
3329
3330         It is common to have cache entries with identical body data. This happens when the same resource is loaded from
3331         a different URL (https vs http, slash vs no-slash at end, etc.). It also happens when the same URL is
3332         referenced from different cache partitions.
3333
3334         We can improve disk space efficiency and use less memory by sharing identical body data between cache entries.
3335
3336         This patch splits the body data out from the record file. The new record file contains meta data and response
3337         headers only. Body data is stored using the new BlobStorage interface. Files are deduplicated by computing
3338         SHA1 hash over the data and looking for an existing blob with the same hash. If found the existing entry
3339         is reused by creating a hard link to it.
3340
3341         The new disk structure looks like this:
3342
3343         WebKitCache/
3344             Version 3/
3345                 Blobs/
3346                     0A3C9A970ADA27FAE9BD7BC630BAD0B929C293C0
3347                     0A6B8060BA77DF92C82A2FD7AF58F79524D8F34C
3348                     ...
3349                 Records/
3350                     apple.com/
3351                         0B8645B04E7EC78C178B7460052601C2
3352                         0B8645B04E7EC78C178B7460052601C2-body
3353                         0CB1A3638D1C5A09C5E3283A74FA040B
3354                         0CB1A3638D1C5A09C5E3283A74FA040B-body
3355                         ...
3356
3357         Each record file has an associated -body which is a hard link to a file in the Blobs directory.
3358
3359         The patch increases effective capacity by 10-20% with a typical cache. It also saves memory especially when identical
3360         resources are used in multiple tabs.
3361
3362         Currently all >0 sized resources are stored as shared blobs. In future small resources should be integrated into record
3363         files and blobs used for larger files only.
3364
3365         * NetworkProcess/cache/NetworkCache.cpp:
3366         (WebKit::NetworkCache::Cache::store):
3367         (WebKit::NetworkCache::Cache::update):
3368
3369             Adopt the new storage interface.
3370
3371         (WebKit::NetworkCache::Cache::dumpContentsToFile):
3372         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp: Added.
3373         (WebKit::NetworkCache::BlobStorage::BlobStorage):
3374         (WebKit::NetworkCache::BlobStorage::synchronize):
3375
3376             Compute size and delete unused files from the Blobs directory (link count == 1).
3377
3378         (WebKit::NetworkCache::BlobStorage::blobPath):
3379         (WebKit::NetworkCache::BlobStorage::add):
3380         (WebKit::NetworkCache::BlobStorage::get):
3381
3382             Interface for storing and retrieving data blobs. Blobs are deduplicated on add.
3383
3384         (WebKit::NetworkCache::BlobStorage::remove):
3385
3386             Removes the link but doesn't remove the blob even if there are no other clients. That happens on next synchronize().
3387
3388         (WebKit::NetworkCache::BlobStorage::shareCount):
3389
3390             Checks the link count to get the number of clients.
3391
3392         * NetworkProcess/cache/NetworkCacheBlobStorage.h: Added.
3393         (WebKit::NetworkCache::BlobStorage::approximateSize):
3394         * NetworkProcess/cache/NetworkCacheCoders.cpp:
3395         (WebKit::NetworkCache::Coder<SHA1::Digest>::encode):
3396         (WebKit::NetworkCache::Coder<SHA1::Digest>::decode):
3397         * NetworkProcess/cache/NetworkCacheCoders.h:
3398         * NetworkProcess/cache/NetworkCacheData.h:
3399         (WebKit::NetworkCache::Data::isEmpty):
3400         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
3401         (WebKit::NetworkCache::Data::empty):
3402         (WebKit::NetworkCache::Data::fromMap):
3403         (WebKit::NetworkCache::mapFile):
3404         (WebKit::NetworkCache::computeSHA1):
3405         (WebKit::NetworkCache::bytesEqual):
3406
3407             Add some helpers.
3408
3409         * NetworkProcess/cache/NetworkCacheEntry.cpp:
3410         (WebKit::NetworkCache::Entry::asJSON):
3411         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
3412         (WebKit::NetworkCache::IOChannel::IOChannel):
3413         * NetworkProcess/cache/NetworkCacheStorage.cpp:
3414         (WebKit::NetworkCache::makeRecordDirectoryPath):
3415         (WebKit::NetworkCache::makeBlobDirectoryPath):
3416         (WebKit::NetworkCache::Storage::Storage):
3417         (WebKit::NetworkCache::Storage::approximateSize):
3418         (WebKit::NetworkCache::Storage::synchronize):
3419         (WebKit::NetworkCache::partitionPathForKey):
3420         (WebKit::NetworkCache::recordPathForKey):
3421         (WebKit::NetworkCache::bodyPath):
3422         (WebKit::NetworkCache::decodeRecordMetaData):
3423         (WebKit::NetworkCache::decodeRecordHeader):
3424         (WebKit::NetworkCache::createRecord):
3425         (WebKit::NetworkCache::encodeRecordMetaData):
3426         (WebKit::NetworkCache::encodeRecordHeader):
3427         (WebKit::NetworkCache::Storage::remove):
3428         (WebKit::NetworkCache::Storage::updateFileModificationTime):
3429         (WebKit::NetworkCache::Storage::dispatchReadOperation):
3430
3431             Read both the blob and the record entry.
3432
3433         (WebKit::NetworkCache::Storage::finishReadOperation):
3434
3435             Factor to a function.
3436
3437         (WebKit::NetworkCache::Storage::store):
3438         (WebKit::NetworkCache::Storage::traverse):
3439         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
3440         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
3441
3442             We don't need separate full write and header write paths anymore. Everything is treated
3443             as a full write and deduplication stops us writing the body again.
3444
3445             This simplifies the code and data structures.
3446
3447         (WebKit::NetworkCache::Storage::finishWriteOperation):
3448
3449             Factor to a function.
3450
3451         (WebKit::NetworkCache::Storage::clear):
3452         (WebKit::NetworkCache::deletionProbability):
3453
3454             Take the sharing count into account when computing deletion probability.
3455    &nb