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