A focused node should not be assisted when handling touch events synchronously
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         A focused node should not be assisted when handling touch events synchronously
4         https://bugs.webkit.org/show_bug.cgi?id=147836
5         <rdar://problem/22204108>
6
7         Reviewed by Enrica Casucci.
8
9         Makes interaction with touch handlers no longer assist the currently focused element in the
10         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
11         so that an input that programmatically focuses itself and prevents default on a touch event will
12         be properly assisted when it has been programmatically focused (either through Javascript or the
13         autofocus attribute) prior to receiving the touch event. This patch also removes the now
14         unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
15         upon autofocus.
16
17         * UIProcess/ios/WKContentViewInteraction.mm:
18         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Removed
19             special case to avoid the early return for Gmail Add Account.
20         * WebProcess/WebCoreSupport/WebChromeClient.h: Added a handler for refocusing an element.
21         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
22         (WebKit::WebChromeClient::elementDidRefocus): Makes refocusing an element trigger input
23             assistance on iOS.
24         * WebProcess/WebPage/WebPage.cpp:
25         (WebKit::WebPage::dispatchTouchEvent): Removes logic to focus the currently focused element upon
26             receiving a touch event.
27
28 2015-08-13  Anders Carlsson  <andersca@apple.com>
29
30         Add WKWindowFeaturesRef and a new modern createNewPage UI client callback
31         https://bugs.webkit.org/show_bug.cgi?id=147989
32
33         Reviewed by Tim Horton.
34
35         * Platform/IPC/mac/ConnectionMac.mm:
36         * Shared/API/APIObject.h:
37         * Shared/API/c/WKBase.h:
38         * UIProcess/API/APIWindowFeatures.cpp: Added.
39         * UIProcess/API/APIWindowFeatures.h: Added.
40         * UIProcess/API/C/WKAPICast.h:
41         * UIProcess/API/C/WKPage.cpp:
42         (WKPageSetPageUIClient):
43         * UIProcess/API/C/WKPageUIClient.h:
44         * UIProcess/API/C/WKWindowFeaturesRef.cpp: Added.
45         (WKWindowFeaturesGetTypeID):
46         * UIProcess/API/C/WKWindowFeaturesRef.h: Added.
47         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
48         (-[WKWindowFeatures dealloc]):
49         (-[WKWindowFeatures menuBarVisibility]):
50         (-[WKWindowFeatures statusBarVisibility]):
51         (-[WKWindowFeatures toolbarsVisibility]):
52         (-[WKWindowFeatures allowsResizing]):
53         (-[WKWindowFeatures x]):
54         (-[WKWindowFeatures y]):
55         (-[WKWindowFeatures width]):
56         (-[WKWindowFeatures height]):
57         (-[WKWindowFeatures _apiObject]):
58         (-[WKWindowFeatures _initWithWindowFeatures:]): Deleted.
59         * UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
60         (WebKit::wrapper):
61         * UIProcess/Cocoa/UIDelegate.mm:
62         (WebKit::UIDelegate::UIClient::createNewPage):
63         * WebKit2.xcodeproj/project.pbxproj:
64
65 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
66
67         FilterOperation.h should not include FilterEffect.h
68         https://bugs.webkit.org/show_bug.cgi?id=147970
69
70         Reviewed by Daniel Bates.
71
72         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
73         so move its include to FilterOperation.cpp.
74         
75         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
76
77         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
78
79 2015-08-12  Anders Carlsson  <andersca@apple.com>
80
81         Use WTF::Optional in WindowFeatures
82         https://bugs.webkit.org/show_bug.cgi?id=147956
83
84         Reviewed by Sam Weinig.
85
86         * Shared/WebCoreArgumentCoders.cpp:
87         (IPC::ArgumentCoder<WindowFeatures>::encode): Deleted.
88         (IPC::ArgumentCoder<WindowFeatures>::decode): Deleted.
89         * UIProcess/API/C/WKPage.cpp:
90         (WKPageSetPageUIClient):
91         * UIProcess/API/Cocoa/WKWindowFeatures.mm:
92         (-[WKWindowFeatures _initWithWindowFeatures:]):
93
94 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
95
96         Linking device query ability from WebKit2 to clients
97         https://bugs.webkit.org/show_bug.cgi?id=147263
98         <rdar://problem/21983345>
99
100         Reviewed by Jer Noble.
101
102         * Platform/mac/LayerHostingContext.mm:
103         (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
104         (WebKit::LayerHostingContext::colorMatchUntaggedContent):
105         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
106         (WKUserMediaPermissionRequestAllow):
107         (WKUserMediaPermissionRequestDeviceNamesVideo):
108         (WKUserMediaPermissionRequestDeviceNamesAudio):
109         * UIProcess/API/C/WKUserMediaPermissionRequest.h:
110         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
111         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
112         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
113         * UIProcess/UserMediaPermissionRequestProxy.cpp:
114         (WebKit::UserMediaPermissionRequestProxy::allow):
115         (WebKit::UserMediaPermissionRequestProxy::deny):
116         * UIProcess/UserMediaPermissionRequestProxy.h:
117         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
118         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
119
120
121 2015-08-12  Alexey Proskuryakov  <ap@apple.com>
122
123         [Mac] WebKit processes should have access to com.apple.nesessionmanager.flow-divert-token
124         https://bugs.webkit.org/show_bug.cgi?id=147949
125         rdar://problem/22254920
126
127         Reviewed by Anders Carlsson.
128
129         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
130         * WebProcess/com.apple.WebProcess.sb.in:
131
132 2015-08-12  Brian Burg  <bburg@apple.com>
133
134         Web Inspector: CRASH under WebInspector::closeFrontend for some protocol tests
135         https://bugs.webkit.org/show_bug.cgi?id=147948
136
137         Reviewed by Joseph Pecoraro.
138
139         * WebProcess/WebPage/WebInspector.cpp:
140         (WebKit::WebInspector::closeFrontend): Don't invalidate the channel if it's null.
141         * WebProcess/WebPage/WebInspector.h: Add default member variable values.
142
143 2015-08-12  Joseph Pecoraro  <pecoraro@apple.com>
144
145         Web Inspector: Not receiving responses for async request IndexedDB.requestDatabaseNames
146         https://bugs.webkit.org/show_bug.cgi?id=147844
147
148         Reviewed by Brian Burg.
149
150         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
151         (WebKit::WebIDBFactoryBackend::getDatabaseNames):
152         This method should not return without calling either the success
153         or error callbacks. In this case, it can succeed with an empty list.
154
155 2015-08-12  Enrica Casucci  <enrica@apple.com>
156
157         Element interaction should not be canceled when the menu is already being shown.
158         https://bugs.webkit.org/show_bug.cgi?id=147945
159         rdar://problem/22206433
160
161         Reviewed by Beth Dakin.
162
163         When preview is canceled by the action menu gesture, we should not stop interacting
164         with the element, since the information about the element is used for the menu actions.
165         We now expose a new method in the action sheet assistant to know if the action sheed is
166         being shown and we use this as an indication that we should not stop the interaction
167         with the element.
168
169         * UIProcess/ios/WKActionSheetAssistant.h:
170         * UIProcess/ios/WKActionSheetAssistant.mm:
171         (-[WKActionSheetAssistant isShowingSheet]): Added.
172         * UIProcess/ios/WKContentViewInteraction.mm:
173         (-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
174         the interaction if the sheet is being shown.
175
176 2015-08-12  Matt Rajca  <mrajca@apple.com>
177
178         Fixed the Release build when MEDIA_SESSION is enabled.
179
180         * UIProcess/API/C/WKPage.cpp:
181         (WKPageHandleMediaEvent):
182
183 2015-08-07  Matt Rajca  <mrajca@apple.com>
184
185         Media Session: notify the UI process when media controls are enabled/disabled
186         https://bugs.webkit.org/show_bug.cgi?id=147802
187
188         Reviewed by Eric Carlson.
189
190         * UIProcess/WebMediaSessionFocusManager.cpp:
191         (WebKit::WebMediaSessionFocusManager::playbackAttributeDidChange): Generalized to take different attributes.
192         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
193         * UIProcess/WebMediaSessionFocusManager.h:
194         * UIProcess/WebPageProxy.cpp:
195         (WebKit::WebPageProxy::isPlayingMediaDidChange): Process new attributes for enabling/disabling media controls.
196
197 2015-08-12  Devin Rousso  <drousso@apple.com>
198
199         Web Inspector: Implement selector highlighting for iOS
200         https://bugs.webkit.org/show_bug.cgi?id=147919
201
202         Reviewed by Timothy Hatcher.
203
204         * UIProcess/WKInspectorHighlightView.mm:
205         (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
206         Added offset parameter to start drawing the highlight at that index of the highlight quad list.
207
208         (-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
209         Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.
210
211         (-[WKInspectorHighlightView update:]):
212         Now uses the light highlighting for both nodes and lists of nodes.
213
214 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
215
216         NetworkProcess: DNS prefetch happens in the Web Process
217         https://bugs.webkit.org/show_bug.cgi?id=147824
218
219         Reviewed by Alexey Proskuryakov.
220
221         DNS prefetch requests started in the WebProcess should be sent to
222         the network process when it's enabled.
223
224         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
225         (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Do the
226         actual DNS prefetch.
227         * NetworkProcess/NetworkConnectionToWebProcess.h:
228         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
229         PrefetchDNS message.
230         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
231         (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
232         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
233         (WebKit::WebFrameLoaderClient::prefetchDNS): Ditto.
234         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
235         * WebProcess/WebPage/ios/WebPageIOS.mm:
236         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
237         FrameLoaderClient to do the DNS prefetch.
238         * WebProcess/WebProcess.cpp:
239         (WebKit::WebProcess::prefetchDNS): Send the request to the network
240         process if it's enabled, otherwise do the actual DNS prefetch.
241         * WebProcess/WebProcess.h:
242
243 2015-08-11  Hunseop Jeong  <hs85.jeong@samsung.com>
244
245         Try to fix the EFL build after r188279
246         https://bugs.webkit.org/show_bug.cgi?id=147917
247
248         Reviewed by Gyuyoung Kim.
249
250         Replaced the WKPageLoaderClient with variable name because it is removed in r188279.
251
252         * UIProcess/efl/PageLoadClientEfl.cpp:
253         (WebKit::PageLoadClientEfl::PageLoadClientEfl):
254         * UIProcess/efl/PagePolicyClientEfl.cpp:
255         (WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
256
257 2015-08-11  Andy Estes  <aestes@apple.com>
258
259         Tried again to fix the iOS build.
260
261         * UIProcess/ios/WKGeolocationProviderIOS.mm:
262         (-[WKGeolocationProviderIOS initWithProcessPool:]):
263
264 2015-08-11  Dan Bernstein  <mitz@apple.com>
265
266         Tried to fix the iOS build.
267
268         * UIProcess/ios/WKGeolocationProviderIOS.mm:
269         (-[WKGeolocationProviderIOS initWithProcessPool:]):
270
271 2015-08-11  Andy Estes  <aestes@apple.com>
272
273         WebFrameLoaderClient::dispatchDecidePolicyForResponse() calls an std::function after it's been moved from
274         https://bugs.webkit.org/show_bug.cgi?id=147873
275
276         Reviewed by Alexey Proskuryakov.
277         
278         I noticed during code inspection that we were calling an std::function after WTF::move() has been called on it.
279         Calling an empty std::function results in a C++ exception being thrown. I don't know how to make a sync IPC
280         message fail, so I'm not sure how to test this.
281
282         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
283         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Called didReceivePolicyDecision instead.
284
285 2015-08-11  Beth Dakin  <bdakin@apple.com>
286
287         REGRESSION (r188053): Sometimes unable to save an image from Google Search/
288         imgur via long press
289         https://bugs.webkit.org/show_bug.cgi?id=147896
290
291         Reviewed by Enrica Casucci.
292
293         http://trac.webkit.org/changeset/188053 added code to call cleanupSheet when 
294         the long press gesture is cancelled. However, the gesture will be called with 
295         the cancelled state when then user taps an item in the action sheet (such as 
296         “save image”), and sometimes the “cancel” comes in before the image has been 
297         saved. That is a problem because we need to avoid cleaning up the sheet until 
298         after the image is saved. Before that patch, we never cleaned up the sheet on 
299         cancel, so this patch goes back to that behavior. We also have to remove some 
300         assertions that assume that everything will be totally cleaned up when a new 
301         sheet is created, but that is not necessarily true due to interactions 
302         between the preview gesture and the long press gesture. 
303
304         Remove assertions.
305         * UIProcess/ios/WKActionSheetAssistant.mm:
306         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
307         (-[WKActionSheetAssistant showImageSheet]):
308         (-[WKActionSheetAssistant showLinkSheet]):
309         (-[WKActionSheetAssistant showDataDetectorsSheet]):
310
311         Revert the part of Enrica’s patch that called cleanupSheet when the gesture 
312         is cancelled.
313         * UIProcess/ios/WKContentViewInteraction.mm:
314         (-[WKContentView _longPressRecognized:]):
315
316 2015-08-11  Anders Carlsson  <andersca@apple.com>
317
318         Remove unversioned client structs from the C SPI
319         https://bugs.webkit.org/show_bug.cgi?id=147894
320
321         Reviewed by Dan Bernstein.
322
323         * Shared/API/c/WKConnectionRef.h:
324         * UIProcess/API/C/WKContext.h:
325         * UIProcess/API/C/WKContextConnectionClient.h:
326         * UIProcess/API/C/WKContextDownloadClient.h:
327         * UIProcess/API/C/WKContextHistoryClient.h:
328         * UIProcess/API/C/WKContextInjectedBundleClient.h:
329         * UIProcess/API/C/WKCookieManager.h:
330         * UIProcess/API/C/WKDatabaseManager.h:
331         * UIProcess/API/C/WKGeolocationManager.h:
332         * UIProcess/API/C/WKIconDatabase.h:
333         * UIProcess/API/C/WKNotificationProvider.h:
334         * UIProcess/API/C/WKPageContextMenuClient.h:
335         * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
336         * UIProcess/API/C/WKPageFindClient.h:
337         * UIProcess/API/C/WKPageFindMatchesClient.h:
338         * UIProcess/API/C/WKPageFormClient.h:
339         * UIProcess/API/C/WKPageLoaderClient.h:
340         * UIProcess/API/C/WKPagePolicyClient.h:
341         * UIProcess/API/C/WKPageUIClient.h:
342         * WebProcess/InjectedBundle/API/c/WKBundle.h:
343         * WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
344         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
345         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
346         * WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
347         * WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
348         * WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
349         * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
350         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
351         * WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
352         * WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
353         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
354
355 2015-08-11  Dan Bernstein  <mitz@apple.com>
356
357         Reverted r188255, because it turned out that delegates do nonot need this information.
358
359         * UIProcess/API/APIUIClient.h:
360         (API::UIClient::footerHeight):
361         (API::UIClient::drawHeader):
362         (API::UIClient::drawFooter):
363         (API::UIClient::printFrame):
364         (API::UIClient::canRunModal):
365         (API::UIClient::runModal):
366         * UIProcess/API/C/WKPage.cpp:
367         (WKPageSetPageUIClient):
368         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
369         * UIProcess/Cocoa/UIDelegate.h:
370         * UIProcess/Cocoa/UIDelegate.mm:
371         (WebKit::UIDelegate::UIDelegate):
372         (WebKit::UIDelegate::setDelegate):
373         (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
374         (WebKit::UIDelegate::UIClient::printFrame):
375         (WebKit::UIDelegate::UIClient::close):
376         * UIProcess/WebPageProxy.cpp:
377         (WebKit::WebPageProxy::runOpenPanel):
378         (WebKit::WebPageProxy::printFrame):
379         (WebKit::WebPageProxy::printMainFrame):
380         (WebKit::WebPageProxy::setMediaVolume):
381         * UIProcess/WebPageProxy.h:
382         (WebKit::WebPageProxy::setShouldSendEventsSynchronously):
383         * UIProcess/WebPageProxy.messages.in:
384         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
385         (WebKit::WebChromeClient::print):
386         (WebKit::WebChromeClient::exceededDatabaseQuota):
387
388 2015-08-11  Dan Bernstein  <mitz@apple.com>
389
390         [Cocoa] The UI delegate can't tell if printing was user-initiated
391         https://bugs.webkit.org/show_bug.cgi?id=147869
392
393         Reviewed by Sam Weinig.
394
395         * UIProcess/API/APIUIClient.h:
396         (API::UIClient::printFrame): Added processingUserGesture argument.
397
398         * UIProcess/API/C/WKPage.cpp:
399         (WKPageSetPageUIClient): Updated for new client function signature.
400
401         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added userInitiated boolean argument to
402           -_webView:printFrame:.
403
404         * UIProcess/Cocoa/UIDelegate.h: Added bool to m_delegateMethods for the new method.
405         * UIProcess/Cocoa/UIDelegate.mm:
406         (WebKit::UIDelegate::UIDelegate):
407         (WebKit::UIDelegate::setDelegate): Initialized new bool.
408         (WebKit::UIDelegate::UIClient::printFrame): Pass processingUserGesture as the delegate’s
409           userInitiated argument.
410
411         * UIProcess/WebPageProxy.cpp:
412         (WebKit::WebPageProxy::printFrame): Added processingUserGesture argument, passing it along
413           to the client.
414         * UIProcess/WebPageProxy.h:
415
416         * UIProcess/WebPageProxy.messages.in: Added processingUserGesture argument to printFrame.
417
418         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
419         (WebKit::WebChromeClient::print): Pass new argument.
420
421 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
422
423         Add MediaDeviceIdentifier to WebsiteDataTypes
424         https://bugs.webkit.org/show_bug.cgi?id=147853
425
426         Reviewed by Jer Noble.
427
428         * Shared/WebsiteData/WebsiteDataTypes.h:
429
430 2015-08-10  Sam Weinig  <sam@webkit.org>
431
432         Try to fix the 32-bit build.
433
434         * UIProcess/API/mac/WKViewInternal.h:
435
436 2015-08-08  Sam Weinig  <sam@webkit.org>
437
438         Replace WebPageConfiguration with API::PageConfiguration and expose a C-SPI accessor for it
439         https://bugs.webkit.org/show_bug.cgi?id=147811
440
441         Reviewed by Darin Adler.
442
443         - Adds the missing pieces from WebPageConfiguration into API::PageConfiguration.
444         - Adds C-SPI to set and get the WebsiteDataStore on the WKPageConfigurationRef.
445         - Uses API::PageConfiguration to pass configuration information from WKWebView/WKView 
446           to WebPageProxy.
447         - Stores the API::PageConfiguration on the WebPageProxy and exposes a new C-SPI function,
448           WKPageCopyPageConfiguration, to get a copy of it.
449
450         * UIProcess/API/APIPageConfiguration.cpp:
451         (API::PageConfiguration::create):
452         (API::PageConfiguration::PageConfiguration):
453         (API::PageConfiguration::~PageConfiguration):
454         (API::PageConfiguration::copy):
455         (API::PageConfiguration::processPool):
456         (API::PageConfiguration::setRelatedPage):
457         (API::PageConfiguration::visitedLinkProvider):
458         (API::PageConfiguration::setVisitedLinkProvider):
459         (API::PageConfiguration::websiteDataStore):
460         (API::PageConfiguration::setWebsiteDataStore):
461         (API::PageConfiguration::sessionID):
462         (API::PageConfiguration::setSessionID):
463         (API::PageConfiguration::webPageConfiguration): Deleted.
464         * UIProcess/API/APIPageConfiguration.h:
465         (API::PageConfiguration::preferenceValues):
466         (API::PageConfiguration::treatsSHA1SignedCertificatesAsInsecure):
467         (API::PageConfiguration::setTreatsSHA1SignedCertificatesAsInsecure):
468         (API::PageConfiguration::alwaysRunsAtForegroundPriority):
469         (API::PageConfiguration::setAlwaysRunsAtForegroundPriority):
470         (API::PageConfiguration::create): Deleted.
471         * UIProcess/API/C/WKPage.cpp:
472         (WKPageGetPageGroup):
473         (WKPageCopyPageConfiguration):
474         (WKPageLoadURL):
475         * UIProcess/API/C/WKPage.h:
476         * UIProcess/API/C/WKPageConfigurationRef.cpp:
477         (WKPageConfigurationSetRelatedPage):
478         (WKPageConfigurationGetWebsiteDataStore):
479         (WKPageConfigurationSetWebsiteDataStore):
480         * UIProcess/API/C/WKPageConfigurationRef.h:
481         * UIProcess/API/Cocoa/WKWebView.mm:
482         (-[WKWebView initWithFrame:configuration:]):
483         * UIProcess/API/ios/WKViewIOS.mm:
484         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
485         * UIProcess/API/mac/WKView.mm:
486         (-[WKView _setPrimaryTrackingArea:]):
487         (-[WKView initWithFrame:processPool:configuration:webView:]):
488         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
489         (-[WKView initWithFrame:configurationRef:]):
490         (-[WKView wantsUpdateLayer]):
491         * UIProcess/API/mac/WKViewInternal.h:
492         * UIProcess/WebPageProxy.cpp:
493         (WebKit::WebPageProxy::create):
494         (WebKit::WebPageProxy::WebPageProxy):
495         (WebKit::WebPageProxy::~WebPageProxy):
496         (WebKit::WebPageProxy::configuration):
497         (WebKit::WebPageProxy::processIdentifier):
498         * UIProcess/WebPageProxy.h:
499         (WebKit::WebPageProxy::pageID):
500         (WebKit::WebPageProxy::sessionID):
501         * UIProcess/WebProcessPool.cpp:
502         (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
503         (WebKit::WebProcessPool::createWebPage):
504         (WebKit::WebProcessPool::download):
505         * UIProcess/WebProcessPool.h:
506         * UIProcess/WebProcessProxy.cpp:
507         (WebKit::WebProcessProxy::webPage):
508         (WebKit::WebProcessProxy::createWebPage):
509         * UIProcess/WebProcessProxy.h:
510         (WebKit::WebProcessProxy::processPool):
511         * UIProcess/ios/WKContentView.h:
512         * UIProcess/ios/WKContentView.mm:
513         (-[WKContentView _commonInitializationWithProcessPool:configuration:]):
514         (-[WKContentView initWithFrame:processPool:configuration:webView:]):
515         (-[WKContentView initWithFrame:processPool:configuration:wkView:]):
516         (-[WKContentView dealloc]):
517
518 2015-08-10  Commit Queue  <commit-queue@webkit.org>
519
520         Unreviewed, rolling out r187131 and r187286.
521         https://bugs.webkit.org/show_bug.cgi?id=147839
522
523          Causing mroe frequent crashes with invalid layer bounds
524         (rdar://problem/21465328) (Requested by smfr on #webkit).
525
526         Reverted changesets:
527
528         "[iOS] Menu drop down such as on nike.com does not stay"
529         https://bugs.webkit.org/show_bug.cgi?id=147047
530         http://trac.webkit.org/changeset/187131
531
532         "[iOS] REGRESSION (187131): Loading CuteOverload zooms in to
533         the top left corner."
534         https://bugs.webkit.org/show_bug.cgi?id=147251
535         http://trac.webkit.org/changeset/187286
536
537 2015-08-07  Matt Rajca  <mrajca@apple.com>
538
539         Media Session: generalize isFocusedContentMediaElementPlaying so it works with other playback attributes
540         https://bugs.webkit.org/show_bug.cgi?id=147797
541
542         Reviewed by Simon Fraser.
543
544         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
545         (WKMediaSessionFocusManagerValueForPlaybackAttribute):
546         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Deleted.
547         * UIProcess/API/C/WKMediaSessionFocusManager.h:
548         * UIProcess/WebMediaSessionFocusManager.cpp:
549         (WebKit::WebMediaSessionFocusManager::valueForPlaybackAttribute):
550         (WebKit::WebMediaSessionFocusManager::mediaControlIsEnabledDidChange):
551         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Deleted.
552         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Deleted.
553         * UIProcess/WebMediaSessionFocusManager.h:
554
555 2015-08-10  Zan Dobersek  <zdobersek@igalia.com>
556
557         [CoordinatedGraphics] Fix forward declarations of CoordinatedGraphicsLayerState, ViewportAttributes
558         https://bugs.webkit.org/show_bug.cgi?id=147823
559
560         Reviewed by Carlos Garcia Campos.
561
562         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
563         * WebProcess/WebPage/LayerTreeHost.h:
564
565 2015-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
566
567         [GTK] Crash when the web view is destroyed while the screensaver DBUs proxy is being created
568         https://bugs.webkit.org/show_bug.cgi?id=147780
569
570         Reviewed by Sergio Villar Senin.
571
572         We should cancel the screenSaverInhibitCancellable on
573         dispose. Also use adoptGRef() when creating the cancellable object
574         to not leak it.
575
576         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
577         (webkitWebViewBaseDispose):
578         (webkitWebViewBaseSendInhibitMessageToScreenSaver):
579         (webkitWebViewBaseInhibitScreenSaver):
580
581 2015-08-09  Chris Dumez  <cdumez@apple.com>
582
583         Follow-up nit fixes after r187691.
584         https://bugs.webkit.org/show_bug.cgi?id=128006
585
586         Reviewed by Gavin Barraclough.
587
588         Use modern for-loops instead of explicit iterators.
589
590         * Shared/Authentication/AuthenticationManager.cpp:
591         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
592         (WebKit::AuthenticationManager::coalesceChallengesMatching):
593
594 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
595
596         Lightweight locks should be adaptive
597         https://bugs.webkit.org/show_bug.cgi?id=147545
598
599         Reviewed by Geoffrey Garen.
600
601         * WebProcess/WebPage/EventDispatcher.cpp:
602         (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
603         (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
604         (WebKit::EventDispatcher::touchEvent):
605         (WebKit::EventDispatcher::dispatchTouchEvents):
606         * WebProcess/WebPage/EventDispatcher.h:
607         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
608         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
609         (WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
610         * WebProcess/WebPage/ViewUpdateDispatcher.h:
611
612 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
613
614         Temporarily allow programmatic input assistance for adding Gmail account
615         https://bugs.webkit.org/show_bug.cgi?id=147792
616
617         Reviewed by Enrica Casucci.
618         <rdar://problem/22126518>
619
620         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
621         in the Gmail 2-factor authentication page.
622
623         * UIProcess/ios/WKContentViewInteraction.mm:
624         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): Early
625             return no longer triggers due to lack of user interaction when adding a new Gmail account
626             through Settings.
627
628 2015-08-07  Brady Eidson  <beidson@apple.com>
629
630         Move concrete KeyedDecoder/Encoder implementations to WebCore.
631         https://bugs.webkit.org/show_bug.cgi?id=147757.
632
633         Rubberstamped by Andy Estes.
634
635         * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
636         (WebKit::serializeIDBKeyPath):
637         (WebKit::deserializeIDBKeyPath):
638         (WebKit::serializeIDBKeyData):
639         (WebKit::deserializeIDBKeyData):
640         
641         * PlatformEfl.cmake:
642         * PlatformGTK.cmake:
643         * WebKit2.xcodeproj/project.pbxproj:
644
645 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
646
647         Unreviewed. Fix GTK+ compile warning also introduced in r188121.
648
649         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
650         (webkit_install_missing_media_plugins_permission_request_get_description):
651
652 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
653
654         Unreviewed. Fix GTK+ debug build after r188121.
655
656         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
657         (webkit_install_missing_media_plugins_permission_request_get_description):
658
659 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
660
661         [GStreamer] Do not automatically show PackageKit codec installation notifications
662         https://bugs.webkit.org/show_bug.cgi?id=135973
663
664         Reviewed by Philippe Normand.
665
666         Add InstallMissingMediaPluginsPermissionRequest to ask the API
667         layer whether to allow or deny the installation of missing media
668         plugins. And add a GTK+ implementation based on current permission
669         request API. Replace the
670         PageClientImpl::createGstInstallPluginsContext() with
671         decicePolicyForInstallMissingMediaPluginsPermissionRequest() that
672         passes the InstallMissingMediaPluginsPermissionRequest object to
673         the API layer. The allow method receives the
674         GstInstallPluginsContext now, so that it can be created by the API implementation.
675
676         * PlatformEfl.cmake:
677         * PlatformGTK.cmake:
678         * UIProcess/API/gtk/PageClientImpl.cpp:
679         (WebKit::PageClientImpl::decicePolicyForInstallMissingMediaPluginsPermissionRequest):
680         * UIProcess/API/gtk/PageClientImpl.h:
681         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: Added.
682         (createGstInstallPluginsContext):
683         (webkitInstallMissingMediaPluginsPermissionRequestAllow):
684         (webkitInstallMissingMediaPluginsPermissionRequestDeny):
685         (webkit_permission_request_interface_init):
686         (webkitInstallMissingMediaPluginsPermissionRequestDispose):
687         (webkit_install_missing_media_plugins_permission_request_class_init):
688         (webkitInstallMissingMediaPluginsPermissionRequestCreate):
689         (webkit_install_missing_media_plugins_permission_request_get_description):
690         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
691         * UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: Added.
692         * UIProcess/API/gtk/WebKitWebView.cpp:
693         (webkitWebViewRequestInstallMissingMediaPlugins):
694         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
695         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
696         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
697         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
698         * UIProcess/API/gtk/webkit2.h:
699         * UIProcess/PageClient.h:
700         * UIProcess/WebPageProxy.h:
701         * UIProcess/WebPageProxy.messages.in:
702         * UIProcess/efl/WebViewEfl.h:
703         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp: Copied from Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp.
704         (WebKit::InstallMissingMediaPluginsPermissionRequest::InstallMissingMediaPluginsPermissionRequest):
705         (WebKit::InstallMissingMediaPluginsPermissionRequest::~InstallMissingMediaPluginsPermissionRequest):
706         (WebKit::InstallMissingMediaPluginsPermissionRequest::allow):
707         (WebKit::InstallMissingMediaPluginsPermissionRequest::deny):
708         (WebKit::InstallMissingMediaPluginsPermissionRequest::didEndRequestInstallMissingMediaPlugins):
709         * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h: Copied from Source/WebKit2/WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp.
710         (WebKit::InstallMissingMediaPluginsPermissionRequest::create):
711         (WebKit::InstallMissingMediaPluginsPermissionRequest::page):
712         (WebKit::InstallMissingMediaPluginsPermissionRequest::details):
713         (WebKit::InstallMissingMediaPluginsPermissionRequest::description):
714         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
715         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
716         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
717         (WebKit::WebChromeClient::requestInstallMissingMediaPlugins):
718         * WebProcess/WebCoreSupport/WebChromeClient.h:
719         * WebProcess/WebPage/WebPage.h:
720         * WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp:
721         (WebKit::WebPage::requestInstallMissingMediaPlugins):
722
723 2015-08-06  Beth Dakin  <bdakin@apple.com>
724
725         TextIndicator can have stale contentImage data and crash
726         https://bugs.webkit.org/show_bug.cgi?id=147770
727         -and corresponding-
728         rdar://problem/22181735
729
730         Reviewed by Tim Horton.
731
732         If there is no contentImage or contentImageWithHighlight, set them to 
733         nullptr.
734         * Shared/WebCoreArgumentCoders.cpp:
735         (IPC::ArgumentCoder<TextIndicatorData>::decode):
736
737 2015-08-06  Dan Bernstein  <mitz@apple.com>
738
739         Fixed all the builds after trying to fix the non-HAVE(LINK_PREVIEW) build.
740
741         * UIProcess/ios/WKContentViewInteraction.mm:
742
743 2015-08-06  Dan Bernstein  <mitz@apple.com>
744
745         Fixed the non-HAVE(LINK_PREVIEW) build.
746
747         * UIProcess/ios/WKContentViewInteraction.mm:
748
749 2015-08-06  Enrica Casucci  <enrica@apple.com>
750
751         Cleanup action sheet only when long press is canceled (non ended).
752         https://bugs.webkit.org/show_bug.cgi?id=147766
753         rdar://problem/22181842
754
755         Reviewed by Tim Horton.
756
757         * UIProcess/ios/WKContentViewInteraction.mm:
758         (-[WKContentView _longPressRecognized:]):
759
760 2015-08-06  Matt Rajca  <mrajca@apple.com>
761
762         Media Session: notify focus manager clients when the playing state of the focused media element changes
763         https://bugs.webkit.org/show_bug.cgi?id=147745
764
765         Reviewed by Tim Horton.
766
767         Added plumbing to allow focus manager's clients to be notified when the focused Content media element begins
768         playing or is paused.
769
770         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
771         (WKMediaSessionFocusManagerSetClient):
772         * UIProcess/API/C/WKMediaSessionFocusManager.h:
773         * UIProcess/WebMediaSessionFocusManager.cpp:
774         (WebKit::WebMediaSessionFocusManager::initializeClient):
775         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange):
776         * UIProcess/WebMediaSessionFocusManager.h:
777         * UIProcess/WebMediaSessionFocusManagerClient.cpp:
778         (WebKit::WebMediaSessionFocusManagerClient::didChangePlaybackAttribute):
779         * UIProcess/WebMediaSessionFocusManagerClient.h:
780         * WebKit2.xcodeproj/project.pbxproj:
781
782 2015-08-06  Alex Christensen  <achristensen@webkit.org>
783
784         Make CMake usable on Mac.
785         https://bugs.webkit.org/show_bug.cgi?id=147756
786
787         Reviewed by Tim Horton.
788
789         * PlatformMac.cmake:
790         DatabaseProcess_SOURCES needs something in order to not have errors when generating build systems from CMake.
791         This doesn't fix everything, but it can now be used to build jsc again.
792
793 2015-08-06  Enrica Casucci  <enrica@apple.com>
794
795         Build fix for iOS after http://trac.webkit.org/changeset/188053.
796
797         Unreviewed.
798
799         * UIProcess/ios/WKContentViewInteraction.mm:
800         (-[WKContentView _registerPreview]):
801
802 2015-08-06  Enrica Casucci  <enrica@apple.com>
803
804         Allow long press to cancel link preview.
805         https://bugs.webkit.org/show_bug.cgi?id=147743
806         rdar://problem/22128839
807
808         Reviewed by Tim Horton.
809
810         We should be able to show the context menu at the beginnig of link preview.
811
812         * UIProcess/ios/WKContentViewInteraction.h:
813         * UIProcess/ios/WKContentViewInteraction.mm:
814         (-[WKContentView _removeDefaultGestureRecognizers]):
815         (-[WKContentView _addDefaultGestureRecognizers]):
816         (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
817         (-[WKContentView _longPressRecognized:]):
818         (-[WKContentView _singleTapRecognized:]):
819         (-[WKContentView _registerPreview]):
820         (-[WKContentView _unregisterPreview]):
821
822 2015-08-06  Matt Rajca  <mrajca@apple.com>
823
824         Media Session: rename isFocusedContentMediaElementPaused and get rid of callback
825         https://bugs.webkit.org/show_bug.cgi?id=147726
826
827         Reviewed by Simon Fraser.
828
829         - isFocusedContentMediaElementPaused should be renamed to isFocusedContentMediaElementPlaying to match recent
830           refactoring work.
831         - isFocusedContentMediaElementPlaying itself does not need a callback anymore because the value can be returned
832           directly.
833
834         * UIProcess/API/C/WKMediaSessionFocusManager.cpp:
835         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPlaying): Removed callback and renamed from...
836         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPaused): Deleted.
837         * UIProcess/API/C/WKMediaSessionFocusManager.h:
838         * UIProcess/WebMediaSessionFocusManager.cpp:
839         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPlaying): Removed callback and renamed from...
840         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Deleted.
841         * UIProcess/WebMediaSessionFocusManager.h:
842
843 2015-08-06  Csaba Osztrogonác  <ossy@webkit.org>
844
845         [EFL] Bump EFL version to 1.15.0
846         https://bugs.webkit.org/show_bug.cgi?id=147450
847
848         Reviewed by Gyuyoung Kim.
849
850         * PlatformEfl.cmake:
851
852 2015-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
853
854         [GTK] Crash closing a page when a context menu is open
855         https://bugs.webkit.org/show_bug.cgi?id=147682
856
857         Reviewed by Sergio Villar Senin.
858
859         Implement WebContextMenuProxy::cancelTracking() to clear the
860         internal menu when the web page is closed.
861
862         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
863         (WebKit::WebContextMenuProxyGtk::cancelTracking):
864         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Deleted.
865         * UIProcess/gtk/WebContextMenuProxyGtk.h:
866
867 2015-08-04  Matt Rajca  <mrajca@apple.com>
868
869         Media Session: push paused state to the media session focus manager instead of polling
870         https://bugs.webkit.org/show_bug.cgi?id=147633
871
872         Reviewed by Simon Fraser.
873
874         * UIProcess/WebMediaSessionFocusManager.cpp:
875         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Report whether the focused media
876          element is currently playing. The callback is no longer necessary and will be removed in a future patch in
877          favor of returning a value directly.
878         (WebKit::WebMediaSessionFocusManager::mediaElementIsPlayingDidChange): Keep track of whether the focused media
879          element is currently playing.
880         * UIProcess/WebMediaSessionFocusManager.h:
881         * UIProcess/WebPageProxy.cpp:
882         (WebKit::WebPageProxy::isPlayingMediaDidChange): If the focused media element begins/ends playing, keep track
883          of its playing state.
884         (WebKit::WebPageProxy::isMediaElementPaused): Deleted. We now push media playback state changes instead of
885          polling.
886         * UIProcess/WebPageProxy.h: isPlayingMediaDidChange is now passed the ID of the media element that triggered
887          the 'playing' state change. This can be used in conjunction with the IsSourcePlaying media flag to identify
888          whether the source element begin/ended playing.
889         * UIProcess/WebPageProxy.messages.in: Ditto.
890         * WebProcess/Plugins/PluginView.cpp:
891         (WebKit::PluginView::setPluginIsPlayingAudio): Since a media element did not trigger this, pass in 0 for the
892          source media element.
893         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
894         (WebKit::WebChromeClient::isPlayingMediaDidChange): isPlayingMediaDidChange is now passed the ID of the media
895          element that triggered the 'playing' state change.
896         * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
897         * WebProcess/WebPage/WebPage.cpp:
898         (WebKit::WebPage::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
899         * WebProcess/WebPage/WebPage.h: Ditto.
900         * WebProcess/WebPage/WebPage.messages.in: Ditto.
901
902 2015-08-05  Tim Horton  <timothy_horton@apple.com>
903
904         PDFPlugins are clipped in link previews (and remain so when opened)
905         https://bugs.webkit.org/show_bug.cgi?id=147708
906         <rdar://problem/22055130>
907
908         Reviewed by Simon Fraser.
909
910         * UIProcess/API/mac/WKView.mm:
911         (-[WKView initWithFrame:processPool:configuration:webView:]):
912         (-[WKView _supportsArbitraryLayoutModes]):
913         (-[WKView _didCommitLoadForMainFrame]):
914         (-[WKView _setLayoutMode:]):
915         (-[WKView _setViewScale:]):
916         Avoid using any layout mode other than "ViewSize" for main frame PluginDocuments,
917         because they will often end up behaving incorrectly (especially with PDFPlugin,
918         which is even more special in that it takes over application of page scale).
919
920         Save any incoming changes to the viewScale and layoutMode, and re-apply
921         them once we load something in the main frame that is *not* a PluginDocument.
922
923         * UIProcess/API/mac/WKViewInternal.h:
924         * WebProcess/WebPage/WebPage.cpp:
925         (WebKit::WebPage::scalePage):
926         Make sure to reset WebCore's page scale if the main frame contains a 
927         PluginDocument that takes care of page scale itself.
928
929         (WebKit::WebPage::didCommitLoad):
930         Do the same thing as what we do in WKView _didCommitLoadForMainFrame,
931         but without the UI process round-trip, to avoid an ugly flash.
932
933         * UIProcess/WebFrameProxy.cpp:
934         (WebKit::WebFrameProxy::didCommitLoad):
935         * UIProcess/WebFrameProxy.h:
936         (WebKit::WebFrameProxy::containsPluginDocument):
937         * UIProcess/WebPageProxy.cpp:
938         (WebKit::WebPageProxy::didCommitLoadForFrame):
939         * UIProcess/WebPageProxy.h:
940         * UIProcess/WebPageProxy.messages.in:
941         * UIProcess/mac/PageClientImpl.mm:
942         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
943         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
944         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
945         Plumb and keep track of whether the main frame contains a PluginDocument or not.
946
947 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
948
949         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
950
951         * DatabaseProcess/DatabaseProcess.cpp:
952         (WebKit::DatabaseProcess::postDatabaseTask):
953         (WebKit::DatabaseProcess::performNextDatabaseTask):
954         * DatabaseProcess/DatabaseProcess.h:
955         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
956         (WebKit::UniqueIDBDatabase::shutdown):
957         (WebKit::UniqueIDBDatabase::postMainThreadTask):
958         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
959         (WebKit::UniqueIDBDatabase::postDatabaseTask):
960         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
961         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
962         * Platform/IPC/Connection.cpp:
963         (IPC::Connection::sendSyncMessage):
964         (IPC::Connection::sendSyncMessageFromSecondaryThread):
965         (IPC::Connection::waitForSyncReply):
966         (IPC::Connection::processIncomingSyncReply):
967         (IPC::Connection::connectionDidClose):
968         * Platform/IPC/Connection.h:
969         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
970         (WebKit::CoordinatedGraphicsScene::appendUpdate):
971         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
972         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
973         (WebKit::ThreadedCompositor::createCompositingThread):
974         (WebKit::ThreadedCompositor::runCompositingThread):
975         (WebKit::ThreadedCompositor::terminateCompositingThread):
976         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
977         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
978         (WebKit::CustomProtocolManager::addCustomProtocol):
979         (WebKit::CustomProtocolManager::removeCustomProtocol):
980         (WebKit::CustomProtocolManager::registerScheme):
981         (WebKit::CustomProtocolManager::unregisterScheme):
982         (WebKit::CustomProtocolManager::supportsScheme):
983         (WebKit::CustomProtocolManager::protocolForID):
984         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
985         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
986         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
987         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
988         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
989         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
990         * WebProcess/Plugins/PluginProcessConnectionManager.h:
991         * WebProcess/WebPage/EventDispatcher.cpp:
992         (WebKit::EventDispatcher::addScrollingTreeForPage):
993         (WebKit::EventDispatcher::removeScrollingTreeForPage):
994         (WebKit::EventDispatcher::wheelEvent):
995         * WebProcess/WebPage/EventDispatcher.h:
996         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
997         (webkitSoupRequestInputStreamReadAsync):
998         (webkitSoupRequestInputStreamAddData):
999
1000 2015-08-05  Ryosuke Niwa  <rniwa@webkit.org>
1001
1002         WebInspectorProxy should make WKWebView first responder
1003         https://bugs.webkit.org/show_bug.cgi?id=147676
1004
1005         Reviewed by Timothy Hatcher.
1006
1007         Revert r181927 now that WKWebView forwards the first responder role to WKView as needed.
1008
1009         * UIProcess/mac/WebInspectorProxyMac.mm:
1010         (WebKit::WebInspectorProxy::platformBringToFront):
1011         (WebKit::WebInspectorProxy::platformAttach):
1012
1013 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
1014
1015         Rename Mutex to DeprecatedMutex
1016         https://bugs.webkit.org/show_bug.cgi?id=147675
1017
1018         Reviewed by Geoffrey Garen.
1019
1020         * DatabaseProcess/DatabaseProcess.cpp:
1021         (WebKit::DatabaseProcess::postDatabaseTask):
1022         (WebKit::DatabaseProcess::performNextDatabaseTask):
1023         * DatabaseProcess/DatabaseProcess.h:
1024         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1025         (WebKit::UniqueIDBDatabase::shutdown):
1026         (WebKit::UniqueIDBDatabase::postMainThreadTask):
1027         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
1028         (WebKit::UniqueIDBDatabase::postDatabaseTask):
1029         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
1030         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1031         * Platform/IPC/Connection.cpp:
1032         (IPC::Connection::sendSyncMessage):
1033         (IPC::Connection::sendSyncMessageFromSecondaryThread):
1034         (IPC::Connection::waitForSyncReply):
1035         (IPC::Connection::processIncomingSyncReply):
1036         (IPC::Connection::connectionDidClose):
1037         * Platform/IPC/Connection.h:
1038         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1039         (WebKit::CoordinatedGraphicsScene::appendUpdate):
1040         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1041         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
1042         (WebKit::ThreadedCompositor::createCompositingThread):
1043         (WebKit::ThreadedCompositor::runCompositingThread):
1044         (WebKit::ThreadedCompositor::terminateCompositingThread):
1045         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
1046         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1047         (WebKit::CustomProtocolManager::addCustomProtocol):
1048         (WebKit::CustomProtocolManager::removeCustomProtocol):
1049         (WebKit::CustomProtocolManager::registerScheme):
1050         (WebKit::CustomProtocolManager::unregisterScheme):
1051         (WebKit::CustomProtocolManager::supportsScheme):
1052         (WebKit::CustomProtocolManager::protocolForID):
1053         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1054         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1055         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1056         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1057         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
1058         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
1059         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1060         * WebProcess/WebPage/EventDispatcher.cpp:
1061         (WebKit::EventDispatcher::addScrollingTreeForPage):
1062         (WebKit::EventDispatcher::removeScrollingTreeForPage):
1063         (WebKit::EventDispatcher::wheelEvent):
1064         * WebProcess/WebPage/EventDispatcher.h:
1065         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
1066         (webkitSoupRequestInputStreamReadAsync):
1067         (webkitSoupRequestInputStreamAddData):
1068
1069 2015-08-05  Daniel Bates  <dabates@apple.com>
1070
1071         REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
1072         https://bugs.webkit.org/show_bug.cgi?id=147678
1073         <rdar://problem/21827815>
1074
1075         Reviewed by Brady Eidson.
1076
1077         Teach WebKit to save and restore the "should open external URLs" policy.
1078
1079         * Shared/SessionState.cpp:
1080         (WebKit::isValidEnum): Added.
1081         (WebKit::PageState::encode): Modified to encode the "should open external URLs" policy.
1082         (WebKit::PageState::decode): Modified to decode the "should open external URLs" policy.
1083         * Shared/SessionState.h: Added ShouldOpenExternalURLsPolicy to PageState (defaults to WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow).
1084         * UIProcess/API/Cocoa/WKWebView.mm:
1085         (-[WKWebView _killWebContentProcessAndResetState]): Added; used in the unit test TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm.
1086         * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declare -[WKWebView _killWebContentProcessAndResetState].
1087         * UIProcess/mac/LegacySessionStateCoding.cpp: Defined constant sessionHistoryEntryShouldOpenExternalURLsPolicyKey.
1088         (WebKit::encodeSessionHistory): Modified to encode the "should open external URLs" policy.
1089         (WebKit::decodeSessionHistoryEntry): Modified to decode the "should open external URLs" policy.
1090         * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1091         (WebKit::toPageState): Copy "should open external URLs" policy from specified history item.
1092         (WebKit::toHistoryItem): Apply "should open external URLs" policy from PageState to HistoryItem.
1093
1094 2015-08-04  Antti Koivisto  <antti@apple.com>
1095
1096         Network cache fetches should have timeout
1097         https://bugs.webkit.org/show_bug.cgi?id=147631
1098
1099         Reviewed by Andreas Kling.
1100
1101         System might be under heavy I/O pressure. If it takes long time to get data from disk we should load from network instead.
1102
1103         This patch introduces 1.5s timeout for disk reads. If the last dispatched cache read takes longer than that we cancel all
1104         active and pending reads and just load those resources from network.
1105
1106         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1107         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
1108         (WebKit::NetworkCache::Storage::ReadOperation::cancel):
1109         (WebKit::NetworkCache::Storage::ReadOperation::finish):
1110
1111             Factor to functions.
1112
1113         (WebKit::NetworkCache::Storage::Storage):
1114         (WebKit::NetworkCache::Storage::updateFileModificationTime):
1115         (WebKit::NetworkCache::Storage::dispatchReadOperation):
1116         (WebKit::NetworkCache::Storage::finishReadOperation):
1117         (WebKit::NetworkCache::Storage::cancelAllReadOperations):
1118         (WebKit::NetworkCache::Storage::dispatchPendingReadOperations):
1119         (WebKit::NetworkCache::Storage::dispatchPendingWriteOperations):
1120
1121             Also make dispatch functions transfer the operation ownership.
1122
1123         (WebKit::NetworkCache::shouldStoreBodyAsBlob):
1124         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
1125         * NetworkProcess/cache/NetworkCacheStorage.h:
1126
1127 2015-08-04  Matt Rajca  <mrajca@apple.com>
1128
1129         Media Session: add a focus manager that WebKit clients can use to access the focused media element
1130         https://bugs.webkit.org/show_bug.cgi?id=147629
1131
1132         Reviewed by Tim Horton.
1133
1134         * Shared/API/APIObject.h: Added a new type for the focus manager.
1135         * Shared/API/c/WKBase.h: Added a new type for the focus manager.
1136         * UIProcess/API/C/WKAPICast.h: Added a new type for the focus manager.
1137         * UIProcess/API/C/WKContext.cpp: The "global" focus manager is accessed via WKContext.
1138         (WKContextGetMediaSessionFocusManager):
1139         * UIProcess/API/C/WKContext.h:
1140         * UIProcess/API/C/WKMediaSessionFocusManager.cpp: Added C wrapper for WebMediaSessionFocusManager.
1141         (WKMediaSessionFocusManagerGetTypeID):
1142         (WKMediaSessionFocusManagerIsFocusedContentMediaElementPaused):
1143         * UIProcess/API/C/WKMediaSessionFocusManager.h: Added C wrapper for WebMediaSessionFocusManager.
1144         * UIProcess/WebMediaSessionFocusManager.cpp: Added to keep track of the focused media element in the UI process and let clients query this state.
1145         (WebKit::WebMediaSessionFocusManager::supplementName):
1146         (WebKit::WebMediaSessionFocusManager::create):
1147         (WebKit::WebMediaSessionFocusManager::WebMediaSessionFocusManager):
1148         (WebKit::WebMediaSessionFocusManager::refWebContextSupplement):
1149         (WebKit::WebMediaSessionFocusManager::derefWebContextSupplement):
1150         (WebKit::WebMediaSessionFocusManager::isFocusedContentMediaElementPaused): Check if the media element on the focused page is paused.
1151         (WebKit::WebMediaSessionFocusManager::setFocusedMediaElement): Keep track of the focused page / media element pair.
1152         (WebKit::WebMediaSessionFocusManager::clearFocusedMediaElement): Reset the focused page / media element pair.
1153         * UIProcess/WebMediaSessionFocusManager.h: Added.
1154         * UIProcess/WebPageProxy.cpp:
1155         (WebKit::WebPageProxy::isMediaElementPaused): Updated to take a UnsignedCallback.
1156         (WebKit::WebPageProxy::focusedContentMediaElementDidChange): Store the focused media element in the focus manager.
1157         * UIProcess/WebPageProxy.h:
1158         * UIProcess/WebProcessPool.cpp: Added WebMediaSessionFocusManager as a supplement.
1159         * UIProcess/WebProcessPool.h: WebMediaSessionFocusManager is a supplement, so include its header.
1160         * WebKit2.xcodeproj/project.pbxproj: Added new sources and ran sort-xcode-project.
1161
1162 2015-08-04  Anders Carlsson  <andersca@apple.com>
1163
1164         Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
1165         https://bugs.webkit.org/show_bug.cgi?id=147648
1166
1167         Reviewed by Andreas Kling.
1168
1169         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1170         (WebKit::WebFrameLoaderClient::objectContentType):
1171         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1172         (WebKit::WebPlatformStrategies::getPluginInfo):
1173         * WebProcess/WebPage/WebPage.cpp:
1174         (WebKit::WebPage::createPlugin):
1175         (WebKit::WebPage::canPluginHandleResponse):
1176         (WebKit::WebPage::canShowMIMEType):
1177
1178 2015-08-04  Alexey Proskuryakov  <ap@apple.com>
1179
1180         Implement NPAPI redirect handling
1181         https://bugs.webkit.org/show_bug.cgi?id=138675
1182         rdar://problem/15779101
1183
1184         Patch by Jeffrey Pfau, updated and tweaked by me.
1185
1186         Reviewed by Anders Carlsson.
1187
1188         * PluginProcess/PluginControllerProxy.cpp:
1189         (WebKit::PluginControllerProxy::loadURL):
1190         (WebKit::PluginControllerProxy::continueStreamLoad):
1191         (WebKit::PluginControllerProxy::cancelStreamLoad):
1192         (WebKit::PluginControllerProxy::didEvaluateJavaScript):
1193         (WebKit::PluginControllerProxy::streamWillSendRequest):
1194         (WebKit::PluginControllerProxy::streamDidReceiveResponse):
1195         * PluginProcess/PluginControllerProxy.h:
1196         * PluginProcess/PluginControllerProxy.messages.in:
1197         * WebProcess/Network/WebResourceLoader.cpp:
1198         (WebKit::WebResourceLoader::willSendRequest):
1199         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1200         (WebKit::NPN_ConvertPoint):
1201         (WebKit::NPN_URLRedirectResponse):
1202         (WebKit::initializeBrowserFuncs):
1203         (WebKit::netscapeBrowserFuncs):
1204         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1205         (WebKit::NetscapePlugin::getAuthenticationInfo):
1206         (WebKit::NetscapePlugin::registerRedirect):
1207         (WebKit::NetscapePlugin::urlRedirectResponse):
1208         (WebKit::NetscapePlugin::setIsPlayingAudio):
1209         (WebKit::NetscapePlugin::NPP_URLNotify):
1210         (WebKit::NetscapePlugin::NPP_URLRedirectNotify):
1211         (WebKit::NetscapePlugin::NPP_GetValue):
1212         (WebKit::NetscapePlugin::didEvaluateJavaScript):
1213         (WebKit::NetscapePlugin::streamWillSendRequest):
1214         (WebKit::NetscapePlugin::streamDidReceiveResponse):
1215         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1216         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1217         (WebKit::NetscapePluginStream::~NetscapePluginStream):
1218         (WebKit::NetscapePluginStream::willSendRequest):
1219         (WebKit::NetscapePluginStream::didReceiveResponse):
1220         (WebKit::NetscapePluginStream::stop):
1221         (WebKit::NetscapePluginStream::setURL):
1222         (WebKit::NetscapePluginStream::cancel):
1223         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1224         (WebKit::NetscapePluginStream::streamID):
1225         (WebKit::NetscapePluginStream::npStream):
1226         * WebProcess/Plugins/PDF/PDFPlugin.h:
1227         * WebProcess/Plugins/Plugin.h:
1228         * WebProcess/Plugins/PluginController.h:
1229         * WebProcess/Plugins/PluginProxy.cpp:
1230         (WebKit::PluginProxy::didEvaluateJavaScript):
1231         (WebKit::PluginProxy::streamWillSendRequest):
1232         (WebKit::PluginProxy::streamDidReceiveResponse):
1233         (WebKit::PluginProxy::setPluginIsPlayingAudio):
1234         (WebKit::PluginProxy::continueStreamLoad):
1235         (WebKit::PluginProxy::cancelStreamLoad):
1236         * WebProcess/Plugins/PluginProxy.h:
1237         * WebProcess/Plugins/PluginProxy.messages.in:
1238         * WebProcess/Plugins/PluginView.cpp:
1239         (WebKit::PluginView::Stream::streamID):
1240         (WebKit::PluginView::Stream::Stream):
1241         (WebKit::PluginView::Stream::cancel):
1242         (WebKit::PluginView::Stream::continueLoad):
1243         (WebKit::buildHTTPHeaders):
1244         (WebKit::lastModifiedDateMS):
1245         (WebKit::PluginView::Stream::willSendRequest):
1246         (WebKit::PluginView::Stream::didReceiveResponse):
1247         (WebKit::PluginView::cancelStreamLoad):
1248         (WebKit::PluginView::continueStreamLoad):
1249         (WebKit::PluginView::cancelManualStreamLoad):
1250         * WebProcess/Plugins/PluginView.h:
1251
1252 2015-08-04  Chris Dumez  <cdumez@apple.com>
1253
1254         Unreviewed, rolling out r187812.
1255
1256         This is not safe
1257
1258         Reverted changeset:
1259
1260         "[WK2] Reserve Vector capacity in VectorArgumentCoder<false,
1261         T, inlineCapacity>::decode()"
1262         https://bugs.webkit.org/show_bug.cgi?id=147619
1263         http://trac.webkit.org/changeset/187812
1264
1265 2015-08-03  Chris Dumez  <cdumez@apple.com>
1266
1267         [WK2] Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
1268         https://bugs.webkit.org/show_bug.cgi?id=147619
1269
1270         Reviewed by Andreas Kling.
1271
1272         Reserve Vector capacity in VectorArgumentCoder<false, T, inlineCapacity>::decode()
1273         as we know the size of the Vector in advance.
1274
1275         * Platform/IPC/ArgumentCoders.h:
1276
1277 2015-08-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1278
1279         [CoordinatedGraphics] Rearrange uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS
1280         https://bugs.webkit.org/show_bug.cgi?id=147256
1281
1282         Reviewed by Benjamin Poulain.
1283
1284         Reduce uses of USE_COORDINATED_GRAPHICS_MULTIPROCESS guard in order to fix build
1285         breaks when USE_COORDINATED_GRAPHICS_MULTIPROCESS is off. This is first step to switch
1286         between multiprocess model to thread model.
1287
1288         * PlatformEfl.cmake:
1289         * Shared/DrawingAreaInfo.h:
1290         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1291         (WKViewFindZoomableAreaForRect):
1292         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
1293         (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
1294         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1295         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
1296         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1297         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1298         (WebKit::PageViewportController::pageTransitionViewportReady):
1299         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp:
1300         * UIProcess/CoordinatedGraphics/WebView.cpp:
1301         * UIProcess/CoordinatedGraphics/WebView.h:
1302         * UIProcess/WebPageProxy.cpp:
1303         (WebKit::WebPageProxy::commitPageTransitionViewport):
1304         * UIProcess/WebPageProxy.h:
1305         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1306         (WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
1307         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1308         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
1309         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1310         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1311         * WebProcess/WebPage/DrawingAreaImpl.h:
1312         * WebProcess/WebPage/LayerTreeHost.cpp:
1313         (WebKit::LayerTreeHost::create):
1314         * WebProcess/WebPage/WebPage.cpp:
1315         (WebKit::WebPage::sendViewportAttributesChanged):
1316         (WebKit::WebPage::pageDidRequestScroll):
1317         * WebProcess/WebPage/WebPage.h:
1318         * WebProcess/WebPage/WebPage.messages.in:
1319
1320 2015-08-03  Matt Rajca  <mrajca@apple.com>
1321
1322         Media Session: let UI clients query whether a media element is paused
1323         https://bugs.webkit.org/show_bug.cgi?id=147588
1324
1325         Reviewed by Tim Horton.
1326
1327         Added plumbing to determine if a page's media element is paused.
1328
1329         * UIProcess/WebPageProxy.cpp:
1330         (WebKit::WebPageProxy::isMediaElementPaused):
1331         * UIProcess/WebPageProxy.h:
1332         * WebProcess/WebPage/WebPage.cpp:
1333         (WebKit::WebPage::isMediaElementPaused):
1334         * WebProcess/WebPage/WebPage.h:
1335         * WebProcess/WebPage/WebPage.messages.in:
1336
1337 2015-08-03  Chris Dumez  <cdumez@apple.com>
1338
1339         Make sure error handling code APIUserContentExtensionStore closes open file descriptors
1340         https://bugs.webkit.org/show_bug.cgi?id=147562
1341
1342         Reviewed by Alex Christensen.
1343
1344         Make sure error handling code APIUserContentExtensionStore closes open
1345         file descriptors to avoid leaking them.
1346
1347         * NetworkProcess/cache/NetworkCacheData.cpp:
1348         (WebKit::NetworkCache::adoptAndMapFile):
1349         * UIProcess/API/APIUserContentExtensionStore.cpp:
1350         (API::compiledToFile):
1351
1352 2015-08-03  Beth Dakin  <bdakin@apple.com>
1353
1354         Need WKWebView API to enable/disable link preview
1355         https://bugs.webkit.org/show_bug.cgi?id=147573
1356         -and corresponding-
1357         rdar://problem/22077836
1358
1359         Reviewed by Dan Bernstein.
1360
1361         WKView implementation.
1362         * UIProcess/API/Cocoa/WKViewPrivate.h:
1363
1364         New API. Call into WKView to handle Mac.
1365         * UIProcess/API/Cocoa/WKWebView.h:
1366         * UIProcess/API/Cocoa/WKWebView.mm:
1367         (-[WKWebView initWithFrame:configuration:]):
1368         (-[WKWebView allowsLinkPreview]):
1369         (-[WKWebView setAllowsLinkPreview:]):
1370
1371         Remove the SPI declaration from WKWebViewPrivate in order to make this API.
1372         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1373
1374         Handle the Mac side.
1375         * UIProcess/API/mac/WKView.mm:
1376         (-[WKView viewDidMoveToWindow]):
1377         (-[WKView initWithFrame:processPool:configuration:webView:]):
1378         (-[WKView allowsBackForwardNavigationGestures]):
1379         (-[WKView allowsLinkPreview]):
1380         (-[WKView setAllowsLinkPreview:]):
1381
1382         Don’t register previews when link preview is prevented.
1383         * UIProcess/ios/WKContentViewInteraction.mm:
1384         (-[WKContentView _registerPreview]):
1385
1386 2015-08-03  Tim Horton  <timothy_horton@apple.com>
1387
1388         [iOS] Link previews sometimes don't hide the link highlight
1389         https://bugs.webkit.org/show_bug.cgi?id=147585
1390         <rdar://problem/22119648>
1391
1392         Reviewed by Beth Dakin.
1393
1394         * UIProcess/ios/WKContentViewInteraction.mm:
1395         (-[WKContentView _interactionStartedFromPreviewItemController:]):
1396         (-[WKContentView _interactionStoppedFromPreviewItemController:]):
1397         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
1398         (-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]): Deleted.
1399         Use interactionStarted/Stopped, which are always called, instead of didDismiss/willPresent,
1400         which are only called if we return a custom view controller from _presentedViewControllerForPreviewItemController.
1401         We continue using didDismiss to inform clients of dismissal because they'll
1402         only care if they customized the view controller.
1403
1404 2015-08-03  Chris Dumez  <cdumez@apple.com>
1405
1406         [WK2][NetworkCache] Do not munmap() on the main thread
1407         https://bugs.webkit.org/show_bug.cgi?id=147569
1408
1409         Reviewed by Geoffrey Garen.
1410
1411         Do not munmap() on the main thread for performance reasons and
1412         consistency as we already make sure to mmap() on another thread.
1413
1414         * NetworkProcess/cache/NetworkCacheDataCocoa.mm:
1415         (WebKit::NetworkCache::Data::adoptMap):
1416
1417 2015-08-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1418
1419         Inputs with the autofocus attribute cause the keyboard to not deploy
1420         https://bugs.webkit.org/show_bug.cgi?id=147555
1421         <rdar://problem/22018044>
1422
1423         Reviewed by Andreas Kling.
1424
1425         Upon submitting a form by pressing "Go" on the keyboard, an <input> on the next page with the
1426         autofocus attribute may become non-interactible. When attempting to tap on the input, nothing
1427         seems to happen. This is because the state of WebPage upon invoking WebPage::elementDidFocus
1428         indicates (incorrectly) that the input element is already focused, and therefore hits an early
1429         return. To solve this, we explicitly reset m_hasFocusedDueToUserInteraction upon transitioning
1430         to a new page.
1431
1432         * WebProcess/WebPage/WebPage.cpp:
1433         (WebKit::WebPage::didStartPageTransition): On iOS, resets m_hasFocusedDueToUserInteraction as
1434             well. It was previously thought that this would be handled by blur() called on the assisted
1435             element when submitting a form. However, pressing "Go" on the iOS keyboard is an implicit
1436             submission and does not trigger a blur event.
1437
1438 2015-08-03  Chris Dumez  <cdumez@apple.com>
1439
1440         Fix error handling case in Cache::dumpContentsToFile()
1441         https://bugs.webkit.org/show_bug.cgi?id=147567
1442
1443         Reviewed by Andreas Kling.
1444
1445         Cache::dumpContentsToFile() was expecting openFile() to return 0 in case
1446         of error. However, it returns invalidPlatformFileHandle, which is -1 on
1447         Unix.
1448
1449         * NetworkProcess/cache/NetworkCache.cpp:
1450         (WebKit::NetworkCache::Cache::dumpContentsToFile):
1451
1452 2015-08-03  Chris Dumez  <cdumez@apple.com>
1453
1454         Make sure WebMemorySampler doesn't leak file descriptor
1455         https://bugs.webkit.org/show_bug.cgi?id=147564
1456
1457         Reviewed by Anders Carlsson.
1458
1459         WebMemorySampler was opening files but never closing them.
1460
1461         * Shared/WebMemorySampler.cpp:
1462         (WebKit::WebMemorySampler::stop):
1463         * Shared/WebMemorySampler.h:
1464
1465 2015-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1466
1467         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.5 release.
1468
1469         * gtk/NEWS: Add release notes for 2.9.5.
1470
1471 2015-07-27  Matt Rajca  <mrajca@apple.com>
1472
1473         Media Session: inform the UI process when the focused Content media element changes
1474         https://bugs.webkit.org/show_bug.cgi?id=147323
1475
1476         Reviewed by Tim Horton.
1477
1478         * UIProcess/WebPageProxy.cpp:
1479         (WebKit::WebPageProxy::isPlayingMediaDidChange):
1480         * UIProcess/WebPageProxy.h:
1481         * UIProcess/WebPageProxy.messages.in:
1482         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1483         (WebKit::WebChromeClient::focusedContentMediaElementDidChange):
1484         * WebProcess/WebCoreSupport/WebChromeClient.h:
1485
1486 2015-07-31  Chris Dumez  <cdumez@apple.com>
1487
1488         Drop dummy Timer callbacks
1489         https://bugs.webkit.org/show_bug.cgi?id=147516
1490
1491         Reviewed by Alexey Proskuryakov.
1492
1493         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
1494         do nothing else beside calling a particular method. In such case, we
1495         can use the called method as Timer callback instead.
1496
1497         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1498         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1499         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1500         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired): Deleted.
1501
1502 2015-07-31  Chris Dumez  <cdumez@apple.com>
1503
1504         [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
1505         https://bugs.webkit.org/show_bug.cgi?id=143348
1506
1507         Reviewed by Antti Koivisto.
1508
1509         Drop HTTP method from NetworkCache::Key as we only cache GET responses
1510         for now. Even when we start caching HEAD responses, we likely will not
1511         want the method to be part of the key because:
1512         - A HEAD response can be used to update the headers of a previously cached response to GET
1513         - A cached GET response may be used to satisfy subsequent HEAD requests
1514
1515         * NetworkProcess/cache/NetworkCache.cpp:
1516         (WebKit::NetworkCache::makeCacheKey):
1517         * NetworkProcess/cache/NetworkCacheKey.cpp:
1518         (WebKit::NetworkCache::Key::Key):
1519         (WebKit::NetworkCache::Key::operator==):
1520         (WebKit::NetworkCache::Key::decode):
1521         (WebKit::NetworkCache::Key::operator=): Deleted.
1522         (WebKit::NetworkCache::Key::computeHash): Deleted.
1523         (WebKit::NetworkCache::Key::encode): Deleted.
1524         * NetworkProcess/cache/NetworkCacheKey.h:
1525         (WebKit::NetworkCache::Key::method): Deleted.
1526
1527 2015-07-31  Chris Dumez  <cdumez@apple.com>
1528
1529         Coalesce concurrent authentication challenges for the same ProtectionSpace
1530         https://bugs.webkit.org/show_bug.cgi?id=147496
1531         <rdar://problem/16839069>
1532
1533         Reviewed by Alexey Proskuryakov.
1534
1535         Coalesce concurrent authentication challenges for the same ProtectionSpace.
1536         Ideally, this would be done in the network layer but short term, this will
1537         make sure the user no longer gets repeating authentication dialogs for the
1538         same protection space.
1539
1540         This gets rid of a long-standing bug in WebKit / Safari where visiting a
1541         site using HTTP authentication would pop up one authentication dialog for
1542         each subresource being loaded from the network (especially when the main
1543         resource is loaded from the cache).
1544
1545         * Shared/Authentication/AuthenticationManager.cpp:
1546         (WebKit::canCoalesceChallenge):
1547         (WebKit::AuthenticationManager::addChallengeToChallengeMap):
1548         (WebKit::AuthenticationManager::shouldCoalesceChallenge):
1549         (WebKit::AuthenticationManager::coalesceChallengesMatching):
1550         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
1551         (WebKit::AuthenticationManager::useCredentialForChallenge):
1552         (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
1553         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
1554         (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
1555         (WebKit::AuthenticationManager::cancelChallenge):
1556         (WebKit::AuthenticationManager::cancelSingleChallenge):
1557         (WebKit::AuthenticationManager::performDefaultHandling):
1558         (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
1559         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
1560         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
1561         (WebKit::AuthenticationManager::AuthenticationManager): Deleted.
1562         * Shared/Authentication/AuthenticationManager.h:
1563
1564 2015-07-31  Joseph Pecoraro  <pecoraro@apple.com>
1565
1566         Unreviewed parameter name typo fix.
1567
1568         * UIProcess/API/Cocoa/WKPreferences.mm:
1569         (-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
1570
1571 2015-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1572
1573         [GTK] NPAPI code crashes on Wayland
1574         https://bugs.webkit.org/show_bug.cgi?id=147297
1575
1576         Reviewed by Žan Doberšek.
1577
1578         Do not crete NPAPI plugins when runing on Wayland, since they are
1579         not supported. ENABLE_NETSCAPE_PLUGIN_API option used to be
1580         incompatible with building with the Wayland target, but now that
1581         we allow to build X11 and Wayland targets at the same time, we
1582         need runtime checks to avoid creating NPAPI plugins in Wayland.
1583
1584         * UIProcess/API/gtk/WebKitSettings.cpp:
1585         (webkit_settings_set_enable_plugins): Do not allow to change the
1586         setting when running in Wayland.
1587         * UIProcess/gtk/WebPreferencesGtk.cpp:
1588         (WebKit::WebPreferences::platformInitializeStore): Initialize
1589         EnablePlugins preference to false when running in Wayland.
1590
1591 2015-07-30  Joseph Pecoraro  <pecoraro@apple.com>
1592
1593         LayoutTests/inspector frequently run slow and timeout when run in WebKit2 but not WebKit1
1594         https://bugs.webkit.org/show_bug.cgi?id=147456
1595
1596         Reviewed by Timothy Hatcher.
1597
1598         By default, WebKit2 WebPage's on PLATFORM(COCOA) enabling DOM Timer
1599         throttling. Under testing, this ends up impacting Web Inspector
1600         tests that create their own WKWebView which never gets displayed
1601         and so gets throttled. Disable throttling on the Inspector's view
1602         during testing.
1603
1604         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1605         * UIProcess/API/Cocoa/WKPreferences.mm:
1606         (-[WKPreferences _hiddenPageDOMTimerThrottlingEnabled]):
1607         (-[WKPreferences _setHiddenPageDOMTimerThrottlingEnabled:]):
1608         SPI to toggle DOM timer throttling.
1609
1610         * UIProcess/WebInspectorProxy.cpp:
1611         (WebKit::WebInspectorProxy::createInspectorPage):
1612         * UIProcess/WebInspectorProxy.h:
1613         (WebKit::WebInspectorProxy::isUnderTest):
1614         Provide a way to get if we are under test, and set it before
1615         calling into the platform method.
1616
1617         * UIProcess/mac/WebInspectorProxyMac.mm:
1618         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1619         When testing, disable timer throttling.
1620
1621 2015-07-30  Eric Carlson  <eric.carlson@apple.com>
1622
1623         [iOS] Set AirPlay discovery mode to disabled when page is hidden
1624         https://bugs.webkit.org/show_bug.cgi?id=147455
1625
1626         Reviewed by Enrica Casucci.
1627
1628         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1629         (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Set discovery mode to disabled after
1630           the picker has been closed.
1631         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Ditto.
1632
1633 2015-07-29  Dean Jackson  <dino@apple.com>
1634
1635         Don't use (Details) when exposing SPI
1636         https://bugs.webkit.org/show_bug.cgi?id=147426
1637         <rdar://problem/22062407>
1638
1639         Reviewed by Dan Bernstein.
1640
1641         If we are declaring the interface without any implementation,
1642         we should use class extensions.
1643
1644         * Platform/spi/ios/AssertionServicesSPI.h:
1645         * Platform/spi/ios/CorePDFSPI.h:
1646         * Platform/spi/ios/DataDetectorsUISPI.h:
1647         * Platform/spi/ios/ManagedConfigurationSPI.h:
1648         * Platform/spi/ios/UIKitSPI.h:
1649         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1650         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1651         * UIProcess/_WKWebViewPrintFormatter.mm:
1652         * UIProcess/mac/WebPageProxyMac.mm:
1653
1654 2015-07-30  Chris Dumez  <cdumez@apple.com>
1655
1656         [WK2][NetworkCache] Stop closing files on the main thread
1657         https://bugs.webkit.org/show_bug.cgi?id=147410
1658
1659         Reviewed by Andreas Kling.
1660
1661         After r186510, we no longer open cache files on the main thread.
1662         However, we still close them on the main thread. This patch makes
1663         sure we close the files on another thread instead.
1664
1665         * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
1666         (WebKit::NetworkCache::IOChannel::IOChannel):
1667
1668 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
1669
1670         Convert Path applier to use std::function
1671         https://bugs.webkit.org/show_bug.cgi?id=147368
1672
1673         Reviewed by Sam Weinig.
1674
1675         Use std::function for Path::apply().
1676
1677         * Shared/WebCoreArgumentCoders.cpp:
1678         (IPC::pathEncodeApplierFunction):
1679         (IPC::ArgumentCoder<Path>::encode):
1680         (IPC::pathPointCountApplierFunction): Deleted.
1681
1682 2015-07-30  Joonghun Park  <jh718.park@samsung.com>
1683
1684         [EFL] Enable IndexedDB based on DatabaseProcess
1685         https://bugs.webkit.org/show_bug.cgi?id=147221
1686
1687         Reviewed by Csaba Osztrogonác.
1688
1689         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Add ecore_init().
1690         Without this call, it leads to crash when launching DatabaseProcess.
1691         * PlatformEfl.cmake: Add missing include_directory.
1692         * Shared/efl/ProcessExecutablePathEfl.cpp:
1693         (WebKit::executablePathOfDatabaseProcess):
1694         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1695         (WebKit::ProcessLauncher::launchProcess):
1696         * UIProcess/efl/WebProcessPoolEfl.cpp:
1697         (WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
1698         Add default path for indexedDB sqlite3 db file.
1699
1700 2015-07-30  Chris Dumez  <cdumez@apple.com>
1701
1702         Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
1703         https://bugs.webkit.org/show_bug.cgi?id=147446
1704
1705         Reviewed by Simon Fraser.
1706
1707         Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
1708         by leveraging the fact that we know in advance how many layer IDs are going to be added. We
1709         now set the Vector size from the start, instead of clearing it and then growing the vector
1710         capacity when appending the layer IDs one by one.
1711
1712         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1713         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1714
1715 2015-07-30  Chris Dumez  <cdumez@apple.com>
1716
1717         Mark more classes as fast allocated
1718         https://bugs.webkit.org/show_bug.cgi?id=147440
1719
1720         Reviewed by Sam Weinig.
1721
1722         Mark more classes as fast allocated for performance. We heap-allocate
1723         objects of those types throughout the code base.
1724
1725         * NetworkProcess/cache/NetworkCacheStorage.cpp:
1726         * NetworkProcess/cache/NetworkCacheStorage.h:
1727         * Platform/IPC/MessageRecorder.h:
1728         * Platform/mac/LayerHostingContext.h:
1729
1730 2015-07-29  Andy VanWagoner  <thetalecrafter@gmail.com>
1731
1732         Implement basic types for ECMAScript Internationalization API
1733         https://bugs.webkit.org/show_bug.cgi?id=146926
1734
1735         Reviewed by Benjamin Poulain.
1736
1737         * Configurations/FeatureDefines.xcconfig: Enabled INTL.
1738
1739 2015-07-29  Chris Dumez  <cdumez@apple.com>
1740
1741         [WK2] Use FastMalloc in IPC::MessageDecoder
1742         https://bugs.webkit.org/show_bug.cgi?id=147425
1743
1744         Reviewed by Sam Weinig.
1745
1746         Use FastMalloc in IPC::MessageDecoder instead of system malloc, for
1747         performance reasons and consistency.
1748
1749         * Platform/IPC/ArgumentDecoder.cpp:
1750         (IPC::ArgumentDecoder::~ArgumentDecoder):
1751         (IPC::ArgumentDecoder::initialize):
1752
1753 2015-07-29  Enrica Casucci  <enrica@apple.com>
1754
1755         Preview should not start if touch handler prevents default.
1756         https://bugs.webkit.org/show_bug.cgi?id=147423
1757         rdar://problem/22061043
1758
1759         Reviewed by Tim Horton.
1760
1761         We need to check if _highlightLongPressCanClick has not been reset before
1762         we allow the preview. It can be reset by a touch handler preventing default.
1763
1764         * UIProcess/ios/WKContentViewInteraction.mm:
1765         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
1766
1767 2015-07-29  Chris Fleizach  <cfleizach@apple.com>
1768
1769         AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
1770         https://bugs.webkit.org/show_bug.cgi?id=147386
1771
1772         Reviewed by Dan Bernstein.
1773
1774         Make sure this also builds on iOS8.
1775
1776         * Platform/IPC/mac/ConnectionMac.mm:
1777
1778 2015-07-29  Michael Catanzaro  <mcatanzaro@igalia.com>
1779
1780         [Seccomp] Further improvements to default web process policy
1781         https://bugs.webkit.org/show_bug.cgi?id=142987
1782
1783         Provide various helper functions to allow more flexible construction of
1784         filesystem access policies.
1785
1786         Reviewed by Žan Doberšek.
1787
1788         Improve the policy. Also, remove ifdefs to reduce potential for breakage in non-default
1789         configurations.
1790
1791         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
1792         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
1793
1794 2015-07-29  Chris Dumez  <cdumez@apple.com>
1795
1796         Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
1797         https://bugs.webkit.org/show_bug.cgi?id=147398
1798
1799         Reviewed by Jer Noble.
1800
1801         Only call PlatformMediaSessionManager::stopAllMediaPlaybackForProcess() in
1802         destructors if an PlatformMediaSessionManager instance already exists, to 
1803         avoid constructing one unecessarily at that point.
1804
1805         * WebProcess/WebProcess.cpp:
1806         (WebKit::WebProcess::didClose):
1807
1808 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1809
1810         [GTK] Add API to set the maximum number of web processes per WebKitWebContext
1811         https://bugs.webkit.org/show_bug.cgi?id=147108
1812
1813         Reviewed by Gustavo Noronha Silva.
1814
1815         * UIProcess/API/gtk/WebKitWebContext.cpp:
1816         (webkit_web_context_set_web_process_count_limit):
1817         (webkit_web_context_get_web_process_count_limit):
1818         * UIProcess/API/gtk/WebKitWebContext.h:
1819         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1820
1821 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1822
1823         [GTK] Fix empty space in popup menus when first item is selected
1824         https://bugs.webkit.org/show_bug.cgi?id=147358
1825
1826         Reviewed by Martin Robinson.
1827
1828         It happens when one of the first elements are selected, because we
1829         try to center the current selection on the combo element. When the
1830         menu is large enough to make the element centered we need to leave
1831         empty space at the beginning. This can be fixed by not scrolling
1832         to center the selected item when it's above the combo
1833         element. This ensure the selected item will always be visible,
1834         even if it's not centered. If the selected item is already
1835         centered or below the combo element, the behaviour doesn't change
1836         and we scroll to center it.
1837
1838         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1839         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
1840
1841 2015-07-28  Jincheol Jo  <jincheol.jo@navercorp.com>
1842
1843         [EFL] Fix typos in ewk_extension.cpp
1844         https://bugs.webkit.org/show_bug.cgi?id=147396
1845
1846         Reviewed by Gyuyoung Kim.
1847
1848         Fix from toEwkExtendion to toEwkExtension.
1849
1850         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
1851         (toEwkExtension):
1852         (EwkExtension::didCreatePage):
1853         (EwkExtension::willDestroyPage):
1854         (EwkExtension::didReceiveMessage):
1855         (toEwkExtendion): Deleted.
1856
1857 2015-07-28  Alexey Proskuryakov  <ap@apple.com>
1858
1859         Clean up usesAsyncCallbacks handling in ResourceHandle
1860         https://bugs.webkit.org/show_bug.cgi?id=147342
1861
1862         Reviewed by Darin Adler.
1863
1864         Update for a renaming in WebCore.
1865
1866         * NetworkProcess/NetworkResourceLoader.cpp:
1867         (WebKit::NetworkResourceLoader::cleanup):
1868         * Shared/Downloads/soup/DownloadSoup.cpp:
1869         (WebKit::Download::platformInvalidate):
1870
1871 2015-07-28  Chris Fleizach  <cfleizach@apple.com>
1872
1873         AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
1874         https://bugs.webkit.org/show_bug.cgi?id=147386
1875
1876         Reviewed by Anders Carlsson.
1877
1878         Support the iOS platform API to notify accessibility clients when the WebProcess is about to suspend (because of some modal dialog).
1879         Luckily, we did all the hardwork for OSX a few years ago to support this paradigm.         
1880
1881         * Platform/IPC/mac/ConnectionMac.mm:
1882         (IPC::AccessibilityProcessSuspendedNotification):
1883         (IPC::Connection::willSendSyncMessage):
1884         (IPC::Connection::didReceiveSyncReply):
1885
1886 2015-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1887
1888         [ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
1889         https://bugs.webkit.org/show_bug.cgi?id=147350
1890
1891         Reviewed by Sam Weinig.
1892
1893         * Configurations/FeatureDefines.xcconfig:
1894
1895 2015-07-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1896
1897         [iOS] REGRESSION(r168075): Fullscreen web video doesn't pause on screen lock
1898         https://bugs.webkit.org/show_bug.cgi?id=147269
1899
1900         Reviewed by Andreas Kling.
1901
1902         Media elements should pause when the application is going to EnterBackground
1903         under lock regardless whether it is in full screen or not.
1904
1905         * Platform/spi/ios/UIKitSPI.h: Forward declare [UIApplication isSuspendedUnderLock].
1906
1907         * UIProcess/ios/WebPageProxyIOS.mm:
1908         (WebKit::WebPageProxy::applicationDidEnterBackground):
1909         [UIApp isSuspendedUnderLock] can only be called in the UIProcess. We need
1910         to call it here and pass it to the WebPage in the WebProcess as part of the
1911         ApplicationDidEnterBackground message.
1912         
1913         * WebProcess/WebPage/WebPage.h:
1914         * WebProcess/WebPage/WebPage.messages.in: Add the new parameter:
1915         'isSuspendedUnderLock' to the ApplicationDidEnterBackground message.
1916         
1917         * WebProcess/WebPage/ios/WebPageIOS.mm:
1918         (WebKit::WebPage::applicationDidEnterBackground): On iOS, the WebPage needs
1919         to notify the MediaSessionManagerIOS that it received the message 
1920         ApplicationDidEnterBackground.
1921
1922 2015-07-28  Yongjun Zhang  <yongjun_zhang@apple.com>
1923
1924         Bounds in InteractionInformationAtPosition should be always in main frame coordinate space.
1925         https://bugs.webkit.org/show_bug.cgi?id=147372
1926
1927         When we prepare the bounds for InteractionInformationAtPosition, we should convert the rect to
1928         main frame space since WKContent in UIProcess expects it to be in the web view space.
1929
1930         Reviewed by Tim Horton.
1931
1932         * WebProcess/WebPage/ios/WebPageIOS.mm:
1933         (WebKit::WebPage::getPositionInformation): Convert the bounding rect to main frame space if the element is inside a sub-frame.
1934
1935 2015-07-27  Simon Fraser  <simon.fraser@apple.com>
1936
1937         PathApplierFunction should take a reference to a PathElement
1938         https://bugs.webkit.org/show_bug.cgi?id=147337
1939
1940         Reviewed by Dan Bates.
1941
1942         Convert PathApplierFunction to take a const PathElement&, since it can never be null.
1943
1944         * Shared/WebCoreArgumentCoders.cpp:
1945         (IPC::pathPointCountApplierFunction):
1946         (IPC::pathEncodeApplierFunction):
1947
1948 2015-07-28  Jer Noble  <jer.noble@apple.com>
1949
1950         [iOS] Notify fullscreen controller in UIProcess whether external playback is allowed
1951         https://bugs.webkit.org/show_bug.cgi?id=147343
1952
1953         Reviewed by Brady Eidson.
1954
1955         Pass the boolean property wirelessVideoPlaybackDisabled across the UIProcess/WebProcess boundary.
1956
1957         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1958         (WebKit::WebVideoFullscreenManagerProxy::setWirelessVideoPlaybackDisabled):
1959         * WebProcess/ios/WebVideoFullscreenManager.mm:
1960         (WebKit::WebVideoFullscreenInterfaceContext::setWirelessVideoPlaybackDisabled):
1961         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
1962         (WebKit::WebVideoFullscreenManager::setWirelessVideoPlaybackDisabled):
1963
1964 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1965
1966         [GTK] Use fastMalloc instead of g_slice
1967         https://bugs.webkit.org/show_bug.cgi?id=147357
1968
1969         Reviewed by Sergio Villar Senin.
1970
1971         The use of g_slice is no longer encouraged by glib developers.
1972
1973         * UIProcess/API/gtk/WebKitCredential.cpp:
1974         (webkitCredentialCreate):
1975         (webkit_credential_free):
1976         * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
1977         (webkitJavascriptResultCreate):
1978         (webkit_javascript_result_unref):
1979         * UIProcess/API/gtk/WebKitMimeInfo.cpp:
1980         (webkitMimeInfoCreate):
1981         (webkit_mime_info_unref):
1982         * UIProcess/API/gtk/WebKitNavigationAction.cpp:
1983         (webkitNavigationActionCreate):
1984         (webkit_navigation_action_copy):
1985         (webkit_navigation_action_free):
1986         * UIProcess/API/gtk/WebKitPrivate.h:
1987         * UIProcess/API/gtk/WebKitScriptDialog.cpp:
1988         (webkitScriptDialogCopy):
1989         (webkitScriptDialogFree):
1990         * UIProcess/API/gtk/WebKitUserContent.cpp:
1991         (webkit_user_style_sheet_unref):
1992         (webkit_user_style_sheet_new):
1993         (webkit_user_script_unref):
1994         (webkit_user_script_new):
1995
1996 2015-07-27  Dan Bernstein  <mitz@apple.com>
1997
1998         [iOS] REGRESSION (r187376): Form editing buttons are missing from the Shortcut Bar
1999         https://bugs.webkit.org/show_bug.cgi?id=147351
2000
2001         Reviewed by Adele Peterson.
2002
2003         We were relying on -[WKContentView inputAccessoryView] getting called to initialize the form
2004         accessory view, even when that method would always return nil, as it does on iPad. After
2005         r187376, that method changed to initializing the view only when returning it, which caused
2006         this bug.
2007
2008         * UIProcess/ios/WKContentViewInteraction.mm:
2009         (-[WKContentView _displayFormNodeInputView]): Call the new -_ensureFormAccessoryView from
2010         here, when we are going to need the view.
2011         (-[WKContentView _ensureFormAccessoryView]): Moved initialization code from
2012         -inputAccessoryView here, and removed outdated +instancesRespondToSelector: check.
2013         (-[WKContentView inputAccessoryView]): Now calls through -formAccessoryView.
2014         (-[WKContentView formAccessoryView]): Added call to -_ensureFormAccessoryView here.
2015
2016 2015-07-27  Andreas Kling  <akling@apple.com>
2017
2018         WebsiteDataStore should clean up its storage in the network process when destroyed.
2019         <https://webkit.org/b/147349>
2020         <rdar://problem/21838764>
2021
2022         Reviewed by Darin Adler.
2023
2024         Have ~WebsiteDataStore() send a DestroyPrivateBrowsingSession message to all networking processes
2025         for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
2026         CFNetwork object graph.
2027
2028         This complements r187115 which did the same for network process storage owned by
2029         API::Session objects.
2030
2031         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
2032         (WebKit::WebsiteDataStore::~WebsiteDataStore):
2033
2034 2015-07-27  Tim Horton  <timothy_horton@apple.com>
2035
2036         First in-window viewStateChange synchronously blocks despite not previously being in-window
2037         https://bugs.webkit.org/show_bug.cgi?id=147344
2038         <rdar://problem/22021772>
2039
2040         Reviewed by Simon Fraser.
2041
2042         * UIProcess/WebPageProxy.cpp:
2043         (WebKit::WebPageProxy::updateViewState):
2044         (WebKit::WebPageProxy::dispatchViewStateChange):
2045         The whole point of m_viewWasEverInWindow was so that we would not
2046         synchronously wait when a view was added to a window for the first time,
2047         only all subsequent times.
2048
2049         However, since m_viewWasEverInWindow was being set *before* being
2050         checked in dispatchViewStateChange, we were always blocking. This is
2051         a huge waste of main-thread time, because there's no reason to wait
2052         for the first paint if you've never seen the view before (and shouldn't
2053         expect it to have content).
2054
2055         Instead, set the flag after dispatching a view state change, so it becomes
2056         "have we ever sent a view state with IsInWindow set" instead.
2057
2058 2015-07-27  Tim Horton  <timothy_horton@apple.com>
2059
2060         [iOS] Long press or link click can sometimes trigger during/after a preview
2061         https://bugs.webkit.org/show_bug.cgi?id=147338
2062         <rdar://problem/22020770>
2063
2064         Reviewed by Enrica Casucci.
2065
2066         * UIProcess/ios/WKContentViewInteraction.mm:
2067         (-[WKContentView _longPressRecognized:]):
2068         Bail if we're previewing.
2069
2070         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2071         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
2072         Always avoid allowing clicks and start interaction when previewing a link.
2073
2074 2015-07-27  Andreas Kling  <akling@apple.com>
2075
2076         [iOS] Occasional crashes in WebPage::elementDidBlur()'s async block.
2077         <https://webkit.org/b/147281>
2078         <rdar://problem/21701858>
2079
2080         Reviewed by Anders Carlsson.
2081
2082         Protect the WebPage object until the dispatch_async block has finished.
2083         I have no way to repro this, but there's evidence of some crashing here.
2084
2085         * WebProcess/WebPage/ios/WebPageIOS.mm:
2086         (WebKit::WebPage::elementDidBlur):
2087
2088 2015-07-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2089
2090         [Seccomp] Set appropriate filters when trapping syscalls by default
2091         https://bugs.webkit.org/show_bug.cgi?id=142983
2092
2093         If we trap syscalls by default, we must not set separate filters to trap
2094         anything here, since it will fail causing us to crash.
2095
2096         But also, there are some things we must allow unconditionally even when
2097         trapping by default. sigreturn, obviously. Also, let's whitelist brk
2098         here instead of in platform-specific code.
2099
2100         Reviewed by Žan Doberšek.
2101
2102         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2103         (WebKit::SeccompBroker::launchProcess): Don't trap sigprocmask or sigaction unless allow is
2104         the default action. Also, allow sigreturn and brk is allow is not the default.
2105         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added
2106         (WebKit::SeccompFilters::defaultAction):
2107         * Shared/linux/SeccompFilters/SeccompFilters.h: Added defaultAction
2108
2109 2015-07-27  Matthew Daiter  <mdaiter@apple.com>
2110
2111         Renamed duplicate vectors inside UserMediaPermissionRequestProxy
2112         https://bugs.webkit.org/show_bug.cgi?id=147321
2113         <rdar://problem/22011290>
2114
2115         Reviewed by Eric Carlson.
2116
2117         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2118         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2119         * UIProcess/UserMediaPermissionRequestProxy.h:
2120         (WebKit::UserMediaPermissionRequestProxy::videoDeviceUIDs):
2121         (WebKit::UserMediaPermissionRequestProxy::audioDeviceUIDs):
2122         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo): Deleted.
2123         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio): Deleted.
2124         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2125         (WebKit::UserMediaPermissionRequestManager::startRequest):
2126
2127 2015-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2128
2129         [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
2130         https://bugs.webkit.org/show_bug.cgi?id=147103
2131
2132         Reviewed by Philippe Normand.
2133
2134         This allows PackageKit to properly position the window and make it
2135         transient to the web view window.
2136
2137         * UIProcess/API/gtk/PageClientImpl.cpp:
2138         (WebKit::PageClientImpl::setCursor): Disambiguate Cursor now that
2139         we include gtkx.h.
2140         (WebKit::PageClientImpl::createGstInstallPluginsContext): Create a
2141         new GstInstallPluginsContext and set the web view window XID when
2142         running on X11.
2143         * UIProcess/API/gtk/PageClientImpl.h:
2144         * UIProcess/PageClient.h:
2145         * UIProcess/efl/WebViewEfl.h:
2146         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
2147         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Use
2148         PageClient::createGstInstallPluginsContext() to create a new
2149         GstInstallPluginsContext and pass it to gst_install_plugins_async().
2150
2151 2015-07-26  Gwang Yoon Hwang  <yoon@igalia.com>
2152
2153         [ThreadedCompositor] Unreviewed build fix after r186059
2154         https://bugs.webkit.org/show_bug.cgi?id=147315
2155
2156         * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2157         (WebKit::ThreadedCompositor::glContext):
2158         Explicitly cast u_int64 to GLNativeWindowType.
2159         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2160         (WebKit::ThreadedCoordinatedLayerTreeHost::create):
2161         Update declaration to match with modified definition.
2162
2163
2164 2015-07-26  Chris Dumez  <cdumez@apple.com>
2165
2166         [WK2][iOS] WebContent process main thread should have fixed priority
2167         https://bugs.webkit.org/show_bug.cgi?id=147313
2168         <rdar://problem/22003112>
2169
2170         Reviewed by Darin Adler.
2171
2172         WebContent process main thread should have fixed priority on iOS 9.
2173         Priority decay regresses PLT and fixing the main thread's priority
2174         gives up a ~3% progression on warm PLT (tested on iPhone 5s).
2175
2176         * WebProcess/cocoa/WebProcessCocoa.mm:
2177         (WebKit::WebProcess::platformInitializeWebProcess):
2178
2179 2015-07-26  Dan Bernstein  <mitz@apple.com>
2180
2181         Suppressed an Xcode 7 warning about including a nib in an iOS build product.
2182
2183         * Configurations/BaseLegacyProcess.xcconfig: Exclude xib files on iOS.
2184         * Configurations/BaseXPCService.xcconfig: Ditto.
2185
2186 2015-07-24  Ryosuke Niwa  <rniwa@webkit.org>
2187
2188         iOS 8 build fix attempt after r187215.
2189
2190         * UIProcess/API/Cocoa/WKWebView.mm:
2191         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Deleted.
2192
2193 2015-07-24  Yongjun Zhang  <yongjun_zhang@apple.com>
2194
2195         Don't create UIWebFormAccessory if we don't require accessory view.
2196         https://bugs.webkit.org/show_bug.cgi?id=147283
2197
2198         Don't try to intialize _formAccessoryView if requiresAccessoryView returns false since we don't
2199         need it yet.
2200
2201         Reviewed by Dan Bernstein.
2202
2203         * UIProcess/ios/WKContentViewInteraction.mm:
2204         (-[WKContentView inputAccessoryView]):
2205
2206 2015-07-24  Anders Carlsson  <andersca@apple.com>
2207
2208         WKWebsiteDataStore remove methods don't properly delete cookies
2209         https://bugs.webkit.org/show_bug.cgi?id=147282
2210         rdar://problem/21948230
2211
2212         Reviewed by Sam Weinig.
2213
2214         * NetworkProcess/NetworkProcess.cpp:
2215         (WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
2216         Call deleteCookiesForHostnames instead of iterating over each hostname.
2217
2218         * WebProcess/Cookies/WebCookieManager.cpp:
2219         (WebKit::WebCookieManager::deleteCookiesForHostname):
2220         Call deleteCookiesForHostnames.
2221
2222 2015-07-24  Anders Carlsson  <andersca@apple.com>
2223
2224         Networking process crash in NetworkConnectionToWebProcess::convertMainResourceLoadToDownload while attempting to download a blob
2225         https://bugs.webkit.org/show_bug.cgi?id=147276
2226         rdar://problem/21423353
2227
2228         Reviewed by Andreas Kling.
2229
2230         We currently don't support downloading blobs, so for now just bail if we encounter a null loader inside
2231         convertMainResourceLoadToDownload (which happens when trying to download a blob URL).
2232
2233         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2234         (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
2235         Rewrite the assertion to be more clear - it's fine to do an extra hash lookup in debug builds.
2236
2237         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2238         Bail if loader is null.
2239
2240 2015-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2241
2242         Remove runtime flags for symbols
2243         https://bugs.webkit.org/show_bug.cgi?id=147246
2244
2245         Reviewed by Alex Christensen.
2246
2247         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2248         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2249
2250 2015-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2251
2252         Object.getOwnPropertySymbols on large list takes very long
2253         https://bugs.webkit.org/show_bug.cgi?id=146137
2254
2255         Reviewed by Mark Lam.
2256
2257         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2258         (WebKit::NPJSObject::enumerate):
2259
2260 2015-07-24  Simon Fraser  <simon.fraser@apple.com>
2261
2262         Recode.net gets into a continual resize loop in split fullscreen
2263         https://bugs.webkit.org/show_bug.cgi?id=147266
2264         rdar://problem/21409047
2265
2266         Reviewed by Tim Horton.
2267         
2268         In split fullscreen, we use fixed layout and scale to shrink pages down to
2269         fit a given width. This is re-evaluated every time the document width changes.
2270         However some pages, like recode.net, end up continually resizing because
2271         when laid out unconstrained they use a narrower width than when laid out with
2272         a fixed layout size. In fixed layout, they actually use more width than the fixed
2273         layout size.
2274         
2275         Detect and break this cycle by just not re-scaling when we've done one fixed layout,
2276         and the document is now taking more width than the fixed layout width.
2277
2278         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2279         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2280
2281 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2282
2283         [GStreamer] Crashes during plugin installation
2284         https://bugs.webkit.org/show_bug.cgi?id=144099
2285
2286         Reviewed by Philippe Normand.
2287
2288         Move the missing plugins installation to the UI process, ensuring
2289         there's a single installer running and cancelling the request when
2290         the page is closed or the media player is deleted.
2291
2292         * PlatformEfl.cmake: Add new files to compilation.
2293         * PlatformGTK.cmake: Ditto.
2294         * UIProcess/WebPageProxy.h:
2295         * UIProcess/WebPageProxy.messages.in: Add
2296         RequestInstallMissingMediaPlugins message.
2297         * UIProcess/gstreamer/WebPageProxyGStreamer.cpp: Added.
2298         (WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Call
2299         gst_install_plugins_async() and send
2300         DidEndRequestInstallMissingMediaPlugins message back to the web
2301         process when done.
2302         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2303         (WebKit::WebChromeClient::requestInstallMissingMediaPlugins): Call
2304         WebPage::requestInstallMissingMediaPlugins().
2305         * WebProcess/WebCoreSupport/WebChromeClient.h:
2306         * WebProcess/WebPage/WebPage.cpp:
2307         (WebKit::WebPage::close): Invalidate the install missing plugins
2308         request callback.
2309         * WebProcess/WebPage/WebPage.h:
2310         * WebProcess/WebPage/WebPage.messages.in: Add
2311         DidEndRequestInstallMissingMediaPlugins message.
2312         * WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp: Added.
2313         (WebKit::WebPage::requestInstallMissingMediaPlugins): Send
2314         RequestInstallMissingMediaPlugins to the UI process or complete
2315         the request early if there's already a request in progress.
2316         (WebKit::WebPage::didEndRequestInstallMissingMediaPlugins):
2317         Complete the request.
2318
2319 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2320
2321         Unreviewed. Fix the build with MEDIA_STREAM disabled after r187282.
2322
2323         RealtimeMediaSource is only defined when MEDIA_STREAM is enabled.
2324
2325         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2326         * UIProcess/UserMediaPermissionRequestProxy.h:
2327
2328 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2329
2330         REGRESSION(r187100): [GTK] ASSERTION FAILED: Attempt to access post layout data before receiving it when typing backspace
2331         https://bugs.webkit.org/show_bug.cgi?id=147196
2332
2333         Reviewed by Žan Doberšek.
2334
2335         Do not try to use the PostLayoutData from EditorState when
2336         isMissingPostLayoutData is true. That happens when there's a
2337         layout pending, and EditorStateChanged is sent again after that
2338         layout with the post layout data. So we can just return early and
2339         wait until the second message.
2340
2341         * UIProcess/API/gtk/WebKitEditorState.cpp:
2342         (webkitEditorStateChanged):
2343         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2344         (webkitWebViewBaseUpdateTextInputState):
2345
2346 2015-07-23  Alex Christensen  <achristensen@webkit.org>
2347
2348         Fix 32-bit build after r187272.
2349
2350         * UIProcess/mac/PageClientImpl.mm:
2351         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
2352         Added some WK_API_ENABLED.
2353
2354 2015-07-23  Dan Bernstein  <mitz@apple.com>
2355
2356         <rdar://problem/21929532> REGRESSION (r184026): Safari AutoFill with Contact info for phone number is broken
2357         https://bugs.webkit.org/show_bug.cgi?id=147249
2358
2359         Reviewed by Sam Weinig.
2360
2361         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2362         (encodeObject): Use encodeString only for strings that encode as NSString or
2363         NSMutableString. It can’t encode arbitrary NSString subclasses.
2364         (decodeObject): Use decodeString for NSMutableString as well.
2365
2366 2015-07-23  Zalan Bujtas  <zalan@apple.com>
2367
2368         [iOS] REGRESSION (187131): Loading CuteOverload zooms in to the top left corner.
2369         https://bugs.webkit.org/show_bug.cgi?id=147251
2370         rdar://problem/21953359
2371
2372         Calling zoomToRect() should result in essentially the same zoom scale as if we
2373         called setZoomScale with the new page scale factor.
2374  
2375         Reviewed by Benjamin Poulain.
2376
2377         * UIProcess/API/Cocoa/WKWebView.mm:
2378         (-[WKWebView _didCommitLayerTree:]):
2379
2380 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
2381
2382         Linking WebKit2 to be able to grab media sources from a UID
2383         https://bugs.webkit.org/show_bug.cgi?id=147202
2384         <rdar://problem/21947608>
2385
2386         Reviewed by Brent Fulgham.
2387
2388         * UIProcess/UserMediaPermissionRequestProxy.cpp:
2389         (WebKit::UserMediaPermissionRequestProxy::getDeviceNameForUID):
2390         * UIProcess/UserMediaPermissionRequestProxy.h:
2391
2392 2015-07-23  Alex Christensen  <achristensen@webkit.org>
2393
2394         Remove compile and runtime flags for promises.
2395         https://bugs.webkit.org/show_bug.cgi?id=147244
2396
2397         Reviewed by Yusuke Suzuki.
2398
2399         * Configurations/FeatureDefines.xcconfig:
2400         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2401         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2402
2403 2015-07-21  Jer Noble  <jer.noble@apple.com>
2404
2405         Notify the UI delegate when a MediaDocument's natural size changes
2406         https://bugs.webkit.org/show_bug.cgi?id=147182
2407
2408         Reviewed by Simon Fraser.
2409
2410         Pipe notifications of media document natural size changes up from the chrome client, through
2411         to the UIProcess,  through the page client, through the WKWebView, to the UIDelegate.
2412
2413         * UIProcess/API/APIUIClient.h:
2414         (API::UIClient::mediaDocumentNaturalSizeChanged):
2415         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2416         * UIProcess/API/Cocoa/WKWebView.mm:
2417         (-[WKWebView _mediaDocumentNaturalSizeChanged:]):
2418         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2419         * UIProcess/Cocoa/UIDelegate.h:
2420         * UIProcess/Cocoa/UIDelegate.mm:
2421         (WebKit::UIDelegate::setDelegate):
2422         (WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged):
2423         * UIProcess/PageClient.h:
2424         * UIProcess/WebPageProxy.cpp:
2425         (WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged):
2426         * UIProcess/WebPageProxy.h:
2427         * UIProcess/WebPageProxy.messages.in:
2428         * UIProcess/ios/PageClientImplIOS.h:
2429         * UIProcess/ios/PageClientImplIOS.mm:
2430         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
2431         * UIProcess/mac/PageClientImpl.h:
2432         * UIProcess/mac/PageClientImpl.mm:
2433         (WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
2434         * WebProcess/WebCoreSupport/WebChromeClient.h:
2435         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2436         (WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged):
2437         * WebProcess/WebPage/WebPage.cpp:
2438         (WebKit::WebPage::mediaDocumentNaturalSizeChanged):
2439         * WebProcess/WebPage/WebPage.h:
2440         * UIProcess/API/gtk/PageClientImpl.h: Add default, empty implementation of new pure-virtual method.
2441         * UIProcess/efl/WebViewEfl.h: Ditto.
2442
2443 2015-07-23  Enrica Casucci  <enrica@apple.com>
2444
2445         Removing one incorrect annotation from the previous change.
2446
2447         Unreviewed.
2448
2449         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2450
2451 2015-07-23  Enrica Casucci  <enrica@apple.com>
2452
2453         [iOS] Add another preview delegate for didDismissPreview.
2454         https://bugs.webkit.org/show_bug.cgi?id=147241
2455         rdar://problem/21664211
2456
2457         Reviewed by Tim Horton and Yongjun Zhang.
2458
2459         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2460         * UIProcess/ios/WKContentViewInteraction.mm:
2461         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
2462
2463 2015-07-23  Dan Bernstein  <mitz@apple.com>
2464
2465         <rdar://problem/21910578> Second pass at [iOS] Keyboard shortcuts that take focus away from the web view end up typing a letter into the newly focused field
2466         https://bugs.webkit.org/show_bug.cgi?id=146732
2467
2468         Reviewed by Darin Adler.
2469
2470         * UIProcess/ios/WKContentViewInteraction.mm:
2471         (-[WKContentView _interpretKeyEvent:isCharEvent:]): Rather than checking if the view is
2472         first responder, which it might still be when the Web Content processes invokes this
2473         callback, check if we are in editable content before forwarding the event to the keyboard.
2474
2475 2015-07-23  Jer Noble  <jer.noble@apple.com>
2476
2477         Unreviewed build fix after r187251; rename flag -> allows.
2478
2479         * UIProcess/WebPageProxy.cpp:
2480         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
2481
2482 2015-07-23  Alex Christensen  <achristensen@webkit.org>
2483
2484         [iOS] Unreviewed build fix after r187251.
2485
2486         * UIProcess/WebPageProxy.cpp:
2487         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback):
2488         Use the correct name for the boolean to pass along to SetAllowsMediaDocumentInlinePlayback.
2489
2490 2015-07-23  Enrica Casucci  <enrica@apple.com>
2491
2492         One more iOS build fix.
2493
2494         Unreviewed.
2495
2496         * Platform/spi/ios/UIKitSPI.h:
2497         * UIProcess/ios/WKContentViewInteraction.h:
2498
2499 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
2500
2501         Bridged passing lists of devices between the UIProcess and the WebProcess
2502         https://bugs.webkit.org/show_bug.cgi?id=147056
2503         <rdar://problem/21883094>
2504
2505         Reviewed by Brent Fulgham.
2506
2507         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Modified file
2508         to reflect changes made to the header in the .messages.in file
2509         (WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Ditto
2510         (WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision):
2511         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Ditto
2512         * UIProcess/UserMediaPermissionRequestProxy.cpp: Ditto
2513         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
2514         * UIProcess/UserMediaPermissionRequestProxy.h:
2515         (WebKit::UserMediaPermissionRequestProxy::create):
2516         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsVideo):
2517         (WebKit::UserMediaPermissionRequestProxy::deviceUIDsAudio):
2518         * UIProcess/WebPageProxy.cpp:
2519         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
2520         * UIProcess/WebPageProxy.h:
2521         * UIProcess/WebPageProxy.messages.in: Changed heading
2522         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
2523         (WebKit::UserMediaPermissionRequestManager::startRequest):
2524         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
2525         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
2526         * WebProcess/WebPage/WebPage.cpp:
2527         (WebKit::WebPage::didReceiveUserMediaPermissionDecision):
2528         * WebProcess/WebPage/WebPage.h:
2529         * WebProcess/WebPage/WebPage.messages.in: Changed heading
2530
2531 2015-07-23  Yongjun Zhang  <yongjun_zhang@apple.com>
2532
2533         Adopt the new _previewItemControllerDidCancelPreview delegate method.
2534         https://bugs.webkit.org/show_bug.cgi?id=147238
2535
2536         Don't allow hightlight long press to trigger tap if the link preview is cancelled because
2537         the link is not preview-able.
2538
2539         Reviewed by Beth Dakin.
2540
2541         * UIProcess/ios/WKContentViewInteraction.mm:
2542         (-[WKContentView _previewItemControllerDidCancelPreview:]): 
2543
2544 2015-07-23  Enrica Casucci  <enrica@apple.com>
2545
2546         iOS build fix after http://trac.webkit.org/changeset/187238.
2547
2548         Unreviewed.
2549
2550         * Platform/spi/ios/UIKitSPI.h:
2551
2552 2015-07-23  Jer Noble  <jer.noble@apple.com>
2553
2554         [WK2] Add a WKWebView property for whether the view is displaying a media document
2555         https://bugs.webkit.org/show_bug.cgi?id=147233
2556
2557         Reviewed by Beth Dakin.
2558
2559         Add a _isDisplayingStandaloneMediaDocument property, which queries the frame for whether
2560         the current MIME type is one which our media engines support.
2561
2562         * UIProcess/API/Cocoa/WKWebView.mm:
2563         (-[WKWebView _isDisplayingStandaloneMediaDocument]):
2564         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2565         * UIProcess/WebFrameProxy.cpp:
2566         (WebKit::WebFrameProxy::isDisplayingStandaloneMediaDocument):
2567         * UIProcess/WebFrameProxy.h:
2568
2569 2015-07-21  Jer Noble  <jer.noble@apple.com>
2570
2571         [iOS] Add an explicit API to allow media documents to (temporarily) play inline
2572         https://bugs.webkit.org/show_bug.cgi?id=147181
2573
2574         Reviewed by Beth Dakin.
2575
2576         Add a WKWebView(Private) API which allows MediaDocuments loaded by the view to play their contents inline, regardless
2577         of whether inline playback is restricted on the current device.
2578
2579         * UIProcess/API/Cocoa/WKWebView.mm:
2580         (-[WKWebView _setRequiresUserActionForMediaPlayback:]): Added. Pass through to WebPageProxy.
2581         (-[WKWebView _allowsMediaDocumentInlinePlayback]): Ditto.
2582         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2583         * UIProcess/WebPageProxy.cpp:
2584         (WebKit::WebPageProxy::allowsMediaDocumentInlinePlayback): Simple getter.
2585         (WebKit::WebPageProxy::setAllowsMediaDocumentInlinePlayback): Set, and conditionally pass the new value to WebPage.
2586         * UIProcess/WebPageProxy.h:
2587         * WebProcess/WebPage/WebPage.cpp:
2588         (WebKit::WebPage::setAllowsMediaDocumentInlinePlayback): Set, and conditionally notify WebCore page of the change.
2589         * WebProcess/WebPage/WebPage.h:
2590         (WebKit::WebPage::allowsMediaDocumentInlinePlayback): Simple getter.
2591         * WebProcess/WebPage/WebPage.messages.in: Add new messages.
2592
2593 2015-07-23  Beth Dakin  <bdakin@apple.com>
2594
2595         Should not allow previews of 1x1 images
2596         https://bugs.webkit.org/show_bug.cgi?id=147237
2597         -and corresponding-
2598         rdar://problem/21968460
2599
2600         Reviewed by Tim Horton.
2601
2602         1x1 images are used on some sites to cover actual images, which leads to a 
2603         misleading preview experience. There is not any reason why you would really 
2604         want to preview an image this small nor any reason to believe that the 
2605         preview would result in anything useful.
2606         * WebProcess/WebPage/ios/WebPageIOS.mm:
2607         (WebKit::WebPage::getPositionInformation):
2608
2609 2015-07-23  Brady Eidson  <beidson@apple.com>
2610
2611         Crash in WebPlatformStrategies::createPingHandle - Deref a null NetworkingContext.
2612         <rdar://problem/21949735> and https://bugs.webkit.org/show_bug.cgi?id=147227
2613
2614         Reviewed by Alexey Proskuryakov.
2615
2616         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2617         (WebKit::WebPlatformStrategies::createPingHandle): Skip it if there's a null NetworkingContext.
2618
2619 2015-07-23  Tim Horton  <timothy_horton@apple.com>
2620
2621         Remove some files that should have been removed with WebKit2 Windows
2622         https://bugs.webkit.org/show_bug.cgi?id=147223
2623
2624         Reviewed by Csaba Osztrogonác.
2625
2626         * Shared/API/c/cf/WKURLRequestCF.cpp: Removed.
2627         * Shared/API/c/cf/WKURLRequestCF.h: Removed.
2628         * Shared/API/c/cf/WKURLResponseCF.cpp: Removed.
2629         * Shared/API/c/cf/WKURLResponseCF.h: Removed.
2630
2631 2015-07-23  Timothy Horton  <timothy_horton@apple.com>
2632
2633         Fix the build
2634
2635         * Platform/spi/ios/UIKitSPI.h:
2636
2637 2015-07-23  Tim Horton  <timothy_horton@apple.com>
2638
2639         Remove files that were meant to be removed in r173929
2640
2641         * WebProcess/WebPage/mac/WebInspectorMac.mm: Removed.
2642
2643 2015-07-23  Tim Horton  <timothy_horton@apple.com>
2644
2645         Remove files that were meant to be removed in r168213
2646
2647         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h: Removed.
2648
2649 2015-07-23  Tim Horton  <timothy_horton@apple.com>
2650
2651         Remove files that were meant to be removed in r168229
2652
2653         * UIProcess/API/Cocoa/WKSession.h: Removed.
2654         * UIProcess/API/Cocoa/WKSession.mm: Removed.
2655         * UIProcess/API/Cocoa/WKSessionInternal.h: Removed.
2656
2657 2015-07-23  Tim Horton  <timothy_horton@apple.com>
2658
2659         Remove files that were meant to be removed in r165014
2660
2661         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Removed.
2662         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Removed.
2663
2664 2015-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2665
2666         [GTK] Add API to allow executing editing commands that require an argument
2667         https://bugs.webkit.org/show_bug.cgi?id=146781
2668
2669         Reviewed by Gustavo Noronha Silva.
2670
2671         Commands like InsertImage or CreateLink receive an argument, but
2672         we only have webkit_web_view_execute_editing_command() that
2673         doesn't receive any argument. This patch adds
2674         webkit_web_view_execute_editing_command_with_argument() for those
2675         commands. It also adds WEBKIT_EDITING_COMMAND_INSERT_IMAGE and
2676         WEBKIT_EDITING_COMMAND_CREATE_LINK to the predefined editing commands.
2677
2678         * UIProcess/API/gtk/WebKitEditingCommands.h: Add
2679         WEBKIT_EDITING_COMMAND_INSERT_IMAGE and WEBKIT_EDITING_COMMAND_CREATE_LINK.
2680         * UIProcess/API/gtk/WebKitWebView.cpp:
2681         (webkit_web_view_execute_editing_command_with_argument):
2682         * UIProcess/API/gtk/WebKitWebView.h:
2683         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
2684         * UIProcess/WebPageProxy.cpp:
2685         (WebKit::WebPageProxy::executeEditCommand): Pass also the argument
2686         to the message.
2687         * UIProcess/WebPageProxy.h:
2688         * WebProcess/WebPage/WebPage.cpp:
2689         (WebKit::WebPage::executeEditCommand): Add the argument parameter
2690         to the message handler.
2691         * WebProcess/WebPage/WebPage.h:
2692         * WebProcess/WebPage/WebPage.messages.in: Add argument parameter
2693         to ExecuteEditCommand message.
2694
2695 2015-07-22  Sukolsak Sakshuwong  <sukolsak@gmail.com>
2696
2697         Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
2698         https://bugs.webkit.org/show_bug.cgi?id=147212
2699
2700         Reviewed by Filip Pizlo.
2701
2702         * Configurations/FeatureDefines.xcconfig:
2703
2704 2015-07-22  James Savage  <james.savage@apple.com>
2705
2706         Use updated CoreAnimation snapshot SPI.
2707         https://bugs.webkit.org/show_bug.cgi?id=147197
2708         <rdar://problem/21032083>
2709
2710         Reviewed by Tim Horton.
2711         Patch by James Savage.
2712
2713         * Platform/spi/ios/UIKitSPI.h:
2714         * UIProcess/API/Cocoa/WKWebView.mm:
2715         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2716
2717 2015-07-22  Timothy Horton  <timothy_horton@apple.com>
2718
2719         Fix the build
2720
2721         * UIProcess/ios/WKContentViewInteraction.mm:
2722         (-[WKContentView setupInteraction]):
2723         (-[WKContentView cleanupInteraction]):
2724
2725 2015-07-22  Commit Queue  <commit-queue@webkit.org>
2726
2727         Unreviewed, rolling out r187196.
2728         https://bugs.webkit.org/show_bug.cgi?id=147213
2729
2730         broke all the iOS builds (Requested by thorton on #webkit).
2731
2732         Reverted changeset:
2733
2734         "Use updated CoreAnimation snapshot SPI."
2735         https://bugs.webkit.org/show_bug.cgi?id=147197
2736         http://trac.webkit.org/changeset/187196
2737
2738 2015-07-22  Tim Horton  <timothy_horton@apple.com>
2739
2740         Fix the build
2741
2742         * UIProcess/ios/WKContentViewInteraction.h:
2743
2744 2015-07-22  Tim Horton  <timothy_horton@apple.com>
2745
2746         [iOS] Adjust the preview architecture
2747         https://bugs.webkit.org/show_bug.cgi?id=147203
2748         <rdar://problem/21945775>
2749
2750         Reviewed by Simon Fraser.
2751
2752         * UIProcess/ios/WKContentViewInteraction.mm:
2753         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2754         Link previews should win over image previews if both are possible.
2755
2756 2015-07-22  James Savage  <james.savage@apple.com>
2757
2758         Use updated CoreAnimation snapshot SPI.
2759         https://bugs.webkit.org/show_bug.cgi?id=147197
2760
2761         Reviewed by Tim Horton.
2762
2763         * Platform/spi/ios/UIKitSPI.h:
2764         * UIProcess/API/Cocoa/WKWebView.mm:
2765         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2766
2767 2015-07-22  Tim Horton  <timothy_horton@apple.com>
2768
2769         [iOS] Adjust the preview architecture
2770         https://bugs.webkit.org/show_bug.cgi?id=147203
2771         <rdar://problem/21945775>
2772
2773         Reviewed by Beth Dakin.
2774
2775         * Platform/spi/ios/UIKitSPI.h:
2776         * UIProcess/API/Cocoa/WKWebView.mm:
2777         (-[WKWebView _setAllowsLinkPreview:]): Deleted.
2778         * UIProcess/ios/WKContentView.mm:
2779         (-[WKContentView willMoveToWindow:]): Deleted.
2780         * UIProcess/ios/WKContentViewInteraction.h:
2781         * UIProcess/ios/WKContentViewInteraction.mm:
2782         (-[WKContentView setupInteraction]):
2783         (-[WKContentView cleanupInteraction]):
2784         (-[WKContentView _registerPreview]):
2785         (-[WKContentView _unregisterPreview]):
2786         (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
2787         (-[WKContentView _dataForPreviewItemController:atPosition:type:]):
2788         (-[WKContentView _presentationRectForPreviewItemController:]):
2789         (-[WKContentView _presentedViewControllerForPreviewItemController:]):
2790         (-[WKContentView _previewItemController:commitPreview:]):
2791         (-[WKContentView _previewItemController:willPresentPreview:forPosition:inSourceView:]):
2792         (-[WKContentView _previewItemController:didDismissPreview:committing:]):
2793         (-[WKContentView _presentationSnapshotForPreviewItemController:]):
2794         (-[WKContentView _presentationRectsForPreviewItemController:]):
2795         (-[WKContentView gestureRecognizerShouldBegin:]): Deleted.
2796         (-[WKContentView _registerPreviewInWindow:]): Deleted.
2797         (-[WKContentView _unregisterPreviewInWindow:]): Deleted.
2798         (-[WKContentView previewViewControllerForPosition:inSourceView:]): Deleted.
2799         (-[WKContentView commitPreviewViewController:]): Deleted.
2800         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]): Deleted.
2801         (-[WKContentView didDismissPreviewViewController:committing:]): Deleted.
2802         Register and unregister in setup/cleanupInteraction instead of when moving between windows.
2803         Implement 'shouldBegin' instead of interacting directly with the recognizer.
2804         Make use of system enums instead of our own.
2805         Let UIPreviewItemController handle shrink-wrapping and the indicator view.
2806
2807 2015-07-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2808
2809         [EFL] Support indexeddb for WK2
2810         https://bugs.webkit.org/show_bug.cgi?id=145867
2811
2812         Reviewed by Csaba Osztrogonác.
2813
2814         Add stub implementation for indexeddb. Move KeyedDecoder and KeyedEncoder from gtk to glib
2815         in order to share it between GTK and EFL ports.
2816
2817         * DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp:
2818         * DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
2819         (WebKit::DatabaseProcessMainUnix):
2820         * PlatformEfl.cmake:
2821         * PlatformGTK.cmake:
2822         * Shared/glib/KeyedDecoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.cpp.
2823         (WebKit::KeyedDecoder::KeyedDecoder):
2824         (WebKit::KeyedDecoder::~KeyedDecoder):
2825         (WebKit::KeyedDecoder::dictionaryFromGVariant):
2826         (WebKit::KeyedDecoder::decodeBytes):
2827         (WebKit::KeyedDecoder::decodeSimpleValue):
2828         (WebKit::KeyedDecoder::decodeBool):
2829         (WebKit::KeyedDecoder::decodeUInt32):
2830         (WebKit::KeyedDecoder::decodeInt32):
2831         (WebKit::KeyedDecoder::decodeInt64):
2832         (WebKit::KeyedDecoder::decodeFloat):
2833         (WebKit::KeyedDecoder::decodeDouble):
2834         (WebKit::KeyedDecoder::decodeString):
2835         (WebKit::KeyedDecoder::beginObject):
2836         (WebKit::KeyedDecoder::endObject):
2837         (WebKit::KeyedDecoder::beginArray):
2838         (WebKit::KeyedDecoder::beginArrayElement):
2839         (WebKit::KeyedDecoder::endArrayElement):
2840         (WebKit::KeyedDecoder::endArray):
2841         * Shared/glib/KeyedDecoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedDecoder.h.
2842         * Shared/glib/KeyedEncoder.cpp: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.cpp.
2843         (WebKit::KeyedEncoder::KeyedEncoder):
2844         (WebKit::KeyedEncoder::~KeyedEncoder):
2845         (WebKit::KeyedEncoder::encodeBytes):
2846         (WebKit::KeyedEncoder::encodeBool):
2847         (WebKit::KeyedEncoder::encodeUInt32):
2848         (WebKit::KeyedEncoder::encodeInt32):
2849         (WebKit::KeyedEncoder::encodeInt64):
2850         (WebKit::KeyedEncoder::encodeFloat):
2851         (WebKit::KeyedEncoder::encodeDouble):
2852         (WebKit::KeyedEncoder::encodeString):
2853         (WebKit::KeyedEncoder::beginObject):
2854         (WebKit::KeyedEncoder::endObject):
2855         (WebKit::KeyedEncoder::beginArray):
2856         (WebKit::KeyedEncoder::beginArrayElement):
2857         (WebKit::KeyedEncoder::endArrayElement):
2858         (WebKit::KeyedEncoder::endArray):
2859         (WebKit::KeyedEncoder::finishEncoding):
2860         * Shared/glib/KeyedEncoder.h: Renamed from Source/WebKit2/Shared/gtk/KeyedEncoder.h.
2861         * UIProcess/Databases/efl/DatabaseProcessProxyEfl.cpp: Copied from Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
2862         (WebKit::DatabaseProcessProxy::platformGetLaunchOptions):
2863
2864 2015-07-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2865
2866         [Seccomp] Canonicalize filesystem path when whitelisting it
2867         https://bugs.webkit.org/show_bug.cgi?id=142986
2868
2869         Reviewed by Žan Doberšek.
2870
2871         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
2872         (WebKit::canonicalizeFileName):
2873         (WebKit::SyscallPolicy::addFilePermission):
2874         (WebKit::SyscallPolicy::addDirectoryPermission):
2875
2876 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
2877
2878         Add logging for TiledCoreAnimationDrawingArea resizing
2879         https://bugs.webkit.org/show_bug.cgi?id=147180
2880
2881         Reviewed by Tim Horton.
2882
2883         Add a "Resize" log channel for WebKit2, and use it to log data in scaleViewToFitDocumentIfNeeded().
2884
2885         * Platform/Logging.h:
2886         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2887         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
2888
2889 2015-07-22  Sam Weinig  <sam@webkit.org>
2890
2891         Encode/Decode underlying errors when serializing NSErrors
2892         <rdar://problem/21818117>
2893         https://bugs.webkit.org/show_bug.cgi?id=147199
2894
2895         Reviewed by Anders Carlsson.
2896
2897         * Shared/mac/WebCoreArgumentCodersMac.mm:
2898         (IPC::ArgumentCoder<CertificateInfo>::decode):
2899         (IPC::encodeNSError):
2900         (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
2901         (IPC::decodeNSError):
2902         (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
2903         Break out encoding/decoding of the NSErrors into a helpers so they can be called
2904         for the underlying error.
2905
2906 2015-07-22  Beth Dakin  <bdakin@apple.com>
2907
2908         Animated images should animate in previews
2909         https://bugs.webkit.org/show_bug.cgi?id=147173
2910         -and corresponding-
2911         rdar://problem/21637698
2912
2913         Reviewed by Dan Bernstein.
2914
2915         InteractionInformationAtPosition needs to know if it’s an animated image.
2916         * Shared/InteractionInformationAtPosition.cpp:
2917         (WebKit::InteractionInformationAtPosition::encode):
2918         (WebKit::InteractionInformationAtPosition::decode):
2919         * Shared/InteractionInformationAtPosition.h:
2920
2921         New delegate method to create a link preview view controller for animated 
2922         images.
2923         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2924
2925         Treat animated images more like link previews.
2926         * UIProcess/ios/WKContentViewInteraction.mm:
2927         (-[WKContentView previewViewControllerForPosition:inSourceView:]):
2928
2929         Set info.isAnimatedImage
2930         * WebProcess/WebPage/ios/WebPageIOS.mm:
2931         (WebKit::WebPage::getPositionInformation):
2932
2933 2015-07-22  Michael Catanzaro  <mcatanzaro@igalia.com>
2934
2935         [Seccomp Filters] Add helpers to get XDG base directory locations
2936         https://bugs.webkit.org/show_bug.cgi?id=142982
2937
2938         Reviewed by Zan Dobersek.
2939
2940         * PlatformEfl.cmake:
2941         * PlatformGTK.cmake:
2942         * Shared/linux/SeccompFilters/XDGBaseDirectory.h: Added.
2943         * Shared/linux/SeccompFilters/XDGBaseDirectoryGLib.cpp: Added.
2944         (WebKit::userHomeDirectory):
2945         (WebKit::userCacheDirectory):
2946         (WebKit::userConfigDirectory):
2947         (WebKit::userDataDirectory):
2948         (WebKit::userRuntimeDirectory):
2949
2950 2015-07-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2951
2952         [EFL][WK2] EWK2ContextTestMultipleProcesses.ewk_context_network_process_model fails to pass
2953         https://bugs.webkit.org/show_bug.cgi?id=142967
2954
2955         Reviewed by Csaba Osztrogonác.
2956
2957         Though processIdentifier() can return 0 when a page is not closed, ewk_context_network_process_model has
2958         not been considered process id can be 0. This patch adds a protection logic which doesn't test when process
2959         id is 0 at the moment.
2960
2961         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2962         (TEST_F):
2963
2964 2015-07-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2965
2966         Unreviewed. Fix some warnings when generating GTK+ HTML API docs.
2967
2968         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
2969         WebKitWebsiteDataManager and WebKitWebEditor.
2970
2971 2015-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2972
2973         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.4 release.
2974
2975         * gtk/NEWS: Add release notes for 2.9.4.
2976
2977 2015-07-21  Joseph Pecoraro  <pecoraro@apple.com>
2978
2979         Web Inspector: [Mac] "Open Image In New Window" context menu item does nothing on an image
2980         https://bugs.webkit.org/show_bug.cgi?id=147175
2981
2982         Reviewed by Timothy Hatcher.
2983
2984         * UIProcess/mac/WebInspectorProxyMac.mm:
2985         (WebKit::getContextMenuFromProposedMenu):
2986         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2987         Remove default context menus that won't work in the inspector page.
2988
2989 2015-07-21  Benjamin Poulain  <benjamin@webkit.org>
2990
2991         [Content Extensions] Use a jump table when consecutive transitions have different targets
2992         https://bugs.webkit.org/show_bug.cgi?id=147099
2993
2994         Reviewed by Alex Christensen.
2995
2996         * UIProcess/API/APIUserContentExtensionStore.h:
2997
2998 2015-07-21  Daniel Bates  <dabates@apple.com>
2999
3000         Fix the build following <https://trac.webkit.org/changeset/187129>
3001         (https://bugs.webkit.org/show_bug.cgi?id=147112)
3002
3003         * UIProcess/WebProcessProxy.cpp:
3004         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Guard implementation with PLATFORM(IOS)
3005         since this logic is specific to the iOS port.
3006
3007 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
3008
3009         Rename the 'View' log channel to 'Printing'
3010         https://bugs.webkit.org/show_bug.cgi?id=147172
3011
3012         Reviewed by Zalan Bujtas.
3013
3014         "View" was a terrible name for a log channel that was all about printing.
3015         Sort the log channels.
3016
3017         * Platform/Logging.h:
3018         * UIProcess/API/mac/WKView.mm:
3019         (-[WKView drawRect:]):
3020         (-[WKView printOperationWithPrintInfo:forFrame:]):
3021         * UIProcess/mac/WKPrintingView.mm:
3022         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
3023         (pageDidComputePageRects):
3024         (-[WKPrintingView knowsPageRange:]):
3025         (-[WKPrintingView drawRect:]):
3026         (-[WKPrintingView rectForPage:]):
3027         (-[WKPrintingView beginDocument]):
3028         (-[WKPrintingView endDocument]):
3029
3030 2015-07-21  Zalan Bujtas  <zalan@apple.com>
3031
3032         [iOS] Menu drop down such as on nike.com does not stay
3033         https://bugs.webkit.org/show_bug.cgi?id=147047
3034         rdar://problem/21046961
3035
3036         Reviewed by Benjamin Poulain.
3037
3038         This is a workaround for unintended scrolling while scaling.
3039         (Based on Benjamin Poulain's WIP patch for webkit.org/b/136904)
3040
3041         In certain cases when scaling would result in moving the scrollview (which would trigger
3042         a scroll event on WebCore side), zoomRect is called instead of setZoomScale to ensure
3043         that the scroll position stays intact.
3044
3045         * UIProcess/API/Cocoa/WKWebView.mm:
3046         (-[WKWebView _didCommitLayerTree:]):
3047
3048 2015-07-21  Daniel Bates  <dabates@apple.com>
3049
3050         WTFCrash() in WebKit::WebProcess::networkConnection()
3051         https://bugs.webkit.org/show_bug.cgi?id=147112
3052         <rdar://problem/18477459>
3053
3054         Reviewed by Gavin Barraclough.
3055
3056         Fixes an issue where a newly launched network process may be jetsam'd because it has not
3057         taken a process assertion between the time it was launched and the time when a web process
3058         makes use of it.
3059
3060         Initially a network process does not have a process assertion. A process assertion is taken
3061         (if one has not been taken) for the network process when a process assertion is taken for at
3062         least one web process. When the network process crashes a WebProcess may ultimately launch a
3063         new network process in WebProcess::networkConnection(). The new network process may be jetsam'd
3064         immediately when the system is under some measure pressure because it has a low jetsam priority,
3065         0 (since it does not have a process assertion and higher priority implies that a process is less
3066         likely to be jetsam'd). And the logic in WebProcess::networkConnection() explicitly calls
3067         CRASH() if the newly launched network process crashes immediately. Towards preventing the newly
3068         launched network process from being jetsam'd we should obtain a process assertion for it.
3069
3070         * UIProcess/WebProcessPool.cpp:
3071         (WebKit::WebProcessPool::WebProcessPool): Initialize m_didNetworkProcessCrash to false.
3072         (WebKit::WebProcessPool::ensureNetworkProcess): If the network process crashed (m_didNetworkProcessCrash == true)
3073         then tell each process in the pool to reinstate their network activity token for the new network process.
3074         (WebKit::WebProcessPool::networkProcessCrashed): Set m_didNetworkProcessCrash to true when the
3075         network process crashed.
3076         * UIProcess/WebProcessPool.h:
3077         * UIProcess/WebProcessProxy.cpp:
3078         (WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState): Added.
3079         (WebKit::WebProcessProxy::didSetAssertionState): Add assert to ensure we never have both
3080         a background- and foreground- activity token for the network process.
3081         * UIProcess/WebProcessProxy.h:
3082
3083 2015-07-21  Daniel Bates  <dabates@apple.com>
3084
3085         ASSERT(m_suspendMessageCount >= 0) fails in ProcessThrottler::didCancelProcessSuspension()
3086         when WebContent process crashes; Network process may never voluntarily suspend
3087         https://bugs.webkit.org/show_bug.cgi?id=147122
3088         <rdar://problem/21906759>
3089
3090         Reviewed by Chris Dumez.
3091
3092         Fixes an issue where the network process may never voluntarily release its process assertion.
3093
3094         Currently the network process always sends both a ProcessReadyToSuspend and CancelPrepareToSuspend
3095         message in response to receiving a PrepareToSuspend message and CancelPrepareToSuspend message,
3096         respectively. The process throttler expects to receive either a ProcessReadyToSuspend message
3097         or a CancelPrepareToSuspend message (and not both) in response to sending the message sequence
3098         PrepareToSuspend, CancelPrepareToSuspend. When a process throttler receives both messages in
3099         response to this sequence then its internal message count becomes imbalanced and it will
3100         never release the process assertion it manages. One user interaction that can cause such an
3101         imbalance, in the process throttler held by NetworkProcessProxy, is switching tabs.
3102
3103         * NetworkProcess/NetworkProcess.cpp:
3104         (WebKit::NetworkProcess::cancelPrepareToSuspend): Do not send message NetworkProcessProxy::DidCancelProcessSuspension. 
3105         * UIProcess/Network/NetworkProcessProxy.cpp:
3106         (WebKit::NetworkProcessProxy::didCancelProcessSuspension): Deleted.
3107         * UIProcess/Network/NetworkProcessProxy.h:
3108         * UIProcess/Network/NetworkProcessProxy.messages.in: Remove message NetworkProcessProxy::DidCancelProcessSuspension.
3109
3110 2015-07-21  Matthew Daiter  <mdaiter@apple.com>
3111
3112         Make sure to invalidate requests for user media after webpage reset
3113         https://bugs.webkit.org/show_bug.cgi?id=147155
3114         <rdar://problem/21924174>
3115
3116         Reviewed by Brent Fulgham.
3117
3118         * UIProcess/WebPageProxy.cpp:
3119         (WebKit::WebPageProxy::resetState): Added user media reset
3120
3121 2015-07-21  Tim Horton  <timothy_horton@apple.com>
3122
3123         [iOS] Avoid using a TextIndicator if there are non-text things to indicate
3124         https://bugs.webkit.org/show_bug.cgi?id=147152
3125         <rdar://problem/21921061>
3126
3127         Reviewed by Beth Dakin.
3128
3129         * UIProcess/ios/WKContentViewInteraction.mm:
3130         (-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
3131         * WebProcess/WebPage/ios/WebPageIOS.mm:
3132         (WebKit::shouldUseTextIndicatorForLink):
3133         (WebKit::WebPage::getPositionInformation):
3134         Fall back to a rectangular area instead of a TextIndicator if there are any
3135         non-inline elements inside the link.
3136
3137 2015-07-21  Andreas Kling  <akling@apple.com>
3138
3139         API::Session should clean up its storage in the network process when destroyed.
3140         <https://webkit.org/b/147139>
3141         <rdar://problem/21838764>
3142
3143         Reviewed by Anders Carlsson.
3144
3145         Have ~Session() send a DestroyPrivateBrowsingSession message to all networking processes
3146         for ephemeral sessions. This plugs a NetworkStorageSession leak that could retain a large
3147         CFNetwork object graph.
3148
3149         * UIProcess/API/APISession.cpp:
3150         (API::Session::~Session):
3151
3152 2015-07-21  Sungmann Cho  <sungmann.cho@navercorp.com>
3153
3154         Make PluginProxy::handleMouseEvent() asynchronous.
3155         https://bugs.webkit.org/show_bug.cgi?id=146142
3156
3157         Reviewed by Anders Carlsson.
3158
3159         PluginProxy::handleMouseEvent() forwards the generated mouse event to PluginControllerProxy
3160         using a synchronous message, but the recipient always reply immediately with the same value("true")
3161         even before handling the received message. So I think PluginProxy::handleMouseEvent() is perfectly
3162         OK to process its messages asynchronously.
3163
3164         * PluginProcess/PluginControllerProxy.cpp:
3165         (WebKit::PluginControllerProxy::handleMouseEvent):
3166         * PluginProcess/PluginControllerProxy.h:
3167         * PluginProcess/PluginControllerProxy.messages.in:
3168         * WebProcess/Plugins/PluginProxy.cpp:
3169         (WebKit::PluginProxy::handleMouseEvent):
3170
3171 2015-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3172
3173         [GTK] Add API to be notified about editor state changes
3174         https://bugs.webkit.org/show_bug.cgi?id=145875
3175
3176         Reviewed by Gustavo Noronha Silva.
3177
3178         Add WebKitEditorState object, that is created on demand by the
3179         WebKitWebView and can be used to get the typing attributes of the
3180         editor at the current position or selection.
3181
3182         * PlatformGTK.cmake:
3183         * Shared/EditorState.cpp: Use part of the PostLayoutData struct
3184         for the GTK port too.
3185         (WebKit::EditorState::encode): Encode PostLayoutData for GTK and
3186         remove our custom cursorRect.
3187         (WebKit::EditorState::decode): Decode PostLayoutData for GTK and
3188         remove our custom cursorRect.
3189         (WebKit::EditorState::PostLayoutData::encode): Reorder it to
3190         reduce the amonut of ifdefs.
3191         (WebKit::EditorState::PostLayoutData::decode): Ditto.
3192         * Shared/EditorState.h: Add AttributeStrikeThrough to
3193         TypingAttributes enum.
3194         * UIProcess/API/gtk/PageClientImpl.cpp:
3195         (WebKit::PageClientImpl::selectionDidChange): Rename
3196         updateTextInputState() to selectionDidChange() and also notify the
3197         WebKitWebView.
3198         * UIProcess/API/gtk/PageClientImpl.h:
3199         * UIProcess/API/gtk/WebKitEditorState.cpp: Added.
3200         (webkitEditorStateGetProperty):
3201         (webkit_editor_state_class_init):
3202         (webkitEditorStateSetTypingAttributes):
3203         (webkitEditorStateCreate):
3204         (webkitEditorStateChanged):
3205         (webkit_editor_state_get_typing_attributes):
3206         * UIProcess/API/gtk/WebKitEditorState.h: Added.
3207         * UIProcess/API/gtk/WebKitEditorStatePrivate.h: Added.
3208         * UIProcess/API/gtk/WebKitWebView.cpp:
3209         (webkitWebViewSelectionDidChange): Notify the WebKitEditorState if
3210         it has already been created.
3211         (webkit_web_view_get_editor_state): Ensure a WebKitEditorState and
3212         return it.
3213         * UIProcess/API/gtk/WebKitWebView.h:
3214         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3215         (webkitWebViewBaseUpdateTextInputState): Get the caret cursor rect
3216         from PostLayoutData.
3217         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3218         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
3219         * UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_editor_state_get_type.
3220         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitEditorState.
3221         * UIProcess/API/gtk/webkit2.h: Include WebKitEditorState.h.
3222         * UIProcess/PageClient.h:
3223         * UIProcess/gtk/WebPageProxyGtk.cpp:
3224         (WebKit::WebPageProxy::editorStateChanged): Call PageClientImpl::selectionDidChange().
3225         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
3226         (WebKit::WebPage::platformEditorState): Add typing attributes to EditorState.
3227
3228 2015-07-20  Simon Fraser  <simon.fraser@apple.com>
3229
3230         Fix the iOS build.
3231
3232         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3233
3234 2015-07-20  Simon Fraser  <simon.fraser@apple.com>
3235
3236         Facebook in tiled fullscreen is slow
3237         https://bugs.webkit.org/show_bug.cgi?id=147134
3238         rdar://problem/21823349
3239
3240         Reviewed by Tim Horton.
3241         
3242         TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded() could cause a page to toggle
3243         between two fixed layout sizes differing by a pixel, because of rounding. This would cause
3244         lots of extra layouts and painting.
3245         
3246         This happened because the the fixed layout size was computed using ceil(m_webPage.size().width() / viewScale)
3247
3248         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3249         (WebKit::TiledCoreAnimationDrawingArea::scaleViewToFitDocumentIfNeeded):
3250
3251 2015-07-20  Wenson Hsieh  <wenson_hsieh@apple.com>
3252
3253         Fix crash due to RemoteLayerTreeDisplayRefreshMonitor outliving RemoteLayerTreeDrawingArea
3254         https://bugs.webkit.org/show_bug.cgi?id=147124
3255         <rdar://problem/21582858>
3256
3257         Reviewed by Simon Fraser.
3258
3259         Refactors RemoteLayerTreeDisplayRefreshMonitor to use a weak pointer rather than a reference
3260         to its RemoteLayerTreeDrawingArea, since the drawing area may be deallocated before the monitor
3261         in some rare cases. This rarely caused pages using requestAnimationFrame to crash on iOS. However,
3262         this should not be the case: logically, a RemoteLayerTreeDrawingArea should always outlive its
3263         refresh monitors. Refer to https://bugs.webkit.org/show_bug.cgi?id=147128 for more details.
3264
3265         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
3266         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm:
3267         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
3268         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor): On destruction, checks
3269             first to see whether or not the drawing area has been deallocated before telling it to update its monitors.
3270         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
3271         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3272         (WebKit::RemoteLayerTreeDrawingArea::createWeakPtr): Creates and returns a new weak pointer to itself.
3273         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3274         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
3275
3276 2015-07-20  Alex Christensen  <achristensen@webkit.org>
3277
3278         [Content Extensions] Cache actions with domains that match everything
3279         https://bugs.webkit.org/show_bug.cgi?id=147050
3280
3281         Reviewed by Benjamin Poulain.
3282
3283         * UIProcess/API/APIUserContentExtensionStore.h:
3284
3285 2015-07-20  Gordon Sheridan  <gordon_sheridan@apple.com>
3286
3287         Support blocking a plug-in for non-security reasons
3288         https://bugs.webkit.org/show_bug.cgi?id=145009
3289
3290         Reviewed by Anders Carlsson.
3291
3292         * Shared/Plugins/PluginModuleInfo.h:
3293         Replace PluginModuleBlocked with separate enum values for blocking for security and compatibility.
3294
3295         * UIProcess/API/C/WKAPICast.h:
3296         (WebKit::toWKPluginLoadPolicy):
3297         Modify to handle change to PluginModuleBlocked enum.
3298
3299         (WebKit::toPluginModuleLoadPolicy):
3300         Ditto.
3301
3302         * UIProcess/API/C/WKPluginLoadPolicy.h:
3303         Added enum value for blocking a plugin for compatibility reasons.
3304
3305         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3306         (WebKit::shouldBlockPlugin):
3307         Check load policy for both reasons a plugin may be blocked.
3308
3309         (WebKit::WKPlugInModuleLoadPolicyToPluginModuleLoadPolicy):
3310         Added function to convert between load policy enum types.
3311
3312         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
3313         Modified to call WKLoadPolicyForPluginVersion() which can distinguish between blocked for security or compatibility.
3314
3315         * UIProcess/WebPageProxy.cpp:
3316         (WebKit::WebPageProxy::findPlugin):
3317         Updated to recognize both PluginModuleBlocked enum values that indicate a plugin is blocked.
3318
3319         * WebProcess/WebPage/WebPage.cpp:
3320         (WebKit::WebPage::createPlugin):
3321         Ditto.
3322
3323         (WebKit::WebPage::canPluginHandleResponse):
3324         Ditto.
3325
3326 2015-07-20  Antti Koivisto  <antti@apple.com>
3327
3328         NSURLCache fallback does not work on iOS due to sandboxing
3329         https://bugs.webkit.org/show_bug.cgi?id=146314
3330         <rdar://problem/21433691>
3331
3332         Reviewed by Anders Carlsson.
3333
3334         This broke with earlier cache path computation changes.
3335
3336         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3337         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3338
3339             NSURLCache path is relative to the container cache path so "." is sufficient.
3340             This puts the cache files under
3341             <container>/Library/Caches/com.apple.WebKit.Networking/
3342
3343 2015-07-20  Jeremy Jones  <jeremyj@apple.com>
3344
3345         Adopt AVPlayerLayerView
3346         https://bugs.webkit.org/show_bug.cgi?id=146862
3347
3348         Reviewed by Simon Fraser.
3349
3350         The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
3351         videoLayerFrame and videoLayerGravity no longer need to be stored because they are stored
3352         where they are used in the interface. Some animation is improved in the conversion.
3353
3354         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3355         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3356         (+[WebLayerHostView layerClass]): Add class WebLayerHostView.
3357         (-[WebLayerHostView contextID]):
3358         (-[WebLayerHostView setContextID:]):
3359         (-[WebLayerHostView layerHost]):
3360         (WebKit::WebVideoFullscreenManagerProxy::invalidate): layer -> view
3361         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
3362         Apply the hostingDeviceScaleFactor transform to -sublayerTransform instead of to
3363         -transform. This more directly inverts the tranform WebProcess and allows -transform
3364         to be used for animation in the UIProcess. This is important because UIView's actions
3365         animate -transform, but not -sublayerTrasform.
3366
3367         (WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): layer -> view
3368         (WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame): Deleted.
3369         (WebKit::WebVideoFullscreenModelContext::videoLayerFrame): Deleted.
3370         (WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity): Deleted.
3371         (WebKit::WebVideoFullscreenModelContext::videoLayerGravity): Deleted.
3372         * WebProcess/ios/WebVideoFullscreenManager.mm:
3373         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
3374         Set initial video layer frame to fix start point of animation.
3375
3376         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
3377         dispatch_async allows the CATransaction to complete before continuing with the animation.
3378         This prevents a flash during animation.
3379
3380 2015-07-20  Tim Horton  <timothy_horton@apple.com>
3381
3382         REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
3383         https://bugs.webkit.org/show_bug.cgi?id=147127
3384         <rdar://problem/21474317>
3385
3386         Reviewed by Simon Fraser.
3387
3388         * WebProcess/WebPage/WebPage.cpp:
3389         (WebKit::WebPage::snapshotAtSize):
3390         Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
3391         like we did before r174287.
3392
3393 2015-07-20  Michael Catanzaro  <mcatanzaro@igalia.com>
3394
3395         [Seccomp] Should be easier to debug blocked syscalls
3396         https://bugs.webkit.org/show_bug.cgi?id=142980
3397
3398         These should be printed even when not running in debug mode. There is no
3399         value in hiding errors from release build users.
3400
3401         Reviewed by Žan Doberšek.
3402
3403         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
3404         (WebKit::SeccompBroker::runLoop): Don't close stderr et. al. in release builds.
3405         * Shared/linux/SeccompFilters/Syscall.cpp:
3406         (WebKit::write_uint): Added.
3407         (WebKit::reportUnexpectedSyscall): Added.
3408         (WebKit::Syscall::createFromContext): Call reportUnexpectedSyscall. Also, no need to crash
3409         here in release builds.
3410         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
3411         (WebKit::SyscallPolicy::hasPermissionForPath): Print a warning when access is denied.
3412         (WebKit::SyscallPolicy::permissionToString): Added.
3413         * Shared/linux/SeccompFilters/SyscallPolicy.h: Add permissionToString.
3414
3415 2015-07-20  Csaba Osztrogonác  <ossy@webkit.org>
3416
3417         Fix the !ENABLE(VIDEO) build after r186396
3418         https://bugs.webkit.org/show_bug.cgi?id=147116
3419
3420         Reviewed by Brent Fulgham.
3421
3422         * WebProcess/WebProcess.cpp:
3423         (WebKit::WebProcess::didClose):
3424
3425 2015-07-20  Tomas Popela  <tpopela@redhat.com>
3426
3427         [GTK] Add selection-changed signal to the WebKit2 API
3428         https://bugs.webkit.org/show_bug.cgi?id=137116
3429
3430         Reviewed by Carlos Garcia Campos.
3431
3432         Add a new object WebKitWebEditor where the editing capabilities of a
3433         WebPage will be grouped and exposed. Add the selection-changed signal
3434         there (we used the same name as in WK1 API).
3435
3436         * PlatformGTK.cmake:
3437         * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
3438         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp: Added.
3439         (didChangeSelection):
3440         (webkitWebEditorCreate):
3441         (webkit_web_editor_get_page):
3442         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h: Added.
3443         * WebProcess/InjectedBundle/API/gtk/WebKitWebEditorPrivate.h: Added.
3444         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3445         (webkitWebPageGetPage):
3446         (webkit_web_page_get_editor):
3447         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
3448         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
3449         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3450
3451 2015-07-16  Anders Carlsson  <andersca@apple.com>
3452
3453         WebsiteDataStore operations need to grab background assertions
3454         https://bugs.webkit.org/show_bug.cgi?id=147015
3455         rdar://problem/21799011
3456
3457         Reviewed by Sam Weinig.
3458
3459         * UIProcess/Network/NetworkProcessProxy.cpp:
3460         (WebKit::NetworkProcessProxy::fetchWebsiteData):
3461         (WebKit::NetworkProcessProxy::deleteWebsiteData):
3462         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
3463         * UIProcess/WebProcessProxy.cpp:
3464         (WebKit::WebProcessProxy::fetchWebsiteData):
3465         (WebKit::WebProcessProxy::deleteWebsiteData):
3466         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
3467
3468 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3469
3470         Unreviewed, placate -Wmismatched-tags after r187011
3471
3472         It's basically bug #146990 again. Oops.
3473
3474         * WebProcess/gtk/SeccompFiltersWebProcessGtk.h:
3475
3476 2015-07-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3477
3478         [GTK] Add seccomp filters support
3