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