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