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