1 2018-04-02 Jer Noble <jer.noble@apple.com>
3 REGRESSION (229680): Fullscreen video does not work (youtube, netflix)
4 https://bugs.webkit.org/show_bug.cgi?id=184235
6 Reviewed by Eric Carlson.
8 Enable the Fullscreen API by default.
10 * Shared/WebPreferences.yaml:
11 * Shared/WebPreferencesDefaultValues.h:
13 2018-04-02 Fujii Hironori <Hironori.Fujii@sony.com>
15 [Win] MSVC can't compile WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent
16 https://bugs.webkit.org/show_bug.cgi?id=184120
18 Reviewed by Alex Christensen.
20 It seems that MSVC can't compile the code using `this` in a
21 generalized lambda capture in another lambda.
23 In this case, there is no need to copy `protectedThis` for the
24 inner lambda. Move `protectedThis` of the outer lambda to the
25 inner as well as `callback`.
27 * UIProcess/WebResourceLoadStatisticsStore.cpp:
28 (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
29 Moved `protectedThis` from the outer lambda to the inner.
31 2018-04-02 Dan Bernstein <mitz@apple.com>
33 Build fix after r230121
35 * Configurations/WebKit.xcconfig: Disabled framework header postprocessing when building for
37 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Reverted r230159.
39 2018-04-02 Dan Bernstein <mitz@apple.com>
41 Fixed the build when BOOL is not bool.
42 <rdar://problem/39094484>
44 Reviewed by Jer Noble.
46 * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
47 (-[WKFullScreenViewController videoControlsManagerDidChange]): Removed the write-only ivar
48 _hasControlsManager, the assignment to which was causing the compiler error.
50 2018-04-02 Ryan Haddad <ryanhaddad@apple.com>
54 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: Update availability annotation.
56 2018-04-02 Michael Catanzaro <mcatanzaro@igalia.com>
58 [GTK] DragAndDropHandler.cpp should include GUniquePtrGtk.h
59 https://bugs.webkit.org/show_bug.cgi?id=184119
61 Reviewed by Daniel Bates.
63 * UIProcess/gtk/DragAndDropHandler.cpp:
65 2018-04-02 Frederic Wang <fwang@igalia.com>
67 Fix warnings for unused lambda captures in Source/WebKit
68 https://bugs.webkit.org/show_bug.cgi?id=173555
70 Reviewed by Konstantin Tokarev.
72 When release logs are disabled, several lambda captures are unused, causing compilation
73 failures with -Wunused-lambda-capture. This patch marks the corresponding variables as unused
74 in order to fix these warnings.
76 Based on initial patch by: Konstantin Tokarev <annulen@yandex.ru>
78 * NetworkProcess/NetworkResourceLoader.cpp:
79 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
80 * UIProcess/Network/NetworkProcessProxy.cpp:
81 (WebKit::NetworkProcessProxy::fetchWebsiteData):
82 (WebKit::NetworkProcessProxy::deleteWebsiteData):
83 (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
84 * UIProcess/WebProcessProxy.cpp:
85 (WebKit::WebProcessProxy::fetchWebsiteData):
86 (WebKit::WebProcessProxy::deleteWebsiteData):
87 (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
88 * UIProcess/ios/WKContentViewInteraction.mm:
89 (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
91 2018-04-02 Alejandro G. Castro <alex@igalia.com>
93 [GTK] Make libwebrtc backend buildable for GTK port
94 https://bugs.webkit.org/show_bug.cgi?id=178860
96 Reviewed by Youenn Fablet.
98 * CMakeLists.txt: Add RTC network classes to the compilation and
99 the libwebrtc includes.
100 * PlatformGTK.cmake: Add the libwebrtc directory.
101 * SourcesGTK.txt: Add RTC files to the compilation.
103 2018-03-30 Chris Dumez <cdumez@apple.com>
105 REGRESSION (r229828): Facebook login popup is blank
106 https://bugs.webkit.org/show_bug.cgi?id=184206
107 <rdar://problem/39057006>
109 Reviewed by Wenson Hsieh.
111 Add assertion to make sure we never try to do a policy check to
112 a resource response while a policy check for a navigation is
113 pending. This assertion was being hit by several of our redirection
114 tests without my fix.
116 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
117 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
119 2018-03-30 Ryan Haddad <ryanhaddad@apple.com>
121 Unreviewed, rolling out r230125.
123 Build fix broke more builds.
127 "Unreviewed build fix, remove unused lambda capture."
128 https://trac.webkit.org/changeset/230125
130 2018-03-30 Ryan Haddad <ryanhaddad@apple.com>
132 Unreviewed build fix, remove unused lambda capture.
134 * NetworkProcess/NetworkResourceLoader.cpp:
135 (WebKit::NetworkResourceLoader::retrieveCacheEntry):
137 2018-03-30 Wenson Hsieh <wenson_hsieh@apple.com>
139 [Extra zoom mode] Adopt list view controller UI for numeric input types
140 https://bugs.webkit.org/show_bug.cgi?id=184184
141 <rdar://problem/37238916>
143 Reviewed by Timothy Hatcher.
145 Remove existing logic for presenting a number pad view controller, since number pads will now be handled as a
146 special case of general text form controls in extra zoom mode.
148 * UIProcess/ios/WKContentViewInteraction.h:
149 * UIProcess/ios/WKContentViewInteraction.mm:
150 (-[WKContentView presentViewControllerForCurrentAssistedNode]):
151 (-[WKContentView dismissAllInputViewControllers]):
152 (-[WKContentView _wheelChangedWithEvent:]):
154 2018-03-30 Dan Bernstein <mitz@apple.com>
156 Update availability annotations to match the macOS 10.13.4 and iOS 11.3 GM SDKs
157 https://bugs.webkit.org/show_bug.cgi?id=184173
159 Reviewed by Alex Christensen.
161 Changed WK_MAC_TBA and WK_IOS_TBA to 10.13.4 and 11.3, respectively, in all declarations that
162 appear in the GM SDKs.
164 * Shared/API/Cocoa/_WKNSWindowExtras.h:
165 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
166 * UIProcess/API/Cocoa/WKOpenPanelParameters.h:
167 * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:
168 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
169 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
170 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
171 * UIProcess/API/Cocoa/WKViewPrivate.h:
172 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
173 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
174 * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
175 * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
176 * UIProcess/API/Cocoa/_WKApplicationManifest.h:
177 * UIProcess/API/Cocoa/_WKAttachment.h:
178 * UIProcess/API/Cocoa/_WKAutomationSession.h:
179 * UIProcess/API/Cocoa/_WKAutomationSessionConfiguration.h:
180 * UIProcess/API/Cocoa/_WKDownload.h:
181 * UIProcess/API/Cocoa/_WKDownloadDelegate.h:
182 * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
183 * UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
184 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
185 * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
186 * UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
187 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
188 * UIProcess/API/Cocoa/_WKWebsitePolicies.h:
189 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
190 * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
192 2018-03-30 Youenn Fablet <youenn@apple.com>
194 NetworkLoadChecker should upgrade redirects if needed
195 https://bugs.webkit.org/show_bug.cgi?id=184098
197 Reviewed by Chris Dumez.
199 In case of redirections, upgrade URL according CSP.
201 * NetworkProcess/NetworkLoadChecker.cpp:
202 (WebKit::NetworkLoadChecker::checkRequest):
203 (WebKit::NetworkLoadChecker::contentSecurityPolicy const):
205 2018-03-30 JF Bastien <jfbastien@apple.com>
207 Update messages.py codegen for String, fix tests
208 https://bugs.webkit.org/show_bug.cgi?id=184179
209 <rdar://problem/39041352>
211 Reviewed by Mark Lam.
213 I updated some of the code in
214 https://trac.webkit.org/changeset/230097 and auto-magically used a
215 script to update copyright headers... and that broke the tests
216 which checked for a particular date. Update all of the headers.
218 Part of this change updates the code generated by messages.py
220 * Scripts/webkit/LegacyMessageReceiver-expected.cpp:
221 * Scripts/webkit/MessageReceiver-expected.cpp:
222 * Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
223 * Scripts/webkit/MessagesSuperclass-expected.h:
224 * Scripts/webkit/messages.py:
225 * Scripts/webkit/messages_unittest.py:
226 (GeneratedFileContentsTest.assertGeneratedFileContentsEqual):
227 generate a better error message
229 2018-03-29 JF Bastien <jfbastien@apple.com>
231 Use Forward.h instead of forward-declaring WTF::String
232 https://bugs.webkit.org/show_bug.cgi?id=184172
233 <rdar://problem/39026146>
235 Reviewed by Yusuke Suzuki.
237 As part of #184164 I'm changing WTF::String, and the forward
238 declarations are just wrong because I'm making it templated. We
239 should use Forward.h anyways, so do that instead.
241 * Scripts/webkit/LegacyMessages-expected.h:
242 * Scripts/webkit/Messages-expected.h:
243 * Scripts/webkit/MessagesSuperclass-expected.h:
244 * UIProcess/WebOpenPanelResultListenerProxy.h:
246 2018-03-29 Brian Burg <bburg@apple.com>
248 Web Automation: clipToViewport is ignored for element screenshots
249 https://bugs.webkit.org/show_bug.cgi?id=184158
250 <rdar://problem/39014307>
252 Reviewed by Timothy Hatcher.
254 In ยง19.2 Take Element Screenshot, step 5.2 says that we should clip
255 the element screenshot rect with the visible viewport rect. We don't
256 do that right now even though we pass over clipToViewport.
258 * WebProcess/Automation/WebAutomationSessionProxy.cpp:
259 (WebKit::snapshotRectForScreenshot):
260 Clip the rect to viewport if needed.
262 (WebKit::WebAutomationSessionProxy::takeScreenshot):
263 This scrollIntoView is misplaced; by this point we have already done
264 the math to figure out the screenshot rect. Move it before computing the rect.
266 2018-03-29 Brent Fulgham <bfulgham@apple.com>
268 REGRESSION(r230035): ASSERT(MACH_PORT_VALID(m_sendPort)) hit in IPC::Connection::initializeSendSource()
269 https://bugs.webkit.org/show_bug.cgi?id=184122
270 <rdar://problem/39003606>
272 Reviewed by Chris Dumez.
274 One of the new assertions added in r230035 begin firing while running tests locally. This was happening
275 because the WebInspector was attempting to open a new connection to a web process that had already
276 terminated its mach port connection (a dead port).
278 We should avoid opening new connections when the port we were given is already dead.
280 * Platform/IPC/Connection.h:
281 (IPC::Connection::identifierIsValid): Added.
282 * Platform/IPC/mac/ConnectionMac.mm:
283 (IPC::Connection::platformInitialize): Do not perform initialization on a dead (or null) port.
284 (IPC::Connection::open): Add some assertions that ports are in a valid state.
285 (IPC::Connection::sendOutgoingMessage): Assert that the send port is not dead.
286 (IPC::Connection::receiveSourceEventHandler): Assert that the receive port is valid.
287 * UIProcess/ChildProcessProxy.cpp:
288 (WebKit::ChildProcessProxy::didFinishLaunching): Treat a dead port as a signal that the
289 child process failed to launch.
290 * UIProcess/Network/NetworkProcessProxy.cpp:
291 (WebKit::NetworkProcessProxy::didFinishLaunching): Ditto.
292 * UIProcess/Plugins/PluginProcessProxy.cpp:
293 (WebKit::PluginProcessProxy::didFinishLaunching): Ditto.
294 * UIProcess/Storage/StorageProcessProxy.cpp:
295 (WebKit::StorageProcessProxy::didFinishLaunching): Ditto.
296 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
297 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Ditto.
298 * WebProcess/WebPage/WebInspectorUI.cpp:
299 (WebKit::WebInspectorUI::establishConnection): Ditto.
300 * WebProcess/WebProcess.cpp:
301 (WebKit::WebProcess::ensureNetworkProcessConnection): Ditto.
302 (WebKit::WebProcess::ensureWebToStorageProcessConnection): Ditto.
304 2018-03-29 Youenn Fablet <youenn@apple.com>
306 Synchronize SecurityOrigin related scheme registries with NetworkProcess
307 https://bugs.webkit.org/show_bug.cgi?id=184140
309 Reviewed by Chris Dumez.
311 Add syncing of scheme registries that are used by SecurityOrigin and ContentSecurityPolicy
312 so that we can properly use them in NetworkProcess as we do in WebProcess.
313 The registries that are not synced are:
314 - URLSchemeAsEmptyDocument
315 - URLSchemeDomainRelaxationForbidden
316 - URLSchemeAsCachePartitioned
317 - URLSchemeAsCanDisplayOnlyIfCanRequest
319 * NetworkProcess/NetworkProcess.cpp:
320 (WebKit::NetworkProcess::initializeNetworkProcess):
321 (WebKit::NetworkProcess::registerURLSchemeAsSecure const):
322 (WebKit::NetworkProcess::registerURLSchemeAsBypassingContentSecurityPolicy const):
323 (WebKit::NetworkProcess::registerURLSchemeAsLocal const):
324 (WebKit::NetworkProcess::registerURLSchemeAsNoAccess const):
325 (WebKit::NetworkProcess::registerURLSchemeAsDisplayIsolated const):
326 (WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const):
327 (WebKit::NetworkProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const):
328 * NetworkProcess/NetworkProcess.h:
329 * NetworkProcess/NetworkProcess.messages.in:
330 * NetworkProcess/NetworkProcessCreationParameters.cpp:
331 (WebKit::NetworkProcessCreationParameters::encode const):
332 (WebKit::NetworkProcessCreationParameters::decode):
333 * NetworkProcess/NetworkProcessCreationParameters.h:
334 * UIProcess/WebProcessPool.cpp:
335 (WebKit::WebProcessPool::ensureNetworkProcess):
336 (WebKit::WebProcessPool::registerURLSchemeAsSecure):
337 (WebKit::WebProcessPool::registerURLSchemeAsBypassingContentSecurityPolicy):
338 (WebKit::WebProcessPool::registerURLSchemeAsLocal):
339 (WebKit::WebProcessPool::registerURLSchemeAsNoAccess):
340 (WebKit::WebProcessPool::registerURLSchemeAsDisplayIsolated):
341 (WebKit::WebProcessPool::registerURLSchemeAsCORSEnabled):
342 (WebKit::WebProcessPool::registerURLSchemeAsCanDisplayOnlyIfCanRequest):
344 2018-03-29 Brent Fulgham <bfulgham@apple.com>
346 REGRESSION(r229480): ERROR: Unhandled web process message 'WebCookieManager:SetHTTPCookieAcceptPolicy'
347 https://bugs.webkit.org/show_bug.cgi?id=184124
348 <rdar://problem/38998971>
350 Reviewed by Chris Dumez.
352 Cookie accept policy messages were still being sent to the WebContent process after
353 I removed cookie access in r229480. The WebContent process no longer recognizes these
354 messages, and generates logging to that effect.
356 This patch stops sending these unnecessary messages to the WebContent process. Only the
357 Network process needs to receive this information.
359 * UIProcess/WebCookieManagerProxy.cpp:
360 (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
362 2018-03-29 Carlos Eduardo Ramalho <cadubentzen@gmail.com>
364 [WPE] Floating point exception in WebEventFactory::createWebWheelEvent
365 https://bugs.webkit.org/show_bug.cgi?id=184037
367 Reviewed by ลฝan Doberลกek.
369 * Shared/wpe/WebEventFactory.cpp:
370 (WebKit::WebEventFactory::createWebWheelEvent): Use std::copysign() to avoid division by 0.
372 2018-03-28 Zalan Bujtas <zalan@apple.com>
374 Make it possible to override the screen size
375 https://bugs.webkit.org/show_bug.cgi?id=184111
376 <rdar://problem/38972181>
378 Reviewed by Tim Horton.
380 * Shared/WebPageCreationParameters.cpp:
381 (WebKit::WebPageCreationParameters::encode const):
382 (WebKit::WebPageCreationParameters::decode):
383 * Shared/WebPageCreationParameters.h:
384 * UIProcess/WebPageProxy.cpp:
385 (WebKit::WebPageProxy::creationParameters):
386 * UIProcess/WebPageProxy.h:
387 * UIProcess/ios/WebPageProxyIOS.mm:
388 (WebKit::WebPageProxy::overrideScreenSize):
389 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
390 (WebKit::WebChromeClient::overrideScreenSize const):
391 * WebProcess/WebCoreSupport/WebChromeClient.h:
392 * WebProcess/WebPage/WebPage.cpp:
393 * WebProcess/WebPage/WebPage.h:
394 * WebProcess/WebPage/ios/WebPageIOS.mm:
395 (WebKit::WebPage::overrideScreenSize const):
397 2018-03-28 Chris Dumez <cdumez@apple.com>
399 Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
400 https://bugs.webkit.org/show_bug.cgi?id=183962
401 <rdar://problem/38817833>
403 Reviewed by Brady Eidson.
405 Swap WebProcess on for the initial navigation in a new Window that was opened
406 via window.open(), when the new URL is cross-origin compared to the opener's
407 origin. For now, we only swap process if 'noopener' property is set when calling
408 window.open(). This is because we do not support the remote DOMWindows yet.
410 * Shared/NavigationActionData.cpp:
411 (WebKit::NavigationActionData::encode const):
412 (WebKit::NavigationActionData::decode):
413 * Shared/NavigationActionData.h:
414 * UIProcess/API/APINavigation.h:
415 (API::Navigation::setIsCrossOriginWindowOpenNavigation):
416 (API::Navigation::isCrossOriginWindowOpenNavigation const):
417 (API::Navigation::setOpener):
418 (API::Navigation::opener const):
419 * UIProcess/WebPageProxy.cpp:
420 (WebKit::WebPageProxy::receivedPolicyDecision):
421 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
422 * UIProcess/WebProcessPool.cpp:
423 (WebKit::WebProcessPool::processForNavigation):
424 * UIProcess/WebProcessPool.h:
425 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
426 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
428 2018-03-28 Per Arne Vollan <pvollan@apple.com>
430 Adopt WEBPROCESS_WINDOWSERVER_BLOCKING compiler guard in WebProcess.
431 https://bugs.webkit.org/show_bug.cgi?id=183959
432 <rdar://problem/38965719>
434 Reviewed by Brent Fulgham.
436 Use the compile guard to guard the call to CGSSetDenyWindowServerConnections.
438 * WebProcess/WebProcess.cpp:
439 (WebKit::WebProcess::initializeProcess):
441 2018-03-28 Brent Fulgham <bfulgham@apple.com>
443 Unreviewed build fix after r230045.
445 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Add missing include (breaks iOS).
447 2018-03-28 Brent Fulgham <bfulgham@apple.com>
449 Protect against invalid mach ports returned by mach_port_request_notification
450 https://bugs.webkit.org/show_bug.cgi?id=184106
451 <rdar://problem/37865316>
453 Reviewed by Chris Dumez.
455 * Platform/IPC/Connection.h:
456 (IPC::Connection::Identifier::Identifier): Use default initializer syntax.
457 * Platform/IPC/mac/ConnectionMac.mm:
458 (IPC::Connection::open): Drive-by-fix: Include formatted mach error message in logging.
459 (IPC::Connection::receiveSourceEventHandler): Check return value from 'mach_port_request_notification'
460 and clean up if it experienced an error.
461 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
462 (WebKit::ProcessLauncher::launchProcess): Ditto.
464 2018-03-28 Dean Jackson <dino@apple.com>
466 WKWebViewContentProvider shouldn't be a UIScrollViewDelegate
467 https://bugs.webkit.org/show_bug.cgi?id=184107
468 <rdar://problem/38967492>
470 Reviewed by Tim Horton.
472 There is no need for this class to be a UIScrollViewDelegate. Instead
473 the protocol should have an optional method that is effectively
476 * UIProcess/API/Cocoa/WKWebView.mm:
477 (-[WKWebView scrollViewDidScroll:]): Call web_scrollViewDidScroll
479 * UIProcess/Cocoa/WKWebViewContentProvider.h: Remove UIScrollViewDelegate
480 and add an optional web_scrollViewDidScroll.
481 * UIProcess/ios/WKPDFView.mm:
482 (-[WKPDFView web_scrollViewDidScroll:]): Renamed from scrollViewDidScroll.
483 (-[WKPDFView scrollViewDidScroll:]): Deleted.
484 * UIProcess/ios/WKSystemPreviewView.mm:
485 (-[WKSystemPreviewView scrollViewDidScroll:]): Deleted.
487 2018-03-28 Wenson Hsieh <wenson_hsieh@apple.com>
489 [Extra zoom mode] Make boosted text autosizing values switchable at runtime
490 https://bugs.webkit.org/show_bug.cgi?id=184092
491 <rdar://problem/38939917>
493 Reviewed by Tim Horton.
495 Add a private web view preference to switch between normal and boosted text autosizing mode. By default, we use
496 normal text autosizing values.
498 * Shared/WebPreferences.yaml:
499 * UIProcess/API/Cocoa/WKPreferences.mm:
500 (-[WKPreferences _setShouldEnableTextAutosizingBoost:]):
501 (-[WKPreferences _shouldEnableTextAutosizingBoost]):
502 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
504 2018-03-28 Brent Fulgham <bfulgham@apple.com>
506 Avoid uninitialized mach ports
507 https://bugs.webkit.org/show_bug.cgi?id=184090
508 <rdar://problem/37261129>
510 Reviewed by Chris Dumez.
512 It is possible for mach_port_allocate to return an error, but we rarely check its return value. The value
513 of the argument passed to mach_port_allocate is not guaranteed to be valid when it returns an error, so
514 there is a potential for us to try to use invalid ports.
516 We should always check return values, and ensure that the mach port variables we seek to initialize are
517 kept in a valid state.
519 Reviewed by Chris Dumez.
521 * NetworkProcess/NetworkProcess.cpp:
522 (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): Initialize new port to a safe default and
523 check the return state of the allocation function.
524 * Platform/IPC/Connection.h:
525 * Platform/IPC/mac/ConnectionMac.mm:
526 (IPC::Connection::open): Ditto.
527 (IPC::Connection::initializeSendSource): Ditto.
528 (IPC::readFromMachPort): Ditto.
529 (IPC::Connection::receiveSourceEventHandler): Ditto.
530 * Platform/SharedMemory.h:
531 * Platform/cocoa/SharedMemoryCocoa.cpp:
532 (WebKit::makeMemoryEntry): Ditto.
533 * Platform/mac/MachUtilities.cpp:
534 (setMachPortQueueLength): Ditto.
535 (setMachExceptionPort): Ditto.
536 * PluginProcess/PluginProcess.cpp:
537 (WebKit::PluginProcess::createWebProcessConnection): Ditto.
538 * StorageProcess/StorageProcess.cpp:
539 (WebKit::StorageProcess::createStorageToWebProcessConnection): Ditto.
540 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
541 (WebKit::ProcessLauncher::launchProcess): Ditto.
542 * WebProcess/WebPage/WebInspector.cpp:
543 (WebKit::WebInspector::openFrontendConnection): Ditto.
545 2018-03-28 Michael Catanzaro <mcatanzaro@igalia.com>
547 Fails to build webkitgtk+ after git-svn-id: http://svn.webkit.org/repository/webkit/trunk@229877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
548 https://bugs.webkit.org/show_bug.cgi?id=184081
550 Unreviewed, switch to use UNUSED_PARAM()
552 * UIProcess/WebPageProxy.cpp:
553 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
555 2018-03-28 Tim Horton <timothy_horton@apple.com>
557 Make use of HAVE(CORE_ANIMATION_RENDER_SERVER) in more places
558 https://bugs.webkit.org/show_bug.cgi?id=184072
559 <rdar://problem/38946530>
561 Reviewed by Dan Bernstein.
563 * Platform/mac/LayerHostingContext.mm:
564 (WebKit::LayerHostingContext::createForExternalHostingProcess):
565 * UIProcess/mac/ViewSnapshotStore.h:
566 * UIProcess/mac/ViewSnapshotStore.mm:
567 (WebKit::ViewSnapshot::clearImage):
569 2018-03-28 Wenson Hsieh <wenson_hsieh@apple.com>
571 Revert an unnecessary workaround when zooming focused form controls
572 https://bugs.webkit.org/show_bug.cgi?id=184067
573 <rdar://problem/38805254>
575 Reviewed by Tim Horton.
577 Reverts an unintended change introduced in r227984.
579 * UIProcess/ios/WKContentViewInteraction.mm:
580 (-[WKContentView _displayFormNodeInputView]):
582 2018-03-28 Miguel Gomez <magomez@igalia.com>
584 [GTK][WPE] Remove UpdateAtlas
585 https://bugs.webkit.org/show_bug.cgi?id=184042
587 Reviewed by ลฝan Doberลกek.
589 Remove all the code related to UpdateAtlas handling.
591 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
592 (WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded):
593 (WebKit::CoordinatedGraphicsScene::commitSceneState):
594 (WebKit::CoordinatedGraphicsScene::purgeGLResources):
595 (WebKit::CoordinatedGraphicsScene::syncUpdateAtlases): Deleted.
596 (WebKit::CoordinatedGraphicsScene::createUpdateAtlas): Deleted.
597 (WebKit::CoordinatedGraphicsScene::removeUpdateAtlas): Deleted.
598 (WebKit::CoordinatedGraphicsScene::releaseUpdateAtlases): Deleted.
599 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
600 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
601 (WebKit::ThreadedCompositor::renderLayerTree):
602 (WebKit::ThreadedCompositor::releaseUpdateAtlases): Deleted.
603 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
604 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
605 (WebKit::WebChromeClient::delegatedScrollRequested):
606 (WebKit::WebChromeClient::resetUpdateAtlasForTesting): Deleted.
607 * WebProcess/WebCoreSupport/WebChromeClient.h:
608 * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
609 (WebKit::AcceleratedDrawingArea::resetUpdateAtlasForTesting): Deleted.
610 * WebProcess/WebPage/AcceleratedDrawingArea.h:
611 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
612 (WebKit::CompositingCoordinator::CompositingCoordinator):
613 (WebKit::CompositingCoordinator::flushPendingLayerChanges):
614 (WebKit::CompositingCoordinator::clearPendingStateChanges):
615 (WebKit::CompositingCoordinator::renderNextFrame):
616 (WebKit::CompositingCoordinator::purgeBackingStores):
617 (WebKit::CompositingCoordinator::createUpdateAtlas): Deleted.
618 (WebKit::CompositingCoordinator::removeUpdateAtlas): Deleted.
619 (WebKit::CompositingCoordinator::getCoordinatedBuffer): Deleted.
621 (WebKit::CompositingCoordinator::scheduleReleaseInactiveAtlases): Deleted.
622 (WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired): Deleted.
623 (WebKit::CompositingCoordinator::releaseAtlases): Deleted.
624 (WebKit::CompositingCoordinator::clearUpdateAtlases): Deleted.
625 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
626 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
627 (WebKit::CoordinatedLayerTreeHost::clearUpdateAtlases): Deleted.
628 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
629 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
630 (WebKit::ThreadedCoordinatedLayerTreeHost::releaseUpdateAtlases): Deleted.
631 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
632 * WebProcess/WebPage/DrawingArea.h:
633 * WebProcess/WebPage/LayerTreeHost.h:
634 (WebKit::LayerTreeHost::setIsDiscardable):
636 2018-03-28 Carlos Garcia Campos <cgarcia@igalia.com>
638 REGRESSION(r229998): WebDriver: MiniBrowser is crashing in a lot of tests after r229998
639 https://bugs.webkit.org/show_bug.cgi?id=184075
641 Reviewed by ลฝan Doberลกek.
643 This is because we are using a value after it has been moved.
645 * UIProcess/Automation/WebAutomationSession.cpp:
646 (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Save a reference to page in a local variable
647 before using it when it's also going to be moved in the lambda capture.
649 2018-03-27 Michael Catanzaro <mcatanzaro@igalia.com>
651 Unreviewed, fix typo in variable name
653 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
654 (webkitWebViewBaseCrossingNotifyEvent):
656 2018-03-27 Per Arne Vollan <pvollan@apple.com>
658 The layout test fast/canvas/webgl/read-pixels-test.html is timing out.
659 https://bugs.webkit.org/show_bug.cgi?id=183923
660 <rdar://problem/38756869>
662 Reviewed by Brent Fulgham.
664 Send OpenGL display mask to the WebContent process when the display ID is changing.
666 * UIProcess/WebPageProxy.cpp:
667 (WebKit::WebPageProxy::windowScreenDidChange):
668 * WebProcess/WebPage/WebPage.h:
669 * WebProcess/WebPage/WebPage.messages.in:
670 * WebProcess/WebPage/mac/WebPageMac.mm:
671 (WebKit::WebPage::openGLDisplayMaskChanged):
673 2018-03-27 Youenn Fablet <youenn@apple.com>
675 Move request checking out of PingLoad for future reuse in NetworkLoad
676 https://bugs.webkit.org/show_bug.cgi?id=183865
678 Reviewed by Chris Dumez.
680 Introduce NetworkLoadChecker as a way to validate requests before sending them in the network process.
681 Validation encompasses: CORS checks, CSP and Content Extensions on both main request and redirected requests if any.
683 Make PingLoad use NetworkLoadChecker. Future patch should make NetworkLoad to use it as well whenever needed.
685 Make NetworkCORSPreflightChecker takes a CompletionHandler instead of a Function.
686 Ensure this callback is called even if preflight is not completed by returning a Canceled error.
688 * NetworkProcess/NetworkCORSPreflightChecker.cpp:
689 (WebKit::NetworkCORSPreflightChecker::~NetworkCORSPreflightChecker):
690 (WebKit::NetworkCORSPreflightChecker::returnResult):
691 (WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):
692 (WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
693 (WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
694 * NetworkProcess/NetworkCORSPreflightChecker.h:
695 * NetworkProcess/NetworkLoadChecker.cpp: Added.
696 (WebKit::NetworkLoadChecker::NetworkLoadChecker):
697 (WebKit::NetworkLoadChecker::check):
698 (WebKit::NetworkLoadChecker::checkRedirection):
699 (WebKit::NetworkLoadChecker::returnError):
700 (WebKit::NetworkLoadChecker::checkRequest):
701 (WebKit::NetworkLoadChecker::checkCORSRequest):
702 (WebKit::NetworkLoadChecker::checkCORSRedirectedRequest):
703 (WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
704 (WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const):
705 (WebKit::NetworkLoadChecker::contentSecurityPolicy const):
706 (WebKit::NetworkLoadChecker::contentExtensionsBackend):
707 (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
708 * NetworkProcess/NetworkLoadChecker.h: Added.
709 (WebKit::NetworkLoadChecker::setCSPResponseHeaders):
710 (WebKit::NetworkLoadChecker::setContentExtensionRuleLists):
711 (WebKit::NetworkLoadChecker::url const):
712 (WebKit::NetworkLoadChecker::storedCredentialsPolicy const):
713 (WebKit::NetworkLoadChecker::isChecking const):
714 (WebKit::NetworkLoadChecker::isRedirected const):
715 * NetworkProcess/PingLoad.cpp:
716 (WebKit::PingLoad::PingLoad):
717 (WebKit::PingLoad::~PingLoad):
718 (WebKit::PingLoad::willPerformHTTPRedirection):
719 (WebKit::PingLoad::didReceiveChallenge):
720 (WebKit::PingLoad::wasBlocked):
721 (WebKit::PingLoad::cannotShowURL):
722 (WebKit::PingLoad::timeoutTimerFired):
723 (WebKit::PingLoad::currentURL const):
724 * NetworkProcess/PingLoad.h:
725 * WebKit.xcodeproj/project.pbxproj:
727 2018-03-27 Jiewen Tan <jiewen_tan@apple.com>
729 [WebAuthN] Implement authenticatorGetAssertion
730 https://bugs.webkit.org/show_bug.cgi?id=183881
731 <rdar://problem/37258628>
733 Reviewed by Brent Fulgham.
735 * Shared/WebPreferences.yaml:
736 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
737 (WebKit::WebCredentialsMessengerProxy::makeCredential):
738 (WebKit::WebCredentialsMessengerProxy::getAssertion):
739 (WebKit::WebCredentialsMessengerProxy::getAssertionReply):
740 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
741 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
742 * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
743 (WebKit::WebCredentialsMessenger::getAssertion):
744 (WebKit::WebCredentialsMessenger::getAssertionReply):
745 * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:
747 2018-03-27 Chris Dumez <cdumez@apple.com>
749 Avoid constructing SecurityOrigin objects from non-main threads
750 https://bugs.webkit.org/show_bug.cgi?id=184024
752 Reviewed by Youenn Fablet.
754 Avoid constructing SecurityOrigin objects from non-main threads as much as possible.
756 * WebProcess/Storage/WebSWClientConnection.cpp:
757 (WebKit::WebSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
758 (WebKit::WebSWClientConnection::matchRegistration):
759 (WebKit::WebSWClientConnection::getRegistrations):
760 * WebProcess/Storage/WebSWClientConnection.h:
761 * WebProcess/Storage/WebSWOriginTable.cpp:
762 (WebKit::WebSWOriginTable::contains const):
763 * WebProcess/Storage/WebSWOriginTable.h:
765 2018-03-27 Chris Dumez <cdumez@apple.com>
767 Move online state detection from the WebProcess to the NetworkProcess
768 https://bugs.webkit.org/show_bug.cgi?id=183989
769 <rdar://problem/37093299>
771 Reviewed by Youenn Fablet.
773 Move online state detection from the WebProcess to the NetworkProcess. This avoid executing the same (expensive) code in
774 EACH web process whenever a network interface's state changes. Now, the Network Process monitors network interfaces
775 and determines the online state whenever an interface's state changes. If the onLine state changes, it notifies all
776 its connected WebProcesses via IPC.
778 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
779 (WebKit::NetworkConnectionToWebProcess::setOnLineState):
780 * NetworkProcess/NetworkConnectionToWebProcess.h:
781 * NetworkProcess/NetworkProcess.cpp:
782 (WebKit::NetworkProcess::NetworkProcess):
783 (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
784 * WebProcess/Network/NetworkProcessConnection.cpp:
785 (WebKit::NetworkProcessConnection::setOnLineState):
786 * WebProcess/Network/NetworkProcessConnection.h:
787 * WebProcess/Network/NetworkProcessConnection.messages.in:
788 * WebProcess/Network/WebLoaderStrategy.cpp:
789 (WebKit::WebLoaderStrategy::isOnLine const):
790 (WebKit::WebLoaderStrategy::addOnlineStateChangeListener):
791 (WebKit::WebLoaderStrategy::setOnLineState):
792 * WebProcess/Network/WebLoaderStrategy.h:
794 2018-03-27 Wenson Hsieh <wenson_hsieh@apple.com>
796 [Extra zoom mode] Add support for new focused form control overlay behaviors
797 https://bugs.webkit.org/show_bug.cgi?id=184043
798 <rdar://problem/38758727>
800 Reviewed by Tim Horton.
802 See below for more details.
804 * UIProcess/ios/WKContentViewInteraction.mm:
805 (-[WKContentView _willStartScrollingOrZooming]):
806 (-[WKContentView _didEndScrollingOrZooming]):
808 Suppress focused form control navigation while the scroll view is undergoing a scroll or zoom animation (e.g.,
809 when moving from one focused form control to another).
811 (-[WKContentView textInputController:didCommitText:withSuggestion:]):
813 When dismissing an input view controller, allow focused form control navigation only after updating assisted
814 node information to ensure that focus rects aren't stale as the user begins to navigate between forms.
816 (-[WKContentView rectForFocusedFormControlController:inCoordinateSpace:]):
817 (-[WKContentView nextRectForFocusedFormControlController:inCoordinateSpace:]):
818 (-[WKContentView previousRectForFocusedFormControlController:inCoordinateSpace:]):
819 (-[WKContentView scrollViewForFocusedFormControlController:]):
820 (-[WKContentView highlightedRectForFocusedFormControlController:inCoordinateSpace:]): Deleted.
822 Implement some new focused form overlay delegate hooks to vend the scroll view, as well as the rects of next and
823 previous focusable form controls.
825 2018-03-27 Brent Fulgham <bfulgham@apple.com>
827 Further refine cookie read/write logging
828 https://bugs.webkit.org/show_bug.cgi?id=184044
829 <rdar://problem/38915610>
831 Reviewed by Chris Dumez.
833 Cookie logging was passing the partition, rather than the first party, when logging, which
834 prevented logging in cases where partitioning or blocking was active. This patch corrects
835 these calls so that logging is generated in these cases, too.
837 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
838 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): Call log routines if needed.
839 (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Ditto.
840 * NetworkProcess/NetworkResourceLoader.cpp:
841 (WebKit::escapeIDForJSON): Make available to use in multiple functions.
842 (WebKit::NetworkResourceLoader::logCookieInformation const): Revise to use shared
843 convenience functions.
844 (WebKit::logBlockedCookieInformation): Added.
845 (WebKit::logCookieInformationInternal): Added.
846 (WebKit::NetworkResourceLoader::logCookieInformation): Revise to use shared
847 convenience functions.
848 * NetworkProcess/NetworkResourceLoader.h:
850 2018-03-27 Brian Burg <bburg@apple.com>
852 Web Automation: support enter/exit fullscreen and hide/restore window operations
853 https://bugs.webkit.org/show_bug.cgi?id=182837
854 <rdar://problem/37580732>
856 Reviewed by Tim Horton.
858 The W3C specification is more explicit about when to exit fullscreen and
859 restore the window for a browsing context. So, WebKit needs to have support
860 for performing these operations on behalf of a driver.
862 Based on prototyping, it is sufficient to use a JavaScript atom to enter
863 fullscreen mode. This is included in the patch as EnterFullscreen.js and
864 can be used to implement the ยง10.7.5 Fullscreen Window command.
866 Other window operations cannot be peformed from JavaScript, so we need to
867 delegate these operations to the session client (i.e., Safari).
868 This patch adds session client callouts for restoring, minimizing, and
869 switching to a browsing context.
871 Exiting fullscreen happens implicitly (per specification) when setting a
872 window frame without an actual frame, or when switching/restoring/minimizing a window.
873 If needed, a driver can call Set Window Rect in this way to unfullscreen a context.
874 Similarly, a driver can restore a minimized window using Set Window Rect.
876 * UIProcess/API/APIAutomationSessionClient.h:
877 (API::AutomationSessionClient::requestHideWindowOfPage):
878 (API::AutomationSessionClient::requestRestoreWindowOfPage):
879 (API::AutomationSessionClient::requestSwitchToPage):
880 Add new API client methods.
882 * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
883 Add new Cocoa API delegate methods.
885 * UIProcess/Automation/Automation.json:
886 Make the switch to browsing context command asynchronous, since this functionality
887 is not always synchronous, and we prefer to use completion handlers in the delegates.
889 Add new protocol method for hiding the window of a browsing context.
890 This is expected to minimize/miniaturize a window for desktop window managers.
892 * UIProcess/Automation/WebAutomationSession.h:
893 * UIProcess/Automation/WebAutomationSession.cpp:
894 (WebKit::WebAutomationSession::switchToBrowsingContext):
895 Make this function asynchronous. Call out to the session client.
897 (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext):
898 Follow the steps in the specification to restore window and exit fullscreen.
900 (WebKit::WebAutomationSession::hideWindowOfBrowsingContext):
901 Exit fullscreen and call out to the session client.
903 (WebKit::WebAutomationSession::exitFullscreenWindowForPage):
904 This is a little strange. Because there is no async API for exiting fullscreen
905 from C++ code, we hook into willEnterFullScreen and didExitFullScreen and send
906 out the response if the page exited fullscreen after we requested it to do so.
907 Because the W3C specification mandates that drivers only process one command at
908 a time, there will only ever be one callback installed by this method at a time.
910 (WebKit::WebAutomationSession::restoreWindowForPage):
911 (WebKit::WebAutomationSession::hideWindowForPage):
912 Call out to the session client.
914 (WebKit::WebAutomationSession::didEnterFullScreenForPage):
915 (WebKit::WebAutomationSession::didExitFullScreenForPage):
916 Add methods to be called by instrumentation hooks in WebFullScreenManagerProxy.
918 * UIProcess/Automation/atoms/EnterFullscreen.js: Added.
921 * UIProcess/Cocoa/AutomationSessionClient.h:
922 * UIProcess/Cocoa/AutomationSessionClient.mm:
923 (WebKit::AutomationSessionClient::AutomationSessionClient):
924 (WebKit::AutomationSessionClient::requestSwitchToPage):
925 (WebKit::AutomationSessionClient::requestHideWindowOfPage):
926 (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
927 (WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
928 Add boilerplate to convert C++ API client to Objective-C delegate methods.
930 * UIProcess/WebFullScreenManagerProxy.cpp:
931 (WebKit::WebFullScreenManagerProxy::didEnterFullScreen):
932 (WebKit::WebFullScreenManagerProxy::didExitFullScreen):
933 Notify the automation session if the page is under automation and
934 enters or exits fullscreen.
936 * WebKit.xcodeproj/project.pbxproj:
937 Add EnterFullscreen.js to the list of WebDriver atoms. These are copied
938 as WebKit2 private headers and used by driver implementations.
940 2018-03-27 Eric Carlson <eric.carlson@apple.com>
942 Make AVFoundationEnabled preference available on iOS
943 https://bugs.webkit.org/show_bug.cgi?id=183876
944 <rdar://problem/38726459>
946 Reviewed by Youenn Fablet.
948 * Shared/WebPreferences.yaml: Set AVFoundationEnabled with DEFAULT_AVFOUNDATION_ENABLED.
949 * Shared/WebPreferencesDefaultValues.h:
951 * UIProcess/API/Cocoa/WKPreferences.mm:
952 (-[WKPreferences _setAVFoundationEnabled:]): Enable for iOS.
953 (-[WKPreferences _avFoundationEnabled]): Ditto.
954 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
956 2018-03-26 Tim Horton <timothy_horton@apple.com>
958 Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKit
959 https://bugs.webkit.org/show_bug.cgi?id=184030
960 <rdar://problem/38895281>
962 Reviewed by Dan Bernstein.
964 * Configurations/Base.xcconfig:
965 * Configurations/BaseTarget.xcconfig:
966 * Configurations/WebKit.xcconfig:
968 2018-03-26 Tim Horton <timothy_horton@apple.com>
970 Add and adopt HAVE(CORE_ANIMATION_RENDER_SERVER)
971 https://bugs.webkit.org/show_bug.cgi?id=184026
972 <rdar://problem/38883321>
974 Reviewed by Sam Weinig.
976 * UIProcess/API/Cocoa/WKWebView.mm:
977 (-[WKWebView _takeViewSnapshot]):
978 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
980 2018-03-26 Wenson Hsieh <wenson_hsieh@apple.com>
982 [Extra zoom mode] Refactor input view controller presentation and dismissal helpers
983 https://bugs.webkit.org/show_bug.cgi?id=184020
984 Work towards <rdar://problem/38758727>
986 Reviewed by Tim Horton.
988 We currently have separate presentation and dismissal helpers for each type of view controller corresponding to
989 a focused element type. This is excessive, considering that all of these helpers are only invoked from one place
990 (either -presentViewControllerForCurrentAssistedNode or -dismissAllInputViewControllers), with the exception of
991 the focused form control overlay.
993 This refactoring allows us to then adjust the timing of first responder restoration logic, such that the focused
994 form control view controller can receive forwarded events from the web view. See below for more detail.
996 * UIProcess/ios/WKContentViewInteraction.mm:
997 (-[WKContentView presentFocusedFormControlViewController:]):
998 (-[WKContentView dismissFocusedFormControlViewController:]):
1000 Remove logic to restore the web view as first responder.
1002 (-[WKContentView presentViewControllerForCurrentAssistedNode]):
1003 (-[WKContentView dismissAllInputViewControllers]):
1005 Restore first responder after dismissing a view controller that was presented when focusing a form control, only
1006 if the web view was first responder before presentation.
1008 (-[WKContentView presentDatePickerViewController:]): Deleted.
1009 (-[WKContentView dismissDatePickerViewController:]): Deleted.
1010 (-[WKContentView presentTimePickerViewController:]): Deleted.
1011 (-[WKContentView dismissTimePickerViewController:]): Deleted.
1012 (-[WKContentView presentSelectMenuViewController:]): Deleted.
1013 (-[WKContentView dismissSelectMenuViewController:]): Deleted.
1014 (-[WKContentView dismissNumberPadViewController:]): Deleted.
1015 (-[WKContentView presentNumberPadViewController:]): Deleted.
1016 (-[WKContentView presentTextInputViewController:]): Deleted.
1017 (-[WKContentView dismissTextInputViewController:]): Deleted.
1019 2018-03-06 Brian Burg <bburg@apple.com>
1021 Web Automation: provide a way to ask clients for a new tab or window
1022 https://bugs.webkit.org/show_bug.cgi?id=183381
1023 <rdar://problem/38167301>
1025 Reviewed by Timothy Hatcher.
1027 Add support for specifying browsing context options when requesting
1028 a new browsing context from the automation session client/delegate.
1029 This is currently just used for specifying tab vs window, but could
1030 also be used for things like toggling certain browser chrome or features.
1032 There is no guarantee that the client has a notion of tabs vs windows,
1033 so this option is purely advisory and should not cause the command to
1034 fail if it cannot be honored.
1036 This behavior caused by specifying this option is client-specific, so no
1037 new tests are included in WebKit for this change.
1039 * UIProcess/API/APIAutomationSessionClient.h:
1040 (API::AutomationSessionClient::didRequestNewPageWithOptions):
1041 (API::AutomationSessionClient::didRequestNewWindow): Deleted.
1042 Add options parameter.
1044 * UIProcess/API/glib/WebKitAutomationSession.cpp:
1045 Adjust to new signature. More work is needed to plumb this information
1046 to the public API for GTK/WPE and support it in WebKitGTK driver.
1048 * UIProcess/Automation/Automation.json: Add new optional parameter.
1050 * UIProcess/Automation/WebAutomationSession.h:
1051 * UIProcess/Automation/WebAutomationSession.cpp:
1052 (WebKit::WebAutomationSession::createBrowsingContext):
1053 Convert the protocol option to an API option.
1055 * UIProcess/Cocoa/AutomationSessionClient.h:
1056 * UIProcess/Cocoa/AutomationSessionClient.mm:
1057 (WebKit::AutomationSessionClient::AutomationSessionClient):
1059 (WebKit::AutomationSessionClient::didRequestNewPageWithOptions):
1060 (WebKit::AutomationSessionClient::didRequestNewWindow): Deleted.
1061 Convert the internal option to a Cocoa SPI option and pass it along.
1063 * UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
1064 Adjust delegate methods to include options. Clients need to adopt the new signature(s).
1066 2018-03-26 Wenson Hsieh <wenson_hsieh@apple.com>
1068 [Extra zoom mode] Add plumbing for next and previous focusable element rects
1069 https://bugs.webkit.org/show_bug.cgi?id=184016
1070 Work towards <rdar://problem/38758727>
1072 Reviewed by Tim Horton.
1074 When building up AssistedNodeInformation, we currently compute the element rect of the current focused element,
1075 as well as flags indicating whether or not there are next or previous focusable elements. For
1076 <rdar://problem/38758727>, we additionally send the rects of the next or previous focusable elements as well.
1078 * Shared/AssistedNodeInformation.cpp:
1079 (WebKit::AssistedNodeInformation::encode const):
1080 (WebKit::AssistedNodeInformation::decode):
1082 IPC support for nextNodeRect and previousNodeRect.
1084 * Shared/AssistedNodeInformation.h:
1085 * WebProcess/WebPage/ios/WebPageIOS.mm:
1086 (WebKit::elementRectInRootViewCoordinates):
1088 Add a helper to compute an element's rect in root view coordinates. We use this to compute the rects of the
1089 current focused element as well as those of the next and previous elements, if any.
1091 (WebKit::WebPage::getAssistedNodeInformation):
1092 (WebKit::hasAssistableElement): Deleted.
1094 Since we need the next or previous focusable element to get its rect, we don't need this helper anymore.
1096 2018-03-26 Chris Dumez <cdumez@apple.com>
1098 Use SecurityOriginData more consistently in Service Worker code
1099 https://bugs.webkit.org/show_bug.cgi?id=183969
1101 Reviewed by Darin Adler.
1103 Use SecurityOriginData more consistently in Service Worker code to avoid constructing
1104 SecurityOrigin objects unnecessarily.
1106 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1107 (WebKit::NetworkResourceLoadParameters::encode const):
1108 * Shared/API/c/WKSecurityOriginRef.cpp:
1109 (WKSecurityOriginCopyDatabaseIdentifier):
1110 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
1111 (WebKit::WebSWOriginStore::addToStore):
1112 (WebKit::WebSWOriginStore::removeFromStore):
1113 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
1114 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1115 (WebKit::WebSWServerConnection::scheduleJobInServer):
1116 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
1117 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1118 (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
1119 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1120 * StorageProcess/StorageProcess.cpp:
1121 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
1122 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
1123 (WebKit::StorageProcess::createStorageToWebProcessConnection):
1124 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
1125 (WebKit::StorageProcess::serverToContextConnectionForOrigin):
1126 (WebKit::StorageProcess::createServerToContextConnection):
1127 (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
1128 * StorageProcess/StorageProcess.h:
1129 * UIProcess/API/APIFrameInfo.cpp:
1130 (API::FrameInfo::create):
1131 * UIProcess/API/C/WKApplicationCacheManager.cpp:
1132 (WKApplicationCacheManagerDeleteEntriesForOrigin):
1133 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1134 (WKKeyValueStorageManagerDeleteEntriesForOrigin):
1135 * UIProcess/API/C/WKResourceCacheManager.cpp:
1136 (WKResourceCacheManagerClearCacheForOrigin):
1137 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1138 (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
1139 (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
1140 * UIProcess/ServiceWorkerProcessProxy.cpp:
1141 (WebKit::ServiceWorkerProcessProxy::create):
1142 (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
1143 (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
1144 * UIProcess/ServiceWorkerProcessProxy.h:
1145 * UIProcess/Storage/StorageProcessProxy.cpp:
1146 (WebKit::StorageProcessProxy::getStorageProcessConnection):
1147 * UIProcess/WebProcessPool.cpp:
1148 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1149 (WebKit::WebProcessPool::disconnectProcess):
1150 (WebKit::WebProcessPool::updateProcessAssertions):
1151 * UIProcess/WebProcessPool.h:
1152 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1153 (WebKit::WebsiteDataStore::fetchDataAndApply):
1154 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1155 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1156 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1157 (WKBundlePageCopyOriginsWithApplicationCache):
1158 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1159 (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
1160 (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
1161 * WebProcess/Storage/WebSWClientConnection.cpp:
1162 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
1163 (WebKit::WebSWClientConnection::matchRegistration):
1164 (WebKit::WebSWClientConnection::whenRegistrationReady):
1165 (WebKit::WebSWClientConnection::getRegistrations):
1166 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1167 (WebKit::WebChromeClient::exceededDatabaseQuota):
1168 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1169 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1170 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1171 * WebProcess/WebProcess.cpp:
1172 (WebKit::WebProcess::fetchWebsiteData):
1173 * WebProcess/WebStorage/StorageAreaImpl.cpp:
1174 (WebKit::StorageAreaImpl::securityOrigin const):
1175 * WebProcess/WebStorage/StorageAreaImpl.h:
1176 * WebProcess/WebStorage/StorageAreaMap.cpp:
1177 (WebKit::StorageAreaMap::StorageAreaMap):
1178 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1179 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1180 * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
1181 (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
1183 2018-03-26 Brent Fulgham <bfulgham@apple.com>
1185 Warn against cookie access in the WebContent process using ProcessPrivilege assertions
1186 https://bugs.webkit.org/show_bug.cgi?id=183911
1187 <rdar://problem/38762306>
1189 Reviewed by Youenn Fablet.
1191 Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
1192 should never call Cookie API directly. That should only happen in the Networking or
1195 * NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
1196 (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
1197 (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
1198 * NetworkProcess/NetworkProcess.cpp:
1199 (WebKit::NetworkProcess::initializeNetworkProcess):
1200 * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
1201 (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
1202 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1203 (WebKit::NetworkProcess::setSharedHTTPCookieStorage):
1204 (WebKit::NetworkProcess::syncAllCookies):
1205 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1206 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
1207 * NetworkProcess/mac/RemoteNetworkingContext.mm:
1208 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
1209 * PluginProcess/PluginProcess.cpp:
1210 (WebKit::PluginProcess::initializeProcess):
1211 * Shared/cf/CookieStorageUtilsCF.mm:
1212 (WebKit::cookieStorageFromIdentifyingData):
1213 (WebKit::identifyingDataFromCookieStorage):
1214 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1215 (WebKit::WebProcessPool::platformInitializeWebProcess):
1216 (WebKit::WebProcessPool::platformInitializeNetworkProcess):
1217 (WebKit::privateBrowsingSession):
1218 * UIProcess/WebProcessPool.cpp:
1219 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
1220 (WebKit::WebsiteDataStore::parameters):
1221 * UIProcess/mac/WebCookieManagerProxyMac.mm:
1222 (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
1223 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1224 (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1225 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1226 (WebKit::WebFrameLoaderClient::createNetworkingContext):
1227 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1228 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
1229 (WebKit::WebFrameNetworkingContext::storageSession const):
1230 * WebProcess/WebProcess.cpp:
1231 (WebKit::WebProcess::initializeProcess):
1233 2018-03-26 Alex Christensen <achristensen@webkit.org>
1235 Merge ResourceHandleClient::willCacheResponseAsync with ResourceHandleClient::willCacheResponse
1236 https://bugs.webkit.org/show_bug.cgi?id=183965
1238 Reviewed by Chris Dumez.
1240 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1241 (WebKit::WebFrameLoaderClient::willCacheResponse const):
1242 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1244 2018-03-25 Carlos Garcia Campos <cgarcia@igalia.com>
1246 [GTK][WPE] Add API to convert between DOM and JSCValue
1247 https://bugs.webkit.org/show_bug.cgi?id=183448
1249 Reviewed by Michael Catanzaro.
1251 Add methods to get a JSCValue for a WebKitDOMObject and to create a WebKitDOMNode from a JSCValue. Deprecate
1252 most of the GTK+ DOM bindings API and move the non-deprecated parts to glib dir to be exposed by WPE too.
1254 * PlatformGTK.cmake:
1255 * PlatformWPE.cmake:
1258 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
1259 * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.cpp.
1260 * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.h.
1261 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocument.cpp: Added.
1264 (WebKit::wrapDocument):
1265 (webkit_dom_document_class_init):
1266 (webkit_dom_document_init):
1267 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMDocumentPrivate.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h.
1268 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp: Added.
1271 (WebKit::wrapElement):
1272 (webkit_dom_element_class_init):
1273 (webkit_dom_element_init):
1274 (webkit_dom_element_html_input_element_is_user_edited):
1275 (webkit_dom_element_html_input_element_get_auto_filled):
1276 (webkit_dom_element_html_input_element_set_auto_filled):
1277 (webkit_dom_element_html_input_element_set_editing_value):
1278 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElementPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementPrivate.h.
1279 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNode.cpp: Added.
1280 (_WebKitDOMNodePrivate::~_WebKitDOMNodePrivate):
1284 (webkitDOMNodeConstructor):
1285 (webkitDOMNodeFinalize):
1286 (webkit_dom_node_init):
1287 (webkit_dom_node_class_init):
1288 (webkitDOMNodeSetCoreObject):
1289 (webkitDOMNodeGetCoreObject):
1290 (webkit_dom_node_for_js_value):
1291 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNodePrivate.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h.
1292 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMObject.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.cpp.
1293 (webkitDOMObjectSetProperty):
1294 (webkit_dom_object_class_init):
1295 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMPrivate.cpp: Added.
1297 * WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/DOMObjectCache.h.
1298 * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
1299 (webkit_frame_get_js_value_for_dom_object):
1300 (webkit_frame_get_js_value_for_dom_object_in_script_world):
1301 * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
1302 (webkit_web_page_class_init):
1303 (webkitWebPageCreate):
1304 (webkit_web_page_get_dom_document):
1305 * WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp:
1306 (WebKit::GObjectEventListener::handleEvent):
1307 * WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp:
1308 * WebProcess/InjectedBundle/API/gtk/DOM/GObjectXPathNSResolver.cpp:
1309 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:
1310 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.h:
1311 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.cpp:
1312 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMBlob.h:
1313 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:
1314 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.h:
1315 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
1316 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.h:
1317 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.cpp:
1318 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRuleList.h:
1319 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
1320 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.h:
1321 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
1322 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.h:
1323 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
1324 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.h:
1325 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:
1326 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.h:
1327 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.cpp:
1328 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRect.h:
1329 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.cpp:
1330 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h:
1331 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:
1332 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.h:
1333 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
1334 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.h:
1335 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:
1336 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.h:
1337 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.cpp:
1338 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMTokenList.h:
1339 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:
1340 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.h:
1341 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
1342 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h:
1343 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:
1344 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.h:
1345 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp.
1346 (webkitDOMDocumentDOMEventTargetInit):
1347 (webkitDOMDocumentInstallProperties):
1348 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
1349 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.h:
1350 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:
1351 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp.
1352 (webkitDOMElementDOMEventTargetInit):
1353 (webkitDOMElementInstallProperties):
1354 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.cpp:
1355 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEvent.h:
1356 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.cpp:
1357 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h:
1358 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.cpp:
1359 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFile.h:
1360 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.cpp:
1361 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMFileList.h:
1362 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
1363 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.h:
1364 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:
1365 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.h:
1366 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
1367 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.h:
1368 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
1369 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.h:
1370 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
1371 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.h:
1372 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
1373 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.h:
1374 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
1375 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.h:
1376 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:
1377 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.h:
1378 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.cpp:
1379 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCollection.h:
1380 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
1381 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.h:
1382 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
1383 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.h:
1384 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
1385 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.h:
1386 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:
1387 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.h:
1388 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
1389 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.h:
1390 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
1391 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.h:
1392 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:
1393 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.h:
1394 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
1395 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.h:
1396 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
1397 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.h:
1398 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
1399 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.h:
1400 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
1401 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.h:
1402 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
1403 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.h:
1404 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
1405 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.h:
1406 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
1407 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.h:
1408 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
1409 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.h:
1410 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
1411 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.h:
1412 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
1413 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.h:
1414 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
1415 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
1416 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
1417 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.h:
1418 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
1419 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.h:
1420 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
1421 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.h:
1422 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
1423 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.h:
1424 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:
1425 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.h:
1426 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:
1427 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.h:
1428 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
1429 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.h:
1430 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
1431 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.h:
1432 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
1433 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.h:
1434 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
1435 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.h:
1436 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
1437 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.h:
1438 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
1439 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.h:
1440 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
1441 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.h:
1442 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.cpp:
1443 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionsCollection.h:
1444 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
1445 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.h:
1446 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
1447 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.h:
1448 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
1449 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.h:
1450 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPrivate.cpp:
1451 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:
1452 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.h:
1453 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
1454 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.h:
1455 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:
1456 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.h:
1457 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
1458 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.h:
1459 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
1460 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.h:
1461 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
1462 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.h:
1463 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
1464 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.h:
1465 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
1466 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.h:
1467 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
1468 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.h:
1469 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
1470 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.h:
1471 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
1472 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.h:
1473 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:
1474 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.h:
1475 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
1476 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.h:
1477 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.cpp:
1478 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMKeyboardEvent.h:
1479 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
1480 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.h:
1481 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.cpp:
1482 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMouseEvent.h:
1483 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.cpp:
1484 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNamedNodeMap.h:
1485 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.h:
1486 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.cpp:
1487 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeFilter.h:
1488 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp.
1489 (webkitDOMNodeDOMEventTargetInit):
1490 (webkitDOMNodeInstallProperties):
1491 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.cpp:
1492 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeIterator.h:
1493 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.cpp:
1494 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodeList.h:
1495 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h:
1496 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp.
1497 (WebKit::wrapNodeGtk):
1498 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivateGtk.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.h.
1499 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:
1500 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.h:
1501 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:
1502 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.h:
1503 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.cpp:
1504 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheet.h:
1505 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.cpp:
1506 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMStyleSheetList.h:
1507 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:
1508 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.h:
1509 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.cpp:
1510 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMTreeWalker.h:
1511 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.cpp:
1512 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMUIEvent.h:
1513 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.cpp:
1514 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMWheelEvent.h:
1515 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:
1516 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.h:
1517 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.cpp:
1518 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathNSResolver.h:
1519 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:
1520 * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.h:
1521 * WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
1522 * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
1523 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMDefines.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentPrivate.h.
1524 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMDocument.h: Added.
1525 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMElement.h: Added.
1526 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMNode.h: Added.
1527 * WebProcess/InjectedBundle/API/wpe/DOM/WebKitDOMObject.h: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObject.h.
1528 * WebProcess/InjectedBundle/API/wpe/DOM/webkitdom.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNodePrivate.h.
1529 * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h:
1530 * WebProcess/InjectedBundle/API/wpe/WebKitWebHitTestResult.h: Added.
1531 * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h:
1532 * WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.template: Added.
1533 * WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.template: Copied from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
1534 * WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h:
1536 2018-03-26 Zan Dobersek <zdobersek@igalia.com>
1538 [CoordGraphics] Clean up CoordinatedGraphicsScene construct-time initializations
1539 https://bugs.webkit.org/show_bug.cgi?id=184002
1541 Reviewed by Carlos Garcia Campos.
1543 Move the CoordinatedGraphicsScene constant-expression initializations
1544 from constructor to the point of declaration.
1546 Default the CoordinatedGraphicsScene destructor.
1548 The m_scrollPosition member variable is unused in this class, while the
1549 similarly-named m_renderedContentsScrollPosition tracks scroll position
1550 of the scene. Remove the latter and use m_scrollPosition in its place.
1552 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
1553 (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
1554 (WebKit::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1555 (WebKit::CoordinatedGraphicsScene::commitSceneState):
1556 (WebKit::CoordinatedGraphicsScene::~CoordinatedGraphicsScene): Deleted.
1557 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
1559 2018-03-25 Michael Catanzaro <mcatanzaro@igalia.com>
1561 [GTK] WebKitWebProcessEnumTypes.h missing from webkit-web-extension.h
1562 https://bugs.webkit.org/show_bug.cgi?id=183998
1564 Reviewed by Carlos Garcia Campos.
1566 * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1568 2018-03-25 Carlos Garcia Campos <cgarcia@igalia.com>
1570 [GTK] Unresolved type warnings when generating gir
1571 https://bugs.webkit.org/show_bug.cgi?id=183926
1573 Reviewed by Michael Catanzaro.
1575 Skip deprecated functions using JSC C API from introspection.
1577 * UIProcess/API/glib/WebKitJavascriptResult.cpp:
1578 * UIProcess/API/glib/WebKitWebView.cpp:
1579 * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
1581 2018-03-25 Commit Queue <commit-queue@webkit.org>
1583 Unreviewed, rolling out r229954.
1584 https://bugs.webkit.org/show_bug.cgi?id=184000
1586 Caused many layout tests to crash on Apple High Sierra,
1587 Sierra, iOS Simulator and GTK Linux Debug test bots (Requested
1588 by dydz on #webkit).
1592 "Use SecurityOriginData more consistently in Service Worker
1594 https://bugs.webkit.org/show_bug.cgi?id=183969
1595 https://trac.webkit.org/changeset/229954
1597 2018-03-23 Brian Burg <bburg@apple.com>
1599 Web Automation: remove unnecessary member variable WebAutomationSession
1600 https://bugs.webkit.org/show_bug.cgi?id=183971
1602 Reviewed by Timothy Hatcher.
1604 The concept of the "active" browsing context is something in the WebDriver
1605 specification, but we were a bit too literal when first implementing this.
1606 There's no actual need for this on the browser side since most commands
1607 require implicitly switching to the target window passed in with the
1608 Automation command. The driver, however, still needs to track the current
1609 browsing context and current top-level browsing context.
1611 For returning whether a browsing context is active, we can just look at
1612 the page's activity state to know whether the page is active or not. For
1613 a normal browser, only one page is going to be visible and focused at a time.
1615 * UIProcess/Automation/WebAutomationSession.h:
1616 * UIProcess/Automation/WebAutomationSession.cpp:
1617 (WebKit::WebAutomationSession::buildBrowsingContextForPage):
1618 Consult the page's activity state to determine whether it's active.
1620 (WebKit::WebAutomationSession::createBrowsingContext):
1621 (WebKit::WebAutomationSession::closeBrowsingContext):
1622 (WebKit::WebAutomationSession::switchToBrowsingContext):
1623 (WebKit::WebAutomationSession::handleRunOpenPanel):
1624 Stop reading and writing the current browsing context handle.
1626 * UIProcess/WebPageProxy.h:
1627 (WebKit::WebPageProxy::isViewFocused const):
1628 (WebKit::WebPageProxy::isViewWindowActive const):
1631 2018-03-25 Tim Horton <timothy_horton@apple.com>
1633 Add and adopt ENABLE(AIRPLAY_PICKER)
1634 https://bugs.webkit.org/show_bug.cgi?id=183992
1636 Reviewed by Daniel Bates.
1638 * UIProcess/ios/WKContentViewInteraction.h:
1639 * UIProcess/ios/WKContentViewInteraction.mm:
1640 (-[WKContentView _showPlaybackTargetPicker:fromRect:]):
1641 * UIProcess/ios/forms/WKAirPlayRoutePicker.h:
1642 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1644 2018-03-25 Tim Horton <timothy_horton@apple.com>
1646 Move WKAnimationDelegate to its own header
1647 https://bugs.webkit.org/show_bug.cgi?id=183976
1648 <rdar://problem/38822299>
1650 Reviewed by Dan Bernstein.
1652 * Shared/RemoteLayerTree/WKAnimationDelegate.h: Added.
1653 * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
1654 * WebKit.xcodeproj/project.pbxproj:
1655 * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
1656 RemoteLayerTreeHost uses a forward declaration of WKAnimationDelegate,
1657 so we're just getting lucky that an -invalidate method exists on
1658 some other object. Instead, move WKAnimationDelegate to its own
1659 header, and include it in the places we use it.
1661 2018-03-24 Tim Horton <timothy_horton@apple.com>
1663 Adopt WK_PLATFORM_NAME in WebKit
1664 https://bugs.webkit.org/show_bug.cgi?id=183978
1666 Reviewed by Dan Bernstein.
1668 * Configurations/WebKit.xcconfig:
1669 * WebKit.xcodeproj/project.pbxproj:
1670 * mac/MigrateHeadersFromWebKitLegacy.make:
1671 * mac/postprocess-framework-headers.sh:
1673 2018-03-24 Tim Horton <timothy_horton@apple.com>
1675 Ignore sandbox_init_with_parameters deprecation warnings
1676 https://bugs.webkit.org/show_bug.cgi?id=183979
1678 Reviewed by Dan Bernstein.
1680 * Shared/ios/ChildProcessIOS.mm:
1681 (WebKit::ChildProcess::initializeSandbox):
1683 2018-03-24 Chris Dumez <cdumez@apple.com>
1685 Use SecurityOriginData more consistently in Service Worker code
1686 https://bugs.webkit.org/show_bug.cgi?id=183969
1688 Reviewed by Darin Adler.
1690 Use SecurityOriginData more consistently in Service Worker code to avoid constructing
1691 SecurityOrigin objects unnecessarily.
1693 * NetworkProcess/NetworkResourceLoadParameters.cpp:
1694 (WebKit::NetworkResourceLoadParameters::encode const):
1695 * Shared/API/c/WKSecurityOriginRef.cpp:
1696 (WKSecurityOriginCopyDatabaseIdentifier):
1697 * StorageProcess/ServiceWorker/WebSWOriginStore.cpp:
1698 (WebKit::WebSWOriginStore::addToStore):
1699 (WebKit::WebSWOriginStore::removeFromStore):
1700 * StorageProcess/ServiceWorker/WebSWOriginStore.h:
1701 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
1702 (WebKit::WebSWServerConnection::scheduleJobInServer):
1703 (WebKit::WebSWServerConnection::registerServiceWorkerClient):
1704 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1705 (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
1706 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1707 * StorageProcess/StorageProcess.cpp:
1708 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
1709 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
1710 (WebKit::StorageProcess::createStorageToWebProcessConnection):
1711 (WebKit::StorageProcess::deleteWebsiteDataForOrigins):
1712 (WebKit::StorageProcess::serverToContextConnectionForOrigin):
1713 (WebKit::StorageProcess::createServerToContextConnection):
1714 (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
1715 * StorageProcess/StorageProcess.h:
1716 * UIProcess/API/APIFrameInfo.cpp:
1717 (API::FrameInfo::create):
1718 * UIProcess/API/C/WKApplicationCacheManager.cpp:
1719 (WKApplicationCacheManagerDeleteEntriesForOrigin):
1720 * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1721 (WKKeyValueStorageManagerDeleteEntriesForOrigin):
1722 * UIProcess/API/C/WKResourceCacheManager.cpp:
1723 (WKResourceCacheManagerClearCacheForOrigin):
1724 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
1725 (WKWebsiteDataStoreRemoveFetchCacheForOrigin):
1726 (WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
1727 * UIProcess/ServiceWorkerProcessProxy.cpp:
1728 (WebKit::ServiceWorkerProcessProxy::create):
1729 (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
1730 (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
1731 * UIProcess/ServiceWorkerProcessProxy.h:
1732 * UIProcess/Storage/StorageProcessProxy.cpp:
1733 (WebKit::StorageProcessProxy::getStorageProcessConnection):
1734 * UIProcess/WebProcessPool.cpp:
1735 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1736 (WebKit::WebProcessPool::disconnectProcess):
1737 (WebKit::WebProcessPool::updateProcessAssertions):
1738 * UIProcess/WebProcessPool.h:
1739 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
1740 (WebKit::WebsiteDataStore::fetchDataAndApply):
1741 * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1742 (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
1743 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1744 (WKBundlePageCopyOriginsWithApplicationCache):
1745 * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
1746 (WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
1747 (WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):
1748 * WebProcess/Storage/WebSWClientConnection.cpp:
1749 (WebKit::WebSWClientConnection::registerServiceWorkerClient):
1750 (WebKit::WebSWClientConnection::matchRegistration):
1751 (WebKit::WebSWClientConnection::whenRegistrationReady):
1752 (WebKit::WebSWClientConnection::getRegistrations):
1753 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1754 (WebKit::WebChromeClient::exceededDatabaseQuota):
1755 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
1756 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1757 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1758 * WebProcess/WebProcess.cpp:
1759 (WebKit::WebProcess::fetchWebsiteData):
1760 * WebProcess/WebStorage/StorageAreaImpl.cpp:
1761 (WebKit::StorageAreaImpl::securityOrigin const):
1762 * WebProcess/WebStorage/StorageAreaImpl.h:
1763 * WebProcess/WebStorage/StorageAreaMap.cpp:
1764 (WebKit::StorageAreaMap::StorageAreaMap):
1765 (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1766 (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1767 * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
1768 (WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
1770 2018-03-24 Tim Horton <timothy_horton@apple.com>
1772 Fix the !ENABLE(MEDIA_STREAM) build
1773 https://bugs.webkit.org/show_bug.cgi?id=183977
1775 Reviewed by Wenson Hsieh.
1777 * UIProcess/Cocoa/UIDelegate.mm:
1778 (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
1779 * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
1780 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
1781 * WebProcess/cocoa/UserMediaCaptureManager.messages.in:
1783 2018-03-24 Tim Horton <timothy_horton@apple.com>
1785 WKFileUploadPanel shouldn't depend on WebKitLegacy
1786 https://bugs.webkit.org/show_bug.cgi?id=183981
1788 Reviewed by Wenson Hsieh.
1790 * UIProcess/ios/forms/WKFileUploadPanel.mm:
1791 (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]):
1792 Just use the underlying WebCore function instead of the
1793 unnecessary NSFileManager category method.
1795 2018-03-23 Tim Horton <timothy_horton@apple.com>
1797 Fix the build with no pasteboard
1798 https://bugs.webkit.org/show_bug.cgi?id=183973
1800 Reviewed by Dan Bernstein.
1802 * Configurations/FeatureDefines.xcconfig:
1804 2018-03-23 Megan Gardner <megan_gardner@apple.com>
1806 Enable unified text selection in select cases for gradual testing
1807 https://bugs.webkit.org/show_bug.cgi?id=183967
1808 <rdar://problem/38815328>
1810 Reviewed by Tim Horton.
1812 Enable in select places for a more gradual switch, as this is a big change and we want to make sure
1813 it works before switching completely.
1815 * UIProcess/ios/WKContentViewInteraction.mm:
1816 (-[WKContentView useSelectionAssistantWithGranularity:]):
1818 2018-03-23 John Wilander <wilander@apple.com>
1820 Resource Load Statistics: Pick up ITP debug mode flag from defaults
1821 https://bugs.webkit.org/show_bug.cgi?id=183956
1822 <rdar://problem/38559574>
1824 Reviewed by Brent Fulgham.
1826 * UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
1827 (WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
1829 2018-03-23 Wenson Hsieh <wenson_hsieh@apple.com>
1831 [Extra zoom mode] Adopt list view controller UI for select menus
1832 https://bugs.webkit.org/show_bug.cgi?id=183944
1833 <rdar://problem/38799062>
1835 Reviewed by Tim Horton.
1837 Move UIProcess/WKSelectMenuListViewController.* to UIProcess/ios/forms, where it was intended to go.
1839 * UIProcess/ios/forms/WKSelectMenuListViewController.h: Renamed from Source/WebKit/UIProcess/WKSelectMenuListViewController.h.
1840 * UIProcess/ios/forms/WKSelectMenuListViewController.mm: Renamed from Source/WebKit/UIProcess/WKSelectMenuListViewController.mm.
1841 * WebKit.xcodeproj/project.pbxproj:
1843 2018-03-23 Chris Dumez <cdumez@apple.com>
1845 Promptly terminate service worker processes when they are no longer needed
1846 https://bugs.webkit.org/show_bug.cgi?id=183873
1847 <rdar://problem/38676995>
1849 Reviewed by Youenn Fablet.
1851 The StorageProcess now keeps track of service worker clients for each security
1852 origin. When there is no longer any clients for a given security origin, the
1853 StorageProcess asks the service worker process for the given origin to terminate
1854 and severs its connection to it.
1856 * Shared/Storage/StorageProcessCreationParameters.h:
1857 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
1858 (WebKit::WebSWServerToContextConnection::connectionMayNoLongerBeNeeded):
1859 (WebKit::WebSWServerToContextConnection::terminate):
1860 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
1861 * StorageProcess/StorageProcess.cpp:
1862 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
1863 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
1864 (WebKit::StorageProcess::initializeWebsiteDataStore):
1865 (WebKit::StorageProcess::swServerForSession):
1866 (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded):
1867 (WebKit::StorageProcess::disableServiceWorkerProcessTerminationDelay):
1868 * StorageProcess/StorageProcess.h:
1869 * StorageProcess/StorageProcess.messages.in:
1870 * UIProcess/API/Cocoa/WKProcessPool.mm:
1871 (-[WKProcessPool _disableServiceWorkerProcessTerminationDelay]):
1872 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1873 * UIProcess/WebProcessPool.cpp:
1874 (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
1875 (WebKit::WebProcessPool::disableServiceWorkerProcessTerminationDelay):
1876 * UIProcess/WebProcessPool.h:
1877 * WebProcess/Storage/WebSWContextManagerConnection.cpp:
1878 (WebKit::WebSWContextManagerConnection::terminateProcess):
1879 * WebProcess/Storage/WebSWContextManagerConnection.h:
1880 * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
1882 2018-03-23 Brady Eidson <beidson@apple.com>
1884 Go to back/forward list items after a process-swapped navigation.
1885 <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
1887 Reviewed by Andy Estes.
1889 This takes the initial work of "process swap a normal navigation" and extends it to
1890 process swapping for back/forward item navigations.
1892 * Scripts/webkit/messages.py:
1894 Make sure state objects are serialized to the UI Process back/forward list items, as otherwise
1895 they will be lost in process-swap scenarios:
1896 * Shared/SessionState.cpp:
1897 (WebKit::PageState::encode const):
1898 (WebKit::PageState::decode):
1899 * Shared/SessionState.h:
1901 Make a new variant of APINavigation specifically for back/forward list items.
1902 * UIProcess/API/APINavigation.cpp:
1903 (API::Navigation::Navigation):
1904 (API::Navigation::loggingURL const):
1905 * UIProcess/API/APINavigation.h:
1906 (API::Navigation::create):
1907 (API::Navigation::backForwardListItem):
1908 (API::Navigation::backForwardFrameLoadType const):
1910 * UIProcess/API/C/WKPage.cpp:
1911 (WKPageGoToBackForwardListItem):
1913 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1914 (-[WKBrowsingContextController goToBackForwardListItem:]):
1916 * UIProcess/API/Cocoa/WKWebView.mm:
1917 (-[WKWebView goToBackForwardListItem:]):
1919 * UIProcess/WebNavigationState.cpp:
1920 (WebKit::WebNavigationState::createLoadRequestNavigation):
1921 (WebKit::WebNavigationState::createBackForwardNavigation):
1922 * UIProcess/WebNavigationState.h:
1924 * UIProcess/WebPageProxy.cpp:
1925 (WebKit::WebPageProxy::reattachToWebProcessForReload):
1926 (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1927 (WebKit::WebPageProxy::goForward):
1928 (WebKit::WebPageProxy::goBack):
1929 (WebKit::WebPageProxy::goToBackForwardItem):
1930 (WebKit::WebPageProxy::receivedPolicyDecision):
1931 (WebKit::WebPageProxy::continueNavigationInNewProcess): Handle back/forward navigations differently than others.
1932 (WebKit::WebPageProxy::restoreFromSessionState):
1933 * UIProcess/WebPageProxy.h:
1935 * UIProcess/WebProcessProxy.cpp:
1936 (WebKit::WebProcessProxy::addOrUpdateBackForwardItem): Renamed from "addBackForwardItem" for clarity
1937 (WebKit::WebProcessProxy::addBackForwardItem): Deleted.
1938 * UIProcess/WebProcessProxy.h:
1939 * UIProcess/WebProcessProxy.messages.in:
1941 * UIProcess/ios/ViewGestureControllerIOS.mm:
1942 (WebKit::ViewGestureController::endSwipeGesture):
1944 * UIProcess/mac/ViewGestureControllerMac.mm:
1945 (WebKit::ViewGestureController::endSwipeGesture):
1947 * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
1948 (WebKit::toPageState):
1949 (WebKit::toHistoryItem):
1951 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1952 (WebKit::updateBackForwardItem):
1954 * WebProcess/WebPage/WebPage.cpp:
1955 (WebKit::WebPage::goToBackForwardItem): Combined "goBack" and "goForward" with this method,
1956 passing the appropriate FrameLoadType around as needed to remember the specific type.
1957 (WebKit::WebPage::goForward): Deleted.
1958 (WebKit::WebPage::goBack): Deleted.
1959 * WebProcess/WebPage/WebPage.h:
1960 * WebProcess/WebPage/WebPage.messages.in:
1962 2018-03-23 Megan Gardner <megan_gardner@apple.com>
1964 Don't use the presence of a textSelectionAssistant as a proxy for if we are in content editable.
1965 https://bugs.webkit.org/show_bug.cgi?id=183804
1967 Reviewed by Tim Horton.
1969 We need to stop using the presence of a textSelectionAssistant as a proxy for if we are selecting in a content editable
1970 or not. As we are planning on switching to only using a textSelectionAssistant for selection, these checks need to
1971 be more direct in checking what we actually need to know i.e. are we selecting in a content editable.
1973 * Platform/spi/ios/UIKitSPI.h:
1974 * UIProcess/ios/WKContentViewInteraction.mm:
1976 (-[WKContentView inputView]):
1977 (-[WKContentView _selectionClipRect]):
1978 (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
1979 (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
1980 (-[WKContentView gestureRecognizerShouldBegin:]):
1981 (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
1982 (-[WKContentView webSelectionRects]):
1983 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
1984 (-[WKContentView _autofillContext]):
1986 2018-03-23 Youenn Fablet <youenn@apple.com>
1988 WebProcessPool should not ask to register all clients for each service worker process creation
1989 https://bugs.webkit.org/show_bug.cgi?id=183941
1991 Reviewed by Chris Dumez.
1993 Call registerServiceWorkerClients when there is no service worker process.
1994 Update service worker clients to register all of them no matter the session ID.
1996 * UIProcess/WebProcessPool.cpp:
1997 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
1998 * WebProcess/WebProcess.cpp:
1999 (WebKit::WebProcess::registerServiceWorkerClients):
2000 * WebProcess/WebProcess.h:
2001 * WebProcess/WebProcess.messages.in:
2003 2018-03-23 Wenson Hsieh <wenson_hsieh@apple.com>
2005 [Extra zoom mode] Adopt list view controller UI for select menus
2006 https://bugs.webkit.org/show_bug.cgi?id=183944
2007 <rdar://problem/38799062>
2009 Reviewed by Andy Estes.
2011 Rename WKSelectMenuViewController to WKSelectMenuListViewController, and also rename the relevant
2012 WebKitAdditions harness files. See corresponding changes for more details.
2014 * UIProcess/WKSelectMenuListViewController.h: Renamed from Source/WebKit/UIProcess/ios/forms/WKSelectMenuViewController.h.
2015 * UIProcess/WKSelectMenuListViewController.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKSelectMenuViewController.mm.
2016 * UIProcess/ios/WKContentViewInteraction.h:
2017 * UIProcess/ios/WKContentViewInteraction.mm:
2018 (-[WKContentView presentSelectMenuViewController:]):
2019 (-[WKContentView dismissSelectMenuViewController:]):
2020 (-[WKContentView selectMenu:didSelectItemAtIndex:]):
2021 (-[WKContentView numberOfItemsInSelectMenu:]):
2022 (-[WKContentView selectMenu:displayTextForItemAtIndex:]):
2023 (-[WKContentView selectMenu:didCheckItemAtIndex:checked:]):
2024 (-[WKContentView selectMenuUsesMultipleSelection:]):
2025 (-[WKContentView selectMenu:hasSelectedOptionAtIndex:]):
2026 (-[WKContentView _wheelChangedWithEvent:]):
2028 Overriding wheel events and re-dispatching them is no longer needed after r229437, so we can just remove special
2029 handling for select menus here.
2031 (-[WKContentView didCancelSelectionInSelectMenu:]): Deleted.
2032 (-[WKContentView selectMenuSupportsMultipleSelection:]): Deleted.
2033 (-[WKContentView selectMenu:hasCheckedOptionAtIndex:]): Deleted.
2034 (-[WKContentView startingIndexForSelectMenu:]): Deleted.
2036 The starting index for a select menu is no longer relevant when using list view controllers for input, so we can
2037 just remove this delegate hook altogether.
2039 * WebKit.xcodeproj/project.pbxproj:
2041 2018-03-23 Youenn Fablet <youenn@apple.com>
2043 CacheStorage::Caches should clear m_caches when clearing its representation even though it is not yet initialized
2044 https://bugs.webkit.org/show_bug.cgi?id=183945
2046 Reviewed by Chris Dumez.
2048 * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
2049 (WebKit::CacheStorage::Caches::clearMemoryRepresentation):
2050 In case we clear Caches in the middle of the initialization, m_caches might not be empty
2051 but m_isInitialized is not yet set to true since we are computing the Caches size.
2052 Update the assertion and clear m_caches in that case.
2054 2018-03-23 David Kilzer <ddkilzer@apple.com>
2056 Stop using dispatch_set_target_queue()
2057 <https://webkit.org/b/183908>
2058 <rdar://problem/33553533>
2060 Reviewed by Daniel Bates.
2062 * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
2063 (WebKit::NetworkCache::IOChannel::IOChannel): Remove the call to
2064 dispatch_set_target_queue() since this is handled in the
2065 dispatch_io_create() call above.
2067 2018-03-23 Youenn Fablet <youenn@apple.com>
2069 CacheStorage::Engine should not ref itself when hopping to a background thread
2070 https://bugs.webkit.org/show_bug.cgi?id=183925
2071 <rdar://problem/38580483>
2073 Reviewed by Chris Dumez.
2075 Add support for weak pointers to CacheStorage Engine.
2076 Use weak pointer when hopping to background threads.
2077 Store callbacks in CacheStorage::Engine maps to keep them being destroyed in the main thread only.
2078 Made some callbacks CompletionHandler as a bonus.
2080 Made sure to use just one Engine for all private sessions.
2082 * NetworkProcess/cache/CacheStorageEngine.cpp:
2083 (WebKit::CacheStorage::Engine::~Engine):
2084 (WebKit::CacheStorage::Engine::from):
2085 (WebKit::CacheStorage::Engine::initialize):
2086 (WebKit::CacheStorage::Engine::writeFile):
2087 (WebKit::CacheStorage::Engine::readFile):
2088 * NetworkProcess/cache/CacheStorageEngine.h:
2089 (WebKit::CacheStorage::Engine::weakPtrFactory):
2091 2018-03-23 Ryan Haddad <ryanhaddad@apple.com>
2093 Unreviewed build fix.
2095 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2097 2018-03-23 Miguel Gomez <magomez@igalia.com>
2099 [GTK][WPE] Avoid software color conversion inside BitmapTextureGL
2100 https://bugs.webkit.org/show_bug.cgi?id=183892
2102 Remove the UpdateContentsFlag parameter when calling BitmapTexture::updateContents().
2104 Reviewed by ลฝan Doberลกek.
2106 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
2107 (WebKit::CoordinatedBackingStoreTile::swapBuffers):
2109 2018-03-23 Michael Catanzaro <mcatanzaro@igalia.com>
2111 [WPE][GTK] Fix -Wswitch warnings after r229778
2112 https://bugs.webkit.org/show_bug.cgi?id=183927
2114 Reviewed by Carlos Garcia Campos.
2116 * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
2117 (WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Log a warning if Suspend is
2118 received as a PolicyAction
2119 * UIProcess/API/glib/WebKitNavigationClient.cpp: Ignore the ProcessSwap termination reason,
2120 which should be invisible to WebKit clients
2122 2018-03-22 Chris Dumez <cdumez@apple.com>
2124 Include security origin in the service worker process name
2125 https://bugs.webkit.org/show_bug.cgi?id=183913
2127 Reviewed by Youenn Fablet.
2129 Include security origin in the service worker process name to facilitate debugging. This way, we
2130 can differentiate which service worker process is used for which origin in activity monitor.
2132 * Shared/ChildProcess.h:
2133 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2134 (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
2135 * UIProcess/ServiceWorkerProcessProxy.cpp:
2136 (WebKit::ServiceWorkerProcessProxy::getLaunchOptions):
2137 * WebProcess/cocoa/WebProcessCocoa.mm:
2138 (WebKit::WebProcess::initializeProcessName):
2140 2018-03-22 Michael Catanzaro <mcatanzaro@igalia.com>
2142 Unreviewed, silence unused variable warning
2144 * UIProcess/WebPageProxy.cpp:
2145 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2147 2018-03-22 Dan Bernstein <mitz@apple.com>
2149 WKWebView doesnโt expose its spellCheckerDocumentTag
2150 https://bugs.webkit.org/show_bug.cgi?id=183797
2151 <rdar://problem/38678089>
2153 Reviewed by Tim Horton.
2155 * UIProcess/API/Cocoa/WKWebView.mm:
2156 (-[WKWebView _spellCheckerDocumentTag]): Added this getter which calls through to the WebViewImpl.
2157 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared _spellCheckerDocumentTag property.
2159 2018-03-22 Chris Dumez <cdumez@apple.com>
2161 Use the same SWServer for all ephemeral sessions
2162 https://bugs.webkit.org/show_bug.cgi?id=183921
2163 <rdar://problem/36873075>
2165 Reviewed by Youenn Fablet.
2167 Use the same SWServer for all ephemeral sessions. SWServers never go away and we create
2168 one per sessionID. When browsing doing private browsing in Safari (and other fetching
2169 favorite icons), the sessionID is ephemeral and keeps changing. This means that we kept
2170 constructing new SWServers that would never go away. Each SWServer has a thread so we
2171 would eventually hit the thread limit for the storage process.
2173 * StorageProcess/StorageProcess.cpp:
2174 (WebKit::StorageProcess::swServerForSession):
2176 2018-03-22 Michael Catanzaro <mcatanzaro@igalia.com>
2178 Unreviewed, fix format string warnings in service worker code
2180 On Linux x86_64, uint64_t is unsigned long, not unsigned long long.
2182 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2183 (WebKit::WebSWServerConnection::startFetch):
2184 (WebKit::WebSWServerConnection::didFinishFetch):
2185 (WebKit::WebSWServerConnection::didFailFetch):
2186 (WebKit::WebSWServerConnection::didNotHandleFetch):
2188 2018-03-22 Daniel Bates <dabates@apple.com>
2190 Expose SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest() as WebKit SPI
2191 https://bugs.webkit.org/show_bug.cgi?id=183907
2192 <rdar://problem/38759127>
2194 Reviewed by Alex Christensen.
2196 Adds both modern Objective-C SPI and C SPI to allow an embedding client to register a scheme
2197 whose content should be displayed/loaded if and only if it can be requested. Disregarding an
2198 app that enables universal access, by using this SPI WebKit will refuse to display cross-origin
2199 content for the registered schemes.
2201 We need to add C SPI for embedding clients that have not transitioned to the modern Objective-
2204 * Shared/WebProcessCreationParameters.cpp:
2205 (WebKit::WebProcessCreationParameters::encode const):
2206 (WebKit::WebProcessCreationParameters::decode):
2207 * Shared/WebProcessCreationParameters.h:
2208 * UIProcess/API/C/WKContext.cpp:
2209 (WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequest):
2210 * UIProcess/API/C/WKContextPrivate.h:
2211 * UIProcess/API/Cocoa/WKProcessPool.mm:
2212 (-[WKProcessPool _registerURLSchemeAsCanDisplayOnlyIfCanRequest:]):
2213 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2214 * UIProcess/WebProcessPool.cpp:
2215 (WebKit::WebProcessPool::initializeNewWebProcess):
2216 (WebKit::WebProcessPool::registerURLSchemeAsCanDisplayOnlyIfCanRequest):
2217 * UIProcess/WebProcessPool.h:
2218 * WebProcess/WebProcess.cpp:
2219 (WebKit::WebProcess::initializeWebProcess):
2220 (WebKit::WebProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest const):
2221 * WebProcess/WebProcess.h:
2222 * WebProcess/WebProcess.messages.in:
2224 2018-03-22 Tim Horton <timothy_horton@apple.com>
2226 Improve readability of WebCore's OTHER_LDFLAGS
2227 https://bugs.webkit.org/show_bug.cgi?id=183909
2228 <rdar://problem/38760992>
2230 Reviewed by Dan Bernstein.
2232 * Configurations/Base.xcconfig:
2233 * Configurations/FeatureDefines.xcconfig:
2235 2018-03-22 Zan Dobersek <zdobersek@igalia.com>
2237 [TexMap] Make TextureMapperContextAttributes thread-specific
2238 https://bugs.webkit.org/show_bug.cgi?id=183895
2240 Reviewed by Carlos Garcia Campos.
2242 CoordinatedGraphicsScene, as an implementor of the
2243 TextureMapperPlatformLayerProxy::Compositor interface, doesn't have to
2244 implement the texmapGL() method anymore.
2246 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2247 (WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
2248 (WebKit::CoordinatedGraphicsScene::texmapGL): Deleted.
2249 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2251 2018-03-21 Frederic Wang <fwang@igalia.com>
2253 Unreviewed, update comment added in r229801.
2255 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2256 (WebKit::FindController::didFindString): Remove "On Mobile" and mention bug 183889.
2258 2018-03-21 Chris Dumez <cdumez@apple.com>
2260 Regression(r229831): ProcessSwap.Basic API test is crashing
2261 https://bugs.webkit.org/show_bug.cgi?id=183884
2263 Reviewed by Brady Eidson.
2265 This code should only be called for navigation policy decisions.
2266 It used to work without this check because of an early return, which
2267 was dropped in r229831.
2269 * UIProcess/WebPageProxy.cpp:
2270 (WebKit::WebPageProxy::receivedPolicyDecision):
2272 2018-03-21 Wenson Hsieh <wenson_hsieh@apple.com>
2274 [Extra zoom mode] Add new SPI hooks for clients to vend an input session context view
2275 https://bugs.webkit.org/show_bug.cgi?id=183866
2276 <rdar://problem/38692256>
2278 Reviewed by Tim Horton.
2280 Add new SPI hooks to _WKInputDelegate allowing internal clients to provide a view that gives additional context
2281 when editing form controls, on top of the default label or placeholder text displayed by WebKit. The height
2282 delegate is invoked first, giving the client an opportunity to lay out the context view to fit the given size;
2283 the actual view is then queried.
2285 If the view changes, clients may tell WebKit to reload the context view via SPI on WKFormInputSession; this call
2286 to reload is plumbed through to the currently presented list view controller (at the moment, this is only the
2287 text input list view controller).
2289 * UIProcess/API/Cocoa/_WKFormInputSession.h:
2290 * UIProcess/API/Cocoa/_WKInputDelegate.h:
2292 Add the new SPI hooks, described above.
2294 * UIProcess/ios/WKContentViewInteraction.h:
2295 * UIProcess/ios/WKContentViewInteraction.mm:
2296 (-[WKFormInputSession reloadFocusedElementContextView]):
2298 Plumb the context view reload hook through WKContentView to WKTextInputListViewController.
2300 (-[WKContentView setupInteraction]):
2301 (-[WKContentView _stopAssistingNode]):
2302 (-[WKContentView reloadContextViewForPresentedListViewController]):
2303 (-[WKContentView focusedFormControllerDidUpdateSuggestions:]):
2305 Slight tweak to only reload text suggestions if we are not blurring the focused element. Without this extra
2306 condition, the list view controller's inner table view would get reloaded when the form input session's text
2307 suggestions are set to nil when the list view controller is dismissed, causing a visible stutter in the
2308 dismissal animation of view controller.
2310 2018-03-21 Chris Dumez <cdumez@apple.com>
2312 WebKitTestRunner crashed in com.apple.WebKit: WebKit::WebProcessPool::terminateServiceWorkerProcesses
2313 https://bugs.webkit.org/show_bug.cgi?id=183875
2315 Reviewed by Brent Fulgham.
2317 Protect |this| while we're iterating over m_serviceWorkerProcesses and terminating
2318 each service worker process. It is possible for the WebProcess pool to get destroyed
2319 as a result of terminating a service worker process.
2321 This change is covered by layout tests that are currently crashing on the ASAN bots.
2323 * UIProcess/WebProcessPool.cpp:
2324 (WebKit::WebProcessPool::terminateServiceWorkerProcesses):
2326 2018-03-21 Eric Carlson <eric.carlson@apple.com>
2328 Fix typo in inactive media stream timeout default value
2329 https://bugs.webkit.org/show_bug.cgi?id=183872
2330 <rdar://problem/38723903>
2332 Reviewed by Jer Noble.
2334 * Shared/WebPreferences.yaml: Fix typo.
2335 * Shared/WebPreferencesDefaultValues.h: Ditto.
2337 2018-03-21 Chris Dumez <cdumez@apple.com>
2339 Make policy decisions asynchronous
2340 https://bugs.webkit.org/show_bug.cgi?id=180568
2341 <rdar://problem/37131297>
2343 Reviewed by Alex Christensen.
2345 Get rid of synchronous IPC and synchronous code paths for policy delegates.
2346 Policy decisions are now all made asynchronously and rely on asynchronous
2349 This code change is based on work by Alex Christensen.
2351 * UIProcess/WebPageProxy.cpp:
2352 (WebKit::WebPageProxy::receivedPolicyDecision):
2353 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2354 (WebKit::WebPageProxy::decidePolicyForResponse):
2355 * UIProcess/WebPageProxy.h:
2356 * UIProcess/WebPageProxy.messages.in:
2357 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2358 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2359 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2361 2018-03-21 Chris Dumez <cdumez@apple.com>
2363 ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash API test is failing with async delegates
2364 https://bugs.webkit.org/show_bug.cgi?id=183787
2366 Reviewed by Wenson Hsieh.
2368 Without asynchronous policy delegates, when the client requests a navigation, we would:
2369 1. Do a synchronous navigation policy check
2370 2. If the client allows the navigation, start the provisional load
2372 Starting the provisional load would freeze the layer tree until first meaningful
2373 layout via WebFrameLoaderClient::provisionalLoadStarted() -> WebPage::didStartPageTransition().
2375 When constructing a WebView and then requesting a load right away. This would make sure
2376 we do not commit a layer tree for the initial about:blank page because the layer tree
2377 would be frozen until we have something meaningful to show for the following load.
2379 However, with asynchronous policy delegates, we are able to do a layer tree commit
2380 during the asynchronous navigation policy check because the layer tree is not frozen
2381 yet (provisional load has not started) and the process is not stuck on synchronous
2382 IPC. When constructing a WebView and then requesting a load right away, this would
2383 allow a layer tree commit for about:blank to happen before we've even started the
2384 load. This would cause some API tests to fail on iOS.
2386 To address the issue, we try and maintain pre-existing behavior by freezing the
2387 layer tree during navigation policy decision.
2389 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2390 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2391 (WebKit::WebFrameLoaderClient::didDecidePolicyForNavigationAction):
2392 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2393 * WebProcess/WebPage/WebPage.cpp:
2394 (WebKit::WebPage::didStartNavigationPolicyCheck):
2395 (WebKit::WebPage::didCompleteNavigationPolicyCheck):
2396 * WebProcess/WebPage/WebPage.h:
2398 2018-03-21 Brent Fulgham <bfulgham@apple.com>
2400 Allow the WebContent process to read ViewBridge preferences
2401 https://bugs.webkit.org/show_bug.cgi?id=183862
2402 <rdar://problem/38459456>
2404 Reviewed by Eric Carlson.
2406 * WebProcess/com.apple.WebProcess.sb.in:
2408 2018-03-21 Frederic Wang <fwang@igalia.com>
2410 [iOS] Text highlighted by the Find UI overlaps with NBC news header on google.com
2411 https://bugs.webkit.org/show_bug.cgi?id=183658
2413 Reviewed by Tim Horton.
2415 On Mobile, many sites have overlay headers or footers that may overlap with the highlighted
2416 text inside a scrollable overflow node. To workaround that issue, this commit changes the
2417 behavior so that the text is revealed at the center of the overflow node.
2419 * WebProcess/WebPage/ios/FindControllerIOS.mm:
2420 (WebKit::FindController::didFindString): Use alignCenterAlways instead of alignToEdgeIfNeeded.
2422 2018-03-21 Carlos Garcia Campos <cgarcia@igalia.com>
2424 [GTK][WPE] JSC bindings not introspectable
2425 https://bugs.webkit.org/show_bug.cgi?id=136989
2427 Reviewed by Michael Catanzaro.
2429 Deprecate the functions that are not introspectable due to JSC C API in GTK+ port and remove them in WPE
2430 port. Add alternative functions using the new JSC GLib API. We no longer need to keep a global context attached
2431 to every view. We can simply create a temporary global context on demand and release it after 1 second. This
2432 also allows us to remove WebPageProxy::javascriptGlobalContext() and all the related code.
2434 * PlatformGTK.cmake:
2435 * PlatformWPE.cmake:
2436 * UIProcess/API/glib/WebKitJavascriptResult.cpp:
2437 (_WebKitJavascriptResult::_WebKitJavascriptResult):
2438 (webkitJavascriptResultCreate):
2439 (webkit_javascript_result_get_global_context):
2440 (webkit_javascript_result_get_value):
2441 (webkit_javascript_result_get_js_value):
2442 * UIProcess/API/glib/WebKitJavascriptResultPrivate.h:
2443 (SharedJavascriptContext::singleton):
2444 (SharedJavascriptContext::SharedJavascriptContext):
2445 (SharedJavascriptContext::getOrCreateContext):
2446 (SharedJavascriptContext::releaseContext):
2447 * UIProcess/API/glib/WebKitUserContentManager.cpp:
2448 * UIProcess/API/glib/WebKitWebView.cpp:
2449 (webkit_web_view_get_javascript_global_context):
2450 (webkitWebViewRunJavaScriptCallback):
2451 * UIProcess/API/gtk/PageClientImpl.cpp:
2452 * UIProcess/API/gtk/PageClientImpl.h:
2453 * UIProcess/API/gtk/WebKitJavascriptResult.h:
2454 * UIProcess/API/gtk/WebKitWebView.h:
2455 * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
2456 * UIProcess/API/wpe/APIViewClient.h:
2457 (API::ViewClient::handleDownloadRequest):
2458 * UIProcess/API/wpe/PageClientImpl.cpp:
2459 * UIProcess/API/wpe/PageClientImpl.h:
2460 * UIProcess/API/wpe/WPEView.cpp:
2461 * UIProcess/API/wpe/WPEView.h:
2462 * UIProcess/API/wpe/WebKitJavascriptResult.h:
2463 * UIProcess/API/wpe/WebKitWebView.h:
2464 * UIProcess/PageClient.h:
2465 * UIProcess/WebPageProxy.h:
2466 * UIProcess/gtk/WebPageProxyGtk.cpp:
2467 * UIProcess/wpe/WebPageProxyWPE.cpp:
2468 * WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:
2469 (webkit_frame_get_js_context):
2470 (webkit_frame_get_js_context_for_script_world):
2471 * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
2472 * WebProcess/InjectedBundle/API/wpe/WebKitFrame.h:
2474 2018-03-21 Carlos Garcia Campos <cgarcia@igalia.com>
2476 [GTK][WPE] Initial implementation of JavaScriptCore glib bindings
2477 https://bugs.webkit.org/show_bug.cgi?id=164061
2479 Reviewed by Michael Catanzaro.
2481 Set decorator and deprecation_guard options in API docs config files, since they are no longer common to all
2484 * PlatformGTK.cmake:
2486 2018-03-21 Zan Dobersek <zdobersek@igalia.com>
2488 [CoordGraphics] Simplify CoordinatedGraphicsScene activation
2489 https://bugs.webkit.org/show_bug.cgi?id=183772
2491 Reviewed by Carlos Garcia Campos.
2493 Simplify CoordinatedGraphicsScene::setActive() into a simple setter of
2494 the m_isActive member variable. We don't have to call renderNextFrame()
2495 anymore as that was only necessary to unblock CoordinatedLayerTreeHost,
2496 but that can be avoided if m_isWaitingForRenderer in that class is
2497 initialized to false.
2499 CoordinatedGraphicsSceneClient::renderNextFrame() virtual method and its
2500 ThreadedCompositor implementation are removed. renderNextFrame() in the
2501 CoordinatedGraphicsScene class can also be removed, along with the
2502 unused dispatchOnMainThread() and dispatchOnClientRunLoop() methods and
2503 the associated m_clientRunLoop member variable.
2505 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2506 (WebKit::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2507 (WebKit::CoordinatedGraphicsScene::dispatchOnMainThread): Deleted.
2508 (WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop): Deleted.
2509 (WebKit::CoordinatedGraphicsScene::renderNextFrame): Deleted.
2510 (WebKit::CoordinatedGraphicsScene::setActive): Deleted.
2511 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2512 (WebKit::CoordinatedGraphicsSceneClient::~CoordinatedGraphicsSceneClient):
2513 (WebKit::CoordinatedGraphicsScene::setActive):
2514 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
2515 (WebKit::m_displayRefreshMonitor):
2516 (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
2517 (WebKit::ThreadedCompositor::renderNextFrame): Deleted.
2518 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
2519 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2521 2018-03-21 Zan Dobersek <zdobersek@igalia.com>
2523 [TexMap] Have TextureMapperLayer::applyAnimationsRecursively() return running animation status
2524 https://bugs.webkit.org/show_bug.cgi?id=183771
2526 Reviewed by Carlos Garcia Campos.
2528 In CoordinatedGraphicsScene::paintToCurrentGLContext(), retrieve
2529 information about any running animation in the scene via the
2530 TextureMapperLayer::applyAnimationsRecursively() call. Use that boolean
2531 value at the end up the method, instead of again traversing the
2532 TextureMapperLayer tree to determine whether any running animations are
2535 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2536 (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
2538 2018-03-20 Tim Horton <timothy_horton@apple.com>
2540 Enable the minimal simulator feature flag when appropriate
2541 https://bugs.webkit.org/show_bug.cgi?id=183807
2543 Reviewed by Dan Bernstein.
2545 * Configurations/FeatureDefines.xcconfig:
2547 2018-03-19 Ryosuke Niwa <rniwa@webkit.org>
2549 Expose content attributes on _WKLinkIconParameters
2550 https://bugs.webkit.org/show_bug.cgi?id=183768
2552 Reviewed by Alex Christensen.
2554 Added _WKLinkIconParameters.attributes to expose content attributes of a link element
2555 which defined a favicon, touch icon, or pre-compressed touch icon.
2557 * UIProcess/API/Cocoa/_WKLinkIconParameters.h:
2558 (_WKLinkIconParameters.attributes): Added.
2559 * UIProcess/API/Cocoa/_WKLinkIconParameters.mm:
2560 (_WKLinkIconParameters._attributes): Added.
2561 (-[_WKLinkIconParameters _initWithLinkIcon:]): Convert the hash map from WebCore to a NSDictionary.
2562 (-[_WKLinkIconParameters attributes]): Added.
2564 2018-03-20 Wenson Hsieh <wenson_hsieh@apple.com>
2566 Add AssistedNodeInformation plumbing for form control placeholder text and label text
2567 https://bugs.webkit.org/show_bug.cgi?id=183802
2568 <rdar://problem/38686273>
2570 Reviewed by Tim Horton.
2572 Surfaces some additional information about the currently focused element to the input delegate in the UI process.
2573 See comments below for more details.
2575 Test: WebKit.FocusedElementInfo
2577 * Shared/AssistedNodeInformation.cpp:
2578 (WebKit::AssistedNodeInformation::encode const):
2579 (WebKit::AssistedNodeInformation::decode):
2580 * Shared/AssistedNodeInformation.h:
2582 Add `placeholder` and `label` to AssistedNodeInformation, which capture the value of the placeholder attribute
2583 and the text of the first associated label element for the focused form control. Also add boilerplate encoder/
2584 decoder support for these members.
2586 * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
2588 Augment _WKFocusedElementInfo to include placeholder and label.
2590 * UIProcess/ios/WKContentViewInteraction.mm:
2591 (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
2592 (-[WKFocusedElementInfo label]):
2593 (-[WKFocusedElementInfo placeholder]):
2594 * WebProcess/WebPage/ios/WebPageIOS.mm:
2595 (WebKit::WebPage::getAssistedNodeInformation):
2597 For input elements and textareas, set the placeholder to the value of the placeholder attribute. For all
2598 elements with associated labels, grab the inner text of the first label that is not empty, ignoring all labels
2599 that are `display: none` (i.e. not being rendered).
2601 2018-03-20 Brady Eidson <beidson@apple.com>
2603 First piece of process swapping on navigation.
2604 https://bugs.webkit.org/show_bug.cgi?id=183665
2606 Reviewed by Andy Estes.
2608 This patch adds the first pieces of the following feature:
2609 "When a navigation originating inside a WKWebView goes to a different origin,
2610 swap to a new WebProcess for that navigation"
2612 There are significant bugs to be resolved and significant optimizations to be made.
2613 Which is why the feature is disabled by default.
2615 Besides the core logic implementing the feature, this patch does a lot of related
2617 - Removing some now-invalid ASSERTs
2618 - Adding some ASSERTs
2619 - Update various switch states to handle the new "Suspend" policy and "NavigationSwap"
2620 process termination reason
2622 * NetworkProcess/NetworkDataTaskBlob.cpp:
2623 (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
2625 * NetworkProcess/capture/NetworkDataTaskReplay.cpp:
2626 (WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
2628 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
2629 (toNSURLSessionResponseDisposition):
2631 * Platform/Logging.h:
2633 * Shared/LoadParameters.cpp:
2634 (WebKit::LoadParameters::encode const):
2635 (WebKit::LoadParameters::decode):
2636 * Shared/LoadParameters.h:
2638 * Shared/ProcessTerminationReason.h: Add "NavigationSwap" as a process termination reason.
2640 * UIProcess/API/APINavigation.h:
2642 * UIProcess/API/APIProcessPoolConfiguration.cpp:
2643 (API::ProcessPoolConfiguration::copy):
2645 * UIProcess/API/C/WKAPICast.h:
2648 * UIProcess/Cocoa/NavigationState.mm:
2649 (WebKit::wkProcessTerminationReason):
2651 * UIProcess/WebFramePolicyListenerProxy.cpp:
2652 (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
2653 * UIProcess/WebFramePolicyListenerProxy.h:
2654 (WebKit::WebFramePolicyListenerProxy::create):
2655 (WebKit::WebFramePolicyListenerProxy::policyListenerType const):
2657 * UIProcess/WebFrameProxy.cpp:
2658 (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
2659 (WebKit::WebFrameProxy::activePolicyListenerProxy):
2660 * UIProcess/WebFrameProxy.h:
2662 * UIProcess/WebNavigationState.cpp:
2663 (WebKit::WebNavigationState::navigation):
2664 (WebKit::WebNavigationState::takeNavigation):
2666 * UIProcess/WebPageProxy.cpp:
2667 (WebKit::WebPageProxy::reattachToWebProcess):
2668 (WebKit::WebPageProxy::attachToProcessForNavigation): Pretend that the existing process
2669 terminated using the new "NavigationSwap" reason, then manually start the next load.
2670 (WebKit::WebPageProxy::loadRequest):
2671 (WebKit::WebPageProxy::loadRequestWithNavigation):
2672 (WebKit::WebPageProxy::receivedPolicyDecision):
2673 (WebKit::WebPageProxy::continueNavigationInNewProcess):
2674 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2675 (WebKit::WebPageProxy::decidePolicyForResponse):
2676 (WebKit::WebPageProxy::processDidTerminate):
2677 (WebKit::WebPageProxy::resetState):
2678 (WebKit::WebPageProxy::resetStateAfterProcessExited):
2679 * UIProcess/WebPageProxy.h:
2681 * UIProcess/WebProcessPool.cpp:
2682 (WebKit::WebProcessPool::processForNavigation): Determine which process should be used
2683 for a proposed navigation, creating a new one if necessary.
2684 * UIProcess/WebProcessPool.h:
2686 * UIProcess/WebStorage/StorageManager.cpp:
2687 (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
2689 * WebProcess/WebPage/WebPage.cpp:
2690 (WebKit::WebPage::loadRequest):
2692 2018-03-20 Youenn Fablet <youenn@apple.com>
2694 ServiceWorkerClientFetch::didReceiveData should check for m_encodedDataLength
2695 https://bugs.webkit.org/show_bug.cgi?id=183668
2697 Reviewed by Chris Dumez.
2699 Crash happens when releasing a RefPtr<SharedBuffer> buffer that is null.
2700 It happens because ServiceWorkerClientFetch can call m_loader->didReceiveBuffer at two different places.
2701 Either when receiving an IPC call or as part of completion handler for the response validation check.
2702 At each call site, we release the buffer to pass it to the loader and we set m_encodedLength to zero.
2703 The fix is to add the m_encodedLength check like done in the case of response validation check completion handler.
2705 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
2706 (WebKit::ServiceWorkerClientFetch::didReceiveData):
2708 2018-03-20 Jeff Miller <jeffm@apple.com>
2710 Expose aggressiveTileRetentionEnabled in WKPreferences SPI to match C SPI
2711 https://bugs.webkit.org/show_bug.cgi?id=183790
2713 Reviewed by Alex Christensen.
2715 Expose this property on macOS only.
2717 * UIProcess/API/Cocoa/WKPreferences.mm:
2718 (-[WKPreferences _setAggressiveTileRetentionEnabled:]):
2719 (-[WKPreferences _aggressiveTileRetentionEnabled]):
2720 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2722 2018-03-20 Tim Horton <timothy_horton@apple.com>
2724 Add and adopt WK_PLATFORM_NAME and adjust default feature defines
2725 https://bugs.webkit.org/show_bug.cgi?id=183758
2726 <rdar://problem/38017644>
2728 Reviewed by Dan Bernstein.
2730 * Configurations/FeatureDefines.xcconfig:
2732 2018-03-20 Chris Dumez <cdumez@apple.com>
2734 Unreviewed, rolling out r229726 and r229763.
2736 Caused some API test failures on iOS
2738 Reverted changesets:
2740 "Make policy decisions asynchronous"
2741 https://bugs.webkit.org/show_bug.cgi?id=180568
2742 https://trac.webkit.org/changeset/229726
2744 "Rebaseline three webarchive tests for WK2 after r229726."
2745 https://bugs.webkit.org/show_bug.cgi?id=180568
2746 https://trac.webkit.org/changeset/229763
2748 2018-03-20 Brent Fulgham <bfulgham@apple.com>
2750 [iOS] Grant IOKit preference access for the Home button
2751 https://bugs.webkit.org/show_bug.cgi?id=183754
2752 <rdar://problem/38179704>
2754 Reviewed by Eric Carlson.
2756 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2758 2018-03-20 Wenson Hsieh <wenson_hsieh@apple.com>
2760 [Extra zoom mode] Adopt updated input view controller machinery for text input
2761 https://bugs.webkit.org/show_bug.cgi?id=183765
2762 <rdar://problem/36926269>
2764 Reviewed by Tim Horton.
2766 Adopt new classes for extra zoomed text inputs. Massage WKTextInputViewController into WKTextInputListView-
2767 Controller and introduce WKFormControlListViewController, the eventual replacement for the base class
2768 WKTextFormControlViewController that will act as the base class of all list-view-controller-based input UI in
2771 * UIProcess/ios/WKContentViewInteraction.h:
2772 * UIProcess/ios/WKContentViewInteraction.mm:
2773 (-[WKContentView presentTextInputViewController:]):
2774 (-[WKContentView dismissTextInputViewController:]):
2775 (-[WKContentView focusedFormControllerDidUpdateSuggestions:]):
2776 (-[WKContentView _wheelChangedWithEvent:]):
2777 * UIProcess/ios/forms/WKFormControlListViewController.h: Copied from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h.
2778 * UIProcess/ios/forms/WKFormControlListViewController.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.mm.
2779 * UIProcess/ios/forms/WKTextInputListViewController.h: Copied from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h.
2780 * UIProcess/ios/forms/WKTextInputListViewController.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKTextInputViewController.h.
2781 * WebKit.xcodeproj/project.pbxproj:
2783 2018-03-19 Megan Gardner <megan_gardner@apple.com>
2785 Clear style colors when setting default appearance
2786 https://bugs.webkit.org/show_bug.cgi?id=183759
2788 Reviewed by Tim Horton.
2790 Colors are cached and need to be cleared and recalculated.
2792 * WebProcess/WebPage/WebPage.cpp:
2793 (WebKit::WebPage::setDefaultAppearance):
2795 2018-03-19 Chris Dumez <cdumez@apple.com>
2797 WKWebView.ClearAppCache is a flaky API test failure on High Sierra.
2798 https://bugs.webkit.org/show_bug.cgi?id=181546
2799 <rdar://problem/36444327>
2801 Reviewed by Ryosuke Niwa.
2803 in LocalStorageDatabaseTracker::deleteDatabasesModifiedSince(), add origin
2804 to originIdentifiersToDelete if we cannot determine the last modification
2805 time of the database file. This likely means the database file does not
2806 exist. However, we still needs to make sure the origin gets removed from
2807 the origins database and there may be *.wal / *.shm variants of the database
2808 that are still on disk and need to be deleted.
2810 * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
2811 (WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
2813 2018-03-19 Chris Dumez <cdumez@apple.com>
2815 Have one service worker process per security origin
2816 https://bugs.webkit.org/show_bug.cgi?id=183600
2817 <rdar://problem/35280128>
2819 Reviewed by Brady Eidson.
2821 Split service workers from different origins into their own processes
2822 for security reasons.
2824 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
2825 (WebKit::WebSWServerConnection::startFetch):
2826 (WebKit::WebSWServerConnection::postMessageToServiceWorker):
2827 (WebKit::WebSWServerConnection::scheduleJobInServer):
2828 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
2829 (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
2830 * StorageProcess/ServiceWorker/WebSWServerToContextConnection.h:
2831 * StorageProcess/StorageProcess.cpp:
2832 (WebKit::StorageProcess::connectionToContextProcessFromIPCConnection):
2833 (WebKit::StorageProcess::didClose):
2834 (WebKit::StorageProcess::connectionToContextProcessWasClosed):
2835 (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const):
2836 (WebKit::StorageProcess::didReceiveMessage):
2837 (WebKit::StorageProcess::createStorageToWebProcessConnection):
2838 (WebKit::StorageProcess::serverToContextConnectionForOrigin):
2839 (WebKit::StorageProcess::createServerToContextConnection):
2840 * StorageProcess/StorageProcess.h:
2841 * StorageProcess/StorageProcess.messages.in:
2842 * StorageProcess/StorageToWebProcessConnection.cpp:
2843 (WebKit::StorageToWebProcessConnection::didReceiveMessage):
2844 (WebKit::StorageToWebProcessConnection::didClose):
2845 * StorageProcess/StorageToWebProcessConnection.h:
2846 * UIProcess/API/C/WKContext.cpp:
2847 (WKContextTerminateServiceWorkerProcess):
2848 * UIProcess/API/Cocoa/WKProcessPool.mm:
2849 (-[WKProcessPool _terminateServiceWorkerProcesses]):
2850 (-[WKProcessPool _webPageContentProcessCount]):
2851 (-[WKProcessPool _serviceWorkerProcessCount]):
2852 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2853 * UIProcess/Network/NetworkProcessProxy.cpp:
2854 (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
2855 (WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace):
2856 * UIProcess/ServiceWorkerProcessProxy.cpp:
2857 (WebKit::ServiceWorkerProcessProxy::create):
2858 (WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
2859 * UIProcess/ServiceWorkerProcessProxy.h:
2861 * UIProcess/Storage/StorageProcessProxy.cpp:
2862 (WebKit::StorageProcessProxy::getStorageProcessConnection):
2863 (WebKit::StorageProcessProxy::didFinishLaunching):
2864 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess):
2865 (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession):
2866 * UIProcess/Storage/StorageProcessProxy.h:
2867 * UIProcess/Storage/StorageProcessProxy.messages.in:
2868 * UIProcess/WebProcessPool.cpp:
2869 (WebKit::WebProcessPool::getStorageProcessConnection):
2870 (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
2871 (WebKit::WebProcessPool::createNewWebProcess):
2872 (WebKit::WebProcessPool::disconnectProcess):
2873 (WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
2874 (WebKit::WebProcessPool::createWebPage):
2875 (WebKit::WebProcessPool::updateServiceWorkerUserAgent):
2876 (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
2877 (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
2878 (WebKit::WebProcessPool::terminateServiceWorkerProcesses):
2879 (WebKit::WebProcessPool::updateProcessAssertions):
2880 (WebKit::WebProcessPool::serviceWorkerProcessProxyFromPageID const):
2881 * UIProcess/WebProcessPool.h:
2882 * UIProcess/WebProcessProxy.cpp:
2883 (WebKit::WebProcessProxy::getStorageProcessConnection):
2885 2018-03-19 Jiewen Tan <jiewen_tan@apple.com>
2887 Unreviewed, another quick fix for r229699
2889 Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
2891 * Configurations/FeatureDefines.xcconfig:
2893 2018-03-19 Chris Dumez <cdumez@apple.com>
2895 Make policy decisions asynchronous
2896 https://bugs.webkit.org/show_bug.cgi?id=180568
2897 <rdar://problem/37131297>
2899 Reviewed by Alex Christensen.
2901 Get rid of synchronous IPC and synchronous code paths for policy delegates.
2902 Policy decisions are now all made asynchronously and rely on asynchronous
2905 This code change is based on work by Alex Christensen.
2907 * UIProcess/WebPageProxy.cpp:
2908 (WebKit::WebPageProxy::receivedPolicyDecision):
2909 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2910 (WebKit::WebPageProxy::decidePolicyForResponse):
2911 * UIProcess/WebPageProxy.h:
2912 * UIProcess/WebPageProxy.messages.in:
2913 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2914 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2915 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2917 2018-03-19 Brian Burg <bburg@apple.com>
2919 Web Inspector: clean up WKWebView configuration code
2920 https://bugs.webkit.org/show_bug.cgi?id=183747
2921 <rdar://problem/38629343>
2923 Reviewed by Timothy Hatcher.
2925 * UIProcess/mac/WKInspectorViewController.mm:
2926 (-[WKInspectorViewController webView]): Always use system
2927 appearance for Inspector's web content.
2929 2018-03-19 Eric Carlson <eric.carlson@apple.com>
2931 [Extra zoom mode] Require fullscreen for video playback
2932 https://bugs.webkit.org/show_bug.cgi?id=183742
2933 <rdar://problem/38235862>
2935 Reviewed by Jer Noble.
2937 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
2938 * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
2939 (-[WKVideoFullScreenViewController initWithAVPlayerViewController:]):
2940 (-[WKVideoFullScreenViewController viewDidLoad]):
2941 (-[WKVideoFullScreenViewController prefersStatusBarHidden]):
2942 (WebKit::VideoFullscreenModelContext::presentingViewController):
2943 (WebKit::VideoFullscreenModelContext::createVideoFullscreenViewController):
2944 * WebProcess/cocoa/VideoFullscreenManager.mm:
2945 (WebKit::VideoFullscreenManager::didEnterFullscreen):
2947 2018-03-19 Daniel Bates <dabates@apple.com>
2949 test-webkitpy no longer runs WebKit2 tests
2950 https://bugs.webkit.org/show_bug.cgi?id=183724
2952 Reviewed by Alexey Proskuryakov.
2954 Fixes an issue where Python emits errors "global name reset_results is not defined" when
2955 running tests in messages_unittest.py using test-webkitpy.
2957 Currently messages_unittest.py conditionally defines the global variable reset_results
2958 when run as the main program (i.e. __name__ == "__main__"). When messages_unittest.py is
2959 imported as a module as test-webkitpy does then it is not considered the main program
2960 ;=> the top-level script environment is not __main__ ;=> we do not define the global
2961 variable reset_results. Instead we should unconditionally define the global variable
2964 * Scripts/webkit/messages_unittest.py:
2966 2018-03-19 Per Arne Vollan <pvollan@apple.com>
2968 When the WebContent process is blocked from accessing the WindowServer, the call CVDisplayLinkCreateWithCGDisplay will fail.
2969 https://bugs.webkit.org/show_bug.cgi?id=183604
2970 <rdar://problem/38305109>
2972 Reviewed by Brent Fulgham.
2974 * UIProcess/WebPageProxy.h:
2975 * UIProcess/WebPageProxy.messages.in:
2976 * UIProcess/mac/DisplayLink.cpp: Added.
2977 (WebKit::DisplayLink::DisplayLink):
2978 (WebKit::DisplayLink::~DisplayLink):
2979 (WebKit::DisplayLink::displayLinkCallback):
2980 * UIProcess/mac/DisplayLink.h: Added.
2981 * UIProcess/mac/WebPageProxyMac.mm:
2982 (WebKit::WebPageProxy::startDisplayRefreshMonitor):
2983 (WebKit::WebPageProxy::stopDisplayRefreshMonitor):
2984 * WebKit.xcodeproj/project.pbxproj:
2985 * WebProcess/WebPage/DrawingArea.cpp:
2986 (WebKit::DrawingArea::createDisplayRefreshMonitor):
2987 * WebProcess/WebPage/DrawingArea.h:
2988 * WebProcess/WebPage/DrawingArea.messages.in:
2989 * WebProcess/WebPage/mac/DrawingAreaMac.cpp: Added.
2990 (WebKit::DisplayRefreshMonitorMac::create):
2991 (WebKit::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
2992 (WebKit::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
2993 (WebKit::DisplayRefreshMonitorMac::requestRefreshCallback):
2994 (WebKit::DisplayRefreshMonitorMac::displayLinkFired):
2995 (WebKit::DrawingArea::screenWasRefreshed):
2996 (WebKit::DrawingArea::createDisplayRefreshMonitor):
2998 2018-03-17 Jiewen Tan <jiewen_tan@apple.com>
3000 [WebAuthN] Implement authenticatorMakeCredential
3001 https://bugs.webkit.org/show_bug.cgi?id=183527
3002 <rdar://problem/35275886>
3004 Reviewed by Brent Fulgham.
3006 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
3007 (WebKit::WebCredentialsMessengerProxy::WebCredentialsMessengerProxy):
3008 (WebKit::WebCredentialsMessengerProxy::makeCredential):
3009 (WebKit::WebCredentialsMessengerProxy::getAssertion):
3010 (WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailable):
3011 (WebKit::WebCredentialsMessengerProxy::exceptionReply):
3012 (WebKit::WebCredentialsMessengerProxy::makeCredentialReply):
3013 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
3014 * UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
3015 * UIProcess/CredentialManagement/cocoa/WebCredentialsMessengerProxyCocoa.mm: Removed.
3016 * WebKit.xcodeproj/project.pbxproj:
3017 * WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
3018 (WebKit::WebCredentialsMessenger::makeCredential):
3019 (WebKit::WebCredentialsMessenger::makeCredentialReply):
3020 * WebProcess/CredentialManagement/WebCredentialsMessenger.h:
3021 * WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:
3023 2018-03-17 Daniel Bates <dabates@apple.com>
3025 Tests fail in messages_unittest.py
3026 https://bugs.webkit.org/show_bug.cgi?id=183725
3028 Partial revert of r222113. The messages generator machinery does not know when
3029 it is sufficient to emit an include for wtf/Forward.h as opposed to a concrete
3032 * Scripts/webkit/LegacyMessages-expected.h:
3033 * Scripts/webkit/Messages-expected.h:
3035 2018-03-16 Wenson Hsieh <wenson_hsieh@apple.com>
3037 Unreviewed, rolling out r229688.
3039 There's a solution that doesn't require this SPI.
3043 "Add SPI to expose width and height anchors for WKWebView's
3045 https://bugs.webkit.org/show_bug.cgi?id=183711
3046 https://trac.webkit.org/changeset/229688
3048 2018-03-16 Wenson Hsieh <wenson_hsieh@apple.com>
3050 Add SPI to expose width and height anchors for WKWebView's content view
3051 https://bugs.webkit.org/show_bug.cgi?id=183711
3052 <rdar://problem/38562899>
3054 Reviewed by Tim Horton.
3056 Add _contentWidthAnchor and _contentHeightAnchor SPI to WKWebView for internal clients to be able to reason
3057 about the size of the content view on iOS using autolayout.
3059 Test: WebKit.AutoLayoutPositionHeaderAndFooterViewsInScrollView.
3061 * UIProcess/API/Cocoa/WKWebView.mm:
3062 (-[WKWebView _contentWidthAnchor]):
3063 (-[WKWebView _contentHeightAnchor]):
3064 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3066 2018-03-16 Megan Gardner <megan_gardner@apple.com>
3068 Add _useSystemAppearance to WKView
3069 https://bugs.webkit.org/show_bug.cgi?id=183706
3070 <rdar://problem/38516584>
3072 Reviewed by Tim Horton.
3074 Plumb useSystemAppearance and other supporting functions to WKView
3076 * UIProcess/API/Cocoa/WKViewPrivate.h:
3077 * UIProcess/API/Cocoa/WKWebView.mm:
3078 (-[WKWebView _initializeWithConfiguration:]):
3079 (-[WKWebView _useSystemAppearance]):
3080 (-[WKWebView _setUseSystemAppearance:]):
3081 (-[WKWebView effectiveAppearanceDidChange]):
3082 * UIProcess/API/mac/WKView.mm:
3083 (-[WKView effectiveAppearanceDidChange]):
3084 (-[WKView _setUseSystemAppearance:]):
3085 (-[WKView _useSystemAppearance]):
3086 (-[WKView _setDefaultAppearance:]):
3087 * UIProcess/Cocoa/WebViewImpl.h:
3088 * UIProcess/Cocoa/WebViewImpl.mm:
3089 (WebKit::WebViewImpl::setUseSystemAppearance):
3090 (WebKit::WebViewImpl::useSystemAppearance):
3091 (WebKit::WebViewImpl::setDefaultAppearance):
3093 2018-03-16 Brent Fulgham <bfulgham@apple.com>
3095 Set a trap to catch an infrequent form-related nullptr crash
3096 https://bugs.webkit.org/show_bug.cgi?id=183704
3097 <rdar://problem/37579354>
3099 Reviewed by Ryosuke Niwa.
3101 Add a RELEASE_ASSERT to see if we ever encounter a nullptr WebCore frame.
3103 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3104 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
3106 2018-03-16 Jer Noble <jer.noble@apple.com>
3108 Make Fullscreen API an Experimental Feature
3109 https://bugs.webkit.org/show_bug.cgi?id=183662
3111 Reviewed by Jon Lee.
3113 Add the ability to have a conditional for whether an Experimental Feature is "visible", separate from
3114 whether the preference is available, for definining platform-specific Experimental Features.
3116 * Scripts/GeneratePreferences.rb:
3117 * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
3118 * Shared/WebPreferences.yaml:
3120 2018-03-16 Megan Gardner <megan_gardner@apple.com>
3122 Ensure that style is updated when the effective appearance changes
3123 https://bugs.webkit.org/show_bug.cgi?id=183690
3124 <rdar://problem/38385900>
3126 Reviewed by Tim Horton and Wenson Hsieh.
3128 Respond to and respect the effective appearance changing.
3130 * UIProcess/API/Cocoa/WKWebView.mm:
3131 (-[WKWebView effectiveAppearanceDidChange]):
3132 * WebProcess/WebPage/WebPage.cpp:
3133 (WebKit::WebPage::setDefaultAppearance):
3135 2018-03-16 Chris Dumez <cdumez@apple.com>
3137 URLSchemeHandler.Basic API test fails with async policy delegates
3138 https://bugs.webkit.org/show_bug.cgi?id=183678
3140 Reviewed by Alex Christensen.
3142 The issue is that the client calls _didPerformRedirection / didReceiveResponse / didReceiveData / didFinish
3143 on the URLScheme task one after the one, synchronously. However, redirects and responses can be processed
3144 asynchronously. To address the issue, we now queue operations requested by the client if we're waiting
3145 for an async policy delegate.
3147 * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
3148 (WebKit::WebURLSchemeTaskProxy::didPerformRedirection):
3149 (WebKit::WebURLSchemeTaskProxy::didReceiveResponse):
3150 (WebKit::WebURLSchemeTaskProxy::didReceiveData):
3151 (WebKit::WebURLSchemeTaskProxy::didComplete):
3152 (WebKit::WebURLSchemeTaskProxy::processNextPendingTask):
3153 * WebProcess/WebPage/WebURLSchemeTaskProxy.h:
3154 (WebKit::WebURLSchemeTaskProxy::queueTask):
3156 2018-03-16 Claudio Saavedra <csaavedra@igalia.com>
3158 Suppress GCC warnings by using #include instead of #import
3161 * UIProcess/SystemPreviewController.cpp:
3163 2018-03-15 Keith Rollin <krollin@apple.com>
3165 Telemetry for stalled webpage loads
3166 https://bugs.webkit.org/show_bug.cgi?id=183221
3167 <rdar://problem/36549013>
3169 Reviewed by Chris Dumez.
3171 Add telemetry for page loads, tracking the pages that succeed, fail,
3172 or are canceled. This information will be used to track the overall
3173 health of our page loading as time goes on.
3175 * UIProcess/WebPageProxy.cpp:
3176 (WebKit::WebPageProxy::close):
3177 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3178 (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
3179 (WebKit::WebPageProxy::didFinishLoadForFrame):
3180 (WebKit::WebPageProxy::didFailLoadForFrame):
3181 (WebKit::WebPageProxy::reportPageLoadResult):
3182 * UIProcess/WebPageProxy.h:
3183 (WebKit::WebPageProxy::reportPageLoadResult):
3185 2018-03-15 Wenson Hsieh <wenson_hsieh@apple.com>
3187 [iOS WK2] Hit-testing fails when specifying a large top content inset
3188 https://bugs.webkit.org/show_bug.cgi?id=183648
3189 <rdar://problem/38421894>
3191 Reviewed by Tim Horton.
3193 Currently, in the process of computing unobscured content rect in the UI process on iOS, we subtract away parts
3194 of the view that are obscured by insets (e.g. MobileSafari's chrome). The helper method -[WKWebView
3195 _computeContentInset] is intended to compute these obscuring insets around the view, but it takes scroll view
3196 insets into account. This means that if WKWebView's inner scroll view has content insets, we'll end up shrinking
3197 the unobscured content rect as if the insetted region obscures the viewport; this causes visible content on the
3198 page to be uninteractible, since WKWebView erroneously thinks it's obscured.
3200 To address this, we rename _computeContentInset to _computeObscuredInset, and make it _not_ affected by the
3201 scroll view's content insets. From code inspection and testing, all but one of the former call sites of
3202 _computeContentInset really need the obscured inset instead (see below). The one exception, -[WKWebView
3203 _adjustedContentOffset:], takes a scroll position from the page and maps it to a content offset in the inner
3204 UIScrollView (see below for more details).
3206 Tests: ScrollViewInsetTests.InnerHeightWithLargeTopContentInset
3207 ScrollViewInsetTests.InnerHeightWithLargeBottomContentInset
3208 ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash
3209 ScrollViewInsetTests.RestoreInitialContentOffsetAfterNavigation
3211 * UIProcess/API/Cocoa/WKWebView.mm:
3212 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
3213 (-[WKWebView _initialContentOffsetForScrollView]):
3215 See -_contentOffsetAdjustedForObscuredInset: below.
3217 (-[WKWebView _contentOffsetAdjustedForObscuredInset:]):
3219 Formerly -_adjustedContentOffset:. -_contentOffsetAdjustedForObscuredInset: no longer takes scroll view content
3220 inset into account, and only cares about insets that obscure the view. This means that the scroll position
3221 (0, 0) in the document now maps to the content offset in the inner UIScrollView, such that the top of the page
3222 is aligned with the top of the viewport.
3224 However, many call sites of -_adjustedContentOffset: were intended to compute the initial, top-left-most content
3225 offset in the scroll view to scroll to when resetting the web view (i.e., they pass in CGPointZero for the
3226 scroll position). An example of this is the scroll position to jump to after web content process termination, or
3227 the scroll position after main frame navigation. In these cases, we actually want to jump to the top of the
3228 scroll view, so we do want to use the version of the computed content insets that accounts for scroll view
3231 Since these cases are limited to finding the top-left-most scroll position, we pull this out into a separate
3232 helper method (-_initialContentOffsetForScrollView) and replace calls to
3233 `-[self _adjustedContentOffset:CGPointZero]` with this instead.
3235 (-[WKWebView _computedObscuredInset]):
3237 A version of -_computeContentInset that doesn't care about scroll view insets. Used whereever we need to account
3238 for obscured insets rather than the combination of content insets and unobscured insets (e.g.
3239 -_initialContentOffsetForScrollView).
3241 (-[WKWebView _processDidExit]):
3242 (-[WKWebView _didCommitLayerTree:]):
3243 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
3244 (-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]):
3245 (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
3246 (-[WKWebView _updateVisibleContentRects]):
3247 (-[WKWebView _navigationGestureDidBegin]):
3249 In all these places where we inset the view bounds to compute the unobscured region of the viewport, it doesn't
3250 make sense to additionally inset by the scroll view's content insets, since (1) the scroll view's content insets
3251 don't obscure the viewport, and (2) it's perfectly valid for the inner scroll view to have arbitrarily large
3254 (-[WKWebView _adjustedContentOffset:]): Deleted.
3256 Renamed to -_contentOffsetAdjustedForObscuredInset:.
3258 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3259 * UIProcess/ios/WKPDFView.mm:
3260 (-[WKPDFView _offsetForPageNumberIndicator]):
3262 Similar to -_scrollToFragment: (see below).
3264 (-[WKPDFView _scrollToFragment:]):
3266 This helper figures out which content offset to scroll to, given the y-origin of a page in a PDF document. If
3267 insets are added to the scroll view, we end up scrolling to the wrong content offset since we'll add the height
3268 of the top content inset (imagine that the top content inset is enormous โ then we'll scroll an amount equal to
3269 the top content inset _past_ the point where the y-origin of the page is at the top of the viewport).
3271 2018-03-15 Brent Fulgham <bfulgham@apple.com>
3273 [macOS] Correct sandbox violations during Flash playback under ToT WebKit
3274 https://bugs.webkit.org/show_bug.cgi?id=183672
3275 <rdar://problem/38510839>
3277 Reviewed by Eric Carlson.
3279 * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
3280 * WebProcess/com.apple.WebProcess.sb.in:
3282 2018-03-15 Brent Fulgham <bfulgham@apple.com>
3284 REGRESSION(r229484): Plugins often require CGS Connections to draw
3285 https://bugs.webkit.org/show_bug.cgi?id=183663
3286 <rdar://problem/38439218>
3288 Reviewed by Per Arne Vollan.
3290 Flash requires an active CGSConnection to work properly. Since we don't want the WebContent
3291 process to have on, create a new plugin process-specific layer host creation method that
3294 * Platform/mac/LayerHostingContext.h:
3295 * Platform/mac/LayerHostingContext.mm:
3296 (WebKit::LayerHostingContext::createForExternalPluginHostingProcess): Added.
3297 * PluginProcess/mac/PluginControllerProxyMac.mm:
3298 (WebKit::PluginControllerProxy::updateLayerHostingContext): Use the new creation
3301 2018-03-15 Zan Dobersek <zdobersek@igalia.com>
3303 [TexMap] Remove TextureMapperLayer::texture()
3304 https://bugs.webkit.org/show_bug.cgi?id=183635
3306 Reviewed by Michael Catanzaro.
3308 Remove the CoordinatedBackingStore::texture() override since the virtual
3309 method is also being removed.
3311 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
3312 (WebKit::CoordinatedBackingStore::texture const): Deleted.
3313 * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
3315 2018-03-14 John Wilander <wilander@apple.com>
3317 Resource Load Statistics: Add clearing of storage access to WebResourceLoadStatisticsStore::clearInMemory()
3318 https://bugs.webkit.org/show_bug.cgi?id=183641
3319 <rdar://problem/38469497>
3321 Reviewed by Brent Fulgham and Chris Dumez.
3323 This change is to stabilize existing layout tests by removing
3324 all storage access entries on a call to
3325 WebResourceLoadStatisticsStore::clearInMemory().
3326 See Ryan Haddad's comment in https://bugs.webkit.org/show_bug.cgi?id=183620.
3328 Almost all of the code changes are piping to get this
3329 call from the WebResourceLoadStatisticsStore to
3330 WebCore::NetworkStorageSession where entries reside.
3332 * NetworkProcess/NetworkProcess.cpp:
3333 (WebKit::NetworkProcess::removeAllStorageAccess):
3334 * NetworkProcess/NetworkProcess.h:
3335 * NetworkProcess/NetworkProcess.messages.in:
3336 * UIProcess/Network/NetworkProcessProxy.cpp:
3337 (WebKit::NetworkProcessProxy::removeAllStorageAccess):
3338 * UIProcess/Network/NetworkProcessProxy.h:
3339 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3340 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3341 (WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
3342 (WebKit::WebResourceLoadStatisticsStore::clearInMemory):
3343 Now also clears all storage access entries in the network process.
3344 * UIProcess/WebResourceLoadStatisticsStore.h:
3345 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3346 (WebKit::WebsiteDataStore::removeAllStorageAccessHandler):
3347 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3348 * UIProcess/WebsiteData/WebsiteDataStore.h:
3350 2018-03-14 Ryan Haddad <ryanhaddad@apple.com>
3352 Unreviewed, rolling out r229613.
3354 Caused API test failures
3358 "Make policy decisions asynchronous"
3359 https://bugs.webkit.org/show_bug.cgi?id=180568
3360 https://trac.webkit.org/changeset/229613
3362 2018-03-14 Chris Dumez <cdumez@apple.com>
3364 Reduce use of SWServerToContextConnection::globalServerToContextConnection()
3365 https://bugs.webkit.org/show_bug.cgi?id=183626
3367 Reviewed by Youenn Fablet.
3369 Reduce use of SWServerToContextConnection::globalServerToContextConnection() as we are moving
3370 towards having multiple context connections.
3372 * StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
3373 (WebKit::WebSWServerConnection::startFetch):
3374 (WebKit::WebSWServerConnection::postMessageToServiceWorker):
3376 2018-03-14 Chris Dumez <cdumez@apple.com>
3378 Make policy decisions asynchronous
3379 https://bugs.webkit.org/show_bug.cgi?id=180568
3380 <rdar://problem/37131297>
3382 Reviewed by Alex Christensen.
3384 Get rid of synchronous IPC and synchronous code paths for policy delegates.
3385 Policy decisions are now all made asynchronously and rely on asynchronous
3388 This code change is based on work by Alex Christensen.
3390 * UIProcess/WebPageProxy.cpp:
3391 (WebKit::WebPageProxy::receivedPolicyDecision):
3392 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3393 (WebKit::WebPageProxy::decidePolicyForResponse):
3394 * UIProcess/WebPageProxy.h:
3395 * UIProcess/WebPageProxy.messages.in:
3396 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3397 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3398 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3400 2018-03-14 Chris Dumez <cdumez@apple.com>
3402 Drop unnecessary StorageToWebProcessConnection::workerContextProcessConnectionCreated()
3403 https://bugs.webkit.org/show_bug.cgi?id=183624
3405 Reviewed by Youenn Fablet.
3407 Drop unnecessary StorageToWebProcessConnection::workerContextProcessConnectionCreated()
3408 since it was going through all SWServers. Calling workerContextProcessConnectionCreated()
3409 on every StorageToWebProcessConnection was thus doing redundant work.
3411 * StorageProcess/StorageProcess.cpp:
3412 (WebKit::StorageProcess::createStorageToWebProcessConnection):
3413 * StorageProcess/StorageToWebProcessConnection.cpp:
3414 (WebKit::StorageToWebProcessConnection::establishSWServerConnection):
3415 (WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated): Deleted.
3416 * StorageProcess/StorageToWebProcessConnection.h:
3418 2018-03-14 Tim Horton <timothy_horton@apple.com>
3420 Fix the build after r229567
3422 * Configurations/FeatureDefines.xcconfig:
3424 2018-03-13 John Wilander <wilander@apple.com>
3426 Resource Load Statistics: Immediately forward cookie access for domains with previous user interaction when there's an opener document
3427 https://bugs.webkit.org/show_bug.cgi?id=183620
3428 <rdar://problem/38431469>
3430 Reviewed by Brent Fulgham.
3432 It turns out the fix in https://bugs.webkit.org/show_bug.cgi?id=183577
3433 wasn't enough to address the compatibility issues with popups. Some of
3434 them just detect their unpartitioned cookies, auto-dismiss themselves,
3435 and expect their unpartitioned cookies to be available under the opener
3436 afterwards. We should grant them access if the popup's domain has had
3437 user interaction _previously_.
3439 Note that we still need https://bugs.webkit.org/show_bug.cgi?id=183577
3440 because if the popup's domain has not received user interaction
3441 previously, we will not grant it storage access on just the window open.
3443 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3444 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):
3445 (WebKit::WebResourceLoadStatisticsStore::grantStorageAccessUnderOpener): Deleted.
3446 Renamed WebResourceLoadStatisticsStore::grantStorageAccessUnderOpener()
3447 to WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener()
3448 since there is now a case where access will not be granted, i.e. when
3449 the popup domain has not had user interaction previously.
3450 * UIProcess/WebResourceLoadStatisticsStore.h:
3451 * UIProcess/WebResourceLoadStatisticsStore.messages.in:
3453 * WebProcess/WebProcess.cpp:
3454 (WebProcess::WebProcess):
3457 2018-03-13 Jer Noble <jer.noble@apple.com>
3459 Add missing artwork for fullscreen mode.
3460 https://bugs.webkit.org/show_bug.cgi?id=183618
3462 Reviewed by Jon Lee.
3464 * Resources/ios/iOS.xcassets/Done.imageset/Contents.json: Added.
3465 * Resources/ios/iOS.xcassets/Done.imageset/Done.pdf: Added.
3466 * Resources/ios/iOS.xcassets/StartPictureInPictureButton.imageset/Contents.json: Added.
3467 * Resources/ios/iOS.xcassets/StartPictureInPictureButton.imageset/StartPictureInPictureButton@1x.png: Added.
3468 * Resources/ios/iOS.xcassets/StartPictureInPictureButton.imageset/StartPictureInPictureButton@2x.png: Added.
3469 * Resources/ios/iOS.xcassets/StartPictureInPictureButton.imageset/StartPictureInPictureButton@3x.png: Added.
3470 * Resources/ios/iOS.xcassets/StopPictureInPictureButton.imageset/Contents.json: Added.
3471 * Resources/ios/iOS.xcassets/StopPictureInPictureButton.imageset/StopPictureInPictureButton@1x.png: Added.
3472 * Resources/ios/iOS.xcassets/StopPictureInPictureButton.imageset/StopPictureInPictureButton@2x.png: Added.
3473 * Resources/ios/iOS.xcassets/StopPictureInPictureButton.imageset/StopPictureInPictureButton@3x.png: Added.
3475 2018-03-13 Brian Burg <bburg@apple.com>
3477 [WK2] Web Inspector: NavigationAction for opening a link in a new tab should have a UserGestureIndicator
3478 https://bugs.webkit.org/show_bug.cgi?id=183612
3479 <rdar://problem/38388641>
3481 Reviewed by Timothy Hatcher.
3483 The current gesture token will be attached to the NavigationAction at construction time,
3484 so set up a UserGestureIndicator when creating the action and sending it out.
3486 * WebProcess/WebPage/WebInspector.cpp:
3487 (WebKit::WebInspector::openInNewTab):
3489 2018-03-13 Dean Jackson <dino@apple.com>
3491 WKSystemPreviewView needs to implement some of UIScrollViewDelegate
3492 https://bugs.webkit.org/show_bug.cgi?id=183607
3493 <rdar://problem/38427622>
3495 Reviewed by Antoine Quint.
3497 Add an empty implementation of scrollViewDidScroll.
3499 * UIProcess/ios/WKSystemPreviewView.mm:
3500 (-[WKSystemPreviewView scrollViewDidScroll:]):
3502 2018-03-13 Jiewen Tan <jiewen_tan@apple.com>
3504 Soft-link LocalAuthentication.Framework
3505 https://bugs.webkit.org/show_bug.cgi?id=183587
3506 <rdar://problem/38219763>
3508 Reviewed by Brian Burg.
3510 * UIProcess/CredentialManagement/cocoa/WebCredentialsMessengerProxyCocoa.mm:
3511 (WebKit::WebCredentialsMessengerProxy::platformIsUserVerifyingPlatformAuthenticatorAvailable):
3512 * WebKit.xcodeproj/project.pbxproj:
3514 2018-03-12 Dean Jackson <dino@apple.com>
3516 Add a WKWebViewContentProvider for system previews
3517 https://bugs.webkit.org/show_bug.cgi?id=183582
3518 <rdar://problem/38393569>
3520 Reviewed by Tim Horton.
3522 Implement WKSystemPreviewView, which conforms to WKWebViewContentProvider, in
3523 order to view content as a "system preview". This effectively replaces the
3524 SystemPreviewController, which will be removed soon.
3526 Some of the required methods of WKWebViewContentProvider are not necessary on
3527 this instance, so a follow-up patch will clean the protocol up a bit.
3529 * UIProcess/Cocoa/NavigationState.mm: Don't trigger a SystemPreview when downloading.
3530 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
3532 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
3533 (-[WKWebViewContentProviderRegistry init]): Register the WKSystemPreviewView for
3534 MIME types retrieved from WebKitAdditions.
3536 * UIProcess/ios/WKSystemPreviewView.h: Added.
3537 * UIProcess/ios/WKSystemPreviewView.mm: Added.
3539 (-[WKSystemPreviewView web_initWithFrame:webView:]):
3540 (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]): This is the
3541 method that actually creates a QuickLook preview and provides the data.
3542 (-[WKSystemPreviewView web_setMinimumSize:]):
3543 (-[WKSystemPreviewView web_setOverlaidAccessoryViewsInset:]):
3544 (-[WKSystemPreviewView web_computedContentInsetDidChange]):
3545 (-[WKSystemPreviewView web_setFixedOverlayView:]):
3546 (-[WKSystemPreviewView web_didSameDocumentNavigation:]):
3547 (-[WKSystemPreviewView web_countStringMatches:options:maxCount:]):
3548 (-[WKSystemPreviewView web_findString:options:maxCount:]):
3549 (-[WKSystemPreviewView web_hideFindUI]):
3551 (-[WKSystemPreviewView numberOfPreviewItemsInPreviewController:]): QuickLook delegates.
3552 (-[WKSystemPreviewView previewController:previewItemAtIndex:]):
3553 (-[WKSystemPreviewView provideDataForItem:]):
3554 (-[WKSystemPreviewView previewControllerWillDismiss:]):
3556 * WebKit.xcodeproj/project.pbxproj: Add new files.
3558 2018-03-12 John Wilander <wilander@apple.com>
3560 Resource Load Statistics: Immediately forward cookie access at user interaction when there's an opener document
3561 https://bugs.webkit.org/show_bug.cgi?id=183577
3562 <rdar://problem/38266987>
3564 Reviewed by Brent Fulgham.
3566 * NetworkProcess/NetworkProcess.cpp:
3567 (WebKit::NetworkProcess::hasStorageAccessForFrame):
3568 Now also checks for general page access.
3569 (WebKit::NetworkProcess::grantStorageAccess):
3570 Renamed from grantStorageAccessForFrame since the frameID now is optional.
3571 (WebKit::NetworkProcess::grantStorageAccessForFrame): Deleted.
3572 Renamed since the frameID now is optional.
3573 * NetworkProcess/NetworkProcess.h:
3574 Renaming since the frameID now is optional.
3575 * NetworkProcess/NetworkProcess.messages.in:
3576 Renaming since the frameID now is optional.
3577 * NetworkProcess/NetworkResourceLoader.cpp:
3578 (WebKit::NetworkResourceLoader::logCookieInformation):
3579 Consequence of function renaming.
3580 * UIProcess/Network/NetworkProcessProxy.cpp:
3581 (WebKit::NetworkProcessProxy::grantStorageAccess):
3582 (WebKit::NetworkProcessProxy::grantStorageAccessForFrame): Deleted.
3583 Renaming since the frameID now is optional.
3584 * UIProcess/Network/NetworkProcessProxy.h:
3585 * UIProcess/WebResourceLoadStatisticsStore.cpp:
3586 (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
3587 Renaming since the frameID now is optional.
3588 (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess):
3589 Handler renaming since the frameID now is optional.
3590 (WebKit::WebResourceLoadStatisticsStore::grantStorageAccessUnderOpener):
3591 New function for that grants cookie access under a whole page.
3592 * UIProcess/WebResourceLoadStatisticsStore.h:
3593 Member renaming since the frameID now is optional.
3594 * UIProcess/WebResourceLoadStatisticsStore.messages.in:
3595 New message received straight from WebCore::ResourceLoadObserver.
3596 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3597 (WebKit::WebsiteDataStore::grantStorageAccessHandler):
3598 Renamed and made frameID optional.
3599 (WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
3600 Consequence of renaming and making frameID optional.
3601 (WebKit::WebsiteDataStore::grantStorageAccessForFrameHandler): Deleted.
3602 Renamed and made frameID optional.
3603 * UIProcess/WebsiteData/WebsiteDataStore.h:
3604 * WebProcess/WebProcess.cpp:
3605 (WebProcess::WebProcess):
3606 Now calls setGrantStorageAccessUnderOpenerCallback() on the shared
3607 WebCore::ResourceLoadObserver.
3609 2018-03-12 Tim Horton <timothy_horton@apple.com>
3611 Stop using SDK conditionals to control feature definitions
3612 https://bugs.webkit.org/show_bug.cgi?id=183430
3613 <rdar://problem/38251619>
3615 Reviewed by Dan Bernstein.
3617 * Configurations/FeatureDefines.xcconfig:
3618 * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
3620 2018-03-12 Yoav Weiss <yoav@yoav.ws>
3622 Runtime flag for link prefetch and remove link subresource.
3623 https://bugs.webkit.org/show_bug.cgi?id=183540
3625 Reviewed by Chris Dumez.
3627 Remove the LINK_PREFETCH build time flag.
3629 * Configurations/FeatureDefines.xcconfig:
3630 * WebProcess/Network/WebLoaderStrategy.cpp:
3631 (WebKit::maximumBufferingTime):
3633 2018-03-12 Chris Dumez <cdumez@apple.com>
3635 Load may get committed before receiving policy for the resource response
3636 https://bugs.webkit.org/show_bug.cgi?id=183579
3637 <rdar://problem/38268780>
3639 Reviewed by Youenn Fablet.
3641 r228852 updated WebResourceLoader::didReceiveResponse to only send the
3642 ContinueDidReceiveResponse IPC back to the Networkprocess *after* the
3643 policy decision for the resource response has been made. This is necessary
3644 now that policy decisions can be made asynchronously.
3646 However, one of the 2 code paths in NetworkProcess side (code path when
3647 the resource is already in the HTTP disk cache) failed to wait for the
3648 ContinueDidReceiveResponse IPC before sending over the data to the WebProcess.
3649 As a result, the WebProcess could commit the load before even receiving the
3650 policy response from the client.
3652 * NetworkProcess/NetworkResourceLoader.cpp:
3653 (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
3654 (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
3655 (WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse):
3656 * NetworkProcess/NetworkResourceLoader.h:
3657 Make sure NetworkResourceLoader::didRetrieveCacheEntry() does not start sending the data
3658 until the network process gets the ContinueDidReceiveResponse IPC back from the WebProcess.
3660 * WebProcess/Network/WebResourceLoader.cpp:
3661 (WebKit::WebResourceLoader::didReceiveResponse):
3662 (WebKit::WebResourceLoader::didReceiveData):
3663 * WebProcess/Network/WebResourceLoader.h:
3664 Add assertion to make sure didReceiveData() never gets called before didReceiveResponse's
3665 completion handler has been called. If this hits, then the load may get committed even
3666 though the client did not reply to the policy for the resource response yet.
3668 2018-03-12 Ali Juma <ajuma@chromium.org>
3670 http/tests/workers/service/service-worker-download.https.html times out with async policy delegates
3671 https://bugs.webkit.org/show_bug.cgi?id=183479
3673 Reviewed by Youenn Fablet.
3675 Ensure that ServiceWorkerFetchClient::m_isCheckingResponse is set before code that depends on it
3676 executes. This bit was set by code that's posted to the runloop using 'callOnMainThread' in
3677 ServiceWorkerFetchClient::didReceiveResponse. But when didReceiveResponse is executing, tasks for
3678 handling didReceiveData, didFail, or didFinish may already have been posted to the runloop, and in
3679 that case would execute before m_isCheckingResponse gets set, and then incorrectly fail to
3680 early-out. Fix this by directly setting m_isCheckingResponse in didReceiveResponse.
3682 * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
3683 (WebKit::ServiceWorkerClientFetch::start):
3684 (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
3686 2018-03-12 Wenson Hsieh <wenson_hsieh@apple.com>
3688 REGRESSION(r211643): Dismissing WKActionSheet should not also dismiss its presenting view controller
3689 https://bugs.webkit.org/show_bug.cgi?id=183549
3690 <rdar://problem/34960698>
3692 Reviewed by Andy Estes.
3694 Fixes the bug by dismissing the presented view controller (i.e. the action sheet or the view controller being
3695 presented during rotation) rather than the presenting view controller.
3697 Test: ActionSheetTests.DismissingActionSheetShouldNotDismissPresentingViewController
3699 * UIProcess/ios/WKActionSheet.mm:
3700 (-[WKActionSheet doneWithSheet:]):
3702 2018-03-12 Javier Fernandez <jfernandez@igalia.com>
3704 Remove GridLayout runtime flag
3705 https://bugs.webkit.org/show_bug.cgi?id=183484
3707 Reviewed by Myles C. Maxfield.
3709 The Grid Layout feature has been enabled by default for almost a
3710 year, so I think it's time to remove the runtime flag and the
3711 codepath run when the feature is disabled.
3713 * Shared/WebPreferences.yaml:
3714 * WebProcess/InjectedBundle/InjectedBundle.cpp:
3715 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3717 2018-03-11 Wenson Hsieh <wenson_hsieh@apple.com>
3719 Fix the internal iOS build after r229512
3720 https://bugs.webkit.org/show_bug.cgi?id=183550
3722 Reviewed by Zalan Bujtas.
3724 Fixes a typo in a header import, as well as a nullability error. `SecTrustEvaluate()` takes in a nonnull outparam,
3725 which was removed in r229512; this adds the outparam back, but does not consult its value when setting the
3728 * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
3729 (-[WKFullScreenWindowController _EVOrganizationName]):
3731 2018-03-10 Jer Noble <jer.noble@apple.com>
3733 Improvements to fullscreen; new UI and security features
3734 https://bugs.webkit.org/show_bug.cgi?id=183503
3736 Reviewed by Dean Jackson.
3738 Now that the iOS Fullscreen code has more than one major class, move it into an ios/
3741 Clean up the WKFullScreenWindowControllerIOS class to more clearly separate external
3742 facing API from purely internal functions.
3744 Move the WKFullScreenViewController out into its own file. Add support for fullscreen
3745 top inset and fullscreen autohide duration CSS constants.
3747 Add a heuristic to distinguish between media control related touches and ones that look
3748 more keyboard interactions.
3750 Add a new UIStackView based control to hold the fullscreen controls.
3752 * UIProcess/ios/WKFullScreenWindowControllerIOS.mm: Removed.
3753 * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.cpp: Added.
3754 (WebKit::FullscreenTouchSecheuristic::scoreOfNextTouch):
3755 (WebKit::FullscreenTouchSecheuristic::reset):
3756 (WebKit::FullscreenTouchSecheuristic::distanceScore):
3757 (WebKit::FullscreenTouchSecheuristic::attenuationFactor):
3758 * UIProcess/ios/fullscreen/FullscreenTouchSecheuristic.h:
3759 (WebKit::FullscreenTouchSecheuristic::setRampUpSpeed):
3760 (WebKit::FullscreenTouchSecheuristic::setRampDownSpeed):
3761 (WebKit::FullscreenTouchSecheuristic::setXWeight):
3762 (WebKit::FullscreenTouchSecheuristic::setYWeight):
3763 (WebKit::FullscreenTouchSecheuristic::setSize):
3764 (WebKit::FullscreenTouchSecheuristic::setGamma):
3765 (WebKit::FullscreenTouchSecheuristic::setGammaCutoff):
3766 * UIProcess/ios/fullscreen/WKFullScreenViewController.h:
3767 * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: Added.
3768 (WKFullScreenViewControllerPlaybackSessionModelClient::setParent):
3769 (WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
3770 (-[_WKExtrinsicButton setExtrinsicContentSize:]):
3771 (-[_WKExtrinsicButton intrinsicContentSize]):
3772 (-[WKFullScreenViewController initWithWebView:]):
3773 (-[WKFullScreenViewController dealloc]):
3774 (-[WKFullScreenViewController showUI]):
3775 (-[WKFullScreenViewController hideUI]):
3776 (-[WKFullScreenViewController videoControlsManagerDidChange]):
3777 (-[WKFullScreenViewController setPrefersStatusBarHidden:]):
3778 (-[WKFullScreenViewController setPlaying:]):
3779 (-[WKFullScreenViewController setPictureInPictureActive:]):
3780 (-[WKFullScreenViewController loadView]):
3781 (-[WKFullScreenViewController viewWillAppear:]):
3782 (-[WKFullScreenViewController viewDidLayoutSubviews]):
3783 (-[WKFullScreenViewController viewWillTransitionToSize:withTransitionCoordinator:]):
3784 (-[WKFullScreenViewController preferredStatusBarStyle]):
3785 (-[WKFullScreenViewController prefersStatusBarHidden]):
3786 (-[WKFullScreenViewController gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
3787 (-[WKFullScreenViewController gestureRecognizer:shouldReceiveTouch:]):
3788 (-[WKFullScreenViewController _manager]):
3789 (-[WKFullScreenViewController _effectiveFullscreenInsetTop]):
3790 (-[WKFullScreenViewController _cancelAction:]):
3791 (-[WKFullScreenViewController _togglePiPAction:]):
3792 (-[WKFullScreenViewController _touchDetected:]):
3793 (-[WKFullScreenViewController _statusBarFrameDidChange:]):
3794 (-[WKFullScreenViewController _updateWebViewFullscreenInsets]):
3795 (-[WKFullScreenViewController _showPhishingAlert]):
3796 * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h: Copied from Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.h.
3797 * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: Added.
3798 (WebKit::replaceViewWithView):
3799 (WebKit::WKWebViewState::applyTo):
3800 (WebKit::WKWebViewState::store):
3801 (-[WKFullscreenAnimationController transitionDuration:]):
3802 (-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
3803 (-[WKFullscreenAnimationController animateTransition:]):
3804 (-[WKFullscreenAnimationController animationEnded:]):
3805 (-[WKFullscreenAnimationController startInteractiveTransition:]):
3806 (-[WKFullscreenAnimationController updateWithPercent:]):
3807 (-[WKFullscreenAnimationController updateWithPercent:translation:anchor:]):
3808 (-[WKFullscreenAnimationController end:]):
3809 (-[WKFullScreenInteractiveTransition initWithAnimator:anchor:]):
3810 (-[WKFullScreenInteractiveTransition wantsInteractiveStart]):
3811 (-[WKFullScreenInteractiveTransition startInteractiveTransition:]):
3812 (-[WKFullScreenInteractiveTransition updateInteractiveTransition:withTranslation:]):
3813 (-[WKFullScreenInteractiveTransition cancelInteractiveTransition]):
3814 (-[WKFullScreenInteractiveTransition finishInteractiveTransition]):
3815 (-[WKFullScreenWindowController initWithWebView:]):
3816 (-[WKFullScreenWindowController dealloc]):
3817 (-[WKFullScreenWindowController isFullScreen]):
3818 (-[WKFullScreenWindowController webViewPlaceholder]):
3819 (-[WKFullScreenWindowController enterFullScreen]):
3820 (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
3821 (-[WKFullScreenWindowController requestExitFullScreen]):
3822 (-[WKFullScreenWindowController exitFullScreen]):
3823 (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
3824 (-[WKFullScreenWindowController _completedExitFullScreen]):
3825 (-[WKFullScreenWindowController close]):
3826 (-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
3827 (-[WKFullScreenWindowController videoControlsManagerDidChange]):
3828 (-[WKFullScreenWindowController gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
3829 (-[WKFullScreenWindowController animationControllerForPresentedController:presentingController:sourceController:]):
3830 (-[WKFullScreenWindowController animationControllerForDismissedController:]):
3831 (-[WKFullScreenWindowController interactionControllerForDismissal:]):
3832 (-[WKFullScreenWindowController _exitFullscreenImmediately]):
3833 (-[WKFullScreenWindowController _invalidateEVOrganizationName]):
3834 (-[WKFullScreenWindowController _isSecure]):
3835 (-[WKFullScreenWindowController _serverTrust]):
3836 (-[WKFullScreenWindowController _EVOrganizationName]):
3837 (-[WKFullScreenWindowController _updateLocationInfo]):
3838 (-[WKFullScreenWindowController _manager]):
3839 (-[WKFullScreenWindowController _startToDismissFullscreenChanged:]):
3840 (-[WKFullScreenWindowController _interactiveDismissChanged:]):
3841 * UIProcess/ios/fullscreen/WKFullscreenStackView.h: Renamed from Source/WebKit/UIProcess/ios/WKFullScreenWindowControllerIOS.h.
3842 * UIProcess/ios/fullscreen/WKFullscreenStackView.mm: Added.
3843 (+[WKFullscreenStackView baseEffects]):
3844 (+[WKFullscreenStackView configureView:forTintEffectWithColor:filterType:]):
3845 (+[WKFullscreenStackView configureView:withBackgroundFillOfColor:opacity:filter:]):
3846 (+[WKFullscreenStackView secondaryMaterialOverlayView]):
3847 (+[WKFullscreenStackView applyPrimaryGlyphTintToView:]):
3848 (+[WKFullscreenStackView applySecondaryGlyphTintToView:]):
3849 (-[WKFullscreenStackView initWithArrangedSubviews:axis:]):
3850 (-[WKFullscreenStackView setTargetViewForSecondaryMaterialOverlay:]):
3851 (-[WKFullscreenStackView contentView]):
3852 (-[WKFullscreenStackView _setArrangedSubviews:axis:]):
3853 (-[WKFullscreenStackView setBounds:]):
3854 (-[WKFullscreenStackView updateConstraints]):
3855 * WebKit.xcodeproj/project.pbxproj:
3857 2018-03-10 Megan Gardner <megan_gardner@apple.com>
3859 Media query for default appearance
3860 https://bugs.webkit.org/show_bug.cgi?id=183539
3861 <rdar://problem/38326388>
3863 Reviewed by Tim Horton.
3865 Write a media query to evaluate appearance.
3867 * Shared/WebPageCreationParameters.cpp:
3868 (WebKit::WebPageCreationParameters::encode const):
3869 (WebKit::WebPageCreationParameters::decode):
3870 * Shared/WebPageCreationParameters.h:
3871 * UIProcess/API/Cocoa/WKWebView.mm:
3872 (-[WKWebView _initializeWithConfiguration:]):
3873 (-[WKWebView _setUseSystemAppearance:]):
3874 * UIProcess/WebPageProxy.cpp:
3875 (WebKit::WebPageProxy::creationParameters):
3876 (WebKit::WebPageProxy::setDefaultAppearance):
3877 * UIProcess/WebPageProxy.h:
3878 (WebKit::WebPageProxy::defaultAppearance const):
3879 * WebProcess/WebPage/WebPage.cpp:
3880 (WebKit::m_credentialsMessenger):
3881 (WebKit::WebPage::setDefaultAppearance):
3882 * WebProcess/WebPage/WebPage.h:
3883 * WebProcess/WebPage/WebPage.messages.in:
3885 2018-03-09 Jer Noble <jer.noble@apple.com>
3887 Unconditionalize more methods in VideoFullscreenInterface (and related classes)
3888 https://bugs.webkit.org/show_bug.cgi?id=183501
3889 <rdar://problem/38312038>
3891 Unreviewed build fix; add correct pragmas to code referencing m_playbackSessionManager.
3893 * UIProcess/WebPageProxy.cpp:
3894 (WebKit::WebPageProxy::hasActiveVideoForControlsManager const):
3895 (WebKit::WebPageProxy::requestControlledElementID const):
3896 (WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen const):
3898 2018-03-09 Brian Burg <bburg@apple.com>
3900 Web Inspector: there should only be one way for async backend commands to send failure
3901 https://bugs.webkit.org/show_bug.cgi?id=183524
3903 Reviewed by Timothy Hatcher.
3905 Remove useless ErrorString argument from async commands.
3907 For Automation protocol, introduce sync and async macros for filling
3908 in and sending a failure response. Now that async commands don't have
3909 an ErrorString and sync commands don't have a callback, trying to send
3910 an error with the wrong macro is a compile-time error.
3912 * UIProcess/Automation/WebAutomationSession.cpp:
3913 (WebKit::WebAutomationSession::getBrowsingContexts):
3914 (WebKit::WebAutomationSession::getBrowsingContext):
3915 (WebKit::WebAutomationSession::createBrowsingContext):
3916 (WebKit::WebAutomationSession::closeBrowsingContext):
3917 (WebKit::WebAutomationSession::switchToBrowsingContext):
3918 (WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext):
3919 (WebKit::WebAutomationSession::waitForNavigationToComplete):
3920 (WebKit::WebAutomationSession::navigateBrowsingContext):
3921 (WebKit::WebAutomationSession::goBackInBrowsingContext):
3922 (WebKit::WebAutomationSession::goForwardInBrowsingContext):
3923 (WebKit::WebAutomationSession::reloadBrowsingContext):
3924 (WebKit::WebAutomationSession::evaluateJavaScriptFunction):
3925 (WebKit::WebAutomationSession::resolveChildFrameHandle):
3926 (WebKit::WebAutomationSession::resolveParentFrameHandle):
3927 (WebKit::WebAutomationSession::computeElementLayout):
3928 (WebKit::WebAutomationSession::selectOptionElement):
3929 (WebKit::WebAutomationSession::isShowingJavaScriptDialog):
3930 (WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog):
3931 (WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog):
3932 (WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog):
3933 (WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt):
3934 (WebKit::WebAutomationSession::setFilesToSelectForFileUpload):
3935 (WebKit::WebAutomationSession::getAllCookies):
3936 (WebKit::WebAutomationSession::deleteSingleCookie):
3937 (WebKit::WebAutomationSession::addSingleCookie):
3938 (WebKit::WebAutomationSession::deleteAllCookies):
3939 (WebKit::WebAutomationSession::setSessionPermissions):
3940 (WebKit::WebAutomationSession::performMouseInteraction):
3941 (WebKit::WebAutomationSession::performKeyboardInteractions):
3942 (WebKit::WebAutomationSession::takeScreenshot):
3943 (WebKit::WebAutomationSession::didTakeScreenshot):
3944 * UIProcess/Automation/WebAutomationSession.h:
3945 * UIProcess/Automation/WebAutomationSessionMacros.h:
3946 * UIProcess/Automation/mac/WebAutomationSessionMac.mm:
3947 (WebKit::WebAutomationSession::inspectBrowsingContext):
3949 2018-03-09 Jer Noble <jer.noble@apple.com>
3951 Don't pass NULL to the result parameter of SecTrustEvaluate()
3952 https://bugs.webkit.org/show_bug.cgi?id=183495
3953 <rdar://problem/38185688>
3955 Reviewed by Andy Estes.
3957 * UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
3958 (-[WKFullScreenWindowController _EVOrganizationName]):
3960 2018-03-09 Dean Jackson <dino@apple.com>
3962 Allow NavigationState to intercept requests and send them to SystemPreviewController
3963 https://bugs.webkit.org/show_bug.cgi?id=183526
3964 <rdar://problem/37801140>
3966 Reviewed by Tim Horton.
3968 Implement a bit more of SystemPreviewController, such that it can be used
3969 from NavigationState to identify and handle content that can be previewed.
3971 * UIProcess/Cocoa/NavigationState.mm:
3972 (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
3973 If we'd in a download response policy, then check if SystemPreviewController
3974 can show the content. We ignore the download, but pass the original URL onto
3975 the preview. Ultimately, we'd want to avoid the navigation
3976 but use the download destination URL for preview.
3978 * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
3979 (-[_WKPreviewControllerDataSource initWithURL:]):
3980 Move the URL to property, to help use a single datasource object for all previews.
3981 (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
3982 (-[_WKPreviewControllerDelegate initWithSystemPreviewController:]):
3983 Add a delegate object, so we can detect when the preview is dismissed and return
3984 to the previous page.
3985 (-[_WKPreviewControllerDelegate previewControllerWillDismiss:]):
3986 (WebKit::SystemPreviewController::showPreview):
3987 Use single instances of the QLPreviewController, its datasource and delegate.
3989 * UIProcess/SystemPreviewController.cpp:
3990 Add a helper to navigate back.
3991 (WebKit::SystemPreviewController::SystemPreviewController):
3992 (WebKit::SystemPreviewController::sendPageBack):
3993 * UIProcess/SystemPreviewController.h:
3995 2018-03-09 Jer Noble <jer.noble@apple.com>
3997 webkitfullscreenchange event not fired at the same time as :-webkit-full-screen pseudo selector changes; causes glitchiness
3998 https://bugs.webkit.org/show_bug.cgi?id=183383
3999 <rdar://problem/38197028>
4001 Reviewed by Eric Carlson.
4003 Follow-up patch: now that the 'fullscreenchange' event is being fired slightly earlier, the
4004 Fullscreen.TopContentInset tests triggers what&nbs