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