1 2017-08-04 Jeremy Jones <jeremyj@apple.com>
3 Use MPAVRoutingController instead of deprecated versions.
4 https://bugs.webkit.org/show_bug.cgi?id=175063
5 rdar://problem/33301230
7 Reviewed by Tim Horton.
9 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
11 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
12 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
13 (-[WKAirPlayRoutePicker dealloc]):
14 (-[WKAirPlayRoutePicker show:fromRect:]):
15 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
16 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
17 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
18 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
19 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
20 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
21 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
23 2017-08-04 Tim Horton <timothy_horton@apple.com>
25 viewport-fit changes during animated resize can cause layout size to get stuck
26 https://bugs.webkit.org/show_bug.cgi?id=175169
27 <rdar://problem/33684697>
29 Reviewed by Simon Fraser.
31 If we get a commit that changes viewport-fit state while an animated
32 resize is underway, and that change causes the client to push a new
33 minimumLayoutSizeOverride, the new size will be lost forever, and we
34 will get stuck laying out at the wrong size.
36 This is because we unconditionally apply avoidsUnsafeArea for every commit,
37 while most other changes that come in from a commit are ignored if we're
38 inside animated resize. To fix, also ignore avoidsUnsafeArea changes during
39 animated resize, by moving the code that keeps track of it into WKWebView
40 like all of the rest, and read it out of the commit in didCommitLayerTree
41 *after* the animated-resize early-return.
43 Also, fix the associated layout tests by adding a missing assignment
44 in _computedContentInset, which was broken in r220138.
46 * UIProcess/API/Cocoa/WKWebView.mm:
47 (-[WKWebView _initializeWithConfiguration:]):
48 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
49 (-[WKWebView _processDidExit]):
50 (-[WKWebView _didCommitLayerTree:]):
51 (-[WKWebView _setAvoidsUnsafeArea:]):
52 (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
53 (-[WKWebView _didChangeAvoidsUnsafeArea:]): Deleted.
54 * UIProcess/API/Cocoa/WKWebViewInternal.h:
55 * UIProcess/PageClient.h:
56 * UIProcess/WebPageProxy.cpp:
57 (WebKit::WebPageProxy::resetState):
58 (WebKit::WebPageProxy::setAvoidsUnsafeArea): Deleted.
59 * UIProcess/WebPageProxy.h:
60 (WebKit::WebPageProxy::avoidsUnsafeArea const): Deleted.
61 * UIProcess/ios/PageClientImplIOS.h:
62 * UIProcess/ios/PageClientImplIOS.mm:
63 (WebKit::PageClientImpl::didChangeAvoidsUnsafeArea): Deleted.
64 * UIProcess/ios/WebPageProxyIOS.mm:
65 (WebKit::WebPageProxy::didCommitLayerTree):
67 2017-08-04 Matt Lewis <jlewis3@apple.com>
69 Unreviewed, rolling out r220271.
71 Rolling out due to Layout Test failing on iOS Simulator.
75 "Remove STREAMS_API compilation guard"
76 https://bugs.webkit.org/show_bug.cgi?id=175165
77 http://trac.webkit.org/changeset/220271
79 2017-08-03 Sam Weinig <sam@webkit.org>
81 [Cleanup] Remove ScriptGlobalObject
82 https://bugs.webkit.org/show_bug.cgi?id=175173
84 Reviewed by Darin Adler.
86 * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
87 (WebKit::RemoteWebInspectorUI::windowObjectCleared):
88 * WebProcess/WebPage/WebInspectorUI.cpp:
89 (WebKit::WebInspectorUI::windowObjectCleared):
90 Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
92 2017-08-03 Brian Burg <bburg@apple.com>
94 [Cocoa] Web Automation: copy JavaScript atoms to WebKit.framework private headers
95 https://bugs.webkit.org/show_bug.cgi?id=175088
96 <rdar://problem/33685818>
98 Reviewed by Joseph Pecoraro.
100 * WebKit.xcodeproj/project.pbxproj:
101 - Add a Copy Files phase to WebKit.framework.
102 - Copy atoms to the atoms/ directory in WebKit.framework/PrivateHeaders/.
104 2017-08-04 Ryan Haddad <ryanhaddad@apple.com>
106 Unreviewed, rolling out r220268.
108 This change caused assertion failures on macOS and iOS Debug
113 "Resource Load Statistics: Report user interaction
114 immediately, but only when needed"
115 https://bugs.webkit.org/show_bug.cgi?id=175090
116 http://trac.webkit.org/changeset/220268
118 2017-08-04 Andreas Kling <akling@apple.com>
120 NetworkLoad should always invoke its redirect completion handler
121 https://bugs.webkit.org/show_bug.cgi?id=175179
122 <rdar://problem/33464999>
124 Reviewed by Chris Dumez.
126 Make sure the redirect completion handler is always invoked,
127 just like we already did for the response completion handler.
129 * NetworkProcess/NetworkLoad.cpp:
130 (WebKit::NetworkLoad::~NetworkLoad):
132 2017-08-04 Youenn Fablet <youenn@apple.com>
134 Remove STREAMS_API compilation guard
135 https://bugs.webkit.org/show_bug.cgi?id=175165
137 Reviewed by Darin Adler.
139 * Configurations/FeatureDefines.xcconfig:
140 * WebProcess/InjectedBundle/InjectedBundle.cpp:
141 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
143 2017-08-04 Brady Eidson <beidson@apple.com>
145 Enable ServiceWorkers at runtime for WebKitTestRunner.
146 https://bugs.webkit.org/show_bug.cgi?id=175174
148 Reviewed by Youenn Fablet.
150 * UIProcess/WebPreferences.cpp:
151 (WebKit::WebPreferences::enableAllExperimentalFeatures):
153 2017-08-04 John Wilander <wilander@apple.com>
155 Resource Load Statistics: Report user interaction immediately, but only when needed
156 https://bugs.webkit.org/show_bug.cgi?id=175090
157 <rdar://problem/33685546>
159 Reviewed by Chris Dumez.
161 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
162 (WKBundleClearResourceLoadStatistics):
163 Test infrastructure. Ends up calling
164 WebCore::ResourceLoadObserver::clearState().
165 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
167 2017-08-04 Antti Koivisto <antti@apple.com>
169 Network cache should be usable as non-singleton
170 https://bugs.webkit.org/show_bug.cgi?id=175139
172 Reviewed by Sam Weinig.
174 We might want to use it as a non-singleton in the future (for example as a backend for the cache API).
176 This patch makes NetworkCache::Cache and NetworkCache::Storage refcounted objects and takes
177 care to ref them properly during asynchronous operations.
179 The patch doesn't actually create any non-shared instances, it just adds the capability.
181 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
182 (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
183 * NetworkProcess/NetworkProcess.cpp:
184 (WebKit::fetchDiskCacheEntries):
185 (WebKit::clearDiskCacheEntries):
186 (WebKit::NetworkProcess::setCacheModel):
187 * NetworkProcess/NetworkProcess.h:
188 (WebKit::NetworkProcess::cache):
190 Move the shared cache instance to the network process singleton.
192 * NetworkProcess/NetworkResourceLoader.cpp:
193 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
195 Include shared cache as a reffed member for non-ephemeral instances.
197 (WebKit::NetworkResourceLoader::canUseCache const):
198 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
199 (WebKit::NetworkResourceLoader::abort):
200 (WebKit::NetworkResourceLoader::didReceiveResponse):
201 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
202 (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
203 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
204 * NetworkProcess/NetworkResourceLoader.h:
205 * NetworkProcess/cache/NetworkCache.cpp:
206 (WebKit::NetworkCache::Cache::open):
208 Open now returns null if it fails.
209 Add RegisterNotify option to set up notify trigger for the shared instance.
211 (WebKit::NetworkCache::Cache::Cache):
212 (WebKit::NetworkCache::Cache::~Cache):
216 (WebKit::NetworkCache::dumpFileChanged):
217 (WebKit::NetworkCache::Cache::setCapacity):
218 (WebKit::NetworkCache::Cache::retrieve):
220 Protect the cache instance during asynchronous operations.
222 (WebKit::NetworkCache::Cache::store):
223 (WebKit::NetworkCache::Cache::storeRedirect):
224 (WebKit::NetworkCache::Cache::remove):
225 (WebKit::NetworkCache::Cache::traverse):
226 (WebKit::NetworkCache::Cache::dumpContentsToFile):
227 (WebKit::NetworkCache::Cache::clear):
228 (WebKit::NetworkCache::Cache::recordsPath const):
229 (WebKit::NetworkCache::Cache::retrieveData):
230 (WebKit::NetworkCache::Cache::storeData):
231 (WebKit::NetworkCache::singleton): Deleted.
232 (WebKit::NetworkCache::Cache::initialize): Deleted.
233 * NetworkProcess/cache/NetworkCache.h:
234 (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData const):
235 (WebKit::NetworkCache::Cache::isEnabled const): Deleted.
237 Remove isEnabled() state as a cache object now always represents an enabled cache.
239 * NetworkProcess/cache/NetworkCacheEntry.cpp:
240 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):
241 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
242 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
243 (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
244 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
245 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
246 (WebKit::NetworkCache::Statistics::initialize):
247 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
248 * NetworkProcess/cache/NetworkCacheStorage.cpp:
249 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
250 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
251 (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
253 Operations now ref the storage. They are already deleted in the main thread so
254 proper destruction is taken care of.
256 (WebKit::NetworkCache::Storage::open):
257 (WebKit::NetworkCache::Storage::~Storage):
258 (WebKit::NetworkCache::Storage::synchronize):
260 This and other asynchronous methods now protect the Storage instance.
262 (WebKit::NetworkCache::Storage::remove):
263 (WebKit::NetworkCache::Storage::retrieve):
264 (WebKit::NetworkCache::Storage::store):
265 (WebKit::NetworkCache::Storage::traverse):
266 (WebKit::NetworkCache::Storage::clear):
267 (WebKit::NetworkCache::Storage::shrink):
268 (WebKit::NetworkCache::Storage::deleteOldVersions):
269 * NetworkProcess/cache/NetworkCacheStorage.h:
270 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
271 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
272 (WebKit::NetworkProcess::clearDiskCache):
273 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
274 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
275 * NetworkProcess/soup/NetworkProcessSoup.cpp:
276 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
277 (WebKit::NetworkProcess::clearDiskCache):
279 2017-08-04 Frederic Wang <fwang@igalia.com>
281 ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
282 https://bugs.webkit.org/show_bug.cgi?id=175135
284 Reviewed by Simon Fraser.
286 This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
287 that it uses the fixed position rectangle relative of the first frame ancestor instead of
288 the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
289 and RenderLayerCompositor. This fixes some flickering issues on iOS.
291 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
292 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll): Use the fixed
293 position rect of a non-main frame if there is one.
295 2017-08-03 Brian Burg <bburg@apple.com>
297 Remove ENABLE(WEB_SOCKET) guards
298 https://bugs.webkit.org/show_bug.cgi?id=167044
300 Reviewed by Joseph Pecoraro.
302 * Configurations/FeatureDefines.xcconfig:
303 * WebProcess/Network/WebSocketProvider.cpp:
304 * WebProcess/Network/WebSocketProvider.h:
306 2017-08-03 Chris Dumez <cdumez@apple.com>
308 Multiple Layout tests from web-platform-tests/beacon/ are timing out.
309 https://bugs.webkit.org/show_bug.cgi?id=175076
310 <rdar://problem/33704752>
312 Reviewed by Alexey Proskuryakov.
314 * NetworkProcess/NetworkLoad.cpp:
315 (WebKit::NetworkLoad::completeAuthenticationChallenge):
316 In the NETWORK_SESSION code path, we did not ask the client about server trust evaluation
317 when the clientCredentialPolicy was CannotAskClientForCredentials. This is because the
318 same delegate is used for HTTP authentication and server trust evaluation in the
319 NETWORK_SESSION code path. To align both code paths, we now ask the client about server
320 trust evaluation even if the policy CannotAskClientForCredentials. This allows WKTR
321 to trust certificates for localhost / 127.0.0.1 unconditionally and consistently.
323 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
325 [PAL] Move spi/cf directory into PAL
326 https://bugs.webkit.org/show_bug.cgi?id=175057
328 Reviewed by Antti Koivisto.
330 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
331 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
332 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
333 * NetworkProcess/ios/NetworkProcessIOS.mm:
334 * NetworkProcess/mac/NetworkLoadMac.mm:
335 * NetworkProcess/mac/NetworkProcessMac.mm:
336 * Shared/cf/CookieStorageUtilsCF.h:
337 * Shared/mac/ChildProcessMac.mm:
338 * Shared/mac/CookieStorageShim.mm:
339 * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
340 * UIProcess/API/Cocoa/WKProcessPool.mm:
341 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
342 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
343 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
344 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
345 * UIProcess/WebsiteData/WebsiteDataStore.h:
346 * UIProcess/mac/WebCookieManagerProxyMac.mm:
347 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
348 * WebProcess/cocoa/WebProcessCocoa.mm:
350 2017-08-03 Youenn Fablet <youenn@apple.com>
352 Remove FETCH_API compilation guard
353 https://bugs.webkit.org/show_bug.cgi?id=175154
355 Reviewed by Chris Dumez.
357 * Configurations/FeatureDefines.xcconfig:
358 * WebProcess/WebPage/WebPage.cpp:
359 (WebKit::WebPage::updatePreferences):
361 2017-08-03 Matt Lewis <jlewis3@apple.com>
363 Unreviewed, rolling out r220209.
365 This caused internal build failures.
369 "Use MPAVRoutingController instead of deprecated versions."
370 https://bugs.webkit.org/show_bug.cgi?id=175063
371 http://trac.webkit.org/changeset/220209
373 2017-08-02 Brian Burg <bburg@apple.com>
375 Web Automation: consider file extensions in the "accept" attribute when deciding if a file can be uploaded
376 https://bugs.webkit.org/show_bug.cgi?id=175081
378 Reviewed by Joseph Pecoraro.
380 * UIProcess/Automation/WebAutomationSession.cpp:
381 (WebKit::fileCanBeAcceptedForUpload):
382 (WebKit::WebAutomationSession::handleRunOpenPanel):
383 In cases where a file has an extension, try to match it against the
384 accepted extensions list. Give up if there's no extension. Otherwise,
385 proceed as normal to infer a MIME type based on the extension.
386 In cases where extension-less files are inside hidden folders, the MIME
387 inference will fail as well.
389 2017-08-03 Brady Eidson <beidson@apple.com>
391 Add SW IDLs and stub out basic functionality.
392 https://bugs.webkit.org/show_bug.cgi?id=175115
394 Reviewed by Chris Dumez.
396 * Configurations/FeatureDefines.xcconfig:
398 * Shared/WebPreferencesDefinitions.h:
400 * UIProcess/WebPreferences.cpp:
401 (WebKit::WebPreferences::enableAllExperimentalFeatures): Explicitly skip SW for now.
402 The ramifications to layouttests are complicated, and we'd like to follow up in a
405 * WebProcess/WebPage/WebPage.cpp:
406 (WebKit::WebPage::updatePreferences):
408 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
410 [WebKit] Sort Xcode project file
411 https://bugs.webkit.org/show_bug.cgi?id=175122
413 Reviewed by Antti Koivisto.
415 * WebKit.xcodeproj/project.pbxproj:
417 2017-08-02 Sam Weinig <sam@webkit.org>
419 [WebIDL] Convert MutationCallback to be a normal generated callback
420 https://bugs.webkit.org/show_bug.cgi?id=174140
422 Reviewed by Darin Adler.
424 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
425 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
426 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilterPrivate.h:
427 Pass, now necessary, Document to NativeNodeFilter constructor.
429 2017-08-03 Jeremy Jones <jeremyj@apple.com>
431 Use MPAVRoutingController instead of deprecated versions.
432 https://bugs.webkit.org/show_bug.cgi?id=175063
433 rdar://problem/33301230
435 Reviewed by Tim Horton.
437 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
439 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
440 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
441 (-[WKAirPlayRoutePicker dealloc]):
442 (-[WKAirPlayRoutePicker show:fromRect:]):
443 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
444 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
445 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
446 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
447 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
448 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
449 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
451 2017-08-03 Chris Dumez <cdumez@apple.com>
453 Improve our support for referrer policies
454 https://bugs.webkit.org/show_bug.cgi?id=175069
455 <rdar://problem/33677313>
457 Reviewed by Darin Adler.
459 * WebProcess/Network/WebLoaderStrategy.cpp:
460 (WebKit::WebLoaderStrategy::loadResource):
461 (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
463 2017-08-02 Chris Dumez <cdumez@apple.com>
465 NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times
466 https://bugs.webkit.org/show_bug.cgi?id=175109
467 <rdar://problem/33363169>
469 Reviewed by Brady Eidson.
471 If NetworkResourceLoader::setDefersLoading(false) is called by the client while m_networkLoad is null
472 then we call NetworkResourceLoader::start() to start the load. This is needed in the case where
473 a NetworkResourceLoader is constructed in deferred mode so that the load can later be started via
474 setDefersLoading(). However, it is possible for setDefersLoading(false) to be called when start()
475 has already been called, which causes start() to be called multiple times and leads to an assertion
478 Normally, setDefersLoading(false) returns without calling start() if m_networkLoad is not null. It
479 relies on m_networkLoad being non-null to determine if start() should be called. This is bad because
480 start() checks the disk cache asynchronously *before* calling startNetworkLoad() and initializing
481 m_networkLoad. Therefore, if setDefersLoading(false) is called *while* we are checking the cache,
482 then we will call incorrectly call start() again.
484 In the case of the radar, this happens when we:
485 1. Call start() and check the disk cache
486 2. Retrieve a cached redirect from the cache, which causes a WillSendRequest IPC to be sent to the
488 3. The WebProcess calls setDefersLoading(true), sends the ContinueWillSendRequest IPC back and
489 then calls setDefersLoading(false)
491 The call to continueWillSendRequest() causes us to retrieve the redirected entry from the cache,
492 asynchronously, which will return no entry and start a load.
493 The later call to setDefersLoading(false) causes us to call start() again and we end up back to step 1.
495 * NetworkProcess/NetworkResourceLoader.cpp:
496 (WebKit::NetworkResourceLoader::start):
497 (WebKit::NetworkResourceLoader::setDefersLoading):
498 * NetworkProcess/NetworkResourceLoader.h:
500 2017-08-02 Andreas Kling <akling@apple.com>
502 NetworkRTCProvider::createResolver() leaks CFHost objects
503 https://bugs.webkit.org/show_bug.cgi?id=175103
504 <rdar://problem/33690347>
506 Reviewed by Youenn Fablet.
508 Add a missing adoptCF() so we don't leak the CFHost.
510 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
511 (WebKit::NetworkRTCProvider::createResolver):
513 2017-08-02 Jeremy Jones <jeremyj@apple.com>
515 Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
516 https://bugs.webkit.org/show_bug.cgi?id=175080
520 This is obsolete because of the alternate solution in
521 https://bugs.webkit.org/show_bug.cgi?id=174850
523 * Shared/WebPreferencesDefinitions.h:
524 * UIProcess/API/Cocoa/WKPreferences.mm:
525 (-[WKPreferences _setMediaDocumentEntersFullscreenAutomatically:]): Deleted.
526 (-[WKPreferences _mediaDocumentEntersFullscreenAutomatically]): Deleted.
527 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
528 * WebProcess/WebPage/WebPage.cpp:
529 (WebKit::WebPage::updatePreferences):
531 2017-08-02 Filip Pizlo <fpizlo@apple.com>
533 We should be OK with the gigacage being disabled on gmalloc
534 https://bugs.webkit.org/show_bug.cgi?id=175082
536 Reviewed by Michael Saboff.
538 * WebProcess/WebProcess.cpp:
539 (WebKit::m_webSQLiteDatabaseTracker):
541 2017-08-02 Brian Burg <bburg@apple.com>
543 Web Automation: files selected for upload should be checked against values of the 'accept' attribute
544 https://bugs.webkit.org/show_bug.cgi?id=174803
545 <rdar://problem/33514190>
547 Reviewed by Carlos Garcia Campos.
549 Use the parsed values of the file input element's "accept" attribute to reject
550 files that don't match the specified values. This is normally done by Safari
551 using NSOpenPanel, but since a real open panel isn't shown during automation,
552 it needs to be done here.
554 Support for limiting accepted files by file extensions will be added when the
555 same is implemented in the normal code path for the C and Objective-C APIs.
557 This change is covered by internal WebDriver tests that will be rewritten for the
558 public Webdriver W3C test suite someday, when safaridriver runs those tests itself.
560 * UIProcess/Automation/WebAutomationSession.cpp:
561 (WebKit::WebAutomationSession::handleRunOpenPanel):
562 Since we already have the proposed files, there's no need to compute a list of
563 supported extensions based on wildcard MIME types. First check the extension,
564 then the inferred MIME type for the extension, and then the wildcard MIME type
565 if the inferred type is not an exact match.
567 2017-08-02 Tim Horton <timothy_horton@apple.com>
569 WKPDFView doesn't respect safe area insets
570 https://bugs.webkit.org/show_bug.cgi?id=175046
571 <rdar://problem/33558386>
573 Reviewed by Wenson Hsieh.
575 * Platform/spi/ios/UIKitSPI.h:
578 * UIProcess/API/Cocoa/WKWebView.mm:
579 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
580 Drive-by fix two small custom content view issues:
582 - Reset _scrollViewBackgroundColor; it is used to early-return from
583 updating the background color if it hasn't changed, but if you go from a
584 site with (for example) a white background, to a PDF, to another site
585 with a white background, we will early-return and not reset the background
586 color from the grey WKPDFView background.
588 - When installing a custom content view, scroll to the origin. We miss
589 the usual mechanism for scrolling to the origin when custom content views
590 are installed, so do it here.
592 (-[WKWebView _effectiveObscuredInsetEdgesAffectedBySafeArea]):
593 Ignore _obscuredInsetEdgesAffectedBySafeArea for custom content views.
594 This is fairly arbitrary, and we should find a different way to
595 express different edge sets for different kinds of content (perhaps
596 bake this into default viewports?), but for now this works.
598 (-[WKWebView _computedContentInset]):
599 Use _effectiveObscuredInsetEdgesAffectedBySafeArea instead of the ivar directly.
601 (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
602 Force safe areas to not affect obscured insets for custom content views,
603 so that it's up to every custom content view to take safe areas into
606 * UIProcess/API/Cocoa/WKWebViewInternal.h:
607 Expose _computedUnobscuredSafeAreaInset for WKPDFView's use.
609 * UIProcess/ios/WKPDFView.mm:
610 (-[WKPDFView web_setMinimumSize:]):
611 Avoid rebuilding the WKPDFView if the minimum size didn't change.
613 (-[WKPDFView _offsetForPageNumberIndicator]):
614 Take unobscured safe area insets into account when insetting
615 the page number indicator.
617 (-[WKPDFView web_computedContentInsetDidChange]):
618 Watch for unobscured safe area inset changes, and apply them to the
619 layout of the WKPDFView.
621 (-[WKPDFView _computePageAndDocumentFrames]):
622 Make it possible to only update the WKPDFView's size and position, without
623 rebuilding its subviews, if the width did not change. This prevents lots
624 of flashing of the child UIPDFPageViews when the unobscured safe area
625 insets change dynamically.
627 Take the safe area insets into account when determining what width
630 (-[WKPDFView _updateDocumentFrame]):
631 Take the safe area insets into account when positioning the WKPDFView
632 inside the WKScrollView.
634 2017-08-02 John Wilander <wilander@apple.com>
636 ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath()
637 https://bugs.webkit.org/show_bug.cgi?id=175055
638 <rdar://problem/32671352>
640 Reviewed by David Kilzer.
642 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:
643 (WebKit::ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel):
644 Now uses dispatch_once() instead of NeverDestroyed and checks the
645 return value of storagePath() before using it to load the model.
647 2017-08-01 Brian Burg <bburg@apple.com>
649 HTML file input elements do not support file extensions in the "accept" attribute
650 https://bugs.webkit.org/show_bug.cgi?id=95698
651 <rdar://problem/12231850>
653 Reviewed by Darin Adler.
655 Plumb accepted file extensions out to the C API.
656 The Cocoa API will be improved in a later patch.
658 * Shared/WebCoreArgumentCoders.cpp:
659 (IPC::ArgumentCoder<FileChooserSettings>::encode):
660 (IPC::ArgumentCoder<FileChooserSettings>::decode):
661 * UIProcess/API/APIOpenPanelParameters.cpp:
662 (API::OpenPanelParameters::acceptFileExtensions const):
663 * UIProcess/API/APIOpenPanelParameters.h:
664 * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
665 (WKOpenPanelParametersCopyAcceptedFileExtensions):
666 * UIProcess/API/C/WKOpenPanelParametersRef.h:
668 2017-08-02 Fujii Hironori <Hironori.Fujii@sony.com>
670 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
671 https://bugs.webkit.org/show_bug.cgi?id=175010
672 <rdar://problem/33647818>
674 Reviewed by Alex Christensen.
676 * UIProcess/API/APIContentRuleListStore.cpp:
677 (API::ContentRuleListStore::compileContentRuleList):
678 Call QualifiedName::init().
680 2017-08-01 Chris Dumez <cdumez@apple.com>
682 Add initial support for navigator.sendBeacon
683 https://bugs.webkit.org/show_bug.cgi?id=175007
684 <rdar://problem/33547728>
686 Reviewed by Sam Weinig.
688 Add experimental feature flag for the Beacon API, disabled by default.
690 * Shared/WebPreferencesDefinitions.h:
691 * WebProcess/InjectedBundle/InjectedBundle.cpp:
692 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
693 * WebProcess/WebPage/WebPage.cpp:
694 (WebKit::WebPage::updatePreferences):
696 2017-08-01 Filip Pizlo <fpizlo@apple.com>
698 Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
699 https://bugs.webkit.org/show_bug.cgi?id=174727
701 Reviewed by Mark Lam.
703 The WebProcess should never disable the Gigacage by allocating typed arrays outside the Gigacage. So,
704 we add a callback that crashes the process.
706 * WebProcess/WebProcess.cpp:
707 (WebKit::gigacageDisabled):
708 (WebKit::m_webSQLiteDatabaseTracker):
710 2017-08-01 Brian Burg <bburg@apple.com>
712 Web Automation: add event to notify service when a page's main frame window object has cleared
713 https://bugs.webkit.org/show_bug.cgi?id=174987
714 <rdar://problem/36602634>
716 Reviewed by Carlos Garcia Campos.
718 * UIProcess/Automation/Automation.json: Add new event.
720 * UIProcess/Automation/WebAutomationSession.h:
721 * UIProcess/Automation/WebAutomationSession.cpp:
722 (WebKit::WebAutomationSession::navigationOccurredForFrame):
723 (WebKit::WebAutomationSession::willClosePage):
724 When a WebPage navigates or closes, send the browsingContextCleared event.
725 Any element handles for elements in the browsing context are no longer valid.
727 * UIProcess/WebPageProxy.cpp:
728 (WebKit::WebPageProxy::close):
729 Add a new hook into the active automation session so it is notified when a page closes.
731 2017-08-01 Brady Eidson <beidson@apple.com>
733 API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug..
734 https://bugs.webkit.org/show_bug.cgi?id=175030
736 Reviewed by Andy Estes.
738 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
739 (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next
742 2017-08-01 Brady Eidson <beidson@apple.com>
744 Part 2 of: Rename DatabaseProcess to StorageProcess.
745 https://bugs.webkit.org/show_bug.cgi?id=174880
747 Reviewed by Andy Estes.
749 Rename some more variables, classes, etc. to reflect the change.
751 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
752 (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
754 * NetworkProcess/NetworkProcess.cpp:
755 (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
756 (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs):
757 (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
758 (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
759 * NetworkProcess/NetworkProcess.h:
760 * NetworkProcess/NetworkProcess.messages.in:
762 * Shared/ProcessExecutablePath.h:
763 * Shared/gtk/ProcessExecutablePathGtk.cpp:
764 (WebKit::executablePathOfStorageProcess):
765 (WebKit::executablePathOfDatabaseProcess): Deleted.
766 * Shared/wpe/ProcessExecutablePathWPE.cpp:
767 (WebKit::executablePathOfStorageProcess):
768 (WebKit::executablePathOfDatabaseProcess): Deleted.
770 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
771 (WebKit::WebIDBConnectionToClient::putOrAdd):
773 * StorageProcess/StorageProcess.cpp:
774 (WebKit::StorageProcess::initializeWebsiteDataStore):
775 (WebKit::StorageProcess::postStorageTask):
776 (WebKit::StorageProcess::performNextStorageTask):
777 (WebKit::StorageProcess::createStorageToWebProcessConnection):
778 (WebKit::StorageProcess::fetchWebsiteData):
779 (WebKit::StorageProcess::postDatabaseTask): Deleted.
780 (WebKit::StorageProcess::performNextDatabaseTask): Deleted.
781 (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
782 * StorageProcess/StorageProcess.h:
783 * StorageProcess/StorageProcess.messages.in:
784 * StorageProcess/mac/StorageProcessMac.mm:
785 (WebKit::StorageProcess::initializeProcessName):
787 * UIProcess/API/C/WKContext.cpp:
788 (WKContextGetDatabaseProcessIdentifier):
790 * UIProcess/API/Cocoa/WKProcessPool.mm:
791 (-[WKProcessPool _terminateStorageProcess]):
792 (-[WKProcessPool _storageProcessIdentifier]):
793 (-[WKProcessPool _terminateDatabaseProcess]): Deleted.
794 (-[WKProcessPool _databaseProcessIdentifier]): Deleted.
795 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
797 * UIProcess/ChildProcessProxy.cpp:
798 (WebKit::ChildProcessProxy::getLaunchOptions):
800 * UIProcess/Launcher/ProcessLauncher.h:
801 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
802 (WebKit::ProcessLauncher::launchProcess):
803 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
804 (WebKit::serviceName):
805 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
806 (WebKit::ProcessLauncher::launchProcess):
808 * UIProcess/Network/NetworkProcessProxy.cpp:
809 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
810 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
811 * UIProcess/Network/NetworkProcessProxy.h:
812 * UIProcess/Network/NetworkProcessProxy.messages.in:
814 * UIProcess/Storage/StorageProcessProxy.cpp:
815 (WebKit::StorageProcessProxy::getLaunchOptions):
816 (WebKit::StorageProcessProxy::getStorageProcessConnection):
817 (WebKit::StorageProcessProxy::didClose):
818 (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
819 (WebKit::StorageProcessProxy::didFinishLaunching):
820 (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
821 (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
822 * UIProcess/Storage/StorageProcessProxy.h:
823 * UIProcess/Storage/StorageProcessProxy.messages.in:
825 * UIProcess/WebContextClient.cpp:
826 (WebKit::WebContextClient::storageProcessDidCrash):
827 (WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
828 * UIProcess/WebContextClient.h:
830 * UIProcess/WebProcessPool.cpp:
831 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
832 (WebKit::WebProcessPool::getStorageProcessConnection):
833 (WebKit::WebProcessPool::storageProcessCrashed):
834 (WebKit::WebProcessPool::pageAddedToProcess):
835 (WebKit::WebProcessPool::storageProcessIdentifier):
836 (WebKit::WebProcessPool::terminateStorageProcess):
837 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
838 (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
839 (WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
840 (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
841 (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
842 * UIProcess/WebProcessPool.h:
843 (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
844 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.
846 * UIProcess/WebProcessProxy.cpp:
847 (WebKit::WebProcessProxy::getStorageProcessConnection):
848 (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
849 * UIProcess/WebProcessProxy.h:
850 * UIProcess/WebProcessProxy.messages.in:
852 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
853 (WebKit::WebsiteDataStore::fetchDataAndApply):
854 (WebKit::WebsiteDataStore::removeData):
855 (WebKit::WebsiteDataStore::storageProcessParameters):
856 (WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
857 * UIProcess/WebsiteData/WebsiteDataStore.h:
859 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
860 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
861 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
863 * WebProcess/Databases/WebDatabaseProvider.cpp:
864 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
866 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
867 (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
868 (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
869 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
870 (WebKit::WebToStorageProcessConnection::didClose):
871 (WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
872 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
873 (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
874 (WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
875 (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
876 (WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
877 (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
878 (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
879 * WebProcess/Storage/WebToStorageProcessConnection.h:
880 (WebKit::WebToStorageProcessConnection::create):
881 (WebKit::WebToDatabaseProcessConnection::create): Deleted.
882 (WebKit::WebToDatabaseProcessConnection::connection): Deleted.
884 * WebProcess/WebProcess.cpp:
885 (WebKit::WebProcess::webToStorageProcessConnectionClosed):
886 (WebKit::WebProcess::webToStorageProcessConnection):
887 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
888 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
889 (WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
890 (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
891 * WebProcess/WebProcess.h:
893 2017-08-01 Brady Eidson <beidson@apple.com>
895 Part 1 of: Rename DatabaseProcess to StorageProcess.
896 https://bugs.webkit.org/show_bug.cgi?id=174879
898 Reviewed by Andy Estes.
900 This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).
902 Some renaming in actual code did result (Some class/struct names, method names, etc)
904 Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"
907 * DerivedSources.make:
911 * WebKit.xcodeproj/project.pbxproj:
913 * Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
914 * StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
915 * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
917 * Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
918 * Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.
920 * StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
921 * StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
923 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
924 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
925 * StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
927 * StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
928 * StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
929 * StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.
931 * StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
932 * StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
933 * StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
935 * StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
936 * StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
937 * StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
938 * StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
939 * UIProcess/Network/NetworkProcessProxy.cpp:
941 * UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
942 * UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
943 * UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.
945 * UIProcess/WebContextSupplement.h:
946 * UIProcess/WebProcessPool.cpp:
947 * UIProcess/WebProcessPool.h:
948 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
949 * UIProcess/WebsiteData/WebsiteDataStore.h:
950 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
951 * WebProcess/Databases/WebDatabaseProvider.cpp:
953 * WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
954 * WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.
956 * WebProcess/WebProcess.cpp:
958 2017-08-01 Michael Catanzaro <mcatanzaro@igalia.com>
960 [CMake] WebKitFS.cmake depends on options set in Option cmake files that are included later
961 https://bugs.webkit.org/show_bug.cgi?id=174855
963 Reviewed by Carlos Garcia Campos.
965 Don't create derived sources directory here anymore.
971 2017-07-31 Daniel Bates <dabates@apple.com>
973 WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction() may not be able to
974 determine page that initiated navigation
975 https://bugs.webkit.org/show_bug.cgi?id=174531
977 Remove a comment from WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction()
978 about determining the originating page independently from the originating frame. There
979 does not seem to be much value to fixing this. We can always revisit this issue if we
980 discover a strong motivating example. See <https://bugs.webkit.org/show_bug.cgi?id=174531#c1>
983 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
984 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
986 2017-07-31 Sam Weinig <sam@webkit.org>
988 Remove unnecessary exceptions from storage code
989 https://bugs.webkit.org/show_bug.cgi?id=174572
991 Reviewed by Chris Dumez.
993 * WebProcess/Storage/StorageAreaImpl.cpp:
994 (WebKit::StorageAreaImpl::canAccessStorage): Deleted.
995 * WebProcess/Storage/StorageAreaImpl.h:
996 * WebProcess/Storage/StorageNamespaceImpl.cpp:
997 Remove canAccessStorage. It is no longer called.
999 2017-07-30 Brady Eidson <beidson@apple.com>
1001 Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
1002 https://bugs.webkit.org/show_bug.cgi?id=174958
1004 Reviewed by Darin Adler.
1006 * UIProcess/API/APIURLSchemeTask.h:
1008 * UIProcess/API/C/WKTestingSupport.cpp:
1009 (WKGetAPIURLSchemeTaskInstanceCount):
1010 (WKGetWebURLSchemeTaskInstanceCount):
1011 * UIProcess/API/C/WKTestingSupport.h:
1013 * UIProcess/WebURLSchemeTask.h:
1015 * WebKit.xcodeproj/project.pbxproj:
1017 2017-07-29 Yusuke Suzuki <utatane.tea@gmail.com>
1019 Unreviewed, build fix for GTK and WPE about StorageProcess renaming
1022 * PlatformGTK.cmake:
1023 * PlatformMac.cmake:
1024 * PlatformWPE.cmake:
1026 2017-07-28 Brent Fulgham <bfulgham@apple.com>
1028 [Mac][WebKit2] WebKit sandbox errors while streaming Netflix
1029 https://bugs.webkit.org/show_bug.cgi?id=174955
1030 <rdar://problem/33583994>
1032 Reviewed by Alex Christensen.
1034 Wider testing with the stricter sandboxing rules identified three more IOKit properties we need to expose:
1036 - CEAPixelRepetition
1039 * WebProcess/com.apple.WebProcess.sb.in:
1041 2017-07-28 Commit Queue <commit-queue@webkit.org>
1043 Unreviewed, rolling out r219986.
1044 https://bugs.webkit.org/show_bug.cgi?id=174962
1046 "broke PLT on iOS (rdar://problem/33602751)" (Requested by
1051 "Part 1 of: Rename DatabaseProcess to StorageProcess."
1052 https://bugs.webkit.org/show_bug.cgi?id=174879
1053 http://trac.webkit.org/changeset/219986
1055 2017-07-28 Commit Queue <commit-queue@webkit.org>
1057 Unreviewed, rolling out r219990.
1058 https://bugs.webkit.org/show_bug.cgi?id=174961
1060 "broke PLT on iOS (rdar://problem/33602751)" (Requested by
1065 "Part 2 of: Rename DatabaseProcess to StorageProcess."
1066 https://bugs.webkit.org/show_bug.cgi?id=174880
1067 http://trac.webkit.org/changeset/219990
1069 2017-07-28 Brady Eidson <beidson@apple.com>
1071 API tests that use URLSchemeHandler are failing.
1072 https://bugs.webkit.org/show_bug.cgi?id=174950
1074 Reviewed by Alex Christensen.
1076 Make sure that in all cases where we remove the last task from the page->task map...
1077 ...We also remove the map itself.
1079 * UIProcess/WebURLSchemeHandler.cpp:
1080 (WebKit::WebURLSchemeHandler::stopTask):
1081 (WebKit::WebURLSchemeHandler::taskCompleted):
1082 (WebKit::WebURLSchemeHandler::removeTaskFromPageMap):
1083 * UIProcess/WebURLSchemeHandler.h:
1085 2017-07-28 Brady Eidson <beidson@apple.com>
1087 WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped).
1088 <rdar://problem/33568276> and https://bugs.webkit.org/show_bug.cgi?id=174895
1090 Reviewed by Alex Christensen.
1092 There was a lot going on here:
1093 - There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks
1094 - WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object
1095 - When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks
1096 - If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks
1097 (and therefore the UIProcess tasks were also not getting cleaned up)
1098 - If a WebProcess crashed, the UIProcess was not cleaning up the related tasks
1100 * UIProcess/API/Cocoa/WKURLSchemeTask.mm:
1101 (-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask
1103 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
1104 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
1105 (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map
1106 so the wrapper and implementation object can both be destroyed.
1108 * UIProcess/WebPageProxy.cpp:
1109 (WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks.
1110 (WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks.
1111 (WebKit::WebPageProxy::stopAllURLSchemeTasks):
1112 * UIProcess/WebPageProxy.h:
1114 * UIProcess/WebURLSchemeHandler.cpp:
1115 (WebKit::WebURLSchemeHandler::startTask):
1116 (WebKit::WebURLSchemeHandler::stopAllTasksForPage):
1117 (WebKit::WebURLSchemeHandler::stopTask):
1118 (WebKit::WebURLSchemeHandler::taskCompleted):
1119 * UIProcess/WebURLSchemeHandler.h:
1121 * UIProcess/WebURLSchemeTask.cpp:
1122 (WebKit::WebURLSchemeTask::WebURLSchemeTask):
1123 * UIProcess/WebURLSchemeTask.h:
1124 (WebKit::WebURLSchemeTask::pageID): Store separate from the WebPage so messaging
1125 is possible even after the WebPage* has been cleared.
1127 * WebProcess/WebPage/WebPage.cpp:
1128 (WebKit::WebPage::stopAllURLSchemeTasks):
1129 * WebProcess/WebPage/WebPage.h:
1131 * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
1132 (WebKit::WebURLSchemeHandlerProxy::stopAllTasks):
1133 (WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
1134 (WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):
1135 (WebKit::WebURLSchemeHandlerProxy::removeTask):
1136 * WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
1138 * WebProcess/WebProcess.cpp:
1139 (WebKit::WebProcess::networkProcessConnectionClosed): Call stopAllURLSchemeTasks
1142 2017-07-28 Frederic Wang <fwang@igalia.cpm>
1144 Fix typo in scrollPositionChangedViaDelegatedScrolling
1145 https://bugs.webkit.org/show_bug.cgi?id=174937
1147 Reviewed by Wenson Hsieh.
1149 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1150 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1151 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
1153 2017-07-28 Jeremy Jones <jeremyj@apple.com>
1155 Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes.
1156 https://bugs.webkit.org/show_bug.cgi?id=174437
1158 Reviewed by Darin Adler.
1160 Remove redundant Web- prefix from classes in WebKit namespace.
1162 * DerivedSources.make:
1163 * UIProcess/API/Cocoa/WKWebView.mm:
1164 * UIProcess/Cocoa/PlaybackSessionManagerProxy.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h.
1165 * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in.
1166 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: Added.
1167 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h.
1168 * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in.
1169 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm.
1170 * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: Removed.
1171 * UIProcess/Cocoa/WebViewImpl.mm:
1172 (WebKit::WebViewImpl::updateMediaTouchBar):
1173 * UIProcess/WebPageProxy.cpp:
1174 (WebKit::m_weakPtrFactory):
1175 (WebKit::WebPageProxy::reattachToWebProcess):
1176 (WebKit::WebPageProxy::playbackSessionManager):
1177 (WebKit::WebPageProxy::videoFullscreenManager):
1178 * UIProcess/WebPageProxy.h:
1179 * UIProcess/ios/WebPageProxyIOS.mm:
1180 * WebKit.xcodeproj/project.pbxproj:
1181 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1182 * WebProcess/WebPage/WebPage.cpp:
1183 (WebKit::WebPage::playbackSessionManager):
1184 (WebKit::WebPage::videoFullscreenManager):
1185 * WebProcess/WebPage/WebPage.h:
1186 * WebProcess/cocoa/PlaybackSessionManager.h: Renamed from Source/WebKit/WebProcess/cocoa/WebPlaybackSessionManager.h.
1187 * WebProcess/cocoa/PlaybackSessionManager.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/WebPlaybackSessionManager.messages.in.
1188 * WebProcess/cocoa/PlaybackSessionManager.mm: Added.
1189 * WebProcess/cocoa/VideoFullscreenManager.h: Renamed from Source/WebKit/WebProcess/cocoa/WebVideoFullscreenManager.h.
1190 (WebKit::VideoFullscreenInterfaceContext::create):
1191 * WebProcess/cocoa/VideoFullscreenManager.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/WebVideoFullscreenManager.messages.in.
1192 * WebProcess/cocoa/VideoFullscreenManager.mm: Renamed from Source/WebKit/WebProcess/cocoa/WebVideoFullscreenManager.mm.
1193 * WebProcess/cocoa/WebPlaybackSessionManager.mm: Removed.
1195 2017-07-27 Zan Dobersek <zdobersek@igalia.com>
1197 [CMake] Re-add the StorageProcess executable target
1198 https://bugs.webkit.org/show_bug.cgi?id=174929
1200 Reviewed by Carlos Garcia Campos.
1202 Re-add the StorageProcess executable target that was removed in r219960.
1203 Back then it was still named DatabaseProcess, but the name changed in
1204 the following patches.
1208 2017-07-27 Brady Eidson <beidson@apple.com>
1210 Part 2 of: Rename DatabaseProcess to StorageProcess.
1211 https://bugs.webkit.org/show_bug.cgi?id=174880
1213 Reviewed by Andy Estes.
1215 Rename some more variables, classes, etc. to reflect the change.
1217 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1218 (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
1220 * NetworkProcess/NetworkProcess.cpp:
1221 (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
1222 (WebKit::NetworkProcess::didgrantSandboxExtensionsToStorageProcessForBlobs):
1223 (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
1224 (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
1225 * NetworkProcess/NetworkProcess.h:
1226 * NetworkProcess/NetworkProcess.messages.in:
1228 * Shared/ProcessExecutablePath.h:
1229 * Shared/gtk/ProcessExecutablePathGtk.cpp:
1230 (WebKit::executablePathOfStorageProcess):
1231 (WebKit::executablePathOfDatabaseProcess): Deleted.
1232 * Shared/wpe/ProcessExecutablePathWPE.cpp:
1233 (WebKit::executablePathOfStorageProcess):
1234 (WebKit::executablePathOfDatabaseProcess): Deleted.
1236 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1237 (WebKit::WebIDBConnectionToClient::putOrAdd):
1239 * StorageProcess/StorageProcess.cpp:
1240 (WebKit::StorageProcess::initializeWebsiteDataStore):
1241 (WebKit::StorageProcess::postStorageTask):
1242 (WebKit::StorageProcess::performNextStorageTask):
1243 (WebKit::StorageProcess::createStorageToWebProcessConnection):
1244 (WebKit::StorageProcess::fetchWebsiteData):
1245 (WebKit::StorageProcess::postDatabaseTask): Deleted.
1246 (WebKit::StorageProcess::performNextDatabaseTask): Deleted.
1247 (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
1248 * StorageProcess/StorageProcess.h:
1249 * StorageProcess/StorageProcess.messages.in:
1250 * StorageProcess/mac/StorageProcessMac.mm:
1251 (WebKit::StorageProcess::initializeProcessName):
1253 * UIProcess/API/C/WKContext.cpp:
1254 (WKContextGetDatabaseProcessIdentifier):
1256 * UIProcess/API/Cocoa/WKProcessPool.mm:
1257 (-[WKProcessPool _terminateStorageProcess]):
1258 (-[WKProcessPool _storageProcessIdentifier]):
1259 (-[WKProcessPool _terminateDatabaseProcess]): Deleted.
1260 (-[WKProcessPool _databaseProcessIdentifier]): Deleted.
1261 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1263 * UIProcess/Launcher/ProcessLauncher.h:
1264 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1265 (WebKit::ProcessLauncher::launchProcess):
1266 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1267 (WebKit::serviceName):
1268 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
1269 (WebKit::ProcessLauncher::launchProcess):
1271 * UIProcess/Network/NetworkProcessProxy.cpp:
1272 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
1273 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
1274 * UIProcess/Network/NetworkProcessProxy.h:
1275 * UIProcess/Network/NetworkProcessProxy.messages.in:
1277 * UIProcess/Storage/StorageProcessProxy.cpp:
1278 (WebKit::StorageProcessProxy::getLaunchOptions):
1279 (WebKit::StorageProcessProxy::getStorageProcessConnection):
1280 (WebKit::StorageProcessProxy::didClose):
1281 (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
1282 (WebKit::StorageProcessProxy::didFinishLaunching):
1283 (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
1284 (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
1285 * UIProcess/Storage/StorageProcessProxy.h:
1286 * UIProcess/Storage/StorageProcessProxy.messages.in:
1288 * UIProcess/WebContextClient.cpp:
1289 (WebKit::WebContextClient::storageProcessDidCrash):
1290 (WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
1291 * UIProcess/WebContextClient.h:
1293 * UIProcess/WebProcessPool.cpp:
1294 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
1295 (WebKit::WebProcessPool::getStorageProcessConnection):
1296 (WebKit::WebProcessPool::storageProcessCrashed):
1297 (WebKit::WebProcessPool::pageAddedToProcess):
1298 (WebKit::WebProcessPool::storageProcessIdentifier):
1299 (WebKit::WebProcessPool::terminateStorageProcess):
1300 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
1301 (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
1302 (WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
1303 (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
1304 (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
1305 * UIProcess/WebProcessPool.h:
1306 (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
1307 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.
1309 * UIProcess/WebProcessProxy.cpp:
1310 (WebKit::WebProcessProxy::getStorageProcessConnection):
1311 (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
1312 * UIProcess/WebProcessProxy.h:
1313 * UIProcess/WebProcessProxy.messages.in:
1315 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1316 (WebKit::WebsiteDataStore::fetchDataAndApply):
1317 (WebKit::WebsiteDataStore::removeData):
1318 (WebKit::WebsiteDataStore::storageProcessParameters):
1319 (WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
1320 * UIProcess/WebsiteData/WebsiteDataStore.h:
1322 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1323 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
1324 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1326 * WebProcess/Databases/WebDatabaseProvider.cpp:
1327 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
1329 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1330 (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
1331 (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
1332 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
1333 (WebKit::WebToStorageProcessConnection::didClose):
1334 (WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
1335 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
1336 (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
1337 (WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
1338 (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
1339 (WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
1340 (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
1341 (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
1342 * WebProcess/Storage/WebToStorageProcessConnection.h:
1343 (WebKit::WebToStorageProcessConnection::create):
1344 (WebKit::WebToDatabaseProcessConnection::create): Deleted.
1345 (WebKit::WebToDatabaseProcessConnection::connection): Deleted.
1347 * WebProcess/WebProcess.cpp:
1348 (WebKit::WebProcess::webToStorageProcessConnectionClosed):
1349 (WebKit::WebProcess::webToStorageProcessConnection):
1350 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
1351 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
1352 (WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
1353 (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
1354 * WebProcess/WebProcess.h:
1356 2017-07-27 Nan Wang <n_wang@apple.com>
1358 AX: A11Y: Zoom no longer follows keyboard insertion point in safari
1359 https://bugs.webkit.org/show_bug.cgi?id=174869
1361 Reviewed by David Kilzer.
1363 There was a recent change by denying XPC services access by default.
1364 In UAZoomChangeFocus we need to send message to HIServices, so let's
1365 allow the connection to XPC services for that.
1367 * WebProcess/com.apple.WebProcess.sb.in:
1369 2017-07-27 Brady Eidson <beidson@apple.com>
1371 Part 1 of: Rename DatabaseProcess to StorageProcess.
1372 https://bugs.webkit.org/show_bug.cgi?id=174879
1374 Reviewed by Andy Estes.
1376 This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).
1378 Some renaming in actual code did result (Some class/struct names, method names, etc)
1380 Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"
1383 * Configurations/Storage-iOS.entitlements: Renamed from Source/WebKit/Configurations/Databases-iOS.entitlements.
1384 * Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
1385 * Configurations/WebKit.xcconfig:
1386 * DerivedSources.make:
1387 * Platform/ExtraPrivateSymbolsForTAPI.h:
1388 * PlatformGTK.cmake:
1389 * PlatformMac.cmake:
1390 * PlatformWPE.cmake:
1392 * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Renamed from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
1394 * Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
1395 (WebKit::StorageProcessCreationParameters::StorageProcessCreationParameters):
1396 (WebKit::StorageProcessCreationParameters::encode):
1397 (WebKit::StorageProcessCreationParameters::decode):
1398 * Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.
1400 * StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
1401 * StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
1402 (StorageServiceInitializer):
1403 * StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
1406 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
1407 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
1408 * StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
1410 * StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
1411 * StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
1412 * StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.
1414 * StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
1415 * StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
1416 * StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
1418 * StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
1419 (WebKit::StorageProcessMainUnix):
1420 * StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
1421 (WebKit::StorageProcess::initializeProcess):
1422 (WebKit::StorageProcess::initializeProcessName):
1423 (WebKit::StorageProcess::initializeSandbox):
1424 * StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
1425 (WebKit::StorageProcess::initializeProcess):
1426 (WebKit::StorageProcess::initializeProcessName):
1427 (WebKit::StorageProcess::initializeSandbox):
1429 * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Copied from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
1430 * StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
1432 * StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
1434 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1435 (WebKit::serviceName):
1437 * UIProcess/Network/NetworkProcessProxy.cpp:
1438 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
1440 * UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
1441 * UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
1442 * UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.
1444 * UIProcess/WebContextSupplement.h:
1445 (WebKit::WebContextSupplement::processDidClose):
1447 * UIProcess/WebProcessPool.cpp:
1448 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore):
1449 (WebKit::WebProcessPool::databaseProcessCrashed):
1450 (WebKit::WebProcessPool::pageAddedToProcess):
1451 * UIProcess/WebProcessPool.h:
1453 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1454 (WebKit::WebsiteDataStore::databaseProcessParameters):
1455 * UIProcess/WebsiteData/WebsiteDataStore.h:
1457 * WebKit.xcodeproj/project.pbxproj:
1459 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1460 (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
1461 (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
1462 * WebProcess/Databases/WebDatabaseProvider.cpp:
1464 * WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
1465 * WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.
1467 * WebProcess/WebProcess.cpp:
1469 2017-07-27 Tim Horton <timothy_horton@apple.com>
1471 PDF page number indicator is very flashy when scrolling
1472 https://bugs.webkit.org/show_bug.cgi?id=174882
1473 <rdar://problem/23760981>
1475 Reviewed by Andy Estes.
1477 * Platform/spi/ios/UIKitSPI.h:
1478 * UIProcess/ios/WKPDFPageNumberIndicator.mm:
1479 (-[WKPDFPageNumberIndicator initWithFrame:]):
1480 Increase the backdrop rendering resolution to reduce flashiness.
1481 It's still not perfect, but it's quite visibly better.
1483 2017-07-26 Brady Eidson <beidson@apple.com>
1485 ResourceLoadStatistics API tests fail on El Capitan.
1486 https://bugs.webkit.org/show_bug.cgi?id=174877
1488 Reviewed by Chris Dumez.
1490 Always install the testing callback.
1492 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1493 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1495 2017-07-26 Tim Horton <timothy_horton@apple.com>
1497 REGRESSION (r211160): Can't pinch to zoom unlocked encrypted PDFs in WKWebView
1498 https://bugs.webkit.org/show_bug.cgi?id=174881
1499 <rdar://problem/33556312>
1501 Reviewed by Andy Estes.
1503 * UIProcess/API/Cocoa/WKWebView.mm:
1504 (-[WKWebView _hidePasswordView]):
1505 WKPasswordView saves and restores a bunch of scroll view properties, including
1506 those relating to zoom limits. The restoration happens in -[WKPasswordView hide],
1507 which is never called. Instead, the code added in r211160 just calls
1508 removeFromSuperview after unlocking, never restoring the old zoom limits,
1509 causing the then fully unlocked PDF to not be zoomable. Fix this by calling
1510 -hide instead of -removeFromSuperview (which -hide also calls).
1512 2017-07-26 Brady Eidson <beidson@apple.com>
1514 Rename {Web/UI}Process/Storage to {Web/UI}Process/WebStorage.
1515 https://bugs.webkit.org/show_bug.cgi?id=174871
1517 Reviewed by Chris Dumez.
1519 The standard these directories help implement is the "Web Storage" standard.
1520 "Storage" is too general of a word that we have plans to start using in other contexts soon.
1523 * DerivedSources.make:
1524 * PlatformGTK.cmake:
1525 * PlatformMac.cmake:
1526 * PlatformWPE.cmake:
1527 * WebKit.xcodeproj/project.pbxproj:
1529 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp.
1530 * UIProcess/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h.
1531 * UIProcess/WebStorage/LocalStorageDatabase.cpp: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabase.cpp.
1532 * UIProcess/WebStorage/LocalStorageDatabase.h: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabase.h.
1533 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabaseTracker.cpp.
1534 * UIProcess/WebStorage/LocalStorageDatabaseTracker.h: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabaseTracker.h.
1535 * UIProcess/WebStorage/StorageManager.cpp: Renamed from Source/WebKit/UIProcess/Storage/StorageManager.cpp.
1536 * UIProcess/WebStorage/StorageManager.h: Renamed from Source/WebKit/UIProcess/Storage/StorageManager.h.
1537 * UIProcess/WebStorage/StorageManager.messages.in: Renamed from Source/WebKit/UIProcess/Storage/StorageManager.messages.in.
1538 * UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: Renamed from Source/WebKit/UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm.
1539 * UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm: Renamed from Source/WebKit/UIProcess/Storage/ios/ResourceLoadStatisticsPersistentStorageIOS.mm.
1541 * WebProcess/WebStorage/StorageAreaImpl.cpp: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaImpl.cpp.
1542 * WebProcess/WebStorage/StorageAreaImpl.h: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaImpl.h.
1543 * WebProcess/WebStorage/StorageAreaMap.cpp: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaMap.cpp.
1544 * WebProcess/WebStorage/StorageAreaMap.h: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaMap.h.
1545 * WebProcess/WebStorage/StorageAreaMap.messages.in: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaMap.messages.in.
1546 * WebProcess/WebStorage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit/WebProcess/Storage/StorageNamespaceImpl.cpp.
1547 * WebProcess/WebStorage/StorageNamespaceImpl.h: Renamed from Source/WebKit/WebProcess/Storage/StorageNamespaceImpl.h.
1548 * WebProcess/WebStorage/WebStorageNamespaceProvider.cpp: Renamed from Source/WebKit/WebProcess/Storage/WebStorageNamespaceProvider.cpp.
1549 * WebProcess/WebStorage/WebStorageNamespaceProvider.h: Renamed from Source/WebKit/WebProcess/Storage/WebStorageNamespaceProvider.h.
1551 2017-07-26 Brady Eidson <beidson@apple.com>
1553 Remove DATABASE_PROCESS build flag.
1554 https://bugs.webkit.org/show_bug.cgi?id=174868
1556 Reviewed by Andy Estes.
1559 * DatabaseProcess/DatabaseProcess.cpp:
1560 * DatabaseProcess/DatabaseProcess.h:
1561 * DatabaseProcess/DatabaseProcess.messages.in:
1562 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1563 * DatabaseProcess/DatabaseToWebProcessConnection.h:
1564 * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
1565 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1566 * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp:
1567 * DatabaseProcess/ios/DatabaseProcessIOS.mm:
1568 * DatabaseProcess/mac/DatabaseProcessMac.mm:
1569 * DatabaseProcess/unix/DatabaseProcessMainUnix.h:
1570 * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1571 * Shared/Databases/DatabaseProcessCreationParameters.h:
1572 * Shared/ProcessExecutablePath.h:
1573 * Shared/gtk/ProcessExecutablePathGtk.cpp:
1574 (WebKit::executablePathOfDatabaseProcess):
1575 * Shared/wpe/ProcessExecutablePathWPE.cpp:
1576 (WebKit::executablePathOfDatabaseProcess):
1577 * UIProcess/ChildProcessProxy.cpp:
1578 (WebKit::ChildProcessProxy::getLaunchOptions):
1579 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1580 * UIProcess/Databases/DatabaseProcessProxy.h:
1581 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1582 * UIProcess/Launcher/ProcessLauncher.h:
1583 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1584 (WebKit::ProcessLauncher::launchProcess):
1585 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1586 (WebKit::serviceName):
1587 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
1588 (WebKit::ProcessLauncher::launchProcess):
1589 * UIProcess/Network/NetworkProcessProxy.cpp:
1590 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
1591 * UIProcess/WebProcessPool.cpp:
1592 (WebKit::WebProcessPool::databaseProcessCrashed):
1593 (WebKit::WebProcessPool::databaseProcessIdentifier):
1594 (WebKit::WebProcessPool::terminateDatabaseProcess):
1595 * UIProcess/WebProcessPool.h:
1596 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary):
1597 * UIProcess/WebProcessProxy.cpp:
1598 (WebKit::WebProcessProxy::getDatabaseProcessConnection):
1599 * UIProcess/WebProcessProxy.h:
1600 * UIProcess/WebProcessProxy.messages.in:
1601 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1602 (WebKit::WebsiteDataStore::fetchDataAndApply):
1603 (WebKit::WebsiteDataStore::removeData):
1605 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
1606 * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1607 * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1608 * WebProcess/WebProcess.cpp:
1609 * WebProcess/WebProcess.h:
1611 2017-07-26 Brady Eidson <beidson@apple.com>
1613 Add test to verify certain child processes are not launched as a side effect of enabling ResourceLoadStatistics.
1614 https://bugs.webkit.org/show_bug.cgi?id=174851
1616 Reviewed by Chris Dumez.
1618 * UIProcess/API/Cocoa/WKProcessPool.mm:
1619 (-[WKProcessPool _databaseProcessIdentifier]):
1620 (-[WKProcessPool _pluginProcessCount]):
1621 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1623 * UIProcess/Plugins/PluginProcessManager.h:
1624 (WebKit::PluginProcessManager::pluginProcesses):
1626 2017-07-26 Brian Burg <bburg@apple.com>
1628 Remove WEB_TIMING feature flag
1629 https://bugs.webkit.org/show_bug.cgi?id=174795
1631 Reviewed by Alex Christensen.
1633 * Configurations/FeatureDefines.xcconfig:
1634 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1635 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1636 (WebKit::NetworkDataTaskSoup::createRequest):
1637 (WebKit::NetworkDataTaskSoup::didSendRequest):
1638 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1639 (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
1640 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1641 (WebKit::NetworkDataTaskSoup::didGetHeaders):
1642 (WebKit::NetworkDataTaskSoup::didRestart):
1643 * NetworkProcess/soup/NetworkDataTaskSoup.h:
1645 2017-07-26 Brian Burg <bburg@apple.com>
1647 Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
1648 https://bugs.webkit.org/show_bug.cgi?id=174828
1650 Reviewed by Tim Horton.
1652 In the previous change I forgot to hoist the HandleArray and message-send out of the
1653 loop, so the code wasn't actually sending fewer messages. That's fixed now.
1655 * UIProcess/WebPageProxy.cpp:
1656 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
1657 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1659 2017-07-26 Zan Dobersek <zdobersek@igalia.com>
1661 Unreviewed. Fix a compiler warning that springs up when
1662 building the WPE port with Clang.
1664 * UIProcess/API/wpe/ScrollGestureController.h:
1665 Let ScrollGestureController be a class, and not a struct.
1666 This fits the usual pattern, and also matches the forward
1667 declaration used in WPE's PageClientImpl.h.
1669 2017-07-26 Carlos Garcia Campos <cgarcia@igalia.com>
1671 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.5 release.
1673 * gtk/NEWS: Add release notes for 2.17.5.
1675 2017-07-25 Carlos Garcia Campos <cgarcia@igalia.com>
1677 Icon loader error on startup
1678 https://bugs.webkit.org/show_bug.cgi?id=174787
1680 Reviewed by Brady Eidson.
1682 Ignore non HTTP favicons in glib API.
1684 * UIProcess/API/glib/WebKitIconLoadingClient.cpp:
1686 2017-07-25 Brady Eidson <beidson@apple.com>
1688 ResourceLoadStatistics grandfathering happens much too often.
1689 <rdar://problem/32655834> and https://bugs.webkit.org/show_bug.cgi?id=174825
1691 Reviewed by Chris Dumez.
1693 The ResourceLoadStatistics grandfathering procedure happens too often.
1694 - With an empty memory store, even though an empty memory store is a perfectly valid state.
1695 - On each launch, even if grandfathering happened on the last launch - because grandfathering
1696 data would not automatically be saved to disk.
1697 - After clearing all website data, at which point no grandfathering can possibly be relevant
1698 because there is no data to grandfather.
1700 This patch fixes those cases and adds API tests to verify they remain fixed.
1702 * Shared/WebsiteData/WebsiteDataType.h:
1704 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1705 (+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]): allWebsiteDataTypes, but even with the private ones.
1706 (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): If the types being cleared cover all of
1707 the types that ResourceLoadStatistics care about, don't grandfather afterwards.
1708 (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Ditto.
1709 (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):
1710 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1712 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:
1713 (WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): Don't grandfather if the store read from
1714 disk is empty (as being empty is perfectly fine), and also log the event of "populated without grandfathering".
1715 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
1717 * UIProcess/WebProcessProxy.cpp:
1718 (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
1720 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1721 (WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):
1722 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1723 (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
1724 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1725 (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): Schedule a write right away so we don't re-grandfather
1726 on next launch, and also log the grandfathering event.
1727 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): Takes a ShouldGrandfather flag
1728 to tell whether or not data should be re-grandfathered after the store is cleared.
1729 (WebKit::WebResourceLoadStatisticsStore::logTestingEvent): Log the event to the testing client.
1730 (WebKit::dataTypesToRemove): Deleted.
1731 * UIProcess/WebResourceLoadStatisticsStore.h:
1733 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1734 (WebKit::WebsiteDataStore::removeData):
1735 (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
1736 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): Handles enabling ResourceLoadStatistics both
1737 with and without a testing callback.
1738 * UIProcess/WebsiteData/WebsiteDataStore.h:
1740 2017-07-25 Andy Estes <aestes@apple.com>
1742 [Apple Pay] Add "carteBancaire" as a supported payment network
1743 https://bugs.webkit.org/show_bug.cgi?id=174841
1744 <rdar://problem/31935596>
1746 Reviewed by Alex Christensen.
1748 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1749 (WebKit::toSupportedNetwork):
1751 2017-07-25 Brian Burg <bburg@apple.com>
1753 Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
1754 https://bugs.webkit.org/show_bug.cgi?id=174828
1756 Reviewed by Tim Horton.
1758 Send all of the sandbox extension handles in a single message, rather than
1759 one message per extension. Update message name and parameter types to match.
1761 * UIProcess/WebPageProxy.cpp:
1762 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
1763 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1764 * WebProcess/WebPage/WebPage.cpp:
1765 (WebKit::WebPage::extendSandboxForFilesFromOpenPanel):
1766 (WebKit::WebPage::extendSandboxForFileFromOpenPanel): Deleted.
1767 * WebProcess/WebPage/WebPage.h:
1768 * WebProcess/WebPage/WebPage.messages.in:
1770 2017-07-25 Alex Christensen <achristensen@webkit.org>
1772 Fix API tests after r219871.
1773 https://bugs.webkit.org/show_bug.cgi?id=174807
1775 WebKit2.OpenAndCloseWindowAsync and WebKit2.OpenAsyncWithNil API tests are fixed.
1777 * UIProcess/WebPageProxy.cpp:
1778 (WebKit::WebPageProxy::createNewPage):
1779 createNewPageAsync or createNewPage should be called, not both.
1781 2017-07-25 Said Abou-Hallawa <sabouhallawa@apple.com>
1783 Async image decoding for large images should be disabled after the first time a tile is painted
1784 https://bugs.webkit.org/show_bug.cgi?id=174451
1785 <rdar://problem/31246421>
1787 Reviewed by Simon Fraser.
1789 * Shared/mac/RemoteLayerBackingStore.mm:
1790 (WebKit::RemoteLayerBackingStore::drawInContext):
1791 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1792 (WebKit::imageForRect):
1793 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1794 (WebKit::InjectedBundleRangeHandle::renderedImage):
1795 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1796 (WebKit::CompositingCoordinator::paintContents):
1797 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1799 2017-07-25 Brian Burg <bburg@apple.com>
1801 Web Automation: add support for uploading files
1802 https://bugs.webkit.org/show_bug.cgi?id=174797
1803 <rdar://problem/28485063>
1805 Reviewed by Joseph Pecoraro.
1807 The general strategy is to have automation clients set the list of files they want
1808 to select ahead of time. Then, the client simulates a click on the <input type="file"> element.
1809 When that causes WebPageProxy to ask the UI delegate to runOpenPanel, it instead
1810 gives WebAutomationSession a chance to select files if the page is under control of
1811 automation. WebAutomationSession validates its file list and selects the files if valid.
1813 * CMakeLists.txt: Add frontend dispatcher files.
1814 * DerivedSources.make:
1815 Add frontend dispatcher code generator scripts as dependencies of the generated code.
1816 Add generated frontend dispatcher files to the list of output files.
1818 * UIProcess/Automation/Automation.json:
1819 Add a command to set the canned list of files that should be selected when prompted.
1820 If no files are selected, then the effect is as if the user had clicked "cancel" in
1821 the file chooser dialog.
1823 Add an event to signal to the WebDriver service that the file selection request has
1824 been either fulfilled or cancelled. This event is necessary because otherwise remotes
1825 cannot distinguish whether selecting the files failed for some reason, or if the
1826 UIProcess has not yet selected the files and sent them to the web content process.
1827 In either case, the input element's "files" attribute would return an empty FileList.
1829 * UIProcess/Automation/WebAutomationSession.h:
1830 * UIProcess/Automation/WebAutomationSession.cpp:
1831 (WebKit::WebAutomationSession::WebAutomationSession):
1832 Add the frontend dispatcher for Automation domain. This is named m_domainNotifier since
1833 m_domainDispatcher is already being used for the backend command dispatcher.
1835 (WebKit::WebAutomationSession::handleRunOpenPanel):
1836 Validate that the files-to-select list has valid entries and select the files if so.
1837 If anything goes wrong, pretend to cancel out of the file chooser. Either way, notify the
1838 frontend with an event that the file chooser was dismissed due to selecting files or cancelling.
1839 Automation protocol clients may implement additional strategies to further restrict
1840 the conditions upon which local files can be uploaded.
1842 (WebKit::WebAutomationSession::setFilesToSelectForFileUpload): Added.
1843 Store the list of files as a vector of strings. The file list is always replaced.
1845 * UIProcess/WebPageProxy.cpp:
1846 (WebKit::WebPageProxy::runOpenPanel):
1847 If the page is under automation, delegating the runOpenPanel is likely to hang
1848 because WebDriver cannot interact directly with the file chooser dialog. Instead,
1849 give WebAutomationSession a chance to select files and don't tell the delegate.
1851 * WebKit.xcodeproj/project.pbxproj:
1852 Add frontend dispatcher files to "Derived Sources" group.
1854 2017-07-25 Alex Christensen <achristensen@webkit.org>
1856 Modernize NavigationAction code
1857 https://bugs.webkit.org/show_bug.cgi?id=174807
1859 Reviewed by Darin Adler.
1861 Mostly just use more move semantics.
1863 * Platform/IPC/HandleMessage.h:
1864 (IPC::callMemberFunctionImpl):
1865 * Shared/API/APIURLRequest.h:
1866 * Shared/NavigationActionData.h:
1867 * UIProcess/API/APINavigation.cpp:
1868 (API::Navigation::Navigation):
1869 * UIProcess/API/APINavigation.h:
1870 (API::Navigation::create):
1871 * UIProcess/API/APINavigationAction.h:
1872 * UIProcess/API/APINavigationClient.h:
1873 (API::NavigationClient::decidePolicyForNavigationAction):
1874 * UIProcess/API/APIPolicyClient.h:
1875 * UIProcess/API/APIUIClient.h:
1876 (API::UIClient::createNewPage):
1877 (API::UIClient::createNewPageAsync):
1878 (API::UIClient::canCreateNewPageAsync):
1879 * UIProcess/API/C/WKPage.cpp:
1880 (WKPageLoadURLRequest):
1881 (WKPageLoadURLRequestWithUserData):
1882 (WKPageSetPageUIClient):
1883 (WKPageSetPageNavigationClient):
1884 * UIProcess/Cocoa/NavigationState.h:
1885 * UIProcess/Cocoa/NavigationState.mm:
1886 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1887 * UIProcess/Cocoa/UIDelegate.h:
1888 * UIProcess/Cocoa/UIDelegate.mm:
1889 (WebKit::UIDelegate::UIClient::createNewPageCommon):
1890 (WebKit::UIDelegate::UIClient::createNewPage):
1891 (WebKit::UIDelegate::UIClient::canCreateNewPageAsync):
1892 (WebKit::UIDelegate::UIClient::createNewPageAsync):
1893 * UIProcess/WebInspectorProxy.cpp:
1894 (WebKit::decidePolicyForNavigationAction):
1895 * UIProcess/WebNavigationState.cpp:
1896 (WebKit::WebNavigationState::createLoadRequestNavigation):
1897 * UIProcess/WebNavigationState.h:
1898 * UIProcess/WebPageProxy.cpp:
1899 (WebKit::WebPageProxy::loadRequest):
1900 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1901 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1902 (WebKit::WebPageProxy::createNewPage):
1903 * UIProcess/WebPageProxy.h:
1905 2017-07-25 Carlos Garcia Campos <cgarcia@igalia.com>
1907 REGRESSION(r218629): [GTK] ASSERTION FAILED: m_eglDisplay == EGL_NO_DISPLAY in WebCore::PlatformDisplay::~PlatformDisplay
1908 https://bugs.webkit.org/show_bug.cgi?id=174789
1910 Reviewed by Žan Doberšek.
1912 Before r218629, the wayland nested compositor display was a singleton created on demand by
1913 AcceleratedSurfaceWayland, but now it's created unconditionally on web process creation when a valid display
1914 name is received from the UI process. The side effect of this is that now the shared display is created after
1915 the nested compositor display that is not a singleton anymore. The atexit used by PlatformDisplay to shutdown
1916 egl display assumes that it will be registered by the shared display. Since we switched to on demand AC mode,
1917 the shared display is only used in the web process when entering AC mode, that's why it only crashes when we
1918 have entered AC at least once. We just need to ensure that the shared display is created before the nested
1921 * WebProcess/gtk/WaylandCompositorDisplay.cpp:
1922 (WebKit::WaylandCompositorDisplay::create): Check we are under wayland before creating the WaylandCompositorDisplay.
1924 2017-07-24 Michael Catanzaro <mcatanzaro@igalia.com>
1926 [GTK] ASSERTION FAILED: client in WebKit::IconDatabase::setClient
1927 https://bugs.webkit.org/show_bug.cgi?id=174788
1929 Reviewed by Carlos Garcia Campos.
1931 IconDatabase ensures that setClient is never called with nullptr, but WebKitFaviconDatabase
1932 does exactly that. First, ensure it's safe to unset the client. Next, we can either remove
1933 the assertions from setClient or else automatically unset the client in IconDatabase::close.
1936 * UIProcess/API/glib/IconDatabase.cpp:
1937 (WebKit::IconDatabase::close):
1938 (WebKit::IconDatabase::setIconDataForIconURL):
1939 (WebKit::IconDatabase::setIconURLForPageURL):
1940 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1941 (_WebKitFaviconDatabasePrivate::~_WebKitFaviconDatabasePrivate): Deleted.
1942 (webkitFaviconDatabaseDispose): Deleted.
1944 2017-07-24 Michael Catanzaro <mcatanzaro@igalia.com>
1946 [GTK][WPE] Remove useless conditional in IconDatabase::setIconDataForIconURL
1947 https://bugs.webkit.org/show_bug.cgi?id=174792
1949 Reviewed by Carlos Garcia Campos.
1951 We have in IconDatabase::setIconDataForIconURL some code in a conditional to check if it's
1952 not being executed on the icon sync thread. But at the top of the function is an assertion
1953 to ensure the code is never executed on the icon sync thread. The condition is therefore
1954 useless and the code should be executed unconditionally.
1956 * UIProcess/API/glib/IconDatabase.cpp:
1957 (WebKit::IconDatabase::setIconDataForIconURL):
1959 2017-07-24 Carlos Garcia Campos <cgarcia@igalia.com>
1961 [GTK] Icon database error and crash
1962 https://bugs.webkit.org/show_bug.cgi?id=174760
1964 Reviewed by Michael Catanzaro.
1966 The crash is a debug ASSERT that happens when the IconRecord image is created in one thread and destroyed in
1967 another one. IconDatabase creates and destroys IconRecord objects in both database and main thread. The
1968 IconRecord is destroyed when the icon is no longer retained, and we only release icons when we fail to get the
1969 image data (including pages that don't have a favicon). We can prevent this crash from happening if we ensure we
1970 never create an Image for an IconRecord when the given image data is nullptr.
1972 * UIProcess/API/glib/IconDatabase.cpp:
1973 (WebKit::IconDatabase::IconRecord::setImageData):
1975 2017-07-24 Chris Dumez <cdumez@apple.com>
1977 [WK2][Cocoa] Allow overriding the ITP data removal internal using a default
1978 https://bugs.webkit.org/show_bug.cgi?id=174802
1979 <rdar://problem/33497898>
1981 Reviewed by Sam Weinig.
1983 Allow overriding the ITP data removal internal using a default to facilitate testing.
1984 Can be used like so:
1985 defaults write -g ResourceLoadStatisticsMinimumTimeBetweenDataRecordsRemoval 60
1987 Will cause us to write every 60 seconds instead of 3600.
1989 * Shared/WebPreferencesDefinitions.h:
1990 * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
1991 (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
1993 2017-07-24 Simon Fraser <simon.fraser@apple.com>
1995 [iOS WK2] Crash under PageOverlayController::uninstallPageOverlay when doing multiple finds
1996 https://bugs.webkit.org/show_bug.cgi?id=174806
1997 rdar://problem/33501664
1999 Reviewed by Tim Horton.
2001 Calling TextIndicator::createWithSelectionInFrame can trigger layout via VisibleSelection code,
2002 which can re-enter FindController::updateFindIndicator which has by now removed m_findIndicatorOverlay
2003 from pageOverlayController's map, but not deleted it. The second call to uninstallPageOverlay()
2004 thus crashes at m_overlayGraphicsLayers.take(&overlay)->removeFromParent().
2006 Fix by nulling out m_findIndicatorOverlay as soon as we uninstall it.
2008 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2009 (WebKit::FindController::updateFindIndicator):
2011 2017-07-24 Chris Dumez <cdumez@apple.com>
2013 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()
2014 https://bugs.webkit.org/show_bug.cgi?id=174790
2016 Reviewed by Brady Eidson.
2018 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore().
2019 WorkQueue::dispatchAfter() keeps the WorkQueue alive because its implementation keeps a strong ref to
2020 |this|. As a result, the lambda passed to dispatchAfter(), which calls writeMemoryStoreToDisk(), can
2021 get executed after the store is gone.
2023 To address the issue, we now use a RunLoop::Timer to schedule the write, instead of a
2024 WorkQueue::dispatchAfter() call. This way, we are guaranteed that the callback will not get called
2025 after the store has been destroyed.
2027 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:
2028 (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
2029 (WebKit::ResourceLoadStatisticsPersistentStorage::asyncWriteTimerFired):
2030 (WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore):
2031 (WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously):
2032 (WebKit::ResourceLoadStatisticsPersistentStorage::ref):
2033 (WebKit::ResourceLoadStatisticsPersistentStorage::deref):
2034 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
2036 2017-07-24 Chris Dumez <cdumez@apple.com>
2038 Unreviewed, rolling out r219828.
2040 Causes debug assertions to be hit on iOS
2044 "Fix lifetime management issue in
2045 ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()"
2046 https://bugs.webkit.org/show_bug.cgi?id=174790
2047 http://trac.webkit.org/changeset/219828
2049 2017-07-24 Michael Catanzaro <mcatanzaro@igalia.com>
2051 [GTK][WPE] Stop using AutodrainedPool in IconDatabase
2052 https://bugs.webkit.org/show_bug.cgi?id=174791
2054 Reviewed by Alex Christensen.
2056 AutodrainedPool seems to be some NS garbage collection thing that has no implementation on
2057 other platforms. Now that IconDatabase is used only by GTK and WPE, we can stop using it.
2059 * UIProcess/API/glib/IconDatabase.cpp:
2060 (WebKit::IconDatabase::setIconDataForIconURL):
2061 (WebKit::IconDatabase::setIconURLForPageURL):
2062 (WebKit::IconDatabase::iconDatabaseSyncThread):
2063 (WebKit::IconDatabase::performURLImport):
2064 (WebKit::IconDatabase::readFromDatabase):
2066 2017-07-24 Chris Dumez <cdumez@apple.com>
2068 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()
2069 https://bugs.webkit.org/show_bug.cgi?id=174790
2071 Reviewed by Brady Eidson.
2073 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore().
2074 WorkQueue::dispatchAfter() keeps the WorkQueue alive because its implementation keeps a strong ref to
2075 |this|. As a result, the lambda passed to dispatchAfter(), which calls writeMemoryStoreToDisk(), can
2076 get executed after the store is gone.
2078 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:
2079 (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
2080 (WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore):
2081 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
2082 (WebKit::ResourceLoadStatisticsPersistentStorage::createWeakPtr):
2084 2017-07-23 Carlos Garcia Campos <cgarcia@igalia.com>
2086 Unreviewed. REGRESSION(r219713): [GTK][WPE] Fix default favicon database patch.
2088 When nullptr is passed to webkit_web_context_set_favicon_database_directory() the default database directory was
2089 taken from WebProcessPool::platformDefaultIconDatabasePath(), that has been removed in r219713 without properly
2090 replacing it, now it uses an empty string. This causes that the current directory is used to create the favicon
2093 * UIProcess/API/glib/WebKitWebContext.cpp:
2094 (webkit_web_context_set_favicon_database_directory): Use the default icon database directory instead of an empty
2095 string when nullptr is passed.
2097 2017-07-23 Wenson Hsieh <wenson_hsieh@apple.com>
2099 [iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values
2100 https://bugs.webkit.org/show_bug.cgi?id=174769
2101 <rdar://problem/33478864>
2103 Reviewed by Tim Horton.
2105 Fixes several API tests in the DataInteractionTests suite. See Source/WebCore/ChangeLog for more details.
2107 * WebProcess/WebPage/WebPage.cpp:
2108 (WebKit::WebPage::performDragControllerAction):
2110 2017-07-20 Carlos Garcia Campos <cgarcia@igalia.com>
2112 WebDriver: implement page load timeout
2113 https://bugs.webkit.org/show_bug.cgi?id=174672
2115 Reviewed by Brian Burg.
2117 Always start a timer when waiting for a navigation to complete. When the timer fires, pending callbacks for
2118 navigations are removed and invoked with a timeout error. If navigation completes before the timer is fired,
2119 then the timer is stopped. All navigation commands now receive the page load strategy and timeout as optional
2120 parameters, when not provided the default timeout (300 seconds) is used.
2122 * UIProcess/Automation/Automation.json:
2123 * UIProcess/Automation/WebAutomationSession.cpp:
2124 (WebKit::WebAutomationSession::WebAutomationSession):
2125 (WebKit::WebAutomationSession::waitForNavigationToComplete):
2126 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
2127 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
2128 (WebKit::WebAutomationSession::loadTimerFired):
2129 (WebKit::WebAutomationSession::navigateBrowsingContext):
2130 (WebKit::WebAutomationSession::goBackInBrowsingContext):
2131 (WebKit::WebAutomationSession::goForwardInBrowsingContext):
2132 (WebKit::WebAutomationSession::reloadBrowsingContext):
2133 (WebKit::WebAutomationSession::navigationOccurredForFrame):
2134 * UIProcess/Automation/WebAutomationSession.h:
2136 2017-07-23 Takuro Ashie <ashie@clear-code.com>
2138 [GTK] Correct a typo in the reference manual of WebKitWebInspector
2139 https://bugs.webkit.org/show_bug.cgi?id=174767
2141 Reviewed by Michael Catanzaro.
2143 * UIProcess/API/gtk/WebKitWebInspector.cpp:
2145 2017-07-23 Chris Dumez <cdumez@apple.com>
2147 Drop ExceptionCodeDescription class
2148 https://bugs.webkit.org/show_bug.cgi?id=174757
2150 Reviewed by Darin Adler.
2152 Update GTK bindings to use new API on DOMException instead of
2153 ExceptionCodeDescription.
2155 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
2156 (webkit_dom_attr_dispatch_event):
2157 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
2158 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
2159 (webkit_dom_cdata_section_dispatch_event):
2160 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
2161 (webkit_dom_css_rule_set_css_text):
2162 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
2163 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
2164 (webkit_dom_css_style_declaration_set_property):
2165 (webkit_dom_css_style_declaration_set_css_text):
2166 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
2167 (webkit_dom_css_style_sheet_insert_rule):
2168 (webkit_dom_css_style_sheet_delete_rule):
2169 (webkit_dom_css_style_sheet_add_rule):
2170 (webkit_dom_css_style_sheet_remove_rule):
2171 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
2172 (webkit_dom_css_value_set_css_text):
2173 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
2174 (webkit_dom_character_data_dispatch_event):
2175 (webkit_dom_character_data_insert_data):
2176 (webkit_dom_character_data_delete_data):
2177 (webkit_dom_character_data_replace_data):
2178 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
2179 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
2180 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
2181 (webkit_dom_comment_dispatch_event):
2182 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
2183 (webkit_dom_dom_implementation_create_document_type):
2184 (webkit_dom_dom_implementation_create_document):
2185 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
2186 (webkit_dom_dom_selection_collapse_to_end):
2187 (webkit_dom_dom_selection_collapse_to_start):
2188 (webkit_dom_dom_selection_extend):
2189 (webkit_dom_dom_selection_get_range_at):
2190 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
2191 (webkit_dom_dom_token_list_add):
2192 (webkit_dom_dom_token_list_remove):
2193 (webkit_dom_dom_token_list_toggle):
2194 (webkit_dom_dom_token_list_replace):
2195 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
2196 (webkit_dom_dom_window_dispatch_event):
2197 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
2198 (webkit_dom_node_set_prefix):
2199 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
2200 (webkit_dom_document_dispatch_event):
2201 (webkit_dom_document_create_element):
2202 (webkit_dom_document_create_cdata_section):
2203 (webkit_dom_document_create_processing_instruction):
2204 (webkit_dom_document_create_attribute):
2205 (webkit_dom_document_import_node):
2206 (webkit_dom_document_create_element_ns):
2207 (webkit_dom_document_create_attribute_ns):
2208 (webkit_dom_document_adopt_node):
2209 (webkit_dom_document_create_event):
2210 (webkit_dom_document_create_expression):
2211 (webkit_dom_document_evaluate):
2212 (webkit_dom_document_query_selector):
2213 (webkit_dom_document_query_selector_all):
2214 (webkit_dom_document_set_xml_version):
2215 (webkit_dom_document_set_cookie):
2216 (webkit_dom_document_set_body):
2217 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
2218 (webkit_dom_document_fragment_dispatch_event):
2219 (webkit_dom_document_fragment_query_selector):
2220 (webkit_dom_document_fragment_query_selector_all):
2221 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
2222 (webkit_dom_document_type_dispatch_event):
2223 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2224 (webkit_dom_element_dispatch_event):
2225 (webkit_dom_element_set_attribute):
2226 (webkit_dom_element_set_attribute_node):
2227 (webkit_dom_element_remove_attribute_node):
2228 (webkit_dom_element_set_attribute_ns):
2229 (webkit_dom_element_set_attribute_node_ns):
2230 (webkit_dom_element_matches):
2231 (webkit_dom_element_closest):
2232 (webkit_dom_element_insert_adjacent_element):
2233 (webkit_dom_element_insert_adjacent_html):
2234 (webkit_dom_element_insert_adjacent_text):
2235 (webkit_dom_element_remove):
2236 (webkit_dom_element_query_selector):
2237 (webkit_dom_element_query_selector_all):
2238 (webkit_dom_element_set_inner_html):
2239 (webkit_dom_element_set_outer_html):
2240 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
2241 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
2242 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
2243 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
2244 (webkit_dom_html_anchor_element_dispatch_event):
2245 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
2246 (webkit_dom_html_applet_element_dispatch_event):
2247 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
2248 (webkit_dom_html_area_element_dispatch_event):
2249 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
2250 (webkit_dom_html_br_element_dispatch_event):
2251 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
2252 (webkit_dom_html_base_element_dispatch_event):
2253 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
2254 (webkit_dom_html_body_element_dispatch_event):
2255 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
2256 (webkit_dom_html_button_element_dispatch_event):
2257 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
2258 (webkit_dom_html_canvas_element_dispatch_event):
2259 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
2260 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
2261 (webkit_dom_html_d_list_element_dispatch_event):
2262 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
2263 (webkit_dom_html_directory_element_dispatch_event):
2264 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
2265 (webkit_dom_html_div_element_dispatch_event):
2266 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
2267 (webkit_dom_html_document_dispatch_event):
2268 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
2269 (webkit_dom_html_element_dispatch_event):
2270 (webkit_dom_html_element_set_inner_text):
2271 (webkit_dom_html_element_set_outer_text):
2272 (webkit_dom_html_element_set_content_editable):
2273 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
2274 (webkit_dom_html_embed_element_dispatch_event):
2275 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
2276 (webkit_dom_html_field_set_element_dispatch_event):
2277 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
2278 (webkit_dom_html_font_element_dispatch_event):
2279 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
2280 (webkit_dom_html_form_element_dispatch_event):
2281 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
2282 (webkit_dom_html_frame_element_dispatch_event):
2283 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
2284 (webkit_dom_html_frame_set_element_dispatch_event):
2285 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
2286 (webkit_dom_html_hr_element_dispatch_event):
2287 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
2288 (webkit_dom_html_head_element_dispatch_event):
2289 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
2290 (webkit_dom_html_heading_element_dispatch_event):
2291 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
2292 (webkit_dom_html_html_element_dispatch_event):
2293 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
2294 (webkit_dom_html_iframe_element_dispatch_event):
2295 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
2296 (webkit_dom_html_image_element_dispatch_event):
2297 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
2298 (webkit_dom_html_input_element_dispatch_event):
2299 (webkit_dom_html_input_element_set_max_length):
2300 (webkit_dom_html_input_element_set_size):
2301 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
2302 (webkit_dom_html_li_element_dispatch_event):
2303 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
2304 (webkit_dom_html_label_element_dispatch_event):
2305 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
2306 (webkit_dom_html_legend_element_dispatch_event):
2307 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
2308 (webkit_dom_html_link_element_dispatch_event):
2309 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
2310 (webkit_dom_html_map_element_dispatch_event):
2311 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
2312 (webkit_dom_html_marquee_element_dispatch_event):
2313 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
2314 (webkit_dom_html_menu_element_dispatch_event):
2315 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
2316 (webkit_dom_html_meta_element_dispatch_event):
2317 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
2318 (webkit_dom_html_mod_element_dispatch_event):
2319 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
2320 (webkit_dom_html_o_list_element_dispatch_event):
2321 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
2322 (webkit_dom_html_object_element_dispatch_event):
2323 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
2324 (webkit_dom_html_opt_group_element_dispatch_event):
2325 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
2326 (webkit_dom_html_option_element_dispatch_event):
2327 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
2328 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
2329 (webkit_dom_html_paragraph_element_dispatch_event):
2330 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
2331 (webkit_dom_html_param_element_dispatch_event):
2332 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
2333 (webkit_dom_html_pre_element_dispatch_event):
2334 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
2335 (webkit_dom_html_quote_element_dispatch_event):
2336 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
2337 (webkit_dom_html_script_element_dispatch_event):
2338 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
2339 (webkit_dom_html_select_element_dispatch_event):
2340 (webkit_dom_html_select_element_add):
2341 (webkit_dom_html_select_element_set_length):
2342 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
2343 (webkit_dom_html_style_element_dispatch_event):
2344 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
2345 (webkit_dom_html_table_caption_element_dispatch_event):
2346 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
2347 (webkit_dom_html_table_cell_element_dispatch_event):
2348 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
2349 (webkit_dom_html_table_col_element_dispatch_event):
2350 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
2351 (webkit_dom_html_table_element_dispatch_event):
2352 (webkit_dom_html_table_element_insert_row):
2353 (webkit_dom_html_table_element_delete_row):
2354 (webkit_dom_html_table_element_set_caption):
2355 (webkit_dom_html_table_element_set_t_head):
2356 (webkit_dom_html_table_element_set_t_foot):
2357 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
2358 (webkit_dom_html_table_row_element_dispatch_event):
2359 (webkit_dom_html_table_row_element_insert_cell):
2360 (webkit_dom_html_table_row_element_delete_cell):
2361 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
2362 (webkit_dom_html_table_section_element_dispatch_event):
2363 (webkit_dom_html_table_section_element_insert_row):
2364 (webkit_dom_html_table_section_element_delete_row):
2365 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
2366 (webkit_dom_html_text_area_element_dispatch_event):
2367 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
2368 (webkit_dom_html_title_element_dispatch_event):
2369 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
2370 (webkit_dom_html_u_list_element_dispatch_event):
2371 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
2372 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
2373 (webkit_dom_media_list_delete_medium):
2374 (webkit_dom_media_list_append_medium):
2375 (webkit_dom_media_list_set_media_text):
2376 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
2377 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
2378 (webkit_dom_named_node_map_set_named_item):
2379 (webkit_dom_named_node_map_remove_named_item):
2380 (webkit_dom_named_node_map_remove_named_item_ns):
2381 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
2382 (webkit_dom_node_dispatch_event):
2383 (webkit_dom_node_insert_before):
2384 (webkit_dom_node_replace_child):
2385 (webkit_dom_node_remove_child):
2386 (webkit_dom_node_append_child):
2387 (webkit_dom_node_clone_node_with_error):
2388 (webkit_dom_node_set_node_value):
2389 (webkit_dom_node_set_text_content):
2390 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
2391 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
2392 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
2393 (webkit_dom_processing_instruction_dispatch_event):
2394 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
2395 (webkit_dom_range_set_start):
2396 (webkit_dom_range_set_end):
2397 (webkit_dom_range_set_start_before):
2398 (webkit_dom_range_set_start_after):
2399 (webkit_dom_range_set_end_before):
2400 (webkit_dom_range_set_end_after):
2401 (webkit_dom_range_select_node):
2402 (webkit_dom_range_select_node_contents):
2403 (webkit_dom_range_compare_boundary_points):
2404 (webkit_dom_range_delete_contents):
2405 (webkit_dom_range_extract_contents):
2406 (webkit_dom_range_clone_contents):
2407 (webkit_dom_range_insert_node):
2408 (webkit_dom_range_surround_contents):
2409 (webkit_dom_range_create_contextual_fragment):
2410 (webkit_dom_range_compare_node):
2411 (webkit_dom_range_intersects_node):
2412 (webkit_dom_range_compare_point):
2413 (webkit_dom_range_is_point_in_range):
2414 (webkit_dom_range_expand):
2415 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
2416 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
2417 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
2418 (webkit_dom_text_dispatch_event):
2419 (webkit_dom_text_split_text):
2420 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
2421 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
2422 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
2423 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
2424 (webkit_dom_xpath_expression_evaluate):
2425 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
2426 (webkit_dom_xpath_result_iterate_next):
2427 (webkit_dom_xpath_result_snapshot_item):
2428 (webkit_dom_xpath_result_get_number_value):
2429 (webkit_dom_xpath_result_get_boolean_value):
2430 (webkit_dom_xpath_result_get_single_node_value):
2431 (webkit_dom_xpath_result_get_snapshot_length):
2433 2017-07-22 Wenson Hsieh <wenson_hsieh@apple.com>
2435 [iOS WK2] Remove _WKDraggableElementInfo and fold PositionInformationTests into WKRequestActivatedElementInfo
2436 https://bugs.webkit.org/show_bug.cgi?id=174758
2438 Reviewed by Dan Bernstein.
2440 _WKDraggableElementInfo is no longer used in WebKit, so it should be removed. However, some of the scenarios
2441 in PositionInformationTests that depend on _WKDraggableElementInfo are still useful to exercise: namely,
2442 performing both synchronous and asynchronous position information updates while an async position information
2443 update is in flight. This patch refactors these unit tests into 2 new unit tests in the existing
2444 WKRequestActivatedElementInfo test suite.
2446 * UIProcess/API/Cocoa/WKWebView.mm:
2447 (-[WKWebView _draggableElementAtPosition:]): Deleted.
2448 (-[WKWebView _requestDraggableElementAtPosition:completionBlock:]): Deleted.
2449 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2450 * UIProcess/API/Cocoa/_WKDraggableElementInfo.h: Removed.
2451 * UIProcess/API/Cocoa/_WKDraggableElementInfo.mm: Removed.
2452 * UIProcess/API/Cocoa/_WKDraggableElementInfoInternal.h: Removed.
2453 * UIProcess/ios/WKContentViewInteraction.mm:
2454 * WebKit.xcodeproj/project.pbxproj:
2456 2017-07-22 Wenson Hsieh <wenson_hsieh@apple.com>
2458 [Mac WK2] Fix null dereference in asynchronous NSTextInputClient methods when deallocating a WKWebView
2459 https://bugs.webkit.org/show_bug.cgi?id=174751
2460 <rdar://problem/33132405>
2462 Reviewed by Darin Adler.
2464 Tweaks -[WKWebView dealloc] to close the WebPageProxy at an earlier time, prior to destroying the WebViewImpl.
2465 This fixes a NSTextInputClient crash in WKWebView when exercising the following scenario:
2467 (1) Suppose that NSTextInputContext invokes an asynchronous text input query on WKWebView immediately before
2468 WKWebView is deallocated, such that WebPageProxy's CallbackMap contains an NSTextInputContext callback at the
2469 time that -[WKWebView dealloc] is called. Additionally, suppose that this callback from NSTextInputContext
2470 invokes additional NSTextInputClient methods on the WKWebView that involve plumbing through to the WebViewImpl
2471 (which is stored as _impl on the WKWebView).
2473 (2) Observe that when calling [super dealloc] in [WKWebView dealloc], we will destroy the WebViewImpl as a
2474 result of setting our unique pointer to _impl to be null. In ~WebViewImpl, we invoke WebPageProxy::close, which
2475 in turn invokes WebPageProxy::resetState.
2477 (3) WebPageProxy::resetState then calls m_callbacks.invalidate(error), which triggers all pending callbacks.
2478 This invokes the block described in (1), which causes us to try and call back into WKWebView, invoking
2479 NSTextInputClient methods. Without the fix in this patch, these methods currently assume that _impl is nonnull,
2480 even though we've already cleared out the pointer in (2), so we segfault with a null dereference.
2482 After this patch, we close the _page at an earlier time, such that the state is reset before the WebViewImpl
2483 (and corresponding _impl unique_ptr in WKWebView) is torn down. This ensures that _impl will not be null for
2484 callbacks invoked after beginning to deallocate the WKWebView.
2486 Forcing this scenario in a custom AppKit root that triggers async NSTextInputClient methods immediately when a
2487 WKWebView is being deallocated produces a crash with the same stack trace as what we observe in the radar, but
2488 there are no known steps to actually reproduce this crash in shipping software.
2490 * UIProcess/API/Cocoa/WKWebView.mm:
2491 (-[WKWebView dealloc]):
2493 2017-07-22 Chris Dumez <cdumez@apple.com>
2495 REGRESSION(r204565): WKObject is broken
2496 https://bugs.webkit.org/show_bug.cgi?id=174736
2497 <rdar://problem/33246169>
2499 Reviewed by Dan Bernstein.
2501 Revert r204565 as making WKObject a root class caused unexpected crashes.
2502 Instead, we now have WKObject inherit from NSProxy (instead of previously
2503 NSObject) and we forward calls to the target.
2505 We also need to provide an implementation for private methods such as
2506 isNSString__ to address the issue with NSStrings that r204565 was trying
2509 * Shared/Cocoa/APIObject.mm:
2510 (API::Object::unwrap):
2511 * Shared/Cocoa/WKObject.h:
2512 * Shared/Cocoa/WKObject.mm:
2513 (-[WKObject dealloc]):
2515 (-[WKObject isKindOfClass:]):
2516 (-[WKObject isMemberOfClass:]):
2517 (-[WKObject respondsToSelector:]):
2518 (-[WKObject conformsToProtocol:]):
2519 (-[WKObject forwardingTargetForSelector:]):
2520 (-[WKObject description]):
2521 (-[WKObject debugDescription]):
2522 (-[WKObject classForCoder]):
2523 (-[WKObject classForKeyedArchiver]):
2524 (-[WKObject _web_createTarget]):
2525 (-[WKObject forwardInvocation:]):
2526 (-[WKObject methodSignatureForSelector:]):
2527 (-[WKObject isNSObject__]):
2528 (-[WKObject isNSArray__]):
2529 (-[WKObject isNSCFConstantString__]):
2530 (-[WKObject isNSData__]):
2531 (-[WKObject isNSDate__]):
2532 (-[WKObject isNSDictionary__]):
2533 (-[WKObject isNSNumber__]):
2534 (-[WKObject isNSOrderedSet__]):
2535 (-[WKObject isNSSet__]):
2536 (-[WKObject isNSString__]):
2537 (-[WKObject isNSTimeZone__]):
2538 (-[WKObject isNSValue__]):
2540 2017-07-21 Chris Dumez <cdumez@apple.com>
2542 Drop IDBDatabaseException class
2543 https://bugs.webkit.org/show_bug.cgi?id=174743
2545 Reviewed by Darin Adler.
2547 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2548 (WebKit::WebIDBConnectionToServer::connectionToServerLost):
2550 2017-07-21 Brady Eidson <beidson@apple.com>
2552 Crash in many WebKit apps marking a connection invalid under Messages::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace.
2553 <rdar://problem/28822272> and https://bugs.webkit.org/show_bug.cgi?id=174729
2555 Reviewed by Tim Horton.
2557 Previously, when a NetworkLoad generated a "CanAuthenticateAgainstProtectionSpace" event, the message went from
2558 Network process -> Web process -> UI process.
2560 In that case, MESSAGE_CHECKing the validity of the frame in WebPageProxy made sense.
2562 In r202511 we cut the WebProcess out of this and had Networking go straight to UI process.
2564 As a result, the message check became invalid. The Networking process cannot possible know the validity of
2565 particular WebPage or WebFrame identifiers.
2567 We simply need to validate the input in NetworkProcessProxy.
2569 * UIProcess/Network/NetworkProcessProxy.cpp:
2570 (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace): Validate both the page and frame ids before
2571 passing the call along to the WebPageProxy. Also, if either of those validations fail, respond to the network process.
2573 2017-07-21 Andy Estes <aestes@apple.com>
2575 [iOS] Adopt UIImagePickerControllerImageURL for photo uploads
2576 https://bugs.webkit.org/show_bug.cgi?id=174723
2577 <rdar://problem/33223962>
2579 Reviewed by Joseph Pecoraro.
2581 In iOS 11, use the URL provided by UIImagePickerControllerImageURL, if available, as the
2582 file URL for photo uploads. Since we use the UIImagePickerController imageExportPreset of
2583 UIImagePickerControllerImageURLExportPresetCompatible, UIKit will take care of converting
2584 HEIF images to JPEG for us. For other types (GIF, JPEG, and PNG), it will preserve the
2587 Since UIImagePickerController now provides GIF and PNG representations, we no longer need to
2588 use PHImageManager to access the original assets. This patch removes the
2589 PHAsset/PHImageManager code added in r185241.
2591 * Platform/spi/ios/PhotosSPI.h: Removed.
2592 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2593 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2594 (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]): Deleted.
2595 * WebKit.xcodeproj/project.pbxproj:
2597 2017-07-21 Konstantin Tokarev <annulen@yandex.ru>
2599 [cmake][Mac] Unreviewed, fix linking WebKitSystemInterface
2601 After r219560 link_directories() in PlatformXXX.cmake files does not
2602 affect corresponding targets.
2604 * PlatformMac.cmake:
2606 2017-07-21 Andreas Kling <akling@apple.com>
2608 Use more references in event dispatch code
2609 https://bugs.webkit.org/show_bug.cgi?id=174681
2611 Reviewed by Geoffrey Garen.
2613 * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
2614 * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
2615 (WebKit::PDFPluginAnnotation::handleEvent):
2616 (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):
2617 * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
2618 * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
2619 (WebKit::PDFPluginPasswordField::handleEvent):
2620 * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2621 * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
2622 (WebKit::PDFPluginTextAnnotation::handleEvent):
2623 * WebProcess/Plugins/PluginView.cpp:
2624 (WebKit::PluginView::createWebEvent):
2625 (WebKit::PluginView::handleEvent):
2626 * WebProcess/Plugins/PluginView.h:
2628 2017-07-21 Chris Dumez <cdumez@apple.com>
2630 WebResourceLoadStatisticsStore::m_operatingDates is unsafely modified from several threads
2631 https://bugs.webkit.org/show_bug.cgi?id=174721
2632 <rdar://problem/33400343>
2634 Reviewed by Brent Fulgham.
2636 WebResourceLoadStatisticsStore::m_operatingDates is supposed to only be modified on
2637 the background thread. However, WebResourceLoadStatisticsStore::performDailyTasks()
2638 was mistakenly calling includeTodayAsOperatingDateIfNecessary() on the main thread,
2639 which would modify m_operatingDates. This could lead to crashes such as the
2640 one in <rdar://problem/33400343>, as the main thread may modify m_operatingDates
2641 while we are interating over it on the background thread to save it to disk.
2643 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2644 (WebKit::WebResourceLoadStatisticsStore::performDailyTasks):
2645 (WebKit::WebResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary):
2647 2017-07-21 Brady Eidson <beidson@apple.com>
2649 Get rid of WebCore IconDatabase code.
2650 https://bugs.webkit.org/show_bug.cgi?id=174700
2652 Reviewed by Tim Horton.
2654 * UIProcess/API/glib/WebKitWebContext.cpp:
2655 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2656 (WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
2657 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2659 2017-07-21 Carlos Garcia Campos <cgarcia@igalia.com>
2661 Web Automation: implicit navigations don't cause browsing context switch
2662 https://bugs.webkit.org/show_bug.cgi?id=174633
2663 <rdar://problem/33387797>
2665 Reviewed by Brian Burg.
2667 When a new page load replaces the current frameset, for example when a link in the current browser context has a
2668 _top target, there's no explicit context switch, so the web driver doesn't know that the current browsing
2669 context is no longer valid. Following commands will still be using the previous frame as the current browsing
2670 context, but they don't fail with no such frame because the frame is still alive in the page cache and
2671 referenced in the internal maps used in both UI and web processes. This causes test
2672 testShouldFocusOnTheReplacementWhenAFrameFollowsALinkToA_TopTargetedPage to fail, since it expects a no such
2673 frame exception. When a new page navigation happens we can simply remove references to frames from
2674 m_handleWebFrameMap in WebAutomationSession, because any existing frame reference in the map should be for a
2675 previous page. With this, before the next command is executed, waitForNavigationToComplete will be called and it
2676 will fail with no such frame, condition that is handled to switch to the top level browser context. The test
2677 still fails, because the find element command is called with the top level browsing context, returning no such
2678 element, instead of no such frame. This is consistent with Chrome.
2680 * UIProcess/Automation/WebAutomationSession.cpp:
2681 (WebKit::WebAutomationSession::navigationOccurredForFrame): Clear the m_handleWebFrameMap when a new page load
2684 2017-07-21 Carlos Garcia Campos <cgarcia@igalia.com>
2686 WebDriver: wait until navigation is complete before running new commands and after a click
2687 https://bugs.webkit.org/show_bug.cgi?id=174670
2689 Reviewed by Brian Burg.
2691 Add waitForNavigationToComplete method to Automation to allow WebDriver to wait for pending navigations to
2692 complete. The new method already receives page load strategy and timeout, but they are not implemented yet.
2694 * UIProcess/Automation/Automation.json: Add waitForNavigationToComplete method and PageLoadStrategy new type.
2695 * UIProcess/Automation/WebAutomationSession.cpp:
2696 (WebKit::WebAutomationSession::waitForNavigationToComplete): Call waitForNavigationToCompleteOnPage or
2697 waitForNavigationToCompleteOnFrame depending on whether the current borwsing context is the main frame or not.
2698 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Check if there's an ongoing load for the page,
2699 and wait for it to complete if needed.
2700 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Check if there's an ongoing load for the frame,
2701 and wait for it to complete if needed.
2702 (WebKit::WebAutomationSession::navigateBrowsingContext): Use waitForNavigationToCompleteOnPage() now.
2703 (WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
2704 (WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
2705 (WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
2706 (WebKit::WebAutomationSession::navigationOccurredForFrame): Renamed since it now receives the notification for
2707 all the frames. Complete page operations if it's a main frame, or frame operations otherwise.
2708 * UIProcess/Automation/WebAutomationSession.h:
2709 * UIProcess/WebPageProxy.cpp:
2710 (WebKit::WebPageProxy::didFinishLoadForFrame): Notify about all frames, not only the main one.
2711 (WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
2712 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
2714 2017-07-20 Carlos Garcia Campos <cgarcia@igalia.com>
2716 Unreviewed. Remove WKIconDatabaseCairo.
2718 * PlatformGTK.cmake:
2719 * PlatformWPE.cmake:
2720 * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp: Removed.
2721 * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: Removed.
2723 2017-07-20 Brady Eidson <beidson@apple.com>
2725 Get rid of IconDatabase related code in WebKit.
2726 https://bugs.webkit.org/show_bug.cgi?id=174693
2728 Reviewed by Tim Horton.
2730 This leaves the C-API class but guts it.
2732 No explanations of the other changes are needed.
2735 * DerivedSources.make:
2736 * Shared/WebProcessCreationParameters.cpp:
2737 (WebKit::WebProcessCreationParameters::encode):
2738 (WebKit::WebProcessCreationParameters::decode):
2739 * Shared/WebProcessCreationParameters.h:
2740 * UIProcess/API/C/WKContext.cpp:
2741 (WKContextGetIconDatabase):
2742 (WKContextSetIconDatabasePath):
2743 * UIProcess/API/C/WKIconDatabase.cpp:
2744 (WKIconDatabaseSetIconDatabaseClient):
2745 (WKIconDatabaseRetainIconForURL):
2746 (WKIconDatabaseReleaseIconForURL):
2747 (WKIconDatabaseSetIconDataForIconURL):
2748 (WKIconDatabaseSetIconURLForPageURL):
2749 (WKIconDatabaseCopyIconURLForPageURL):
2750 (WKIconDatabaseCopyIconDataForPageURL):
2751 (WKIconDatabaseEnableDatabaseCleanup):
2752 (WKIconDatabaseRemoveAllIcons):
2753 (WKIconDatabaseCheckIntegrityBeforeOpening):
2754 (WKIconDatabaseClose):
2755 * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
2756 (WKIconDatabaseTryGetCGImageForURL):
2757 (WKIconDatabaseTryCopyCGImageArrayForURL):
2758 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2759 (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted.
2760 * UIProcess/WebIconDatabase.cpp: Removed.
2761 * UIProcess/WebIconDatabase.h:
2762 (WebKit::WebIconDatabase::clearProcessPool): Deleted.
2763 * UIProcess/WebIconDatabase.messages.in: Removed.
2764 * UIProcess/WebIconDatabaseClient.cpp: Removed.
2765 * UIProcess/WebIconDatabaseClient.h: Removed.
2766 * UIProcess/WebProcessPool.cpp:
2767 (WebKit::m_hiddenPageThrottlingTimer):
2768 (WebKit::WebProcessPool::~WebProcessPool):
2769 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
2770 (WebKit::WebProcessPool::createNewWebProcess):
2771 (WebKit::WebProcessPool::setIconDatabasePath): Deleted.
2772 (WebKit::WebProcessPool::iconDatabasePath): Deleted.
2773 * UIProcess/WebProcessPool.h:
2774 * UIProcess/WebProcessProxy.cpp:
2775 (WebKit::WebProcessProxy::processWillShutDown):
2776 (WebKit::WebProcessProxy::retainIconForPageURL): Deleted.
2777 (WebKit::WebProcessProxy::releaseIconForPageURL): Deleted.
2778 (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs): Deleted.
2779 * UIProcess/WebProcessProxy.h:
2780 * UIProcess/WebProcessProxy.messages.in:
2781 * UIProcess/gtk/WebProcessPoolGtk.cpp:
2782 (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted.
2783 * UIProcess/wpe/WebProcessPoolWPE.cpp:
2784 (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted.
2785 * WebKit.xcodeproj/project.pbxproj:
2786 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Removed.
2787 * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Removed.
2788 * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Removed.
2789 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2790 * WebProcess/WebProcess.cpp:
2791 (WebKit::WebProcess::WebProcess):
2792 (WebKit::WebProcess::initializeWebProcess):
2793 (WebKit::WebProcess::getWebCoreStatistics):
2794 * WebProcess/WebProcess.h:
2796 2017-07-20 David Quesada <david_quesada@apple.com>
2798 Add SPI to notify WKNavigationDelegate about client redirects
2799 https://bugs.webkit.org/show_bug.cgi?id=174680
2800 rdar://problem/33184886
2802 Reviewed by Brady Eidson.
2804 * UIProcess/API/APINavigationClient.h:
2805 (API::NavigationClient::didPerformClientRedirectForNavigation):
2806 Add a new virtual method for navigation clients to implement if they want to be informed
2807 when the page is initiating a navigation that is a client redirect.
2809 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2810 Declare the new WKNavigationDelegate method -_webView:didPerformClientRedirectForNavigation:
2812 * UIProcess/Cocoa/NavigationState.h:
2813 * UIProcess/Cocoa/NavigationState.mm:
2814 (WebKit::NavigationState::setNavigationDelegate):
2815 (WebKit::NavigationState::NavigationClient::didPerformClientRedirectForNavigation):
2816 Add a new method to NavigationState method to tell the WKNavigationDelegate when a
2817 client redirect happens.
2819 * UIProcess/WebPageProxy.cpp:
2820 (WebKit::WebPageProxy::didPerformClientRedirectForLoadForFrame):
2821 * UIProcess/WebPageProxy.h:
2822 * UIProcess/WebPageProxy.messages.in:
2823 Allow the WebPageProxy to receive a message from the web process when a client redirect happens.
2825 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2826 (WebKit::WebFrameLoaderClient::dispatchDidPerformClientRedirect):
2827 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2828 Send this new message to the UI process on client redirects.
2830 2017-07-20 Chris Dumez <cdumez@apple.com>
2832 Drop legacy XPathException type
2833 https://bugs.webkit.org/show_bug.cgi?id=174679
2835 Reviewed by Sam Weinig.
2837 Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
2838 no longer expose XPathException.
2840 * UIProcess/Automation/atoms/FindNodes.js:
2843 2017-07-20 Chris Dumez <cdumez@apple.com>
2845 Unreviewed, rolling out r219706.
2851 "Drop legacy XPathException type"
2852 https://bugs.webkit.org/show_bug.cgi?id=174679
2853 http://trac.webkit.org/changeset/219706
2855 2017-07-20 Chris Dumez <cdumez@apple.com>
2857 Drop legacy XPathException type
2858 https://bugs.webkit.org/show_bug.cgi?id=174679
2860 Reviewed by Sam Weinig.
2862 Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
2863 no longer expose XPathException.
2865 * UIProcess/Automation/atoms/FindNodes.js:
2868 2017-07-20 Chris Dumez <cdumez@apple.com>
2870 Avoid unnecessary WorkQueue dispatch in WebResourceLoadStatisticsStore::processStatisticsAndDataRecords()
2871 https://bugs.webkit.org/show_bug.cgi?id=174686
2873 Reviewed by Geoffrey Garen.
2875 Avoid unnecessary WorkQueue dispatch in WebResourceLoadStatisticsStore::processStatisticsAndDataRecords(). The most common
2876 call site is already on the right thread.
2878 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2879 (-[WKWebsiteDataStore _resourceLoadStatisticsProcessStatisticsAndDataRecords]):
2880 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2881 (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing):
2882 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
2883 * UIProcess/WebResourceLoadStatisticsStore.h:
2885 2017-07-20 Chris Dumez <cdumez@apple.com>
2887 Regression(ITP): May get frequently logged out of wsj.com
2888 https://bugs.webkit.org/show_bug.cgi?id=174661
2889 <rdar://problem/32343256>
2891 Reviewed by Geoffrey Garen.
2893 Bump statistics file version to blow away old statistics on disk since those do not
2894 take into account associated domains.
2896 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2898 2017-07-20 Chris Dumez <cdumez@apple.com>
2900 Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable
2901 https://bugs.webkit.org/show_bug.cgi?id=174660
2903 Reviewed by Geoffrey Garen.
2905 Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable.
2906 This essentially replaces a branch to figure out if the new size is less or greater than the
2907 current size by an assertion.
2909 * Platform/IPC/ArgumentCoders.h:
2910 * UIProcess/Gamepad/UIGamepadProvider.cpp:
2911 (WebKit::UIGamepadProvider::platformGamepadConnected):
2912 * UIProcess/WebProcessPool.cpp:
2913 (WebKit::WebProcessPool::setInitialConnectedGamepads):
2914 * WebProcess/Network/WebLoaderStrategy.cpp:
2915 (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2916 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
2917 (WebKit::WebPasteboardOverrides::getDataForOverride):
2918 * WebProcess/WebPage/ios/WebPageIOS.mm:
2919 (WebKit::WebPage::requestAutocorrectionData):
2921 2017-07-20 Chris Dumez <cdumez@apple.com>
2923 Regression(ITP): Can no longer log in on abc.go.com
2924 https://bugs.webkit.org/show_bug.cgi?id=174533
2925 <rdar://problem/33325881>
2927 Reviewed by Geoffrey Garen.
2929 Bump statistics database version to blow away any existing statistics. Without this, SSO providers
2930 for which we added a quirk may already be in the database and identified as trackers. The quirk
2931 merely prevents the specified SSO providers from being identified as trackers.
2933 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2935 2017-07-19 Simon Fraser <simon.fraser@apple.com>
2937 getBoundingClientRects not updated for programmatic scrolls
2938 https://bugs.webkit.org/show_bug.cgi?id=174538
2939 rdar://problem/33049012
2941 Reviewed by Tim Horton.
2943 Feed ViewportRectStability and ScrollingLayerPositionAction into reconcileScrollingState().
2945 * WebProcess/WebPage/ios/WebPageIOS.mm:
2946 (WebKit::WebPage::updateVisibleContentRects):
2948 2017-07-19 Brady Eidson <beidson@apple.com>
2950 iBooks sometimes crashes when closing a book.
2951 <rdar://problem/31180331> and https://bugs.webkit.org/show_bug.cgi?id=174658
2953 Reviewed by Oliver Hunt.
2955 - LegacyCustomProtocolManagerProxy should not reference a WebProcessPool directly.
2956 - LegacyCustomProtocolManagerProxy should invalidate in its destructor.
2958 * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp:
2959 (WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy):
2960 (WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy):
2961 (WebKit::LegacyCustomProtocolManagerProxy::startLoading):
2962 (WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
2963 (WebKit::LegacyCustomProtocolManagerProxy::invalidate):
2964 (WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
2965 (WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
2966 (WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
2967 (WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
2968 (WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):
2969 (WebKit::LegacyCustomProtocolManagerProxy::processDidClose): Deleted.
2970 * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h:
2972 * UIProcess/Network/NetworkProcessProxy.cpp:
2973 (WebKit::NetworkProcessProxy::NetworkProcessProxy):
2974 (WebKit::NetworkProcessProxy::didClose):
2975 * UIProcess/Network/NetworkProcessProxy.h:
2976 (WebKit::NetworkProcessProxy::processPool):
2978 2017-07-19 Yusuke Suzuki <utatane.tea@gmail.com>
2980 [WTF] Implement WTF::ThreadGroup
2981 https://bugs.webkit.org/show_bug.cgi?id=174081
2983 Reviewed by Mark Lam.
2985 * Shared/AsyncRequest.h:
2987 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
2989 WebDriver: handle invalid selector errors
2990 https://bugs.webkit.org/show_bug.cgi?id=174619
2992 Reviewed by Brian Burg.
2994 We are currently handling only XPathException and only when it's an invalid expression. In the xpath case, the
2995 spec also says "If any item in result is not an element return an error with error code invalid selector.", so
2996 we should also handle TYPE_ERR (The expression could not be converted to return the specified type.). However,
2997 since the spec says "or other error", I think we can simplify this and simply throw InvalidSelector inside the
2998 catch, without checking any specific error. This is causing 14 failures in selenium tests.
3000 §12. Element Retrieval. Step 6: If a DOMException, SyntaxError, XPathException, or other error occurs during the
3001 execution of the element location strategy, return error invalid selector.
3002 https://www.w3.org/TR/webdriver/#dfn-find
3004 * UIProcess/Automation/Automation.json: Add InvalidSelector error.
3005 * UIProcess/Automation/atoms/FindNodes.js:
3006 (tryToFindNode): Raise InvalidSelector in case of error.
3007 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3008 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Handle InvalidSelector exceptions.
3010 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3012 Web Automation: error details not passed to DidEvaluateJavaScriptFunction message when callback was not called before page unload
3013 https://bugs.webkit.org/show_bug.cgi?id=174624
3015 Reviewed by Brian Burg.
3017 There's a variable errorMessage, but it's unused.
3019 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3020 (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): Pass errorMessage instead of String() to DidEvaluateJavaScriptFunction.
3022 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3024 Web Automation: evaluateJavaScriptFunction should always notify the web process before returning early
3025 https://bugs.webkit.org/show_bug.cgi?id=174623
3027 Reviewed by Brian Burg.
3029 It currently returns early if page, frame or scriptObject are nullptr, in which cases the UI process is not
3030 notified. This causes test testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs to hang, because message
3031 DidEvaluateJavaScriptFunction is never sent when the given frame no longer exists. We should send
3032 DidEvaluateJavaScriptFunction with WindowNotFound in case of page is nullptr and FrameNotFound if the frame is
3033 nullptr. The scriptObject early return is actually wrong, because scriptObjectForFrame creates a new script if
3034 there's isn't one for the given frame.
3036 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3037 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
3039 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3041 Web Automation: pending evaluate script callbacks are stored with the wrong frame ID when using the default main frame
3042 https://bugs.webkit.org/show_bug.cgi?id=174622
3044 Reviewed by Brian Burg.
3046 The frameHandle argument is optional in evaluateJavaScriptFunction(), when not provided we pass 0 to the web
3047 process. The proxy gets the web page main frame when received frame ID is 0, but the given frameID is
3048 still used as key of m_webFramePendingEvaluateJavaScriptCallbacksMap and also passed to the javascript function
3049 as argument. I think r203442 was actually a workaround to this bug, making it even more hidden. Both
3050 m_webFrameScriptObjectMap and m_webFramePendingEvaluateJavaScriptCallbacksMap should never have 0 as a
3051 key, since they always use a frame ID, and the frame identifier counter starts at 1. This is causing test
3052 testShouldDetectPageLoadsWhileWaitingOnAnAsyncScriptAndReturnAnError to hang, because when the page is unloaded
3053 and didClearWindowObjectForFrame is called, we try to get the pending callbacks of frame 1, but they were stored
3054 as frame 0 so DidEvaluateJavaScriptFunction message is never sent to the UI process.
3056 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3057 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Use always the actual frameID from the WebFrame
3059 * WebProcess/Automation/WebAutomationSessionProxy.h: Do not allow 0 as a key of
3060 m_webFramePendingEvaluateJavaScriptCallbacksMap and m_webFrameScriptObjectMap.
3062 2017-07-18 Andy Estes <aestes@apple.com>
3064 [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS
3065 https://bugs.webkit.org/show_bug.cgi?id=174631
3067 Reviewed by Tim Horton.
3069 * Configurations/Base.xcconfig:
3070 * Shared/API/APIArray.cpp:
3071 (API::Array::toStringVector):
3072 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
3073 (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray):
3074 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3075 (WebKit::WebUserContentControllerProxy::addProcess):
3076 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
3077 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
3078 * UIProcess/ios/forms/WKFileUploadPanel.mm:
3079 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
3080 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
3081 (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
3083 2017-07-18 Andy Estes <aestes@apple.com>
3085 [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION
3086 https://bugs.webkit.org/show_bug.cgi?id=174631
3088 Reviewed by Sam Weinig.
3090 * Configurations/Base.xcconfig:
3092 2017-07-18 Andy Estes <aestes@apple.com>
3094 [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION
3095 https://bugs.webkit.org/show_bug.cgi?id=174631
3097 Reviewed by Dan Bernstein.
3099 * Configurations/Base.xcconfig:
3101 2017-07-18 Matt Lewis <jlewis3@apple.com>
3103 Unreviewed, rolling out r219610.
3105 This caused an api failure on all platforms for the test
3106 SnapshotImageLargeAsyncDecoding
3110 "Async image decoding for large images should be disabled
3111 after the first time a tile is painted"
3112 https://bugs.webkit.org/show_bug.cgi?id=174451
3113 http://trac.webkit.org/changeset/219610
3115 2017-07-18 Andy Estes <aestes@apple.com>
3117 [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
3118 https://bugs.webkit.org/show_bug.cgi?id=174631
3120 Reviewed by Darin Adler.
3122 * Configurations/Base.xcconfig:
3124 2017-07-18 Said Abou-Hallawa <sabouhallawa@apple.com>
3126 Async image decoding for large images should be disabled after the first time a tile is painted
3127 https://bugs.webkit.org/show_bug.cgi?id=174451
3129 Reviewed by Simon Fraser.
3131 * Shared/mac/RemoteLayerBackingStore.mm:
3132 (WebKit::RemoteLayerBackingStore::drawInContext):
3133 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3134 (WebKit::CompositingCoordinator::paintContents):
3135 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
3137 2017-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
3139 Web Automation: link and partial link queries don't work if text link contains trailing or leading whitespaces
3140 https://bugs.webkit.org/show_bug.cgi?id=174499
3142 Reviewed by Brian Burg.
3144 This is causing test test_Driver_Can_Get_Link_By_Link_Test_Ignoring_Trailing_Whitespace to fail.
3146 * UIProcess/Automation/atoms/FindNodes.js:
3147 (switch): Use normalize-space() in in the links xpath expressions.
3149 2017-07-17 Darin Adler <darin@apple.com>
3151 Improve use of NeverDestroyed
3152 https://bugs.webkit.org/show_bug.cgi?id=174348
3154 Reviewed by Sam Weinig.
3156 * DatabaseProcess/DatabaseProcess.h: Removed unneeded include of
3158 * NetworkProcess/cache/NetworkCacheKey.cpp: Ditto.
3160 * NetworkProcess/capture/NetworkCaptureManager.cpp: Moved include of
3161 NeverDestroyed.h here ...
3162 * NetworkProcess/capture/NetworkCaptureManager.h: ... from here.
3164 * PluginProcess/PluginProcess.cpp: Moved include of NeverDestroyed.h
3166 * PluginProcess/PluginProcess.h: ... from here.
3168 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3169 (isContainerClass): Removed trivial inefficient use of
3170 LazyNeverDestroyed<HashSet> to check against two classes.
3171 Instead wrote out the boolean expression.
3173 * Shared/mac/SecItemShim.cpp: Removed unneeded include of
3176 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3177 (WebKit::WebProcessPool::platformInitialize): Call
3178 installMemoryPressureHandler instead of WebMemoryPressureHandler::singleton.
3180 * UIProcess/Gamepad/UIGamepadProvider.h: Removed unneeded include
3181 of NeverDestroyed.h.
3183 * UIProcess/Plugins/PluginProcessManager.cpp: Moved include of
3184 NeverDestroyed.h here ...
3185 * UIProcess/Plugins/PluginProcessManager.h: ... from here.
3187 * UIProcess/WebInspectorProxy.cpp: Removed unneeded include
3188 of NeverDestroyed.h.
3190 * UIProcess/WebPageProxy.h: Added now-needed include of
3191 MediaPlaybackTargetContext.h.
3193 * UIProcess/WebPasteboardProxy.cpp: Moved include of
3194 NeverDestroyed.h here ...
3195 * UIProcess/WebPasteboardProxy.h: ... from here.
3197 * UIProcess/ios/WebMemoryPressureHandlerIOS.h: Removed the
3198 WebMemoryPressureHandler class from this header. Callers don't need to
3199 know if there is a class. They simply indicate when it's time to install
3200 the handler. Another way to put it is that this class had no functions
3201 other than the singleton function.
3203 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
3204 (WebKit::installMemoryPressureHandler): Replaced the class with this function.
3205 It creates a dispatch source and then resumes it. To avoid having the source
3206 look like a leak, we keep it in a global variable.
3208 * WebProcess/Gamepad/WebGamepadProvider.h: Include Forward.h instead of
3211 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Moved include of
3212 NeverDestroyed.h here ...
3213 * WebProcess/WebCoreSupport/WebPasteboardOverrides.h: ... from here.
3215 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Removed unneeded
3216 include of NeverDestroyed.h.
3218 2017-07-17 Timothy Horton <timothy_horton@apple.com>
3220 Page using safe area constant properties jumps to correct layout after resize
3221 https://bugs.webkit.org/show_bug.cgi?id=174598
3222 <rdar://problem/33364275>
3224 Reviewed by Simon Fraser.
3226 Test: fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html
3228 * UIProcess/API/Cocoa/WKWebView.mm:
3229 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3230 * UIProcess/WebPageProxy.h:
3231 * UIProcess/ios/WebPageProxyIOS.mm:
3232 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3233 * WebProcess/WebPage/WebPage.h:
3234 * WebProcess/WebPage/WebPage.messages.in:
3235 * WebProcess/WebPage/ios/WebPageIOS.mm:
3236 (WebKit::WebPage::dynamicViewportSizeUpdate):
3237 Plumb unobscured safe area insets through in the dynamicViewportSizeUpdate,
3238 like we do in VisibleContentRectUpdate (once again sad that these aren't
3239 more similar), so that it will be correct in the during-rotation snapshot,
3240 instead of only becoming correct in the first visible content rect update
3243 2017-07-17 Chris Dumez <cdumez@apple.com>
3245 UserMediaPermissionRequestManagerProxy should not use WebCore::Timer
3246 https://bugs.webkit.org/show_bug.cgi?id=174599
3247 <rdar://problem/33362600>
3249 Reviewed by Tim Horton.
3251 UserMediaPermissionRequestManagerProxy should not use WebCore::Timer since it runs in the
3252 UIProcess. Switch to using RunLoop::Timer instead.
3254 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3255 (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
3256 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3258 2017-07-17 Chris Dumez <cdumez@apple.com>
3260 NETWORK_SESSION does not need didReceiveAuthenticationChallenge(uint64_t, uint64_t, const AuthenticationChallenge&)
3261 https://bugs.webkit.org/show_bug.cgi?id=174595
3263 Reviewed by Alex Christensen.
3265 * Shared/Authentication/AuthenticationManager.cpp:
3266 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
3267 * Shared/Authentication/AuthenticationManager.h:
3269 2017-07-17 Wenson Hsieh <wenson_hsieh@apple.com>
3271 [iOS DnD] Web process uses too much memory when beginning a drag on a very large image
3272 https://bugs.webkit.org/show_bug.cgi?id=174585
3273 <rdar://problem/33302541>
3275 Reviewed by Tim Horton.
3277 Add IPC support for serializing/deserializing the size of an image written to the pasteboard. See WebCore
3278 ChangeLogs for more details.
3280 * Shared/WebCoreArgumentCoders.cpp:
3281 (IPC::ArgumentCoder<PasteboardImage>::encode):
3282 (IPC::ArgumentCoder<PasteboardImage>::decode):
3284 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
3286 Unreviewed attempt to fix Mac cmake build
3288 * PlatformMac.cmake: Remove reference to file which is gone since r219025
3290 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3292 [CMake] Include most CMake modules from WebKitCommon.cmake
3293 https://bugs.webkit.org/show_bug.cgi?id=174546
3295 Reviewed by Konstantin Tokarev.
3299 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3301 [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
3302 https://bugs.webkit.org/show_bug.cgi?id=174547
3304 Reviewed by Alex Christensen.
3308 2017-07-17 Alex Christensen <achristensen@webkit.org>
3310 Modernize content extension code
3311 https://bugs.webkit.org/show_bug.cgi?id=174588
3313 Reviewed by Sam Weinig.
3315 * WebProcess/UserContent/WebUserContentController.cpp:
3316 (WebKit::WebUserContentController::addContentRuleLists):
3318 2017-07-17 Jeremy Jones <jeremyj@apple.com>
3320 Add video fullscreen transition logging.
3321 https://bugs.webkit.org/show_bug.cgi?id=174474
3323 Reviewed by Jer Noble.
3325 No functional change. Just adds logging.
3327 * Platform/Logging.h:
3328 * WebProcess/cocoa/WebVideoFullscreenManager.mm:
3329 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
3330 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
3331 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
3332 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
3333 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
3334 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
3335 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
3336 (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
3338 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
3340 [CMake] Create targets before WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS is called
3341 https://bugs.webkit.org/show_bug.cgi?id=174557
3343 Reviewed by Michael Catanzaro.
3347 2017-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
3349 Web Automation: link and partial link queries don't work if the link contains formatting tags
3350 https://bugs.webkit.org/show_bug.cgi?id=174498
3352 Reviewed by Brian Burg.
3354 So, for example, if we find links with text "Foo" and there's a link like <a href=""><bA>Foo</b></a> we fail
3355 with no such element error. This causes test test_Link_With_Formatting_Tags to fail.
3357 * UIProcess/Automation/atoms/FindNodes.js:
3358 (switch): Use descendant-or-self::text() instead of just text() in the links xpath expressions.
3360 2017-07-16 Carlos Garcia Campos <cgarcia@igalia.com>
3362 Web Automation: FindNodes should throw an error in case of invalid strategy
3363 https://bugs.webkit.org/show_bug.cgi?id=174497
3365 Reviewed by Brian Burg.
3367 We are currently returning null or empty list. According to the spec in 12.2 Find Element and 12.3 Find
3368 Elements, step 4: "If location strategy is not present as a keyword in the table of location strategies, return
3369 error with error code invalid argument.".
3370 https://www.w3.org/TR/webdriver/#find-element.
3372 This is causing test test_should_throw_an_error_if_user_passes_in_invalid_by_when_find_elements to fail.
3374 * UIProcess/Automation/atoms/FindNodes.js:
3375 (switch): Throw an error in case of unknown strategy.
3376 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3377 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Handle InvalidParameter exceptions.
3379 2017-07-16 Brady Eidson <beidson@apple.com>
3381 Crash when a WKHTTPCookieStore outlives its owning WKWebsiteDataStore.
3382 <rdar://problem/33341730> and https://bugs.webkit.org/show_bug.cgi?id=174574
3384 Reviewed by Tim Horton.
3386 Instead of holding a weak reference to its owning API::WebsiteDataStore,
3387 API::HTTPCookieStore can hold a strong reference to the owner's implementation
3388 WebKit::WebsiteDataStore.
3390 * UIProcess/API/APIHTTPCookieStore.cpp:
3391 (API::HTTPCookieStore::HTTPCookieStore):
3392 (API::HTTPCookieStore::cookies):
3393 (API::HTTPCookieStore::setCookie):
3394 (API::HTTPCookieStore::deleteCookie):
3395 (API::HTTPCookieStore::registerObserver):
3396 (API::HTTPCookieStore::unregisterObserver):
3397 (API::HTTPCookieStore::cookieManagerDestroyed):
3398 (API::HTTPCookieStore::registerForNewProcessPoolNotifications):
3399 * UIProcess/API/APIHTTPCookieStore.h:
3401 2017-07-15 Brady Eidson <beidson@apple.com>
3403 Make sure all CFHTTPCookieStorageRefs we create are scheduled.
3404 <rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513
3406 Reviewed by Tim Horton.
3408 Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled.
3409 We need to schedule it on the appropriate RunLoop.
3411 This patch also cleans up the creation of the identifying data itself.
3413 * NetworkProcess/mac/RemoteNetworkingContext.mm:
3414 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
3416 * Shared/cf/CookieStorageUtilsCF.h: Added.
3417 * Shared/cf/CookieStorageUtilsCF.mm: Added.
3418 (WebKit::cookieStorageFromIdentifyingData):
3419 (WebKit::identifyingDataFromCookieStorage):
3421 * Shared/mac/ChildProcessMac.mm:
3422 (WebKit::ChildProcess::setSharedHTTPCookieStorage):
3424 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3425 (WebKit::WebProcessPool::platformInitializeWebProcess):
3426 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
3428 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
3429 (WebKit::WebsiteDataStore::parameters):
3431 * WebKit.xcodeproj/pr