1 2016-11-18 Jeremy Jones <jeremyj@apple.com>
3 USE WK_MAC_TBA for version number in _webViewRequestPointerLock:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.12))
4 https://bugs.webkit.org/show_bug.cgi?id=164962
6 Reviewed by Dean Jackson.
8 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
10 2016-11-18 Enrica Casucci <enrica@apple.com>
12 Refactor drag and drop for WebKit2 to encode DragData message exchange.
13 https://bugs.webkit.org/show_bug.cgi?id=164945
15 Reviewed by Tim Horton.
17 * Shared/WebCoreArgumentCoders.cpp:
18 (IPC::ArgumentCoder<DragData>::encode):
19 (IPC::ArgumentCoder<DragData>::decode):
20 * Shared/WebCoreArgumentCoders.h:
21 * UIProcess/WebPageProxy.cpp:
22 (WebKit::WebPageProxy::performDragControllerAction):
23 * WebProcess/WebCoreSupport/WebDragClient.cpp:
24 (WebKit::WebDragClient::willPerformDragDestinationAction):
25 (WebKit::WebDragClient::actionMaskForDrag):
26 * WebProcess/WebCoreSupport/WebDragClient.h:
27 * WebProcess/WebPage/WebPage.cpp:
28 (WebKit::WebPage::performDragControllerAction):
29 * WebProcess/WebPage/WebPage.h:
30 * WebProcess/WebPage/WebPage.messages.in:
32 2016-11-18 Jeremy Jones <jeremyj@apple.com>
34 Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
35 https://bugs.webkit.org/show_bug.cgi?id=163801
37 Reviewed by Simon Fraser.
39 Add SPI to notify client of pointer lock and for client to allow or deny.
40 Unlock pointer when view is not longer active.
42 * Configurations/FeatureDefines.xcconfig:
43 * Shared/WebPreferencesDefinitions.h:
44 * UIProcess/API/APIUIClient.h:
45 (API::UIClient::requestPointerLock):
46 (API::UIClient::didLosePointerLock):
47 * UIProcess/API/C/WKPage.cpp:
48 (WKPageSetPageUIClient):
49 (WKPageDidAllowPointerLock):
50 (WKPageDidDenyPointerLock):
51 * UIProcess/API/C/WKPagePrivate.h:
52 * UIProcess/API/C/WKPageUIClient.h:
53 * UIProcess/API/C/WKPreferences.cpp:
54 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
55 * UIProcess/Cocoa/UIDelegate.h:
56 * UIProcess/Cocoa/UIDelegate.mm:
57 (WebKit::UIDelegate::setDelegate):
58 (WebKit::UIDelegate::UIClient::requestPointerLock):
59 (WebKit::UIDelegate::UIClient::didLosePointerLock):
60 * UIProcess/WebPageProxy.cpp:
61 (WebKit::WebPageProxy::dispatchActivityStateChange):
62 (WebKit::WebPageProxy::resetStateAfterProcessExited):
63 (WebKit::WebPageProxy::requestPointerLock):
64 (WebKit::WebPageProxy::didAllowPointerLock):
65 (WebKit::WebPageProxy::didDenyPointerLock):
66 (WebKit::WebPageProxy::requestPointerUnlock):
67 * UIProcess/WebPageProxy.h:
68 * WebProcess/WebPage/WebPage.cpp:
69 (WebKit::WebPage::updatePreferences):
71 2016-11-17 Carlos Garcia Campos <cgarcia@igalia.com>
73 Downloads started by context menu actions should also have a web view associated
74 https://bugs.webkit.org/show_bug.cgi?id=164364
76 Reviewed by Michael Catanzaro.
78 When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to
79 associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls
80 WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.
82 * UIProcess/API/gtk/WebKitDownload.cpp:
83 (webkitDownloadCreateForRequest): Deleted.
84 * UIProcess/API/gtk/WebKitDownloadPrivate.h:
85 * UIProcess/API/gtk/WebKitWebContext.cpp:
86 (webkitWebContextStartDownload): Use webkitWebContextGetOrCreateDownload() after WebProcessPool::download()
87 because the WebKitDownload could have already been created by the web view download handler at this point.
88 * UIProcess/API/gtk/WebKitWebView.cpp:
89 (webkit_web_view_download_uri): We no longer need to associate the web view to the download here.
90 * UIProcess/WebProcessPool.cpp:
91 (WebKit::WebProcessPool::download): If an initiatingPage has been passed, call handleDownloadRequest() to notify
94 2016-11-17 Alex Christensen <achristensen@webkit.org>
96 REGRESSION: API test _WKDownload.ConvertResponseToDownload is a flaky timeout
97 https://bugs.webkit.org/show_bug.cgi?id=164631
99 Reviewed by Carlos Garcia Campos.
101 * NetworkProcess/NetworkResourceLoader.cpp:
102 (WebKit::NetworkResourceLoader::convertToDownload):
103 I could reproduce the flaky failure 100% of the time when not using NETWORK_SESSION
104 by adding a usleep(1000000) in NetworkResourceLoader::convertToDownload. m_networkLoad
105 was not being set to nullptr before it was being checked in NetworkResourceLoader::abort
107 2016-11-17 Alex Christensen <achristensen@webkit.org>
109 Fix CMake build after r208865
110 https://bugs.webkit.org/show_bug.cgi?id=164894
115 2016-11-17 Ryosuke Niwa <rniwa@webkit.org>
117 WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled should keep text replacement enabled
118 https://bugs.webkit.org/show_bug.cgi?id=164857
119 <rdar://problem/27721742>
121 Reviewed by Wenson Hsieh.
123 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
124 (WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled):
126 2016-11-17 John Wilander <wilander@apple.com>
128 Resource load statistics: Cover further data records, count removed data records, and only fire handler when needed
129 https://bugs.webkit.org/show_bug.cgi?id=164659
131 Reviewed by Andy Estes.
133 * UIProcess/WebResourceLoadStatisticsStore.cpp:
134 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
135 Consistent naming with 'remove' rather than 'delete'.
136 Now removes localStorage, IndexDB, disk cache, and memory cache too.
137 Updates statistics with number of times it has removed data records.
138 (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
139 No longer checks whether it has enough data since the classification rules
140 are absolute, not relative.
141 (WebKit::WebResourceLoadStatisticsStore::clearDataRecords): Deleted.
142 * UIProcess/WebResourceLoadStatisticsStore.h:
143 Consistent naming with 'remove' rather than 'delete'.
145 2016-11-17 Brady Eidson <beidson@apple.com>
147 Add _WKIconLoadingDelegate SPI.
148 https://bugs.webkit.org/show_bug.cgi?id=164894
150 Reviewed by Alex Christensen.
152 With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
154 WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
156 For icons the app decides to load, WebKit will pass the data to the app without storing locally.
158 * UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.
159 (API::IconLoadingClient::~IconLoadingClient):
160 (API::IconLoadingClient::getLoadDecisionForIcon):
162 * UIProcess/API/Cocoa/WKWebView.mm:
163 (-[WKWebView _initializeWithConfiguration:]):
164 (-[WKWebView _iconLoadingDelegate]):
165 (-[WKWebView _setIconLoadingDelegate:]):
166 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
168 * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
170 * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
171 * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.
172 (-[_WKLinkIconParameters _initWithLinkIcon:]):
173 (-[_WKLinkIconParameters url]):
174 (-[_WKLinkIconParameters mimeType]):
175 (-[_WKLinkIconParameters size]):
176 (-[_WKLinkIconParameters iconType]):
177 * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
179 * UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
180 * UIProcess/Cocoa/IconLoadingDelegate.mm: Added.
181 (WebKit::IconLoadingDelegate::IconLoadingDelegate):
182 (WebKit::IconLoadingDelegate::~IconLoadingDelegate):
183 (WebKit::IconLoadingDelegate::createIconLoadingClient):
184 (WebKit::IconLoadingDelegate::delegate):
185 (WebKit::IconLoadingDelegate::setDelegate):
186 (WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
187 (WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
188 (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
190 * UIProcess/WebPageProxy.cpp:
191 (WebKit::WebPageProxy::setIconLoadingClient):
192 (WebKit::WebPageProxy::getLoadDecisionForIcon):
193 (WebKit::WebPageProxy::finishedLoadingIcon):
194 * UIProcess/WebPageProxy.h:
195 (WebKit::WebPageProxy::iconLoadingClient):
196 * UIProcess/WebPageProxy.messages.in:
198 * WebKit2.xcodeproj/project.pbxproj:
200 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
201 (WebKit::WebFrameLoaderClient::useIconLoadingClient):
202 (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
203 (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
204 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
205 (WebKit::WebFrameLoaderClient::setUseIconLoadingClient):
207 * WebProcess/WebPage/WebPage.cpp:
208 (WebKit::WebPage::didGetLoadDecisionForIcon):
209 (WebKit::WebPage::setUseIconLoadingClient):
210 * WebProcess/WebPage/WebPage.h:
211 * WebProcess/WebPage/WebPage.messages.in:
213 2016-11-17 Saam Barati <sbarati@apple.com>
215 Remove async/await compile time flag and enable tests
216 https://bugs.webkit.org/show_bug.cgi?id=164828
217 <rdar://problem/28639334>
219 Reviewed by Yusuke Suzuki.
221 * Configurations/FeatureDefines.xcconfig:
223 2016-11-17 Yusuke Suzuki <utatane.tea@gmail.com>
225 [JSC] WTF::TemporaryChange with WTF::SetForScope
226 https://bugs.webkit.org/show_bug.cgi?id=164761
228 Reviewed by Saam Barati.
230 * PluginProcess/PluginControllerProxy.cpp:
231 (WebKit::PluginControllerProxy::initialize):
232 * PluginProcess/WebProcessConnection.cpp:
233 (WebKit::WebProcessConnection::didReceiveMessage):
234 (WebKit::WebProcessConnection::didReceiveSyncMessage):
235 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
236 (createEncodedObject):
238 * UIProcess/API/Cocoa/WKWebView.mm:
239 (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
240 * UIProcess/Cocoa/WebViewImpl.mm:
241 (WebKit::WebViewImpl::updateTextTouchBar):
242 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
243 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
244 * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
245 (WebKit::WebPasteboardProxy::writeToClipboard):
246 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
247 (WebKit::CompositingCoordinator::flushPendingLayerChanges):
248 (WebKit::CompositingCoordinator::purgeBackingStores):
249 * WebProcess/WebPage/WebPage.cpp:
250 (WebKit::WebPage::mouseEvent):
251 (WebKit::WebPage::keyEvent):
252 (WebKit::WebPage::dispatchTouchEvent):
253 (WebKit::WebPage::setInitialFocus):
254 (WebKit::WebPage::insertTextAsync):
255 * WebProcess/WebPage/ios/WebPageIOS.mm:
256 (WebKit::WebPage::dynamicViewportSizeUpdate):
257 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
258 * WebProcess/WebPage/mac/WebPageMac.mm:
260 2016-11-16 Brent Fulgham <bfulgham@apple.com>
262 Unreviewed build fix after r208589
264 The generated com.apple.WebKit.plugin-common.sb file was not getting copied into
265 the Resources folder, so was not deployed with WebKit. We need to treat it like
266 com.apple.WebProcess.sb and the other generated files.
268 * WebKit2.xcodeproj/project.pbxproj: Tell Xcode to include the generated file in
269 the framework Resources.
271 2016-11-16 Yusuke Suzuki <utatane.tea@gmail.com>
273 [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
274 https://bugs.webkit.org/show_bug.cgi?id=164827
276 Reviewed by Ryosuke Niwa.
278 * Configurations/FeatureDefines.xcconfig:
279 * Shared/WebPreferencesDefinitions.h:
280 Annotated ES6 Modules option with DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.
281 * UIProcess/API/C/WKPreferences.cpp:
282 (WKPreferencesSetES6ModulesEnabled):
283 (WKPreferencesGetES6ModulesEnabled):
284 * UIProcess/API/C/WKPreferencesRefPrivate.h:
285 * WebProcess/InjectedBundle/InjectedBundle.cpp:
286 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
287 * WebProcess/WebPage/WebPage.cpp:
288 (WebKit::WebPage::updatePreferences):
290 2016-11-16 Simon Fraser <simon.fraser@apple.com>
292 Add logging support to VisibleContentRectUpdateInfo
293 https://bugs.webkit.org/show_bug.cgi?id=164825
295 Reviewed by Zalan Bujtas.
297 Add TextStream output to VisibleContentRectUpdateInfo. Just piping it into a logging
298 stream does single-line output, so also make a convenience dump() function that will
299 product multiline output. Result look like:
301 (VisibleContentRectUpdateInfo
302 (lastLayerTreeTransactionID 54)
303 (exposedContentRect (523.44,1258.63) width=676.20 height=901.60)
304 (unobscuredContentRect (523.44,1293.41) width=676.20 height=866.82)
305 (unobscuredRectInScrollViewCoordinates (0,39.50) width=768 height=984.50)
306 (customFixedPositionRect (219.64,935) width=980 height=1225)
307 (obscuredInset width=0 height=39.50)
310 (timestamp 736446.61)
311 (verticalVelocity -11.36))
313 * Shared/VisibleContentRectUpdateInfo.cpp:
314 (WebKit::VisibleContentRectUpdateInfo::dump):
315 (WebKit::operator<<):
316 * Shared/VisibleContentRectUpdateInfo.h:
317 * UIProcess/ios/WKContentView.mm:
318 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
320 2016-11-15 Simon Fraser <simon.fraser@apple.com>
322 [iOS WK2] Scroll view scrolling and zooming animations can keep running across page loads
323 https://bugs.webkit.org/show_bug.cgi?id=164810
325 Reviewed by Tim Horton.
327 Scrolling and zooming animations can leak across page loads, which makes tests flakey,
328 and is unexpected by users.
330 Tested by scrollingcoordinator/ios/sync-layer-positions-after-scroll.html followed by
331 scrollingcoordinator/ios/ui-scrolling-tree.html
333 * UIProcess/API/Cocoa/WKWebView.mm:
334 (-[WKWebView _didCommitLoadForMainFrame]):
336 2016-11-15 Jon Lee <jonlee@apple.com>
338 Report active video and audio capture devices separately
339 https://bugs.webkit.org/show_bug.cgi?id=164769
341 Reviewed by Eric Carlson.
343 Replace kWKMediaHasActiveCaptureDevice with kWKMediaHasActiveAudioCaptureDevice and
344 kWKMediaHasActiveVideoCaptureDevice
346 * UIProcess/API/C/WKPage.cpp:
347 (WKPageGetMediaState):
348 * UIProcess/API/C/WKPagePrivate.h:
349 * UIProcess/WebPageProxy.cpp:
350 (WebKit::WebPageProxy::isPlayingMediaDidChange): Update the mask to include the two
353 2016-11-14 Simon Fraser <simon.fraser@apple.com>
355 [iOS WK2] Implement support for visual viewports
356 https://bugs.webkit.org/show_bug.cgi?id=164765
358 Reviewed by Tim Horton.
360 Adopt the visual viewport scrolling model in iOS WK2.
362 Pass the parameters used for computing the layout viewport up to WK2 via RemoteLayerTreeTransaction.
363 These are stored on WebPageProxy. When they change, _didCommitLayerTree triggers a -_updateVisibleContentRects.
365 WebPageProxy::computeCustomFixedPositionRect() is the function that computes the "override" layout viewport.
366 It starts with the baseLayoutViewportSize from the web process (which is based on the initial containing block
367 size), then ensures that it's no smaller than the unobscured content rect, since it makes no sense for the
368 layout viewport to be smaller than the visual viewport. The static FrameView::computeLayoutViewportOrigin()
369 is then use to "push" the layout viewport around as the visual viewport changes.
371 * Shared/VisibleContentRectUpdateInfo.h:
372 * Shared/WebCoreArgumentCoders.cpp: Encode LayoutSize and LayoutPoint.
373 (IPC::ArgumentCoder<LayoutSize>::encode):
374 (IPC::ArgumentCoder<LayoutSize>::decode):
375 (IPC::ArgumentCoder<LayoutPoint>::encode):
376 (IPC::ArgumentCoder<LayoutPoint>::decode):
377 * Shared/WebCoreArgumentCoders.h:
378 * Shared/mac/RemoteLayerTreeTransaction.h:
379 (WebKit::RemoteLayerTreeTransaction::baseLayoutViewportSize):
380 (WebKit::RemoteLayerTreeTransaction::setBaseLayoutViewportSize):
381 (WebKit::RemoteLayerTreeTransaction::minStableLayoutViewportOrigin):
382 (WebKit::RemoteLayerTreeTransaction::setMinStableLayoutViewportOrigin):
383 (WebKit::RemoteLayerTreeTransaction::maxStableLayoutViewportOrigin):
384 (WebKit::RemoteLayerTreeTransaction::setMaxStableLayoutViewportOrigin):
385 * Shared/mac/RemoteLayerTreeTransaction.mm:
386 (WebKit::RemoteLayerTreeTransaction::encode):
387 (WebKit::RemoteLayerTreeTransaction::decode):
388 (WebKit::RemoteLayerTreeTransaction::description):
389 * UIProcess/API/Cocoa/WKWebView.mm:
390 (-[WKWebView _didCommitLayerTree:]):
391 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
392 (WebKit::RemoteScrollingCoordinatorProxy::visualViewportEnabled): Accessor.
393 * UIProcess/WebPageProxy.h:
394 (WebKit::WebPageProxy::customFixedPositionRect):
395 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
396 (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
397 * UIProcess/ios/WKContentView.mm:
398 (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
399 (-[WKContentView _didCommitLayerTree:]):
400 * UIProcess/ios/WebPageProxyIOS.mm:
401 (WebKit::WebPageProxy::computeCustomFixedPositionRect): When visual viewports are enabled, compute
402 the layout viewport rect, taking the baseLayoutViewportSize and the current unobscured rect into account.
403 (WebKit::WebPageProxy::updateLayoutViewportParameters):
404 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
405 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
406 * WebProcess/WebPage/WebPage.cpp: Encode in the transaction the layout viewport parameters (with minor refactor).
407 (WebKit::WebPage::willCommitLayerTree):
408 * WebProcess/WebPage/ios/WebPageIOS.mm:
409 (WebKit::WebPage::updateVisibleContentRects): This is where the web process receives the new override layout viewport
410 from the web process (with some logging).
412 2016-11-15 Jon Lee <jonlee@apple.com>
414 Remove HasMediaCaptureDevice
415 https://bugs.webkit.org/show_bug.cgi?id=164767
416 <rdar://problem/29263696>
418 Reviewed by Eric Carlson.
420 * UIProcess/API/C/WKPage.cpp: Remove kWKMediaHasCaptureDevice.
421 (WKPageGetMediaState):
422 * UIProcess/API/C/WKPagePrivate.h:
424 2016-11-15 Daniel Bates <dabates@apple.com>
426 Disallow loads using HTTP 0.9 at the ResourceHandle/NetworkDataTask level
427 https://bugs.webkit.org/show_bug.cgi?id=164662
428 <rdar://problem/29268514>
430 Reviewed by Alex Christensen and Brady Eidson.
432 Make changes to NetworkDataTask similar to the changes made to ResourceHandle so as to
433 disallow non-default port HTTP 0.9 loads when using the ENABLE(NETWORK_SESSION) networking
434 code path in WebKit2.
436 * NetworkProcess/NetworkDataTask.cpp:
437 (WebKit::NetworkDataTask::didReceiveResponse): Added. Fail the load if it is using HTTP 0.9.
438 Otherwise notify the client that we received a response.
439 * NetworkProcess/NetworkDataTask.h:
440 * NetworkProcess/NetworkDataTaskBlob.cpp:
441 (WebKit::NetworkDataTaskBlob::resume): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
442 as the latter has been renamed to the former.
443 (WebKit::NetworkDataTaskBlob::getSizeForNext): Ditto.
444 (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): Renamed from didReceiveResponse().
445 * NetworkProcess/NetworkDataTaskBlob.h:
446 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
447 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
448 (WebKit::NetworkDataTaskCocoa::didReceiveResponse): Deleted.
449 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
450 (WebKit::NetworkDataTaskSoup::didSendRequest): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
451 as the latter has been renamed to the former.
452 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Renamed from didReceiveResponse(). Also
453 remove the local variable response and inline its value into the call to ResourceHandle::didReceiveResponse()
454 as this variable is used exactly once in this function and its name does not describe its purpose any more
456 (WebKit::NetworkDataTaskSoup::didRequestNextPart): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
457 as the latter has been renamed to the former.
458 * NetworkProcess/soup/NetworkDataTaskSoup.h:
460 2016-11-14 Alex Christensen <achristensen@webkit.org>
462 Move SecurityOrigin::createFromDatabaseIdentifier to SecurityOriginData
463 https://bugs.webkit.org/show_bug.cgi?id=164720
465 Reviewed by Brady Eidson.
467 * DatabaseProcess/DatabaseProcess.cpp:
468 (WebKit::DatabaseProcess::indexedDatabaseOrigins):
469 * DatabaseProcess/DatabaseProcess.h:
470 * NetworkProcess/NetworkProcess.cpp:
471 (WebKit::fetchDiskCacheEntries):
472 * Shared/API/c/WKSecurityOriginRef.cpp:
473 (WKSecurityOriginCreateFromDatabaseIdentifier):
474 * Shared/WebsiteData/WebsiteData.cpp:
475 (WebKit::WebsiteData::Entry::encode):
476 (WebKit::WebsiteData::Entry::decode):
477 * Shared/WebsiteData/WebsiteData.h:
478 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
479 (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
480 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
481 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
482 (WebKit::LocalStorageDatabaseTracker::origins):
483 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
484 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
485 (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
486 * UIProcess/WebPageProxy.cpp:
487 (WebKit::WebPageProxy::exceededDatabaseQuota):
488 (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
489 (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
490 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
491 (WebKit::WebsiteDataStore::fetchData):
492 (WebKit::WebsiteDataStore::removeData):
493 (WebKit::WebsiteDataStore::mediaKeyOrigins):
494 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
495 (WKBundleSetDatabaseQuota):
496 * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
497 (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
498 * WebProcess/Storage/StorageAreaImpl.cpp:
499 (WebKit::StorageAreaImpl::create):
500 (WebKit::StorageAreaImpl::StorageAreaImpl):
501 (WebKit::StorageAreaImpl::securityOrigin):
502 * WebProcess/Storage/StorageAreaImpl.h:
503 * WebProcess/Storage/StorageAreaMap.cpp:
504 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
505 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
506 * WebProcess/Storage/StorageAreaMap.h:
507 (WebKit::StorageAreaMap::securityOrigin):
508 * WebProcess/Storage/StorageNamespaceImpl.cpp:
509 (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
510 (WebKit::StorageNamespaceImpl::storageArea):
511 * WebProcess/Storage/StorageNamespaceImpl.h:
512 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
513 (WebKit::WebChromeClient::exceededDatabaseQuota):
514 * WebProcess/WebProcess.cpp:
515 (WebKit::WebProcess::fetchWebsiteData):
517 2016-11-14 Brent Fulgham <bfulgham@apple.com>
519 [Mac][iOS][WK2] Tighten permissions to change CapsLock delay
520 https://bugs.webkit.org/show_bug.cgi?id=164725
521 <rdar://problem/28970910>
523 Reviewed by Alexey Proskuryakov.
525 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Limit access
526 to the IOKit connection that actually needs it.
528 2016-11-14 Brent Fulgham <bfulgham@apple.com>
530 Unreviewed sandbox fix after r208702
532 Correct version check to avoid breaking users in Safari Technology Preview
535 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
536 * WebProcess/com.apple.WebProcess.sb.in:
538 2016-11-14 Pranjal Jumde <pjumde@apple.com>
540 Keychain access in WebKit should be limited to a single process. Earlier this was blocked on the networking framework requiring direct access to keychain, this will be resolved in the upcoming version of macOS.
541 https://bugs.webkit.org/show_bug.cgi?id=163710
542 <rdar://problem/24357468>
544 Reviewed by Darin Adler.
546 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
547 * WebProcess/com.apple.WebProcess.sb.in:
549 2016-11-13 Darin Adler <darin@apple.com>
551 Remove many includes of ExceptionCode.h
552 https://bugs.webkit.org/show_bug.cgi?id=164706
554 Reviewed by Alex Christensen.
556 * WebProcess/Storage/StorageAreaImpl.cpp: Removed include of ExceptionCode.h.
558 2016-11-13 Darin Adler <darin@apple.com>
560 Fix exception handling in SQL database code, streamline and update code
561 https://bugs.webkit.org/show_bug.cgi?id=164685
563 Reviewed by Sam Weinig.
565 * UIProcess/API/efl/ewk_database_manager.cpp:
566 (EwkDatabaseManager::getDatabaseOrigins): Update for change to the
567 DatabaseTracker::origins function.
568 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
569 (WebKit::WebsiteDataStore::fetchData): Use DatabaseTracker.
570 (WebKit::WebsiteDataStore::removeData): Ditto.
571 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
572 (WKBundleSetDatabaseQuota): Ditto.
573 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
574 (WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
575 * WebProcess/WebProcess.cpp:
576 (WebKit::WebProcess::processWillSuspendImminently): Ditto.
578 2016-11-12 Simon Fraser <simon.fraser@apple.com>
580 Add a way to get the UI-side scrolling tree as text via UIScriptController
581 https://bugs.webkit.org/show_bug.cgi?id=164697
583 Reviewed by Zalan Bujtas.
585 Add a property to WKWebView to retrieve the scrolling tree as text, for testing.
586 Expose it via the RemoteScrollingCoordinatorProxy.
588 * UIProcess/API/Cocoa/WKWebView.mm:
589 (-[WKWebView _scrollingTreeAsText]):
590 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
591 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
592 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeAsText):
593 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
595 2016-11-12 Daniel Bates <dabates@apple.com>
597 Incorrect release log message emitted when waiting/not waiting for the WebProcess continue a load
598 https://bugs.webkit.org/show_bug.cgi?id=164605
600 Reviewed by Darin Adler.
602 Currently we emit a release log message of the form "didReceiveResponse: Should wait for
603 message from WebContent process ..." when we are not waiting for the WebProcess and emit
604 a message of the form "didReceiveResponse: Should not wait for message from WebContent
605 process" when we are waiting on the WebProcess. Invert these messages to reflect whether
606 we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponsewhether.
608 For the main resource NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::No
609 because we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponse
610 to continue the load. For a subresource we do not need to wait for the WebProcess to allow the load to continue
611 and hence NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::Yes.
613 * NetworkProcess/NetworkResourceLoader.cpp:
615 2016-11-12 Simon Fraser <simon.fraser@apple.com>
617 [iOS WK2] Share some code with Mac for post-async-scroll state reconciliation
618 https://bugs.webkit.org/show_bug.cgi?id=164694
620 Reviewed by Zalan Bujtas.
622 Rather than calling FrameView directly, call reconcileScrollingState() on the scrolling
625 * WebProcess/WebPage/ios/WebPageIOS.mm:
626 (WebKit::WebPage::updateVisibleContentRects):
628 2016-11-12 Brian Burg <bburg@apple.com>
630 Web Automation: terminate the automation session if the web process crashes
631 https://bugs.webkit.org/show_bug.cgi?id=164671
632 <rdar://problem/29028964>
634 Reviewed by Joseph Pecoraro.
636 * UIProcess/Automation/WebAutomationSession.h:
637 * UIProcess/Automation/WebAutomationSession.cpp:
638 (WebKit::WebAutomationSession::disconnect):
639 (WebKit::WebAutomationSession::terminate):
640 Factor out code that disconnects the remote, unpairs, and notifies the client.
641 Then, expose terminate() which can be called without a FrontendChannel.
642 Calling this causes the _WKAutomationDelegate to clear the local-side session in the
643 browser, and disconnecting from the remote will hang up the remote-side session.
645 * UIProcess/WebPageProxy.cpp:
646 (WebKit::WebPageProxy::processDidCrash):
647 Terminate the session.
649 2016-11-11 Alex Christensen <achristensen@webkit.org>
651 Use SecurityOriginData as keys in StorageManager
652 https://bugs.webkit.org/show_bug.cgi?id=159834
653 <rdar://problem/27346948>
655 Reviewed by Brady Eidson.
657 * Platform/IPC/HandleMessage.h:
658 (IPC::callMemberFunctionImpl):
659 Add a missing std::forward so we can use this callMemberFunctionImpl with rvalues.
660 * UIProcess/API/C/WKApplicationCacheManager.cpp:
661 (WKApplicationCacheManagerGetApplicationCacheOrigins):
662 (WKApplicationCacheManagerDeleteEntriesForOrigin):
663 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
664 (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
665 (WKKeyValueStorageManagerDeleteEntriesForOrigin):
666 * UIProcess/API/C/WKResourceCacheManager.cpp:
667 (WKResourceCacheManagerGetCacheOrigins):
668 (WKResourceCacheManagerClearCacheForOrigin):
669 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
670 (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
671 * UIProcess/Databases/DatabaseProcessProxy.cpp:
672 (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
673 * UIProcess/Databases/DatabaseProcessProxy.h:
674 * UIProcess/Network/NetworkProcessProxy.cpp:
675 (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
676 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
677 * UIProcess/Network/NetworkProcessProxy.h:
678 * UIProcess/Storage/LocalStorageDatabase.cpp:
679 (WebKit::LocalStorageDatabase::create):
680 (WebKit::LocalStorageDatabase::LocalStorageDatabase):
681 (WebKit::LocalStorageDatabase::openDatabase):
682 (WebKit::LocalStorageDatabase::close):
683 * UIProcess/Storage/LocalStorageDatabase.h:
684 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
685 (WebKit::LocalStorageDatabaseTracker::databasePath):
686 (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
687 (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
688 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
689 (WebKit::LocalStorageDatabaseTracker::origins):
690 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
691 * UIProcess/Storage/StorageManager.cpp:
692 (WebKit::StorageManager::StorageArea::securityOrigin):
693 (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
694 (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
695 (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
696 (WebKit::StorageManager::StorageArea::StorageArea):
697 (WebKit::StorageManager::StorageArea::clone):
698 (WebKit::StorageManager::StorageArea::items):
699 (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
700 (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
701 (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
702 (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
703 (WebKit::StorageManager::SessionStorageNamespace::origins):
704 (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
705 (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
706 (WebKit::StorageManager::getSessionStorageOrigins):
707 (WebKit::StorageManager::deleteSessionStorageOrigins):
708 (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
709 (WebKit::StorageManager::getLocalStorageOrigins):
710 (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
711 (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
712 (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
713 (WebKit::StorageManager::createLocalStorageMap):
714 (WebKit::StorageManager::createTransientLocalStorageMap):
715 (WebKit::StorageManager::createSessionStorageMap):
716 (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
717 (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
718 (WebKit::StorageManager::StorageArea::create): Deleted.
719 (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): Deleted.
720 (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): Deleted.
721 * UIProcess/Storage/StorageManager.h:
722 * UIProcess/WebProcessProxy.cpp:
723 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
724 * UIProcess/WebProcessProxy.h:
725 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
726 (WebKit::WebsiteDataRecord::displayNameForOrigin):
727 (WebKit::WebsiteDataRecord::add):
728 * UIProcess/WebsiteData/WebsiteDataRecord.h:
729 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
730 (WebKit::WebsiteDataStore::fetchData):
731 (WebKit::WebsiteDataStore::removeData):
732 (WebKit::WebsiteDataStore::mediaKeyOrigins):
733 (WebKit::WebsiteDataStore::removeMediaKeys):
734 * UIProcess/WebsiteData/WebsiteDataStore.h:
735 Fewer SecurityOrigin uses in the UIProcess! Hooray!
737 2016-11-11 Ryosuke Niwa <rniwa@webkit.org>
739 Hovering over a slotted Text node clears hover state
740 https://bugs.webkit.org/show_bug.cgi?id=164002
741 <rdar://problem/29040471>
743 Reviewed by Simon Fraser.
745 * WebProcess/WebPage/WebPage.cpp:
746 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
747 * WebProcess/WebPage/mac/WebPageMac.mm:
748 (WebKit::WebPage::performImmediateActionHitTestAtLocation):
750 2016-11-11 Wenson Hsieh <wenson_hsieh@apple.com>
752 [WK2] autocorrect and autocapitalize attributes do not work in contenteditable elements
753 https://bugs.webkit.org/show_bug.cgi?id=164538
754 <rdar://problem/8418711>
756 Reviewed by Ryosuke Niwa.
758 Consult HTMLElement::autocorrect() and HTMLElement::autocapitalizeType() when assembling the assisted node
759 information for the currently assisted node.
761 * Shared/AssistedNodeInformation.h:
762 * UIProcess/ios/WKContentViewInteraction.mm:
763 (toUITextAutocapitalize):
764 * WebProcess/WebPage/ios/WebPageIOS.mm:
765 (WebKit::WebPage::getAssistedNodeInformation):
767 2016-11-11 Beth Dakin <bdakin@apple.com>
769 Move to modern TouchBar methods
770 https://bugs.webkit.org/show_bug.cgi?id=164655
772 rdar://problem/29226911
774 Reviewed by Wenson Hsieh.
776 customizationDefaultItemIdentifiers -> defaultItemIdentifiers
777 itemIdentifiers -> defaultItemIdentifiers
778 defaultItems -> templateItems
780 * UIProcess/Cocoa/WebViewImpl.mm:
781 (WebKit::plainTextTouchBarDefaultItemIdentifiers):
782 (WebKit::richTextTouchBarDefaultItemIdentifiers):
783 (WebKit::WebViewImpl::setUpTextTouchBar):
784 (WebKit::WebViewImpl::updateTextTouchBar):
785 (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
786 (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
788 2016-11-11 Brent Fulgham <bfulgham@apple.com>
790 Get rid of old sandbox rules for OS's we no longer support
791 https://bugs.webkit.org/show_bug.cgi?id=164638
793 Reviewed by Simon Fraser.
795 Clean up the various sandbox profiles to get rid of rules that applied to operating system
796 versions we no longer support, or were added in support of bugs that have long since been
799 This should introduce no change in behavior.
801 * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
802 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
803 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
804 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
805 * WebProcess/com.apple.WebProcess.sb.in:
807 2016-11-11 Brady Eidson <beidson@apple.com>
809 IndexedDB 2.0: "close pending flag" and firing blocked events all need fixing.
810 https://bugs.webkit.org/show_bug.cgi?id=164641
812 Reviewed by Alex Christensen.
814 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
815 (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
816 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
817 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
819 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
820 (WebKit::WebIDBConnectionToServer::databaseConnectionPendingClose):
821 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
823 2016-11-11 Eric Carlson <eric.carlson@apple.com>
825 [MediaStream] defer resolution of getUserMedia promise made in a background tab
826 https://bugs.webkit.org/show_bug.cgi?id=164643
827 <rdar://problem/29048317>
829 Reviewed by Brady Eidson.
831 Do not ask for user for access to capture devices when the document does not
832 allow media to play, wait until playback is allowed.
834 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
835 (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
836 (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
837 (WebKit::UserMediaPermissionRequestManager::mediaCanStart):
838 (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension):
839 * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
840 * WebProcess/Plugins/PluginView.cpp:
841 (WebKit::PluginView::mediaCanStart):
842 * WebProcess/Plugins/PluginView.h:
844 2016-11-11 Darin Adler <darin@apple.com>
846 Move Node from ExceptionCode to ExceptionOr
847 https://bugs.webkit.org/show_bug.cgi?id=164515
849 Reviewed by Sam Weinig.
851 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
852 (webkit_dom_html_select_element_remove): Updated exception handling.
853 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
854 (webkit_dom_node_insert_before): Ditto.
855 (webkit_dom_node_replace_child): Ditto.
856 (webkit_dom_node_remove_child): Ditto.
857 (webkit_dom_node_append_child): Ditto.
858 (webkit_dom_node_clone_node_with_error): Ditto.
859 (webkit_dom_node_set_node_value): Ditto.
860 (webkit_dom_node_set_text_content): Ditto.
861 * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
862 (-[WKDOMNode insertNode:before:]): Ditto.
863 (-[WKDOMNode appendChild:]): Ditto.
864 (-[WKDOMNode removeChild:]): Ditto.
866 * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
867 (WebKit::PDFPlugin::PDFPlugin): Removed unneeded ASSERT_NO_EXCEPTION.
868 * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
869 (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Ditto.
871 2016-11-11 Megan Gardner <megan_gardner@apple.com>
873 [Cocoa] Support wide gamut for Drag Image UI
874 https://bugs.webkit.org/show_bug.cgi?id=164490
876 Reviewed by Tim Horton.
878 Fixed an error in the gating for the new wide gamut support in ShareableBitmap.
879 We should always respect the flags straight out, and not make decisions later, it can lead to mismatched data and data storage.
880 Added support for wide gamut in createCGImage.
882 * Shared/cg/ShareableBitmapCG.cpp:
883 (WebKit::bitmapInfo):
884 (WebKit::colorSpace):
885 (WebKit::ShareableBitmap::createGraphicsContext):
886 (WebKit::ShareableBitmap::createCGImage):
887 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
888 (WebKit::convertImageToBitmap):
889 (WebKit::WebDragClient::startDrag):
891 2016-11-11 Beth Dakin <bdakin@apple.com>
893 Get touch bar code building for open source builds
894 https://bugs.webkit.org/show_bug.cgi?id=164610
896 Reviewed by Wenson Hsieh.
900 2016-11-10 Brent Fulgham <bfulgham@apple.com>
902 Remove unused FontService from sandbox profile
903 https://bugs.webkit.org/show_bug.cgi?id=164625
904 <rdar://problem/26899976>
906 Reviewed by Alex Christensen.
908 Part of some general sandbox profile gardening.
910 Convert the Plugin process sandbox into
912 * Configurations/WebKit.xcconfig: Add exclude for com.apple.WebKit.plugin-common.sb.in.
913 * DerivedSources.make: Update to generate com.apple.WebKit.plugin-common.sb from .in file
914 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Copied from Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb.
915 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Removed.
916 * WebKit2.xcodeproj/project.pbxproj: Update for new .in file.
917 * WebProcess/com.apple.WebProcess.sb.in: Remove com.apple.FontServer
918 from macOS Sierra and newer.
920 2016-11-10 Eric Carlson <eric.carlson@apple.com>
922 [MediaStream] apply constraints passed to getUserMedia()
923 https://bugs.webkit.org/show_bug.cgi?id=164561
925 Reviewed by Youenn Fablet.
926 <rdar://problem/29191384>
928 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
929 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
931 2016-11-10 Alex Christensen <achristensen@webkit.org>
933 Move SecurityOrigin::databaseIdentifier() to SecurityOriginData
934 https://bugs.webkit.org/show_bug.cgi?id=164573
936 Reviewed by Brady Eidson.
938 * Shared/API/c/WKSecurityOriginRef.cpp:
939 (WKSecurityOriginCopyDatabaseIdentifier):
940 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
941 (WebKit::LocalStorageDatabaseTracker::databasePath):
942 (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
943 (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
944 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
945 (WebKit::WebsiteDataStore::removeMediaKeys):
946 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
947 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
948 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
949 (WKBundlePageCopyOriginsWithApplicationCache):
950 * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
951 (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin):
952 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
953 (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
954 (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
955 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
956 (WebKit::WebChromeClient::exceededDatabaseQuota):
957 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
959 2016-11-10 Alex Christensen <achristensen@webkit.org>
961 Remove unused CFURLCACHE code
962 https://bugs.webkit.org/show_bug.cgi?id=164551
964 Reviewed by Antti Koivisto.
966 WebKit2 doesn't use CFURLCache, but we still have some unused code that seems to use it.
968 * NetworkProcess/NetworkProcess.cpp:
969 (WebKit::fetchDiskCacheEntries):
970 (WebKit::clearDiskCacheEntries):
971 * NetworkProcess/NetworkProcess.h:
972 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
973 (WebKit::partitionName): Deleted.
974 (WebKit::NetworkProcess::cfURLCacheOrigins): Deleted.
975 (WebKit::NetworkProcess::clearCFURLCacheForOrigins): Deleted.
977 2016-11-10 Carlos Garcia Campos <cgarcia@igalia.com>
979 [Linux] Memory process values shown by the WebMemorySampler in linux are wrong
980 https://bugs.webkit.org/show_bug.cgi?id=164591
982 Reviewed by Michael Catanzaro.
984 It's parsing /proc/self/statm, and returning the values as if they were bytes, but they are number of pages, so
985 to get the bytes we need to take the page size into account. In r208534 I added a method to get /proc/self/statm
986 values in bytes to Platform layer, so we can simply use that instead.
988 * Shared/linux/WebMemorySamplerLinux.cpp:
989 (WebKit::WebMemorySampler::sampleWebKit): Use currentProcessMemoryStatus() and update the descriptions to
990 clarify that values are in bytes.
992 2016-10-14 Carlos Garcia Campos <cgarcia@igalia.com>
994 MemoryPressureHandler shouldn't know how to release WebCore memory
995 https://bugs.webkit.org/show_bug.cgi?id=160497
997 Reviewed by Michael Catanzaro.
999 Set the low memory handler before installing the memory pressure handler.
1001 * WebProcess/WebProcess.cpp:
1002 (WebKit::WebProcess::initializeWebProcess):
1003 * WebProcess/cocoa/WebProcessCocoa.mm:
1004 (WebKit::WebProcess::platformInitializeWebProcess):
1006 2016-10-27 Sergio Villar Senin <svillar@igalia.com>
1008 [GTK] New API to notify about dynamically added forms
1009 https://bugs.webkit.org/show_bug.cgi?id=164050
1011 Reviewed by Carlos Garcia Campos.
1013 This new API exports the WebCore event didAssociateFormControls through the web extension
1014 mechanism. This will help clients (mainly web browsers) to implement robust auto filling
1015 mechanisms. It deals nicely with dynamically created forms (and form controls) as many JS
1016 frameworks do nowadays.
1018 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added a FormClient implementation of
1019 API::InjectedBundle::FormClient.
1020 (webkitWebPageFormControlsAssociated): Emit the new signal.
1021 (webkit_web_page_class_init): Added the new signal "forms-controls-associated".
1022 (webkitWebPageCreate): Set the WebPage as a FormClient.
1024 2016-11-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
1026 [GTK] Allow to use WebMemorySampler feature.
1027 https://bugs.webkit.org/show_bug.cgi?id=164517
1029 Reviewed by Carlos Garcia Campos.
1031 Enable the WebMemorySampler with the environment variable WEBKIT_SAMPLE_MEMORY.
1033 When enabled, it will dump the stats to /tmp each second.
1035 * UIProcess/API/gtk/WebKitWebContext.cpp:
1036 (webkitWebContextConstructed):
1038 2016-11-10 Philippe Normand <pnormand@igalia.com>
1040 [WK2][GTK][GStreamer] Build fails when -plugins-base and -core headers are not installed in the same directory
1041 https://bugs.webkit.org/show_bug.cgi?id=148894
1043 Reviewed by Carlos Garcia Campos.
1045 The pbutils (gst-plugins-base-utils) headers are needed in
1046 WebKit2/GTK for the permission request API related with the
1047 GStreamer codec installer. It builds fine in most cases without
1048 explicitely requiring the pbutils include directory path because
1049 usually all the GStreamer headers are installed in the same path,
1050 excepted for some distributions, like NixOS.
1052 * PlatformGTK.cmake: The GStreamer pbutils include directory was
1053 missing in the header search path.
1055 2016-11-09 Chris Dumez <cdumez@apple.com>
1057 [WK2][!NETWORK_SESSION] Add support for downloading file backed blobs
1058 https://bugs.webkit.org/show_bug.cgi?id=164522
1060 Reviewed by Alex Christensen.
1062 Add support for downloading file backed blobs for the non-NETWORK_SESSION
1063 code path of WebKit2, which is still use on pre-Sierra macOS.
1065 * NetworkProcess/Downloads/Download.cpp:
1066 (WebKit::Download::~Download):
1067 * NetworkProcess/Downloads/Download.h:
1068 (WebKit::Download::setBlobFileReferences):
1069 * NetworkProcess/Downloads/DownloadManager.cpp:
1070 (WebKit::DownloadManager::startDownload):
1071 (WebKit::DownloadManager::convertNetworkLoadToDownload):
1072 * NetworkProcess/Downloads/DownloadManager.h:
1073 * NetworkProcess/NetworkResourceLoader.cpp:
1074 (WebKit::NetworkResourceLoader::convertToDownload):
1076 2016-11-09 Chris Dumez <cdumez@apple.com>
1078 [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
1079 https://bugs.webkit.org/show_bug.cgi?id=164458
1080 <rdar://problem/28905514>
1082 Reviewed by Darin Adler.
1084 Add support for downloading file backed blobs on WebKit2.
1085 It previously wasn't working because we weren't calling
1086 BlobDataFileReference::prepareForFileAccess() for each blob file before
1087 starting the download, similarly to what is done in NetworkResourceLoader's
1088 consumeSandboxExtensions().
1090 * NetworkProcess/Downloads/DownloadManager.cpp:
1091 (WebKit::DownloadManager::startDownload):
1092 * NetworkProcess/Downloads/DownloadManager.h:
1093 (WebKit::DownloadManager::startDownload):
1094 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1095 (WebKit::NetworkConnectionToWebProcess::startDownload):
1096 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1097 * NetworkProcess/NetworkDataTask.cpp:
1098 (WebKit::NetworkDataTask::create):
1099 * NetworkProcess/NetworkDataTask.h:
1100 * NetworkProcess/NetworkDataTaskBlob.cpp:
1101 (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1102 (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1103 (WebKit::NetworkDataTaskBlob::download):
1104 * NetworkProcess/NetworkDataTaskBlob.h:
1105 * NetworkProcess/NetworkLoad.cpp:
1106 (WebKit::NetworkLoad::NetworkLoad):
1107 * NetworkProcess/NetworkLoadParameters.h:
1108 * NetworkProcess/NetworkProcess.cpp:
1109 (WebKit::NetworkProcess::downloadRequest):
1110 * NetworkProcess/NetworkResourceLoader.cpp:
1111 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1112 (WebKit::NetworkResourceLoader::startNetworkLoad):
1113 * NetworkProcess/PingLoad.h:
1115 2016-11-09 Carlos Garcia Campos <cgarcia@igalia.com>
1117 NetworkSession: Network process crash when converting main resource to download
1118 https://bugs.webkit.org/show_bug.cgi?id=164220
1120 Reviewed by Alex Christensen.
1122 Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
1123 sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
1124 NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
1125 download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
1126 NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
1127 having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
1128 load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
1129 NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
1130 client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
1131 created yet. That's not expected to happen and when the response completion handler is called in the
1132 NetworkDataTask it tries to use either the client or the download and it crashes.
1133 We need to cleanup and destroy the ResourceLoader as soon as it becomes a download, because that's the expected
1134 behavior, but at the same time we need to keep the NetworkLoad alive until the NetworkDataTask finishes to become
1135 a download. This patch creates a PendingDownload to take the ownership of the NetworkLoad, so that
1136 ResourceLoader can be cleaned up and destroyed. The DownloadManager now will handle the PendingDownload as if it
1137 was created by startDownload(), but ensuring it's deleted right before the final Download object is added to the
1138 downloads map. That way NetworkDataTask will always have a valid client until the final Download is created,
1139 first the ResourceLoader and then the PendingDownload. Since the DownloadManager is the owner of the
1140 PendingDownload we no longer need the didBecomeDownload() callback to delete the NetworkLoad, because the
1141 NetworkLoad will always be owned by the PendingDownload now that will be deleted by the DownloadManager.
1143 * NetworkProcess/Downloads/DownloadManager.cpp:
1144 (WebKit::DownloadManager::dataTaskBecameDownloadTask): Change the ASSERT because at this point we should always
1145 have a PendingDownload, and then remove it from the map here before adding the final Download to the map.
1146 (WebKit::DownloadManager::convertNetworkLoadToDownload): This replaces convertHandleToDownload, but it also now
1147 used for the NetworkSession. It creates a PendingDownload for the given NetworkLoad.
1148 (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Do not take the PendingDownload from the
1149 map here, just check it's present, because it will be removed from dataTaskBecameDownloadTask().
1150 (WebKit::DownloadManager::convertHandleToDownload): Deleted.
1151 * NetworkProcess/Downloads/DownloadManager.h:
1152 * NetworkProcess/Downloads/PendingDownload.cpp:
1153 (WebKit::PendingDownload::PendingDownload): Add a constructor that receives a NetworkLoad.
1154 * NetworkProcess/Downloads/PendingDownload.h:
1155 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1156 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Just ask the ResourceLoader to be
1157 converted to a download.
1158 * NetworkProcess/NetworkDataTask.h:
1159 * NetworkProcess/NetworkDataTaskBlob.cpp:
1160 (WebKit::NetworkDataTaskBlob::download): Do not call didBecomeDownload() and add an assert to ensure the client
1161 has already been removed right after the final Download object is created.
1162 * NetworkProcess/NetworkLoad.cpp:
1163 (WebKit::NetworkLoad::NetworkLoad): Use a pointer for the client instead of a reference because now we need to
1164 change the client when the load is converted to a download. We don't need to null check the client in any case
1165 because the member is only updated internally and always from a passed reference.
1166 (WebKit::NetworkLoad::sharedDidReceiveResponse):
1167 (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
1168 (WebKit::NetworkLoad::convertTaskToDownload): This now receives a PendingDownload. It updates the client and no
1169 longer sends DidStart, because the PendingDownload sends it now.
1170 (WebKit::NetworkLoad::didReceiveChallenge):
1171 (WebKit::NetworkLoad::didReceiveData):
1172 (WebKit::NetworkLoad::didCompleteWithError):
1173 (WebKit::NetworkLoad::didSendData):
1174 (WebKit::NetworkLoad::wasBlocked):
1175 (WebKit::NetworkLoad::cannotShowURL):
1176 (WebKit::NetworkLoad::didReceiveBuffer):
1177 (WebKit::NetworkLoad::didFinishLoading):
1178 (WebKit::NetworkLoad::didFail):
1179 (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
1180 (WebKit::NetworkLoad::didBecomeDownload): Deleted.
1181 * NetworkProcess/NetworkLoad.h:
1182 * NetworkProcess/NetworkLoadClient.h: Remove didBecomeDownload().
1183 * NetworkProcess/NetworkResourceLoader.cpp:
1184 (WebKit::NetworkResourceLoader::convertToDownload): This replaces didBecomeDownload() and
1185 didConvertToDownload(). It transfers the NetworkLoad to the DownloadManager.
1186 (WebKit::NetworkResourceLoader::abort): We don't need to check if the load was converted to a download here,
1187 because m_networkLoad will always be null here in such case.
1188 (WebKit::NetworkResourceLoader::didBecomeDownload): Deleted
1189 (WebKit::NetworkResourceLoader::didConvertToDownload): Deleted
1190 * NetworkProcess/NetworkResourceLoader.h:
1191 * NetworkProcess/PingLoad.h: Remove didBecomeDownload().
1192 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Ditto.
1193 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Ditto.
1194 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Ditto.
1195 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1196 (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Do not call didBecomeDownload().
1197 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1198 (WebKit::NetworkDataTaskSoup::download): Do not call didBecomeDownload() and add an assert to ensure the client
1199 has already been removed right after the final Download object is created.
1201 2016-11-09 Alex Christensen <achristensen@webkit.org>
1203 Unreviewed, rolling out r208438.
1209 "[WK2][NETWORK_SESSION] Add support for downloading file
1211 https://bugs.webkit.org/show_bug.cgi?id=164458
1212 http://trac.webkit.org/changeset/208438
1214 2016-11-04 Brent Fulgham <bfulgham@apple.com>
1216 Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
1217 https://bugs.webkit.org/show_bug.cgi?id=155185
1218 <rdar://problem/11101440>
1220 Reviewed by Brady Eidson.
1222 Provide SPI to access the new quirk for localStorage. The quirk defaults to 'on'. When active, this
1223 quirk says that localStorage access should be granted, without needing to grant universal file access.
1225 If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
1226 grants universal file access.
1228 Tested by existing TestWebKitAPI tests and WebKit2.LocalStorageQuirkTest
1230 * Shared/WebPreferencesDefinitions.h:
1231 * UIProcess/API/C/WKPreferences.cpp:
1232 (WKPreferencesSetNeedsLocalStorageQuirk): Added.
1233 (WKPreferencesGetNeedsLocalStorageQuirk): Added.
1234 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1235 * UIProcess/API/Cocoa/WKWebView.mm:
1236 (-[WKWebView _initializeWithConfiguration:]): Honor the new localStorage quirk.
1237 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1238 (-[WKWebViewConfiguration init]): Honor the new localStorage quirk flag.
1239 (-[WKWebViewConfiguration copyWithZone:]): Ditto.
1240 (-[WKWebViewConfiguration _needsLocalStorageQuirk]): Added.
1241 (-[WKWebViewConfiguration _setNeedsLocalStorageQuirk:]): Added.
1242 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1243 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1244 (WKBundleSetNeedsLocalStorageQuirk): Added.
1245 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1246 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1247 (WebKit::InjectedBundle::setNeedsLocalStorageQuirk): Added.
1248 * WebProcess/InjectedBundle/InjectedBundle.h:
1249 * WebProcess/WebPage/WebPage.cpp:
1250 (WebKit::WebPage::updatePreferences): Honor the new localStorage quirk flag.
1252 2016-11-09 Simon Fraser <simon.fraser@apple.com>
1254 Implement visual-viewport based position:fixed handling for Mac async scrolling
1255 https://bugs.webkit.org/show_bug.cgi?id=164495
1257 Reviewed by Tim Horton.
1259 Educate the scrolling tree about visual and layout viewports. This is runtime-switchable,
1260 so we push the enable flag to via the root state node, then push the layout viewport,
1261 and the min/max scroll position that contstrain it, through frame state nodes.
1263 When a scroll happens, we compute a new layout viewport when the visual viewport hits
1264 an edge, and push that down through setScrollLayerPosition() since it's used to position
1265 fixed and sticky layers.
1267 The iOS code is made to compile, but not work yet.
1269 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1270 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1271 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
1272 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1273 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
1274 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1275 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1276 (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
1277 * UIProcess/Scrolling/RemoteScrollingTree.h:
1278 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1279 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1280 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
1281 * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1282 (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
1284 2016-11-09 Beth Dakin <bdakin@apple.com>
1286 More attempted build fix.
1288 * UIProcess/Cocoa/WebViewImpl.mm:
1290 2016-11-09 Alex Christensen <achristensen@webkit.org>
1292 Clean up Storage code
1293 https://bugs.webkit.org/show_bug.cgi?id=164562
1295 Reviewed by Brady Eidson.
1299 * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
1300 * Platform/IPC/Connection.cpp:
1301 (IPC::Connection::addWorkQueueMessageReceiver):
1302 * Platform/IPC/Connection.h:
1303 * UIProcess/Storage/LocalStorageDatabase.cpp:
1304 (WebKit::LocalStorageDatabase::create):
1305 (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1306 * UIProcess/Storage/LocalStorageDatabase.h:
1307 * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1308 (WebKit::LocalStorageDatabaseTracker::create):
1309 (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
1310 * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1311 * UIProcess/Storage/StorageManager.cpp:
1312 (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
1313 (WebKit::StorageManager::StorageManager):
1314 * UIProcess/Storage/StorageManager.h:
1315 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1316 (WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):
1317 * UIProcess/mac/SecItemShimProxy.cpp:
1318 (WebKit::SecItemShimProxy::initializeConnection):
1319 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1320 (WebKit::PluginProcessConnectionManager::initializeConnection):
1321 * WebProcess/WebPage/EventDispatcher.cpp:
1322 (WebKit::EventDispatcher::initializeConnection):
1323 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1324 (WebKit::ViewUpdateDispatcher::initializeConnection):
1326 2016-11-09 Beth Dakin <bdakin@apple.com>
1328 Another attempted build fix.
1330 * UIProcess/Cocoa/WebViewImpl.mm:
1332 2016-11-09 Michael Catanzaro <mcatanzaro@igalia.com>
1334 Experimental features should not be enabled by default
1335 https://bugs.webkit.org/show_bug.cgi?id=164367
1337 Reviewed by Darin Adler.
1339 We have two classes of experimental features:
1341 (1) Features that are unstable and should be off by default, except for the developers
1342 currently working on them. This is straightforward to handle; the default value should
1344 (2) Features that are still not ready for end users, but are stable enough for testing. We
1345 want these features to be enabled in testing environments like the bots, MiniBrowser,
1346 Safari Tech Preview, and so forth, but not in stable release builds.
1348 Implement this. It is better than having all experimental features on unconditionally, and
1349 expecting them to be disabled manually on release branches, which is not something we are
1350 keen to do. An exception is Cocoa ports, which to my knowledge do not currently have any
1351 concept of development builds. These ports seem happy to continue disabling features
1352 manually in release branches, and should continue to do so at least for now.
1354 We also have features that we wish to enumerate at runtime, yet have enabled by default
1355 unconditionally. We do not currently have any infrastructure to support this and should not
1356 abuse the experimental status for this purpose; it requires future work. All settings can
1357 still be toggled at runtime by clients that know about them using the existing runtime
1360 Lastly, the custom elements feature is ready to be enabled by default, so it's no longer
1361 experimental and can graduate to the list of normal boolean features.
1363 * Shared/WebPreferencesDefinitions.h:
1365 2016-11-09 Beth Dakin <bdakin@apple.com>
1369 * UIProcess/Cocoa/WebViewImpl.mm:
1371 2016-11-09 Brady Eidson <beidson@apple.com>
1373 IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
1374 https://bugs.webkit.org/show_bug.cgi?id=164504
1376 Reviewed by Darin Adler.
1378 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1379 (WebKit::WebIDBConnectionToClient::iterateCursor):
1380 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1381 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1383 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1384 (WebKit::WebIDBConnectionToServer::iterateCursor):
1385 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1387 2016-11-09 Darin Adler <darin@apple.com>
1389 Move Range from ExceptionCode to ExceptionOr
1390 https://bugs.webkit.org/show_bug.cgi?id=164457
1392 Reviewed by Alex Christensen.
1394 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
1395 (webkit_dom_range_set_start): Updated exception handling.
1396 (webkit_dom_range_set_end): Ditto.
1397 (webkit_dom_range_set_start_before): Ditto.
1398 (webkit_dom_range_set_start_after): Ditto.
1399 (webkit_dom_range_set_end_before): Ditto.
1400 (webkit_dom_range_set_end_after): Ditto.
1401 (webkit_dom_range_select_node): Ditto.
1402 (webkit_dom_range_select_node_contents): Ditto.
1403 (webkit_dom_range_compare_boundary_points): Ditto.
1404 (webkit_dom_range_delete_contents): Ditto.
1405 (webkit_dom_range_extract_contents): Ditto.
1406 (webkit_dom_range_clone_contents): Ditto.
1407 (webkit_dom_range_insert_node): Ditto.
1408 (webkit_dom_range_surround_contents): Ditto.
1409 (webkit_dom_range_create_contextual_fragment): Ditto.
1410 (webkit_dom_range_compare_node): Ditto.
1411 (webkit_dom_range_intersects_node): Ditto.
1412 (webkit_dom_range_compare_point): Ditto.
1413 (webkit_dom_range_is_point_in_range): Ditto.
1414 (webkit_dom_range_expand): Ditto.
1415 * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
1416 (-[WKDOMRange setStart:offset:]): Ditto.
1417 (-[WKDOMRange setEnd:offset:]): Ditto.
1418 (-[WKDOMRange selectNode:]): Ditto.
1419 (-[WKDOMRange selectNodeContents:]): Ditto.
1420 * WebProcess/WebPage/WebFrame.cpp:
1421 (WebKit::WebFrame::contentsAsString): Ditto.
1422 * WebProcess/WebPage/ios/WebPageIOS.mm:
1423 (WebKit::WebPage::rangeForWebSelectionAtPosition): Ditto.
1424 (WebKit::WebPage::rangeForBlockAtPoint): Ditto.
1425 (WebKit::WebPage::selectWithGesture): Ditto.
1426 (WebKit::containsRange): Ditto.
1427 (WebKit::unionDOMRanges): Ditto.
1428 (WebKit::WebPage::switchToBlockSelectionAtPoint): Ditto.
1429 (WebKit::WebPage::getPositionInformation): Ditto.
1432 2016-11-09 Darin Adler <darin@apple.com>
1434 Move EventTarget from ExceptionCode to ExceptionOr
1435 https://bugs.webkit.org/show_bug.cgi?id=164465
1437 Reviewed by Youenn Fablet.
1439 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
1440 (webkit_dom_attr_dispatch_event): Updated exception handling.
1441 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1442 (webkit_dom_cdata_section_dispatch_event): Ditto.
1443 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1444 (webkit_dom_character_data_dispatch_event): Ditto.
1445 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1446 (webkit_dom_comment_dispatch_event): Ditto.
1447 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1448 (webkit_dom_dom_window_dispatch_event): Ditto.
1449 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
1450 (webkit_dom_document_dispatch_event): Ditto.
1451 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1452 (webkit_dom_document_fragment_dispatch_event): Ditto.
1453 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1454 (webkit_dom_document_type_dispatch_event): Ditto.
1455 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1456 (webkit_dom_element_dispatch_event): Ditto.
1457 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1458 (webkit_dom_html_anchor_element_dispatch_event): Ditto.
1459 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1460 (webkit_dom_html_applet_element_dispatch_event): Ditto.
1461 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1462 (webkit_dom_html_area_element_dispatch_event): Ditto.
1463 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
1464 (webkit_dom_html_br_element_dispatch_event): Ditto.
1465 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
1466 (webkit_dom_html_base_element_dispatch_event): Ditto.
1467 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
1468 (webkit_dom_html_body_element_dispatch_event): Ditto.
1469 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
1470 (webkit_dom_html_button_element_dispatch_event): Ditto.
1471 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
1472 (webkit_dom_html_canvas_element_dispatch_event): Ditto.
1473 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
1474 (webkit_dom_html_d_list_element_dispatch_event): Ditto.
1475 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
1476 (webkit_dom_html_directory_element_dispatch_event): Ditto.
1477 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
1478 (webkit_dom_html_div_element_dispatch_event): Ditto.
1479 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
1480 (webkit_dom_html_document_dispatch_event): Ditto.
1481 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1482 (webkit_dom_html_element_dispatch_event): Ditto.
1483 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
1484 (webkit_dom_html_embed_element_dispatch_event): Ditto.
1485 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
1486 (webkit_dom_html_field_set_element_dispatch_event): Ditto.
1487 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
1488 (webkit_dom_html_font_element_dispatch_event): Ditto.
1489 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
1490 (webkit_dom_html_form_element_dispatch_event): Ditto.
1491 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
1492 (webkit_dom_html_frame_element_dispatch_event): Ditto.
1493 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
1494 (webkit_dom_html_frame_set_element_dispatch_event): Ditto.
1495 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
1496 (webkit_dom_html_hr_element_dispatch_event): Ditto.
1497 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
1498 (webkit_dom_html_heading_element_dispatch_event): Ditto.
1499 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
1500 (webkit_dom_html_head_element_dispatch_event): Ditto.
1501 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
1502 (webkit_dom_html_html_element_dispatch_event): Ditto.
1503 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
1504 (webkit_dom_html_iframe_element_dispatch_event): Ditto.
1505 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
1506 (webkit_dom_html_image_element_dispatch_event): Ditto.
1507 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1508 (webkit_dom_html_input_element_dispatch_event): Ditto.
1509 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
1510 (webkit_dom_html_li_element_dispatch_event): Ditto.
1511 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
1512 (webkit_dom_html_label_element_dispatch_event): Ditto.
1513 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
1514 (webkit_dom_html_legend_element_dispatch_event): Ditto.
1515 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
1516 (webkit_dom_html_link_element_dispatch_event): Ditto.
1517 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
1518 (webkit_dom_html_map_element_dispatch_event): Ditto.
1519 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
1520 (webkit_dom_html_marquee_element_dispatch_event): Ditto.
1521 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
1522 (webkit_dom_html_menu_element_dispatch_event): Ditto.
1523 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
1524 (webkit_dom_html_meta_element_dispatch_event): Ditto.
1525 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
1526 (webkit_dom_html_mod_element_dispatch_event): Ditto.
1527 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
1528 (webkit_dom_html_o_list_element_dispatch_event): Ditto.
1529 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
1530 (webkit_dom_html_object_element_dispatch_event): Ditto.
1531 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
1532 (webkit_dom_html_opt_group_element_dispatch_event): Ditto.
1533 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
1534 (webkit_dom_html_option_element_dispatch_event): Ditto.
1535 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
1536 (webkit_dom_html_paragraph_element_dispatch_event): Ditto.
1537 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
1538 (webkit_dom_html_param_element_dispatch_event): Ditto.
1539 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
1540 (webkit_dom_html_pre_element_dispatch_event): Ditto.
1541 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
1542 (webkit_dom_html_quote_element_dispatch_event): Ditto.
1543 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
1544 (webkit_dom_html_script_element_dispatch_event): Ditto.
1545 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1546 (webkit_dom_html_select_element_dispatch_event): Ditto.
1547 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
1548 (webkit_dom_html_style_element_dispatch_event): Ditto.
1549 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
1550 (webkit_dom_html_table_caption_element_dispatch_event): Ditto.
1551 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
1552 (webkit_dom_html_table_cell_element_dispatch_event): Ditto.
1553 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
1554 (webkit_dom_html_table_col_element_dispatch_event): Ditto.
1555 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
1556 (webkit_dom_html_table_element_dispatch_event): Ditto.
1557 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
1558 (webkit_dom_html_table_row_element_dispatch_event): Ditto.
1559 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
1560 (webkit_dom_html_table_section_element_dispatch_event): Ditto.
1561 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
1562 (webkit_dom_html_text_area_element_dispatch_event): Ditto.
1563 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
1564 (webkit_dom_html_title_element_dispatch_event): Ditto.
1565 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
1566 (webkit_dom_html_u_list_element_dispatch_event): Ditto.
1567 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
1568 (webkit_dom_node_dispatch_event): Ditto.
1569 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
1570 (webkit_dom_processing_instruction_dispatch_event): Ditto.
1571 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
1572 (webkit_dom_text_dispatch_event): Ditto.
1574 2016-11-08 Dean Jackson <dino@apple.com>
1576 Rendering support for ExtendedColors
1577 https://bugs.webkit.org/show_bug.cgi?id=164443
1578 <rdar://problems/29123243>
1580 Reviewed by Simon Fraser and Darin Adler.
1582 Implement argument coders for Color.
1584 * Shared/WebCoreArgumentCoders.cpp:
1585 (IPC::ArgumentCoder<Color>::encode):
1586 (IPC::ArgumentCoder<Color>::decode):
1587 * Shared/WebCoreArgumentCoders.h:
1588 * UIProcess/API/Cocoa/WKWebView.mm:
1589 (-[WKWebView _updateScrollViewBackground]):
1591 2016-11-09 Beth Dakin <bdakin@apple.com>
1595 * UIProcess/Cocoa/WebViewImpl.mm:
1596 (WebKit::WebViewImpl::~WebViewImpl):
1598 2016-11-09 Chris Dumez <cdumez@apple.com>
1600 [Mac] Stop using deprecated AppKit enumeration values
1601 https://bugs.webkit.org/show_bug.cgi?id=164494
1603 Reviewed by Darin Adler.
1605 Stop using deprecated AppKit enumeration values.
1607 * Shared/mac/ChildProcessMac.mm:
1608 (WebKit::ChildProcess::stopNSAppRunLoop):
1609 * Shared/mac/WebEventFactory.mm:
1610 (WebKit::mouseButtonForEvent):
1611 (WebKit::mouseEventTypeForEvent):
1612 (WebKit::clickCountForEvent):
1613 (WebKit::globalPointForEvent):
1614 (WebKit::pointForEvent):
1615 (WebKit::textFromEvent):
1616 (WebKit::unmodifiedTextFromEvent):
1617 (WebKit::isKeypadEvent):
1618 (WebKit::isKeyUpEvent):
1619 (WebKit::WebEventFactory::createWebKeyboardEvent):
1620 * UIProcess/Cocoa/WebViewImpl.mm:
1621 (WebKit::WebViewImpl::becomeFirstResponder):
1622 (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
1623 (WebKit::WebViewImpl::viewDidMoveToWindow):
1624 (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
1625 (WebKit::WebViewImpl::createFullScreenWindow):
1626 (WebKit::WebViewImpl::sendToolTipMouseExited):
1627 (WebKit::WebViewImpl::sendToolTipMouseEntered):
1628 (WebKit::applicationFlagsForDrag):
1629 (WebKit::WebViewImpl::setLastMouseDownEvent):
1630 (WebKit::WebViewImpl::doneWithKeyEvent):
1631 (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
1632 (WebKit::WebViewImpl::performKeyEquivalent):
1633 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1634 (WebKit::PluginProcessProxy::beginModal):
1635 * UIProcess/mac/WebContextMenuProxyMac.mm:
1636 (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
1637 * UIProcess/mac/WebInspectorProxyMac.mm:
1638 * UIProcess/mac/WebPopupMenuProxyMac.mm:
1639 (WebKit::WebPopupMenuProxyMac::populate):
1640 (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1641 * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1642 (WebKit::modifierFlagsFromWebEvent):
1643 (WebKit::getEventTypeFromWebEvent):
1644 * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1645 (WebKit::cssAlignmentValueForNSTextAlignment):
1646 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1647 (WebKit::convertImageToBitmap):
1649 2016-11-09 Beth Dakin <bdakin@apple.com>
1651 Support TouchBar in WebKit
1652 https://bugs.webkit.org/show_bug.cgi?id=164437
1654 rdar://problem/28876524
1656 Reviewed by Darin Adler.
1658 * UIProcess/API/Cocoa/WKViewPrivate.h:
1659 * UIProcess/API/Cocoa/WKWebView.mm:
1660 (-[WKWebView makeTouchBar]):
1661 (-[WKWebView candidateListTouchBarItem]):
1662 (-[WKWebView _web_didAddMediaControlsManager:]):
1663 (-[WKWebView _web_didRemoveMediaControlsManager]):
1664 (-[WKWebView _interactWithMediaControlsForTesting]):
1665 (-[WKWebView _wantsMediaPlaybackControlsView]):
1666 (-[WKWebView _setWantsMediaPlaybackControlsView:]):
1667 (-[WKWebView _mediaPlaybackControlsView]):
1668 (-[WKWebView _addMediaPlaybackControlsView:]):
1669 (-[WKWebView _removeMediaPlaybackControlsView]):
1670 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1671 * UIProcess/API/mac/WKView.mm:
1672 (-[WKView makeTouchBar]):
1673 (-[WKView candidateListTouchBarItem]):
1674 (-[WKView _web_didAddMediaControlsManager:]):
1675 (-[WKView _web_didRemoveMediaControlsManager]):
1676 (-[WKView _wantsMediaPlaybackControlsView]):
1677 (-[WKView _setWantsMediaPlaybackControlsView:]):
1678 (-[WKView _mediaPlaybackControlsView]):
1679 (-[WKView _addMediaPlaybackControlsView:]):
1680 (-[WKView _removeMediaPlaybackControlsView]):
1681 * UIProcess/Cocoa/WebViewImpl.h:
1682 (WebKit::WebViewImpl::currentTouchBar):
1683 (WebKit::WebViewImpl::clientWantsMediaPlaybackControlsView):
1684 (WebKit::WebViewImpl::setClientWantsMediaPlaybackControlsView):
1685 (WebKit::WebViewImpl::setIsCustomizingTouchBar):
1686 * UIProcess/Cocoa/WebViewImpl.mm:
1687 (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
1688 (-[WKTextListTouchBarViewController didDestroyView]):
1689 (-[WKTextListTouchBarViewController _selectList:]):
1690 (-[WKTextListTouchBarViewController setCurrentListType:]):
1691 (-[WKTextTouchBarItemController initWithWebViewImpl:]):
1692 (-[WKTextTouchBarItemController didDestroyView]):
1693 (-[WKTextTouchBarItemController touchBar:makeItemForIdentifier:]):
1694 (-[WKTextTouchBarItemController itemForIdentifier:]):
1695 (-[WKTextTouchBarItemController candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
1696 (-[WKTextTouchBarItemController candidateListTouchBarItem:changedCandidateListVisibility:]):
1697 (-[WKTextTouchBarItemController textListTouchBarViewController]):
1698 (-[WKTextTouchBarItemController setTextIsBold:]):
1699 (-[WKTextTouchBarItemController setTextIsItalic:]):
1700 (-[WKTextTouchBarItemController setTextIsUnderlined:]):
1701 (-[WKTextTouchBarItemController _wkChangeTextStyle:]):
1702 (-[WKTextTouchBarItemController setCurrentTextAlignment:]):
1703 (-[WKTextTouchBarItemController _wkChangeTextAlignment:]):
1704 (-[WKTextTouchBarItemController textColor]):
1705 (-[WKTextTouchBarItemController setTextColor:]):
1706 (-[WKTextTouchBarItemController _wkChangeColor:]):
1707 (-[WKTextTouchBarItemController textListViewController]):
1708 (WebKit::WebViewImpl::makeTouchBar):
1709 (WebKit::WebViewImpl::candidateListTouchBarItem):
1710 (WebKit::WebViewImpl::mediaPlaybackControlsView):
1711 (WebKit::WebViewImpl::useMediaPlaybackControlsView):
1712 (WebKit::WebViewImpl::dismissTextTouchBarPopoverItemWithIdentifier):
1713 (WebKit::textTouchBarCustomizationAllowedIdentifiers):
1714 (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers):
1715 (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers):
1716 (WebKit::touchBarDidExitCustomization):
1717 (WebKit::touchBarWillEnterCustomization):
1718 (WebKit::didChangeAutomaticTextCompletion):
1719 (WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
1720 (WebKit::WebViewImpl::setUpTextTouchBar):
1721 (WebKit::WebViewImpl::isRichlyEditable):
1722 (WebKit::WebViewImpl::textTouchBar):
1723 (WebKit::WebViewImpl::updateTextTouchBar):
1724 (WebKit::WebViewImpl::updateMediaTouchBar):
1725 (WebKit::WebViewImpl::forceRequestCandidatesForTesting):
1726 (WebKit::WebViewImpl::updateTouchBar):
1727 (WebKit::WebViewImpl::shouldRequestCandidates):
1728 (WebKit::WebViewImpl::showCandidates):
1729 (WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
1730 (WebKit::WebViewImpl::setEditableElementIsFocused):
1731 (WebKit::WebViewImpl::becomeFirstResponder):
1732 (WebKit::WebViewImpl::selectionDidChange):
1733 (WebKit::WebViewImpl::videoControlsManagerDidChange):
1734 (WebKit::WebViewImpl::updateWebViewImplAdditions): Deleted.
1736 2016-11-09 Chris Dumez <cdumez@apple.com>
1738 [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
1739 https://bugs.webkit.org/show_bug.cgi?id=164458
1740 <rdar://problem/28905514>
1742 Reviewed by Darin Adler.
1744 Add support for downloading file backed blobs on WebKit2.
1745 It previously wasn't working because we weren't calling
1746 BlobDataFileReference::prepareForFileAccess() for each blob file before
1747 starting the download, similarly to what is done in NetworkResourceLoader's
1748 consumeSandboxExtensions().
1750 * NetworkProcess/Downloads/DownloadManager.cpp:
1751 (WebKit::DownloadManager::startDownload):
1752 * NetworkProcess/Downloads/DownloadManager.h:
1753 (WebKit::DownloadManager::startDownload):
1754 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1755 (WebKit::NetworkConnectionToWebProcess::startDownload):
1756 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1757 * NetworkProcess/NetworkDataTask.cpp:
1758 (WebKit::NetworkDataTask::create):
1759 * NetworkProcess/NetworkDataTask.h:
1760 * NetworkProcess/NetworkDataTaskBlob.cpp:
1761 (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1762 (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1763 (WebKit::NetworkDataTaskBlob::download):
1764 * NetworkProcess/NetworkDataTaskBlob.h:
1765 * NetworkProcess/NetworkLoad.cpp:
1766 (WebKit::NetworkLoad::NetworkLoad):
1767 * NetworkProcess/NetworkLoadParameters.h:
1768 * NetworkProcess/NetworkProcess.cpp:
1769 (WebKit::NetworkProcess::downloadRequest):
1770 * NetworkProcess/NetworkResourceLoader.cpp:
1771 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1772 (WebKit::NetworkResourceLoader::startNetworkLoad):
1773 * NetworkProcess/PingLoad.h:
1775 2016-11-09 Chris Dumez <cdumez@apple.com>
1777 [WK2] Network cache speculative revalidation can cause loads to hang
1778 https://bugs.webkit.org/show_bug.cgi?id=164532
1779 <rdar://problem/28519331>
1781 Reviewed by Alex Christensen.
1783 Network cache speculative revalidation could cause loads to hang when HTTP
1784 authentication was involved because NetworkCacheSpeculativeLoad failed to
1785 call NetworkLoad::continueCanAuthenticateAgainstProtectionSpace() in its
1786 canAuthenticateAgainstProtectionSpaceAsync() callback.
1788 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1789 (WebKit::NetworkCache::SpeculativeLoad::canAuthenticateAgainstProtectionSpaceAsync):
1790 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
1792 2016-11-09 Csaba Osztrogonác <ossy@webkit.org>
1794 URTBF after r208361.
1796 * PlatformMac.cmake:
1798 2016-11-09 Csaba Osztrogonác <ossy@webkit.org>
1800 Unreviewed typo fix after r160616 to fix the build on case sensitive file systems.
1802 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1804 2016-11-05 Carlos Garcia Campos <cgarcia@igalia.com>
1806 [SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
1807 https://bugs.webkit.org/show_bug.cgi?id=139358
1809 Reviewed by Michael Catanzaro.
1811 Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
1812 itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
1813 request, libsoup will authenticate those automatically.
1815 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1816 (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
1818 2016-11-04 Filip Pizlo <fpizlo@apple.com>
1820 WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
1821 https://bugs.webkit.org/show_bug.cgi?id=152045
1823 Reviewed by Andy Estes.
1825 * Platform/IPC/Connection.cpp:
1826 (IPC::Connection::SyncMessageState::wait):
1827 (IPC::Connection::sendMessage):
1828 (IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
1829 (IPC::Connection::waitForMessage):
1830 (IPC::Connection::sendSyncMessage):
1831 (IPC::Connection::waitForSyncReply):
1832 * Platform/IPC/Connection.h:
1833 (IPC::Connection::sendSync):
1834 (IPC::Connection::waitForAndDispatchImmediately):
1835 * Platform/IPC/MessageSender.h:
1836 (IPC::MessageSender::sendSync):
1837 * UIProcess/ChildProcessProxy.h:
1838 (WebKit::ChildProcessProxy::sendSync):
1839 * UIProcess/Network/NetworkProcessProxy.cpp:
1840 (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
1841 * UIProcess/Storage/StorageManager.cpp:
1842 (WebKit::StorageManager::applicationWillTerminate):
1843 * UIProcess/WebProcessProxy.cpp:
1844 (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
1845 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1846 (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
1847 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1848 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1849 (-[WKOneShotDisplayLinkHandler displayLinkFired:]):
1850 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1851 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1852 (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
1853 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1854 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
1855 * UIProcess/mac/WKImmediateActionController.mm:
1856 (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1857 * UIProcess/mac/WebPageProxyMac.mm:
1858 (WebKit::WebPageProxy::stringSelectionForPasteboard):
1859 (WebKit::WebPageProxy::dataSelectionForPasteboard):
1860 (WebKit::WebPageProxy::readSelectionFromPasteboard):
1861 (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
1862 (WebKit::WebPageProxy::acceptsFirstMouse):
1863 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1864 (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1865 (WebKit::WebChromeClient::runJavaScriptAlert):
1866 (WebKit::WebChromeClient::runJavaScriptConfirm):
1867 (WebKit::WebChromeClient::runJavaScriptPrompt):
1868 (WebKit::WebChromeClient::print):
1869 (WebKit::WebChromeClient::exceededDatabaseQuota):
1870 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1871 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1872 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1873 * WebProcess/WebPage/WebPage.cpp:
1874 (WebKit::WebPage::postSynchronousMessageForTesting):
1876 2016-11-04 Wenson Hsieh <wenson_hsieh@apple.com>
1878 Safari does not emit composition end if blurred for dead key / Japanese IME
1879 https://bugs.webkit.org/show_bug.cgi?id=164369
1880 <rdar://problem/29050439>
1882 Reviewed by Ryosuke Niwa.
1884 Split WebPage::discardedComposition into two steps, where we first discard marked text and then update the
1885 editor state. This allows the codepath where we cancel the composition early (before setting the selection) to
1886 discard marked text without also forcing an editor state update at the same time. The editor state is later
1887 updated in WebPage::didChangeSelection.
1889 * UIProcess/WebPageProxy.cpp:
1890 (WebKit::WebPageProxy::compositionWasCanceled):
1891 * UIProcess/WebPageProxy.h:
1892 * UIProcess/WebPageProxy.messages.in:
1893 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1894 (WebKit::WebEditorClient::canceledComposition):
1895 * WebProcess/WebCoreSupport/WebEditorClient.h:
1896 * WebProcess/WebPage/WebPage.cpp:
1897 (WebKit::WebPage::didChangeSelection):
1898 (WebKit::WebPage::discardedComposition):
1899 (WebKit::WebPage::canceledComposition):
1900 * WebProcess/WebPage/WebPage.h:
1902 2016-11-04 Alex Christensen <achristensen@webkit.org>
1904 Unreviewed, rolling out r208293.
1906 asserts in API tests.
1910 "NetworkSession: Network process crash when converting main
1911 resource to download"
1912 https://bugs.webkit.org/show_bug.cgi?id=164220
1913 http://trac.webkit.org/changeset/208293
1915 2016-11-04 Said Abou-Hallawa <sabouhallawa@apple.com>
1917 Add a setting and preferences to enable/disable async image decoding
1918 https://bugs.webkit.org/show_bug.cgi?id=164417
1920 Reviewed by Simon Fraser.
1922 Hook up the asyncImageDecodingEnabled setting for WebKit2.
1924 * Shared/WebPreferencesDefinitions.h:
1925 * UIProcess/API/Cocoa/WKPreferences.mm:
1926 (-[WKPreferences _asyncImageDecodingEnabled]):
1927 (-[WKPreferences _setAsyncImageDecodingEnabled:]):
1928 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1929 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1930 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1931 * WebProcess/WebPage/WebPage.cpp:
1932 (WebKit::WebPage::updatePreferences):
1934 2016-11-04 Simon Fraser <simon.fraser@apple.com>
1936 Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
1937 https://bugs.webkit.org/show_bug.cgi?id=164420
1939 Reviewed by Tim Horton.
1942 commitNewTreeState -> commitTreeState ("new" was redundant)
1943 updateBeforeChildren -> commitStateBeforeChildren
1944 updateAfterChildren -> commitStateAfterChildren
1947 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1948 (WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
1949 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
1950 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1951 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1952 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1953 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
1954 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
1955 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
1956 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
1957 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1958 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1960 2016-11-04 Carlos Garcia Campos <cgarcia@igalia.com>
1962 NetworkSession: Add NetworkDataTask implementation for blobs
1963 https://bugs.webkit.org/show_bug.cgi?id=163939
1965 Reviewed by Alex Christensen.
1967 Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
1968 adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
1971 * CMakeLists.txt: Add new files to compilation.
1972 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1973 * NetworkProcess/Downloads/BlobDownloadClient.h:
1974 * NetworkProcess/Downloads/Download.cpp:
1975 (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
1976 definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
1977 reveices a NetworkDataTask and is used by Soup backend and blobs.
1978 (WebKit::Download::~Download):
1979 (WebKit::Download::start):
1980 (WebKit::Download::startWithHandle):
1981 (WebKit::Download::cancel):
1982 (WebKit::Download::didReceiveAuthenticationChallenge):
1983 (WebKit::Download::didReceiveData):
1984 (WebKit::Download::didFinish):
1985 (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
1986 this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
1987 * NetworkProcess/Downloads/Download.h:
1988 (WebKit::Download::Download):
1989 (WebKit::Download::suggestedName):
1990 (WebKit::Download::request):
1991 * NetworkProcess/Downloads/DownloadManager.cpp:
1992 (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
1993 (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1994 * NetworkProcess/Downloads/DownloadManager.h:
1995 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1996 (WebKit::Download::platformCancelNetworkLoad):
1997 * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
1998 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1999 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
2000 using NetworkSession.
2001 * NetworkProcess/NetworkDataTask.cpp:
2002 (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
2003 * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
2004 * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
2005 (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
2006 (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
2007 (WebKit::NetworkDataTaskBlob::clearStream):
2008 (WebKit::NetworkDataTaskBlob::resume):
2009 (WebKit::NetworkDataTaskBlob::suspend):
2010 (WebKit::NetworkDataTaskBlob::cancel):
2011 (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
2012 (WebKit::NetworkDataTaskBlob::getSizeForNext):
2013 (WebKit::NetworkDataTaskBlob::didGetSize):
2014 (WebKit::NetworkDataTaskBlob::seek):
2015 (WebKit::NetworkDataTaskBlob::didReceiveResponse):
2016 (WebKit::NetworkDataTaskBlob::read):
2017 (WebKit::NetworkDataTaskBlob::readData):
2018 (WebKit::NetworkDataTaskBlob::readFile):
2019 (WebKit::NetworkDataTaskBlob::didOpen):
2020 (WebKit::NetworkDataTaskBlob::didRead):
2021 (WebKit::NetworkDataTaskBlob::consumeData):
2022 (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
2023 (WebKit::NetworkDataTaskBlob::suggestedFilename):
2024 (WebKit::NetworkDataTaskBlob::download):
2025 (WebKit::NetworkDataTaskBlob::writeDownload):
2026 (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
2027 (WebKit::NetworkDataTaskBlob::didFailDownload):
2028 (WebKit::NetworkDataTaskBlob::didFinishDownload):
2029 (WebKit::NetworkDataTaskBlob::didFail):
2030 (WebKit::NetworkDataTaskBlob::didFinish):
2031 * NetworkProcess/NetworkDataTaskBlob.h: Added.
2032 * NetworkProcess/NetworkLoad.cpp:
2033 (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
2034 (WebKit::NetworkLoad::~NetworkLoad):
2035 (WebKit::NetworkLoad::setDefersLoading):
2036 (WebKit::NetworkLoad::cancel):
2037 (WebKit::NetworkLoad::continueWillSendRequest):
2038 (WebKit::NetworkLoad::continueDidReceiveResponse):
2039 (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2040 (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
2041 * NetworkProcess/NetworkLoad.h:
2042 * NetworkProcess/NetworkSession.cpp:
2043 (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
2044 * NetworkProcess/NetworkSession.h:
2045 (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
2046 (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
2047 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
2048 because in Cocoa all tasks are invalidated and canceled by the network session.
2049 * NetworkProcess/mac/NetworkLoadMac.mm:
2050 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2051 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2052 (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
2053 (WebKit::NetworkDataTaskSoup::download):
2054 * NetworkProcess/soup/NetworkDataTaskSoup.h:
2055 * NetworkProcess/soup/NetworkSessionSoup.cpp:
2056 * NetworkProcess/soup/NetworkSessionSoup.h:
2057 * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
2058 * PlatformGTK.cmake: Ditto.
2059 * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
2061 2016-11-03 Simon Fraser <simon.fraser@apple.com>
2063 Give all the geometry classes a single-argument scale() function for consistency
2064 https://bugs.webkit.org/show_bug.cgi?id=164400
2066 Reviewed by Zalan Bujtas.
2068 Use single-argument scale() functions.
2070 * PluginProcess/PluginControllerProxy.cpp:
2071 (WebKit::PluginControllerProxy::paint):
2072 * Shared/mac/RemoteLayerBackingStore.mm:
2073 (WebKit::RemoteLayerBackingStore::drawInContext):
2074 * UIProcess/API/Cocoa/WKWebView.mm:
2075 (-[WKWebView _didCommitLayerTree:]):
2076 (-[WKWebView _takeViewSnapshot]):
2077 (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
2078 (-[WKWebView _scrollByContentOffset:]):
2079 (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
2080 * UIProcess/ios/WKContentView.mm:
2081 (-[WKContentView _didCommitLayerTree:]):
2082 * UIProcess/ios/WKContentViewInteraction.mm:
2083 (-[WKContentView _updateTapHighlight]):
2084 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2085 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
2086 (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
2087 * UIProcess/mac/ViewGestureControllerMac.mm:
2088 (WebKit::ViewGestureController::scaledMagnificationOrigin):
2089 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2090 (WebKit::InjectedBundleRangeHandle::renderedImage):
2091 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2092 (WebKit::NetscapePlugin::snapshot):
2093 * WebProcess/Plugins/PDF/PDFPlugin.mm:
2094 (WebKit::PDFPlugin::scrollToPoint):
2095 * WebProcess/WebPage/WebFrame.cpp:
2096 (WebKit::WebFrame::createSelectionSnapshot):
2097 * WebProcess/WebPage/WebPage.cpp:
2098 (WebKit::WebPage::scalePageInViewCoordinates):
2099 (WebKit::WebPage::scaleView):
2100 (WebKit::WebPage::snapshotAtSize):
2101 (WebKit::WebPage::snapshotNode):
2102 (WebKit::WebPage::drawRectToImage):
2103 * WebProcess/WebPage/ios/WebPageIOS.mm:
2104 (WebKit::WebPage::restorePageState):
2106 2016-11-03 Chris Dumez <cdumez@apple.com>
2108 [WK2][Cocoa] Implement user interface for HTML form validation
2109 https://bugs.webkit.org/show_bug.cgi?id=164143
2110 <rdar://problem/28944652>
2112 Reviewed by Simon Fraser.
2114 Implement the ValidationMessageClient in WebKit2 and have it display
2115 a ValidationBubble on Cocoa. ValidationBubble is implemented using
2116 native popovers on both Mac and iOS. As a result, Mac and iOS WK2
2117 now use native popover for HTML form validation instead of the old
2118 Shadow DOM based UI in WebCore.
2120 The native popover shows at the bottom (or top) of the input and it
2121 disapears as soon as the user starts typing or interacts with the
2122 view (e.g. tap / scroll / zoom).
2124 The feature is still disabled at runtime.
2126 * UIProcess/API/Cocoa/WKWebView.mm:
2127 (-[WKWebView _initializeWithConfiguration:]):
2128 (-[WKWebView _keyboardWillShow:]):
2129 (-[WKWebView _keyboardDidShow:]):
2130 (-[WKWebView _contentsOfUserInterfaceItem:]):
2131 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2132 * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2133 * UIProcess/PageClient.h:
2134 * UIProcess/WebPageProxy.cpp:
2135 (WebKit::WebPageProxy::handleWheelEvent):
2136 (WebKit::WebPageProxy::setPageZoomFactor):
2137 (WebKit::WebPageProxy::setPageAndTextZoomFactors):
2138 (WebKit::WebPageProxy::pageDidScroll):
2139 (WebKit::WebPageProxy::resetState):
2140 (WebKit::WebPageProxy::hideValidationMessage):
2141 * UIProcess/WebPageProxy.h:
2142 (WebKit::WebPageProxy::validationBubble):
2143 (WebKit::WebPageProxy::setIsKeyboardAnimatingIn):
2144 * UIProcess/WebPageProxy.messages.in:
2145 * UIProcess/ios/PageClientImplIOS.h:
2146 * UIProcess/ios/PageClientImplIOS.mm:
2147 (WebKit::PageClientImpl::createValidationBubble):
2148 * UIProcess/ios/WKContentViewInteraction.mm:
2149 (-[WKContentView _willStartScrollingOrZooming]):
2150 (-[WKContentView scrollViewWillStartPanOrPinchGesture]):
2151 (-[WKContentView _didEndScrollingOrZooming]):
2152 * UIProcess/ios/WebPageProxyIOS.mm:
2153 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2154 (WebKit::WebPageProxy::potentialTapAtPosition):
2155 (WebKit::WebPageProxy::showValidationMessage):
2156 (WebKit::WebPageProxy::setIsScrollingOrZooming):
2157 * UIProcess/mac/PageClientImpl.h:
2158 * UIProcess/mac/PageClientImpl.mm:
2159 (WebKit::PageClientImpl::createValidationBubble):
2160 * UIProcess/mac/WebPageProxyMac.mm:
2161 (WebKit::WebPageProxy::showValidationMessage):
2162 * WebKit2.xcodeproj/project.pbxproj:
2163 * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
2164 (WebKit::WebValidationMessageClient::WebValidationMessageClient):
2165 (WebKit::WebValidationMessageClient::~WebValidationMessageClient):
2166 (WebKit::WebValidationMessageClient::showValidationMessage):
2167 (WebKit::WebValidationMessageClient::hideValidationMessage):
2168 (WebKit::WebValidationMessageClient::isValidationMessageVisible):
2169 * WebProcess/WebCoreSupport/WebValidationMessageClient.h: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
2170 * WebProcess/WebPage/WebPage.cpp:
2171 (WebKit::m_userInterfaceLayoutDirection):
2173 2016-11-03 Tim Horton <timothy_horton@apple.com>
2175 Printing to PDF should produce internal links when HTML has internal links
2176 https://bugs.webkit.org/show_bug.cgi?id=112081
2177 <rdar://problem/5955705>
2179 Reviewed by Simon Fraser.
2181 * UIProcess/mac/WKPrintingView.h:
2182 * UIProcess/mac/WKPrintingView.mm:
2183 (linkDestinationName):
2184 (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
2185 Propagate link-to-destination annotations (and each page's destinations)
2186 into the printed PDF.
2187 Generate a unique destination name based on the page and position, because
2188 we have lost the fragment name information.
2190 (-[WKPrintingView drawRect:]):
2191 Compute all of the destinations for every page, so that we can add them
2192 to the context as we paint the pages (we need the page CTM in order to add them).
2194 2016-11-03 Alex Christensen <achristensen@webkit.org>
2196 Unreviewed, rolling out r208298.
2197 https://bugs.webkit.org/show_bug.cgi?id=163939
2203 "NetworkSession: Add NetworkDataTask implementation for blobs"
2204 https://bugs.webkit.org/show_bug.cgi?id=163939
2205 http://trac.webkit.org/changeset/208298
2207 2016-11-03 Ryan Haddad <ryanhaddad@apple.com>
2209 Unreviewed, rolling out r208330.
2211 This change appears to have caused two editing tests to fail
2216 "Reduce PassRefPtr use in WebKit2"
2217 https://bugs.webkit.org/show_bug.cgi?id=164360
2218 http://trac.webkit.org/changeset/208330
2220 2016-11-03 Dan Bernstein <mitz@apple.com>
2222 WKWebView’s _observedRenderingProgressEvents not restored after web process crash
2223 https://bugs.webkit.org/show_bug.cgi?id=164368
2224 <rdar://problem/29091954>
2226 Reviewed by Anders Carlsson.
2228 Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.
2230 * Shared/WebPageCreationParameters.cpp:
2231 (WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
2232 (WebKit::WebPageCreationParameters::decode): Decode it.
2233 * Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.
2235 * UIProcess/WebPageProxy.cpp:
2236 (WebKit::WebPageProxy::WebPageProxy): Removed initializer for
2237 m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
2238 (WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
2239 member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
2240 (WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
2241 creation parameters.
2243 * UIProcess/WebPageProxy.h: Declared new member variable, deleted
2244 m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.
2246 * UIProcess/ios/WebPageProxyIOS.mm:
2247 (WebKit::WebPageProxy::didCommitLayerTree): Rather than using
2248 m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.
2250 * WebProcess/WebPage/WebPage.cpp:
2251 (WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.
2253 2016-11-02 Alex Christensen <achristensen@webkit.org>
2255 Reduce PassRefPtr use in WebKit2
2256 https://bugs.webkit.org/show_bug.cgi?id=164360
2258 Reviewed by Tim Horton.
2260 * Shared/API/APISecurityOrigin.h:
2261 (API::SecurityOrigin::SecurityOrigin):
2262 * Shared/API/APISerializedScriptValue.h:
2263 (API::SerializedScriptValue::create):
2264 (API::SerializedScriptValue::SerializedScriptValue):
2265 * Shared/API/c/WKSharedAPICast.h:
2266 (WebKit::ProxyingRefPtr::ProxyingRefPtr):
2268 * Shared/APIWebArchive.h:
2269 * Shared/APIWebArchive.mm:
2270 (API::WebArchive::create):
2271 (API::WebArchive::WebArchive):
2272 * UIProcess/API/APIHitTestResult.cpp:
2273 (API::HitTestResult::create):
2274 * UIProcess/API/APIHitTestResult.h:
2275 * UIProcess/API/APIUIClient.h:
2276 (API::UIClient::createNewPage):
2277 * UIProcess/API/C/WKPage.cpp:
2278 (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
2279 (WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
2280 (WebKit::RunJavaScriptAlertResultListener::create):
2281 (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
2282 (WebKit::RunJavaScriptConfirmResultListener::create):
2283 (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
2284 (WebKit::RunJavaScriptPromptResultListener::create):
2285 (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
2286 (WKPageSetPageUIClient):
2287 * UIProcess/API/Cocoa/WKWebView.mm:
2288 (-[WKWebView _takeViewSnapshot]):
2289 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2290 * UIProcess/Cocoa/UIDelegate.h:
2291 * UIProcess/Cocoa/UIDelegate.mm:
2292 (WebKit::UIDelegate::UIClient::createNewPage):
2293 * UIProcess/ios/WKGeolocationProviderIOS.mm:
2294 (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
2295 * UIProcess/mac/WKImmediateActionController.mm:
2296 (-[WKImmediateActionController _webHitTestResult]):
2297 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2299 (WKBundlePageCopyContextMenuItems):
2300 (WKBundlePageCopyContextMenuAtPointInWindow):
2301 * WebProcess/UserContent/WebUserContentController.cpp:
2302 (WebKit::WebUserMessageHandlerDescriptorProxy::create):
2303 * WebProcess/WebPage/WebUndoStep.cpp:
2304 (WebKit::WebUndoStep::create):
2305 * WebProcess/WebPage/WebUndoStep.h:
2306 (WebKit::WebUndoStep::WebUndoStep):
2308 2016-11-01 Gavin Barraclough <barraclough@apple.com>
2310 Remove PageThrottler & all related code
2311 https://bugs.webkit.org/show_bug.cgi?id=164302
2313 Reviewed by Ryosuke Niwa.
2315 All relevant information now available from the ActivityState.
2317 * PluginProcess/PluginProcess.cpp:
2318 (WebKit::PluginProcess::PluginProcess):
2319 (WebKit::PluginProcess::createWebProcessConnection):
2320 (WebKit::PluginProcess::audioHardwareDidBecomeActive): Deleted.
2321 (WebKit::PluginProcess::audioHardwareDidBecomeInactive): Deleted.
2322 * PluginProcess/PluginProcess.h:
2324 * PluginProcess/WebProcessConnection.cpp:
2325 (WebKit::WebProcessConnection::audioHardwareDidBecomeActive): Deleted.
2326 (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive): Deleted.
2327 * PluginProcess/WebProcessConnection.h:
2328 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2329 (WebKit::NPRuntimeObjectMap::evaluate):
2330 * WebProcess/Plugins/Plugin.h:
2331 (WebKit::Plugin::audioHardwareActivity): Deleted.
2332 * WebProcess/Plugins/PluginProcessConnection.cpp:
2333 (WebKit::PluginProcessConnection::PluginProcessConnection):
2334 (WebKit::PluginProcessConnection::didReceiveMessage):
2335 (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive): Deleted.
2336 (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive): Deleted.
2337 * WebProcess/Plugins/PluginProcessConnection.h:
2338 (WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
2339 (WebKit::PluginProcessConnection::audioHardwareActivity): Deleted.
2340 * WebProcess/Plugins/PluginProcessConnection.messages.in:
2341 * WebProcess/Plugins/PluginProxy.cpp:
2342 (WebKit::PluginProxy::audioHardwareActivity): Deleted.
2343 * WebProcess/Plugins/PluginProxy.h:
2344 * WebProcess/Plugins/PluginView.cpp:
2345 (WebKit::PluginView::audioHardwareActivity): Deleted.
2346 * WebProcess/Plugins/PluginView.h:
2347 * WebProcess/WebPage/WebPage.cpp:
2349 2016-11-03 Dan Bernstein <mitz@apple.com>
2351 REGRESSION (r206247): Painting milestones can be delayed until the next layer flush
2352 https://bugs.webkit.org/show_bug.cgi?id=164340
2353 <rdar://problem/29074344>
2355 Reviewed by Tim Horton.
2357 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Declared new helper function.
2358 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2359 (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Helper
2360 function that sends the message to the UI process and resets
2361 m_pendingNewlyReachedLayoutMilestones.
2362 (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Wait until after the commit to get the
2363 pending milestones and send them to the UI process. This way we don’t miss milestones that
2364 fire during the commit.
2366 2016-11-02 David Kilzer <ddkilzer@apple.com>
2368 Bug 164333: Add logging for "WebKit encountered an internal error" messages due to Network process crashes
2369 <https://webkit.org/b/164333>
2370 <rdar://problem/29072727>
2372 Reviewed by Alex Christensen.
2374 * WebProcess/WebProcess.cpp:
2375 (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
2376 Add private method to log diagnostic message.
2377 (WebKit::WebProcess::networkProcessConnectionClosed):
2378 Call logDiagnosticMessageForNetworkProcessCrash().
2379 * WebProcess/WebProcess.h:
2380 (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
2383 2016-11-02 Alex Christensen <achristensen@webkit.org>
2385 Remove Battery Status API from the tree
2386 https://bugs.webkit.org/show_bug.cgi?id=164213
2388 Reviewed by Sam Weinig.
2391 * PlatformEfl.cmake:
2392 * Shared/API/APIObject.h:
2393 * Shared/API/c/WKBase.h:
2394 * Shared/WebBatteryStatus.cpp: Removed.
2395 * Shared/WebBatteryStatus.h: Removed.
2396 * UIProcess/API/C/WKAPICast.h:
2397 * UIProcess/API/C/WKBatteryManager.cpp: Removed.
2398 * UIProcess/API/C/WKBatteryManager.h: Removed.
2399 * UIProcess/API/C/WKBatteryStatus.cpp: Removed.
2400 * UIProcess/API/C/WKBatteryStatus.h: Removed.
2401 * UIProcess/API/C/WKContext.cpp:
2402 (WKContextGetBatteryManager): Deleted.
2403 * UIProcess/API/C/WKContext.h:
2404 * UIProcess/API/efl/ewk_context.cpp:
2405 (EwkContext::EwkContext):
2406 * UIProcess/API/efl/ewk_context_private.h:
2407 * UIProcess/API/efl/ewk_main.cpp:
2408 (WebKit::EwkMain::initialize):
2409 (WebKit::EwkMain::finalize):
2410 (WebKit::EwkMain::shutdownInitializedEFLModules):
2411 * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Removed.
2412 * UIProcess/API/gtk/WebKitBatteryProvider.h: Removed.
2413 * UIProcess/API/gtk/WebKitWebContext.cpp:
2414 (webkitWebContextConstructed):
2415 * UIProcess/WebBatteryManagerProxy.cpp: Removed.
2416 * UIProcess/WebBatteryManagerProxy.h: Removed.
2417 * UIProcess/WebBatteryManagerProxy.messages.in: Removed.
2418 * UIProcess/WebBatteryProvider.cpp: Removed.
2419 * UIProcess/WebBatteryProvider.h: Removed.
2420 * UIProcess/WebProcessPool.cpp:
2421 (WebKit::m_hiddenPageThrottlingTimer):
2422 * UIProcess/efl/BatteryProvider.cpp: Removed.
2423 * UIProcess/efl/BatteryProvider.h: Removed.
2424 * WebProcess/Battery: Removed.
2425 * WebProcess/Battery/WebBatteryManager.cpp: Removed.
2426 * WebProcess/Battery/WebBatteryManager.h: Removed.
2427 * WebProcess/Battery/WebBatteryManager.messages.in: Removed.
2428 * WebProcess/WebCoreSupport/WebBatteryClient.cpp: Removed.
2429 * WebProcess/WebCoreSupport/WebBatteryClient.h: Removed.
2430 * WebProcess/WebPage/WebPage.cpp:
2431 (WebKit::m_userInterfaceLayoutDirection):
2432 * WebProcess/WebProcess.cpp:
2433 (WebKit::m_resourceLoadStatisticsStorage):
2435 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2437 NetworkSession: Add NetworkDataTask implementation for blobs
2438 https://bugs.webkit.org/show_bug.cgi?id=163939
2440 Reviewed by Alex Christensen.
2442 Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
2443 adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
2446 * CMakeLists.txt: Add new files to compilation.
2447 * NetworkProcess/Downloads/BlobDownloadClient.cpp:
2448 * NetworkProcess/Downloads/BlobDownloadClient.h:
2449 * NetworkProcess/Downloads/Download.cpp:
2450 (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
2451 definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
2452 reveices a NetworkDataTask and is used by Soup backend and blobs.
2453 (WebKit::Download::~Download):
2454 (WebKit::Download::start):
2455 (WebKit::Download::startWithHandle):
2456 (WebKit::Download::cancel):
2457 (WebKit::Download::didReceiveAuthenticationChallenge):
2458 (WebKit::Download::didReceiveData):
2459 (WebKit::Download::didFinish):
2460 (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
2461 this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
2462 * NetworkProcess/Downloads/Download.h:
2463 (WebKit::Download::Download):
2464 (WebKit::Download::suggestedName):
2465 (WebKit::Download::request):
2466 * NetworkProcess/Downloads/DownloadManager.cpp:
2467 (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
2468 (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
2469 * NetworkProcess/Downloads/DownloadManager.h:
2470 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
2471 (WebKit::Download::platformCancelNetworkLoad):
2472 * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
2473 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2474 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
2475 using NetworkSession.
2476 * NetworkProcess/NetworkDataTask.cpp:
2477 (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
2478 * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
2479 * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
2480 (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
2481 (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
2482 (WebKit::NetworkDataTaskBlob::clearStream):
2483 (WebKit::NetworkDataTaskBlob::resume):
2484 (WebKit::NetworkDataTaskBlob::suspend):
2485 (WebKit::NetworkDataTaskBlob::cancel):
2486 (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
2487 (WebKit::NetworkDataTaskBlob::getSizeForNext):
2488 (WebKit::NetworkDataTaskBlob::didGetSize):
2489 (WebKit::NetworkDataTaskBlob::seek):
2490 (WebKit::NetworkDataTaskBlob::didReceiveResponse):
2491 (WebKit::NetworkDataTaskBlob::read):
2492 (WebKit::NetworkDataTaskBlob::readData):
2493 (WebKit::NetworkDataTaskBlob::readFile):
2494 (WebKit::NetworkDataTaskBlob::didOpen):
2495 (WebKit::NetworkDataTaskBlob::didRead):
2496 (WebKit::NetworkDataTaskBlob::consumeData):
2497 (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
2498 (WebKit::NetworkDataTaskBlob::suggestedFilename):
2499 (WebKit::NetworkDataTaskBlob::download):
2500 (WebKit::NetworkDataTaskBlob::writeDownload):
2501 (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
2502 (WebKit::NetworkDataTaskBlob::didFailDownload):
2503 (WebKit::NetworkDataTaskBlob::didFinishDownload):
2504 (WebKit::NetworkDataTaskBlob::didFail):
2505 (WebKit::NetworkDataTaskBlob::didFinish):
2506 * NetworkProcess/NetworkDataTaskBlob.h: Added.
2507 * NetworkProcess/NetworkLoad.cpp:
2508 (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
2509 (WebKit::NetworkLoad::~NetworkLoad):
2510 (WebKit::NetworkLoad::setDefersLoading):
2511 (WebKit::NetworkLoad::cancel):
2512 (WebKit::NetworkLoad::continueWillSendRequest):
2513 (WebKit::NetworkLoad::continueDidReceiveResponse):
2514 (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2515 (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
2516 * NetworkProcess/NetworkLoad.h:
2517 * NetworkProcess/NetworkSession.cpp:
2518 (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
2519 * NetworkProcess/NetworkSession.h:
2520 (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
2521 (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
2522 * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
2523 because in Cocoa all tasks are invalidated and canceled by the network session.
2524 * NetworkProcess/mac/NetworkLoadMac.mm:
2525 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2526 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2527 (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
2528 (WebKit::NetworkDataTaskSoup::download):
2529 * NetworkProcess/soup/NetworkDataTaskSoup.h:
2530 * NetworkProcess/soup/NetworkSessionSoup.cpp:
2531 * NetworkProcess/soup/NetworkSessionSoup.h:
2532 * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
2533 * PlatformGTK.cmake: Ditto.
2534 * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
2536 2016-11-02 Andy Estes <aestes@apple.com>
2538 REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
2539 https://bugs.webkit.org/show_bug.cgi?id=164311
2540 <rdar://problem/26995374>
2542 Reviewed by Tim Horton.
2544 -[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
2545 iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
2548 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2549 (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
2550 convert fileURL.fileSystemRepresentation to a String.
2552 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2554 NetworkSession: Network process crash when converting main resource to download
2555 https://bugs.webkit.org/show_bug.cgi?id=164220
2557 Reviewed by Alex Christensen.
2559 Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
2560 sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
2561 NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
2562 download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
2563 NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
2564 having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
2565 load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
2566 NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
2567 client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
2568 created yet. That's not expected to happen and when the response completion handler is called in the
2569 NetworkDataTask it tries to use either the client or the download and it crashes.
2571 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2572 (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Update ASSERT, because abort doesn't cleanup the
2573 resource loader in case it's becoming a download.
2574 * NetworkProcess/NetworkResourceLoader.cpp:
2575 (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
2576 (WebKit::NetworkResourceLoader::isBecomingDownload): Helper method to check if the resource load was converted to a
2577 download, but didBecomeDownload() hasn't been called yet.
2578 (WebKit::NetworkResourceLoader::abort): If the resource load is becoming a download do not call cleanup()
2579 because it will be called by didBecomeDownload() later.
2580 * NetworkProcess/NetworkResourceLoader.h:
2582 2016-11-02 David Kilzer <ddkilzer@apple.com>
2584 Add logging for "WebKit encountered an internal error" messages
2585 <https://webkit.org/b/164272>
2586 <rdar://problem/28546064>
2588 Reviewed by Alex Christensen.
2590 * NetworkProcess/NetworkResourceLoader.cpp:
2591 (WebKit::NetworkResourceLoader::startNetworkLoad):
2592 * WebProcess/Network/WebLoaderStrategy.cpp:
2593 (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2594 * WebProcess/Network/WebResourceLoader.cpp:
2595 (WebKit::WebResourceLoader::didReceiveResource):
2596 - Add logging for various internalError() events.
2598 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2600 [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
2601 https://bugs.webkit.org/show_bug.cgi?id=164303
2603 Reviewed by Michael Catanzaro.
2605 This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
2606 BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
2608 * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2609 (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
2610 (WebKit::AcceleratedBackingStoreX11::update):
2612 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2614 [GTK] Remove FileSystem::filenameToString() and use FileSystem::stringFromFileSystemRepresentation() everywhere instead
2615 https://bugs.webkit.org/show_bug.cgi?id=164315
2617 Reviewed by Michael Catanzaro.
2619 * Shared/gtk/ProcessExecutablePathGtk.cpp:
2620 (WebKit::getExecutablePath):
2621 (WebKit::findWebKitProcess):
2622 * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
2623 (API::WebsiteDataStore::defaultNetworkCacheDirectory):
2624 (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
2625 (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
2626 * UIProcess/API/gtk/WebKitWebContext.cpp:
2627 (webkitWebContextConstructed):
2628 (webkit_web_context_set_favicon_database_directory):
2629 (webkit_web_context_set_additional_plugins_directory):
2630 (webkit_web_context_set_disk_cache_directory):
2631 * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
2632 (webkitWebsiteDataManagerGetDataStore):
2633 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2634 (WebKit::PluginInfoCache::PluginInfoCache):
2635 * UIProcess/gtk/WebProcessPoolGtk.cpp:
2636 (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
2637 * WebProcess/gtk/WebGtkExtensionManager.cpp:
2638 (WebKit::parseUserData):
2640 2016-11-02 Romain Bellessort <romain.bellessort@crf.canon.fr>
2642 [Readable Streams API] Enable creation of ReadableByteStreamController
2643 https://bugs.webkit.org/show_bug.cgi?id=164014
2645 Reviewed by Youenn Fablet.
2647 Added flag for the byte stream part of Readable Streams API.
2649 * Configurations/FeatureDefines.xcconfig:
2651 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2653 PluginInfoStore::loadPluginsIfNecessary can still load plugins multiple times
2654 https://bugs.webkit.org/show_bug.cgi?id=164103
2656 Reviewed by Michael Catanzaro.
2658 Follow symlinks when scanning plugins to avoid duplicates.
2660 * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache version to ensure duplicated plugins are removed
2662 * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2663 (WebKit::PluginInfoStore::pluginPathsInDirectory): Use realpath() to always return the actual file path.
2665 2016-11-02 Carlos Garcia Campos <cgarcia@igalia.com>
2667 [GTK] Plugin process crash in WebKit::NetscapePluginX11::visibilityDidChange with evince browser plugin
2668 https://bugs.webkit.org/show_bug.cgi?id=164204
2670 Reviewed by Michael Catanzaro.
2672 Check the platform plugin widget is embedded before trying to get its socket window.
2674 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2675 (WebKit::NetscapePluginX11::geometryDidChange):
2676 (WebKit::NetscapePluginX11::visibilityDidChange):
2678 2016-11-01 Wenson Hsieh <wenson_hsieh@apple.com>
2680 Turn the Input Events runtime flag on by default
2681 https://bugs.webkit.org/show_bug.cgi?id=164297
2683 Reviewed by Ryosuke Niwa.
2685 * Shared/WebPreferencesDefinitions.h:
2687 2016-11-01 Jaehun Lim <ljaehun.lim@samsung.com>
2689 Unreviewed, EFL build fix after r208225
2691 Rename ViewState to ActivityState
2693 * UIProcess/efl/WebView.cpp:
2694 (WebKit::WebView::setActive):
2695 (WebKit::WebView::setFocused):
2696 (WebKit::WebView::setVisible):
2698 2016-11-01 Alex Christensen <achristensen@webkit.org>
2702 * PlatformMac.cmake:
2704 2016-11-01 Ryosuke Niwa <rniwa@webkit.org>
2706 Remove CUSTOM_ELEMENTS build flag
2707 https://bugs.webkit.org/show_bug.cgi?id=164267
2709 Reviewed by Antti Koivisto.
2711 Removed the build flag.
2713 * Configurations/FeatureDefines.xcconfig:
2714 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2715 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2716 * WebProcess/WebPage/WebPage.cpp:
2717 (WebKit::WebPage::updatePreferences):
2719 2016-11-01 Eric Carlson <eric.carlson@apple.com>
2721 [MediaStream] restrict media capture secure connections
2722 https://bugs.webkit.org/show_bug.cgi?id=164234
2723 <rdar://problem/28944906>
2725 Reviewed by Alex Christensen.
2727 * Shared/WebPreferencesDefinitions.h:
2729 * UIProcess/API/C/WKPreferences.cpp:
2730 (WKPreferencesSetMediaCaptureRequiresSecureConnection):
2731 (WKPreferencesGetMediaCaptureRequiresSecureConnection):
2732 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2734 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2735 (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Drive by
2736 fix: remove some unused parameters in a lambda call.
2738 * WebProcess/WebPage/WebPage.cpp:
2739 (WebKit::WebPage::updatePreferences):
2741 2016-11-01 Gavin Barraclough <barraclough@apple.com>
2743 Add IsAudible, IsLoading to ActivityState
2744 https://bugs.webkit.org/show_bug.cgi?id=164286
2746 Reviewed by Geoff Garen.
2748 By computing these values in the UIProcess and passing them to WebContent we can
2749 more closely unify iOS & macOS throttling, and remove the PageThrottler class.
2751 * UIProcess/WebPageProxy.cpp:
2752 (WebKit::WebPageProxy::updateActivityState):
2753 - Added update for IsAudible, IsLoading flags.
2754 (WebKit::WebPageProxy::updateThrottleState):
2755 - Read IsAudible, IsLoading flags from ActivityState.
2756 (WebKit::WebPageProxy::setMuted):
2757 - call activityStateDidChange to trigger update.
2758 (WebKit::WebPageProxy::isPlayingMediaDidChange):
2759 - call activityStateDidChange to trigger update.
2760 * UIProcess/WebPageProxy.h:
2761 (WebKit::WebPageProxy::isLoadingChanged):
2762 - call activityStateDidChange to trigger update.
2764 2016-10-31 Gavin Barraclough <barraclough@apple.com>
2766 Rename ViewState to ActivityState
2767 https://bugs.webkit.org/show_bug.cgi?id=164254
2769 Reviewed by Andreas Kling.
2771 We plan to add a couple more flags to ViewState that aren't directly related to the view
2772 itself - whether there is an ongoing page load, and whether whether there is audio playback.
2773 This will allow viewState (now activityState) to fully drive throttling decisions.
2775 Renaming this bitfield accordingly.
2777 * Shared/WebPageCreationParameters.cpp:
2778 (WebKit::WebPageCreationParameters::encode):
2779 (WebKit::WebPageCreationParameters::decode):
2780 * Shared/WebPageCreationParameters.h:
2781 * UIProcess/API/Cocoa/WKWebView.mm:
2782 (-[WKWebView didMoveToWindow]):
2783 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2784 (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
2785 (_WebKitWebViewBasePrivate::updateActivityStateTimerFired):
2786 (webkitWebViewBaseScheduleUpdateActivityState):
2787 (toplevelWindowFocusInEvent):
2788 (toplevelWindowFocusOutEvent):
2789 (toplevelWindowStateEvent):
2790 (webkitWebViewBaseSetToplevelOnScreenWindow):
2791 (webkitWebViewBaseMap):
2792 (webkitWebViewBaseUnmap):
2793 (webkitWebViewBaseSetFocus):
2794 (webkitWebViewBaseIsInWindowActive):
2795 (webkitWebViewBaseIsFocused):
2796 (webkitWebViewBaseIsVisible):
2797 (webkitWebViewBaseIsInWindow):
2798 (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
2799 (webkitWebViewBaseScheduleUpdateViewState): Deleted.
2800 * UIProcess/Cocoa/WebViewImpl.mm:
2801 (WebKit::WebViewImpl::becomeFirstResponder):
2802 (WebKit::WebViewImpl::resignFirstResponder):
2803 (WebKit::WebViewImpl::windowDidOrderOffScreen):
2804 (WebKit::WebViewImpl::windowDidOrderOnScreen):
2805 (WebKit::WebViewImpl::windowDidBecomeKey):
2806 (WebKit::WebViewImpl::windowDidResignKey):
2807 (WebKit::WebViewImpl::windowDidMiniaturize):
2808 (WebKit::WebViewImpl::windowDidDeminiaturize):
2809 (WebKit::WebViewImpl::windowDidChangeOcclusionState):
2810 (WebKit::WebViewImpl::viewDidMoveToWindow):
2811 (WebKit::WebViewImpl::viewDidHide):
2812 (WebKit::WebViewImpl::viewDidUnhide):
2813 (WebKit::WebViewImpl::activeSpaceDidChange):
2814 (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
2815 (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
2816 (WebKit::WebViewImpl::prepareForMoveToWindow):
2817 * UIProcess/DrawingAreaProxy.h:
2818 (WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):
2819 (WebKit::DrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2820 * UIProcess/WebPageProxy.cpp:
2821 (WebKit::WebPageProxy::WebPageProxy):
2822 (WebKit::WebPageProxy::reattachToWebProcess):
2823 (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
2824 (WebKit::WebPageProxy::updateActivityState):
2825 (WebKit::WebPageProxy::activityStateDidChange):
2826 (WebKit::WebPageProxy::dispatchActivityStateChange):
2827 (WebKit::WebPageProxy::updateThrottleState):
2828 (WebKit::WebPageProxy::waitForDidUpdateActivityState):
2829 (WebKit::WebPageProxy::creationParameters):
2830 (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
2831 (WebKit::WebPageProxy::updateViewState): Deleted.
2832 (WebKit::WebPageProxy::viewStateDidChange): Deleted.
2833 (WebKit::WebPageProxy::dispatchViewStateChange): Deleted.
2834 (WebKit::WebPageProxy::waitForDidUpdateViewState): Deleted.
2835 (WebKit::WebPageProxy::installViewStateChangeCompletionHandler): Deleted.
2836 * UIProcess/WebPageProxy.h:
2837 (WebKit::WebPageProxy::isInWindow):
2838 (WebKit::WebPageProxy::didUpdateActivityState):
2839 (WebKit::WebPageProxy::isViewVisible):
2840 (WebKit::WebPageProxy::didUpdateViewState): Deleted.
2841 * UIProcess/WebPageProxy.messages.in:
2842 * UIProcess/WebProcessProxy.cpp:
2843 (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
2844 * UIProcess/efl/WebView.cpp:
2845 * UIProcess/ios/WKContentView.mm:
2846 (-[WKContentView _applicationDidEnterBackground]):
2847 (-[WKContentView _applicationWillEnterForeground]):
2848 * UIProcess/ios/WKPDFView.mm:
2849 (-[WKPDFView _applicationDidEnterBackground]):
2850 (-[WKPDFView _applicationWillEnterForeground]):
2851 * UIProcess/ios/WebPageProxyIOS.mm:
2852 (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2853 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2854 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2855 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2856 (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
2857 (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2858 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2859 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2860 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
2861 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2862 * WebProcess/Plugins/PluginView.cpp:
2863 (WebKit::PluginView::activityStateDidChange):
2864 (WebKit::PluginView::viewStateDidChange): Deleted.
2865 * WebProcess/Plugins/PluginView.h:
2866 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2867 (WebKit::AcceleratedDrawingArea::activityStateDidChange):
2868 (WebKit::AcceleratedDrawingArea::viewStateDidChange): Deleted.
2869 * WebProcess/WebPage/AcceleratedDrawingArea.h:
2870 * WebProcess/WebPage/DrawingArea.h:
2871 (WebKit::DrawingArea::activityStateDidChange):
2872 (WebKit::DrawingArea::viewStateDidChange): Deleted.
2873 * WebProcess/WebPage/WebPage.cpp:
2874 (WebKit::m_userInterfaceLayoutDirection):
2875 (WebKit::WebPage::reinitializeWebPage):
2876 (WebKit::WebPage::updateIsInWindow):
2877 (WebKit::WebPage::setActivityState):
2878 (WebKit::WebPage::setViewState): Deleted.
2879 * WebProcess/WebPage/WebPage.h:
2880 (WebKit::WebPage::isVisible):
2881 (WebKit::WebPage::isVisibleOrOccluded):
2882 * WebProcess/WebPage/WebPage.messages.in:
2883 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2884 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2885 (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
2886 (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange): Deleted.
2887 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2888 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2889 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2890 (WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
2891 (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
2892 (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange): Deleted.
2893 (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired): Deleted.
2895 2016-10-31 Jaehun Lim <ljaehun.lim@samsung.com>
2897 Unreviewed, CMake build fix
2899 Adds #include <WebCore/IDBGetAllRecordsData.h>
2901 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2903 2016-10-31 Simon Fraser <simon.fraser@apple.com>
2905 Add basic visual/layout viewport support for fixed position layout
2906 https://bugs.webkit.org/show_bug.cgi?id=164261
2908 Reviewed by Dean Jackson.
2910 Don't make visualViewportEnabled an experimental feature, because I don't want it enabled
2911 by default in WebKitTestRunner (and therefore mismatching DumpRenderTree).
2913 * Shared/WebPreferencesDefinitions.h:
2915 2016-10-29 Filip Pizlo <fpizlo@apple.com>
2917 JSC should support SharedArrayBuffer
2918 https://bugs.webkit.org/show_bug.cgi?id=163986
2920 Reviewed by Keith Miller.
2922 Adds some small things we need for SharedArrayBuffer.
2924 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2925 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2926 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2927 (WebKit::InjectedBundle::createWebDataFromUint8Array):
2929 2016-10-31 Brady Eidson <beidson@apple.com>
2931 IndexedDB 2.0: Support IDBObjectStore getAll/getAllKeys.
2932 <rdar://problem/28806934> and https://bugs.webkit.org/show_bug.cgi?id=164097
2934 Reviewed by Darin Adler.
2936 - Handle moving "Get All" requests to and from the DatabaseProcess.
2937 - Handle the additional task of creating/passing Sandbox Extensions for
2938 referenced files when necessary.
2940 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2941 (WebKit::WebIDBConnectionToClient::handleGetResult):
2942 (WebKit::WebIDBConnectionToClient::didGetAllRecords):
2943 (WebKit::WebIDBConnectionToClient::getAllRecords):
2944 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2945 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2947 * Shared/WebCoreArgumentCoders.h:
2949 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2950 (WebKit::WebIDBConnectionToServer::getAllRecords):
2951 (WebKit::preregisterSandboxExtensionsIfNecessary):
2952 (WebKit::WebIDBConnectionToServer::didGetAllRecords):
2953 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2954 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2956 2016-10-31 Wenson Hsieh <wenson_hsieh@apple.com>
2958 [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
2959 https://bugs.webkit.org/show_bug.cgi?id=164236
2960 <rdar://problem/28747712>
2962 Reviewed by Beth Dakin.
2964 See WebCore ChangeLog for more detail. Removes m_isGettingDictionaryPopupInfo from the WebPage in favor of
2965 keeping track of the same state in Editor, so that both the WK1 and WK2 cases can share the same codepath.
2967 * WebProcess/WebPage/WebPage.cpp:
2968 (WebKit::WebPage::didChangeSelection):
2969 * WebProcess/WebPage/WebPage.h:
2970 * WebProcess/WebPage/mac/WebPageMac.mm:
2971 (WebKit::WebPage::dictionaryPopupInfoForRange):
2973 2016-10-31 Simon Fraser <simon.fraser@apple.com>
2975 Implement IntersectionObserver
2976 https://bugs.webkit.org/show_bug.cgi?id=159475
2978 Reviewed by Ryosuke Niwa.
2980 Add ENABLE_INTERSECTION_OBSERVER, enabled by default.
2982 * Configurations/FeatureDefines.xcconfig:
2984 2016-10-31 Ryan Haddad <ryanhaddad@apple.com>
2986 Unreviewed, rolling out r208154.
2988 This change caused an assertion failure during API tests on
2993 "NetworkSession: Network process crash when converting main
2994 resource to download"
2995 https://bugs.webkit.org/show_bug.cgi?id=164220
2996 http://trac.webkit.org/changeset/208154
2998 2016-10-28 Brent Fulgham <bfulgham@apple.com>
3000 Do a better job of protecting Frame objects in the context of JavaScript calls
3001 https://bugs.webkit.org/show_bug.cgi?id=164163
3002 <rdar://problem/28955249>
3004 Reviewed by Darin Adler.
3006 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3007 (WebKit::InjectedBundleRangeHandle::renderedImage): Protected the Frame.
3008 * WebProcess/WebPage/WebPage.cpp:
3009 (WebKit::WebPage::insertTextAsync): Ditto.
3010 (WebKit::WebPage::setComposition): Ditto.
3011 * WebProcess/WebPage/mac/WebPageMac.mm:
3012 (WebKit::WebPage::insertDictatedTextAsync): Ditto.
3014 2016-10-31 Carlos Garcia Campos <cgarcia@igalia.com>
3016 NetworkSession: Network process crash when converting main resource to download
3017 https://bugs.webkit.org/show_bug.cgi?id=164220
3019 Reviewed by Alex Christensen.
3021 Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
3022 sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
3023 NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
3024 download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
3025 NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
3026 having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
3027 load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
3028 NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
3029 client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
3030 created yet. That's not expected to happen and when the response completion handler is called in the
3031 NetworkDataTask it tries to use either the client or the download and it crashes.
3033 * NetworkProcess/NetworkResourceLoader.cpp:
3034 (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
3035 (WebKit::NetworkResourceLoader::abort): If we still have a network load that was converted to a download, do not
3036 call cleanup() because it will be called by didBecomeDownload() later.
3038 2016-10-31 Darin Adler <darin@apple.com>
3040 Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
3041 https://bugs.webkit.org/show_bug.cgi?id=164214
3043 Reviewed by Alex Christensen.
3045 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3046 (webkit_dom_document_query_selector): Updated exception handling.
3047 (webkit_dom_document_query_selector_all): Ditto.
3048 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
3049 (webkit_dom_document_fragment_query_selector): Ditto.
3050 (webkit_dom_document_fragment_query_selector_all): Ditto.
3051 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3052 (webkit_dom_element_query_selector): Ditto.
3053 (webkit_dom_element_query_selector_all): Ditto.
3055 2016-10-31 Darin Adler <darin@apple.com>
3057 Convert Document from ExceptionCode to Exception
3058 https://bugs.webkit.org/show_bug.cgi?id=164212
3060 Reviewed by Alex Christensen.
3062 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3063 (webkit_dom_document_create_element): Updated exception handling.
3064 (webkit_dom_document_create_cdata_section): Ditto.
3065 (webkit_dom_document_create_processing_instruction): Ditto.
3066 (webkit_dom_document_create_attribute): Ditto.
3067 (webkit_dom_document_import_node): Ditto.
3068 (webkit_dom_document_create_element_ns): Ditto.
3069 (webkit_dom_document_create_attribute_ns): Ditto.
3070 (webkit_dom_document_adopt_node): Ditto.
3071 (webkit_dom_document_create_event): Ditto.
3072 (webkit_dom_document_set_xml_version): Ditto.
3073 (webkit_dom_document_get_cookie): Ditto.
3074 (webkit_dom_document_set_cookie): Ditto.
3075 (webkit_dom_document_set_body): Ditto.
3076 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
3077 (-[WKDOMDocument createElement:]): Ditto.
3079 2016-10-31 Wenson Hsieh <wenson_hsieh@apple.com>
3081 Holding down a key to choose an accented character should fire "insertReplacementText" input events
3082 https://bugs.webkit.org/show_bug.cgi?id=164209
3083 <rdar://problem/29019305>
3085 Reviewed by Darin Adler.
3087 When replacing text, call Editor::insertText with the correct TextEventInputType so that WebCore will know to
3088 use EditActionInsertReplacement when creating and applying the corresponding TypingCommand. Additional minor
3089 changes in order to support testing replacement text insertion.
3091 * UIProcess/API/Cocoa/WKWebView.mm:
3092 (-[WKWebView _insertText:replacementRange:]):
3093 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3094 * WebProcess/WebPage/WebPage.cpp:
3095 (WebKit::WebPage::insertTextAsync):
3097 2016-10-30 Darin Adler <darin@apple.com>
3099 Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
3100 https://bugs.webkit.org/show_bug.cgi?id=164206
3102 Reviewed by Chris Dumez.
3104 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
3105 (webkit_dom_named_node_map_set_named_item): Updated exception handling.
3106 (webkit_dom_named_node_map_remove_named_item): Ditto.
3107 (webkit_dom_named_node_map_set_named_item_ns): Ditto.
3108 (webkit_dom_named_node_map_remove_named_item_ns): Ditto.
3109 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3110 (webkit_dom_element_set_attribute): Ditto.
3111 (webkit_dom_element_set_attribute_node): Ditto.
3112 (webkit_dom_element_remove_attribute_node): Ditto.
3113 (webkit_dom_element_set_attribute_ns): Ditto.
3114 (webkit_dom_element_set_attribute_node_ns): Ditto.
3115 (webkit_dom_element_matches): Ditto.
3116 (webkit_dom_element_closest): Ditto.
3117 (webkit_dom_element_webkit_matches_selector): Ditto.
3118 (webkit_dom_element_insert_adjacent_element): Ditto.
3119 (webkit_dom_element_insert_adjacent_html): Ditto.
3120 (webkit_dom_element_insert_adjacent_text): Ditto.
3121 (webkit_dom_element_set_inner_html): Ditto.
3122 (webkit_dom_element_set_outer_html): Ditto.
3123 * WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
3124 (-[WKDOMElement setAttribute:value:]): Ditto.
3126 2016-10-30 Yusuke Suzuki <utatane.tea@gmail.com>
3128 [DOM] Introduce WebCore::jsDynamicDowncast
3129 https://bugs.webkit.org/show_bug.cgi?id=164137
3131 Reviewed by Darin Adler.
3133 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3134 (WebKit::WebAutomationSessionProxy::elementForNodeHandle):
3136 2016-10-29 Darin Adler <darin@apple.com>
3138 Convert more of DOM from ExceptionCode to Exception
3139 https://bugs.webkit.org/show_bug.cgi?id=164173
3141 Reviewed by Ryosuke Niwa.
3143 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
3144 (webkit_dom_character_data_substring_data): Updated since this
3145 now uses ExceptionOr.
3146 (webkit_dom_character_data_insert_data): Ditto.
3147 (webkit_dom_character_data_delete_data): Ditto.
3148 (webkit_dom_character_data_replace_data): Ditto.
3149 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
3150 (webkit_dom_text_replace_whole_text): Ditto.
3151 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
3152 (webkit_dom_text_split_text): Ditto.
3154 2016-10-28 Darin Adler <darin@apple.com>
3156 Move all classes in the HTML directory from ExceptionCode to Exception
3157 https://bugs.webkit.org/show_bug.cgi?id=163876
3159 Reviewed by Sam Weinig.
3161 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
3162 (webkit_dom_dom_token_list_add): Updated exception handling.
3163 (webkit_dom_dom_token_list_remove): Ditto.
3164 (webkit_dom_dom_token_list_toggle): Ditto.
3165 (webkit_dom_dom_token_list_replace): Ditto.
3166 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3167 (webkit_dom_element_remove): Ditto.
3168 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
3169 (webkit_dom_html_element_set_inner_text): Ditto.
3170 (webkit_dom_html_element_set_outer_text): Ditto.
3171 (webkit_dom_html_element_set_content_editable): Ditto.
3172 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
3173 (webkit_dom_html_input_element_set_max_length): Ditto.
3174 (webkit_dom_html_input_element_set_size): Ditto.
3175 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
3176 (webkit_dom_html_select_element_set_length): Ditto.
3177 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
3178 (webkit_dom_html_table_element_insert_row): Ditto.
3179 (webkit_dom_html_table_element_delete_row): Ditto.
3180 (webkit_dom_html_table_element_set_caption): Ditto.
3181 (webkit_dom_html_table_element_set_t_head): Ditto.
3182 (webkit_dom_html_table_element_set_t_foot): Ditto.
3183 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
3184 (webkit_dom_html_table_row_element_insert_cell): Ditto.
3185 (webkit_dom_html_table_row_element_delete_cell): Ditto.
3186 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
3187 (webkit_dom_html_table_section_element_insert_row): Ditto.
3188 (webkit_dom_html_table_section_element_delete_row): Ditto.
3190 * WebProcess/WebPage/WebPage.cpp:
3191 (WebKit::WebPage::editorState): Removed ASSERT_NO_EXCEPTION.
3193 * WebProcess/WebPage/ios/WebPageIOS.mm:
3194 (WebKit::WebPage::setAssistedNodeValueAsNumber): Removed ASSERT_NO_EXCEPTION.
3196 * WebProcess/cocoa/WebPlaybackSessionManager.mm:
3197 (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
3198 Changed the code to use a different interface to TimeRange that does
3199 not involve exceptions.
3201 2016-10-28 Wenson Hsieh <wenson_hsieh@apple.com>
3203 iOS autocorrection does not trigger an input event of inputType "insertReplacementText"
3204 https://bugs.webkit.org/show_bug.cgi?id=164077
3205 <rdar://problem/28987810>
3207 Reviewed by Simon Fraser.
3209 Small tweak to mark text insertion when autocorrecting as such, as opposed to regular keyboard input.
3211 * WebProcess/WebPage/ios/WebPageIOS.mm:
3212 (WebKit::WebPage::syncApplyAutocorrection):
3214 2016-10-28 Megan Gardner <megan_gardner@apple.com>
3216 Rename SharedMemoryMac to SharedMemoryCocoa
3217 https://bugs.webkit.org/show_bug.cgi?id=164156
3219 Reviewed by Alex Christensen.
3221 Renamed SharedMemoryMac to SharedMemoryCocoa, as it runs on all cocoa platforms, not exclusively just mac, and
3222 thus should be named to reflect that reality.
3224 * Platform/cocoa: Added.
3225 * Platform/cocoa/SharedMemoryCocoa.cpp: Copied from Source/WebKit2/Platform/mac/SharedMemoryMac.cpp.
3226 * Platform/mac/SharedMemoryMac.cpp: Removed.
3227 * WebKit2.xcodeproj/project.pbxproj:
3229 2016-10-28 Antti Koivisto <antti@apple.com>
3231 Enable CFNetwork connection cache fast lane for WebKit2
3232 https://bugs.webkit.org/show_bug.cgi?id=164129
3234 Reviewed by Andreas Kling.
3236 The idea of this feature is keep a connection free for higher priority requests so low-priority
3237 image loads can't take all the available connections.
3239 We have this enabled on WK1 but not on WK2. See what enabling it does for performance in bots.
3241 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3242 (WebKit::initializeNetworkSettings):
3244 Based on code inspection setting kHTTPMinimumFastLanePriority is not sufficient to enable this feature,
3245 kHTTPNumFastLanes needs also be set to a non-zero value. Use the same constants as WK1.
3246 Also enable this on Mac to unify behavior.
3248 2016-10-27 Michael Catanzaro <mcatanzaro@igalia.com>
3250 [GTK] New stable DOM API headers should be included from webkitdom.h
3251 https://bugs.webkit.org/show_bug.cgi?id=164069
3253 Reviewed by Carlos Garcia Campos.
3255 * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
3257 2016-10-27 Simon Fraser <simon.fraser@apple.com>
3259 Fix when building against the MacOSX10.12.sdk where "macos" is not recognized
3260 in the availability macros.
3262 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3264 2016-10-27 Megan Gardner <megan_gardner@apple.com>
3266 Add support for wide gamut for ShareableBitmap for image popovers
3267 https://bugs.webkit.org/show_bug.cgi?id=164001
3269 Reviewed by Simon Fraser.
3271 Added suppport for wide gamut in ShareableBitmap. SharableBitmaps now know the size of their pixels,
3272 and that data is passed back and forth between the processes. The callers of SharedBitmap will determine
3273 if their image should support wide gamut, but ShareableBitmap will override a set flag on a device that
3274 is incapbable of supporting a wide gamut image.
3275 This makes it possible to show wide gamut images in image popovers on iOS.
3276 This is currently untestable, so no tests added.
3278 * Platform/IPC/Decoder.cpp:
3279 (IPC::Decoder::decode):
3280 * Platform/IPC/Decoder.h:
3281 * Platform/IPC/Encoder.cpp:
3282 (IPC::Encoder::encode):
3283 * Platform/IPC/Encoder.h:
3284 * Shared/ShareableBitmap.cpp:
3285 (WebKit::bytesPerPixel):
3286 (WebKit::ShareableBitmap::Handle::encode):
3287 (WebKit::ShareableBitmap::Handle::decode):
3288 (WebKit::ShareableBitmap::Handle::clear):
3289 (WebKit::ShareableBitmap::create):
3290 (WebKit::ShareableBitmap::createShareable):
3291 (WebKit::ShareableBitmap::createHandle):
3292 (WebKit::ShareableBitmap::ShareableBitmap):
3293 * Shared/ShareableBitmap.h:
3294 (WebKit::ShareableBitmap::numBytesForSize):
3295 (WebKit::ShareableBitmap::sizeInBytes):
3296 * Shared/cg/ShareableBitmapCG.cpp:
3297 (WebKit::bitmapInfo):
3298 (WebKit::ShareableBitmap::createGraphicsContext):
3299 (WebKit::ShareableBitmap::createCGImage):
3300 * WebProcess/WebPage/ios/WebPageIOS.mm:
3301 (WebKit::WebPage::getPositionInformation):
3303 2016-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
3305 Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
3306 https://bugs.webkit.org/show_bug.cgi?id=163948
3307 <rdar://problem/28921433>
3309 Reviewed by Darin Adler.
3311 Add support for new drag and drop-related EditAction enum values.
3313 * UIProcess/WebEditCommandProxy.cpp:
3314 (WebKit::WebEditCommandProxy::nameForEditAction):
3316 2016-10-26 Chris Dumez <cdumez@apple.com>
3318 Replace IDBKeyPath with a WTF::Variant
3319 https://bugs.webkit.org/show_bug.cgi?id=163909
3321 Reviewed by Darin Adler.
3323 Add coders to encode / decode IDBKeyPath type for IPC.
3325 * Shared/Databases/IndexedDB/WebIDBResult.cpp:
3326 * Shared/WebCoreArgumentCoders.cpp:
3327 (IPC::ArgumentCoder<IDBKeyPath>::encode):
3328 (IPC::ArgumentCoder<IDBKeyPath>::decode):
3329 * Shared/WebCoreArgumentCoders.h:
3330 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3332 2016-10-26 Brian Burg <bburg@apple.com>
3334 Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
3335 https://bugs.webkit.org/show_bug.cgi?id=164046
3337 Reviewed by Joseph Pecoraro.
3339 * WebProcess/WebPage/WebInspector.cpp:
3340 (WebKit::WebInspector::sendMessageToFrontend):
3341 * WebProcess/WebPage/WebInspector.h:
3343 2016-10-26 Eric Carlson <eric.carlson@apple.com>
3345 [MediaStream] Add "has capture device" bit to media state flags
3346 https://bugs.webkit.org/show_bug.cgi?id=163952
3348 Unreviewed fix after r207839.
3350 * WebProcess/WebPage/WebPage.cpp:
3351 (WebKit::WebPage::setMuted): Take an MutedStateFlags, not a bool.
3352 * WebProcess/WebPage/WebPage.h:
3354 2016-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
3356 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.1 release.
3358 * gtk/NEWS: Add release notes for 2.15.1.
3360 2016-10-26 Carlos Garcia Campos <cgarcia@igalia.com>
3362 REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
3363 https://bugs.webkit.org/show_bug.cgi?id=162776
3365 Reviewed by Xabier Rodriguez-Calvar.
3367 Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
3370 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3371 (WebKit::WebContextMenuProxyGtk::append):
3372 (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
3373 (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
3375 2016-10-25 Alex Christensen <achristensen@webkit.org>
3379 * PlatformMac.cmake:
3380 * Shared/WebHitTestResultData.cpp:
3381 (WebKit::WebHitTestResultData::WebHitTestResultData):
3382 Explicitly call AtomicString::string to make the String constructor no longer ambiguous.
3383 It couldn't decide whether to use operator const String& or operator NSString*.
3385 2016-10-25 Carlos Garcia Campos <cgarcia@igalia.com>
3387 [SOUP] Network process assertion in NetworkDataTask::continueHTTPRedirection
3388 https://bugs.webkit.org/show_bug.cgi?id=163941
3390 Reviewed by Michael Catanzaro.
3392 equalLettersIgnoringASCIICase() expects the second argument to be the letters to compare in lowercase, so use
3393 "get" instead of "GET".
3395 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3396 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
3398 2016-10-25 Eric Carlson <eric.carlson@apple.com>
3400 [MediaStream] Add "has capture device" bit to media state flags
3401 https://bugs.webkit.org/show_bug.cgi?id=163952
3403 Reviewed by Sam Weinig.
3405 * UIProcess/API/C/WKPage.cpp:
3406 (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
3407 * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
3409 2016-10-25 Commit Queue <commit-queue@webkit.org>