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