1 2017-08-04 Matt Lewis <jlewis3@apple.com>
3 Unreviewed, rolling out r220288.
5 This broke multiple builds.
9 "Use MPAVRoutingController instead of deprecated versions."
10 https://bugs.webkit.org/show_bug.cgi?id=175063
11 http://trac.webkit.org/changeset/220288
13 2017-08-04 Jeremy Jones <jeremyj@apple.com>
15 Use MPAVRoutingController instead of deprecated versions.
16 https://bugs.webkit.org/show_bug.cgi?id=175063
17 rdar://problem/33301230
19 Reviewed by Tim Horton.
21 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
23 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
24 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
25 (-[WKAirPlayRoutePicker dealloc]):
26 (-[WKAirPlayRoutePicker show:fromRect:]):
27 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
28 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
29 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
30 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
31 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
32 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
33 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
35 2017-08-04 Tim Horton <timothy_horton@apple.com>
37 viewport-fit changes during animated resize can cause layout size to get stuck
38 https://bugs.webkit.org/show_bug.cgi?id=175169
39 <rdar://problem/33684697>
41 Reviewed by Simon Fraser.
43 If we get a commit that changes viewport-fit state while an animated
44 resize is underway, and that change causes the client to push a new
45 minimumLayoutSizeOverride, the new size will be lost forever, and we
46 will get stuck laying out at the wrong size.
48 This is because we unconditionally apply avoidsUnsafeArea for every commit,
49 while most other changes that come in from a commit are ignored if we're
50 inside animated resize. To fix, also ignore avoidsUnsafeArea changes during
51 animated resize, by moving the code that keeps track of it into WKWebView
52 like all of the rest, and read it out of the commit in didCommitLayerTree
53 *after* the animated-resize early-return.
55 Also, fix the associated layout tests by adding a missing assignment
56 in _computedContentInset, which was broken in r220138.
58 * UIProcess/API/Cocoa/WKWebView.mm:
59 (-[WKWebView _initializeWithConfiguration:]):
60 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
61 (-[WKWebView _processDidExit]):
62 (-[WKWebView _didCommitLayerTree:]):
63 (-[WKWebView _setAvoidsUnsafeArea:]):
64 (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
65 (-[WKWebView _didChangeAvoidsUnsafeArea:]): Deleted.
66 * UIProcess/API/Cocoa/WKWebViewInternal.h:
67 * UIProcess/PageClient.h:
68 * UIProcess/WebPageProxy.cpp:
69 (WebKit::WebPageProxy::resetState):
70 (WebKit::WebPageProxy::setAvoidsUnsafeArea): Deleted.
71 * UIProcess/WebPageProxy.h:
72 (WebKit::WebPageProxy::avoidsUnsafeArea const): Deleted.
73 * UIProcess/ios/PageClientImplIOS.h:
74 * UIProcess/ios/PageClientImplIOS.mm:
75 (WebKit::PageClientImpl::didChangeAvoidsUnsafeArea): Deleted.
76 * UIProcess/ios/WebPageProxyIOS.mm:
77 (WebKit::WebPageProxy::didCommitLayerTree):
79 2017-08-04 Matt Lewis <jlewis3@apple.com>
81 Unreviewed, rolling out r220271.
83 Rolling out due to Layout Test failing on iOS Simulator.
87 "Remove STREAMS_API compilation guard"
88 https://bugs.webkit.org/show_bug.cgi?id=175165
89 http://trac.webkit.org/changeset/220271
91 2017-08-03 Sam Weinig <sam@webkit.org>
93 [Cleanup] Remove ScriptGlobalObject
94 https://bugs.webkit.org/show_bug.cgi?id=175173
96 Reviewed by Darin Adler.
98 * WebProcess/WebPage/RemoteWebInspectorUI.cpp:
99 (WebKit::RemoteWebInspectorUI::windowObjectCleared):
100 * WebProcess/WebPage/WebInspectorUI.cpp:
101 (WebKit::WebInspectorUI::windowObjectCleared):
102 Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
104 2017-08-03 Brian Burg <bburg@apple.com>
106 [Cocoa] Web Automation: copy JavaScript atoms to WebKit.framework private headers
107 https://bugs.webkit.org/show_bug.cgi?id=175088
108 <rdar://problem/33685818>
110 Reviewed by Joseph Pecoraro.
112 * WebKit.xcodeproj/project.pbxproj:
113 - Add a Copy Files phase to WebKit.framework.
114 - Copy atoms to the atoms/ directory in WebKit.framework/PrivateHeaders/.
116 2017-08-04 Ryan Haddad <ryanhaddad@apple.com>
118 Unreviewed, rolling out r220268.
120 This change caused assertion failures on macOS and iOS Debug
125 "Resource Load Statistics: Report user interaction
126 immediately, but only when needed"
127 https://bugs.webkit.org/show_bug.cgi?id=175090
128 http://trac.webkit.org/changeset/220268
130 2017-08-04 Andreas Kling <akling@apple.com>
132 NetworkLoad should always invoke its redirect completion handler
133 https://bugs.webkit.org/show_bug.cgi?id=175179
134 <rdar://problem/33464999>
136 Reviewed by Chris Dumez.
138 Make sure the redirect completion handler is always invoked,
139 just like we already did for the response completion handler.
141 * NetworkProcess/NetworkLoad.cpp:
142 (WebKit::NetworkLoad::~NetworkLoad):
144 2017-08-04 Youenn Fablet <youenn@apple.com>
146 Remove STREAMS_API compilation guard
147 https://bugs.webkit.org/show_bug.cgi?id=175165
149 Reviewed by Darin Adler.
151 * Configurations/FeatureDefines.xcconfig:
152 * WebProcess/InjectedBundle/InjectedBundle.cpp:
153 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
155 2017-08-04 Brady Eidson <beidson@apple.com>
157 Enable ServiceWorkers at runtime for WebKitTestRunner.
158 https://bugs.webkit.org/show_bug.cgi?id=175174
160 Reviewed by Youenn Fablet.
162 * UIProcess/WebPreferences.cpp:
163 (WebKit::WebPreferences::enableAllExperimentalFeatures):
165 2017-08-04 John Wilander <wilander@apple.com>
167 Resource Load Statistics: Report user interaction immediately, but only when needed
168 https://bugs.webkit.org/show_bug.cgi?id=175090
169 <rdar://problem/33685546>
171 Reviewed by Chris Dumez.
173 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
174 (WKBundleClearResourceLoadStatistics):
175 Test infrastructure. Ends up calling
176 WebCore::ResourceLoadObserver::clearState().
177 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
179 2017-08-04 Antti Koivisto <antti@apple.com>
181 Network cache should be usable as non-singleton
182 https://bugs.webkit.org/show_bug.cgi?id=175139
184 Reviewed by Sam Weinig.
186 We might want to use it as a non-singleton in the future (for example as a backend for the cache API).
188 This patch makes NetworkCache::Cache and NetworkCache::Storage refcounted objects and takes
189 care to ref them properly during asynchronous operations.
191 The patch doesn't actually create any non-shared instances, it just adds the capability.
193 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
194 (WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
195 * NetworkProcess/NetworkProcess.cpp:
196 (WebKit::fetchDiskCacheEntries):
197 (WebKit::clearDiskCacheEntries):
198 (WebKit::NetworkProcess::setCacheModel):
199 * NetworkProcess/NetworkProcess.h:
200 (WebKit::NetworkProcess::cache):
202 Move the shared cache instance to the network process singleton.
204 * NetworkProcess/NetworkResourceLoader.cpp:
205 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
207 Include shared cache as a reffed member for non-ephemeral instances.
209 (WebKit::NetworkResourceLoader::canUseCache const):
210 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
211 (WebKit::NetworkResourceLoader::abort):
212 (WebKit::NetworkResourceLoader::didReceiveResponse):
213 (WebKit::NetworkResourceLoader::willSendRedirectedRequest):
214 (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
215 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
216 * NetworkProcess/NetworkResourceLoader.h:
217 * NetworkProcess/cache/NetworkCache.cpp:
218 (WebKit::NetworkCache::Cache::open):
220 Open now returns null if it fails.
221 Add RegisterNotify option to set up notify trigger for the shared instance.
223 (WebKit::NetworkCache::Cache::Cache):
224 (WebKit::NetworkCache::Cache::~Cache):
228 (WebKit::NetworkCache::dumpFileChanged):
229 (WebKit::NetworkCache::Cache::setCapacity):
230 (WebKit::NetworkCache::Cache::retrieve):
232 Protect the cache instance during asynchronous operations.
234 (WebKit::NetworkCache::Cache::store):
235 (WebKit::NetworkCache::Cache::storeRedirect):
236 (WebKit::NetworkCache::Cache::remove):
237 (WebKit::NetworkCache::Cache::traverse):
238 (WebKit::NetworkCache::Cache::dumpContentsToFile):
239 (WebKit::NetworkCache::Cache::clear):
240 (WebKit::NetworkCache::Cache::recordsPath const):
241 (WebKit::NetworkCache::Cache::retrieveData):
242 (WebKit::NetworkCache::Cache::storeData):
243 (WebKit::NetworkCache::singleton): Deleted.
244 (WebKit::NetworkCache::Cache::initialize): Deleted.
245 * NetworkProcess/cache/NetworkCache.h:
246 (WebKit::NetworkCache::Cache::canUseSharedMemoryForBodyData const):
247 (WebKit::NetworkCache::Cache::isEnabled const): Deleted.
249 Remove isEnabled() state as a cache object now always represents an enabled cache.
251 * NetworkProcess/cache/NetworkCacheEntry.cpp:
252 (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):
253 * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
254 (WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
255 (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
256 (WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
257 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
258 (WebKit::NetworkCache::Statistics::initialize):
259 (WebKit::NetworkCache::Statistics::shrinkIfNeeded):
260 * NetworkProcess/cache/NetworkCacheStorage.cpp:
261 (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
262 (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
263 (WebKit::NetworkCache::Storage::TraverseOperation::TraverseOperation):
265 Operations now ref the storage. They are already deleted in the main thread so
266 proper destruction is taken care of.
268 (WebKit::NetworkCache::Storage::open):
269 (WebKit::NetworkCache::Storage::~Storage):
270 (WebKit::NetworkCache::Storage::synchronize):
272 This and other asynchronous methods now protect the Storage instance.
274 (WebKit::NetworkCache::Storage::remove):
275 (WebKit::NetworkCache::Storage::retrieve):
276 (WebKit::NetworkCache::Storage::store):
277 (WebKit::NetworkCache::Storage::traverse):
278 (WebKit::NetworkCache::Storage::clear):
279 (WebKit::NetworkCache::Storage::shrink):
280 (WebKit::NetworkCache::Storage::deleteOldVersions):
281 * NetworkProcess/cache/NetworkCacheStorage.h:
282 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
283 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
284 (WebKit::NetworkProcess::clearDiskCache):
285 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
286 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
287 * NetworkProcess/soup/NetworkProcessSoup.cpp:
288 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
289 (WebKit::NetworkProcess::clearDiskCache):
291 2017-08-04 Frederic Wang <fwang@igalia.com>
293 ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
294 https://bugs.webkit.org/show_bug.cgi?id=175135
296 Reviewed by Simon Fraser.
298 This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
299 that it uses the fixed position rectangle relative of the first frame ancestor instead of
300 the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
301 and RenderLayerCompositor. This fixes some flickering issues on iOS.
303 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
304 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll): Use the fixed
305 position rect of a non-main frame if there is one.
307 2017-08-03 Brian Burg <bburg@apple.com>
309 Remove ENABLE(WEB_SOCKET) guards
310 https://bugs.webkit.org/show_bug.cgi?id=167044
312 Reviewed by Joseph Pecoraro.
314 * Configurations/FeatureDefines.xcconfig:
315 * WebProcess/Network/WebSocketProvider.cpp:
316 * WebProcess/Network/WebSocketProvider.h:
318 2017-08-03 Chris Dumez <cdumez@apple.com>
320 Multiple Layout tests from web-platform-tests/beacon/ are timing out.
321 https://bugs.webkit.org/show_bug.cgi?id=175076
322 <rdar://problem/33704752>
324 Reviewed by Alexey Proskuryakov.
326 * NetworkProcess/NetworkLoad.cpp:
327 (WebKit::NetworkLoad::completeAuthenticationChallenge):
328 In the NETWORK_SESSION code path, we did not ask the client about server trust evaluation
329 when the clientCredentialPolicy was CannotAskClientForCredentials. This is because the
330 same delegate is used for HTTP authentication and server trust evaluation in the
331 NETWORK_SESSION code path. To align both code paths, we now ask the client about server
332 trust evaluation even if the policy CannotAskClientForCredentials. This allows WKTR
333 to trust certificates for localhost / 127.0.0.1 unconditionally and consistently.
335 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
337 [PAL] Move spi/cf directory into PAL
338 https://bugs.webkit.org/show_bug.cgi?id=175057
340 Reviewed by Antti Koivisto.
342 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
343 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
344 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
345 * NetworkProcess/ios/NetworkProcessIOS.mm:
346 * NetworkProcess/mac/NetworkLoadMac.mm:
347 * NetworkProcess/mac/NetworkProcessMac.mm:
348 * Shared/cf/CookieStorageUtilsCF.h:
349 * Shared/mac/ChildProcessMac.mm:
350 * Shared/mac/CookieStorageShim.mm:
351 * UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
352 * UIProcess/API/Cocoa/WKProcessPool.mm:
353 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
354 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
355 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
356 * UIProcess/WebsiteData/WebsiteDataRecord.cpp:
357 * UIProcess/WebsiteData/WebsiteDataStore.h:
358 * UIProcess/mac/WebCookieManagerProxyMac.mm:
359 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
360 * WebProcess/cocoa/WebProcessCocoa.mm:
362 2017-08-03 Youenn Fablet <youenn@apple.com>
364 Remove FETCH_API compilation guard
365 https://bugs.webkit.org/show_bug.cgi?id=175154
367 Reviewed by Chris Dumez.
369 * Configurations/FeatureDefines.xcconfig:
370 * WebProcess/WebPage/WebPage.cpp:
371 (WebKit::WebPage::updatePreferences):
373 2017-08-03 Matt Lewis <jlewis3@apple.com>
375 Unreviewed, rolling out r220209.
377 This caused internal build failures.
381 "Use MPAVRoutingController instead of deprecated versions."
382 https://bugs.webkit.org/show_bug.cgi?id=175063
383 http://trac.webkit.org/changeset/220209
385 2017-08-02 Brian Burg <bburg@apple.com>
387 Web Automation: consider file extensions in the "accept" attribute when deciding if a file can be uploaded
388 https://bugs.webkit.org/show_bug.cgi?id=175081
390 Reviewed by Joseph Pecoraro.
392 * UIProcess/Automation/WebAutomationSession.cpp:
393 (WebKit::fileCanBeAcceptedForUpload):
394 (WebKit::WebAutomationSession::handleRunOpenPanel):
395 In cases where a file has an extension, try to match it against the
396 accepted extensions list. Give up if there's no extension. Otherwise,
397 proceed as normal to infer a MIME type based on the extension.
398 In cases where extension-less files are inside hidden folders, the MIME
399 inference will fail as well.
401 2017-08-03 Brady Eidson <beidson@apple.com>
403 Add SW IDLs and stub out basic functionality.
404 https://bugs.webkit.org/show_bug.cgi?id=175115
406 Reviewed by Chris Dumez.
408 * Configurations/FeatureDefines.xcconfig:
410 * Shared/WebPreferencesDefinitions.h:
412 * UIProcess/WebPreferences.cpp:
413 (WebKit::WebPreferences::enableAllExperimentalFeatures): Explicitly skip SW for now.
414 The ramifications to layouttests are complicated, and we'd like to follow up in a
417 * WebProcess/WebPage/WebPage.cpp:
418 (WebKit::WebPage::updatePreferences):
420 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
422 [WebKit] Sort Xcode project file
423 https://bugs.webkit.org/show_bug.cgi?id=175122
425 Reviewed by Antti Koivisto.
427 * WebKit.xcodeproj/project.pbxproj:
429 2017-08-02 Sam Weinig <sam@webkit.org>
431 [WebIDL] Convert MutationCallback to be a normal generated callback
432 https://bugs.webkit.org/show_bug.cgi?id=174140
434 Reviewed by Darin Adler.
436 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
437 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
438 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilterPrivate.h:
439 Pass, now necessary, Document to NativeNodeFilter constructor.
441 2017-08-03 Jeremy Jones <jeremyj@apple.com>
443 Use MPAVRoutingController instead of deprecated versions.
444 https://bugs.webkit.org/show_bug.cgi?id=175063
445 rdar://problem/33301230
447 Reviewed by Tim Horton.
449 Remove dependence on deprecated classes MPAVRoutingSheet and MPAudioVideoRoutingPopoverController.
451 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
452 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
453 (-[WKAirPlayRoutePicker dealloc]):
454 (-[WKAirPlayRoutePicker show:fromRect:]):
455 (-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]): Deleted.
456 (-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]): Deleted.
457 (-[WKAirPlayRoutePicker _windowWillRotate:]): Deleted.
458 (-[WKAirPlayRoutePicker _windowDidRotate:]): Deleted.
459 (-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Deleted.
460 (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Deleted.
461 (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Deleted.
463 2017-08-03 Chris Dumez <cdumez@apple.com>
465 Improve our support for referrer policies
466 https://bugs.webkit.org/show_bug.cgi?id=175069
467 <rdar://problem/33677313>
469 Reviewed by Darin Adler.
471 * WebProcess/Network/WebLoaderStrategy.cpp:
472 (WebKit::WebLoaderStrategy::loadResource):
473 (WebKit::WebLoaderStrategy::schedulePluginStreamLoad):
475 2017-08-02 Chris Dumez <cdumez@apple.com>
477 NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times
478 https://bugs.webkit.org/show_bug.cgi?id=175109
479 <rdar://problem/33363169>
481 Reviewed by Brady Eidson.
483 If NetworkResourceLoader::setDefersLoading(false) is called by the client while m_networkLoad is null
484 then we call NetworkResourceLoader::start() to start the load. This is needed in the case where
485 a NetworkResourceLoader is constructed in deferred mode so that the load can later be started via
486 setDefersLoading(). However, it is possible for setDefersLoading(false) to be called when start()
487 has already been called, which causes start() to be called multiple times and leads to an assertion
490 Normally, setDefersLoading(false) returns without calling start() if m_networkLoad is not null. It
491 relies on m_networkLoad being non-null to determine if start() should be called. This is bad because
492 start() checks the disk cache asynchronously *before* calling startNetworkLoad() and initializing
493 m_networkLoad. Therefore, if setDefersLoading(false) is called *while* we are checking the cache,
494 then we will call incorrectly call start() again.
496 In the case of the radar, this happens when we:
497 1. Call start() and check the disk cache
498 2. Retrieve a cached redirect from the cache, which causes a WillSendRequest IPC to be sent to the
500 3. The WebProcess calls setDefersLoading(true), sends the ContinueWillSendRequest IPC back and
501 then calls setDefersLoading(false)
503 The call to continueWillSendRequest() causes us to retrieve the redirected entry from the cache,
504 asynchronously, which will return no entry and start a load.
505 The later call to setDefersLoading(false) causes us to call start() again and we end up back to step 1.
507 * NetworkProcess/NetworkResourceLoader.cpp:
508 (WebKit::NetworkResourceLoader::start):
509 (WebKit::NetworkResourceLoader::setDefersLoading):
510 * NetworkProcess/NetworkResourceLoader.h:
512 2017-08-02 Andreas Kling <akling@apple.com>
514 NetworkRTCProvider::createResolver() leaks CFHost objects
515 https://bugs.webkit.org/show_bug.cgi?id=175103
516 <rdar://problem/33690347>
518 Reviewed by Youenn Fablet.
520 Add a missing adoptCF() so we don't leak the CFHost.
522 * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
523 (WebKit::NetworkRTCProvider::createResolver):
525 2017-08-02 Jeremy Jones <jeremyj@apple.com>
527 Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
528 https://bugs.webkit.org/show_bug.cgi?id=175080
532 This is obsolete because of the alternate solution in
533 https://bugs.webkit.org/show_bug.cgi?id=174850
535 * Shared/WebPreferencesDefinitions.h:
536 * UIProcess/API/Cocoa/WKPreferences.mm:
537 (-[WKPreferences _setMediaDocumentEntersFullscreenAutomatically:]): Deleted.
538 (-[WKPreferences _mediaDocumentEntersFullscreenAutomatically]): Deleted.
539 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
540 * WebProcess/WebPage/WebPage.cpp:
541 (WebKit::WebPage::updatePreferences):
543 2017-08-02 Filip Pizlo <fpizlo@apple.com>
545 We should be OK with the gigacage being disabled on gmalloc
546 https://bugs.webkit.org/show_bug.cgi?id=175082
548 Reviewed by Michael Saboff.
550 * WebProcess/WebProcess.cpp:
551 (WebKit::m_webSQLiteDatabaseTracker):
553 2017-08-02 Brian Burg <bburg@apple.com>
555 Web Automation: files selected for upload should be checked against values of the 'accept' attribute
556 https://bugs.webkit.org/show_bug.cgi?id=174803
557 <rdar://problem/33514190>
559 Reviewed by Carlos Garcia Campos.
561 Use the parsed values of the file input element's "accept" attribute to reject
562 files that don't match the specified values. This is normally done by Safari
563 using NSOpenPanel, but since a real open panel isn't shown during automation,
564 it needs to be done here.
566 Support for limiting accepted files by file extensions will be added when the
567 same is implemented in the normal code path for the C and Objective-C APIs.
569 This change is covered by internal WebDriver tests that will be rewritten for the
570 public Webdriver W3C test suite someday, when safaridriver runs those tests itself.
572 * UIProcess/Automation/WebAutomationSession.cpp:
573 (WebKit::WebAutomationSession::handleRunOpenPanel):
574 Since we already have the proposed files, there's no need to compute a list of
575 supported extensions based on wildcard MIME types. First check the extension,
576 then the inferred MIME type for the extension, and then the wildcard MIME type
577 if the inferred type is not an exact match.
579 2017-08-02 Tim Horton <timothy_horton@apple.com>
581 WKPDFView doesn't respect safe area insets
582 https://bugs.webkit.org/show_bug.cgi?id=175046
583 <rdar://problem/33558386>
585 Reviewed by Wenson Hsieh.
587 * Platform/spi/ios/UIKitSPI.h:
590 * UIProcess/API/Cocoa/WKWebView.mm:
591 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
592 Drive-by fix two small custom content view issues:
594 - Reset _scrollViewBackgroundColor; it is used to early-return from
595 updating the background color if it hasn't changed, but if you go from a
596 site with (for example) a white background, to a PDF, to another site
597 with a white background, we will early-return and not reset the background
598 color from the grey WKPDFView background.
600 - When installing a custom content view, scroll to the origin. We miss
601 the usual mechanism for scrolling to the origin when custom content views
602 are installed, so do it here.
604 (-[WKWebView _effectiveObscuredInsetEdgesAffectedBySafeArea]):
605 Ignore _obscuredInsetEdgesAffectedBySafeArea for custom content views.
606 This is fairly arbitrary, and we should find a different way to
607 express different edge sets for different kinds of content (perhaps
608 bake this into default viewports?), but for now this works.
610 (-[WKWebView _computedContentInset]):
611 Use _effectiveObscuredInsetEdgesAffectedBySafeArea instead of the ivar directly.
613 (-[WKWebView _safeAreaShouldAffectObscuredInsets]):
614 Force safe areas to not affect obscured insets for custom content views,
615 so that it's up to every custom content view to take safe areas into
618 * UIProcess/API/Cocoa/WKWebViewInternal.h:
619 Expose _computedUnobscuredSafeAreaInset for WKPDFView's use.
621 * UIProcess/ios/WKPDFView.mm:
622 (-[WKPDFView web_setMinimumSize:]):
623 Avoid rebuilding the WKPDFView if the minimum size didn't change.
625 (-[WKPDFView _offsetForPageNumberIndicator]):
626 Take unobscured safe area insets into account when insetting
627 the page number indicator.
629 (-[WKPDFView web_computedContentInsetDidChange]):
630 Watch for unobscured safe area inset changes, and apply them to the
631 layout of the WKPDFView.
633 (-[WKPDFView _computePageAndDocumentFrames]):
634 Make it possible to only update the WKPDFView's size and position, without
635 rebuilding its subviews, if the width did not change. This prevents lots
636 of flashing of the child UIPDFPageViews when the unobscured safe area
637 insets change dynamically.
639 Take the safe area insets into account when determining what width
642 (-[WKPDFView _updateDocumentFrame]):
643 Take the safe area insets into account when positioning the WKPDFView
644 inside the WKScrollView.
646 2017-08-02 John Wilander <wilander@apple.com>
648 ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel() should check the return value of storagePath()
649 https://bugs.webkit.org/show_bug.cgi?id=175055
650 <rdar://problem/32671352>
652 Reviewed by David Kilzer.
654 * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:
655 (WebKit::ResourceLoadStatisticsClassifierCocoa::singletonPredictionModel):
656 Now uses dispatch_once() instead of NeverDestroyed and checks the
657 return value of storagePath() before using it to load the model.
659 2017-08-01 Brian Burg <bburg@apple.com>
661 HTML file input elements do not support file extensions in the "accept" attribute
662 https://bugs.webkit.org/show_bug.cgi?id=95698
663 <rdar://problem/12231850>
665 Reviewed by Darin Adler.
667 Plumb accepted file extensions out to the C API.
668 The Cocoa API will be improved in a later patch.
670 * Shared/WebCoreArgumentCoders.cpp:
671 (IPC::ArgumentCoder<FileChooserSettings>::encode):
672 (IPC::ArgumentCoder<FileChooserSettings>::decode):
673 * UIProcess/API/APIOpenPanelParameters.cpp:
674 (API::OpenPanelParameters::acceptFileExtensions const):
675 * UIProcess/API/APIOpenPanelParameters.h:
676 * UIProcess/API/C/WKOpenPanelParametersRef.cpp:
677 (WKOpenPanelParametersCopyAcceptedFileExtensions):
678 * UIProcess/API/C/WKOpenPanelParametersRef.h:
680 2017-08-02 Fujii Hironori <Hironori.Fujii@sony.com>
682 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
683 https://bugs.webkit.org/show_bug.cgi?id=175010
684 <rdar://problem/33647818>
686 Reviewed by Alex Christensen.
688 * UIProcess/API/APIContentRuleListStore.cpp:
689 (API::ContentRuleListStore::compileContentRuleList):
690 Call QualifiedName::init().
692 2017-08-01 Chris Dumez <cdumez@apple.com>
694 Add initial support for navigator.sendBeacon
695 https://bugs.webkit.org/show_bug.cgi?id=175007
696 <rdar://problem/33547728>
698 Reviewed by Sam Weinig.
700 Add experimental feature flag for the Beacon API, disabled by default.
702 * Shared/WebPreferencesDefinitions.h:
703 * WebProcess/InjectedBundle/InjectedBundle.cpp:
704 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
705 * WebProcess/WebPage/WebPage.cpp:
706 (WebKit::WebPage::updatePreferences):
708 2017-08-01 Filip Pizlo <fpizlo@apple.com>
710 Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
711 https://bugs.webkit.org/show_bug.cgi?id=174727
713 Reviewed by Mark Lam.
715 The WebProcess should never disable the Gigacage by allocating typed arrays outside the Gigacage. So,
716 we add a callback that crashes the process.
718 * WebProcess/WebProcess.cpp:
719 (WebKit::gigacageDisabled):
720 (WebKit::m_webSQLiteDatabaseTracker):
722 2017-08-01 Brian Burg <bburg@apple.com>
724 Web Automation: add event to notify service when a page's main frame window object has cleared
725 https://bugs.webkit.org/show_bug.cgi?id=174987
726 <rdar://problem/36602634>
728 Reviewed by Carlos Garcia Campos.
730 * UIProcess/Automation/Automation.json: Add new event.
732 * UIProcess/Automation/WebAutomationSession.h:
733 * UIProcess/Automation/WebAutomationSession.cpp:
734 (WebKit::WebAutomationSession::navigationOccurredForFrame):
735 (WebKit::WebAutomationSession::willClosePage):
736 When a WebPage navigates or closes, send the browsingContextCleared event.
737 Any element handles for elements in the browsing context are no longer valid.
739 * UIProcess/WebPageProxy.cpp:
740 (WebKit::WebPageProxy::close):
741 Add a new hook into the active automation session so it is notified when a page closes.
743 2017-08-01 Brady Eidson <beidson@apple.com>
745 API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug..
746 https://bugs.webkit.org/show_bug.cgi?id=175030
748 Reviewed by Andy Estes.
750 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
751 (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next
754 2017-08-01 Brady Eidson <beidson@apple.com>
756 Part 2 of: Rename DatabaseProcess to StorageProcess.
757 https://bugs.webkit.org/show_bug.cgi?id=174880
759 Reviewed by Andy Estes.
761 Rename some more variables, classes, etc. to reflect the change.
763 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
764 (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
766 * NetworkProcess/NetworkProcess.cpp:
767 (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
768 (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs):
769 (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
770 (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
771 * NetworkProcess/NetworkProcess.h:
772 * NetworkProcess/NetworkProcess.messages.in:
774 * Shared/ProcessExecutablePath.h:
775 * Shared/gtk/ProcessExecutablePathGtk.cpp:
776 (WebKit::executablePathOfStorageProcess):
777 (WebKit::executablePathOfDatabaseProcess): Deleted.
778 * Shared/wpe/ProcessExecutablePathWPE.cpp:
779 (WebKit::executablePathOfStorageProcess):
780 (WebKit::executablePathOfDatabaseProcess): Deleted.
782 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
783 (WebKit::WebIDBConnectionToClient::putOrAdd):
785 * StorageProcess/StorageProcess.cpp:
786 (WebKit::StorageProcess::initializeWebsiteDataStore):
787 (WebKit::StorageProcess::postStorageTask):
788 (WebKit::StorageProcess::performNextStorageTask):
789 (WebKit::StorageProcess::createStorageToWebProcessConnection):
790 (WebKit::StorageProcess::fetchWebsiteData):
791 (WebKit::StorageProcess::postDatabaseTask): Deleted.
792 (WebKit::StorageProcess::performNextDatabaseTask): Deleted.
793 (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
794 * StorageProcess/StorageProcess.h:
795 * StorageProcess/StorageProcess.messages.in:
796 * StorageProcess/mac/StorageProcessMac.mm:
797 (WebKit::StorageProcess::initializeProcessName):
799 * UIProcess/API/C/WKContext.cpp:
800 (WKContextGetDatabaseProcessIdentifier):
802 * UIProcess/API/Cocoa/WKProcessPool.mm:
803 (-[WKProcessPool _terminateStorageProcess]):
804 (-[WKProcessPool _storageProcessIdentifier]):
805 (-[WKProcessPool _terminateDatabaseProcess]): Deleted.
806 (-[WKProcessPool _databaseProcessIdentifier]): Deleted.
807 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
809 * UIProcess/ChildProcessProxy.cpp:
810 (WebKit::ChildProcessProxy::getLaunchOptions):
812 * UIProcess/Launcher/ProcessLauncher.h:
813 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
814 (WebKit::ProcessLauncher::launchProcess):
815 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
816 (WebKit::serviceName):
817 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
818 (WebKit::ProcessLauncher::launchProcess):
820 * UIProcess/Network/NetworkProcessProxy.cpp:
821 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
822 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
823 * UIProcess/Network/NetworkProcessProxy.h:
824 * UIProcess/Network/NetworkProcessProxy.messages.in:
826 * UIProcess/Storage/StorageProcessProxy.cpp:
827 (WebKit::StorageProcessProxy::getLaunchOptions):
828 (WebKit::StorageProcessProxy::getStorageProcessConnection):
829 (WebKit::StorageProcessProxy::didClose):
830 (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
831 (WebKit::StorageProcessProxy::didFinishLaunching):
832 (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
833 (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
834 * UIProcess/Storage/StorageProcessProxy.h:
835 * UIProcess/Storage/StorageProcessProxy.messages.in:
837 * UIProcess/WebContextClient.cpp:
838 (WebKit::WebContextClient::storageProcessDidCrash):
839 (WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
840 * UIProcess/WebContextClient.h:
842 * UIProcess/WebProcessPool.cpp:
843 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
844 (WebKit::WebProcessPool::getStorageProcessConnection):
845 (WebKit::WebProcessPool::storageProcessCrashed):
846 (WebKit::WebProcessPool::pageAddedToProcess):
847 (WebKit::WebProcessPool::storageProcessIdentifier):
848 (WebKit::WebProcessPool::terminateStorageProcess):
849 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
850 (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
851 (WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
852 (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
853 (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
854 * UIProcess/WebProcessPool.h:
855 (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
856 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.
858 * UIProcess/WebProcessProxy.cpp:
859 (WebKit::WebProcessProxy::getStorageProcessConnection):
860 (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
861 * UIProcess/WebProcessProxy.h:
862 * UIProcess/WebProcessProxy.messages.in:
864 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
865 (WebKit::WebsiteDataStore::fetchDataAndApply):
866 (WebKit::WebsiteDataStore::removeData):
867 (WebKit::WebsiteDataStore::storageProcessParameters):
868 (WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
869 * UIProcess/WebsiteData/WebsiteDataStore.h:
871 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
872 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
873 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
875 * WebProcess/Databases/WebDatabaseProvider.cpp:
876 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
878 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
879 (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
880 (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
881 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
882 (WebKit::WebToStorageProcessConnection::didClose):
883 (WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
884 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
885 (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
886 (WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
887 (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
888 (WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
889 (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
890 (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
891 * WebProcess/Storage/WebToStorageProcessConnection.h:
892 (WebKit::WebToStorageProcessConnection::create):
893 (WebKit::WebToDatabaseProcessConnection::create): Deleted.
894 (WebKit::WebToDatabaseProcessConnection::connection): Deleted.
896 * WebProcess/WebProcess.cpp:
897 (WebKit::WebProcess::webToStorageProcessConnectionClosed):
898 (WebKit::WebProcess::webToStorageProcessConnection):
899 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
900 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
901 (WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
902 (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
903 * WebProcess/WebProcess.h:
905 2017-08-01 Brady Eidson <beidson@apple.com>
907 Part 1 of: Rename DatabaseProcess to StorageProcess.
908 https://bugs.webkit.org/show_bug.cgi?id=174879
910 Reviewed by Andy Estes.
912 This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).
914 Some renaming in actual code did result (Some class/struct names, method names, etc)
916 Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"
919 * DerivedSources.make:
923 * WebKit.xcodeproj/project.pbxproj:
925 * Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
926 * StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
927 * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
929 * Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
930 * Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.
932 * StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
933 * StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
935 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
936 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
937 * StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
939 * StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
940 * StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
941 * StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.
943 * StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
944 * StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
945 * StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
947 * StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
948 * StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
949 * StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
950 * StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
951 * UIProcess/Network/NetworkProcessProxy.cpp:
953 * UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
954 * UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
955 * UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.
957 * UIProcess/WebContextSupplement.h:
958 * UIProcess/WebProcessPool.cpp:
959 * UIProcess/WebProcessPool.h:
960 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
961 * UIProcess/WebsiteData/WebsiteDataStore.h:
962 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
963 * WebProcess/Databases/WebDatabaseProvider.cpp:
965 * WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
966 * WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.
968 * WebProcess/WebProcess.cpp:
970 2017-08-01 Michael Catanzaro <mcatanzaro@igalia.com>
972 [CMake] WebKitFS.cmake depends on options set in Option cmake files that are included later
973 https://bugs.webkit.org/show_bug.cgi?id=174855
975 Reviewed by Carlos Garcia Campos.
977 Don't create derived sources directory here anymore.
983 2017-07-31 Daniel Bates <dabates@apple.com>
985 WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction() may not be able to
986 determine page that initiated navigation
987 https://bugs.webkit.org/show_bug.cgi?id=174531
989 Remove a comment from WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction()
990 about determining the originating page independently from the originating frame. There
991 does not seem to be much value to fixing this. We can always revisit this issue if we
992 discover a strong motivating example. See <https://bugs.webkit.org/show_bug.cgi?id=174531#c1>
995 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
996 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
998 2017-07-31 Sam Weinig <sam@webkit.org>
1000 Remove unnecessary exceptions from storage code
1001 https://bugs.webkit.org/show_bug.cgi?id=174572
1003 Reviewed by Chris Dumez.
1005 * WebProcess/Storage/StorageAreaImpl.cpp:
1006 (WebKit::StorageAreaImpl::canAccessStorage): Deleted.
1007 * WebProcess/Storage/StorageAreaImpl.h:
1008 * WebProcess/Storage/StorageNamespaceImpl.cpp:
1009 Remove canAccessStorage. It is no longer called.
1011 2017-07-30 Brady Eidson <beidson@apple.com>
1013 Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
1014 https://bugs.webkit.org/show_bug.cgi?id=174958
1016 Reviewed by Darin Adler.
1018 * UIProcess/API/APIURLSchemeTask.h:
1020 * UIProcess/API/C/WKTestingSupport.cpp:
1021 (WKGetAPIURLSchemeTaskInstanceCount):
1022 (WKGetWebURLSchemeTaskInstanceCount):
1023 * UIProcess/API/C/WKTestingSupport.h:
1025 * UIProcess/WebURLSchemeTask.h:
1027 * WebKit.xcodeproj/project.pbxproj:
1029 2017-07-29 Yusuke Suzuki <utatane.tea@gmail.com>
1031 Unreviewed, build fix for GTK and WPE about StorageProcess renaming
1034 * PlatformGTK.cmake:
1035 * PlatformMac.cmake:
1036 * PlatformWPE.cmake:
1038 2017-07-28 Brent Fulgham <bfulgham@apple.com>
1040 [Mac][WebKit2] WebKit sandbox errors while streaming Netflix
1041 https://bugs.webkit.org/show_bug.cgi?id=174955
1042 <rdar://problem/33583994>
1044 Reviewed by Alex Christensen.
1046 Wider testing with the stricter sandboxing rules identified three more IOKit properties we need to expose:
1048 - CEAPixelRepetition
1051 * WebProcess/com.apple.WebProcess.sb.in:
1053 2017-07-28 Commit Queue <commit-queue@webkit.org>
1055 Unreviewed, rolling out r219986.
1056 https://bugs.webkit.org/show_bug.cgi?id=174962
1058 "broke PLT on iOS (rdar://problem/33602751)" (Requested by
1063 "Part 1 of: Rename DatabaseProcess to StorageProcess."
1064 https://bugs.webkit.org/show_bug.cgi?id=174879
1065 http://trac.webkit.org/changeset/219986
1067 2017-07-28 Commit Queue <commit-queue@webkit.org>
1069 Unreviewed, rolling out r219990.
1070 https://bugs.webkit.org/show_bug.cgi?id=174961
1072 "broke PLT on iOS (rdar://problem/33602751)" (Requested by
1077 "Part 2 of: Rename DatabaseProcess to StorageProcess."
1078 https://bugs.webkit.org/show_bug.cgi?id=174880
1079 http://trac.webkit.org/changeset/219990
1081 2017-07-28 Brady Eidson <beidson@apple.com>
1083 API tests that use URLSchemeHandler are failing.
1084 https://bugs.webkit.org/show_bug.cgi?id=174950
1086 Reviewed by Alex Christensen.
1088 Make sure that in all cases where we remove the last task from the page->task map...
1089 ...We also remove the map itself.
1091 * UIProcess/WebURLSchemeHandler.cpp:
1092 (WebKit::WebURLSchemeHandler::stopTask):
1093 (WebKit::WebURLSchemeHandler::taskCompleted):
1094 (WebKit::WebURLSchemeHandler::removeTaskFromPageMap):
1095 * UIProcess/WebURLSchemeHandler.h:
1097 2017-07-28 Brady Eidson <beidson@apple.com>
1099 WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped).
1100 <rdar://problem/33568276> and https://bugs.webkit.org/show_bug.cgi?id=174895
1102 Reviewed by Alex Christensen.
1104 There was a lot going on here:
1105 - There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks
1106 - WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object
1107 - When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks
1108 - If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks
1109 (and therefore the UIProcess tasks were also not getting cleaned up)
1110 - If a WebProcess crashed, the UIProcess was not cleaning up the related tasks
1112 * UIProcess/API/Cocoa/WKURLSchemeTask.mm:
1113 (-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask
1115 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
1116 * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
1117 (WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map
1118 so the wrapper and implementation object can both be destroyed.
1120 * UIProcess/WebPageProxy.cpp:
1121 (WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks.
1122 (WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks.
1123 (WebKit::WebPageProxy::stopAllURLSchemeTasks):
1124 * UIProcess/WebPageProxy.h:
1126 * UIProcess/WebURLSchemeHandler.cpp:
1127 (WebKit::WebURLSchemeHandler::startTask):
1128 (WebKit::WebURLSchemeHandler::stopAllTasksForPage):
1129 (WebKit::WebURLSchemeHandler::stopTask):
1130 (WebKit::WebURLSchemeHandler::taskCompleted):
1131 * UIProcess/WebURLSchemeHandler.h:
1133 * UIProcess/WebURLSchemeTask.cpp:
1134 (WebKit::WebURLSchemeTask::WebURLSchemeTask):
1135 * UIProcess/WebURLSchemeTask.h:
1136 (WebKit::WebURLSchemeTask::pageID): Store separate from the WebPage so messaging
1137 is possible even after the WebPage* has been cleared.
1139 * WebProcess/WebPage/WebPage.cpp:
1140 (WebKit::WebPage::stopAllURLSchemeTasks):
1141 * WebProcess/WebPage/WebPage.h:
1143 * WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
1144 (WebKit::WebURLSchemeHandlerProxy::stopAllTasks):
1145 (WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
1146 (WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):
1147 (WebKit::WebURLSchemeHandlerProxy::removeTask):
1148 * WebProcess/WebPage/WebURLSchemeHandlerProxy.h:
1150 * WebProcess/WebProcess.cpp:
1151 (WebKit::WebProcess::networkProcessConnectionClosed): Call stopAllURLSchemeTasks
1154 2017-07-28 Frederic Wang <fwang@igalia.cpm>
1156 Fix typo in scrollPositionChangedViaDelegatedScrolling
1157 https://bugs.webkit.org/show_bug.cgi?id=174937
1159 Reviewed by Wenson Hsieh.
1161 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1162 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1163 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
1165 2017-07-28 Jeremy Jones <jeremyj@apple.com>
1167 Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes.
1168 https://bugs.webkit.org/show_bug.cgi?id=174437
1170 Reviewed by Darin Adler.
1172 Remove redundant Web- prefix from classes in WebKit namespace.
1174 * DerivedSources.make:
1175 * UIProcess/API/Cocoa/WKWebView.mm:
1176 * UIProcess/Cocoa/PlaybackSessionManagerProxy.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h.
1177 * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in.
1178 * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: Added.
1179 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h.
1180 * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in.
1181 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: Renamed from Source/WebKit/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm.
1182 * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm: Removed.
1183 * UIProcess/Cocoa/WebViewImpl.mm:
1184 (WebKit::WebViewImpl::updateMediaTouchBar):
1185 * UIProcess/WebPageProxy.cpp:
1186 (WebKit::m_weakPtrFactory):
1187 (WebKit::WebPageProxy::reattachToWebProcess):
1188 (WebKit::WebPageProxy::playbackSessionManager):
1189 (WebKit::WebPageProxy::videoFullscreenManager):
1190 * UIProcess/WebPageProxy.h:
1191 * UIProcess/ios/WebPageProxyIOS.mm:
1192 * WebKit.xcodeproj/project.pbxproj:
1193 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1194 * WebProcess/WebPage/WebPage.cpp:
1195 (WebKit::WebPage::playbackSessionManager):
1196 (WebKit::WebPage::videoFullscreenManager):
1197 * WebProcess/WebPage/WebPage.h:
1198 * WebProcess/cocoa/PlaybackSessionManager.h: Renamed from Source/WebKit/WebProcess/cocoa/WebPlaybackSessionManager.h.
1199 * WebProcess/cocoa/PlaybackSessionManager.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/WebPlaybackSessionManager.messages.in.
1200 * WebProcess/cocoa/PlaybackSessionManager.mm: Added.
1201 * WebProcess/cocoa/VideoFullscreenManager.h: Renamed from Source/WebKit/WebProcess/cocoa/WebVideoFullscreenManager.h.
1202 (WebKit::VideoFullscreenInterfaceContext::create):
1203 * WebProcess/cocoa/VideoFullscreenManager.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/WebVideoFullscreenManager.messages.in.
1204 * WebProcess/cocoa/VideoFullscreenManager.mm: Renamed from Source/WebKit/WebProcess/cocoa/WebVideoFullscreenManager.mm.
1205 * WebProcess/cocoa/WebPlaybackSessionManager.mm: Removed.
1207 2017-07-27 Zan Dobersek <zdobersek@igalia.com>
1209 [CMake] Re-add the StorageProcess executable target
1210 https://bugs.webkit.org/show_bug.cgi?id=174929
1212 Reviewed by Carlos Garcia Campos.
1214 Re-add the StorageProcess executable target that was removed in r219960.
1215 Back then it was still named DatabaseProcess, but the name changed in
1216 the following patches.
1220 2017-07-27 Brady Eidson <beidson@apple.com>
1222 Part 2 of: Rename DatabaseProcess to StorageProcess.
1223 https://bugs.webkit.org/show_bug.cgi?id=174880
1225 Reviewed by Andy Estes.
1227 Rename some more variables, classes, etc. to reflect the change.
1229 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1230 (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
1232 * NetworkProcess/NetworkProcess.cpp:
1233 (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
1234 (WebKit::NetworkProcess::didgrantSandboxExtensionsToStorageProcessForBlobs):
1235 (WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
1236 (WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
1237 * NetworkProcess/NetworkProcess.h:
1238 * NetworkProcess/NetworkProcess.messages.in:
1240 * Shared/ProcessExecutablePath.h:
1241 * Shared/gtk/ProcessExecutablePathGtk.cpp:
1242 (WebKit::executablePathOfStorageProcess):
1243 (WebKit::executablePathOfDatabaseProcess): Deleted.
1244 * Shared/wpe/ProcessExecutablePathWPE.cpp:
1245 (WebKit::executablePathOfStorageProcess):
1246 (WebKit::executablePathOfDatabaseProcess): Deleted.
1248 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
1249 (WebKit::WebIDBConnectionToClient::putOrAdd):
1251 * StorageProcess/StorageProcess.cpp:
1252 (WebKit::StorageProcess::initializeWebsiteDataStore):
1253 (WebKit::StorageProcess::postStorageTask):
1254 (WebKit::StorageProcess::performNextStorageTask):
1255 (WebKit::StorageProcess::createStorageToWebProcessConnection):
1256 (WebKit::StorageProcess::fetchWebsiteData):
1257 (WebKit::StorageProcess::postDatabaseTask): Deleted.
1258 (WebKit::StorageProcess::performNextDatabaseTask): Deleted.
1259 (WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
1260 * StorageProcess/StorageProcess.h:
1261 * StorageProcess/StorageProcess.messages.in:
1262 * StorageProcess/mac/StorageProcessMac.mm:
1263 (WebKit::StorageProcess::initializeProcessName):
1265 * UIProcess/API/C/WKContext.cpp:
1266 (WKContextGetDatabaseProcessIdentifier):
1268 * UIProcess/API/Cocoa/WKProcessPool.mm:
1269 (-[WKProcessPool _terminateStorageProcess]):
1270 (-[WKProcessPool _storageProcessIdentifier]):
1271 (-[WKProcessPool _terminateDatabaseProcess]): Deleted.
1272 (-[WKProcessPool _databaseProcessIdentifier]): Deleted.
1273 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1275 * UIProcess/Launcher/ProcessLauncher.h:
1276 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1277 (WebKit::ProcessLauncher::launchProcess):
1278 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1279 (WebKit::serviceName):
1280 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
1281 (WebKit::ProcessLauncher::launchProcess):
1283 * UIProcess/Network/NetworkProcessProxy.cpp:
1284 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
1285 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
1286 * UIProcess/Network/NetworkProcessProxy.h:
1287 * UIProcess/Network/NetworkProcessProxy.messages.in:
1289 * UIProcess/Storage/StorageProcessProxy.cpp:
1290 (WebKit::StorageProcessProxy::getLaunchOptions):
1291 (WebKit::StorageProcessProxy::getStorageProcessConnection):
1292 (WebKit::StorageProcessProxy::didClose):
1293 (WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
1294 (WebKit::StorageProcessProxy::didFinishLaunching):
1295 (WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
1296 (WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
1297 * UIProcess/Storage/StorageProcessProxy.h:
1298 * UIProcess/Storage/StorageProcessProxy.messages.in:
1300 * UIProcess/WebContextClient.cpp:
1301 (WebKit::WebContextClient::storageProcessDidCrash):
1302 (WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
1303 * UIProcess/WebContextClient.h:
1305 * UIProcess/WebProcessPool.cpp:
1306 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
1307 (WebKit::WebProcessPool::getStorageProcessConnection):
1308 (WebKit::WebProcessPool::storageProcessCrashed):
1309 (WebKit::WebProcessPool::pageAddedToProcess):
1310 (WebKit::WebProcessPool::storageProcessIdentifier):
1311 (WebKit::WebProcessPool::terminateStorageProcess):
1312 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
1313 (WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
1314 (WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
1315 (WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
1316 (WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
1317 * UIProcess/WebProcessPool.h:
1318 (WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
1319 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.
1321 * UIProcess/WebProcessProxy.cpp:
1322 (WebKit::WebProcessProxy::getStorageProcessConnection):
1323 (WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
1324 * UIProcess/WebProcessProxy.h:
1325 * UIProcess/WebProcessProxy.messages.in:
1327 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1328 (WebKit::WebsiteDataStore::fetchDataAndApply):
1329 (WebKit::WebsiteDataStore::removeData):
1330 (WebKit::WebsiteDataStore::storageProcessParameters):
1331 (WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
1332 * UIProcess/WebsiteData/WebsiteDataStore.h:
1334 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1335 (WebKit::WebIDBConnectionToServer::messageSenderConnection):
1336 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1338 * WebProcess/Databases/WebDatabaseProvider.cpp:
1339 (WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
1341 * WebProcess/Storage/WebToStorageProcessConnection.cpp:
1342 (WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
1343 (WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
1344 (WebKit::WebToStorageProcessConnection::didReceiveMessage):
1345 (WebKit::WebToStorageProcessConnection::didClose):
1346 (WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
1347 (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
1348 (WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
1349 (WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
1350 (WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
1351 (WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
1352 (WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
1353 (WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
1354 * WebProcess/Storage/WebToStorageProcessConnection.h:
1355 (WebKit::WebToStorageProcessConnection::create):
1356 (WebKit::WebToDatabaseProcessConnection::create): Deleted.
1357 (WebKit::WebToDatabaseProcessConnection::connection): Deleted.
1359 * WebProcess/WebProcess.cpp:
1360 (WebKit::WebProcess::webToStorageProcessConnectionClosed):
1361 (WebKit::WebProcess::webToStorageProcessConnection):
1362 (WebKit::WebProcess::ensureWebToStorageProcessConnection):
1363 (WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
1364 (WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
1365 (WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
1366 * WebProcess/WebProcess.h:
1368 2017-07-27 Nan Wang <n_wang@apple.com>
1370 AX: A11Y: Zoom no longer follows keyboard insertion point in safari
1371 https://bugs.webkit.org/show_bug.cgi?id=174869
1373 Reviewed by David Kilzer.
1375 There was a recent change by denying XPC services access by default.
1376 In UAZoomChangeFocus we need to send message to HIServices, so let's
1377 allow the connection to XPC services for that.
1379 * WebProcess/com.apple.WebProcess.sb.in:
1381 2017-07-27 Brady Eidson <beidson@apple.com>
1383 Part 1 of: Rename DatabaseProcess to StorageProcess.
1384 https://bugs.webkit.org/show_bug.cgi?id=174879
1386 Reviewed by Andy Estes.
1388 This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).
1390 Some renaming in actual code did result (Some class/struct names, method names, etc)
1392 Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"
1395 * Configurations/Storage-iOS.entitlements: Renamed from Source/WebKit/Configurations/Databases-iOS.entitlements.
1396 * Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
1397 * Configurations/WebKit.xcconfig:
1398 * DerivedSources.make:
1399 * Platform/ExtraPrivateSymbolsForTAPI.h:
1400 * PlatformGTK.cmake:
1401 * PlatformMac.cmake:
1402 * PlatformWPE.cmake:
1404 * Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Renamed from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
1406 * Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
1407 (WebKit::StorageProcessCreationParameters::StorageProcessCreationParameters):
1408 (WebKit::StorageProcessCreationParameters::encode):
1409 (WebKit::StorageProcessCreationParameters::decode):
1410 * Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.
1412 * StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
1413 * StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
1414 (StorageServiceInitializer):
1415 * StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.
1418 * StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
1419 * StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
1420 * StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
1422 * StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
1423 * StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
1424 * StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.
1426 * StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
1427 * StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
1428 * StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
1430 * StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
1431 (WebKit::StorageProcessMainUnix):
1432 * StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
1433 (WebKit::StorageProcess::initializeProcess):
1434 (WebKit::StorageProcess::initializeProcessName):
1435 (WebKit::StorageProcess::initializeSandbox):
1436 * StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
1437 (WebKit::StorageProcess::initializeProcess):
1438 (WebKit::StorageProcess::initializeProcessName):
1439 (WebKit::StorageProcess::initializeSandbox):
1441 * StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Copied from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
1442 * StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.
1444 * StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
1446 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1447 (WebKit::serviceName):
1449 * UIProcess/Network/NetworkProcessProxy.cpp:
1450 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
1452 * UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
1453 * UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
1454 * UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.
1456 * UIProcess/WebContextSupplement.h:
1457 (WebKit::WebContextSupplement::processDidClose):
1459 * UIProcess/WebProcessPool.cpp:
1460 (WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore):
1461 (WebKit::WebProcessPool::databaseProcessCrashed):
1462 (WebKit::WebProcessPool::pageAddedToProcess):
1463 * UIProcess/WebProcessPool.h:
1465 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1466 (WebKit::WebsiteDataStore::databaseProcessParameters):
1467 * UIProcess/WebsiteData/WebsiteDataStore.h:
1469 * WebKit.xcodeproj/project.pbxproj:
1471 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
1472 (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
1473 (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
1474 * WebProcess/Databases/WebDatabaseProvider.cpp:
1476 * WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
1477 * WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.
1479 * WebProcess/WebProcess.cpp:
1481 2017-07-27 Tim Horton <timothy_horton@apple.com>
1483 PDF page number indicator is very flashy when scrolling
1484 https://bugs.webkit.org/show_bug.cgi?id=174882
1485 <rdar://problem/23760981>
1487 Reviewed by Andy Estes.
1489 * Platform/spi/ios/UIKitSPI.h:
1490 * UIProcess/ios/WKPDFPageNumberIndicator.mm:
1491 (-[WKPDFPageNumberIndicator initWithFrame:]):
1492 Increase the backdrop rendering resolution to reduce flashiness.
1493 It's still not perfect, but it's quite visibly better.
1495 2017-07-26 Brady Eidson <beidson@apple.com>
1497 ResourceLoadStatistics API tests fail on El Capitan.
1498 https://bugs.webkit.org/show_bug.cgi?id=174877
1500 Reviewed by Chris Dumez.
1502 Always install the testing callback.
1504 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1505 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
1507 2017-07-26 Tim Horton <timothy_horton@apple.com>
1509 REGRESSION (r211160): Can't pinch to zoom unlocked encrypted PDFs in WKWebView
1510 https://bugs.webkit.org/show_bug.cgi?id=174881
1511 <rdar://problem/33556312>
1513 Reviewed by Andy Estes.
1515 * UIProcess/API/Cocoa/WKWebView.mm:
1516 (-[WKWebView _hidePasswordView]):
1517 WKPasswordView saves and restores a bunch of scroll view properties, including
1518 those relating to zoom limits. The restoration happens in -[WKPasswordView hide],
1519 which is never called. Instead, the code added in r211160 just calls
1520 removeFromSuperview after unlocking, never restoring the old zoom limits,
1521 causing the then fully unlocked PDF to not be zoomable. Fix this by calling
1522 -hide instead of -removeFromSuperview (which -hide also calls).
1524 2017-07-26 Brady Eidson <beidson@apple.com>
1526 Rename {Web/UI}Process/Storage to {Web/UI}Process/WebStorage.
1527 https://bugs.webkit.org/show_bug.cgi?id=174871
1529 Reviewed by Chris Dumez.
1531 The standard these directories help implement is the "Web Storage" standard.
1532 "Storage" is too general of a word that we have plans to start using in other contexts soon.
1535 * DerivedSources.make:
1536 * PlatformGTK.cmake:
1537 * PlatformMac.cmake:
1538 * PlatformWPE.cmake:
1539 * WebKit.xcodeproj/project.pbxproj:
1541 * UIProcess/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp.
1542 * UIProcess/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h.
1543 * UIProcess/WebStorage/LocalStorageDatabase.cpp: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabase.cpp.
1544 * UIProcess/WebStorage/LocalStorageDatabase.h: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabase.h.
1545 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabaseTracker.cpp.
1546 * UIProcess/WebStorage/LocalStorageDatabaseTracker.h: Renamed from Source/WebKit/UIProcess/Storage/LocalStorageDatabaseTracker.h.
1547 * UIProcess/WebStorage/StorageManager.cpp: Renamed from Source/WebKit/UIProcess/Storage/StorageManager.cpp.
1548 * UIProcess/WebStorage/StorageManager.h: Renamed from Source/WebKit/UIProcess/Storage/StorageManager.h.
1549 * UIProcess/WebStorage/StorageManager.messages.in: Renamed from Source/WebKit/UIProcess/Storage/StorageManager.messages.in.
1550 * UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: Renamed from Source/WebKit/UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm.
1551 * UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm: Renamed from Source/WebKit/UIProcess/Storage/ios/ResourceLoadStatisticsPersistentStorageIOS.mm.
1553 * WebProcess/WebStorage/StorageAreaImpl.cpp: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaImpl.cpp.
1554 * WebProcess/WebStorage/StorageAreaImpl.h: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaImpl.h.
1555 * WebProcess/WebStorage/StorageAreaMap.cpp: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaMap.cpp.
1556 * WebProcess/WebStorage/StorageAreaMap.h: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaMap.h.
1557 * WebProcess/WebStorage/StorageAreaMap.messages.in: Renamed from Source/WebKit/WebProcess/Storage/StorageAreaMap.messages.in.
1558 * WebProcess/WebStorage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit/WebProcess/Storage/StorageNamespaceImpl.cpp.
1559 * WebProcess/WebStorage/StorageNamespaceImpl.h: Renamed from Source/WebKit/WebProcess/Storage/StorageNamespaceImpl.h.
1560 * WebProcess/WebStorage/WebStorageNamespaceProvider.cpp: Renamed from Source/WebKit/WebProcess/Storage/WebStorageNamespaceProvider.cpp.
1561 * WebProcess/WebStorage/WebStorageNamespaceProvider.h: Renamed from Source/WebKit/WebProcess/Storage/WebStorageNamespaceProvider.h.
1563 2017-07-26 Brady Eidson <beidson@apple.com>
1565 Remove DATABASE_PROCESS build flag.
1566 https://bugs.webkit.org/show_bug.cgi?id=174868
1568 Reviewed by Andy Estes.
1571 * DatabaseProcess/DatabaseProcess.cpp:
1572 * DatabaseProcess/DatabaseProcess.h:
1573 * DatabaseProcess/DatabaseProcess.messages.in:
1574 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
1575 * DatabaseProcess/DatabaseToWebProcessConnection.h:
1576 * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
1577 * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
1578 * DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp:
1579 * DatabaseProcess/ios/DatabaseProcessIOS.mm:
1580 * DatabaseProcess/mac/DatabaseProcessMac.mm:
1581 * DatabaseProcess/unix/DatabaseProcessMainUnix.h:
1582 * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1583 * Shared/Databases/DatabaseProcessCreationParameters.h:
1584 * Shared/ProcessExecutablePath.h:
1585 * Shared/gtk/ProcessExecutablePathGtk.cpp:
1586 (WebKit::executablePathOfDatabaseProcess):
1587 * Shared/wpe/ProcessExecutablePathWPE.cpp:
1588 (WebKit::executablePathOfDatabaseProcess):
1589 * UIProcess/ChildProcessProxy.cpp:
1590 (WebKit::ChildProcessProxy::getLaunchOptions):
1591 * UIProcess/Databases/DatabaseProcessProxy.cpp:
1592 * UIProcess/Databases/DatabaseProcessProxy.h:
1593 * UIProcess/Databases/DatabaseProcessProxy.messages.in:
1594 * UIProcess/Launcher/ProcessLauncher.h:
1595 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1596 (WebKit::ProcessLauncher::launchProcess):
1597 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1598 (WebKit::serviceName):
1599 * UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
1600 (WebKit::ProcessLauncher::launchProcess):
1601 * UIProcess/Network/NetworkProcessProxy.cpp:
1602 (WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs):
1603 * UIProcess/WebProcessPool.cpp:
1604 (WebKit::WebProcessPool::databaseProcessCrashed):
1605 (WebKit::WebProcessPool::databaseProcessIdentifier):
1606 (WebKit::WebProcessPool::terminateDatabaseProcess):
1607 * UIProcess/WebProcessPool.h:
1608 (WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary):
1609 * UIProcess/WebProcessProxy.cpp:
1610 (WebKit::WebProcessProxy::getDatabaseProcessConnection):
1611 * UIProcess/WebProcessProxy.h:
1612 * UIProcess/WebProcessProxy.messages.in:
1613 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1614 (WebKit::WebsiteDataStore::fetchDataAndApply):
1615 (WebKit::WebsiteDataStore::removeData):
1617 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:
1618 * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1619 * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1620 * WebProcess/WebProcess.cpp:
1621 * WebProcess/WebProcess.h:
1623 2017-07-26 Brady Eidson <beidson@apple.com>
1625 Add test to verify certain child processes are not launched as a side effect of enabling ResourceLoadStatistics.
1626 https://bugs.webkit.org/show_bug.cgi?id=174851
1628 Reviewed by Chris Dumez.
1630 * UIProcess/API/Cocoa/WKProcessPool.mm:
1631 (-[WKProcessPool _databaseProcessIdentifier]):
1632 (-[WKProcessPool _pluginProcessCount]):
1633 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1635 * UIProcess/Plugins/PluginProcessManager.h:
1636 (WebKit::PluginProcessManager::pluginProcesses):
1638 2017-07-26 Brian Burg <bburg@apple.com>
1640 Remove WEB_TIMING feature flag
1641 https://bugs.webkit.org/show_bug.cgi?id=174795
1643 Reviewed by Alex Christensen.
1645 * Configurations/FeatureDefines.xcconfig:
1646 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
1647 (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
1648 (WebKit::NetworkDataTaskSoup::createRequest):
1649 (WebKit::NetworkDataTaskSoup::didSendRequest):
1650 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
1651 (WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
1652 (WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
1653 (WebKit::NetworkDataTaskSoup::didGetHeaders):
1654 (WebKit::NetworkDataTaskSoup::didRestart):
1655 * NetworkProcess/soup/NetworkDataTaskSoup.h:
1657 2017-07-26 Brian Burg <bburg@apple.com>
1659 Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
1660 https://bugs.webkit.org/show_bug.cgi?id=174828
1662 Reviewed by Tim Horton.
1664 In the previous change I forgot to hoist the HandleArray and message-send out of the
1665 loop, so the code wasn't actually sending fewer messages. That's fixed now.
1667 * UIProcess/WebPageProxy.cpp:
1668 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
1669 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1671 2017-07-26 Zan Dobersek <zdobersek@igalia.com>
1673 Unreviewed. Fix a compiler warning that springs up when
1674 building the WPE port with Clang.
1676 * UIProcess/API/wpe/ScrollGestureController.h:
1677 Let ScrollGestureController be a class, and not a struct.
1678 This fits the usual pattern, and also matches the forward
1679 declaration used in WPE's PageClientImpl.h.
1681 2017-07-26 Carlos Garcia Campos <cgarcia@igalia.com>
1683 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.5 release.
1685 * gtk/NEWS: Add release notes for 2.17.5.
1687 2017-07-25 Carlos Garcia Campos <cgarcia@igalia.com>
1689 Icon loader error on startup
1690 https://bugs.webkit.org/show_bug.cgi?id=174787
1692 Reviewed by Brady Eidson.
1694 Ignore non HTTP favicons in glib API.
1696 * UIProcess/API/glib/WebKitIconLoadingClient.cpp:
1698 2017-07-25 Brady Eidson <beidson@apple.com>
1700 ResourceLoadStatistics grandfathering happens much too often.
1701 <rdar://problem/32655834> and https://bugs.webkit.org/show_bug.cgi?id=174825
1703 Reviewed by Chris Dumez.
1705 The ResourceLoadStatistics grandfathering procedure happens too often.
1706 - With an empty memory store, even though an empty memory store is a perfectly valid state.
1707 - On each launch, even if grandfathering happened on the last launch - because grandfathering
1708 data would not automatically be saved to disk.
1709 - After clearing all website data, at which point no grandfathering can possibly be relevant
1710 because there is no data to grandfather.
1712 This patch fixes those cases and adds API tests to verify they remain fixed.
1714 * Shared/WebsiteData/WebsiteDataType.h:
1716 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
1717 (+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]): allWebsiteDataTypes, but even with the private ones.
1718 (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStore]): If the types being cleared cover all of
1719 the types that ResourceLoadStatistics care about, don't grandfather afterwards.
1720 (-[WKWebsiteDataStore _resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:]): Ditto.
1721 (-[WKWebsiteDataStore _setResourceLoadStatisticsTestingCallback:]):
1722 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
1724 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:
1725 (WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): Don't grandfather if the store read from
1726 disk is empty (as being empty is perfectly fine), and also log the event of "populated without grandfathering".
1727 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
1729 * UIProcess/WebProcessProxy.cpp:
1730 (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
1732 * UIProcess/WebResourceLoadStatisticsStore.cpp:
1733 (WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):
1734 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
1735 (WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
1736 (WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
1737 (WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData): Schedule a write right away so we don't re-grandfather
1738 on next launch, and also log the grandfathering event.
1739 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): Takes a ShouldGrandfather flag
1740 to tell whether or not data should be re-grandfathered after the store is cleared.
1741 (WebKit::WebResourceLoadStatisticsStore::logTestingEvent): Log the event to the testing client.
1742 (WebKit::dataTypesToRemove): Deleted.
1743 * UIProcess/WebResourceLoadStatisticsStore.h:
1745 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1746 (WebKit::WebsiteDataStore::removeData):
1747 (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
1748 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): Handles enabling ResourceLoadStatistics both
1749 with and without a testing callback.
1750 * UIProcess/WebsiteData/WebsiteDataStore.h:
1752 2017-07-25 Andy Estes <aestes@apple.com>
1754 [Apple Pay] Add "carteBancaire" as a supported payment network
1755 https://bugs.webkit.org/show_bug.cgi?id=174841
1756 <rdar://problem/31935596>
1758 Reviewed by Alex Christensen.
1760 * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
1761 (WebKit::toSupportedNetwork):
1763 2017-07-25 Brian Burg <bburg@apple.com>
1765 Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
1766 https://bugs.webkit.org/show_bug.cgi?id=174828
1768 Reviewed by Tim Horton.
1770 Send all of the sandbox extension handles in a single message, rather than
1771 one message per extension. Update message name and parameter types to match.
1773 * UIProcess/WebPageProxy.cpp:
1774 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
1775 (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1776 * WebProcess/WebPage/WebPage.cpp:
1777 (WebKit::WebPage::extendSandboxForFilesFromOpenPanel):
1778 (WebKit::WebPage::extendSandboxForFileFromOpenPanel): Deleted.
1779 * WebProcess/WebPage/WebPage.h:
1780 * WebProcess/WebPage/WebPage.messages.in:
1782 2017-07-25 Alex Christensen <achristensen@webkit.org>
1784 Fix API tests after r219871.
1785 https://bugs.webkit.org/show_bug.cgi?id=174807
1787 WebKit2.OpenAndCloseWindowAsync and WebKit2.OpenAsyncWithNil API tests are fixed.
1789 * UIProcess/WebPageProxy.cpp:
1790 (WebKit::WebPageProxy::createNewPage):
1791 createNewPageAsync or createNewPage should be called, not both.
1793 2017-07-25 Said Abou-Hallawa <sabouhallawa@apple.com>
1795 Async image decoding for large images should be disabled after the first time a tile is painted
1796 https://bugs.webkit.org/show_bug.cgi?id=174451
1797 <rdar://problem/31246421>
1799 Reviewed by Simon Fraser.
1801 * Shared/mac/RemoteLayerBackingStore.mm:
1802 (WebKit::RemoteLayerBackingStore::drawInContext):
1803 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1804 (WebKit::imageForRect):
1805 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1806 (WebKit::InjectedBundleRangeHandle::renderedImage):
1807 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
1808 (WebKit::CompositingCoordinator::paintContents):
1809 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
1811 2017-07-25 Brian Burg <bburg@apple.com>
1813 Web Automation: add support for uploading files
1814 https://bugs.webkit.org/show_bug.cgi?id=174797
1815 <rdar://problem/28485063>
1817 Reviewed by Joseph Pecoraro.
1819 The general strategy is to have automation clients set the list of files they want
1820 to select ahead of time. Then, the client simulates a click on the <input type="file"> element.
1821 When that causes WebPageProxy to ask the UI delegate to runOpenPanel, it instead
1822 gives WebAutomationSession a chance to select files if the page is under control of
1823 automation. WebAutomationSession validates its file list and selects the files if valid.
1825 * CMakeLists.txt: Add frontend dispatcher files.
1826 * DerivedSources.make:
1827 Add frontend dispatcher code generator scripts as dependencies of the generated code.
1828 Add generated frontend dispatcher files to the list of output files.
1830 * UIProcess/Automation/Automation.json:
1831 Add a command to set the canned list of files that should be selected when prompted.
1832 If no files are selected, then the effect is as if the user had clicked "cancel" in
1833 the file chooser dialog.
1835 Add an event to signal to the WebDriver service that the file selection request has
1836 been either fulfilled or cancelled. This event is necessary because otherwise remotes
1837 cannot distinguish whether selecting the files failed for some reason, or if the
1838 UIProcess has not yet selected the files and sent them to the web content process.
1839 In either case, the input element's "files" attribute would return an empty FileList.
1841 * UIProcess/Automation/WebAutomationSession.h:
1842 * UIProcess/Automation/WebAutomationSession.cpp:
1843 (WebKit::WebAutomationSession::WebAutomationSession):
1844 Add the frontend dispatcher for Automation domain. This is named m_domainNotifier since
1845 m_domainDispatcher is already being used for the backend command dispatcher.
1847 (WebKit::WebAutomationSession::handleRunOpenPanel):
1848 Validate that the files-to-select list has valid entries and select the files if so.
1849 If anything goes wrong, pretend to cancel out of the file chooser. Either way, notify the
1850 frontend with an event that the file chooser was dismissed due to selecting files or cancelling.
1851 Automation protocol clients may implement additional strategies to further restrict
1852 the conditions upon which local files can be uploaded.
1854 (WebKit::WebAutomationSession::setFilesToSelectForFileUpload): Added.
1855 Store the list of files as a vector of strings. The file list is always replaced.
1857 * UIProcess/WebPageProxy.cpp:
1858 (WebKit::WebPageProxy::runOpenPanel):
1859 If the page is under automation, delegating the runOpenPanel is likely to hang
1860 because WebDriver cannot interact directly with the file chooser dialog. Instead,
1861 give WebAutomationSession a chance to select files and don't tell the delegate.
1863 * WebKit.xcodeproj/project.pbxproj:
1864 Add frontend dispatcher files to "Derived Sources" group.
1866 2017-07-25 Alex Christensen <achristensen@webkit.org>
1868 Modernize NavigationAction code
1869 https://bugs.webkit.org/show_bug.cgi?id=174807
1871 Reviewed by Darin Adler.
1873 Mostly just use more move semantics.
1875 * Platform/IPC/HandleMessage.h:
1876 (IPC::callMemberFunctionImpl):
1877 * Shared/API/APIURLRequest.h:
1878 * Shared/NavigationActionData.h:
1879 * UIProcess/API/APINavigation.cpp:
1880 (API::Navigation::Navigation):
1881 * UIProcess/API/APINavigation.h:
1882 (API::Navigation::create):
1883 * UIProcess/API/APINavigationAction.h:
1884 * UIProcess/API/APINavigationClient.h:
1885 (API::NavigationClient::decidePolicyForNavigationAction):
1886 * UIProcess/API/APIPolicyClient.h:
1887 * UIProcess/API/APIUIClient.h:
1888 (API::UIClient::createNewPage):
1889 (API::UIClient::createNewPageAsync):
1890 (API::UIClient::canCreateNewPageAsync):
1891 * UIProcess/API/C/WKPage.cpp:
1892 (WKPageLoadURLRequest):
1893 (WKPageLoadURLRequestWithUserData):
1894 (WKPageSetPageUIClient):
1895 (WKPageSetPageNavigationClient):
1896 * UIProcess/Cocoa/NavigationState.h:
1897 * UIProcess/Cocoa/NavigationState.mm:
1898 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1899 * UIProcess/Cocoa/UIDelegate.h:
1900 * UIProcess/Cocoa/UIDelegate.mm:
1901 (WebKit::UIDelegate::UIClient::createNewPageCommon):
1902 (WebKit::UIDelegate::UIClient::createNewPage):
1903 (WebKit::UIDelegate::UIClient::canCreateNewPageAsync):
1904 (WebKit::UIDelegate::UIClient::createNewPageAsync):
1905 * UIProcess/WebInspectorProxy.cpp:
1906 (WebKit::decidePolicyForNavigationAction):
1907 * UIProcess/WebNavigationState.cpp:
1908 (WebKit::WebNavigationState::createLoadRequestNavigation):
1909 * UIProcess/WebNavigationState.h:
1910 * UIProcess/WebPageProxy.cpp:
1911 (WebKit::WebPageProxy::loadRequest):
1912 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1913 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1914 (WebKit::WebPageProxy::createNewPage):
1915 * UIProcess/WebPageProxy.h:
1917 2017-07-25 Carlos Garcia Campos <cgarcia@igalia.com>
1919 REGRESSION(r218629): [GTK] ASSERTION FAILED: m_eglDisplay == EGL_NO_DISPLAY in WebCore::PlatformDisplay::~PlatformDisplay
1920 https://bugs.webkit.org/show_bug.cgi?id=174789
1922 Reviewed by Žan Doberšek.
1924 Before r218629, the wayland nested compositor display was a singleton created on demand by
1925 AcceleratedSurfaceWayland, but now it's created unconditionally on web process creation when a valid display
1926 name is received from the UI process. The side effect of this is that now the shared display is created after
1927 the nested compositor display that is not a singleton anymore. The atexit used by PlatformDisplay to shutdown
1928 egl display assumes that it will be registered by the shared display. Since we switched to on demand AC mode,
1929 the shared display is only used in the web process when entering AC mode, that's why it only crashes when we
1930 have entered AC at least once. We just need to ensure that the shared display is created before the nested
1933 * WebProcess/gtk/WaylandCompositorDisplay.cpp:
1934 (WebKit::WaylandCompositorDisplay::create): Check we are under wayland before creating the WaylandCompositorDisplay.
1936 2017-07-24 Michael Catanzaro <mcatanzaro@igalia.com>
1938 [GTK] ASSERTION FAILED: client in WebKit::IconDatabase::setClient
1939 https://bugs.webkit.org/show_bug.cgi?id=174788
1941 Reviewed by Carlos Garcia Campos.
1943 IconDatabase ensures that setClient is never called with nullptr, but WebKitFaviconDatabase
1944 does exactly that. First, ensure it's safe to unset the client. Next, we can either remove
1945 the assertions from setClient or else automatically unset the client in IconDatabase::close.
1948 * UIProcess/API/glib/IconDatabase.cpp:
1949 (WebKit::IconDatabase::close):
1950 (WebKit::IconDatabase::setIconDataForIconURL):
1951 (WebKit::IconDatabase::setIconURLForPageURL):
1952 * UIProcess/API/glib/WebKitFaviconDatabase.cpp:
1953 (_WebKitFaviconDatabasePrivate::~_WebKitFaviconDatabasePrivate): Deleted.
1954 (webkitFaviconDatabaseDispose): Deleted.
1956 2017-07-24 Michael Catanzaro <mcatanzaro@igalia.com>
1958 [GTK][WPE] Remove useless conditional in IconDatabase::setIconDataForIconURL
1959 https://bugs.webkit.org/show_bug.cgi?id=174792
1961 Reviewed by Carlos Garcia Campos.
1963 We have in IconDatabase::setIconDataForIconURL some code in a conditional to check if it's
1964 not being executed on the icon sync thread. But at the top of the function is an assertion
1965 to ensure the code is never executed on the icon sync thread. The condition is therefore
1966 useless and the code should be executed unconditionally.
1968 * UIProcess/API/glib/IconDatabase.cpp:
1969 (WebKit::IconDatabase::setIconDataForIconURL):
1971 2017-07-24 Carlos Garcia Campos <cgarcia@igalia.com>
1973 [GTK] Icon database error and crash
1974 https://bugs.webkit.org/show_bug.cgi?id=174760
1976 Reviewed by Michael Catanzaro.
1978 The crash is a debug ASSERT that happens when the IconRecord image is created in one thread and destroyed in
1979 another one. IconDatabase creates and destroys IconRecord objects in both database and main thread. The
1980 IconRecord is destroyed when the icon is no longer retained, and we only release icons when we fail to get the
1981 image data (including pages that don't have a favicon). We can prevent this crash from happening if we ensure we
1982 never create an Image for an IconRecord when the given image data is nullptr.
1984 * UIProcess/API/glib/IconDatabase.cpp:
1985 (WebKit::IconDatabase::IconRecord::setImageData):
1987 2017-07-24 Chris Dumez <cdumez@apple.com>
1989 [WK2][Cocoa] Allow overriding the ITP data removal internal using a default
1990 https://bugs.webkit.org/show_bug.cgi?id=174802
1991 <rdar://problem/33497898>
1993 Reviewed by Sam Weinig.
1995 Allow overriding the ITP data removal internal using a default to facilitate testing.
1996 Can be used like so:
1997 defaults write -g ResourceLoadStatisticsMinimumTimeBetweenDataRecordsRemoval 60
1999 Will cause us to write every 60 seconds instead of 3600.
2001 * Shared/WebPreferencesDefinitions.h:
2002 * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
2003 (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
2005 2017-07-24 Simon Fraser <simon.fraser@apple.com>
2007 [iOS WK2] Crash under PageOverlayController::uninstallPageOverlay when doing multiple finds
2008 https://bugs.webkit.org/show_bug.cgi?id=174806
2009 rdar://problem/33501664
2011 Reviewed by Tim Horton.
2013 Calling TextIndicator::createWithSelectionInFrame can trigger layout via VisibleSelection code,
2014 which can re-enter FindController::updateFindIndicator which has by now removed m_findIndicatorOverlay
2015 from pageOverlayController's map, but not deleted it. The second call to uninstallPageOverlay()
2016 thus crashes at m_overlayGraphicsLayers.take(&overlay)->removeFromParent().
2018 Fix by nulling out m_findIndicatorOverlay as soon as we uninstall it.
2020 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2021 (WebKit::FindController::updateFindIndicator):
2023 2017-07-24 Chris Dumez <cdumez@apple.com>
2025 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()
2026 https://bugs.webkit.org/show_bug.cgi?id=174790
2028 Reviewed by Brady Eidson.
2030 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore().
2031 WorkQueue::dispatchAfter() keeps the WorkQueue alive because its implementation keeps a strong ref to
2032 |this|. As a result, the lambda passed to dispatchAfter(), which calls writeMemoryStoreToDisk(), can
2033 get executed after the store is gone.
2035 To address the issue, we now use a RunLoop::Timer to schedule the write, instead of a
2036 WorkQueue::dispatchAfter() call. This way, we are guaranteed that the callback will not get called
2037 after the store has been destroyed.
2039 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:
2040 (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
2041 (WebKit::ResourceLoadStatisticsPersistentStorage::asyncWriteTimerFired):
2042 (WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore):
2043 (WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously):
2044 (WebKit::ResourceLoadStatisticsPersistentStorage::ref):
2045 (WebKit::ResourceLoadStatisticsPersistentStorage::deref):
2046 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
2048 2017-07-24 Chris Dumez <cdumez@apple.com>
2050 Unreviewed, rolling out r219828.
2052 Causes debug assertions to be hit on iOS
2056 "Fix lifetime management issue in
2057 ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()"
2058 https://bugs.webkit.org/show_bug.cgi?id=174790
2059 http://trac.webkit.org/changeset/219828
2061 2017-07-24 Michael Catanzaro <mcatanzaro@igalia.com>
2063 [GTK][WPE] Stop using AutodrainedPool in IconDatabase
2064 https://bugs.webkit.org/show_bug.cgi?id=174791
2066 Reviewed by Alex Christensen.
2068 AutodrainedPool seems to be some NS garbage collection thing that has no implementation on
2069 other platforms. Now that IconDatabase is used only by GTK and WPE, we can stop using it.
2071 * UIProcess/API/glib/IconDatabase.cpp:
2072 (WebKit::IconDatabase::setIconDataForIconURL):
2073 (WebKit::IconDatabase::setIconURLForPageURL):
2074 (WebKit::IconDatabase::iconDatabaseSyncThread):
2075 (WebKit::IconDatabase::performURLImport):
2076 (WebKit::IconDatabase::readFromDatabase):
2078 2017-07-24 Chris Dumez <cdumez@apple.com>
2080 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore()
2081 https://bugs.webkit.org/show_bug.cgi?id=174790
2083 Reviewed by Brady Eidson.
2085 Fix lifetime management issue in ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore().
2086 WorkQueue::dispatchAfter() keeps the WorkQueue alive because its implementation keeps a strong ref to
2087 |this|. As a result, the lambda passed to dispatchAfter(), which calls writeMemoryStoreToDisk(), can
2088 get executed after the store is gone.
2090 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.cpp:
2091 (WebKit::ResourceLoadStatisticsPersistentStorage::ResourceLoadStatisticsPersistentStorage):
2092 (WebKit::ResourceLoadStatisticsPersistentStorage::scheduleOrWriteMemoryStore):
2093 * UIProcess/Storage/ResourceLoadStatisticsPersistentStorage.h:
2094 (WebKit::ResourceLoadStatisticsPersistentStorage::createWeakPtr):
2096 2017-07-23 Carlos Garcia Campos <cgarcia@igalia.com>
2098 Unreviewed. REGRESSION(r219713): [GTK][WPE] Fix default favicon database patch.
2100 When nullptr is passed to webkit_web_context_set_favicon_database_directory() the default database directory was
2101 taken from WebProcessPool::platformDefaultIconDatabasePath(), that has been removed in r219713 without properly
2102 replacing it, now it uses an empty string. This causes that the current directory is used to create the favicon
2105 * UIProcess/API/glib/WebKitWebContext.cpp:
2106 (webkit_web_context_set_favicon_database_directory): Use the default icon database directory instead of an empty
2107 string when nullptr is passed.
2109 2017-07-23 Wenson Hsieh <wenson_hsieh@apple.com>
2111 [iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values
2112 https://bugs.webkit.org/show_bug.cgi?id=174769
2113 <rdar://problem/33478864>
2115 Reviewed by Tim Horton.
2117 Fixes several API tests in the DataInteractionTests suite. See Source/WebCore/ChangeLog for more details.
2119 * WebProcess/WebPage/WebPage.cpp:
2120 (WebKit::WebPage::performDragControllerAction):
2122 2017-07-20 Carlos Garcia Campos <cgarcia@igalia.com>
2124 WebDriver: implement page load timeout
2125 https://bugs.webkit.org/show_bug.cgi?id=174672
2127 Reviewed by Brian Burg.
2129 Always start a timer when waiting for a navigation to complete. When the timer fires, pending callbacks for
2130 navigations are removed and invoked with a timeout error. If navigation completes before the timer is fired,
2131 then the timer is stopped. All navigation commands now receive the page load strategy and timeout as optional
2132 parameters, when not provided the default timeout (300 seconds) is used.
2134 * UIProcess/Automation/Automation.json:
2135 * UIProcess/Automation/WebAutomationSession.cpp:
2136 (WebKit::WebAutomationSession::WebAutomationSession):
2137 (WebKit::WebAutomationSession::waitForNavigationToComplete):
2138 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage):
2139 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame):
2140 (WebKit::WebAutomationSession::loadTimerFired):
2141 (WebKit::WebAutomationSession::navigateBrowsingContext):
2142 (WebKit::WebAutomationSession::goBackInBrowsingContext):
2143 (WebKit::WebAutomationSession::goForwardInBrowsingContext):
2144 (WebKit::WebAutomationSession::reloadBrowsingContext):
2145 (WebKit::WebAutomationSession::navigationOccurredForFrame):
2146 * UIProcess/Automation/WebAutomationSession.h:
2148 2017-07-23 Takuro Ashie <ashie@clear-code.com>
2150 [GTK] Correct a typo in the reference manual of WebKitWebInspector
2151 https://bugs.webkit.org/show_bug.cgi?id=174767
2153 Reviewed by Michael Catanzaro.
2155 * UIProcess/API/gtk/WebKitWebInspector.cpp:
2157 2017-07-23 Chris Dumez <cdumez@apple.com>
2159 Drop ExceptionCodeDescription class
2160 https://bugs.webkit.org/show_bug.cgi?id=174757
2162 Reviewed by Darin Adler.
2164 Update GTK bindings to use new API on DOMException instead of
2165 ExceptionCodeDescription.
2167 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
2168 (webkit_dom_attr_dispatch_event):
2169 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
2170 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
2171 (webkit_dom_cdata_section_dispatch_event):
2172 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
2173 (webkit_dom_css_rule_set_css_text):
2174 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
2175 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
2176 (webkit_dom_css_style_declaration_set_property):
2177 (webkit_dom_css_style_declaration_set_css_text):
2178 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
2179 (webkit_dom_css_style_sheet_insert_rule):
2180 (webkit_dom_css_style_sheet_delete_rule):
2181 (webkit_dom_css_style_sheet_add_rule):
2182 (webkit_dom_css_style_sheet_remove_rule):
2183 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
2184 (webkit_dom_css_value_set_css_text):
2185 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
2186 (webkit_dom_character_data_dispatch_event):
2187 (webkit_dom_character_data_insert_data):
2188 (webkit_dom_character_data_delete_data):
2189 (webkit_dom_character_data_replace_data):
2190 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
2191 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
2192 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
2193 (webkit_dom_comment_dispatch_event):
2194 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
2195 (webkit_dom_dom_implementation_create_document_type):
2196 (webkit_dom_dom_implementation_create_document):
2197 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
2198 (webkit_dom_dom_selection_collapse_to_end):
2199 (webkit_dom_dom_selection_collapse_to_start):
2200 (webkit_dom_dom_selection_extend):
2201 (webkit_dom_dom_selection_get_range_at):
2202 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
2203 (webkit_dom_dom_token_list_add):
2204 (webkit_dom_dom_token_list_remove):
2205 (webkit_dom_dom_token_list_toggle):
2206 (webkit_dom_dom_token_list_replace):
2207 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
2208 (webkit_dom_dom_window_dispatch_event):
2209 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
2210 (webkit_dom_node_set_prefix):
2211 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
2212 (webkit_dom_document_dispatch_event):
2213 (webkit_dom_document_create_element):
2214 (webkit_dom_document_create_cdata_section):
2215 (webkit_dom_document_create_processing_instruction):
2216 (webkit_dom_document_create_attribute):
2217 (webkit_dom_document_import_node):
2218 (webkit_dom_document_create_element_ns):
2219 (webkit_dom_document_create_attribute_ns):
2220 (webkit_dom_document_adopt_node):
2221 (webkit_dom_document_create_event):
2222 (webkit_dom_document_create_expression):
2223 (webkit_dom_document_evaluate):
2224 (webkit_dom_document_query_selector):
2225 (webkit_dom_document_query_selector_all):
2226 (webkit_dom_document_set_xml_version):
2227 (webkit_dom_document_set_cookie):
2228 (webkit_dom_document_set_body):
2229 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
2230 (webkit_dom_document_fragment_dispatch_event):
2231 (webkit_dom_document_fragment_query_selector):
2232 (webkit_dom_document_fragment_query_selector_all):
2233 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
2234 (webkit_dom_document_type_dispatch_event):
2235 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:
2236 (webkit_dom_element_dispatch_event):
2237 (webkit_dom_element_set_attribute):
2238 (webkit_dom_element_set_attribute_node):
2239 (webkit_dom_element_remove_attribute_node):
2240 (webkit_dom_element_set_attribute_ns):
2241 (webkit_dom_element_set_attribute_node_ns):
2242 (webkit_dom_element_matches):
2243 (webkit_dom_element_closest):
2244 (webkit_dom_element_insert_adjacent_element):
2245 (webkit_dom_element_insert_adjacent_html):
2246 (webkit_dom_element_insert_adjacent_text):
2247 (webkit_dom_element_remove):
2248 (webkit_dom_element_query_selector):
2249 (webkit_dom_element_query_selector_all):
2250 (webkit_dom_element_set_inner_html):
2251 (webkit_dom_element_set_outer_html):
2252 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
2253 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
2254 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
2255 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
2256 (webkit_dom_html_anchor_element_dispatch_event):
2257 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
2258 (webkit_dom_html_applet_element_dispatch_event):
2259 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
2260 (webkit_dom_html_area_element_dispatch_event):
2261 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
2262 (webkit_dom_html_br_element_dispatch_event):
2263 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
2264 (webkit_dom_html_base_element_dispatch_event):
2265 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
2266 (webkit_dom_html_body_element_dispatch_event):
2267 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
2268 (webkit_dom_html_button_element_dispatch_event):
2269 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
2270 (webkit_dom_html_canvas_element_dispatch_event):
2271 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
2272 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
2273 (webkit_dom_html_d_list_element_dispatch_event):
2274 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
2275 (webkit_dom_html_directory_element_dispatch_event):
2276 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
2277 (webkit_dom_html_div_element_dispatch_event):
2278 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
2279 (webkit_dom_html_document_dispatch_event):
2280 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
2281 (webkit_dom_html_element_dispatch_event):
2282 (webkit_dom_html_element_set_inner_text):
2283 (webkit_dom_html_element_set_outer_text):
2284 (webkit_dom_html_element_set_content_editable):
2285 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
2286 (webkit_dom_html_embed_element_dispatch_event):
2287 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
2288 (webkit_dom_html_field_set_element_dispatch_event):
2289 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
2290 (webkit_dom_html_font_element_dispatch_event):
2291 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
2292 (webkit_dom_html_form_element_dispatch_event):
2293 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
2294 (webkit_dom_html_frame_element_dispatch_event):
2295 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
2296 (webkit_dom_html_frame_set_element_dispatch_event):
2297 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
2298 (webkit_dom_html_hr_element_dispatch_event):
2299 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
2300 (webkit_dom_html_head_element_dispatch_event):
2301 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
2302 (webkit_dom_html_heading_element_dispatch_event):
2303 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
2304 (webkit_dom_html_html_element_dispatch_event):
2305 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
2306 (webkit_dom_html_iframe_element_dispatch_event):
2307 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
2308 (webkit_dom_html_image_element_dispatch_event):
2309 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
2310 (webkit_dom_html_input_element_dispatch_event):
2311 (webkit_dom_html_input_element_set_max_length):
2312 (webkit_dom_html_input_element_set_size):
2313 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
2314 (webkit_dom_html_li_element_dispatch_event):
2315 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
2316 (webkit_dom_html_label_element_dispatch_event):
2317 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
2318 (webkit_dom_html_legend_element_dispatch_event):
2319 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
2320 (webkit_dom_html_link_element_dispatch_event):
2321 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
2322 (webkit_dom_html_map_element_dispatch_event):
2323 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
2324 (webkit_dom_html_marquee_element_dispatch_event):
2325 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
2326 (webkit_dom_html_menu_element_dispatch_event):
2327 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
2328 (webkit_dom_html_meta_element_dispatch_event):
2329 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
2330 (webkit_dom_html_mod_element_dispatch_event):
2331 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
2332 (webkit_dom_html_o_list_element_dispatch_event):
2333 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
2334 (webkit_dom_html_object_element_dispatch_event):
2335 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
2336 (webkit_dom_html_opt_group_element_dispatch_event):
2337 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
2338 (webkit_dom_html_option_element_dispatch_event):
2339 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
2340 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
2341 (webkit_dom_html_paragraph_element_dispatch_event):
2342 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
2343 (webkit_dom_html_param_element_dispatch_event):
2344 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
2345 (webkit_dom_html_pre_element_dispatch_event):
2346 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
2347 (webkit_dom_html_quote_element_dispatch_event):
2348 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
2349 (webkit_dom_html_script_element_dispatch_event):
2350 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
2351 (webkit_dom_html_select_element_dispatch_event):
2352 (webkit_dom_html_select_element_add):
2353 (webkit_dom_html_select_element_set_length):
2354 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
2355 (webkit_dom_html_style_element_dispatch_event):
2356 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
2357 (webkit_dom_html_table_caption_element_dispatch_event):
2358 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
2359 (webkit_dom_html_table_cell_element_dispatch_event):
2360 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
2361 (webkit_dom_html_table_col_element_dispatch_event):
2362 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
2363 (webkit_dom_html_table_element_dispatch_event):
2364 (webkit_dom_html_table_element_insert_row):
2365 (webkit_dom_html_table_element_delete_row):
2366 (webkit_dom_html_table_element_set_caption):
2367 (webkit_dom_html_table_element_set_t_head):
2368 (webkit_dom_html_table_element_set_t_foot):
2369 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
2370 (webkit_dom_html_table_row_element_dispatch_event):
2371 (webkit_dom_html_table_row_element_insert_cell):
2372 (webkit_dom_html_table_row_element_delete_cell):
2373 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
2374 (webkit_dom_html_table_section_element_dispatch_event):
2375 (webkit_dom_html_table_section_element_insert_row):
2376 (webkit_dom_html_table_section_element_delete_row):
2377 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
2378 (webkit_dom_html_text_area_element_dispatch_event):
2379 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
2380 (webkit_dom_html_title_element_dispatch_event):
2381 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
2382 (webkit_dom_html_u_list_element_dispatch_event):
2383 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
2384 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
2385 (webkit_dom_media_list_delete_medium):
2386 (webkit_dom_media_list_append_medium):
2387 (webkit_dom_media_list_set_media_text):
2388 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
2389 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
2390 (webkit_dom_named_node_map_set_named_item):
2391 (webkit_dom_named_node_map_remove_named_item):
2392 (webkit_dom_named_node_map_remove_named_item_ns):
2393 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
2394 (webkit_dom_node_dispatch_event):
2395 (webkit_dom_node_insert_before):
2396 (webkit_dom_node_replace_child):
2397 (webkit_dom_node_remove_child):
2398 (webkit_dom_node_append_child):
2399 (webkit_dom_node_clone_node_with_error):
2400 (webkit_dom_node_set_node_value):
2401 (webkit_dom_node_set_text_content):
2402 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
2403 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
2404 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
2405 (webkit_dom_processing_instruction_dispatch_event):
2406 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
2407 (webkit_dom_range_set_start):
2408 (webkit_dom_range_set_end):
2409 (webkit_dom_range_set_start_before):
2410 (webkit_dom_range_set_start_after):
2411 (webkit_dom_range_set_end_before):
2412 (webkit_dom_range_set_end_after):
2413 (webkit_dom_range_select_node):
2414 (webkit_dom_range_select_node_contents):
2415 (webkit_dom_range_compare_boundary_points):
2416 (webkit_dom_range_delete_contents):
2417 (webkit_dom_range_extract_contents):
2418 (webkit_dom_range_clone_contents):
2419 (webkit_dom_range_insert_node):
2420 (webkit_dom_range_surround_contents):
2421 (webkit_dom_range_create_contextual_fragment):
2422 (webkit_dom_range_compare_node):
2423 (webkit_dom_range_intersects_node):
2424 (webkit_dom_range_compare_point):
2425 (webkit_dom_range_is_point_in_range):
2426 (webkit_dom_range_expand):
2427 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
2428 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
2429 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
2430 (webkit_dom_text_dispatch_event):
2431 (webkit_dom_text_split_text):
2432 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
2433 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
2434 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
2435 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
2436 (webkit_dom_xpath_expression_evaluate):
2437 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
2438 (webkit_dom_xpath_result_iterate_next):
2439 (webkit_dom_xpath_result_snapshot_item):
2440 (webkit_dom_xpath_result_get_number_value):
2441 (webkit_dom_xpath_result_get_boolean_value):
2442 (webkit_dom_xpath_result_get_single_node_value):
2443 (webkit_dom_xpath_result_get_snapshot_length):
2445 2017-07-22 Wenson Hsieh <wenson_hsieh@apple.com>
2447 [iOS WK2] Remove _WKDraggableElementInfo and fold PositionInformationTests into WKRequestActivatedElementInfo
2448 https://bugs.webkit.org/show_bug.cgi?id=174758
2450 Reviewed by Dan Bernstein.
2452 _WKDraggableElementInfo is no longer used in WebKit, so it should be removed. However, some of the scenarios
2453 in PositionInformationTests that depend on _WKDraggableElementInfo are still useful to exercise: namely,
2454 performing both synchronous and asynchronous position information updates while an async position information
2455 update is in flight. This patch refactors these unit tests into 2 new unit tests in the existing
2456 WKRequestActivatedElementInfo test suite.
2458 * UIProcess/API/Cocoa/WKWebView.mm:
2459 (-[WKWebView _draggableElementAtPosition:]): Deleted.
2460 (-[WKWebView _requestDraggableElementAtPosition:completionBlock:]): Deleted.
2461 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2462 * UIProcess/API/Cocoa/_WKDraggableElementInfo.h: Removed.
2463 * UIProcess/API/Cocoa/_WKDraggableElementInfo.mm: Removed.
2464 * UIProcess/API/Cocoa/_WKDraggableElementInfoInternal.h: Removed.
2465 * UIProcess/ios/WKContentViewInteraction.mm:
2466 * WebKit.xcodeproj/project.pbxproj:
2468 2017-07-22 Wenson Hsieh <wenson_hsieh@apple.com>
2470 [Mac WK2] Fix null dereference in asynchronous NSTextInputClient methods when deallocating a WKWebView
2471 https://bugs.webkit.org/show_bug.cgi?id=174751
2472 <rdar://problem/33132405>
2474 Reviewed by Darin Adler.
2476 Tweaks -[WKWebView dealloc] to close the WebPageProxy at an earlier time, prior to destroying the WebViewImpl.
2477 This fixes a NSTextInputClient crash in WKWebView when exercising the following scenario:
2479 (1) Suppose that NSTextInputContext invokes an asynchronous text input query on WKWebView immediately before
2480 WKWebView is deallocated, such that WebPageProxy's CallbackMap contains an NSTextInputContext callback at the
2481 time that -[WKWebView dealloc] is called. Additionally, suppose that this callback from NSTextInputContext
2482 invokes additional NSTextInputClient methods on the WKWebView that involve plumbing through to the WebViewImpl
2483 (which is stored as _impl on the WKWebView).
2485 (2) Observe that when calling [super dealloc] in [WKWebView dealloc], we will destroy the WebViewImpl as a
2486 result of setting our unique pointer to _impl to be null. In ~WebViewImpl, we invoke WebPageProxy::close, which
2487 in turn invokes WebPageProxy::resetState.
2489 (3) WebPageProxy::resetState then calls m_callbacks.invalidate(error), which triggers all pending callbacks.
2490 This invokes the block described in (1), which causes us to try and call back into WKWebView, invoking
2491 NSTextInputClient methods. Without the fix in this patch, these methods currently assume that _impl is nonnull,
2492 even though we've already cleared out the pointer in (2), so we segfault with a null dereference.
2494 After this patch, we close the _page at an earlier time, such that the state is reset before the WebViewImpl
2495 (and corresponding _impl unique_ptr in WKWebView) is torn down. This ensures that _impl will not be null for
2496 callbacks invoked after beginning to deallocate the WKWebView.
2498 Forcing this scenario in a custom AppKit root that triggers async NSTextInputClient methods immediately when a
2499 WKWebView is being deallocated produces a crash with the same stack trace as what we observe in the radar, but
2500 there are no known steps to actually reproduce this crash in shipping software.
2502 * UIProcess/API/Cocoa/WKWebView.mm:
2503 (-[WKWebView dealloc]):
2505 2017-07-22 Chris Dumez <cdumez@apple.com>
2507 REGRESSION(r204565): WKObject is broken
2508 https://bugs.webkit.org/show_bug.cgi?id=174736
2509 <rdar://problem/33246169>
2511 Reviewed by Dan Bernstein.
2513 Revert r204565 as making WKObject a root class caused unexpected crashes.
2514 Instead, we now have WKObject inherit from NSProxy (instead of previously
2515 NSObject) and we forward calls to the target.
2517 We also need to provide an implementation for private methods such as
2518 isNSString__ to address the issue with NSStrings that r204565 was trying
2521 * Shared/Cocoa/APIObject.mm:
2522 (API::Object::unwrap):
2523 * Shared/Cocoa/WKObject.h:
2524 * Shared/Cocoa/WKObject.mm:
2525 (-[WKObject dealloc]):
2527 (-[WKObject isKindOfClass:]):
2528 (-[WKObject isMemberOfClass:]):
2529 (-[WKObject respondsToSelector:]):
2530 (-[WKObject conformsToProtocol:]):
2531 (-[WKObject forwardingTargetForSelector:]):
2532 (-[WKObject description]):
2533 (-[WKObject debugDescription]):
2534 (-[WKObject classForCoder]):
2535 (-[WKObject classForKeyedArchiver]):
2536 (-[WKObject _web_createTarget]):
2537 (-[WKObject forwardInvocation:]):
2538 (-[WKObject methodSignatureForSelector:]):
2539 (-[WKObject isNSObject__]):
2540 (-[WKObject isNSArray__]):
2541 (-[WKObject isNSCFConstantString__]):
2542 (-[WKObject isNSData__]):
2543 (-[WKObject isNSDate__]):
2544 (-[WKObject isNSDictionary__]):
2545 (-[WKObject isNSNumber__]):
2546 (-[WKObject isNSOrderedSet__]):
2547 (-[WKObject isNSSet__]):
2548 (-[WKObject isNSString__]):
2549 (-[WKObject isNSTimeZone__]):
2550 (-[WKObject isNSValue__]):
2552 2017-07-21 Chris Dumez <cdumez@apple.com>
2554 Drop IDBDatabaseException class
2555 https://bugs.webkit.org/show_bug.cgi?id=174743
2557 Reviewed by Darin Adler.
2559 * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
2560 (WebKit::WebIDBConnectionToServer::connectionToServerLost):
2562 2017-07-21 Brady Eidson <beidson@apple.com>
2564 Crash in many WebKit apps marking a connection invalid under Messages::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace.
2565 <rdar://problem/28822272> and https://bugs.webkit.org/show_bug.cgi?id=174729
2567 Reviewed by Tim Horton.
2569 Previously, when a NetworkLoad generated a "CanAuthenticateAgainstProtectionSpace" event, the message went from
2570 Network process -> Web process -> UI process.
2572 In that case, MESSAGE_CHECKing the validity of the frame in WebPageProxy made sense.
2574 In r202511 we cut the WebProcess out of this and had Networking go straight to UI process.
2576 As a result, the message check became invalid. The Networking process cannot possible know the validity of
2577 particular WebPage or WebFrame identifiers.
2579 We simply need to validate the input in NetworkProcessProxy.
2581 * UIProcess/Network/NetworkProcessProxy.cpp:
2582 (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace): Validate both the page and frame ids before
2583 passing the call along to the WebPageProxy. Also, if either of those validations fail, respond to the network process.
2585 2017-07-21 Andy Estes <aestes@apple.com>
2587 [iOS] Adopt UIImagePickerControllerImageURL for photo uploads
2588 https://bugs.webkit.org/show_bug.cgi?id=174723
2589 <rdar://problem/33223962>
2591 Reviewed by Joseph Pecoraro.
2593 In iOS 11, use the URL provided by UIImagePickerControllerImageURL, if available, as the
2594 file URL for photo uploads. Since we use the UIImagePickerController imageExportPreset of
2595 UIImagePickerControllerImageURLExportPresetCompatible, UIKit will take care of converting
2596 HEIF images to JPEG for us. For other types (GIF, JPEG, and PNG), it will preserve the
2599 Since UIImagePickerController now provides GIF and PNG representations, we no longer need to
2600 use PHImageManager to access the original assets. This patch removes the
2601 PHAsset/PHImageManager code added in r185241.
2603 * Platform/spi/ios/PhotosSPI.h: Removed.
2604 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2605 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
2606 (-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]): Deleted.
2607 * WebKit.xcodeproj/project.pbxproj:
2609 2017-07-21 Konstantin Tokarev <annulen@yandex.ru>
2611 [cmake][Mac] Unreviewed, fix linking WebKitSystemInterface
2613 After r219560 link_directories() in PlatformXXX.cmake files does not
2614 affect corresponding targets.
2616 * PlatformMac.cmake:
2618 2017-07-21 Andreas Kling <akling@apple.com>
2620 Use more references in event dispatch code
2621 https://bugs.webkit.org/show_bug.cgi?id=174681
2623 Reviewed by Geoffrey Garen.
2625 * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
2626 * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
2627 (WebKit::PDFPluginAnnotation::handleEvent):
2628 (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):
2629 * WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
2630 * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
2631 (WebKit::PDFPluginPasswordField::handleEvent):
2632 * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2633 * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
2634 (WebKit::PDFPluginTextAnnotation::handleEvent):
2635 * WebProcess/Plugins/PluginView.cpp:
2636 (WebKit::PluginView::createWebEvent):
2637 (WebKit::PluginView::handleEvent):
2638 * WebProcess/Plugins/PluginView.h:
2640 2017-07-21 Chris Dumez <cdumez@apple.com>
2642 WebResourceLoadStatisticsStore::m_operatingDates is unsafely modified from several threads
2643 https://bugs.webkit.org/show_bug.cgi?id=174721
2644 <rdar://problem/33400343>
2646 Reviewed by Brent Fulgham.
2648 WebResourceLoadStatisticsStore::m_operatingDates is supposed to only be modified on
2649 the background thread. However, WebResourceLoadStatisticsStore::performDailyTasks()
2650 was mistakenly calling includeTodayAsOperatingDateIfNecessary() on the main thread,
2651 which would modify m_operatingDates. This could lead to crashes such as the
2652 one in <rdar://problem/33400343>, as the main thread may modify m_operatingDates
2653 while we are interating over it on the background thread to save it to disk.
2655 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2656 (WebKit::WebResourceLoadStatisticsStore::performDailyTasks):
2657 (WebKit::WebResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary):
2659 2017-07-21 Brady Eidson <beidson@apple.com>
2661 Get rid of WebCore IconDatabase code.
2662 https://bugs.webkit.org/show_bug.cgi?id=174700
2664 Reviewed by Tim Horton.
2666 * UIProcess/API/glib/WebKitWebContext.cpp:
2667 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2668 (WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
2669 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2671 2017-07-21 Carlos Garcia Campos <cgarcia@igalia.com>
2673 Web Automation: implicit navigations don't cause browsing context switch
2674 https://bugs.webkit.org/show_bug.cgi?id=174633
2675 <rdar://problem/33387797>
2677 Reviewed by Brian Burg.
2679 When a new page load replaces the current frameset, for example when a link in the current browser context has a
2680 _top target, there's no explicit context switch, so the web driver doesn't know that the current browsing
2681 context is no longer valid. Following commands will still be using the previous frame as the current browsing
2682 context, but they don't fail with no such frame because the frame is still alive in the page cache and
2683 referenced in the internal maps used in both UI and web processes. This causes test
2684 testShouldFocusOnTheReplacementWhenAFrameFollowsALinkToA_TopTargetedPage to fail, since it expects a no such
2685 frame exception. When a new page navigation happens we can simply remove references to frames from
2686 m_handleWebFrameMap in WebAutomationSession, because any existing frame reference in the map should be for a
2687 previous page. With this, before the next command is executed, waitForNavigationToComplete will be called and it
2688 will fail with no such frame, condition that is handled to switch to the top level browser context. The test
2689 still fails, because the find element command is called with the top level browsing context, returning no such
2690 element, instead of no such frame. This is consistent with Chrome.
2692 * UIProcess/Automation/WebAutomationSession.cpp:
2693 (WebKit::WebAutomationSession::navigationOccurredForFrame): Clear the m_handleWebFrameMap when a new page load
2696 2017-07-21 Carlos Garcia Campos <cgarcia@igalia.com>
2698 WebDriver: wait until navigation is complete before running new commands and after a click
2699 https://bugs.webkit.org/show_bug.cgi?id=174670
2701 Reviewed by Brian Burg.
2703 Add waitForNavigationToComplete method to Automation to allow WebDriver to wait for pending navigations to
2704 complete. The new method already receives page load strategy and timeout, but they are not implemented yet.
2706 * UIProcess/Automation/Automation.json: Add waitForNavigationToComplete method and PageLoadStrategy new type.
2707 * UIProcess/Automation/WebAutomationSession.cpp:
2708 (WebKit::WebAutomationSession::waitForNavigationToComplete): Call waitForNavigationToCompleteOnPage or
2709 waitForNavigationToCompleteOnFrame depending on whether the current borwsing context is the main frame or not.
2710 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Check if there's an ongoing load for the page,
2711 and wait for it to complete if needed.
2712 (WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Check if there's an ongoing load for the frame,
2713 and wait for it to complete if needed.
2714 (WebKit::WebAutomationSession::navigateBrowsingContext): Use waitForNavigationToCompleteOnPage() now.
2715 (WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
2716 (WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
2717 (WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
2718 (WebKit::WebAutomationSession::navigationOccurredForFrame): Renamed since it now receives the notification for
2719 all the frames. Complete page operations if it's a main frame, or frame operations otherwise.
2720 * UIProcess/Automation/WebAutomationSession.h:
2721 * UIProcess/WebPageProxy.cpp:
2722 (WebKit::WebPageProxy::didFinishLoadForFrame): Notify about all frames, not only the main one.
2723 (WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
2724 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
2726 2017-07-20 Carlos Garcia Campos <cgarcia@igalia.com>
2728 Unreviewed. Remove WKIconDatabaseCairo.
2730 * PlatformGTK.cmake:
2731 * PlatformWPE.cmake:
2732 * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp: Removed.
2733 * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: Removed.
2735 2017-07-20 Brady Eidson <beidson@apple.com>
2737 Get rid of IconDatabase related code in WebKit.
2738 https://bugs.webkit.org/show_bug.cgi?id=174693
2740 Reviewed by Tim Horton.
2742 This leaves the C-API class but guts it.
2744 No explanations of the other changes are needed.
2747 * DerivedSources.make:
2748 * Shared/WebProcessCreationParameters.cpp:
2749 (WebKit::WebProcessCreationParameters::encode):
2750 (WebKit::WebProcessCreationParameters::decode):
2751 * Shared/WebProcessCreationParameters.h:
2752 * UIProcess/API/C/WKContext.cpp:
2753 (WKContextGetIconDatabase):
2754 (WKContextSetIconDatabasePath):
2755 * UIProcess/API/C/WKIconDatabase.cpp:
2756 (WKIconDatabaseSetIconDatabaseClient):
2757 (WKIconDatabaseRetainIconForURL):
2758 (WKIconDatabaseReleaseIconForURL):
2759 (WKIconDatabaseSetIconDataForIconURL):
2760 (WKIconDatabaseSetIconURLForPageURL):
2761 (WKIconDatabaseCopyIconURLForPageURL):
2762 (WKIconDatabaseCopyIconDataForPageURL):
2763 (WKIconDatabaseEnableDatabaseCleanup):
2764 (WKIconDatabaseRemoveAllIcons):
2765 (WKIconDatabaseCheckIntegrityBeforeOpening):
2766 (WKIconDatabaseClose):
2767 * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
2768 (WKIconDatabaseTryGetCGImageForURL):
2769 (WKIconDatabaseTryCopyCGImageArrayForURL):
2770 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
2771 (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted.
2772 * UIProcess/WebIconDatabase.cpp: Removed.
2773 * UIProcess/WebIconDatabase.h:
2774 (WebKit::WebIconDatabase::clearProcessPool): Deleted.
2775 * UIProcess/WebIconDatabase.messages.in: Removed.
2776 * UIProcess/WebIconDatabaseClient.cpp: Removed.
2777 * UIProcess/WebIconDatabaseClient.h: Removed.
2778 * UIProcess/WebProcessPool.cpp:
2779 (WebKit::m_hiddenPageThrottlingTimer):
2780 (WebKit::WebProcessPool::~WebProcessPool):
2781 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
2782 (WebKit::WebProcessPool::createNewWebProcess):
2783 (WebKit::WebProcessPool::setIconDatabasePath): Deleted.
2784 (WebKit::WebProcessPool::iconDatabasePath): Deleted.
2785 * UIProcess/WebProcessPool.h:
2786 * UIProcess/WebProcessProxy.cpp:
2787 (WebKit::WebProcessProxy::processWillShutDown):
2788 (WebKit::WebProcessProxy::retainIconForPageURL): Deleted.
2789 (WebKit::WebProcessProxy::releaseIconForPageURL): Deleted.
2790 (WebKit::WebProcessProxy::releaseRemainingIconsForPageURLs): Deleted.
2791 * UIProcess/WebProcessProxy.h:
2792 * UIProcess/WebProcessProxy.messages.in:
2793 * UIProcess/gtk/WebProcessPoolGtk.cpp:
2794 (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted.
2795 * UIProcess/wpe/WebProcessPoolWPE.cpp:
2796 (WebKit::WebProcessPool::platformDefaultIconDatabasePath): Deleted.
2797 * WebKit.xcodeproj/project.pbxproj:
2798 * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Removed.
2799 * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Removed.
2800 * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Removed.
2801 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2802 * WebProcess/WebProcess.cpp:
2803 (WebKit::WebProcess::WebProcess):
2804 (WebKit::WebProcess::initializeWebProcess):
2805 (WebKit::WebProcess::getWebCoreStatistics):
2806 * WebProcess/WebProcess.h:
2808 2017-07-20 David Quesada <david_quesada@apple.com>
2810 Add SPI to notify WKNavigationDelegate about client redirects
2811 https://bugs.webkit.org/show_bug.cgi?id=174680
2812 rdar://problem/33184886
2814 Reviewed by Brady Eidson.
2816 * UIProcess/API/APINavigationClient.h:
2817 (API::NavigationClient::didPerformClientRedirectForNavigation):
2818 Add a new virtual method for navigation clients to implement if they want to be informed
2819 when the page is initiating a navigation that is a client redirect.
2821 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
2822 Declare the new WKNavigationDelegate method -_webView:didPerformClientRedirectForNavigation:
2824 * UIProcess/Cocoa/NavigationState.h:
2825 * UIProcess/Cocoa/NavigationState.mm:
2826 (WebKit::NavigationState::setNavigationDelegate):
2827 (WebKit::NavigationState::NavigationClient::didPerformClientRedirectForNavigation):
2828 Add a new method to NavigationState method to tell the WKNavigationDelegate when a
2829 client redirect happens.
2831 * UIProcess/WebPageProxy.cpp:
2832 (WebKit::WebPageProxy::didPerformClientRedirectForLoadForFrame):
2833 * UIProcess/WebPageProxy.h:
2834 * UIProcess/WebPageProxy.messages.in:
2835 Allow the WebPageProxy to receive a message from the web process when a client redirect happens.
2837 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2838 (WebKit::WebFrameLoaderClient::dispatchDidPerformClientRedirect):
2839 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2840 Send this new message to the UI process on client redirects.
2842 2017-07-20 Chris Dumez <cdumez@apple.com>
2844 Drop legacy XPathException type
2845 https://bugs.webkit.org/show_bug.cgi?id=174679
2847 Reviewed by Sam Weinig.
2849 Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
2850 no longer expose XPathException.
2852 * UIProcess/Automation/atoms/FindNodes.js:
2855 2017-07-20 Chris Dumez <cdumez@apple.com>
2857 Unreviewed, rolling out r219706.
2863 "Drop legacy XPathException type"
2864 https://bugs.webkit.org/show_bug.cgi?id=174679
2865 http://trac.webkit.org/changeset/219706
2867 2017-07-20 Chris Dumez <cdumez@apple.com>
2869 Drop legacy XPathException type
2870 https://bugs.webkit.org/show_bug.cgi?id=174679
2872 Reviewed by Sam Weinig.
2874 Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
2875 no longer expose XPathException.
2877 * UIProcess/Automation/atoms/FindNodes.js:
2880 2017-07-20 Chris Dumez <cdumez@apple.com>
2882 Avoid unnecessary WorkQueue dispatch in WebResourceLoadStatisticsStore::processStatisticsAndDataRecords()
2883 https://bugs.webkit.org/show_bug.cgi?id=174686
2885 Reviewed by Geoffrey Garen.
2887 Avoid unnecessary WorkQueue dispatch in WebResourceLoadStatisticsStore::processStatisticsAndDataRecords(). The most common
2888 call site is already on the right thread.
2890 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2891 (-[WKWebsiteDataStore _resourceLoadStatisticsProcessStatisticsAndDataRecords]):
2892 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2893 (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing):
2894 (WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):
2895 * UIProcess/WebResourceLoadStatisticsStore.h:
2897 2017-07-20 Chris Dumez <cdumez@apple.com>
2899 Regression(ITP): May get frequently logged out of wsj.com
2900 https://bugs.webkit.org/show_bug.cgi?id=174661
2901 <rdar://problem/32343256>
2903 Reviewed by Geoffrey Garen.
2905 Bump statistics file version to blow away old statistics on disk since those do not
2906 take into account associated domains.
2908 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2910 2017-07-20 Chris Dumez <cdumez@apple.com>
2912 Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable
2913 https://bugs.webkit.org/show_bug.cgi?id=174660
2915 Reviewed by Geoffrey Garen.
2917 Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable.
2918 This essentially replaces a branch to figure out if the new size is less or greater than the
2919 current size by an assertion.
2921 * Platform/IPC/ArgumentCoders.h:
2922 * UIProcess/Gamepad/UIGamepadProvider.cpp:
2923 (WebKit::UIGamepadProvider::platformGamepadConnected):
2924 * UIProcess/WebProcessPool.cpp:
2925 (WebKit::WebProcessPool::setInitialConnectedGamepads):
2926 * WebProcess/Network/WebLoaderStrategy.cpp:
2927 (WebKit::WebLoaderStrategy::loadResourceSynchronously):
2928 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
2929 (WebKit::WebPasteboardOverrides::getDataForOverride):
2930 * WebProcess/WebPage/ios/WebPageIOS.mm:
2931 (WebKit::WebPage::requestAutocorrectionData):
2933 2017-07-20 Chris Dumez <cdumez@apple.com>
2935 Regression(ITP): Can no longer log in on abc.go.com
2936 https://bugs.webkit.org/show_bug.cgi?id=174533
2937 <rdar://problem/33325881>
2939 Reviewed by Geoffrey Garen.
2941 Bump statistics database version to blow away any existing statistics. Without this, SSO providers
2942 for which we added a quirk may already be in the database and identified as trackers. The quirk
2943 merely prevents the specified SSO providers from being identified as trackers.
2945 * UIProcess/WebResourceLoadStatisticsStore.cpp:
2947 2017-07-19 Simon Fraser <simon.fraser@apple.com>
2949 getBoundingClientRects not updated for programmatic scrolls
2950 https://bugs.webkit.org/show_bug.cgi?id=174538
2951 rdar://problem/33049012
2953 Reviewed by Tim Horton.
2955 Feed ViewportRectStability and ScrollingLayerPositionAction into reconcileScrollingState().
2957 * WebProcess/WebPage/ios/WebPageIOS.mm:
2958 (WebKit::WebPage::updateVisibleContentRects):
2960 2017-07-19 Brady Eidson <beidson@apple.com>
2962 iBooks sometimes crashes when closing a book.
2963 <rdar://problem/31180331> and https://bugs.webkit.org/show_bug.cgi?id=174658
2965 Reviewed by Oliver Hunt.
2967 - LegacyCustomProtocolManagerProxy should not reference a WebProcessPool directly.
2968 - LegacyCustomProtocolManagerProxy should invalidate in its destructor.
2970 * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp:
2971 (WebKit::LegacyCustomProtocolManagerProxy::LegacyCustomProtocolManagerProxy):
2972 (WebKit::LegacyCustomProtocolManagerProxy::~LegacyCustomProtocolManagerProxy):
2973 (WebKit::LegacyCustomProtocolManagerProxy::startLoading):
2974 (WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
2975 (WebKit::LegacyCustomProtocolManagerProxy::invalidate):
2976 (WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
2977 (WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
2978 (WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
2979 (WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
2980 (WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):
2981 (WebKit::LegacyCustomProtocolManagerProxy::processDidClose): Deleted.
2982 * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h:
2984 * UIProcess/Network/NetworkProcessProxy.cpp:
2985 (WebKit::NetworkProcessProxy::NetworkProcessProxy):
2986 (WebKit::NetworkProcessProxy::didClose):
2987 * UIProcess/Network/NetworkProcessProxy.h:
2988 (WebKit::NetworkProcessProxy::processPool):
2990 2017-07-19 Yusuke Suzuki <utatane.tea@gmail.com>
2992 [WTF] Implement WTF::ThreadGroup
2993 https://bugs.webkit.org/show_bug.cgi?id=174081
2995 Reviewed by Mark Lam.
2997 * Shared/AsyncRequest.h:
2999 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3001 WebDriver: handle invalid selector errors
3002 https://bugs.webkit.org/show_bug.cgi?id=174619
3004 Reviewed by Brian Burg.
3006 We are currently handling only XPathException and only when it's an invalid expression. In the xpath case, the
3007 spec also says "If any item in result is not an element return an error with error code invalid selector.", so
3008 we should also handle TYPE_ERR (The expression could not be converted to return the specified type.). However,
3009 since the spec says "or other error", I think we can simplify this and simply throw InvalidSelector inside the
3010 catch, without checking any specific error. This is causing 14 failures in selenium tests.
3012 §12. Element Retrieval. Step 6: If a DOMException, SyntaxError, XPathException, or other error occurs during the
3013 execution of the element location strategy, return error invalid selector.
3014 https://www.w3.org/TR/webdriver/#dfn-find
3016 * UIProcess/Automation/Automation.json: Add InvalidSelector error.
3017 * UIProcess/Automation/atoms/FindNodes.js:
3018 (tryToFindNode): Raise InvalidSelector in case of error.
3019 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3020 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Handle InvalidSelector exceptions.
3022 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3024 Web Automation: error details not passed to DidEvaluateJavaScriptFunction message when callback was not called before page unload
3025 https://bugs.webkit.org/show_bug.cgi?id=174624
3027 Reviewed by Brian Burg.
3029 There's a variable errorMessage, but it's unused.
3031 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3032 (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): Pass errorMessage instead of String() to DidEvaluateJavaScriptFunction.
3034 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3036 Web Automation: evaluateJavaScriptFunction should always notify the web process before returning early
3037 https://bugs.webkit.org/show_bug.cgi?id=174623
3039 Reviewed by Brian Burg.
3041 It currently returns early if page, frame or scriptObject are nullptr, in which cases the UI process is not
3042 notified. This causes test testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs to hang, because message
3043 DidEvaluateJavaScriptFunction is never sent when the given frame no longer exists. We should send
3044 DidEvaluateJavaScriptFunction with WindowNotFound in case of page is nullptr and FrameNotFound if the frame is
3045 nullptr. The scriptObject early return is actually wrong, because scriptObjectForFrame creates a new script if
3046 there's isn't one for the given frame.
3048 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3049 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
3051 2017-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
3053 Web Automation: pending evaluate script callbacks are stored with the wrong frame ID when using the default main frame
3054 https://bugs.webkit.org/show_bug.cgi?id=174622
3056 Reviewed by Brian Burg.
3058 The frameHandle argument is optional in evaluateJavaScriptFunction(), when not provided we pass 0 to the web
3059 process. The proxy gets the web page main frame when received frame ID is 0, but the given frameID is
3060 still used as key of m_webFramePendingEvaluateJavaScriptCallbacksMap and also passed to the javascript function
3061 as argument. I think r203442 was actually a workaround to this bug, making it even more hidden. Both
3062 m_webFrameScriptObjectMap and m_webFramePendingEvaluateJavaScriptCallbacksMap should never have 0 as a
3063 key, since they always use a frame ID, and the frame identifier counter starts at 1. This is causing test
3064 testShouldDetectPageLoadsWhileWaitingOnAnAsyncScriptAndReturnAnError to hang, because when the page is unloaded
3065 and didClearWindowObjectForFrame is called, we try to get the pending callbacks of frame 1, but they were stored
3066 as frame 0 so DidEvaluateJavaScriptFunction message is never sent to the UI process.
3068 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3069 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Use always the actual frameID from the WebFrame
3071 * WebProcess/Automation/WebAutomationSessionProxy.h: Do not allow 0 as a key of
3072 m_webFramePendingEvaluateJavaScriptCallbacksMap and m_webFrameScriptObjectMap.
3074 2017-07-18 Andy Estes <aestes@apple.com>
3076 [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS
3077 https://bugs.webkit.org/show_bug.cgi?id=174631
3079 Reviewed by Tim Horton.
3081 * Configurations/Base.xcconfig:
3082 * Shared/API/APIArray.cpp:
3083 (API::Array::toStringVector):
3084 * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
3085 (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray):
3086 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3087 (WebKit::WebUserContentControllerProxy::addProcess):
3088 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
3089 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
3090 * UIProcess/ios/forms/WKFileUploadPanel.mm:
3091 (-[WKFileUploadPanel presentWithParameters:resultListener:]):
3092 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
3093 (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
3095 2017-07-18 Andy Estes <aestes@apple.com>
3097 [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION
3098 https://bugs.webkit.org/show_bug.cgi?id=174631
3100 Reviewed by Sam Weinig.
3102 * Configurations/Base.xcconfig:
3104 2017-07-18 Andy Estes <aestes@apple.com>
3106 [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION
3107 https://bugs.webkit.org/show_bug.cgi?id=174631
3109 Reviewed by Dan Bernstein.
3111 * Configurations/Base.xcconfig:
3113 2017-07-18 Matt Lewis <jlewis3@apple.com>
3115 Unreviewed, rolling out r219610.
3117 This caused an api failure on all platforms for the test
3118 SnapshotImageLargeAsyncDecoding
3122 "Async image decoding for large images should be disabled
3123 after the first time a tile is painted"
3124 https://bugs.webkit.org/show_bug.cgi?id=174451
3125 http://trac.webkit.org/changeset/219610
3127 2017-07-18 Andy Estes <aestes@apple.com>
3129 [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
3130 https://bugs.webkit.org/show_bug.cgi?id=174631
3132 Reviewed by Darin Adler.
3134 * Configurations/Base.xcconfig:
3136 2017-07-18 Said Abou-Hallawa <sabouhallawa@apple.com>
3138 Async image decoding for large images should be disabled after the first time a tile is painted
3139 https://bugs.webkit.org/show_bug.cgi?id=174451
3141 Reviewed by Simon Fraser.
3143 * Shared/mac/RemoteLayerBackingStore.mm:
3144 (WebKit::RemoteLayerBackingStore::drawInContext):
3145 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
3146 (WebKit::CompositingCoordinator::paintContents):
3147 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
3149 2017-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
3151 Web Automation: link and partial link queries don't work if text link contains trailing or leading whitespaces
3152 https://bugs.webkit.org/show_bug.cgi?id=174499
3154 Reviewed by Brian Burg.
3156 This is causing test test_Driver_Can_Get_Link_By_Link_Test_Ignoring_Trailing_Whitespace to fail.
3158 * UIProcess/Automation/atoms/FindNodes.js:
3159 (switch): Use normalize-space() in in the links xpath expressions.
3161 2017-07-17 Darin Adler <darin@apple.com>
3163 Improve use of NeverDestroyed
3164 https://bugs.webkit.org/show_bug.cgi?id=174348
3166 Reviewed by Sam Weinig.
3168 * DatabaseProcess/DatabaseProcess.h: Removed unneeded include of
3170 * NetworkProcess/cache/NetworkCacheKey.cpp: Ditto.
3172 * NetworkProcess/capture/NetworkCaptureManager.cpp: Moved include of
3173 NeverDestroyed.h here ...
3174 * NetworkProcess/capture/NetworkCaptureManager.h: ... from here.
3176 * PluginProcess/PluginProcess.cpp: Moved include of NeverDestroyed.h
3178 * PluginProcess/PluginProcess.h: ... from here.
3180 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
3181 (isContainerClass): Removed trivial inefficient use of
3182 LazyNeverDestroyed<HashSet> to check against two classes.
3183 Instead wrote out the boolean expression.
3185 * Shared/mac/SecItemShim.cpp: Removed unneeded include of
3188 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3189 (WebKit::WebProcessPool::platformInitialize): Call
3190 installMemoryPressureHandler instead of WebMemoryPressureHandler::singleton.
3192 * UIProcess/Gamepad/UIGamepadProvider.h: Removed unneeded include
3193 of NeverDestroyed.h.
3195 * UIProcess/Plugins/PluginProcessManager.cpp: Moved include of
3196 NeverDestroyed.h here ...
3197 * UIProcess/Plugins/PluginProcessManager.h: ... from here.
3199 * UIProcess/WebInspectorProxy.cpp: Removed unneeded include
3200 of NeverDestroyed.h.
3202 * UIProcess/WebPageProxy.h: Added now-needed include of
3203 MediaPlaybackTargetContext.h.
3205 * UIProcess/WebPasteboardProxy.cpp: Moved include of
3206 NeverDestroyed.h here ...
3207 * UIProcess/WebPasteboardProxy.h: ... from here.
3209 * UIProcess/ios/WebMemoryPressureHandlerIOS.h: Removed the
3210 WebMemoryPressureHandler class from this header. Callers don't need to
3211 know if there is a class. They simply indicate when it's time to install
3212 the handler. Another way to put it is that this class had no functions
3213 other than the singleton function.
3215 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
3216 (WebKit::installMemoryPressureHandler): Replaced the class with this function.
3217 It creates a dispatch source and then resumes it. To avoid having the source
3218 look like a leak, we keep it in a global variable.
3220 * WebProcess/Gamepad/WebGamepadProvider.h: Include Forward.h instead of
3223 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Moved include of
3224 NeverDestroyed.h here ...
3225 * WebProcess/WebCoreSupport/WebPasteboardOverrides.h: ... from here.
3227 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Removed unneeded
3228 include of NeverDestroyed.h.
3230 2017-07-17 Timothy Horton <timothy_horton@apple.com>
3232 Page using safe area constant properties jumps to correct layout after resize
3233 https://bugs.webkit.org/show_bug.cgi?id=174598
3234 <rdar://problem/33364275>
3236 Reviewed by Simon Fraser.
3238 Test: fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html
3240 * UIProcess/API/Cocoa/WKWebView.mm:
3241 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3242 * UIProcess/WebPageProxy.h:
3243 * UIProcess/ios/WebPageProxyIOS.mm:
3244 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3245 * WebProcess/WebPage/WebPage.h:
3246 * WebProcess/WebPage/WebPage.messages.in:
3247 * WebProcess/WebPage/ios/WebPageIOS.mm:
3248 (WebKit::WebPage::dynamicViewportSizeUpdate):
3249 Plumb unobscured safe area insets through in the dynamicViewportSizeUpdate,
3250 like we do in VisibleContentRectUpdate (once again sad that these aren't
3251 more similar), so that it will be correct in the during-rotation snapshot,
3252 instead of only becoming correct in the first visible content rect update
3255 2017-07-17 Chris Dumez <cdumez@apple.com>
3257 UserMediaPermissionRequestManagerProxy should not use WebCore::Timer
3258 https://bugs.webkit.org/show_bug.cgi?id=174599
3259 <rdar://problem/33362600>
3261 Reviewed by Tim Horton.
3263 UserMediaPermissionRequestManagerProxy should not use WebCore::Timer since it runs in the
3264 UIProcess. Switch to using RunLoop::Timer instead.
3266 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
3267 (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
3268 * UIProcess/UserMediaPermissionRequestManagerProxy.h:
3270 2017-07-17 Chris Dumez <cdumez@apple.com>
3272 NETWORK_SESSION does not need didReceiveAuthenticationChallenge(uint64_t, uint64_t, const AuthenticationChallenge&)
3273 https://bugs.webkit.org/show_bug.cgi?id=174595
3275 Reviewed by Alex Christensen.
3277 * Shared/Authentication/AuthenticationManager.cpp:
3278 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
3279 * Shared/Authentication/AuthenticationManager.h:
3281 2017-07-17 Wenson Hsieh <wenson_hsieh@apple.com>
3283 [iOS DnD] Web process uses too much memory when beginning a drag on a very large image
3284 https://bugs.webkit.org/show_bug.cgi?id=174585
3285 <rdar://problem/33302541>
3287 Reviewed by Tim Horton.
3289 Add IPC support for serializing/deserializing the size of an image written to the pasteboard. See WebCore
3290 ChangeLogs for more details.
3292 * Shared/WebCoreArgumentCoders.cpp:
3293 (IPC::ArgumentCoder<PasteboardImage>::encode):
3294 (IPC::ArgumentCoder<PasteboardImage>::decode):
3296 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
3298 Unreviewed attempt to fix Mac cmake build
3300 * PlatformMac.cmake: Remove reference to file which is gone since r219025
3302 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3304 [CMake] Include most CMake modules from WebKitCommon.cmake
3305 https://bugs.webkit.org/show_bug.cgi?id=174546
3307 Reviewed by Konstantin Tokarev.
3311 2017-07-17 Michael Catanzaro <mcatanzaro@igalia.com>
3313 [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
3314 https://bugs.webkit.org/show_bug.cgi?id=174547
3316 Reviewed by Alex Christensen.
3320 2017-07-17 Alex Christensen <achristensen@webkit.org>
3322 Modernize content extension code
3323 https://bugs.webkit.org/show_bug.cgi?id=174588
3325 Reviewed by Sam Weinig.
3327 * WebProcess/UserContent/WebUserContentController.cpp:
3328 (WebKit::WebUserContentController::addContentRuleLists):
3330 2017-07-17 Jeremy Jones <jeremyj@apple.com>
3332 Add video fullscreen transition logging.
3333 https://bugs.webkit.org/show_bug.cgi?id=174474
3335 Reviewed by Jer Noble.
3337 No functional change. Just adds logging.
3339 * Platform/Logging.h:
3340 * WebProcess/cocoa/WebVideoFullscreenManager.mm:
3341 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
3342 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
3343 (WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
3344 (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
3345 (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
3346 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
3347 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
3348 (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
3350 2017-07-17 Konstantin Tokarev <annulen@yandex.ru>
3352 [CMake] Create targets before WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS is called
3353 https://bugs.webkit.org/show_bug.cgi?id=174557
3355 Reviewed by Michael Catanzaro.
3359 2017-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
3361 Web Automation: link and partial link queries don't work if the link contains formatting tags
3362 https://bugs.webkit.org/show_bug.cgi?id=174498
3364 Reviewed by Brian Burg.
3366 So, for example, if we find links with text "Foo" and there's a link like <a href=""><bA>Foo</b></a> we fail
3367 with no such element error. This causes test test_Link_With_Formatting_Tags to fail.
3369 * UIProcess/Automation/atoms/FindNodes.js:
3370 (switch): Use descendant-or-self::text() instead of just text() in the links xpath expressions.
3372 2017-07-16 Carlos Garcia Campos <cgarcia@igalia.com>
3374 Web Automation: FindNodes should throw an error in case of invalid strategy
3375 https://bugs.webkit.org/show_bug.cgi?id=174497
3377 Reviewed by Brian Burg.
3379 We are currently returning null or empty list. According to the spec in 12.2 Find Element and 12.3 Find
3380 Elements, step 4: "If location strategy is not present as a keyword in the table of location strategies, return
3381 error with error code invalid argument.".
3382 https://www.w3.org/TR/webdriver/#find-element.
3384 This is causing test test_should_throw_an_error_if_user_passes_in_invalid_by_when_find_elements to fail.
3386 * UIProcess/Automation/atoms/FindNodes.js:
3387 (switch): Throw an error in case of unknown strategy.
3388 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
3389 (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Handle InvalidParameter exceptions.
3391 2017-07-16 Brady Eidson <beidson@apple.com>
3393 Crash when a WKHTTPCookieStore outlives its owning WKWebsiteDataStore.
3394 <rdar://problem/33341730> and https://bugs.webkit.org/show_bug.cgi?id=174574
3396 Reviewed by Tim Horton.
3398 Instead of holding a weak reference to its owning API::WebsiteDataStore,
3399 API::HTTPCookieStore can hold a strong reference to the owner's implementation
3400 WebKit::WebsiteDataStore.
3402 * UIProcess/API/APIHTTPCookieStore.cpp:
3403 (API::HTTPCookieStore::HTTPCookieStore):
3404 (API::HTTPCookieStore::cookies):
3405 (API::HTTPCookieStore::setCookie):
3406 (API::HTTPCookieStore::deleteCookie):
3407 (API::HTTPCookieStore::registerObserver):
3408 (API::HTTPCookieStore::unregisterObserver):
3409 (API::HTTPCookieStore::cookieManagerDestroyed):
3410 (API::HTTPCookieStore::registerForNewProcessPoolNotifications):
3411 * UIProcess/API/APIHTTPCookieStore.h:
3413 2017-07-15 Brady Eidson <beidson@apple.com>
3415 Make sure all CFHTTPCookieStorageRefs we create are scheduled.
3416 <rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513
3418 Reviewed by Tim Horton.
3420 Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled.
3421 We need to schedule it on the appropriate RunLoop.
3423 This patch also cleans up the creation of the identifying data itself.
3425 * NetworkProcess/mac/RemoteNetworkingContext.mm:
3426 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
3428 * Shared/cf/CookieStorageUtilsCF.h: Added.
3429 * Shared/cf/CookieStorageUtilsCF.mm: Added.
3430 (WebKit::cookieStorageFromIdentifyingData):
3431 (WebKit::identifyingDataFromCookieStorage):