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