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