4c4e475175c36adfd5df05057b91e577a4d030bc
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2016-11-18  Enrica Casucci  <enrica@apple.com>
2
3         Refactor drag and drop for WebKit2 to encode DragData message exchange.
4         https://bugs.webkit.org/show_bug.cgi?id=164945
5
6         Reviewed by Tim Horton.
7
8         * Shared/WebCoreArgumentCoders.cpp:
9         (IPC::ArgumentCoder<DragData>::encode):
10         (IPC::ArgumentCoder<DragData>::decode):
11         * Shared/WebCoreArgumentCoders.h:
12         * UIProcess/WebPageProxy.cpp:
13         (WebKit::WebPageProxy::performDragControllerAction):
14         * WebProcess/WebCoreSupport/WebDragClient.cpp:
15         (WebKit::WebDragClient::willPerformDragDestinationAction):
16         (WebKit::WebDragClient::actionMaskForDrag):
17         * WebProcess/WebCoreSupport/WebDragClient.h:
18         * WebProcess/WebPage/WebPage.cpp:
19         (WebKit::WebPage::performDragControllerAction):
20         * WebProcess/WebPage/WebPage.h:
21         * WebProcess/WebPage/WebPage.messages.in:
22
23 2016-11-18  Jeremy Jones  <jeremyj@apple.com>
24
25         Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
26         https://bugs.webkit.org/show_bug.cgi?id=163801
27
28         Reviewed by Simon Fraser.
29
30         Add SPI to notify client of pointer lock and for client to allow or deny.
31         Unlock pointer when view is not longer active.
32
33         * Configurations/FeatureDefines.xcconfig:
34         * Shared/WebPreferencesDefinitions.h:
35         * UIProcess/API/APIUIClient.h:
36         (API::UIClient::requestPointerLock):
37         (API::UIClient::didLosePointerLock):
38         * UIProcess/API/C/WKPage.cpp:
39         (WKPageSetPageUIClient):
40         (WKPageDidAllowPointerLock):
41         (WKPageDidDenyPointerLock):
42         * UIProcess/API/C/WKPagePrivate.h:
43         * UIProcess/API/C/WKPageUIClient.h:
44         * UIProcess/API/C/WKPreferences.cpp:
45         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
46         * UIProcess/Cocoa/UIDelegate.h:
47         * UIProcess/Cocoa/UIDelegate.mm:
48         (WebKit::UIDelegate::setDelegate):
49         (WebKit::UIDelegate::UIClient::requestPointerLock):
50         (WebKit::UIDelegate::UIClient::didLosePointerLock):
51         * UIProcess/WebPageProxy.cpp:
52         (WebKit::WebPageProxy::dispatchActivityStateChange):
53         (WebKit::WebPageProxy::resetStateAfterProcessExited):
54         (WebKit::WebPageProxy::requestPointerLock):
55         (WebKit::WebPageProxy::didAllowPointerLock):
56         (WebKit::WebPageProxy::didDenyPointerLock):
57         (WebKit::WebPageProxy::requestPointerUnlock):
58         * UIProcess/WebPageProxy.h:
59         * WebProcess/WebPage/WebPage.cpp:
60         (WebKit::WebPage::updatePreferences):
61
62 2016-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
63
64         Downloads started by context menu actions should also have a web view associated
65         https://bugs.webkit.org/show_bug.cgi?id=164364
66
67         Reviewed by Michael Catanzaro.
68
69         When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to
70         associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls
71         WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.
72
73         * UIProcess/API/gtk/WebKitDownload.cpp:
74         (webkitDownloadCreateForRequest): Deleted.
75         * UIProcess/API/gtk/WebKitDownloadPrivate.h:
76         * UIProcess/API/gtk/WebKitWebContext.cpp:
77         (webkitWebContextStartDownload): Use webkitWebContextGetOrCreateDownload() after WebProcessPool::download()
78         because the WebKitDownload could have already been created by the web view download handler at this point.
79         * UIProcess/API/gtk/WebKitWebView.cpp:
80         (webkit_web_view_download_uri): We no longer need to associate the web view to the download here.
81         * UIProcess/WebProcessPool.cpp:
82         (WebKit::WebProcessPool::download): If an initiatingPage has been passed, call handleDownloadRequest() to notify
83         the page client.
84
85 2016-11-17  Alex Christensen  <achristensen@webkit.org>
86
87         REGRESSION: API test _WKDownload.ConvertResponseToDownload is a flaky timeout
88         https://bugs.webkit.org/show_bug.cgi?id=164631
89
90         Reviewed by Carlos Garcia Campos.
91
92         * NetworkProcess/NetworkResourceLoader.cpp:
93         (WebKit::NetworkResourceLoader::convertToDownload):
94         I could reproduce the flaky failure 100% of the time when not using NETWORK_SESSION
95         by adding a usleep(1000000) in NetworkResourceLoader::convertToDownload.  m_networkLoad
96         was not being set to nullptr before it was being checked in NetworkResourceLoader::abort
97
98 2016-11-17  Alex Christensen  <achristensen@webkit.org>
99
100         Fix CMake build after r208865
101         https://bugs.webkit.org/show_bug.cgi?id=164894
102
103         * PlatformMac.cmake:
104         Add new files.
105
106 2016-11-17  Ryosuke Niwa  <rniwa@webkit.org>
107
108         WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled should keep text replacement enabled
109         https://bugs.webkit.org/show_bug.cgi?id=164857
110         <rdar://problem/27721742>
111
112         Reviewed by Wenson Hsieh.
113
114         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
115         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled):
116
117 2016-11-17  John Wilander  <wilander@apple.com>
118
119         Resource load statistics: Cover further data records, count removed data records, and only fire handler when needed
120         https://bugs.webkit.org/show_bug.cgi?id=164659
121
122         Reviewed by Andy Estes.
123
124         * UIProcess/WebResourceLoadStatisticsStore.cpp:
125         (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
126             Consistent naming with 'remove' rather than 'delete'.
127             Now removes localStorage, IndexDB, disk cache, and memory cache too.
128             Updates statistics with number of times it has removed data records.
129         (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
130             No longer checks whether it has enough data since the classification rules
131             are absolute, not relative.
132         (WebKit::WebResourceLoadStatisticsStore::clearDataRecords): Deleted.
133         * UIProcess/WebResourceLoadStatisticsStore.h:
134             Consistent naming with 'remove' rather than 'delete'.
135
136 2016-11-17  Brady Eidson  <beidson@apple.com>
137
138         Add _WKIconLoadingDelegate SPI.
139         https://bugs.webkit.org/show_bug.cgi?id=164894
140
141         Reviewed by Alex Christensen.
142
143         With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
144
145         WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
146
147         For icons the app decides to load, WebKit will pass the data to the app without storing locally.
148
149         * UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.
150         (API::IconLoadingClient::~IconLoadingClient):
151         (API::IconLoadingClient::getLoadDecisionForIcon):
152
153         * UIProcess/API/Cocoa/WKWebView.mm:
154         (-[WKWebView _initializeWithConfiguration:]):
155         (-[WKWebView _iconLoadingDelegate]):
156         (-[WKWebView _setIconLoadingDelegate:]):
157         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
158
159         * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
160
161         * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
162         * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.
163         (-[_WKLinkIconParameters _initWithLinkIcon:]):
164         (-[_WKLinkIconParameters url]):
165         (-[_WKLinkIconParameters mimeType]):
166         (-[_WKLinkIconParameters size]):
167         (-[_WKLinkIconParameters iconType]):
168         * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
169
170         * UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
171         * UIProcess/Cocoa/IconLoadingDelegate.mm: Added.
172         (WebKit::IconLoadingDelegate::IconLoadingDelegate):
173         (WebKit::IconLoadingDelegate::~IconLoadingDelegate):
174         (WebKit::IconLoadingDelegate::createIconLoadingClient):
175         (WebKit::IconLoadingDelegate::delegate):
176         (WebKit::IconLoadingDelegate::setDelegate):
177         (WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
178         (WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
179         (WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):
180
181         * UIProcess/WebPageProxy.cpp:
182         (WebKit::WebPageProxy::setIconLoadingClient):
183         (WebKit::WebPageProxy::getLoadDecisionForIcon):
184         (WebKit::WebPageProxy::finishedLoadingIcon):
185         * UIProcess/WebPageProxy.h:
186         (WebKit::WebPageProxy::iconLoadingClient):
187         * UIProcess/WebPageProxy.messages.in:
188
189         * WebKit2.xcodeproj/project.pbxproj:
190
191         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
192         (WebKit::WebFrameLoaderClient::useIconLoadingClient):
193         (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
194         (WebKit::WebFrameLoaderClient::finishedLoadingIcon):
195         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
196         (WebKit::WebFrameLoaderClient::setUseIconLoadingClient):
197
198         * WebProcess/WebPage/WebPage.cpp:
199         (WebKit::WebPage::didGetLoadDecisionForIcon):
200         (WebKit::WebPage::setUseIconLoadingClient):
201         * WebProcess/WebPage/WebPage.h:
202         * WebProcess/WebPage/WebPage.messages.in:
203
204 2016-11-17  Saam Barati  <sbarati@apple.com>
205
206         Remove async/await compile time flag and enable tests
207         https://bugs.webkit.org/show_bug.cgi?id=164828
208         <rdar://problem/28639334>
209
210         Reviewed by Yusuke Suzuki.
211
212         * Configurations/FeatureDefines.xcconfig:
213
214 2016-11-17  Yusuke Suzuki  <utatane.tea@gmail.com>
215
216         [JSC] WTF::TemporaryChange with WTF::SetForScope
217         https://bugs.webkit.org/show_bug.cgi?id=164761
218
219         Reviewed by Saam Barati.
220
221         * PluginProcess/PluginControllerProxy.cpp:
222         (WebKit::PluginControllerProxy::initialize):
223         * PluginProcess/WebProcessConnection.cpp:
224         (WebKit::WebProcessConnection::didReceiveMessage):
225         (WebKit::WebProcessConnection::didReceiveSyncMessage):
226         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
227         (createEncodedObject):
228         (decodeObject):
229         * UIProcess/API/Cocoa/WKWebView.mm:
230         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
231         * UIProcess/Cocoa/WebViewImpl.mm:
232         (WebKit::WebViewImpl::updateTextTouchBar):
233         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
234         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
235         * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
236         (WebKit::WebPasteboardProxy::writeToClipboard):
237         * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
238         (WebKit::CompositingCoordinator::flushPendingLayerChanges):
239         (WebKit::CompositingCoordinator::purgeBackingStores):
240         * WebProcess/WebPage/WebPage.cpp:
241         (WebKit::WebPage::mouseEvent):
242         (WebKit::WebPage::keyEvent):
243         (WebKit::WebPage::dispatchTouchEvent):
244         (WebKit::WebPage::setInitialFocus):
245         (WebKit::WebPage::insertTextAsync):
246         * WebProcess/WebPage/ios/WebPageIOS.mm:
247         (WebKit::WebPage::dynamicViewportSizeUpdate):
248         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
249         * WebProcess/WebPage/mac/WebPageMac.mm:
250
251 2016-11-16  Brent Fulgham  <bfulgham@apple.com>
252
253         Unreviewed build fix after r208589
254
255         The generated com.apple.WebKit.plugin-common.sb file was not getting copied into
256         the Resources folder, so was not deployed with WebKit. We need to treat it like
257         com.apple.WebProcess.sb and the other generated files.
258
259         * WebKit2.xcodeproj/project.pbxproj: Tell Xcode to include the generated file in
260         the framework Resources.
261
262 2016-11-16  Yusuke Suzuki  <utatane.tea@gmail.com>
263
264         [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
265         https://bugs.webkit.org/show_bug.cgi?id=164827
266
267         Reviewed by Ryosuke Niwa.
268
269         * Configurations/FeatureDefines.xcconfig:
270         * Shared/WebPreferencesDefinitions.h:
271         Annotated ES6 Modules option with DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.
272         * UIProcess/API/C/WKPreferences.cpp:
273         (WKPreferencesSetES6ModulesEnabled):
274         (WKPreferencesGetES6ModulesEnabled):
275         * UIProcess/API/C/WKPreferencesRefPrivate.h:
276         * WebProcess/InjectedBundle/InjectedBundle.cpp:
277         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
278         * WebProcess/WebPage/WebPage.cpp:
279         (WebKit::WebPage::updatePreferences):
280
281 2016-11-16  Simon Fraser  <simon.fraser@apple.com>
282
283         Add logging support to VisibleContentRectUpdateInfo
284         https://bugs.webkit.org/show_bug.cgi?id=164825
285
286         Reviewed by Zalan Bujtas.
287
288         Add TextStream output to VisibleContentRectUpdateInfo. Just piping it into a logging
289         stream does single-line output, so also make a convenience dump() function that will
290         product multiline output. Result look like:
291
292             (VisibleContentRectUpdateInfo
293               (lastLayerTreeTransactionID 54)
294               (exposedContentRect (523.44,1258.63) width=676.20 height=901.60)
295               (unobscuredContentRect (523.44,1293.41) width=676.20 height=866.82)
296               (unobscuredRectInScrollViewCoordinates (0,39.50) width=768 height=984.50)
297               (customFixedPositionRect (219.64,935) width=980 height=1225)
298               (obscuredInset width=0 height=39.50)
299               (scale 1.14)
300               (inStableState 0)
301               (timestamp 736446.61)
302               (verticalVelocity -11.36))
303
304         * Shared/VisibleContentRectUpdateInfo.cpp:
305         (WebKit::VisibleContentRectUpdateInfo::dump):
306         (WebKit::operator<<):
307         * Shared/VisibleContentRectUpdateInfo.h:
308         * UIProcess/ios/WKContentView.mm:
309         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
310
311 2016-11-15  Simon Fraser  <simon.fraser@apple.com>
312
313         [iOS WK2] Scroll view scrolling and zooming animations can keep running across page loads
314         https://bugs.webkit.org/show_bug.cgi?id=164810
315
316         Reviewed by Tim Horton.
317         
318         Scrolling and zooming animations can leak across page loads, which makes tests flakey,
319         and is unexpected by users.
320
321         Tested by scrollingcoordinator/ios/sync-layer-positions-after-scroll.html followed by
322         scrollingcoordinator/ios/ui-scrolling-tree.html
323
324         * UIProcess/API/Cocoa/WKWebView.mm:
325         (-[WKWebView _didCommitLoadForMainFrame]):
326
327 2016-11-15  Jon Lee  <jonlee@apple.com>
328
329         Report active video and audio capture devices separately
330         https://bugs.webkit.org/show_bug.cgi?id=164769
331
332         Reviewed by Eric Carlson.
333
334         Replace kWKMediaHasActiveCaptureDevice with kWKMediaHasActiveAudioCaptureDevice and
335         kWKMediaHasActiveVideoCaptureDevice
336
337         * UIProcess/API/C/WKPage.cpp:
338         (WKPageGetMediaState):
339         * UIProcess/API/C/WKPagePrivate.h:
340         * UIProcess/WebPageProxy.cpp:
341         (WebKit::WebPageProxy::isPlayingMediaDidChange): Update the mask to include the two
342         bits.
343
344 2016-11-14  Simon Fraser  <simon.fraser@apple.com>
345
346         [iOS WK2] Implement support for visual viewports
347         https://bugs.webkit.org/show_bug.cgi?id=164765
348
349         Reviewed by Tim Horton.
350
351         Adopt the visual viewport scrolling model in iOS WK2.
352
353         Pass the parameters used for computing the layout viewport up to WK2 via RemoteLayerTreeTransaction.
354         These are stored on WebPageProxy. When they change, _didCommitLayerTree triggers a -_updateVisibleContentRects.
355         
356         WebPageProxy::computeCustomFixedPositionRect() is the function that computes the "override" layout viewport.
357         It starts with the baseLayoutViewportSize from the web process (which is based on the initial containing block
358         size), then ensures that it's no smaller than the unobscured content rect, since it makes no sense for the
359         layout viewport to be smaller than the visual viewport. The static FrameView::computeLayoutViewportOrigin()
360         is then use to "push" the layout viewport around as the visual viewport changes.
361
362         * Shared/VisibleContentRectUpdateInfo.h:
363         * Shared/WebCoreArgumentCoders.cpp: Encode LayoutSize and LayoutPoint.
364         (IPC::ArgumentCoder<LayoutSize>::encode):
365         (IPC::ArgumentCoder<LayoutSize>::decode):
366         (IPC::ArgumentCoder<LayoutPoint>::encode):
367         (IPC::ArgumentCoder<LayoutPoint>::decode):
368         * Shared/WebCoreArgumentCoders.h:
369         * Shared/mac/RemoteLayerTreeTransaction.h:
370         (WebKit::RemoteLayerTreeTransaction::baseLayoutViewportSize):
371         (WebKit::RemoteLayerTreeTransaction::setBaseLayoutViewportSize):
372         (WebKit::RemoteLayerTreeTransaction::minStableLayoutViewportOrigin):
373         (WebKit::RemoteLayerTreeTransaction::setMinStableLayoutViewportOrigin):
374         (WebKit::RemoteLayerTreeTransaction::maxStableLayoutViewportOrigin):
375         (WebKit::RemoteLayerTreeTransaction::setMaxStableLayoutViewportOrigin):
376         * Shared/mac/RemoteLayerTreeTransaction.mm:
377         (WebKit::RemoteLayerTreeTransaction::encode):
378         (WebKit::RemoteLayerTreeTransaction::decode):
379         (WebKit::RemoteLayerTreeTransaction::description):
380         * UIProcess/API/Cocoa/WKWebView.mm:
381         (-[WKWebView _didCommitLayerTree:]):
382         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
383         (WebKit::RemoteScrollingCoordinatorProxy::visualViewportEnabled): Accessor.
384         * UIProcess/WebPageProxy.h:
385         (WebKit::WebPageProxy::customFixedPositionRect):
386         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
387         (WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
388         * UIProcess/ios/WKContentView.mm:
389         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
390         (-[WKContentView _didCommitLayerTree:]):
391         * UIProcess/ios/WebPageProxyIOS.mm:
392         (WebKit::WebPageProxy::computeCustomFixedPositionRect): When visual viewports are enabled, compute
393         the layout viewport rect, taking the baseLayoutViewportSize and the current unobscured rect into account.
394         (WebKit::WebPageProxy::updateLayoutViewportParameters):
395         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
396         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
397         * WebProcess/WebPage/WebPage.cpp: Encode in the transaction the layout viewport parameters (with minor refactor).
398         (WebKit::WebPage::willCommitLayerTree):
399         * WebProcess/WebPage/ios/WebPageIOS.mm:
400         (WebKit::WebPage::updateVisibleContentRects): This is where the web process receives the new override layout viewport
401         from the web process (with some logging).
402
403 2016-11-15  Jon Lee  <jonlee@apple.com>
404
405         Remove HasMediaCaptureDevice
406         https://bugs.webkit.org/show_bug.cgi?id=164767
407         <rdar://problem/29263696>
408
409         Reviewed by Eric Carlson.
410
411         * UIProcess/API/C/WKPage.cpp: Remove kWKMediaHasCaptureDevice.
412         (WKPageGetMediaState):
413         * UIProcess/API/C/WKPagePrivate.h:
414
415 2016-11-15  Daniel Bates  <dabates@apple.com>
416
417         Disallow loads using HTTP 0.9 at the ResourceHandle/NetworkDataTask level
418         https://bugs.webkit.org/show_bug.cgi?id=164662
419         <rdar://problem/29268514>
420
421         Reviewed by Alex Christensen and Brady Eidson.
422
423         Make changes to NetworkDataTask similar to the changes made to ResourceHandle so as to
424         disallow non-default port HTTP 0.9 loads when using the ENABLE(NETWORK_SESSION) networking
425         code path in WebKit2.
426
427         * NetworkProcess/NetworkDataTask.cpp:
428         (WebKit::NetworkDataTask::didReceiveResponse): Added. Fail the load if it is using HTTP 0.9.
429         Otherwise notify the client that we received a response.
430         * NetworkProcess/NetworkDataTask.h:
431         * NetworkProcess/NetworkDataTaskBlob.cpp:
432         (WebKit::NetworkDataTaskBlob::resume): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
433         as the latter has been renamed to the former.
434         (WebKit::NetworkDataTaskBlob::getSizeForNext): Ditto.
435         (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): Renamed from didReceiveResponse().
436         * NetworkProcess/NetworkDataTaskBlob.h:
437         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
438         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
439         (WebKit::NetworkDataTaskCocoa::didReceiveResponse): Deleted.
440         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
441         (WebKit::NetworkDataTaskSoup::didSendRequest): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
442         as the latter has been renamed to the former.
443         (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Renamed from didReceiveResponse(). Also
444         remove the local variable response and inline its value into the call to ResourceHandle::didReceiveResponse()
445         as this variable is used exactly once in this function and its name does not describe its purpose any more
446         than its value.
447         (WebKit::NetworkDataTaskSoup::didRequestNextPart): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
448         as the latter has been renamed to the former.
449         * NetworkProcess/soup/NetworkDataTaskSoup.h:
450
451 2016-11-14  Alex Christensen  <achristensen@webkit.org>
452
453         Move SecurityOrigin::createFromDatabaseIdentifier to SecurityOriginData
454         https://bugs.webkit.org/show_bug.cgi?id=164720
455
456         Reviewed by Brady Eidson.
457
458         * DatabaseProcess/DatabaseProcess.cpp:
459         (WebKit::DatabaseProcess::indexedDatabaseOrigins):
460         * DatabaseProcess/DatabaseProcess.h:
461         * NetworkProcess/NetworkProcess.cpp:
462         (WebKit::fetchDiskCacheEntries):
463         * Shared/API/c/WKSecurityOriginRef.cpp:
464         (WKSecurityOriginCreateFromDatabaseIdentifier):
465         * Shared/WebsiteData/WebsiteData.cpp:
466         (WebKit::WebsiteData::Entry::encode):
467         (WebKit::WebsiteData::Entry::decode):
468         * Shared/WebsiteData/WebsiteData.h:
469         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
470         (WKKeyValueStorageManagerGetStorageDetailsByOrigin):
471         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
472         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
473         (WebKit::LocalStorageDatabaseTracker::origins):
474         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
475         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
476         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
477         * UIProcess/WebPageProxy.cpp:
478         (WebKit::WebPageProxy::exceededDatabaseQuota):
479         (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
480         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
481         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
482         (WebKit::WebsiteDataStore::fetchData):
483         (WebKit::WebsiteDataStore::removeData):
484         (WebKit::WebsiteDataStore::mediaKeyOrigins):
485         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
486         (WKBundleSetDatabaseQuota):
487         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
488         (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
489         * WebProcess/Storage/StorageAreaImpl.cpp:
490         (WebKit::StorageAreaImpl::create):
491         (WebKit::StorageAreaImpl::StorageAreaImpl):
492         (WebKit::StorageAreaImpl::securityOrigin):
493         * WebProcess/Storage/StorageAreaImpl.h:
494         * WebProcess/Storage/StorageAreaMap.cpp:
495         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
496         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
497         * WebProcess/Storage/StorageAreaMap.h:
498         (WebKit::StorageAreaMap::securityOrigin):
499         * WebProcess/Storage/StorageNamespaceImpl.cpp:
500         (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
501         (WebKit::StorageNamespaceImpl::storageArea):
502         * WebProcess/Storage/StorageNamespaceImpl.h:
503         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
504         (WebKit::WebChromeClient::exceededDatabaseQuota):
505         * WebProcess/WebProcess.cpp:
506         (WebKit::WebProcess::fetchWebsiteData):
507
508 2016-11-14  Brent Fulgham  <bfulgham@apple.com>
509
510         [Mac][iOS][WK2] Tighten permissions to change CapsLock delay
511         https://bugs.webkit.org/show_bug.cgi?id=164725
512         <rdar://problem/28970910>
513
514         Reviewed by Alexey Proskuryakov.
515
516         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Limit access
517         to the IOKit connection that actually needs it.
518
519 2016-11-14  Brent Fulgham  <bfulgham@apple.com>
520
521         Unreviewed sandbox fix after r208702
522
523         Correct version check to avoid breaking users in Safari Technology Preview
524         or WebKit nightlies.
525
526         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
527         * WebProcess/com.apple.WebProcess.sb.in:
528
529 2016-11-14  Pranjal Jumde  <pjumde@apple.com>
530
531         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.
532         https://bugs.webkit.org/show_bug.cgi?id=163710
533         <rdar://problem/24357468>
534
535         Reviewed by Darin Adler.
536
537         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
538         * WebProcess/com.apple.WebProcess.sb.in:
539
540 2016-11-13  Darin Adler  <darin@apple.com>
541
542         Remove many includes of ExceptionCode.h
543         https://bugs.webkit.org/show_bug.cgi?id=164706
544
545         Reviewed by Alex Christensen.
546
547         * WebProcess/Storage/StorageAreaImpl.cpp: Removed include of ExceptionCode.h.
548
549 2016-11-13  Darin Adler  <darin@apple.com>
550
551         Fix exception handling in SQL database code, streamline and update code
552         https://bugs.webkit.org/show_bug.cgi?id=164685
553
554         Reviewed by Sam Weinig.
555
556         * UIProcess/API/efl/ewk_database_manager.cpp:
557         (EwkDatabaseManager::getDatabaseOrigins): Update for change to the
558         DatabaseTracker::origins function.
559         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
560         (WebKit::WebsiteDataStore::fetchData): Use DatabaseTracker.
561         (WebKit::WebsiteDataStore::removeData): Ditto.
562         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
563         (WKBundleSetDatabaseQuota): Ditto.
564         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
565         (WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
566         * WebProcess/WebProcess.cpp:
567         (WebKit::WebProcess::processWillSuspendImminently): Ditto.
568
569 2016-11-12  Simon Fraser  <simon.fraser@apple.com>
570
571         Add a way to get the UI-side scrolling tree as text via UIScriptController
572         https://bugs.webkit.org/show_bug.cgi?id=164697
573
574         Reviewed by Zalan Bujtas.
575
576         Add a property to WKWebView to retrieve the scrolling tree as text, for testing.
577         Expose it via the RemoteScrollingCoordinatorProxy.
578
579         * UIProcess/API/Cocoa/WKWebView.mm:
580         (-[WKWebView _scrollingTreeAsText]):
581         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
582         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
583         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeAsText):
584         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
585
586 2016-11-12  Daniel Bates  <dabates@apple.com>
587
588         Incorrect release log message emitted when waiting/not waiting for the WebProcess continue a load
589         https://bugs.webkit.org/show_bug.cgi?id=164605
590
591         Reviewed by Darin Adler.
592
593         Currently we emit a release log message of the form "didReceiveResponse: Should wait for
594         message from WebContent process ..." when we are not waiting for the WebProcess and emit
595         a message of the form "didReceiveResponse: Should not wait for message from WebContent
596         process" when we are waiting on the WebProcess. Invert these messages to reflect whether
597         we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponsewhether.
598
599         For the main resource NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::No
600         because we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponse
601         to continue the load. For a subresource we do not need to wait for the WebProcess to allow the load to continue
602         and hence NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::Yes.
603
604         * NetworkProcess/NetworkResourceLoader.cpp:
605
606 2016-11-12  Simon Fraser  <simon.fraser@apple.com>
607
608         [iOS WK2] Share some code with Mac for post-async-scroll state reconciliation
609         https://bugs.webkit.org/show_bug.cgi?id=164694
610
611         Reviewed by Zalan Bujtas.
612
613         Rather than calling FrameView directly, call reconcileScrollingState() on the scrolling
614         coordinator.
615
616         * WebProcess/WebPage/ios/WebPageIOS.mm:
617         (WebKit::WebPage::updateVisibleContentRects):
618
619 2016-11-12  Brian Burg  <bburg@apple.com>
620
621         Web Automation: terminate the automation session if the web process crashes
622         https://bugs.webkit.org/show_bug.cgi?id=164671
623         <rdar://problem/29028964>
624
625         Reviewed by Joseph Pecoraro.
626
627         * UIProcess/Automation/WebAutomationSession.h:
628         * UIProcess/Automation/WebAutomationSession.cpp:
629         (WebKit::WebAutomationSession::disconnect):
630         (WebKit::WebAutomationSession::terminate):
631         Factor out code that disconnects the remote, unpairs, and notifies the client.
632         Then, expose terminate() which can be called without a FrontendChannel.
633         Calling this causes the _WKAutomationDelegate to clear the local-side session in the
634         browser, and disconnecting from the remote will hang up the remote-side session.
635
636         * UIProcess/WebPageProxy.cpp:
637         (WebKit::WebPageProxy::processDidCrash):
638         Terminate the session.
639
640 2016-11-11  Alex Christensen  <achristensen@webkit.org>
641
642         Use SecurityOriginData as keys in StorageManager
643         https://bugs.webkit.org/show_bug.cgi?id=159834
644         <rdar://problem/27346948>
645
646         Reviewed by Brady Eidson.
647
648         * Platform/IPC/HandleMessage.h:
649         (IPC::callMemberFunctionImpl):
650         Add a missing std::forward so we can use this callMemberFunctionImpl with rvalues.
651         * UIProcess/API/C/WKApplicationCacheManager.cpp:
652         (WKApplicationCacheManagerGetApplicationCacheOrigins):
653         (WKApplicationCacheManagerDeleteEntriesForOrigin):
654         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
655         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
656         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
657         * UIProcess/API/C/WKResourceCacheManager.cpp:
658         (WKResourceCacheManagerGetCacheOrigins):
659         (WKResourceCacheManagerClearCacheForOrigin):
660         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
661         (-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):
662         * UIProcess/Databases/DatabaseProcessProxy.cpp:
663         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
664         * UIProcess/Databases/DatabaseProcessProxy.h:
665         * UIProcess/Network/NetworkProcessProxy.cpp:
666         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
667         (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
668         * UIProcess/Network/NetworkProcessProxy.h:
669         * UIProcess/Storage/LocalStorageDatabase.cpp:
670         (WebKit::LocalStorageDatabase::create):
671         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
672         (WebKit::LocalStorageDatabase::openDatabase):
673         (WebKit::LocalStorageDatabase::close):
674         * UIProcess/Storage/LocalStorageDatabase.h:
675         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
676         (WebKit::LocalStorageDatabaseTracker::databasePath):
677         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
678         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
679         (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
680         (WebKit::LocalStorageDatabaseTracker::origins):
681         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
682         * UIProcess/Storage/StorageManager.cpp:
683         (WebKit::StorageManager::StorageArea::securityOrigin):
684         (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
685         (WebKit::StorageManager::TransientLocalStorageNamespace::origins):
686         (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
687         (WebKit::StorageManager::StorageArea::StorageArea):
688         (WebKit::StorageManager::StorageArea::clone):
689         (WebKit::StorageManager::StorageArea::items):
690         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
691         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
692         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
693         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
694         (WebKit::StorageManager::SessionStorageNamespace::origins):
695         (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
696         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
697         (WebKit::StorageManager::getSessionStorageOrigins):
698         (WebKit::StorageManager::deleteSessionStorageOrigins):
699         (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
700         (WebKit::StorageManager::getLocalStorageOrigins):
701         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
702         (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
703         (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
704         (WebKit::StorageManager::createLocalStorageMap):
705         (WebKit::StorageManager::createTransientLocalStorageMap):
706         (WebKit::StorageManager::createSessionStorageMap):
707         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
708         (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
709         (WebKit::StorageManager::StorageArea::create): Deleted.
710         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): Deleted.
711         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): Deleted.
712         * UIProcess/Storage/StorageManager.h:
713         * UIProcess/WebProcessProxy.cpp:
714         (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
715         * UIProcess/WebProcessProxy.h:
716         * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
717         (WebKit::WebsiteDataRecord::displayNameForOrigin):
718         (WebKit::WebsiteDataRecord::add):
719         * UIProcess/WebsiteData/WebsiteDataRecord.h:
720         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
721         (WebKit::WebsiteDataStore::fetchData):
722         (WebKit::WebsiteDataStore::removeData):
723         (WebKit::WebsiteDataStore::mediaKeyOrigins):
724         (WebKit::WebsiteDataStore::removeMediaKeys):
725         * UIProcess/WebsiteData/WebsiteDataStore.h:
726         Fewer SecurityOrigin uses in the UIProcess!  Hooray!
727
728 2016-11-11  Ryosuke Niwa  <rniwa@webkit.org>
729
730         Hovering over a slotted Text node clears hover state
731         https://bugs.webkit.org/show_bug.cgi?id=164002
732         <rdar://problem/29040471>
733
734         Reviewed by Simon Fraser.
735
736         * WebProcess/WebPage/WebPage.cpp:
737         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
738         * WebProcess/WebPage/mac/WebPageMac.mm:
739         (WebKit::WebPage::performImmediateActionHitTestAtLocation):
740
741 2016-11-11  Wenson Hsieh  <wenson_hsieh@apple.com>
742
743         [WK2] autocorrect and autocapitalize attributes do not work in contenteditable elements
744         https://bugs.webkit.org/show_bug.cgi?id=164538
745         <rdar://problem/8418711>
746
747         Reviewed by Ryosuke Niwa.
748
749         Consult HTMLElement::autocorrect() and HTMLElement::autocapitalizeType() when assembling the assisted node
750         information for the currently assisted node.
751
752         * Shared/AssistedNodeInformation.h:
753         * UIProcess/ios/WKContentViewInteraction.mm:
754         (toUITextAutocapitalize):
755         * WebProcess/WebPage/ios/WebPageIOS.mm:
756         (WebKit::WebPage::getAssistedNodeInformation):
757
758 2016-11-11  Beth Dakin  <bdakin@apple.com>
759
760         Move to modern TouchBar methods
761         https://bugs.webkit.org/show_bug.cgi?id=164655
762         -and corresponding-
763         rdar://problem/29226911
764
765         Reviewed by Wenson Hsieh.
766
767         customizationDefaultItemIdentifiers -> defaultItemIdentifiers
768         itemIdentifiers -> defaultItemIdentifiers
769         defaultItems -> templateItems
770
771         * UIProcess/Cocoa/WebViewImpl.mm:
772         (WebKit::plainTextTouchBarDefaultItemIdentifiers):
773         (WebKit::richTextTouchBarDefaultItemIdentifiers):
774         (WebKit::WebViewImpl::setUpTextTouchBar):
775         (WebKit::WebViewImpl::updateTextTouchBar):
776         (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
777         (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
778
779 2016-11-11  Brent Fulgham  <bfulgham@apple.com>
780
781         Get rid of old sandbox rules for OS's we no longer support
782         https://bugs.webkit.org/show_bug.cgi?id=164638
783
784         Reviewed by Simon Fraser.
785
786         Clean up the various sandbox profiles to get rid of rules that applied to operating system
787         versions we no longer support, or were added in support of bugs that have long since been
788         fixed.
789
790         This should introduce no change in behavior.
791
792         * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
793         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
794         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
795         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
796         * WebProcess/com.apple.WebProcess.sb.in:
797
798 2016-11-11  Brady Eidson  <beidson@apple.com>
799
800         IndexedDB 2.0: "close pending flag" and firing blocked events all need fixing.
801         https://bugs.webkit.org/show_bug.cgi?id=164641
802
803         Reviewed by Alex Christensen.
804
805         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
806         (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
807         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
808         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
809
810         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
811         (WebKit::WebIDBConnectionToServer::databaseConnectionPendingClose):
812         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
813
814 2016-11-11  Eric Carlson  <eric.carlson@apple.com>
815
816         [MediaStream] defer resolution of getUserMedia promise made in a background tab
817         https://bugs.webkit.org/show_bug.cgi?id=164643
818         <rdar://problem/29048317>
819
820         Reviewed by Brady Eidson.
821
822         Do not ask for user for access to capture devices when the document does not
823         allow media to play, wait until playback is allowed.
824
825         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
826         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
827         (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
828         (WebKit::UserMediaPermissionRequestManager::mediaCanStart):
829         (WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension):
830         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
831         * WebProcess/Plugins/PluginView.cpp:
832         (WebKit::PluginView::mediaCanStart):
833         * WebProcess/Plugins/PluginView.h:
834
835 2016-11-11  Darin Adler  <darin@apple.com>
836
837         Move Node from ExceptionCode to ExceptionOr
838         https://bugs.webkit.org/show_bug.cgi?id=164515
839
840         Reviewed by Sam Weinig.
841
842         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
843         (webkit_dom_html_select_element_remove): Updated exception handling.
844         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
845         (webkit_dom_node_insert_before): Ditto.
846         (webkit_dom_node_replace_child): Ditto.
847         (webkit_dom_node_remove_child): Ditto.
848         (webkit_dom_node_append_child): Ditto.
849         (webkit_dom_node_clone_node_with_error): Ditto.
850         (webkit_dom_node_set_node_value): Ditto.
851         (webkit_dom_node_set_text_content): Ditto.
852         * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
853         (-[WKDOMNode insertNode:before:]): Ditto.
854         (-[WKDOMNode appendChild:]): Ditto.
855         (-[WKDOMNode removeChild:]): Ditto.
856
857         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
858         (WebKit::PDFPlugin::PDFPlugin): Removed unneeded ASSERT_NO_EXCEPTION.
859         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
860         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Ditto.
861
862 2016-11-11  Megan Gardner  <megan_gardner@apple.com>
863
864         [Cocoa] Support wide gamut for Drag Image UI
865         https://bugs.webkit.org/show_bug.cgi?id=164490
866
867         Reviewed by Tim Horton.
868
869         Fixed an error in the gating for the new wide gamut support in ShareableBitmap.
870         We should always respect the flags straight out, and not make decisions later, it can lead to mismatched data and data storage.
871         Added support for wide gamut in createCGImage.
872
873         * Shared/cg/ShareableBitmapCG.cpp:
874         (WebKit::bitmapInfo):
875         (WebKit::colorSpace):
876         (WebKit::ShareableBitmap::createGraphicsContext):
877         (WebKit::ShareableBitmap::createCGImage):
878         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
879         (WebKit::convertImageToBitmap):
880         (WebKit::WebDragClient::startDrag):
881
882 2016-11-11  Beth Dakin  <bdakin@apple.com>
883
884         Get touch bar code building for open source builds
885         https://bugs.webkit.org/show_bug.cgi?id=164610
886
887         Reviewed by Wenson Hsieh.
888
889         * config.h:
890
891 2016-11-10  Brent Fulgham  <bfulgham@apple.com>
892
893         Remove unused FontService from sandbox profile
894         https://bugs.webkit.org/show_bug.cgi?id=164625
895         <rdar://problem/26899976>
896
897         Reviewed by Alex Christensen.
898
899         Part of some general sandbox profile gardening.
900
901         Convert the Plugin process sandbox into 
902
903         * Configurations/WebKit.xcconfig: Add exclude for com.apple.WebKit.plugin-common.sb.in.
904         * DerivedSources.make: Update to generate com.apple.WebKit.plugin-common.sb from .in file
905         * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Copied from Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb.
906         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Removed.
907         * WebKit2.xcodeproj/project.pbxproj: Update for new .in file.
908         * WebProcess/com.apple.WebProcess.sb.in: Remove com.apple.FontServer
909         from macOS Sierra and newer.
910
911 2016-11-10  Eric Carlson  <eric.carlson@apple.com>
912
913         [MediaStream] apply constraints passed to getUserMedia()
914         https://bugs.webkit.org/show_bug.cgi?id=164561
915
916         Reviewed by Youenn Fablet.
917         <rdar://problem/29191384>
918
919         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
920         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
921
922 2016-11-10  Alex Christensen  <achristensen@webkit.org>
923
924         Move SecurityOrigin::databaseIdentifier() to SecurityOriginData
925         https://bugs.webkit.org/show_bug.cgi?id=164573
926
927         Reviewed by Brady Eidson.
928
929         * Shared/API/c/WKSecurityOriginRef.cpp:
930         (WKSecurityOriginCopyDatabaseIdentifier):
931         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
932         (WebKit::LocalStorageDatabaseTracker::databasePath):
933         (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
934         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
935         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
936         (WebKit::WebsiteDataStore::removeMediaKeys):
937         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
938         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
939         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
940         (WKBundlePageCopyOriginsWithApplicationCache):
941         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
942         (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin):
943         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
944         (WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
945         (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
946         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
947         (WebKit::WebChromeClient::exceededDatabaseQuota):
948         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
949
950 2016-11-10  Alex Christensen  <achristensen@webkit.org>
951
952         Remove unused CFURLCACHE code
953         https://bugs.webkit.org/show_bug.cgi?id=164551
954
955         Reviewed by Antti Koivisto.
956
957         WebKit2 doesn't use CFURLCache, but we still have some unused code that seems to use it.
958
959         * NetworkProcess/NetworkProcess.cpp:
960         (WebKit::fetchDiskCacheEntries):
961         (WebKit::clearDiskCacheEntries):
962         * NetworkProcess/NetworkProcess.h:
963         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
964         (WebKit::partitionName): Deleted.
965         (WebKit::NetworkProcess::cfURLCacheOrigins): Deleted.
966         (WebKit::NetworkProcess::clearCFURLCacheForOrigins): Deleted.
967
968 2016-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
969
970         [Linux] Memory process values shown by the WebMemorySampler in linux are wrong
971         https://bugs.webkit.org/show_bug.cgi?id=164591
972
973         Reviewed by Michael Catanzaro.
974
975         It's parsing /proc/self/statm, and returning the values as if they were bytes, but they are number of pages, so
976         to get the bytes we need to take the page size into account. In r208534 I added a method to get /proc/self/statm
977         values in bytes to Platform layer, so we can simply use that instead.
978
979         * Shared/linux/WebMemorySamplerLinux.cpp:
980         (WebKit::WebMemorySampler::sampleWebKit): Use currentProcessMemoryStatus() and update the descriptions to
981         clarify that values are in bytes.
982
983 2016-10-14  Carlos Garcia Campos  <cgarcia@igalia.com>
984
985         MemoryPressureHandler shouldn't know how to release WebCore memory
986         https://bugs.webkit.org/show_bug.cgi?id=160497
987
988         Reviewed by Michael Catanzaro.
989
990         Set the low memory handler before installing the memory pressure handler.
991
992         * WebProcess/WebProcess.cpp:
993         (WebKit::WebProcess::initializeWebProcess):
994         * WebProcess/cocoa/WebProcessCocoa.mm:
995         (WebKit::WebProcess::platformInitializeWebProcess):
996
997 2016-10-27  Sergio Villar Senin  <svillar@igalia.com>
998
999         [GTK] New API to notify about dynamically added forms
1000         https://bugs.webkit.org/show_bug.cgi?id=164050
1001
1002         Reviewed by Carlos Garcia Campos.
1003
1004         This new API exports the WebCore event didAssociateFormControls through the web extension
1005         mechanism. This will help clients (mainly web browsers) to implement robust auto filling
1006         mechanisms. It deals nicely with dynamically created forms (and form controls) as many JS
1007         frameworks do nowadays.
1008
1009         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added a FormClient implementation of
1010         API::InjectedBundle::FormClient.
1011         (webkitWebPageFormControlsAssociated): Emit the new signal.
1012         (webkit_web_page_class_init): Added the new signal "forms-controls-associated".
1013         (webkitWebPageCreate): Set the WebPage as a FormClient.
1014
1015 2016-11-10  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1016
1017         [GTK] Allow to use WebMemorySampler feature.
1018         https://bugs.webkit.org/show_bug.cgi?id=164517
1019
1020         Reviewed by Carlos Garcia Campos.
1021
1022         Enable the WebMemorySampler with the environment variable WEBKIT_SAMPLE_MEMORY.
1023
1024         When enabled, it will dump the stats to /tmp each second.
1025
1026         * UIProcess/API/gtk/WebKitWebContext.cpp:
1027         (webkitWebContextConstructed):
1028
1029 2016-11-10  Philippe Normand  <pnormand@igalia.com>
1030
1031         [WK2][GTK][GStreamer] Build fails when -plugins-base and -core headers are not installed in the same directory
1032         https://bugs.webkit.org/show_bug.cgi?id=148894
1033
1034         Reviewed by Carlos Garcia Campos.
1035
1036         The pbutils (gst-plugins-base-utils) headers are needed in
1037         WebKit2/GTK for the permission request API related with the
1038         GStreamer codec installer. It builds fine in most cases without
1039         explicitely requiring the pbutils include directory path because
1040         usually all the GStreamer headers are installed in the same path,
1041         excepted for some distributions, like NixOS.
1042
1043         * PlatformGTK.cmake: The GStreamer pbutils include directory was
1044         missing in the header search path.
1045
1046 2016-11-09  Chris Dumez  <cdumez@apple.com>
1047
1048         [WK2][!NETWORK_SESSION] Add support for downloading file backed blobs
1049         https://bugs.webkit.org/show_bug.cgi?id=164522
1050
1051         Reviewed by Alex Christensen.
1052
1053         Add support for downloading file backed blobs for the non-NETWORK_SESSION
1054         code path of WebKit2, which is still use on pre-Sierra macOS.
1055
1056         * NetworkProcess/Downloads/Download.cpp:
1057         (WebKit::Download::~Download):
1058         * NetworkProcess/Downloads/Download.h:
1059         (WebKit::Download::setBlobFileReferences):
1060         * NetworkProcess/Downloads/DownloadManager.cpp:
1061         (WebKit::DownloadManager::startDownload):
1062         (WebKit::DownloadManager::convertNetworkLoadToDownload):
1063         * NetworkProcess/Downloads/DownloadManager.h:
1064         * NetworkProcess/NetworkResourceLoader.cpp:
1065         (WebKit::NetworkResourceLoader::convertToDownload):
1066
1067 2016-11-09  Chris Dumez  <cdumez@apple.com>
1068
1069         [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
1070         https://bugs.webkit.org/show_bug.cgi?id=164458
1071         <rdar://problem/28905514>
1072
1073         Reviewed by Darin Adler.
1074
1075         Add support for downloading file backed blobs on WebKit2.
1076         It previously wasn't working because we weren't calling
1077         BlobDataFileReference::prepareForFileAccess() for each blob file before
1078         starting the download, similarly to what is done in NetworkResourceLoader's
1079         consumeSandboxExtensions().
1080
1081         * NetworkProcess/Downloads/DownloadManager.cpp:
1082         (WebKit::DownloadManager::startDownload):
1083         * NetworkProcess/Downloads/DownloadManager.h:
1084         (WebKit::DownloadManager::startDownload):
1085         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1086         (WebKit::NetworkConnectionToWebProcess::startDownload):
1087         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1088         * NetworkProcess/NetworkDataTask.cpp:
1089         (WebKit::NetworkDataTask::create):
1090         * NetworkProcess/NetworkDataTask.h:
1091         * NetworkProcess/NetworkDataTaskBlob.cpp:
1092         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1093         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1094         (WebKit::NetworkDataTaskBlob::download):
1095         * NetworkProcess/NetworkDataTaskBlob.h:
1096         * NetworkProcess/NetworkLoad.cpp:
1097         (WebKit::NetworkLoad::NetworkLoad):
1098         * NetworkProcess/NetworkLoadParameters.h:
1099         * NetworkProcess/NetworkProcess.cpp:
1100         (WebKit::NetworkProcess::downloadRequest):
1101         * NetworkProcess/NetworkResourceLoader.cpp:
1102         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1103         (WebKit::NetworkResourceLoader::startNetworkLoad):
1104         * NetworkProcess/PingLoad.h:
1105
1106 2016-11-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1107
1108         NetworkSession: Network process crash when converting main resource to download
1109         https://bugs.webkit.org/show_bug.cgi?id=164220
1110
1111         Reviewed by Alex Christensen.
1112
1113         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
1114         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
1115         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
1116         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
1117         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
1118         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
1119         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
1120         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
1121         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
1122         created yet. That's not expected to happen and when the response completion handler is called in the
1123         NetworkDataTask it tries to use either the client or the download and it crashes.
1124         We need to cleanup and destroy the ResourceLoader as soon as it becomes a download, because that's the expected
1125         behavior, but at the same time we need to keep the NetworkLoad alive until the NetworkDataTask finishes to become
1126         a download. This patch creates a PendingDownload to take the ownership of the NetworkLoad, so that
1127         ResourceLoader can be cleaned up and destroyed. The DownloadManager now will handle the PendingDownload as if it
1128         was created by startDownload(), but ensuring it's deleted right before the final Download object is added to the
1129         downloads map. That way NetworkDataTask will always have a valid client until the final Download is created,
1130         first the ResourceLoader and then the PendingDownload. Since the DownloadManager is the owner of the
1131         PendingDownload we no longer need the didBecomeDownload() callback to delete the NetworkLoad, because the
1132         NetworkLoad will always be owned by the PendingDownload now that will be deleted by the DownloadManager.
1133
1134         * NetworkProcess/Downloads/DownloadManager.cpp:
1135         (WebKit::DownloadManager::dataTaskBecameDownloadTask): Change the ASSERT because at this point we should always
1136         have a PendingDownload, and then remove it from the map here before adding the final Download to the map.
1137         (WebKit::DownloadManager::convertNetworkLoadToDownload): This replaces convertHandleToDownload, but it also now
1138         used for the NetworkSession. It creates a PendingDownload for the given NetworkLoad.
1139         (WebKit::DownloadManager::continueDecidePendingDownloadDestination): Do not take the PendingDownload from the
1140         map here, just check it's present, because it will be removed from dataTaskBecameDownloadTask().
1141         (WebKit::DownloadManager::convertHandleToDownload): Deleted.
1142         * NetworkProcess/Downloads/DownloadManager.h:
1143         * NetworkProcess/Downloads/PendingDownload.cpp:
1144         (WebKit::PendingDownload::PendingDownload): Add a constructor that receives a NetworkLoad.
1145         * NetworkProcess/Downloads/PendingDownload.h:
1146         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1147         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Just ask the ResourceLoader to be
1148         converted to a download.
1149         * NetworkProcess/NetworkDataTask.h:
1150         * NetworkProcess/NetworkDataTaskBlob.cpp:
1151         (WebKit::NetworkDataTaskBlob::download): Do not call didBecomeDownload() and add an assert to ensure the client
1152         has already been removed right after the final Download object is created.
1153         * NetworkProcess/NetworkLoad.cpp:
1154         (WebKit::NetworkLoad::NetworkLoad): Use a pointer for the client instead of a reference because now we need to
1155         change the client when the load is converted to a download. We don't need to null check the client in any case
1156         because the member is only updated internally and always from a passed reference.
1157         (WebKit::NetworkLoad::sharedDidReceiveResponse):
1158         (WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
1159         (WebKit::NetworkLoad::convertTaskToDownload): This now receives a PendingDownload. It updates the client and no
1160         longer sends DidStart, because the PendingDownload sends it now.
1161         (WebKit::NetworkLoad::didReceiveChallenge):
1162         (WebKit::NetworkLoad::didReceiveData):
1163         (WebKit::NetworkLoad::didCompleteWithError):
1164         (WebKit::NetworkLoad::didSendData):
1165         (WebKit::NetworkLoad::wasBlocked):
1166         (WebKit::NetworkLoad::cannotShowURL):
1167         (WebKit::NetworkLoad::didReceiveBuffer):
1168         (WebKit::NetworkLoad::didFinishLoading):
1169         (WebKit::NetworkLoad::didFail):
1170         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
1171         (WebKit::NetworkLoad::didBecomeDownload): Deleted.
1172         * NetworkProcess/NetworkLoad.h:
1173         * NetworkProcess/NetworkLoadClient.h: Remove didBecomeDownload().
1174         * NetworkProcess/NetworkResourceLoader.cpp:
1175         (WebKit::NetworkResourceLoader::convertToDownload): This replaces didBecomeDownload() and
1176         didConvertToDownload(). It transfers the NetworkLoad to the DownloadManager.
1177         (WebKit::NetworkResourceLoader::abort): We don't need to check if the load was converted to a download here,
1178         because m_networkLoad will always be null here in such case.
1179         (WebKit::NetworkResourceLoader::didBecomeDownload): Deleted
1180         (WebKit::NetworkResourceLoader::didConvertToDownload): Deleted
1181         * NetworkProcess/NetworkResourceLoader.h:
1182         * NetworkProcess/PingLoad.h: Remove didBecomeDownload().
1183         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Ditto.
1184         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Ditto.
1185         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Ditto.
1186         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1187         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Do not call didBecomeDownload().
1188         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1189         (WebKit::NetworkDataTaskSoup::download): Do not call didBecomeDownload() and add an assert to ensure the client
1190         has already been removed right after the final Download object is created.
1191
1192 2016-11-09  Alex Christensen  <achristensen@webkit.org>
1193
1194         Unreviewed, rolling out r208438.
1195
1196         crashes
1197
1198         Reverted changeset:
1199
1200         "[WK2][NETWORK_SESSION] Add support for downloading file
1201         backed blobs"
1202         https://bugs.webkit.org/show_bug.cgi?id=164458
1203         http://trac.webkit.org/changeset/208438
1204
1205 2016-11-04  Brent Fulgham  <bfulgham@apple.com>
1206
1207         Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
1208         https://bugs.webkit.org/show_bug.cgi?id=155185
1209         <rdar://problem/11101440>
1210
1211         Reviewed by Brady Eidson.
1212
1213         Provide SPI to access the new quirk for localStorage. The quirk defaults to 'on'. When active, this
1214         quirk says that localStorage access should be granted, without needing to grant universal file access.
1215
1216         If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
1217         grants universal file access.
1218         
1219         Tested by existing TestWebKitAPI tests and WebKit2.LocalStorageQuirkTest
1220
1221         * Shared/WebPreferencesDefinitions.h:
1222         * UIProcess/API/C/WKPreferences.cpp:
1223         (WKPreferencesSetNeedsLocalStorageQuirk): Added.
1224         (WKPreferencesGetNeedsLocalStorageQuirk): Added.
1225         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1226         * UIProcess/API/Cocoa/WKWebView.mm:
1227         (-[WKWebView _initializeWithConfiguration:]): Honor the new localStorage quirk.
1228         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1229         (-[WKWebViewConfiguration init]): Honor the new localStorage quirk flag.
1230         (-[WKWebViewConfiguration copyWithZone:]): Ditto.
1231         (-[WKWebViewConfiguration _needsLocalStorageQuirk]): Added.
1232         (-[WKWebViewConfiguration _setNeedsLocalStorageQuirk:]): Added.
1233         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1234         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1235         (WKBundleSetNeedsLocalStorageQuirk): Added.
1236         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1237         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1238         (WebKit::InjectedBundle::setNeedsLocalStorageQuirk): Added.
1239         * WebProcess/InjectedBundle/InjectedBundle.h:
1240         * WebProcess/WebPage/WebPage.cpp:
1241         (WebKit::WebPage::updatePreferences): Honor the new localStorage quirk flag.
1242
1243 2016-11-09  Simon Fraser  <simon.fraser@apple.com>
1244
1245         Implement visual-viewport based position:fixed handling for Mac async scrolling
1246         https://bugs.webkit.org/show_bug.cgi?id=164495
1247
1248         Reviewed by Tim Horton.
1249
1250         Educate the scrolling tree about visual and layout viewports. This is runtime-switchable,
1251         so we push the enable flag to via the root state node, then push the layout viewport,
1252         and the min/max scroll position that contstrain it, through frame state nodes.
1253
1254         When a scroll happens, we compute a new layout viewport when the visual viewport hits
1255         an edge, and push that down through setScrollLayerPosition() since it's used to position
1256         fixed and sticky layers.
1257
1258         The iOS code is made to compile, but not work yet.
1259
1260         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1261         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1262         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
1263         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1264         (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
1265         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1266         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1267         (WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
1268         * UIProcess/Scrolling/RemoteScrollingTree.h:
1269         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1270         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1271         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
1272         * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
1273         (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
1274
1275 2016-11-09  Beth Dakin  <bdakin@apple.com>
1276
1277         More attempted build fix.
1278
1279         * UIProcess/Cocoa/WebViewImpl.mm:
1280
1281 2016-11-09  Alex Christensen  <achristensen@webkit.org>
1282
1283         Clean up Storage code
1284         https://bugs.webkit.org/show_bug.cgi?id=164562
1285
1286         Reviewed by Brady Eidson.
1287
1288         Use more Refs!
1289
1290         * NetworkProcess/CustomProtocols/CustomProtocolManager.h:
1291         * Platform/IPC/Connection.cpp:
1292         (IPC::Connection::addWorkQueueMessageReceiver):
1293         * Platform/IPC/Connection.h:
1294         * UIProcess/Storage/LocalStorageDatabase.cpp:
1295         (WebKit::LocalStorageDatabase::create):
1296         (WebKit::LocalStorageDatabase::LocalStorageDatabase):
1297         * UIProcess/Storage/LocalStorageDatabase.h:
1298         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
1299         (WebKit::LocalStorageDatabaseTracker::create):
1300         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
1301         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
1302         * UIProcess/Storage/StorageManager.cpp:
1303         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
1304         (WebKit::StorageManager::StorageManager):
1305         * UIProcess/Storage/StorageManager.h:
1306         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1307         (WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):
1308         * UIProcess/mac/SecItemShimProxy.cpp:
1309         (WebKit::SecItemShimProxy::initializeConnection):
1310         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1311         (WebKit::PluginProcessConnectionManager::initializeConnection):
1312         * WebProcess/WebPage/EventDispatcher.cpp:
1313         (WebKit::EventDispatcher::initializeConnection):
1314         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1315         (WebKit::ViewUpdateDispatcher::initializeConnection):
1316
1317 2016-11-09  Beth Dakin  <bdakin@apple.com>
1318
1319         Another attempted build fix.
1320
1321         * UIProcess/Cocoa/WebViewImpl.mm:
1322
1323 2016-11-09  Michael Catanzaro  <mcatanzaro@igalia.com>
1324
1325         Experimental features should not be enabled by default
1326         https://bugs.webkit.org/show_bug.cgi?id=164367
1327
1328         Reviewed by Darin Adler.
1329
1330         We have two classes of experimental features:
1331
1332         (1) Features that are unstable and should be off by default, except for the developers
1333             currently working on them. This is straightforward to handle; the default value should
1334             be false.
1335         (2) Features that are still not ready for end users, but are stable enough for testing. We
1336             want these features to be enabled in testing environments like the bots, MiniBrowser,
1337             Safari Tech Preview, and so forth, but not in stable release builds.
1338
1339         Implement this. It is better than having all experimental features on unconditionally, and
1340         expecting them to be disabled manually on release branches, which is not something we are
1341         keen to do. An exception is Cocoa ports, which to my knowledge do not currently have any
1342         concept of development builds. These ports seem happy to continue disabling features
1343         manually in release branches, and should continue to do so at least for now.
1344
1345         We also have features that we wish to enumerate at runtime, yet have enabled by default
1346         unconditionally. We do not currently have any infrastructure to support this and should not
1347         abuse the experimental status for this purpose; it requires future work. All settings can
1348         still be toggled at runtime by clients that know about them using the existing runtime
1349         features API.
1350
1351         Lastly, the custom elements feature is ready to be enabled by default, so it's no longer
1352         experimental and can graduate to the list of normal boolean features.
1353
1354         * Shared/WebPreferencesDefinitions.h:
1355
1356 2016-11-09  Beth Dakin  <bdakin@apple.com>
1357
1358         Build fix.
1359
1360         * UIProcess/Cocoa/WebViewImpl.mm:
1361
1362 2016-11-09  Brady Eidson  <beidson@apple.com>
1363
1364         IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
1365         https://bugs.webkit.org/show_bug.cgi?id=164504
1366
1367         Reviewed by Darin Adler.
1368
1369         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1370         (WebKit::WebIDBConnectionToClient::iterateCursor):
1371         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
1372         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1373
1374         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1375         (WebKit::WebIDBConnectionToServer::iterateCursor):
1376         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1377
1378 2016-11-09  Darin Adler  <darin@apple.com>
1379
1380         Move Range from ExceptionCode to ExceptionOr
1381         https://bugs.webkit.org/show_bug.cgi?id=164457
1382
1383         Reviewed by Alex Christensen.
1384
1385         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
1386         (webkit_dom_range_set_start): Updated exception handling.
1387         (webkit_dom_range_set_end): Ditto.
1388         (webkit_dom_range_set_start_before): Ditto.
1389         (webkit_dom_range_set_start_after): Ditto.
1390         (webkit_dom_range_set_end_before): Ditto.
1391         (webkit_dom_range_set_end_after): Ditto.
1392         (webkit_dom_range_select_node): Ditto.
1393         (webkit_dom_range_select_node_contents): Ditto.
1394         (webkit_dom_range_compare_boundary_points): Ditto.
1395         (webkit_dom_range_delete_contents): Ditto.
1396         (webkit_dom_range_extract_contents): Ditto.
1397         (webkit_dom_range_clone_contents): Ditto.
1398         (webkit_dom_range_insert_node): Ditto.
1399         (webkit_dom_range_surround_contents): Ditto.
1400         (webkit_dom_range_create_contextual_fragment): Ditto.
1401         (webkit_dom_range_compare_node): Ditto.
1402         (webkit_dom_range_intersects_node): Ditto.
1403         (webkit_dom_range_compare_point): Ditto.
1404         (webkit_dom_range_is_point_in_range): Ditto.
1405         (webkit_dom_range_expand): Ditto.
1406         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
1407         (-[WKDOMRange setStart:offset:]): Ditto.
1408         (-[WKDOMRange setEnd:offset:]): Ditto.
1409         (-[WKDOMRange selectNode:]): Ditto.
1410         (-[WKDOMRange selectNodeContents:]): Ditto.
1411         * WebProcess/WebPage/WebFrame.cpp:
1412         (WebKit::WebFrame::contentsAsString): Ditto.
1413         * WebProcess/WebPage/ios/WebPageIOS.mm:
1414         (WebKit::WebPage::rangeForWebSelectionAtPosition): Ditto.
1415         (WebKit::WebPage::rangeForBlockAtPoint): Ditto.
1416         (WebKit::WebPage::selectWithGesture): Ditto.
1417         (WebKit::containsRange): Ditto.
1418         (WebKit::unionDOMRanges): Ditto.
1419         (WebKit::WebPage::switchToBlockSelectionAtPoint): Ditto.
1420         (WebKit::WebPage::getPositionInformation): Ditto.
1421
1422
1423 2016-11-09  Darin Adler  <darin@apple.com>
1424
1425         Move EventTarget from ExceptionCode to ExceptionOr
1426         https://bugs.webkit.org/show_bug.cgi?id=164465
1427
1428         Reviewed by Youenn Fablet.
1429
1430         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
1431         (webkit_dom_attr_dispatch_event): Updated exception handling.
1432         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1433         (webkit_dom_cdata_section_dispatch_event): Ditto.
1434         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1435         (webkit_dom_character_data_dispatch_event): Ditto.
1436         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1437         (webkit_dom_comment_dispatch_event): Ditto.
1438         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1439         (webkit_dom_dom_window_dispatch_event): Ditto.
1440         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
1441         (webkit_dom_document_dispatch_event): Ditto.
1442         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1443         (webkit_dom_document_fragment_dispatch_event): Ditto.
1444         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1445         (webkit_dom_document_type_dispatch_event): Ditto.
1446         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
1447         (webkit_dom_element_dispatch_event): Ditto.
1448         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1449         (webkit_dom_html_anchor_element_dispatch_event): Ditto.
1450         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1451         (webkit_dom_html_applet_element_dispatch_event): Ditto.
1452         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1453         (webkit_dom_html_area_element_dispatch_event): Ditto.
1454         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
1455         (webkit_dom_html_br_element_dispatch_event): Ditto.
1456         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
1457         (webkit_dom_html_base_element_dispatch_event): Ditto.
1458         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
1459         (webkit_dom_html_body_element_dispatch_event): Ditto.
1460         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
1461         (webkit_dom_html_button_element_dispatch_event): Ditto.
1462         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
1463         (webkit_dom_html_canvas_element_dispatch_event): Ditto.
1464         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
1465         (webkit_dom_html_d_list_element_dispatch_event): Ditto.
1466         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
1467         (webkit_dom_html_directory_element_dispatch_event): Ditto.
1468         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
1469         (webkit_dom_html_div_element_dispatch_event): Ditto.
1470         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
1471         (webkit_dom_html_document_dispatch_event): Ditto.
1472         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1473         (webkit_dom_html_element_dispatch_event): Ditto.
1474         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
1475         (webkit_dom_html_embed_element_dispatch_event): Ditto.
1476         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
1477         (webkit_dom_html_field_set_element_dispatch_event): Ditto.
1478         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
1479         (webkit_dom_html_font_element_dispatch_event): Ditto.
1480         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
1481         (webkit_dom_html_form_element_dispatch_event): Ditto.
1482         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
1483         (webkit_dom_html_frame_element_dispatch_event): Ditto.
1484         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
1485         (webkit_dom_html_frame_set_element_dispatch_event): Ditto.
1486         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
1487         (webkit_dom_html_hr_element_dispatch_event): Ditto.
1488         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
1489         (webkit_dom_html_heading_element_dispatch_event): Ditto.
1490         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
1491         (webkit_dom_html_head_element_dispatch_event): Ditto.
1492         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
1493         (webkit_dom_html_html_element_dispatch_event): Ditto.
1494         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
1495         (webkit_dom_html_iframe_element_dispatch_event): Ditto.
1496         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
1497         (webkit_dom_html_image_element_dispatch_event): Ditto.
1498         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1499         (webkit_dom_html_input_element_dispatch_event): Ditto.
1500         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
1501         (webkit_dom_html_li_element_dispatch_event): Ditto.
1502         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
1503         (webkit_dom_html_label_element_dispatch_event): Ditto.
1504         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
1505         (webkit_dom_html_legend_element_dispatch_event): Ditto.
1506         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
1507         (webkit_dom_html_link_element_dispatch_event): Ditto.
1508         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
1509         (webkit_dom_html_map_element_dispatch_event): Ditto.
1510         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
1511         (webkit_dom_html_marquee_element_dispatch_event): Ditto.
1512         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
1513         (webkit_dom_html_menu_element_dispatch_event): Ditto.
1514         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
1515         (webkit_dom_html_meta_element_dispatch_event): Ditto.
1516         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
1517         (webkit_dom_html_mod_element_dispatch_event): Ditto.
1518         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
1519         (webkit_dom_html_o_list_element_dispatch_event): Ditto.
1520         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
1521         (webkit_dom_html_object_element_dispatch_event): Ditto.
1522         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
1523         (webkit_dom_html_opt_group_element_dispatch_event): Ditto.
1524         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
1525         (webkit_dom_html_option_element_dispatch_event): Ditto.
1526         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
1527         (webkit_dom_html_paragraph_element_dispatch_event): Ditto.
1528         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
1529         (webkit_dom_html_param_element_dispatch_event): Ditto.
1530         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
1531         (webkit_dom_html_pre_element_dispatch_event): Ditto.
1532         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
1533         (webkit_dom_html_quote_element_dispatch_event): Ditto.
1534         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
1535         (webkit_dom_html_script_element_dispatch_event): Ditto.
1536         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1537         (webkit_dom_html_select_element_dispatch_event): Ditto.
1538         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
1539         (webkit_dom_html_style_element_dispatch_event): Ditto.
1540         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
1541         (webkit_dom_html_table_caption_element_dispatch_event): Ditto.
1542         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
1543         (webkit_dom_html_table_cell_element_dispatch_event): Ditto.
1544         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
1545         (webkit_dom_html_table_col_element_dispatch_event): Ditto.
1546         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
1547         (webkit_dom_html_table_element_dispatch_event): Ditto.
1548         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
1549         (webkit_dom_html_table_row_element_dispatch_event): Ditto.
1550         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
1551         (webkit_dom_html_table_section_element_dispatch_event): Ditto.
1552         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
1553         (webkit_dom_html_text_area_element_dispatch_event): Ditto.
1554         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
1555         (webkit_dom_html_title_element_dispatch_event): Ditto.
1556         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
1557         (webkit_dom_html_u_list_element_dispatch_event): Ditto.
1558         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
1559         (webkit_dom_node_dispatch_event): Ditto.
1560         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
1561         (webkit_dom_processing_instruction_dispatch_event): Ditto.
1562         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
1563         (webkit_dom_text_dispatch_event): Ditto.
1564
1565 2016-11-08  Dean Jackson  <dino@apple.com>
1566
1567         Rendering support for ExtendedColors
1568         https://bugs.webkit.org/show_bug.cgi?id=164443
1569         <rdar://problems/29123243>
1570
1571         Reviewed by Simon Fraser and Darin Adler.
1572
1573         Implement argument coders for Color.
1574
1575         * Shared/WebCoreArgumentCoders.cpp:
1576         (IPC::ArgumentCoder<Color>::encode):
1577         (IPC::ArgumentCoder<Color>::decode):
1578         * Shared/WebCoreArgumentCoders.h:
1579         * UIProcess/API/Cocoa/WKWebView.mm:
1580         (-[WKWebView _updateScrollViewBackground]):
1581
1582 2016-11-09  Beth Dakin  <bdakin@apple.com>
1583
1584         Build fix.
1585
1586         * UIProcess/Cocoa/WebViewImpl.mm:
1587         (WebKit::WebViewImpl::~WebViewImpl):
1588
1589 2016-11-09  Chris Dumez  <cdumez@apple.com>
1590
1591         [Mac] Stop using deprecated AppKit enumeration values
1592         https://bugs.webkit.org/show_bug.cgi?id=164494
1593
1594         Reviewed by Darin Adler.
1595
1596         Stop using deprecated AppKit enumeration values.
1597
1598         * Shared/mac/ChildProcessMac.mm:
1599         (WebKit::ChildProcess::stopNSAppRunLoop):
1600         * Shared/mac/WebEventFactory.mm:
1601         (WebKit::mouseButtonForEvent):
1602         (WebKit::mouseEventTypeForEvent):
1603         (WebKit::clickCountForEvent):
1604         (WebKit::globalPointForEvent):
1605         (WebKit::pointForEvent):
1606         (WebKit::textFromEvent):
1607         (WebKit::unmodifiedTextFromEvent):
1608         (WebKit::isKeypadEvent):
1609         (WebKit::isKeyUpEvent):
1610         (WebKit::WebEventFactory::createWebKeyboardEvent):
1611         * UIProcess/Cocoa/WebViewImpl.mm:
1612         (WebKit::WebViewImpl::becomeFirstResponder):
1613         (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
1614         (WebKit::WebViewImpl::viewDidMoveToWindow):
1615         (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
1616         (WebKit::WebViewImpl::createFullScreenWindow):
1617         (WebKit::WebViewImpl::sendToolTipMouseExited):
1618         (WebKit::WebViewImpl::sendToolTipMouseEntered):
1619         (WebKit::applicationFlagsForDrag):
1620         (WebKit::WebViewImpl::setLastMouseDownEvent):
1621         (WebKit::WebViewImpl::doneWithKeyEvent):
1622         (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
1623         (WebKit::WebViewImpl::performKeyEquivalent):
1624         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1625         (WebKit::PluginProcessProxy::beginModal):
1626         * UIProcess/mac/WebContextMenuProxyMac.mm:
1627         (WebKit::WebContextMenuProxyMac::showContextMenuWithItems):
1628         * UIProcess/mac/WebInspectorProxyMac.mm:
1629         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1630         (WebKit::WebPopupMenuProxyMac::populate):
1631         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1632         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
1633         (WebKit::modifierFlagsFromWebEvent):
1634         (WebKit::getEventTypeFromWebEvent):
1635         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1636         (WebKit::cssAlignmentValueForNSTextAlignment):
1637         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1638         (WebKit::convertImageToBitmap):
1639
1640 2016-11-09  Beth Dakin  <bdakin@apple.com>
1641
1642         Support TouchBar in WebKit
1643         https://bugs.webkit.org/show_bug.cgi?id=164437
1644         -and corresponding-
1645         rdar://problem/28876524
1646
1647         Reviewed by Darin Adler.
1648
1649         * UIProcess/API/Cocoa/WKViewPrivate.h:
1650         * UIProcess/API/Cocoa/WKWebView.mm:
1651         (-[WKWebView makeTouchBar]):
1652         (-[WKWebView candidateListTouchBarItem]):
1653         (-[WKWebView _web_didAddMediaControlsManager:]):
1654         (-[WKWebView _web_didRemoveMediaControlsManager]):
1655         (-[WKWebView _interactWithMediaControlsForTesting]):
1656         (-[WKWebView _wantsMediaPlaybackControlsView]):
1657         (-[WKWebView _setWantsMediaPlaybackControlsView:]):
1658         (-[WKWebView _mediaPlaybackControlsView]):
1659         (-[WKWebView _addMediaPlaybackControlsView:]):
1660         (-[WKWebView _removeMediaPlaybackControlsView]):
1661         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1662         * UIProcess/API/mac/WKView.mm:
1663         (-[WKView makeTouchBar]):
1664         (-[WKView candidateListTouchBarItem]):
1665         (-[WKView _web_didAddMediaControlsManager:]):
1666         (-[WKView _web_didRemoveMediaControlsManager]):
1667         (-[WKView _wantsMediaPlaybackControlsView]):
1668         (-[WKView _setWantsMediaPlaybackControlsView:]):
1669         (-[WKView _mediaPlaybackControlsView]):
1670         (-[WKView _addMediaPlaybackControlsView:]):
1671         (-[WKView _removeMediaPlaybackControlsView]):
1672         * UIProcess/Cocoa/WebViewImpl.h:
1673         (WebKit::WebViewImpl::currentTouchBar):
1674         (WebKit::WebViewImpl::clientWantsMediaPlaybackControlsView):
1675         (WebKit::WebViewImpl::setClientWantsMediaPlaybackControlsView):
1676         (WebKit::WebViewImpl::setIsCustomizingTouchBar):
1677         * UIProcess/Cocoa/WebViewImpl.mm:
1678         (-[WKTextListTouchBarViewController initWithWebViewImpl:]):
1679         (-[WKTextListTouchBarViewController didDestroyView]):
1680         (-[WKTextListTouchBarViewController _selectList:]):
1681         (-[WKTextListTouchBarViewController setCurrentListType:]):
1682         (-[WKTextTouchBarItemController initWithWebViewImpl:]):
1683         (-[WKTextTouchBarItemController didDestroyView]):
1684         (-[WKTextTouchBarItemController touchBar:makeItemForIdentifier:]):
1685         (-[WKTextTouchBarItemController itemForIdentifier:]):
1686         (-[WKTextTouchBarItemController candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
1687         (-[WKTextTouchBarItemController candidateListTouchBarItem:changedCandidateListVisibility:]):
1688         (-[WKTextTouchBarItemController textListTouchBarViewController]):
1689         (-[WKTextTouchBarItemController setTextIsBold:]):
1690         (-[WKTextTouchBarItemController setTextIsItalic:]):
1691         (-[WKTextTouchBarItemController setTextIsUnderlined:]):
1692         (-[WKTextTouchBarItemController _wkChangeTextStyle:]):
1693         (-[WKTextTouchBarItemController setCurrentTextAlignment:]):
1694         (-[WKTextTouchBarItemController _wkChangeTextAlignment:]):
1695         (-[WKTextTouchBarItemController textColor]):
1696         (-[WKTextTouchBarItemController setTextColor:]):
1697         (-[WKTextTouchBarItemController _wkChangeColor:]):
1698         (-[WKTextTouchBarItemController textListViewController]):
1699         (WebKit::WebViewImpl::makeTouchBar):
1700         (WebKit::WebViewImpl::candidateListTouchBarItem):
1701         (WebKit::WebViewImpl::mediaPlaybackControlsView):
1702         (WebKit::WebViewImpl::useMediaPlaybackControlsView):
1703         (WebKit::WebViewImpl::dismissTextTouchBarPopoverItemWithIdentifier):
1704         (WebKit::textTouchBarCustomizationAllowedIdentifiers):
1705         (WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers):
1706         (WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers):
1707         (WebKit::touchBarDidExitCustomization):
1708         (WebKit::touchBarWillEnterCustomization):
1709         (WebKit::didChangeAutomaticTextCompletion):
1710         (WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
1711         (WebKit::WebViewImpl::setUpTextTouchBar):
1712         (WebKit::WebViewImpl::isRichlyEditable):
1713         (WebKit::WebViewImpl::textTouchBar):
1714         (WebKit::WebViewImpl::updateTextTouchBar):
1715         (WebKit::WebViewImpl::updateMediaTouchBar):
1716         (WebKit::WebViewImpl::forceRequestCandidatesForTesting):
1717         (WebKit::WebViewImpl::updateTouchBar):
1718         (WebKit::WebViewImpl::shouldRequestCandidates):
1719         (WebKit::WebViewImpl::showCandidates):
1720         (WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
1721         (WebKit::WebViewImpl::setEditableElementIsFocused):
1722         (WebKit::WebViewImpl::becomeFirstResponder):
1723         (WebKit::WebViewImpl::selectionDidChange):
1724         (WebKit::WebViewImpl::videoControlsManagerDidChange):
1725         (WebKit::WebViewImpl::updateWebViewImplAdditions): Deleted.
1726
1727 2016-11-09  Chris Dumez  <cdumez@apple.com>
1728
1729         [WK2][NETWORK_SESSION] Add support for downloading file backed blobs
1730         https://bugs.webkit.org/show_bug.cgi?id=164458
1731         <rdar://problem/28905514>
1732
1733         Reviewed by Darin Adler.
1734
1735         Add support for downloading file backed blobs on WebKit2.
1736         It previously wasn't working because we weren't calling
1737         BlobDataFileReference::prepareForFileAccess() for each blob file before
1738         starting the download, similarly to what is done in NetworkResourceLoader's
1739         consumeSandboxExtensions().
1740
1741         * NetworkProcess/Downloads/DownloadManager.cpp:
1742         (WebKit::DownloadManager::startDownload):
1743         * NetworkProcess/Downloads/DownloadManager.h:
1744         (WebKit::DownloadManager::startDownload):
1745         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1746         (WebKit::NetworkConnectionToWebProcess::startDownload):
1747         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1748         * NetworkProcess/NetworkDataTask.cpp:
1749         (WebKit::NetworkDataTask::create):
1750         * NetworkProcess/NetworkDataTask.h:
1751         * NetworkProcess/NetworkDataTaskBlob.cpp:
1752         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1753         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1754         (WebKit::NetworkDataTaskBlob::download):
1755         * NetworkProcess/NetworkDataTaskBlob.h:
1756         * NetworkProcess/NetworkLoad.cpp:
1757         (WebKit::NetworkLoad::NetworkLoad):
1758         * NetworkProcess/NetworkLoadParameters.h:
1759         * NetworkProcess/NetworkProcess.cpp:
1760         (WebKit::NetworkProcess::downloadRequest):
1761         * NetworkProcess/NetworkResourceLoader.cpp:
1762         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1763         (WebKit::NetworkResourceLoader::startNetworkLoad):
1764         * NetworkProcess/PingLoad.h:
1765
1766 2016-11-09  Chris Dumez  <cdumez@apple.com>
1767
1768         [WK2] Network cache speculative revalidation can cause loads to hang
1769         https://bugs.webkit.org/show_bug.cgi?id=164532
1770         <rdar://problem/28519331>
1771
1772         Reviewed by Alex Christensen.
1773
1774         Network cache speculative revalidation could cause loads to hang when HTTP
1775         authentication was involved because NetworkCacheSpeculativeLoad failed to
1776         call NetworkLoad::continueCanAuthenticateAgainstProtectionSpace() in its
1777         canAuthenticateAgainstProtectionSpaceAsync() callback.
1778
1779         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
1780         (WebKit::NetworkCache::SpeculativeLoad::canAuthenticateAgainstProtectionSpaceAsync):
1781         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
1782
1783 2016-11-09  Csaba Osztrogonác  <ossy@webkit.org>
1784
1785         URTBF after r208361.
1786
1787         * PlatformMac.cmake:
1788
1789 2016-11-09  Csaba Osztrogonác  <ossy@webkit.org>
1790
1791         Unreviewed typo fix after r160616 to fix the build on case sensitive file systems.
1792
1793         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1794
1795 2016-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1796
1797         [SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
1798         https://bugs.webkit.org/show_bug.cgi?id=139358
1799
1800         Reviewed by Michael Catanzaro.
1801
1802         Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
1803         itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
1804         request, libsoup will authenticate those automatically.
1805
1806         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1807         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
1808
1809 2016-11-04  Filip Pizlo  <fpizlo@apple.com>
1810
1811         WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
1812         https://bugs.webkit.org/show_bug.cgi?id=152045
1813
1814         Reviewed by Andy Estes.
1815
1816         * Platform/IPC/Connection.cpp:
1817         (IPC::Connection::SyncMessageState::wait):
1818         (IPC::Connection::sendMessage):
1819         (IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
1820         (IPC::Connection::waitForMessage):
1821         (IPC::Connection::sendSyncMessage):
1822         (IPC::Connection::waitForSyncReply):
1823         * Platform/IPC/Connection.h:
1824         (IPC::Connection::sendSync):
1825         (IPC::Connection::waitForAndDispatchImmediately):
1826         * Platform/IPC/MessageSender.h:
1827         (IPC::MessageSender::sendSync):
1828         * UIProcess/ChildProcessProxy.h:
1829         (WebKit::ChildProcessProxy::sendSync):
1830         * UIProcess/Network/NetworkProcessProxy.cpp:
1831         (WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):
1832         * UIProcess/Storage/StorageManager.cpp:
1833         (WebKit::StorageManager::applicationWillTerminate):
1834         * UIProcess/WebProcessProxy.cpp:
1835         (WebKit::WebProcessProxy::sendProcessWillSuspendImminently):
1836         * UIProcess/WebResourceLoadStatisticsStore.cpp:
1837         (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
1838         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1839         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1840         (-[WKOneShotDisplayLinkHandler displayLinkFired:]):
1841         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1842         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
1843         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
1844         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1845         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
1846         * UIProcess/mac/WKImmediateActionController.mm:
1847         (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
1848         * UIProcess/mac/WebPageProxyMac.mm:
1849         (WebKit::WebPageProxy::stringSelectionForPasteboard):
1850         (WebKit::WebPageProxy::dataSelectionForPasteboard):
1851         (WebKit::WebPageProxy::readSelectionFromPasteboard):
1852         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
1853         (WebKit::WebPageProxy::acceptsFirstMouse):
1854         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1855         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1856         (WebKit::WebChromeClient::runJavaScriptAlert):
1857         (WebKit::WebChromeClient::runJavaScriptConfirm):
1858         (WebKit::WebChromeClient::runJavaScriptPrompt):
1859         (WebKit::WebChromeClient::print):
1860         (WebKit::WebChromeClient::exceededDatabaseQuota):
1861         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1862         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1863         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1864         * WebProcess/WebPage/WebPage.cpp:
1865         (WebKit::WebPage::postSynchronousMessageForTesting):
1866
1867 2016-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1868
1869         Safari does not emit composition end if blurred for dead key / Japanese IME
1870         https://bugs.webkit.org/show_bug.cgi?id=164369
1871         <rdar://problem/29050439>
1872
1873         Reviewed by Ryosuke Niwa.
1874
1875         Split WebPage::discardedComposition into two steps, where we first discard marked text and then update the
1876         editor state. This allows the codepath where we cancel the composition early (before setting the selection) to
1877         discard marked text without also forcing an editor state update at the same time. The editor state is later
1878         updated in WebPage::didChangeSelection.
1879
1880         * UIProcess/WebPageProxy.cpp:
1881         (WebKit::WebPageProxy::compositionWasCanceled):
1882         * UIProcess/WebPageProxy.h:
1883         * UIProcess/WebPageProxy.messages.in:
1884         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1885         (WebKit::WebEditorClient::canceledComposition):
1886         * WebProcess/WebCoreSupport/WebEditorClient.h:
1887         * WebProcess/WebPage/WebPage.cpp:
1888         (WebKit::WebPage::didChangeSelection):
1889         (WebKit::WebPage::discardedComposition):
1890         (WebKit::WebPage::canceledComposition):
1891         * WebProcess/WebPage/WebPage.h:
1892
1893 2016-11-04  Alex Christensen  <achristensen@webkit.org>
1894
1895         Unreviewed, rolling out r208293.
1896
1897         asserts in API tests.
1898
1899         Reverted changeset:
1900
1901         "NetworkSession: Network process crash when converting main
1902         resource to download"
1903         https://bugs.webkit.org/show_bug.cgi?id=164220
1904         http://trac.webkit.org/changeset/208293
1905
1906 2016-11-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
1907
1908         Add a setting and preferences to enable/disable async image decoding
1909         https://bugs.webkit.org/show_bug.cgi?id=164417
1910
1911         Reviewed by Simon Fraser.
1912
1913         Hook up the asyncImageDecodingEnabled setting for WebKit2.
1914
1915         * Shared/WebPreferencesDefinitions.h:
1916         * UIProcess/API/Cocoa/WKPreferences.mm:
1917         (-[WKPreferences _asyncImageDecodingEnabled]):
1918         (-[WKPreferences _setAsyncImageDecodingEnabled:]):
1919         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1920         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1921         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1922         * WebProcess/WebPage/WebPage.cpp:
1923         (WebKit::WebPage::updatePreferences):
1924
1925 2016-11-04  Simon Fraser  <simon.fraser@apple.com>
1926
1927         Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
1928         https://bugs.webkit.org/show_bug.cgi?id=164420
1929
1930         Reviewed by Tim Horton.
1931
1932         Rename:
1933             commitNewTreeState -> commitTreeState ("new" was redundant)
1934             updateBeforeChildren -> commitStateBeforeChildren
1935             updateAfterChildren -> commitStateAfterChildren
1936
1937
1938         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1939         (WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
1940         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
1941         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1942         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1943         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1944         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
1945         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
1946         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
1947         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
1948         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1949         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1950
1951 2016-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1952
1953         NetworkSession: Add NetworkDataTask implementation for blobs
1954         https://bugs.webkit.org/show_bug.cgi?id=163939
1955
1956         Reviewed by Alex Christensen.
1957
1958         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
1959         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
1960         is enabled.
1961
1962         * CMakeLists.txt: Add new files to compilation.
1963         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
1964         * NetworkProcess/Downloads/BlobDownloadClient.h:
1965         * NetworkProcess/Downloads/Download.cpp:
1966         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
1967         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
1968         reveices a NetworkDataTask and is used by Soup backend and blobs.
1969         (WebKit::Download::~Download):
1970         (WebKit::Download::start):
1971         (WebKit::Download::startWithHandle):
1972         (WebKit::Download::cancel):
1973         (WebKit::Download::didReceiveAuthenticationChallenge):
1974         (WebKit::Download::didReceiveData):
1975         (WebKit::Download::didFinish):
1976         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
1977         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
1978         * NetworkProcess/Downloads/Download.h:
1979         (WebKit::Download::Download):
1980         (WebKit::Download::suggestedName):
1981         (WebKit::Download::request):
1982         * NetworkProcess/Downloads/DownloadManager.cpp:
1983         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
1984         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
1985         * NetworkProcess/Downloads/DownloadManager.h:
1986         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
1987         (WebKit::Download::platformCancelNetworkLoad):
1988         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
1989         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1990         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
1991         using NetworkSession.
1992         * NetworkProcess/NetworkDataTask.cpp:
1993         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
1994         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
1995         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
1996         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
1997         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
1998         (WebKit::NetworkDataTaskBlob::clearStream):
1999         (WebKit::NetworkDataTaskBlob::resume):
2000         (WebKit::NetworkDataTaskBlob::suspend):
2001         (WebKit::NetworkDataTaskBlob::cancel):
2002         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
2003         (WebKit::NetworkDataTaskBlob::getSizeForNext):
2004         (WebKit::NetworkDataTaskBlob::didGetSize):
2005         (WebKit::NetworkDataTaskBlob::seek):
2006         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
2007         (WebKit::NetworkDataTaskBlob::read):
2008         (WebKit::NetworkDataTaskBlob::readData):
2009         (WebKit::NetworkDataTaskBlob::readFile):
2010         (WebKit::NetworkDataTaskBlob::didOpen):
2011         (WebKit::NetworkDataTaskBlob::didRead):
2012         (WebKit::NetworkDataTaskBlob::consumeData):
2013         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
2014         (WebKit::NetworkDataTaskBlob::suggestedFilename):
2015         (WebKit::NetworkDataTaskBlob::download):
2016         (WebKit::NetworkDataTaskBlob::writeDownload):
2017         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
2018         (WebKit::NetworkDataTaskBlob::didFailDownload):
2019         (WebKit::NetworkDataTaskBlob::didFinishDownload):
2020         (WebKit::NetworkDataTaskBlob::didFail):
2021         (WebKit::NetworkDataTaskBlob::didFinish):
2022         * NetworkProcess/NetworkDataTaskBlob.h: Added.
2023         * NetworkProcess/NetworkLoad.cpp:
2024         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
2025         (WebKit::NetworkLoad::~NetworkLoad):
2026         (WebKit::NetworkLoad::setDefersLoading):
2027         (WebKit::NetworkLoad::cancel):
2028         (WebKit::NetworkLoad::continueWillSendRequest):
2029         (WebKit::NetworkLoad::continueDidReceiveResponse):
2030         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2031         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
2032         * NetworkProcess/NetworkLoad.h:
2033         * NetworkProcess/NetworkSession.cpp:
2034         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
2035         * NetworkProcess/NetworkSession.h:
2036         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
2037         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
2038         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
2039         because in Cocoa all tasks are invalidated and canceled by the network session.
2040         * NetworkProcess/mac/NetworkLoadMac.mm:
2041         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2042         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2043         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
2044         (WebKit::NetworkDataTaskSoup::download):
2045         * NetworkProcess/soup/NetworkDataTaskSoup.h:
2046         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2047         * NetworkProcess/soup/NetworkSessionSoup.h:
2048         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
2049         * PlatformGTK.cmake: Ditto.
2050         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
2051
2052 2016-11-03  Simon Fraser  <simon.fraser@apple.com>
2053
2054         Give all the geometry classes a single-argument scale() function for consistency
2055         https://bugs.webkit.org/show_bug.cgi?id=164400
2056
2057         Reviewed by Zalan Bujtas.
2058         
2059         Use single-argument scale() functions.
2060
2061         * PluginProcess/PluginControllerProxy.cpp:
2062         (WebKit::PluginControllerProxy::paint):
2063         * Shared/mac/RemoteLayerBackingStore.mm:
2064         (WebKit::RemoteLayerBackingStore::drawInContext):
2065         * UIProcess/API/Cocoa/WKWebView.mm:
2066         (-[WKWebView _didCommitLayerTree:]):
2067         (-[WKWebView _takeViewSnapshot]):
2068         (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
2069         (-[WKWebView _scrollByContentOffset:]):
2070         (-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
2071         * UIProcess/ios/WKContentView.mm:
2072         (-[WKContentView _didCommitLayerTree:]):
2073         * UIProcess/ios/WKContentViewInteraction.mm:
2074         (-[WKContentView _updateTapHighlight]):
2075         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2076         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
2077         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
2078         * UIProcess/mac/ViewGestureControllerMac.mm:
2079         (WebKit::ViewGestureController::scaledMagnificationOrigin):
2080         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2081         (WebKit::InjectedBundleRangeHandle::renderedImage):
2082         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2083         (WebKit::NetscapePlugin::snapshot):
2084         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2085         (WebKit::PDFPlugin::scrollToPoint):
2086         * WebProcess/WebPage/WebFrame.cpp:
2087         (WebKit::WebFrame::createSelectionSnapshot):
2088         * WebProcess/WebPage/WebPage.cpp:
2089         (WebKit::WebPage::scalePageInViewCoordinates):
2090         (WebKit::WebPage::scaleView):
2091         (WebKit::WebPage::snapshotAtSize):
2092         (WebKit::WebPage::snapshotNode):
2093         (WebKit::WebPage::drawRectToImage):
2094         * WebProcess/WebPage/ios/WebPageIOS.mm:
2095         (WebKit::WebPage::restorePageState):
2096
2097 2016-11-03  Chris Dumez  <cdumez@apple.com>
2098
2099         [WK2][Cocoa] Implement user interface for HTML form validation
2100         https://bugs.webkit.org/show_bug.cgi?id=164143
2101         <rdar://problem/28944652>
2102
2103         Reviewed by Simon Fraser.
2104
2105         Implement the ValidationMessageClient in WebKit2 and have it display
2106         a ValidationBubble on Cocoa. ValidationBubble is implemented using
2107         native popovers on both Mac and iOS. As a result, Mac and iOS WK2
2108         now use native popover for HTML form validation instead of the old
2109         Shadow DOM based UI in WebCore.
2110
2111         The native popover shows at the bottom (or top) of the input and it
2112         disapears as soon as the user starts typing or interacts with the
2113         view (e.g. tap / scroll / zoom).
2114
2115         The feature is still disabled at runtime.
2116
2117         * UIProcess/API/Cocoa/WKWebView.mm:
2118         (-[WKWebView _initializeWithConfiguration:]):
2119         (-[WKWebView _keyboardWillShow:]):
2120         (-[WKWebView _keyboardDidShow:]):
2121         (-[WKWebView _contentsOfUserInterfaceItem:]):
2122         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2123         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
2124         * UIProcess/PageClient.h:
2125         * UIProcess/WebPageProxy.cpp:
2126         (WebKit::WebPageProxy::handleWheelEvent):
2127         (WebKit::WebPageProxy::setPageZoomFactor):
2128         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
2129         (WebKit::WebPageProxy::pageDidScroll):
2130         (WebKit::WebPageProxy::resetState):
2131         (WebKit::WebPageProxy::hideValidationMessage):
2132         * UIProcess/WebPageProxy.h:
2133         (WebKit::WebPageProxy::validationBubble):
2134         (WebKit::WebPageProxy::setIsKeyboardAnimatingIn):
2135         * UIProcess/WebPageProxy.messages.in:
2136         * UIProcess/ios/PageClientImplIOS.h:
2137         * UIProcess/ios/PageClientImplIOS.mm:
2138         (WebKit::PageClientImpl::createValidationBubble):
2139         * UIProcess/ios/WKContentViewInteraction.mm:
2140         (-[WKContentView _willStartScrollingOrZooming]):
2141         (-[WKContentView scrollViewWillStartPanOrPinchGesture]):
2142         (-[WKContentView _didEndScrollingOrZooming]):
2143         * UIProcess/ios/WebPageProxyIOS.mm:
2144         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2145         (WebKit::WebPageProxy::potentialTapAtPosition):
2146         (WebKit::WebPageProxy::showValidationMessage):
2147         (WebKit::WebPageProxy::setIsScrollingOrZooming):
2148         * UIProcess/mac/PageClientImpl.h:
2149         * UIProcess/mac/PageClientImpl.mm:
2150         (WebKit::PageClientImpl::createValidationBubble):
2151         * UIProcess/mac/WebPageProxyMac.mm:
2152         (WebKit::WebPageProxy::showValidationMessage):
2153         * WebKit2.xcodeproj/project.pbxproj:
2154         * WebProcess/WebCoreSupport/WebValidationMessageClient.cpp: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
2155         (WebKit::WebValidationMessageClient::WebValidationMessageClient):
2156         (WebKit::WebValidationMessageClient::~WebValidationMessageClient):
2157         (WebKit::WebValidationMessageClient::showValidationMessage):
2158         (WebKit::WebValidationMessageClient::hideValidationMessage):
2159         (WebKit::WebValidationMessageClient::isValidationMessageVisible):
2160         * WebProcess/WebCoreSupport/WebValidationMessageClient.h: Copied from Tools/DumpRenderTree/mac/UIScriptControllerMac.mm.
2161         * WebProcess/WebPage/WebPage.cpp:
2162         (WebKit::m_userInterfaceLayoutDirection):
2163
2164 2016-11-03  Tim Horton  <timothy_horton@apple.com>
2165
2166         Printing to PDF should produce internal links when HTML has internal links
2167         https://bugs.webkit.org/show_bug.cgi?id=112081
2168         <rdar://problem/5955705>
2169
2170         Reviewed by Simon Fraser.
2171
2172         * UIProcess/mac/WKPrintingView.h:
2173         * UIProcess/mac/WKPrintingView.mm:
2174         (linkDestinationName):
2175         (-[WKPrintingView _drawPDFDocument:page:atPoint:]):
2176         Propagate link-to-destination annotations (and each page's destinations)
2177         into the printed PDF.
2178         Generate a unique destination name based on the page and position, because
2179         we have lost the fragment name information.
2180
2181         (-[WKPrintingView drawRect:]):
2182         Compute all of the destinations for every page, so that we can add them
2183         to the context as we paint the pages (we need the page CTM in order to add them).
2184
2185 2016-11-03  Alex Christensen  <achristensen@webkit.org>
2186
2187         Unreviewed, rolling out r208298.
2188         https://bugs.webkit.org/show_bug.cgi?id=163939
2189
2190         caused asan crashes
2191
2192         Reverted changeset:
2193
2194         "NetworkSession: Add NetworkDataTask implementation for blobs"
2195         https://bugs.webkit.org/show_bug.cgi?id=163939
2196         http://trac.webkit.org/changeset/208298
2197
2198 2016-11-03  Ryan Haddad  <ryanhaddad@apple.com>
2199
2200         Unreviewed, rolling out r208330.
2201
2202         This change appears to have caused two editing tests to fail
2203         on macOS.
2204
2205         Reverted changeset:
2206
2207         "Reduce PassRefPtr use in WebKit2"
2208         https://bugs.webkit.org/show_bug.cgi?id=164360
2209         http://trac.webkit.org/changeset/208330
2210
2211 2016-11-03  Dan Bernstein  <mitz@apple.com>
2212
2213         WKWebView’s _observedRenderingProgressEvents not restored after web process crash
2214         https://bugs.webkit.org/show_bug.cgi?id=164368
2215         <rdar://problem/29091954>
2216
2217         Reviewed by Anders Carlsson.
2218
2219         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ObservedRenderingProgressEventsAfterCrash.mm.
2220
2221         * Shared/WebPageCreationParameters.cpp:
2222         (WebKit::WebPageCreationParameters::encode): Encode new observedLayoutMilestones member.
2223         (WebKit::WebPageCreationParameters::decode): Decode it.
2224         * Shared/WebPageCreationParameters.h: Declared new observedLayoutMilestones member variable.
2225
2226         * UIProcess/WebPageProxy.cpp:
2227         (WebKit::WebPageProxy::WebPageProxy): Removed initializer for
2228           m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
2229         (WebKit::WebPageProxy::listenForLayoutMilestones): Update new m_observedLayoutMilestones
2230           member variable. Don’t update m_wantsSessionRestorationRenderTreeSizeThresholdEvent.
2231         (WebKit::WebPageProxy::creationParameters): Set the observedLayoutMilestones member in the
2232           creation parameters.
2233
2234         * UIProcess/WebPageProxy.h: Declared new member variable, deleted
2235           m_wantsSessionRestorationRenderTreeSizeThresholdEvent declaration.
2236
2237         * UIProcess/ios/WebPageProxyIOS.mm:
2238         (WebKit::WebPageProxy::didCommitLayerTree): Rather than using
2239           m_wantsSessionRestorationRenderTreeSizeThresholdEvent, use m_observedLayoutMilestones.
2240
2241         * WebProcess/WebPage/WebPage.cpp:
2242         (WebKit::WebPage::WebPage): Add the observed layout milestones from the creation parameters.
2243
2244 2016-11-02  Alex Christensen  <achristensen@webkit.org>
2245
2246         Reduce PassRefPtr use in WebKit2
2247         https://bugs.webkit.org/show_bug.cgi?id=164360
2248
2249         Reviewed by Tim Horton.
2250
2251         * Shared/API/APISecurityOrigin.h:
2252         (API::SecurityOrigin::SecurityOrigin):
2253         * Shared/API/APISerializedScriptValue.h:
2254         (API::SerializedScriptValue::create):
2255         (API::SerializedScriptValue::SerializedScriptValue):
2256         * Shared/API/c/WKSharedAPICast.h:
2257         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
2258         (WebKit::toAPI):
2259         * Shared/APIWebArchive.h:
2260         * Shared/APIWebArchive.mm:
2261         (API::WebArchive::create):
2262         (API::WebArchive::WebArchive):
2263         * UIProcess/API/APIHitTestResult.cpp:
2264         (API::HitTestResult::create):
2265         * UIProcess/API/APIHitTestResult.h:
2266         * UIProcess/API/APIUIClient.h:
2267         (API::UIClient::createNewPage):
2268         * UIProcess/API/C/WKPage.cpp:
2269         (WebKit::RunBeforeUnloadConfirmPanelResultListener::create):
2270         (WebKit::RunBeforeUnloadConfirmPanelResultListener::RunBeforeUnloadConfirmPanelResultListener):
2271         (WebKit::RunJavaScriptAlertResultListener::create):
2272         (WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
2273         (WebKit::RunJavaScriptConfirmResultListener::create):
2274         (WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
2275         (WebKit::RunJavaScriptPromptResultListener::create):
2276         (WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
2277         (WKPageSetPageUIClient):
2278         * UIProcess/API/Cocoa/WKWebView.mm:
2279         (-[WKWebView _takeViewSnapshot]):
2280         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2281         * UIProcess/Cocoa/UIDelegate.h:
2282         * UIProcess/Cocoa/UIDelegate.mm:
2283         (WebKit::UIDelegate::UIClient::createNewPage):
2284         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2285         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
2286         * UIProcess/mac/WKImmediateActionController.mm:
2287         (-[WKImmediateActionController _webHitTestResult]):
2288         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2289         (contextMenuItems):
2290         (WKBundlePageCopyContextMenuItems):
2291         (WKBundlePageCopyContextMenuAtPointInWindow):
2292         * WebProcess/UserContent/WebUserContentController.cpp:
2293         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
2294         * WebProcess/WebPage/WebUndoStep.cpp:
2295         (WebKit::WebUndoStep::create):
2296         * WebProcess/WebPage/WebUndoStep.h:
2297         (WebKit::WebUndoStep::WebUndoStep):
2298
2299 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
2300
2301         Remove PageThrottler & all related code
2302         https://bugs.webkit.org/show_bug.cgi?id=164302
2303
2304         Reviewed by Ryosuke Niwa.
2305
2306         All relevant information now available from the ActivityState.
2307
2308         * PluginProcess/PluginProcess.cpp:
2309         (WebKit::PluginProcess::PluginProcess):
2310         (WebKit::PluginProcess::createWebProcessConnection):
2311         (WebKit::PluginProcess::audioHardwareDidBecomeActive): Deleted.
2312         (WebKit::PluginProcess::audioHardwareDidBecomeInactive): Deleted.
2313         * PluginProcess/PluginProcess.h:
2314         (): Deleted.
2315         * PluginProcess/WebProcessConnection.cpp:
2316         (WebKit::WebProcessConnection::audioHardwareDidBecomeActive): Deleted.
2317         (WebKit::WebProcessConnection::audioHardwareDidBecomeInactive): Deleted.
2318         * PluginProcess/WebProcessConnection.h:
2319         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2320         (WebKit::NPRuntimeObjectMap::evaluate):
2321         * WebProcess/Plugins/Plugin.h:
2322         (WebKit::Plugin::audioHardwareActivity): Deleted.
2323         * WebProcess/Plugins/PluginProcessConnection.cpp:
2324         (WebKit::PluginProcessConnection::PluginProcessConnection):
2325         (WebKit::PluginProcessConnection::didReceiveMessage):
2326         (WebKit::PluginProcessConnection::audioHardwareDidBecomeActive): Deleted.
2327         (WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive): Deleted.
2328         * WebProcess/Plugins/PluginProcessConnection.h:
2329         (WebKit::PluginProcessConnection::supportsAsynchronousPluginInitialization):
2330         (WebKit::PluginProcessConnection::audioHardwareActivity): Deleted.
2331         * WebProcess/Plugins/PluginProcessConnection.messages.in:
2332         * WebProcess/Plugins/PluginProxy.cpp:
2333         (WebKit::PluginProxy::audioHardwareActivity): Deleted.
2334         * WebProcess/Plugins/PluginProxy.h:
2335         * WebProcess/Plugins/PluginView.cpp:
2336         (WebKit::PluginView::audioHardwareActivity): Deleted.
2337         * WebProcess/Plugins/PluginView.h:
2338         * WebProcess/WebPage/WebPage.cpp:
2339
2340 2016-11-03  Dan Bernstein  <mitz@apple.com>
2341
2342         REGRESSION (r206247): Painting milestones can be delayed until the next layer flush
2343         https://bugs.webkit.org/show_bug.cgi?id=164340
2344         <rdar://problem/29074344>
2345
2346         Reviewed by Tim Horton.
2347
2348         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Declared new helper function.
2349         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2350         (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Helper
2351           function that sends the message to the UI process and resets
2352           m_pendingNewlyReachedLayoutMilestones.
2353         (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Wait until after the commit to get the
2354           pending milestones and send them to the UI process. This way we don’t miss milestones that
2355           fire during the commit.
2356
2357 2016-11-02  David Kilzer  <ddkilzer@apple.com>
2358
2359         Bug 164333: Add logging for "WebKit encountered an internal error" messages due to Network process crashes
2360         <https://webkit.org/b/164333>
2361         <rdar://problem/29072727>
2362
2363         Reviewed by Alex Christensen.
2364
2365         * WebProcess/WebProcess.cpp:
2366         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
2367         Add private method to log diagnostic message.
2368         (WebKit::WebProcess::networkProcessConnectionClosed):
2369         Call logDiagnosticMessageForNetworkProcessCrash().
2370         * WebProcess/WebProcess.h:
2371         (WebKit::WebProcess::logDiagnosticMessageForNetworkProcessCrash):
2372         Declare new method.
2373
2374 2016-11-02  Alex Christensen  <achristensen@webkit.org>
2375
2376         Remove Battery Status API from the tree
2377         https://bugs.webkit.org/show_bug.cgi?id=164213
2378
2379         Reviewed by Sam Weinig.
2380
2381         * CMakeLists.txt:
2382         * PlatformEfl.cmake:
2383         * Shared/API/APIObject.h:
2384         * Shared/API/c/WKBase.h:
2385         * Shared/WebBatteryStatus.cpp: Removed.
2386         * Shared/WebBatteryStatus.h: Removed.
2387         * UIProcess/API/C/WKAPICast.h:
2388         * UIProcess/API/C/WKBatteryManager.cpp: Removed.
2389         * UIProcess/API/C/WKBatteryManager.h: Removed.
2390         * UIProcess/API/C/WKBatteryStatus.cpp: Removed.
2391         * UIProcess/API/C/WKBatteryStatus.h: Removed.
2392         * UIProcess/API/C/WKContext.cpp:
2393         (WKContextGetBatteryManager): Deleted.
2394         * UIProcess/API/C/WKContext.h:
2395         * UIProcess/API/efl/ewk_context.cpp:
2396         (EwkContext::EwkContext):
2397         * UIProcess/API/efl/ewk_context_private.h:
2398         * UIProcess/API/efl/ewk_main.cpp:
2399         (WebKit::EwkMain::initialize):
2400         (WebKit::EwkMain::finalize):
2401         (WebKit::EwkMain::shutdownInitializedEFLModules):
2402         * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Removed.
2403         * UIProcess/API/gtk/WebKitBatteryProvider.h: Removed.
2404         * UIProcess/API/gtk/WebKitWebContext.cpp:
2405         (webkitWebContextConstructed):
2406         * UIProcess/WebBatteryManagerProxy.cpp: Removed.
2407         * UIProcess/WebBatteryManagerProxy.h: Removed.
2408         * UIProcess/WebBatteryManagerProxy.messages.in: Removed.
2409         * UIProcess/WebBatteryProvider.cpp: Removed.
2410         * UIProcess/WebBatteryProvider.h: Removed.
2411         * UIProcess/WebProcessPool.cpp:
2412         (WebKit::m_hiddenPageThrottlingTimer):
2413         * UIProcess/efl/BatteryProvider.cpp: Removed.
2414         * UIProcess/efl/BatteryProvider.h: Removed.
2415         * WebProcess/Battery: Removed.
2416         * WebProcess/Battery/WebBatteryManager.cpp: Removed.
2417         * WebProcess/Battery/WebBatteryManager.h: Removed.
2418         * WebProcess/Battery/WebBatteryManager.messages.in: Removed.
2419         * WebProcess/WebCoreSupport/WebBatteryClient.cpp: Removed.
2420         * WebProcess/WebCoreSupport/WebBatteryClient.h: Removed.
2421         * WebProcess/WebPage/WebPage.cpp:
2422         (WebKit::m_userInterfaceLayoutDirection):
2423         * WebProcess/WebProcess.cpp:
2424         (WebKit::m_resourceLoadStatisticsStorage):
2425
2426 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2427
2428         NetworkSession: Add NetworkDataTask implementation for blobs
2429         https://bugs.webkit.org/show_bug.cgi?id=163939
2430
2431         Reviewed by Alex Christensen.
2432
2433         Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
2434         adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
2435         is enabled.
2436
2437         * CMakeLists.txt: Add new files to compilation.
2438         * NetworkProcess/Downloads/BlobDownloadClient.cpp:
2439         * NetworkProcess/Downloads/BlobDownloadClient.h:
2440         * NetworkProcess/Downloads/Download.cpp:
2441         (WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
2442         definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
2443         reveices a NetworkDataTask and is used by Soup backend and blobs.
2444         (WebKit::Download::~Download):
2445         (WebKit::Download::start):
2446         (WebKit::Download::startWithHandle):
2447         (WebKit::Download::cancel):
2448         (WebKit::Download::didReceiveAuthenticationChallenge):
2449         (WebKit::Download::didReceiveData):
2450         (WebKit::Download::didFinish):
2451         (WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
2452         this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.
2453         * NetworkProcess/Downloads/Download.h:
2454         (WebKit::Download::Download):
2455         (WebKit::Download::suggestedName):
2456         (WebKit::Download::request):
2457         * NetworkProcess/Downloads/DownloadManager.cpp:
2458         (WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
2459         (WebKit::DownloadManager::continueDecidePendingDownloadDestination):
2460         * NetworkProcess/Downloads/DownloadManager.h:
2461         * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
2462         (WebKit::Download::platformCancelNetworkLoad):
2463         * NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
2464         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2465         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
2466         using NetworkSession.
2467         * NetworkProcess/NetworkDataTask.cpp:
2468         (WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.
2469         * NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
2470         * NetworkProcess/NetworkDataTaskBlob.cpp: Added.
2471         (WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
2472         (WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
2473         (WebKit::NetworkDataTaskBlob::clearStream):
2474         (WebKit::NetworkDataTaskBlob::resume):
2475         (WebKit::NetworkDataTaskBlob::suspend):
2476         (WebKit::NetworkDataTaskBlob::cancel):
2477         (WebKit::NetworkDataTaskBlob::invalidateAndCancel):
2478         (WebKit::NetworkDataTaskBlob::getSizeForNext):
2479         (WebKit::NetworkDataTaskBlob::didGetSize):
2480         (WebKit::NetworkDataTaskBlob::seek):
2481         (WebKit::NetworkDataTaskBlob::didReceiveResponse):
2482         (WebKit::NetworkDataTaskBlob::read):
2483         (WebKit::NetworkDataTaskBlob::readData):
2484         (WebKit::NetworkDataTaskBlob::readFile):
2485         (WebKit::NetworkDataTaskBlob::didOpen):
2486         (WebKit::NetworkDataTaskBlob::didRead):
2487         (WebKit::NetworkDataTaskBlob::consumeData):
2488         (WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
2489         (WebKit::NetworkDataTaskBlob::suggestedFilename):
2490         (WebKit::NetworkDataTaskBlob::download):
2491         (WebKit::NetworkDataTaskBlob::writeDownload):
2492         (WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
2493         (WebKit::NetworkDataTaskBlob::didFailDownload):
2494         (WebKit::NetworkDataTaskBlob::didFinishDownload):
2495         (WebKit::NetworkDataTaskBlob::didFail):
2496         (WebKit::NetworkDataTaskBlob::didFinish):
2497         * NetworkProcess/NetworkDataTaskBlob.h: Added.
2498         * NetworkProcess/NetworkLoad.cpp:
2499         (WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
2500         (WebKit::NetworkLoad::~NetworkLoad):
2501         (WebKit::NetworkLoad::setDefersLoading):
2502         (WebKit::NetworkLoad::cancel):
2503         (WebKit::NetworkLoad::continueWillSendRequest):
2504         (WebKit::NetworkLoad::continueDidReceiveResponse):
2505         (WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
2506         (WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
2507         * NetworkProcess/NetworkLoad.h:
2508         * NetworkProcess/NetworkSession.cpp:
2509         (WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.
2510         * NetworkProcess/NetworkSession.h:
2511         (WebKit::NetworkSession::registerNetworkDataTask): Ditto.
2512         (WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.
2513         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing
2514         because in Cocoa all tasks are invalidated and canceled by the network session.
2515         * NetworkProcess/mac/NetworkLoadMac.mm:
2516         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2517         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
2518         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
2519         (WebKit::NetworkDataTaskSoup::download):
2520         * NetworkProcess/soup/NetworkDataTaskSoup.h:
2521         * NetworkProcess/soup/NetworkSessionSoup.cpp:
2522         * NetworkProcess/soup/NetworkSessionSoup.h:
2523         * PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
2524         * PlatformGTK.cmake: Ditto.
2525         * WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
2526
2527 2016-11-02  Andy Estes  <aestes@apple.com>
2528
2529         REGRESSION (r199558): File paths selected for upload are stored using the wrong string encoding
2530         https://bugs.webkit.org/show_bug.cgi?id=164311
2531         <rdar://problem/26995374>
2532
2533         Reviewed by Tim Horton.
2534
2535         -[NSURL fileSystemRepresentation] returns a char* in file system representation, which on
2536         iOS is UTF-8, but we were implicitly converting it to a String, which assumes a char* is
2537         Latin-1 encoded.
2538
2539         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2540         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Changed to use fromUTF8() to
2541         convert fileURL.fileSystemRepresentation to a String.
2542
2543 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2544
2545         NetworkSession: Network process crash when converting main resource to download
2546         https://bugs.webkit.org/show_bug.cgi?id=164220
2547
2548         Reviewed by Alex Christensen.
2549
2550         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
2551         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
2552         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
2553         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
2554         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
2555         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
2556         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
2557         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
2558         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
2559         created yet. That's not expected to happen and when the response completion handler is called in the
2560         NetworkDataTask it tries to use either the client or the download and it crashes.
2561
2562         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2563         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Update ASSERT, because abort doesn't cleanup the
2564         resource loader in case it's becoming a download.
2565         * NetworkProcess/NetworkResourceLoader.cpp:
2566         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
2567         (WebKit::NetworkResourceLoader::isBecomingDownload): Helper method to check if the resource load was converted to a
2568         download, but didBecomeDownload() hasn't been called yet.
2569         (WebKit::NetworkResourceLoader::abort): If the resource load is becoming a download do not call cleanup()
2570         because it will be called by didBecomeDownload() later.
2571         * NetworkProcess/NetworkResourceLoader.h:
2572
2573 2016-11-02  David Kilzer  <ddkilzer@apple.com>
2574
2575         Add logging for "WebKit encountered an internal error" messages
2576         <https://webkit.org/b/164272>
2577         <rdar://problem/28546064>
2578
2579         Reviewed by Alex Christensen.
2580
2581         * NetworkProcess/NetworkResourceLoader.cpp:
2582         (WebKit::NetworkResourceLoader::startNetworkLoad):
2583         * WebProcess/Network/WebLoaderStrategy.cpp:
2584         (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2585         * WebProcess/Network/WebResourceLoader.cpp:
2586         (WebKit::WebResourceLoader::didReceiveResource):
2587         - Add logging for various internalError() events.
2588
2589 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2590
2591         [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
2592         https://bugs.webkit.org/show_bug.cgi?id=164303
2593
2594         Reviewed by Michael Catanzaro.
2595
2596         This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
2597         BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
2598
2599         * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
2600         (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
2601         (WebKit::AcceleratedBackingStoreX11::update):
2602
2603 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2604
2605         [GTK] Remove FileSystem::filenameToString() and use FileSystem::stringFromFileSystemRepresentation() everywhere instead
2606         https://bugs.webkit.org/show_bug.cgi?id=164315
2607
2608         Reviewed by Michael Catanzaro.
2609
2610         * Shared/gtk/ProcessExecutablePathGtk.cpp:
2611         (WebKit::getExecutablePath):
2612         (WebKit::findWebKitProcess):
2613         * UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp:
2614         (API::WebsiteDataStore::defaultNetworkCacheDirectory):
2615         (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
2616         (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
2617         * UIProcess/API/gtk/WebKitWebContext.cpp:
2618         (webkitWebContextConstructed):
2619         (webkit_web_context_set_favicon_database_directory):
2620         (webkit_web_context_set_additional_plugins_directory):
2621         (webkit_web_context_set_disk_cache_directory):
2622         * UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:
2623         (webkitWebsiteDataManagerGetDataStore):
2624         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2625         (WebKit::PluginInfoCache::PluginInfoCache):
2626         * UIProcess/gtk/WebProcessPoolGtk.cpp:
2627         (WebKit::WebProcessPool::platformDefaultIconDatabasePath):
2628         * WebProcess/gtk/WebGtkExtensionManager.cpp:
2629         (WebKit::parseUserData):
2630
2631 2016-11-02  Romain Bellessort  <romain.bellessort@crf.canon.fr>
2632
2633         [Readable Streams API] Enable creation of ReadableByteStreamController
2634         https://bugs.webkit.org/show_bug.cgi?id=164014
2635
2636         Reviewed by Youenn Fablet.
2637
2638         Added flag for the byte stream part of Readable Streams API.
2639
2640         * Configurations/FeatureDefines.xcconfig:
2641
2642 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2643
2644         PluginInfoStore::loadPluginsIfNecessary can still load plugins multiple times
2645         https://bugs.webkit.org/show_bug.cgi?id=164103
2646
2647         Reviewed by Michael Catanzaro.
2648
2649         Follow symlinks when scanning plugins to avoid duplicates.
2650
2651         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache version to ensure duplicated plugins are removed
2652         from the cache.
2653         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
2654         (WebKit::PluginInfoStore::pluginPathsInDirectory): Use realpath() to always return the actual file path.
2655
2656 2016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2657
2658         [GTK] Plugin process crash in WebKit::NetscapePluginX11::visibilityDidChange with evince browser plugin
2659         https://bugs.webkit.org/show_bug.cgi?id=164204
2660
2661         Reviewed by Michael Catanzaro.
2662
2663         Check the platform plugin widget is embedded before trying to get its socket window.
2664
2665         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2666         (WebKit::NetscapePluginX11::geometryDidChange):
2667         (WebKit::NetscapePluginX11::visibilityDidChange):
2668
2669 2016-11-01  Wenson Hsieh  <wenson_hsieh@apple.com>
2670
2671         Turn the Input Events runtime flag on by default
2672         https://bugs.webkit.org/show_bug.cgi?id=164297
2673
2674         Reviewed by Ryosuke Niwa.
2675
2676         * Shared/WebPreferencesDefinitions.h:
2677
2678 2016-11-01  Jaehun Lim  <ljaehun.lim@samsung.com>
2679
2680         Unreviewed, EFL build fix after r208225
2681
2682         Rename ViewState to ActivityState
2683
2684         * UIProcess/efl/WebView.cpp:
2685         (WebKit::WebView::setActive):
2686         (WebKit::WebView::setFocused):
2687         (WebKit::WebView::setVisible):
2688
2689 2016-11-01  Alex Christensen  <achristensen@webkit.org>
2690
2691         Fix CMake build.
2692
2693         * PlatformMac.cmake:
2694
2695 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
2696
2697         Remove CUSTOM_ELEMENTS build flag
2698         https://bugs.webkit.org/show_bug.cgi?id=164267
2699
2700         Reviewed by Antti Koivisto.
2701
2702         Removed the build flag.
2703
2704         * Configurations/FeatureDefines.xcconfig:
2705         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2706         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2707         * WebProcess/WebPage/WebPage.cpp:
2708         (WebKit::WebPage::updatePreferences):
2709
2710 2016-11-01  Eric Carlson  <eric.carlson@apple.com>
2711
2712         [MediaStream] restrict media capture secure connections
2713         https://bugs.webkit.org/show_bug.cgi?id=164234
2714         <rdar://problem/28944906>
2715
2716         Reviewed by Alex Christensen.
2717
2718         * Shared/WebPreferencesDefinitions.h:
2719    
2720         * UIProcess/API/C/WKPreferences.cpp:
2721         (WKPreferencesSetMediaCaptureRequiresSecureConnection):
2722         (WKPreferencesGetMediaCaptureRequiresSecureConnection):
2723         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2724    
2725         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
2726         (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Drive by
2727          fix: remove some unused parameters in a lambda call.
2728
2729         * WebProcess/WebPage/WebPage.cpp:
2730         (WebKit::WebPage::updatePreferences):
2731
2732 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
2733
2734         Add IsAudible, IsLoading to ActivityState
2735         https://bugs.webkit.org/show_bug.cgi?id=164286
2736
2737         Reviewed by Geoff Garen.
2738
2739         By computing these values in the UIProcess and passing them to WebContent we can
2740         more closely unify iOS & macOS throttling, and remove the PageThrottler class.
2741
2742         * UIProcess/WebPageProxy.cpp:
2743         (WebKit::WebPageProxy::updateActivityState):
2744             - Added update for IsAudible, IsLoading flags.
2745         (WebKit::WebPageProxy::updateThrottleState):
2746             - Read IsAudible, IsLoading flags from ActivityState.
2747         (WebKit::WebPageProxy::setMuted):
2748             - call activityStateDidChange to trigger update.
2749         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2750             - call activityStateDidChange to trigger update.
2751         * UIProcess/WebPageProxy.h:
2752         (WebKit::WebPageProxy::isLoadingChanged):
2753             - call activityStateDidChange to trigger update.
2754
2755 2016-10-31  Gavin Barraclough  <barraclough@apple.com>
2756
2757         Rename ViewState to ActivityState
2758         https://bugs.webkit.org/show_bug.cgi?id=164254
2759
2760         Reviewed by Andreas Kling.
2761
2762         We plan to add a couple more flags to ViewState that aren't directly related to the view
2763         itself - whether there is an ongoing page load, and whether whether there is audio playback.
2764         This will allow viewState (now activityState) to fully drive throttling decisions.
2765
2766         Renaming this bitfield accordingly.
2767
2768         * Shared/WebPageCreationParameters.cpp:
2769         (WebKit::WebPageCreationParameters::encode):
2770         (WebKit::WebPageCreationParameters::decode):
2771         * Shared/WebPageCreationParameters.h:
2772         * UIProcess/API/Cocoa/WKWebView.mm:
2773         (-[WKWebView didMoveToWindow]):
2774         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2775         (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
2776         (_WebKitWebViewBasePrivate::updateActivityStateTimerFired):
2777         (webkitWebViewBaseScheduleUpdateActivityState):
2778         (toplevelWindowFocusInEvent):
2779         (toplevelWindowFocusOutEvent):
2780         (toplevelWindowStateEvent):
2781         (webkitWebViewBaseSetToplevelOnScreenWindow):
2782         (webkitWebViewBaseMap):
2783         (webkitWebViewBaseUnmap):
2784         (webkitWebViewBaseSetFocus):
2785         (webkitWebViewBaseIsInWindowActive):
2786         (webkitWebViewBaseIsFocused):
2787         (webkitWebViewBaseIsVisible):
2788         (webkitWebViewBaseIsInWindow):
2789         (_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
2790         (webkitWebViewBaseScheduleUpdateViewState): Deleted.
2791         * UIProcess/Cocoa/WebViewImpl.mm:
2792         (WebKit::WebViewImpl::becomeFirstResponder):
2793         (WebKit::WebViewImpl::resignFirstResponder):
2794         (WebKit::WebViewImpl::windowDidOrderOffScreen):
2795         (WebKit::WebViewImpl::windowDidOrderOnScreen):
2796         (WebKit::WebViewImpl::windowDidBecomeKey):
2797         (WebKit::WebViewImpl::windowDidResignKey):
2798         (WebKit::WebViewImpl::windowDidMiniaturize):
2799         (WebKit::WebViewImpl::windowDidDeminiaturize):
2800         (WebKit::WebViewImpl::windowDidChangeOcclusionState):
2801         (WebKit::WebViewImpl::viewDidMoveToWindow):
2802         (WebKit::WebViewImpl::viewDidHide):
2803         (WebKit::WebViewImpl::viewDidUnhide):
2804         (WebKit::WebViewImpl::activeSpaceDidChange):
2805         (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
2806         (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
2807         (WebKit::WebViewImpl::prepareForMoveToWindow):
2808         * UIProcess/DrawingAreaProxy.h:
2809         (WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):
2810         (WebKit::DrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2811         * UIProcess/WebPageProxy.cpp:
2812         (WebKit::WebPageProxy::WebPageProxy):
2813         (WebKit::WebPageProxy::reattachToWebProcess):
2814         (WebKit::WebPageProxy::setSuppressVisibilityUpdates):
2815         (WebKit::WebPageProxy::updateActivityState):
2816         (WebKit::WebPageProxy::activityStateDidChange):
2817         (WebKit::WebPageProxy::dispatchActivityStateChange):
2818         (WebKit::WebPageProxy::updateThrottleState):
2819         (WebKit::WebPageProxy::waitForDidUpdateActivityState):
2820         (WebKit::WebPageProxy::creationParameters):
2821         (WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
2822         (WebKit::WebPageProxy::updateViewState): Deleted.
2823         (WebKit::WebPageProxy::viewStateDidChange): Deleted.
2824         (WebKit::WebPageProxy::dispatchViewStateChange): Deleted.
2825         (WebKit::WebPageProxy::waitForDidUpdateViewState): Deleted.
2826         (WebKit::WebPageProxy::installViewStateChangeCompletionHandler): Deleted.
2827         * UIProcess/WebPageProxy.h:
2828         (WebKit::WebPageProxy::isInWindow):
2829         (WebKit::WebPageProxy::didUpdateActivityState):
2830         (WebKit::WebPageProxy::isViewVisible):
2831         (WebKit::WebPageProxy::didUpdateViewState): Deleted.
2832         * UIProcess/WebPageProxy.messages.in:
2833         * UIProcess/WebProcessProxy.cpp:
2834         (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
2835         * UIProcess/efl/WebView.cpp:
2836         * UIProcess/ios/WKContentView.mm:
2837         (-[WKContentView _applicationDidEnterBackground]):
2838         (-[WKContentView _applicationWillEnterForeground]):
2839         * UIProcess/ios/WKPDFView.mm:
2840         (-[WKPDFView _applicationDidEnterBackground]):
2841         (-[WKPDFView _applicationWillEnterForeground]):
2842         * UIProcess/ios/WebPageProxyIOS.mm:
2843         (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
2844         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2845         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2846         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2847         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
2848         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2849         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2850         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2851         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
2852         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
2853         * WebProcess/Plugins/PluginView.cpp:
2854         (WebKit::PluginView::activityStateDidChange):
2855         (WebKit::PluginView::viewStateDidChange): Deleted.
2856         * WebProcess/Plugins/PluginView.h:
2857         * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
2858         (WebKit::AcceleratedDrawingArea::activityStateDidChange):
2859         (WebKit::AcceleratedDrawingArea::viewStateDidChange): Deleted.
2860         * WebProcess/WebPage/AcceleratedDrawingArea.h:
2861         * WebProcess/WebPage/DrawingArea.h:
2862         (WebKit::DrawingArea::activityStateDidChange):
2863         (WebKit::DrawingArea::viewStateDidChange): Deleted.
2864         * WebProcess/WebPage/WebPage.cpp:
2865         (WebKit::m_userInterfaceLayoutDirection):
2866         (WebKit::WebPage::reinitializeWebPage):
2867         (WebKit::WebPage::updateIsInWindow):
2868         (WebKit::WebPage::setActivityState):
2869         (WebKit::WebPage::setViewState): Deleted.
2870         * WebProcess/WebPage/WebPage.h:
2871         (WebKit::WebPage::isVisible):
2872         (WebKit::WebPage::isVisibleOrOccluded):
2873         * WebProcess/WebPage/WebPage.messages.in:
2874         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2875         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2876         (WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
2877         (WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange): Deleted.
2878         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2879         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2880         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2881         (WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
2882         (WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
2883         (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange): Deleted.
2884         (WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired): Deleted.
2885
2886 2016-10-31  Jaehun Lim  <ljaehun.lim@samsung.com>
2887
2888         Unreviewed, CMake build fix
2889
2890         Adds #include <WebCore/IDBGetAllRecordsData.h>
2891
2892         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2893
2894 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
2895
2896         Add basic visual/layout viewport support for fixed position layout
2897         https://bugs.webkit.org/show_bug.cgi?id=164261
2898
2899         Reviewed by Dean Jackson.
2900
2901         Don't make visualViewportEnabled an experimental feature, because I don't want it enabled
2902         by default in WebKitTestRunner (and therefore mismatching DumpRenderTree).
2903
2904         * Shared/WebPreferencesDefinitions.h:
2905
2906 2016-10-29  Filip Pizlo  <fpizlo@apple.com>
2907
2908         JSC should support SharedArrayBuffer
2909         https://bugs.webkit.org/show_bug.cgi?id=163986
2910
2911         Reviewed by Keith Miller.
2912         
2913         Adds some small things we need for SharedArrayBuffer.
2914
2915         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2916         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2917         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2918         (WebKit::InjectedBundle::createWebDataFromUint8Array):
2919
2920 2016-10-31  Brady Eidson  <beidson@apple.com>
2921
2922         IndexedDB 2.0: Support IDBObjectStore getAll/getAllKeys.
2923         <rdar://problem/28806934> and https://bugs.webkit.org/show_bug.cgi?id=164097
2924
2925         Reviewed by Darin Adler.
2926
2927         - Handle moving "Get All" requests to and from the DatabaseProcess.
2928         - Handle the additional task of creating/passing Sandbox Extensions for
2929           referenced files when necessary. 
2930           
2931         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
2932         (WebKit::WebIDBConnectionToClient::handleGetResult):
2933         (WebKit::WebIDBConnectionToClient::didGetAllRecords):
2934         (WebKit::WebIDBConnectionToClient::getAllRecords):
2935         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
2936         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
2937         
2938         * Shared/WebCoreArgumentCoders.h:
2939         
2940         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2941         (WebKit::WebIDBConnectionToServer::getAllRecords):
2942         (WebKit::preregisterSandboxExtensionsIfNecessary):
2943         (WebKit::WebIDBConnectionToServer::didGetAllRecords):
2944         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2945         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
2946
2947 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
2948
2949         [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
2950         https://bugs.webkit.org/show_bug.cgi?id=164236
2951         <rdar://problem/28747712>
2952
2953         Reviewed by Beth Dakin.
2954
2955         See WebCore ChangeLog for more detail. Removes m_isGettingDictionaryPopupInfo from the WebPage in favor of
2956         keeping track of the same state in Editor, so that both the WK1 and WK2 cases can share the same codepath.
2957
2958         * WebProcess/WebPage/WebPage.cpp:
2959         (WebKit::WebPage::didChangeSelection):
2960         * WebProcess/WebPage/WebPage.h:
2961         * WebProcess/WebPage/mac/WebPageMac.mm:
2962         (WebKit::WebPage::dictionaryPopupInfoForRange):
2963
2964 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
2965
2966         Implement IntersectionObserver
2967         https://bugs.webkit.org/show_bug.cgi?id=159475
2968
2969         Reviewed by Ryosuke Niwa.
2970
2971         Add ENABLE_INTERSECTION_OBSERVER, enabled by default.
2972
2973         * Configurations/FeatureDefines.xcconfig:
2974
2975 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
2976
2977         Unreviewed, rolling out r208154.
2978
2979         This change caused an assertion failure during API tests on
2980         macOS.
2981
2982         Reverted changeset:
2983
2984         "NetworkSession: Network process crash when converting main
2985         resource to download"
2986         https://bugs.webkit.org/show_bug.cgi?id=164220
2987         http://trac.webkit.org/changeset/208154
2988
2989 2016-10-28  Brent Fulgham  <bfulgham@apple.com>
2990
2991         Do a better job of protecting Frame objects in the context of JavaScript calls
2992         https://bugs.webkit.org/show_bug.cgi?id=164163
2993         <rdar://problem/28955249>
2994
2995         Reviewed by Darin Adler.
2996
2997         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2998         (WebKit::InjectedBundleRangeHandle::renderedImage): Protected the Frame.
2999         * WebProcess/WebPage/WebPage.cpp:
3000         (WebKit::WebPage::insertTextAsync): Ditto.
3001         (WebKit::WebPage::setComposition): Ditto.
3002         * WebProcess/WebPage/mac/WebPageMac.mm:
3003         (WebKit::WebPage::insertDictatedTextAsync): Ditto.
3004
3005 2016-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
3006
3007         NetworkSession: Network process crash when converting main resource to download
3008         https://bugs.webkit.org/show_bug.cgi?id=164220
3009
3010         Reviewed by Alex Christensen.
3011
3012         Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
3013         sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
3014         NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
3015         download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
3016         NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
3017         having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
3018         load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
3019         NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
3020         client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
3021         created yet. That's not expected to happen and when the response completion handler is called in the
3022         NetworkDataTask it tries to use either the client or the download and it crashes.
3023
3024         * NetworkProcess/NetworkResourceLoader.cpp:
3025         (WebKit::NetworkResourceLoader::didBecomeDownload): Call cleanup() instead of just deleting the network load.
3026         (WebKit::NetworkResourceLoader::abort): If we still have a network load that was converted to a download, do not
3027         call cleanup() because it will be called by didBecomeDownload() later.
3028
3029 2016-10-31  Darin Adler  <darin@apple.com>
3030
3031         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
3032         https://bugs.webkit.org/show_bug.cgi?id=164214
3033
3034         Reviewed by Alex Christensen.
3035
3036         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3037         (webkit_dom_document_query_selector): Updated exception handling.
3038         (webkit_dom_document_query_selector_all): Ditto.
3039         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
3040         (webkit_dom_document_fragment_query_selector): Ditto.
3041         (webkit_dom_document_fragment_query_selector_all): Ditto.
3042         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3043         (webkit_dom_element_query_selector): Ditto.
3044         (webkit_dom_element_query_selector_all): Ditto.
3045
3046 2016-10-31  Darin Adler  <darin@apple.com>
3047
3048         Convert Document from ExceptionCode to Exception
3049         https://bugs.webkit.org/show_bug.cgi?id=164212
3050
3051         Reviewed by Alex Christensen.
3052
3053         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
3054         (webkit_dom_document_create_element): Updated exception handling.
3055         (webkit_dom_document_create_cdata_section): Ditto.
3056         (webkit_dom_document_create_processing_instruction): Ditto.
3057         (webkit_dom_document_create_attribute): Ditto.
3058         (webkit_dom_document_import_node): Ditto.
3059         (webkit_dom_document_create_element_ns): Ditto.
3060         (webkit_dom_document_create_attribute_ns): Ditto.
3061         (webkit_dom_document_adopt_node): Ditto.
3062         (webkit_dom_document_create_event): Ditto.
3063         (webkit_dom_document_set_xml_version): Ditto.
3064         (webkit_dom_document_get_cookie): Ditto.
3065         (webkit_dom_document_set_cookie): Ditto.
3066         (webkit_dom_document_set_body): Ditto.
3067         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
3068         (-[WKDOMDocument createElement:]): Ditto.
3069
3070 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
3071
3072         Holding down a key to choose an accented character should fire "insertReplacementText" input events
3073         https://bugs.webkit.org/show_bug.cgi?id=164209
3074         <rdar://problem/29019305>
3075
3076         Reviewed by Darin Adler.
3077
3078         When replacing text, call Editor::insertText with the correct TextEventInputType so that WebCore will know to
3079         use EditActionInsertReplacement when creating and applying the corresponding TypingCommand. Additional minor
3080         changes in order to support testing replacement text insertion.
3081
3082         * UIProcess/API/Cocoa/WKWebView.mm:
3083         (-[WKWebView _insertText:replacementRange:]):
3084         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3085         * WebProcess/WebPage/WebPage.cpp:
3086         (WebKit::WebPage::insertTextAsync):
3087
3088 2016-10-30  Darin Adler  <darin@apple.com>
3089
3090         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
3091         https://bugs.webkit.org/show_bug.cgi?id=164206
3092
3093         Reviewed by Chris Dumez.
3094
3095         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
3096         (webkit_dom_named_node_map_set_named_item): Updated exception handling.
3097         (webkit_dom_named_node_map_remove_named_item): Ditto.
3098         (webkit_dom_named_node_map_set_named_item_ns): Ditto.
3099         (webkit_dom_named_node_map_remove_named_item_ns): Ditto.
3100         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3101         (webkit_dom_element_set_attribute): Ditto.
3102         (webkit_dom_element_set_attribute_node): Ditto.
3103         (webkit_dom_element_remove_attribute_node): Ditto.
3104         (webkit_dom_element_set_attribute_ns): Ditto.
3105         (webkit_dom_element_set_attribute_node_ns): Ditto.
3106         (webkit_dom_element_matches): Ditto.
3107         (webkit_dom_element_closest): Ditto.
3108         (webkit_dom_element_webkit_matches_selector): Ditto.
3109         (webkit_dom_element_insert_adjacent_element): Ditto.
3110         (webkit_dom_element_insert_adjacent_html): Ditto.
3111         (webkit_dom_element_insert_adjacent_text): Ditto.
3112         (webkit_dom_element_set_inner_html): Ditto.
3113         (webkit_dom_element_set_outer_html): Ditto.
3114         * WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
3115         (-[WKDOMElement setAttribute:value:]): Ditto.
3116
3117 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com>
3118
3119         [DOM] Introduce WebCore::jsDynamicDowncast
3120         https://bugs.webkit.org/show_bug.cgi?id=164137
3121
3122         Reviewed by Darin Adler.
3123
3124         * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3125         (WebKit::WebAutomationSessionProxy::elementForNodeHandle):
3126
3127 2016-10-29  Darin Adler  <darin@apple.com>
3128
3129         Convert more of DOM from ExceptionCode to Exception
3130         https://bugs.webkit.org/show_bug.cgi?id=164173
3131
3132         Reviewed by Ryosuke Niwa.
3133
3134         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
3135         (webkit_dom_character_data_substring_data): Updated since this
3136         now uses ExceptionOr.
3137         (webkit_dom_character_data_insert_data): Ditto.
3138         (webkit_dom_character_data_delete_data): Ditto.
3139         (webkit_dom_character_data_replace_data): Ditto.
3140         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
3141         (webkit_dom_text_replace_whole_text): Ditto.
3142         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
3143         (webkit_dom_text_split_text): Ditto.
3144
3145 2016-10-28  Darin Adler  <darin@apple.com>
3146
3147         Move all classes in the HTML directory from ExceptionCode to Exception
3148         https://bugs.webkit.org/show_bug.cgi?id=163876
3149
3150         Reviewed by Sam Weinig.
3151
3152         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
3153         (webkit_dom_dom_token_list_add): Updated exception handling.
3154         (webkit_dom_dom_token_list_remove): Ditto.
3155         (webkit_dom_dom_token_list_toggle): Ditto.
3156         (webkit_dom_dom_token_list_replace): Ditto.
3157         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3158         (webkit_dom_element_remove): Ditto.
3159         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
3160         (webkit_dom_html_element_set_inner_text): Ditto.
3161         (webkit_dom_html_element_set_outer_text): Ditto.
3162         (webkit_dom_html_element_set_content_editable): Ditto.
3163         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
3164         (webkit_dom_html_input_element_set_max_length): Ditto.
3165         (webkit_dom_html_input_element_set_size): Ditto.
3166         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
3167         (webkit_dom_html_select_element_set_length): Ditto.
3168         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
3169         (webkit_dom_html_table_element_insert_row): Ditto.
3170         (webkit_dom_html_table_element_delete_row): Ditto.
3171         (webkit_dom_html_table_element_set_caption): Ditto.
3172         (webkit_dom_html_table_element_set_t_head): Ditto.
3173         (webkit_dom_html_table_element_set_t_foot): Ditto.
3174         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
3175         (webkit_dom_html_table_row_element_insert_cell): Ditto.
3176         (webkit_dom_html_table_row_element_delete_cell): Ditto.
3177         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
3178         (webkit_dom_html_table_section_element_insert_row): Ditto.
3179         (webkit_dom_html_table_section_element_delete_row): Ditto.
3180
3181         * WebProcess/WebPage/WebPage.cpp:
3182         (WebKit::WebPage::editorState): Removed ASSERT_NO_EXCEPTION.
3183
3184         * WebProcess/WebPage/ios/WebPageIOS.mm:
3185         (WebKit::WebPage::setAssistedNodeValueAsNumber): Removed ASSERT_NO_EXCEPTION.
3186
3187         * WebProcess/cocoa/WebPlaybackSessionManager.mm:
3188         (WebKit::WebPlaybackSessionManager::seekableRangesChanged):
3189         Changed the code to use a different interface to TimeRange that does
3190         not involve exceptions.
3191
3192 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
3193
3194         iOS autocorrection does not trigger an input event of inputType "insertReplacementText"
3195         https://bugs.webkit.org/show_bug.cgi?id=164077
3196         <rdar://problem/28987810>
3197
3198         Reviewed by Simon Fraser.
3199
3200         Small tweak to mark text insertion when autocorrecting as such, as opposed to regular keyboard input.
3201
3202         * WebProcess/WebPage/ios/WebPageIOS.mm:
3203         (WebKit::WebPage::syncApplyAutocorrection):
3204
3205 2016-10-28  Megan Gardner  <megan_gardner@apple.com>
3206
3207         Rename SharedMemoryMac to SharedMemoryCocoa
3208         https://bugs.webkit.org/show_bug.cgi?id=164156
3209
3210         Reviewed by Alex Christensen.
3211
3212         Renamed SharedMemoryMac to SharedMemoryCocoa, as it runs on all cocoa platforms, not exclusively just mac, and
3213         thus should be named to reflect that reality.
3214
3215         * Platform/cocoa: Added.
3216         * Platform/cocoa/SharedMemoryCocoa.cpp: Copied from Source/WebKit2/Platform/mac/SharedMemoryMac.cpp.
3217         * Platform/mac/SharedMemoryMac.cpp: Removed.
3218         * WebKit2.xcodeproj/project.pbxproj:
3219
3220 2016-10-28  Antti Koivisto  <antti@apple.com>
3221
3222         Enable CFNetwork connection cache fast lane for WebKit2
3223         https://bugs.webkit.org/show_bug.cgi?id=164129
3224
3225         Reviewed by Andreas Kling.
3226
3227         The idea of this feature is keep a connection free for higher priority requests so low-priority
3228         image loads can't take all the available connections.
3229
3230         We have this enabled on WK1 but not on WK2. See what enabling it does for performance in bots.
3231
3232         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3233         (WebKit::initializeNetworkSettings):
3234
3235             Based on code inspection setting kHTTPMinimumFastLanePriority is not sufficient to enable this feature,
3236             kHTTPNumFastLanes needs also be set to a non-zero value. Use the same constants as WK1.
3237             Also enable this on Mac to unify behavior.
3238
3239 2016-10-27  Michael Catanzaro  <mcatanzaro@igalia.com>
3240
3241         [GTK] New stable DOM API headers should be included from webkitdom.h
3242         https://bugs.webkit.org/show_bug.cgi?id=164069
3243
3244         Reviewed by Carlos Garcia Campos.
3245
3246         * WebProcess/InjectedBundle/API/gtk/DOM/webkitdom.h:
3247
3248 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
3249
3250         Fix when building against the MacOSX10.12.sdk where "macos" is not recognized
3251         in the availability macros.
3252
3253         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3254
3255 2016-10-27  Megan Gardner  <megan_gardner@apple.com>
3256
3257         Add support for wide gamut for ShareableBitmap for image popovers
3258         https://bugs.webkit.org/show_bug.cgi?id=164001
3259
3260         Reviewed by Simon Fraser.
3261
3262         Added suppport for wide gamut in ShareableBitmap. SharableBitmaps now know the size of their pixels,
3263         and that data is passed back and forth between the processes. The callers of SharedBitmap will determine
3264         if their image should support wide gamut, but ShareableBitmap will override a set flag on a device that
3265         is incapbable of supporting a wide gamut image.
3266         This makes it possible to show wide gamut images in image popovers on iOS.
3267         This is currently untestable, so no tests added.
3268
3269         * Platform/IPC/Decoder.cpp:
3270         (IPC::Decoder::decode):
3271         * Platform/IPC/Decoder.h:
3272         * Platform/IPC/Encoder.cpp:
3273         (IPC::Encoder::encode):
3274         * Platform/IPC/Encoder.h:
3275         * Shared/ShareableBitmap.cpp:
3276         (WebKit::bytesPerPixel):
3277         (WebKit::ShareableBitmap::Handle::encode):
3278         (WebKit::ShareableBitmap::Handle::decode):
3279         (WebKit::ShareableBitmap::Handle::clear):
3280         (WebKit::ShareableBitmap::create):
3281         (WebKit::ShareableBitmap::createShareable):
3282         (WebKit::ShareableBitmap::createHandle):
3283         (WebKit::ShareableBitmap::ShareableBitmap):
3284         * Shared/ShareableBitmap.h:
3285         (WebKit::ShareableBitmap::numBytesForSize):
3286         (WebKit::ShareableBitmap::sizeInBytes):
3287         * Shared/cg/ShareableBitmapCG.cpp:
3288         (WebKit::bitmapInfo):
3289         (WebKit::ShareableBitmap::createGraphicsContext):
3290         (WebKit::ShareableBitmap::createCGImage):
3291         * WebProcess/WebPage/ios/WebPageIOS.mm:
3292         (WebKit::WebPage::getPositionInformation):
3293
3294 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3295
3296         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
3297         https://bugs.webkit.org/show_bug.cgi?id=163948
3298         <rdar://problem/28921433>
3299
3300         Reviewed by Darin Adler.
3301
3302         Add support for new drag and drop-related EditAction enum values.
3303
3304         * UIProcess/WebEditCommandProxy.cpp:
3305         (WebKit::WebEditCommandProxy::nameForEditAction):
3306
3307 2016-10-26  Chris Dumez  <cdumez@apple.com>
3308
3309         Replace IDBKeyPath with a WTF::Variant
3310         https://bugs.webkit.org/show_bug.cgi?id=163909
3311
3312         Reviewed by Darin Adler.
3313
3314         Add coders to encode / decode IDBKeyPath type for IPC.
3315
3316         * Shared/Databases/IndexedDB/WebIDBResult.cpp:
3317         * Shared/WebCoreArgumentCoders.cpp:
3318         (IPC::ArgumentCoder<IDBKeyPath>::encode):
3319         (IPC::ArgumentCoder<IDBKeyPath>::decode):
3320         * Shared/WebCoreArgumentCoders.h:
3321         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3322
3323 2016-10-26  Brian Burg  <bburg@apple.com>
3324
3325         Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
3326         https://bugs.webkit.org/show_bug.cgi?id=164046
3327
3328         Reviewed by Joseph Pecoraro.
3329
3330         * WebProcess/WebPage/WebInspector.cpp:
3331         (WebKit::WebInspector::sendMessageToFrontend):
3332         * WebProcess/WebPage/WebInspector.h:
3333
3334 2016-10-26  Eric Carlson  <eric.carlson@apple.com>
3335
3336         [MediaStream] Add "has capture device" bit to media state flags
3337         https://bugs.webkit.org/show_bug.cgi?id=163952
3338
3339         Unreviewed fix after r207839.
3340
3341         * WebProcess/WebPage/WebPage.cpp:
3342         (WebKit::WebPage::setMuted): Take an MutedStateFlags, not a bool.
3343         * WebProcess/WebPage/WebPage.h:
3344
3345 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3346
3347         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.1 release.
3348
3349         * gtk/NEWS: Add release notes for 2.15.1.
3350
3351 2016-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3352
3353         REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
3354         https://bugs.webkit.org/show_bug.cgi?id=162776
3355
3356         Reviewed by Xabier Rodriguez-Calvar.
3357
3358         Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
3359         to the menu widget.
3360
3361         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3362         (WebKit::WebContextMenuProxyGtk::append):
3363         (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
3364         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
3365
3366 2016-10-25  Alex Christensen  <achristensen@webkit.org>
3367
3368         CMake build fix.
3369
3370         * PlatformMac.cmake:
3371         * Shared/WebHitTestResultData.cpp:
3372         (WebKit::WebHitTestResultData::WebHitTestResultData):
3373         Explicitly call AtomicString::string to make the String constructor no longer ambiguous.
3374         It couldn't decide whether to use operator const String& or operator NSString*.
3375
3376 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3377
3378         [SOUP] Network process assertion in NetworkDataTask::continueHTTPRedirection
3379         https://bugs.webkit.org/show_bug.cgi?id=163941
3380
3381         Reviewed by Michael Catanzaro.
3382
3383         equalLettersIgnoringASCIICase() expects the second argument to be the letters to compare in lowercase, so use
3384         "get" instead of "GET".
3385
3386         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3387         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
3388
3389 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
3390
3391         [MediaStream] Add "has capture device" bit to media state flags
3392         https://bugs.webkit.org/show_bug.cgi?id=163952
3393
3394         Reviewed by Sam Weinig.
3395
3396         * UIProcess/API/C/WKPage.cpp:
3397         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
3398         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
3399
3400 2016-10-25  Commit Queue  <commit-queue@webkit.org>
3401
3402         Unreviewed, rolling out r207827 and r207828.
3403         https://bugs.webkit.org/show_bug.cgi?id=163965
3404
3405         Caused LayoutTest webaudio/web-audio-is-playing.html to time
3406         out on macOS. (Requested by ryanhaddad on #webkit).
3407
3408         Reverted changesets:
3409
3410         "[MediaStream] Add "has capture device" bit to media state
3411         flags"
3412         https://bugs.webkit.org/show_bug.cgi?id=163952
3413         http://trac.webkit.org/changeset/207827
3414
3415         "[MediaStream] Add "has capture device" bit to media state
3416         flags"
3417         https://bugs.webkit.org/show_bug.cgi?id=163952
3418         http://trac.webkit.org/changeset/207828
3419
3420 2016-10-25  Eric Carlson  <eric.carlson@apple.com>
3421
3422         [MediaStream] Add "has capture device" bit to media state flags
3423         https://bugs.webkit.org/show_bug.cgi?id=163952
3424
3425         Reviewed by Sam Weinig.
3426
3427         * UIProcess/API/C/WKPage.cpp:
3428         (WKPageGetMediaState): Support MediaProducer::HasMediaCaptureDevice.
3429         * UIProcess/API/C/WKPagePrivate.h: Define kWKMediaHasCaptureDevice.
3430
3431 2016-10-25  Chris Dumez  <cdumez@apple.com>
3432
3433         Unreviewed, rolling out r207494.
3434
3435         iOS SDK has been updated on the bots now so rollout the
3436         rollout
3437
3438         Reverted changeset:
3439
3440         "Unreviewed, rolling out r207413."
3441         https://bugs.webkit.org/show_bug.cgi?id=163547
3442         http://trac.webkit.org/changeset/207494
3443
3444 2016-10-25  Jonathan Bedard  <jbedard@apple.com>
3445
3446         Unreviewed build fix.
3447
3448         * UIProcess/API/Cocoa/WKWebView.mm:
3449         (-[WKWebView _fullscreenDelegate]): Removed unneeded parenthesis.
3450
3451 2016-10-19  Jer Noble  <jer.noble@apple.com>
3452
3453         Add WKWebView fullscreen delegate SPI
3454         https://bugs.webkit.org/show_bug.cgi?id=163674
3455
3456         Reviewed by Anders Carlsson.
3457
3458         Add a new SPI property to WKWebView allowing clients to be notified when fullscreen mode enters and exits.
3459
3460         * UIProcess/API/APIFullscreenClient.h: Added.
3461         (API::FullscreenClient::~FullscreenClient):
3462         (API::FullscreenClient::willEnterFullscreen):
3463         (API::FullscreenClient::didEnterFullscreen):
3464         (API::FullscreenClient::willExitFullscreen):
3465         (API::FullscreenClient::didExitFullscreen):
3466         * UIProcess/API/Cocoa/WKWebView.mm:
3467         (-[WKWebView _initializeWithConfiguration:]):
3468         (-[WKWebView _setFullscreenDelegate:]):
3469         (-[WKWebView _fullscreenDelegate]):
3470         (-[WKWebView _isInFullscreen]):
3471         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3472         * UIProcess/API/Cocoa/_WKFullscreenDelegate.h: Added.
3473         * UIProcess/Cocoa/FullscreenClient.h: Added.
3474         (WebKit::FullscreenClient::~FullscreenClient):
3475         * UIProcess/Cocoa/FullscreenClient.mm: Added.
3476         (WebKit::FullscreenClient::FullscreenClient):
3477         (WebKit::FullscreenClient::delegate):
3478         (WebKit::FullscreenClient::setDelegate):
3479         (WebKit::FullscreenClient::willEnterFullscreen):
3480         (WebKit::FullscreenClient::didEnterFullscreen):
3481         (WebKit::FullscreenClient::willExitFullscreen):
3482         (WebKit::FullscreenClient::didExitFullscreen):
3483         * UIProcess/WebFullScreenManagerProxy.cpp:
3484         (WebKit::WebFullScreenManagerProxy::willEnterFullScreen):
3485         (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
3486         (WebKit::WebFullScreenManagerProxy::willExitFullScreen):
3487         (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
3488         * UIProcess/WebPageProxy.cpp:
3489         (WebKit::WebPageProxy::WebPageProxy):
3490         (WebKit::WebPageProxy::setFullscreenClient):
3491         (WebKit::WebPageProxy::fullScreenManager): Deleted.
3492         * UIProcess/WebPageProxy.h:
3493         (WebKit::WebPageProxy::fullscreenClient):
3494         * WebKit2.xcodeproj/project.pbxproj:
3495
3496 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3497
3498         Unreviewed. Fix timeouts in 12 GTK+ unit tests after r207812.
3499
3500         * NetworkProcess/NetworkProcessCreationParameters.h: Initialize loadThrottleLatency.
3501
3502 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3503
3504         Unreviewed. Fix Soup based ports debug build after r207813.
3505
3506         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3507         (WebKit::NetworkDataTaskSoup::authenticateCallback):
3508         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
3509
3510 2016-10-25  Andreas Kling  <akling@apple.com>
3511
3512         More PassRefPtr purging in WebCore.
3513         <https://webkit.org/b/163895>
3514
3515         Reviewed by Antti Koivisto.
3516
3517         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
3518         * WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
3519         (WebKit::PDFPlugin::createScrollbar):
3520
3521 2016-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3522
3523         NetworkSession: switch to use subclasses for NetworkSession and NetworkDataTask implementations
3524         https://bugs.webkit.org/show_bug.cgi?id=163777
3525
3526         Reviewed by Alex Christensen.
3527
3528         The subclass model allows us to choose the implementation at run time, so we could add other implementations
3529         like a mock network class to measure performance, and even one for blobs and finally get rid of ResourceHandle
3530         in WebKit2.
3531
3532         * CMakeLists.txt: Add new files to compilation.
3533         * NetworkProcess/NetworkDataTask.cpp: Added.
3534         (WebKit::NetworkDataTask::create): Create a NetworkDataTaskCocoa or NetworkDataTaskSoup.
3535         (WebKit::NetworkDataTask::NetworkDataTask): Move common code from NetworkDataTaskCocoa and NetworkDataTaskSoup
3536         here to handle the early failures.
3537         (WebKit::NetworkDataTask::~NetworkDataTask):
3538         (WebKit::NetworkDataTask::scheduleFailure):
3539         (WebKit::NetworkDataTask::failureTimerFired):
3540         * NetworkProcess/NetworkDataTask.h: Remove platform specific members.
3541         (WebKit::NetworkDataTask::setPendingDownloadLocation): Make it virtual and set the m_pendingDownloadLocation.
3542         (WebKit::NetworkDataTask::suggestedFilename): Make it virtual and const with a default implementation.
3543         (WebKit::NetworkDataTask::setSuggestedFilename): Ditto.
3544         (WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost): Ditto.
3545         * NetworkProcess/NetworkLoad.cpp: Include NetworkDataTaskCocoa.h.
3546         * NetworkProcess/NetworkLoad.h: Include NetworkDataTask.h instead of NetworkSession.h.
3547         * NetworkProcess/NetworkProcess.cpp:
3548         (WebKit::NetworkProcess::NetworkProcess): Use NetworkSessionCocoa.
3549         * NetworkProcess/NetworkSession.cpp:
3550         (WebKit::NetworkSession::create): Create a NetworkSessionCocoa or NetworkSessionSoup.
3551         (WebKit::NetworkSession::defaultSession): In case of cocoa use NetworkSessionCocoa::defaultSession() because of
3552         the custom protocol manager, otherwise simply create a default session.
3553         (WebKit::NetworkSession::networkStorageSession): Move common code from NetworkSessionCocoa and
3554         NetworkSessionSoup here.
3555         (WebKit::NetworkSession::NetworkSession):
3556         (WebKit::NetworkSession::~NetworkSession):
3557         * NetworkProcess/NetworkSession.h: Remove platform specific members.
3558         (WebKit::NetworkSession::invalidateAndCancel): Make it virtual.
3559         (WebKit::NetworkSession::clearCredentials): Ditto.
3560         * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: Include NetworkSession.h.
3561         * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Added.
3562         * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
3563         (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
3564         (WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa):
3565         (WebKit::NetworkDataTaskCocoa::didSendData):
3566         (WebKit::NetworkDataTaskCocoa::didReceiveChallenge):
3567         (WebKit::NetworkDataTaskCocoa::didCompleteWithError):
3568         (WebKit::NetworkDataTaskCocoa::didReceiveResponse):
3569         (WebKit::NetworkDataTaskCocoa::didReceiveData):
3570         (WebKit::NetworkDataTaskCocoa::didBecomeDownload):
3571         (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
3572         (WebKit::NetworkDataTaskCocoa::setPendingDownloadLocation):
3573         (WebKit::NetworkDataTaskCocoa::tryPasswordBasedAuthentication):
3574         (WebKit::NetworkDataTaskCocoa::transferSandboxExtensionToDownload):
3575         (WebKit::NetworkDataTaskCocoa::allowsSpecificHTTPSCertificateForHost):
3576         (WebKit::NetworkDataTaskCocoa::suggestedFilename):
3577         (WebKit::NetworkDataTaskCocoa::cancel):
3578         (WebKit::NetworkDataTaskCocoa::resume):
3579         (WebKit::NetworkDataTaskCocoa::suspend):
3580         (WebKit::NetworkDataTaskCocoa::state):
3581         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3582         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3583         * NetworkProcess/cocoa/NetworkSessionCocoa.h: Added.
3584         * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
3585         (-[WKNetworkSessionDelegate initWithNetworkSession:withCredentials:]):
3586         (-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
3587         (WebKit::configurationForSessionID):
3588         (WebKit::NetworkSessionCocoa::setCustomProtocolManager):
3589         (WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData):
3590         (WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier):
3591         (WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
3592         (WebKit::NetworkSessionCocoa::setCTDataConnectionServiceType):
3593         (WebKit::NetworkSessionCocoa::create):
3594         (WebKit::NetworkSessionCocoa::defaultSession):
3595         (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
3596         (WebKit::NetworkSessionCocoa::~NetworkSessionCocoa):
3597         (WebKit::NetworkSessionCocoa::invalidateAndCancel):
3598         (WebKit::NetworkSessionCocoa::clearCredentials):
3599         (WebKit::NetworkSessionCocoa::dataTaskForIdentifier):
3600         (WebKit::NetworkSessionCocoa::addDownloadID):
3601         (WebKit::NetworkSessionCocoa::downloadID):
3602         (WebKit::NetworkSessionCocoa::takeDownloadID):
3603         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3604         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
3605         * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
3606         (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
3607         (WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
3608         (WebKit::NetworkDataTaskSoup::suggestedFilename):
3609         (WebKit::NetworkDataTaskSoup::setPendingDownloadLocation):
3610         (WebKit::NetworkDataTaskSoup::createRequest):
3611         (WebKit::NetworkDataTaskSoup::clearRequest):
3612         (WebKit::NetworkDataTaskSoup::resume):
3613         (WebKit::NetworkDataTaskSoup::suspend):
3614         (WebKit::NetworkDataTaskSoup::cancel):
3615         (WebKit::NetworkDataTaskSoup::invalidateAndCancel):
3616         (WebKit::NetworkDataTaskSoup::state):
3617         (WebKit::NetworkDataTaskSoup::timeoutFired):
3618         (WebKit::NetworkDataTaskSoup::startTimeout):
3619         (WebKit::NetworkDataTaskSoup::stopTimeout):
3620         (WebKit::NetworkDataTaskSoup::sendRequestCallback):
3621         (WebKit::NetworkDataTaskSoup::didSendRequest):
3622         (WebKit::NetworkDataTaskSoup::didReceiveResponse):
3623         (WebKit::NetworkDataTaskSoup::tlsErrorsChangedCallback):
3624         (WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
3625         (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
3626         (WebKit::NetworkDataTaskSoup::authenticateCallback):
3627         (WebKit::NetworkDataTaskSoup::authenticate):
3628         (WebKit::NetworkDataTaskSoup::continueAuthenticate):
3629         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirectionCallback):
3630         (WebKit::NetworkDataTaskSoup::skipInputStreamForRedirection):
3631         (WebKit::NetworkDataTaskSoup::didFinishSkipInputStreamForRedirection):
3632         (WebKit::NetworkDataTaskSoup::shouldStartHTTPRedirection):
3633         (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
3634         (WebKit::NetworkDataTaskSoup::readCallback):
3635         (WebKit::NetworkDataTaskSoup::read):
3636         (WebKit::NetworkDataTaskSoup::didRead):
3637         (WebKit::NetworkDataTaskSoup::didFinishRead):
3638         (WebKit::NetworkDataTaskSoup::requestNextPartCallback):
3639         (WebKit::NetworkDataTaskSoup::requestNextPart):
3640         (WebKit::NetworkDataTaskSoup::didRequestNextPart):
3641         (WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
3642         (WebKit::NetworkDataTaskSoup::gotHeadersCallback):
3643         (WebKit::NetworkDataTaskSoup::didGetHeaders):
3644         (WebKit::NetworkDataTaskSoup::wroteBodyDataCallback):
3645         (WebKit::NetworkDataTaskSoup::didWriteBodyData):
3646         (WebKit::NetworkDataTaskSoup::download):
3647         (WebKit::NetworkDataTaskSoup::writeDownloadCallback):
3648         (WebKit::NetworkDataTaskSoup::writeDownload):
3649         (WebKit::NetworkDataTaskSoup::didWriteDownload):
3650         (WebKit::NetworkDataTaskSoup::didFinishDownload):
3651         (WebKit::NetworkDataTaskSoup::didFailDownload):
3652         (WebKit::NetworkDataTaskSoup::cleanDownloadFiles):
3653         (WebKit::NetworkDataTaskSoup::didFail):
3654         (WebKit::NetworkDataTaskSoup::networkEventCallback):
3655         (WebKit::NetworkDataTaskSoup::networkEvent):
3656         (WebKit::NetworkDataTaskSoup::startingCallback):
3657         (WebKit::NetworkDataTaskSoup::requestStartedCallback):
3658         (WebKit::NetworkDataTaskSoup::didStartRequest):
3659         (WebKit::NetworkDataTaskSoup::restartedCallback):
3660         (WebKit::NetworkDataTaskSoup::didRestart):
3661         * NetworkProcess/soup/NetworkDataTaskSoup.h: Added.
3662         * NetworkProcess/soup/NetworkSessionSoup.cpp:
3663         (WebKit::NetworkSessionSoup::NetworkSessionSoup):
3664         (WebKit::NetworkSessionSoup::~NetworkSessionSoup):
3665         (WebKit::NetworkSessionSoup::soupSession):
3666         (WebKit::NetworkSessionSoup::invalidateAndCancel):
3667         * NetworkProcess/soup/NetworkSessionSoup.h: Added.
3668         * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
3669         (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
3670         * PlatformEfl.cmake: Add new files to compilation.
3671         * PlatformGTK.cmake: Ditto.
3672         * WebKit2.xcodeproj/project.pbxproj: Ditto.
3673         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3674         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Update to new NetworkSession::create() API.
3675         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3676         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Ditto.
3677
3678 2016-10-25  Antti Koivisto  <antti@apple.com>
3679
3680         Add support for introducing simulated latency in network process
3681         https://bugs.webkit.org/show_bug.cgi?id=163902
3682
3683         Reviewed by Alex Christensen.
3684
3685         For testing purposes it is useful to have a mechanism for simulating high latency.
3686         This patch adds a basic mechanism that introduces a delay to each response in network
3687         process. In Safari it can be used with
3688
3689              defaults write com.apple.Safari WebKitNetworkLoadThrottleLatencyMilliseconds 200
3690
3691         Setting the delay to 0 disables the feature.
3692
3693         * NetworkProcess/NetworkLoad.cpp:
3694         (WebKit::NetworkLoad::Throttle::Throttle):
3695         (WebKit::NetworkLoad::didReceiveResponseNetworkSession):
3696         (WebKit::NetworkLoad::notifyDidReceiveResponse):
3697         (WebKit::NetworkLoad::didReceiveData):
3698         (WebKit::NetworkLoad::didCompleteWithError):
3699         (WebKit::NetworkLoad::throttleDelayCompleted):
3700         * NetworkProcess/NetworkLoad.h:
3701         * NetworkProcess/NetworkProcess.cpp:
3702         (WebKit::NetworkProcess::initializeNetworkProcess):
3703         * NetworkProcess/NetworkProcess.h:
3704         (WebKit::NetworkProcess::loadThrottleLatency):
3705         * NetworkProcess/NetworkProcessCreationParameters.cpp:
3706         (WebKit::NetworkProcessCreationParameters::encode):
3707         (WebKit::NetworkProcessCreationParameters::decode):
3708         * NetworkProcess/NetworkProcessCreationParameters.h:
3709         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3710         (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3711
3712 2016-10-24  Dan Bernstein  <mitz@apple.com>
3713
3714         REGRESSION (r206410): Sandbox violations beneath WebProcessProxy::platformIsBeingDebugged
3715         https://bugs.webkit.org/show_bug.cgi?id=163879
3716         <rdar://problem/28728735>
3717
3718         Reviewed by Darin Adler.
3719
3720         * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
3721         (WebKit::WebProcessProxy::platformIsBeingDebugged): Check if the current process, which is
3722           the UI process, is sandboxed before trying to find out if the Web process is being
3723           debugged.
3724
3725 2016-10-21  Alex Christensen  <achristensen@webkit.org>
3726
3727         URL::port should return Optional<uint16_t>
3728         https://bugs.webkit.org/show_bug.cgi?id=163806
3729
3730         Reviewed by Darin Adler.
3731
3732         * NetworkProcess/mac/NetworkProcessMac.mm:
3733         (WebKit::overrideSystemProxies):
3734         * Shared/API/APISecurityOrigin.h:
3735         (API::SecurityOrigin::create):
3736         * Shared/API/APIURL.h:
3737         (API::URL::protocol):
3738         * Shared/API/c/WKSecurityOriginRef.cpp:
3739         (WKSecurityOriginGetPort):
3740         * UIProcess/API/Cocoa/WKSecurityOrigin.mm:
3741         (-[WKSecurityOrigin port]):
3742         * WebProcess/WebPage/WebPage.cpp:
3743         (WebKit::WebPage::canHandleRequest):
3744         * WebProcess/cocoa/WebProcessCocoa.mm:
3745         (WebKit::origin):
3746
3747 2016-10-24  Eric Carlson  <eric.carlson@apple.com>
3748
3749         [MediaStream] Separate media capture and audio playback muting
3750         https://bugs.webkit.org/show_bug.cgi?id=163855
3751         <rdar://problem/28827186>
3752
3753         Reviewed by Darin Adler.
3754
3755         * Shared/WebPageCreationParameters.h: Change 'muted' from bool to MutedStateFlags.
3756
3757         * UIProcess/API/C/WKPage.cpp: Change parameter from bool to WKMediaMutedState.
3758         (WKPageSetMuted):
3759         * UIProcess/API/C/WKPagePrivate.h: Define WKMediaMutedState.
3760
3761         * UIProcess/WebPageProxy.cpp:
3762         (WebKit::WebPageProxy::WebPageProxy):
3763         (WebKit::WebPageProxy::setMuted): m_muted -> m_mutedState.
3764         (WebKit::WebPageProxy::creationParameters): Ditto.
3765         * UIProcess/WebPageProxy.h:
3766
3767         * WebProcess/Plugins/PluginView.cpp:
3768         (WebKit::PluginView::isMuted): page.isMuted -> page.mutedState.
3769
3770         * WebProcess/WebPage/WebPage.messages.in: Change SetMuted parameter.
3771
3772 2016-10-24  Youenn Fablet  <youenn@apple.com>
3773
3774         Activate WEB_RTC compilation flags for Mac bots
3775         https://bugs.webkit.org/show_bug.cgi?id=163886
3776
3777         Reviewed by Eric Carlson.
3778
3779         * Configurations/FeatureDefines.xcconfig:
3780
3781 2016-10-24  Brady Eidson  <beidson@apple.com>
3782
3783         IndexedDB 2.0: Support IDBIndex name assignment.
3784         <rdar://problem/28806932> and https://bugs.webkit.org/show_bug.cgi?id=163805
3785
3786         Reviewed by Alex Christensen.
3787
3788         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
3789         (WebKit::WebIDBConnectionToClient::didRenameIndex):
3790         (WebKit::WebIDBConnectionToClient::renameIndex):
3791         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
3792         * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
3793
3794         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3795         (WebKit::WebIDBConnectionToServer::renameIndex):
3796         (WebKit::WebIDBConnectionToServer::didRenameIndex):
3797         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
3798         * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
3799
3800 2016-10-23  Michael Catanzaro  <mcatanzaro@igalia.com>
3801
3802         [GTK] Remove DO NOT MODIFY headers from files that are no longer autogenerated
3803         https://bugs.webkit.org/show_bug.cgi?id=163867
3804
3805         Reviewed by Darin Adler.
3806
3807         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
3808         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
3809         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttrPrivate.h:
3810         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
3811         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
3812         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlobPrivate.h:
3813         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
3814         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
3815         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASectionPrivate.h:
3816         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
3817         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
3818         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
3819         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleListPrivate.h:
3820         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRulePrivate.h:
3821         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
3822         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclarationPrivate.h:
3823         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
3824         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheetPrivate.h:
3825         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
3826         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValuePrivate.h:
3827         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
3828         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
3829         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterDataPrivate.h:
3830         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
3831         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
3832         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCommentPrivate.h:
3833         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
3834         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementationPrivate.h:
3835         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
3836         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
3837         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelectionPrivate.h:
3838         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
3839         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
3840         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenListPrivate.h:
3841         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
3842         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
3843         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowPrivate.h:
3844         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindowUnstable.h:
3845         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
3846         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
3847         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
3848         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentPrivate.h:
3849         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragmentUnstable.h:
3850         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h:
3851         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
3852         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
3853         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentTypePrivate.h:
3854         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentUnstable.h:
3855         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
3856         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
3857         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h:
3858         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementUnstable.h:
3859         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
3860         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
3861         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventPrivate.h:
3862         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
3863         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
3864         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
3865         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
3866         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileListPrivate.h:
3867         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFilePrivate.h:
3868         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
3869         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
3870         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElementPrivate.h:
3871         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
3872         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
3873         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElementPrivate.h:
3874         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
3875         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
3876         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElementPrivate.h:
3877         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
3878         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
3879         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElementPrivate.h:
3880         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
3881         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
3882         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElementPrivate.h:
3883         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
3884         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
3885         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElementPrivate.h:
3886         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
3887         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
3888         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElementPrivate.h:
3889         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
3890         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
3891         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElementPrivate.h:
3892         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
3893         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
3894         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollectionPrivate.h:
3895         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
3896         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
3897         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElementPrivate.h:
3898         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
3899         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
3900         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElementPrivate.h:
3901         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
3902         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
3903         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElementPrivate.h:
3904         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
3905         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
3906         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocumentPrivate.h:
3907         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
3908         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
3909         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementPrivate.h:
3910         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElementUnstable.h:
3911         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
3912         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
3913         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElementPrivate.h:
3914         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
3915         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
3916         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElementPrivate.h:
3917         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
3918         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
3919         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElementPrivate.h:
3920         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
3921         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
3922         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElementPrivate.h:
3923         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
3924         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
3925         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElementPrivate.h:
3926         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
3927         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
3928         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElementPrivate.h:
3929         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
3930         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
3931         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElementPrivate.h:
3932         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
3933         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
3934         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElementPrivate.h:
3935         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
3936         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
3937         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElementPrivate.h:
3938         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
3939         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
3940         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElementPrivate.h:
3941         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
3942         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
3943         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElementPrivate.h:
3944         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
3945         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
3946         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElementPrivate.h:
3947         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
3948         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
3949         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElementPrivate.h:
3950         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
3951         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
3952         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElementPrivate.h:
3953         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
3954         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
3955         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElementPrivate.h:
3956         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
3957         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
3958         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElementPrivate.h:
3959         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
3960         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
3961         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElementPrivate.h:
3962         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
3963         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
3964         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElementPrivate.h:
3965         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
3966         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
3967         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElementPrivate.h:
3968         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
3969         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
3970         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElementPrivate.h: