| 2020-07-01 Tim Horton <timothy_horton@apple.com> |
| |
| Upstream application accent color support |
| https://bugs.webkit.org/show_bug.cgi?id=213859 |
| |
| Reviewed by Wenson Hsieh. |
| |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPageCreationParameters.h: |
| * UIProcess/Cocoa/PageClientImplCocoa.h: |
| * UIProcess/PageClient.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::creationParameters): |
| * UIProcess/mac/PageClientImplMac.h: |
| * UIProcess/mac/PageClientImplMac.mm: |
| (WebKit::PageClientImpl::accentColor): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::m_limitsNavigationsToAppBoundDomains): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::setAccentColor): |
| Plumb accent color to the Web Content process so that it is used when |
| deciding the colors of selection and form controls. |
| |
| 2020-07-01 Keith Miller <keith_miller@apple.com> |
| |
| Add WebXR to WebKit.plist preferences, off by default |
| https://bugs.webkit.org/show_bug.cgi?id=213860 |
| <rdar://64411568> |
| |
| Reviewed by Tim Horton. |
| |
| Right now we look for "WebXR" in the plist, however, it's not in |
| the file. It so happens that, *I think*, we fall back to false for |
| missing keys. We should have an entry for readability and |
| consistency, though. |
| |
| No tests needed because this shouldn't change behavior. |
| |
| * FeatureFlags/WebKit.plist: |
| |
| 2020-07-01 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r259242) WebKit no longer does client navigations at foreground priority for extensions |
| https://bugs.webkit.org/show_bug.cgi?id=213852 |
| <rdar://problem/63300428> |
| |
| Reviewed by Alex Christensen. |
| |
| r259242 tried to address a ASSERT(window) debug assertion hit in applicationType() |
| by only calling applicationType() when the window is non-null and assuming the |
| process is an application when the window is null. However, this is not correct |
| for extensions. The first thing isApplicationVisible() does is call |
| _UIApplicationIsExtension() to determine if we are an extension. It does not need |
| the window to make this determination. As a result, I have reverted r259242 and |
| simply dropped the ASSERT(window) assertion in isApplicationVisible() instead. |
| |
| This fixes the regression tracked by <rdar://problem/63300428> by reverting the |
| change that caused it (r259242) and drops the assertion that was hit before r259242. |
| |
| * UIProcess/ApplicationStateTracker.mm: |
| (WebKit::applicationType): |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::isApplicationVisible): |
| |
| 2020-07-01 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Implement support for UIWKDocumentRequestSpatialAndCurrentSelection |
| https://bugs.webkit.org/show_bug.cgi?id=213704 |
| <rdar://problem/59738878> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Implement support for the new request type UIWKDocumentRequestSpatialAndCurrentSelection. |
| Requests of this type return the contents inside the range that covers both the specified |
| rect and the current selection, if there is one. |
| |
| The flag UIWKDocumentRequestSpatialAndCurrentSelection was added in <rdar://problem/64867540>. |
| |
| * Platform/spi/ios/UIKitSPI.h: Same thing I did in TestWebKitAPI/ios/UIKitSPI.h. See Tools ChangeLog for why. |
| * Shared/DocumentEditingContext.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (toWebDocumentRequestOptions): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::requestDocumentEditingContext): |
| |
| 2020-07-01 Chris Dumez <cdumez@apple.com> |
| |
| Crash under IPC::isValidMessageName() |
| https://bugs.webkit.org/show_bug.cgi?id=213751 |
| <rdar://problem/64773416> |
| |
| Reviewed by Geoffrey Garen. |
| |
| This is a speculative fix for the crashes tracked by <rdar://problem/64773416>. |
| The suspicion is that the compiler optimizes the code for IPC::isValidMessageName() |
| because its parameter is of type MessageName. It may therefore assume the parameter |
| is a valid MessageName enum value, which is ironic because the purpose of this |
| function is to check whether or not the enum value is valid. |
| |
| To address the issue, I got rid of the #ifdefs in MessageName enum so that the |
| enum values have an underlying value in the range [0, MessageName::Last]. I then |
| updated the isValidEnum template specialization to verify that the input integer |
| is indeed in the range [0, MessageName::Last] before casting it to a MessageName |
| and calling IPC::isValidMessageName(). |
| |
| * Scripts/webkit/messages.py: |
| |
| 2020-07-01 Kate Cheney <katherine_cheney@apple.com> |
| |
| WKUserScripts injecting into all frames seem to violate app-bound domains |
| https://bugs.webkit.org/show_bug.cgi?id=213816 |
| <rdar://problem/64872296> |
| |
| Reviewed by Brady Eidson. |
| |
| Patch to make app-bound domain checks on a per-frame basis instead |
| of per-page-based-on-main-frame. This will prevent WKUserScripts from |
| being injected in subframes when the main frame is app-bound. Now, all |
| ancestors of a frame must be app-bound in order for a frame to |
| evaluate user script. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted): |
| Move 'isMainFrame' check to be inside of the check for |
| m_limitsNavigationsToAppBoundDomains. The navigation should fail if |
| the main frame is not app-bound and the WKWebView is marked with the |
| limitsNavigationToAppBoundDomains flag, but non-app-bound subframe |
| loads are allowed to continue. |
| |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::isTopFrameNavigatingToAppBoundDomain const): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::download): |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): |
| (WebKit::WebLoaderStrategy::loadResourceSynchronously): |
| (WebKit::WebLoaderStrategy::startPingLoad): |
| (WebKit::WebLoaderStrategy::preconnectTo): |
| For reporting loads to the Network Process, we only care if the main |
| frame is app bound, so we need to store that info in the WebPage and |
| WebPageProxy. |
| |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::shouldEnableInAppBrowserPrivacyProtections const): |
| * WebProcess/WebPage/WebFrame.cpp: |
| (WebKit::WebFrame::startDownload): |
| (WebKit::WebFrame::convertMainResourceLoadToDownload): |
| (WebKit::WebFrame::shouldEnableInAppBrowserPrivacyProtections): |
| (WebKit::WebFrame::isTopFrameNavigatingToAppBoundDomain const): |
| * WebProcess/WebPage/WebFrame.h: |
| (WebKit::WebFrame::setIsNavigatingToAppBoundDomain): |
| (WebKit::WebFrame::isNavigatingToAppBoundDomain const): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::loadRequest): |
| (WebKit::WebPage::loadDataImpl): |
| (WebKit::WebPage::didReceivePolicyDecision): |
| (WebKit::WebPage::runJavaScript): |
| (WebKit::WebPage::setIsNavigatingToAppBoundDomain): |
| (WebKit::WebPage::shouldEnableInAppBrowserPrivacyProtections): Deleted. |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::needsInAppBrowserPrivacyQuirks): |
| (WebKit::WebPage::isNavigatingToAppBoundDomain const): Deleted. |
| Move all app-bound domain logic from the WebPage to the WebFrame now |
| that checks are on a per-frame basis. |
| |
| 2020-07-01 Youenn Fablet <youenn@apple.com> |
| |
| Make NetworkSendQueue use CString instead of String for UTF-8 data |
| https://bugs.webkit.org/show_bug.cgi?id=213714 |
| |
| Reviewed by Darin Adler. |
| |
| Update code to use CString/DataReference to transmit WebSocket text messages. |
| |
| * NetworkProcess/NetworkSocketChannel.cpp: |
| (WebKit::NetworkSocketChannel::sendString): |
| * NetworkProcess/NetworkSocketChannel.h: |
| * NetworkProcess/NetworkSocketChannel.messages.in: |
| * NetworkProcess/WebSocketTask.h: |
| (WebKit::WebSocketTask::sendString): |
| * NetworkProcess/cocoa/WebSocketTaskCocoa.h: |
| * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: |
| (WebKit::WebSocketTask::sendString): |
| * NetworkProcess/soup/WebSocketTaskSoup.h: |
| * NetworkProcess/soup/WebSocketTaskSoup.cpp: |
| (WebKit::WebSocketTask::sendString): |
| * WebProcess/Network/WebSocketChannel.cpp: |
| (WebKit::WebSocketChannel::createMessageQueue): |
| (WebKit::WebSocketChannel::send): |
| |
| 2020-07-01 James Savage <james.savage@apple.com> |
| |
| Fix Swift overlay build after r263727. |
| https://bugs.webkit.org/show_bug.cgi?id=213823. |
| |
| Unreviewed, follow up build fix. |
| |
| * SwiftOverlay/Tests/WebKitTests.swift: |
| (WebKitTests.testAPI): Fix tests to refer to new parameter name. |
| * UIProcess/API/Cocoa/WebKitSwiftOverlay.swift: |
| (callAsyncJavaScript(_:arguments:in:in:completionHandler:Error:)): Use |
| the imported ObjC name that the compiler expects. |
| (evaluateJavaScript(_:in:in:completionHandler:Error:)): Ditto. |
| |
| 2020-07-01 Youenn Fablet <youenn@apple.com> |
| |
| Make NetworkRTCProvider receive IPC messages from a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=213557 |
| |
| Reviewed by Geoffrey Garen. |
| |
| To ensure webrtc packets do not get blocked on the main thread, |
| we process WebProcess IPC message directly in the socket thread. |
| For new sockets, we still go through the main thread, to check suspension or proxy values. |
| For sending packets/setting options/closing sockets, we stay in the background thread. |
| |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: |
| (WebKit::LibWebRTCSocketClient::sendTo): |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.h: |
| * NetworkProcess/webrtc/NetworkRTCProvider.cpp: |
| (WebKit::NetworkRTCProvider::NetworkRTCProvider): |
| (WebKit::NetworkRTCProvider::close): |
| (WebKit::NetworkRTCProvider::createSocket): |
| (WebKit::NetworkRTCProvider::createUDPSocket): |
| (WebKit::NetworkRTCProvider::createServerTCPSocket): |
| (WebKit::NetworkRTCProvider::createClientTCPSocket): |
| (WebKit::NetworkRTCProvider::wrapNewTCPConnection): |
| (WebKit::NetworkRTCProvider::sendToSocket): |
| (WebKit::NetworkRTCProvider::closeSocket): |
| (WebKit::NetworkRTCProvider::setSocketOption): |
| (WebKit::NetworkRTCProvider::addSocket): |
| (WebKit::NetworkRTCProvider::takeSocket): |
| (WebKit::NetworkRTCProvider::newConnection): |
| (WebKit::NetworkRTCProvider::dispatchToThread): |
| * NetworkProcess/webrtc/NetworkRTCProvider.h: |
| (WebKit::NetworkRTCProvider::didReceiveNetworkRTCMonitorMessage): |
| * NetworkProcess/webrtc/NetworkRTCProvider.messages.in: |
| * NetworkProcess/webrtc/NetworkRTCSocket.cpp: Removed. |
| * NetworkProcess/webrtc/NetworkRTCSocket.h: Removed. |
| * NetworkProcess/webrtc/NetworkRTCSocket.messages.in: Removed. |
| * SourcesCocoa.txt: |
| * SourcesGTK.txt: |
| * SourcesWPE.txt: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/Network/webrtc/LibWebRTCSocket.cpp: |
| (WebKit::LibWebRTCSocket::SendTo): |
| (WebKit::LibWebRTCSocket::Close): |
| (WebKit::LibWebRTCSocket::SetOption): |
| (WebKit::LibWebRTCSocket::suspend): |
| |
| 2020-06-30 Sam Weinig <weinig@apple.com> |
| |
| Split Color serialization out of Color classes |
| https://bugs.webkit.org/show_bug.cgi?id=213820 |
| |
| Reviewed by Darin Adler. |
| |
| Adopt ColorSerialization.h serialization functions. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (dictionaryRepresentationForEditorState): |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (-[WKTextTouchBarItemController _wkChangeColor:]): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _setTextColorForWebView:sender:]): |
| * UIProcess/ios/forms/WKFormColorPicker.mm: |
| (-[WKColorPicker setControlValueFromUIColor:]): |
| * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: |
| (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): |
| * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: |
| (WebKit::PDFPluginTextAnnotation::createAnnotationElement): |
| |
| 2020-06-30 Geoffrey Garen <ggaren@apple.com> |
| |
| [Cocoa] [GTK] RunLoop::Timer::isActive() is incorrect for timers while they are firing |
| https://bugs.webkit.org/show_bug.cgi?id=213771 |
| |
| Unreviewed assertion fix. |
| |
| * UIProcess/WebAuthentication/AuthenticatorManager.cpp: |
| (WebKit::AuthenticatorManager::timeOutTimerFired): Removed this ASSERT. |
| One-shot timers are not active while they are firing. |
| |
| 2020-06-30 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Several key event tests in fast/events/ios are failing after <rdar://problem/62197116> |
| https://bugs.webkit.org/show_bug.cgi?id=213821 |
| <rdar://problem/64821309> |
| |
| Reviewed by Megan Gardner. |
| |
| Add an SPI method declaration. |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| |
| 2020-06-30 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Remove whitelistedRpId |
| https://bugs.webkit.org/show_bug.cgi?id=213817 |
| <rdar://problem/60108131> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Remove the whitelist such that we can test the attestation service in a wider range. |
| |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: |
| (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): |
| (WebKit::LocalAuthenticatorInternal::whitelistedRpId): Deleted. |
| |
| 2020-06-30 Brady Eidson <beidson@apple.com> |
| |
| Fix Swift overlay build after r263727. |
| <rdar://problem/64962370> and https://bugs.webkit.org/show_bug.cgi?id=213823 |
| |
| Reviewed by Darin Adler. |
| |
| No new tests (No behavior change). |
| |
| Adapt the Swift overlay refinemnt to handle the inFrame: argument for these methods. |
| |
| * UIProcess/API/Cocoa/WebKitSwiftOverlay.swift: |
| (callAsyncJavaScript(_:arguments:in:in:completionHandler:Error:)): |
| (evaluateJavaScript(_:in:in:completionHandler:Error:)): |
| (callAsyncJavaScript(_:arguments:in:completionHandler:Error:)): Deleted. |
| (evaluateJavaScript(_:in:completionHandler:Error:)): Deleted. |
| |
| 2020-06-30 Brady Eidson <beidson@apple.com> |
| |
| App-bound JavaScript and Navigation failures should have specific error codes. |
| <rdar://problem/64940268> and https://bugs.webkit.org/show_bug.cgi?id=213808 |
| |
| Reviewed by Tim Hatcher. |
| (Informally by Kate Cheney) |
| |
| * UIProcess/API/Cocoa/WKError.h: |
| * UIProcess/API/Cocoa/WKError.mm: |
| (localizedDescriptionForErrorCode): |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (nsErrorFromExceptionDetails): |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::errorForUnpermittedAppBoundDomainNavigation): |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| * UIProcess/WebPageProxy.h: |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::runJavaScript): |
| |
| 2020-06-30 Per Arne Vollan <pvollan@apple.com> |
| |
| [macOS] Connections to the preference daemon are established before entering the sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=213379 |
| |
| Reviewed by Darin Adler. |
| |
| On macOS, connections to the preference daemon are established before entering the sandbox. These connections also persist |
| after entering the sandbox and denying access to the preference daemon. There should not be attempts to connect to the |
| preference daemon before entering the sandbox, since these attempts will not be stopped by the sandbox. This patch moves |
| code that connects to the preference daemon to be executed after the sandbox has been entered. That includes code to |
| prevent connections to the Dock and code to initialize WebKit logging. Also, instead of calling [NSBundle bundleForClass:], |
| call [NSBundle bundleWithIdentifier:], since calling [NSBundle bundleForClass:] will connect to the preference daemon. |
| Finally, allow the syscall SYS_gethostuuid, since that is needed by CoreFoundation when there is no access to the |
| preference daemon. |
| |
| No new tests. This should be covered by existing tests. It would be nice to have a test to make sure that there are no |
| connections to the preference daemon just before entering the sandbox, but I am not aware of how to implement this. |
| |
| * NetworkProcess/mac/NetworkProcessMac.mm: |
| (WebKit::NetworkProcess::initializeSandbox): |
| * Shared/AuxiliaryProcess.cpp: |
| (WebKit::AuxiliaryProcess::initialize): |
| * Shared/Cocoa/WebKit2InitializeCocoa.mm: |
| (WebKit::runInitializationCode): |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::XPCServiceMain): |
| * Shared/mac/AuxiliaryProcessMac.mm: |
| (WebKit::webKit2Bundle): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| (WebKit::WebProcess::initializeSandbox): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-30 Brent Fulgham <bfulgham@apple.com> |
| |
| Partially revert r257135 now that the underlying bug is resolved |
| https://bugs.webkit.org/show_bug.cgi?id=213814 |
| <rdar://problem/59859573> |
| |
| Reviewed by Per Arne Vollan. |
| |
| This patch is a partial revert of the code change in Bug 208033, where a temporary |
| workaround was added for a bug in an underlying framework. Now that the bug has been |
| fixed, we can remove this workaround. |
| |
| * UIProcess/GPU/GPUProcessProxy.cpp: |
| (WebKit::gpuProcessSessionParameters): |
| |
| 2020-06-30 Brent Fulgham <bfulgham@apple.com> |
| |
| [macOS] Stop blocking two audio-related user client classes |
| https://bugs.webkit.org/show_bug.cgi?id=213807 |
| <rdar://problem/64874902> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Restore IOAudioControlUserClient and IOAudioEngineUserClient since we find them being |
| actively used on macOS for some media playback purposes. |
| |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-30 Peng Liu <peng.liu6@apple.com> |
| |
| Enable the support of FULLSCREEN_API in WebKitTestRunner |
| https://bugs.webkit.org/show_bug.cgi?id=213774 |
| |
| Reviewed by Youenn Fablet. |
| |
| Replace the definition of ENABLE_FULLSCREEN_API in FeatureDefines.xcconfig with |
| the one in PlatformEnableCocoa.h. We have to do that because WebKitTestRunner |
| does not have a FeatureDefines.xcconfig but it uses "ENABLE(FULLSCREEN_API)" |
| to conditionally compile code to test the element fullscreen API. |
| WebKitTestRunner can use the macro defined in PlatformEnableCocoa.h. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2020-06-30 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Editable regions causes ~1% slowdown in PLT5 |
| https://bugs.webkit.org/show_bug.cgi?id=213659 |
| <rdar://problem/64361390> |
| |
| Reviewed by Simon Fraser. |
| |
| Fix up RemoteLayerTreeViews now that the editable region is an Optional<>. Have |
| the UI process message the web process to enable editable region on the first |
| invocation of _requestTextInputContextsInRect, which is good indicator that there |
| would be benefit to computing it as a typical client that calls it will call it |
| many times. |
| |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: |
| (WebKit::mayContainEditableElementsInRect): Fix up the logic now that there may |
| be not be an editable region sent over in the last event region update. If there |
| isn't one then we don't know if there are editable elements in the rect of not. |
| So, return true, which could turn out to be a false positive if there aren't any |
| editable elements in the rect. The caller will have to message the web process |
| to find out the real answer if they want it. Just to clarify, it's OK for this |
| function to have false positives, but it must never have false negatives. |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::textInputContextsInRect): Enable editable region. If it's already |
| enabled then doing so again does nothing. |
| |
| 2020-06-30 Peng Liu <peng.liu6@apple.com> |
| |
| Scrunching a video to PiP can result in broken animation and leave Safari in a bad state |
| https://bugs.webkit.org/show_bug.cgi?id=213175 |
| |
| Reviewed by Jer Noble. |
| |
| * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: |
| (-[WKFullScreenWindowController _completedExitFullScreen]): |
| Update _exitRequested after exiting fullscreen to make sure the following |
| enter fullscreen request can be processed. |
| (-[WKFullScreenWindowController _dismissFullscreenViewController]): |
| Make sure _completedExitFullScreen function will always execute. |
| (-[WKFullScreenWindowController _interactivePinchDismissChanged:]): |
| Remove a function call which corrupts the state machine under stress test. |
| |
| 2020-06-30 Antoine Quint <graouts@webkit.org> |
| |
| [iOS] Crash under WebKit::WebPage::getFocusedElementInformation() |
| https://bugs.webkit.org/show_bug.cgi?id=213798 |
| <rdar://problem/62754594> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Since LabelableElement::labels() returns a RefPtr<NodeList>, ensure we get a value before attempting to read data from it. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::getFocusedElementInformation): |
| |
| 2020-06-30 Andy Estes <aestes@apple.com> |
| |
| [Xcode] Enable the "My Mac (Mac Catalyst)" destination in WebKit Xcode projects |
| https://bugs.webkit.org/show_bug.cgi?id=213740 |
| |
| Reviewed by Darin Adler. |
| |
| * Configurations/Base.xcconfig: Set SUPPORTS_MACCATALYST to YES to tell Xcode that this |
| project supports building for Mac Catalyst. |
| |
| 2020-06-30 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r263724. |
| https://bugs.webkit.org/show_bug.cgi?id=213781 |
| |
| |
| Reverted changeset: |
| |
| "Make _WKWebsiteDataStoreConfiguration SPI for HSTS storage to |
| replace _WKProcessPoolConfiguration.hstsStorageDirectory" |
| https://bugs.webkit.org/show_bug.cgi?id=213048 |
| https://trac.webkit.org/changeset/263724 |
| |
| 2020-06-30 Youenn Fablet <youenn@apple.com> |
| |
| Add VP9 WebRTC codec runtime flag |
| https://bugs.webkit.org/show_bug.cgi?id=213724 |
| |
| Reviewed by Eric Carlson. |
| |
| * Shared/WebPreferences.yaml: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::updatePreferences): |
| |
| 2020-06-29 Brady Eidson <beidson@apple.com> |
| |
| JavaScript cannot be injected into iframes |
| <rdar://problem/54168946> and https://bugs.webkit.org/show_bug.cgi?id=213556 |
| |
| Reviewed by Geoff Garen. |
| |
| This adds a few mechanisms: |
| - Allows for WKUserScripts to have a target content world |
| - Allows "evaluateJavaScript" and "callAsyncJavaScript" to target a specific frame |
| - Allows for the completion handlers of those methods to be able to distinguish |
| failure-due-to-missing-frame. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<ExceptionDetails>::encode): |
| (IPC::ArgumentCoder<ExceptionDetails>::decode): |
| * Shared/WebCoreArgumentCoders.h: |
| |
| * UIProcess/API/Cocoa/WKError.h: |
| * UIProcess/API/Cocoa/WKError.mm: |
| (localizedDescriptionForErrorCode): |
| |
| * UIProcess/API/Cocoa/WKUserScript.h: |
| * UIProcess/API/Cocoa/WKUserScript.mm: |
| (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]): |
| (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:inContentWorld:]): |
| * UIProcess/API/Cocoa/WKWebView.h: |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView evaluateJavaScript:inFrame:inContentWorld:completionHandler:]): |
| (-[WKWebView callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]): |
| (nsErrorFromExceptionDetails): |
| (-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]): |
| (-[WKWebView callAsyncJavaScript:arguments:inContentWorld:completionHandler:]): Deleted. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::runJavaScript): |
| |
| 2020-06-29 Alex Christensen <achristensen@webkit.org> |
| |
| Make _WKWebsiteDataStoreConfiguration SPI for HSTS storage to replace _WKProcessPoolConfiguration.hstsStorageDirectory |
| https://bugs.webkit.org/show_bug.cgi?id=213048 |
| |
| Reviewed by Youenn Fablet. |
| |
| This uses CFNetwork SPI introduced in rdar://problem/50109631 to allow HSTS storage per NSURLSession. |
| To be complete, I also deprecated our UI process HSTS state removal attempt SPIs, WKContextResetHSTSHosts and |
| WKContextResetHSTSHostsAddedAfterDate, which had their last use removed in rdar://problem/64220838. |
| |
| I manually verified that this new SPI puts HSTS data in the specified location, and I also verified that HSTS |
| state querying and removal works with the new CFNetwork SPI as it did with the old one. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::fetchWebsiteData): |
| (WebKit::NetworkProcess::deleteWebsiteData): |
| (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): |
| (WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains): |
| (WebKit::NetworkProcess::registrableDomainsWithWebsiteData): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkSessionCreationParameters.cpp: |
| (WebKit::NetworkSessionCreationParameters::encode const): |
| (WebKit::NetworkSessionCreationParameters::decode): |
| * NetworkProcess/NetworkSessionCreationParameters.h: |
| * NetworkProcess/cocoa/NetworkProcessCocoa.mm: |
| (WebKit::NetworkProcess::hostNamesWithHSTSCache const): |
| (WebKit::NetworkProcess::deleteHSTSCacheForHostNames): |
| (WebKit::NetworkProcess::clearHSTSCache): |
| (WebKit::NetworkProcess::getHostNamesWithHSTSCache): Deleted. |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::hstsStorage const): |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| * NetworkProcess/soup/NetworkProcessSoup.cpp: |
| (WebKit::NetworkProcess::hostNamesWithHSTSCache const): |
| (WebKit::NetworkProcess::deleteHSTSCacheForHostNames): |
| (WebKit::NetworkProcess::clearHSTSCache): |
| (WebKit::NetworkProcess::getHostNamesWithHSTSCache): Deleted. |
| * UIProcess/API/C/mac/WKContextPrivateMac.h: |
| * UIProcess/API/C/mac/WKContextPrivateMac.mm: |
| (WKContextResetHSTSHosts): |
| (WKContextResetHSTSHostsAddedAfterDate): |
| * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: |
| (-[_WKWebsiteDataStoreConfiguration hstsStorageDirectory]): |
| (-[_WKWebsiteDataStoreConfiguration setHSTSStorageDirectory:]): |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::privateBrowsingSession): Deleted. |
| (WebKit::WebProcessPool::resetHSTSHosts): Deleted. |
| (WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate): Deleted. |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): |
| (WebKit::WebsiteDataStore::parameters): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| (WebKit::WebsiteDataStore::resolvedHSTSStorageDirectory const): |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: |
| (WebKit::WebsiteDataStoreConfiguration::copy const): |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: |
| |
| 2020-06-29 Tim Horton <timothy_horton@apple.com> |
| |
| Adopt adjusted symbol image names |
| https://bugs.webkit.org/show_bug.cgi?id=213768 |
| <rdar://problem/64472257> |
| |
| Reviewed by Andy Estes. |
| |
| * UIProcess/API/Cocoa/_WKElementAction.mm: |
| (+[_WKElementAction imageForElementActionType:]): |
| |
| 2020-06-29 Guowei Yang <guowei_yang@apple.com> |
| |
| Adding Experimental Feature Flags for CoreImage backed SVG/CSS Filters |
| https://bugs.webkit.org/show_bug.cgi?id=213578 |
| |
| Reviewed by Darin Adler, Simon Fraser, Myles C. Maxfield. |
| |
| Preparing to implement CoreImage backed filter rendering |
| Needs Compiler guards and experimental feature guard. |
| |
| * Shared/WebPreferences.yaml: added feature flag definition |
| |
| 2020-06-29 Peng Liu <peng.liu6@apple.com> |
| |
| Video spills over PiP screen a little when using Picture in Picture |
| https://bugs.webkit.org/show_bug.cgi?id=213658 |
| |
| Reviewed by Eric Carlson. |
| |
| Add the video content dimensions to the IPC message VideoFullscreenManagerProxy::SetupFullscreenWithID. |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): |
| (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): |
| (WebKit::VideoFullscreenManagerProxy::enterFullscreen): |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement): |
| |
| 2020-06-29 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r262004. |
| <rdar://problem/64540215> |
| |
| Revert r262004 as it is not OK to have a data vault in |
| TMPDIR. |
| |
| Reverted changeset: |
| |
| "[WK2] WebKit abandons compiled sandbox profiles" |
| https://bugs.webkit.org/show_bug.cgi?id=212177 |
| https://trac.webkit.org/changeset/262004 |
| |
| 2020-06-29 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Remove ENABLE_STREAMS_API compilation flag |
| https://bugs.webkit.org/show_bug.cgi?id=213728 |
| |
| Reviewed by Sam Weinig. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Shared/WebPreferences.yaml: |
| * WebProcess/InjectedBundle/InjectedBundle.cpp: |
| (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): |
| |
| 2020-06-29 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Temporarily open up sandbox for mapping of Launch Services database |
| https://bugs.webkit.org/show_bug.cgi?id=213756 |
| <rdar://problem/64707000> |
| |
| Reviewed by Brent Fulgham. |
| |
| Address review comments. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-06-29 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Temporarily open up sandbox for mapping of Launch Services database |
| https://bugs.webkit.org/show_bug.cgi?id=213756 |
| <rdar://problem/64707000> |
| |
| Reviewed by Brent Fulgham. |
| |
| Temporarily open up sandbox for mapping of Launch Services database in the WebContent process on iOS. |
| This is just a short term fix, and access to the service will be closed again soon. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-06-29 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, rebaseline messages.py tests. |
| |
| * Scripts/MessageNames.cpp: |
| (IPC::description): |
| (IPC::receiverName): |
| (IPC::isValidMessageName): |
| * Scripts/MessageNames.h: |
| (WTF::isValidEnum): |
| * Scripts/test-superclassMessagesReplies.h: |
| |
| 2020-06-29 David Kilzer <ddkilzer@apple.com> |
| |
| Crash in NetworkProcessProxy::getNetworkProcessConnection() lambda due to missing Optional<> value check |
| <https://webkit.org/b/213700> |
| <rdar://problem/64852903> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/GPU/GPUProcessProxy.cpp: |
| (WebKit::GPUProcessProxy::getGPUProcessConnection): |
| - Rename `connectionIdentifier` to `identifier`. |
| - Return early from the lamba if `identifier` does not contain a |
| value. |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::getNetworkProcessConnection): |
| - Ditto. |
| |
| 2020-06-29 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] editing/selection/ios/select-text-after-changing-focus.html sometimes fails |
| https://bugs.webkit.org/show_bug.cgi?id=213745 |
| Work towards <rdar://problem/64808138> |
| |
| Reviewed by Tim Horton. |
| |
| This test first taps an input field to focus it, taps a button below the input field to focus the button and |
| dismiss the keyboard, and finally long presses to select a word below the button. On recent iOS 14 builds, this |
| test occasionally fails due to recent changes in UIKit that may cause the callout bar appearance callback to |
| fire after focusing the input field. If this happens, we end up showing the callout bar with a single option to |
| "Select All" (despite the field being empty), and the subsequent tap that's intended to hit the button instead |
| hit-tests to this callout bar item. The tests subsequently times out waiting for the keyboard to dismiss, which |
| never happens because the input field remains focused. |
| |
| Showing the "Select All" callout bar option in empty text fields is inconsistent with the rest of the platform |
| (iOS), and appears to have been unintentionally introduced in iOS 12 by <https://trac.webkit.org/r231726>. While |
| it's still unknown which exact system changes caused this test to begin timing out, we can at least fix it by |
| addressing this existing regression in behavior. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView canPerformActionForWebView:withSender:]): |
| |
| Check `-hasContent` here, instead of just checking if the selection is a caret. Note that we don't need to check |
| whether the selection is none separately, since `-hasContent` will always return `NO` if there is no selection. |
| |
| 2020-06-29 Sam Weinig <weinig@apple.com> |
| |
| Remove remaining makeSimpleColorFrom* variants |
| https://bugs.webkit.org/show_bug.cgi?id=213706 |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/API/wpe/WebKitColor.cpp: |
| (webkitColorToWebCoreColor): |
| Use makeSimpleColor(SRGBA { ... }) rather than makeSimpleColorFromFloats. |
| |
| * WebProcess/Inspector/WebInspectorClient.cpp: |
| (WebKit::WebInspectorClient::showPaintRect): |
| * WebProcess/WebPage/FindController.cpp: |
| (WebKit::FindController::drawRect): |
| Use makeSimpleColor rather than makeSimpleColorFromFloats, allowing for |
| constant expression creation of SimpleColors. |
| |
| 2020-06-29 Youenn Fablet <youenn@apple.com> |
| |
| Send WebRTC packets received from network process to web process from a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=213548 |
| |
| Reviewed by Eric Carlson. |
| |
| Make LibWebRTCSocketClient take a ref to an IPC connection at creation time. |
| Use this connection from the RTC network thread to send received packets to improve performances. |
| Covered by existing tests. |
| |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: |
| (WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient): |
| (WebKit::LibWebRTCSocketClient::signalReadPacket): |
| (WebKit::LibWebRTCSocketClient::signalSentPacket): |
| (WebKit::LibWebRTCSocketClient::signalAddressReady): |
| (WebKit::LibWebRTCSocketClient::signalConnect): |
| (WebKit::LibWebRTCSocketClient::signalClose): |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.h: |
| * NetworkProcess/webrtc/NetworkRTCProvider.cpp: |
| (WebKit::NetworkRTCProvider::createSocket): |
| (WebKit::NetworkRTCProvider::createUDPSocket): |
| (WebKit::NetworkRTCProvider::createServerTCPSocket): |
| (WebKit::NetworkRTCProvider::createClientTCPSocket): |
| (WebKit::NetworkRTCProvider::wrapNewTCPConnection): |
| * NetworkProcess/webrtc/NetworkRTCProvider.h: |
| |
| 2020-06-29 Elliot <CheeseEBoi@mailo.com> |
| |
| [GTK] Dark mode for GTK themes that end with -Dark |
| https://bugs.webkit.org/show_bug.cgi?id=213465 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| WebKitGtk has support for automatic detection of dark mode when it comes to GTK themes with the "-dark" and |
| ":dark" suffixes. However, when using GTK themes that end with "-Dark" or ":Dark", this is not the case. This |
| affects many themes like "Arc" and "Flat-Remix". |
| |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::effectiveAppearanceIsDark const): |
| (WebKit::PageClientImpl::themeName const): |
| |
| 2020-06-29 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Add webkit_authentication_request_get_security_origin |
| https://bugs.webkit.org/show_bug.cgi?id=213596 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Returns the security origin for the authentication protection space. |
| |
| * UIProcess/API/glib/WebKitAuthenticationRequest.cpp: |
| (webkit_authentication_request_get_security_origin): |
| * UIProcess/API/gtk/WebKitAuthenticationRequest.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitAuthenticationRequest.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| |
| 2020-06-29 Alexander Mikhaylenko <alexm@gnome.org> |
| |
| [GTK4] Context menu is misaligned |
| https://bugs.webkit.org/show_bug.cgi?id=213703 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Set halign on the context menu popover to the same value other context menus in GTK use, |
| like in GtkEntry. |
| |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::createMenuWidget): Set halign for the context menu to 'start'. |
| |
| 2020-06-28 Chris Dumez <cdumez@apple.com> |
| |
| Fix thread-safety issue in webProcessPoolHighDynamicRangeDidChangeCallback() |
| https://bugs.webkit.org/show_bug.cgi?id=213689 |
| <rdar://problem/64443996> |
| |
| Reviewed by Darin Adler. |
| |
| webProcessPoolHighDynamicRangeDidChangeCallback() gets called on a background thread so we |
| need to make sure we dispatch to the main thread before we iterate over the process pools. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::webProcessPoolHighDynamicRangeDidChangeCallback): |
| |
| 2020-06-28 Geoffrey Garen <ggaren@apple.com> |
| |
| Rename initializeThreading to initialize |
| https://bugs.webkit.org/show_bug.cgi?id=213674 |
| |
| Reviewed by Mark Lam. |
| |
| * Shared/API/c/WKString.cpp: |
| (WKStringCopyJSString): |
| * Shared/Cocoa/WebKit2InitializeCocoa.mm: |
| (WebKit::runInitializationCode): |
| * Shared/WebKit2Initialize.cpp: |
| (WebKit::InitializeWebKit2): |
| |
| 2020-06-28 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Clean up visible position comparisons in WebPage::requestDocumentEditingContext() |
| https://bugs.webkit.org/show_bug.cgi?id=213701 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Use std::min and std::max when the result needs to be copied instead of doing the comparison |
| by hand to make the code a tiny bit more clear. Also, don't copy a VisiblePosition when doing |
| the min/max in-place. Both of these things are unlikely to effect code generation. If they do, |
| the latter makes things a tiny bit more efficient. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::requestDocumentEditingContext): |
| |
| 2020-06-28 Youenn Fablet <youenn@apple.com> |
| |
| MediaRecorder stopRecorder() returns empty Blob after first use |
| https://bugs.webkit.org/show_bug.cgi?id=212274 |
| <rdar://problem/63601298> |
| |
| Reviewed by Eric Carlson. |
| |
| Update implementation to do initialization as part of startRecording. |
| |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: |
| (WebKit::RemoteMediaRecorderManager::releaseRecorder): |
| Remove ASSERT as recorder creation in WebProcess is always ok while creation in GPUProcess may fail and m_recorders may not be populated. |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: |
| (WebKit::MediaRecorderPrivate::MediaRecorderPrivate): |
| (WebKit::MediaRecorderPrivate::startRecording): |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: |
| |
| 2020-06-28 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed GTK/WPE Debug build fix after r263589. |
| |
| * Platform/Logging.h: Define a log category for Memory Pressure. |
| |
| 2020-06-27 Daniel Bates <dabates@apple.com> |
| |
| Revert r262654 because it caused <rdar://problem/64664156>. |
| Moreover it is no longer necessary as the embedding client |
| changes selection through a different SPI after focusing. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView cleanUpInteraction]): |
| (-[WKContentView _didCommitLoadForMainFrame]): |
| (-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): |
| |
| 2020-06-26 David Kilzer <ddkilzer@apple.com> |
| |
| Crash at WebKit: __62-[WKContentView(WKInteraction) resignFirstResponderForWebView]_block_invoke |
| <https://webkit.org/b/213666> |
| <rdar://problem/64238661> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView resignFirstResponderForWebView]): |
| - Speculative fix to return early if there are no queued key |
| events available by the time the block runs. |
| |
| 2020-06-26 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] Layout tests sometimes assert under -[WKContentView hasContent] |
| https://bugs.webkit.org/show_bug.cgi?id=213656 |
| <rdar://problem/64818648> |
| |
| Reviewed by Tim Horton. |
| |
| Make it safe to invoke `-[WKContentView hasContent]` when post-layout data is not present, and there is no |
| ranged or caret selection. Some editing layout tests on iOS tend to hit the post-layout data assertion due to |
| the callout bar presentation callback firing while we reset the test harness to a consistent state (and spin the |
| runloop while doing so). |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView hasContent]): |
| |
| 2020-06-26 Pablo Saavedra <psaavedra@igalia.com> |
| |
| [GTK][WPE] Fix the matching of an empty value in getCgroupControllerPath() when only cgroupsV2 hierarchy is found |
| https://bugs.webkit.org/show_bug.cgi?id=213646 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/linux/MemoryPressureMonitor.cpp: |
| (WebKit::getCgroupFile): |
| (WebKit::getCgroupControllerPath): |
| (WebKit::systemMemoryUsedAsPercentage): |
| |
| 2020-06-26 Jason Lawrence <lawrence.j@apple.com> |
| |
| Unreviewed, reverting r263511, r263514, and r263565. |
| |
| r263511 caused MediaRecorder test crashes on internal testers. |
| |
| Reverted changesets: |
| |
| "MediaRecorder stopRecorder() returns empty Blob after first |
| use" |
| https://bugs.webkit.org/show_bug.cgi?id=212274 |
| https://trac.webkit.org/changeset/263511 |
| |
| "Unreviewed iOS build fix after r263511." |
| https://trac.webkit.org/changeset/263514 |
| |
| "MediaRecorder.start() Method is Ignoring the "timeslice" |
| Parameter" |
| https://bugs.webkit.org/show_bug.cgi?id=202233 |
| https://trac.webkit.org/changeset/263565 |
| |
| 2020-06-26 Geoffrey Garen <ggaren@apple.com> |
| |
| Initializing the main thread should initialize the main run loop |
| https://bugs.webkit.org/show_bug.cgi?id=213637 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Shared/Cocoa/WebKit2InitializeCocoa.mm: |
| (WebKit::runInitializationCode): |
| (WebKit::InitializeWebKit2): |
| * Shared/WebKit2Initialize.cpp: |
| (WebKit::InitializeWebKit2): |
| |
| 2020-06-26 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Network process is crashing when launching TJMaxx app due to invalid NetworkProcess::DestroySession IPC message |
| https://bugs.webkit.org/show_bug.cgi?id=213625 |
| <rdar://problem/64737890> |
| |
| Reviewed by Alex Christensen. |
| |
| The app is calling [WKWebsiteDataStore init] despite the method being marked as unavailable in |
| WKWebsiteDataStore.h. As a result, they end up with a WKWebsiteDataStore object whose internal |
| _websiteDataStore is bad because its constructor was never called. When [WKWebsiteDataStore dealloc] |
| gets called later own, it calls the ~WebsiteDataStore() destructor for _websiteDataStore but its |
| m_sessionID is 0 because we never called the constructor. This causes us to send a |
| NetworkProcess::DestroySession IPC with a sessionID that is 0, which is not valid so the |
| NetworkProcess crashes. |
| |
| To address the issue, we now provide an implementation of [WKWebsiteDataStore init] which raises an |
| exception, behind a linked-on-after check. To keep the app working, [WKWebsiteDataStore init] returns |
| a new ephemeral data store until rebuilt with the new SDK. |
| |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.h: |
| Mark "new" as unavailable, otherwise [WKWebsiteDataStore new] builds. |
| |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: |
| (-[WKWebsiteDataStore init]): |
| Raise an exception with latest SDK, a new ephemeral data store otherwise. |
| |
| * UIProcess/Cocoa/VersionChecks.h: |
| Add linked-on-after check. |
| |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::~WebsiteDataStore): |
| Add a release assertion to make sure that m_sessionID is always valid when the destructor is called. |
| |
| 2020-06-26 Stephan Szabo <stephan.szabo@sony.com> |
| |
| [WinCairo] Cannot build without resource load statistics |
| https://bugs.webkit.org/show_bug.cgi?id=213534 |
| |
| Reviewed by Don Olmstead. |
| |
| Build fix for !ENABLE(RESOURCE_LOAD_STATISTICS) |
| |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| |
| 2020-06-25 Alex Christensen <achristensen@webkit.org> |
| |
| WKHTTPCookieStore.setCookie should flush the cookies to disk before calling completion handler when we are using the UIProcess's default cookie storage |
| https://bugs.webkit.org/show_bug.cgi?id=213636 |
| |
| Reviewed by Brady Eidson. |
| |
| This fixes a race condition that many, many third party developers run into, causing them to not be logged in when they thought they did. |
| |
| * NetworkProcess/cocoa/NetworkProcessCocoa.mm: |
| (WebKit::saveCookies): |
| * UIProcess/API/APIHTTPCookieStore.cpp: |
| (API::HTTPCookieStore::setCookies): |
| (API::HTTPCookieStore::registerForNewProcessPoolNotifications): |
| (API::HTTPCookieStore::flushDefaultUIProcessCookieStore): |
| * UIProcess/API/APIHTTPCookieStore.h: |
| * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: |
| (API::HTTPCookieStore::flushDefaultUIProcessCookieStore): |
| |
| 2020-06-25 Megan Gardner <megan_gardner@apple.com> |
| |
| Upstream date/time picker style |
| https://bugs.webkit.org/show_bug.cgi?id=213630 |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/forms/WKDateTimeInputControl.mm: |
| (-[WKDateTimePicker datePickerStyle]): |
| |
| 2020-06-25 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r263545. |
| |
| Patch will need refining |
| |
| Reverted changeset: |
| |
| "[iOS] Network process is crashing when launching TJMaxx app |
| due to invalid NetworkProcess::DestroySession IPC message" |
| https://bugs.webkit.org/show_bug.cgi?id=213625 |
| https://trac.webkit.org/changeset/263545 |
| |
| 2020-06-25 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Network process is crashing when launching TJMaxx app due to invalid NetworkProcess::DestroySession IPC message |
| https://bugs.webkit.org/show_bug.cgi?id=213625 |
| <rdar://problem/64737890> |
| |
| Reviewed by Geoffrey Garen. |
| |
| The app is calling [WKWebsiteDataStore init] despite the method being marked as unavailable in |
| WKWebsiteDataStore.h. As a result, they end up with a WKWebsiteDataStore object whose internal |
| _websiteDataStore is bad because its constructor was never called. When [WKWebsiteDataStore dealloc] |
| gets called later own, it calls the ~WebsiteDataStore() destructor for _websiteDataStore but its |
| m_sessionID is 0 because we never called the constructor. This causes us to send a |
| NetworkProcess::DestroySession IPC with a sessionID that is 0, which is not valid so the |
| NetworkProcess crashes. |
| |
| To address the issue, we now provide an implementation of [WKWebsiteDataStore init] which returns nil |
| behind a linked-on-after check (since this crashes the app). To keep the app working, |
| [WKWebsiteDataStore init] returns the default data store until rebuilt with the new SDK. Note that |
| I tried returning a new ephemeral data store instead but this was getting the app in a bad state. |
| |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.h: |
| Mark "new" as unavailable, otherwise [WKWebsiteDataStore new] builds. |
| |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: |
| (-[WKWebsiteDataStore init]): |
| Return nil with latest SDK, the default data store otherwise. |
| |
| * UIProcess/Cocoa/VersionChecks.h: |
| Add linked-on-after check. |
| |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::~WebsiteDataStore): |
| Add a release assertion to make sure that m_sessionID is always valid when the destructor is called. |
| |
| 2020-06-25 Daniel Bates <dabates@apple.com> |
| |
| [iOS] -_requestTextInputContextsInRect cannot find empty Quip spreadsheet title |
| https://bugs.webkit.org/show_bug.cgi?id=213564 |
| <rdar://problem/59355847> |
| |
| Reviewed by Simon Fraser. |
| |
| Check if the search rect intersects the interaction rect, even if it's empty, so long as |
| there is an assisted element. If there isn't an assisted element just do what we do now. |
| Otherwise, if the interaction rect is empty then this means the focused element is an |
| empty inline and it's not tracked in the editable region (see WebCore ChangeLog entry for |
| more details). In this case, just ask the web process directly to find the contexts. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _requestTextInputContextsInRect:completionHandler:]): |
| |
| 2020-06-25 Kate Cheney <katherine_cheney@apple.com> |
| |
| Allow service workers for web browsers |
| https://bugs.webkit.org/show_bug.cgi?id=213573 |
| <rdar://problem/64712630> |
| |
| Reviewed by Brent Fulgham. |
| |
| Allows applications with the full web-browser entitlement to use |
| service workers. |
| |
| * NetworkProcess/ios/NetworkProcessIOS.mm: |
| (WebKit::NetworkProcess::parentProcessHasServiceWorkerEntitlement const): |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _setupPageConfiguration:]): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): |
| |
| 2020-06-25 Youenn Fablet <youenn@apple.com> |
| |
| MediaRecorder stopRecorder() returns empty Blob after first use |
| https://bugs.webkit.org/show_bug.cgi?id=212274 |
| <rdar://problem/63601298> |
| |
| Reviewed by Eric Carlson. |
| |
| Update implementation to do initialization as part of startRecording. |
| |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: |
| (WebKit::RemoteMediaRecorderManager::releaseRecorder): |
| Remove ASSERT as recorder creation in WebProcess is always ok while creation in GPUProcess may fail and m_recorders may not be populated. |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: |
| (WebKit::MediaRecorderPrivate::MediaRecorderPrivate): |
| (WebKit::MediaRecorderPrivate::startRecording): |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: |
| |
| 2020-06-24 James Savage <james.savage@apple.com> |
| |
| Upstream iPadOS 13.0 multi-window support |
| https://bugs.webkit.org/show_bug.cgi?id=213590 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: |
| (-[WKFullScreenWindowController enterFullScreen]): Always construct a |
| UIWindow using the expected UIWindowScene. |
| (makeWindowFromView): Deleted. |
| |
| 2020-06-24 David Kilzer <ddkilzer@apple.com> |
| |
| Use ObjectIdentifier<>instead of WebCore::nextPlaybackTargetClientContextId() in Document.cpp |
| <https://webkit.org/b/213546> |
| <rdar://problem/61803576> |
| |
| Reviewed by Youenn Fablet. |
| |
| Switch from uint64_t to WebCore::PlaybackTargetClientContextIdentifier |
| for contextId values. |
| |
| * Scripts/webkit/messages.py: |
| (types_that_cannot_be_forward_declared): |
| - Add WebCore::PlaybackTargetClientContextIdentifier to list. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::addPlaybackTargetPickerClient): |
| (WebKit::WebPageProxy::removePlaybackTargetPickerClient): |
| (WebKit::WebPageProxy::showPlaybackTargetPicker): |
| (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange): |
| (WebKit::WebPageProxy::setPlaybackTarget): |
| (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange): |
| (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget): |
| (WebKit::WebPageProxy::playbackTargetPickerWasDismissed): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::addPlaybackTargetPickerClient): |
| (WebKit::WebChromeClient::removePlaybackTargetPickerClient): |
| (WebKit::WebChromeClient::showPlaybackTargetPicker): |
| (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::playbackTargetSelected const): |
| (WebKit::WebPage::playbackTargetAvailabilityDidChange): |
| (WebKit::WebPage::setShouldPlayToPlaybackTarget): |
| (WebKit::WebPage::playbackTargetPickerWasDismissed): |
| |
| 2020-06-24 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Use WebKit::LayerHostingContextID instead of uint32_t for videoLayerID |
| <https://webkit.org/b/213576> |
| <rdar://problem/61806253> |
| |
| Reviewed by Darin Adler. |
| |
| Use WebKit::LayerHostingContextID instead of uint32_t as type |
| for videoLayerID since the value comes from |
| LayerHostingContext::contextID() in |
| VideoFullscreenManager::enterVideoFullscreenForVideoElement(). |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): |
| |
| 2020-06-24 Tim Horton <timothy_horton@apple.com> |
| |
| Cannot play back any video on Apple Silicon devices |
| https://bugs.webkit.org/show_bug.cgi?id=213584 |
| <rdar://problem/64714596> |
| |
| Reviewed by Per Arne Vollan. |
| |
| * WebProcess/com.apple.WebProcess.sb.in: |
| An unfortunate and incorrect refactoring caused some of the sandbox exceptions to get dropped on the floor. |
| |
| 2020-06-24 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r260276): Scrolling through shelves on music.apple.com is not smooth |
| https://bugs.webkit.org/show_bug.cgi?id=213572 |
| <rdar://problem/64306590> |
| |
| Reviewed by Wenson Hsieh. |
| |
| The scroll position for an overflow:scroll element with scroll-snap could jump around |
| during scrolling, if layout triggered a call to ScrollableArea::updateScrollSnapState(). |
| The crux of the issue is that isScrollSnapInProgress() returned false for overflow:scrollers |
| which are scrolling asynchronously. |
| |
| Fix by extending the existing ScrollingTree::isScrollSnapInProgress() to track all scrolling |
| nodes by storing a HashSet<ScrollingNodeID> rather than just a flag for the main frame. |
| |
| RenderLayer::isScrollSnapInProgress() then consults the ScrollingCoordinator, which consults |
| the scrolling tree for this state. |
| |
| Add the ability to test via internals.isScrollSnapInProgress(). |
| |
| * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm: |
| (WebKit::RemoteScrollingCoordinator::isScrollSnapInProgress const): |
| |
| 2020-06-24 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r263295. |
| https://bugs.webkit.org/show_bug.cgi?id=213577 |
| |
| Introduced logging regression |
| |
| Reverted changeset: |
| |
| "[macOS] Connections to the preference daemon are established |
| before entering the sandbox" |
| https://bugs.webkit.org/show_bug.cgi?id=213379 |
| https://trac.webkit.org/changeset/263295 |
| |
| 2020-06-24 David Kilzer <ddkilzer@apple.com> |
| |
| Use ObjectIdentifier<> instead of uint64_t for context IDs in VideoFullscreenManagerProxy |
| <https://webkit.org/b/212392> |
| <rdar://problem/61799040> |
| |
| Reviewed by Youenn Fablet. |
| |
| Switch from uint64_t to WebKit::PlaybackSessionContextIdentifier |
| for contextId values. |
| |
| * Scripts/webkit/messages.py: |
| (types_that_cannot_be_forward_declared): |
| - Add WebKit::PlaybackSessionContextIdentifier to list. |
| * UIProcess/Cocoa/PlaybackSessionManagerProxy.h: |
| (WebKit::PlaybackSessionManagerProxy::controlsManagerContextId const): |
| * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in: |
| * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: |
| (WebKit::PlaybackSessionManagerProxy::createModelAndInterface): |
| (WebKit::PlaybackSessionManagerProxy::ensureModelAndInterface): |
| (WebKit::PlaybackSessionManagerProxy::ensureModel): |
| (WebKit::PlaybackSessionManagerProxy::ensureInterface): |
| (WebKit::PlaybackSessionManagerProxy::addClientForContext): |
| (WebKit::PlaybackSessionManagerProxy::removeClientForContext): |
| (WebKit::PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID): |
| (WebKit::PlaybackSessionManagerProxy::clearPlaybackControlsManager): |
| (WebKit::PlaybackSessionManagerProxy::currentTimeChanged): |
| (WebKit::PlaybackSessionManagerProxy::bufferedTimeChanged): |
| (WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged): |
| (WebKit::PlaybackSessionManagerProxy::canPlayFastReverseChanged): |
| (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged): |
| (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged): |
| (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged): |
| (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged): |
| (WebKit::PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged): |
| (WebKit::PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged): |
| (WebKit::PlaybackSessionManagerProxy::mutedChanged): |
| (WebKit::PlaybackSessionManagerProxy::volumeChanged): |
| (WebKit::PlaybackSessionManagerProxy::durationChanged): |
| (WebKit::PlaybackSessionManagerProxy::playbackStartedTimeChanged): |
| (WebKit::PlaybackSessionManagerProxy::rateChanged): |
| (WebKit::PlaybackSessionManagerProxy::pictureInPictureSupportedChanged): |
| (WebKit::PlaybackSessionManagerProxy::handleControlledElementIDResponse const): |
| (WebKit::PlaybackSessionManagerProxy::play): |
| (WebKit::PlaybackSessionManagerProxy::pause): |
| (WebKit::PlaybackSessionManagerProxy::togglePlayState): |
| (WebKit::PlaybackSessionManagerProxy::beginScrubbing): |
| (WebKit::PlaybackSessionManagerProxy::endScrubbing): |
| (WebKit::PlaybackSessionManagerProxy::seekToTime): |
| (WebKit::PlaybackSessionManagerProxy::fastSeek): |
| (WebKit::PlaybackSessionManagerProxy::beginScanningForward): |
| (WebKit::PlaybackSessionManagerProxy::beginScanningBackward): |
| (WebKit::PlaybackSessionManagerProxy::endScanning): |
| (WebKit::PlaybackSessionManagerProxy::selectAudioMediaOption): |
| (WebKit::PlaybackSessionManagerProxy::selectLegibleMediaOption): |
| (WebKit::PlaybackSessionManagerProxy::togglePictureInPicture): |
| (WebKit::PlaybackSessionManagerProxy::toggleMuted): |
| (WebKit::PlaybackSessionManagerProxy::setMuted): |
| (WebKit::PlaybackSessionManagerProxy::setVolume): |
| (WebKit::PlaybackSessionManagerProxy::setPlayingOnSecondScreen): |
| - Remove MESSAGE_CHECK_CONTEXTID() since it is now redundant. |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenModelContext::VideoFullscreenModelContext): |
| (WebKit::VideoFullscreenManagerProxy::requestRouteSharingPolicyAndContextUID): |
| (WebKit::VideoFullscreenManagerProxy::createModelAndInterface): |
| (WebKit::VideoFullscreenManagerProxy::ensureModelAndInterface): |
| (WebKit::VideoFullscreenManagerProxy::ensureModel): |
| (WebKit::VideoFullscreenManagerProxy::ensureInterface): |
| (WebKit::VideoFullscreenManagerProxy::findInterface): |
| (WebKit::VideoFullscreenManagerProxy::addClientForContext): |
| (WebKit::VideoFullscreenManagerProxy::removeClientForContext): |
| (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): |
| (WebKit::VideoFullscreenManagerProxy::setHasVideo): |
| (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): |
| (WebKit::VideoFullscreenManagerProxy::enterFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::exitFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): |
| (WebKit::VideoFullscreenManagerProxy::setInlineRect): |
| (WebKit::VideoFullscreenManagerProxy::setHasVideoContentLayer): |
| (WebKit::VideoFullscreenManagerProxy::cleanupFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline): |
| (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::requestFullscreenMode): |
| (WebKit::VideoFullscreenManagerProxy::requestUpdateInlineRect): |
| (WebKit::VideoFullscreenManagerProxy::requestVideoContentLayer): |
| (WebKit::VideoFullscreenManagerProxy::returnVideoContentLayer): |
| (WebKit::VideoFullscreenManagerProxy::didSetupFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::willExitFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::didExitFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::didEnterFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::setVideoLayerFrame): |
| (WebKit::VideoFullscreenManagerProxy::setVideoLayerGravity): |
| (WebKit::VideoFullscreenManagerProxy::fullscreenModeChanged): |
| (WebKit::VideoFullscreenManagerProxy::fullscreenMayReturnToInline): |
| - Remove MESSAGE_CHECK_CONTEXTID() since it is now redundant. |
| * WebKit.xcodeproj/project.pbxproj: |
| - Add PlaybackSessionContextIdentifier.h to the project. |
| * WebProcess/cocoa/PlaybackSessionContextIdentifier.h: Add. |
| * WebProcess/cocoa/PlaybackSessionManager.h: |
| * WebProcess/cocoa/PlaybackSessionManager.messages.in: |
| * WebProcess/cocoa/PlaybackSessionManager.mm: |
| (WebKit::PlaybackSessionInterfaceContext::PlaybackSessionInterfaceContext): |
| (WebKit::PlaybackSessionManager::createModelAndInterface): |
| (WebKit::PlaybackSessionManager::ensureModelAndInterface): |
| (WebKit::PlaybackSessionManager::ensureModel): |
| (WebKit::PlaybackSessionManager::ensureInterface): |
| (WebKit::PlaybackSessionManager::removeContext): |
| (WebKit::PlaybackSessionManager::addClientForContext): |
| (WebKit::PlaybackSessionManager::removeClientForContext): |
| (WebKit::PlaybackSessionManager::setUpPlaybackControlsManager): |
| (WebKit::PlaybackSessionManager::clearPlaybackControlsManager): |
| (WebKit::PlaybackSessionManager::contextIdForMediaElement): |
| (WebKit::PlaybackSessionManager::durationChanged): |
| (WebKit::PlaybackSessionManager::currentTimeChanged): |
| (WebKit::PlaybackSessionManager::bufferedTimeChanged): |
| (WebKit::PlaybackSessionManager::playbackStartedTimeChanged): |
| (WebKit::PlaybackSessionManager::rateChanged): |
| (WebKit::PlaybackSessionManager::seekableRangesChanged): |
| (WebKit::PlaybackSessionManager::canPlayFastReverseChanged): |
| (WebKit::PlaybackSessionManager::audioMediaSelectionOptionsChanged): |
| (WebKit::PlaybackSessionManager::legibleMediaSelectionOptionsChanged): |
| (WebKit::PlaybackSessionManager::externalPlaybackChanged): |
| (WebKit::PlaybackSessionManager::audioMediaSelectionIndexChanged): |
| (WebKit::PlaybackSessionManager::legibleMediaSelectionIndexChanged): |
| (WebKit::PlaybackSessionManager::wirelessVideoPlaybackDisabledChanged): |
| (WebKit::PlaybackSessionManager::mutedChanged): |
| (WebKit::PlaybackSessionManager::volumeChanged): |
| (WebKit::PlaybackSessionManager::isPictureInPictureSupportedChanged): |
| (WebKit::PlaybackSessionManager::play): |
| (WebKit::PlaybackSessionManager::pause): |
| (WebKit::PlaybackSessionManager::togglePlayState): |
| (WebKit::PlaybackSessionManager::beginScrubbing): |
| (WebKit::PlaybackSessionManager::endScrubbing): |
| (WebKit::PlaybackSessionManager::seekToTime): |
| (WebKit::PlaybackSessionManager::fastSeek): |
| (WebKit::PlaybackSessionManager::beginScanningForward): |
| (WebKit::PlaybackSessionManager::beginScanningBackward): |
| (WebKit::PlaybackSessionManager::endScanning): |
| (WebKit::PlaybackSessionManager::selectAudioMediaOption): |
| (WebKit::PlaybackSessionManager::selectLegibleMediaOption): |
| (WebKit::PlaybackSessionManager::handleControlledElementIDRequest): |
| (WebKit::PlaybackSessionManager::togglePictureInPicture): |
| (WebKit::PlaybackSessionManager::toggleMuted): |
| (WebKit::PlaybackSessionManager::setMuted): |
| (WebKit::PlaybackSessionManager::setVolume): |
| (WebKit::PlaybackSessionManager::setPlayingOnSecondScreen): |
| (WebKit::nextContextId): Delete. |
| - Replace with PlaybackSessionContextIdentifier::generate(). |
| * WebProcess/cocoa/VideoFullscreenManager.h: |
| (WebKit::VideoFullscreenInterfaceContext::create): |
| * WebProcess/cocoa/VideoFullscreenManager.messages.in: |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenInterfaceContext::VideoFullscreenInterfaceContext): |
| (WebKit::VideoFullscreenManager::createModelAndInterface): |
| (WebKit::VideoFullscreenManager::ensureModelAndInterface): |
| (WebKit::VideoFullscreenManager::ensureModel): |
| (WebKit::VideoFullscreenManager::ensureInterface): |
| (WebKit::VideoFullscreenManager::removeContext): |
| (WebKit::VideoFullscreenManager::addClientForContext): |
| (WebKit::VideoFullscreenManager::removeClientForContext): |
| (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement): |
| (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement): |
| (WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation): |
| (WebKit::VideoFullscreenManager::hasVideoChanged): |
| (WebKit::VideoFullscreenManager::videoDimensionsChanged): |
| (WebKit::VideoFullscreenManager::requestFullscreenMode): |
| (WebKit::VideoFullscreenManager::fullscreenModeChanged): |
| (WebKit::VideoFullscreenManager::requestUpdateInlineRect): |
| (WebKit::VideoFullscreenManager::requestVideoContentLayer): |
| (WebKit::VideoFullscreenManager::returnVideoContentLayer): |
| (WebKit::VideoFullscreenManager::didSetupFullscreen): |
| (WebKit::VideoFullscreenManager::willExitFullscreen): |
| (WebKit::VideoFullscreenManager::didEnterFullscreen): |
| (WebKit::VideoFullscreenManager::didExitFullscreen): |
| (WebKit::VideoFullscreenManager::didCleanupFullscreen): |
| (WebKit::VideoFullscreenManager::setVideoLayerGravityEnum): |
| (WebKit::VideoFullscreenManager::fullscreenMayReturnToInline): |
| (WebKit::VideoFullscreenManager::requestRouteSharingPolicyAndContextUID): |
| (WebKit::VideoFullscreenManager::setVideoLayerFrameFenced): |
| |
| 2020-06-24 Alex Christensen <achristensen@webkit.org> |
| |
| REGRESSION(r262341) Use UTF-8 to decode CFURLRefs from IPC |
| https://bugs.webkit.org/show_bug.cgi?id=213565 |
| <rdar://problem/64408924> |
| |
| Reviewed by Darin Adler. |
| |
| My assumption that all valid CFURLRefs are ASCII was incorrect. |
| Some of them are UTF-8 encoded non-ASCII. |
| Using kCFStringEncodingUTF8 covers both. |
| |
| Test: fast/url/navigate-non-ascii.html |
| |
| * Shared/cf/ArgumentCodersCF.cpp: |
| (IPC::decode): |
| |
| 2020-06-24 Umar Iqbal <uiqbal@apple.com> |
| |
| We should resurrect the older patch that collects some statistics of web API calls |
| https://bugs.webkit.org/show_bug.cgi?id=213319 |
| |
| Reviewed by Brent Fulgham. |
| |
| + Enabled ENABLE_WEB_API_STATISTICS flag |
| + Removed .string() from mainFrameRegistrableDomain to append it to topFrameRegistrableDomainsWhichAccessedWebAPIs |
| because topFrameRegistrableDomainsWhichAccessedWebAPIs is a HashSet of WebCore::RegistrableDomain |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp: |
| (WebKit::WebResourceLoadObserver::logFontLoad): |
| (WebKit::WebResourceLoadObserver::logCanvasRead): |
| (WebKit::WebResourceLoadObserver::logCanvasWriteOrMeasure): |
| (WebKit::WebResourceLoadObserver::logNavigatorAPIAccessed): |
| (WebKit::WebResourceLoadObserver::logScreenAPIAccessed): |
| |
| 2020-06-24 Andy Estes <aestes@apple.com> |
| |
| [iOS] Open element actions sometimes result in a hover instead of a click |
| https://bugs.webkit.org/show_bug.cgi?id=213530 |
| <rdar://problem/64176707> |
| |
| Reviewed by Darin Adler. |
| |
| _WKElementAction implements a standard action handler for _WKElementActionTypeOpen that |
| attempts a synthetic click at the interaction location, expecting this click to start a |
| navigation to the interaction node's target URL. Synthetic clicks are subject to content |
| change observing, however, and if ContentChangeObserver detects a meaningful visible change |
| after dispatching a mousemove event at the interaction location then WebPage will refrain |
| from dispatching the mousedown and mouseup events that would have started a navigation. |
| |
| While this behavior is necessary to support hover menus, it doesn't make sense when the user |
| is interacting with a context menu. Since the system might display a preview of the target |
| URL found at the interaction location, users expect the "Open" action to navigate to that |
| same URL rather than merely display a hover menu. |
| |
| This change opts synthetic clicks from the open action out of content change observing by |
| ensuring that an interaction is started when handling _WKElementActionTypeOpen (like we do |
| for "Copy" and "Save Image"), then checking if WebPage::m_interactionNode matches the node |
| found in WebPage::attemptSyntheticClick. If it does, WebPage now bypasses content change |
| observing and completes a synthetic click. |
| |
| New API test: ElementActionTests.OpenLinkWithHoverMenu |
| |
| * UIProcess/API/Cocoa/_WKElementAction.mm: |
| (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): Changed to call |
| -[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:] in the |
| handlers for _WKElementActionTypeCopy, _WKElementActionTypeOpen, |
| _WKElementActionTypeSaveImage, and _WKElementActionTypeShare. |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKActionSheetAssistant.mm: |
| (-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]): Added to |
| handle the subset of standard element actions that flow through |
| WKActionSheetAssistantDelegate. Used a boolean parameter to decide whether the delegate |
| should start and stop an interaction when handling the action. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _highlightLongPressRecognized:]): |
| (-[WKContentView actionSheetAssistant:openElementAtLocation:]): Renamed |
| -_attemptClickAtLocation:modifierFlags: to -_attemptSyntheticClickAtLocation:modifierFlags:. |
| (-[WKContentView _attemptSyntheticClickAtLocation:modifierFlags:]): Changed to call |
| WebPageProxy::attemptSyntheticClick instead of WebPageProxy::handleTap. |
| (-[WKContentView _simulateElementAction:atLocation:]): Set |
| _layerTreeTransactionIdAtLastInteractionStart to better simulate context menu interactions. |
| |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::attemptSyntheticClick): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::attemptSyntheticClick): Renamed handleTap to attemptSyntheticClick. If the |
| node responding to clicks matches the node found on interaction start (m_interactionNode), |
| call WebPage::completeSyntheticClick directly. |
| |
| 2020-06-24 Tim Horton <timothy_horton@apple.com> |
| |
| Fix the build once RBSProcessLimitations.h is introduced |
| https://bugs.webkit.org/show_bug.cgi?id=213562 |
| |
| Reviewed by Wenson Hsieh. |
| |
| * Platform/spi/ios/RunningBoardServicesSPI.h: |
| We can't forward-declare Objective-C SPI if it actually exists |
| without inspiring duplicate definition errors. |
| |
| 2020-06-24 Alex Christensen <achristensen@webkit.org> |
| |
| Remove now-invalid assertion after r263441 |
| https://bugs.webkit.org/show_bug.cgi?id=213527 |
| |
| The alternative service storage directory is now null when HTTP/3 is disabled, not just in private browsing. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| |
| 2020-06-24 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION (r263328): Crash in bool WTF::WeakHashSet<WebKit::AudioSessionRoutingArbitratorProxy, WTF::EmptyCounter>::contains<WebKit::AudioSessionRoutingArbitratorProxy> const |
| https://bugs.webkit.org/show_bug.cgi?id=213526 |
| <rdar://problem/64591777> |
| |
| Reviewed by Eric Carlson. |
| |
| Clear the m_routingArbitrator before WebProcessPool::disconnectProcess(), not after. |
| |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shutDown): |
| |
| 2020-06-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.2 release |
| |
| * gtk/NEWS: Add release notes for 2.29.2. |
| |
| 2020-06-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Add API to allow applications to handle the HTTP authentication credential storage |
| https://bugs.webkit.org/show_bug.cgi?id=213177 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add API to disable the internal credential storage support when building with libsecret. And add new API to |
| WebKitAuthenticationRequest to allow applications to use their own credentials storage: |
| |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/NetworkSessionCreationParameters.cpp: |
| (WebKit::NetworkSessionCreationParameters::encode const): |
| (WebKit::NetworkSessionCreationParameters::decode): |
| * NetworkProcess/NetworkSessionCreationParameters.h: |
| * NetworkProcess/soup/NetworkDataTaskSoup.cpp: |
| (WebKit::NetworkDataTaskSoup::persistentCredentialStorageEnabled const): |
| (WebKit::NetworkDataTaskSoup::authenticate): |
| (WebKit::NetworkDataTaskSoup::continueAuthenticate): |
| (WebKit::NetworkDataTaskSoup::didGetHeaders): |
| * NetworkProcess/soup/NetworkDataTaskSoup.h: |
| * NetworkProcess/soup/NetworkProcessSoup.cpp: |
| (WebKit::NetworkProcess::setPersistentCredentialStorageEnabled): |
| * NetworkProcess/soup/NetworkSessionSoup.cpp: |
| (WebKit::NetworkSessionSoup::NetworkSessionSoup): |
| * NetworkProcess/soup/NetworkSessionSoup.h: |
| * UIProcess/API/glib/WebKitAuthenticationRequest.cpp: |
| (webkitAuthenticationRequestDispose): |
| (webkit_authentication_request_class_init): |
| (webkitAuthenticationRequestCreate): |
| (webkitAuthenticationRequestDidAuthenticate): |
| (webkitAuthenticationRequestGetProposedCredential): |
| (webkit_authentication_request_can_save_credentials): |
| (webkit_authentication_request_set_can_save_credentials): |
| (webkit_authentication_request_get_proposed_credential): |
| (webkit_authentication_request_set_proposed_credential): |
| (webkit_authentication_request_authenticate): |
| (webkit_authentication_request_cancel): |
| * UIProcess/API/glib/WebKitAuthenticationRequestPrivate.h: |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewCompleteAuthenticationRequest): |
| (webkitWebViewLoadChanged): |
| (webkitWebViewLoadFailed): |
| (webkitWebViewLoadFailedWithTLSErrors): |
| (webkitWebViewHandleAuthenticationChallenge): |
| * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: |
| (webkit_website_data_manager_set_persistent_credential_storage_enabled): |
| (webkit_website_data_manager_get_persistent_credential_storage_enabled): |
| * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: |
| (webkitAuthenticationDialogInitialize): |
| * UIProcess/API/gtk/WebKitAuthenticationRequest.h: |
| * UIProcess/API/gtk/WebKitWebsiteDataManager.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitAuthenticationRequest.h: |
| * UIProcess/API/wpe/WebKitWebsiteDataManager.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| (WebKit::WebsiteDataStore::persistentCredentialStorageEnabled const): |
| * UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp: |
| (WebKit::WebsiteDataStore::platformSetNetworkParameters): |
| (WebKit::WebsiteDataStore::setPersistentCredentialStorageEnabled): |
| * UIProcess/soup/WebProcessPoolSoup.cpp: |
| (WebKit::WebProcessPool::platformInitializeNetworkProcess): |
| |
| 2020-06-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Do not set the default configuration again when creating the WebsiteDataStore |
| https://bugs.webkit.org/show_bug.cgi?id=213340 |
| |
| Reviewed by Michael Catanzaro. |
| |
| WebsiteDataStoreConfiguration already initializes on construction with the default paths, so we only need to |
| override the ones set by the user. |
| |
| * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: |
| (webkitWebsiteDataManagerGetDataStore): |
| |
| 2020-06-23 Alex Christensen <achristensen@webkit.org> |
| |
| Make HTTP/3 experimental feature work on iOS and only create storage directory if enabled |
| https://bugs.webkit.org/show_bug.cgi?id=213527 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Reading the experimental feature wasn't working on iOS because the user defaults prefix is different. |
| Also, only resolve and create the directory if it is enabled. This should help with startup time, which |
| has to wait for all directories to be resolved and created. See rdar://problem/64263228 which this should help with. |
| We also respect the system default unless explicitly turned on, which should make it easier for CFNetwork to change things. |
| |
| I added an API test that verifies that the default alt-svc storage directory is not created when we don't want it to be. |
| |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::ensureNetworkProcess): |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::platformSetNetworkParameters): |
| (WebKit::WebsiteDataStore::http3Enabled): |
| |
| 2020-06-23 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION (r244633): Mail flashes when copying text in an email |
| https://bugs.webkit.org/show_bug.cgi?id=213529 |
| <rdar://problem/55025522> |
| |
| Reviewed by Tim Horton. |
| |
| When copying a text selection in Mail conversation view, Mail uses injected bundle hooks to supply additional |
| metadata before writing to the pasteboard. Grabbing this data involves temporarily expanding any collapsed |
| blockquotes that appear in the mail message, before re-collapsing them after we finish gathering data to be |
| written to the pasteboard. |
| |
| Prior to r244633, the size of the document while expanding collapsed content would not be propagated to the |
| WKWebView, since intrinsic content size changes were batched and sent ahead of the next drawing area flush. |
| After r244633, however, updates are now sent every time the layout size changes. This was done to ensure that |
| the intrinsic content size was always up to date before sending the first layout milestone to the UI process. |
| |
| To preserve the intent of r244633 (with respect to the first layout milestone) as well as intrinsic content size |
| behavior prior to r244633 after performing layout, we reintroduce the mechanism for batching intrinsic size |
| updates until the next flush, but keep the out-of-band mechanism for immediately sending an up-to-date intrinsic |
| size to the UI process before firing the first layout milestone. |
| |
| Test: WebKit.AutoLayoutBatchesUpdatesWhenInvalidatingIntrinsicContentSize |
| |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::intrinsicContentsSizeChanged const): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::updateIntrinsicContentSizeIfNeeded): |
| |
| If we have a pending intrinsic content size update, clear it out here so that an out-of-band call to |
| updateIntrinsicContentSizeIfNeeded doesn't get overridden by an older intrinsic content size that was previously |
| scheduled. |
| |
| (WebKit::WebPage::flushPendingIntrinsicContentSizeUpdate): |
| |
| Add a helper method to send any pending intrinsic content size update. |
| |
| (WebKit::WebPage::scheduleIntrinsicContentSizeUpdate): |
| |
| Add a helper method to schedule an intrinsic content size update for the next tiled drawing area flush. |
| |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: |
| (WebKit::TiledCoreAnimationDrawingArea::updateRendering): |
| |
| 2020-06-23 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] WebPaymentCoordinatorProxy can be destroyed without dismissing its authorization presenter |
| https://bugs.webkit.org/show_bug.cgi?id=213423 |
| <rdar://problem/60416221> |
| |
| Reviewed by Youenn Fablet. |
| |
| When a website completes a payment session, WebPaymentCoordinatorProxy would set its m_state |
| to Idle by calling didReachFinalState, but would wait to call hidePaymentUI until the |
| payment authorization presenter calls its presenterDidFinish callback. This allows the |
| presenter to display a final message to the user before dismissing. As a catch-all, |
| ~WebPaymentCoordinatorProxy would call hidePaymentUI, but only if m_state wasn't Idle. If a |
| WebPaymentCoordinatorProxy was destroyed after a website completed a payment session but |
| before the presenter called presenterDidFinish, hidePaymentUI would never be called. |
| |
| This patch addresses this by simplifying the logic for completing or canceling a payment |
| session. It's based on the following observations: |
| |
| 1. With the exception of the case described above, every caller of didReachFinalState would |
| also call hidePaymentUI immediately beforehand. That means that we can move the calls to |
| hidePaymentUI inside didReachFinalState. For the completePaymentSession case, rather than |
| call didReachFinalState without dismissing the UI, we enter a new Completing state, then |
| call didReachFinalState either in ~WebPaymentCoordinatorProxy or presenterDidFinish. |
| |
| 2. didCancelPaymentSession is really a special case of didReachFinalState that also sends |
| the DidCancelPaymentSession message to cancel active sessions in the web process. We can |
| teach didReachFinalState to send this message when necessary and remove |
| didCancelPaymentSession. |
| |
| 3. PaymentAuthorizationPresenter stored a "did reach final state" boolean on payment |
| completion and passed this value back to the client in the presenterDidFinish callback. |
| WebPaymentCoordinatorProxy used this to determine whether to cancel an active session by |
| calling didCancelPaymentSession or clean up a completed session by calling hidePaymentUI. |
| With the addition of the Completing state and the merging of didCancelPaymentSession and |
| hidePaymentUI into didReachFinalState, we can get rid of this final state tracking in |
| PaymentAuthorizationPresenter and unconditionally call didReachFinalState in the |
| presenterDidFinish callback. |
| |
| No new tests possible. A manual test case is described in <rdar://problem/60416221>. |
| |
| * Platform/cocoa/PaymentAuthorizationPresenter.h: Removed the didReachFinalState argument |
| from Client::presenterDidFinish. |
| |
| * Platform/cocoa/PaymentAuthorizationPresenter.mm: |
| (WebKit::PaymentAuthorizationPresenter::completePaymentSession): Changed to call |
| -[WKPaymentAuthorizationDelegate completePaymentSession:errors:]. |
| |
| * Platform/cocoa/WKPaymentAuthorizationDelegate.h: |
| * Platform/cocoa/WKPaymentAuthorizationDelegate.mm: Removed the _didReachFinalState ivar. |
| (-[WKPaymentAuthorizationDelegate completePaymentSession:errors:]): Renamed from |
| -completePaymentSession:errors:didReachFinalState:. Stopped setting _didReachFinalState. |
| (-[WKPaymentAuthorizationDelegate invalidate]): Changed to call |
| -completePaymentSession:errors:. |
| (-[WKPaymentAuthorizationDelegate _didAuthorizePayment:completion:]): Ditto. |
| (-[WKPaymentAuthorizationDelegate _didFinish]): Stopped passing the value of |
| _didReachFinalState to PaymentAuthorizationPresenter::Client::presenterDidFinish. |
| (-[WKPaymentAuthorizationDelegate completePaymentSession:errors:didReachFinalState:]): |
| Renamed to -completePaymentSession:errors:. |
| |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: |
| (WebKit::WebPaymentCoordinatorProxy::showPaymentUI): Replaced calls to |
| didCancelPaymentSession with didReachFinalState. |
| (WebKit::WebPaymentCoordinatorProxy::completePaymentSession): Set m_state to Completing |
| rather than call didReachFinalState. |
| (WebKit::WebPaymentCoordinatorProxy::abortPaymentSession): Removed call to hidePaymentUI |
| since didReachFinalState was already being called. |
| (WebKit::WebPaymentCoordinatorProxy::cancelPaymentSession): Replaced call to |
| didCancelPaymentSession with didReachFinalState. |
| (WebKit::WebPaymentCoordinatorProxy::presenterDidFinish): Called didReachFinalState |
| unconditionally now that the didReachFinalState boolean has been removed. |
| (WebKit::WebPaymentCoordinatorProxy::canBegin const): Returned false for State::Completing. |
| (WebKit::WebPaymentCoordinatorProxy::canCancel const): Ditto. |
| (WebKit::WebPaymentCoordinatorProxy::canCompletePayment const): Ditto. |
| (WebKit::WebPaymentCoordinatorProxy::canAbort const): Ditto. |
| (WebKit::WebPaymentCoordinatorProxy::didReachFinalState): Added an early return if m_state |
| is already Idle. Sent the DidCancelPaymentSession message if canCancel is true. Called |
| platformHidePaymentUI before clearing m_authorizationPresenter and setting m_state to Idle. |
| (WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession): Deleted. |
| |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.h: |
| (WebKit::WebPaymentCoordinatorProxy::didReachFinalState): Added a PaymentSessionError&& arg. |
| (WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession): Deleted. |
| |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy): Replaced call to |
| hidePaymentUI with didReachFinalState. |
| |
| * Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: |
| (WebKit::WebPaymentCoordinatorProxy::platformHidePaymentUI): Renamed from hidePaymentUI. |
| Stopped clearing m_authorizationPresenter since didReachFinalState now does that. |
| (WebKit::WebPaymentCoordinatorProxy::hidePaymentUI): Renamed to platformHidePaymentUI. |
| |
| * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: |
| (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Removed call to hidePaymentUI |
| since didReachFinalState was already being called. |
| (WebKit::WebPaymentCoordinatorProxy::platformHidePaymentUI): Renamed from hidePaymentUI. |
| Stopped clearing m_authorizationPresenter since didReachFinalState now does that. |
| (WebKit::WebPaymentCoordinatorProxy::hidePaymentUI): Renamed to platformHidePaymentUI. |
| |
| 2020-06-23 Chris Dumez <cdumez@apple.com> |
| |
| Remove a lot of unnecessary calls to Ref::copyRef() |
| https://bugs.webkit.org/show_bug.cgi?id=213533 |
| |
| Reviewed by Darin Adler. |
| |
| Remove a lot of unnecessary calls to Ref::copyRef() now that Ref is copyable. |
| |
| * GPUProcess/media/RemoteMediaPlayerProxy.cpp: |
| (WebKit::RemoteMediaPlayerProxy::requestResource): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::CompletionHandler<void): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::hasStorageAccess): |
| (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal): |
| (WebKit::ResourceLoadStatisticsMemoryStore::clear): |
| (WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: |
| (WebKit::ResourceLoadStatisticsStore::removeDataRecords): |
| (WebKit::ResourceLoadStatisticsStore::grandfatherExistingWebsiteData): |
| (WebKit::ResourceLoadStatisticsStore::updateCookieBlockingForDomains): |
| (WebKit::ResourceLoadStatisticsStore::removeAllStorageAccess): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated): |
| (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): |
| (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::loadPing): |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::didClose): |
| (WebKit::NetworkProcess::fetchWebsiteData): |
| (WebKit::NetworkProcess::deleteWebsiteData): |
| (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): |
| (WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains): |
| (WebKit::NetworkProcess::registrableDomainsWithWebsiteData): |
| (WebKit::NetworkProcess::renameOriginInWebsiteData): |
| * NetworkProcess/cache/CacheStorageEngine.cpp: |
| (WebKit::CacheStorage::Engine::readCachesFromDisk): |
| (WebKit::CacheStorage::Engine::fetchDirectoryEntries): |
| (WebKit::CacheStorage::Engine::clearAllCaches): |
| (WebKit::CacheStorage::Engine::clearCachesForOrigin): |
| (WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories): |
| * NetworkProcess/cocoa/NetworkProcessCocoa.mm: |
| (WebKit::NetworkProcess::clearDiskCache): |
| * NetworkProcess/soup/NetworkProcessSoup.cpp: |
| (WebKit::NetworkProcess::clearDiskCache): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreStatisticsResetToConsistentState): |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (-[WKWebView _takeViewSnapshot]): |
| * UIProcess/Automation/WebAutomationSession.cpp: |
| (WebKit::WebAutomationSession::resolveChildFrameHandle): |
| (WebKit::WebAutomationSession::resolveParentFrameHandle): |
| (WebKit::WebAutomationSession::computeElementLayout): |
| (WebKit::WebAutomationSession::selectOptionElement): |
| (WebKit::WebAutomationSession::setFilesForInputFileUpload): |
| (WebKit::WebAutomationSession::getAllCookies): |
| (WebKit::WebAutomationSession::deleteSingleCookie): |
| (WebKit::WebAutomationSession::addSingleCookie): |
| (WebKit::WebAutomationSession::performMouseInteraction): |
| (WebKit::WebAutomationSession::takeScreenshot): |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): |
| * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: |
| (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::handleSynchronousMessage): |
| (WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride): |
| (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| (WebKit::WebPageProxy::decidePolicyForResponseShared): |
| (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::processForNavigationInternal): |
| (WebKit::WebProcessPool::seedResourceLoadStatisticsForTesting): |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::setMaxStatisticsEntries): |
| (WebKit::WebsiteDataStore::setPruneEntriesDownTo): |
| (WebKit::WebsiteDataStore::setGrandfatheringTime): |
| (WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval): |
| (WebKit::WebsiteDataStore::setPrevalentResource): |
| (WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode): |
| (WebKit::WebsiteDataStore::setVeryPrevalentResource): |
| (WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): |
| (WebKit::WebsiteDataStore::setSubframeUnderTopFrameDomain): |
| (WebKit::WebsiteDataStore::setSubresourceUnderTopFrameDomain): |
| (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo): |
| (WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom): |
| (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo): |
| (WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom): |
| (WebKit::WebsiteDataStore::clearPrevalentResource): |
| (WebKit::WebsiteDataStore::resetParametersToDefaultValues): |
| (WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent): |
| (WebKit::WebsiteDataStore::getResourceLoadStatisticsDataSummary): |
| (WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate): |
| (WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing): |
| (WebKit::WebsiteDataStore::setLastSeen): |
| (WebKit::WebsiteDataStore::mergeStatisticForTesting): |
| (WebKit::WebsiteDataStore::insertExpiredStatisticForTesting): |
| (WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned): |
| (WebKit::WebsiteDataStore::setIsRunningResourceLoadStatisticsTest): |
| (WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured): |
| (WebKit::WebsiteDataStore::setTimeToLiveUserInteraction): |
| (WebKit::WebsiteDataStore::logUserInteraction): |
| (WebKit::WebsiteDataStore::clearUserInteraction): |
| (WebKit::WebsiteDataStore::setGrandfathered): |
| (WebKit::WebsiteDataStore::setUseITPDatabase): |
| (WebKit::WebsiteDataStore::setCrossSiteLoadWithLinkDecorationForTesting): |
| (WebKit::WebsiteDataStore::resetCrossSiteLoadsWithLinkDecorationForTesting): |
| (WebKit::WebsiteDataStore::deleteCookiesForTesting): |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldDowngradeReferrerForTesting): |
| (WebKit::WebsiteDataStore::setThirdPartyCookieBlockingMode): |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldEnbleSameSiteStrictEnforcementForTesting): |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsFirstPartyWebsiteDataRemovalModeForTesting): |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsToSameSiteStrictCookiesForTesting): |
| (WebKit::WebsiteDataStore::setCacheMaxAgeCapForPrevalentResources): |
| (WebKit::WebsiteDataStore::resetCacheMaxAgeCapForPrevalentResources): |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode): |
| (WebKit::WebsiteDataStore::resetQuota): |
| (WebKit::WebsiteDataStore::clearAppBoundSession): |
| (WebKit::WebsiteDataStore::renameOriginInWebsiteData): |
| (WebKit::WebsiteDataStore::forwardAppBoundDomainsToITPIfInitialized): |
| (WebKit::WebsiteDataStore::setAppBoundDomainsForITP): |
| (WebKit::WebsiteDataStore::updateBundleIdentifierInNetworkProcess): |
| (WebKit::WebsiteDataStore::clearBundleIdentifierInNetworkProcess): |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::markAllLayersVolatile): |
| |
| 2020-06-23 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [curl] Unreviewed build fix for r263407 |
| https://bugs.webkit.org/show_bug.cgi?id=213409 |
| <rdar://problem/64654646> |
| |
| * NetworkProcess/curl/NetworkDataTaskCurl.h: Include <wtf/MonotonicTime.h>. |
| |
| 2020-06-23 Alex Christensen <achristensen@webkit.org> |
| |
| Expose already-available WKNavigationAction.request.HTTPBody through the API |
| https://bugs.webkit.org/show_bug.cgi?id=179077 |
| |
| Reviewed by Brady Eidson. |
| |
| When this bug was written, we needed to serialize the HTTP body to the UI process to expose it through the API. |
| The controversial part of this was done in r237639, so this just exposes the data that is already available. |
| |
| Verified by an API test. |
| |
| * UIProcess/API/Cocoa/WKNavigationAction.mm: |
| (-[WKNavigationAction request]): |
| |
| 2020-06-23 Alex Christensen <achristensen@webkit.org> |
| |
| Remove unnecessary Timer from NetworkDataTask |
| https://bugs.webkit.org/show_bug.cgi?id=213409 |
| |
| Reviewed by Youenn Fablet. |
| |
| * NetworkProcess/NetworkDataTask.cpp: |
| (WebKit::NetworkDataTask::NetworkDataTask): |
| (WebKit::NetworkDataTask::scheduleFailure): |
| (WebKit::NetworkDataTask::failureTimerFired): Deleted. |
| * NetworkProcess/NetworkDataTask.h: |
| * NetworkProcess/NetworkDataTaskBlob.cpp: |
| (WebKit::NetworkDataTaskBlob::resume): |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): |
| (WebKit::NetworkDataTaskCocoa::resume): |
| |
| 2020-06-22 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Add API to configure and handle DOM cache to WebKitWebsiteDataManager |
| https://bugs.webkit.org/show_bug.cgi?id=213337 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| The default path is always used even for apps setting a base data directory. We should handle |
| WebsiteDataType::DOMCache to configure the directory and allow to fetch and clear it. |
| |
| * UIProcess/API/glib/WebKitWebsiteData.cpp: |
| (recordContainsSupportedDataTypes): |
| (toWebKitWebsiteDataTypes): |
| * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: |
| (webkitWebsiteDataManagerGetProperty): |
| (webkitWebsiteDataManagerSetProperty): |
| (webkitWebsiteDataManagerConstructed): |
| (webkit_website_data_manager_class_init): |
| (webkitWebsiteDataManagerGetDataStore): |
| (webkit_website_data_manager_get_dom_cache_directory): |
| (toWebsiteDataTypes): |
| * UIProcess/API/gtk/WebKitWebsiteData.h: |
| * UIProcess/API/gtk/WebKitWebsiteDataManager.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitWebsiteData.h: |
| * UIProcess/API/wpe/WebKitWebsiteDataManager.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::websiteDataStoreFromSessionID): GTK and WPE ports don't use the default website |
| data store, so only use it when it already exists. Use the process pool website data store instead. |
| |
| 2020-06-22 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Add the capability to call the Storage Access API as a quirk, on behalf of websites that should be doing it themselves |
| https://bugs.webkit.org/show_bug.cgi?id=213418 |
| <rdar://problem/64549429> |
| |
| Reviewed by Alex Christensen. |
| |
| These changes are for forwarding ITP's knowledge of user interaction |
| for specific quirks domains to the WebKit::WebProcessPool where it in |
| turn can be distributed to all existing and new Web Content processes. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::needsUserInteractionQuirk const): |
| (WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * Shared/WebProcessDataStoreParameters.h: |
| (WebKit::WebProcessDataStoreParameters::encode const): |
| (WebKit::WebProcessDataStoreParameters::decode): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::setDomainsWithUserInteraction): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::webProcessDataStoreParameters): |
| (WebKit::WebProcessPool::setDomainsWithUserInteraction): |
| * UIProcess/WebProcessPool.h: |
| * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp: |
| (WebKit::WebResourceLoadObserver::hasHadUserInteraction const): |
| * WebProcess/WebCoreSupport/WebResourceLoadObserver.h: |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::setWebsiteDataStoreParameters): |
| (WebKit::WebProcess::setDomainsWithUserInteraction): |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| |
| 2020-06-22 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] WebPageProxy::setPromisedDataForImage should sanitize its filename |
| https://bugs.webkit.org/show_bug.cgi?id=213486 |
| <rdar://problem/56522262> |
| |
| Reviewed by Megan Gardner. |
| |
| Ensure that the filename passed into WebPageProxy::setPromisedDataForImage is sanitized in the UI process prior |
| to being used as a suggested filename when writing a dragged image to the pasteboard. |
| |
| * UIProcess/mac/WebPageProxyMac.mm: |
| (WebKit::WebPageProxy::setPromisedDataForImage): |
| |
| 2020-06-22 Tim Horton <timothy_horton@apple.com> |
| |
| WebEx can not share video from Safari on arm64 |
| https://bugs.webkit.org/show_bug.cgi?id=213481 |
| |
| Reviewed by Dean Jackson. |
| |
| * UIProcess/UserMediaProcessManager.cpp: |
| (WebKit::needsAppleCameraService): |
| (WebKit::UserMediaProcessManager::willCreateMediaStream): |
| (WebKit::UserMediaProcessManager::revokeSandboxExtensionsIfNeeded): |
| Pass sandbox extension for "com.apple.applecamerad" to the Web Content |
| process after the user allows camera access, when running on hardware which requires it. |
| |
| * WebProcess/com.apple.WebProcess.sb.in: |
| Make it possible to dynamically extend the sandbox as above. |
| |
| 2020-06-22 Tim Horton <timothy_horton@apple.com> |
| |
| Cannot play back encrypted media on arm64 |
| https://bugs.webkit.org/show_bug.cgi?id=213483 |
| |
| Reviewed by Jer Noble and Per Arne Vollan. |
| |
| * WebProcess/com.apple.WebProcess.sb.in: |
| Extend the sandbox as necessary for encrypted media support. |
| |
| 2020-06-22 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| [WPE][GTK] Public API should not allow trying to register a special URI scheme |
| https://bugs.webkit.org/show_bug.cgi?id=209900 |
| <rdar://problem/61200217> |
| |
| Reviewed by Adrian Perez de Castro |
| |
| Epiphany prior to 3.36 registers a scheme handler for ftp. This introduced criticals. Let's |
| use g_warning() instead, and avoid hardcoding the list of disallowed schemes. |
| |
| * UIProcess/API/glib/WebKitWebContext.cpp: |
| (webkit_web_context_register_uri_scheme): |
| |
| 2020-06-22 Tim Horton <timothy_horton@apple.com> |
| |
| dlopen() always fails on arm64, cannot load soft-linked libraries |
| https://bugs.webkit.org/show_bug.cgi?id=213480 |
| |
| Reviewed by Alexey Proskuryakov and Per Arne Vollan. |
| |
| * Shared/mac/AuxiliaryProcessMac.mm: |
| (WebKit::initializeSandboxParameters): |
| Expose the auxiliary process' CPU family as a parameter to the sandbox profile, |
| so that it can be used to predicate sandbox expressions. |
| |
| * WebProcess/com.apple.WebProcess.sb.in: |
| Allow mremap_encrypted from the Web Content process, because the arm64 dlopen() needs it. |
| |
| 2020-06-22 Tim Horton <timothy_horton@apple.com> |
| |
| Update macOS version macros |
| https://bugs.webkit.org/show_bug.cgi?id=213484 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * Configurations/Base.xcconfig: |
| * Configurations/DebugRelease.xcconfig: |
| * Configurations/Version.xcconfig: |
| * Configurations/WebKitTargetConditionals.xcconfig: |
| |
| 2020-06-22 Tim Horton <timothy_horton@apple.com> |
| |
| sysctl() fails due to sandbox violation |
| https://bugs.webkit.org/show_bug.cgi?id=213482 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: |
| * WebProcess/com.apple.WebProcess.sb.in: |
| Extend the sandbox as necessary to make sysctl calls work. |
| |
| 2020-06-22 Antoine Quint <graouts@webkit.org> |
| |
| WebKit fails to leave audio routing arbitration during navigation, closing. |
| https://bugs.webkit.org/show_bug.cgi?id=213426 |
| <rdar://problem/64395051> |
| |
| Unreviewed build fix for an unannotated switch fall-through between switch labels. |
| |
| * UIProcess/API/Cocoa/WKWebViewTesting.mm: |
| (-[WKWebView _audioRoutingArbitrationStatus]): |
| |
| 2020-06-21 Jer Noble <jer.noble@apple.com> |
| |
| WebKit fails to leave audio routing arbitration during navigation, closing. |
| https://bugs.webkit.org/show_bug.cgi?id=213426 |
| <rdar://problem/64395051> |
| |
| Reviewed by Eric Carlson. |
| |
| Add testing SPIs to verify whether a WebPage successfully entered or left audio routing |
| arbitration. Notify the Arbitration proxy when the page is shut down, which ensures arbitration |
| will end if the client closes the WKWebView. |
| |
| * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: |
| * UIProcess/API/Cocoa/WKWebViewTesting.mm: |
| (-[WKWebView _audioRoutingArbitrationStatus]): |
| * UIProcess/API/mac/WKWebViewTestingMac.mm: |
| * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: |
| (WebKit::AudioSessionRoutingArbitratorProxy::arbitrationStatus const): |
| * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: |
| (WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate): |
| (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): |
| (WebKit::AudioSessionRoutingArbitratorProxy::endRoutingArbitration): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shutDown): |
| * UIProcess/WebProcessProxy.h: |
| (WebKit::WebProcessProxy::audioSessionRoutingArbitrator): |
| |
| 2020-06-21 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| [WPE][GTK] Specify underlying storage type for InputMethodState::Hint |
| https://bugs.webkit.org/show_bug.cgi?id=213401 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Using unsigned types for flags enums seems nice to do. |
| |
| * Shared/glib/InputMethodState.h: |
| |
| 2020-06-21 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| [WPE][GTK] Add autocleanup for WebKitWebsitePolicies |
| https://bugs.webkit.org/show_bug.cgi?id=213399 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Add missing autocleanups. |
| |
| * UIProcess/API/gtk/WebKitAutocleanups.h: |
| * UIProcess/API/wpe/WebKitAutocleanups.h: |
| |
| 2020-06-20 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [AppSSO] Should do null check on m_page in dismissViewController() |
| https://bugs.webkit.org/show_bug.cgi?id=213415 |
| <rdar://problem/59672418> |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm: |
| (WebKit::SOAuthorizationSession::dismissViewController): |
| |
| 2020-06-20 Jer Noble <jer.noble@apple.com> |
| |
| RecoveryOS: PAL::getAVPlayerLayerClass() will crash when AVFoundation is missing |
| https://bugs.webkit.org/show_bug.cgi?id=213437 |
| <rdar://problem/64563064> |
| |
| Reviewed by Eric Carlson. |
| |
| Check PAL::isAVFoundationAvailable() before calling PAL::getAVPlayerLayerClass(); |
| |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm: |
| (WebKit::PlatformCALayerRemoteCustom::clone const): |
| |
| 2020-06-20 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION(r259219): Sleep assertion remains active if WKWebView is closed or WebContent process crashes |
| https://bugs.webkit.org/show_bug.cgi?id=213434 |
| <rdar://problem/57541662> |
| |
| Reviewed by Eric Carlson. |
| |
| Tests: TestWebKitAPI tests: |
| SleepDisabler.Basic |
| SleepDisabler.Pause |
| SleepDisabler.Mute |
| SleepDisabler.Unmute |
| SleepDisabler.DisableAudioTrack |
| SleepDisabler.Loop |
| SleepDisabler.ChangeSrc |
| SleepDisabler.Load |
| SleepDisabler.Unload |
| SleepDisabler.Navigate |
| SleepDisabler.NavigateBack |
| SleepDisabler.Reload |
| SleepDisabler.Close |
| SleepDisabler.Crash |
| |
| Ensure the SleepDisablers are cleared when the WebProcess closes or crashes. |
| |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shutDown): |
| (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch): |
| |
| 2020-06-20 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS, macOS] Allow access to the container manager to support Mail InjectedBundle |
| https://bugs.webkit.org/show_bug.cgi?id=213357 |
| <rdar://problem/63837247> |
| |
| Reviewed by Darin Adler. |
| |
| The Mail Injected Bundle requires access to the container manager to support certain OS operations. We do not need |
| this access for web browsing, and should limit this access to this one case. |
| |
| This patch creates a dynamic mach extension to the container manager for this single use case. It also denies the |
| non-extension access case with a backtrace so we can see if any other clients are hitting this. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| [Cocoa] Delay issuing ManagedSession & Network Extension sandbox extensions until a load is actually issued |
| https://bugs.webkit.org/show_bug.cgi?id=213414 |
| <rdar://problem/64548684> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Delay issuing ManagedSession & Network Extension sandbox extensions until a load is actually issued. |
| This is a Safari launch time optimization since the checks needed to decide whether or not to issue |
| the extensions are expensive and there is no reason to issue them as soon as the process launches |
| (especially in the case of a prewarmed process). |
| |
| * Shared/Cocoa/LoadParametersCocoa.mm: |
| (WebKit::LoadParameters::platformEncode const): |
| (WebKit::LoadParameters::platformDecode): |
| * Shared/LoadParameters.h: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::addPlatformLoadParameters): |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::addPlatformLoadParameters): |
| (WebKit::WebPageProxy::loadRequestWithNavigationShared): |
| (WebKit::WebPageProxy::loadFile): |
| (WebKit::WebPageProxy::loadDataWithNavigationShared): |
| (WebKit::WebPageProxy::loadAlternateHTML): |
| (WebKit::WebPageProxy::loadWebArchiveData): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebProcessProxy.h: |
| (WebKit::WebProcessProxy::hasNetworkExtensionSandboxAccess const): |
| (WebKit::WebProcessProxy::markHasNetworkExtensionSandboxAccess): |
| (WebKit::WebProcessProxy::hasManagedSessionSandboxAccess const): |
| (WebKit::WebProcessProxy::markHasManagedSessionSandboxAccess): |
| * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: |
| (WebKit::WebPage::platformDidReceiveLoadParameters): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-06-19 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r263287. |
| |
| Caused tests to exit early with crashes on Catalina. |
| |
| Reverted changeset: |
| |
| "[iOS, macOS] Allow access to the container manager to support Mail InjectedBundle" |
| https://bugs.webkit.org/show_bug.cgi?id=213357 |
| https://trac.webkit.org/changeset/263287 |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Crash under WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount() |
| https://bugs.webkit.org/show_bug.cgi?id=213417 |
| <rdar://problem/63477676> |
| |
| Reviewed by Darin Adler. |
| |
| Make sure |this| is still alive in ProcessAndUIAssertion::processAssertionWasInvalidated() |
| after calling ProcessAssertion::processAssertionWasInvalidated() and before calling |
| updateRunInBackgroundCount(). Calling ProcessAssertion::processAssertionWasInvalidated() |
| notifies the client and the client may destroy the assertion as a result. |
| |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::ProcessAndUIAssertion::processAssertionWasInvalidated): |
| |
| 2020-06-19 Kate Cheney <katherine_cheney@apple.com> |
| |
| com.apple.WebKit.Networking crash: suspended with locked system files (observations.db) |
| https://bugs.webkit.org/show_bug.cgi?id=213391 |
| <rdar://problem/64494167> |
| |
| Reviewed by Chris Dumez. |
| |
| ITP is the only database that attempts to close when |
| NetworkProcess::didClose() is called. This causes the network process |
| to sometimes crash if the database is still closing when checking for |
| locked system files. Instead, we should only flush the |
| memory store to disk when calling NetworkProcess::didClose (in the |
| memory store case), and only close the database when the network session is destroyed. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::didDestroyNetworkSession): |
| (WebKit::WebResourceLoadStatisticsStore::destroyResourceLoadStatisticsStore): |
| (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| Split into two functions, one to flush and destroy the persistent |
| store, and one to destroy the memory or database store. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::didClose): |
| Only flush the persistent store here, as described above. |
| |
| * NetworkProcess/NetworkSession.cpp: |
| (WebKit::NetworkSession::flushAndDestroyPersistentStore): |
| * NetworkProcess/NetworkSession.h: |
| |
| 2020-06-19 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Provide a _WKWebAuthenticationPanelUpdatePINInvalid update to UI clients if the returned PIN from the client is not valid |
| https://bugs.webkit.org/show_bug.cgi?id=213404 |
| <rdar://problem/64543894> |
| |
| Reviewed by Brent Fulgham. |
| |
| Provide a _WKWebAuthenticationPanelUpdatePINInvalid update to UI clients if the returned PIN from the client is not valid such that clients can |
| reuse the same logic to handle invalid pin from the authenticator. This change makes their life easier. |
| |
| Covered by API tests. |
| |
| * UIProcess/API/APIWebAuthenticationPanelClient.h: |
| (API::WebAuthenticationPanelClient::requestPin const): |
| * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm: |
| (WebKit::WebAuthenticationPanelClient::requestPin const): |
| Now, only null strings are intepreted as cancels. |
| |
| * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: |
| (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived): |
| (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived): |
| (WebKit::CtapAuthenticator::continueGetPinTokenAfterRequestPin): |
| (WebKit::CtapAuthenticator::continueRequestAfterGetPinToken): |
| This patch also removes potential null pointer dereferences. |
| |
| 2020-06-19 Per Arne Vollan <pvollan@apple.com> |
| |
| [macOS] Connections to the preference daemon are established before entering the sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=213379 |
| |
| Reviewed by Darin Adler. |
| |
| On macOS, connections to the preference daemon are established before entering the sandbox. These connections also persist |
| after entering the sandbox and denying access to the preference daemon. There should not be attempts to connect to the |
| preference daemon before entering the sandbox, since these attempts will not be stopped by the sandbox. This patch moves |
| code that connects to the preference daemon to be executed after the sandbox has been entered. That includes code to |
| prevent connections to the Dock and code to initialize WebKit logging. Also, instead of calling [NSBundle bundleForClass:], |
| call [NSBundle bundleWithIdentifier:], since calling [NSBundle bundleForClass:] will connect to the preference daemon. |
| Finally, allow the syscall SYS_gethostuuid, since that is needed by CoreFoundation when there is no access to the |
| preference daemon. |
| |
| No new tests. This should be covered by existing tests. It would be nice to have a test to make sure that there are no |
| connections to the preference daemon just before entering the sandbox, but I am not aware of how to implement this. |
| |
| * NetworkProcess/mac/NetworkProcessMac.mm: |
| (WebKit::NetworkProcess::initializeSandbox): |
| * Shared/AuxiliaryProcess.cpp: |
| (WebKit::AuxiliaryProcess::initialize): |
| * Shared/Cocoa/WebKit2InitializeCocoa.mm: |
| (WebKit::runInitializationCode): |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::XPCServiceMain): |
| * Shared/mac/AuxiliaryProcessMac.mm: |
| (WebKit::webKit2Bundle): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| (WebKit::WebProcess::initializeSandbox): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Avoid initializing RenderTheme singleton unnecessarily in the UIProcess |
| https://bugs.webkit.org/show_bug.cgi?id=213406 |
| |
| Reviewed by Per Arne Vollan. |
| |
| Avoid initializing RenderTheme singleton unnecessarily in the UIProcess. Instead, introduce |
| a static function to get the focus ring color on iOS. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed build fix after r263288. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Use ASCIILiteral more for SandboxExtension functions |
| https://bugs.webkit.org/show_bug.cgi?id=213400 |
| |
| Reviewed by Per Arne Vollan. |
| |
| Use ASCIILiteral more for SandboxExtension functions. Functions like createHandleForMachLookup() / createHandleForIOKitClassExtension() |
| don't need to take in Strings, ASCIILiteral is enough. |
| |
| * Shared/Cocoa/SandboxExtensionCocoa.mm: |
| (WebKit::createHandlesForResources): |
| (WebKit::SandboxExtension::createReadOnlyHandlesForFiles): |
| (WebKit::SandboxExtension::createHandleForGenericExtension): |
| (WebKit::SandboxExtension::createHandleForMachLookup): |
| (WebKit::SandboxExtension::createHandlesForMachLookup): |
| (WebKit::SandboxExtension::createHandleForIOKitClassExtension): |
| (WebKit::SandboxExtension::createHandlesForIOKitClassExtensions): |
| * Shared/SandboxExtension.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::mediaRelatedMachServices): |
| (WebKit::nonBrowserServices): |
| (WebKit::diagnosticServices): |
| (WebKit::agxCompilerClasses): |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * UIProcess/Cocoa/WebProcessProxyCocoa.mm: |
| (WebKit::WebProcessProxy::enableRemoteInspectorIfNeeded): |
| * UIProcess/GPU/GPUProcessProxy.cpp: |
| (WebKit::GPUProcessProxy::singleton): |
| * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: |
| (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon): |
| (WebKit::WebPageProxy::creationParameters): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::grantAccessToAssetServices): |
| |
| 2020-06-19 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS, macOS] Allow access to the container manager to support Mail InjectedBundle |
| https://bugs.webkit.org/show_bug.cgi?id=213357 |
| <rdar://problem/63837247> |
| |
| Reviewed by Darin Adler. |
| |
| The Mail Injected Bundle requires access to the container manager to support certain OS operations. We do not need |
| this access for web browsing, and should limit this access to this one case. |
| |
| This patch creates a dynamic mach extension to the container manager for this single use case. It also denies the |
| non-extension access case with a backtrace so we can see if any other clients are hitting this. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-19 Andres Gonzalez <andresg_22@apple.com> |
| |
| AX: web process crash in AXObjectCache::postNotification. |
| https://bugs.webkit.org/show_bug.cgi?id=213398 |
| |
| Reviewed by Chris Fleizach. |
| |
| AXObjectCache was being instantiated on the AX secondary thread. |
| Therefore the timers for the different delayed notifications where |
| initialized with the secondary thread. When postNotification was triggered |
| on the main thread as it should, and the timer was accessed, the timer |
| would assert/crash for being accessed in a thread different than where |
| it was created. This change guaranties that AXObjectCache is always |
| created on the main thread. |
| |
| * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: |
| (-[WKAccessibilityWebPageObjectBase axObjectCache]): |
| (-[WKAccessibilityWebPageObjectBase accessibilityPluginObject]): |
| (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]): |
| (-[WKAccessibilityWebPageObjectBase setWebPage:]): |
| (-[WKAccessibilityWebPageObjectBase setHasMainFramePlugin:]): |
| (-[WKAccessibilityWebPageObjectBase setRemoteParent:]): |
| |
| 2020-06-19 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Make isolated tree enablement status dependent on client preference |
| https://bugs.webkit.org/show_bug.cgi?id=213355 |
| <rdar://problem/64506577> |
| |
| Reviewed by Zalan Bujtas. |
| |
| We don't want the isolated tree mode in all clients (like Mail or Dictionary). |
| As a result, we can set this setting to off and allow safari and mini browser turn on more directly. |
| |
| * Shared/WebPreferences.yaml: |
| * UIProcess/API/Cocoa/WKPreferences.mm: |
| (-[WKPreferences _setAccessibilityIsolatedTreeEnabled:]): |
| (-[WKPreferences _accessibilityIsolatedTreeEnabled]): |
| * UIProcess/API/Cocoa/WKPreferencesPrivate.h: |
| * WebProcess/InjectedBundle/InjectedBundle.cpp: |
| (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): |
| (WebKit::InjectedBundle::setAccessibilityIsolatedTreeEnabled): |
| * WebProcess/InjectedBundle/InjectedBundle.h: |
| |
| 2020-06-19 Rob Buis <rbuis@igalia.com> |
| |
| Enable referrer policy attribute support by default |
| https://bugs.webkit.org/show_bug.cgi?id=213285 |
| |
| Reviewed by Youenn Fablet. |
| |
| Enable referrer policy attribute support by default by flipping the switch. |
| |
| * Shared/WebPreferences.yaml: |
| |
| 2020-06-19 Youenn Fablet <youenn@apple.com> |
| |
| LibWebRTCSocketClient::sendTo is too verbose in case of error |
| https://bugs.webkit.org/show_bug.cgi?id=213380 |
| |
| Reviewed by Eric Carlson. |
| |
| Only log error message if the error code is different from the previous one. |
| |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: |
| (WebKit::LibWebRTCSocketClient::sendTo): |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.h: |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Web Inspector: RemoteInspector::singleton() slows down MobileSafari launch |
| https://bugs.webkit.org/show_bug.cgi?id=213381 |
| <rdar://problem/64533003> |
| |
| Reviewed by Darin Adler. |
| |
| RemoteInspector::singleton() is expensive according to traces. It was called in WebProcessPool::initializeNewWebProcess() |
| which happens on MobileSafari launch because we prewarm a WebProcess. However, there is no reason to initialize remote |
| Web Inspector at this point. Per associated comment, Remote Web Inspector needs to be initialized once there is a |
| sub process hosting one of our Web View. As a result, I moved the initialization call to WebPageProxy::initializeWebPage() |
| which is when we actually send the IPC to the WebProcess to create the WebPage that is backing the UI-side WebView. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::initializeWebPage): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::initializeNewWebProcess): |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Move Prefixed WebAudio interfaces behind their own feature flag |
| https://bugs.webkit.org/show_bug.cgi?id=213356 |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/WebPreferences.yaml: |
| |
| 2020-06-19 Rob Buis <rbuis@igalia.com> |
| |
| Enable stale-while-revalidate support by default |
| https://bugs.webkit.org/show_bug.cgi?id=213286 |
| |
| Reviewed by Youenn Fablet. |
| |
| Enable stale-while-revalidate support for Mac/GTK/WPE by changing the default |
| to true. Note that platforms that do not support speculative loads, which s-w-r |
| relies on, will not see any change in bahavior. |
| |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: |
| |
| 2020-06-19 Alexander Mikhaylenko <alexm@gnome.org> |
| |
| REGRESSION(r253360): [GTK] Page starts loading during animation in back/forward gesture |
| https://bugs.webkit.org/show_bug.cgi?id=205650 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| r253360 changed the swipe gesture to start loading the page during the gesture, relying on |
| freezing the layer tree state to prevent unwanted redraws. However, it was implemented for |
| AC mode, but didn't prevent redraws in non-accelerated mode. Add a simple check to skip |
| redraws in this case. |
| |
| * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: |
| (WebKit::DrawingAreaCoordinatedGraphics::display): Skip drawing if layer tree state is frozen. |
| |
| 2020-06-19 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Add support for fetching registrable domains with resource load statistics |
| https://bugs.webkit.org/show_bug.cgi?id=213291 |
| |
| Reviewed by Adrian Perez de Castro and Youenn Fablet. |
| |
| WebsiteDataStore::fetchData() doesn't return anything for resource load statistics because |
| NetworkProcess::fetchWebsiteData() doesn't handle WebsiteDataType::ResourceLoadStatistics. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::allDomains const): Query all registrable domains from database. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::allDomains const): Return all registrable domains in memory map. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::registrableDomains): Get the list of registrable domains. |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::fetchWebsiteData): Handle WebsiteDataType::ResourceLoadStatistics. |
| * Shared/WebsiteData/WebsiteData.cpp: |
| (WebKit::WebsiteData::encode const): Encode registrableDomainsWithResourceLoadStatistics. |
| (WebKit::WebsiteData::decode): Decode registrableDomainsWithResourceLoadStatistics. |
| * Shared/WebsiteData/WebsiteData.h: |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreRemoveITPDataForDomain): Use WebsiteDataRecord::addResourceLoadStatisticsRegistrableDomain() |
| instead of the display name. |
| * UIProcess/WebsiteData/WebsiteDataRecord.cpp: |
| (WebKit::WebsiteDataRecord::addResourceLoadStatisticsRegistrableDomain): Add the given registrable domain to the list. |
| * UIProcess/WebsiteData/WebsiteDataRecord.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::fetchDataAndApply): Handle registrable domains with resource load statistics. |
| (WebKit::WebsiteDataStore::removeData): Use resourceLoadStatisticsRegistrableDomains instead of the display name. |
| |
| 2020-06-18 David Kilzer <ddkilzer@apple.com> |
| |
| Use fastMalloc/fastFree in WebCoreArgumentCodersMac.mm |
| <https://webkit.org/b/213325> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::createArchiveList): |
| (IPC::createCFURLRequestFromSerializableRepresentation): |
| |
| 2020-06-18 Tim Horton <timothy_horton@apple.com> |
| |
| Remove some vestiges of the 32-bit Plugin Process |
| https://bugs.webkit.org/show_bug.cgi?id=213361 |
| |
| Reviewed by Dan Bernstein. |
| |
| We haven't launched 32-bit plugins for a while, but there are some |
| build system complications and random references in the code that we can get rid of. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| * Configurations/PluginService.xcconfig: Renamed from Source/WebKit/Configurations/PluginService.64.xcconfig. |
| No need for .64 in the name anymore, since it's the only one. |
| We do have to leave the .64 in the product name because there are other things in the system that depend on this. |
| |
| * PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.Info.plist: Renamed from Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.64.Info.plist. |
| No need for .64 in the name anymore. |
| |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::getLaunchOptions): |
| * UIProcess/Launcher/ProcessLauncher.h: |
| * UIProcess/Launcher/mac/ProcessLauncherMac.mm: |
| (WebKit::serviceName): |
| * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: |
| (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): |
| There need only be one ProcessType for the plugin process now! |
| |
| * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: |
| (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): |
| * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: |
| (WebKit::bubblewrapSpawn): |
| * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: |
| (WebKit::ProcessLauncher::launchProcess): |
| GTK WebKit appears to also only launch 64-bit plugin processes. |
| |
| 2020-06-18 Megan Gardner <megan_gardner@apple.com> |
| |
| Workaround for UIKit layout bug in time picker. |
| https://bugs.webkit.org/show_bug.cgi?id=213346 |
| <rdar://problem/64042277> |
| |
| Reviewed by Tim Horton. |
| |
| There is a bug in the layout of UIKit that needs to be fixed. |
| Until then, this workaround should give us a view that is viable. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView resignFirstResponderForWebView]): |
| * UIProcess/ios/forms/WKDateTimeInputControl.mm: |
| (-[WKDateTimeContextMenuViewController preferredContentSize]): |
| |
| 2020-06-18 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] OptionSet<> values should be validated |
| <https://webkit.org/b/213199> |
| <rdar://problem/64369963> |
| |
| Reviewed by Anders Carlsson. |
| |
| Summary: |
| - Add WTF::EnumTraits<> for all OptionSet<> enums. |
| - Specify unsigned backing types for enum classes. |
| |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkSession.h: |
| * Platform/IPC/ArgumentCoders.h: |
| (IPC::ArgumentCoder<OptionSet<T>>::encode): |
| (IPC::ArgumentCoder<OptionSet<T>>::decode): |
| - Add WTF::isValidOptionSet() checks. |
| * Platform/IPC/Decoder.h: |
| * Platform/IPC/Encoder.h: |
| - Replace <wtf/EnumTraits.h> with <wtf/OptionSet.h> since the |
| latter now includes the former. |
| * Platform/IPC/MessageFlags.h: |
| * Shared/DocumentEditingContext.h: |
| * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: |
| * Shared/WebEvent.h: |
| * Shared/WebsiteAutoplayQuirk.h: |
| * Shared/WebsiteData/WebsiteData.h: |
| * Shared/WebsiteData/WebsiteDataFetchOption.h: |
| * Shared/WebsiteData/WebsiteDataType.h: |
| * Shared/ios/GestureTypes.h: |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Plugins/PluginProcessManager.h: |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| * WebProcess/WebProcess.h: |
| |
| 2020-06-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Add API to configure and handle service worker registrations to WebKitWebsiteDataManager |
| https://bugs.webkit.org/show_bug.cgi?id=213290 |
| |
| Reviewed by Michael Catanzaro. |
| |
| The default path is always used even for apps setting a base data directory. We should handle |
| WebsiteDataType::ServiceWorkerRegistrations to configure the directory and allow to fetch and clear them. |
| |
| * UIProcess/API/glib/WebKitWebsiteData.cpp: |
| (recordContainsSupportedDataTypes): |
| (toWebKitWebsiteDataTypes): |
| * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: |
| (webkitWebsiteDataManagerGetProperty): |
| (webkitWebsiteDataManagerSetProperty): |
| (webkitWebsiteDataManagerConstructed): |
| (webkit_website_data_manager_class_init): |
| (webkitWebsiteDataManagerGetDataStore): |
| (webkit_website_data_manager_get_service_worker_registrations_directory): |
| (toWebsiteDataTypes): |
| * UIProcess/API/gtk/WebKitWebsiteData.h: |
| * UIProcess/API/gtk/WebKitWebsiteDataManager.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitWebsiteData.h: |
| * UIProcess/API/wpe/WebKitWebsiteDataManager.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| |
| 2020-06-18 Yuri Chornoivan <yurchor@ukr.net> |
| |
| Unreviewed. Fix a typo introduced in r263085 |
| |
| * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: |
| (webkit_website_data_manager_class_init): |
| |
| 2020-06-17 Chris Dumez <cdumez@apple.com> |
| |
| Add experimental feature flag for modern & unprefixed WebAudio API |
| https://bugs.webkit.org/show_bug.cgi?id=213268 |
| |
| Reviewed by Jer Noble. |
| |
| Add experimental feature flag for modern & unprefixed WebAudio API, |
| off by default. |
| |
| * Shared/WebPreferences.yaml: |
| |
| 2020-06-17 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Shift-tab in a bullet list in Mail Compose jumps back to Subject field |
| https://bugs.webkit.org/show_bug.cgi?id=213320 |
| <rdar://problem/63831962> |
| |
| Reviewed by Tim Horton. |
| |
| See WebCore/ChangeLog for more detail. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::handleKeyEventByRelinquishingFocusToChrome): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::handleEditingKeyboardEvent): |
| |
| Hoist logic for relinquishing focus as a result of shift+tab from EventHandler to WebPage, so that it is the |
| default behavior when processing a "keypress" event that corresponds to shift+tab in an editable web view on |
| Cocoa platforms. If we do end up relinquishing focus, then we consider the keypress event to be handled. |
| |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::handleEditingKeyboardEvent): |
| |
| 2020-06-17 Beth Dakin <bdakin@apple.com> |
| |
| Remove references to blacklist/whitelist in the old C API |
| https://bugs.webkit.org/show_bug.cgi?id=213322 |
| |
| Reviewed by Tim Horton. |
| |
| * UIProcess/API/C/WKPageGroup.cpp: |
| (WKPageGroupAddUserStyleSheet): |
| (WKPageGroupAddUserScript): |
| * UIProcess/API/C/WKPageGroup.h: |
| * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: |
| |
| 2020-06-17 Alex Christensen <achristensen@webkit.org> |
| |
| Null check plugin.m_data before using it in PDFPlugin::ByteRangeRequest::completeUnconditionally |
| https://bugs.webkit.org/show_bug.cgi?id=213305 |
| <rdar://problem/60349279> |
| |
| Reviewed by Brady Eidson. |
| |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::ByteRangeRequest::completeUnconditionally): |
| |
| 2020-06-17 Darryl Pogue <darryl@dpogue.ca> |
| |
| IndexedDB: Support IDBFactory databases method |
| https://bugs.webkit.org/show_bug.cgi?id=211043 |
| |
| Reviewed by Youenn Fablet. |
| |
| Plumbing for returning a list of IDB databases and versions. |
| |
| * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: |
| (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames): Deleted. |
| * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: |
| * NetworkProcess/IndexedDB/WebIDBServer.cpp: |
| (WebKit::WebIDBServer::getAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBServer::getAllDatabaseNames): Deleted. |
| * NetworkProcess/IndexedDB/WebIDBServer.h: |
| * NetworkProcess/IndexedDB/WebIDBServer.messages.in: |
| * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: |
| (WebKit::WebIDBConnectionToServer::getAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBConnectionToServer::getAllDatabaseNames): Deleted. |
| (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames): Deleted. |
| * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: |
| * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: |
| |
| 2020-06-16 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r255037): Broken position while comparing watch bands on www.apple.com/shop/studio/apple-watch |
| https://bugs.webkit.org/show_bug.cgi?id=213282 |
| <rdar://problem/63862940> |
| |
| Reviewed by Antti Koivisto. |
| |
| If a scrolling tree commit has a requested scroll position update for a node, we need |
| to call applyLayerPositons() to set the UIScrollView's contentOffset. |
| |
| Often the layer tree commit will contain a boundsOrigin change for the layer in question |
| (which is equivalent to setting the UIScrollView's contentOffset), but some combinations of |
| user and programmatic scrolling result in no boundsOrigin change, revealing the bug. |
| |
| * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: |
| (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren): |
| |
| 2020-06-16 Kate Cheney <katherine_cheney@apple.com> |
| |
| Check for inAppBrowserPrivacyEnabled flag in WebsiteDataStore::initializeAppBoundDomains is expensive and calls a non-static function WebsiteDataStore::parameters(). |
| https://bugs.webkit.org/show_bug.cgi?id=213261 |
| <rdar://problem/64317084> |
| |
| Reviewed by Brent Fulgham. |
| |
| There are two bugs here. First, WebsiteDataStore::parameters() |
| does a lot of work aside from returning the parameters, making this an |
| expensive call just to check the value of one flag. Second, |
| appBoundDomains() is a static hashset, and initializing the hashset |
| should not rely on non-static functions. |
| |
| * NetworkProcess/NetworkSessionCreationParameters.cpp: |
| (WebKit::NetworkSessionCreationParameters::encode const): |
| (WebKit::NetworkSessionCreationParameters::decode): |
| * NetworkProcess/NetworkSessionCreationParameters.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| Remove flag, it is no longer used here. |
| |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::platformSetNetworkParameters): |
| Save the flag value in a member variable so we can use that later |
| when checking app-bound domains. Rename to something more descriptive. |
| |
| (WebKit::WebsiteDataStore::initializeAppBoundDomains): |
| Remove the check for the non-static runtime flag. |
| |
| (WebKit::WebsiteDataStore::ensureAppBoundDomains const): |
| Enable test mode quirks. We must do it in two places in case the |
| initialization hasn't happened by the time we call |
| ensureAppBoundDomains. |
| |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| |
| 2020-06-16 Mark Lam <mark.lam@apple.com> |
| |
| Make Options::useJIT() be the canonical source of truth on whether we should use the JIT. |
| https://bugs.webkit.org/show_bug.cgi?id=212556 |
| <rdar://problem/63780436> |
| |
| Reviewed by Saam Barati. |
| |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::isJITEnabled): |
| |
| 2020-06-16 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r262994): Web Inspector is killed when context-clicking anywhere |
| <https://webkit.org/b/213224> |
| <rdar://problem/64383320> |
| |
| Reviewed by Darin Adler. |
| |
| * Platform/IPC/Decoder.h: |
| * Platform/IPC/Encoder.h: |
| - Include <WebCore/ContextMenuItem.h> since the definition of |
| the custom WTF::isValidEnum<WebCore::ContextMenuAction> |
| function is needed. |
| * Scripts/webkit/messages.py: |
| (generate_message_names_header): |
| - Change the third typename in the template for |
| WTF::isValidEnum<IPC::MessageName>() to avoid partial template |
| specialization errors from other implementations like |
| WTF::isValidEnum<WebCore::ContextMenuAction>(). |
| - Also replace hard-coded "IPC::MessageName" names with template |
| values. |
| |
| 2020-06-16 Chris Dumez <cdumez@apple.com> |
| |
| Stop calling userPreferredLanguages() in the UIProcess |
| https://bugs.webkit.org/show_bug.cgi?id=213214 |
| <rdar://problem/64317593> |
| |
| Reviewed by Darin Adler. |
| |
| Follow-up to r263094 to address post-landing feedback from Darin. |
| Use makeVector() functionality in WTF to convert the NSArray into a Vector instead |
| of doing it by hand. Also mark the NeverDestroyed variable as static const to |
| avoid leaking. |
| |
| * UIProcess/Cocoa/WebProcessProxyCocoa.mm: |
| (WebKit::WebProcessProxy::platformOverrideLanguages const): |
| |
| 2020-06-16 Alex Christensen <achristensen@webkit.org> |
| |
| Provide alternatively-named WKBrowsingContextGroup SPI |
| https://bugs.webkit.org/show_bug.cgi?id=213229 |
| |
| Reviewed by Tim Horton. |
| |
| This is unfortunately still used. In order to try to convince the user to make the smallest change possible, make newly named SPI that behaves identically. |
| Doubly-deprecate the old SPI and implement it in terms of the new during the transition period. |
| |
| * UIProcess/API/Cocoa/WKBrowsingContextGroup.h: |
| * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm: |
| (-[WKBrowsingContextGroup addUserStyleSheet:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:mainFrameOnly:]): |
| (-[WKBrowsingContextGroup addUserStyleSheet:baseURL:includeMatchPatternStrings:excludeMatchPatternStrings:mainFrameOnly:]): |
| (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]): |
| (-[WKBrowsingContextGroup addUserScript:baseURL:includeMatchPatternStrings:excludeMatchPatternStrings:injectionTime:mainFrameOnly:]): |
| |
| 2020-06-16 Youenn Fablet <youenn@apple.com> |
| |
| Loads triggered by an opaque stylesheet should not be visible to service workers |
| https://bugs.webkit.org/show_bug.cgi?id=213246 |
| |
| Reviewed by Alex Christensen. |
| |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): |
| In case the load is triggered from an opaque response, set service worker mode to none. |
| |
| 2020-06-16 Charlie Turner <cturner@igalia.com> |
| |
| [GTK] Disable video autoplay |
| https://bugs.webkit.org/show_bug.cgi?id=184845 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * PlatformGTK.cmake: Add new source files to the build. |
| * PlatformWPE.cmake: Ditto. |
| * SourcesGTK.txt: Ditto. |
| * SourcesWPE.txt: Ditto. |
| * UIProcess/API/glib/WebKitPolicyDecision.cpp: |
| (webkit_policy_decision_use_with_policies): : Add an API to |
| respond to navigation decisions with policies. |
| * UIProcess/API/glib/WebKitWebContext.cpp: |
| (webkitWebContextCreatePageForWebView): Plumb in the default |
| website policies that are associated with the web view. |
| * UIProcess/API/glib/WebKitWebContextPrivate.h: |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewConstructed): |
| (webkitWebViewSetProperty): |
| (webkitWebViewGetProperty): |
| (webkit_web_view_class_init): |
| (webkit_web_view_get_website_policies): |
| * UIProcess/API/glib/WebKitWebsitePolicies.cpp: Added. |
| (_WebKitWebsitePoliciesPrivate::_WebKitWebsitePoliciesPrivate): |
| (webkitWebsitePoliciesGetWebsitePolicies): |
| (webkitWebsitePoliciesGetPoliciesData): |
| (webkitWebsitePoliciesGetProperty): |
| (webkitWebsitePoliciesSetAutoplayPolicy): |
| (webkitWebsitePoliciesSetProperty): |
| (webkit_website_policies_class_init): |
| (webkit_website_policies_new): |
| (webkit_website_policies_new_with_policies): |
| (webkit_website_policies_get_autoplay_policy): |
| * UIProcess/API/glib/WebKitWebsitePoliciesPrivate.h: Added. |
| * UIProcess/API/gtk/WebKitPolicyDecision.h: |
| * UIProcess/API/gtk/WebKitWebView.h: |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| (webkit_web_view_new_with_related_view): |
| * UIProcess/API/gtk/WebKitWebsitePolicies.h: Added. |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitPolicyDecision.h: |
| * UIProcess/API/wpe/WebKitWebView.h: |
| * UIProcess/API/wpe/WebKitWebsitePolicies.h: Added. |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| |
| 2020-06-16 Chris Dumez <cdumez@apple.com> |
| |
| Stop calling userPreferredLanguages() in the UIProcess |
| https://bugs.webkit.org/show_bug.cgi?id=213214 |
| <rdar://problem/64317593> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Stop calling userPreferredLanguages() in the UIProcess since this can be slow and may keep |
| the main thread busy. Nowadays, the WebProcess is able to call it by itself anyway. The |
| sandbox is allowing it. |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::languageChanged): |
| (WebKit::WebProcessPool::initializeNewWebProcess): |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::initializeWebProcess): |
| (WebKit::WebProcess::userPreferredLanguagesChanged const): |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| |
| 2020-06-16 Truitt Savell <tsavell@apple.com> |
| |
| Unreviewed, reverting r263079. |
| |
| Broke Internal builds. |
| |
| Reverted changeset: |
| |
| "IndexedDB: Support IDBFactory databases method" |
| https://bugs.webkit.org/show_bug.cgi?id=211043 |
| https://trac.webkit.org/changeset/263079 |
| |
| 2020-06-16 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Add API to configure and enable resource load statistics |
| https://bugs.webkit.org/show_bug.cgi?id=177943 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * UIProcess/API/glib/WebKitWebsiteData.cpp: |
| (recordContainsSupportedDataTypes): |
| (toWebKitWebsiteDataTypes): |
| * UIProcess/API/glib/WebKitWebsiteDataManager.cpp: |
| (webkitWebsiteDataManagerGetProperty): |
| (webkitWebsiteDataManagerSetProperty): |
| (webkitWebsiteDataManagerConstructed): |
| (webkit_website_data_manager_class_init): |
| (webkitWebsiteDataManagerGetDataStore): |
| (webkit_website_data_manager_get_itp_directory): |
| (webkit_website_data_manager_set_itp_enabled): |
| (webkit_website_data_manager_get_itp_enabled): |
| (toWebsiteDataTypes): |
| * UIProcess/API/gtk/WebKitWebsiteData.h: |
| * UIProcess/API/gtk/WebKitWebsiteDataManager.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitWebsiteData.h: |
| * UIProcess/API/wpe/WebKitWebsiteDataManager.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| * UIProcess/glib/WebsiteDataStoreGLib.cpp: |
| (WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): |
| |
| 2020-06-16 Darryl Pogue <darryl@dpogue.ca> |
| |
| IndexedDB: Support IDBFactory databases method |
| https://bugs.webkit.org/show_bug.cgi?id=211043 |
| |
| Reviewed by Youenn Fablet. |
| |
| Plumbing for returning a list of IDB databases and versions. |
| |
| * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: |
| (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames): Deleted. |
| * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: |
| * NetworkProcess/IndexedDB/WebIDBServer.cpp: |
| (WebKit::WebIDBServer::getAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBServer::getAllDatabaseNames): Deleted. |
| * NetworkProcess/IndexedDB/WebIDBServer.h: |
| * NetworkProcess/IndexedDB/WebIDBServer.messages.in: |
| * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: |
| (WebKit::WebIDBConnectionToServer::getAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNamesAndVersions): |
| (WebKit::WebIDBConnectionToServer::getAllDatabaseNames): Deleted. |
| (WebKit::WebIDBConnectionToServer::didGetAllDatabaseNames): Deleted. |
| * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: |
| * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: |
| |
| 2020-06-15 Pavel Feldman <pavel.feldman@gmail.com> |
| |
| Web Inspector: introduce request interception |
| https://bugs.webkit.org/show_bug.cgi?id=207446 |
| |
| Reviewed by Devin Rousso. |
| |
| This change introduces network request interception to the Network |
| protocol domain. It adds Network.interceptWithRequest notification that |
| can be continued, modified or fulfilled. NetworkStage enum can now have |
| 'request' and 'response' values. |
| |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::WebLoaderStrategy::scheduleLoad): |
| |
| 2020-06-15 Brent Fulgham <bfulgham@apple.com> |
| |
| [macOS] Update sandboxes to reduce logging for media-related operations |
| https://bugs.webkit.org/show_bug.cgi?id=213210 |
| <rdar://problem/64376237> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Ongoing testing has uncovered a set of additional services and IOKit |
| properties that we should allow without logging. |
| |
| * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::mediaRelatedMachServices): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-15 Alex Christensen <achristensen@webkit.org> |
| |
| Provide alternatively-named SPI for user style sheets and scripts |
| https://bugs.webkit.org/show_bug.cgi?id=213206 |
| |
| Reviewed by Brady Eidson. |
| |
| Test-only SPI was just renamed. |
| SPI used by other projects was deprecated with a replacement so we can remove the old names soon. |
| |
| _WKUserContentWorld/WKContentWorld was tied up in this, and rather than provide replacement SPI with deprecated _WKUserContentWorld, |
| this will move some SPI from _WKUserContentWorld to WKContentWorld too. The most heavy user of _WKUserContentWorld is TestWebKitAPI and we'll remove it soon. |
| |
| * UIProcess/API/C/WKContext.cpp: |
| (WKContextSetFontAllowList): |
| (WKContextSetFontWhitelist): Deleted. |
| * UIProcess/API/C/WKContextPrivate.h: |
| * UIProcess/API/Cocoa/WKUserContentController.mm: |
| (-[WKUserContentController _removeAllUserScriptsAssociatedWithContentWorld:]): |
| (-[WKUserContentController _removeAllUserStyleSheetsAssociatedWithContentWorld:]): |
| (-[WKUserContentController _addScriptMessageHandler:name:contentWorld:]): |
| (-[WKUserContentController _removeAllUserScriptsAssociatedWithUserContentWorld:]): Deleted. |
| (-[WKUserContentController _removeAllUserStyleSheetsAssociatedWithUserContentWorld:]): Deleted. |
| * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: |
| * UIProcess/API/Cocoa/WKUserScript.mm: |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:includeMatchPatternStrings:excludeMatchPatternStrings:associatedURL:contentWorld:deferRunningUntilNotification:]): |
| * UIProcess/API/Cocoa/WKUserScriptPrivate.h: |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.h: |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: |
| (-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:includeMatchPatternStrings:excludeMatchPatternStrings:baseURL:level:contentWorld:]): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::setFontAllowList): |
| (WebKit::WebProcessPool::setFontWhitelist): Deleted. |
| * UIProcess/WebProcessPool.h: |
| |
| 2020-06-15 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to preconnect to a server |
| https://bugs.webkit.org/show_bug.cgi?id=213109 |
| <rdar://problem/64184412> |
| |
| Reviewed by Geoff Garen. |
| |
| Covered by API tests. |
| |
| * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _preconnectToServer:]): |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::preconnectTo): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::preconnectTo): |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-06-15 Keith Miller <keith_miller@apple.com> |
| |
| Signal handlers should have a two phase installation. |
| https://bugs.webkit.org/show_bug.cgi?id=213160 |
| |
| Reviewed by Mark Lam. |
| |
| Put back old WASM fast memory installation. |
| |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::initializeWebProcess): |
| |
| 2020-06-15 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> |
| |
| Suppress compiler warnings |
| https://bugs.webkit.org/show_bug.cgi?id=213034 |
| |
| Reviewed by Darin Adler. |
| |
| Convert to std:size_t to compare equal data types. |
| |
| * NetworkProcess/cache/NetworkCacheData.cpp: |
| (WebKit::NetworkCache::readOrMakeSalt): |
| |
| 2020-06-15 Chris Dumez <cdumez@apple.com> |
| |
| Revert r260856 as it seems to have regressed PLT on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=213194 |
| <rdar://problem/64331458> |
| |
| Unreviewed, revert r260856 due to regression. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::NetworkProcess): |
| (WebKit::NetworkProcess::prepareToSuspend): |
| (WebKit::NetworkProcess::resume): |
| * NetworkProcess/NetworkProcess.h: |
| * Shared/WebSQLiteDatabaseTracker.cpp: Added. |
| (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): |
| (WebKit::WebSQLiteDatabaseTracker::~WebSQLiteDatabaseTracker): |
| (WebKit::WebSQLiteDatabaseTracker::setIsSuspended): |
| (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction): |
| (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction): |
| (WebKit::WebSQLiteDatabaseTracker::setIsHoldingLockedFiles): |
| * Shared/WebSQLiteDatabaseTracker.h: Added. |
| * SourcesCocoa.txt: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::didClose): |
| (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shutDown): |
| (WebKit::WebProcessProxy::setIsHoldingLockedFiles): |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/WebProcessProxy.messages.in: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebProcess.cpp: |
| (WebKit::m_webSQLiteDatabaseTracker): |
| (WebKit::WebProcess::prepareToSuspend): |
| (WebKit::WebProcess::processDidResume): |
| * WebProcess/WebProcess.h: |
| |
| 2020-06-15 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Add API to expose UIClient::requestStorageAccessConfirm |
| https://bugs.webkit.org/show_bug.cgi?id=210422 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add WebKitWebsiteDataAccessPermissionRequest to ask for permission to the user using the existing permission |
| request API. |
| |
| * PlatformGTK.cmake: |
| * PlatformWPE.cmake: |
| * SourcesGTK.txt: |
| * SourcesWPE.txt: |
| * UIProcess/API/glib/WebKitUIClient.cpp: |
| * UIProcess/API/glib/WebKitWebsiteDataAccessPermissionRequest.cpp: Added. |
| (webkitWebsiteDataAccessPermissionRequestAllow): |
| (webkitWebsiteDataAccessPermissionRequestDeny): |
| (webkit_permission_request_interface_init): |
| (webkitWebsiteDataAccessPermissionRequestDispose): |
| (webkit_website_data_access_permission_request_class_init): |
| (webkitWebsiteDataAccessPermissionRequestCreate): |
| (webkit_website_data_access_permission_request_get_requesting_domain): |
| (webkit_website_data_access_permission_request_get_current_domain): |
| * UIProcess/API/glib/WebKitWebsiteDataAccessPermissionRequestPrivate.h: Added. |
| * UIProcess/API/gtk/WebKitWebsiteDataAccessPermissionRequest.h: Added. |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: |
| * UIProcess/API/gtk/webkit2.h: |
| * UIProcess/API/wpe/WebKitWebsiteDataAccessPermissionRequest.h: Added. |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| * UIProcess/API/wpe/docs/wpe-docs.sgml: |
| * UIProcess/API/wpe/webkit.h: |
| |
| 2020-06-14 Sam Weinig <weinig@apple.com> |
| |
| [WPT] html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray.html fails due to lack of caching of Plugin objects |
| https://bugs.webkit.org/show_bug.cgi?id=213185 |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/Plugins/PluginInfoStore.h: |
| Add missing #include that is now needed due to pruning of unnecessary #includes |
| in WebCore. |
| |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::pluginSupportsExtension): |
| Update to use new webVisibleMimeTypes() rather than the clunky getWebVisibleMimesAndPluginIndices(). |
| |
| 2020-06-14 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Return type of -[NSCoder validateClassSupportsSecureCoding:] is incorrect |
| <https://webkit.org/b/213161> |
| <rdar://problem/64050085> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/API/Cocoa/WKRemoteObjectCoder.mm: |
| (validateClass): |
| - Fix return type of |
| -[NSCoder validateClassSupportsSecureCoding:]. Throw an |
| NSException in case the method ever returns NO without |
| throwing its own NSException. (Currently this method does |
| throw an NSException instead of returning NO.) |
| |
| 2020-06-14 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Disable HSTS for requests when cookies will be blocked by ITP |
| https://bugs.webkit.org/show_bug.cgi?id=210739 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * NetworkProcess/soup/NetworkDataTaskSoup.cpp: |
| (WebKit::NetworkDataTaskSoup::shouldAllowHSTSProtocolUpgrade const): |
| |
| 2020-06-13 Richard Houle <rhoule@apple.com> |
| |
| Fix Overrelease in makeFailureSetForAllTextManipulationItems |
| https://bugs.webkit.org/show_bug.cgi?id=213165 |
| <rdar://problem/61389164> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (makeFailureSetForAllTextManipulationItems): |
| |
| 2020-06-13 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Mac Catalyst] Color inputs and selects fail to display popovers when clicked |
| https://bugs.webkit.org/show_bug.cgi?id=213157 |
| <rdar://problem/64004135> |
| |
| Reviewed by Tim Horton. |
| |
| In Mac Catalyst, presenting popovers using `UIPopoverController` causes the first responder to change. This |
| means that the WKContentView will resign first responder, which in turn causes the currently presented popover |
| to be dismissed. This means that popovers for color inputs and select elements will be dismissed immediately |
| after presentation. |
| |
| To mitigate this, adapt the approach taken in r259840 to `WKColorPopover` and `WKSelectPopover` by teaching the |
| base class (`WKRotatingPopover`) to temporarily preserve the focused element in light of first responder changes |
| while presenting a popover on Mac Catalyst. |
| |
| * UIProcess/ios/forms/WKFormPopover.mm: |
| (-[WKRotatingPopover presentPopoverAnimated:]): |
| (-[WKRotatingPopover dismissPopoverAnimated:]): |
| |
| 2020-06-13 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Experiment with strongly typed ColorComponents |
| https://bugs.webkit.org/show_bug.cgi?id=212396 |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/API/wpe/WebKitColor.cpp: |
| (webkitColorFillFromWebCoreColor): |
| * UIProcess/gtk/ViewGestureControllerGtk.cpp: |
| (WebKit::ViewGestureController::beginSwipeGesture): |
| * WebProcess/WebPage/WebFrame.cpp: |
| (WebKit::WebFrame::getDocumentBackgroundColor): |
| Update to call toSRGBALossy() rather than toSRGBAComponentsLossy(). |
| |
| 2020-06-13 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Remove FileError.h |
| https://bugs.webkit.org/show_bug.cgi?id=213119 |
| |
| Reviewed by Chris Dumez. |
| |
| * WebProcess/Network/WebSocketChannel.cpp: |
| (WebKit::WebSocketChannel::createMessageQueue): |
| |
| 2020-06-12 Brian Burg <bburg@apple.com> |
| |
| Automation.computeElementLayout should return iframe-relative element rects (when coordinate system is 'Page') |
| https://bugs.webkit.org/show_bug.cgi?id=213139 |
| <rdar://problem/55042445> |
| |
| Reviewed by Devin Rousso. |
| |
| Automation.computeElementLayout has two coordinate systems it can use, LayoutViewport (used for hit testing) |
| and Page (used for Get Element Rect). Since Get Element Rect expects coordinates relative to the current |
| browsing context, make the mode simpler by reporting the bounds from Element::boundingClientRect() which |
| are frame-relative. |
| |
| Covered by existing WPT suite. The semantics of this command are under review, as |
| the remote end steps seem to describe a different result than what the non-normative text does. |
| |
| * WebProcess/Automation/WebAutomationSessionProxy.cpp: |
| (WebKit::WebAutomationSessionProxy::computeElementLayout): |
| |
| 2020-06-12 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Check enum values in IPC::Decoder::decodeEnum() an IPC::Encoder::encodeEnum() |
| <https://webkit.org/b/211988> |
| <rdar://problem/63137695> |
| |
| Reviewed by Darin Adler. |
| |
| Replace decodeEnum() with decode() and encodeEnum() with |
| operator<<(). |
| |
| * GPUProcess/media/TextTrackPrivateRemoteConfiguration.h: |
| (WebKit::TextTrackPrivateRemoteConfiguration::encode const): |
| * GPUProcess/media/TrackPrivateRemoteConfiguration.h: |
| (WebKit::TrackPrivateRemoteConfiguration::encode const): |
| * NetworkProcess/NetworkProcessCreationParameters.cpp: |
| (WebKit::NetworkProcessCreationParameters::encode const): |
| (WebKit::NetworkProcessCreationParameters::decode): |
| * NetworkProcess/NetworkResourceLoadParameters.cpp: |
| (WebKit::NetworkResourceLoadParameters::encode const): |
| (WebKit::NetworkResourceLoadParameters::decode): |
| * Platform/IPC/Decoder.h: |
| (IPC::Decoder::decode): |
| (IPC::Decoder::operator>>): |
| - Make use of std::underlying_type_t<>. |
| (IPC::Decoder::decodeEnum): Delete. |
| - Replace with calls to decode(). |
| * Platform/IPC/Encoder.h: |
| (IPC::Encoder::operator<<): |
| (IPC::Encoder::encode): |
| - Make use of WTF::enumToUnderlyingType<>. |
| (IPC::Encoder::encodeEnum): Delete. |
| - Replace with calls to operator<<(). |
| * Shared/Cocoa/ArgumentCodersCocoa.mm: |
| (IPC::decodeObject): |
| * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: |
| (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode): |
| (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode): |
| (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::encode): |
| (IPC::ArgumentCoder<ApplePaySessionPaymentRequest::LineItem>::decode): |
| * Shared/ContextMenuContextData.cpp: |
| (WebKit::ContextMenuContextData::encode const): |
| (WebKit::ContextMenuContextData::decode): |
| * Shared/FocusedElementInformation.cpp: |
| (WebKit::FocusedElementInformation::encode const): |
| (WebKit::FocusedElementInformation::decode): |
| * Shared/LoadParameters.cpp: |
| (WebKit::LoadParameters::encode const): |
| (WebKit::LoadParameters::decode): |
| * Shared/NavigationActionData.cpp: |
| (WebKit::NavigationActionData::encode const): |
| (WebKit::NavigationActionData::decode): |
| * Shared/PlatformPopupMenuData.cpp: |
| (WebKit::PlatformPopupMenuData::encode const): |
| (WebKit::PlatformPopupMenuData::decode): |
| * Shared/Plugins/PluginProcessCreationParameters.cpp: |
| (WebKit::PluginProcessCreationParameters::encode const): |
| (WebKit::PluginProcessCreationParameters::decode): |
| * Shared/PrintInfo.cpp: |
| (WebKit::PrintInfo::encode const): |
| (WebKit::PrintInfo::decode): |
| * Shared/RTCPacketOptions.cpp: |
| (WebKit::RTCPacketOptions::encode const): |
| (WebKit::RTCPacketOptions::decode): |
| * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: |
| (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode const): |
| (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode): |
| (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const): |
| (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): |
| * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: |
| (ArgumentCoder<ScrollingStateNode>::encode): |
| (ArgumentCoder<RequestedScrollData>::encode): |
| (ArgumentCoder<RequestedScrollData>::decode): |
| (WebKit::RemoteScrollingCoordinatorTransaction::decode): |
| * Shared/SessionState.cpp: |
| (WebKit::HTTPBody::Element::encode const): |
| (WebKit::HTTPBody::Element::decode): |
| (WebKit::PageState::encode const): |
| (WebKit::PageState::decode): |
| * Shared/TouchBarMenuItemData.cpp: |
| (WebKit::TouchBarMenuItemData::encode const): |
| (WebKit::TouchBarMenuItemData::decode): |
| * Shared/UserData.cpp: |
| (WebKit::UserData::encode): |
| (WebKit::UserData::decode): |
| * Shared/WebContextMenuItemData.cpp: |
| (WebKit::WebContextMenuItemData::encode const): |
| (WebKit::WebContextMenuItemData::decode): |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<LinearTimingFunction>::encode): |
| (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode): |
| (IPC::ArgumentCoder<CubicBezierTimingFunction>::decode): |
| (IPC::ArgumentCoder<StepsTimingFunction>::encode): |
| (IPC::ArgumentCoder<SpringTimingFunction>::encode): |
| (IPC::ArgumentCoder<PluginInfo>::encode): |
| (IPC::ArgumentCoder<PluginInfo>::decode): |
| (IPC::ArgumentCoder<ProtectionSpace>::encode): |
| (IPC::ArgumentCoder<ProtectionSpace>::decode): |
| (IPC::ArgumentCoder<Credential>::encode): |
| (IPC::ArgumentCoder<Credential>::decode): |
| (IPC::ArgumentCoder<Cursor>::encode): |
| (IPC::ArgumentCoder<Cursor>::decode): |
| (IPC::ArgumentCoder<ResourceError>::encode): |
| (IPC::ArgumentCoder<ResourceError>::decode): |
| (IPC::ArgumentCoder<DragData>::encode): |
| (IPC::ArgumentCoder<DragData>::decode): |
| (IPC::ArgumentCoder<CompositionUnderline>::encode): |
| (IPC::ArgumentCoder<CompositionUnderline>::decode): |
| (IPC::ArgumentCoder<FileChooserSettings>::encode): |
| (IPC::ArgumentCoder<FileChooserSettings>::decode): |
| (IPC::ArgumentCoder<TextCheckingRequestData>::encode): |
| (IPC::ArgumentCoder<TextCheckingRequestData>::decode): |
| (IPC::ArgumentCoder<TextCheckingResult>::encode): |
| (IPC::ArgumentCoder<TextCheckingResult>::decode): |
| (IPC::ArgumentCoder<UserStyleSheet>::encode): |
| (IPC::ArgumentCoder<UserStyleSheet>::decode): |
| (IPC::ArgumentCoder<ScrollableAreaParameters>::encode): |
| (IPC::ArgumentCoder<ScrollableAreaParameters>::decode): |
| (IPC::ArgumentCoder<FilterOperation>::encode): |
| (IPC::decodeFilterOperation): |
| (IPC::ArgumentCoder<FontAttributes>::encode): |
| (IPC::ArgumentCoder<FontAttributes>::decode): |
| (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encode): |
| (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::decode): |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPopupItem.cpp: |
| (WebKit::WebPopupItem::encode const): |
| (WebKit::WebPopupItem::decode): |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebsiteData/WebsiteData.cpp: |
| (WebKit::WebsiteData::Entry::encode const): |
| (WebKit::WebsiteData::Entry::decode): |
| * Shared/curl/WebCoreArgumentCodersCurl.cpp: |
| (IPC::ArgumentCoder<ResourceError>::encodePlatformData): |
| (IPC::ArgumentCoder<ResourceError>::decodePlatformData): |
| (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): |
| (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): |
| * Shared/glib/InputMethodState.cpp: |
| (WebKit::InputMethodState::encode const): |
| (WebKit::InputMethodState::decode): |
| * Shared/glib/UserMessage.cpp: |
| (WebKit::UserMessage::encode const): |
| (WebKit::UserMessage::decode): |
| * Shared/mac/ColorSpaceData.mm: |
| (WebKit::ColorSpaceData::encode const): |
| (WebKit::ColorSpaceData::decode): |
| * Shared/mac/SecItemRequestData.cpp: |
| (WebKit::SecItemRequestData::encode const): |
| (WebKit::SecItemRequestData::decode): |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData): |
| (IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData): |
| (IPC::ArgumentCoder<WebCore::CertificateInfo>::encode): |
| (IPC::ArgumentCoder<WebCore::CertificateInfo>::decode): |
| * Shared/soup/WebCoreArgumentCodersSoup.cpp: |
| (IPC::ArgumentCoder<SoupNetworkProxySettings>::encode): |
| (IPC::ArgumentCoder<SoupNetworkProxySettings>::decode): |
| * WebProcess/GPU/media/RemoteMediaPlayerState.h: |
| (WebKit::RemoteMediaPlayerState::encode const): |
| (WebKit::RemoteMediaPlayerState::decode): |
| * WebProcess/Network/NetworkProcessConnectionInfo.h: |
| (WebKit::NetworkProcessConnectionInfo::decode): |
| * WebProcess/Plugins/Plugin.cpp: |
| (WebKit::Plugin::Parameters::encode const): |
| (WebKit::Plugin::Parameters::decode): |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm: |
| (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode const): |
| (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): |
| (WebKit::PlatformCAAnimationRemote::Properties::encode const): |
| (WebKit::PlatformCAAnimationRemote::Properties::decode): |
| |
| 2020-06-12 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iPadOS] Focusing selects and color inputs should not bring up the software keyboard |
| https://bugs.webkit.org/show_bug.cgi?id=213149 |
| <rdar://problem/64312450> |
| |
| Reviewed by Darin Adler. |
| |
| After <trac.webkit.org/r261658>, we now opt into bringing up the software keyboard when focusing color inputs |
| and select elements. This is due to the changes in `-_shouldShowAutomaticKeyboardUIIgnoringInputMode`, which |
| were intended to make us return `NO` for date and time inputs, but also unintentionally makes us return `YES` |
| on iPadOS. |
| |
| This patch fixes the bug by returning `!WebKit::currentUserInterfaceIdiomIsPad()` instead, and additionally |
| preserves the existing behavior of now showing a color picker for `<input type="color" readonly>` on iPhone. |
| |
| Test: fast/forms/ios/ipad/select-should-not-bring-up-software-keyboard.html |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView becomeFirstResponderForWebView]): |
| (-[WKContentView resignFirstResponderForWebView]): |
| (-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]): |
| (-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]): |
| |
| 2020-06-12 Alex Christensen <achristensen@webkit.org> |
| |
| Make API tests tolerant of our relatively new use of WebPageProxy::preconnectTo |
| https://bugs.webkit.org/show_bug.cgi?id=213144 |
| |
| Reviewed by Geofferey Garen. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]): |
| (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): |
| (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): |
| (WebKit::NetworkSessionCocoa::taskServerConnectionSucceeded): |
| (WebKit::NetworkSessionCocoa::taskReceivedBytes): Deleted. |
| Fix our logic that remembers successful client certificate connections. |
| If a task completes with no error (like a preconnect task does), consider that a successful connection. |
| |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::preconnectTo): |
| Remove the check to not preconnect to loopback addresses. |
| This was making our tests different than the real internet and prevented me from landing a perfectly good test |
| in https://bugs.webkit.org/show_bug.cgi?id=213109 |
| |
| 2020-06-12 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Preferences are not being observed if the process pool is being created after activation |
| https://bugs.webkit.org/show_bug.cgi?id=213145 |
| |
| Reviewed by Brent Fulgham. |
| |
| If the app is creating the Web process pool after being activated, preferences will not be observed until the app is being backgrounded |
| and then foregrounded again, since the preference observer is initialized when handling the app activation notification. |
| |
| No new tests, since an API test would make sense in this case, but API tests aren't run on iOS. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| |
| 2020-06-12 Takashi Komori <Takashi.Komori@sony.com> |
| |
| [Curl] Implement functions to use ResourceLoadStatistics. |
| https://bugs.webkit.org/show_bug.cgi?id=207692 |
| |
| Reviewed by Don Olmstead. |
| |
| Implement functions which are required to implement ResourceLoadStatistics for Curl port. |
| |
| In NetworkDataTaskCurl.cpp we check if we should block cookies and block if needed. |
| |
| Tests: http/tests/resourceLoadStatistics/ |
| |
| * NetworkProcess/NetworkDataTask.cpp: |
| (WebKit::NetworkDataTask::create): |
| * NetworkProcess/curl/NetworkDataTaskCurl.cpp: |
| (WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl): |
| (WebKit::NetworkDataTaskCurl::createCurlRequest): |
| (WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection): |
| (WebKit::NetworkDataTaskCurl::blockCookies): |
| (WebKit::NetworkDataTaskCurl::unblockCookies): |
| (WebKit::NetworkDataTaskCurl::shouldBlockCookies): |
| (WebKit::NetworkDataTaskCurl::isThirdPartyRequest): |
| * NetworkProcess/curl/NetworkDataTaskCurl.h: |
| * NetworkProcess/curl/NetworkSessionCurl.cpp: |
| (WebKit::NetworkSessionCurl::NetworkSessionCurl): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreGetAllStorageAccessEntries): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::parameters): |
| |
| 2020-06-12 Antoine Quint <graouts@webkit.org> |
| |
| Double tap to zoom out doesn't work after upgrading to iOS 13 |
| https://bugs.webkit.org/show_bug.cgi?id=205158 |
| <rdar://problem/205158> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Test: fast/events/ios/fast-click-double-tap-to-zoom-in-on-text-and-then-again-to-zoom-out.html |
| |
| In order to determine whether a significant zoom to happen, we should use the current page scale |
| factor and not the initial page scale factor. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:nodeIsRootLevel:]): |
| |
| 2020-06-12 Alex Christensen <achristensen@webkit.org> |
| |
| Add WKUserScript initializer SPI with alternative names |
| https://bugs.webkit.org/show_bug.cgi?id=213096 |
| |
| Reviewed by Youenn Fablet. |
| |
| And deprecate the existing ones so we can remove them soon. |
| |
| * UIProcess/API/Cocoa/WKUserScript.mm: |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:includeMatchPatternStrings:excludeMatchPatternStrings:associatedURL:contentWorld:deferRunningUntilNotification:]): |
| * UIProcess/API/Cocoa/WKUserScriptPrivate.h: |
| |
| 2020-06-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK4 build |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSynthesizeKeyEvent): |
| |
| 2020-06-11 Sam Weinig <weinig@apple.com> |
| |
| Document.currentScript does not work for SVGScriptElements |
| https://bugs.webkit.org/show_bug.cgi?id=213104 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: |
| (webkit_dom_document_get_current_script): |
| Update to account for change in Document::currentScript() now returning an |
| Element* that can be either an HTMLScriptElement or an SVGScriptElement. To |
| keep API compatibility, only return non-null for HTMLScriptElements. |
| |
| 2020-06-12 Charlie Turner <cturner@igalia.com> |
| |
| [GTK] Add an internal API to run javascript without forced user gestures |
| https://bugs.webkit.org/show_bug.cgi?id=212969 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| To be used by tests in a follow-up commit. |
| |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewRunJavaScriptWithParams): Factor out the glue to run |
| JavaScript in the page. |
| (webkitWebViewRunJavascriptWithoutForcedUserGestures): Add a new |
| internal API for use by tests. |
| (webkit_web_view_run_javascript): Modified to use factored out |
| glue. |
| * UIProcess/API/glib/WebKitWebViewInternal.h: Added. Place to keep |
| API test-specific internal APIs. |
| |
| 2020-06-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make WebDriver work |
| https://bugs.webkit.org/show_bug.cgi?id=212316 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Fix UIClient::setWindowFrame to wait for surface size-changed signal after resizing the window and implement |
| maximize, minimize and restore windows for GTK4. |
| |
| * UIProcess/API/glib/WebKitUIClient.cpp: |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| (surfaceStateChangedCallback): |
| (webkitWebViewMonitorWindowState): |
| (webkitWebViewMaximizeWindow): |
| (webkitWebViewMinimizeWindow): |
| (webkitWebViewRestoreWindow): |
| |
| 2020-06-11 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Add WTF::EnumTraits<> for every enum type used in IPC |
| <https://webkit.org/b/213093> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Change underlying type of enum class to `bool` when there are |
| only two values. In some cases, reorder the two values so the |
| mapping to 0 and 1 makes more sense. Converting every enum to |
| an enum class is not a goal of this patch, so some two-value |
| enums stil have WTF::EnumTraits<> defined as noted below. |
| - Add WTF::EnumTraits<> for the remaining enum types that are |
| used by IPC::Encoder::encodeEnum() and |
| IPC::Decoder::decodeEnum() so that WTF::isValidEnum<>() checks |
| may be added next. |
| - Add #include <WebCore/LibWebRTCEnumTraits.h> as needed. |
| |
| * GPUProcess/GPUConnectionToWebProcess.h: |
| * GPUProcess/GPUProcess.h: |
| * NetworkProcess/NetworkLoadParameters.h: |
| * Shared/API/APIObject.h: |
| * Shared/ContextMenuContextData.h: |
| * Shared/DrawingAreaInfo.h: |
| * Shared/FocusedElementInformation.h: |
| * Shared/PrintInfo.h: |
| (WTF::EnumTraits<WebKit::PrintInfo::PrintMode>): |
| - Define this since PrintMode is not an enum class. |
| * Shared/RTCPacketOptions.cpp: |
| * Shared/SessionState.h: |
| * Shared/TouchBarMenuItemData.h: |
| * Shared/WebEvent.h: |
| * Shared/WebPopupItem.cpp: |
| (WebKit::WebPopupItem::WebPopupItem): |
| - Fix reference to WebPopupItem::Type enum. |
| * Shared/WebPopupItem.h: |
| (WebKit::WebPopupItem::Type): |
| - Convert from enum to enum class. |
| * Shared/WebsiteData/WebsiteDataType.h: |
| * Shared/glib/InputMethodState.h: |
| * Shared/glib/UserMessage.h: |
| * Shared/mac/ColorSpaceData.mm: |
| * Shared/mac/SecItemRequestData.h: |
| * UIProcess/mac/WebPopupMenuProxyMac.mm: |
| (WebKit::WebPopupMenuProxyMac::populate): |
| - Fix reference to WebPopupItem::Type enum. |
| * WebProcess/Plugins/Plugin.cpp: |
| * WebProcess/WebCoreSupport/WebPopupMenu.cpp: |
| (WebKit::WebPopupMenu::populateItems): |
| - Fix reference to WebPopupItem::Type enum. |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.h: |
| |
| 2020-06-11 Alex Christensen <achristensen@webkit.org> |
| |
| Re-enable download resume tests |
| https://bugs.webkit.org/show_bug.cgi?id=213098 |
| <rdar://problem/63512518> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]): |
| |
| 2020-06-11 Beth Dakin <bdakin@apple.com> |
| |
| Replace instances of whitelist in WebCore with allowlist |
| https://bugs.webkit.org/show_bug.cgi?id=213068 |
| |
| Reviewed by Tim Horton. |
| |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::addOriginAccessWhitelistEntry): |
| (WebKit::NetworkConnectionToWebProcess::removeOriginAccessWhitelistEntry): |
| (WebKit::NetworkConnectionToWebProcess::resetOriginAccessWhitelists): |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<UserStyleSheet>::encode): |
| (IPC::ArgumentCoder<UserStyleSheet>::decode): |
| * WebProcess/InjectedBundle/InjectedBundle.cpp: |
| (WebKit::InjectedBundle::addOriginAccessWhitelistEntry): |
| (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry): |
| (WebKit::InjectedBundle::resetOriginAccessWhitelists): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-06-11 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit: Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT) |
| https://bugs.webkit.org/show_bug.cgi?id=213076 |
| <rdar://problem/64254698> |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, behavior unchanged. |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _requestDocumentContext:completionHandler:]): Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT). |
| (-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Ditto. |
| |
| 2020-06-11 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit: Add UIKit SPI for watchOS and tvOS |
| https://bugs.webkit.org/show_bug.cgi?id=213077 |
| <rdar://problem/64255131> |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, behavior unchanged. |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| |
| 2020-06-11 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for DragSourceAction |
| <https://webkit.org/b/212885> |
| <rdar://problem/64094134> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Convert argument parameters from uint64_t to |
| OptionSet<DragSourceAction>. |
| - Convert DragSourceAction to OptionSet<DragSourceAction>. |
| |
| * Scripts/webkit/messages.py: |
| - Map DragSourceAction enum to DragActions.h header. |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/DragDropInteractionState.h: |
| * UIProcess/ios/DragDropInteractionState.mm: |
| (WebKit::shouldUseDragImageToCreatePreviewForDragSource): |
| (WebKit::shouldUseVisiblePathToCreatePreviewForDragSource): |
| (WebKit::shouldUseTextIndicatorToCreatePreviewForDragSource): |
| (WebKit::canUpdatePreviewForActiveDragSource): |
| (WebKit::DragDropInteractionState::anyActiveDragSourceIs const): |
| (WebKit::DragDropInteractionState::stageDragItem): |
| (WebKit::DragDropInteractionState::hasStagedDragSource const): |
| (WebKit::DragDropInteractionState::updatePreviewsForActiveDragSources): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _startDrag:item:]): |
| (-[WKContentView _allowedDragSourceActions]): |
| (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::requestDragStart): |
| (WebKit::WebPageProxy::requestAdditionalItemsForDragSession): |
| * WebProcess/WebCoreSupport/WebDragClient.cpp: |
| (WebKit::WebDragClient::dragSourceActionMaskForPoint): |
| * WebProcess/WebCoreSupport/WebDragClient.h: |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::allowedDragSourceActions const): |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::requestDragStart): |
| (WebKit::WebPage::requestAdditionalItemsForDragSession): |
| |
| 2020-06-11 Eric Carlson <eric.carlson@apple.com> |
| |
| [Cocoa] MediaUsageManagerCocoa should use a different USVideoUsage initializer |
| https://bugs.webkit.org/show_bug.cgi?id=213058 |
| |
| Reviewed by Jer Noble. |
| |
| No new tests, tested manually. |
| |
| * UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm: |
| (WebKit::MediaUsageManagerCocoa::reset): Drive-by fix: don't call -stop unless the |
| element was playing. |
| (WebKit::MediaUsageManagerCocoa::updateMediaUsage): Use a different initializer so |
| we can pass in the state. |
| |
| 2020-06-11 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Implement button-press-event, button-release-event, and absolute-axis-event of GAMEPAD API. |
| https://bugs.webkit.org/show_bug.cgi?id=133850 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * UIProcess/Gamepad/UIGamepadProvider.cpp: Add the OS(LINUX) guard. |
| * UIProcess/Gamepad/gtk/UIGamepadProviderGtk.cpp: |
| (WebKit::getWebPageProxy): Build fix. WebKitWebViewBase is used, not WebKitWebViewPrivate. |
| * UIProcess/Gamepad/manette/UIGamepadProviderManette.cpp: Add the OS(LINUX) guard. |
| |
| 2020-06-10 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| [macOS]: The File Picker of the <input> file element should show the selection filter |
| https://bugs.webkit.org/show_bug.cgi?id=212485 |
| |
| Reviewed by Darin Adler. |
| |
| Add two private helpers to WKOpenPanelParameters. |
| |
| * UIProcess/API/Cocoa/WKOpenPanelParameters.mm: |
| (-[WKOpenPanelParameters _allowedFileExtensions]): |
| Returns an array of strings representing the allowed extensions. |
| |
| (-[WKOpenPanelParameters _allowedFileExtensionsDescription]): |
| Returns a string representing a description for the allowed extensions. |
| |
| * UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h: |
| |
| 2020-06-10 Beth Dakin <bdakin@apple.com> |
| |
| Replace instances of blacklist in WebCore with blocklist |
| https://bugs.webkit.org/show_bug.cgi?id=213064 |
| |
| Reviewed by Tim Horton. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<UserStyleSheet>::encode): |
| (IPC::ArgumentCoder<UserStyleSheet>::decode): |
| |
| 2020-06-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] editing/pasteboard/dom-paste tests consistently time out |
| https://bugs.webkit.org/show_bug.cgi?id=213061 |
| <rdar://problem/64211161> |
| |
| Reviewed by Darin Adler. |
| |
| On recent versions of iOS, system changes have moved the timing of the call to |
| `-requestAutocorrectionContextWithCompletionHandler:` when focusing an editable element. This results in a |
| consistently reproducible deadlock between the UI process and web process if a page tries to request |
| programmatic clipboard access during the click event (importantly, in the same runloop as element focus). |
| |
| What ends up happening is that the autocorrection context is requested by the UI process shortly after the |
| (unbounded) sync IPC message for the DOM paste arrives, so we end up waiting forever for the sync-IPC-blocked |
| web process to respond. Normally this just results in a 1 second hang, and the DOM paste proceeds as normal. |
| However these layout tests purposefully opt out of sync IPC timeouts (precisely so that we can catch bugs like |
| this). See below for more details. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| |
| Keep track of the most recent autocorrection context that arrived in the UI process. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView cleanUpInteraction]): |
| |
| Clear out the autocorrection context, in case the web process crashes. |
| |
| (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): |
| |
| If the autocorrection context is requested while handling a DOM paste, we know that the latest autocorrection |
| context must be up to date, since the autocorrection context is computed and sent immediately before a DOM paste |
| request. Use this to immediately invoke the completion handler, without any sync IPC back to the web process. |
| |
| (-[WKContentView _handleAutocorrectionContext:]): |
| |
| 2020-06-10 Hiro (mzp) Mizuno <mzp@apple.com> |
| |
| [iOS] Option + Forward Delete should delete next word |
| https://bugs.webkit.org/show_bug.cgi?id=213062 |
| rdar://64225458 |
| |
| Reviewed by Daniel Bates. |
| |
| Implement support for pressing Option + Forward Delete to delete the next word. This makes text editing |
| in WebKit more closely match the platform conventions. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView canPerformAction:withSender:]): Handle _deleteForwardByWord. |
| (-[WKContentView _deleteForwardByWord]): Added. |
| |
| 2020-06-10 Geoffrey Garen <ggaren@apple.com> |
| |
| Some style improvements to main thread code |
| https://bugs.webkit.org/show_bug.cgi?id=213051 |
| |
| Reviewed by Darin Adler. |
| |
| Updated for rename. |
| |
| * Shared/Cocoa/WebKit2InitializeCocoa.mm: |
| (WebKit::runInitializationCode): |
| (WebKit::InitializeWebKit2): |
| * Shared/WebKit2Initialize.cpp: |
| (WebKit::InitializeWebKit2): |
| |
| 2020-06-10 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit:Add PepperUICoreSPI.h (Follow-up fix 2) |
| https://bugs.webkit.org/show_bug.cgi?id=212996 |
| <rdar://problem/64182627> |
| |
| Unreviewed build fix. |
| |
| * UIProcess/ios/forms/WKNumberPadViewController.mm: |
| (-[WKNumberPadViewController addContentViewAnimations:]): Correct APPLE_INTERNAL_SDK macro. |
| * UIProcess/ios/forms/WKQuickboardListViewController.mm: |
| (-[WKQuickboardListViewController initWithDelegate:]): Ditto. |
| |
| 2020-06-10 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit:Add PepperUICoreSPI.h (Follow-up fix) |
| https://bugs.webkit.org/show_bug.cgi?id=212996 |
| <rdar://problem/64182627> |
| |
| Unreviewed build fix. |
| |
| * Platform/spi/watchos/PepperUICoreSPI.h: Add PUICPickerView headers. |
| |
| 2020-06-10 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r262858): Fix macOS build when building EndowmentStateTracker.mm |
| |
| * UIProcess/EndowmentStateTracker.mm: |
| - Move #if PLATFORM(IOS_FAMILY) to fix macOS build. |
| |
| 2020-06-10 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] Return early from preference change notification handler if there is no observer |
| https://bugs.webkit.org/show_bug.cgi?id=213050 |
| |
| Reviewed by Darin Adler. |
| |
| Currently, the observer member is checked inside the loop iterating over all the keys, |
| but this check should be moved outside of the loop. |
| |
| No new tests, since this is not a change in behavior. |
| |
| * UIProcess/Cocoa/PreferenceObserver.mm: |
| (-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]): |
| |
| 2020-06-10 Brady Eidson <beidson@apple.com> |
| |
| Crash growing a CFData with incremental PDF loading. |
| <rdar://problem/63670403> and https://bugs.webkit.org/show_bug.cgi?id=213035 |
| |
| Reviewed by Alex Christensen. |
| |
| No test - No reliable way to trigger. |
| |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::ensureDataBufferLength): When you call CFDataCreateMutable with a size other than 0, |
| your data object can never grow beyond that size. |
| And, in fact, CFData will crash on purpose when this is attempted. |
| So always create our mutable CFDatas with size 0 even if we immediately plan to grow them. |
| |
| 2020-06-10 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit: Add ClockKitSPI.h |
| https://bugs.webkit.org/show_bug.cgi?id=212994 |
| <rdar://problem/64181092> |
| |
| Reviewed by Wenson Hsieh. |
| |
| No new tests, behavior unchanged. |
| |
| * Platform/spi/watchos: Added. |
| * Platform/spi/watchos/ClockKitSPI.h: Added. |
| * UIProcess/ios/forms/WKTimePickerViewController.mm: Import ClockKitSPI.h and UIKitSPI.h. |
| * WebKit.xcodeproj/project.pbxproj: Include ClockKitSPI. |
| |
| 2020-06-10 Brian Burg <bburg@apple.com> |
| |
| WebDriver on non-iOS ports cannot perform ActionChain which has scrolling down to the element and click it |
| https://bugs.webkit.org/show_bug.cgi?id=208232 |
| <rdar://problem/59859491> |
| |
| Reviewed by Devin Rousso. |
| |
| * UIProcess/Automation/mac/WebAutomationSessionMac.mm: |
| (WebKit::WebAutomationSession::platformSimulateMouseInteraction): |
| The provided coordinates are in LayoutViewport coordinate system, which does |
| not take topContentInset into account. Add back in the topContentInset |
| when translating to flipped window coordinates. |
| |
| * WebProcess/Automation/WebAutomationSessionProxy.cpp: |
| (WebKit::WebAutomationSessionProxy::computeElementLayout): |
| The calculations of element bounds and IVCP have an incorrect handling of |
| root coordinates as contents/absolute coordinates. Add the missing conversion. |
| |
| 2020-06-10 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS] Update sandbox rules for correct sanitizer paths in current OS releases |
| https://bugs.webkit.org/show_bug.cgi?id=213040 |
| <rdar://problem/64187043> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Update the sandbox rules on iOS platforms to allow access to the |
| new system locations for Asan libraries. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-06-10 Jer Noble <jer.noble@apple.com> |
| |
| Catalyst WebKit apps continue to play audio after quitting |
| https://bugs.webkit.org/show_bug.cgi?id=212981 |
| <rdar://problem/57089471> |
| |
| Reviewed by Chris Dumez. |
| |
| RunningBoard will track whether a process (and it's associated child processes) are "user-visible" by |
| granting those processes an "endowment", similar to the existing endowment for application visibility. |
| Track changes to these endowments using a RBSProcessMonitor, and for Catalyst apps, react to losing the |
| "user-visible" endowment by suspending all media playback. |
| |
| Move all the endowment-related code into a new class, EndowmentStateTracker, which is a singleton object |
| that can have mulitple WebPageProxy clients. Update references to the previously global static |
| isApplicationForeground() function to refer to EndowmentStateTracker instead. |
| |
| Drive-by fix: move some iOS-only functions in WebPageProxy.cpp into WebPageProxyIOS.mm. |
| |
| * UIProcess/ApplicationStateTracker.h: |
| * UIProcess/ApplicationStateTracker.mm: |
| (WebKit::ApplicationStateTracker::ApplicationStateTracker): |
| (WebKit::isApplicationForeground): Deleted. |
| * UIProcess/EndowmentStateTracker.h: Added. |
| (WebKit::EndowmentStateTracker::isVisible const): |
| (WebKit::EndowmentStateTracker::isUserFacing const): |
| * UIProcess/EndowmentStateTracker.mm: Added. |
| (WebKit::handleForPID): |
| (WebKit::EndowmentStateTracker::isApplicationForeground): |
| (WebKit::EndowmentStateTracker::isApplicationUserFacing): |
| (WebKit::EndowmentStateTracker::singleton): |
| (WebKit::EndowmentStateTracker::EndowmentStateTracker): |
| (WebKit::EndowmentStateTracker::addClient): |
| (WebKit::EndowmentStateTracker::removeClient): |
| (WebKit::EndowmentStateTracker::setIsUserFacing): |
| (WebKit::EndowmentStateTracker::setIsVisible): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::m_limitsNavigationsToAppBoundDomains): |
| (WebKit::WebPageProxy::~WebPageProxy): |
| (WebKit::WebPageProxy::processWillBecomeSuspended): Deleted. |
| (WebKit::WebPageProxy::processWillBecomeForeground): Deleted. |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::isApplicationVisible): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::processWillBecomeSuspended): |
| (WebKit::WebPageProxy::processWillBecomeForeground): |
| (WebKit::WebPageProxy::isUserFacingChanged): |
| (WebKit::WebPageProxy::isVisibleChanged): |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-06-10 Antoine Quint <graouts@webkit.org> |
| |
| Subframes should not autosize independently |
| https://bugs.webkit.org/show_bug.cgi?id=212984 |
| <rdar://problem/64175493> |
| |
| Reviewed by Simon Fraser. |
| |
| Ensure we only call FrameView::enableSizeToContentAutoSizeMode() for the main frame. |
| |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): |
| |
| 2020-06-10 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit:Add PepperUICoreSPI.h |
| https://bugs.webkit.org/show_bug.cgi?id=212996 |
| <rdar://problem/64182627> |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, behavior unchanged. |
| |
| * Platform/spi/watchos: Added. |
| * Platform/spi/watchos/PepperUICoreSPI.h: Added. |
| * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: Include PepperUICoreSPI header. |
| * UIProcess/ios/WKScrollView.mm: Ditto. |
| * UIProcess/ios/forms/WKDatePickerViewController.mm: Remove headers duplicated in PepperUICoreSPI.h. |
| * UIProcess/ios/forms/WKFocusedFormControlView.mm: Ditto. |
| * UIProcess/ios/forms/WKNumberPadView.mm: Include PepperUICoreSPI header. |
| * UIProcess/ios/forms/WKNumberPadViewController.h: Remove headers duplicated in PepperUICoreSPI.h. |
| * UIProcess/ios/forms/WKNumberPadViewController.mm: Ditto. |
| (-[WKNumberPadViewController addContentViewAnimations:]): Limit addAnimation to Internal builds. |
| * UIProcess/ios/forms/WKQuickboardListViewController.h: Include PepperUICoreSPI header. |
| * UIProcess/ios/forms/WKQuickboardListViewController.mm: Remove headers duplicated in PepperUICoreSPI.h. |
| (-[WKQuickboardListViewController initWithDelegate:]): |
| * UIProcess/ios/forms/WKSelectMenuListViewController.mm: Remove headers duplicated in PepperUICoreSPI.h. |
| * UIProcess/ios/forms/WKTextInputListViewController.mm: Ditto. |
| * WebKit.xcodeproj/project.pbxproj: Add PepperUICoreSPI.h. |
| |
| 2020-06-10 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Add entitlement for PAC exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=213027 |
| <rdar://problem/63985737> |
| |
| Reviewed by Brent Fulgham. |
| |
| On iOS, add entitlement for PAC exceptions. |
| |
| * Scripts/process-entitlements.sh: |
| |
| 2020-06-10 James Savage <james.savage@apple.com> |
| |
| Swift Overlay API refinements |
| https://bugs.webkit.org/show_bug.cgi?id=212939 |
| <rdar://problem/64140013> |
| |
| Reviewed by Darin Adler. |
| |
| This patch cleans up some inconsistencies in the various Swift projections, |
| and modifies JavaScript evaluation callbacks to be optional to account for |
| scripts which may not evaluate to a useful result (such as ones that simply |
| modify the DOM without reporting a status). It also standardizes on using |
| completionHandler as an argument label to match the rest of WebKit API, and |
| the majority of the Swift API refinements. |
| |
| It also fixes a module issue where the WebKit.h umbrella was missing an |
| import of WKScriptReplyWithMessageHandler.h, making the type unusable from |
| Swift source files/ |
| |
| * Shared/API/Cocoa/WebKit.h: Add missing header. |
| * UIProcess/API/Cocoa/WebKitSwiftOverlay.swift: |
| (callAsyncJavaScript(_:arguments:in:completionHandler:)): Rename completion |
| argument, and make optional. Note: Optional closures are implicitly |
| @escaping, making the annotation redundant and incompatible, so it must |
| be removed. In Swift, Optional.map()'s closure is invoked iff the Optional |
| contains some value, and the result of that transform is returned, else |
| nil is propagated. This allows us to apply the closure transform if the |
| client value is non-nil, without using intermediary variables or if/let. |
| (evaluateJavaScript(_:in:completionHandler:)): Ditto. |
| * SwiftOverlay/Tests/WebKitTests.swift: |
| (WebKitTests.testAPI): Update names to reflect changes. |
| * SwiftOverlay/WebKitSwiftOverlay.xcodeproj/xcshareddata/xcschemes/Everything (Catalyst).xcscheme: |
| Ensure that the unit test files get built as part of Build & Run, so that |
| any changes to names get flagged without even running the tests. |
| * SwiftOverlay/WebKitSwiftOverlay.xcodeproj/xcshareddata/xcschemes/Everything.xcscheme: |
| Ditto. |
| |
| 2020-06-10 Kate Cheney <katherine_cheney@apple.com> |
| |
| ASSERTION FAILED: suspendedState == State::Running in WebKit::WebResourceLoadStatisticsStore::suspend |
| https://bugs.webkit.org/show_bug.cgi?id=213031 |
| <rdar://problem/64131092> |
| |
| Reviewed by Chris Dumez. |
| |
| There is a race condition if two calls are made to |
| WebResourceLoadStatisticsStore::suspend() simultanously. |
| WebResourceLoadStatisticsStore::resume() notifies the background |
| thread to continue and releases a lock, then sometimes the second call |
| to suspend obtains the lock and updates the suspendedState variable |
| before the background thread resumes and checks the result. This patch allows the |
| suspendedState to be either State::Running or State::WillSuspend to |
| account for this. |
| |
| No new tests, this should fix http/wpt/service-workers/service-worker-spinning-fetch.https.html. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated): |
| (WebKit::WebResourceLoadStatisticsStore::suspend): |
| |
| 2020-06-10 Alex Christensen <achristensen@webkit.org> |
| |
| Revert r259770 |
| https://bugs.webkit.org/show_bug.cgi?id=210097 |
| <rdar://problem/64175992> |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| |
| 2020-06-10 Alex Christensen <achristensen@webkit.org> |
| |
| Add some null checks in PDFPlugin::updatePageAndDeviceScaleFactors |
| https://bugs.webkit.org/show_bug.cgi?id=213009 |
| <rdar://problem/63756100> |
| |
| Reviewed by Chris Dumez. |
| |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors): |
| |
| 2020-06-09 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| Unreviewed, reverting r262791. |
| |
| WinCairo WebKit1 is crashing. |
| |
| Reverted changeset: |
| |
| "[Curl] Implement functions to use ResourceLoadStatistics." |
| https://bugs.webkit.org/show_bug.cgi?id=207692 |
| https://trac.webkit.org/changeset/262791 |
| |
| 2020-06-09 Tim Horton <timothy_horton@apple.com> |
| |
| Stop using the wrong LaunchServices SPI for getting an app's localized name |
| https://bugs.webkit.org/show_bug.cgi?id=213003 |
| <rdar://problem/64169000> |
| |
| Reviewed by Sam Weinig. |
| |
| * UIProcess/ios/WKActionSheetAssistant.mm: |
| (-[WKActionSheetAssistant _appendAppLinkOpenActionsForURL:actions:elementInfo:]): |
| |
| 2020-06-09 Mark Lam <mark.lam@apple.com> |
| |
| Disambiguate the OverridesGetPropertyNames structure flag |
| https://bugs.webkit.org/show_bug.cgi?id=212909 |
| <rdar://problem/63823557> |
| |
| Reviewed by Saam Barati. |
| |
| * WebProcess/Plugins/Netscape/JSNPObject.h: |
| |
| 2020-06-09 Dean Jackson <dino@apple.com> |
| |
| Stop using discriminatory names for WebGL and Plugin blocking |
| https://bugs.webkit.org/show_bug.cgi?id=213000 |
| |
| Reviewed by Simon Fraser. |
| |
| * Shared/Plugins/Netscape/mac/PluginInformationMac.mm: |
| (WebKit::getPlatformPluginModuleInformation): |
| * UIProcess/API/C/mac/WKContextPrivateMac.mm: |
| (WKContextIsPlugInUpdateAvailable): |
| (WKContextShouldBlockWebGL): |
| (WKContextShouldSuggestBlockWebGL): |
| * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: |
| (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin): |
| |
| 2020-06-09 Brian Burg <bburg@apple.com> |
| |
| [Cocoa] Element Send Keys can hang when an automation window becomes unfocused |
| https://bugs.webkit.org/show_bug.cgi?id=212985 |
| <rdar://problem/56354471> |
| |
| Reviewed by Devin Rousso. |
| |
| * UIProcess/Automation/mac/WebAutomationSessionMac.mm: |
| (WebKit::WebAutomationSession::sendSynthesizedEventsToPage): |
| Make sure to focus the window and set first responder so sending keys doesn't hang. |
| |
| |
| 2020-06-09 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit: Import NSURLConnectionSPI.h instead of CFNSURLConnection.h |
| https://bugs.webkit.org/show_bug.cgi?id=212980 |
| <rdar://problem/64172694> |
| |
| Unreviewed build fix. |
| |
| No new tests, behavior unchanged. |
| |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| |
| 2020-06-09 Dean Jackson <dino@apple.com> |
| |
| REGRESSION: [Safari Mojave for High Sierra] Accessing some of the featured pages on apple.com causes the webpage to crash |
| https://bugs.webkit.org/show_bug.cgi?id=212940 |
| |
| Reviewed by Tim Horton. |
| |
| The code to use the singleton for a SwitchingGPUClient was assuming it |
| has always been set, which was not the case when |
| ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: Set the singleton unconditionally. |
| (WebKit::WebProcess::platformInitializeProcess): |
| |
| 2020-06-09 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION (r260820): [macCatalyst] Web process crashes when uploading a file |
| https://bugs.webkit.org/show_bug.cgi?id=212976 |
| <rdar://problem/64033186> |
| |
| Reviewed by Tim Horton. |
| |
| On Mac Catalyst, we attempt to take a sandbox extension for `com.apple.frontboard.systemappservices` when |
| uploading a file; this service does not exist in Catalyst, and we consequently encounter a release assertion |
| under `WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon`. |
| |
| Fix this by introducing `HAVE(FRONTBOARD_SYSTEM_APP_SERVICES)`, and using it to guard codepaths that attempt to |
| grab a mach extension to this service. (As a followup, we should consider adopting this in other places that |
| currently reference `com.apple.frontboard.systemappservices`). |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon): |
| |
| 2020-06-09 Jonathan Bedard <jbedard@apple.com> |
| |
| WebKit: Support watchOS and tvOS in xcconfigs |
| https://bugs.webkit.org/show_bug.cgi?id=212977 |
| <rdar://problem/64170532> |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, behavior unchanged. |
| |
| * Configurations/Base.xcconfig: Add tvOS and watchOS major version macros. |
| * Configurations/BaseTarget.xcconfig: Include tvOS and watchOS framework stubs. |
| * Configurations/BaseXPCService.xcconfig: Generalize excluded files for all embedded platforms. |
| * Configurations/GPUService.xcconfig: Generalize INFOPLIST for embedded platforms. |
| * Configurations/NetworkService.xcconfig: Ditto. |
| * Configurations/WebContentService.xcconfig: Ditto. |
| |
| 2020-06-09 Alex Christensen <achristensen@webkit.org> |
| |
| Expose PDF file URL in shouldAllowPDFToOpenFromFrame SPI |
| https://bugs.webkit.org/show_bug.cgi?id=212974 |
| |
| Reviewed by Tim Horton. |
| |
| * UIProcess/API/APIUIClient.h: |
| (API::UIClient::confirmPDFOpening): |
| * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: |
| * UIProcess/Cocoa/UIDelegate.h: |
| * UIProcess/Cocoa/UIDelegate.mm: |
| (WebKit::UIDelegate::setDelegate): |
| (WebKit::UIDelegate::UIClient::confirmPDFOpening): |
| * UIProcess/mac/WebPageProxyMac.mm: |
| (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): |
| (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): |
| |
| 2020-06-09 Takashi Komori <Takashi.Komori@sony.com> |
| |
| [Curl] Implement functions to use ResourceLoadStatistics. |
| https://bugs.webkit.org/show_bug.cgi?id=207692 |
| |
| Reviewed by Don Olmstead. |
| |
| Implement functions which are required to implement ResourceLoadStatistics for Curl port. |
| |
| In NetworkDataTaskCurl.cpp we check if we should block cookies and block if needed. |
| |
| Tests: http/tests/resourceLoadStatistics/ |
| |
| * NetworkProcess/NetworkDataTask.cpp: |
| (WebKit::NetworkDataTask::create): |
| * NetworkProcess/curl/NetworkDataTaskCurl.cpp: |
| (WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl): |
| (WebKit::NetworkDataTaskCurl::createCurlRequest): |
| (WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection): |
| (WebKit::NetworkDataTaskCurl::blockCookies): |
| (WebKit::NetworkDataTaskCurl::unblockCookies): |
| (WebKit::NetworkDataTaskCurl::shouldBlockCookies): |
| (WebKit::NetworkDataTaskCurl::isThirdPartyRequest): |
| * NetworkProcess/curl/NetworkDataTaskCurl.h: |
| * NetworkProcess/curl/NetworkSessionCurl.cpp: |
| (WebKit::NetworkSessionCurl::NetworkSessionCurl): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreGetAllStorageAccessEntries): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::parameters): |
| |
| 2020-06-09 Lauro Moura <lmoura@igalia.com> |
| |
| [WebDriver][WPE] Follow up WPE fix after r262703 |
| https://bugs.webkit.org/show_bug.cgi?id=212948 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Covered by existing tests. |
| |
| * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp: |
| (WebKit::WebAutomationSession::platformWebModifiersFromRaw): |
| |
| 2020-06-08 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for IPC::CFType |
| <https://webkit.org/b/212921> |
| <rdar://problem/64134506> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Convert IPC::CFType to enum class. |
| - Rule for new enum names is to remove "Ref" suffix from the |
| actual type name. |
| - Special enum CFType::Null renamed to CFType::Nullptr to |
| differentiate from CFType::CFNull objects. |
| |
| * Shared/cf/ArgumentCodersCF.cpp: |
| (IPC::tokenNullTypeRef): Delete. |
| (IPC::tokenNullptrTypeRef): Add. |
| - Rename tokenNullTypeRef() to tokenNullptrTypeRef(). |
| (IPC::CFType): |
| - Convert to enum class. |
| (IPC::typeFromCFTypeRef): |
| (IPC::encode): |
| - Switch from encodeEnum() to operator<<(). |
| (IPC::decode): |
| - Switch from decodeEnum() to decode(). |
| (WTF::EnumTraits<IPC::CFType>): Add. |
| * Shared/cf/ArgumentCodersCF.h: |
| (IPC::tokenNullTypeRef): Delete. |
| (IPC::tokenNullptrTypeRef): Add. |
| - Rename tokenNullTypeRef() to tokenNullptrTypeRef(). |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData): |
| (IPC::ArgumentCoder<WebCore::ResourceRequest>::decodePlatformData): |
| - Switch to use tokenNullptrTypeRef(). |
| * mac/WebKit2.order: |
| - Update symbol name after renaming tokenNullTypeRef(). |
| |
| 2020-06-08 Kate Cheney <katherine_cheney@apple.com> |
| |
| ResourceLoadStatisticsDatabaseStore::domainIDFromString failed, error message: bad parameter or other API misuse |
| https://bugs.webkit.org/show_bug.cgi?id=212916 |
| <rdar://problem/64127238> |
| |
| Reviewed by Sihui Liu. |
| |
| Make sure m_domainIDFromStringStatement is accessed in a separate |
| scope in ensureResourceStatisticsForRegistrableDomain() so it will be |
| reset before being used again. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::domainID const): |
| Add debug assert to ensure that tests catch this case. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain const): |
| |
| 2020-06-08 Chris Dumez <cdumez@apple.com> |
| |
| Turn some WebPageProxy logging into error logging |
| https://bugs.webkit.org/show_bug.cgi?id=212922 |
| <rdar://problem/63894722> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): |
| (WebKit::WebPageProxy::didFailLoadForFrame): |
| (WebKit::WebPageProxy::processDidTerminate): |
| (WebKit::WebPageProxy::dispatchProcessDidTerminate): |
| (WebKit::WebPageProxy::tryReloadAfterProcessTermination): |
| (WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive): |
| (WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground): |
| |
| 2020-06-08 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for DragOperation |
| <https://webkit.org/b/212870> |
| <rdar://problem/64069940> |
| |
| Reviewed by Darin Adler. |
| |
| * Scripts/webkit/messages.py: |
| - Remove FIXME now that it's not needed. |
| * Shared/API/Cocoa/_WKDragActionsInternal.h: |
| (WebKit::coreDragOperationMask): |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::kit): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (dropOperationForWebCoreDragOperation): |
| (coreDragOperationForUIDropOperation): |
| (-[WKContentView dragDataForDropSession:dragDestinationAction:]): |
| |
| 2020-06-08 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r262685. |
| https://bugs.webkit.org/show_bug.cgi?id=212914 |
| |
| caused flakey crashes in an iOS test |
| |
| Reverted changeset: |
| |
| "Clear WebPageProxy event state between tests" |
| https://bugs.webkit.org/show_bug.cgi?id=212864 |
| https://trac.webkit.org/changeset/262685 |
| |
| 2020-06-08 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Unify rounding / clamping conversions between 0-1 float components and 0-255 byte components |
| https://bugs.webkit.org/show_bug.cgi?id=212871 |
| |
| Reviewed by Simon Fraser. |
| |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (scrollViewBackgroundColor): |
| Replaces uses of colorWithAlphaUsingAlternativeRounding() with colorWithAlpha(). |
| |
| 2020-06-08 Richard Houle <rhoule@apple.com> |
| |
| Links in NSAttributedString passed to -[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:] are ignored |
| https://bugs.webkit.org/show_bug.cgi?id=212801 |
| <rdar://problem/63027631> |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]): Call the new detailsWithLinks |
| implementation, asserting if an URL is non nil. |
| (-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]): Ditto. |
| (-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:detailsWithLinks:completionHandler:]): Pass the URL to |
| the completion handler when appropriate. |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| |
| 2020-06-08 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] Adopt read-only mode for preferences in the WebContent process |
| https://bugs.webkit.org/show_bug.cgi?id=212411 |
| |
| Reviewed by Darin Adler. |
| |
| Change name of HAVE define to match SPI name. |
| |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::XPCServiceMain): |
| |
| 2020-06-08 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] CFPrefs synchronization does not always work for global preference changes |
| https://bugs.webkit.org/show_bug.cgi?id=212783 |
| |
| Reviewed by Tim Horton. |
| |
| In CFPrefs direct mode, synchronization of global preference changes from the UI process to the WebContent process does not always work. |
| This is caused by the KVO notification being sent to all or some of the NSUserDefault objects, which leads us to believe a non-global |
| preference was changed. Since a global preference change always leads to some NSUserDefaults object receiving the notification, we can |
| work around this by checking if the preference being changed really belongs to the domain of the NSUserDefaults object, or if it is a |
| global preference. Also, stop creating NSUserDefaults object for the global domain, since this is an error according to the docs. |
| |
| API test: WebKit.GlobalPreferenceChangesUsingDefaultsWrite |
| |
| * UIProcess/Cocoa/PreferenceObserver.mm: |
| (-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| (WebKit::WebProcess::notifyPreferencesChanged): |
| |
| 2020-06-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] Hit-testing on icloud.com is offset after closing a tab |
| https://bugs.webkit.org/show_bug.cgi?id=212890 |
| <rdar://problem/58775297> |
| |
| Reviewed by Simon Fraser. |
| |
| After tapping to create a new tab on the icloud.com settings page (with no other tabs open) and then closing the |
| new tab, all hit-testing on the page is offset by -33px until the page is reloaded. This bug appears to be a |
| corner case triggered by a combination of the following three changes: |
| |
| - <https://trac.webkit.org/r170463> |
| - <https://trac.webkit.org/r245006> |
| - <rdar://problem/53660458> (which is an iOS-specific Safari change) |
| |
| We start on icloud.com's settings page. When closing the newly created tab, Safari hides the tab bar, causing |
| both the top content inset and top obscured inset to decrease by 33 points. When applying the top content inset |
| change, Safari (after <rdar://problem/53660458>) temporarily sets `_automaticContentOffsetAdjustmentEnabled` on |
| `WKScrollView` to `NO`, which means that the scroll view doesn't automatically adjust its content offset to -70; |
| instead, it remains at -103 (the content offset when the tab bar is shown). |
| |
| Because of this, during the next remote layer tree commit where the content size changes, |
| `-_setContentSizePreservingContentOffsetDuringRubberband:` will believe that we're currently rubber-banding by |
| 33px, and therefore try to adjust the content offset of the scroll view to be -103 instead of allowing it to be |
| adjusted back to -70 (see r170463 and `-_restoreContentOffsetWithRubberbandAmount:`). |
| |
| This results in the scroll position on the page (`document.scrollingElement.scrollTop`) reporting -33, even |
| though the top of the page is flush with the bottom of Safari's browser chrome. Finally, because `WKScrollView` |
| is made unscrollable due to `overflow: hidden;` (r245006), we end up permanently stuck in this state until the |
| next page load, rather than the next remote layer tree commit that causes any scrolling. |
| |
| To fix this, add an additional restriction on the rubberbanding offset restoration code in |
| `-_setContentSizePreservingContentOffsetDuringRubberband:`, such that we only try to preserve the current |
| rubberbanded offset if we're actually rubberbanding (that is, dragging or bouncing against the edge of the |
| scroll view). Note that when rubberbanding against the top of the scroll view on iPad using a trackpad, the |
| `-isDragging` property is also true, which matches behavior when panning via touch. |
| |
| Test: ScrollViewInsetTests.ChangeInsetWithoutAutomaticAdjustmentWhileWebProcessIsUnresponsive |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| * UIProcess/ios/WKScrollView.mm: |
| (-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]): |
| |
| Also, split out the `CGSizeEqualToSize(currentContentSize, contentSize)` case into a separate early return that |
| skips the call to `-setContentSize:` altogether. |
| |
| 2020-06-08 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove -respondsToSelector: check before calling -[PKPaymentRequest setBoundInterfaceIdentifier:] |
| https://bugs.webkit.org/show_bug.cgi?id=212884 |
| <rdar://problem/64090963> |
| |
| Reviewed by Youenn Fablet. |
| |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Relied on the definition of |
| HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER to ensure that PKPaymentRequest will respond to |
| -setBoundInterfaceIdentifier:. |
| |
| 2020-06-08 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP |
| https://bugs.webkit.org/show_bug.cgi?id=212883 |
| <rdar://problem/64090763> |
| |
| Reviewed by Youenn Fablet. |
| |
| These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by |
| trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY). |
| |
| * Shared/ApplePay/ApplePayPaymentSetupFeatures.mm: |
| * Shared/ApplePay/ApplePayPaymentSetupFeaturesWebKit.h: |
| * Shared/ApplePay/PaymentSetupConfiguration.mm: |
| * Shared/ApplePay/PaymentSetupConfigurationWebKit.h: |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.h: |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| * WebProcess/ApplePay/WebPaymentCoordinator.cpp: |
| * WebProcess/ApplePay/WebPaymentCoordinator.h: |
| |
| 2020-06-08 youenn fablet <youenn@apple.com> |
| |
| [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| <rdar://problem/58985368> |
| |
| Reviewed by Eric Carlson. |
| |
| Enable RemoteMediaRecorder only for systems supporting AVAssetWriterDelegate. |
| |
| * GPUProcess/GPUConnectionToWebProcess.cpp: |
| (WebKit::GPUConnectionToWebProcess::didReceiveMessage): |
| * GPUProcess/GPUConnectionToWebProcess.h: |
| * GPUProcess/webrtc/RemoteMediaRecorder.cpp: |
| * GPUProcess/webrtc/RemoteMediaRecorder.h: |
| * GPUProcess/webrtc/RemoteMediaRecorder.messages.in: |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.h: |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: |
| * WebProcess/GPU/webrtc/MediaRecorderProvider.cpp: |
| (WebKit::MediaRecorderProvider::createMediaRecorderPrivate): |
| |
| 2020-06-07 Lauro Moura <lmoura@igalia.com> |
| |
| [WebDriver] Allow platform-dependent modifier keys conversion to WebEvent::Modifier |
| https://bugs.webkit.org/show_bug.cgi?id=212848 |
| |
| Reviewed by Brian Burg. |
| |
| WebEvent::Modifier flags does not map directly to the platform flags, |
| so we can't directly convert the modifier flags to the OptionSet. |
| |
| Covered by existing WebDriver tests. |
| |
| * UIProcess/Automation/WebAutomationSession.cpp: |
| (WebKit::WebAutomationSession::simulateMouseInteraction): Use |
| platform-specific method to convert the modifiers. |
| * UIProcess/Automation/WebAutomationSession.h: |
| * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: Added |
| conversion from GDK modifier mask to WebEvent::Modifier. |
| (WebKit::WebAutomationSession::platformWebModifiersFromRaw): |
| * UIProcess/Automation/mac/WebAutomationSessionMac.mm: Added |
| conversion from NSModifierFlag to WebEvent::Modifier. |
| (WebKit::WebAutomationSession::platformWebModifiersFromRaw): |
| * UIProcess/Automation/wpe/WebAutomationSessionWPE.cpp: Added |
| conversion from wpe_input_keyboard_modifier to WebEvent::Modifier. |
| (WebKit::WebAutomationSession::platformWebModifiersFromRaw): |
| |
| 2020-06-07 Lauro Moura <lmoura@igalia.com> |
| |
| [WPE] Behave like GDK_CURRENT_TIME when the timestamp is zero |
| https://bugs.webkit.org/show_bug.cgi?id=212797 |
| |
| WebDriver tests come with zero timestamp. So behave like |
| GDK_CURRENT_TIME and assume zero timestamp == WallTime::now(). |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Covered by existing tests. |
| |
| * Shared/libwpe/WebEventFactory.cpp: |
| (WebKit::wallTimeForEventTime): |
| |
| 2020-06-07 Philippe Normand <pnormand@igalia.com> |
| |
| Remove ENABLE_VIDEO_TRACK ifdef guards |
| https://bugs.webkit.org/show_bug.cgi?id=212568 |
| |
| Reviewed by Youenn Fablet. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * GPUProcess/GPUConnectionToWebProcess.cpp: |
| (WebKit::GPUConnectionToWebProcess::dispatchMessage): |
| * GPUProcess/GPUConnectionToWebProcess.h: |
| * GPUProcess/media/RemoteMediaPlayerProxy.cpp: |
| (WebKit::RemoteMediaPlayerProxy::textTrackSetMode): |
| (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): |
| * GPUProcess/media/RemoteMediaPlayerProxy.h: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.h: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.messages.in: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.messages.in: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in: |
| * Shared/WebPreferences.yaml: |
| * WebProcess/GPU/GPUProcessConnection.cpp: |
| (WebKit::GPUProcessConnection::dispatchMessage): |
| * WebProcess/GPU/GPUProcessConnection.h: |
| * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: |
| (WebKit::MediaPlayerPrivateRemote::tracksChanged): |
| * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: |
| * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: |
| (WebKit::RemoteMediaPlayerManager::updatePreferences): |
| * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp: |
| * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h: |
| * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: |
| * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h: |
| * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in: |
| * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: |
| * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h: |
| * WebProcess/InjectedBundle/InjectedBundle.cpp: |
| (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::maximumBufferingTime): |
| |
| 2020-06-06 Simon Fraser <simon.fraser@apple.com> |
| |
| Clear WebPageProxy event state between tests |
| https://bugs.webkit.org/show_bug.cgi?id=212864 |
| |
| Reviewed by Anders Carlsson. |
| |
| Make sure that event state doesn't leak between tests via events queued in WebPageProxy. |
| |
| * UIProcess/API/C/WKPage.cpp: |
| (WKPageClearEventState): |
| * UIProcess/API/C/WKPage.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::resetStateAfterProcessExited): |
| (WebKit::WebPageProxy::clearEventState): |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-06-06 Rob Buis <rbuis@igalia.com> |
| |
| Move URL scheme check to NetworkLoadChecker |
| https://bugs.webkit.org/show_bug.cgi?id=191924 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Reduce includes for CustomHeaderFields, I guess these were needed |
| at some point but not anymore. |
| |
| * Shared/WebsitePoliciesData.cpp: |
| |
| 2020-06-06 David Kilzer <ddkilzer@apple.com> |
| |
| Use OptionSet<DragOperation> for mask values |
| <https://webkit.org/b/212605> |
| |
| Reviewed by Darin Adler. |
| |
| In broad strokes: |
| - Replace use of DragOperation with OptionSet<DragOperation> or |
| Optional<DragOperation>. |
| - Rename function parameters and local variables to denote use |
| of mask values. |
| - Remove DragOperationNone enum value. |
| - Replace DragOperationEvery enum value with anyDragOperation(). |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| (UIDragOperation): |
| - Remove unused (and misnamed) UIDragOperation enum typedef. |
| * Scripts/webkit/messages.py: |
| (types_that_cannot_be_forward_declared): |
| (headers_for_type): |
| - Add support for WebCore::DragOperation enum. |
| * Shared/API/Cocoa/_WKDragActionsInternal.h: |
| (WebKit::coreDragOperationMask): Add conversion function. |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<DragData>::encode): |
| (IPC::ArgumentCoder<DragData>::decode): |
| - Update to encode/decode OptionSet<DragOperation>. |
| |
| * UIProcess/API/gtk/DragSource.h: |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DragSourceGtk3.cpp: |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DragSourceGtk4.cpp: |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DropTarget.h: |
| * UIProcess/API/gtk/DropTargetGtk3.cpp: |
| (WebKit::DropTarget::didPerformAction): |
| (WebKit::DropTarget::leaveTimerFired): |
| * UIProcess/API/gtk/DropTargetGtk4.cpp: |
| (WebKit::DropTarget::DropTarget): |
| (WebKit::DropTarget::didPerformAction): |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::startDrag): |
| * UIProcess/API/gtk/PageClientImpl.h: |
| (WebKit::PageClientImpl::startDrag): |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseStartDrag): |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| (webkitWebViewBaseStartDrag): |
| |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::sendDragEndToPage): |
| (WebKit::WebViewImpl::draggingEntered): |
| (WebKit::kit): Add conversion function. |
| (WebKit::WebViewImpl::draggingUpdated): |
| (WebKit::WebViewImpl::draggingExited): |
| (WebKit::WebViewImpl::performDragOperation): |
| - Make use of coreDragOperationMask() conversion function. |
| * UIProcess/PageClient.h: |
| (WebKit::WebViewImpl::startDrag): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didPerformDragControllerAction): |
| - Remove MESSAGE_CHECK now that we're using the actual type. |
| (WebKit::WebPageProxy::startDrag): |
| (WebKit::WebPageProxy::dragEnded): |
| (WebKit::WebPageProxy::resetCurrentDragInformation): |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::didPerformDragControllerAction): |
| (WebKit::WebPageProxy::dragEnded): |
| (WebKit::WebPageProxy::startDrag): |
| (WebKit::WebPageProxy::currentDragOperation const): |
| * UIProcess/WebPageProxy.messages.in: |
| (WebPageProxy::DidPerformDragControllerAction): |
| (WebPageProxy::StartDrag): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _didHandleDragStartRequest:]): |
| (dropOperationForWebCoreDragOperation): |
| (coreDragOperationForUIDropOperation): Add conversion function. |
| - Note that this was not being converted from UIDropOperation to |
| WebCore::DragOperation previously, and UIDropOperationMove |
| (0x3) was not being properly converted to DragOperationMove |
| (0x16). |
| (-[WKContentView dragDataForDropSession:dragDestinationAction:]): |
| (-[WKContentView _didPerformDragOperation:]): |
| (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]): |
| (-[WKContentView dragInteraction:session:didEndWithOperation:]): |
| (-[WKContentView dropInteraction:sessionDidEnd:]): |
| * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: |
| (WebKit::WebDragClient::startDrag): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::performDragControllerAction): |
| (WebKit::WebPage::dragEnded): |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::performDragControllerAction): |
| (WebKit::WebPage::dragEnded): |
| * WebProcess/WebPage/WebPage.messages.in: |
| (WebPage::PerformDragControllerAction): |
| (WebPage::DragEnded): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::requestAdditionalItemsForDragSession): |
| |
| 2020-06-06 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: unify the naming scheme for agents used by instrumentation |
| https://bugs.webkit.org/show_bug.cgi?id=212859 |
| |
| Reviewed by Timothy Hatcher. |
| |
| Inspector agents fall into one of three categories: |
| - "persistent" when Web Inspector is connected |
| - "enabled" when that agent is `enable`d, such as if the corresponding tab is visible |
| - "tracking" when that agent is part of a timeline recording. |
| |
| The only exception to this is the Console agent, as that exists regardless of whether Web |
| Inspector is connected as it needs to preserve messages logged before Web Inspector connects. |
| |
| Also remove the "Inspector" prefix from getter/setter methods as it adds confusion if that |
| agent also has subclasses (e.g. `InspectorRuntimeAgent` and `PageRuntimeAgent`). |
| |
| * UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp: |
| * UIProcess/Inspector/WebInspectorProxy.cpp: |
| * UIProcess/Inspector/WebPageInspectorController.h: |
| Simple naming changes elided to avoid a long ChangeLog. |
| |
| 2020-06-05 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for AutocapitalizeType |
| <https://webkit.org/b/212846> |
| <rdar://problem/64042825> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Move AutocapitalizeType into WebCore namespace. |
| - Convert AutocapitalizeType to an enum class. |
| - Add WTF::EnumTraits<AutocapitalizeType> for IPC. |
| |
| * Shared/FocusedElementInformation.cpp: |
| (WebKit::FocusedElementInformation::encode const): |
| (WebKit::FocusedElementInformation::decode): |
| - Stop using decodeEnum() and encodeEnum() now that |
| WTF::EnumTraits<AutocapitalizeType> exists. |
| * Shared/FocusedElementInformation.h: |
| * Shared/glib/InputMethodState.cpp: |
| (WebKit::InputMethodState::addHintsForAutocapitalizeType): |
| * Shared/glib/InputMethodState.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (toUITextAutocapitalize): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::getFocusedElementInformation): |
| |
| 2020-06-05 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS] Silence telemetry generated during download operations |
| https://bugs.webkit.org/show_bug.cgi?id=212854 |
| <rdar://problem/63909414> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Remove reporting and telemetry for the 'com.apple.ProgressReporting' service |
| from the Network Process sandbox, since this is a critical part of supplying |
| download status to the WebKit UI. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: |
| |
| 2020-06-05 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r262619, r262625, and r262641. |
| |
| Caused mediarecorder layout test crashes. |
| |
| Reverted changesets: |
| |
| "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder" |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| https://trac.webkit.org/changeset/262619 |
| |
| "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder" |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| https://trac.webkit.org/changeset/262625 |
| |
| "Unreviewed, silence deprecation warning to fix build with |
| latest SDK." |
| https://trac.webkit.org/changeset/262641 |
| |
| 2020-06-05 Kate Cheney <katherine_cheney@apple.com> |
| |
| ITP SQLite Database should only vacuum once per day |
| https://bugs.webkit.org/show_bug.cgi?id=212712 |
| <rdar://problem/63939711> |
| |
| Reviewed by Brent Fulgham. |
| |
| Followup to https://trac.webkit.org/changeset/262538/webkit. We should |
| run incremental auto vacuum, not a full vacuum, once per-day, because |
| it is less expensive. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::performDailyTasks): |
| |
| 2020-06-05 Daniel Bates <dabates@apple.com> |
| |
| -_focusTextInputContext should reposition the caret if called for an already focused text input context |
| https://bugs.webkit.org/show_bug.cgi?id=212830 |
| <rdar://problem/64032956> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Update the code based on new feedback: the caret should now be re-positioned when -_focusTextInputContext |
| is called on an already assisted text input context. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView cleanUpInteraction]): |
| (-[WKContentView _didCommitLoadForMainFrame]): Reset state. See below for why. |
| |
| (-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): I cannot simply remove the early |
| return in -_focusTextInputContext that detects if the specified text input context is already focused because |
| it could effect user-visible responsiveness due to an Apple internal client invoking this function more times |
| than necessary with the same point during a text interaction. See <rdar://problem/59430806>. That radar |
| represents a correctness issue. I didn't actually evaluate whether responsiveness is affected by this patch, |
| but I would feel more confident that there would be 0 impact when removing the early branch after that radar |
| is fixed without the need to even perform a responsiveness analysis. Note that there is already a comment about |
| that radar at the top of this function. |
| |
| 2020-06-05 Alex Christensen <achristensen@webkit.org> |
| |
| Fix PDF opening after r262592 |
| https://bugs.webkit.org/show_bug.cgi?id=212795 |
| |
| * UIProcess/mac/WebPageProxyMac.mm: |
| (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): |
| (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): |
| As Darin mentioned and I was about to discover, my last-minute switching things around got the boolean condition backwards. |
| We want to do nothing if we're not allowed to open the PDF, and we want to open the PDF if we are allowed to.s |
| |
| 2020-06-05 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for PluginLoadClientPolicy |
| <https://webkit.org/b/212827> |
| <rdar://problem/64030431> |
| |
| Reviewed by Alex Christensen. |
| |
| Summary: |
| - Update for renamed PluginLoadClientPolicy enums. |
| - Update to make PluginLoadClientPolicy type work with IPC. |
| - Replace uint8_t with strongly-typed PluginLoadClientPolicy. |
| |
| * Scripts/webkit/messages.py: |
| * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: |
| (WebKit::NetscapePluginModule::getPluginInfo): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/API/C/WKAPICast.h: |
| (WebKit::toWKPluginLoadClientPolicy): |
| (WebKit::toPluginLoadClientPolicy): |
| * UIProcess/API/Cocoa/WKProcessPool.mm: |
| (toPluginLoadClientPoliciesHashMap): |
| (policiesHashMapToDictionary): |
| (isPluginLoadClientPolicyAcceptable): Delete. |
| - Replace with |
| WTF::isValidEnum<WebCore::PluginLoadClientPolicy>(). |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::setPluginLoadClientPolicy): |
| (WebKit::WebProcessPool::resetPluginLoadClientPolicies): |
| * UIProcess/WebProcessPool.h: |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::pluginInfo): |
| * WebProcess/Plugins/WebPluginInfoProvider.cpp: |
| (WebKit::WebPluginInfoProvider::webVisiblePluginInfo): |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::setPluginLoadClientPolicy): |
| (WebKit::WebProcess::resetPluginLoadClientPolicies): |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| |
| 2020-06-05 Alex Christensen <achristensen@webkit.org> |
| |
| Update header documentation for WKPreferences.fraudulentWebsiteWarningEnabled |
| https://bugs.webkit.org/show_bug.cgi?id=212843 |
| <rdar://problem/64010164> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * UIProcess/API/Cocoa/WKPreferences.h: |
| |
| 2020-06-05 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS] Remove message filtering telemetry for expected case |
| https://bugs.webkit.org/show_bug.cgi?id=212841 |
| <rdar://problem/63893460> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Remove unintentional telemetry being captured for expected behavior. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-06-05 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] Adopt read-only mode for preferences in the WebContent process |
| https://bugs.webkit.org/show_bug.cgi?id=212411 |
| <rdar://problem/63640788> |
| |
| Reviewed by Darin Adler. |
| |
| The WebContent process should never write preferences. Adopt read-only mode for preferences. |
| This will fix some sandbox violations when the UI process is notifying the WebContent process |
| about preference changes. When notified, the WebContent process will use the preferences API |
| to write those preferences in-process, but there should be no attempt at writing these new |
| values to disk, which this patch will ensure. |
| |
| No new tests, since this is fixing a benign sandbox violation. |
| |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::XPCServiceMain): |
| |
| 2020-06-05 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Fix message filter sandbox violation |
| https://bugs.webkit.org/show_bug.cgi?id=212837 |
| <rdar://problem/63830368> |
| |
| Reviewed by Darin Adler. |
| |
| Add required message to message filter in the iOS WebContent sandbox. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-06-05 Peng Liu <peng.liu6@apple.com> |
| |
| REGRESSION (r262456?): [macOS] media/picture-in-picture/picture-in-picture-api tests are flaky timeouts |
| https://bugs.webkit.org/show_bug.cgi?id=212762 |
| |
| Reviewed by Eric Carlson. |
| |
| The Picture-in-Picture implementation expects the two callbacks HTMLVideoElement::didBecomeFullscreenElement() |
| and HTMLVideoElement::setVideoFullscreenFrame() to come in order. So we need to remove the dispatch_async() |
| and call HTMLVideoElement::didBecomeFullscreenElement() directly. |
| |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenManager::didEnterFullscreen): |
| |
| 2020-06-05 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes, early summer 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=212819 |
| |
| Unreviewed build fix. |
| |
| * Shared/gtk/NativeWebMouseEventGtk.cpp: |
| (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Add missing WebCore:: namespace to |
| a couple of uses of WebCore::FloatSize. |
| * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: Add missing Logging.h header. |
| |
| 2020-06-05 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove conditionals for ENABLE_APPLE_PAY_SESSION_V(3|4) |
| https://bugs.webkit.org/show_bug.cgi?id=212541 |
| <rdar://problem/63781452> |
| |
| Reviewed by Darin Adler. |
| |
| APPLE_PAY_SESSION_V(3|4) is now enabled whenever APPLE_PAY itself is enabled. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2020-06-05 youenn fablet <youenn@apple.com> |
| |
| [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| <rdar://problem/58985368> |
| |
| Reviewed by Eric Carlson. |
| |
| Enable RemoteMediaRecorder only for systems supporting AVAssetWriterDelegate. |
| |
| * GPUProcess/GPUConnectionToWebProcess.cpp: |
| (WebKit::GPUConnectionToWebProcess::didReceiveMessage): |
| * GPUProcess/GPUConnectionToWebProcess.h: |
| * GPUProcess/webrtc/RemoteMediaRecorder.cpp: |
| * GPUProcess/webrtc/RemoteMediaRecorder.h: |
| * GPUProcess/webrtc/RemoteMediaRecorder.messages.in: |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.h: |
| * GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in: |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: |
| * WebProcess/GPU/webrtc/MediaRecorderProvider.cpp: |
| (WebKit::MediaRecorderProvider::createMediaRecorderPrivate): |
| |
| 2020-06-05 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r262184): [GTK] Two fast/forms tests are crashing |
| https://bugs.webkit.org/show_bug.cgi?id=212747 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| (WebKit::WebPopupMenuProxyGtk::handleKeyPress): Return early if the menu has already been closed. |
| |
| 2020-06-05 Youenn Fablet <youenn@apple.com> |
| |
| Generate code to set the runtime settings for a service worker process |
| https://bugs.webkit.org/show_bug.cgi?id=212467 |
| |
| Reviewed by Alex Christensen. |
| |
| Split the code generated to handle web preference changes to have one method for process wide flags and one for page settings. |
| Make the process wide flag method static and reuse it in WebSWContextManagerConnection. |
| Covered by existing tests. |
| |
| * Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb: |
| * WebProcess/Storage/WebSWContextManagerConnection.cpp: |
| (WebKit::WebSWContextManagerConnection::updatePreferencesStore): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::updatePreferences): |
| * WebProcess/WebPage/WebPage.h: |
| |
| 2020-06-04 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for PluginProcessType and PluginProcessSandboxPolicy |
| <https://webkit.org/b/212758> |
| |
| Reviewed by Darin Adler. |
| |
| * PluginProcess/mac/PluginProcessMac.mm: |
| (WebKit::PluginProcess::platformInitializePluginProcess): |
| * Scripts/webkit/messages.py: |
| * Shared/Plugins/PluginProcessAttributes.h: |
| (WebKit::PluginProcessType): Convert to enum class. |
| (WebKit::PluginProcessSandboxPolicy): Ditto. |
| * UIProcess/Plugins/PluginProcessManager.cpp: |
| (WebKit::PluginProcessManager::fetchWebsiteData): |
| (WebKit::PluginProcessManager::deleteWebsiteData): |
| (WebKit::PluginProcessManager::deleteWebsiteDataForHostNames): |
| * UIProcess/Plugins/PluginProcessProxy.cpp: |
| (WebKit::PluginProcessProxy::didFinishLaunching): |
| * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: |
| (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::findPlugin): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::createPlugin): |
| (WebKit::WebPage::canPluginHandleResponse): |
| |
| 2020-06-04 Alex Christensen <achristensen@webkit.org> |
| |
| Add WKUIDelegate SPI to confirm before opening a PDF |
| https://bugs.webkit.org/show_bug.cgi?id=212795 |
| <rdar://problem/58715847> |
| |
| Reviewed by Tim Horton. |
| |
| * UIProcess/API/APIUIClient.h: |
| (API::UIClient::confirmPDFOpening): |
| * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: |
| * UIProcess/Cocoa/UIDelegate.h: |
| * UIProcess/Cocoa/UIDelegate.mm: |
| (WebKit::UIDelegate::setDelegate): |
| (WebKit::UIDelegate::UIClient::confirmPDFOpening): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): |
| (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): |
| * UIProcess/mac/WebPageProxyMac.mm: |
| (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): |
| (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::openWithNativeApplication): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::savePDFToTemporaryFolderAndOpenWithNativeApplication): |
| * WebProcess/WebPage/WebPage.h: |
| |
| 2020-06-04 Chris Dumez <cdumez@apple.com> |
| |
| UIProcess may crash after its prewarmed WebProcess gets terminated |
| https://bugs.webkit.org/show_bug.cgi?id=212790 |
| <rdar://problem/63696191> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Query WebProcessProxy::isDummyProcessProxy() because trying to look up the process |
| in m_dummyProcessProxies. The key for m_dummyProcessProxies is a sessionID but |
| not all processes have a sessionID. In particular, prewarmed web processes have |
| no associated WebsiteDataStore and thus not sessionID. |
| |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::disconnectProcess): |
| |
| 2020-06-04 Brent Fulgham <bfulgham@apple.com> |
| |
| Reduce telemetry and report generation for WebContent Process sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=212779 |
| <rdar://problem/63769879> |
| |
| Reviewed by Per Arne Vollan. |
| |
| This patch cleans up a set of telemetry and reports generated during normal |
| WebKit operation. Now that we understand the uses of these XPC services, we |
| can reduce the logging traffic. |
| |
| This is important to do now, since generating the telemetry and reports has |
| a non-zero power cost. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-04 Jiewen Tan <jiewen_tan@apple.com> |
| |
| Disable CFNetwork AppSSO interception for Mac Catalyst |
| https://bugs.webkit.org/show_bug.cgi?id=212787 |
| <rdar://problem/63738783> |
| |
| Reviewed by Chris Dumez. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| |
| 2020-06-04 Brent Fulgham <bfulgham@apple.com> |
| |
| Reduce telemetry and report generation for Network Process sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=212778 |
| <rdar://problem/63891745> |
| |
| Reviewed by Per Arne Vollan. |
| |
| This patch cleans up a set of telemetry and reports generated during normal |
| WebKit operation. Now that we understand the uses of these XPC services, we |
| can reduce the logging traffic. |
| |
| This is important to do now, since telemetry and report generation has |
| battery life and performance impact. |
| |
| * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: |
| |
| 2020-06-04 Jacob Uphoff <jacob_uphoff@apple.com> |
| |
| Unreviewed, reverting r262546. |
| |
| This commit caused internal build failures |
| |
| Reverted changeset: |
| |
| "[Cocoa] Adopt read-only mode for preferences in the |
| WebContent process" |
| https://bugs.webkit.org/show_bug.cgi?id=212411 |
| https://trac.webkit.org/changeset/262546 |
| |
| 2020-06-04 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Drop DependentProcessLink ProcessAssertion as it creates power leaks |
| https://bugs.webkit.org/show_bug.cgi?id=212768 |
| <rdar://problem/62408828> |
| |
| Reviewed by Alex Christensen. |
| |
| Drop DependentProcessLink ProcessAssertion since it creates a process assertion cycle between |
| the UIProcess and the WebContent process and leads to power leaks. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * UIProcess/ProcessAssertion.h: |
| * UIProcess/ProcessThrottler.cpp: |
| (WebKit::ProcessThrottler::assertionName const): |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::didSetAssertionType): |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::runningBoardNameForAssertionType): |
| (WebKit::flagsForAssertionType): |
| (WebKit::toBKSProcessAssertionReason): |
| * WebProcess/WebProcess.h: |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-06-04 Brent Fulgham <bfulgham@apple.com> |
| |
| Revise sandbox to support network stack telemetry without sandbox violation reports |
| https://bugs.webkit.org/show_bug.cgi?id=212720 |
| <rdar://problem/63895783> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Telemetry captured for various networking configurations has revealed a handful of mach service |
| connections that should be allowed in the Network Process to support troubleshooting and field diagnostics. |
| |
| This patch revises the sandbox to avoid logging these accesses during normal operation. |
| |
| * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Do not generate traces for 'com.apple.diagnosticd'. |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Ditto. |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Allow 'com.apple.osanalytics.osanalyticshelper' to |
| be used on internal development builds. |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): Update to handle both 'diagnosticd' and 'osanalyticshelper' |
| as optional services for internal builds. |
| (WebKit::WebProcessCreationParameters::decode): Ditto. |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::diagnosticServices): Ditto. |
| (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto. |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): Ditto. |
| |
| 2020-06-04 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] Adopt read-only mode for preferences in the WebContent process |
| https://bugs.webkit.org/show_bug.cgi?id=212411 |
| <rdar://problem/63640788> |
| |
| Reviewed by Darin Adler. |
| |
| The WebContent process should never write preferences. Adopt read-only mode for preferences. |
| This will fix some sandbox violations when the UI process is notifying the WebContent process |
| about preference changes. When notified, the WebContent process will use the preferences API |
| to write those preferences in-process, but there should be no attempt at writing these new |
| values to disk, which this patch will ensure. |
| |
| No new tests, since this is fixing a benign sandbox violation. |
| |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::XPCServiceMain): |
| |
| 2020-06-04 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] The WebContent process should be allowed to consume an extension to the runningboard service |
| https://bugs.webkit.org/show_bug.cgi?id=212753 |
| <rdar://problem/63948859> |
| |
| Reviewed by Chris Dumez. |
| |
| The WebContent process on iOS is failing to consume an extension to the runningboard service, because it is not allowed to do so. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-06-04 Tim Horton <timothy_horton@apple.com> |
| |
| Work around broken system version macro |
| https://bugs.webkit.org/show_bug.cgi?id=212726 |
| |
| Reviewed by Dan Bernstein. |
| |
| * Configurations/DebugRelease.xcconfig: |
| |
| 2020-06-04 Andy Estes <aestes@apple.com> |
| |
| [watchOS] Re-enable content filtering in the simulator build |
| https://bugs.webkit.org/show_bug.cgi?id=212711 |
| <rdar://problem/63938350> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2020-06-04 Kate Cheney <katherine_cheney@apple.com> |
| |
| ITP SQLite Database should only vacuum once per day |
| https://bugs.webkit.org/show_bug.cgi?id=212712 |
| <rdar://problem/63939711> |
| |
| Reviewed by Brent Fulgham. |
| |
| Currently the SQLite Database runs a vacuum command each time statistics |
| are processed. This is probably too frequent, because the database |
| rarely needs to delete large amounts of data. We can cut this down to once a day. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::performDailyTasks): |
| |
| 2020-06-04 Youenn Fablet <youenn@apple.com> |
| |
| Minor optimisation to RemoteAudioBusData::decode |
| https://bugs.webkit.org/show_bug.cgi?id=212692 |
| |
| Reviewed by Eric Carlson. |
| |
| * WebProcess/GPU/media/RemoteAudioBusData.h: |
| (WebKit::RemoteAudioBusData::decode): |
| Use releaseNonNull to remove some count churn. |
| |
| 2020-06-03 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [watchOS] fast/events/watchos/change-focus-during-change-event.html crashes |
| https://bugs.webkit.org/show_bug.cgi?id=212722 |
| <rdar://problem/60633339> |
| |
| Reviewed by Andy Estes. |
| |
| When HAVE(QUICKBOARD_COLLECTION_VIEWS) is enabled, the codepath that's used to simulate interacting with the |
| select menu view controller on watchOS will crash, since it tries to pretend that the user has selected an item |
| in a table view section (`PUICQuickboardListSectionTextOptions`) that only exists when Quickboard collection |
| views are disabled. Fix the crash by adjusting the testing codepath to select the item in the first section when |
| HAVE(QUICKBOARD_COLLECTION_VIEWS) is defined. |
| |
| * UIProcess/ios/forms/WKSelectMenuListViewController.mm: |
| (-[WKSelectMenuListViewController selectItemAtIndex:]): |
| |
| 2020-06-03 Jer Noble <jer.noble@apple.com> |
| |
| [iOS] Hide the PiP button in fullscreen mode if PiP is disabled in preferences |
| https://bugs.webkit.org/show_bug.cgi?id=212699 |
| <rdar://problem/60391437> |
| |
| Reviewed by Eric Carlson. |
| |
| In r260474, we hid the PiP button in fullscreen when PiP was unsupported on the |
| current device; we must also hide the PiP button when clients have disabled PiP |
| via preferences. |
| |
| * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: |
| (-[WKFullScreenViewController videoControlsManagerDidChange]): |
| |
| 2020-06-03 Kate Cheney <katherine_cheney@apple.com> |
| |
| Any active sqlite transactions for the ITP database should be aborted when the network process suspends. |
| https://bugs.webkit.org/show_bug.cgi?id=212608 |
| <rdar://problem/60540768> |
| |
| Reviewed by Chris Dumez. |
| |
| Calls to WebResourceLoadStatisticsStore::suspend() should abort any |
| active SQLite transactions. Unfinished transactions will hold the lock |
| of a database file and could cause the network process to crash when |
| suspending. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::~ResourceLoadStatisticsDatabaseStore): |
| Store all ResourceLoadStatisticsDatabaseStore instances in a static |
| HashSet so existing transactions can be aborted when the process is |
| preparing to suspend. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::interrupt): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::suspend): |
| |
| 2020-06-03 Chris Dumez <cdumez@apple.com> |
| |
| WebProcessPool::notifyPreferencesChanged() is unsafely called on a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=212697 |
| <rdar://problem/63876652> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Make sure we dispatch to the main thread in [WKPreferenceObserver preferenceDidChange] before |
| we iterate over the process pools and call WebProcessPool::notifyPreferencesChanged() on each |
| one. |
| |
| * UIProcess/Cocoa/PreferenceObserver.mm: |
| (-[WKPreferenceObserver preferenceDidChange:key:encodedValue:]): |
| |
| 2020-06-03 Brent Fulgham <bfulgham@apple.com> |
| |
| [iOS] Reduce sandbox logging by permitting necessary sysctl |
| https://bugs.webkit.org/show_bug.cgi?id=212710 |
| <rdar://problem/63900239> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Telemetry indicates that we need to access "sysctl.name2oid" in the |
| Network process during error handling for HTTP connections. Allow this |
| access and avoid generating unnecessary logging for this case. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: |
| |
| 2020-06-03 Youenn Fablet <youenn@apple.com> |
| |
| Add more logging related to service worker fetch event handling |
| https://bugs.webkit.org/show_bug.cgi?id=212632 |
| <rdar://problem/63913271> |
| |
| Unreviewed. |
| Build fix. |
| |
| * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: |
| (WebKit::WebServiceWorkerFetchTaskClient::continueDidReceiveResponse): |
| |
| 2020-06-03 Alex Christensen <achristensen@webkit.org> |
| |
| Pass WebPageProxyIdentifier to PreconnectTask |
| https://bugs.webkit.org/show_bug.cgi?id=212648 |
| |
| Reviewed by Chris Dumez. |
| |
| Otherwise, AuthenticationManager::didReceiveAuthenticationChallenge sometimes returned early because there was no pageID. |
| Observed connecting to real websites from my home wifi. Unable to test using local servers because connecting happens too fast. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::preconnectTo): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::preconnectTo): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::preconnectTo): |
| |
| 2020-06-03 Rob Buis <rbuis@igalia.com> |
| |
| Make generated C++ code use modern C++ |
| https://bugs.webkit.org/show_bug.cgi?id=190714 |
| |
| Reviewed by Jonathan Bedard. |
| |
| Replace typedef usage by alias-declaration. |
| |
| * Scripts/test-legacyMessages.h: |
| * Scripts/test-superclassMessages.h: |
| * Scripts/testMessages.h: |
| * Scripts/webkit/messages.py: |
| |
| 2020-06-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] WTR: Forward key events to the active popup menu |
| https://bugs.webkit.org/show_bug.cgi?id=212690 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| I forgot to remove the ifdefs when added support for popup menus in r262414. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSynthesizeKeyEvent): |
| |
| 2020-06-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Fix input methods |
| https://bugs.webkit.org/show_bug.cgi?id=212317 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Stop using GdkEvent to synthesize compositing events, add a specific NativeWebKeyboardEvent constructor for them. |
| |
| * Shared/NativeWebKeyboardEvent.h: |
| * Shared/gtk/NativeWebKeyboardEventGtk.cpp: |
| (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): |
| * UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp: |
| (webkitInputMethodContextImplGtkSetClientWidget): |
| (webkitInputMethodContextImplGtkSetClientWindow): Deleted. |
| * UIProcess/API/gtk/WebKitInputMethodContextImplGtk.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseRealize): |
| (webkitWebViewBaseUnrealize): |
| (webkitWebViewBaseKeyPressEvent): |
| (webkitWebViewBaseKeyReleaseEvent): |
| (webkitWebViewBaseFocusEnter): |
| (webkitWebViewBaseFocusLeave): |
| (webkitWebViewBaseKeyPressed): |
| (webkitWebViewBaseKeyReleased): |
| (toplevelWindowIsActiveChanged): |
| (webkitWebViewBaseSynthesizeCompositionKeyPress): |
| |
| 2020-06-03 Santosh Mahto <santosh.mahto@collabora.com> |
| |
| [GTK4] Implement file chooser |
| https://bugs.webkit.org/show_bug.cgi?id=212322 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Port FileChooser to gtk4, Now FileChooser uses undeprecated api's. |
| Covered by existing tests. |
| |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| (fileChooserDialogResponseCallback): |
| (webkitWebViewRunFileChooser): |
| |
| 2020-06-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Implement emoji chooser |
| https://bugs.webkit.org/show_bug.cgi?id=212330 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| GtkEmojiChooser is public API in GTK4, so just use that instead of our own. |
| |
| * UIProcess/API/gtk/WebKitEmojiChooser.cpp: |
| (emojiActivated): Close the popover before emitting emoji-picked for consistency with GTK. |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate): |
| (_WebKitWebViewBasePrivate::releaseEmojiChooserTimerFired): |
| (webkitWebViewBaseDispose): |
| (emojiChooserClosed): |
| (webkitWebViewBaseShowEmojiChooser): |
| |
| 2020-06-03 Youenn Fablet <youenn@apple.com> |
| |
| Add more logging related to service worker fetch event handling |
| https://bugs.webkit.org/show_bug.cgi?id=212632 |
| |
| Reviewed by Chris Dumez. |
| |
| Add logging to identify the page ID and frame ID used by a service worker. |
| Add logging to identify what is happening in the case of a response being buffered for navigation purposes. |
| |
| * WebProcess/Storage/WebSWContextManagerConnection.cpp: |
| (WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient): |
| (WebKit::WebSWContextManagerConnection::installServiceWorker): |
| (WebKit::WebSWContextManagerConnection::continueDidReceiveFetchResponse): |
| * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: |
| (WebKit::WebServiceWorkerFetchTaskClient::didFail): |
| (WebKit::WebServiceWorkerFetchTaskClient::didFinish): |
| (WebKit::WebServiceWorkerFetchTaskClient::continueDidReceiveResponse): |
| |
| 2020-06-02 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] WKProcessAssertionBackgroundTaskManager incorrectly ignores expiration notifications for daemons |
| https://bugs.webkit.org/show_bug.cgi?id=212619 |
| |
| Reviewed by Alex Christensen. |
| |
| WKProcessAssertionBackgroundTaskManager was incorrectly ignoring process assertion expiration notifications |
| for daemons, because it was relying on visibility to make decisions. For daemons (or ViewServices), we would |
| not get application visibility notifications and would therefore always assume the app is visible. |
| As a result, _handleBackgroundTaskExpiration would think it received an outdated expiration notification for |
| a visible app and would simply re-take the assertion right away. |
| |
| To address the issue, we now rely on a RunningBoard API that lets us know if the suspension timer has been |
| started or not (and how much remains on the timer). If the suspension timer is not active when get receive |
| the expiration notification, we know it is an outdated notification and we ignore it (release and re-take |
| assertion right away). This can happen if we did not have time to process the expiration notification before |
| suspended and thus only get it upon resuming. It can also happen if the user re-activates the app right after |
| the expiration notice has been sent. |
| |
| * Platform/spi/ios/RunningBoardServicesSPI.h: |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (processHasActiveRunTimeLimitation): |
| (-[WKProcessAssertionBackgroundTaskManager init]): |
| (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): |
| (-[WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpiration]): |
| (-[WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpirationOnMainThread]): |
| (-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]): |
| |
| 2020-06-02 Christopher Reid <chris.reid@sony.com> |
| |
| REGRESSION[r260844]: [GTK][WPE] Inspector GResource no longer updated after WebInspectorUI file updates |
| https://bugs.webkit.org/show_bug.cgi?id=212583 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add a cmake dependency on inspector resource stamp so the Glib |
| Inspector resources rebuild when the stamp is updated. |
| |
| * InspectorGResources.cmake: |
| |
| 2020-06-02 Keith Rollin <krollin@apple.com> |
| |
| Revert FEATURES_DEFINES related changes |
| https://bugs.webkit.org/show_bug.cgi?id=212664 |
| <rdar://problem/63893033> |
| |
| Reviewed by Andy Estes. |
| |
| Bug 262310, Bug 262311, Bug 262318, and Bug 262331 involve changes to |
| FEATURE_DEFINES and how the values there relate to those found in the |
| Platform*.h files. Those changes break XCBuild (by removing the |
| .xcfilelist related to UnifiedSources and the process for generating |
| them), and so are being reverted. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2020-06-02 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r262424. |
| |
| Caused webkitpy test failure |
| |
| Reverted changeset: |
| |
| "Make generated C++ code use modern C++" |
| https://bugs.webkit.org/show_bug.cgi?id=190714 |
| https://trac.webkit.org/changeset/262424 |
| |
| 2020-06-02 Peng Liu <peng.liu6@apple.com> |
| |
| Stressing webkitSetPresentationMode leads to wrong inline video dimensions |
| https://bugs.webkit.org/show_bug.cgi?id=202425 |
| |
| Reviewed by Eric Carlson. |
| |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenManager::didEnterFullscreen): |
| (WebKit::VideoFullscreenManager::didCleanupFullscreen): |
| |
| 2020-06-02 Kate Cheney <katherine_cheney@apple.com> |
| |
| Assert network process is not suspended when trying to merge new ITP data |
| https://bugs.webkit.org/show_bug.cgi?id=212663 |
| <rdar://problem/63892899> |
| |
| Reviewed by Chris Dumez. |
| |
| Add a debug assert to check if statistics are being merged into the |
| ITP database after prepareToSuspend() has been called. If this assert |
| is hit, it means the ITP database thread is not being stopped when |
| the process is suspended. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated): |
| |
| 2020-06-02 Per Arne Vollan <pvollan@apple.com> |
| |
| REGRESSION(r261387): Introduced sandbox violations |
| https://bugs.webkit.org/show_bug.cgi?id=212634 |
| |
| Reviewed by Darin Adler. |
| |
| The change set r261387 introduced some new mach lookup sandbox violations, when attempting to close Launch Services connections that were not open. |
| Fix this by only attempting to close open connections, and do it while holding the extension to the database mapping service. |
| |
| No new tests, since this patch is fixing benign sandbox violations. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-06-02 Youenn Fablet <youenn@apple.com> |
| |
| Allow using web processes for service workers even though they loaded about URLs |
| https://bugs.webkit.org/show_bug.cgi?id=212464 |
| |
| Reviewed by Chris Dumez. |
| |
| Before the patch, a web process that loads about:blank will not be able to run service workers. |
| A web process that is running service workers and is loading an about:blank page will also kill its service workers. |
| To prevent this, do not take into account about:blank URLs for the computation of the registrable domain of a process. |
| |
| Covered by API tests. |
| |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame): |
| |
| 2020-06-02 Tim Horton <timothy_horton@apple.com> |
| |
| macCatalyst: WKWebView's tint color is not propagated to Web Content process |
| https://bugs.webkit.org/show_bug.cgi?id=212630 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPageCreationParameters.h: |
| * UIProcess/Cocoa/PageClientImplCocoa.h: |
| * UIProcess/PageClient.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::creationParameters): |
| * WebProcess/WebPage/WebPage.cpp: |
| * WebProcess/WebPage/WebPage.h: |
| |
| 2020-06-02 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r258949): Dynamic user accent color changes are not respected by WKWebView |
| https://bugs.webkit.org/show_bug.cgi?id=212628 |
| <rdar://problem/63436275> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Two issues with the "CFPrefs Direct Mode" mechanism caused dynamic changes to the |
| user accent color preference to not be respected anymore: |
| |
| - the default change, when synchronized to the Web Content process, was |
| written into the wrong domain, because of bug 212627. |
| |
| - AppKit caches the resolved accent color; the cache is invalidated when the |
| a CoreUI notification is posted. Since we synchronize preferences ourselves, |
| the ordering of the default change and notification are no longer guaranteed, |
| so AppKit sometimes reads and re-caches the old accent color. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::userAccentColorPreferenceKey): |
| (WebKit::shouldWriteToAppDomainForPreferenceKey): |
| (WebKit::WebProcess::notifyPreferencesChanged): |
| To fix the first problem, write the default into the standardUserDefaults. |
| This is just a workaround, we need a more general solution to this problem |
| for all global preferences. We know it's OK in this case, because AppKit |
| happens to read from standardUserDefaults. |
| |
| (WebKit::dispatchSimulatedNotificationsForPreferenceChange): |
| To fix the second problem, re-emit the notification once we have synchronized |
| the preference to the Web Content process. |
| |
| 2020-06-02 Rob Buis <rbuis@igalia.com> |
| |
| Make generated C++ code use modern C++ |
| https://bugs.webkit.org/show_bug.cgi?id=190714 |
| |
| Reviewed by Sam Weinig. |
| |
| Replace typedef usage by alias-declaration. |
| |
| * Scripts/webkit/messages.py: |
| |
| 2020-06-02 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Implement data list drop down menu |
| https://bugs.webkit.org/show_bug.cgi?id=212333 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use a GtkPopover for GTK4 instead of a GtkMenu. |
| |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::createDataListSuggestionsDropdown): |
| * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: |
| (WebKit::WebDataListSuggestionsDropdownGtk::WebDataListSuggestionsDropdownGtk): |
| (WebKit::WebDataListSuggestionsDropdownGtk::~WebDataListSuggestionsDropdownGtk): |
| (WebKit::WebDataListSuggestionsDropdownGtk::show): |
| * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h: |
| |
| 2020-06-02 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make popup menus work |
| https://bugs.webkit.org/show_bug.cgi?id=211178 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use a GtkPopover for GTK4 instead of a GtkMenu. |
| |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::createPopupMenuProxy): |
| * UIProcess/API/gtk/WebKitPopupMenu.cpp: |
| (WebKit::WebKitPopupMenu::WebKitPopupMenu): |
| (WebKit::menuCloseCallback): |
| (WebKit::WebKitPopupMenu::showPopupMenu): |
| (WebKit::WebKitPopupMenu::hidePopupMenu): |
| (WebKit::WebKitPopupMenu::cancelTracking): |
| (WebKit::WebKitPopupMenu::activateItem): |
| * UIProcess/API/gtk/WebKitPopupMenu.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSizeAllocate): Iterate children and call check_resize on every native one. |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| (WebKit::WebPopupMenuProxyGtk::treeViewButtonReleaseEventCallback): |
| (WebKit::WebPopupMenuProxyGtk::createPopupMenu): |
| (WebKit::WebPopupMenuProxyGtk::showPopupMenu): |
| (WebKit::WebPopupMenuProxyGtk::hidePopupMenu): |
| (WebKit::WebPopupMenuProxyGtk::treeViewRowActivatedCallback): Deleted. |
| * UIProcess/gtk/WebPopupMenuProxyGtk.h: |
| |
| 2020-06-01 Chris Dumez <cdumez@apple.com> |
| |
| Fix thread-safety issue in [WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpiration] |
| https://bugs.webkit.org/show_bug.cgi?id=212615 |
| <rdar://problem/63569049> |
| |
| Reviewed by Geoffrey Garen. |
| |
| [WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpiration] may get called on a background thread |
| by RunningBoard. When this happened it would check the _applicationIsBackgrounded flag on a background thread, |
| which was not safe, it would also call _releaseBackgroundTask on the background thread which definitely was not |
| safe and could lead to crashes such as the one in the radar. |
| |
| To address the issue, we now call callOnMainRunLoopAndWait() as soon as _handleBackgroundTaskExpiration gets |
| called and run the whole implementation on the main thread. Previously, we were already doing a dispatch_sync() |
| to the main thread but only for part of the implementation. |
| |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (-[WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpiration]): |
| (-[WKProcessAssertionBackgroundTaskManager _handleBackgroundTaskExpirationOnMainThread]): |
| |
| 2020-06-01 Brent Fulgham <bfulgham@apple.com> |
| |
| Remove unused WebContent process sandbox syscall |
| https://bugs.webkit.org/show_bug.cgi?id=212609 |
| <rdar://problem/63764590> |
| |
| Reviewed by Per Arne Vollan. |
| |
| After further testing we have determined that the syscall added in |
| Bug 206260 is not always enabled. Check if the Sandbox recognizes |
| the rule before using it. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-06-01 David Kilzer <ddkilzer@apple.com> |
| |
| Don't use casts to convert between WebCore::DragDestinationAction and {Web,WK}DragDestinationAction types |
| <https://webkit.org/b/212507> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/API/Cocoa/_WKDragActionsInternal.h: Add. |
| (WebKit::coreDragDestinationActionMask): |
| - Add conversion function to avoid casting. |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::draggingEntered): |
| (WebKit::WebViewImpl::draggingUpdated): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView dragDataForDropSession:dragDestinationAction:]): |
| - Make use of coreDragDestinationActionMask() conversion |
| function. |
| - Extract `dragOperationMask` varible for future updates. |
| * WebKit.xcodeproj/project.pbxproj: |
| - Add _WKDragActionsInternal.h to project. |
| |
| 2020-06-01 Alex Christensen <achristensen@webkit.org> |
| |
| Fix Glib build after r262391 |
| https://bugs.webkit.org/show_bug.cgi?id=212604 |
| |
| * UIProcess/API/glib/WebKitWebContext.cpp: |
| (webkitWebContextConstructed): |
| |
| 2020-06-01 Alex Christensen <achristensen@webkit.org> |
| |
| Revert r250312 |
| https://bugs.webkit.org/show_bug.cgi?id=212604 |
| <rdar://problem/63779241> |
| |
| Reviewed by Tim Horton. |
| |
| r250312 was a step towards a network process singleton. |
| We aren't there yet, so revert it until we are. There was something trying to keep HSTS storages separate, so let them keep trying. |
| |
| * UIProcess/API/APIProcessPoolConfiguration.cpp: |
| (API::ProcessPoolConfiguration::copy): |
| * UIProcess/API/APIProcessPoolConfiguration.h: |
| * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: |
| (-[_WKProcessPoolConfiguration setHSTSStorageDirectory:]): |
| (-[_WKProcessPoolConfiguration hstsStorageDirectory]): |
| * UIProcess/LegacyGlobalSettings.h: |
| (WebKit::LegacyGlobalSettings::setHSTSStorageDirectory): Deleted. |
| (WebKit::LegacyGlobalSettings::hstsStorageDirectory const): Deleted. |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::ensureNetworkProcess): |
| |
| 2020-06-01 Chris Dumez <cdumez@apple.com> |
| |
| ASSERTION FAILURE (r220931): !m_function in ~CompletionHandler() after switch tabs |
| https://bugs.webkit.org/show_bug.cgi?id=212537 |
| <rdar://problem/63766838> |
| |
| Reviewed by Alex Christensen. |
| |
| When WebPage::markAllLayersVolatile(), it would destroy m_pageMarkingLayersAsVolatileCounter, |
| which may not have called its completion handler yet. As a result, we would hit an assertion |
| in the CompletionHandler destructor. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::callVolatilityCompletionHandlers): |
| (WebKit::WebPage::markLayersVolatile): |
| (WebKit::WebPage::cancelMarkLayersVolatile): |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::markLayersVolatile): |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::prepareToSuspend): |
| (WebKit::WebProcess::markAllLayersVolatile): |
| (WebKit::WebProcess::cancelMarkAllLayersVolatile): |
| * WebProcess/WebProcess.h: |
| |
| 2020-06-01 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Replace Color constructors taking numeric values with type specific factory functions |
| https://bugs.webkit.org/show_bug.cgi?id=212576 |
| |
| Reviewed by Tim Horton. |
| |
| Replaces all remaining implicit and explicit uses of the Color constructors taking numeric |
| values with explicit calls to makeSimpleColor/makeSimpleColorFromFloats/makeExtendedColor, |
| giving us a consistent way to create colors. Also addes use constexpr SimpleColors where possible. |
| |
| * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: |
| (WebKit::RemoteLayerBackingStore::drawInContext): |
| * UIProcess/API/wpe/WebKitColor.cpp: |
| (webkitColorToWebCoreColor): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _tapHighlightColorForFastClick:]): |
| * WebProcess/Inspector/WebInspectorClient.cpp: |
| (WebKit::WebInspectorClient::showPaintRect): |
| * WebProcess/WebPage/FindController.cpp: |
| (WebKit::FindController::drawRect): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::paintSnapshotAtSize): |
| * WebProcess/WebPage/ios/FindControllerIOS.mm: |
| (WebKit::FindIndicatorOverlayClientIOS::drawRect): |
| (WebKit::highlightColor): Deleted. |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add printing support |
| https://bugs.webkit.org/show_bug.cgi?id=212320 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Printing API hasn't changed, the only problem was that we were using gtk_dialog_run() and gdk threads deprecated API. |
| |
| * UIProcess/API/gtk/WebKitPrintOperation.cpp: |
| (webkitPrintOperationRunDialog): Remove GTK4 ifdefs. |
| * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: |
| (WebKit::WebPrintOperationGtk::print): Use g_idle_add_full() instead of gdk threads deprecated API. |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Wheel events are always handled by the main frame view |
| https://bugs.webkit.org/show_bug.cgi?id=212593 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| It's not possible scroll other scrollable areas with the mouse wheel. This is because we are using the given x, |
| y delta in the scroll signal as the position. In GTK4 the scroll event doesn't include a position, so we have to |
| use the last motion event. |
| |
| * Shared/NativeWebWheelEvent.h: |
| * Shared/gtk/NativeWebWheelEventGtk.cpp: |
| (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Add wheelTicks parameter. |
| * Shared/gtk/WebEventFactory.cpp: |
| (WebKit::WebEventFactory::createWebWheelEvent): New create function that receives the wheelTicks. |
| * Shared/gtk/WebEventFactory.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseScroll): Use the x, y parameters as the delta and take the position from the last motion event. |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Monitor root window to update activity state |
| https://bugs.webkit.org/show_bug.cgi?id=212581 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| To update ActivityState::IsInWindow and ActivityState::WindowIsActive. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (toplevelWindowStateEvent): |
| (webkitWebViewBaseSetToplevelOnScreenWindow): |
| (webkitWebViewBaseDispose): |
| (toplevelWindowIsActiveChanged): |
| (toplevelWindowStateChanged): |
| (toplevelWindowRealized): |
| (toplevelWindowUnrealized): |
| (webkitWebViewBaseRoot): |
| (webkitWebViewBaseUnroot): |
| (webkit_web_view_base_class_init): |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Fix pointer lock in X11 |
| https://bugs.webkit.org/show_bug.cgi?id=212592 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| I forgot to forward the motion events for X11 in GTK4. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (MotionEvent::MotionEvent): Add a constructor that receives the positions and state. |
| (webkitWebViewBaseMotion): Notify the pointer lock manager about the event. Also save the last motion event and |
| compute the movement delta. |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make inspector work |
| https://bugs.webkit.org/show_bug.cgi?id=212321 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseRemoveDialog): Added instead of the generic webkitWebViewBaseRemoveChild that has been removed. |
| (webkitWebViewBaseRemoveWebInspector): Just unparent the inspector view instead of caling webkitWebViewBaseRemoveChild. |
| (webkitWebViewBaseDispose): Use specific functions to remove the children. |
| (webkitWebViewBaseSnapshot): Call gtk_widget_snapshot_child() on inspector view if present. |
| (webkitWebViewBaseRemoveChild): Deleted. |
| * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: |
| (WebKit::RemoteWebInspectorProxy::platformSave): Remove GTK4 ifdefs. |
| * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: |
| (WebKit::WebInspectorProxy::platformSave): Ditto. |
| * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: |
| (webkit_inspector_window_init): Show title buttons in inspector window. |
| * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: |
| (WebKit::AcceleratedBackingStoreWayland::snapshot): Use the texture size instead of the view size, since it's |
| different when the inspector is attached. |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r262184): fast/forms/implicit-submission.html is crashing |
| https://bugs.webkit.org/show_bug.cgi?id=212520 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| (WebKit::WebPopupMenuProxyGtk::activateSelectedItem): Return early if the popup has already been closed. |
| |
| 2020-06-01 Rob Buis <rbuis@igalia.com> |
| |
| Rename ResourceResponseBase::isHTTP to isInHTTPFamily |
| https://bugs.webkit.org/show_bug.cgi?id=208782 |
| |
| Reviewed by Sam Weinig. |
| |
| Adapt to API change. |
| |
| * NetworkProcess/cache/NetworkCache.cpp: |
| (WebKit::NetworkCache::makeStoreDecision): |
| * WebProcess/Plugins/PluginView.cpp: |
| (WebKit::buildHTTPHeaders): |
| |
| 2020-06-01 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| [WPE][GTK] pthread_create() fails with EPERM in the second WebKitWebProcess with sandbox on |
| https://bugs.webkit.org/show_bug.cgi?id=212380 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Dereference scmp_arg_cmp before use. |
| |
| * UIProcess/Launcher/glib/BubblewrapLauncher.cpp: |
| (WebKit::setupSeccomp): |
| |
| 2020-05-30 Alex Christensen <achristensen@webkit.org> |
| |
| Deprecate WKBundlePostSynchronousMessage |
| https://bugs.webkit.org/show_bug.cgi?id=212536 |
| |
| Reviewed by Anders Carlsson. |
| |
| * WebProcess/InjectedBundle/API/c/WKBundle.h: |
| |
| 2020-05-30 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] WebDriver: stop using GdkEvent API in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=212465 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use the new internal API to synthesize events. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSynthesizeKeyEvent): Add type parameter, since WebDriver can send press and release events |
| separately. Also add a parameter to indicate that keyval should be translated according to current state that is |
| required by WebDriver. |
| * UIProcess/API/gtk/WebKitWebViewBaseInternal.h: |
| * UIProcess/Automation/WebAutomationSession.cpp: |
| (WebKit::WebAutomationSession::documentLoadedForFrame): Call resetClickCount(). |
| (WebKit::WebAutomationSession::updateClickCount): Update the click count for the given button position and |
| maximum time and distance. |
| (WebKit::WebAutomationSession::resetClickCount): Reset the click count. |
| * UIProcess/Automation/WebAutomationSession.h: |
| * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: |
| (WebKit::WebAutomationSession::platformSimulateMouseInteraction): Use webkitWebViewBaseSynthesizeMouseEvent(). |
| (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Use webkitWebViewBaseSynthesizeKeyEvent(). |
| (WebKit::WebAutomationSession::platformSimulateKeySequence): Ditto. |
| (WebKit::doMouseEvent): Deleted. |
| (WebKit::doMotionEvent): Deleted. |
| (WebKit::doKeyStrokeEvent): Deleted. |
| * UIProcess/gtk/KeyBindingTranslator.cpp: Add missing key shortcuts to predefined list. |
| |
| 2020-05-29 Alex Christensen <achristensen@webkit.org> |
| |
| Use correct encoding when converting a WTF::URL to CFURLRef |
| https://bugs.webkit.org/show_bug.cgi?id=212486 |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/API/c/cf/WKURLCF.mm: |
| (WKURLCopyCFURL): |
| * Shared/cf/ArgumentCodersCF.cpp: |
| (IPC::decode): |
| |
| 2020-05-29 Peng Liu <peng.liu6@apple.com> |
| |
| Replace callOnMainThread() with callOnMainRunLoop() in AudioSessionRoutingArbitratorProxyCocoa.mm |
| https://bugs.webkit.org/show_bug.cgi?id=212553 |
| |
| Reviewed by Chris Dumez. |
| |
| Use callOnMainRunLoop() instead of callOnMainThread() in the UIProcess. Also move |
| m_setupArbitrationOngoing flag to the end of the completion handler. |
| |
| No new tests, no functional change. |
| |
| * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: |
| (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): |
| |
| 2020-05-29 Brent Fulgham <bfulgham@apple.com> |
| |
| [Cocoa] Improve logging quality for non-ephemeral sessions |
| https://bugs.webkit.org/show_bug.cgi?id=212551 |
| <rdar://problem/62461099> |
| |
| Reviewed by David Kilzer. |
| |
| In Bug 209522 I switched normal mode logging to use the same privacy-protecting mode we use for ephemeral sessions. |
| This had the unintended consequence of removing network load data used to investigate networking issues. |
| |
| This patch adopts the more fine-grained logging provided by the low-level 'nw_context_privacy_level' setting. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::configurationForSessionID): Adopt 'nw_context_privacy_level' setting. |
| |
| 2020-05-29 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove conditionals for ENABLE_APPLE_PAY_SESSION_V(3|4) |
| https://bugs.webkit.org/show_bug.cgi?id=212541 |
| |
| Reviewed by Darin Adler. |
| |
| APPLE_PAY_SESSION_V(3|4) is now enabled whenever APPLE_PAY itself is enabled. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2020-05-29 Dean Jackson <dino@apple.com> |
| |
| iOS build fix. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::configurationForSessionID): |
| |
| 2020-05-29 Jer Noble <jer.noble@apple.com> |
| |
| [Mac,WK2] Fullscreen animation missing a few frames at beginning |
| https://bugs.webkit.org/show_bug.cgi?id=212156 |
| <rdar://problem/54799415> |
| |
| Reviewed by Eric Carlson. |
| |
| When starting the enter fullscreen animation, ensure that the fullscreen window is ordered front, and on top |
| of the content, as well as having all the animations configured so that their starting state is in place before |
| calling -[NSWindow enterFullscreenMode:]. Move all the window creation code into |
| -beganEnterFullScreenWithInitialFrame:finalFrame: from _startEnterFullScreenAnimationWithDuration:. Re-use the |
| existing zoomAnimation() and maskAnimation() utility methods, but give the animations a very long duration |
| (since there is no explicit way to start and stop a CAAnimation). This initial animation will be replaced with |
| the final one inside -_startEnterFullScreenAnimationWithDuration:. Separately, explictly disable implicit |
| animations of the fullscreen window during -orderIn: and -orderOut:. |
| |
| * UIProcess/mac/WKFullScreenWindowController.mm: |
| (-[WKFullScreenWindowController initWithWindow:webView:page:impl:]): |
| (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): |
| (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): |
| |
| 2020-05-29 Jan-Michael Brummer <jan.brummer@tabos.org> |
| |
| [GTK][WPE] API for WebView audio mute support |
| https://bugs.webkit.org/show_bug.cgi?id=176119 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Test implemented in TestWebKitWebView. |
| |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewSetProperty): |
| (webkitWebViewGetProperty): |
| (webkit_web_view_class_init): |
| (webkit_web_view_set_is_muted): |
| (webkit_web_view_is_muted): |
| * UIProcess/API/gtk/WebKitWebView.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitWebView.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::isAudioMuted const): |
| |
| 2020-05-29 Darin Adler <darin@apple.com> |
| |
| Remove things from FeatureDefines.xcconfig that are covered by PlatformEnableCocoa.h |
| https://bugs.webkit.org/show_bug.cgi?id=212418 |
| |
| Rubber-stamped by Simon Fraser. |
| |
| * Configurations/FeatureDefines.xcconfig: Add back ENABLE_CSS_CONIC_GRADIENTS, removed |
| by accident. |
| |
| 2020-05-29 Peng Liu <peng.liu6@apple.com> |
| |
| ASSERT NOT REACHED in IPC::takeAsyncReplyHandler under WebKit::AudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory |
| https://bugs.webkit.org/show_bug.cgi?id=212533 |
| |
| Reviewed by Chris Dumez. |
| |
| When the m_inDispatchMessageMarkedToUseFullySynchronousModeForTesting flag is set, |
| sendWithAsyncReply() may actually send the message synchronously. Therefore, we have |
| to set the async reply handler before actually sending the message. |
| |
| No new tests, fixing test crashes due to assertion failures. |
| |
| * Platform/IPC/Connection.h: |
| (IPC::Connection::sendWithAsyncReply): |
| |
| 2020-05-27 Darin Adler <darin@apple.com> |
| |
| Remove things from FeatureDefines.xcconfig that are covered by PlatformEnableCocoa.h |
| https://bugs.webkit.org/show_bug.cgi?id=212418 |
| |
| Reviewed by Andy Estes. |
| |
| * Configurations/FeatureDefines.xcconfig: Removed 83 of the 119 things defined in |
| this file. There are 36 more that are slightly more complex that we can remove |
| carefully later. |
| |
| 2020-05-29 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Pass all defines from Platform.h to various scripts, not just the ones from .xcconfig |
| https://bugs.webkit.org/show_bug.cgi?id=212451 |
| |
| Reviewed by Sam Weinig. |
| |
| * DerivedSources.make: Use ":=" when calling $(shell) to make sure the same shell |
| command is not invoked over and over again. |
| |
| 2020-05-29 Keith Rollin <krollin@apple.com> |
| |
| Revert switch to XCBuild |
| https://bugs.webkit.org/show_bug.cgi?id=212530 |
| <rdar://problem/63764632> |
| |
| Unreviewed build fix. |
| |
| Bug 209890 enabled the use of XCBuild by default. Since then, some |
| build issues have shown up. While addressing them, temporarily turn |
| off the use of XCBuild by default. |
| |
| * Configurations/WebKit.xcconfig: |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-29 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: add ITML debuggable/target type |
| https://bugs.webkit.org/show_bug.cgi?id=203300 |
| <rdar://problem/56545896> |
| |
| Reviewed by Joseph Pecoraro and Brian Burg. |
| |
| * UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.h: |
| * UIProcess/API/Cocoa/_WKInspectorDebuggableInfoInternal.h: |
| (fromWKInspectorDebuggableType): |
| (toWKInspectorDebuggableType): |
| * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: |
| * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: |
| (legacyDebuggableTypeToModernDebuggableType): |
| |
| * UIProcess/socket/RemoteInspectorProtocolHandler.cpp: |
| (WebKit::parseDebuggableTypeFromString): |
| |
| 2020-05-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Prepare for async scrolling in passive wheel event handler regions |
| https://bugs.webkit.org/show_bug.cgi?id=212455 |
| |
| Reviewed by Tim Horton. |
| |
| Clarify the processing for wheel events by adding OptionSet<WheelEventProcessingSteps>, |
| which will, in future, allow us to describe the processing for an event in the passive |
| event handler region which does scrolling on the scrolling thread, and is then sent |
| to the main thread for DOM event dispatch. |
| |
| Removed ScrollingEventResult, which conflated "handled" with "send to another thread". |
| The thread sending behavior is now encoded in the WheelEventProcessingSteps, and we can just |
| use a bool for handled. |
| |
| Scrolling tree and node handleWheelEvent() functions return a WheelEventHandlingResult, which |
| is a tuple of OptionSet<WheelEventProcessingSteps> and 'handled', allowing for a node with |
| background-attachment:fixed to add the "send to main thread" processing step. |
| |
| * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: |
| (WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent): |
| * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: |
| (WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent): |
| * UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h: |
| * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp: |
| (WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::handleWheelEvent): |
| * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h: |
| * WebProcess/WebPage/EventDispatcher.cpp: |
| (WebKit::EventDispatcher::wheelEvent): |
| |
| 2020-05-29 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Implement HTTP auth dialog |
| https://bugs.webkit.org/show_bug.cgi?id=212319 |
| |
| Reviewed by Sergio Villar Senin. |
| |
| * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: |
| (webkitAuthenticationDialogDestroy): |
| (okButtonClicked): |
| (cancelButtonClicked): |
| (authenticationCancelled): |
| (webkitAuthenticationDialogInitialize): |
| (webkitAuthenticationDialogMap): |
| (webkitAuthenticationDialogDispose): |
| (webkitAuthenticationDialogNew): |
| * UIProcess/API/gtk/WebKitAuthenticationDialog.h: |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| (webkitWebViewAuthenticate): |
| |
| 2020-05-29 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Implement script dialogs |
| https://bugs.webkit.org/show_bug.cgi?id=212318 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Adapt to the GTK4 API and theme changes. |
| |
| * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp: |
| (webkitScriptDialogImplClose): |
| (webkitScriptDialogImplKeyPressed): |
| (webkitScriptDialogImplMap): |
| (webkitScriptDialogImplConstructed): |
| (webkitScriptDialogImplDispose): |
| (webkit_script_dialog_impl_class_init): |
| (webkitScriptDialogImplAddButton): |
| (webkitScriptDialogImplNew): |
| (webkitScriptDialogImplSetEntryText): |
| * UIProcess/API/gtk/WebKitScriptDialogImpl.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseAddDialog): |
| (webkitWebViewBaseRemoveChild): |
| (webkitWebViewBaseSnapshot): |
| * UIProcess/API/gtk/WebKitWebViewDialog.cpp: |
| (webkitWebViewDialogSnapshot): |
| (webkitWebViewDialogSizeAllocate): |
| (webkitWebViewDialogConstructed): |
| (webkit_web_view_dialog_class_init): |
| (webkitWebViewDialogSetChild): |
| (webkitWebViewDialogGetChild): |
| * UIProcess/API/gtk/WebKitWebViewDialog.h: |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| (webkitWebViewScriptDialog): |
| |
| 2020-05-29 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION (r261812): editing/async-clipboard/clipboard-item-get-type-basic.html is flaky |
| https://bugs.webkit.org/show_bug.cgi?id=212281 |
| <rdar://problem/63554912> |
| |
| Reviewed by Tim Horton. |
| |
| Declare `-delegateSupportsImagePaste` on UIKeyboardImpl. |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| |
| 2020-05-28 Peng Liu <peng.liu6@apple.com> |
| |
| Clean up WebKit.xcodeproj/project.pbxproj |
| https://bugs.webkit.org/show_bug.cgi?id=212491 |
| |
| Reviewed by Tim Horton. |
| |
| A follow-up patch to add AudioSessionRoutingArbitratorProxyCocoa.mm to the unified build. |
| |
| * SourcesCocoa.txt: |
| * WebKit.xcodeproj/project.pbxproj: |
| Add AudioSessionRoutingArbitratorProxyCocoa.mm to the unified build. |
| |
| * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h: |
| Fix a unified build failure. |
| |
| 2020-05-28 Megan Gardner <megan_gardner@apple.com> |
| |
| Avoid unnecessary sync IPC messages when togging the callout bar for selections. |
| https://bugs.webkit.org/show_bug.cgi?id=212508 |
| |
| The loupe gesture only needs to be activated and evaluated if the tap is inside |
| an existing selectionView. We can do that test in the UIProcess without resorting to a sync IPC message. |
| Doing that evaluation locally will eliminate unnecessary hangs in the UIProcess. |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _pointIsInsideSelectionRect:outBoundingRect:]): |
| (-[WKContentView _shouldToggleSelectionCommandsAfterTapAt:]): |
| (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): |
| |
| 2020-05-28 Tim Horton <timothy_horton@apple.com> |
| |
| Fix the macOS build |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| Can't have this file in both the Xcode target and SourcesCocoa.txt... |
| |
| 2020-05-28 Lauro Moura <lmoura@igalia.com> |
| |
| [GTK][WPE] Buildfix after r262242 |
| |
| Unreviewed build fix. |
| |
| * Shared/glib/ArgumentCodersGLib.cpp: |
| (IPC::decode): |
| |
| 2020-05-28 Jonathan Bedard <jbedard@apple.com> |
| |
| watchOS: Upstream WKNumberPadView |
| https://bugs.webkit.org/show_bug.cgi?id=212499 |
| <rdar://problem/63736073> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/forms/WKNumberPadView.h: Moved from WebKitAdditions. |
| * UIProcess/ios/forms/WKNumberPadView.mm: Ditto. |
| |
| 2020-05-28 Jonathan Bedard <jbedard@apple.com> |
| |
| watchOS: Upstream WKTextInputListViewController |
| https://bugs.webkit.org/show_bug.cgi?id=212495 |
| <rdar://problem/63733949> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/forms/WKTextInputListViewController.h: Moved from WebKitAdditions. |
| * UIProcess/ios/forms/WKTextInputListViewController.mm: Ditto. |
| |
| 2020-05-28 Simon Fraser <simon.fraser@apple.com> |
| |
| Simplify EventDispatcher wheel event dispatch |
| https://bugs.webkit.org/show_bug.cgi?id=212490 |
| |
| Reviewed by Tim Horton. |
| |
| The various cross-thread bounces and completion lambdas in EventDispatcher::wheelEvent() |
| and ScrollingTree code made the logic very hard to follow. |
| |
| Moving the ScrollingThread::dispatch() into EventHandler code simplifies things a little, |
| and allows for removal of the hokey "try to handle" ScrollingTree function, as well |
| as the clunky completion function. |
| |
| Now, EventHandler call shouldHandleWheelEventSynchronously(), then does the |
| ScrollingThread::dispatch() which allows the lambda to easily call back into |
| EventHandler for the main thread dispatch. |
| |
| RemoteScrollingCoordinatorProxy/RemoteLayerTree code is unused at present, and |
| will need work. |
| |
| * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: |
| (WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent): |
| * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: |
| (WebKit::RemoteScrollingTree::tryToHandleWheelEvent): Deleted. |
| * UIProcess/RemoteLayerTree/RemoteScrollingTree.h: |
| * WebProcess/WebPage/EventDispatcher.cpp: |
| (WebKit::EventDispatcher::wheelEvent): |
| (WebKit::EventDispatcher::dispatchWheelEventViaMainThread): |
| * WebProcess/WebPage/EventDispatcher.h: |
| |
| 2020-05-28 Peng Liu <peng.liu6@apple.com> |
| |
| Clean up WebKit.xcodeproj/project.pbxproj |
| https://bugs.webkit.org/show_bug.cgi?id=212491 |
| |
| Reviewed by Simon Fraser. |
| |
| Remove the references to deleted files and merge duplicated folders. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-28 Kate Cheney <katherine_cheney@apple.com> |
| |
| Minimum user interaction time in ResourceLoadStatistics should handle the case of -1 |
| https://bugs.webkit.org/show_bug.cgi?id=212445 |
| <rdar://problem/63696470> |
| |
| Reviewed by John Wilander. |
| |
| Tests: http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-statistics-with-no-user-interaction-database.html |
| http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-statistics-with-no-user-interaction.html |
| |
| Adds a getter for mostRecentUserInteractionTime which returns WTF::nullopt if the |
| timestamp is -1. Then does not consider this case in calculating the |
| minimum timestamp. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::getMostRecentUserInteractionTime): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| Flip sign to be less than, so we hold off on deleting data if the |
| oldest interaction was less than the minimum time between removal. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::getMostRecentUserInteractionTime): |
| (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| Flip sign to be less than, so we hold off on deleting data if the |
| oldest interaction was less than the minimum time between removal. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: |
| |
| 2020-05-28 Megan Gardner <megan_gardner@apple.com> |
| |
| Do not send a second sync request for positition information to the web process if we have not recieved information since the previous sync request. |
| https://bugs.webkit.org/show_bug.cgi?id=212289 |
| <rdar://problem/58494578> |
| |
| Reviewed by Tim Horton. |
| |
| If we have sent a sync requests to the web process for position information, and timed out, and have not |
| received a message with position information in the interim, do not send another sync request. The web |
| process is likely still hung, and there is no reason to hang the UIProcess again if we suspect that it |
| is unlikely that we will receive a reply. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView cleanUpInteraction]): |
| (-[WKContentView ensurePositionInformationIsUpToDate:]): |
| (-[WKContentView _positionInformationDidChange:]): |
| |
| 2020-05-28 Youenn Fablet <youenn@apple.com> |
| |
| ReadableByteStream should be enabled/disabled in service workers as done in pages |
| https://bugs.webkit.org/show_bug.cgi?id=212466 |
| |
| Reviewed by Alex Christensen. |
| |
| Introduce a WebPreference for readable byte stream. |
| Use it for enabling it in web processes running service workers as per the given store. |
| |
| * Shared/WebPreferences.yaml: |
| * WebProcess/Storage/WebSWContextManagerConnection.cpp: |
| (WebKit::WebSWContextManagerConnection::updatePreferencesStore): |
| |
| 2020-05-28 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| [WPE][GTK] GVariant decoding must copy the serialized data |
| https://bugs.webkit.org/show_bug.cgi?id=212441 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| I tracked this down to ArgumentCodersGLib.cpp. The problem is that we construct a GVariant |
| using g_variant_new_from_data(), which does not copy or take ownership of the data, so here |
| we accidentally create the GVariant using data we don't own. (Here, the data is owned by the |
| Decoder itself in its internal m_buffer.) Anyway, this is fixable by manually copying and |
| freeing it with the GDestroyNotify parameter, but it's easier to switch to |
| g_variant_new_from_bytes() because GBytes takes ownership when constructed. |
| |
| * Shared/glib/ArgumentCodersGLib.cpp: |
| (IPC::decode): |
| |
| 2020-05-28 Youenn Fablet <youenn@apple.com> |
| |
| RemoteAudio::audioSamplesAvailable should check for m_buffer to be null |
| https://bugs.webkit.org/show_bug.cgi?id=212462 |
| <rdar://problem/63627642> |
| |
| Reviewed by Eric Carlson. |
| |
| * WebProcess/cocoa/RemoteCaptureSampleManager.cpp: |
| (WebKit::RemoteCaptureSampleManager::RemoteAudio::audioSamplesAvailable): |
| m_buffer is initialized by a StorageChanged IPC message which might not always be successful, for instance if the shared memory mapping fails. |
| Return early if m_buffer is not yet initialized properly. |
| |
| 2020-05-28 Youenn Fablet <youenn@apple.com> |
| |
| RealtimeIncomingVideoSourceCocoa::OnFrame should use video frame timestamp |
| https://bugs.webkit.org/show_bug.cgi?id=212402 |
| |
| Reviewed by Eric Carlson. |
| |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: |
| (WebKit::RemoteSampleBufferDisplayLayer::enqueueSample): |
| * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: |
| |
| 2020-05-27 Keith Rollin <krollin@apple.com> |
| |
| Add output file specifications to "Copy Custom WebContent Resources to Framework Private Headers" build phase in WebKit/WebContent |
| https://bugs.webkit.org/show_bug.cgi?id=212452 |
| <rdar://problem/63700546> |
| |
| Reviewed by Timothy Hatcher. |
| |
| The "Copy Custom WebContent Resources to Framework Private Headers" |
| build phase in the WebContent target of the WebKit project doesn't |
| advertise the files that it produces. This has consequences on later |
| build phases that consume those files. In particular, XCBuild is left |
| not knowing where those files are coming from, and it fails saying |
| that those files don't exist. Fix this by adding the output files to |
| the "output files" section of the custom build phase. |
| |
| No new tests -- this is just a build fix. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-27 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (PSON): Resizing WKWebView during cross-site navigation results in the page laying out at the wrong size |
| https://bugs.webkit.org/show_bug.cgi?id=212434 |
| <rdar://problem/51621621> |
| |
| Reviewed by Chris Dumez. |
| |
| New API test: ProcessSwap.ResizeWebViewDuringCrossSiteProvisionalNavigation. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::swapToProvisionalPage): |
| Set m_hasRunningProcess before calling setDrawingArea, instead of immediately after, |
| so that setDrawingArea can call methods that check m_hasRunningProcess. |
| |
| (WebKit::WebPageProxy::setDrawingArea): |
| When swapping DrawingAreas, push the current view size down. DrawingArea |
| is initially created with a size, but the size can change while the DrawingArea |
| is still provisional. |
| |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::viewSize): |
| Simplify this implementation now that we don't ever need to support WKContentView |
| outside of WKWebView (since 2014 or so). |
| |
| 2020-05-27 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| REGRESSION(r260318): [WPE][GTK] Uninitialized memory read in MemoryPressureMonitor |
| https://bugs.webkit.org/show_bug.cgi?id=212412 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| I think this is a false-positive, but let's suppress the warning by zero-initializing this |
| buffer. |
| |
| * UIProcess/linux/MemoryPressureMonitor.cpp: |
| (WebKit::systemMemoryUsedAsPercentage): |
| |
| 2020-05-27 Kate Cheney <katherine_cheney@apple.com> |
| |
| App-bound sessions should be for iOS only |
| https://bugs.webkit.org/show_bug.cgi?id=212426 |
| <rdar://problem/63678147> |
| |
| Reviewed by Darin Adler. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::SessionWrapper::initialize): |
| (WebKit::NetworkSessionCocoa::sessionWrapperForTask): |
| |
| 2020-05-27 Lauro Moura <lmoura@igalia.com> |
| |
| [WPE] Avoid possible WTR event timing going back in time and fix conversion from s to ms |
| https://bugs.webkit.org/show_bug.cgi?id=212338 |
| |
| Reviewed by Michael Catanzaro. |
| |
| When converting the input timestamps to WallTime, we must somehow |
| adjust them to give meaningful timestamps (due to Dom::Event |
| conversion from timestamp wall time to the time origin from document |
| loading). |
| |
| As WPE timestamps are just intended to be compared among themselves, |
| we use the first processed event as the origin, comparing the |
| following events to it to get an actual time. |
| |
| Test: fast/events/monotonic-event-time.html |
| |
| * Shared/libwpe/WebEventFactory.cpp: |
| (WebKit::wallTimeForEventTime): |
| |
| 2020-05-27 Kate Cheney <katherine_cheney@apple.com> |
| |
| Make sure bundle identifier testing override is set in the network process |
| https://bugs.webkit.org/show_bug.cgi?id=212288 |
| <rdar://problem/63539061> |
| |
| Reviewed by Chris Dumez. |
| |
| Set the bundle identifier in the network process if a layout test |
| updates it. This value usually only gets updated when a new network |
| process is initialized, which does not happen for every test. So it |
| should be set/cleared as needed. |
| |
| No new tests, will fix http/tests/in-app-browser-privacy/ tests. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::updateBundleIdentifierInNetworkProcess): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreUpdateBundleIdentifierInNetworkProcess): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::updateBundleIdentifierInNetworkProcess): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::updateBundleIdentifierInNetworkProcess): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| |
| 2020-05-27 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed, reverting r260840. |
| |
| This patch is no longer needed after preferences root cause |
| has been fixed. |
| |
| Reverted changeset: |
| |
| "[Cocoa] Global preferences are not accessible in the |
| WebContent process when CFPrefs direct mode is enabled" |
| https://bugs.webkit.org/show_bug.cgi?id=211075 |
| https://trac.webkit.org/changeset/260840 |
| |
| 2020-05-27 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| Unreviewed, fix -Wcomment build warning after r261986 |
| https://bugs.webkit.org/show_bug.cgi?id=211950 |
| <rdar://problem/63482718> |
| |
| If we replace the /* with /* then GCC won't complain that it looks like a comment. |
| |
| * UIProcess/API/glib/WebKitSettings.cpp: |
| (webkit_settings_class_init): |
| |
| 2020-05-27 Brent Fulgham <bfulgham@apple.com> |
| |
| Adjust HTTP3 label to the more correct HTTP/3 |
| https://bugs.webkit.org/show_bug.cgi?id=212416 |
| <rdar://problem/63514072> |
| |
| Reviewed by Darin Adler. |
| |
| No new tests. No change in behavior. |
| |
| * Shared/WebPreferences.yaml: Correct label. |
| |
| 2020-05-27 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro |
| https://bugs.webkit.org/show_bug.cgi?id=210014 |
| |
| Reviewed by Brian Burg. |
| |
| Previously, the generated InspectorBackendCommands.js would include code for things that the |
| backend doesn't actually support. By using actual macros and preprocessing that file, we can |
| ensure that the frontend doesn't incorrectly think that something is supported by the page |
| being inspected: |
| - the `Canvas` commands and events related to shader programs/pipelines should only exist |
| when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`. |
| - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled` |
| that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional |
| parameter, as well as removing `Page.setShowRulers` entirely. |
| - setting the forced appearance should only be possible if dark mode is supported. |
| - web archives only exist if CF is used. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h. |
| |
| * DerivedSources.make: |
| * PlatformMac.cmake: |
| Remove `platform` as it is handled by `condition`. |
| |
| * UIProcess/Automation/Automation.json: |
| |
| 2020-05-27 Zalan Bujtas <zalan@apple.com> |
| |
| [Quirk] Remove stackoverflow.com desktop content quirk. |
| https://bugs.webkit.org/show_bug.cgi?id=212414 |
| |
| Reviewed by Antti Koivisto. |
| |
| Mobile content is fixed now. |
| |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::desktopClassBrowsingRecommendedForRequest): |
| |
| 2020-05-27 Chris Dumez <cdumez@apple.com> |
| |
| Crash under WebNotificationManager::removeNotificationFromContextMap() |
| https://bugs.webkit.org/show_bug.cgi?id=212410 |
| <rdar://63496726> |
| |
| Reviewed by Alex Christensen. |
| |
| Protect the notification object in WebNotificationManager::didDestroyNotification() since |
| removing it from m_notificationIDMap will deref it and may end up destroying the notification |
| object otherwise. |
| |
| Test: http/tests/notifications/crash-on-navigation.html |
| |
| * WebProcess/Notifications/WebNotificationManager.cpp: |
| (WebKit::WebNotificationManager::didDestroyNotification): |
| |
| 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. [GTK] Make webkitWebViewBaseSnapshot static |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSnapshot): |
| |
| 2020-05-27 David Kilzer <ddkilzer@apple.com> |
| |
| Use OptionSet<DragDestinationAction> for mask values |
| <https://webkit.org/b/212115> |
| <rdar://problem/63423380> |
| |
| Reviewed by Alex Christensen. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<DragData>::encode): |
| (IPC::ArgumentCoder<DragData>::decode): |
| - Switch from decodeEnum() and encodeEnum() to modern |
| equivalents that check for valid enum values. |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::draggingEntered): |
| (WebKit::WebViewImpl::draggingUpdated): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView dragDataForDropSession:dragDestinationAction:]): |
| * WebProcess/WebCoreSupport/WebDragClient.cpp: |
| (WebKit::WebDragClient::willPerformDragDestinationAction): |
| |
| 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make PointerLock work |
| https://bugs.webkit.org/show_bug.cgi?id=212314 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use XLib API for warp and grab, since they are no longer available in GTK4. The grab was not actuially needed |
| under Wayland. Also stop using GdkEvent to keep track of motion events and create the PointerLockManager to be |
| able to test pointer lock and movement delta. |
| |
| * Shared/NativeWebMouseEvent.h: |
| * Shared/gtk/NativeWebMouseEventGtk.cpp: |
| (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Use FloatSize instead of FloatPoint for movement delta. |
| * Shared/gtk/WebEventFactory.cpp: |
| (WebKit::WebEventFactory::createWebMouseEvent): Ditto. |
| * Shared/gtk/WebEventFactory.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (MotionEvent::MotionEvent): Helper struct to keep track of motion events without using GdkEvent. |
| (MotionEvent::delta): Return the movement delta for the given current event. |
| (webkitWebViewBaseHandleMouseEvent): Use MotionEvent instead of GdkEvent. |
| (webkitWebViewBaseMotionNotifyEvent): Pass the event coordinates to the pointer lock manager since that's the |
| only thing needed. |
| (webkitWebViewBaseRequestPointerLock): Use MotionEvent instead of GdkEvent. |
| (webkitWebViewBaseDidLosePointerLock): Remove GTK4 ifdefs. |
| (webkitWebViewBaseSynthesizeMouseEvent): Forward the event to the pointer lock manager if present. Also keep |
| track of the motion event and set the movement delta. |
| * UIProcess/gtk/PointerLockManager.cpp: |
| (WebKit::PointerLockManager::create): Receive event information as parameters instead of using GdkEvent. |
| (WebKit::PointerLockManager::PointerLockManager): Ditto. |
| (WebKit::PointerLockManager::~PointerLockManager): |
| (WebKit::PointerLockManager::lock): Remove the grab. |
| (WebKit::PointerLockManager::unlock): Remove the ungrab. |
| (WebKit::PointerLockManager::handleMotion): Use NativeWebMouseEvent constructor taking all information as parameters. |
| * UIProcess/gtk/PointerLockManager.h: |
| * UIProcess/gtk/PointerLockManagerWayland.cpp: |
| (WebKit::PointerLockManagerWayland::PointerLockManagerWayland): Receive event information as parameters instead of using GdkEvent. |
| (WebKit::PointerLockManagerWayland::lock): Hide the cursor. |
| (WebKit::PointerLockManagerWayland::unlock): Unhide the cursor. |
| * UIProcess/gtk/PointerLockManagerWayland.h: |
| * UIProcess/gtk/PointerLockManagerX11.cpp: |
| (WebKit::PointerLockManagerX11::PointerLockManagerX11): Receive event information as parameters instead of using GdkEvent. |
| (WebKit::PointerLockManagerX11::lock): Use XGrabPointer. |
| (WebKit::PointerLockManagerX11::unlock): Use XUngrabPointer. |
| (WebKit::PointerLockManagerX11::didReceiveMotionEvent): Use XWarpPointer. |
| * UIProcess/gtk/PointerLockManagerX11.h: |
| |
| 2020-05-27 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, build warning fix after r261986 |
| |
| * UIProcess/API/glib/WebKitSettings.cpp: A colon is needed after the transfer annotation. |
| |
| 2020-05-27 Peng Liu <peng.liu6@apple.com> |
| |
| VideoFullscreenInterfaceAVKit is leaking when a video element enters and exits fullscreen/picture-in-picture |
| https://bugs.webkit.org/show_bug.cgi?id=212293 |
| |
| VideoFullscreenManagerProxy::ensureInterface() makes sure a fullscreen interface object exists (an object |
| will be created if it does not exit). That means an extra object will be created by an IPC message from |
| the Web process after the original video fullscreen interface object has been destroyed (thats happens |
| when a video element is returning to inline from fullscreen or picture-in-picture). |
| |
| Reviewed by Youenn Fablet. |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenManagerProxy::setHasVideo): |
| Don't call VideoFullscreenInterface[AVKit|Mac]::hasVideoChanged() before the instance of |
| VideoFullscreenInterface[AVKit|Mac] is ready. |
| (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): |
| Don't call VideoFullscreenInterface[AVKit|Mac]::videoDimensionsChanged() after the instance of |
| VideoFullscreenInterface[AVKit|Mac] is destroyed. |
| |
| 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WTR] EventSender: stop using GdkEvent API in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=212298 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add internal API to WebKitWebViewBase to synthesize events, because with GTK4 it's not possible to |
| create events. In the case of layout tests, the web view is always the target of the events, so we don't really |
| need to send the events to GTK to process them. |
| |
| * Shared/NativeWebKeyboardEvent.h: Add new constructor that doesn't receive a GdkEvent. |
| * Shared/NativeWebMouseEvent.h: Ditto. |
| * Shared/NativeWebWheelEvent.h: Ditto. |
| * Shared/gtk/NativeWebKeyboardEventGtk.cpp: |
| (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Create without a GdkEvent. |
| * Shared/gtk/NativeWebMouseEventGtk.cpp: |
| (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Ditto. |
| * Shared/gtk/NativeWebWheelEventGtk.cpp: |
| (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Ditto. |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::doneWithKeyEvent): Return early if event doesn't have a GdkEvent. |
| (WebKit::PageClientImpl::doneWithTouchEvent): Ditto. |
| (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): Ditto. |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (toWebKitModifiers): |
| (webkitWebViewBaseSynthesizeMouseEvent): |
| (webkitWebViewBaseSynthesizeKeyEvent): |
| (toWebKitWheelEventPhase): |
| (webkitWebViewBaseSynthesizeWheelEvent): |
| * UIProcess/API/gtk/WebKitWebViewBaseInternal.h: Added. |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::activePopupMenu const): Return the active popup menu proxy. |
| * UIProcess/gtk/KeyBindingTranslator.cpp: |
| (WebKit::handleKeyBindingsForMap): Make it generic by receiving the map as parameter. |
| (WebKit::handleCustomKeyBindings): Call handleKeyBindingsForMap() passing the custom key bindings map. |
| (WebKit::KeyBindingTranslator::commandsForKeyval): Get commands for the predefined key bindings. This is used |
| only when synthesizing key events since we don't have a GdkEVent to forward to the GtkTextView. |
| * UIProcess/gtk/KeyBindingTranslator.h: |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::popupMenuWidget): Take a ref of the GdkWindow when creating the GdkEvent, since the event will unref it |
| on destroy. |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| (WebKit::WebPopupMenuProxyGtk::handleKeyPress): Handle a key press event from its keyval and timestamp. |
| (WebKit::WebPopupMenuProxyGtk::activateSelectedItem): Activate the currently selected item. |
| (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback): Call handleKeyPress(). |
| (WebKit::WebPopupMenuProxyGtk::typeAheadFindIndex): Receive a keyval and timestamp instead of a GdkEvent. |
| (WebKit::WebPopupMenuProxyGtk::typeAheadFind): Ditto. |
| * UIProcess/gtk/WebPopupMenuProxyGtk.h: |
| |
| 2020-05-27 Keith Rollin <krollin@apple.com> |
| |
| Enable the use of XCBuild by default in Apple builds |
| https://bugs.webkit.org/show_bug.cgi?id=209890 |
| <rdar://problem/44182078> |
| |
| Unreviewed build fix. Check the value of XCODE_VERSION_ACTUAL rather |
| than XCODE_VERSION_MAJOR when determining whether to use the XCBuild |
| or non-XCBuild method of running header post-processing scripts. |
| |
| No new tests -- this is a build fix. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-26 Zan Dobersek <zdobersek@igalia.com> |
| |
| Unreviewed WPE build fix after r262155. |
| |
| * UIProcess/API/wpe/WebKitColor.cpp: |
| (webkit_color_parse): Use CSSParser::parseColor() to do the color parsing. |
| |
| 2020-05-26 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] Unreviewed clang-cl build fix after r262158 |
| https://bugs.webkit.org/show_bug.cgi?id=211883 |
| |
| std::unique_ptr<WebCore::TextureMapper> can't delete an incomplete type TextureMapper. |
| |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp: |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.h: |
| |
| 2020-05-26 Andy Estes <aestes@apple.com> |
| |
| Fix the engineering build on internal SDKs |
| |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Silenced a deprecation warning. |
| |
| 2020-05-26 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo][WK2] Use GraphicsLayerTextureMapper for Accelerated Compositing mode |
| https://bugs.webkit.org/show_bug.cgi?id=211883 |
| |
| Reviewed by Don Olmstead. |
| |
| GraphicsLayerTextureMapper is a simple GraphicsLayer |
| implementation using TextureMapper which is used for WinCairo WebKit1. |
| |
| Add a new LayerTreeHost implementation for |
| GraphicsLayerTextureMapper by copying WinCairo WebKit1's |
| AcceleratedCompositingContext. |
| |
| Windows WebKitTestRunner can't capture the window content for |
| pixel dump tests yet. |
| |
| * PlatformWin.cmake: |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPageCreationParameters.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::creationParameters): |
| * UIProcess/win/WebView.cpp: |
| (WebKit::WebView::WebView): |
| * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: |
| (WebKit::DrawingAreaCoordinatedGraphics::setNeedsDisplayInRect): |
| (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h: |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp: Added. |
| (WebKit::LayerTreeHost::prepareForRendering): |
| (WebKit::LayerTreeHost::compositeLayersToContext): |
| (WebKit::LayerTreeHost::flushPendingLayerChanges): |
| (WebKit::LayerTreeHost::layerFlushTimerFired): |
| (WebKit::LayerTreeHost::LayerTreeHost): |
| (WebKit::LayerTreeHost::setLayerFlushSchedulingEnabled): |
| (WebKit::LayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush): |
| (WebKit::LayerTreeHost::scheduleLayerFlush): |
| (WebKit::LayerTreeHost::cancelPendingLayerFlush): |
| (WebKit::LayerTreeHost::setRootCompositingLayer): |
| (WebKit::LayerTreeHost::setViewOverlayRootLayer): |
| (WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplay): |
| (WebKit::LayerTreeHost::scrollNonCompositedContents): |
| (WebKit::LayerTreeHost::flushAndRenderLayers): |
| (WebKit::LayerTreeHost::forceRepaint): |
| (WebKit::LayerTreeHost::forceRepaintAsync): |
| (WebKit::LayerTreeHost::sizeDidChange): |
| (WebKit::LayerTreeHost::pauseRendering): |
| (WebKit::LayerTreeHost::resumeRendering): |
| (WebKit::LayerTreeHost::graphicsLayerFactory): |
| (WebKit::LayerTreeHost::contentsSizeChanged): |
| (WebKit::LayerTreeHost::didChangeViewportAttributes): |
| (WebKit::LayerTreeHost::setIsDiscardable): |
| (WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged): |
| (WebKit::LayerTreeHost::createDisplayRefreshMonitor): |
| (WebKit::LayerTreeHost::window): |
| (WebKit::LayerTreeHost::enabled): |
| (WebKit::LayerTreeHost::paintContents): |
| (WebKit::LayerTreeHost::deviceScaleFactor const): |
| (WebKit::LayerTreeHost::applyDeviceScaleFactor): |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.h: Added. |
| (WebKit::LayerTreeHost::layerTreeContext const): |
| (WebKit::LayerTreeHost::displayID const): |
| * WebProcess/WebPage/WebPage.cpp: |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::nativeWindowHandle): |
| * WebProcess/win/WebProcessMainWin.cpp: |
| |
| 2020-05-25 Darin Adler <darin@apple.com> |
| |
| Eliminate Color constructors that take strings, moving color parsing entirely into the CSS parser |
| https://bugs.webkit.org/show_bug.cgi?id=212296 |
| |
| Reviewed by Sam Weinig. |
| |
| * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: |
| (WKBundlePageSetComposition): Use WebCore::CSSParser::parseColor. |
| |
| 2020-05-26 Peng Liu <peng.liu6@apple.com> |
| |
| ASSERTION FAILED: m_clientCounts.contains(contextId) - WebKit::VideoFullscreenManagerProxy::removeClientForContext() |
| https://bugs.webkit.org/show_bug.cgi?id=212308 |
| |
| Refactor the implementation of the callback hasVideoInPictureInPictureDidChange(). |
| |
| Reviewed by Jer Noble. |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenModelContext::didEnterPictureInPicture): |
| (WebKit::VideoFullscreenModelContext::didExitPictureInPicture): |
| |
| (WebKit::VideoFullscreenManagerProxy::hasVideoInPictureInPictureDidChange): |
| Add this function to wrap m_page->uiClient().hasVideoInPictureInPictureDidChange(). |
| |
| (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): |
| Remove the call to hasVideoInPictureInPictureDidChange() because it is too early to do so. |
| |
| (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): |
| Add a call to hasVideoInPictureInPictureDidChange() on Mac as well. This fixes the timeout of |
| TestWebKitAPI.PictureInPicture.ExitPiPOnSuspendVideoElement on Mac. |
| |
| (WebKit::VideoFullscreenManagerProxy::fullscreenModeChanged): |
| Remove the call to hasVideoInPictureInPictureDidChange() because it is not necessary. |
| |
| 2020-05-26 Keith Rollin <krollin@apple.com> |
| |
| Enable the use of XCBuild by default in Apple builds |
| https://bugs.webkit.org/show_bug.cgi?id=209890 |
| <rdar://problem/44182078> |
| |
| Reviewed by Darin Adler. |
| |
| Switch from the "legacy" Xcode build system to the "new" build system |
| (also known as "XCBuild"). Switching to the new system speeds up |
| builds by a small percentage, better validates projects for |
| build-related issues (such as dependency cycles), lets WebKit benefit |
| from future improvements in XCBuild such as those coming from the |
| underlying llbuild open source project, and prepares us for any other |
| tools built for this new ecosystem. |
| |
| Specific changes: |
| |
| - Remove Xcode project and workspace settings that selected the Build |
| system, allowing the default to take hold (which is currently the |
| New build system). |
| - Updated webkitdirs.pm with a terser check for Xcode version. |
| - Update build-webkit and Makefile.shared to be explicit when using |
| the old build system (no longer treat it as a default or fall-back |
| configuration). |
| - Update various xcconfig files similarly to treat the default as |
| using the new build system. |
| - Update various post-processing build steps to check for Xcode 11.4 |
| and to no longer treat the default as using the old build system. |
| |
| * Configurations/WebKit.xcconfig: |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-26 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Fix context menu |
| https://bugs.webkit.org/show_bug.cgi?id=212344 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSizeAllocate): Call gtk_native_check_resize() on the popover to make it appear. |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::destroyMenuWidget): There's no gtk_widget_destroy() in GTK4 so we can just unparent it. |
| (WebKit::bindModelToMenuWidget): Do not set the action namespace because that's not possible in GTK4. |
| (WebKit::WebContextMenuProxyGtk::append): Use group.name again for the action name passed to |
| g_menu_item_set_action_and_target_value(). |
| (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Use destroyMenuWidget(). |
| |
| 2020-05-25 Alex Christensen <achristensen@webkit.org> |
| |
| Expose more network metrics to WebCoreNSURLSession |
| https://bugs.webkit.org/show_bug.cgi?id=212359 |
| <rdar://problem/62909440> |
| |
| Reviewed by Darin Adler. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): |
| |
| 2020-05-24 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Use the name SimpleColor consistently |
| https://bugs.webkit.org/show_bug.cgi?id=212337 |
| |
| Reviewed by Anders Carlsson. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (compositionHighlights): |
| Update for new name of CompositionHighlight::defaultCompositionFillColor. |
| |
| 2020-05-24 Rob Buis <rbuis@igalia.com> |
| |
| Remove NetworkProcess/FileAPI |
| https://bugs.webkit.org/show_bug.cgi?id=212335 |
| |
| Reviewed by Sam Weinig. |
| |
| Remove NetworkProcess/FileAPI, the only file it contains is unused. |
| It seems this could have been removed in r248593. |
| |
| * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: Removed. |
| |
| 2020-05-24 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Stop allowing direct access to the underlying SimpleColor (it is almost always incorrect with respect to extended colors) |
| https://bugs.webkit.org/show_bug.cgi?id=212184 |
| |
| Reviewed by Dean Jackson. |
| |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm: |
| (WebKit::animationValueFromKeyframeValue): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| 2020-05-24 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Remove unused file since r261570 |
| |
| I forgot to remove DragAndDropHandler.h. |
| |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| * UIProcess/gtk/DragAndDropHandler.h: Removed. |
| |
| 2020-05-23 Charlie Turner <cturner@igalia.com> |
| |
| Error sending IPC message: Broken pipe |
| https://bugs.webkit.org/show_bug.cgi?id=206052 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| The Connection implementation on *nix was not handling socket |
| shutdowns gracefully, this was leading to many IPC error messages |
| being printed. It looks like the "errors" were actually |
| application issues, trying to send messages during socket shutdown |
| sequences, rather than more serious message drop problems. |
| |
| Unclear how to autotest this, but manual testing opening lots of tabs |
| definitely hits these codepaths. |
| |
| * Platform/IPC/unix/ConnectionUnix.cpp: |
| (IPC::Connection::readyReadHandler): Handle ECONNRESET by cleanly |
| closing the connection. |
| (IPC::Connection::sendOutputMessage): Ditto, also handle the |
| wrinkle that for "reasons", Linux can return EPIPE when it means |
| ECONNRESET. |
| |
| 2020-05-22 James Savage <james.savage@apple.com> |
| |
| Create Swift overlay for WebKit framework |
| https://bugs.webkit.org/show_bug.cgi?id=211270 |
| <rdar://problem/60549174> |
| |
| Reviewed by Brady Eidson. |
| |
| Provides Swift-only overlay methods for our NS_REFINED_FOR_SWIFT API. |
| The overlay does not provide different API than its Objective-C counterparts, |
| so overlay testing focuses on ensuring that the overlay produces the |
| expected interface, and provides the expected mappings to and from ObjC. |
| |
| The overlay is defined in a separate Xcode project (from WebKit) by |
| recommendation from the Swift team. Due to build system constraints this |
| project cannot be a sibbling of WebKit.xcodeproj, and must live in a |
| subdirectory. However, because it generally acts as part of the WebKit |
| framework, it still uses the same Version.xcconfig and source file |
| locations as standard WebKit sources. |
| |
| * SwiftOverlay/Configurations/Base.xcconfig: Added. Set some default |
| warnings and product configuration. |
| * SwiftOverlay/Configurations/WebKitSwiftOverlay-maccatalyst.xcconfig: Added. |
| Override SDK configurations to build for Catalyst. |
| * SwiftOverlay/Configurations/WebKitSwiftOverlay.xcconfig: Added. |
| These flags were all provided by the Xcode template. |
| * SwiftOverlay/Configurations/WebKitSwiftOverlayTests-maccatalyst.xcconfig: Added. |
| See above. |
| * SwiftOverlay/Configurations/WebKitSwiftOverlayTests.xcconfig: Added. |
| See above. |
| * SwiftOverlay/SwiftOverlay/install-swiftmodules.sh: Added. Provided by the |
| Swift team. |
| * SwiftOverlay/Tests/WebKitSwiftOverlayTests-Info.plist: Added. |
| * SwiftOverlay/Tests/WebKitTests.swift: Added. |
| (WebKitTests.testAPI): This ensures that the function names come through as we |
| expect them to. It also ensures that the functions were correctly set to |
| public visiblity. |
| (WebKitTests.testWKPDFConfigurationRect): This does the same as the above, but |
| also exercises the null <-> nil conversion, and that regular values are |
| correctly round tripped to Objective-C. |
| * SwiftOverlay/WebKitSwiftOverlay.xcodeproj/project.pbxproj: Added. |
| * SwiftOverlay/WebKitSwiftOverlay.xcodeproj/xcshareddata/xcschemes/Everything (Catalyst).xcscheme: Added. |
| * SwiftOverlay/WebKitSwiftOverlay.xcodeproj/xcshareddata/xcschemes/Everything.xcscheme: Added. |
| * UIProcess/API/Cocoa/WebKitSwiftOverlay.swift: Added. |
| (WKPDFConfiguration.rect): Provide mapping of CGRect.null to nil for Swift. |
| (WKWebView.callAsyncJavaScript(_:arguments:in:completion:)): Provide a Result |
| in the completion handler, and default value for arguments. |
| (WKWebView.evaluateJavaScript(_:in:completion:)): Ditto. |
| (WKWebView.createPDF(configuration:completionHandler:)): Provide a Swift function |
| that takes a Result<Data, Error> instead of (Data?, Error?) tuple. Provide |
| a default value for the configuration. |
| (WKWebView.createWebArchiveData(completionHandler:)): See above. |
| (WKWebView.find(_:configuration:completionHandler:)): See above. |
| |
| 2020-05-22 Chris Dumez <cdumez@apple.com> |
| |
| RELEASE_ASSERT() that InitializeWebKit2() is getting called on the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=212283 |
| |
| Reviewed by Alex Christensen. |
| |
| RELEASE_ASSERT() that InitializeWebKit2() is getting called on the main thread, behind |
| a linked-on-after check. In r217137, we tried to add a dispatch_sync() to the main thread to |
| work around the issue but it was a hack and it can cause deadlocks. It is best to force |
| developers to fix their code by crashing. |
| |
| * Shared/Cocoa/WebKit2InitializeCocoa.mm: |
| (WebKit::runInitializationCode): |
| (WebKit::InitializeWebKit2): |
| * UIProcess/Cocoa/VersionChecks.h: |
| |
| 2020-05-22 Alex Christensen <achristensen@webkit.org> |
| |
| Make download resume workaround forgiving of changes in CFNetwork |
| https://bugs.webkit.org/show_bug.cgi?id=212273 |
| |
| Reviewed by Geoffrey Garen. |
| |
| They broke my workaround. See rdar://problem/63512518 |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]): |
| |
| 2020-05-22 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [IPC] Add support for specifying `Async WantsConnection` in message files |
| https://bugs.webkit.org/show_bug.cgi?id=212276 |
| |
| Reviewed by Alex Christensen. |
| |
| Augments the IPC message receiver generation script to allow for "Async WantsConnection" in `.message.in` files. |
| Currently, specifying this in a message causes the `connection` argument to be passed twice when handling the |
| IPC message. This is because normal async IPC messages without replies normally don't have the `IPC::Connection` |
| argument, and use the overloaded `handleMessage(Connection& connection, ...)` version of `handleMessage` when |
| `WantsConnection` is specified. |
| |
| However, in the `Async` reply case, we already pass in the `IPC::Connection`. Instead of overloading the method |
| signature, we introduce a different method instead, named `handleMessageAsyncWantsConnection`, which forwards |
| the given `IPC::Connection` along to the member function. |
| |
| Test: TestAsyncMessageWithConnection |
| |
| * Platform/IPC/HandleMessage.h: |
| (IPC::handleMessageAsyncWantsConnection): |
| |
| Add another variant of the message receiver template, for the case where the message receiver wants a connection. |
| This is similar to handleMessageSynchronousWantsConnection, above. |
| |
| * Scripts/test-superclassMessageReceiver.cpp: |
| (Messages::WebPage::TestAsyncMessageWithConnection::callReply): |
| (Messages::WebPage::TestAsyncMessageWithConnection::cancelReply): |
| (Messages::WebPage::TestAsyncMessageWithConnection::send): |
| (WebKit::WebPage::didReceiveMessage): |
| * Scripts/test-superclassMessages.h: |
| (Messages::WebPage::TestAsyncMessageWithConnection::name): |
| (Messages::WebPage::TestAsyncMessageWithConnection::asyncMessageReplyName): |
| (Messages::WebPage::TestAsyncMessageWithConnection::TestAsyncMessageWithConnection): |
| (Messages::WebPage::TestAsyncMessageWithConnection::arguments const): |
| * Scripts/webkit/messages.py: |
| * Scripts/webkit/messages_unittest.py: |
| * Scripts/webkit/test-superclass.messages.in: |
| |
| 2020-05-22 Tim Horton <timothy_horton@apple.com> |
| |
| Excessive hang time in iOS Safari under waitForDidUpdateActivityState |
| https://bugs.webkit.org/show_bug.cgi?id=212272 |
| <rdar://problem/62787789> |
| |
| Reviewed by Andy Estes. |
| |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState): |
| Make the view state change timeout equivalent on iOS and macOS. |
| |
| We believe that it is preferable to paint white than block the UI |
| process main thread for half a second. Reduce the timeout on iOS |
| to be the same as it has been for years on macOS. |
| |
| 2020-05-22 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to unblock third party cookies from WKWebViews with ResourceLoadStatistics turned on |
| https://bugs.webkit.org/show_bug.cgi?id=212058 |
| <rdar://problem/60595539> |
| |
| Reviewed by John Wilander. |
| |
| This value makes NetworkDataTaskCocoa::blockCookies() not do anything for certain WKWebViews. |
| |
| * NetworkProcess/NetworkDataTask.cpp: |
| (WebKit::NetworkDataTask::create): |
| * NetworkProcess/NetworkLoadParameters.h: |
| * NetworkProcess/NetworkResourceLoadParameters.cpp: |
| (WebKit::NetworkResourceLoadParameters::encode const): |
| (WebKit::NetworkResourceLoadParameters::decode): |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::blockCookies): |
| (WebKit::NetworkDataTaskCocoa::unblockCookies): |
| (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPageCreationParameters.h: |
| * UIProcess/API/APIPageConfiguration.cpp: |
| (API::PageConfiguration::copy const): |
| * UIProcess/API/APIPageConfiguration.h: |
| (API::PageConfiguration::setAllowAllThirdPartyCookies): |
| (API::PageConfiguration::allowAllThirdPartyCookies const): |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration _allowAllThirdPartyCookies]): |
| (-[WKWebViewConfiguration _setAllowAllThirdPartyCookies:]): |
| * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::creationParameters): |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::addParametersShared): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::m_limitsNavigationsToAppBoundDomains): |
| |
| 2020-05-22 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r254859) DOM storage event gets fired at the frame that caused the storage modification |
| https://bugs.webkit.org/show_bug.cgi?id=211503 |
| <rdar://problem/62983284> |
| |
| Reviewed by Maciej Stachowiak. |
| |
| r254859 refactored StorageAreaMap's dispatchSessionStorageEvent() & |
| dispatchLocalStorageEvent() to share more code by moving that code to |
| a new framesForEventDispatching() static function. However, |
| framesForEventDispatching() was always using the session storage no |
| matter the call site. It should be using the local storage when called |
| from dispatchLocalStorageEvent(). |
| |
| Test: storage/domstorage/events/storage-event-not-in-originator.html |
| |
| * WebProcess/WebStorage/StorageAreaMap.cpp: |
| (WebKit::framesForEventDispatching): |
| (WebKit::StorageAreaMap::dispatchSessionStorageEvent): |
| (WebKit::StorageAreaMap::dispatchLocalStorageEvent): |
| |
| 2020-05-22 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r261978): Cannot click on links with trackpad on iPad |
| https://bugs.webkit.org/show_bug.cgi?id=212262 |
| |
| Reviewed by Andy Estes. |
| |
| No new tests; our current WKMouseGestureRecognizer testing strategy |
| unfortunately bypasses this particular problem. |
| |
| * UIProcess/ios/WKMouseGestureRecognizer.mm: |
| (-[WKMouseGestureRecognizer _hoverEntered:withEvent:]): |
| (-[WKMouseGestureRecognizer _hoverMoved:withEvent:]): |
| (-[WKMouseGestureRecognizer _hoverExited:withEvent:]): |
| (-[WKMouseGestureRecognizer _hoverCancelled:withEvent:]): |
| Don't call super in any of the hover callbacks now that we derive from |
| UIHoverGestureRecognizer. We want to wholly own the state of the gesture, |
| including differences from UIHoverGestureRecognizer behavior such as |
| remaining in the recognizing state while the trackpad button is pressed. |
| We don't need any of the code in the default implementation, so just |
| override it entirely. This returns behavior to what it was like before r261978. |
| |
| 2020-05-21 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Move Color coder definitions to Color to allow for future encaspulation improvements |
| https://bugs.webkit.org/show_bug.cgi?id=212247 |
| |
| Reviewed by Simon Fraser. |
| |
| Move IPC encoder/decoder definitions from WebKit down into Color itself to move closer |
| to making Color::rgb() private. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<Color>::encode): Deleted. |
| (IPC::ArgumentCoder<Color>::decode): Deleted. |
| * Shared/WebCoreArgumentCoders.h: |
| |
| 2020-05-21 Peng Liu <peng.liu6@apple.com> |
| |
| Fix issues of the Picture-in-Picture API under stress tests |
| https://bugs.webkit.org/show_bug.cgi?id=212191 |
| |
| Reviewed by Eric Carlson. |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenManagerProxy::enterFullscreen): |
| Mock the behavior of the VideoFullscreenInterface[AVKit|Mac] regarding |
| the Picture-in-Picture mode support. |
| |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenManager::didEnterFullscreen): |
| (WebKit::VideoFullscreenManager::didCleanupFullscreen): |
| Add callbacks for the end of entering/exiting fullscreen. |
| |
| 2020-05-21 Tyler Wilcock <twilco.o@protonmail.com> |
| |
| Fix misspelling -- m_releaseNetwrokActivityTimer --> m_releaseNetworkActivityTimer |
| https://bugs.webkit.org/show_bug.cgi?id=212237 |
| |
| Reviewed by Simon Fraser. |
| |
| No new tests required -- simply fixing a misspelling. |
| |
| * UIProcess/Cocoa/NavigationState.h: Rename m_releaseNetwrokActivityTimer to m_releaseNetworkActivityTimer |
| * UIProcess/Cocoa/NavigationState.mm: Rename m_releaseNetwrokActivityTimer to m_releaseNetworkActivityTimer |
| (WebKit::NavigationState::NavigationState): |
| (WebKit::NavigationState::releaseNetworkActivity): |
| (WebKit::NavigationState::didChangeIsLoading): |
| |
| 2020-05-21 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Remove trivial uses of Color::rgb() |
| https://bugs.webkit.org/show_bug.cgi?id=212231 |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (scrollViewBackgroundColor): |
| Replace colorWithOverrideAlpha() with Color::colorWithAlphaUsingAlternativeRounding() to avoid |
| unnecessary use of Color::rgb() |
| |
| 2020-05-21 Alex Christensen <achristensen@webkit.org> |
| |
| Use an OptionSet instead of uint8_t for MessageFlags |
| https://bugs.webkit.org/show_bug.cgi?id=212230 |
| <rdar://problem/63496543> |
| |
| Reviewed by Darin Adler. |
| |
| I also reduce the encoding size of OptionSet. |
| |
| * Platform/IPC/ArgumentCoders.h: |
| (IPC::ArgumentCoder<OptionSet<T>>::encode): |
| (IPC::ArgumentCoder<OptionSet<T>>::decode): |
| * Platform/IPC/Decoder.cpp: |
| (IPC::Decoder::isSyncMessage const): |
| (IPC::Decoder::shouldDispatchMessageWhenWaitingForSyncReply const): |
| (IPC::Decoder::shouldUseFullySynchronousModeForTesting const): |
| * Platform/IPC/Decoder.h: |
| * Platform/IPC/Encoder.cpp: |
| (IPC::Encoder::isSyncMessage const): |
| (IPC::Encoder::shouldDispatchMessageWhenWaitingForSyncReply const): |
| (IPC::Encoder::setIsSyncMessage): |
| (IPC::Encoder::setShouldDispatchMessageWhenWaitingForSyncReply): |
| (IPC::Encoder::setFullySynchronousModeForTesting): |
| (IPC::Encoder::messageFlags): |
| (IPC::Encoder::messageFlags const): |
| * Platform/IPC/Encoder.h: |
| * Platform/IPC/MessageFlags.h: |
| (): Deleted. |
| |
| 2020-05-21 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Allow configurable storage access scope |
| https://bugs.webkit.org/show_bug.cgi?id=212114 |
| <rdar://problem/63423063> |
| |
| Reviewed by Alex Christensen. |
| |
| The scope of storage access as per-frame or per-page was discussed in the |
| standards process here: https://github.com/privacycg/storage-access/issues/3 |
| |
| The decision was to have per-page storage access by default. Recent feedback |
| from Google and conversation with Mozilla suggest that we might want to |
| support the caller choosing the scope. |
| |
| This patch adds support for different scope configurations while keeping the |
| existing default as per-frame. A later patch will switch the default and add |
| test cases for per-page scope. |
| |
| Most of the changes is piping through the new enum |
| WebCore::StorageAccessScope from the call side to encode per-frame and |
| per-page access, and piping through the new struct |
| WebCore::RequestStorageAccessResult on the return side which carries full |
| information about the storage access request result. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::CompletionHandler<void): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess): |
| (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener): |
| (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess): |
| (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): |
| (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessEphemeral): |
| (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): |
| (WebKit::WebResourceLoadStatisticsStore::grantStorageAccessEphemeral): |
| (WebKit::WebResourceLoadStatisticsStore::grantStorageAccessInStorageSession): |
| Renamed from WebResourceLoadStatisticsStore::grantStorageAccess() |
| to reduce confusion since we already have another function called |
| WebResourceLoadStatisticsStore::grantStorageAccess(). |
| (WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::requestStorageAccess): |
| * NetworkProcess/NetworkConnectionToWebProcess.h: |
| * NetworkProcess/NetworkConnectionToWebProcess.messages.in: |
| * Scripts/webkit/messages.py: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::requestStorageAccess): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::requestStorageAccess): |
| * WebProcess/WebPage/WebPage.h: |
| |
| 2020-05-21 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> |
| |
| [PlayStation] Add minimal WKView API to enable TestWebKitAPI |
| https://bugs.webkit.org/show_bug.cgi?id=211868 |
| |
| Reviewed by Alex Christensen. |
| |
| Enable TestWebKitAPI |
| |
| * Platform/IPC/Connection.h: |
| * Platform/IPC/unix/ConnectionUnix.cpp: |
| (IPC::Connection::platformInvalidate): |
| (IPC::Connection::open): |
| Add SocketMonitor to monitor received messages. |
| |
| * UIProcess/API/APIProcessPoolConfiguration.cpp: |
| (API::ProcessPoolConfiguration::copy): |
| * UIProcess/API/APIProcessPoolConfiguration.h: |
| Add PlayStation specific members: WebProcess and NetworkProcess paths, and user ID. |
| |
| * UIProcess/Launcher/ProcessLauncher.h: |
| Add PlayStation specific members: Process path and user ID. |
| |
| * NetworkProcess/EntryPoint/playstation/NetworkProcessMain.cpp: Copied from Tools\TestWebKitAPI\playstation\main.cpp. |
| (loadLibraryOrExit): |
| (main): |
| * PlatformPlayStation.cmake: |
| * Shared/API/c/playstation/WKEventPlayStation.cpp: Added. |
| (WKKeyboardEventMake): |
| (WKMouseEventMake): |
| (WKWheelEventMake): |
| * Shared/API/c/playstation/WKEventPlayStation.h: Added. |
| * UIProcess/API/C/playstation/WKAPICastPlayStation.h: |
| (WebKit::toAPI<>): |
| (WebKit::toImpl<>): |
| * UIProcess/API/C/playstation/WKContextConfigurationPlayStation.cpp: Copied from Tools\TestWebKitAPI\playstation\PlatformUtilitiesPlayStation.cpp. |
| (WKContextConfigurationSetWebProcessPath): |
| (WKContextConfigurationCopyWebProcessPath): |
| (WKContextConfigurationSetNetworkProcessPath): |
| (WKContextConfigurationCopyNetworkProcessPath): |
| (WKContextConfigurationSetUserId): |
| (WKContextConfigurationGetUserId): |
| * UIProcess/API/C/playstation/WKContextConfigurationPlayStation.h: Copied from Source\WebKit\UIProcess\API\C\playstation\WKView.h. |
| * UIProcess/API/C/playstation/WKPagePrivatePlayStation.cpp: Added. |
| (WKPageHandleKeyboardEvent): |
| (WKPageHandleMouseEvent): |
| (WKPageHandleWheelEvent): |
| * UIProcess/API/C/playstation/WKPagePrivatePlayStation.h: Copied from Source\WebKit\UIProcess\API\C\playstation\WKView.h. |
| * UIProcess/API/C/playstation/WKView.cpp: Copied from Source\WebKit\WebProcess\InjectedBundle\playstation\InjectedBundlePlayStation.cpp. |
| (WKViewCreate): |
| (WKViewGetPage): |
| * UIProcess/API/C/playstation/WKView.h: |
| * UIProcess/Launcher/playstation/ProcessLauncherPlayStation.cpp: |
| (WebKit::defaultProcessPath): |
| (WebKit::ProcessLauncher::launchProcess): |
| (WebKit::ProcessLauncher::terminateProcess): |
| (WebKit::ProcessLauncher::platformInvalidate): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::getLaunchOptions): |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::getLaunchOptions): |
| * UIProcess/playstation/PageClientImpl.cpp: Added. |
| (WebKit::PageClientImpl::PageClientImpl): |
| (WebKit::PageClientImpl::createDrawingAreaProxy): |
| (WebKit::PageClientImpl::setViewNeedsDisplay): |
| (WebKit::PageClientImpl::requestScroll): |
| (WebKit::PageClientImpl::viewScrollPosition): |
| (WebKit::PageClientImpl::viewSize): |
| (WebKit::PageClientImpl::isViewWindowActive): |
| (WebKit::PageClientImpl::isViewFocused): |
| (WebKit::PageClientImpl::isViewVisible): |
| (WebKit::PageClientImpl::isViewInWindow): |
| (WebKit::PageClientImpl::processDidExit): |
| (WebKit::PageClientImpl::didRelaunchProcess): |
| (WebKit::PageClientImpl::pageClosed): |
| (WebKit::PageClientImpl::preferencesDidChange): |
| (WebKit::PageClientImpl::toolTipChanged): |
| (WebKit::PageClientImpl::didCommitLoadForMainFrame): |
| (WebKit::PageClientImpl::handleDownloadRequest): |
| (WebKit::PageClientImpl::didChangeContentSize): |
| (WebKit::PageClientImpl::setCursor): |
| (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): |
| (WebKit::PageClientImpl::didChangeViewportProperties): |
| (WebKit::PageClientImpl::registerEditCommand): |
| (WebKit::PageClientImpl::clearAllEditCommands): |
| (WebKit::PageClientImpl::canUndoRedo): |
| (WebKit::PageClientImpl::executeUndoRedo): |
| (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): |
| (WebKit::PageClientImpl::convertToDeviceSpace): |
| (WebKit::PageClientImpl::convertToUserSpace): |
| (WebKit::PageClientImpl::screenToRootView): |
| (WebKit::PageClientImpl::rootViewToScreen): |
| (WebKit::PageClientImpl::accessibilityScreenToRootView): |
| (WebKit::PageClientImpl::rootViewToAccessibilityScreen): |
| (WebKit::PageClientImpl::doneWithKeyEvent): |
| (WebKit::PageClientImpl::createPopupMenuProxy): |
| (WebKit::PageClientImpl::enterAcceleratedCompositingMode): |
| (WebKit::PageClientImpl::exitAcceleratedCompositingMode): |
| (WebKit::PageClientImpl::updateAcceleratedCompositingMode): |
| (WebKit::PageClientImpl::fullScreenManagerProxyClient): |
| (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider): |
| (WebKit::PageClientImpl::navigationGestureDidBegin): |
| (WebKit::PageClientImpl::navigationGestureWillEnd): |
| (WebKit::PageClientImpl::navigationGestureDidEnd): |
| (WebKit::PageClientImpl::willRecordNavigationSnapshot): |
| (WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot): |
| (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame): |
| (WebKit::PageClientImpl::didFinishLoadForMainFrame): |
| (WebKit::PageClientImpl::didFailLoadForMainFrame): |
| (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): |
| (WebKit::PageClientImpl::didChangeBackgroundColor): |
| (WebKit::PageClientImpl::isPlayingAudioWillChange): |
| (WebKit::PageClientImpl::isPlayingAudioDidChange): |
| (WebKit::PageClientImpl::refView): |
| (WebKit::PageClientImpl::derefView): |
| (WebKit::PageClientImpl::didRestoreScrollPosition): |
| (WebKit::PageClientImpl::userInterfaceLayoutDirection): |
| (WebKit::PageClientImpl::requestDOMPasteAccess): |
| * UIProcess/playstation/PageClientImpl.h: Added. |
| * UIProcess/playstation/WebProcessPoolPlayStation.cpp: |
| (WebKit::WebProcessPool::platformInitialize): |
| * UIProcess/playstation/PlayStationWebView.cpp: Copied from Source\WebKit\UIProcess\playstation\WebProcessPoolPlayStation.cpp. |
| (WebKit::PlayStationWebView::create): |
| (WebKit::PlayStationWebView::PlayStationWebView): |
| (WebKit::PlayStationWebView::~PlayStationWebView): |
| (WebKit::PlayStationWebView::isActive const): |
| (WebKit::PlayStationWebView::isFocused const): |
| (WebKit::PlayStationWebView::isVisible const): |
| * UIProcess/playstation/PlayStationWebView.h: Copied from Source\WebKit\WebProcess\InjectedBundle\playstation\InjectedBundlePlayStation.cpp. |
| (WebKit::PlayStationWebView::page): |
| * WebProcess/EntryPoint/playstation/WebProcessMain.cpp: Copied from Tools\TestWebKitAPI\playstation\main.cpp. |
| (loadLibraryOrExit): |
| (main): |
| * WebProcess/InjectedBundle/playstation/InjectedBundlePlayStation.cpp: |
| (WebKit::InjectedBundle::initialize): |
| (WebKit::InjectedBundle::setBundleParameter): |
| * WebProcess/WebPage/AcceleratedSurface.cpp: |
| (WebKit::AcceleratedSurface::create): |
| |
| 2020-05-21 Chris Dumez <cdumez@apple.com> |
| |
| Address post review comments from Mitz after r262004. |
| |
| * Shared/mac/AuxiliaryProcessMac.mm: |
| (WebKit::sandboxDataVaultParentDirectory): |
| |
| 2020-05-21 Chris Dumez <cdumez@apple.com> |
| |
| [WK2] WebKit abandons compiled sandbox profiles |
| https://bugs.webkit.org/show_bug.cgi?id=212177 |
| <rdar://problem/54613619> |
| |
| Reviewed by Saam Barati. |
| |
| WebKit generates new compiled sandbox profiles whenever sandbox profiles are updated or |
| whenever webkit directories change (which is super common for WebKitTestRunner). Previous |
| compiled sandbox profiles do not get deleted and therefore may accumulate. |
| |
| To address the issue, we now save compiled sandbox profiles under _CS_DARWIN_USER_TEMP_DIR |
| instead of _CS_DARWIN_USER_CACHE_DIR. The system takes care of deleting the files under |
| _CS_DARWIN_USER_TEMP_DIR upon reboot or if they have not been accessed for 3 days. |
| |
| * Shared/mac/AuxiliaryProcessMac.mm: |
| (WebKit::sandboxDataVaultParentDirectory): |
| |
| 2020-05-21 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the iOS 13.4 build after r261978 |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| |
| Only declare `_UIHoverEventRespondable` if HAVE(UI_HOVER_EVENT_RESPONDABLE) is defined. |
| |
| * UIProcess/ios/WKMouseGestureRecognizer.mm: |
| |
| If `_UIHoverEventRespondable` is not present, fall back to declaring internal methods on |
| `UIHoverGestureRecognizer`. |
| |
| 2020-05-21 Yoshiaki JITSUKAWA <yoshiaki.jitsukawa@sony.com> |
| |
| [ConnectionUnix] Set MSG_NOSIGNAL to avoid SIGPIPE |
| https://bugs.webkit.org/show_bug.cgi?id=211719 |
| |
| Reviewed by Don Olmstead. |
| |
| Set MSG_NOSIGNAL to sendmsg()/resvmsg() in order to avoid |
| SIGPIPE when the other process disappears. |
| * Platform/IPC/unix/ConnectionUnix.cpp: |
| (IPC::readBytesFromSocket): |
| (IPC::Connection::sendOutputMessage): |
| |
| 2020-05-21 Enrique Ocaña González <eocanha@igalia.com> |
| |
| [GStreamer][GTK][WPE] Expose and honor the media content types requiring hardware support setting |
| https://bugs.webkit.org/show_bug.cgi?id=211950 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Expose mediaContentTypesRequiringHardwareSupport as a setting on WPE and WebKitGTK. |
| |
| * UIProcess/API/glib/WebKitSettings.cpp: |
| (_WebKitSettingsPrivate::_WebKitSettingsPrivate): |
| (webKitSettingsSetProperty): |
| (webKitSettingsGetProperty): |
| (webkit_settings_class_init): |
| (webkit_settings_get_media_content_types_requiring_hardware_support): |
| (webkit_settings_set_media_content_types_requiring_hardware_support): |
| * UIProcess/API/gtk/WebKitSettings.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: |
| * UIProcess/API/wpe/WebKitSettings.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| |
| 2020-05-20 Darin Adler <darin@apple.com> |
| |
| Dictation context should be an object identifier, not a type-punned pointer |
| https://bugs.webkit.org/show_bug.cgi?id=212174 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Scripts/webkit/messages.py: Added DictationContext to the list of types that are |
| not C++ classes. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<DictationAlternative>::encode): Updated for change to |
| DictationAlternative structure. |
| (IPC::ArgumentCoder<DictationAlternative>::decode): Ditto. |
| |
| * UIProcess/Cocoa/PageClientImplCocoa.h: Use DictationContext instead of uint64_t. |
| * UIProcess/Cocoa/PageClientImplCocoa.mm: |
| (WebKit::PageClientImplCocoa::addDictationAlternatives): Ditto. |
| (WebKit::PageClientImplCocoa::removeDictationAlternatives): Ditto. |
| (WebKit::PageClientImplCocoa::dictationAlternatives): Ditto. |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::insertDictatedTextAsync): Ditto. |
| * UIProcess/PageClient.h: Ditto. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::showDictationAlternativeUI): Ditto. |
| (WebKit::WebPageProxy::removeDictationAlternatives): Ditto. |
| (WebKit::WebPageProxy::dictationAlternatives): Ditto. |
| * UIProcess/WebPageProxy.h: Ditto. |
| * UIProcess/WebPageProxy.messages.in: Ditto. |
| * UIProcess/ios/PageClientImplIOS.h: Ditto. |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::showDictationAlternativeUI): Ditto. |
| * UIProcess/mac/PageClientImplMac.h: Ditto. |
| * UIProcess/mac/PageClientImplMac.mm: |
| (WebKit::PageClientImpl::showDictationAlternativeUI): Ditto. |
| |
| * UIProcess/mac/WebPageProxyMac.mm: Removed unneeded include of |
| DictationAlternative.h. |
| |
| * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Use DictationContext |
| instead of uint64_t. Also marked class final and made everything private. |
| * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: |
| (WebKit::WebAlternativeTextClient::removeDictationAlternatives): Ditto. |
| (WebKit::WebAlternativeTextClient::showDictationAlternativeUI): Ditto. |
| (WebKit::WebAlternativeTextClient::dictationAlternatives): Ditto. |
| |
| 2020-05-20 Tim Horton <timothy_horton@apple.com> |
| |
| WKMouseGestureRecognizer should be implemented without using UIKit internals |
| https://bugs.webkit.org/show_bug.cgi?id=212173 |
| <rdar://problem/61163726> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView gestureRecognizer:shouldReceiveTouch:]): |
| * UIProcess/ios/WKMouseGestureRecognizer.h: |
| * UIProcess/ios/WKMouseGestureRecognizer.mm: |
| (-[WKMouseGestureRecognizer _hoverEntered:withEvent:]): |
| (-[WKMouseGestureRecognizer initWithTarget:action:]): Deleted. |
| (-[WKMouseGestureRecognizer setView:]): Deleted. |
| (-[WKMouseGestureRecognizer _wantsHoverEvents]): Deleted. |
| (-[WKMouseGestureRecognizer canPreventGestureRecognizer:]): Deleted. |
| (-[WKMouseGestureRecognizer canBePreventedByGestureRecognizer:]): Deleted. |
| Reimplement WKMouseGestureRecognizer as a UIHoverGestureRecognizer subclass, |
| so we can decouple ourselves a bit from UIKit internals. |
| |
| 2020-05-20 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Fix message filter sandbox violation |
| https://bugs.webkit.org/show_bug.cgi?id=212100 |
| <rdar://problem/63407155> |
| |
| Reviewed by Brent Fulgham. |
| |
| A message needs to be added to the message filter in the WebContent sandbox on iOS. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-20 Sam Weinig <weinig@apple.com> |
| |
| Replace Color::getHSL() with sRGBToHSL to ensure it at least gives somewhat sensible results for ExtendedColors and reduce code duplication |
| https://bugs.webkit.org/show_bug.cgi?id=212143 |
| |
| Reviewed by Simon Fraser. |
| |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (-[WKWebView _updateScrollViewBackground]): |
| Switch to using Color::lightness(). |
| |
| 2020-05-20 Megan Gardner <megan_gardner@apple.com> |
| |
| Hide password echo when screen is being captured. |
| https://bugs.webkit.org/show_bug.cgi?id=212060 |
| <rdar://problem/47653578> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Use the UIScreen state and notification to determine if the |
| screen is being shared or captured. This flag is for all |
| capture methods, Air Play, Screen Recording, etc. If the screen is |
| being captured, turn off the password echo to prevent the password from |
| being leaked. |
| |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WKContentView.mm: |
| (-[WKContentView _commonInitializationWithProcessPool:configuration:]): |
| (-[WKContentView _screenCapturedDidChange:]): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::setIsScreenCaptured): |
| * WebProcess/WebCoreSupport/WebEditorClient.h: |
| * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm: |
| (WebKit::WebEditorClient::isScreenCaptured const): |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::isScreenCaptured const): |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::setIsScreenCaptured): |
| |
| 2020-05-20 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Implement connected and disconnected events of GAMEPAD API with libmanette |
| https://bugs.webkit.org/show_bug.cgi?id=133854 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This patch brings initial GAMEPAD API support to the gtk port. We use libmanette, |
| a simple GObject game controller library to handle gamepad connection and input. |
| |
| * SourcesGTK.txt: |
| * UIProcess/Gamepad/UIGamepadProvider.cpp: Add a build flag to void default interface |
| * UIProcess/Gamepad/gtk/UIGamepadProviderGtk.cpp: Added to retrieve WebPageProxy to which |
| a gamepad connects. The returned WebPageProxy handles input events from the gamepad. |
| (WebKit::getWebPageProxy): |
| (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput): |
| * UIProcess/Gamepad/manette/UIGamepadProviderManette.cpp: Added. |
| (WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider): |
| (WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput): |
| (WebKit::UIGamepadProvider::platformStopMonitoringInput): |
| (WebKit::UIGamepadProvider::platformStartMonitoringInput): |
| |
| 2020-05-20 Kate Cheney <katherine_cheney@apple.com> |
| |
| Support operating dates in ResourceLoadStatisticsDatabaseStore |
| https://bugs.webkit.org/show_bug.cgi?id=212034 |
| <rdar://problem/63349242> |
| |
| Reviewed by Brent Fulgham. |
| |
| Tests: http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed-database.html |
| http/tests/resourceLoadStatistics/operating-dates-all-but-cookies-removed.html |
| http/tests/resourceLoadStatistics/operating-dates-all-website-data-removed-database.html |
| http/tests/resourceLoadStatistics/operating-dates-all-website-data-removed.html |
| |
| Patch to support Operating Dates in the ResourceLoadStatisticsDatabaseStore. |
| Moves functions out of ResourceLoadStatisticsStore now that each store |
| needs its own implementation. |
| |
| Adds a new function for testing which inserts an expired statistic |
| and makes sure the proper behavior occurs depending on additional |
| parameters. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::createTableQueries): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::checkForMissingTablesInSchema): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::createUniqueIndices): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::getLeastRecentOperatingDate): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::mergeOperatingDates): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::includeTodayAsOperatingDateIfNecessary): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::hasStatisticsExpired const): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::insertExpiredStatisticForTesting): |
| Migrated Operating Dates functions from ResourceLoadStatisticsStore and implemented |
| them using SQLite instead of a vector. Functionality is |
| identical to the original in-memory implementation. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore): |
| (WebKit::ResourceLoadStatisticsMemoryStore::mergeOperatingDates): |
| (WebKit::ResourceLoadStatisticsMemoryStore::includeTodayAsOperatingDateIfNecessary): |
| (WebKit::ResourceLoadStatisticsMemoryStore::hasStatisticsExpired const): |
| (WebKit::ResourceLoadStatisticsMemoryStore::insertExpiredStatisticForTesting): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: |
| Migrated Operating Dates functions from ResourceLoadStatisticsStore |
| now that the database store does not use them. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: |
| (WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk): |
| Spelling error. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: |
| (WebKit::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore): |
| (WebKit::ResourceLoadStatisticsStore::updateCookieBlockingForDomains): |
| (WebKit::ResourceLoadStatisticsStore::statisticsEpirationTime const): Deleted. |
| (WebKit::ResourceLoadStatisticsStore::mergeOperatingDates): Deleted. |
| (WebKit::ResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary): Deleted. |
| (WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const): Deleted. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| (WebKit::OperatingDate::year const): |
| (WebKit::OperatingDate::month const): |
| (WebKit::OperatingDate::monthDay const): |
| These functions should be public now that they are needed outside |
| of this file after migrating OperatingDates functions. |
| |
| (WebKit::ResourceLoadStatisticsStore::parameters const): |
| (WebKit::ResourceLoadStatisticsStore::operatingDates const): Deleted. |
| (WebKit::ResourceLoadStatisticsStore::clearOperatingDates): Deleted. |
| Moved OperatingDates functions to the memory store. Moved |
| operatingDatesWindow constexpr variables to the header file so that |
| the database and memory stores can both use them. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::insertExpiredStatisticForTesting): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::insertExpiredStatisticForTesting): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreSetStatisticsExpiredStatistic): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::insertExpiredStatisticForTesting): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::mergeStatisticForTesting): |
| (WebKit::WebsiteDataStore::insertExpiredStatisticForTesting): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| Function to add expired statistic to the ITP store. |
| |
| 2020-05-20 Chris Dumez <cdumez@apple.com> |
| |
| Deprecate WKBundlePageSetPolicyClient() Injected bundle C API |
| https://bugs.webkit.org/show_bug.cgi?id=212166 |
| |
| Reviewed by Alex Christensen. |
| |
| Deprecate WKBundlePageSetPolicyClient() Injected bundle C API. Approving navigations from |
| the injected bundle can lead to WebProcess terminations like in <rdar://problem/60340647> |
| because the WebProcess is not in a position to do sandbox checks when navigating to file |
| URLs. |
| |
| * WebProcess/InjectedBundle/API/c/WKBundlePage.h: |
| |
| 2020-05-20 Simon Fraser <simon.fraser@apple.com> |
| |
| Plumb the display's nominal refresh rate down to ScrollingTree for use in scroll synchronization |
| https://bugs.webkit.org/show_bug.cgi?id=212159 |
| |
| Reviewed by Tim Horton. |
| |
| Plumb an Optional<unsigned> down windowScreenDidChange, which contains the nominal |
| display refresh rate (as frames per second) if available. On macOS, we get this |
| from CVDisplayLinkGetNominalOutputVideoRefreshPeriod(). |
| |
| To read it, WebProcessPool::nominalFramesPerSecondForDisplay() makes a DisplayLink |
| that doesn't get any observers, but that DisplayLink will very likely get used |
| as soon as we schedule a rendering update. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::nominalFramesPerSecondForDisplay): |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::windowDidChangeScreen): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::windowScreenDidChange): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/mac/DisplayLink.cpp: |
| (WebKit::DisplayLink::DisplayLink): |
| (WebKit::DisplayLink::nominalFramesPerSecond const): |
| * UIProcess/mac/DisplayLink.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: |
| (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::windowScreenDidChange): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-05-20 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [iPadOS] -webkit-text-size-adjust:percentage doesn't work in native apps |
| https://bugs.webkit.org/show_bug.cgi?id=212122 |
| <rdar://problem/54560875> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * Shared/WebsitePoliciesData.cpp: |
| (WebKit::WebsitePoliciesData::encode const): |
| (WebKit::WebsitePoliciesData::decode): |
| (WebKit::WebsitePoliciesData::applyToDocumentLoader): |
| * Shared/WebsitePoliciesData.h: |
| * UIProcess/API/APIWebsitePolicies.cpp: |
| (API::WebsitePolicies::copy const): |
| (API::WebsitePolicies::data): |
| * UIProcess/API/APIWebsitePolicies.h: |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies): |
| |
| 2020-05-20 Kate Cheney <katherine_cheney@apple.com> |
| |
| REGRESSION (r261892) [ Mac Debug ] 4 API tests failing related to ResourceLoadStatistics |
| https://bugs.webkit.org/show_bug.cgi?id=212153 |
| <rdar://problem/63452541> |
| |
| Reviewed by Sihui Liu. |
| |
| Accidentally deleted necessary reset() call for a SQLite statement |
| when converting stored statements to SQLiteStatementAutoResetScope in |
| https://trac.webkit.org/changeset/261892/webkit. |
| |
| This statement is used in a loop with multiple bind() calls so it must be reset. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::checkForMissingTablesInSchema): |
| |
| 2020-05-20 Eric Carlson <eric.carlson@apple.com> |
| |
| Update some media logging |
| https://bugs.webkit.org/show_bug.cgi?id=212109 |
| <rdar://problem/63424816> |
| |
| Unreviewed, remove a change unintentionally included in r261899. |
| |
| * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: |
| (-[WKFullScreenWindowController _interactivePinchDismissChanged:]): |
| |
| 2020-05-20 Andy Estes <aestes@apple.com> |
| |
| [Mac] UI processes spin when creating the "Share" context menu item |
| https://bugs.webkit.org/show_bug.cgi?id=212137 |
| <rdar://problem/54498394> |
| |
| Reviewed by Wenson Hsieh. |
| |
| On Mac, WebKit has been using the +[NSMenuItem standardShareMenuItemForItems:] SPI to create |
| the "Share" context submenu and menu item. This call performs synchronous IPC and can result |
| in UI process spins. |
| |
| Where available, switch to using the asynchronous |
| -[NSSharingServicePicker getMenuWithCompletion:] SPI instead. This method only creates the |
| submenu, not the menu item, so when using this new method we must create the "Share" menu |
| item ourselves. |
| |
| * UIProcess/mac/WebContextMenuProxyMac.h: |
| * UIProcess/mac/WebContextMenuProxyMac.mm: |
| (WebKit::getStandardShareMenuItem): |
| (WebKit::WebContextMenuProxyMac::getShareMenuItem): |
| (WebKit::WebContextMenuProxyMac::getContextMenuFromItems): |
| (WebKit::WebContextMenuProxyMac::getContextMenuItem): |
| (WebKit::WebContextMenuProxyMac::showContextMenuWithItems): |
| (WebKit::WebContextMenuProxyMac::createShareMenuItem): Deleted. |
| (WebKit::WebContextMenuProxyMac::createContextMenuFromItems): Deleted. |
| (WebKit::WebContextMenuProxyMac::createContextMenuItem): Deleted. |
| |
| 2020-05-20 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK4 build with GTK 3.98.4 |
| |
| * PlatformGTK.cmake: |
| * UIProcess/API/gtk/WebKitPrintOperation.cpp: |
| (webkitPrintOperationRunDialog): |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseAddDialog): |
| (webkitWebViewBaseRemoveChild): |
| (webkitWebViewBaseContainerForall): |
| (webkitWebViewBaseAddWebInspector): |
| (webkitWebViewBaseRemoveWebInspector): |
| (webkitWebViewBaseDispose): |
| (webkitWebViewBaseSizeAllocate): |
| (webkitWebViewBaseConstructed): |
| (webkit_web_view_base_class_init): |
| * UIProcess/API/gtk/WebKitWebViewBase.h: Removed. |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: |
| (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): |
| (WebKit::RemoteWebInspectorProxy::platformSave): |
| * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: |
| (WebKit::WebInspectorProxy::platformCreateFrontendWindow): |
| (WebKit::WebInspectorProxy::platformAttach): |
| (WebKit::WebInspectorProxy::platformDetach): |
| (WebKit::WebInspectorProxy::platformSave): |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for drag and drop operations |
| https://bugs.webkit.org/show_bug.cgi?id=211779 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/API/gtk/DragSource.h: |
| * UIProcess/API/gtk/DragSourceGtk4.cpp: |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DropTarget.h: |
| * UIProcess/API/gtk/DropTargetGtk4.cpp: |
| (WebKit::DropTarget::DropTarget): |
| (WebKit::DropTarget::~DropTarget): |
| (WebKit::DropTarget::accept): |
| (WebKit::DropReadAsyncData::DropReadAsyncData): |
| (WebKit::DropTarget::loadData): |
| (WebKit::DropTarget::didLoadData): |
| (WebKit::DropTarget::enter): |
| (WebKit::DropTarget::update): |
| (WebKit::DropTarget::didPerformAction): |
| (WebKit::DropTarget::leave): |
| (WebKit::DropTarget::drop): |
| |
| 2020-05-19 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION (r258919): fast/events/ios/key-events-comprehensive/key-events-control tests are failing |
| https://bugs.webkit.org/show_bug.cgi?id=212124 |
| <rdar://problem/60893744> |
| |
| Reviewed by Tim Horton. |
| |
| After the changes in r258919, WKContentView's text input traits report that we're in a single line input, even |
| when there is no editable focused element. This prevents UIKit from allowing WebKit to handle the `CTRL + M` |
| key command, which is interpreted at the system level as inserting a line break in a multi-line editable area. |
| |
| It seems odd to consider ourselves in a single line input when there isn't even an editable element focused |
| element; for now, we can fix these failing tests by just going with the default value for the text input traits' |
| `setIsSingleLineDocument` property, but not explicitly setting it to either `NO` or `YES` when no element is |
| focused. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView textInputTraits]): |
| |
| 2020-05-19 Sam Weinig <weinig@apple.com> |
| |
| Remove almost always incorrect Color::getRGBA |
| https://bugs.webkit.org/show_bug.cgi?id=212059 |
| |
| Reviewed by Darin Adler and Simon Fraser. |
| |
| * UIProcess/API/wpe/WebKitColor.cpp: |
| (webkitColorFillFromWebCoreColor): |
| * UIProcess/gtk/ViewGestureControllerGtk.cpp: |
| (WebKit::ViewGestureController::beginSwipeGesture): |
| * WebProcess/WebPage/WebFrame.cpp: |
| (WebKit::WebFrame::getDocumentBackgroundColor): |
| Replace Color::getRGBA with Color::toSRGBAComponentsLossy() |
| |
| 2020-05-19 Simon Fraser <simon.fraser@apple.com> |
| |
| Use an ObjectIdentifier<> for DisplayLink observer IDs |
| https://bugs.webkit.org/show_bug.cgi?id=212112 |
| |
| Reviewed by Per Arne Vollan. |
| |
| Replace unsigned observerID with DisplayLinkObserverID, which is a typesafe ObjectIdentifier<>. |
| |
| Use PlatformDisplayID in more places. |
| |
| * Scripts/webkit/messages.py: |
| * Shared/DisplayLinkObserverID.h: Copied from Source/WebKit/UIProcess/mac/DisplayLink.h. |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::startDisplayLink): |
| (WebKit::WebProcessPool::stopDisplayLink): |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/WebProcessProxy.messages.in: |
| * UIProcess/mac/DisplayLink.cpp: |
| (WebKit::DisplayLink::addObserver): |
| (WebKit::DisplayLink::removeObserver): |
| * UIProcess/mac/DisplayLink.h: |
| * UIProcess/mac/WebProcessProxyMac.mm: |
| (WebKit::WebProcessProxy::startDisplayLink): |
| (WebKit::WebProcessProxy::stopDisplayLink): |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebPage/mac/DrawingAreaMac.cpp: |
| (WebKit::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac): |
| |
| 2020-05-19 Alex Christensen <achristensen@webkit.org> |
| |
| Add _WKDownloadDelegate callback including totalBytesWritten |
| https://bugs.webkit.org/show_bug.cgi?id=212110 |
| <rdar://problem/63358981> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Without this new callback, after resuming a download, a client has no way to tell whether the download was successfully |
| resumed by a server that has proper etag and range request support or whether the download began at the beginning again. |
| A client was guessing that the download did not restart, causing incorrect reported download sizes when the download did restart. |
| Luckily, the data on disk was not corrupted, just the UI. This allows us to fix the UI. |
| |
| Testing covered by expanding the API test for resuming downloads. |
| |
| * NetworkProcess/Downloads/Download.cpp: |
| (WebKit::Download::didReceiveData): |
| * NetworkProcess/Downloads/Download.h: |
| * NetworkProcess/NetworkDataTaskBlob.cpp: |
| (WebKit::NetworkDataTaskBlob::writeDownload): |
| * NetworkProcess/NetworkDataTaskBlob.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): |
| * UIProcess/API/APIDownloadClient.h: |
| (API::DownloadClient::didReceiveData): |
| * UIProcess/API/C/WKContext.cpp: |
| (WKContextSetDownloadClient): |
| * UIProcess/API/Cocoa/_WKDownloadDelegate.h: |
| * UIProcess/Cocoa/DownloadClient.h: |
| * UIProcess/Cocoa/DownloadClient.mm: |
| (WebKit::DownloadClient::DownloadClient): |
| (WebKit::DownloadClient::didReceiveResponse): |
| (WebKit::DownloadClient::didReceiveData): |
| * UIProcess/Downloads/DownloadProxy.cpp: |
| (WebKit::DownloadProxy::didReceiveData): |
| * UIProcess/Downloads/DownloadProxy.h: |
| (WebKit::DownloadProxy::expectedContentLength const): Deleted. |
| (WebKit::DownloadProxy::setExpectedContentLength): Deleted. |
| (WebKit::DownloadProxy::bytesLoaded const): Deleted. |
| (WebKit::DownloadProxy::setBytesLoaded): Deleted. |
| * UIProcess/Downloads/DownloadProxy.messages.in: |
| |
| 2020-05-19 Kate Cheney <katherine_cheney@apple.com> |
| |
| ITP database should finalize all prepared statements before closing |
| https://bugs.webkit.org/show_bug.cgi?id=211929 |
| <rdar://problem/63246945> |
| |
| Reviewed by John Wilander. |
| |
| No new tests, behavior confirmed by existing tests. |
| |
| Convert all SQLite statement objects to be unique pointers to better |
| manage the lifetime of each statement object. Only initialize and |
| prepare an object when it is needed instead of preparing all objects |
| at once. Set each statement to null before closing the database |
| because ~SQLiteStatement() will finalize the statement. |
| |
| This patch removes all reset() commands now that we initialize |
| each statement using SQLiteStatementAutoResetScope. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::close): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::getScopedStatement const): |
| Function to initialize and prepare a statement. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationship): |
| This function is not used and can be deleted. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::checkForMissingTablesInSchema): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::isMigrationNecessary): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::isEmpty const): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::destroyStatements): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::insertObservedDomain): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::domainID const): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::merge): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistic): |
| (WebKit::CompletionHandler<void): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements): Deleted. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| Updated all statement variables to end with "Statement" to follow the |
| established pattern. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore): |
| |
| 2020-05-19 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Fix message filter sandbox violation |
| https://bugs.webkit.org/show_bug.cgi?id=212100 |
| <rdar://problem/63407155> |
| |
| Reviewed by Andy Estes. |
| |
| A message needs to be added to the message filter in the WebContent sandbox on iOS. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-19 Kate Cheney <katherine_cheney@apple.com> |
| |
| Revert WebKitTestRunner to reset ITP to the memory store between all tests. |
| https://bugs.webkit.org/show_bug.cgi?id=212094 |
| <rdar://problem/63405806> |
| |
| Reviewed by Chris Dumez. |
| |
| Changing this in https://bugs.webkit.org/show_bug.cgi?id=211637 caused |
| test flakiness. |
| |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreStatisticsResetToConsistentState): |
| |
| 2020-05-19 Simon Fraser <simon.fraser@apple.com> |
| |
| Push a PlatformDisplayID to scrolling trees, and allow the scrolling thread to get displayDidRefresh notifications |
| https://bugs.webkit.org/show_bug.cgi?id=211034 |
| |
| Reviewed by Sam Weinig. |
| |
| Prep work for webkit.org/b210884. |
| |
| Have EventDispatcher call displayDidRefresh() on each scrolling tree it knows about. It calls this |
| on the EventDispatcher thread; the scrolling tree is responsible for bouncing that to the scrolling thread. |
| |
| * WebProcess/WebPage/EventDispatcher.cpp: |
| (WebKit::EventDispatcher::displayDidRefreshOnScrollingThread): |
| (WebKit::EventDispatcher::displayWasRefreshed): |
| * WebProcess/WebPage/EventDispatcher.h: |
| |
| 2020-05-19 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Drag and drop within a contenteditable area duplicates attachment-backed images |
| https://bugs.webkit.org/show_bug.cgi?id=212075 |
| <rdar://problem/62434146> |
| |
| Reviewed by Andy Estes. |
| |
| When the attachment API is enabled, starting a drag on an attachment-element-backed image within a |
| contenteditable area sometimes causes the ranged selection to collapse. This is because `WebViewImpl::startDrag` |
| has a separate codepath for starting a drag with attachment metadata that doesn't invoke `NSView`'s deprecated |
| `-dragImage:at:offset:event:pasteboar:source:slideBack:` method, but instead uses |
| `-beginDraggingSessionWithItems:event:source:`. While the former spins the runloop until the end of the drag |
| session, the latter does not and returns immediately after beginning the drag. As a result, |
| `WebPageProxy::didStartDrag()` is actually invoked after the drag ends when dragging non-attachment content, |
| whereas `WebPageProxy::didStartDrag()` is invoked immediately after beginning the drag when starting a drag in |
| an attachment or attachment-backed image element. |
| |
| This call to `didStartDrag()` is used to inform the web process that dragging has begun, and sets the |
| `m_isStartingDrag` flag on `WebPage` to false. As a result, `m_isStartingDrag` is true over the course of the |
| drag session when dragging non-attachment elements, but it's only true while starting the drag when dragging |
| attachments. This flag is consulted in `WebPage::mouseEvent()` to determine whether we should avoid handling the |
| incoming mouse event when beginning a drag. This prevents these incoming mouse events from triggering selection |
| changes while dragging (for more details, refer to <http://trac.webkit.org/r176687>). |
| |
| Now, if we combine this with the fact that mouse events can be queued up in the UI process (refer to |
| <https://trac.webkit.org/r230817>), it's possible to end up handling these queued mouse events in the web |
| process after `m_isStartingDrag` has been set back to false when dragging an attachment. This doesn't happen |
| when dragging non-attachment content, since we don't call `didStartDrag()` until the drag has already ended, so |
| any queued mouse events are sent to the web process and immediately dropped on the floor since |
| `m_isStartingDrag` is true. |
| |
| To address this, we make a couple of minor adjustments: |
| |
| 1. Invoke `didStartDrag()` right before calling into `-dragImage:at:offset:event:pasteboar:source:slideBack:`, |
| so that we don't wait until the drag ends to set `m_isStartingDrag` to false. This makes the behavior of |
| both codepaths for starting a drag (attachment and non-attachment) consistent, and also makes it consistent |
| with iOS. |
| |
| 2. In `didStartDrag()`, discard any queued mouse events to prevent them from being handled by the page (e.g. |
| causing the selection to change immediately after starting the drag). We already have identical logic to do |
| this when showing a context menu, so we can factor this out into a private `WebPageProxy` helper and call it |
| from both places. |
| |
| Test: WKAttachmentTestsMac.DraggingAttachmentBackedImagePreservesRangedSelection |
| |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::startDrag): |
| |
| Invoke `didStartDrag()` earlier when starting a drag using the deprecated method, such that we don't wait until |
| the drag ends to set `m_isStartingDrag` to false in the web process. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::discardQueuedMouseEvents): |
| |
| Refactor logic to discard all queued mouse events into a separate private helper. |
| |
| (WebKit::WebPageProxy::didStartDrag): |
| |
| Use the above helper to empty queued mouse events when starting a drag. |
| |
| (WebKit::WebPageProxy::showContextMenu): |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-05-19 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add testing and logging for ApplePaySetup |
| https://bugs.webkit.org/show_bug.cgi?id=211972 |
| <rdar://problem/63291965> |
| |
| Reviewed by Alex Christensen. |
| |
| * Shared/ApplePay/PaymentSetupConfiguration.mm: |
| (WebKit::toPlatformConfiguration): |
| (WebKit::PaymentSetupConfiguration::PaymentSetupConfiguration): |
| * Shared/ApplePay/PaymentSetupConfigurationWebKit.h: |
| * WebProcess/ApplePay/WebPaymentCoordinator.cpp: |
| (WebKit::WebPaymentCoordinator::getSetupFeatures): |
| (WebKit::WebPaymentCoordinator::beginApplePaySetup): |
| * WebProcess/ApplePay/WebPaymentCoordinator.h: |
| |
| 2020-05-19 Brent Fulgham <bfulgham@apple.com> |
| |
| REGRESSION(r243149): createMediaElementSource not working |
| https://bugs.webkit.org/show_bug.cgi?id=211394 |
| <rdar://problem/62866132> |
| |
| Reviewed by Per Arne Vollan. |
| |
| I removed access to some Audio services in r243149, because we believed they were already |
| blocked by a global deny command. However, Sandbox rules override generic rules with |
| explicit rules, so the imported sandbox rules were not being blocked. |
| |
| This patch re-adds the rules needed to support these audio routines on iOS hardware. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::mediaRelatedMachServices): |
| |
| 2020-05-19 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Port Foreground process assertion to RunningBoard |
| https://bugs.webkit.org/show_bug.cgi?id=211795 |
| <rdar://problem/61831863> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Port Foreground process assertion to RunningBoard now that <rdar://problem/62614429> |
| has been fixed. |
| |
| * Configurations/WebKit.xcconfig: |
| * UIProcess/ProcessAssertion.h: |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::runningBoardNameForAssertionType): |
| (WebKit::ProcessAssertion::ProcessAssertion): |
| (WebKit::ProcessAssertion::~ProcessAssertion): |
| (WebKit::ProcessAssertion::isValid const): |
| |
| 2020-05-19 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add testing and logging for ApplePaySetup |
| https://bugs.webkit.org/show_bug.cgi?id=211972 |
| <rdar://problem/63291965> |
| |
| Reviewed by Alex Christensen. |
| |
| * Shared/ApplePay/PaymentSetupConfiguration.mm: |
| (WebKit::toPlatformConfiguration): |
| (WebKit::PaymentSetupConfiguration::PaymentSetupConfiguration): |
| * Shared/ApplePay/PaymentSetupConfigurationWebKit.h: |
| * WebProcess/ApplePay/WebPaymentCoordinator.cpp: |
| (WebKit::WebPaymentCoordinator::getSetupFeatures): |
| (WebKit::WebPaymentCoordinator::beginApplePaySetup): |
| * WebProcess/ApplePay/WebPaymentCoordinator.h: |
| |
| 2020-05-19 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| [GTK] Add WEBKIT_EDITING_COMMAND_PASTE_AS_PLAIN_TEXT |
| https://bugs.webkit.org/show_bug.cgi?id=212038 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * UIProcess/API/gtk/WebKitEditingCommands.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/API/wpe/WebKitEditingCommands.h: |
| * UIProcess/API/wpe/docs/wpe-1.0-sections.txt: |
| |
| 2020-05-18 David Kilzer <ddkilzer@apple.com> |
| |
| Replace TextIndicatorOptions with OptionSet<TextIndicatorOption> |
| <https://webkit.org/b/212051> |
| <rdar://problem/63368556> |
| |
| Reviewed by Simon Fraser. |
| |
| Use OptionSet<TextIndicatorOption> everywhere |
| TextIndicatorOptions was previously used, plus: |
| - Make TextIndicatorOption an enum class. Remove |
| "TextIndicatorOption" prefix so TextIndicatorOptionBar becomes |
| TextIndicatorOption::Bar. |
| - Remove TextIndicatorOptionDefault because OptionSet<> |
| initializes to zero. |
| - Replace static variables (including two globals in WebCore) |
| with constexpr variables. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<TextIndicatorData>::encode): |
| (IPC::ArgumentCoder<TextIndicatorData>::decode): |
| * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: |
| (WebKit::WebPage::dictionaryPopupInfoForRange): |
| * WebProcess/WebPage/FindController.cpp: |
| (WebKit::FindController::updateFindIndicator): |
| * WebProcess/WebPage/ios/FindControllerIOS.mm: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::insertDroppedImagePlaceholders): |
| (WebKit::WebPage::computeAndSendEditDragSnapshot): |
| (WebKit::linkIndicatorPositionInformation): |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::performImmediateActionHitTestAtLocation): |
| |
| 2020-05-18 Andy Estes <aestes@apple.com> |
| |
| http/tests/ssl/applepay/ApplePayInstallmentConfiguration.https.html fails in public SDK builds |
| https://bugs.webkit.org/show_bug.cgi?id=212000 |
| <rdar://problem/63323082> |
| |
| Reviewed by Youenn Fablet. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h: |
| * Shared/WebCoreArgumentCoders.h: |
| |
| 2020-05-18 Tim Horton <timothy_horton@apple.com> |
| |
| Rare crash under -[WKContentView resignFirstResponderForWebView] |
| https://bugs.webkit.org/show_bug.cgi?id=212050 |
| <rdar://problem/60187111> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView resignFirstResponderForWebView]): |
| Reorganize this block so that it always takes a strong reference /before/ |
| null checking and using the pointer. Also, add a _page null check. |
| This is a speculative fix for an unreproducible low-rate crash. |
| |
| In theory the existing time-of-check race here should not be a problem, |
| since WKWebView is supposed to be freed on the main thread, and this code |
| runs on the main thread, but we have ample evidence of WKWebView |
| being freed off the main thread in various clients. |
| |
| 2020-05-18 David Kilzer <ddkilzer@apple.com> |
| |
| Use default initializers in TextIndicatorData |
| <https://webkit.org/b/212039> |
| <rdar://problem/63355619> |
| |
| Reviewed by Alex Christensen. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<TextIndicatorData>::encode): |
| (IPC::ArgumentCoder<TextIndicatorData>::decode): |
| - Switch from decodeEnum() and encodeEnum() to modern |
| equivalents that check for valid enum values. |
| |
| 2020-05-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Replace uses of +self with +class |
| https://bugs.webkit.org/show_bug.cgi?id=212041 |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/API/Cocoa/_WKFrameHandle.mm: |
| (-[_WKFrameHandle isEqual:]): |
| (-[_WKFrameHandle initWithCoder:]): |
| * Shared/Cocoa/APIObject.mm: |
| (API::Object::newObject): |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration _setAttachmentFileWrapperClass:]): |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): |
| * UIProcess/Cocoa/PageClientImplCocoa.mm: |
| (WebKit::PageClientImplCocoa::allocFileWrapperInstance const): |
| (WebKit::PageClientImplCocoa::serializableFileWrapperClasses const): |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: |
| (+[WKTransformView layerClass]): |
| (+[WKSimpleBackdropView layerClass]): Deleted. |
| (+[WKShapeView layerClass]): Deleted. |
| (-[WKRemoteView initWithFrame:contextID:]): Deleted. |
| * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: |
| (WebKit::ScrollingTreeScrollingNodeDelegateIOS::~ScrollingTreeScrollingNodeDelegateIOS): |
| (WebKit::ScrollingTreeScrollingNodeDelegateIOS::resetScrollViewDelegate): |
| (WebKit::ScrollingTreeScrollingNodeDelegateIOS::scrollView const): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView selectFormAccessoryPickerRow:]): |
| (-[WKContentView selectFormPopoverTitle]): |
| |
| 2020-05-18 Alex Christensen <achristensen@webkit.org> |
| |
| WebPageProxy::DidCommitLoadForFrame should use FrameLoadType instead of casting to/from uint32_t for IPC |
| https://bugs.webkit.org/show_bug.cgi?id=212028 |
| <rdar://problem/63343021> |
| |
| Reviewed by David Kilzer. |
| |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): |
| * UIProcess/ProvisionalPageProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::commitProvisionalPage): |
| (WebKit::WebPageProxy::didCommitLoadForFrame): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): |
| |
| 2020-05-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Single selection <select> with <optgroups> shows multiple selected options |
| https://bugs.webkit.org/show_bug.cgi?id=199485 |
| <rdar://problem/52757531> |
| |
| Reviewed by Megan Gardner. |
| |
| Fixes a long-standing bug in WKMultipleSelectPicker. Prior to this patch, we rely on the delegate method |
| `-pickerView:row:column:checked:` to be called twice whenever an item is selected: one time for the item that is |
| no longer checked, and another for the newly checked item. This method is responsible for updating the cached |
| `FocusedElementInformation` that determines the data model for the select menu, with the expectation that the |
| unchecked item would be updated to have `isSelected = false;`, and the new checked item would have `isSelected` |
| `= true;`. |
| |
| However, `-pickerView:row:column:checked:` is only called for visible item cells. This means that if the user |
| checks an item, scrolls the select menu items down so that the checked item is offscreen, and then checks a |
| different item, we only get notified that the new item is checked, and as a result, fail to uncheck the previous |
| item. |
| |
| To address this, tweak our logic for handling a single select so that when an item is checked, we additionally |
| update the previously checked item to not be selected. Also, fix what seems to be a bug in the logic for |
| updating `_singleSelectionIndex`, which is currently updated even when the item is unchecked. It seems to work |
| out at the moment, because `-pickerView:row:column:checked:` seems to be called with `checked := YES` after the |
| previous item was unchecked (assuming that it was visible). |
| |
| Test: fast/forms/ios/no-stale-checked-items-in-select-picker.html |
| |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView selectFormAccessoryHasCheckedItemAtRow:]): |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView selectFormAccessoryHasCheckedItemAtRow:]): |
| |
| Add plumbing for a new testing hook. |
| |
| * UIProcess/ios/forms/WKFormSelectControl.h: |
| * UIProcess/ios/forms/WKFormSelectControl.mm: |
| (-[WKFormSelectControl selectFormAccessoryHasCheckedItemAtRow:]): |
| * UIProcess/ios/forms/WKFormSelectPicker.mm: |
| (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]): |
| (-[WKMultipleSelectPicker pickerView:row:column:checked:]): |
| (-[WKMultipleSelectPicker selectRow:inComponent:extendingSelection:]): |
| |
| Also, fix an existing bug in this testing helper method that crashed the test runner due to calling an |
| unimplemented selector. Instead of trying to invoke `-pickerView:didSelectRow:inComponent:`, we should be using |
| `-pickerView:row:column:checked:` instead for multiple select pickers (which, somewhat confusingly, are still |
| used for single select elements that have `optgroup`s.) |
| |
| (-[WKMultipleSelectPicker selectFormAccessoryHasCheckedItemAtRow:]): |
| |
| 2020-05-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] Unexpected capitalization of next word after repositioning caret |
| https://bugs.webkit.org/show_bug.cgi?id=211969 |
| <rdar://problem/62605526> |
| |
| Reviewed by Alex Christensen. |
| |
| The changes in r242551 refactored synchronous autocorrection context request logic such that it uses |
| `waitForAndDispatchImmediately` instead of `sendSync`, in order to make it interruptible by unbounded sync IPC |
| sent from the web process. If the UI process receives sync IPC, it will immediately cancel the autocorrection |
| context request (returning an empty context), before proceeding to handle the incoming sync IPC. |
| |
| In a more recent version of iOS, other changes around spellchecking have caused the synchronous message |
| `WebPageProxy::checkTextOfParagraph` to be sent from the web process in such a way that it now frequently |
| coincides with the synchronous autocorrection context request being sent from the UI process. The result is that |
| we now frequently end up cancelling autocorrection requests early by responding with empty contexts. This |
| manifests in the keyboard sometimes losing information about its autocapitalization context and believing that |
| it is in an empty text field, which reverts to default autocorrection suggestions and autocapitalizes the |
| software keyboard. |
| |
| To fix this, instead of using the `InterruptWaitingIfSyncMessageArrives` option when waiting for the IPC |
| response, add and use a new flag that allows us to process an incoming sync IPC message if we're waiting for |
| the sync message response. We use this new IPC flag when waiting synchronously for HandleAutocorrectionContext. |
| |
| Test: editing/selection/ios/changing-selection-does-not-trigger-autocapitalization.html |
| |
| * Platform/IPC/Connection.cpp: |
| (IPC::Connection::processIncomingMessage): |
| |
| If the new IPC flag is set and the incoming message is synchronous, allow it to immediately dispatch the sync |
| message by enqueueing it and then waking up `m_waitForMessageCondition` so that it can process the message. |
| |
| * Platform/IPC/Connection.h: |
| * Platform/spi/ios/UIKitSPI.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): |
| |
| Use `DispatchIncomingSyncMessagesWhileWaiting` instead of `InterruptWaitingIfSyncMessageArrives`. |
| |
| 2020-05-18 Lauro Moura <lmoura@igalia.com> |
| |
| webkitpy: Update test data after r261776 |
| https://bugs.webkit.org/show_bug.cgi?id=212008 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by existing tests. |
| |
| * Scripts/test-legacyMessageReceiver.cpp: |
| * Scripts/test-legacyMessages.h: |
| (Messages::WebPage::DidCreateWebProcessConnection::DidCreateWebProcessConnection): |
| * Scripts/webkit/messages_unittest.py: |
| * Scripts/webkit/test-legacy.messages.in: |
| |
| 2020-05-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Update OptionsGTK.cmake and NEWS for 2.29.1 release |
| |
| * gtk/NEWS: Add release notes for 2.29.1. |
| |
| 2020-05-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Move iOS files from Source/WebKit/Sources.txt to Source/WebKit/SourcesCocoa.txt |
| https://bugs.webkit.org/show_bug.cgi?id=212014 |
| |
| Unreviewed. Move platform specific files to the platform sources file. |
| |
| * Sources.txt: |
| * SourcesCocoa.txt: |
| |
| 2020-05-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] "ASSERTION FAILED: !m_adoptionIsRequired" when double clicking on a word |
| https://bugs.webkit.org/show_bug.cgi?id=211957 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Remove WebSelectionData wrapper since we can just encode/decode WebCore::SelectionData. |
| |
| * Shared/WebCoreArgumentCoders.h: |
| * Shared/gtk/ArgumentCodersGtk.cpp: |
| (IPC::ArgumentCoder<SelectionData>::decode): Use modern decoder. |
| * Shared/gtk/ArgumentCodersGtk.h: |
| * Shared/gtk/WebSelectionData.cpp: Removed. |
| * Shared/gtk/WebSelectionData.h: Removed. |
| * SourcesGTK.txt: |
| * UIProcess/API/gtk/DragSource.h: |
| * UIProcess/API/gtk/DragSourceGtk3.cpp: |
| (WebKit::DragSource::DragSource): |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DragSourceGtk4.cpp: |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DropTarget.h: |
| * UIProcess/API/gtk/DropTargetGtk3.cpp: |
| (WebKit::DropTarget::accept): |
| (WebKit::DropTarget::enter): |
| (WebKit::DropTarget::update): |
| (WebKit::DropTarget::leaveTimerFired): |
| (WebKit::DropTarget::drop): |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::startDrag): |
| * UIProcess/API/gtk/PageClientImpl.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseStartDrag): |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| * UIProcess/PageClient.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::performDragControllerAction): |
| (WebKit::WebPageProxy::startDrag): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * UIProcess/WebPasteboardProxy.h: |
| * UIProcess/WebPasteboardProxy.messages.in: |
| * UIProcess/gtk/Clipboard.h: |
| * UIProcess/gtk/ClipboardGtk3.cpp: |
| (WebKit::WriteAsyncData::WriteAsyncData): |
| (WebKit::Clipboard::write): |
| * UIProcess/gtk/ClipboardGtk4.cpp: |
| (WebKit::Clipboard::write): |
| * UIProcess/gtk/WebPasteboardProxyGtk.cpp: |
| (WebKit::WebPasteboardProxy::writeToClipboard): |
| (WebKit::WebPasteboardProxy::writeCustomData): |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: |
| (WebKit::WebPlatformStrategies::writeToClipboard): |
| * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: |
| (WebKit::WebDragClient::startDrag): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::performDragControllerAction): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-05-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Add WebKitContextMenuItemType for paste as plaintext |
| https://bugs.webkit.org/show_bug.cgi?id=177638 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add WEBKIT_CONTEXT_MENU_ACTION_PASTE_AS_PLAIN_TEXT. |
| |
| * Shared/API/glib/WebKitContextMenuActions.cpp: |
| (webkitContextMenuActionGetActionTag): |
| (webkitContextMenuActionGetForContextMenuItem): |
| (webkitContextMenuActionGetLabel): |
| * UIProcess/API/gtk/WebKitContextMenuActions.h: |
| * UIProcess/gtk/KeyBindingTranslator.cpp: |
| |
| 2020-05-17 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Move to new Pasteboard API |
| https://bugs.webkit.org/show_bug.cgi?id=177633 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Enable custom pasteboard data. |
| |
| * Shared/WebPreferencesDefaultValues.h: |
| * Shared/gtk/ArgumentCodersGtk.cpp: |
| (IPC::ArgumentCoder<SelectionData>::encode): |
| (IPC::ArgumentCoder<SelectionData>::decode): |
| * UIProcess/WebPasteboardProxy.cpp: |
| * UIProcess/gtk/ClipboardGtk3.cpp: |
| (WebKit::Clipboard::write): Add support for writing URI list and custom data. |
| * UIProcess/gtk/ClipboardGtk4.cpp: |
| (WebKit::Clipboard::write): Ditto. |
| * UIProcess/gtk/WebPasteboardProxyGtk.cpp: |
| (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite): |
| (WebKit::WebPasteboardProxy::writeCustomData): |
| |
| 2020-05-16 Andy Estes <aestes@apple.com> |
| |
| REGRESSION (r260717): installmentConfiguration member is no longer available on ApplePayPaymentRequest |
| https://bugs.webkit.org/show_bug.cgi?id=211911 |
| <rdar://problem/63236367> |
| |
| Reviewed by Tim Horton. |
| |
| * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: |
| (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode): |
| (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode): |
| (IPC::finishDecoding): Deleted. |
| (IPC::finishEncoding): Deleted. |
| |
| 2020-05-16 Yury Semikhatsky <yurys@chromium.org> |
| |
| [GTK] Do not leak pages created by window.open |
| https://bugs.webkit.org/show_bug.cgi?id=211970 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Previously webkitWebViewCreateNewPage created unbalanced refence to WebPageProxy and returned |
| it as a raw pointer. That raw pointer was later wrapped in a RefPtr in WebKitUIClient. |
| This change ensures that all refs are balanced by returnin RefPtr instead of |
| a raw pointer. |
| |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewCreateNewPage): |
| * UIProcess/API/glib/WebKitWebViewPrivate.h: |
| |
| 2020-05-15 Alex Christensen <achristensen@webkit.org> |
| |
| Use enum serialization instead of casting to/from uint32_t |
| https://bugs.webkit.org/show_bug.cgi?id=211885 |
| |
| Reviewed by Geoffrey Garen. |
| |
| * Scripts/webkit/messages.py: |
| * Shared/DocumentEditingContext.h: |
| * Shared/ios/GestureTypes.h: |
| * UIProcess/API/C/WKAPICast.h: |
| (WebKit::toWebGLLoadPolicy): |
| (WebKit::toAPI): |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::toWebCoreWebGLLoadPolicy): |
| (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const): |
| (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::webGLPolicyForURL): |
| (WebKit::WebPageProxy::resolveWebGLPolicyForURL): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView selectForWebView:]): |
| (toUIWKSelectionFlags): |
| (toSelectionFlags): |
| (toWKTextGranularity): |
| (toWKSelectionDirection): |
| (selectionChangedWithGesture): |
| (selectionChangedWithTouch): |
| (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]): |
| (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:withFlags:]): |
| (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]): |
| (-[WKContentView selectWordForReplacement]): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::gestureCallback): |
| (WebKit::WebPageProxy::touchesCallback): |
| (WebKit::WebPageProxy::selectWithGesture): |
| (WebKit::WebPageProxy::updateSelectionWithTouches): |
| (WebKit::WebPageProxy::selectTextWithGranularityAtPoint): |
| (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection): |
| (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection): |
| (WebKit::WebPageProxy::selectWithTwoTouches): |
| (WebKit::WebPageProxy::extendSelection): |
| (WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset): |
| * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm: |
| (-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]): |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::webGLPolicyForURL const): |
| (WebKit::WebFrameLoaderClient::resolveWebGLPolicyForURL const): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::webGLPolicyForURL): |
| (WebKit::WebPage::resolveWebGLPolicyForURL): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::getPlatformEditorState const): |
| (WebKit::WebPage::getSelectionContext): |
| (WebKit::WebPage::selectWithGesture): |
| (WebKit::rangeAtWordBoundaryForPosition): |
| (WebKit::WebPage::updateSelectionWithTouches): |
| (WebKit::WebPage::selectWithTwoTouches): |
| (WebKit::WebPage::extendSelection): |
| (WebKit::WebPage::selectWordBackward): |
| (WebKit::WebPage::moveSelectionByOffset): |
| (WebKit::WebPage::getRectsForGranularityWithSelectionOffset): |
| (WebKit::WebPage::selectPositionAtBoundaryWithDirection): |
| (WebKit::WebPage::moveSelectionAtBoundaryWithDirection): |
| (WebKit::WebPage::rangeForGranularityAtPoint): |
| (WebKit::WebPage::selectTextWithGranularityAtPoint): |
| (WebKit::WebPage::beginSelectionInDirection): |
| (WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): |
| (WebKit::WebPage::requestDictationContext): |
| (WebKit::WebPage::applyAutocorrectionInternal): |
| (WebKit::WebPage::autocorrectionContext): |
| (WebKit::dataDetectorLinkPositionInformation): |
| (WebKit::moveByGranularityRespectingWordBoundary): |
| (WebKit::WebPage::requestDocumentEditingContext): |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::webGLPolicyForURL): |
| (WebKit::WebPage::resolveWebGLPolicyForURL): |
| |
| 2020-05-15 Alex Christensen <achristensen@webkit.org> |
| |
| [iOS Simulator] TestWebKitAPI._WKDownload.Resume is a flaky crash |
| https://bugs.webkit.org/show_bug.cgi?id=211786 |
| |
| Reviewed by Geoffrey Garen. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]): |
| |
| 2020-05-15 Alex Christensen <achristensen@webkit.org> |
| |
| Regression (iOS 13.4, r249142): WKWebView.loading is never reset after a Back navigation in an iframe |
| https://bugs.webkit.org/show_bug.cgi?id=211449 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Always call clearPendingAPIRequest in WebPageProxy::didStartProvisionalLoadForFrameShared. |
| r249142 regressed this and caused more "loading appears to continue forever" bugs fixed in r249890. |
| This should fix both, by removing the problematic half of r249142. |
| |
| Covered by an API test. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): |
| |
| 2020-05-15 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK3] Bring back usage of GtkMenu for context menus |
| https://bugs.webkit.org/show_bug.cgi?id=211557 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (contextMenuDismissed): Removed. |
| (webkitWebViewPopulateContextMenu): Use WebContextMenuProxyGtk::widgetDismissedSignal |
| and move the code from contextMenuDismissed() into an inline lambda. |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (activeContextMenuClosed): Removed. |
| (webkitWebViewBaseSetActiveContextMenuProxy): Use WebContextMenuProxyGtk::widgetDismissedSignal |
| and move the code from activeContextMenuClosed() into an inline lambda. |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Add helper functions to manipulate the actual |
| widget used for context menus depending on whether GTK3 or GTK4 is being used. The GTK3 |
| versions bring back bits of code removed in r260889. |
| (WebKit::createMenuWidget): Added. |
| (WebKit::popupMenuWidget): Added. |
| (WebKit::popdownMenuWidget): Added. |
| (WebKit::menuWidgetHasItems): Added. |
| (WebKit::bindModelToMenuWidget): Added. |
| (WebKit::WebContextMenuProxyGtk::populate): Use context menu widget helper functions. |
| (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems): Ditto. |
| (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Ditto. Also handle the |
| signal triggered when the context menu is dismissed and arrange to call |
| webkitWebViewContextMenuDismissed() and webkitWebViewBaseContextMenuDismissed(). |
| (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Use helper functions. |
| * UIProcess/gtk/WebContextMenuProxyGtk.h: Add WebContextMenuProxyGtk::widgetDismissedSignal |
| constant. |
| |
| 2020-05-14 Kate Cheney <katherine_cheney@apple.com> |
| |
| Attribute non-network loads and loads with html strings as automatically app-bound |
| https://bugs.webkit.org/show_bug.cgi?id=211913 |
| <rdar://problem/63157801 |
| |
| Reviewed by Brent Fulgham. |
| |
| Move logic from WebsiteDataStoreCocoa to WebPageProxy to check for |
| special app-bound protocols and set m_limitsNavigationToAppBoundDomains |
| to force these WebViews into app-bound mode. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _isForcedIntoAppBoundMode:]): |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| Testing SPI to see whether m_limitsNavigationsToAppBoundDomains was |
| set. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::loadData): |
| Check for html string loads and force WebView into app-bound mode if needed. |
| No need to worry about setting this variable even if the app hasn't |
| opted in because setIsNavigatingToAppBoundDomainAndCheckIfPermitted |
| does an early return before checking this variable if |
| WKAppBoundDomains does not exist. |
| |
| (WebKit::shouldTreatURLProtocolAsAppBound): |
| Adds javascript protocols to this check. |
| |
| (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted): |
| Check for special protocols here and force WebView into app-bound mode. |
| |
| (WebKit::WebPageProxy::isForcedIntoAppBoundModeTesting): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::beginAppBoundDomainCheck): |
| (WebKit::shouldTreatURLProtocolAsAppBound): Deleted. |
| |
| 2020-05-14 Timothy Hatcher <timothy@apple.com> |
| |
| Add baseURL version of _WKUserStyleSheet forWKWebView. |
| https://bugs.webkit.org/show_bug.cgi?id=211926 |
| rdar://problem/62074675 |
| |
| Reviewed by Devin Rousso. |
| |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.h: |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: |
| (-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:baseURL:level:userContentWorld:]): Added. |
| (-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:level:userContentWorld:]): Clean up WebCore::UserStyleSheet initializer. |
| (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]): Ditto. |
| (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]): Ditto. |
| (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]): Ditto. |
| (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:level:userContentWorld:]): Ditto. |
| |
| 2020-05-14 John Wilander <wilander@apple.com> |
| |
| Add quirk for cookie blocking latch mode aolmail.com redirecting to aol.com under aol.com |
| https://bugs.webkit.org/show_bug.cgi?id=211925 |
| <rdar://problem/61901041> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests. Just a new quirk for a pair of domains added by request. |
| |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::needsFirstPartyCookieBlockingLatchModeQuirk const): |
| |
| 2020-05-14 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r261163) Causes crashes on builds without libwebrtc.dylib |
| https://bugs.webkit.org/show_bug.cgi?id=211924 |
| <rdar://problem/63206792> |
| |
| Reviewed by Jer Noble. |
| |
| * WebProcess/Network/NetworkProcessConnection.cpp: |
| (WebKit::NetworkProcessConnection::NetworkProcessConnection): |
| |
| 2020-05-14 Timothy Hatcher <timothy@apple.com> |
| |
| Add sourceURL to _evaluateJavaScript: so the scripts appear in Web Inspector. |
| https://bugs.webkit.org/show_bug.cgi?id=211904 |
| rdar://problem/62074376 |
| |
| Reviewed by Devin Rousso. |
| |
| Added sourceURL version of _evaluateJavaScript: that passes the sourceURL to RunJavaScriptParameters. |
| If the sourceURL is invalid, generate a unique user script URL so the source code errors are not showing |
| up with the frame's document URL and bogus locations. |
| |
| * UIProcess/API/C/WKPage.cpp: |
| (WKPageRunJavaScriptInMainFrame): pass API::UserScript::generateUniqueURL() for the sourceURL. |
| * UIProcess/API/Cocoa/WKUserScript.mm: |
| (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]): Clean up WebCore::UserScript initializer. |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]): Ditto. |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]): Ditto. |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]): Ditto. |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]): Ditto. |
| (-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:deferRunningUntilNotification:]): Ditto. |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]): Renamed to add sourceURL. |
| (-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]): Added sourceURL. |
| (-[WKWebView _evaluateJavaScript:withSourceURL:inFrame:inContentWorld:completionHandler:]): Added. Pass sourceURL through. |
| (-[WKWebView evaluateJavaScript:completionHandler:]): Call new method with sourceURL as nil. |
| (-[WKWebView evaluateJavaScript:inContentWorld:completionHandler:]): Ditto. |
| (-[WKWebView callAsyncJavaScript:arguments:inContentWorld:completionHandler:]): Ditto. |
| (-[WKWebView _callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]): Ditto. |
| (-[WKWebView _evaluateJavaScript:inFrame:inContentWorld:completionHandler:]): Ditto. |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| |
| 2020-05-14 Chris Dumez <cdumez@apple.com> |
| |
| WebsiteDataStore functions should only send IPC to WebProcesses that are associated with its session |
| https://bugs.webkit.org/show_bug.cgi?id=211917 |
| |
| Reviewed by Alex Christensen. |
| |
| WebsiteDataStore functions should only send IPC to WebProcesses that are associated with its session. |
| setResourceLoadStatisticsEnabled() / clearResourceLoadStatisticsInWebProcesses() were talking to all |
| WebProcesses, even those associated with other sessions, which was wrong. |
| |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::clearResourceLoadStatistics): Deleted. |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled): |
| (WebKit::WebsiteDataStore::clearResourceLoadStatisticsInWebProcesses): |
| |
| 2020-05-14 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Remove dead dictation code |
| https://bugs.webkit.org/show_bug.cgi?id=211871 |
| |
| Reviewed by Wenson Hsieh. |
| |
| UIKit has long removed all callers that would call -nextUnperturbedDictationResultBoundaryFromPosition |
| and -previousUnperturbedDictationResultBoundaryFromPosition. So, remove the implementations. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView previousUnperturbedDictationResultBoundaryFromPosition:]): Deleted. |
| (-[WKContentView nextUnperturbedDictationResultBoundaryFromPosition:]): Deleted. |
| |
| 2020-05-14 Brady Eidson <beidson@apple.com> |
| |
| Crash in PDFPlugin::ensureDataBufferLength |
| <rdar://problem/62932155> and https://bugs.webkit.org/show_bug.cgi?id=211818 |
| |
| Reviewed by Tim Horton. |
| |
| There's some currently unreproducible case(s) where a range request finishes |
| while there's no m_data to append it to. |
| |
| It's fair hardening to handle that case. |
| |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::getResourceBytesAtPositionMainThread): Handle null m_data. |
| (WebKit::PDFPlugin::ensureDataBufferLength): Ditto. |
| |
| 2020-05-14 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Update message filtering rules in the WebContent process' sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=211188 |
| |
| Reviewed by Brent Fulgham. |
| |
| Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS. |
| Messages that have not been observed being in use, should be denied. |
| |
| No new tests, covered by existing tests. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-14 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixed, mid May 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=211859 |
| |
| Unreviewed build fix. |
| |
| * UIProcess/gtk/Clipboard.cpp: Add missing includes for <mutex>, wtf/NeverDestroyed.h, and |
| wtf/text/WTFString.h. |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Add missing |
| SharedBufferDataReference.h include. |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Add missing namespace to usage of |
| the WebCore::SharedBuffer type. |
| |
| 2020-05-13 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Use templates to reduce duplicate code in IPC::Decoder and IPC::Encoder classes |
| <https://webkit.org/b/211861> |
| <rdar://problem/62360390> |
| |
| Reviewed by Alex Christensen. |
| |
| In broad strokes, this change fixes the following issues: |
| - Change `unsigned` type to `size_t` for `alignment` parameters |
| for consistency on 32-bit platforms. |
| - Templatize Encoder::encode(), Decoder::decode() and |
| Decoder::operator>>() methods to reduce duplicate code. This |
| deleted code in source files, added template methods to header |
| files, and required a few changes to existing templates in |
| header files to disambiguate std::is_arithmetic parameter |
| types. |
| - Use `typename E` for all template methods that handle enum |
| types. |
| - Use `typename T` for all other template method types. |
| - Move WARN_UNUSED_RETURN to same line as `bool` return type. |
| - Add FIXME comments to validate enum values. |
| |
| * Platform/IPC/Decoder.cpp: |
| (IPC::roundUpToAlignment): |
| (IPC::Decoder::alignBufferPosition): |
| (IPC::Decoder::bufferIsLargeEnoughToContain const): |
| (IPC::Decoder::decodeFixedLengthData): |
| (IPC::decodeValueFromBuffer): Delete. |
| (IPC::Decoder::getOptional): Delete. |
| (IPC::Decoder::operator>>): Delete. |
| (IPC::Decoder::decode): Delete. |
| * Platform/IPC/Decoder.h: |
| (IPC::Decoder::decode): |
| (IPC::Decoder::operator>>): |
| (IPC::Decoder::decodeEnum): |
| * Platform/IPC/Encoder.cpp: |
| (IPC::roundUpToAlignment): |
| (IPC::Encoder::grow): |
| (IPC::Encoder::encodeFixedLengthData): |
| (IPC::copyValueToBuffer): Delete. |
| (IPC::Encoder::encode): Delete. |
| * Platform/IPC/Encoder.h: |
| |
| 2020-05-13 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: `RuntimeEnabledFeatures` should also be enabled when remotely inspecting |
| https://bugs.webkit.org/show_bug.cgi?id=211874 |
| |
| Reviewed by Timothy Hatcher. |
| |
| * WebProcess/Inspector/WebInspectorUI.h: |
| * WebProcess/Inspector/WebInspectorUI.cpp: |
| (WebKit::WebInspectorUI::enableFrontendFeatures): Added. |
| (WebKit::WebInspectorUI::WebInspectorUI): |
| * WebProcess/Inspector/RemoteWebInspectorUI.cpp: |
| (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI): |
| |
| 2020-05-13 Megan Gardner <megan_gardner@apple.com> |
| |
| Unreviewed Build Fix. |
| |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::setMouseEventPolicy): |
| * UIProcess/ios/forms/WKDateTimeInputControl.mm: |
| (-[WKDateTimePicker dealloc]): |
| (-[WKDateTimePicker controlBeginEditing]): |
| (-[WKDateTimePicker controlEndEditing]): |
| |
| 2020-05-13 Kate Cheney <katherine_cheney@apple.com> |
| |
| SHOULD NEVER BE REACHED in WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary |
| https://bugs.webkit.org/show_bug.cgi?id=211637 |
| <rdar://problem/63031185> |
| |
| Reviewed by John Wilander. |
| |
| No new tests, behavior confirmed by existing tests. |
| |
| Stop reseting ITP to use the memory store between tests. This results |
| in consecutive calls to NetworkSession::recreateResourceLoadStatisticStore |
| if two database tests occur in a row, which can set the m_resourceLoadStatistics |
| object before a previous call to WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore |
| is done. |
| |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreStatisticsResetToConsistentState): |
| |
| 2020-05-13 Megan Gardner <megan_gardner@apple.com> |
| |
| Change Date/Time popovers to contextMenus. |
| https://bugs.webkit.org/show_bug.cgi?id=211825 |
| <rdar://problem/63102524> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Update the Date/Time picker to use UIContextMenus instead of popovers. |
| Removed all the unneeded popover code. |
| Renamed WKFormInputControl to WKDateTimeInputControl because it was only used |
| for date and time controls, unneccessary abstraction. |
| We need to ensure the poisition information is up to date before presenting |
| the context menu, or the position it will be presented from can be stale. |
| |
| * SourcesCocoa.txt: |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]): |
| (-[WKContentView requiresAccessoryView]): |
| (-[WKContentView _updateAccessory]): |
| (mayContainSelectableText): |
| (createInputPeripheralWithView): |
| (-[WKContentView inputLabelText]): |
| (-[WKContentView _removeContextMenuViewIfPossible]): |
| (-[WKContentView inputLabelTextForViewController:]): |
| (-[WKContentView formInputControl]): |
| (-[WKContentView setTimePickerValueToHour:minute:]): |
| (-[WKContentView timePickerValueHour]): |
| (-[WKContentView timePickerValueMinute]): |
| * UIProcess/ios/forms/WKDateTimeInputControl.h: Renamed from Source/WebKit/UIProcess/ios/forms/WKFormInputControl.h. |
| * UIProcess/ios/forms/WKDateTimeInputControl.mm: Renamed from Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm. |
| (-[WKDateTimeContextMenuViewController init]): |
| (-[WKDateTimeContextMenuViewController preferredContentSize]): |
| (-[WKDateTimePicker initWithView:datePickerMode:]): |
| (-[WKDateTimePicker contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): |
| (-[WKDateTimePicker _contextMenuInteraction:styleForMenuWithConfiguration:]): |
| (-[WKDateTimePicker contextMenuInteraction:configurationForMenuAtLocation:]): |
| (-[WKDateTimePicker contextMenuInteraction:willEndForConfiguration:animator:]): |
| (-[WKDateTimePicker removeContextMenuInteraction]): |
| (-[WKDateTimePicker ensureContextMenuInteraction]): |
| (-[WKDateTimePicker showDateTimePicker]): |
| (-[WKDateTimePicker reset:]): |
| (-[WKDateTimePicker calendarType]): |
| (-[WKDateTimePicker dealloc]): |
| (-[WKDateTimePicker setDateTimePickerToInitialValue]): |
| (-[WKDateTimePicker controlBeginEditing]): |
| (-[WKDateTimePicker viewController]): |
| (-[WKDateTimePicker controlEndEditing]): |
| (-[WKDateTimeInputControl initWithView:]): |
| (-[WKDateTimeInputControl setTimePickerHour:minute:]): |
| (-[WKDateTimeInputControl dateTimePickerCalendarType]): |
| (-[WKDateTimeInputControl timePickerValueHour]): |
| (-[WKDateTimeInputControl timePickerValueMinute]): |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-13 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix tvOS and watchOS builds after r261638 |
| |
| `-[UIPasteboard itemProviders]` is not present on watchOS and tvOS. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _writePromisedAttachmentToPasteboard:]): |
| |
| 2020-05-13 Timothy Horton <timothy_horton@apple.com> |
| |
| Build fix. |
| |
| * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: |
| |
| 2020-05-13 Jer Noble <jer.noble@apple.com> |
| |
| Replace isNullFunctionPointer with real weak-linking support |
| https://bugs.webkit.org/show_bug.cgi?id=211751 |
| |
| Reviewed by Sam Weinig. |
| |
| Use the new WTF_WEAK_LINK_FORCE_IMPORT macro. |
| |
| * Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp: |
| (WebKit::ResourceLoadStatisticsClassifierCocoa::canUseCorePrediction): |
| |
| 2020-05-13 Tim Horton <timothy_horton@apple.com> |
| |
| Add SPI for reverting to touch events for iPad trackpad interactions |
| https://bugs.webkit.org/show_bug.cgi?id=211824 |
| <rdar://problem/61363084> |
| |
| Reviewed by Megan Gardner. |
| |
| New Test: IOSMouseSupport.WebsiteMouseEventPolicies |
| |
| Plumb a "mouse event policy" WKWebpagePreference, which has two values: |
| |
| - Default, which means that WebKit decides whether or not indirect |
| pointing devices send mouse or touch events. |
| |
| - SynthesizeTouchEvents, which ensures that WebKit will always send |
| touch events from indirect pointing devices. |
| This value is only available on platforms that implement touch events. |
| |
| We use the WKWebpagePreferences mechanism in order to make it easy to |
| implement it as a "per-site" quirk, but unlike most WKWebpagePreferences, |
| it turns around and changes UI process state (the enablement of the |
| WKMouseGestureRecgonizer). |
| |
| * Scripts/webkit/messages.py: |
| * Shared/WebsitePoliciesData.cpp: |
| (WebKit::WebsitePoliciesData::encode const): |
| (WebKit::WebsitePoliciesData::decode): |
| (WebKit::WebsitePoliciesData::applyToDocumentLoader): |
| * Shared/WebsitePoliciesData.h: |
| * UIProcess/API/APIWebsitePolicies.cpp: |
| (API::WebsitePolicies::copy const): |
| (API::WebsitePolicies::data): |
| * UIProcess/API/APIWebsitePolicies.h: |
| * UIProcess/API/Cocoa/WKWebpagePreferences.mm: |
| (WebKit::mouseEventPolicy): |
| (WebKit::coreMouseEventPolicy): |
| (-[WKWebpagePreferences _setMouseEventPolicy:]): |
| (-[WKWebpagePreferences _mouseEventPolicy]): |
| * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: |
| * UIProcess/PageClient.h: |
| (WebKit::PageClient::setMouseEventPolicy): |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::didCommitLoadForFrame): |
| * UIProcess/ProvisionalPageProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::commitProvisionalPage): |
| (WebKit::WebPageProxy::didCommitLoadForFrame): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * UIProcess/ios/PageClientImplIOS.h: |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::setMouseEventPolicy): |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView shouldUseMouseGestureRecognizer]): |
| (-[WKContentView setUpMouseGestureRecognizer]): |
| (-[WKContentView _configureMouseGestureRecognizer]): |
| (-[WKContentView _setMouseEventPolicy:]): |
| * UIProcess/ios/WKMouseGestureRecognizer.mm: |
| (-[WKMouseGestureRecognizer setEnabled:]): |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): |
| |
| 2020-05-13 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] "Copy" context menu action for attachment element does not work in Mail |
| https://bugs.webkit.org/show_bug.cgi?id=211817 |
| <rdar://problem/58043110> |
| |
| Reviewed by Tim Horton. |
| |
| Implements support for copying an attachment element, via context menu actions. To achieve this, we first |
| refactor code in WebCore that is currently responsible for converting an attachment element into a |
| PromisedAttachmentInfo, which provides a handle to an UI-process-side API attachment object. We then use this |
| helper in WebKit to send PromisedAttachmentInfo back to the UI process when handling the copy action from the |
| context menu on iOS. |
| |
| On iOS, we then take this promised attachment info in the UI process, map it to an API::Attachment object, and |
| use the file handle to create and write an NSItemProvider to the general pasteboard. (In the future, similar |
| logic could be implemented on macOS as well to handle copying attachment elements by implementing a version of |
| writePromisedAttachmentToPasteboard in PageClientImplMac. Currently, we fall back to treating this case as if |
| we're copying a text selection containing a single attachment element). |
| |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| |
| Add a new helper function to simulate an element action (_WKElementActionType) for an element at the given |
| location. This is used by the new API test. |
| |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _simulateElementAction:atLocation:]): |
| * UIProcess/PageClient.h: |
| (WebKit::PageClient::writePromisedAttachmentToPasteboard): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::writePromisedAttachmentToPasteboard): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| |
| Add an IPC message for the UI process to receive a PromisedAttachmentInfo, and copy it to the system pasteboard |
| if it maps to an actual API::Attachment. For now, we only support copying data if the attachment is backed by |
| a file wrapper in the UI process (as opposed to blob data written by the web process). |
| |
| * UIProcess/ios/PageClientImplIOS.h: |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::writePromisedAttachmentToPasteboard): |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (createItemProvider): |
| |
| Create a helper function to convert PromisedAttachmentInfo into an NSItemProvider. This is similar to |
| `-_prepareToDragPromisedAttachment:`, but with a couple differences: (1) we only create an NSItemProvider |
| instead of going through `WebItemProviderRegistrationInfoList`; (2) since there's no opportunity to clean up |
| temporary after pasting, serialize the attachment data using `-serializedRepresentation`, and provide the |
| attachment data instead of a file URL. |
| |
| Ideally, we would offer the data directly to the pasteboard so that even if Mail terminates, the contents of the |
| pasteboard can still be provided when pasting; however, it doesn't seem like we can do this while being able to |
| offer a suggested name for the item we're writing. Some other apps work around this limitation by writing the |
| file name as plain text on the pasteboard, but this doesn't work then attempting to copy a plain text file that |
| has a file name. |
| |
| (-[WKContentView _writePromisedAttachmentToPasteboard:]): |
| (-[WKContentView _simulateElementAction:atLocation:]): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::performActionOnElement): |
| |
| 2020-05-13 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Update message filtering rules in the WebContent process' sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=211188 |
| |
| Reviewed by Brent Fulgham. |
| |
| Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS. |
| Messages that have not been observed being in use, should be denied. |
| |
| No new tests, covered by existing tests. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-13 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] In CFPrefs direct mode, the WebContent sandbox needs to allow access to plist files |
| https://bugs.webkit.org/show_bug.cgi?id=211782 |
| |
| Reviewed by Brent Fulgham. |
| |
| Since preference files will be read directly in CFPrefs direct mode, the WebContent sandbox on iOS needs to allow reading these files. |
| |
| No new tests. There is API test coverage for this in PreferenceChanges.mm, but these tests are only run on simulator, not device. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-13 Peng Liu <peng.liu6@apple.com> |
| |
| Add the feature flags plist file back |
| https://bugs.webkit.org/show_bug.cgi?id=211816 |
| |
| Reviewed by Jer Noble. |
| |
| Add the WebKit.plist file to the WebKit project and use it instead of the one from the WebKitAdditions. |
| |
| * FeatureFlags/WebKit.plist: Added. |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-13 Youenn Fablet <youenn@apple.com> |
| |
| Allow WebAudioBufferList to dynamically change its number of frames |
| https://bugs.webkit.org/show_bug.cgi?id=211720 |
| |
| Reviewed by Eric Carlson. |
| |
| * WebProcess/cocoa/RemoteCaptureSampleManager.cpp: |
| (WebKit::RemoteCaptureSampleManager::RemoteAudio::setStorage): |
| (WebKit::RemoteCaptureSampleManager::RemoteAudio::audioSamplesAvailable): |
| * WebProcess/cocoa/RemoteCaptureSampleManager.h: |
| |
| 2020-05-13 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed compile fix after r261584. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| |
| 2020-05-13 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r261254): Broke Apple Pay on macOS |
| https://bugs.webkit.org/show_bug.cgi?id=211826 |
| <rdar://problem/63161750> |
| |
| Reviewed by Alex Christensen. |
| |
| r261254 dropped the code needed to add the WebPaymentCoordinatorProxy as an IPC message receiver. |
| This patch re-introduces the code in order to address the regression. |
| |
| No new tests, tested manually on https://applepaydemo.apple.com. |
| |
| * NetworkProcess/NetworkConnectionToWebProcess.h: |
| * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: |
| (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAddMessageReceiver): |
| (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorRemoveMessageReceiver): |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.h: |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): |
| (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy): |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::paymentCoordinatorAddMessageReceiver): |
| (WebKit::WebPageProxy::paymentCoordinatorRemoveMessageReceiver): |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-05-13 Zan Dobersek <zdobersek@igalia.com> |
| |
| REGRESSION(r260571): RequestedScrollPosition doesn't have its scroll change applied to layers anymore |
| https://bugs.webkit.org/show_bug.cgi?id=211374 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Use WebPage::finalizeRenderingUpdate() to perform the compositing state flush |
| and the scrolling tree layer positioning, instead of doing things half-baked |
| by manually invoking the FrameView method. |
| |
| Additional WebPage calls (updateRendering(), flushPendingEditorStateUpdate()) |
| are moved into CompositingCoordinator::flushPendingLayerChanges() from the |
| LayerTreeHost::layerFlushTimerFired() method for consistency. The additional |
| CompositingCoordinator::syncDisplayState() method call is removed -- this call |
| triggered any necessary layout, but that's already done through WebPage::updateRendering(). |
| |
| CompositingCoordinator::flushPendingLayerChanges() doesn't rely on the |
| FrameView flush return value since that's not available anymore -- instead, |
| true is returned always. |
| |
| * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: |
| (WebKit::CompositingCoordinator::flushPendingLayerChanges): |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp: |
| (WebKit::LayerTreeHost::layerFlushTimerFired): |
| |
| 2020-05-13 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed compile fix after r261584. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| |
| 2020-05-13 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| Selected element on Web Inspector is not highlighted with CPU Rendering. |
| https://bugs.webkit.org/show_bug.cgi?id=195933 |
| |
| Reviewed by Devin Rousso. |
| |
| Since WebInspectorClient::drawHighlight was not called while non accelerated compositing mode, we cannot see element highlight on web inspector. |
| This patch adds WebInspectorClient::drawHighlight call in WebPage::drawRect, which draws webpage image while non accelerated compositing mode, to overlay the highlight. |
| WebInspectorClient::highlight and WebInspectorClient::hideHighlight currently requests re-paint whole web page, but it should be able to optimize by only updating dirty rects in the future. |
| |
| * WebProcess/Inspector/WebInspectorClient.cpp: |
| (WebKit::WebInspectorClient::highlight): If it's not acceleratedCompositingEnabled, then just request repaint. |
| (WebKit::WebInspectorClient::hideHighlight): If it's not acceleratedCompositingEnabled, then just request repaint. |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::drawRect): Draw inspector overlay here if it's not accelerated compositing mode. |
| |
| 2020-05-13 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK debug build after r261554 |
| |
| Remove writeToClipboard that receives a const SelectionData& that is no longer used. |
| |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.h: |
| |
| 2020-05-12 Peng Liu <peng.liu6@apple.com> |
| |
| Add the feature flag plist file parser |
| https://bugs.webkit.org/show_bug.cgi?id=211457 |
| |
| Reviewed by Tim Horton. |
| |
| WebKit needs to parse the feature flags plist by itself in some cases. |
| |
| * Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm: Added. |
| (WebKit::featureFlagEnabled): |
| * Shared/WebPreferencesDefaultValues.cpp: |
| (WebKit::defaultAsyncFrameAndOverflowScrollingEnabled): |
| (WebKit::defaultUseGPUProcessForMedia): |
| (WebKit::defaultRenderCanvasInGPUProcessEnabled): |
| (WebKit::defaultCaptureAudioInGPUProcessEnabled): |
| (WebKit::defaultCaptureVideoInGPUProcessEnabled): |
| (WebKit::defaultWebRTCCodecsInGPUProcess): |
| (WebKit::defaultWebGL2Enabled): |
| (WebKit::defaultWebGPUEnabled): |
| (WebKit::defaultInAppBrowserPrivacy): |
| (WebKit::defaultIncrementalPDFEnabled): |
| (WebKit::defaultWebXREnabled): |
| * Shared/WebPreferencesDefaultValues.h: |
| * SourcesCocoa.txt: |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-12 Alex Christensen <achristensen@webkit.org> |
| |
| Give some NetworkLoadMetrics to WebCoreNSURLSession's delegate |
| https://bugs.webkit.org/show_bug.cgi?id=211759 |
| <rdar://problem/62909440> |
| |
| Reviewed by Jer Noble. |
| |
| This also reduces duplicate lookups in RemoteMediaResourceManager |
| |
| * GPUProcess/media/RemoteMediaResource.cpp: |
| (WebKit::RemoteMediaResource::loadFinished): |
| * GPUProcess/media/RemoteMediaResource.h: |
| * GPUProcess/media/RemoteMediaResourceManager.cpp: |
| (WebKit::RemoteMediaResourceManager::responseReceived): |
| (WebKit::RemoteMediaResourceManager::redirectReceived): |
| (WebKit::RemoteMediaResourceManager::dataSent): |
| (WebKit::RemoteMediaResourceManager::dataReceived): |
| (WebKit::RemoteMediaResourceManager::accessControlCheckFailed): |
| (WebKit::RemoteMediaResourceManager::loadFailed): |
| (WebKit::RemoteMediaResourceManager::loadFinished): |
| * GPUProcess/media/RemoteMediaResourceManager.h: |
| * GPUProcess/media/RemoteMediaResourceManager.messages.in: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): |
| * WebProcess/GPU/media/RemoteMediaResourceProxy.cpp: |
| (WebKit::RemoteMediaResourceProxy::loadFinished): |
| * WebProcess/GPU/media/RemoteMediaResourceProxy.h: |
| |
| 2020-05-12 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Don't assume extensions always exist |
| https://bugs.webkit.org/show_bug.cgi?id=211760 |
| <rdar://problem/61217642> |
| |
| Reviewed by Brent Fulgham. |
| |
| * UIProcess/WebAuthentication/AuthenticatorManager.cpp: |
| (WebKit::WebCore::processGoogleLegacyAppIdSupportExtension): |
| * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: |
| (WebKit::CtapAuthenticator::processGoogleLegacyAppIdSupportExtension): |
| |
| 2020-05-12 Chris Dumez <cdumez@apple.com> |
| |
| [WK2] Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API |
| https://bugs.webkit.org/show_bug.cgi?id=211808 |
| |
| Reviewed by Darin Adler. |
| |
| Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API. This is only SPI and is only used for slightly |
| different printing behavior in Safari. Framesets are no longer supported in HTML5 and are now super rare. Support |
| for this C API adds quite a bit of code complexity and crashes such as <rdar://problem/60322282>, it just does not |
| seem worth it anymore. |
| |
| * UIProcess/API/C/WKFrame.cpp: |
| (WKFrameIsFrameSet): |
| * UIProcess/API/C/WKPage.cpp: |
| (WKPageGetFrameSetLargestFrame): |
| * UIProcess/WebFrameProxy.cpp: |
| (WebKit::WebFrameProxy::didCommitLoad): |
| * UIProcess/WebFrameProxy.h: |
| (WebKit::WebFrameProxy::setIsFrameSet): Deleted. |
| (WebKit::WebFrameProxy::isFrameSet const): Deleted. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::resetState): |
| (WebKit::WebPageProxy::frameDidBecomeFrameSet): Deleted. |
| (WebKit::WebPageProxy::frameSetLargestFrameChanged): Deleted. |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::focusedFrame const): |
| (WebKit::WebPageProxy::frameSetLargestFrame const): Deleted. |
| * UIProcess/WebPageProxy.messages.in: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::contentsSizeChanged const): |
| (WebKit::findLargestFrameInFrameSet): Deleted. |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset): Deleted. |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: |
| |
| 2020-05-12 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Rebuild MobileGestalt cache if needed |
| https://bugs.webkit.org/show_bug.cgi?id=211739 |
| |
| Reviewed by Darin Adler. |
| |
| This patch was written by Geoff Garen and myself. Rebuild the MobileGestalt cache in the UI process if the |
| MobileGestalt cache is stale. This should be done before starting a new WebContent process. If the cache |
| is not rebuilt, every MobileGestalt query in the WebContent process will fail, since access to the daemon |
| is denied. |
| |
| No new tests, since testing this is not trivial. It would involve deleting the MobileGestalt cache and |
| making sure it is rebuilt afterwards. This could be an API test, but API tests are not supported on iOS |
| devices. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Rework drag and drop handling in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=211723 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Split DragAndDropHelper class into DragSource and DropTarget classes. This separates the source and destination |
| parts making it easier to follow. This patch also adds PageClient::didPerformDragControllerAction() to notify |
| back the view when an operation is done to update the result. |
| |
| * SourcesGTK.txt: |
| * UIProcess/API/gtk/DragSource.h: Added. |
| * UIProcess/API/gtk/DragSourceGtk3.cpp: Added. |
| (WebKit::DragSource::DragSource): |
| (WebKit::DragSource::~DragSource): |
| (WebKit::DragSource::begin): |
| * UIProcess/API/gtk/DropTarget.h: Added. |
| * UIProcess/API/gtk/DropTargetGtk3.cpp: Added. |
| (WebKit::DropTarget::DropTarget): |
| (WebKit::DropTarget::~DropTarget): |
| (WebKit::DropTarget::accept): |
| (WebKit::DropTarget::enter): |
| (WebKit::DropTarget::update): |
| (WebKit::DropTarget::dataReceived): |
| (WebKit::DropTarget::didPerformAction): |
| (WebKit::DropTarget::leaveTimerFired): |
| (WebKit::DropTarget::leave): |
| (WebKit::DropTarget::drop): |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::startDrag): |
| (WebKit::PageClientImpl::didPerformDragControllerAction): |
| * UIProcess/API/gtk/PageClientImpl.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseConstructed): |
| (webkit_web_view_base_class_init): |
| (webkitWebViewBaseStartDrag): |
| (webkitWebViewBaseDidPerformDragControllerAction): |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| * UIProcess/PageClient.h: |
| (WebKit::PageClient::didPerformDragControllerAction): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didPerformDragControllerAction): |
| * UIProcess/gtk/DragAndDropHandler.cpp: Removed. |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::performDragControllerAction): |
| * WebProcess/WebPage/gtk/WebPageGtk.cpp: |
| |
| 2020-05-12 Jacob Uphoff <jacob_uphoff@apple.com> |
| |
| Unreviewed, reverting r261557. |
| |
| This commit caused testing to exit early due to too many |
| crashes on macOS Catalina Asan |
| |
| Reverted changeset: |
| |
| "Allow WebAudioBufferList to dynamically change its number of |
| frames" |
| https://bugs.webkit.org/show_bug.cgi?id=211720 |
| https://trac.webkit.org/changeset/261557 |
| |
| 2020-05-12 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed crash fix. |
| |
| Use correct global name for icon service in RELEASE_ASSERT. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon): |
| |
| 2020-05-12 Youenn Fablet <youenn@apple.com> |
| |
| Allow WebAudioBufferList to dynamically change its number of frames |
| https://bugs.webkit.org/show_bug.cgi?id=211720 |
| |
| Reviewed by Eric Carlson. |
| |
| * WebProcess/cocoa/RemoteCaptureSampleManager.cpp: |
| (WebKit::RemoteCaptureSampleManager::RemoteAudio::setStorage): |
| (WebKit::RemoteCaptureSampleManager::RemoteAudio::audioSamplesAvailable): |
| * WebProcess/cocoa/RemoteCaptureSampleManager.h: |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for clipboard operations |
| https://bugs.webkit.org/show_bug.cgi?id=211561 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/gtk/Clipboard.h: |
| * UIProcess/gtk/ClipboardGtk4.cpp: |
| (WebKit::Clipboard::Clipboard): |
| (WebKit::Clipboard::type const): |
| (WebKit::Clipboard::formats): |
| (WebKit::ReadTextAsyncData::ReadTextAsyncData): |
| (WebKit::Clipboard::readText): |
| (WebKit::ReadFilePathsAsyncData::ReadFilePathsAsyncData): |
| (WebKit::Clipboard::readFilePaths): |
| (WebKit::ReadBufferAsyncData::ReadBufferAsyncData): |
| (WebKit::Clipboard::readBuffer): |
| (WebKit::Clipboard::write): |
| (WebKit::Clipboard::clear): |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Rework clipboard handling in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=211511 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use async APIs to avoid blocking the UI process during the communication with the clipboard. In GTK4 only async |
| APIs are available. Add Clipboard class to handle the communication with the clipboard with the GTK |
| implementation in ClipboardGtk3 and ClipboardGtk4 files. |
| |
| * Shared/gtk/WebSelectionData.cpp: |
| (WebKit::WebSelectionData::WebSelectionData): Add constructor receivnig an rvalue reference. |
| * Shared/gtk/WebSelectionData.h: |
| * SourcesGTK.txt: |
| * UIProcess/WebPasteboardProxy.h: |
| * UIProcess/WebPasteboardProxy.messages.in: |
| * UIProcess/gtk/Clipboard.cpp: Added. |
| (WebKit::clipboard): |
| (WebKit::primary): |
| (WebKit::Clipboard::get): |
| * UIProcess/gtk/Clipboard.h: Added. |
| * UIProcess/gtk/ClipboardGtk3.cpp: Added. |
| (WebKit::Clipboard::Clipboard): |
| (WebKit::isPrimaryClipboard): |
| (WebKit::Clipboard::type const): |
| (WebKit::FormatsAsyncData::FormatsAsyncData): |
| (WebKit::Clipboard::formats): |
| (WebKit::ReadTextAsyncData::ReadTextAsyncData): |
| (WebKit::Clipboard::readText): |
| (WebKit::ReadFilePathsAsyncData::ReadFilePathsAsyncData): |
| (WebKit::Clipboard::readFilePaths): |
| (WebKit::ReadBufferAsyncData::ReadBufferAsyncData): |
| (WebKit::Clipboard::readBuffer): |
| (WebKit::Clipboard::write): |
| (WebKit::Clipboard::clear): |
| * UIProcess/gtk/ClipboardGtk4.cpp: Added. |
| (WebKit::Clipboard::Clipboard): |
| (WebKit::Clipboard::type const): |
| (WebKit::Clipboard::formats): |
| (WebKit::Clipboard::readText): |
| (WebKit::Clipboard::readFilePaths): |
| (WebKit::Clipboard::readBuffer): |
| (WebKit::Clipboard::write): |
| (WebKit::Clipboard::clear): |
| * UIProcess/gtk/WebPasteboardProxyGtk.cpp: |
| (WebKit::WebPasteboardProxy::getTypes): |
| (WebKit::WebPasteboardProxy::readText): |
| (WebKit::WebPasteboardProxy::readFilePaths): |
| (WebKit::WebPasteboardProxy::readBuffer): |
| (WebKit::WebPasteboardProxy::writeToClipboard): |
| (WebKit::WebPasteboardProxy::clearClipboard): |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: |
| (WebKit::WebPlatformStrategies::types): |
| (WebKit::WebPlatformStrategies::readTextFromClipboard): |
| (WebKit::WebPlatformStrategies::readFilePathsFromClipboard): |
| (WebKit::WebPlatformStrategies::readBufferFromClipboard): |
| (WebKit::WebPlatformStrategies::writeToClipboard): |
| (WebKit::WebPlatformStrategies::clearClipboard): |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.h: |
| |
| 2020-05-12 Youenn Fablet <youenn@apple.com> |
| |
| Introduce a RealtimeMediaSource video sample observer |
| https://bugs.webkit.org/show_bug.cgi?id=211718 |
| |
| Reviewed by Eric Carlson. |
| |
| * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: |
| (WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy): |
| (WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy): |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: |
| (WebKit::MediaRecorderPrivate::MediaRecorderPrivate): |
| (WebKit::MediaRecorderPrivate::~MediaRecorderPrivate): |
| (WebKit::MediaRecorderPrivate::videoSampleAvailable): |
| (WebKit::MediaRecorderPrivate::stopRecording): |
| (WebKit::MediaRecorderPrivate::sampleBufferUpdated): Deleted. |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: |
| |
| 2020-05-12 Mark Lam <mark.lam@apple.com> |
| |
| Wasm::enableFastMemory() was called too late. |
| https://bugs.webkit.org/show_bug.cgi?id=211773 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Previously, we were calling Wasm::enableFastMemory() in WebProcess::initializeWebProcess(). |
| By then, it is too late because the JSC::Config and WTF::Config have already been |
| frozen. There is nothing special about Wasm::enableFastMemory() that it needs to |
| be called this late. This patch moves it into JSC::initializeThreading() where |
| it belongs. |
| |
| This change also make the initialization of Wasm fast memory consistent with how |
| we have always done it for the jsc shell i.e. it is initialized at the end of |
| JSC::initializeThreading(). |
| |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::initializeWebProcess): |
| |
| 2020-05-11 Darin Adler <darin@apple.com> |
| |
| Fix problems caught by replacing WTF::Optional with std::optional |
| https://bugs.webkit.org/show_bug.cgi?id=211703 |
| |
| Reviewed by Chris Dumez. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::plainTextForContext): Clarified ambiguous overload resolution by writing |
| the conversion from a live range to a SimpleRange out explicitly. Also fixed a typo |
| where there was a missing "&" in a "const&" argument. |
| |
| 2020-05-11 Simon Fraser <simon.fraser@apple.com> |
| |
| [ macOS ] scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html is a flaky failure |
| https://bugs.webkit.org/show_bug.cgi?id=211747 |
| |
| Reviewed by Tim Horton. |
| |
| Add an option to monitorWheelEvents to reset latching. |
| |
| * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: |
| (WKBundlePageStartMonitoringScrollOperations): |
| * WebProcess/InjectedBundle/API/c/WKBundlePage.h: |
| |
| 2020-05-11 Kate Cheney <katherine_cheney@apple.com> |
| |
| Fail navigations to non app-bound domains after use of app-bound APIs |
| https://bugs.webkit.org/show_bug.cgi?id=211647 |
| <rdar://problem/62978159> |
| |
| Reviewed by Brent Fulgham. |
| |
| A lot of this patch is deleting the unnecessary variable/function |
| hasNavigatedAwayFromAppBoundDomain now that navigating away from an |
| app-bound domain is not possible. |
| |
| To address the bug, this sets the default isNavigatingToAppBoundDomain |
| value to be WTF::nullopt. This will allow app-bound behaviors until |
| a navigation has been attempted, in which case it will fail or will |
| update isNavigatingToAppBoundDomain to the correct value. |
| |
| |
| * Shared/LoadParameters.cpp: |
| (WebKit::LoadParameters::encode const): |
| (WebKit::LoadParameters::decode): |
| * Shared/LoadParameters.h: |
| * Shared/PolicyDecision.h: |
| (WebKit::PolicyDecision::encode const): |
| (WebKit::PolicyDecision::decode): |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::loadData): |
| (WebKit::ProvisionalPageProxy::loadRequest): |
| (WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync): |
| * UIProcess/ProvisionalPageProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::loadRequest): |
| (WebKit::WebPageProxy::loadRequestWithNavigationShared): |
| (WebKit::WebPageProxy::loadData): |
| (WebKit::WebPageProxy::loadDataWithNavigationShared): |
| (WebKit::WebPageProxy::receivedPolicyDecision): |
| (WebKit::WebPageProxy::continueNavigationInNewProcess): |
| (WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared): |
| (WebKit::WebPageProxy::hasNavigatedAwayFromAppBoundDomain const): Deleted. |
| Remove hasNavigatedAwayFromAppBoundDomain. |
| |
| (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted): |
| Check for new m_hasExecutedAppBoundBehaviorBeforeNavigation parameter |
| and fail the navigation if a WebView has used app-bound behavior then |
| tries to navigate to a non app-bound domain. |
| |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| Update error message to be more general now that more than one error |
| can occur. |
| |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::setHasExecutedAppBoundBehaviorBeforeNavigation): |
| * UIProcess/WebPageProxy.messages.in: |
| New parameter to indicate a WebView has used app-bound APIs before |
| navigating. |
| |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): |
| (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): |
| (WebKit::WebFrameLoaderClient::shouldEnableInAppBrowserPrivacyProtections): |
| (WebKit::WebFrameLoaderClient::hasNavigatedAwayFromAppBoundDomain): Deleted. |
| (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks const): Deleted. |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: |
| Combined two functions into a simpler function: |
| shouldEnableInAppBrowserPrivacyProtections(). |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::m_limitsNavigationsToAppBoundDomains): |
| (WebKit::WebPage::updatePreferences): |
| Store the special app-bound domain flag to gate the service worker |
| API. This should be stored separately from |
| m_isNavigatingToAppBoundDomain, because in the WebPage constructor we |
| don't yet know whether the WKAppBoundDomains key exists. |
| |
| (WebKit::WebPage::loadRequest): |
| (WebKit::WebPage::loadDataImpl): |
| (WebKit::WebPage::loadData): |
| (WebKit::WebPage::loadAlternateHTML): |
| (WebKit::WebPage::didReceivePolicyDecision): |
| Remove hasNavigatedAwayFromAppBoundDomain. |
| |
| (WebKit::WebPage::runJavaScript): |
| (WebKit::WebPage::setIsNavigatingToAppBoundDomain): |
| (WebKit::WebPage::shouldEnableInAppBrowserPrivacyProtections): |
| If m_needsInAppBrowserPrivacyQuirks are on for testing, don't enable |
| protections. Only notify the WebPageProxy of app-bound behavior if |
| a navigation has not occured and we know the webView is not app-bound |
| (in order to limit IPC). |
| |
| (WebKit::m_isNavigatingToAppBoundDomain): Deleted. |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::isNavigatingToAppBoundDomain const): |
| (WebKit::WebPage::setIsNavigatingToAppBoundDomain): Deleted. |
| (WebKit::WebPage::hasNavigatedAwayFromAppBoundDomain const): Deleted. |
| (WebKit::WebPage::setHasNavigatedAwayFromAppBoundDomain): Deleted. |
| (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Deleted. |
| |
| 2020-05-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Remove some unnecessary indirection when getting Document’s Editor |
| https://bugs.webkit.org/show_bug.cgi?id=211744 |
| |
| Reviewed by Geoffrey Garen. |
| |
| See WebCore ChangeLog for more information. No change in behavior. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::performActionOnElement): |
| |
| 2020-05-11 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix possible crash in ViewGestureController on macOS |
| https://bugs.webkit.org/show_bug.cgi?id=211745 |
| |
| Reviewed by Tim Horton. |
| |
| When ViewGestureController::resetState() clears m_swipeCancellationTracker, it should set it to canceled so that |
| any pending -trackSwipeEventWithOptions:... which is holding a reference to the WKSwipeCancellationTracker knows |
| to stop. |
| |
| * UIProcess/mac/ViewGestureControllerMac.mm: |
| (WebKit::ViewGestureController::resetState): |
| (WebKit::ViewGestureController::reset): |
| |
| 2020-05-11 Peng Liu <peng.liu6@apple.com> |
| |
| Enable the mock video presentation mode in related layout tests and fix test failures |
| https://bugs.webkit.org/show_bug.cgi?id=211645 |
| |
| Reviewed by Darin Adler. |
| |
| Fix the mistake in VideoFullscreenManager::supportsVideoFullscreen() introduced in r202274. |
| |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenManager::supportsVideoFullscreen const): |
| |
| 2020-05-11 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Update message filtering rules in the WebContent process' sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=211188 |
| <rdar://problem/60922910> |
| |
| Reviewed by Brent Fulgham. |
| |
| Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS. |
| Messages that have not been observed being in use, should be denied. |
| |
| No new tests, covered by existing tests. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-11 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] WKWebView.evaluateJavaScript should run at foreground priority when app is foreground |
| https://bugs.webkit.org/show_bug.cgi?id=211734 |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld): |
| |
| 2020-05-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION (r253267): issues on touchstart/touchend/touchmove (pointerdown/pointerup/pointermove) events |
| https://bugs.webkit.org/show_bug.cgi?id=211521 |
| <rdar://problem/62942374> |
| |
| Reviewed by Darin Adler. |
| |
| As a brief refresher, deferring gesture recognizers allow us to handle otherwise blocking touch events |
| asynchronously by having all preventable native gesture recognizers require the deferring gesture recognizer to |
| fail; we only fail the deferring gesture recognizer once the web process has handled the touch event, and did |
| not call `preventDefault()`. |
| |
| These additional failure requirements can cause preventable gestures to be linked together in the same gesture |
| dependency subgraph; since each subgraph is reset only once all gestures in the subgraph have failed or ended, |
| this might cause some gestures to be reset after a delay (rather than being reset immediately). To mitigate |
| this, we divide the set of preventable gestures into multiple (currently, 2) subgraphs: one for gestures that |
| are reset after a delay, and another for gestures that are immediately resettable. This way, immediately |
| resettable gestures are able to reset and recognize again, without having to wait for other slower preventable |
| gesture recognizers to reset. |
| |
| When fast-clicking is disabled (e.g. when loading a desktop web page on a mobile form factor, or when the |
| viewport has been zoomed in), the blocking synthetic double tap gesture recognizer (that is, `WKContentView`'s |
| `_doubleTapGestureRecognizer`) is enabled, and adds itself as a dynamic failure requirement to the content |
| view's synthetic single tap gesture recognizer (`_singleTapGestureRecognizer`). In terms of the gesture |
| dependency graph, this causes the single tap gesture to form an edge with the double tap gesture, which ends up |
| uniting both deferring gesture recognizers under the same subgraph. This means UIWebTouchEventsGestureRecognizer, |
| which should be one of the gestures in the immediately resettable subgraph, is now connected to the rest of the |
| delayed resettable gestures, meaning that it cannot recognize until "slowly resettable" gestures such as the |
| tap-and-half text selection gesture have also been reset. This delay causes touch events to be dropped, as is |
| the case in this bug. |
| |
| To fix this, simply quarantine the single tap and double tap gestures inside their own subgraph by introducing a |
| separate deferring gesture recognizer for them. When fast-clicking is enabled, this does not hinder the ability |
| for the single tap gesture to fire in rapid succession, since the double tap gesture is disabled (and thus, not |
| a part of the graph at all). when fast-clicking is disabled, then the double tap gesture will prevent the single |
| tap gesture from being immediately reset anyways, due to the direct failure requirement between the double and |
| single tap gesture. |
| |
| Doing this ensures that no other immediately resettable gesture (`UIWebTouchEventsGestureRecognizer` included) |
| is accidentally blocked from immediately resetting due to being linked to the delayed resettable gestures by way |
| of the synthetic single and double tap gestures. |
| |
| Test: fast/events/touch/ios/tap-and-half-when-viewport-is-not-responsive.html |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| |
| Add a dedicated deferring gesture recognizer for the synthetic single tap and double tap gesture recognizers. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView setUpInteraction]): |
| (-[WKContentView cleanUpInteraction]): |
| |
| Use -_deferringGestureRecognizers instead of hard-coding logic for each deferring gesture. |
| |
| (-[WKContentView _removeDefaultGestureRecognizers]): Ditto. |
| (-[WKContentView _addDefaultGestureRecognizers]): Ditto. |
| (-[WKContentView _deferringGestureRecognizers]): |
| |
| We now have 3 distinct deferring gestures; instead of handling the three deferring gestures individually in |
| various places in this file, group them all behind a getter that returns an array of deferring gestures, and use |
| this instead. |
| |
| (-[WKContentView _doneDeferringNativeGestures:]): Ditto. |
| (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): Ditto. |
| (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): |
| |
| Partition the synthetic single tap and double tap gestures into their own subgraph. |
| |
| 2020-05-11 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed, reverting r261296. |
| |
| Rolling r260769 back in, since this was not causing a |
| regression. |
| |
| Reverted changeset: |
| |
| "Unreviewed, reverting r260769." |
| https://bugs.webkit.org/show_bug.cgi?id=211578 |
| https://trac.webkit.org/changeset/261296 |
| |
| 2020-05-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the watchOS build after r261457 |
| |
| Put -[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:] behind a USE(UICONTEXTMENU) |
| compiler guard; currently, it is declared everywhere, but only implemented if ENABLE(DATA_DETECTION) && |
| USE(UICONTEXTMENU). However, WKContentView only invokes it behind code that is guarded by USE(UICONTEXTMENU). |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKActionSheetAssistant.mm: |
| (-[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:]): |
| |
| 2020-05-11 Philippe Normand <pnormand@igalia.com> |
| |
| [GTK] Media and audio permission request unit tests are timing out |
| https://bugs.webkit.org/show_bug.cgi?id=158257 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Add new private API to disable secure capture device contexts. |
| This is needed for the API tests. |
| |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewSetMediaCaptureRequiresSecureConnection): |
| * UIProcess/API/glib/WebKitWebViewPrivate.h: |
| |
| 2020-05-10 Basuke Suzuki <basuke.suzuki@sony.com> |
| |
| Add ENABLE_PERIODIC_MEMORY_MONITOR flag. |
| https://bugs.webkit.org/show_bug.cgi?id=211704 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| No new tests because there's no behavior change. |
| |
| Replace PLATFORM() macros with ENABLE() macro. |
| |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::initializeWebProcess): |
| |
| 2020-05-10 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| REGRESSION(r261270): Broke build with python3 |
| https://bugs.webkit.org/show_bug.cgi?id=211699 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Remove the problematic print statement. It causes the script to fail. If fixed, it spams the |
| build output. We only print messages during the build when there are problems to be fixed. |
| |
| * Scripts/generate-message-receiver.py: |
| (main): |
| |
| 2020-05-10 Tim Horton <timothy_horton@apple.com> |
| |
| Clicking a tel:// link on iPad with a trackpad presents different UI than tapping on it |
| https://bugs.webkit.org/show_bug.cgi?id=211686 |
| <rdar://problem/57941589> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Previously, iOS WebKit had code in handleTap, handleTwoFingerTapAtPoint, and commitPotentialTap, |
| which introspected the hit element /before/ dispatching the tap (or synthetic click) to the DOM, |
| short circuiting all normal event handling machinery in order to prevent the default action |
| and present the Data Detectors UI for the given link. |
| |
| There's one immediate problem with this, which is that there is no similar code in the direct |
| click event handler path, which we now use for trackpad/mouse input on iPad. There's also a |
| secondary problem (which we have not seen in practice), which is that pages cannot preventDefault |
| to avoid launching the Data Detectors UI on a link, like they could to prevent an ordinary |
| link from being followed. |
| |
| In order to resolve both issues and reduce duplication of logic, move the code that introspects |
| the element and invokes Data Detectors UI from high-level WebKit event dispatch code (where it |
| doesn't really belong) down to WebCore's default click event handler for anchors, right next to |
| the code that would ordinarily cause a navigation. This way, no matter how we get here, whether |
| by synthetic click or real click, we'll invoke the Data Detectors UI. |
| |
| One alternative considered at length: we could actually let the navigation happen, and instead |
| handle the switch in navigation policy code, but there are a few reasons that did not seem ideal: |
| 1) We'd need to plumb platform-specific data structures through a ton of FrameLoader code. |
| 2) Clients often block non-HTTP(S) navigations, so in order to keep the feature functional, |
| we'd have to disregard the client's policy decision, defeating much of the purpose of making |
| use of the navigation mechanism in the first place. |
| |
| * UIProcess/PageClient.h: |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * UIProcess/ios/PageClientImplIOS.h: |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::showDataDetectorsUIForPositionInformation): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::showDataDetectorsUIForPositionInformation): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: |
| (WebKit::WebChromeClient::showDataDetectorsUIForElement): |
| Plumb showDataDetectorsUIForPositionInformation from iOS WebKit's ChromeClient |
| implementation all the way to WKContentView. |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKActionSheetAssistant.mm: |
| (-[WKActionSheetAssistant showDataDetectorsUIForPositionInformation:]): |
| (-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]): |
| (-[WKActionSheetAssistant contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): |
| (-[WKActionSheetAssistant showDataDetectorsSheet]): Deleted. |
| Make it possible to push InteractionInformationAtPosition into WKActionSheetAssistant, |
| instead of having it always pull a fresh one upon invocation, so that we can use the |
| position information passed along with the showDataDetectorsUIForPositionInformation message. |
| |
| (-[WKActionSheetAssistant _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]): |
| (-[WKActionSheetAssistant suggestedActionsForContextMenuWithPositionInformation:]): |
| Fix an existing bug where Data Detectors context menus would show extra default actions, |
| by moving our implementation of the -_contextMenuInteraction:overrideSuggestedActionsForConfiguration: |
| delegate here, sharing it with WKContentViewInteraction. |
| |
| In a future patch, we should reconsider having three separate UIContextMenuInteractions. |
| |
| Also, remove the contextMenuPresentationLocationForActionSheetAssistant: delegate, |
| since it will be wrong in the case of pushed-in position information, and instead |
| use the position information's original hit test point. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _showDataDetectorsUI]): |
| (-[WKContentView _showDataDetectorsUIForPositionInformation:]): |
| (-[WKContentView _actionForLongPressFromPositionInformation:]): |
| (-[WKContentView _didNotHandleTapAsClick:]): |
| (-[WKContentView dataDetectionContextForPositionInformation:]): |
| (-[WKContentView dataDetectionContextForActionSheetAssistant:positionInformation:]): |
| (-[WKContentView _showDataDetectorsSheet]): Deleted. |
| (-[WKContentView currentPositionInformation]): Deleted. |
| (-[WKContentView dataDetectionContextForActionSheetAssistant:]): Deleted. |
| Instead of exposing an unnecessary -currentPositionInformation getter on WKActionSheetAssistant, |
| provide it as an argument to the WKActionSheetAssistantDelegate methods that actually need it. |
| |
| (-[WKContentView contextMenuPresentationLocationForActionSheetAssistant:]): Deleted. |
| (-[WKContentView _contextMenuInteraction:overrideSuggestedActionsForConfiguration:]): |
| Adopt WKActionSheetAssistant's suggestedActions mechanism so we can share code. |
| |
| * UIProcess/ios/WKPDFView.mm: |
| (-[WKPDFView _showActionSheetForURL:atLocation:withAnnotationRect:]): |
| (-[WKPDFView dataDetectionContextForActionSheetAssistant:positionInformation:]): |
| (-[WKPDFView dataDetectionContextForActionSheetAssistant:]): Deleted. |
| Adapt to some WKActionSheetAssistantDelegate changes. |
| |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::handleTap): |
| (WebKit::WebPage::handleTwoFingerTapAtPoint): |
| (WebKit::WebPage::commitPotentialTap): |
| Remove the aforementioned short-circuiting paths for Data Detectors links. |
| 2020-05-09 David Kilzer <ddkilzer@apple.com> |
| |
| Attempt #2 to fix internal iOS build |
| |
| * UIProcess/ios/WKMouseGestureRecognizer.mm: |
| - Use ALLOW_DEPRECATED_IMPLEMENTATIONS_{BEGIN,END}. |
| |
| 2020-05-09 David Kilzer <ddkilzer@apple.com> |
| |
| Attemp to fix internal iOS build |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| - Define @class UIHoverEvent using header if available, else |
| fall back to local class definition. |
| - Define methods separately from class definition. |
| * UIProcess/ios/WKMouseGestureRecognizer.mm: |
| (-[WKMouseGestureRecognizer setView:]): |
| - Use new method if it is available. |
| |
| 2020-05-09 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r261389. |
| https://bugs.webkit.org/show_bug.cgi?id=211678 |
| |
| Introduced page loading regression. (Requested by perarne on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "[iOS] Update message filtering rules in the WebContent |
| process' sandbox" |
| https://bugs.webkit.org/show_bug.cgi?id=211188 |
| https://trac.webkit.org/changeset/261389 |
| |
| 2020-05-09 David Kilzer <ddkilzer@apple.com> |
| |
| Adapt LocalCurrentGraphicsContext for iOS |
| <https://webkit.org/b/211660> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::convertPlatformImageToBitmap): |
| - Use LocalCurrentGraphicsContext for both iOS and Mac code |
| paths. |
| |
| * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: |
| - Switch from PLATFORM(MAC) and PLATFORM(IOS_FAMIY) to |
| USE(APPKIT) to separate platform code. |
| (WebKit::convertDragImageToBitmap): |
| (WebKit::convertImageToBitmap): Delete. |
| (WebKit::convertCGImageToBitmap): Delete. |
| - Combine Mac-specific convertImageToBitmap() and iOS-specific |
| convertCGImageToBitmap() into a single method using DragImage |
| type and special-casing one line of code. |
| (WebKit::WebDragClient::startDrag): |
| (WebKit::WebDragClient::didConcludeEditDrag): |
| - Combine iOS and Mac methods into a singe method. |
| |
| 2020-05-09 David Quesada <david_quesada@apple.com> |
| |
| Remove HAVE_UI_SCROLL_VIEW_INDICATOR_FLASHING_SPI |
| https://bugs.webkit.org/show_bug.cgi?id=211662 |
| rdar://problem/63048713 |
| |
| Reviewed by Darin Adler. |
| |
| Remove this platform conditional and unconditionally use -[UIScrolView _flashScrollIndicatorsForAxes: |
| persistingPreviousFlashes:]. All supported platforms with UIScrollView have this SPI, and the conditional |
| was excluding Mac Catalyst, making WKKeyboardScrollViewAnimator send a message to its scroll view that |
| is no longer implemented. |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| Remove the declaration of the now unused -_flashScrollIndicatorsPersistingPreviousFlashes:. |
| * UIProcess/ios/WKKeyboardScrollingAnimator.mm: |
| (axesForDelta): |
| (-[WKKeyboardScrollViewAnimator scrollToContentOffset:animated:]): |
| |
| 2020-05-08 David Kilzer <ddkilzer@apple.com> |
| |
| Remove empty directories from from svn.webkit.org repository |
| <https://webkit.org/b/211644> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/API/win: Removed. |
| |
| 2020-05-08 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r210945): No attachment when sharing to mail |
| https://bugs.webkit.org/show_bug.cgi?id=211651 |
| <rdar://problem/63040170> |
| |
| Reviewed by Tim Horton. |
| |
| When failing to determine foreground state, the code before r210945 was assuming |
| 'foreground', while the code in r210945 assume 'background'. This causes things |
| to not render properly when we fail to determine the foreground state. |
| |
| This patch merely restores pre-r210945 behavior. I will investigate why we are |
| unable to determinate the host application PID for the MailCompositionService. |
| |
| * UIProcess/ApplicationStateTracker.mm: |
| (WebKit::isApplicationForeground): |
| |
| 2020-05-08 Nikos Mouchtaris <nmouchtaris@apple.com> |
| |
| Implement web-share v2 for files |
| https://bugs.webkit.org/show_bug.cgi?id=209265 |
| |
| Reviewed by Andy Estes. |
| |
| Added support for passing file objects over IPC and |
| sharing of files to share sheet. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<Vector<RawFile>>::encode): |
| (IPC::ArgumentCoder<Vector<RawFile>>::decode): |
| (IPC::ArgumentCoder<ShareDataWithParsedURL>::encode): |
| (IPC::ArgumentCoder<ShareDataWithParsedURL>::decode): |
| * Shared/WebCoreArgumentCoders.h: |
| * UIProcess/Cocoa/ShareableFileWrite.h: Added. |
| * UIProcess/Cocoa/ShareableFileWrite.mm: Added. |
| (+[WKShareableFileWrite getSharingDirectoryPath]): |
| (+[WKShareableFileWrite getFileDirectoryForSharing]): |
| (+[WKShareableFileWrite removeFileDirectoryForSharing]): |
| (+[WKShareableFileWrite setQuarantineInformationForFilePath:]): |
| (+[WKShareableFileWrite applyQuarantineSandboxAndDownloadFlagsToFileAtPath:]): |
| (+[WKShareableFileWrite createFilename:]): |
| (+[WKShareableFileWrite writeFileToShareableURL:data:]): |
| * UIProcess/Cocoa/WKShareSheet.mm: |
| (-[WKShareSheet presentWithParameters:inRect:completionHandler:]): |
| (-[WKShareSheet _didCompleteWithSuccess:]): |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-08 Brent Fulgham <bfulgham@apple.com> |
| |
| Revise sandbox to stop logging some commonly-used properties |
| https://bugs.webkit.org/show_bug.cgi?id=211636 |
| <rdar://problem/63014244> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Further living on and testing has shown a handful of sysctl entries that are in regular use, and do not need |
| to be logged or considered for removal. This patch has no change in behavior, just reduces logging. |
| |
| * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: |
| |
| 2020-05-08 Chris Dumez <cdumez@apple.com> |
| |
| Make WKWebViewConfiguration._alwaysRunsAtForegroundPriority an alias for _clientNavigationsRunAtForegroundPriority |
| https://bugs.webkit.org/show_bug.cgi?id=211632 |
| |
| Reviewed by Darin Adler. |
| |
| Make WKWebViewConfiguration._alwaysRunsAtForegroundPriority an alias for _clientNavigationsRunAtForegroundPriority. |
| _alwaysRunsAtForegroundPriority is a frequent source of process assertion leaks that get blamed on WebKit. Clients |
| are using this in order to be able to do loads in background views so _clientNavigationsRunAtForegroundPriority |
| should suffice and is not leak prone since the process assertion is released after the navigation has completed. |
| |
| * UIProcess/API/APIPageConfiguration.cpp: |
| (API::PageConfiguration::copy const): |
| * UIProcess/API/APIPageConfiguration.h: |
| (API::PageConfiguration::alwaysRunsAtForegroundPriority const): Deleted. |
| (API::PageConfiguration::setAlwaysRunsAtForegroundPriority): Deleted. |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration _alwaysRunsAtForegroundPriority]): |
| (-[WKWebViewConfiguration _setAlwaysRunsAtForegroundPriority:]): |
| * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::close): |
| (WebKit::WebPageProxy::updateThrottleState): |
| (WebKit::WebPageProxy::resetStateAfterProcessExited): |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-05-08 Alex Christensen <achristensen@webkit.org> |
| |
| Revert r260390 |
| https://bugs.webkit.org/show_bug.cgi?id=210759 |
| <rdar://problem/62608140> |
| |
| r260390 was intended to stop hitting some assertions in ~PendingFrameLoad, but it seems to have caused a regression. |
| Reverting it and removing the invalid assertions. |
| |
| * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: |
| (WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::~PendingFrameLoad): |
| (WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager): |
| |
| 2020-05-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] caret appears in the middle of a search field when field is focused on agoda.com |
| https://bugs.webkit.org/show_bug.cgi?id=211591 |
| <rdar://problem/60605873> |
| |
| Reviewed by Antoine Quint. |
| |
| The main search field on the mobile version of this website begins offscreen, with a CSS transform that moves it |
| to the far right; tapping the button element that (visually) has a search-field-like appearance on the front |
| page programmatically focuses the real offscreen search field, and animates it onscreen by changing the CSS |
| transform attribute to remove the x-axis translation. |
| |
| On iOS, the caret rect is computed and sent to the UI process via editor state updates; however, the editor |
| state is computed immediately after focusing the input field. As such, the caret rect at this moment is computed |
| in the middle of the animation, leaving it stuck in an unpredictable location. |
| |
| To fix this, add plumbing to call into the WebKit client layer when an animation has ended. On iOS, if the |
| selection is visible (i.e. a ranged selection, or editable caret), then check to see whether the element that |
| has finished animating contains either endpoint of the selection. If so, then schedule a followup editor state |
| update to push updated selection information to the UI process. |
| |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::animationDidFinishForElement): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| |
| Add a new client hook for when animations end. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::animationDidFinishForElement): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| |
| Add logic to schedule a new editor state update if needed, after an animation ends that might affect either |
| the start or end of the selection. |
| |
| (WebKit::WebPage::animationDidFinishForElement): |
| |
| 2020-05-08 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r260228): Linker warning about limitsNavigationsToAppBoundDomains property overriding instance methods from class |
| <https://webkit.org/b/211393> |
| |
| Reviewed by Brent Fulgham. |
| |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration limitsNavigationsToAppBoundDomains]): |
| (-[WKWebViewConfiguration setLimitsNavigationsToAppBoundDomains:]): |
| - Move from WKPrivate category to main category to fix linker |
| warnings. |
| |
| 2020-05-08 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION(r259209) Webview's pending URL is null after restoring session state |
| https://bugs.webkit.org/show_bug.cgi?id=211626 |
| <rdar://problem/62992262> |
| |
| Reviewed by Alex Christensen. |
| |
| The issue was that WebPageProxy::goToBackForwardItem() would behave differently whether |
| the page has a running process or not. In particular, when the page did not have a |
| running process, goToBackForwardItem() would return early and call launchProcessWithItem() |
| instead. Unlike goToBackForwardItem(), launchProcessWithItem() would fail to set the |
| pending API request. |
| |
| To address the issue, I am getting rid of launchProcessWithItem() and merging its logic |
| into goToBackForwardItem() instead. Both methods shared a lot of code anyway and having |
| 2 separate code paths that may diverge is error prone. |
| |
| Change is covered by new API test. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::goToBackForwardItem): |
| (WebKit::WebPageProxy::launchProcessWithItem): Deleted. |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-05-08 Alex Christensen <achristensen@webkit.org> |
| |
| WKWebView.title should be safe browsing warning's title during a safe browsing warning |
| https://bugs.webkit.org/show_bug.cgi?id=211403 |
| |
| Reviewed by Tim Horton. |
| |
| Add a new property to PageLoadState, which allows the title to be set underneath it. |
| That way, once the safe browsing warning is closed, we can update the title to what it would've been, |
| including any changes that happened while the warning was open. |
| |
| Covered by an API test. I also manually verified this fixes rdar://problem/56201982 |
| |
| * UIProcess/PageLoadState.cpp: |
| (WebKit::PageLoadState::commitChanges): |
| (WebKit::PageLoadState::reset): |
| (WebKit::PageLoadState::didCommitLoad): |
| (WebKit::PageLoadState::title const): |
| (WebKit::PageLoadState::setTitleFromSafeBrowsingWarning): |
| * UIProcess/PageLoadState.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| |
| 2020-05-08 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Update message filtering rules in the WebContent process' sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=211188 |
| |
| Reviewed by Brent Fulgham. |
| |
| Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS. |
| Messages that have not been observed being in use should be denied. |
| |
| No new tests, covered by existing tests. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-08 Chris Dumez <cdumez@apple.com> |
| |
| Turn processDidBecomeUnresponsive logging into error logging |
| https://bugs.webkit.org/show_bug.cgi?id=211629 |
| |
| Reviewed by Youenn Fablet. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::processDidBecomeUnresponsive): |
| |
| 2020-05-08 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] Close connections to Launch Services after revoking extension |
| https://bugs.webkit.org/show_bug.cgi?id=211594 |
| |
| Reviewed by Brent Fulgham. |
| |
| In <https://trac.webkit.org/changeset/258915/webkit>, connections to the Launch Services database mapping |
| services were denied, by creating a temporary extension. After revoking this extension in the WebContent |
| process, it is important to close any open connections to Launch Services initiated by the mapping. |
| |
| No new tests, covered by existing UTI/MIME type tests. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-05-08 Youenn Fablet <youenn@apple.com> |
| |
| Handle remote audio capture IPC messages in a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=211583 |
| |
| Reviewed by Eric Carlson. |
| |
| We introduce RemoteCaptureSampleManager which is responsible to get remote capture sample IPC messages and treat them from a background thread. |
| It is currently used to handle audio capture IPC messages. |
| We move UserMediaCaptureManager::Source in its own file and rename it to RemoteRealtimeMediaSource. |
| |
| Covered by existing tests. |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * PlatformMac.cmake: |
| * SourcesCocoa.txt: |
| * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/cocoa/RemoteCaptureSampleManager.cpp: Added. |
| (WebKit::RemoteCaptureSampleManager::RemoteCaptureSampleManager): |
| (WebKit::RemoteCaptureSampleManager::~RemoteCaptureSampleManager): |
| (WebKit::RemoteCaptureSampleManager::setConnection): |
| (WebKit::RemoteCaptureSampleManager::addSource): |
| (WebKit::RemoteCaptureSampleManager::removeSource): |
| (WebKit::RemoteCaptureSampleManager::dispatchToThread): |
| (WebKit::RemoteCaptureSampleManager::storageChanged): |
| (WebKit::RemoteCaptureSampleManager::audioSamplesAvailable): |
| * WebProcess/cocoa/RemoteCaptureSampleManager.h: Added. |
| * WebProcess/cocoa/RemoteCaptureSampleManager.messages.in: Added. |
| * WebProcess/cocoa/RemoteRealtimeMediaSource.cpp: Added. |
| (WebKit::RemoteRealtimeMediaSource::RemoteRealtimeMediaSource): |
| (WebKit::RemoteRealtimeMediaSource::~RemoteRealtimeMediaSource): |
| (WebKit::RemoteRealtimeMediaSource::whenReady): |
| (WebKit::RemoteRealtimeMediaSource::didFail): |
| (WebKit::RemoteRealtimeMediaSource::setAsReady): |
| (WebKit::RemoteRealtimeMediaSource::clone): |
| (WebKit::RemoteRealtimeMediaSource::setCapabilities): |
| (WebKit::RemoteRealtimeMediaSource::setSettings): |
| (WebKit::RemoteRealtimeMediaSource::remoteAudioSamplesAvailable): |
| (WebKit::RemoteRealtimeMediaSource::remoteVideoSampleAvailable): |
| (WebKit::RemoteRealtimeMediaSource::connection): |
| (WebKit::RemoteRealtimeMediaSource::startProducingData): |
| (WebKit::RemoteRealtimeMediaSource::stopProducingData): |
| (WebKit::RemoteRealtimeMediaSource::setShouldApplyRotation): |
| (WebKit::RemoteRealtimeMediaSource::capabilities): |
| (WebKit::RemoteRealtimeMediaSource::applyConstraints): |
| (WebKit::RemoteRealtimeMediaSource::applyConstraintsSucceeded): |
| (WebKit::RemoteRealtimeMediaSource::applyConstraintsFailed): |
| (WebKit::RemoteRealtimeMediaSource::hasEnded): |
| (WebKit::RemoteRealtimeMediaSource::stopBeingObserved): |
| (WebKit::RemoteRealtimeMediaSource::requestToEnd): |
| * WebProcess/cocoa/RemoteRealtimeMediaSource.h: Added. |
| (WebKit::RemoteRealtimeMediaSource::identifier const): |
| (WebKit::RemoteRealtimeMediaSource::settings const): |
| (WebKit::RemoteRealtimeMediaSource::setShouldCaptureInGPUProcess): |
| (WebKit::RemoteRealtimeMediaSource::shouldCaptureInGPUProcess const): |
| * WebProcess/cocoa/UserMediaCaptureManager.cpp: |
| (WebKit::UserMediaCaptureManager::createCaptureSource): |
| (WebKit::UserMediaCaptureManager::cloneSource): |
| (WebKit::UserMediaCaptureManager::cloneVideoSource): |
| (WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource): |
| (WebKit::UserMediaCaptureManager::AudioFactory::setShouldCaptureInGPUProcess): |
| (WebKit::UserMediaCaptureManager::VideoFactory::createVideoCaptureSource): |
| (WebKit::UserMediaCaptureManager::DisplayFactory::createDisplayCaptureSource): |
| * WebProcess/cocoa/UserMediaCaptureManager.h: |
| * WebProcess/cocoa/UserMediaCaptureManager.messages.in: |
| |
| 2020-05-08 Youenn Fablet <youenn@apple.com> |
| |
| Video capture does not get unmuted in case of tab switch on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=211509 |
| |
| Reviewed by Eric Carlson. |
| |
| Remove no longer needed code. |
| |
| * WebProcess/cocoa/UserMediaCaptureManager.cpp: |
| (WebKit::UserMediaCaptureManager::VideoFactory::setActiveSource): |
| * WebProcess/cocoa/UserMediaCaptureManager.h: |
| |
| 2020-05-08 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK4 build after r261370 |
| |
| * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp: |
| (webkitScriptDialogIsUserHandled): |
| |
| 2020-05-08 Lauro Moura <lmoura@igalia.com> |
| |
| [WPE][WebDriver] Implement user prompt support |
| https://bugs.webkit.org/show_bug.cgi?id=207372 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Provide a default implementation for WebDriver dialog commands. |
| This implementation will mimic the expected browser behavior of |
| accepting/dismissing the dialogs, while not exposing any new API. |
| |
| * UIProcess/API/glib/WebKitScriptDialogPrivate.h: |
| - Expose new private function to check whether the dialog is using a |
| default implementation or is handled by the user. |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| - Avoid default WebDriver behavior if the dialog is user-handled. |
| (webkitWebViewSetCurrentScriptDialogUserInput): |
| (webkitWebViewAcceptCurrentScriptDialog): |
| (webkitWebViewDismissCurrentScriptDialog): |
| * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp: |
| (webkitScriptDialogIsUserHandled): |
| - Return whether the dialog is user handled. |
| * UIProcess/API/wpe/WebKitScriptDialogWPE.cpp: |
| - Added basic behavior for the WebDriver dialog callbacks for WPE. |
| (webkitScriptDialogAccept): |
| (webkitScriptDialogDismiss): |
| (webkitScriptDialogSetUserInput): |
| (webkitScriptDialogIsUserHandled): |
| |
| * UIProcess/API/wpe/WebKitWebViewWPE.cpp: |
| (webkitWebViewScriptDialog): |
| - Hold a dialog ref if the webview is controlled by automation and ends |
| up calling the default "script-dialog" event handler. |
| |
| 2020-05-07 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Roll back newly created credentials if an error occurs |
| https://bugs.webkit.org/show_bug.cgi?id=183530 |
| <rdar://problem/43357305> |
| |
| Reviewed by Brent Fulgham. |
| |
| We should clean up any newly created credentials if an error occurs before the relying party |
| registers the identity. Otherwise we are left with a dangling credential. |
| |
| Covered by API tests. |
| |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h: |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: |
| (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): |
| (WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification): |
| (WebKit::LocalAuthenticator::receiveException const): |
| |
| 2020-05-07 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r261252. |
| |
| Reland r260684 now that a proper fix has landed in Reader |
| |
| Reverted changeset: |
| |
| "REGRESSION (r260684): Reader background is lost after |
| multitasking" |
| https://bugs.webkit.org/show_bug.cgi?id=211533 |
| https://trac.webkit.org/changeset/261252 |
| |
| 2020-05-07 Megan Gardner <megan_gardner@apple.com> |
| |
| Build Fix for MacCatalyst |
| https://bugs.webkit.org/show_bug.cgi?id=211601 |
| |
| Reviewed by Tim Horton. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _removeContextMenuViewIfPossible]): |
| |
| 2020-05-07 Chris Dumez <cdumez@apple.com> |
| |
| Crash under WebKit::XPCServiceMain |
| https://bugs.webkit.org/show_bug.cgi?id=211600 |
| <rdar://problem/62875458> |
| |
| Reviewed by Darin Adler. |
| |
| Made the following changes: |
| - Crash under strcmp() could in theory happen if expectedBundleVersion.UTF8String was null, which could |
| happen if expectedBundleVersion was null. I now use higher level String types for the versions, make |
| sure they are not null and use String comparison to compare them. |
| - Call CRASH() instead of __builtin_trap(), to guarantee that we crash with a SIGTRAP (see comment next |
| to CRASH() macro). |
| - Move CRASH() call to a crashDueWebKitFrameworkVersionMismatch() never inlined function to make it |
| clear when it crashes due to a framework version mismatch and distinguish from proper crashes. |
| |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::crashDueWebKitFrameworkVersionMismatch): |
| (WebKit::XPCServiceMain): |
| |
| 2020-05-07 Youenn Fablet <youenn@apple.com> |
| |
| Remove AudioMediaStreamTrackRenderer::muted |
| https://bugs.webkit.org/show_bug.cgi?id=211289 |
| |
| Reviewed by Eric Carlson. |
| |
| muted is unnecessary since we are using start/stop instead. |
| |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.h: |
| * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.messages.in: |
| * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp: |
| * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h: |
| |
| 2020-05-07 Don Olmstead <don.olmstead@sony.com> |
| |
| Remove unused USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) |
| https://bugs.webkit.org/show_bug.cgi?id=211582 |
| |
| Reviewed by Fujii Hironori. |
| |
| After r261264 all ports implemented USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR. |
| |
| * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: |
| (WebKit::ThreadedCompositor::ThreadedCompositor): |
| (WebKit::m_displayRefreshMonitor): |
| (WebKit::ThreadedCompositor::invalidate): |
| (WebKit::ThreadedCompositor::sceneUpdateFinished): |
| (WebKit::ThreadedCompositor::displayRefreshMonitor): |
| * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: |
| * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp: |
| * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::createDisplayRefreshMonitor const): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: |
| (WebKit::DrawingAreaCoordinatedGraphics::createDisplayRefreshMonitor): |
| * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h: |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp: |
| (WebKit::LayerTreeHost::createDisplayRefreshMonitor): |
| * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h: |
| (WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged): |
| * WebProcess/WebPage/DrawingArea.cpp: |
| * WebProcess/WebPage/DrawingArea.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm: |
| * WebProcess/WebPage/mac/DrawingAreaMac.cpp: |
| |
| 2020-05-07 Darin Adler <darin@apple.com> |
| |
| Add some missing null checks for DocumentLoader |
| https://bugs.webkit.org/show_bug.cgi?id=211544 |
| rdar://62843516 |
| |
| Reviewed by Anders Carlsson. |
| |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): |
| Add a null check before calling DocumentLoader::response. |
| |
| 2020-05-07 Darin Adler <darin@apple.com> |
| |
| Remove USE(INSERTION_UNDO_GROUPING) checks in macOS platform code |
| https://bugs.webkit.org/show_bug.cgi?id=211525 |
| |
| Reviewed by Anders Carlsson. |
| |
| * UIProcess/Cocoa/WebViewImpl.mm: Use NSTextInputContextSPI.h. |
| (WebKit::WebViewImpl::validAttributesForMarkedText): Removed |
| USE(INSERTION_UNDO_GROUPING) from the macOS-specific code here. |
| (WebKit::WebViewImpl::insertText): Ditto. |
| * UIProcess/PageClient.h: Ditto. |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::registerInsertionUndoGrouping): Deleted. |
| This function is not needed at all on iOS. |
| * UIProcess/mac/PageClientImplMac.h: Removed USE(INSERTION_UNDO_GROUPING). |
| * UIProcess/mac/PageClientImplMac.mm: |
| (WebKit::PageClientImpl::registerInsertionUndoGrouping): Ditto. |
| |
| 2020-05-07 Chris Dumez <cdumez@apple.com> |
| |
| Drop dead platformPrepareToSuspend / platformProcessDidResume in NetworkProcess |
| https://bugs.webkit.org/show_bug.cgi?id=211579 |
| |
| Reviewed by Geoffrey Garen. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::prepareToSuspend): |
| (WebKit::NetworkProcess::resume): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/cocoa/NetworkProcessCocoa.mm: |
| (WebKit::NetworkProcess::platformPrepareToSuspend): Deleted. |
| (WebKit::NetworkProcess::platformProcessDidResume): Deleted. |
| * NetworkProcess/curl/NetworkProcessCurl.cpp: |
| (WebKit::NetworkProcess::platformPrepareToSuspend): Deleted. |
| (WebKit::NetworkProcess::platformProcessDidResume): Deleted. |
| * NetworkProcess/soup/NetworkProcessSoup.cpp: |
| (WebKit::NetworkProcess::platformPrepareToSuspend): Deleted. |
| (WebKit::NetworkProcess::platformProcessDidResume): Deleted. |
| |
| 2020-05-07 Megan Gardner <megan_gardner@apple.com> |
| |
| ContextMenu: entire webpage pops and disappears to generate preview of embedded image |
| https://bugs.webkit.org/show_bug.cgi?id=211272 |
| <rdar://problem/62482013> |
| |
| Reviewed by Tim Horton. |
| |
| The ActionSheetAssistant is always around, so using the presence of one |
| to determine if we need to remove the _contextMenuHintContainerView is incorrect |
| and causes it to be around on the next invocation of the context menu, and |
| causing the failure of the creation of a new preview, which then will default to |
| popping the whole page. We need to ask the ActionSheetAssistant if it is actively showing |
| anything, and then correctly clean up the _contextMenuHintContainerView after the |
| end of the interactions for FileUploadMenu and ActionSheetAssistant are done with their |
| interactions. |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKActionSheetAssistant.mm: |
| (-[WKActionSheetAssistant removeContextMenuInteraction]): |
| (-[WKActionSheetAssistant hasContextMenuInteraction]): |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView removeContextMenuViewIfPossibleForActionSheetAssistant:]): |
| (-[WKContentView _canRemoveContextMenuView]): |
| (-[WKContentView _removeContextMenuViewIfPossible]): |
| (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]): |
| * UIProcess/ios/forms/WKFileUploadPanel.mm: |
| (-[WKFileUploadPanel removeContextMenuInteraction]): |
| |
| 2020-05-07 Chris Dumez <cdumez@apple.com> |
| |
| Simplify several IPC sending call sites in the UIProcess |
| https://bugs.webkit.org/show_bug.cgi?id=211575 |
| |
| Reviewed by Alex Christensen. |
| |
| Simplify several IPC sending call sites in the UIProcess by leveraging the fact |
| that WebPageProxy subclasses IPC::MessageSender. |
| |
| * UIProcess/Cocoa/TextCheckingController.mm: |
| (WebKit::TextCheckingController::replaceRelativeToSelection): |
| (WebKit::TextCheckingController::removeAnnotationRelativeToSelection): |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::performDictionaryLookupAtLocation): |
| (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): |
| (WebKit::WebPageProxy::insertDictatedTextAsync): |
| (WebKit::WebPageProxy::speakingErrorOccurred): |
| (WebKit::WebPageProxy::boundaryEventOccurred): |
| (WebKit::WebPageProxy::voicesDidChange): |
| * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: |
| (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision): |
| * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: |
| (WebKit::RemoteWebInspectorProxy::setDiagnosticLoggingAvailable): |
| * UIProcess/Inspector/WebInspectorProxy.cpp: |
| (WebKit::WebInspectorProxy::setDiagnosticLoggingAvailable): |
| * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: |
| (WebKit::remoteFileReplaceContentsCallback): |
| * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: |
| (WebKit::fileReplaceContentsCallback): |
| * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: |
| (WebKit::RemoteWebInspectorProxy::platformSave): |
| (WebKit::RemoteWebInspectorProxy::platformAppend): |
| * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: |
| (WebKit::WebInspectorProxy::platformSave): |
| (WebKit::WebInspectorProxy::platformAppend): |
| * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: |
| (WebKit::NotificationPermissionRequestManagerProxy::createRequest): |
| * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: |
| (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): |
| (WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): |
| * UIProcess/WebFrameProxy.cpp: |
| (WebKit::WebFrameProxy::collapseSelection): |
| * UIProcess/WebFullScreenManagerProxy.cpp: |
| (WebKit::WebFullScreenManagerProxy::willEnterFullScreen): |
| (WebKit::WebFullScreenManagerProxy::didEnterFullScreen): |
| (WebKit::WebFullScreenManagerProxy::willExitFullScreen): |
| (WebKit::WebFullScreenManagerProxy::didExitFullScreen): |
| (WebKit::WebFullScreenManagerProxy::setAnimatingFullScreen): |
| (WebKit::WebFullScreenManagerProxy::requestExitFullScreen): |
| (WebKit::WebFullScreenManagerProxy::saveScrollPosition): |
| (WebKit::WebFullScreenManagerProxy::restoreScrollPosition): |
| (WebKit::WebFullScreenManagerProxy::setFullscreenInsets): |
| (WebKit::WebFullScreenManagerProxy::setFullscreenAutoHideDuration): |
| (WebKit::WebFullScreenManagerProxy::setFullscreenControlsHidden): |
| * UIProcess/gtk/WebPageProxyGtk.cpp: |
| (WebKit::WebPageProxy::getCenterForZoomGesture): |
| * UIProcess/ios/SmartMagnificationController.mm: |
| (WebKit::SmartMagnificationController::handleSmartMagnificationGesture): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView ensurePositionInformationIsUpToDate:]): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::handleTwoFingerTapAtPoint): |
| (WebKit::WebPageProxy::handleStylusSingleTapAtPoint): |
| (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens): |
| (WebKit::WebPageProxy::willStartUserTriggeredZooming): |
| (WebKit::WebPageProxy::potentialTapAtPosition): |
| (WebKit::WebPageProxy::commitPotentialTap): |
| (WebKit::WebPageProxy::cancelPotentialTap): |
| (WebKit::WebPageProxy::tapHighlightAtPosition): |
| (WebKit::WebPageProxy::handleTap): |
| (WebKit::WebPageProxy::didRecognizeLongPress): |
| (WebKit::WebPageProxy::handleDoubleTapForDoubleClickAtPoint): |
| (WebKit::WebPageProxy::inspectorNodeSearchMovedToPosition): |
| (WebKit::WebPageProxy::inspectorNodeSearchEndedAtPosition): |
| (WebKit::WebPageProxy::blurFocusedElement): |
| (WebKit::WebPageProxy::setIsShowingInputViewForFocusedElement): |
| (WebKit::WebPageProxy::setFocusedElementValue): |
| (WebKit::WebPageProxy::setFocusedElementValueAsNumber): |
| (WebKit::WebPageProxy::setFocusedElementSelectedIndex): |
| (WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF): |
| (WebKit::WebPageProxy::contentSizeCategoryDidChange): |
| (WebKit::WebPageProxy::generateSyntheticEditingCommand): |
| * UIProcess/mac/ViewGestureControllerMac.mm: |
| (WebKit::ViewGestureController::handleMagnificationGestureEvent): |
| (WebKit::ViewGestureController::handleSmartMagnificationGesture): |
| * UIProcess/mac/WebPageProxyMac.mm: |
| (WebKit::WebPageProxy::windowAndViewFramesChanged): |
| (WebKit::WebPageProxy::setMainFrameIsScrollable): |
| (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): |
| (WebKit::WebPageProxy::fontAtSelection): |
| (WebKit::WebPageProxy::stringSelectionForPasteboard): |
| (WebKit::WebPageProxy::dataSelectionForPasteboard): |
| (WebKit::WebPageProxy::readSelectionFromPasteboard): |
| (WebKit::WebPageProxy::replaceSelectionWithPasteboardData): |
| (WebKit::WebPageProxy::sendComplexTextInputToPlugin): |
| (WebKit::WebPageProxy::uppercaseWord): |
| (WebKit::WebPageProxy::lowercaseWord): |
| (WebKit::WebPageProxy::capitalizeWord): |
| (WebKit::WebPageProxy::setSmartInsertDeleteEnabled): |
| (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens): |
| (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent): |
| (WebKit::WebPageProxy::acceptsFirstMouse): |
| |
| 2020-05-07 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260769. |
| https://bugs.webkit.org/show_bug.cgi?id=211578 |
| |
| Introduced regressions related to sharing (Requested by |
| perarne on #webkit). |
| |
| Reverted changeset: |
| |
| "[Cocoa] After r258891, r255119 can be reverted" |
| https://bugs.webkit.org/show_bug.cgi?id=211083 |
| https://trac.webkit.org/changeset/260769 |
| |
| 2020-05-07 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] AuxiliaryProcessProxy::sendWithAsyncReply() should prevent auxiliary process suspension while processing the IPC |
| https://bugs.webkit.org/show_bug.cgi?id=209928 |
| |
| Reviewed by Youenn Fablet. |
| |
| AuxiliaryProcessProxy::sendWithAsyncReply() should prevent auxiliary process suspension |
| on iOS while processing the IPC. If the process is suspended either before or during |
| the IPC, this could result in hangs. This is a speculative fix for the flaky timeouts |
| we see on many tests on iOS only. We know that missing activities with |
| sendWithAsyncReply has caused test timeouts in the past (Bug 211421). |
| |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::sendMessage): |
| * UIProcess/AuxiliaryProcessProxy.h: |
| (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply): |
| * UIProcess/GPU/GPUProcessProxy.cpp: |
| (WebKit::GPUProcessProxy::getGPUProcessConnection): |
| * UIProcess/GPU/GPUProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::getNetworkProcessConnection): |
| (WebKit::NetworkProcessProxy::setUseITPDatabase): |
| (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources): |
| (WebKit::NetworkProcessProxy::resetParametersToDefaultValues): |
| (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent): |
| (WebKit::NetworkProcessProxy::resetCrossSiteLoadsWithLinkDecorationForTesting): |
| (WebKit::NetworkProcessProxy::setAppBoundDomainsForResourceLoadStatistics): |
| (WebKit::NetworkProcessProxy::setShouldDowngradeReferrerForTesting): |
| (WebKit::NetworkProcessProxy::setThirdPartyCookieBlockingMode): |
| (WebKit::NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting): |
| (WebKit::NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting): |
| (WebKit::NetworkProcessProxy::sendPrepareToSuspend): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Plugins/PluginProcessProxy.cpp: |
| (WebKit::PluginProcessProxy::PluginProcessProxy): |
| * UIProcess/Plugins/PluginProcessProxy.h: |
| * UIProcess/ProcessThrottler.h: |
| (WebKit::ProcessThrottler::Activity::Activity): |
| (WebKit::ProcessThrottler::Activity::isQuietActivity const): |
| (WebKit::ProcessThrottler::Activity::invalidate): |
| * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: |
| (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest): |
| * UIProcess/WebBackForwardCacheEntry.cpp: |
| (WebKit::WebBackForwardCacheEntry::~WebBackForwardCacheEntry): |
| * UIProcess/WebCookieManagerProxy.cpp: |
| (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): |
| (WebKit::WebCookieManagerProxy::deleteCookie): |
| (WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince): |
| (WebKit::WebCookieManagerProxy::setCookies): |
| (WebKit::WebCookieManagerProxy::getAllCookies): |
| (WebKit::WebCookieManagerProxy::getCookies): |
| (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): |
| (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::getProcessDisplayName): |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::setThirdPartyCookieBlockingMode): |
| (WebKit::WebProcessProxy::fetchWebsiteData): |
| (WebKit::WebProcessProxy::deleteWebsiteData): |
| (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins): |
| (WebKit::WebProcessProxy::sendPrepareToSuspend): |
| (WebKit::WebProcessProxy::activePagesDomainsForTesting): |
| (WebKit::WebProcessProxy::establishServiceWorkerContext): |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::insertTextPlaceholder): |
| (WebKit::WebPageProxy::removeTextPlaceholder): |
| (WebKit::WebPageProxy::requestAutocorrectionData): |
| (WebKit::WebPageProxy::requestEvasionRectsAboveSelection): |
| (WebKit::WebPageProxy::updateSelectionWithDelta): |
| (WebKit::WebPageProxy::requestDocumentEditingContext): |
| (WebKit::WebPageProxy::insertDroppedImagePlaceholders): |
| |
| 2020-05-07 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] REGRESSION(r260996): Pressing <Tab> in an HTTP authentication dialog makes the dialog lose focus |
| https://bugs.webkit.org/show_bug.cgi?id=211555 |
| |
| Reviewed by Philippe Normand. |
| |
| Bring back webkitWebViewBaseFocus to GTK3. I made it GTK4 only by mistake in r260996. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseFocus): |
| (webkit_web_view_base_class_init): |
| |
| 2020-05-07 Philippe Normand <pnormand@igalia.com> |
| |
| [GTK] Build warning fixes |
| |
| Rubber-stamped by Žan Doberšek. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseGrabFocus): |
| * UIProcess/GPU/GPUProcessProxy.cpp: |
| (WebKit::GPUProcessProxy::getGPUProcessConnection): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::getNetworkProcessConnection): |
| |
| 2020-05-07 Youenn Fablet <youenn@apple.com> |
| |
| Sending WebRTC network packets should not go through the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=211291 |
| |
| Reviewed by Eric Carlson. |
| |
| Following on receiving RTC packets from a background thread, we also send RTC packets from a background thread. |
| Creation of the sockets also happens in a background thread. |
| LibWebRTCNetwork is getting the connection whenever a new connection to network process is created. |
| It will then hop to the RTC network thread to set the IPC connection to the libwebrtc socket factory. |
| |
| At creation of the socket, we get the IPC connection to the network process and keep a ref in the RTC socket. |
| In case network process crashed and the IPC connection of the RTC network is null, we hop to the main thread to create a new IPC connection. |
| This will fail the creation of the socket (as well as new ones as well) as long as the IPC connection to network process is not valid again. |
| |
| Covered by existing tests. |
| |
| * WebProcess/Network/webrtc/LibWebRTCNetwork.cpp: |
| (WebKit::LibWebRTCNetwork::setAsActive): |
| (WebKit::LibWebRTCNetwork::setConnection): |
| (WebKit::LibWebRTCNetwork::dispatchToThread): |
| * WebProcess/Network/webrtc/LibWebRTCNetwork.h: |
| (WebKit::LibWebRTCNetwork::connection): |
| (WebKit::LibWebRTCNetwork::isActive const): |
| * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: |
| (WebKit::LibWebRTCProvider::startedNetworkThread): |
| * WebProcess/Network/webrtc/LibWebRTCProvider.h: |
| * WebProcess/Network/webrtc/LibWebRTCSocket.cpp: |
| (WebKit::LibWebRTCSocket::SendTo): |
| (WebKit::LibWebRTCSocket::Close): |
| (WebKit::LibWebRTCSocket::SetOption): |
| (WebKit::LibWebRTCSocket::suspend): |
| * WebProcess/Network/webrtc/LibWebRTCSocket.h: |
| * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: |
| (WebKit::LibWebRTCSocketFactory::setConnection): |
| (WebKit::LibWebRTCSocketFactory::connection): |
| (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): |
| (WebKit::LibWebRTCSocketFactory::createUdpSocket): |
| (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): |
| (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): |
| (WebKit::LibWebRTCSocketFactory::addSocket): |
| (WebKit::LibWebRTCSocketFactory::removeSocket): |
| (WebKit::LibWebRTCSocketFactory::forSocketInGroup): |
| * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h: |
| |
| 2020-05-07 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Stop using the GtkWidget.destroy vfunc |
| https://bugs.webkit.org/show_bug.cgi?id=211553 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseDestroy): Removed. |
| (webkitWebViewBaseDispose): Bring in the code from the removed function, adapt |
| to use g_clear_pointer() to destroy the nested dialog. |
| (webkit_web_view_base_class_init): Do not set the GtkWidget.destroy vfunc. |
| |
| 2020-05-07 Philippe Normand <pnormand@igalia.com> |
| |
| [WPE][Qt] Enable by default |
| https://bugs.webkit.org/show_bug.cgi?id=211517 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * PlatformWPE.cmake: Fix WPEQt build. |
| |
| |
| 2020-05-06 Alex Christensen <achristensen@webkit.org> |
| |
| Fix webkitpy tests after r261254 |
| https://bugs.webkit.org/show_bug.cgi?id=211112 |
| |
| test.messages.in was accidentally deleted instead of moved, and messages_unittest.py needed to be told of the new locations of results. |
| The rest is just running the generator to update results. |
| |
| * Scripts/MessageNames.cpp: |
| (IPC::description): |
| (IPC::receiverName): |
| (IPC::isValidMessageName): |
| * Scripts/MessageNames.h: |
| * Scripts/testMessageReceiver.cpp: |
| (Messages::WebPage::GetPluginProcessConnection::send): |
| (Messages::WebPage::TestMultipleAttributes::send): |
| (WebKit::WebPage::didReceiveMessage): |
| (WebKit::WebPage::didReceiveSyncMessage): |
| * Scripts/testMessages.h: |
| (Messages::WebPage::messageReceiverName): |
| (Messages::WebPage::LoadURL::name): |
| (Messages::WebPage::LoadURL::LoadURL): |
| (Messages::WebPage::LoadURL::arguments const): |
| (Messages::WebPage::LoadSomething::name): |
| (Messages::WebPage::LoadSomething::LoadSomething): |
| (Messages::WebPage::LoadSomething::arguments const): |
| (Messages::WebPage::TouchEvent::name): |
| (Messages::WebPage::TouchEvent::TouchEvent): |
| (Messages::WebPage::TouchEvent::arguments const): |
| (Messages::WebPage::AddEvent::name): |
| (Messages::WebPage::AddEvent::AddEvent): |
| (Messages::WebPage::AddEvent::arguments const): |
| (Messages::WebPage::LoadSomethingElse::name): |
| (Messages::WebPage::LoadSomethingElse::LoadSomethingElse): |
| (Messages::WebPage::LoadSomethingElse::arguments const): |
| (Messages::WebPage::DidReceivePolicyDecision::name): |
| (Messages::WebPage::DidReceivePolicyDecision::DidReceivePolicyDecision): |
| (Messages::WebPage::DidReceivePolicyDecision::arguments const): |
| (Messages::WebPage::Close::name): |
| (Messages::WebPage::Close::arguments const): |
| (Messages::WebPage::PreferencesDidChange::name): |
| (Messages::WebPage::PreferencesDidChange::PreferencesDidChange): |
| (Messages::WebPage::PreferencesDidChange::arguments const): |
| (Messages::WebPage::SendDoubleAndFloat::name): |
| (Messages::WebPage::SendDoubleAndFloat::SendDoubleAndFloat): |
| (Messages::WebPage::SendDoubleAndFloat::arguments const): |
| (Messages::WebPage::SendInts::name): |
| (Messages::WebPage::SendInts::SendInts): |
| (Messages::WebPage::SendInts::arguments const): |
| (Messages::WebPage::CreatePlugin::name): |
| (Messages::WebPage::CreatePlugin::CreatePlugin): |
| (Messages::WebPage::CreatePlugin::arguments const): |
| (Messages::WebPage::RunJavaScriptAlert::name): |
| (Messages::WebPage::RunJavaScriptAlert::RunJavaScriptAlert): |
| (Messages::WebPage::RunJavaScriptAlert::arguments const): |
| (Messages::WebPage::GetPlugins::name): |
| (Messages::WebPage::GetPlugins::GetPlugins): |
| (Messages::WebPage::GetPlugins::arguments const): |
| (Messages::WebPage::GetPluginProcessConnection::name): |
| (Messages::WebPage::GetPluginProcessConnection::GetPluginProcessConnection): |
| (Messages::WebPage::GetPluginProcessConnection::arguments const): |
| (Messages::WebPage::TestMultipleAttributes::name): |
| (Messages::WebPage::TestMultipleAttributes::arguments const): |
| (Messages::WebPage::TestParameterAttributes::name): |
| (Messages::WebPage::TestParameterAttributes::TestParameterAttributes): |
| (Messages::WebPage::TestParameterAttributes::arguments const): |
| (Messages::WebPage::TemplateTest::name): |
| (Messages::WebPage::TemplateTest::TemplateTest): |
| (Messages::WebPage::TemplateTest::arguments const): |
| (Messages::WebPage::SetVideoLayerID::name): |
| (Messages::WebPage::SetVideoLayerID::SetVideoLayerID): |
| (Messages::WebPage::SetVideoLayerID::arguments const): |
| (Messages::WebPage::DidCreateWebProcessConnection::name): |
| (Messages::WebPage::DidCreateWebProcessConnection::DidCreateWebProcessConnection): |
| (Messages::WebPage::DidCreateWebProcessConnection::arguments const): |
| (Messages::WebPage::InterpretKeyEvent::name): |
| (Messages::WebPage::InterpretKeyEvent::InterpretKeyEvent): |
| (Messages::WebPage::InterpretKeyEvent::arguments const): |
| (Messages::WebPage::DeprecatedOperation::name): |
| (Messages::WebPage::DeprecatedOperation::DeprecatedOperation): |
| (Messages::WebPage::DeprecatedOperation::arguments const): |
| (Messages::WebPage::ExperimentalOperation::name): |
| (Messages::WebPage::ExperimentalOperation::ExperimentalOperation): |
| (Messages::WebPage::ExperimentalOperation::arguments const): |
| (Messages::None::messageReceiverName): Deleted. |
| * Scripts/testMessagesReplies.h: |
| * Scripts/webkit/messages_unittest.py: |
| * Scripts/webkit/test.messages.in: Added. |
| |
| 2020-05-06 Megan Gardner <megan_gardner@apple.com> |
| |
| Context Menus presented from the wrong location when presented from sub-frames |
| https://bugs.webkit.org/show_bug.cgi?id=211537 |
| <rdar://problem/60390846> |
| |
| Reviewed by Tim Horton. |
| |
| The calculation for bounds for selection Information did not take frames into account, |
| so if a frame was used, the location would not be correct in the context of the whole |
| page, so the presentation location ended up being way off. |
| |
| * UIProcess/ios/forms/WKFileUploadPanel.mm: |
| (-[WKFileUploadPanel showDocumentPickerMenu]): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::boundsPositionInformation): |
| (WebKit::selectionPositionInformation): |
| |
| 2020-05-06 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260689. |
| https://bugs.webkit.org/show_bug.cgi?id=211542 |
| |
| "Caused regressions deleting text and filling password fields" |
| (Requested by ddkilzer on #webkit). |
| |
| Reverted changeset: |
| |
| "WebPasteboardProxy::getPasteboardStringsForType() and |
| WebPasteboardProxy::readURLFromPasteboard() should check |
| return value of SharedMemory::createHandle()" |
| https://bugs.webkit.org/show_bug.cgi?id=211002 |
| https://trac.webkit.org/changeset/260689 |
| |
| 2020-05-06 Zalan Bujtas <zalan@apple.com> |
| |
| [ContentObservation] Shutterstock search bar is not activated on the first tap |
| https://bugs.webkit.org/show_bug.cgi?id=211529 |
| <rdar://problem/58843932> |
| |
| Reviewed by Simon Fraser. |
| |
| Shutterstock has a “initial click” action which converts some “actionable” elements (<a>) to some other “actionable” elements (<button>). |
| If this initial click also happens to be on an element that triggers content observation (input), we see those changes as actionable content and not proceed with the click event (stay at hover). |
| Any subsequent click works as expected. |
| It’s very difficult to eliminate such false positives since all we see is that some "actionable" content is going away while some "actionable" content is being created. |
| This quirk ensures that the first tap on the page does not trigger content observation. (It also means that any hover menu gets submitted on the first tap, but apparently |
| the Shutterstock top menu bar works fine with click events.) |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::didStartPageTransition): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::handleSyntheticClick): |
| |
| 2020-05-06 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Use CocoaColor in more places instead of platform defines |
| https://bugs.webkit.org/show_bug.cgi?id=211527 |
| |
| Reviewed by Darin Adler and Tim Horton. |
| |
| Use CocoaColor (added in r261247) in more places, and also introduce `CocoaFont.h` and use it to simplify some |
| existing code that uses platform ifdefs for UIFont, NSFont, UIFontDescriptor and NSFontDescriptor. |
| |
| No change in behavior. |
| |
| * Platform/cocoa/CocoaColor.h: |
| * Platform/cocoa/CocoaFont.h: Copied from Source/WebKit/Platform/cocoa/CocoaColor.h. |
| * Platform/cocoa/CocoaImage.h: |
| |
| Change `@class`es to `OBJC_CLASS`, so that this header can be safely imported in C++ code. |
| |
| * Shared/Cocoa/ArgumentCodersCocoa.mm: |
| (IPC::typeFromObject): |
| (IPC::isSerializableValue): |
| (IPC::encodeFontInternal): |
| (IPC::encodeObject): |
| (IPC::platformColorClass): Deleted. |
| (IPC::platformFontClass): Deleted. |
| * Shared/Cocoa/CoreTextHelpers.h: |
| * Shared/Cocoa/CoreTextHelpers.mm: |
| (WebKit::fontWithAttributes): |
| * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: |
| * UIProcess/Cocoa/WKSafeBrowsingWarning.h: |
| * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: |
| (fontOfSize): |
| (colorForItem): |
| (-[WKSafeBrowsingBox setSafeBrowsingBackgroundColor:]): |
| (-[WKSafeBrowsingWarning showDetailsClicked]): |
| (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]): |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::updateFontManagerIfNeeded): |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-06 Alex Christensen <achristensen@webkit.org> |
| |
| Reduce IPC overhead for message receiver name and message name to 2 bytes |
| https://bugs.webkit.org/show_bug.cgi?id=211112 |
| |
| Reviewed by Chris Dumez. |
| |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * GPUProcess/GPUConnectionToWebProcess.cpp: |
| (WebKit::GPUConnectionToWebProcess::didReceiveInvalidMessage): |
| * GPUProcess/GPUConnectionToWebProcess.h: |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): |
| (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): |
| (WebKit::NetworkConnectionToWebProcess::didReceiveInvalidMessage): |
| * NetworkProcess/NetworkConnectionToWebProcess.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::didReceiveMessage): |
| (WebKit::NetworkProcess::didReceiveSyncMessage): |
| * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: |
| (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAddMessageReceiver): Deleted. |
| (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorRemoveMessageReceiver): Deleted. |
| * Platform/IPC/Connection.cpp: |
| (IPC::Connection::WaitForMessageState::WaitForMessageState): |
| (IPC::Connection::addWorkQueueMessageReceiver): |
| (IPC::Connection::removeWorkQueueMessageReceiver): |
| (IPC::Connection::dispatchWorkQueueMessageReceiverMessage): |
| (IPC::Connection::addThreadMessageReceiver): |
| (IPC::Connection::removeThreadMessageReceiver): |
| (IPC::Connection::dispatchThreadMessageReceiverMessage): |
| (IPC::Connection::createSyncMessageEncoder): |
| (IPC::Connection::sendMessage): |
| (IPC::Connection::waitForMessage): |
| (IPC::Connection::sendSyncMessage): |
| (IPC::Connection::waitForSyncReply): |
| (IPC::Connection::processIncomingMessage): |
| (IPC::Connection::dispatchSyncMessage): |
| (IPC::Connection::dispatchDidReceiveInvalidMessage): |
| (IPC::Connection::dispatchMessage): |
| (IPC::Connection::dispatchMessageToWorkQueueReceiver): |
| (IPC::Connection::dispatchMessageToThreadReceiver): |
| (IPC::Connection::dispatchIncomingMessages): |
| * Platform/IPC/Connection.h: |
| (IPC::Connection::send): |
| (IPC::Connection::sendWithAsyncReply): |
| (IPC::Connection::sendSync): |
| (IPC::Connection::waitForAndDispatchImmediately): |
| * Platform/IPC/Decoder.cpp: |
| * Platform/IPC/Decoder.h: |
| (IPC::Decoder::messageReceiverName const): |
| (IPC::Decoder::messageName const): |
| (IPC::Decoder::decode): |
| (IPC::Decoder::operator>>): |
| * Platform/IPC/Encoder.cpp: |
| (IPC::Encoder::Encoder): |
| (IPC::Encoder::encodeHeader): |
| * Platform/IPC/Encoder.h: |
| * Platform/IPC/HandleMessage.h: |
| (IPC::handleMessageAsync): |
| * Platform/IPC/MessageReceiverMap.cpp: |
| (IPC::MessageReceiverMap::addMessageReceiver): |
| (IPC::MessageReceiverMap::removeMessageReceiver): |
| (IPC::MessageReceiverMap::dispatchMessage): |
| (IPC::MessageReceiverMap::dispatchSyncMessage): |
| * Platform/IPC/MessageReceiverMap.h: |
| * Platform/IPC/MessageSender.h: |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::Connection::open): |
| (IPC::Connection::sendMessage): |
| (IPC::Connection::sendOutgoingMessage): |
| (IPC::Connection::receiveSourceEventHandler): |
| * Platform/IPC/cocoa/MachMessage.cpp: |
| (IPC::MachMessage::create): |
| (IPC::MachMessage::MachMessage): |
| * Platform/IPC/cocoa/MachMessage.h: |
| (IPC::MachMessage::messageReceiverName const): |
| (IPC::MachMessage::messageName const): |
| * PluginProcess/WebProcessConnection.cpp: |
| (WebKit::WebProcessConnection::didReceiveInvalidMessage): |
| * PluginProcess/WebProcessConnection.h: |
| * Scripts/Makefile: |
| * Scripts/generate-message-receiver.py: |
| (main): |
| * Scripts/webkit/LegacyMessages-expected.h: Removed. |
| * Scripts/webkit/LegacyMessagesReplies-expected.h: Removed. |
| * Scripts/webkit/MessageNames.cpp: Added. |
| (IPC::description): |
| * Scripts/webkit/MessageNames.h: Added. |
| (IPC::receiverName): |
| (WTF::isValidEnum): |
| * Scripts/webkit/MessageReceiver-expected.cpp: Removed. |
| * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed. |
| * Scripts/webkit/Messages-expected.h: Removed. |
| * Scripts/webkit/MessagesReplies-expected.h: Removed. |
| * Scripts/webkit/MessagesRepliesSuperclassReplies-expected.h: Removed. |
| * Scripts/webkit/MessagesSuperclass-expected.h: Removed. |
| * Scripts/webkit/messages.py: |
| * Scripts/webkit/test-legacy-messages.in: Removed. |
| * Scripts/webkit/test-legacy.messages.in: Copied from Source/WebKit/Scripts/webkit/test-legacy-messages.in. |
| * Scripts/webkit/test-legacyMessageReceiver.cpp: Added. |
| (Messages::WebPage::GetPluginProcessConnection::send): |
| (Messages::WebPage::TestMultipleAttributes::send): |
| (WebKit::WebPage::didReceiveWebPageMessage): |
| (WebKit::WebPage::didReceiveSyncWebPageMessage): |
| * Scripts/webkit/test-legacyMessages.h: Added. |
| (Messages::WebPage::messageReceiverName): |
| (Messages::WebPage::LoadURL::name): |
| (Messages::WebPage::LoadURL::LoadURL): |
| (Messages::WebPage::LoadURL::arguments const): |
| (Messages::WebPage::LoadSomething::name): |
| (Messages::WebPage::LoadSomething::LoadSomething): |
| (Messages::WebPage::LoadSomething::arguments const): |
| (Messages::WebPage::TouchEvent::name): |
| (Messages::WebPage::TouchEvent::TouchEvent): |
| (Messages::WebPage::TouchEvent::arguments const): |
| (Messages::WebPage::AddEvent::name): |
| (Messages::WebPage::AddEvent::AddEvent): |
| (Messages::WebPage::AddEvent::arguments const): |
| (Messages::WebPage::LoadSomethingElse::name): |
| (Messages::WebPage::LoadSomethingElse::LoadSomethingElse): |
| (Messages::WebPage::LoadSomethingElse::arguments const): |
| (Messages::WebPage::DidReceivePolicyDecision::name): |
| (Messages::WebPage::DidReceivePolicyDecision::DidReceivePolicyDecision): |
| (Messages::WebPage::DidReceivePolicyDecision::arguments const): |
| (Messages::WebPage::Close::name): |
| (Messages::WebPage::Close::arguments const): |
| (Messages::WebPage::PreferencesDidChange::name): |
| (Messages::WebPage::PreferencesDidChange::PreferencesDidChange): |
| (Messages::WebPage::PreferencesDidChange::arguments const): |
| (Messages::WebPage::SendDoubleAndFloat::name): |
| (Messages::WebPage::SendDoubleAndFloat::SendDoubleAndFloat): |
| (Messages::WebPage::SendDoubleAndFloat::arguments const): |
| (Messages::WebPage::SendInts::name): |
| (Messages::WebPage::SendInts::SendInts): |
| (Messages::WebPage::SendInts::arguments const): |
| (Messages::WebPage::CreatePlugin::name): |
| (Messages::WebPage::CreatePlugin::CreatePlugin): |
| (Messages::WebPage::CreatePlugin::arguments const): |
| (Messages::WebPage::RunJavaScriptAlert::name): |
| (Messages::WebPage::RunJavaScriptAlert::RunJavaScriptAlert): |
| (Messages::WebPage::RunJavaScriptAlert::arguments const): |
| (Messages::WebPage::GetPlugins::name): |
| (Messages::WebPage::GetPlugins::GetPlugins): |
| (Messages::WebPage::GetPlugins::arguments const): |
| (Messages::WebPage::GetPluginProcessConnection::name): |
| (Messages::WebPage::GetPluginProcessConnection::GetPluginProcessConnection): |
| (Messages::WebPage::GetPluginProcessConnection::arguments const): |
| (Messages::WebPage::TestMultipleAttributes::name): |
| (Messages::WebPage::TestMultipleAttributes::arguments const): |
| (Messages::WebPage::TestParameterAttributes::name): |
| (Messages::WebPage::TestParameterAttributes::TestParameterAttributes): |
| (Messages::WebPage::TestParameterAttributes::arguments const): |
| (Messages::WebPage::TemplateTest::name): |
| (Messages::WebPage::TemplateTest::TemplateTest): |
| (Messages::WebPage::TemplateTest::arguments const): |
| (Messages::WebPage::SetVideoLayerID::name): |
| (Messages::WebPage::SetVideoLayerID::SetVideoLayerID): |
| (Messages::WebPage::SetVideoLayerID::arguments const): |
| (Messages::WebPage::DidCreateWebProcessConnection::name): |
| (Messages::WebPage::DidCreateWebProcessConnection::DidCreateWebProcessConnection): |
| (Messages::WebPage::DidCreateWebProcessConnection::arguments const): |
| (Messages::WebPage::InterpretKeyEvent::name): |
| (Messages::WebPage::InterpretKeyEvent::InterpretKeyEvent): |
| (Messages::WebPage::InterpretKeyEvent::arguments const): |
| (Messages::WebPage::DeprecatedOperation::name): |
| (Messages::WebPage::DeprecatedOperation::DeprecatedOperation): |
| (Messages::WebPage::DeprecatedOperation::arguments const): |
| (Messages::WebPage::ExperimentalOperation::name): |
| (Messages::WebPage::ExperimentalOperation::ExperimentalOperation): |
| (Messages::WebPage::ExperimentalOperation::arguments const): |
| * Scripts/webkit/test-legacyMessagesReplies.h: Added. |
| * Scripts/webkit/test-messages.in: Removed. |
| * Scripts/webkit/test-superclass-messages.in: Removed. |
| * Scripts/webkit/test-superclass.messages.in: Copied from Source/WebKit/Scripts/webkit/test-superclass-messages.in. |
| * Scripts/webkit/test-superclassMessageReceiver.cpp: Added. |
| (Messages::WebPage::TestAsyncMessage::callReply): |
| (Messages::WebPage::TestAsyncMessage::cancelReply): |
| (Messages::WebPage::TestAsyncMessage::send): |
| (Messages::WebPage::TestAsyncMessageWithNoArguments::callReply): |
| (Messages::WebPage::TestAsyncMessageWithNoArguments::cancelReply): |
| (Messages::WebPage::TestAsyncMessageWithNoArguments::send): |
| (Messages::WebPage::TestAsyncMessageWithMultipleArguments::callReply): |
| (Messages::WebPage::TestAsyncMessageWithMultipleArguments::cancelReply): |
| (Messages::WebPage::TestAsyncMessageWithMultipleArguments::send): |
| (Messages::WebPage::TestSyncMessage::send): |
| (Messages::WebPage::TestSynchronousMessage::send): |
| (WebKit::WebPage::didReceiveMessage): |
| (WebKit::WebPage::didReceiveSyncMessage): |
| * Scripts/webkit/test-superclassMessages.h: Added. |
| (Messages::WebPage::messageReceiverName): |
| (Messages::WebPage::LoadURL::name): |
| (Messages::WebPage::LoadURL::LoadURL): |
| (Messages::WebPage::LoadURL::arguments const): |
| (Messages::WebPage::TestAsyncMessage::name): |
| (Messages::WebPage::TestAsyncMessage::asyncMessageReplyName): |
| (Messages::WebPage::TestAsyncMessage::TestAsyncMessage): |
| (Messages::WebPage::TestAsyncMessage::arguments const): |
| (Messages::WebPage::TestAsyncMessageWithNoArguments::name): |
| (Messages::WebPage::TestAsyncMessageWithNoArguments::asyncMessageReplyName): |
| (Messages::WebPage::TestAsyncMessageWithNoArguments::arguments const): |
| (Messages::WebPage::TestAsyncMessageWithMultipleArguments::name): |
| (Messages::WebPage::TestAsyncMessageWithMultipleArguments::asyncMessageReplyName): |
| (Messages::WebPage::TestAsyncMessageWithMultipleArguments::arguments const): |
| (Messages::WebPage::TestSyncMessage::name): |
| (Messages::WebPage::TestSyncMessage::TestSyncMessage): |
| (Messages::WebPage::TestSyncMessage::arguments const): |
| (Messages::WebPage::TestSynchronousMessage::name): |
| (Messages::WebPage::TestSynchronousMessage::TestSynchronousMessage): |
| (Messages::WebPage::TestSynchronousMessage::arguments const): |
| * Scripts/webkit/test-superclassMessagesReplies.h: Added. |
| * Scripts/webkit/test.messages.in: Added. |
| * Scripts/webkit/testMessageReceiver.cpp: Added. |
| * Scripts/webkit/testMessages.h: Added. |
| (Messages::None::messageReceiverName): |
| * Scripts/webkit/testMessagesReplies.h: Added. |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.h: |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): |
| (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy): |
| * Shared/AuxiliaryProcess.cpp: |
| (WebKit::AuxiliaryProcess::addMessageReceiver): |
| (WebKit::AuxiliaryProcess::removeMessageReceiver): |
| (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): |
| * Shared/AuxiliaryProcess.h: |
| (WebKit::AuxiliaryProcess::addMessageReceiver): |
| (WebKit::AuxiliaryProcess::removeMessageReceiver): |
| * Shared/Cocoa/AuxiliaryProcessCocoa.mm: |
| (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): |
| * SourcesCocoa.txt: |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::addMessageReceiver): |
| (WebKit::AuxiliaryProcessProxy::removeMessageReceiver): |
| (WebKit::AuxiliaryProcessProxy::logInvalidMessage): |
| * UIProcess/AuxiliaryProcessProxy.h: |
| (WebKit::AuxiliaryProcessProxy::addMessageReceiver): |
| (WebKit::AuxiliaryProcessProxy::removeMessageReceiver): |
| (WebKit::AuxiliaryProcessProxy::send): |
| (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply): |
| * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h: |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::paymentCoordinatorAddMessageReceiver): Deleted. |
| (WebKit::WebPageProxy::paymentCoordinatorRemoveMessageReceiver): Deleted. |
| * UIProcess/GPU/GPUProcessProxy.cpp: |
| (WebKit::GPUProcessProxy::didReceiveInvalidMessage): |
| * UIProcess/GPU/GPUProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::didReceiveInvalidMessage): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Plugins/PluginProcessProxy.cpp: |
| (WebKit::PluginProcessProxy::didReceiveInvalidMessage): |
| * UIProcess/Plugins/PluginProcessProxy.h: |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::didReceiveMessage): |
| * UIProcess/SuspendedPageProxy.cpp: |
| (WebKit::messageNamesToIgnoreWhileSuspended): |
| (WebKit::SuspendedPageProxy::didReceiveMessage): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::didReceiveInvalidMessage): |
| (WebKit::WebProcessPool::addMessageReceiver): |
| (WebKit::WebProcessPool::removeMessageReceiver): |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shouldSendPendingMessage): |
| (WebKit::WebProcessProxy::didReceiveInvalidMessage): |
| * UIProcess/WebProcessProxy.h: |
| * WebProcess/GPU/GPUProcessConnection.cpp: |
| (WebKit::GPUProcessConnection::didReceiveInvalidMessage): |
| * WebProcess/GPU/GPUProcessConnection.h: |
| * WebProcess/Inspector/WebInspector.h: |
| * WebProcess/Inspector/WebInspectorUI.h: |
| * WebProcess/Network/NetworkProcessConnection.cpp: |
| (WebKit::NetworkProcessConnection::didReceiveInvalidMessage): |
| * WebProcess/Network/NetworkProcessConnection.h: |
| * WebProcess/Plugins/PluginProcessConnection.cpp: |
| (WebKit::PluginProcessConnection::didReceiveInvalidMessage): |
| * WebProcess/Plugins/PluginProcessConnection.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: |
| (WebKit::RemoteLayerTreeDrawingArea::updateRendering): |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::didReceiveMessage): |
| |
| 2020-05-06 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r260684): Reader background is lost after multitasking |
| https://bugs.webkit.org/show_bug.cgi?id=211533 |
| <rdar://problem/62941837> |
| |
| Unreviewed, revert r260684 due to regression. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::setShouldFireResizeEvents): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WKApplicationStateTrackingView.mm: |
| (-[WKApplicationStateTrackingView _willBeginSnapshotSequence]): |
| (-[WKApplicationStateTrackingView _didCompleteSnapshotSequence]): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::setShouldFireResizeEvents): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-05-06 Kate Cheney <katherine_cheney@apple.com> |
| |
| ResourceLoadStatistics data summary call should create a web process pool if one doesn't exist |
| https://bugs.webkit.org/show_bug.cgi?id=211520 |
| <rdar://problem/59869619> |
| |
| Reviewed by Chris Dumez. |
| |
| Ensures that a process pool and network process exist when requesting |
| resource load statistics data. |
| |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::getResourceLoadStatisticsDataSummary): |
| |
| 2020-05-06 Keith Rollin <krollin@apple.com> |
| |
| Better surfacing of the presenting parent PID in the Network process |
| https://bugs.webkit.org/show_bug.cgi?id=211495 |
| <rdar://problem/62917205> |
| |
| Reviewed by Youenn Fablet. |
| |
| In Bug 205295, NetworkResourceLoader logging was improved, with one of |
| the changes being that the PID of parent process that invoked the |
| Network process was logged at the start of |
| NetworkResourceLoader::start(). However, there was an execution path |
| that skipped calling start() |
| (NetworkConnectionToWebProcess::scheduleResourceLoad -> |
| NetworkResourceLoader::startWithServiceWorker -> |
| serviceWorkerDidNotHandle -> restartNetworkLoad -> startNetworkLoad), |
| and so the the logging would not show the parent PID. This logging is |
| needed for diagnostic purposes, so tweak the logging a little bit more |
| in order to ensure we emit it. In this change, logging is added to |
| various loading-related NetworkConnectionToWebProcess entry points |
| (not just scheduleResourceLoad) in order to (a) ensure we emit the |
| logging we want and (b) to give a clearer picture of what operations |
| are being invoked in the Network process. |
| |
| No new tests -- no new or changed functionality. |
| |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::hasUploadStateChanged): |
| (WebKit::NetworkConnectionToWebProcess::resolveBlobReferences): |
| (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): |
| (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): |
| (WebKit::NetworkConnectionToWebProcess::loadPing): |
| (WebKit::NetworkConnectionToWebProcess::preconnectTo): |
| (WebKit::NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded): |
| * NetworkProcess/NetworkResourceLoader.cpp: |
| (WebKit::NetworkResourceLoader::start): |
| |
| 2020-05-06 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Cut and paste from Google Doc to Notes in several (non-Latin) languages doesn't work |
| https://bugs.webkit.org/show_bug.cgi?id=211498 |
| <rdar://problem/56675345> |
| |
| Reviewed by Darin Adler. |
| |
| Add a new header to allow Cocoa code to reason about UIColors and NSColors on iOS and macOS (respectively) |
| without requiring platform ifdefs. A followup patch will adopt this in several places in WebKit, where we |
| currently need ifdefs for iOS and macOS. |
| |
| * Platform/cocoa/CocoaColor.h: Added. |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-05-06 Antoine Quint <graouts@apple.com> |
| |
| pointermove event sometimes has incorrect pointerType of 'mouse' on touch interactions |
| https://bugs.webkit.org/show_bug.cgi?id=210716 |
| <rdar://problem/62084817> |
| |
| Reviewed by Darin Adler. |
| |
| Set the SyntheticClickType to OneFingerTap when creating a synthetic "mousemove" event for a synthetic "click" event as part of a tap. |
| On top of being more indicative of the actual action that triggered the synthetic event, it also has the added quality that it will |
| not yield a "pointermove" event. |
| |
| Test: pointerevents/ios/click-no-pointermove.html |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::dispatchSyntheticMouseMove): |
| |
| 2020-05-06 John Wilander <wilander@apple.com> |
| |
| Exempt app-bound domains from ITP's website data deletion and third-party cookie blocking between themselves |
| https://bugs.webkit.org/show_bug.cgi?id=210674 |
| <rdar://problem/61950767> |
| |
| Reviewed by Chris Dumez. |
| |
| This change forwards information about app-bound domains to ITP and web |
| processes so that they can be exempt from website data deletion and |
| third-party cookie blocking between themselves. |
| |
| App-bound domains are configured statically and apply to all website |
| data stores. Therefore the setting needs to be forwarded to all |
| website data stores and ITP functionality in all network and web |
| content processes. This is done through the new static function |
| WebsiteDataStore::setAppBoundDomainsForITPIfInitialized(). |
| |
| Since app-bound domains are loaded lazily from disk and on a background |
| thread, this patch forwards them in ResourceLoadStatisticsParameters if |
| they've already been loaded. Then every time app-bound domains are |
| updated, they are forwarded to ITP. This ensures that ITP will have them |
| as soon as possible. |
| |
| Setting app-bound domains for the purposes of ITP automatically switches |
| ITP's cookie blocking policy to the new |
| WebCore::ThirdPartyCookieBlockingMode::AllExceptBetweenAppBoundDomains. |
| This is done in WebResourceLoadStatisticsStore::setAppBoundDomains(). |
| |
| The C API changes are for test purposes. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: |
| (WebKit::ResourceLoadStatisticsStore::setAppBoundDomains): |
| (WebKit::ResourceLoadStatisticsStore::resetParametersToDefaultValues): |
| (WebKit::ResourceLoadStatisticsStore::shouldExemptFromWebsiteDataDeletion const): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| (WebKit::ResourceLoadStatisticsStore::standaloneApplicationDomain const): Deleted. |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::setAppBoundDomains): |
| (WebKit::WebResourceLoadStatisticsStore::resetParametersToDefaultValues): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::setAppBoundDomainsForResourceLoadStatistics): |
| (WebKit::NetworkProcess::setThirdPartyCookieBlockingMode): |
| (WebKit::NetworkProcess::setShouldBlockThirdPartyCookiesForTesting): Deleted. |
| Renamed setThirdPartyCookieBlockingMode. |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| * Shared/ResourceLoadStatisticsParameters.h: |
| (WebKit::ResourceLoadStatisticsParameters::encode const): |
| (WebKit::ResourceLoadStatisticsParameters::decode): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreSetAppBoundDomainsForTesting): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::setAppBoundDomainsForResourceLoadStatistics): |
| (WebKit::NetworkProcessProxy::setThirdPartyCookieBlockingMode): |
| (WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting): Deleted. |
| Renamed setThirdPartyCookieBlockingMode. |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::ensureNetworkProcess): |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::setThirdPartyCookieBlockingMode): |
| (WebKit::WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting): Deleted. |
| Renamed setThirdPartyCookieBlockingMode. |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::initializeAppBoundDomains): |
| (WebKit::WebsiteDataStore::ensureAppBoundDomains const): |
| (WebKit::WebsiteDataStore::appBoundDomainsIfInitialized): |
| This function allows fetching of app-bound domains without triggering |
| the lazy loading. This is just to allow speculative configuration of ITP |
| right when it's created — if any app-bound domains are already configured, |
| forward them to ITP via ResourceLoadStatisticsParameters. |
| (WebKit::WebsiteDataStore::setAppBoundDomainsForTesting): |
| This function is Cocoa-specific and only accepts localhost and 127.0.0.1 |
| to be configured as app-bound domains. |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting): |
| (WebKit::WebsiteDataStore::setThirdPartyCookieBlockingMode): |
| (WebKit::WebsiteDataStore::parameters): |
| (WebKit::WebsiteDataStore::forwardAppBoundDomainsToITPIfInitialized): |
| (WebKit::WebsiteDataStore::setAppBoundDomainsForITP): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::setThirdPartyCookieBlockingMode): |
| (WebKit::WebProcess::setShouldBlockThirdPartyCookiesForTesting): Deleted. |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| |
| 2020-05-06 Daniel Bates <dabates@apple.com> |
| |
| [iOS] ASSERTION FAILED: !(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged) in -[WebEvent charactersIgnoringModifiers] when pressing modifier on PDF |
| https://bugs.webkit.org/show_bug.cgi?id=211472 |
| |
| Reviewed by Darin Adler. |
| |
| Do not ask for event character string for a flags changed event: they don't have one. |
| |
| Test: fast/events/ios/pdf-modifer-key-down-crash.html |
| |
| * UIProcess/ios/WKKeyboardScrollingAnimator.mm: |
| (-[WKKeyboardScrollingAnimator keyboardScrollForEvent:]): |
| |
| 2020-05-06 Brent Fulgham <bfulgham@apple.com> |
| |
| [MacCatalyst] Processes should check for network entitlement as we do for macOS apps |
| https://bugs.webkit.org/show_bug.cgi?id=211474 |
| <rdar://problem/61182060> |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| We should make the same entitlement checks in MacCatalyst as we do for macOS. |
| |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm: |
| (WebKit::XPCServiceInitializerDelegate::checkEntitlements): |
| |
| 2020-05-06 Darin Adler <darin@apple.com> |
| |
| Eliminate checks of USE(DICTATION_ALTERNATIVES) in Cocoa-specific code |
| https://bugs.webkit.org/show_bug.cgi?id=211460 |
| |
| Reviewed by Anders Carlsson. |
| |
| * UIProcess/Cocoa/PageClientImplCocoa.h: Remove USE(DICTATION_ALTERNATIVES). |
| Also remove unnecessary use of RetainPtr. |
| * UIProcess/Cocoa/PageClientImplCocoa.mm: |
| (WebKit::PageClientImplCocoa::PageClientImplCocoa): Ditto. |
| (WebKit::PageClientImplCocoa::pageClosed): Ditto. |
| (WebKit::PageClientImplCocoa::dictationAlternatives): Ditto. |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::insertDictatedTextAsync): Ditto. |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::validAttributesForMarkedText): Ditto. |
| (WebKit::WebViewImpl::insertText): Ditto. |
| * UIProcess/PageClient.h: Ditto. |
| * UIProcess/ios/PageClientImplIOS.h: Ditto. |
| * UIProcess/ios/PageClientImplIOS.mm: Ditto. |
| * UIProcess/ios/WKContentViewInteraction.mm: Ditto. |
| * UIProcess/mac/PageClientImplMac.h: Ditto. |
| * UIProcess/mac/PageClientImplMac.mm: Ditto. |
| * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: Ditto. |
| |
| 2020-05-06 Lauro Moura <lmoura@igalia.com> |
| |
| [GTK] Cleanup KeyBindingTranslator on WebView disposal |
| https://bugs.webkit.org/show_bug.cgi?id=211465 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Fixes assertion in debug mode when a test failed and the widget |
| followed a destruction pattern where KeyBindingTranslator would be |
| destroyed before the container widget is cleaned up. |
| |
| Also renamed the method from 'destroyed' to 'invalidate' to try to |
| better convey the action being performed on the KeyBindingTranslator. |
| |
| Covered by existing tests. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseContainerRemove): Update method name. |
| (webkitWebViewBaseDispose): Cleanup keyBindingTranslator when |
| disposing this widget. |
| * UIProcess/gtk/KeyBindingTranslator.h: |
| (WebKit::KeyBindingTranslator::invalidate): Renamed from destroyed. |
| (WebKit::KeyBindingTranslator::destroyed): Deleted. |
| |
| 2020-05-06 Darin Adler <darin@apple.com> |
| |
| Reduce HAVE(HOSTED_CORE_ANIMATION) |
| https://bugs.webkit.org/show_bug.cgi?id=211423 |
| |
| Reviewed by Anders Carlsson. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): Removed redundant #if |
| checking both HAVE(HOSTED_CORE_ANIMATION) and !PLATFORM(IOS_FAMILY). |
| |
| * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: |
| (WebKit::PluginProcessProxy::platformInitializePluginProcess): Removed unnecessary |
| HAVE(HOSTED_CORE_ANIMATION) check in code that is only compiled for macOS. |
| |
| 2020-05-05 David Kilzer <ddkilzer@apple.com> |
| |
| Fix deprecated NSGraphicsContext methods using 'graphicsPort' |
| <https://webkit.org/b/211481> |
| |
| Reviewed by Darin Adler. |
| |
| - Replace uses of -graphicsPort with -CGContext. |
| - Replace uses of -graphicsContextWithGraphicsPort:flipped: with |
| -graphicsContextWithCGContext:flipped:. |
| - Remove ALLOW_DEPRECATED_DECLARATIONS_{BEGIN,END} if possible. |
| |
| * UIProcess/mac/WKPrintingView.mm: |
| (-[WKPrintingView _drawPDFDocument:page:atPoint:]): |
| (-[WKPrintingView _drawPreview:]): |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::drawPDFPage): |
| |
| 2020-05-05 Zalan Bujtas <zalan@apple.com> |
| |
| [Quirk] Job listing page goes blank when scrolling on stackoverflow.com |
| https://bugs.webkit.org/show_bug.cgi?id=211480 |
| <rdar://problem/62558405> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Add the option of returning "use desktop web content" on any configuration when the host application asks for content recommendation. |
| |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::desktopClassBrowsingRecommendedForRequest): |
| (WebKit::desktopClassBrowsingRecommended): |
| (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies): |
| |
| 2020-05-05 Chris Dumez <cdumez@apple.com> |
| |
| Crash under _LSSetApplicationInformationItem() |
| https://bugs.webkit.org/show_bug.cgi?id=211478 |
| <rdar://problem/62201314> |
| |
| Reviewed by Alex Christensen. |
| |
| Given the crashes, I suspect it is not actually safe to call _LSSetApplicationInformationItem() |
| from a non main-thread like it was done in r238289. We still run the code asynchronously to |
| address the issue that r238289 was trying to fix but we now call _LSSetApplicationInformationItem() |
| on the main thread. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::updateProcessName): |
| (WebKit::WebProcess::updateActivePages): |
| (WebKit::setProcessNameQueue): Deleted. |
| |
| 2020-05-05 Peng Liu <peng.liu6@apple.com> |
| |
| Update WebKitTestRunner to support running multiple video fullscreen and Picture-in-Picture tests simultaneously |
| https://bugs.webkit.org/show_bug.cgi?id=203723 |
| |
| Reviewed by Jer Noble. |
| |
| When the flag MockVideoPresentationModeEnabled is true, the VideoFullscreenManagerProxy in the UI process |
| will mock the behavior of the VideoFullscreenInterface[Mac|AVKit]. |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| (WebKit::VideoFullscreenManagerProxy::setMockVideoPresentationModeEnabled): |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenManagerProxy::requestHideAndExitFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::applicationDidBecomeActive): |
| (WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID): |
| (WebKit::VideoFullscreenManagerProxy::setHasVideo): |
| (WebKit::VideoFullscreenManagerProxy::setVideoDimensions): |
| (WebKit::VideoFullscreenManagerProxy::enterFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::exitFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): |
| (WebKit::VideoFullscreenManagerProxy::setInlineRect): |
| (WebKit::VideoFullscreenManagerProxy::setHasVideoContentLayer): |
| (WebKit::VideoFullscreenManagerProxy::cleanupFullscreen): |
| (WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline): |
| (WebKit::VideoFullscreenManagerProxy::preparedToExitFullscreen): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didAttachToRunningProcess): |
| (WebKit::WebPageProxy::setMockVideoPresentationModeEnabled): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::setMockVideoPresentationModeEnabled): |
| (WebKit::WebChromeClient::setUpPlaybackControlsManager): |
| (WebKit::WebChromeClient::clearPlaybackControlsManager): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/cocoa/VideoFullscreenManager.h: |
| |
| 2020-05-05 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed fix for MotionMark regression. |
| |
| Revert minor part of r260017. Remove telemetry from IOKit filtering allow rules. This telemetry is causing higher |
| CPU usage on the system, and is not needed, since we have already confirmed these messages are being used. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-05-05 Daniel Bates <dabates@apple.com> |
| |
| Should show selection highlight during text interaction |
| https://bugs.webkit.org/show_bug.cgi?id=211362 |
| <rdar://problem/59191873> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Break out text interaction tracking into its own ivar instead of using the |
| WebKit::InteractionIsHappening selection suppression reason so that I can |
| key off it to only disallow zooming to reveal the focused element during |
| a text interaction. The selection suppression machinery does more than this. |
| It also deactivates selection assistance, painting of highlights, etc, which |
| I don't want. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView cleanUpInteraction]): Reset state. |
| (-[WKContentView becomeFirstResponderForWebView]): Activate selection assistant |
| during a text interaction if the selection assistant is not being suppressed. |
| (-[WKContentView _zoomToRevealFocusedElement]): Early return if called during a |
| text interaction. The function -_didFinishTextInteractionInTextInputContext will |
| trigger the zoom after the interaction completes. |
| (-[WKContentView _didCommitLoadForMainFrame]): Reset state. |
| |
| (-[WKContentView _willBeginTextInteractionInTextInputContext:]): |
| (-[WKContentView _didFinishTextInteractionInTextInputContext:]): |
| Update state. While I am here, text interaction is considered a gesture so |
| also update _usingGestureForSelection. This means that the selection view |
| will be updated immediately on a selection change during a text interaction |
| instead of waiting until the next layer tree commit occurs. |
| |
| 2020-05-05 Kate Cheney <katherine_cheney@apple.com> |
| |
| Check for app-bound domains should confirm WKAppBoundDomains key exists when checking for default app-bound protocols. |
| https://bugs.webkit.org/show_bug.cgi?id=211451 |
| <rdar://problem/62715316 |
| |
| Reviewed by Brent Fulgham. |
| |
| Checks for WKAppBoundDomains key before treating a protocol as |
| app-bound. This is a regression in expected behavior after making |
| In-App Browser privacy opt-in based on the presence of the key. |
| |
| Also moves the check for special protocols inside of the completion handler for |
| ensureAppBoundDomains to make sure the check for the key has finished. |
| |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::beginAppBoundDomainCheck): |
| Added a comment to clarify why we need to check for both an empty |
| app-bound domains list and the presence of the key for testing |
| purposes. |
| |
| 2020-05-05 Timothy Horton <timothy_horton@apple.com> |
| |
| "Essential Skeleton" does not respond to mouse events, only touch events |
| https://bugs.webkit.org/show_bug.cgi?id=211439 |
| <rdar://problem/62694519> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView shouldUseMouseGestureRecognizer]): |
| Add a quirk. |
| |
| 2020-05-05 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> |
| |
| Compile GPUProcess in WPE port as experimental feature |
| https://bugs.webkit.org/show_bug.cgi?id=211442 |
| |
| Reviewed by Don Olmstead. |
| |
| Enable GPU Process in WPE. |
| |
| This is compilation only. No new tests required. |
| |
| * PlatformWPE.cmake: Add Platform/generic include directory. |
| * SourcesWPE.txt: Add related source files. |
| |
| 2020-05-05 Youenn Fablet <youenn@apple.com> |
| |
| Remove LegacySchemeRegistry::canServiceWorkersHandleURLScheme |
| https://bugs.webkit.org/show_bug.cgi?id=211170 |
| |
| Reviewed by Alex Christensen. |
| |
| Remove unused parameters since they are no longer being set in UIProcess. |
| |
| * NetworkProcess/NetworkProcessCreationParameters.cpp: |
| (WebKit::NetworkProcessCreationParameters::encode const): |
| * NetworkProcess/NetworkProcessCreationParameters.h: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::initializeWebProcess): |
| |
| 2020-05-05 Darin Adler <darin@apple.com> |
| |
| Remove now-uneeded HAVE macros related to PDF |
| https://bugs.webkit.org/show_bug.cgi?id=211435 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Platform/spi/ios/PDFKitSPI.h: Removed HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING). |
| |
| * UIProcess/ios/WKPDFView.mm: |
| (-[WKPDFView web_initWithFrame:webView:mimeType:]): Removed |
| HAVE(PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR). |
| (+[WKPDFView web_requiresCustomSnapshotting]): Removed HAVE(PDFHOSTVIEWCONTROLLER_SNAPSHOTTING). |
| (-[WKPDFView web_snapshotRectInContentViewCoordinates:snapshotWidth:completionHandler:]): |
| Ditto. |
| |
| 2020-05-05 Youenn Fablet <youenn@apple.com> |
| |
| Receiving WebRTC network packets should not go through the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=211290 |
| |
| Reviewed by Alex Christensen. |
| |
| Instead of going to main thread before going to rtc network thread, we register a message receiver and dispatch directly to rtc network thread. |
| This ensures rtc packets are not blocked if main thread is busy. |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: |
| (WebKit::LibWebRTCSocketClient::signalReadPacket): |
| (WebKit::LibWebRTCSocketClient::signalSentPacket): |
| (WebKit::LibWebRTCSocketClient::signalAddressReady): |
| (WebKit::LibWebRTCSocketClient::signalConnect): |
| (WebKit::LibWebRTCSocketClient::signalClose): |
| * NetworkProcess/webrtc/NetworkRTCProvider.cpp: |
| (WebKit::NetworkRTCProvider::createSocket): |
| (WebKit::NetworkRTCProvider::createServerTCPSocket): |
| (WebKit::NetworkRTCProvider::createClientTCPSocket): |
| (WebKit::NetworkRTCProvider::newConnection): |
| (WebKit::NetworkRTCProvider::closeListeningSockets): |
| * Sources.txt: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/Network/NetworkProcessConnection.cpp: |
| (WebKit::NetworkProcessConnection::NetworkProcessConnection): |
| (WebKit::NetworkProcessConnection::didReceiveMessage): |
| * WebProcess/Network/webrtc/LibWebRTCNetwork.cpp: Added |
| * WebProcess/Network/webrtc/LibWebRTCNetwork.h: |
| (WebKit::LibWebRTCNetwork::connection): |
| (WebKit::LibWebRTCNetwork::~LibWebRTCNetwork): |
| (WebKit::LibWebRTCNetwork::networkProcessCrashed): |
| (WebKit::LibWebRTCNetwork::setConnection): |
| (WebKit::LibWebRTCNetwork::dispatchToThread): |
| (WebKit::LibWebRTCNetwork::signalAddressReady): |
| (WebKit::LibWebRTCNetwork::signalReadPacket): |
| (WebKit::LibWebRTCNetwork::signalSentPacket): |
| (WebKit::LibWebRTCNetwork::signalConnect): |
| (WebKit::LibWebRTCNetwork::signalClose): |
| (WebKit::LibWebRTCNetwork::signalNewConnection): |
| * WebProcess/Network/webrtc/LibWebRTCNetwork.messages.in: Added. |
| * WebProcess/Network/webrtc/LibWebRTCSocket.h: |
| * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: |
| * WebProcess/Network/webrtc/WebRTCSocket.cpp: Removed. |
| * WebProcess/Network/webrtc/WebRTCSocket.h: Removed. |
| |
| 2020-05-05 Tim Horton <timothy_horton@apple.com> |
| |
| Excessive error logging from daemons trying to use WebKit, under -[UIDevice currentDevice] |
| https://bugs.webkit.org/show_bug.cgi?id=211397 |
| <rdar://problem/61635403> |
| |
| Reviewed by Simon Fraser. |
| |
| * Shared/UserInterfaceIdiom.mm: |
| (WebKit::userInterfaceIdiomIsPad): |
| Adjust userInterfaceIdiomIsPad so that in daemons, it consults only MobileGestalt, |
| which returns the actual hardware model, and does not try to use UIDevice. |
| UIDevice is more accurate for applications because it will report that |
| the device is an iPhone when called inside an iPhone app running on iPad, |
| but it cannot be used in daemons that do not have a UIApplication. |
| |
| For the behaviors we gate on this bit, it makes sense to use iPhone |
| behaviors on iPad in the iPhone app jail, so we continue using |
| UIDevice if possible. |
| |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration init]): |
| Make use of the new mechanism instead of going straight to MobileGestalt, |
| for the aforementioned reasons. |
| |
| 2020-05-04 Tim Horton <timothy_horton@apple.com> |
| |
| Relax WKRemoteObjectRegistry signature validation for bool-equivalent types |
| https://bugs.webkit.org/show_bug.cgi?id=211419 |
| |
| Reviewed by Saam Barati. |
| |
| * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: |
| (blockSignaturesAreCompatible): |
| (replyBlockSignature): |
| (-[_WKRemoteObjectRegistry _invokeMethod:]): |
| (validateReplyBlockSignature): Deleted. |
| Relax reply block signature validation slightly, considering signed char and BOOL, |
| which are equivalent and sometimes substituted for each other, to be equal. |
| |
| This is still stricter than NSXPC's validation, but this is one of the |
| exceptions that they make. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| [Mac] Remove __MAC_OS_X_VERSION_MIN_REQUIRED checks for versions older than 10.14 |
| https://bugs.webkit.org/show_bug.cgi?id=211420 |
| |
| Reviewed by Alex Christensen. |
| |
| * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: |
| (WebKit::Download::resume): Remove __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400. |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Ditto. |
| * PluginProcess/mac/PluginProcessMac.mm: |
| (WebKit::PluginProcess::platformInitializePluginProcess): Ditto. |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: |
| (WebKit::XPCServiceMain): Ditto. |
| * UIProcess/mac/ServicesController.mm: |
| (WebKit::hasCompatibleServicesForItems): Ditto. |
| * UIProcess/mac/WebProcessProxyMac.mm: |
| (WebKit::WebProcessProxy::shouldAllowNonValidInjectedCode const): Ditto. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(SANDBOX_ISSUE_MACH/READ_EXTENSION_TO_PROCESS_BY_AUDIT_TOKEN) |
| https://bugs.webkit.org/show_bug.cgi?id=211427 |
| |
| Reviewed by Alex Christensen. |
| |
| * Shared/Cocoa/SandboxExtensionCocoa.mm: |
| (WebKit::SandboxExtensionImpl::sandboxExtensionForType): Remove #if HAVE. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(AUTHORIZATION_STATUS_FOR_MEDIA_TYPE) |
| https://bugs.webkit.org/show_bug.cgi?id=211426 |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/Cocoa/UIDelegate.mm: |
| (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): |
| Remove HAVE(AUTHORIZATION_STATUS_FOR_MEDIA_TYPE). |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(ACCESSIBILITY_SUPPORT) |
| https://bugs.webkit.org/show_bug.cgi?id=211425 |
| |
| Reviewed by Alex Christensen. |
| |
| * Platform/spi/Cocoa/AccessibilitySupportSPI.h: Remove HAVE(ACCESSIBILITY_SUPPORT) |
| and now-unnecessary C include guards. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(SEC_TRUST_EVALUATE_WITH_ERROR) |
| https://bugs.webkit.org/show_bug.cgi?id=211429 |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: |
| (-[WKFullScreenWindowController _EVOrganizationName]): |
| Remove HAVE(SEC_TRUST_EVALUATE_WITH_ERROR). |
| |
| 2020-05-04 Kate Cheney <katherine_cheney@apple.com> |
| |
| REGRESSION (r260791?): Assert not reached in ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary() and ResourceLoadStatisticsDatabaseStore::addMissingTablesIfNecessary() |
| https://bugs.webkit.org/show_bug.cgi?id=211305 |
| <rdar://problem/62737871> |
| |
| Reviewed by Alex Christensen. |
| |
| This patch adds a busy timeout for the ITP database to allow for |
| some concurrency flexibility when running many WebKitTestRunner tests, which |
| recreate the ITP database store very often to test both the memory and |
| database stores. |
| |
| With the timeout, an attempt to write to the database when another |
| thread is holding the lock will keep attempting to insert for 5 |
| seconds as long as the statement execution returns SQLITE_BUSY. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase): |
| |
| 2020-05-04 Alex Christensen <achristensen@webkit.org> |
| |
| TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=211299 |
| |
| Reviewed by Chris Dumez. |
| |
| Use a serial queue instead of a concurrent queue to set the web process's display name to prevent race conditions. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::setProcessNameQueue): |
| (WebKit::WebProcess::updateProcessName): |
| (WebKit::WebProcess::updateActivePages): |
| |
| 2020-05-04 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Header bars no longer have title and subtitle properties |
| https://bugs.webkit.org/show_bug.cgi?id=211412 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: For GTK4 use a vertical |
| box as title widget, with two labels acting as title and subtitle. |
| (webkit_inspector_window_init): |
| (webkitInspectorWindowSetSubtitle): |
| |
| 2020-05-04 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Make sure TestController::statisticsResetToConsistentState() does not hang due to process suspension |
| https://bugs.webkit.org/show_bug.cgi?id=211421 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| We have evidence of hangs in TestController::statisticsResetToConsistentState() on iOS and we suspect it |
| is due to process suspension. To address the issue, this patch updates the IPCs being sent as a result of |
| a call to statisticsResetToConsistentState() to take a background assertion while waiting for the IPC |
| response. |
| |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::setUseITPDatabase): |
| (WebKit::NetworkProcessProxy::resetCacheMaxAgeCapForPrevalentResources): |
| (WebKit::NetworkProcessProxy::resetParametersToDefaultValues): |
| (WebKit::NetworkProcessProxy::scheduleClearInMemoryAndPersistent): |
| (WebKit::NetworkProcessProxy::resetCrossSiteLoadsWithLinkDecorationForTesting): |
| (WebKit::NetworkProcessProxy::setShouldDowngradeReferrerForTesting): |
| (WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting): |
| (WebKit::NetworkProcessProxy::setShouldEnbleSameSiteStrictEnforcementForTesting): |
| (WebKit::NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting): |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting): |
| |
| 2020-05-04 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Tapping to focus editable elements should start caret selection at word boundary |
| https://bugs.webkit.org/show_bug.cgi?id=211409 |
| <rdar://problem/62869098> |
| |
| Reviewed by Megan Gardner. |
| |
| See WebCore/ChangeLog for more details. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::selectWithGesture): |
| |
| Rewrite this using the new VisibleUnits helper function, `wordBoundaryForPositionWithoutCrossingLine`. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Make __IPHONE_OS_VERSION_MIN_REQUIRED checks against old versions explicit about watchOS and tvOS |
| https://bugs.webkit.org/show_bug.cgi?id=211402 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * NetworkProcess/NetworkActivityTracker.h: Move from __IPHONE_OS_VERSION_MIN_REQUIRED |
| to !PLATFORM(APPLETV). There was already an explicit watchOS case here. |
| |
| * Platform/spi/ios/UIKitSPI.h: Move from __IPHONE_OS_VERSION_MIN_REQUIRED to |
| PLATFORM(IOS) in one place, and in the other removed the conditional entirely. |
| THe one place here that does PLATFORM(IOS) is for a property that is not on |
| watchOS and tvOS at this time, related to dragging. Decided not to add a comment |
| about it. |
| |
| * Shared/WebPreferencesDefaultValues.h: Move from __IPHONE_OS_VERSION_MIN_REQUIRED |
| to !PLATFORM(APPLETV). There was already an explicit watchOS case here. |
| |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (contentOffsetBoundedInValidRange): Move from __IPHONE_OS_VERSION_MIN_REQUIRED |
| to !PLATFORM(WATCHOS) && !PLATFORM(APPLETV). |
| (-[WKWebView activeViewLayoutSize:]): Ditto. |
| (-[WKWebView _updateScrollViewInsetAdjustmentBehavior]): Ditto. |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: |
| (-[WKChildScrollView initWithFrame:]): Ditto. |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]): Ditto. |
| (-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]): Ditto. |
| * UIProcess/ios/WKScrollView.h: Ditto. |
| * UIProcess/ios/WKScrollView.mm: |
| (-[WKScrollView initWithFrame:]): Ditto. |
| |
| 2020-05-04 Peng Liu <peng.liu6@apple.com> |
| |
| Fix the mistake on macro HAVE_SYSTEM_FEATURE_FLAGS |
| https://bugs.webkit.org/show_bug.cgi?id=211416 |
| |
| Reviewed by Tim Horton. |
| |
| We should use "#if HAVE(SYSTEM_FEATURE_FLAGS)" instead of "#if HAVE(HAVE_SYSTEM_FEATURE_FLAGS)". |
| And we have to use the function _os_feature_enabled_impl() instead of the macro os_feature_enabled() |
| because WebKit is a namespace and cannot be used in os_feature_enabled(). |
| |
| * Shared/WebPreferencesDefaultValues.cpp: |
| (WebKit::defaultAsyncFrameAndOverflowScrollingEnabled): |
| (WebKit::defaultUseGPUProcessForMedia): |
| (WebKit::defaultRenderCanvasInGPUProcessEnabled): |
| (WebKit::defaultCaptureAudioInGPUProcessEnabled): |
| (WebKit::defaultCaptureVideoInGPUProcessEnabled): |
| (WebKit::defaultWebRTCCodecsInGPUProcess): |
| (WebKit::defaultWebGL2Enabled): |
| (WebKit::defaultWebGPUEnabled): |
| (WebKit::defaultInAppBrowserPrivacy): |
| (WebKit::defaultIncrementalPDFEnabled): |
| (WebKit::defaultWebXREnabled): |
| |
| 2020-05-04 Brent Fulgham <bfulgham@apple.com> |
| |
| [macOS] Eliminate SecurityServer and OCSPD from the WebContent sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=211417 |
| <rdar://problem/46235370> |
| |
| Reviewed by Per Arne Vollan. |
| |
| We can now re-block access to these services. |
| |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-05-04 Timothy Horton <timothy_horton@apple.com> |
| |
| Unreviewed, reverting r261117. |
| |
| Broke lots of API tests |
| |
| Reverted changeset: |
| |
| "Excessive error logging from daemons trying to use WebKit, |
| under -[UIDevice currentDevice]" |
| https://bugs.webkit.org/show_bug.cgi?id=211397 |
| https://trac.webkit.org/changeset/261117 |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Remove a few unneeded __IPHONE_OS_VERSION_MIN_REQUIRED checks |
| https://bugs.webkit.org/show_bug.cgi?id=211383 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * UIProcess/ios/forms/WKAirPlayRoutePicker.h: Removed a check against |
| iOS 11, in code that already explicitly checks for watchOS and tvOS. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove HAVE(IOSURFACE) checks in Cocoa-platform-specific code |
| https://bugs.webkit.org/show_bug.cgi?id=211389 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: |
| (WebKit::LibWebRTCCodecsProxy::encodeFrame): Remove HAVE(IOSURFACE) since |
| this is Cocoa-specific code. |
| * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: |
| (WebKit::RemoteLayerBackingStore::ensureBackingStore): Ditto. |
| (WebKit::RemoteLayerBackingStore::clearBackingStore): Ditto. |
| (WebKit::RemoteLayerBackingStore::encode const): Ditto. |
| (WebKit::RemoteLayerBackingStore::decode): Ditto. |
| (WebKit::RemoteLayerBackingStore::bytesPerPixel const): Ditto. |
| (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): Ditto. |
| (WebKit::RemoteLayerBackingStore::display): Ditto. |
| (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): Ditto. |
| (WebKit::RemoteLayerBackingStore::setBufferVolatility): Ditto. |
| (WebKit::RemoteLayerBackingStore::Buffer::discard): Ditto. |
| (WebKit::RemoteLayerBackingStore::surfaceBufferFormat const): Ditto. |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (-[WKWebView _takeViewSnapshot]): Ditto. |
| (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto. |
| * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: Ditto. |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Ditto. |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: |
| (WebKit::recursivelyMapIOSurfaceBackingStore): Ditto. |
| (WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore): Ditto. |
| * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: Ditto. |
| * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h: Ditto. |
| * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: |
| (WebKit::MediaRecorderPrivate::sampleBufferUpdated): Ditto. |
| * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: |
| (WebKit::LibWebRTCProvider::createDecoderFactory): Ditto. |
| * WebProcess/cocoa/UserMediaCaptureManager.cpp: |
| (WebKit::UserMediaCaptureManager::Source::remoteVideoSampleAvailable): Ditto. |
| (WebKit::UserMediaCaptureManager::remoteVideoSampleAvailable): Ditto. |
| |
| 2020-05-04 David Kilzer <ddkilzer@apple.com> |
| |
| Use default constructor and default initializer for SecItemRequestData |
| <https://webkit.org/b/211399> |
| <rdar://problem/62861551> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/mac/SecItemRequestData.cpp: |
| - Remove default constructor implementation. |
| * Shared/mac/SecItemRequestData.h: |
| - Use default constructor for class. |
| - Use default initializer for m_type. |
| |
| 2020-05-04 Brent Fulgham <bfulgham@apple.com> |
| |
| REGRESSION (r259470): Accessibility Stereo to Mono is not working |
| https://bugs.webkit.org/show_bug.cgi?id=211408 |
| <rdar://problem/62847299> |
| |
| Reviewed by Per Arne Vollan. |
| |
| The changes in r259470 regressed our Accessibility features. We need to do a rollout of that |
| change to restore proper behavior. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-05-04 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Implement +[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials] |
| https://bugs.webkit.org/show_bug.cgi?id=211369 |
| <rdar://problem/60246635> |
| |
| Reviewed by Brent Fulgham. |
| |
| Adds a new SPI for UI clients to clear all existing credentials from the keychain. |
| |
| * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: |
| * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: |
| (+[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials]): |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h: |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: |
| (WebKit::LocalAuthenticator::clearAllCredentials): |
| * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm: |
| (WebKit::LocalConnection::createCredentialPrivateKey const): |
| |
| 2020-05-04 Tim Horton <timothy_horton@apple.com> |
| |
| Excessive error logging from daemons trying to use WebKit, under -[UIDevice currentDevice] |
| https://bugs.webkit.org/show_bug.cgi?id=211397 |
| <rdar://problem/61635403> |
| |
| Reviewed by Simon Fraser. |
| |
| * Shared/UserInterfaceIdiom.mm: |
| (WebKit::userInterfaceIdiomIsPad): |
| Adjust userInterfaceIdiomIsPad so that in daemons, it consults only MobileGestalt, |
| which returns the actual hardware model, and does not try to use UIDevice. |
| UIDevice is more accurate for applications because it will report that |
| the device is an iPhone when called inside an iPhone app running on iPad, |
| but it cannot be used in daemons that do not have a UIApplication. |
| |
| For the behaviors we gate on this bit, it makes sense to use iPhone |
| behaviors on iPad in the iPhone app jail, so we continue using |
| UIDevice if possible. |
| |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration init]): |
| Make use of the new mechanism instead of going straight to MobileGestalt, |
| for the aforementioned reasons. |
| |
| 2020-05-04 Chris Dumez <cdumez@apple.com> |
| |
| Stop hard-coding get-task-allow entitlement for simulator builds |
| https://bugs.webkit.org/show_bug.cgi?id=211392 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Stop hard-coding get-task-allow entitlement for simulator builds and let Xcode inject it as needed. |
| |
| * Configurations/BaseXPCService.xcconfig: |
| * Resources/ios/XPCService-embedded-simulator.entitlements: |
| |
| 2020-05-04 Brent Fulgham <bfulgham@apple.com> |
| |
| REGRESSION (JazzkonE): ResourceLoadStatisticsDatabaseStore checks 'hasHadUserInteraction' without ensuring the domain has been added to the ITP database (211388) |
| https://bugs.webkit.org/show_bug.cgi?id=211388 |
| <rdar://problem/62849919> |
| |
| Reviewed by John Wilander. |
| |
| A spurious log entry is created if we check 'hasHadUserInteraction' before inserting a row for the domain |
| being checked (if that domain had not previosly been observed). This patch changes the order of the two |
| commands to avoid this possibility. This makes the database implementation behave like the in-memory version. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction): |
| |
| 2020-05-04 Alex Christensen <achristensen@webkit.org> |
| |
| Reduce AlternativeService assertion to debug-only assert |
| https://bugs.webkit.org/show_bug.cgi?id=211263 |
| <rdar://problem/61354813> |
| |
| Reviewed by Chris Dumez. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| This is asserting sometimes. No need to crash. Reduce to debug-only assert. |
| |
| 2020-05-04 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler |
| https://bugs.webkit.org/show_bug.cgi?id=204713 |
| |
| Reviewed by Simon Fraser. |
| |
| Create an IPC message on the DrawingArea to send a message from the |
| WebProcess to the UIProcess to setPreferredFramesPerSecond of the |
| DisplayRefreshMonitor. |
| |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h: |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in: |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: |
| (-[WKOneShotDisplayLinkHandler setPreferredFramesPerSecond:]): |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::setPreferredFramesPerSecond): |
| Set the preferredFramesPerSecond of the CADisplayLink. |
| |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm: |
| (WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond): |
| Forward the call to RemoteLayerTreeDrawingArea. |
| |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: |
| (WebKit::RemoteLayerTreeDrawingArea::setPreferredFramesPerSecond): |
| Send the IPC message from the WebProcess to the UIProcess. |
| |
| 2020-05-04 Alex Christensen <achristensen@webkit.org> |
| |
| TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=211299 |
| |
| Reviewed by Chris Dumez. |
| |
| Sometimes the task queued in WebProcess::updateProcessName happens after the one in WebProcess::updateActivePages. |
| Schedule them on the same queue so they happen in deterministic order so we get reliable process names eventually. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::updateActivePages): |
| |
| 2020-05-04 Brent Fulgham <bfulgham@apple.com> |
| |
| Remove unneeded check for Apple Media Services |
| https://bugs.webkit.org/show_bug.cgi?id=211391 |
| <rdar://problem/62853199> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Earlier in the development cycle we added an entitlement check for AppleMediaServices, that we now realize |
| we do not need. Since this is a non-zero performance cost, remove this check. |
| |
| * UIProcess/WebPageProxy.cpp: |
| |
| 2020-05-04 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: provide a way for inspector to turn on/off ITP debug mode and AdClickAttribution debug mode |
| https://bugs.webkit.org/show_bug.cgi?id=209763 |
| |
| Reviewed by Brian Burg. |
| |
| Generalize the `setMockCaptureDevicesEnabledOverride` to be `setDeveloperPreferenceOverride` |
| that uses an enum `WebCore::InspectorClient::DeveloperPreference` to know what to do. |
| |
| Communicate with the NetworkProcess (from the WebProcess via the UIProcess) in the case of: |
| - `AdClickAttributionDebugModeEnabled` |
| - `ITPDebugModeEnabled` |
| |
| * WebProcess/Inspector/WebInspectorClient.h: |
| * WebProcess/Inspector/WebInspectorClient.cpp: |
| (WebKit::WebInspectorClient::setDeveloperPreferenceOverride): Added. |
| (WebKit::WebInspectorClient::setMockCaptureDevicesEnabledOverride): Deleted. |
| * WebProcess/Inspector/WebInspector.h: |
| * WebProcess/Inspector/WebInspector.cpp: |
| (WebKit::WebInspector::setDeveloperPreferenceOverride): Added. |
| (WebKit::WebInspector::setMockCaptureDevicesEnabledOverride): Deleted. |
| |
| * UIProcess/Inspector/WebInspectorProxy.messages.in: |
| * UIProcess/Inspector/WebInspectorProxy.h: |
| * UIProcess/Inspector/WebInspectorProxy.cpp: |
| (WebKit::WebInspectorProxy::setDeveloperPreferenceOverride): Added. |
| (WebKit::WebInspectorProxy::setMockCaptureDevicesEnabledOverride): Deleted. |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::setAdClickAttributionDebugMode): Added. |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::setAdClickAttributionDebugMode): Added. |
| |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::initializeNetworkProcess): |
| (WebKit::NetworkProcess::setAdClickAttributionDebugMode): Added. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: |
| (WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode): |
| |
| 2020-05-04 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Unable to take RunningBoard process assertions in the iOS Simulator |
| https://bugs.webkit.org/show_bug.cgi?id=211254 |
| <rdar://problem/62674074> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Add com.apple.runningboard.assertions.webkit entitlement to iOS Simulator builds so that |
| we can take RunningBoard assertions on those platforms too. |
| |
| While doing this, I found that we were not adding the entitlements properly for simulator |
| builds. For simulator builds, entitlements go into an __entitlements section of the binary, |
| rather than in the signature. Use CODE_SIGN_ENTITLEMENTS directive in xcconfig so that |
| XCode does the right thing for simulator builds. |
| |
| * Configurations/BaseXPCService.xcconfig: |
| * Resources/ios/XPCService-embedded-simulator.entitlements: Added. |
| * Scripts/process-entitlements.sh: |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneded HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS) |
| https://bugs.webkit.org/show_bug.cgi?id=211380 |
| |
| Reviewed by Sam Weinig. |
| |
| * UIProcess/mac/WindowServerConnection.h: Don't check |
| HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS) in this Mac-only header. |
| Also removed #pragma once in this header that is only included from .mm files. |
| |
| * UIProcess/mac/WindowServerConnection.mm: Wrapped the whole file in |
| PLATFORM(MAC) because this is macOS-specific code that may be compiled on |
| iOS family platforms. Could wrap it in HAVE(WINDOW_SERVER) instead, but we |
| don't have anything like that and PageClientImplMac.mm, the client of this |
| code, uses PLATFORM(MAC). |
| (WebKit::registerOcclusionNotificationHandler): Ditto. |
| (WebKit::WindowServerConnection::WindowServerConnection): Ditto. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(UI_REMOTE_VIEW) |
| https://bugs.webkit.org/show_bug.cgi?id=211382 |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: |
| (WebKit::createRemoteView): Deleted. |
| (WebKit::RemoteLayerTreeHost::makeNode): After researching to be sure the method |
| is present in the relevant versions of iOS 13, changed this code to use the |
| initWithFrame:pid:contextID: method without doing a selector check, and also |
| without a HAVE(UI_REMOTE_VIEW) conditional. |
| |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: Removed the |
| HAVE(UI_REMOTE_VIEW) conditional. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(MENU_CONTROLLER_SHOW_HIDE_API) |
| https://bugs.webkit.org/show_bug.cgi?id=211381 |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _handleDOMPasteRequestWithResult:]): Use hideMenuFromView: directly. |
| (-[WKContentView _requestDOMPasteAccessWithElementRect:originIdentifier:completionHandler:]): |
| Use showMenuFromView: directly. |
| (-[WKContentView showGlobalMenuControllerInRect:]): Deleted. |
| (-[WKContentView hideGlobalMenuController]): Deleted. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(VOUCHERS) |
| https://bugs.webkit.org/show_bug.cgi?id=211379 |
| |
| Reviewed by Alex Christensen. |
| |
| * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: |
| (WebKit::XPCServiceInitializer): Remove HAVE(VOUCHERS) checks from this |
| Cocoa-only source file. |
| |
| 2020-05-04 Alex Christensen <achristensen@webkit.org> |
| |
| TestWebKitAPI.WebKit.CustomDisplayName is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=211299 |
| |
| Reviewed by Darin Adler. |
| |
| The application name is being set on a background queue, but there's nothing actually keeping the NSString alive. |
| This may fix some timeouts we were seeing. I wonder why ASAN or guard malloc didn't catch this yet. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::updateProcessName): |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove no-longer-needed HAVE(UISCENE) |
| https://bugs.webkit.org/show_bug.cgi?id=211376 |
| |
| Reviewed by Chris Dumez. |
| |
| * Platform/spi/ios/UIKitSPI.h: Don't check HAVE(UISCENE) any more in this |
| iOS-family-only source file; it's always true. |
| * UIProcess/ApplicationStateTracker.h: Ditto. |
| * UIProcess/ApplicationStateTracker.mm: |
| (WebKit::ApplicationStateTracker::ApplicationStateTracker): Ditto. |
| (WebKit::ApplicationStateTracker::~ApplicationStateTracker): Ditto. |
| * UIProcess/ios/WKContentView.mm: |
| (-[WKContentView interfaceOrientation]): Ditto. |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView textEffectsWindow]): Ditto. |
| |
| 2020-05-04 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Unreviewed, speculative build fix for r261071 |
| https://bugs.webkit.org/show_bug.cgi?id=211274 |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| |
| 2020-05-04 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Put lh / rlh units behind a flag until bug 211351 is sorted out. |
| https://bugs.webkit.org/show_bug.cgi?id=211356 |
| |
| Reviewed by Antti Koivisto. |
| |
| * Shared/WebPreferences.yaml: Define the runtime flag. |
| |
| 2020-05-03 David Kilzer <ddkilzer@apple.com> |
| |
| Use LocalCurrentGraphicsContext in WebKit::convertPlatformImageToBitmap() |
| <https://webkit.org/b/211274> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::convertPlatformImageToBitmap): |
| - Use LocalCurrentGraphicsContext to replace code. |
| |
| 2020-05-03 David Kilzer <ddkilzer@apple.com> |
| |
| Use default initializers and default constructors in WebEvent.h |
| <https://webkit.org/b/211354> |
| |
| Reviewed by Daniel Bates. |
| |
| * Shared/WebEvent.h: |
| (WebKit::WebWheelEvent): |
| (WebKit::WebKeyboardEvent): |
| (WebKit::WebPlatformTouchPoint): |
| (WebKit::WebTouchEvent): |
| - Change empty constructors to use `default`. |
| - Use default initializers to make sure all fields are |
| initialized. |
| |
| 2020-05-02 Simon Fraser <simon.fraser@apple.com> |
| |
| handleWheelEventPhase() should include the relevant ScrollingNodeID |
| https://bugs.webkit.org/show_bug.cgi?id=211315 |
| |
| Reviewed by Tim Horton. |
| |
| handleWheelEventPhase() is used to send information about wheel event phases |
| to the main thread, which make their way to ScrollAnimatorMac::handleWheelEventPhase() |
| and are used to update the state of overlay scrollbars. In order to talk to the |
| correct set of scrollbars with overflow:scroll, we need to send along the ScrollingNodeID |
| and map that to the appropriate ScrollableArea. |
| |
| Will be tested by future overlay scrollbar tests. |
| |
| * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: |
| (WebKit::RemoteScrollingTree::handleWheelEventPhase): |
| * UIProcess/RemoteLayerTree/RemoteScrollingTree.h: |
| |
| 2020-05-02 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Re-inject key press events not handled by the web process |
| https://bugs.webkit.org/show_bug.cgi?id=211286 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use gdk_display_put_event() since gtk_main_do_event() is no longer available in GTK4. Also stop forwarding key |
| release events in GTK3 case, this only makes sense for key press events and we were re-injecting every release |
| event since they are not handled by web elements in most of the cases. |
| |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::doneWithKeyEvent): |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseKeyPressEvent): |
| (webkitWebViewBaseKeyReleaseEvent): |
| (webkitWebViewBaseKeyPressed): |
| |
| 2020-05-02 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK] Specify action group name when binding context menu models |
| https://bugs.webkit.org/show_bug.cgi?id=211288 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::WebContextMenuProxyGtk::append): Use the action name directly for the menu item. |
| (WebKit::WebContextMenuProxyGtk::populate): Indicate the action group name when binding the |
| menu model, which automatically adds the group name as action name prefix without needing |
| to specify it by hand when adding menu items. |
| |
| 2020-05-02 Devin Rousso <drousso@apple.com> |
| |
| [CSS Easing 1] implement `jump-*` step positions |
| https://bugs.webkit.org/show_bug.cgi?id=211271 |
| |
| Reviewed by Dean Jackson. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::ArgumentCoder<StepsTimingFunction>::encode): |
| (IPC::ArgumentCoder<StepsTimingFunction>::decode): |
| |
| 2020-05-01 Tim Horton <timothy_horton@apple.com> |
| |
| Books sometimes ends up with blank pages, especially after adjusting font size |
| https://bugs.webkit.org/show_bug.cgi?id=211265 |
| <rdar://problem/59898144> |
| |
| Reviewed by Darin Adler. |
| |
| A few problems: |
| |
| - There is short time during page creation where a WKWebView created |
| with _clipsToVisibleRect=YES would not yet have sent its viewExposedRect |
| to the Web Content process, and if we end up constructing tiles during |
| that time, we can make way too many, bogging down the process (or crashing). |
| |
| Fix this by always keeping track of the viewExposedRect (on WebPageProxy, |
| instead of the somewhat-more-transient DrawingAreaProxy) and sending it |
| to the Web Content process in the WebPage creation parameters, to entirely |
| remove this window. |
| |
| - Even when the viewExposedRect successfully gets to the Web Content |
| process, it can still end up wildly wrong: the DrawingArea was tasked with |
| watching scrolling changes, applying the scroll offset to the viewExposedRect, |
| and pushing it to FrameView in content coordinates. |
| |
| It turns out that this was all unnecessary, as we need viewExposedRect |
| in root view coordinates (same space as visibleContentRect, which we |
| intersect it with), and we just didn't notice because all clients of |
| _clipsToVisibleRect: expand the view to its layout size and insert |
| a scrolling view outside the web view, and so don't use our scrolling. |
| |
| Avoid this conversion and complexity entirely; I tested Mail and Books |
| where there is no impact (other than fixing the original bug), and also |
| a custom test app with a scrollable WKWebView inside a NSScrollView, |
| which improved significantly. |
| |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPageCreationParameters.h: |
| Plumb view exposed rect via WebPage creation parameters. |
| |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::updateViewExposedRect): |
| Send viewExposedRect changes to WebPageProxy instead of DrawingAreaProxy. |
| |
| * UIProcess/DrawingAreaProxy.cpp: |
| (WebKit::DrawingAreaProxy::didChangeViewExposedRect): |
| (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired): |
| (WebKit::DrawingAreaProxy::setViewExposedRect): Deleted. |
| * UIProcess/DrawingAreaProxy.h: |
| (WebKit::DrawingAreaProxy::viewExposedRect const): Deleted. |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h: |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::didChangeViewExposedRect): |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation const): |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator): |
| (WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect): Deleted. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::setViewExposedRect): |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::viewExposedRect const): |
| Maintain viewExposedRect on WebPageProxy instead of DrawingAreaProxy, |
| so that we can always store it even if we don't have a DrawingAreaProxy yet |
| (or change DrawingAreaProxies) and can send it in WebPage creation parameters. |
| |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h: |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: |
| (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): |
| (WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect): |
| (WebKit::RemoteLayerTreeDrawingArea::updateRendering): |
| (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect): Deleted. |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: |
| (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): |
| (WebKit::TiledCoreAnimationDrawingArea::updateRendering): |
| (WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect): |
| (WebKit::TiledCoreAnimationDrawingArea::scroll): Deleted. |
| (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect): Deleted. |
| Plumb viewExposedRect directly to FrameView, instead of trying to apply |
| the root view -> contents mapping ourselves and pushing updates. |
| |
| 2020-05-01 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Refactor createMessageDecoder() for clarity |
| <https://webkit.org/b/211322> |
| |
| Reviewed by Darin Adler. |
| |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::createMessageDecoder): |
| - Rename `numDescriptors` to `numberOfPortDescriptors` to match |
| variable name in sendOutgoingMessage(). |
| - Add new `numberOfAttachments` variable to make it clear that |
| one port descriptor is left for an out-of-line message body. |
| - Add FIXME about another issue. |
| |
| 2020-05-01 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to move localStorage to a different domain |
| https://bugs.webkit.org/show_bug.cgi?id=209260 |
| <rdar://problem/60285683> |
| |
| Reviewed by Brady Eidson. |
| |
| Covered by an API test. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::renameDomainInWebsiteData): |
| (WebKit::NetworkProcess::getLocalStorageOriginDetails): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: |
| (WebKit::LocalStorageNamespace::renameDomain): |
| * NetworkProcess/WebStorage/LocalStorageNamespace.h: |
| * NetworkProcess/WebStorage/StorageArea.cpp: |
| (WebKit::StorageArea::close): |
| * NetworkProcess/WebStorage/StorageArea.h: |
| * NetworkProcess/WebStorage/StorageManager.cpp: |
| (WebKit::StorageManager::renameDomain): |
| * NetworkProcess/WebStorage/StorageManager.h: |
| * NetworkProcess/WebStorage/StorageManagerSet.cpp: |
| (WebKit::StorageManagerSet::renameDomain): |
| * NetworkProcess/WebStorage/StorageManagerSet.h: |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: |
| (-[WKWebsiteDataStore _renameDomain:to:forDataOfTypes:completionHandler:]): |
| * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::renameDomainInWebsiteData): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::renameDomainInWebsiteData): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] ProcessThrottler fails to re-take ProcessAssertion if the previous one was invalidated |
| https://bugs.webkit.org/show_bug.cgi?id=211297 |
| <rdar://problem/62542463> |
| |
| Reviewed by Jer Noble. |
| |
| Our ProcessAssertions may get invalidated upon backgrounding of the app. When the app becomes |
| foreground and the ProcessThrottler tries to take a Foreground assertion as a result, it would |
| incorrectly think it already had such assertion and not do anything, even though the previous |
| one is no longer valid. As a result, the child processes would stay suspended even though the |
| app was foregrounded. |
| |
| To address the issue, add a isValid() method to ProcessAssertion() and check it in |
| ProcessThrottler::setAssertionType() to determine if we need to re-take an assertion or not. |
| We also invalidate all pending ProcessThrottler activities upon ProcessAssertion invalidation |
| for good measure. This way, the holders of these activities will be able to rely on |
| Activity::isValid() to determine if they need to re-take their activities or not. |
| |
| * Platform/spi/ios/AssertionServicesSPI.h: |
| * Platform/spi/ios/RunningBoardServicesSPI.h: |
| * UIProcess/ProcessAssertion.cpp: |
| (WebKit::ProcessAssertion::isValid const): |
| * UIProcess/ProcessAssertion.h: |
| (WebKit::ProcessAssertion::validity const): Deleted. |
| * UIProcess/ProcessThrottler.cpp: |
| (WebKit::ProcessThrottler::setAssertionType): |
| (WebKit::ProcessThrottler::assertionWasInvalidated): |
| * UIProcess/ProcessThrottler.h: |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::ProcessAssertion::processAssertionWasInvalidated): |
| (WebKit::ProcessAssertion::isValid const): |
| (WebKit::ProcessAndUIAssertion::updateRunInBackgroundCount): |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r261015. |
| |
| Seems to have broken clean builds |
| |
| Reverted changeset: |
| |
| "[iOS] Unable to take RunningBoard process assertions in the |
| iOS Simulator" |
| https://bugs.webkit.org/show_bug.cgi?id=211254 |
| https://trac.webkit.org/changeset/261015 |
| |
| 2020-05-01 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] createMessageDecoder() needs a validity check |
| <https://webkit.org/b/211260> |
| <rdar://problem/61914087> |
| |
| Reviewed by Darin Adler. |
| |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::createMessageDecoder): |
| - Add validity check and early return for |
| `numDescriptors`. |
| |
| 2020-05-01 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: Browser: crash when handling `disable` |
| https://bugs.webkit.org/show_bug.cgi?id=211251 |
| |
| Reviewed by Daniel Bates. |
| |
| * UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp: |
| (WebKit::InspectorBrowserAgent::disable): |
| If the inspected page crashed, we won't have a `WebInspectorProxy` anymore. |
| |
| 2020-05-01 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Every running WebContent process should be granted access to frontboard services when Accessibility is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=211238 |
| |
| Reviewed by Daniel Bates. |
| |
| Currently, every WebContent process is granted access to frontboard services if Accessibility is enabled at the |
| time of startup. However, WebContent processes running at the time when Accessibility is enabled are not granted |
| access, which is a bug. |
| |
| API test: WebKit.AccessibilityHasFrontboardServiceAccess |
| |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::sendMessage): |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * UIProcess/Cocoa/WebProcessProxyCocoa.mm: |
| (WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded): |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::unblockServicesRequiredByAccessibility): |
| (WebKit::WebProcess::unblockAccessibilityServer): Deleted. |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Unable to take RunningBoard process assertions in the iOS Simulator |
| https://bugs.webkit.org/show_bug.cgi?id=211254 |
| <rdar://problem/62674074> |
| |
| Reviewed by Tim Horton. |
| |
| * Configurations/BaseXPCService.xcconfig: |
| Use this directive to add our entitlements: |
| CODE_SIGN_ENTITLEMENTS = $(WK_PROCESSED_XCENT_FILE); |
| instead of using: |
| OTHER_CODE_SIGN_FLAGS = --entitlements $(WK_PROCESSED_XCENT_FILE); |
| This is important because entitlements are added differently for iOS Simulator builds, |
| so that they only apply inside the simulator (and not for the host system). If we use |
| CODE_SIGN_ENTITLEMENTS, then XCode does the right thing on all platforms. |
| |
| * Scripts/process-entitlements.sh: |
| Add com.apple.runningboard.assertions.webkit entitlement to iOS Simulator builds. |
| |
| 2020-05-01 Don Olmstead <don.olmstead@sony.com> |
| |
| [GTK] Add additional exports to support hidden visibility |
| https://bugs.webkit.org/show_bug.cgi?id=211246 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h: |
| |
| 2020-05-01 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Update message filtering rules in the WebContent process' sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=211188 |
| <rdar://problem/60922910> |
| |
| Reviewed by Brent Fulgham. |
| |
| Based on telemetry and local testing, update the message filtering rules in the WebContent process' sandbox on iOS. |
| Messages that have not been observed being in use, should be denied. |
| |
| No new tests, covered by existing tests. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::sendMessage): |
| |
| 2020-05-01 Peng Liu <peng.liu6@apple.com> |
| |
| A PiP window doesn’t actually dismiss after the browser navigates to a different page within the same domain |
| https://bugs.webkit.org/show_bug.cgi?id=211257 |
| |
| Reviewed by Jer Noble. |
| |
| Add the support of exitVideoFullscreenToModeWithoutAnimation() in iOS, |
| so that the Web process can request the UI process to close the PiP window |
| without exchanging IPC messages back and forth. |
| |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| (WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode): |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| |
| Only stop the watchdog timer if it is active. |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| (WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation): |
| |
| 2020-05-01 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260920. |
| https://bugs.webkit.org/show_bug.cgi?id=211292 |
| |
| Sandbox compile error is no longer an issue (Requested by |
| perarne on #webkit). |
| |
| Reverted changeset: |
| |
| "Unreviewed sandbox compile fix." |
| https://trac.webkit.org/changeset/260920 |
| |
| 2020-05-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Move focus out of the web view when tab is pressed and there isn't a next element to focus |
| https://bugs.webkit.org/show_bug.cgi?id=211283 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Implement API::UIClient::takeFocus() that is called when WebCore wants to focus the chrome. |
| |
| * UIProcess/API/glib/WebKitUIClient.cpp: |
| |
| 2020-05-01 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r260214): Leak of _WKTextInputContext in -[WKContentView _isTextInputContextFocused:] |
| <https://webkit.org/b/211276> |
| <rdar://problem/62696724> |
| |
| Reviewed by Daniel Bates. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): |
| - Use RetainPtr<> to pass the copy of _WKTextInputContext into |
| the block to fix the leak. |
| |
| 2020-05-01 Saam Barati <sbarati@apple.com> |
| |
| We can't cast toLength result to unsigned |
| https://bugs.webkit.org/show_bug.cgi?id=211205 |
| <rdar://problem/62625562> |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * WebProcess/Plugins/Netscape/NPJSObject.cpp: |
| (WebKit::NPJSObject::hasProperty): |
| (WebKit::NPJSObject::getProperty): |
| (WebKit::NPJSObject::removeProperty): |
| |
| 2020-05-01 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Disable arrow on context menu popover |
| https://bugs.webkit.org/show_bug.cgi?id=211241 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Disable the menu popover arrow. |
| |
| 2020-04-30 Ross Kirsling <ross.kirsling@sony.com> |
| |
| TriState should be an enum class and use "Indeterminate" instead of "Mixed" |
| https://bugs.webkit.org/show_bug.cgi?id=211268 |
| |
| Reviewed by Mark Lam. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::validateCommand): |
| |
| * WebProcess/WebPage/glib/WebPageGLib.cpp: |
| (WebKit::WebPage::getPlatformEditorState const): |
| |
| 2020-04-30 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Require user gestures for LocalAuthenticator |
| https://bugs.webkit.org/show_bug.cgi?id=182893 |
| <rdar://problem/43357293> |
| |
| Reviewed by Brent Fulgham. |
| |
| Covered by API tests. |
| |
| * UIProcess/WebAuthentication/AuthenticatorManager.cpp: |
| (WebKit::AuthenticatorManager::filterTransports const): |
| (WebKit::AuthenticatorManager::getTransports const): |
| Checks UserGesture here. Since filterTransports will be overrided in mock testings, |
| all mock tests don't require user gestures. |
| |
| * UIProcess/WebAuthentication/WebAuthenticationRequestData.h: |
| * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp: |
| (WebKit::WebAuthenticatorCoordinatorProxy::makeCredential): |
| (WebKit::WebAuthenticatorCoordinatorProxy::getAssertion): |
| * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h: |
| * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in: |
| * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: |
| (WebKit::WebAuthenticatorCoordinator::makeCredential): |
| (WebKit::WebAuthenticatorCoordinator::getAssertion): |
| Adds user gesture corresponding fields. |
| |
| 2020-04-30 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the Mac Catalyst build after r260979 |
| |
| The presence of `_contextMenuInteraction` is conditional not only on `USE(UICONTEXTMENU)`, but also |
| `HAVE(LINK_PREVIEW)`. Guard logic in `-deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:` with the |
| latter as well. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): |
| |
| 2020-04-30 Simon Fraser <simon.fraser@apple.com> |
| |
| Clean up some EventHandler coordinate-related naming and fix ScrollableArea::lastKnownMousePosition() conversions |
| https://bugs.webkit.org/show_bug.cgi?id=211259 |
| |
| Reviewed by Zalan Bujtas. |
| |
| * Shared/WebEvent.h: |
| (WebKit::WebMouseEvent::position const): |
| * Shared/WebMouseEvent.cpp: |
| (WebKit::WebMouseEvent::WebMouseEvent): |
| * WebProcess/Plugins/PDF/PDFPlugin.h: |
| |
| 2020-04-30 David Kilzer <ddkilzer@apple.com> |
| |
| [iOS] Fix confusing idiom for releasing _selectionRects in -[WKTextRange dealloc] |
| <https://webkit.org/b/211269> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKTextRange dealloc]): |
| - Switch to more common idiom to release an instance variable. |
| This fixes a false positive warning from the clang static |
| analyzer about releasing a variable not owned by the caller. |
| |
| 2020-04-30 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION: Double tap dispatches one click event on iOS 13.4 when it would dispatch two on iOS 13.3 |
| https://bugs.webkit.org/show_bug.cgi?id=211179 |
| <rdar://problem/62594779> |
| |
| Reviewed by Tim Horton. |
| |
| https://trac.webkit.org/r253267 introduced deferring gesture recognizers as a way to handle preventable (non- |
| passive) touchstart events without blocking the UI process. These deferring gesture recognizers work by having |
| other gesture recognizers at or below WKWebView (with few exceptions) require the failure of these deferring |
| gestures. These gestures transition to possible state when beginning a touch inside a non-passive touch event |
| handling region, and transition to either failed or ended state (depending on whether `preventDefault()` was |
| called) after the web content process finished handling the touch event. |
| |
| However, this means that the resulting dependency graph now has an edge between each gesture under WKWebView and |
| one of the deferring gesture recognizers, due to these new failure requirements. Since gestures that have been |
| recognized or have failed don't get reset until all other gestures in the same dependency subgraph have also |
| recognized or failed, some gestures (such as the synthetic single tap gesture recognizer in this bug) might not |
| be resetting as soon after ending as they did before, since they may be connected to other gesture recognizers |
| that are still in possible state by way of the failure requirements added by the new deferring gestures. |
| |
| I was already aware of this problem in r253267, and attempted to solve this by bisecting the gesture dependency |
| graph into two subgraphs: one containing all the one-finger multi-tap gestures that are reset after a lengthy |
| delay, and another containing everything else. To do this, I added two different deferring gesture recognizers: |
| one for immediately resettable gestures (meant for gestures in the latter subgraph), and another for gestures |
| that are reset after a delay (meant for gestures in the former subgraph). |
| |
| Unfortunately, unrelated changes around text interactions in UIKit in iOS 13.4 caused the tap-and-a-half |
| gesture for selecting a range of text to now have a delayed reset; this means that gestures in the "immediately |
| resettable" gesture subgraph are all forced to wait on the tap-and-a-half text interaction gesture before |
| resetting, which causes the bug here, since the synthetic single tap gesture is in this "immediately resettable" |
| gesture subgraph. |
| |
| To mitigate this, this patch pushes the tap-and-a-half text selection gesture, along with the loupe gesture, |
| context menu relationship gesture, and drag lift gestures (i.e. the other gestures that are connected to the |
| tap-and-a-half gesture via failure requirements) out of the "immediately resettable" subgraph, and into the |
| "delayed" subgraph. |
| |
| Test: fast/events/touch/ios/two-click-events-after-double-tap-with-touch-handler.html |
| |
| * Platform/spi/ios/UIKitSPI.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): |
| |
| 2020-04-30 Brent Fulgham <bfulgham@apple.com> |
| |
| REGRESSION (r260932): ASSERTION FAILED: ok in webkit::SandboxExtension::consumePermanently for 3 tests |
| https://bugs.webkit.org/show_bug.cgi?id=211253 |
| <rdar://problem/62673727> |
| |
| Reviewed by Per Arne Vollan. |
| |
| In r260932 I added an assertion to confirm that a sandbox extension was successfully consumed. This triggered three |
| test failures because those tests attempt to pass a sandbox extension from the WebContent process to the UIProcess. |
| |
| After speaking with the Sandbox team, I learned that an unsandboxed program that attempts to consume a valid |
| sandbox extension will return 0. Sandboxed processes either receive -1 (for error), or a handle representing the |
| newly added extension (so that it can be removed when no longer needed). |
| |
| Since the TestWebKitAPI (and WebKitTestRunner) processes are not sandboxed they receive a zero return value here. |
| |
| We should recognize this as a valid and expected result. We should also consider making some form of sandboxed |
| driver for WebKit. |
| |
| * Shared/Cocoa/SandboxExtensionCocoa.mm: |
| (WebKit::SandboxExtensionImpl::consume): Recognize a 0 handle as valid. |
| |
| 2020-04-30 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Optimize LocalAuthenticator |
| https://bugs.webkit.org/show_bug.cgi?id=183534 |
| <rdar://problem/43357408> |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch implements the following small optimizations: |
| 1. Replacing local constants with ones from FidoConstants.h; |
| 2. Merging m_assertionResponses and m_existingCredentials by replacing HashSet with Vector in Authenticator::Observer::selectAssertionResponse; |
| 3. Using Base64 encoded strings as the keys of the HashSet in produceHashSet() instead of the old casting hack; |
| 4. Invaliding the LAContext in LocalConnection::~LocalConnection() such that any displaying LocalAuthentication dialogs can be dismissed after the object is destroyed; |
| 5. Sorting existing credentials according to LRU before returning to UI clients; |
| 6. Improving the LocalAuthentication dialog titles for iOS. |
| |
| * UIProcess/WebAuthentication/Authenticator.h: |
| * UIProcess/WebAuthentication/AuthenticatorManager.cpp: |
| (WebKit::AuthenticatorManager::selectAssertionResponse): |
| * UIProcess/WebAuthentication/AuthenticatorManager.h: |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.h: |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: |
| (WebKit::LocalAuthenticatorInternal::produceHashSet): |
| (WebKit::LocalAuthenticatorInternal::toNSData): |
| (WebKit::LocalAuthenticatorInternal::getExistingCredentials): |
| (WebKit::LocalAuthenticator::makeCredential): |
| (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): |
| (WebKit::LocalAuthenticator::getAssertion): |
| (WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification): |
| * UIProcess/WebAuthentication/Cocoa/LocalConnection.h: |
| (WebKit::LocalConnection::filterResponses const): |
| * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm: |
| (WebKit::WebCore::bundleName): |
| (WebKit::LocalConnection::~LocalConnection): |
| (WebKit::LocalConnection::verifyUser): |
| (WebKit::LocalConnection::verifyUser const): Deleted. |
| * UIProcess/WebAuthentication/Mock/MockLocalConnection.h: |
| * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: |
| (WebKit::MockLocalConnection::verifyUser): |
| (WebKit::MockLocalConnection::filterResponses const): |
| (WebKit::MockLocalConnection::verifyUser const): Deleted. |
| * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: |
| (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived): |
| (WebKit::CtapAuthenticator::continueGetNextAssertionAfterResponseReceived): |
| * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: |
| |
| 2020-04-30 Kate Cheney <katherine_cheney@apple.com> |
| |
| Change default of "inAppBrowserPrivacyQuirks" testing toggle to use it for tests only |
| https://bugs.webkit.org/show_bug.cgi?id=211209 |
| <rdar://problem/62619659> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests, behavior confirmed by existing tests. |
| |
| * Shared/WebPreferences.yaml: |
| |
| 2020-04-30 Devin Rousso <drousso@apple.com> |
| |
| Unreviewed, add missing parenthesis |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::handleMediaEvent): |
| |
| 2020-04-30 Chris Dumez <cdumez@apple.com> |
| |
| [iOS][WK2] Add timeout for "Client navigation" foreground assertion |
| https://bugs.webkit.org/show_bug.cgi?id=211202 |
| |
| Reviewed by Alex Christensen. |
| |
| Add a 30s timeout for "Client navigation" foreground assertion. Foreground assertions do not timeout |
| at RunningBoard level and we thus need to make sure we release them to avoid power leaks. |
| |
| * UIProcess/API/APINavigation.cpp: |
| (API::Navigation::Navigation): |
| * UIProcess/API/APINavigation.h: |
| (API::Navigation::setClientNavigationActivity): |
| (API::Navigation::setForegroundActivity): Deleted. |
| * UIProcess/ProcessThrottler.cpp: |
| (WebKit::ProcessThrottler::TimedActivity::TimedActivity): |
| (WebKit::ProcessThrottler::TimedActivity::operator=): |
| (WebKit::ProcessThrottler::TimedActivity::activityTimedOut): |
| (WebKit::ProcessThrottler::TimedActivity::updateTimer): |
| * UIProcess/ProcessThrottler.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::loadRequest): |
| (WebKit::WebPageProxy::loadFile): |
| (WebKit::WebPageProxy::loadData): |
| (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): |
| (WebKit::WebPageProxy::didFinishLoadForFrame): |
| (WebKit::WebPageProxy::didFailLoadForFrame): |
| |
| 2020-04-30 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to change a WKWebView's CORS disabling pattern after initialization |
| https://bugs.webkit.org/show_bug.cgi?id=211211 |
| <rdar://problem/61837474> |
| |
| Reviewed by Chris Dumez. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _corsDisablingPatterns]): |
| (-[WKWebView _setCORSDisablingPatterns:]): |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::corsDisablingPatterns const): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::parseAndAllowAccessToCORSDisablingPatterns): |
| (WebKit::m_isNavigatingToAppBoundDomain): |
| (WebKit::WebPage::updateCORSDisablingPatterns): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-30 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Implement -markedTextRange |
| https://bugs.webkit.org/show_bug.cgi?id=211148 |
| <rdar://problem/57865890> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Return the UITextRange-like object for the marked text range. Clients can use this range to |
| access the selection rects or query for the caret rect at the start or end of the range, |
| if desired. |
| |
| * Shared/EditorState.cpp: |
| (WebKit::EditorState::PostLayoutData::encode const): |
| (WebKit::EditorState::PostLayoutData::decode): |
| Encode and decode the marked text selection rects and caret rects at the state and end |
| of the marked text range. This is the same information that we compute in order to |
| implement -selectedTextRange. I thought about collecting these details into class and |
| having editor state hold two instances of it: one for selected text and one for marked text. |
| However I decided against it because this class is unlikely to find use outside of what is |
| needed to implement -selectedTextRange and -markedTextRange. This is because only those |
| functions require such details so as to return an opaque UITextRange-derived object that |
| can be passed to- or its sub-objects can be passed to WKContentView's -caretRectForPosition |
| and -selectionRectsForRange. Literally, WKContentView does not support other UITextInput |
| functions that operate on UITextRange or UITextPosition. I didn't pursue fixing this in |
| general because 1) I don't need it to solve my problem and 2) UIWKDocumentContext SPI seems |
| to be the new general-purpose solution. |
| |
| (WebKit::operator<<): Pretty print all the new marked text details we collect. While I am here, |
| use Vector::isEmpty() instead of Vector::size() to check if there are selection rects. |
| * Shared/EditorState.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView textFirstRect]): |
| (-[WKContentView textLastRect]): |
| Update code now that the marked text rects are in the post layout data sub-object. |
| |
| (-[WKContentView _scaledCaretRectForSelectionStart:]): Extracted from -selectedTextRange. |
| (-[WKContentView _scaledCaretRectForSelectionEnd:]): Ditto. |
| (-[WKContentView selectedTextRange]): Write in terms of -_scaledCaretRectForSelectionStart |
| and -_scaledCaretRectForSelectionEnd. Also modernize the code while I am here. |
| (-[WKContentView markedTextRange]): Added. |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::getPlatformEditorState const): Collect the marked text rects and the caret |
| rects at the start and end of the range. |
| |
| 2020-04-30 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4][X11] Add support for rendering web view contents |
| https://bugs.webkit.org/show_bug.cgi?id=211189 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use GdkDisplayX11::xevent signal instead of filtering events that is no longer available in GTK4. GdkVisual no |
| longer exists either, so we get the X visual from the PlatformDisplay. |
| |
| * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: |
| (WebKit::XDamageNotifier::add): |
| (WebKit::XDamageNotifier::remove): |
| (WebKit::XDamageNotifier::filterXDamageEvent): |
| (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11): |
| (WebKit::AcceleratedBackingStoreX11::update): |
| (WebKit::AcceleratedBackingStoreX11::snapshot): |
| * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp: |
| (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): |
| (WebKit::AcceleratedSurfaceX11::createPixmap): |
| |
| 2020-04-30 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support click events |
| https://bugs.webkit.org/show_bug.cgi?id=211175 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Handle button pressed and released events using a GtkGestureClick. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (ClickCounter::currentClickCountForGdkButtonEvent): |
| (webkitWebViewBaseButtonPressed): |
| (webkitWebViewBaseButtonReleased): |
| (webkitWebViewBaseConstructed): |
| (webkitWebViewBaseResetClickCounter): |
| |
| 2020-04-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Use initializers in PlatformMouseEvent and WebEvent |
| https://bugs.webkit.org/show_bug.cgi?id=211217 |
| |
| Reviewed by Tim Horton. |
| |
| Use initializers im WebEvent. |
| |
| * Shared/WebEvent.h: |
| * Shared/WebMouseEvent.cpp: |
| |
| 2020-04-29 Brent Fulgham <bfulgham@apple.com> |
| |
| Improve SandboxExtension::HandleArray to reduce boilerplate |
| https://bugs.webkit.org/show_bug.cgi?id=211103 |
| <rdar://problem/62533632> |
| |
| Reviewed by Per Arne Vollan. |
| |
| There are a number of boilerplate patterns needed when using SandboxExtension::HandleArray. |
| We could make these simpler and less error prone by improving the class. |
| |
| This patch: |
| 1. Adds convenience methods to create and consume HandleArrays. |
| 2. Updates uses of HandleArray to use the convenience methods. |
| |
| Tested by existing tests. |
| |
| * Platform/IPC/FormDataReference.h: |
| (IPC::FormDataReference::decode): |
| * Shared/Cocoa/SandboxExtensionCocoa.mm: |
| (WebKit::SandboxExtension::createHandlesForFiles): |
| (WebKit::SandboxExtension::createHandlesForMachLookup): |
| (WebKit::SandboxExtension::consumePermanently): |
| * Shared/SandboxExtension.h: |
| (WebKit::createHandlesForFiles): |
| (WebKit::SandboxExtension::consumePermanently): |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * UIProcess/Cocoa/WebProcessProxyCocoa.mm: |
| (WebKit::WebProcessProxy::unblockPreferenceServiceIfNeeded): |
| * UIProcess/WebPageProxy.cpp: |
| * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: |
| (WebKit::WebPlatformStrategies::getPathnamesForType): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::extendSandboxForFilesFromOpenPanel): |
| * WebProcess/WebProcess.cpp: |
| (WebKit::WebProcess::initializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| (WebKit::WebProcess::unblockPreferenceService): |
| |
| 2020-04-29 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION(r260791) Network process fails to suspend promptly |
| https://bugs.webkit.org/show_bug.cgi?id=211207 |
| <rdar://problem/62620454> |
| |
| Reviewed by Alex Christensen. |
| |
| After r260791, all WebResourceLoadStatisticsStore instances share a single WorkQueue. |
| As a result, the logic to suspend WebResourceLoadStatisticsStore's WorkQueues in |
| NetworkProcess::prepareToSuspend() needs to get updated to reflect this. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::suspend): |
| (WebKit::WebResourceLoadStatisticsStore::resume): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::prepareToSuspend): |
| (WebKit::NetworkProcess::resume): |
| |
| 2020-04-29 Adrian Perez de Castro <aperez@igalia.com> |
| |
| REGRESSION(r260889): TestContextMenu:/webkit/WebKitWebView/populate-menu no longer passes |
| https://bugs.webkit.org/show_bug.cgi?id=211203 |
| |
| Reviewed by Aakash Jain. |
| |
| No new tests needed. |
| |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Attach the correct action |
| group to the popover widget, instead of a temporary which will always be empty. |
| |
| 2020-04-29 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r246395): Leak of ARQuickLookPreviewItem and ARQuickLookWebKitItem in -[_WKPreviewControllerDataSource previewController:previewItemAtIndex:] |
| <https://webkit.org/b/211197> |
| <rdar://problem/62612483> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm: |
| (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]): |
| - Use RetainPtr<> and adoptNS() to fix leaks. |
| |
| 2020-04-29 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed sandbox compile fix. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-29 Alex Christensen <achristensen@webkit.org> |
| |
| Add WKNavigationDelegate API shouldAllowDeprecatedTLS |
| https://bugs.webkit.org/show_bug.cgi?id=210981 |
| <rdar://problem/61742976> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * UIProcess/API/Cocoa/WKNavigationDelegate.h: |
| * UIProcess/Cocoa/NavigationState.h: |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::setNavigationDelegate): |
| (WebKit::NavigationState::NavigationClient::shouldAllowLegacyTLS): |
| |
| 2020-04-29 Chris Dumez <cdumez@apple.com> |
| |
| [iOS][WK2] Temporarily stop using RunningBoard for the foreground process assertion |
| https://bugs.webkit.org/show_bug.cgi?id=211196 |
| <rdar://problem/62535822> |
| |
| Reviewed by Tim Horton. |
| |
| Temporarily stop using RunningBoard for the foreground process assertion. On recent iOS builds, there |
| are issues where this assertion can time out after 30 seconds, even though the process is still |
| foreground. |
| |
| * Configurations/WebKit.xcconfig: |
| * UIProcess/ProcessAssertion.h: |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::runningBoardNameForAssertionType): |
| (WebKit::ProcessAssertion::ProcessAssertion): |
| (WebKit::ProcessAssertion::~ProcessAssertion): |
| |
| 2020-04-29 Youenn Fablet <youenn@apple.com> |
| |
| Set _STAttributionDisplayName to iOS WebContent Info plist |
| https://bugs.webkit.org/show_bug.cgi?id=210772 |
| <rdar://problem/62075201> |
| |
| Reviewed by Eric Carlson. |
| |
| Set _STAttributionDisplayName to 'Website' value. |
| |
| * WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist: |
| |
| 2020-04-29 Kate Cheney <katherine_cheney@apple.com> |
| |
| Refactor layout tests after updates to In-App Browser Privacy |
| https://bugs.webkit.org/show_bug.cgi?id=211146 |
| <rdar://problem/62524127> |
| |
| Reviewed by Brent Fulgham. |
| |
| Tests: http/tests/in-app-browser-privacy/app-bound-domain-gets-app-bound-session.html |
| http/tests/in-app-browser-privacy/non-app-bound-domain-does-not-get-app-bound-session.html |
| |
| Removes setInAppBrowserPrivacyEnabled, which is no longer needed by |
| layout tests. Setting this in TestOptions is enough. |
| getWebViewCategory is not needed because this patch deletes the only test |
| which uses it. Lastly, adds a new function to clear app-bound sessions |
| now that multiple tests are checking for them. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::clearAppBoundSession): |
| (WebKit::NetworkProcess::setInAppBrowserPrivacyEnabled): Deleted. |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/NetworkSession.h: |
| (WebKit::NetworkSession::clearAppBoundSession): |
| (WebKit::NetworkSession::setInAppBrowserPrivacyEnabled): Deleted. |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::appBoundSession): |
| (WebKit::NetworkSessionCocoa::clearAppBoundSession): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreClearAppBoundSession): |
| (WKWebsiteDataStoreSetInAppBrowserPrivacyEnabled): Deleted. |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: |
| (-[WKWebsiteDataStore _getWebViewCategoryFor:completionHandler:]): Deleted. |
| * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::clearAppBoundSession): |
| (WebKit::NetworkProcessProxy::setInAppBrowserPrivacyEnabled): Deleted. |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::clearAppBoundSession): |
| (WebKit::WebsiteDataStore::setInAppBrowserPrivacyEnabled): Deleted. |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| |
| 2020-04-29 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> |
| |
| [GPUP][GTK] compile GPUProcess in GTK port |
| https://bugs.webkit.org/show_bug.cgi?id=208814 |
| |
| Reviewed by Don Olmstead. |
| |
| Enable GPUProcess compilation in WebKitGTK as an experimental |
| feature |
| |
| No new tests required. |
| |
| * GPUProcess/GPUConnectionToWebProcess.cpp: guard |
| UserMediaCaptureManagerProxy for Cocoa platform only. |
| (WebKit::GPUConnectionToWebProcess::dispatchMessage): guard |
| messages from UserMediaCaptureManagerProxy for Cocoa platform, |
| moving up this guard from video track messages. |
| (WebKit::GPUConnectionToWebProcess::mediaKeyStorageDirectory): |
| removed guard for this function of ENCRYPTED_MEDIA leaving only |
| LEGACY_ENCRYPTED_MEDIA, since it's were it is defined. |
| (WebKit::GPUConnectionToWebProcess::setOrientationForMediaCapture): |
| guard the content of this function for Cocoa platform, since it is |
| calling a UserMediaCaptureManagerProxy object. |
| * GPUProcess/GPUProcess.cpp: Replace the included header to match |
| with the used symbols in file. |
| * GPUProcess/gstreamer/GPUProcessGStreamer.cpp: Added. |
| (WebKit::GPUProcess::initializeProcess): Empty function. |
| (WebKit::GPUProcess::initializeProcessName): Empty function. |
| (WebKit::GPUProcess::initializeSandbox): Empty function. |
| * GPUProcess/gstreamer/GPUProcessMainGStreamer.cpp: Added. |
| (WebKit::initializeAuxiliaryProcess<GPUProcess>): New function. |
| (WebKit::GPUProcessMain): New function. |
| * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: changed guard |
| for this file from ENCRYPTED_MEDIA to LEGACY_ENCRYPTED_MEDIA to |
| match with its header file. |
| * GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp: Added. |
| (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): |
| New function that raises noImplemented() |
| (WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable): |
| New function that raises noImplemented() |
| (WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged): |
| New function that raises noImplemented() |
| (WebKit::RemoteMediaPlayerProxy::enterFullscreen): New function |
| that raises noImplemented() |
| (WebKit::RemoteMediaPlayerProxy::exitFullscreen): New function |
| that raises noImplemented() |
| * PlatformGTK.cmake: add Platform/generic header directory. |
| * SourcesGTK.txt: Add the new files and |
| GPUProcess/media/RemoteAudioDestinationManager.cpp |
| * WebProcess/GPU/GPUProcessConnection.cpp: guard |
| UserMediaCaptureManager for Cocoa platform only. |
| (WebKit::GPUProcessConnection::dispatchMessage): guard messages |
| from UserMediaCaptureManager for Cocoa platform, moving up this |
| guard applied also for video track. |
| * WebProcess/GPU/media/RemoteCDM.cpp: include missing header |
| GPUProcessConnection.h |
| * WebProcess/GPU/media/gstreamer/VideoLayerRemoteGStreamer.cpp: Added. |
| (WebKit::createVideoLayerRemote): New function |
| that raises noImplemented() |
| |
| 2020-04-29 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK4] Unreviewed compile-warning fixes |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSetEnableBackForwardNavigationGesture): |
| (webkitWebViewBaseWillSwapWebProcess): |
| |
| 2020-04-29 Rob Buis <rbuis@igalia.com> |
| |
| Make PolicyChecker an inner class of FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=211138 |
| |
| Reviewed by Alex Christensen. |
| |
| Adapt to PolicyChecker::ShouldContinue change. |
| |
| * GPUProcess/media/RemoteMediaResource.cpp: |
| (WebKit::RemoteMediaResource::responseReceived): |
| * GPUProcess/media/RemoteMediaResource.h: |
| * GPUProcess/media/RemoteMediaResourceManager.cpp: |
| (WebKit::RemoteMediaResourceManager::responseReceived): |
| * GPUProcess/media/RemoteMediaResourceManager.h: |
| * GPUProcess/media/RemoteMediaResourceManager.messages.in: |
| * Scripts/webkit/messages.py: |
| * WebProcess/GPU/media/RemoteMediaResourceProxy.cpp: |
| (WebKit::RemoteMediaResourceProxy::responseReceived): |
| * WebProcess/GPU/media/RemoteMediaResourceProxy.h: |
| |
| 2020-04-29 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup() |
| https://bugs.webkit.org/show_bug.cgi?id=170553 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Replace GtkMenuShell with a GtkPopoverMenu for context menus. The former is not available |
| at all in GTK4, and the later allows for simplifying the positioning code: it is enough |
| to provide a point in WebKitWebView widget where to place the popup, and GTK takes care |
| of everything. This removes the custom positioning code (as it is not needed anymore), |
| which did GdkScreen-relative calculations that GTK4 does not support. |
| |
| No new tests needed. |
| |
| * Shared/glib/WebContextMenuItemGlib.h: |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (contextMenuDismissed): Change parameter from GtkMenuShell to GtkMenuShell to GtkWidget. |
| (webkitWebViewPopulateContextMenu): Connect to the GtkPopover::closed signal instead of |
| GtkMenuShell::deactivate. |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (activeContextMenuClosed): Renamed from activeContextMenuUnmapped(), changed parameter |
| from GtkMenuShell to GtkWidget, and compare with WebContextMenuProxyGtk::gtkWidget(). |
| (activeContextMenuUnmapped): Renamed to activeContextMenuClosed(). |
| (webkitWebViewBaseSetActiveContextMenuProxy): Connect to the GtkPopover::closed signal |
| instead of GtkMenuShell::deactivate. |
| (webkitWebViewBaseGetActiveContextMenuProxy): |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Arrange to use GtkPopoverMenu instead of |
| GtkMenuShell. |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::WebContextMenuProxyGtk::populate): |
| (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems): Simplify using |
| m_context.menuLocation() to obtain the location where to make the context menu popup |
| next to, which allows removing the ::menuPositionFunction() callback as well. |
| (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): |
| (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): |
| * UIProcess/gtk/WebContextMenuProxyGtk.h: Remove declarations for ::menuPositionFunction() |
| and ::m_popupPosition, which are now unneeded. |
| (WebKit::WebContextMenuProxyGtk::gtkWidget const): Renamed from ::gtkMenu(), and made it |
| return a GtkWidget. |
| |
| 2020-04-29 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260650. |
| https://bugs.webkit.org/show_bug.cgi?id=211172 |
| |
| It is breaking internal bots (Requested by youenn on #webkit). |
| |
| Reverted changeset: |
| |
| "Call STDynamicActivityAttributionPublisher in the WebProcess" |
| https://bugs.webkit.org/show_bug.cgi?id=210772 |
| https://trac.webkit.org/changeset/260650 |
| |
| 2020-04-29 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: Uncaught Exception: SyntaxError: Unexpected identifier 'E'. Expected either a closing ']' or a ',' following an array element. |
| https://bugs.webkit.org/show_bug.cgi?id=211163 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| * WebProcess/Inspector/WebInspectorUI.cpp: |
| (WebKit::WebInspectorUI::updateFindString): |
| * WebProcess/Inspector/RemoteWebInspectorUI.cpp: |
| (WebKit::RemoteWebInspectorUI::updateFindString): |
| Use the newly exposed `JSON::Value::escapeString` to ensure that the `findString` will not |
| throw a JavaScript exception when placed in the `InspectorFrontendAPI` call. |
| |
| 2020-04-28 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for key events |
| https://bugs.webkit.org/show_bug.cgi?id=211128 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Handle key-pressed and key-released events using a GtkEventControllerKey. To receive key events the widget needs |
| to be focused, so also implement GtkWidgetClass::grab_focus and handle enter and leave focus events. GTK4 needs |
| the widget used by the key bindings translator to be added to a parent to be able to forward key events, so it's |
| now added as a child internal widget of the WebKitWeViewBase. |
| |
| * Shared/gtk/WebEventFactory.cpp: |
| (WebKit::WebEventFactory::createWebKeyboardEvent): |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewChildIsInternalWidget): |
| (webkitWebViewBaseContainerRemove): |
| (webkitWebViewBaseContainerForall): |
| (webkitWebViewBaseFocusEnter): |
| (webkitWebViewBaseFocusLeave): |
| (webkitWebViewBaseKeyPressed): |
| (webkitWebViewBaseKeyReleased): |
| (webkitWebViewBaseGrabFocus): |
| (webkitWebViewBaseConstructed): |
| (webkit_web_view_base_class_init): |
| * UIProcess/gtk/KeyBindingTranslator.cpp: |
| (WebKit::KeyBindingTranslator::KeyBindingTranslator): |
| (WebKit::KeyBindingTranslator::~KeyBindingTranslator): |
| (WebKit::handleCustomKeyBindings): |
| (WebKit::KeyBindingTranslator::commandsForKeyEvent): |
| * UIProcess/gtk/KeyBindingTranslator.h: |
| (WebKit::KeyBindingTranslator::widget const): |
| (WebKit::KeyBindingTranslator::destroyed): |
| |
| 2020-04-28 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Text manipulation] Add a userInfo dictionary to _WKTextManipulationToken |
| https://bugs.webkit.org/show_bug.cgi?id=211151 |
| <rdar://problem/62329534> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (createUserInfo): |
| (-[WKWebView _startTextManipulationsWithConfiguration:completion:]): |
| (-[WKWebView _completeTextManipulation:completion:]): |
| (-[WKWebView _completeTextManipulationForItems:completion:]): |
| * UIProcess/API/Cocoa/_WKTextManipulationToken.h: |
| * UIProcess/API/Cocoa/_WKTextManipulationToken.mm: |
| (-[_WKTextManipulationToken setUserInfo:]): |
| (-[_WKTextManipulationToken userInfo]): |
| |
| Add a new `userInfo` dictionary to `_WKTextManipulationToken`, which contains several named |
| `NSString` keys. |
| |
| (-[_WKTextManipulationToken isEqualToTextManipulationToken:includingContentEquality:]): |
| (-[_WKTextManipulationToken _descriptionPreservingPrivacy:]): |
| |
| 2020-04-28 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r260407): Over-release of NSGraphicsContext in WebKit::convertPlatformImageToBitmap() |
| <https://webkit.org/b/211160> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::convertPlatformImageToBitmap): Use retainPtr() instead |
| of adoptNS() to fix the over-release. |
| |
| 2020-04-28 David Kilzer <ddkilzer@apple.com> |
| |
| IPC::Decoder::isValid() should just be a nullptr check |
| <https://webkit.org/b/211152> |
| <rdar://problem/62552699> |
| |
| Reviewed by Darin Adler. |
| |
| * Platform/IPC/Decoder.h: |
| (IPC::Decoder::isValid const): Change to nullptr check. I |
| reviewed the code in Decoder.{cpp,h}, and I didn't see |
| m_bufferPos being set without a bounds check. Also added |
| WARN_UNUSED_RETURN to make sure the result is always checked. |
| |
| 2020-04-28 Daniel Bates <dabates@apple.com> |
| |
| Move WebPage::textInputContextsInRect() to WebPageIOS.mm |
| https://bugs.webkit.org/show_bug.cgi?id=211136 |
| |
| Reviewed by Eric Carlson. |
| |
| The function WebPage::textInputContextsInRect is very specific to a client on iOS. |
| Although it's tempting to keep this cross-platform because its implementation does |
| not make use of iOS-specific technologies it does a very specific operation, the |
| result of which is a list of contexts to editable elements on the page. The contexts |
| provide enough info for the specific iOS client, but not enough to ever be useful |
| to any other client. Therefore move it to WebPageIOS.mm. |
| |
| Only Mac and iOS were ever using this function. The former only for testing purposes |
| that have since been removed. |
| |
| A side effect of this change is that I also move WebPageProxy::textInputContextsInRect() |
| from WebPageProxy.cpp to WebPageProxyIOS.mm. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::textInputContextsInRect): Deleted; moved to WebPageProxyIOS.mm. |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::textInputContextsInRect): Moved from WebPageProxy.cpp. |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::textInputContextsInRect): Deleted; moved to WebPageIOS.mm. |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::textInputContextsInRect): Moved from WebPage.cpp. |
| |
| 2020-04-28 Chris Dumez <cdumez@apple.com> |
| |
| [iOS][WK2] Drop process assertion logic for holding locked files |
| https://bugs.webkit.org/show_bug.cgi?id=206910 |
| |
| Reviewed by Alex Christensen. |
| |
| Drop process assertion logic for holding locked files as it is causing issues and |
| should no longer be needed. |
| |
| The intention of this code was that the Network Process would send a |
| SetIsHoldingLockedFiles(bool) IPC to the UIProcess whenever there are pending |
| SQLite transactions and the UIProcess would then take a process assertion on behalf |
| of the WebProcess (or release it) to prevent / allow suspension. |
| |
| This approach has some issues: |
| 1. It was noisy in terms of IPC |
| 2. Because it relies on an IPC to the UIProcess to keep running, it was inherently |
| racy |
| 3. We already have logic to deal with suspension in the network / web processes. |
| The UIProcess sends a PrepareForSuspension IPC to its child processes. In turn, |
| those processes will make sure to suspend their database threads to prevent any |
| further database work. The child processes would then respond to the |
| PrepareForSuspension IPC to let the UIProcess know they are ready to suspend. |
| The 2 approaches were conflicting, because after the PrepareForSuspension IPC is |
| sent, the child process could process a transaction and send the |
| SetIsHoldingLockedFiles() IPC to the UIProcess which would incorrectly cancel the |
| suspension. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::NetworkProcess): |
| (WebKit::m_messagePortChannelRegistry): Deleted. |
| * NetworkProcess/NetworkProcess.h: |
| * Shared/WebSQLiteDatabaseTracker.cpp: Removed. |
| * Shared/WebSQLiteDatabaseTracker.h: Removed. |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::didClose): |
| (WebKit::NetworkProcessProxy::didSetAssertionState): |
| (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles): Deleted. |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shutDown): |
| (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Deleted. |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/WebProcessProxy.messages.in: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebProcess.cpp: |
| (WebKit::m_nonVisibleProcessCleanupTimer): |
| (WebKit::m_webSQLiteDatabaseTracker): Deleted. |
| * WebProcess/WebProcess.h: |
| |
| 2020-04-28 Noam Rosenthal <noam@webkit.org> |
| |
| Implement FCP (first contentful paint) |
| https://bugs.webkit.org/show_bug.cgi?id=208499 |
| |
| Reviewed by Simon Fraser. |
| |
| Add an experimental runtime flag for paint-timing (paintTimingEnabled). |
| |
| * Shared/WebPreferences.yaml: |
| * UIProcess/API/C/WKPreferences.cpp: |
| (WKPreferencesSetPaintTimingEnabled): |
| (WKPreferencesGetPaintTimingEnabled): |
| * UIProcess/API/C/WKPreferencesRefPrivate.h: |
| * WebProcess/Storage/WebSWContextManagerConnection.cpp: |
| (WebKit::WebSWContextManagerConnection::updatePreferencesStore): |
| |
| 2020-04-28 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [JSC] Align upon the name isCallable instead of isFunction |
| https://bugs.webkit.org/show_bug.cgi?id=211140 |
| |
| Reviewed by Darin Adler. |
| |
| * WebProcess/Plugins/Netscape/NPJSObject.cpp: |
| (WebKit::NPJSObject::hasMethod): |
| |
| 2020-04-28 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: find dialog does not populate search string from system find pasteboard |
| https://bugs.webkit.org/show_bug.cgi?id=113588 |
| <rdar://problem/19281466> |
| |
| Reviewed by Brian Burg. |
| |
| * UIProcess/Inspector/mac/WKInspectorWKWebView.h: |
| * UIProcess/Inspector/mac/WKInspectorWKWebView.mm: |
| (-[WKInspectorWKWebView dealloc]): Added. |
| (-[WKInspectorWKWebView setInspectorWKWebViewDelegate:]): |
| (-[WKInspectorWKWebView becomeFirstResponder]): Added. |
| (-[WKInspectorWKWebView _handleWindowDidBecomeKey:]): Added. |
| * UIProcess/Inspector/mac/WKInspectorViewController.h: |
| * UIProcess/Inspector/mac/WKInspectorViewController.mm: |
| (-[WKInspectorViewController inspectorWKWebViewDidBecomeActive:]): Added. |
| * UIProcess/Inspector/WebInspectorProxy.h: |
| * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: |
| (-[WKWebInspectorProxyObjCAdapter inspectorViewControllerDidBecomeActive:]): Added. |
| (WebKit::WebInspectorProxy::didBecomeActive): Added. |
| * UIProcess/Inspector/RemoteWebInspectorProxy.h: |
| * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: |
| (-[WKRemoteWebInspectorProxyObjCAdapter inspectorWKWebViewDidBecomeActive:]): Added. |
| (WebKit::RemoteWebInspectorProxy::didBecomeActive): Added. |
| Add a new delegate call chain that notifies the inspector proxy about when the inspector web |
| view becomes active, at which point the inspector proxy can get the current find string and |
| sent it to the inspector page. |
| |
| * WebProcess/Inspector/WebInspectorUI.messages.in: |
| * WebProcess/Inspector/WebInspectorUI.h: |
| * WebProcess/Inspector/WebInspectorUI.cpp: |
| (WebKit::WebInspectorUI::updateFindString): Added. |
| * WebProcess/Inspector/RemoteWebInspectorUI.messages.in: |
| * WebProcess/Inspector/RemoteWebInspectorUI.h: |
| * WebProcess/Inspector/RemoteWebInspectorUI.cpp: |
| (WebKit::RemoteWebInspectorUI::updateFindString): Added. |
| Pass along the new find string to the frontend via `InspectorFrontendAPI.updateFindString`. |
| |
| 2020-04-28 Daniel Bates <dabates@apple.com> |
| |
| Remove unused WebPage::focusTextInputContext() |
| https://bugs.webkit.org/show_bug.cgi?id=211135 |
| |
| Reviewed by Anders Carlsson. |
| |
| I accidentally forgot to remove the WebPage message and WebPage implementation that |
| backed -_focusTextInputContext when I removed it in r260225. Now the implementation |
| is unused. Let's remove it. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::focusTextInputContext): Deleted. |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-28 Christopher Reid <chris.reid@sony.com> |
| |
| [Win] Bundle Inspector Resources in Release builds |
| https://bugs.webkit.org/show_bug.cgi?id=210942 |
| |
| Reviewed by Fujii Hironori. |
| |
| Move CMake logic for the inspector resource copy script to |
| Source/WebInspectorUI so it can be shared with Win and other platforms. |
| |
| * InspectorGResources.cmake: |
| * PlatformWPE.cmake: |
| * PlatformWin.cmake: |
| |
| 2020-04-28 David Kilzer <ddkilzer@apple.com> |
| |
| [MacCatalyst] Add missing symlinks to WebKit.frameworks |
| <https://webkit.org/b/211102> |
| <rdar://problem/62137758> |
| |
| Reviewed by Brent Fulgham. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| (Make Frameworks Symbolic Link): |
| - Update logic to run for macOS and macCatalyst builds. |
| - Add output path. |
| (Check For Inappropriate Objective-C Class Names): |
| - Let Xcode have its way with the project file by adding a |
| newline to the end of the script. |
| (Check For Weak VTables and Externals): Ditto. |
| (Add XPCServices symlink): |
| - Update logic to run for macOS and macCatalyst builds. |
| |
| 2020-04-28 Kate Cheney <katherine_cheney@apple.com> |
| |
| Create a mechanism to add missing ITP Database tables when the schema is updated |
| https://bugs.webkit.org/show_bug.cgi?id=211004 |
| <rdar://problem/62261187> |
| |
| Reviewed by John Wilander. |
| |
| This patch updates the ITP database to better handle added tables to |
| the schema. Currently the database store deletes and re-creates the |
| database when any schema change is encountered. This is simple but |
| would result in ITP data loss during schema updates, so this patch |
| searches the schema for missing tables and adds any it finds. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::createTableQueries): |
| Convert the tables array to a mapping of table names to their |
| respective CREATE TABLE queries so we can add missing tables on the |
| fly. |
| (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase): |
| Remove call to createSchema() from the constructor. It makes more |
| sense to base this on whether the file is new as opposed to whether |
| one table exists. |
| (WebKit::ResourceLoadStatisticsDatabaseStore::checkForMissingTablesInSchema): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::addMissingTablesIfNecessary): |
| Checks for missing tables and adds them using a best-effort approach. |
| Call createUniqueIndices() to call all CREATE UNIQUE INDEX queries, |
| even though we may not need them all. It is much simpler than to |
| associate each query with its table, and it doesn't hurt to call |
| again. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary): |
| Add missing tables instead of deleting the old database file. Changed |
| the function name to reflect this. Deleted a FIXME which this patch |
| addresses but added a new FIXME for migrating data when adding new |
| columns, which this patch does not address. |
| (WebKit::ResourceLoadStatisticsDatabaseStore::isCorrectTableSchema): Deleted. |
| (WebKit::ResourceLoadStatisticsDatabaseStore::openAndDropOldDatabaseIfNecessary): Deleted. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::statisticsDatabaseHasAllTables): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::statisticsDatabaseHasAllTables): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: |
| (-[WKWebsiteDataStore _statisticsDatabaseHasAllTables:]): |
| * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::statisticsDatabaseHasAllTables): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::statisticsDatabaseHasAllTables): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| Added an SPI call to test that the database schema includes all |
| tables. This tests the database is not dropped when a new |
| table is added upon opening the database. |
| |
| 2020-04-28 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] Global preferences are not accessible in the WebContent process when CFPrefs direct mode is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=211075 |
| <rdar://problem/61866711> |
| |
| Reviewed by Brent Fulgham. |
| |
| Global preferences in the domain 'kCFPreferencesAnyApplication' are not readable in the WebContent process when CFPrefs direct mode |
| is enabled. Fix this by transferring a select set of global preferences to the WebContent process on startup. |
| |
| API test: WebKit.GlobalPreferences |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::setGlobalPreferences): |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-28 Peng Liu <peng.liu6@apple.com> |
| |
| Remove the WebKit.plist for Feature Flags |
| https://bugs.webkit.org/show_bug.cgi?id=210534 |
| |
| Unreviewed project file clean-up. |
| |
| A follow-up patch for r260599. Remove the reference to the WebKit.plist from project.pbxproj. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-04-28 Alex Christensen <achristensen@webkit.org> |
| |
| Fix iOS API tests after r260790 |
| https://bugs.webkit.org/show_bug.cgi?id=211093 |
| |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::sendMessage): |
| Only call the completion handler once. |
| |
| 2020-04-28 Jer Noble <jer.noble@apple.com> |
| |
| [Mac] Adopt kMTSupportNotification_ShouldPlayHDRVideoChanged notification |
| https://bugs.webkit.org/show_bug.cgi?id=211028 |
| |
| Reviewed by Eric Carlson. |
| |
| Adopt a new notification which signals that the receiver should re-query for HDR support. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::webProcessPoolHighDynamicRangeDidChangeCallback): |
| (WebKit::WebProcessPool::registerHighDynamicRangeChangeCallback): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::registerHighDynamicRangeChangeCallback): |
| (WebKit::WebProcessPool::initializeNewWebProcess): |
| * UIProcess/WebProcessPool.h: |
| |
| 2020-04-28 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK] Unreviewed build fix for Clang 10 |
| |
| * UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp: |
| (webkitInputMethodContextImplGtkGetPreedit): Use the "f" suffix to make constants float to |
| prevent a narrowing double-to-float narrowing issue which Clang 10 considers an error. This |
| only happens with GTK4 because GdkRGBA now has float members. Using float constants is fine |
| with GTK3, because promoting floats to doubles never loses precision. |
| |
| 2020-04-28 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Marked text editor state only needs to be set when layout is up-to-date |
| https://bugs.webkit.org/show_bug.cgi?id=211087 |
| |
| Reviewed by Darin Adler. |
| |
| Organize the code to reflect reality: editor state only has marked text rects if layout is |
| up-to-date. So, move these fields to from EditorState to EditorState::PostLayoutData. |
| |
| While I am in this area of the code I also moved the editor state originIdentifierForPasteboard |
| to the top of the struct as it is aesthetically more pleasing to me to have the post layout |
| data last. It likely also produces better bit packing though this wasn't my primary motivation. |
| |
| * Shared/EditorState.cpp: |
| (WebKit::EditorState::encode const): |
| (WebKit::EditorState::decode): |
| (WebKit::EditorState::PostLayoutData::encode const): |
| (WebKit::EditorState::PostLayoutData::decode): |
| Move encoding and decoding of marked test fields from EditorState to EditorState::PostLayoutData. |
| |
| (WebKit::operator<<): Fix up code now that marked text fields are in PostLayoutData. |
| * Shared/EditorState.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView textFirstRect]): Update code now that this data is in the post layout data struct. |
| (-[WKContentView textLastRect]): Ditto. |
| (-[WKContentView _updateChangedSelection:]): Ditto. |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::convertContentToRootViewSelectionRects): Added. |
| (WebKit::WebPage::getPlatformEditorState const): Update now that marked text fields are in the |
| post layout data struct. Simplify the early return as well: only continue if we're not missing post |
| layout data. If we're missing post layout data then we either do not have a frame view or layout is |
| not up-to-data. Either way we don't want to do anything. I also stored the FrameView in a Ref<> to |
| future proof the code should future code cause view detachment and destruction. Note that layout |
| could cause this, but the code currently covers this case. So, taking a Ref<> is about future proofing. |
| (WebKit::WebPage::getRectsForGranularityWithSelectionOffset): Update to use convertContentToRootViewSelectionRects(). |
| (WebKit::WebPage::getRectsAtSelectionOffsetWithText): Ditto. |
| (WebKit::WebPage::requestAutocorrectionData): Use Vector::map() to convert the selection rects to |
| from content to root view FloatRects. |
| (WebKit::WebPage::convertSelectionRectsToRootView): Deleted. |
| |
| 2020-04-28 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Fix sandbox violation when uploading a file |
| https://bugs.webkit.org/show_bug.cgi?id=210937 |
| |
| Reviewed by Darin Adler. |
| |
| On iOS, the file chooser needs access to frontboard and icon services in the WebContent process. Create and |
| consume extensions for these services when choosing files. When done, the extensions should be revoked. This |
| patch also fixes an out-of-bounds array exception when running the test created for this patch. Additionally, |
| the function thumbnailSizedImageForImage should return a RetainPtr<UIImage>, since it seems unsafe to not |
| retain the UIImage after the image context is released in that function. |
| |
| Test: fast/forms/file/open-file-panel-crash.html |
| |
| * Shared/ios/WebIconUtilities.h: |
| * Shared/ios/WebIconUtilities.mm: |
| (WebKit::thumbnailSizedImageForImage): |
| (WebKit::fallbackIconForFile): |
| (WebKit::iconForImageFile): |
| (WebKit::iconForVideoFile): |
| (WebKit::iconForFile): |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/ios/forms/WKFileUploadPanel.mm: |
| (-[_WKFileUploadItem displayImage]): |
| (-[_WKImageFileUploadItem displayImage]): |
| (-[_WKVideoFileUploadItem displayImage]): |
| (-[WKFileUploadPanel documentPicker:didPickDocumentsAtURLs:]): |
| (-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]): |
| (-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]): |
| * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: |
| (WebKit::WebChromeClient::createIconForFiles): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for motion events |
| https://bugs.webkit.org/show_bug.cgi?id=211073 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Handle enter, leave and motion events using a GtkEventControllerMotion. |
| |
| * Shared/NativeWebMouseEvent.h: |
| * Shared/gtk/NativeWebMouseEventGtk.cpp: |
| (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): |
| * Shared/gtk/WebEventFactory.cpp: |
| (WebKit::WebEventFactory::createWebMouseEvent): |
| * Shared/gtk/WebEventFactory.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseEnter): |
| (webkitWebViewBaseMotion): |
| (webkitWebViewBaseLeave): |
| (webkitWebViewBaseConstructed): |
| |
| 2020-04-28 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes late April 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=211099 |
| |
| Unreviewed build fix. |
| |
| * NetworkProcess/NetworkLoad.cpp: Add mising WebCoreArgumentCoders.h header. |
| * WebProcess/Automation/WebAutomationDOMWindowObserver.cpp: |
| (WebKit::WebAutomationDOMWindowObserver::WebAutomationDOMWindowObserver): Add namespace to |
| WebCore::DOMWindow usage. |
| |
| 2020-04-26 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for scroll events |
| https://bugs.webkit.org/show_bug.cgi?id=211045 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use an event controller to connect to scroll signal and get the GdkEvent. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseHandleWheelEvent): |
| (webkitWebViewBaseScroll): |
| (webkitWebViewBaseConstructed): |
| |
| 2020-04-28 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4][Wayland] Add support for rendering web view contents |
| https://bugs.webkit.org/show_bug.cgi?id=211021 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Implement GtkWidgetClass::snapshot and GtkWidgetClass::measure instead of GtkWidgetClass::draw and |
| GtkWidgetClass::get_preferred_width|height. Add AcceleratedBackingStore::snapshot() pure virtual to be used with |
| GTK4 instead of AcceleratedBackingStore::paint(), and implement it for Wayland. |
| |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (webkitWebViewBaseSnapshot): Call AcceleratedBackingStore::snapshot(). |
| (webkitWebViewBaseMeasure): Return the natural width/height for the WebView. |
| (webkit_web_view_base_class_init): Add implementations for snapshot and measure vfuncs. |
| * UIProcess/gtk/AcceleratedBackingStore.h: |
| * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: |
| (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): Always try to realize the context here, since that |
| can fail too. |
| (WebKit::AcceleratedBackingStoreWayland::tryEnsureTexture): Helper to share the code to prepare the texture. |
| (WebKit::AcceleratedBackingStoreWayland::downloadTexture): Helper to share the code to download the texture. |
| (WebKit::AcceleratedBackingStoreWayland::snapshot): Use gtk_snapshot_append_texture(). |
| (WebKit::AcceleratedBackingStoreWayland::paint): Use new helpers. |
| * UIProcess/gtk/AcceleratedBackingStoreWayland.h: |
| * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: |
| (WebKit::AcceleratedBackingStoreX11::snapshot): |
| * UIProcess/gtk/AcceleratedBackingStoreX11.h: |
| * UIProcess/gtk/HardwareAccelerationManager.cpp: |
| (WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Force accelerated compositing mode for GTK4. |
| |
| 2020-04-27 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: Storage: can see third-party cookies |
| https://bugs.webkit.org/show_bug.cgi?id=211092 |
| <rdar://problem/62469078> |
| |
| Reviewed by Chris Dumez. |
| |
| Test: http/tests/inspector/page/get-cookies.html |
| |
| After r259649, Web Inspector no longer incorrectly bails when attempting to get cookies if |
| the last resource loaded by a given frame does not have cookie access. We also need to check |
| whether the resource we're attempting to get cookies for is first-party or third-party so as |
| to reflect the current cookie policy. |
| |
| * WebProcess/WebPage/WebCookieJar.cpp: |
| (WebKit::shouldBlockCookies): |
| |
| 2020-04-27 Brent Fulgham <bfulgham@apple.com> |
| |
| Follow-up change after r260798. |
| |
| Allow iOS to consume the 'com.apple.cfprefsd.agent' endpoint if issued by the UIProcess. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-27 Brent Fulgham <bfulgham@apple.com> |
| |
| [MacCatalyst] Dynamic access to accessibility services is incomplete |
| https://bugs.webkit.org/show_bug.cgi?id=211100 |
| <rdar://problem/62133491> |
| |
| Reviewed by Darin Adler. |
| |
| Testing of MacCatalyst-based apps shows that using dynamic sandbox extensions to support accessibility |
| features is incomplete. In addition to the 'com.apple.cfprefsd.daemon' process needed on macOS and iOS, |
| we also need access to 'com.apple.cfprefsd.agent'. |
| |
| This can only be tested manually in a MacCatlyst build, though existing accessibility tests will |
| confirm no regressions in iOS and macOS. |
| |
| The changes are as follows: |
| 1. Change WebProcessCreationParameters::preferencesExtensionHandle to a handle array. |
| 2. Register (and unregister) for the accessibility enabled notification in MacCatalyst. |
| 3. Open a connection 'com.apple.cfprefsd.agent' (in addition to the existing 'com.apple.cfprefsd.daemon') |
| in MacCatalyst builds. |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| (WebKit::WebProcessPool::registerNotificationObservers): |
| (WebKit::WebProcessPool::unregisterNotificationObservers): |
| * UIProcess/Cocoa/WebProcessProxyCocoa.mm: |
| (WebKit::WebProcessProxy::unblockPreferenceServiceIfNeeded): |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| (WebKit::WebProcess::unblockPreferenceService): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-04-27 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Prevent WebPasteboardProxy IPC messages from unconditionally requesting pasteboard types |
| https://bugs.webkit.org/show_bug.cgi?id=211061 |
| <rdar://problem/62088185> |
| |
| Reviewed by Tim Horton. |
| |
| Tighten IPC message handling in WebPasteboardProxy, such that a web content process is unable to arbitrarily |
| request pasteboard types (and other metadata that depends on pasteboard types, such as the number of files |
| on the pasteboard). |
| |
| This extends the mechanisms added in r259151 by distinguishing between allowing the web process to request |
| type information from the pasteboard, and allowing the web process to request both types and data. In the |
| case of drag and drop, the former is required by the web process from the moment the drag session enters |
| the platform web view; however, the latter is required only after a drop is performed. |
| |
| We utilize this new check, `canAccessPasteboardTypes`, in seven existing IPC message handlers that either |
| directly return the list of types, or return metadata from which pasteboard types may be deduced. |
| |
| See below for more details; covered by existing API and layout tests. |
| |
| * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: |
| (WebKit::WebPasteboardProxy::grantAccessToCurrentTypes): |
| (WebKit::WebPasteboardProxy::grantAccessToCurrentData): |
| |
| Split the pasteboard access check into two helpers: one to determine whether the web process is allowed to |
| request pasteboard types, and another to determine whether the web process is allowed to request pasteboard |
| data (in addition to types). |
| |
| (WebKit::WebPasteboardProxy::grantAccess): |
| (WebKit::WebPasteboardProxy::revokeAccess): |
| |
| Refactor these to use `PasteboardAccessInformation`; see below for more details. |
| |
| (WebKit::WebPasteboardProxy::canAccessPasteboardTypes const): |
| |
| Return true as long as the accessType is nonnull; this is because either `Types` or `TypesAndData` is |
| sufficient for access to pasteboard types. |
| |
| (WebKit::WebPasteboardProxy::canAccessPasteboardData const): |
| (WebKit::WebPasteboardProxy::accessType const): |
| |
| Add a private helper method to return the access type (`nullopt` for no access, `PasteboardAccessType::Types` |
| for access to types only, and `PasteboardAccessType::TypesAndData` for access to data in addition to types) |
| for the given named pasteboard. |
| |
| (WebKit::WebPasteboardProxy::didModifyContentsOfPasteboard): |
| |
| Refactor this to use `PasteboardAccessInformation`. |
| |
| (WebKit::WebPasteboardProxy::getPasteboardTypes): |
| (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): |
| |
| Adopt canAccessPasteboardTypes here, and update the FIXME to state that we should really be using |
| canAccessPasteboardData instead. This is blocked on refactoring some more drag and drop code, such |
| that accessing the list of file names on the pasteboard isn't necessary before the drop is handled. |
| |
| (WebKit::WebPasteboardProxy::containsURLStringSuitableForLoading): |
| (WebKit::WebPasteboardProxy::getNumberOfFiles): |
| (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite): |
| (WebKit::WebPasteboardProxy::allPasteboardItemInfo): |
| (WebKit::WebPasteboardProxy::informationForItemAtIndex): |
| (WebKit::WebPasteboardProxy::getPasteboardItemsCount): |
| (WebKit::WebPasteboardProxy::containsStringSafeForDOMToReadForType): |
| |
| Adopt the canAccessPasteboardTypes check in various places. |
| |
| (WebKit::WebPasteboardProxy::PasteboardAccessInformation::grantAccess): |
| (WebKit::WebPasteboardProxy::PasteboardAccessInformation::revokeAccess): |
| (WebKit::WebPasteboardProxy::PasteboardAccessInformation::accessType const): |
| |
| Introduce PasteboardAccessInformation, which replaces the current `std::pair<uint64_t, WeakHashSet<WebProcessProxy>>` |
| that is used to represent which web processes are allowed to access certain changeCounts, for a given pasteboard name. |
| Instead of maintaining a changeCount and set of processes, we now maintain a changeCount and list of (process, access |
| type) pairs. Each item in this list tracks whether the process that has been granted access should be allowed to read |
| only pasteboard types, or both types and data. |
| |
| (WebKit::WebPasteboardProxy::revokeAccessToAllData): Deleted. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::dragEntered): |
| (WebKit::WebPageProxy::dragUpdated): |
| |
| When updating the drag session (i.e. as the user drags over the web view), ensure that the web content |
| process is able to request pasteboard types. |
| |
| * UIProcess/WebPasteboardProxy.cpp: |
| (WebKit::WebPasteboardProxy::allPasteboardItemInfo): |
| (WebKit::WebPasteboardProxy::informationForItemAtIndex): |
| (WebKit::WebPasteboardProxy::getPasteboardItemsCount): |
| (WebKit::WebPasteboardProxy::containsStringSafeForDOMToReadForType): |
| (WebKit::WebPasteboardProxy::containsURLStringSuitableForLoading): |
| |
| Update these method signatures. |
| |
| * UIProcess/WebPasteboardProxy.h: |
| * UIProcess/WebPasteboardProxy.messages.in: |
| |
| Mark more IPC messages as `WantsConnection` so that we can use the `IPC::Connection` argument in the message handlers. |
| |
| 2020-04-27 Alex Christensen <achristensen@webkit.org> |
| |
| Stop waiting for a BinarySemaphore on the main thread in the NetworkProcess |
| https://bugs.webkit.org/show_bug.cgi?id=211080 |
| <rdar://problem/62377357> |
| |
| Reviewed by Darin Adler and Chris Dumez. |
| |
| There was an out-of-date comment suggesting we needed to use a semaphore, but we've since added these in the destructor: |
| RELEASE_ASSERT(!m_statisticsStore); |
| RELEASE_ASSERT(!m_persistentStorage); |
| This indicates that flushAndDestroyPersistentStore is called before the destructor, at which time it is safe to add a reference to keep it alive. |
| WebResourceLoadStatisticsStore is also marked as WTF::DestructionThread::Main so this should do everything we need. |
| We also flush these databases to disk before closing like we did cookies. |
| |
| In order to keep tests working as they are, I needed to make recreateResourceLoadStatisticStore have a CompletionHandler and have all |
| WebResourceLoadStatisticsStores share the same queue to serialize background tasks between WebResourceLoadStatisticsStores with and without database stores |
| sequentially to avoid opening a SQLiteDatabase before the previous WebResourceLoadStatisticsStore had closed it. |
| |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::sharedStatisticsQueue): |
| (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): |
| (WebKit::WebResourceLoadStatisticsStore::didDestroyNetworkSession): |
| (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore): |
| (WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate): Deleted. |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::didClose): |
| * NetworkProcess/NetworkSession.cpp: |
| (WebKit::NetworkSession::~NetworkSession): |
| (WebKit::NetworkSession::destroyResourceLoadStatistics): |
| (WebKit::NetworkSession::setResourceLoadStatisticsEnabled): |
| (WebKit::NetworkSession::recreateResourceLoadStatisticStore): |
| * NetworkProcess/NetworkSession.h: |
| |
| 2020-04-27 Alex Christensen <achristensen@webkit.org> |
| |
| Fix tests after r260764 |
| https://bugs.webkit.org/show_bug.cgi?id=211093 |
| |
| Some tests were asserting in takeAsyncReplyHandler. |
| Calling addAsyncReplyHandler before sending the message fixes it. |
| |
| * UIProcess/AuxiliaryProcessProxy.cpp: |
| (WebKit::AuxiliaryProcessProxy::sendMessage): |
| |
| 2020-04-27 Chris Dumez <cdumez@apple.com> |
| |
| [iOS][WK2] Drop "com.apple.WebKit.DatabaseActivity" UIKit background activity |
| https://bugs.webkit.org/show_bug.cgi?id=211084 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Drop "com.apple.WebKit.DatabaseActivity" UIKit background activity in the UIProcess now that local storage |
| has been moved to the network process. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _initializeWithConfiguration:]): |
| (-[WKWebView _setUpSQLiteDatabaseTrackerClient]): Deleted. |
| |
| 2020-04-27 Ryan Haddad <ryanhaddad@apple.com> |
| |
| [Cocoa] stop using out arguments for document attributes when converting to attributed strings |
| https://bugs.webkit.org/show_bug.cgi?id=211048 |
| |
| Unreviewed partial revert of r260739 to remove unexpected logging that broke Catalina-Release-WK2-Perf tests. |
| |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::updateTaskWithFirstPartyForSameSiteCookies): |
| |
| 2020-04-27 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r219050): Remove more code only needed for building with OS X Yosemite |
| <https://webkit.org/b/211088> |
| <rdar://problem/62452487> |
| |
| Reviewed by Chris Dumez. |
| |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::Connection::receiveSourceEventHandler): |
| * Platform/mac/MachUtilities.cpp: |
| (setMachPortQueueLength): |
| (machExceptionPort): Deleted. |
| (setMachExceptionPort): Deleted. |
| * Platform/mac/MachUtilities.h: |
| - Delete unused code. |
| |
| 2020-04-27 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] After r258891, r255119 can be reverted |
| https://bugs.webkit.org/show_bug.cgi?id=211083 |
| |
| Unreviewed revert of r255119. |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-27 Brent Fulgham <bfulgham@apple.com> |
| |
| Unreviewed MacCatalyst build fix after r260739. |
| |
| * UIProcess/Cocoa/TextCheckingController.mm: |
| (WebKit::TextCheckingController::replaceRelativeToSelection): |
| * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: |
| |
| 2020-04-27 Darin Adler <darin@apple.com> |
| |
| Another try at fixing the ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING) build |
| |
| * UIProcess/Cocoa/TextCheckingController.mm: |
| (WebKit::TextCheckingController::replaceRelativeToSelection): |
| Convert an NSAttributedString to a WebCore::AttributedString using |
| argument list syntax. |
| |
| 2020-04-27 Alex Christensen <achristensen@webkit.org> |
| |
| Fix assertion after r260709 |
| https://bugs.webkit.org/show_bug.cgi?id=211007 |
| <rdar://problem/62457303> |
| |
| * WebProcess/Plugins/PluginView.cpp: |
| (WebKit::PluginView::performJavaScriptURLRequest): |
| Not only did I spell javascript wrong, I should've used the special protocolIsJavaScript() method. |
| |
| 2020-04-27 Alex Christensen <achristensen@webkit.org> |
| |
| Reduce use of WebPageProxy::VoidCallback |
| https://bugs.webkit.org/show_bug.cgi?id=210944 |
| |
| Reviewed by Darin Adler. |
| |
| Use sendWithAsyncReply and CompletionHandler<void()> instead. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _executeEditCommand:argument:completion:]): |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::becomeFirstResponder): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::setInitialFocus): |
| (WebKit::WebPageProxy::executeEditCommand): |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::focusNextFocusedElement): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView pasteWithCompletionHandler:]): |
| (-[WKContentView moveByOffset:]): |
| (-[WKContentView _selectPositionAtPoint:stayingWithinFocusedElement:completionHandler:]): |
| (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]): |
| (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]): |
| (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]): |
| (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): |
| (-[WKContentView accessoryTab:]): |
| (-[WKContentView executeEditCommandWithCallback:]): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::selectTextWithGranularityAtPoint): |
| (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection): |
| (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection): |
| (WebKit::WebPageProxy::selectPositionAtPoint): |
| (WebKit::WebPageProxy::moveSelectionByOffset): |
| (WebKit::WebPageProxy::focusNextFocusedElement): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::executeEditCommandWithCallback): |
| (WebKit::WebPage::setInitialFocus): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::moveSelectionByOffset): |
| (WebKit::WebPage::selectPositionAtPoint): |
| (WebKit::WebPage::selectPositionAtBoundaryWithDirection): |
| (WebKit::WebPage::moveSelectionAtBoundaryWithDirection): |
| (WebKit::WebPage::selectTextWithGranularityAtPoint): |
| (WebKit::WebPage::focusNextFocusedElement): |
| |
| 2020-04-27 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed sandbox compile fix. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-27 Philippe Normand <pnormand@igalia.com> |
| |
| [GTK] ENABLE(OPENGL) remmants... |
| https://bugs.webkit.org/show_bug.cgi?id=211077 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| ENABLE(OPENGL) was renamed to ENABLE(GRAPHICS_CONTEXT_GL) in |
| r254064 but not in all the code base... |
| |
| * UIProcess/gtk/HardwareAccelerationManager.cpp: |
| (WebKit::HardwareAccelerationManager::HardwareAccelerationManager): |
| |
| 2020-04-27 Daniel Bates <dabates@apple.com> |
| |
| Caret may be placed in the wrong spot for text input context that is a form control |
| https://bugs.webkit.org/show_bug.cgi?id=210939 |
| <rdar://problem/61943089> |
| |
| Reviewed by Darin Adler. |
| |
| Find the closest editable position in the element for the point using the |
| newly introduced closestEditablePositionInElementForAbsolutePoint(). |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::focusTextInputContextAndPlaceCaret): |
| |
| 2020-04-27 Darin Adler <darin@apple.com> |
| |
| Fix ENABLE(PLATFORM_DRIVEN_TEXT_CHECKING) build |
| |
| * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h: |
| Change "class AttributedString" to "struct AttributedString". |
| |
| 2020-04-27 Philippe Normand <pnormand@igalia.com> |
| |
| [WPE] about:gpu page is incomplete |
| https://bugs.webkit.org/show_bug.cgi?id=211076 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| ENABLE(OPENGL) was renamed to ENABLE(GRAPHICS_CONTEXT_GL) in |
| r254064 but not in all the code base... |
| |
| * UIProcess/API/glib/WebKitProtocolHandler.cpp: |
| (WebKit::WebKitProtocolHandler::handleGPU): |
| |
| 2020-04-26 Darin Adler <darin@apple.com> |
| |
| Replace more uses of live ranges with SimpleRange |
| https://bugs.webkit.org/show_bug.cgi?id=211058 |
| |
| Reviewed by Antti Koivisto. |
| |
| * Shared/API/Cocoa/WKDataDetectorTypesInternal.h: |
| (fromWKDataDetectorTypes): Updated since DataDetectorTypes |
| is now an enum class. Also got rid of special "none" and "all" values. |
| |
| * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: |
| (-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]): Updated |
| since DataDetection now takes a SimpleRange. |
| |
| * WebProcess/WebPage/ViewGestureGeometryCollector.cpp: |
| (WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales): |
| Use SimpleRange. |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::detectDataInAllFrames): Ditto. |
| |
| * WebProcess/WebPage/WebPage.h: Removed unneeded include of DataDetection.h. |
| |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::performImmediateActionHitTestAtLocation): Use SimpleRange. |
| |
| 2020-04-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make it possible to build with GTK4 without errors |
| https://bugs.webkit.org/show_bug.cgi?id=210967 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add ifdefs when needed to make it possible to complete a build with GTK4. This way we can continue working on |
| every feature individually and checking it actually works. Move public headers containing API specific to GTK3 |
| and GTK4 into their own gtk3 and gtk4 directory. |
| |
| * PlatformGTK.cmake: |
| * Shared/API/glib/WebKitContextMenuItem.cpp: |
| * Shared/NativeWebKeyboardEvent.h: |
| * Shared/NativeWebMouseEvent.h: |
| * Shared/NativeWebWheelEvent.h: |
| * Shared/glib/WebContextMenuItemGlib.cpp: |
| (WebKit::WebContextMenuItemGlib::WebContextMenuItemGlib): |
| (WebKit::WebContextMenuItemGlib::buildActionName const): |
| (WebKit::WebContextMenuItemGlib::createActionIfNeeded): |
| * Shared/glib/WebContextMenuItemGlib.h: |
| * Shared/gtk/NativeWebKeyboardEventGtk.cpp: |
| * Shared/gtk/NativeWebMouseEventGtk.cpp: |
| (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): |
| * Shared/gtk/NativeWebTouchEventGtk.cpp: |
| (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): |
| * Shared/gtk/NativeWebWheelEventGtk.cpp: |
| * Shared/gtk/WebEventFactory.cpp: |
| (WebKit::buttonForEvent): |
| (WebKit::WebEventFactory::createWebMouseEvent): |
| (WebKit::WebEventFactory::createWebKeyboardEvent): |
| (WebKit::WebEventFactory::createWebTouchEvent): |
| * Shared/gtk/WebEventFactory.h: |
| * SourcesGTK.txt: |
| * UIProcess/API/C/WKNativeEvent.h: |
| * UIProcess/API/glib/InputMethodFilter.cpp: |
| (WebKit::InputMethodFilter::filterKeyEvent): |
| * UIProcess/API/glib/InputMethodFilter.h: |
| * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: |
| (createGstInstallPluginsContext): |
| * UIProcess/API/glib/WebKitPrivate.cpp: |
| * UIProcess/API/glib/WebKitUIClient.cpp: |
| (UIClient::setWindowFrameTimerFired): |
| * UIProcess/API/glib/WebKitWebContext.cpp: |
| (webkitWebContextGetProperty): |
| (webkitWebContextSetProperty): |
| (webkit_web_context_class_init): |
| * UIProcess/API/glib/WebKitWebView.cpp: |
| (webkitWebViewRunAsModal): |
| (webkitWebViewPopulateContextMenu): |
| * UIProcess/API/gtk/InputMethodFilterGtk.cpp: |
| (WebKit::InputMethodFilter::platformEventKeyIsKeyPress const): |
| * UIProcess/API/gtk/PageClientImpl.cpp: |
| (WebKit::PageClientImpl::setViewNeedsDisplay): |
| (WebKit::PageClientImpl::setCursor): |
| (WebKit::PageClientImpl::doneWithKeyEvent): |
| (WebKit::PageClientImpl::createPopupMenuProxy): |
| (WebKit::PageClientImpl::createDataListSuggestionsDropdown): |
| (WebKit::PageClientImpl::startDrag): |
| (WebKit::PageClientImpl::doneWithTouchEvent): |
| (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore): |
| * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: |
| * UIProcess/API/gtk/WebKitAuthenticationDialog.h: |
| * UIProcess/API/gtk/WebKitEmojiChooser.cpp: |
| * UIProcess/API/gtk/WebKitEmojiChooser.h: |
| * UIProcess/API/gtk/WebKitInputMethodContextGtk.cpp: |
| (webkit_input_method_context_filter_key_event): |
| * UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp: |
| (webkitInputMethodContextImplGtkFilterKeyEvent): |
| (webkitInputMethodContextImplGtkSetClientWindow): |
| * UIProcess/API/gtk/WebKitPopupMenu.cpp: |
| (WebKit::WebKitPopupMenu::WebKitPopupMenu): |
| (WebKit::WebKitPopupMenu::showPopupMenu): |
| (WebKit::WebKitPopupMenu::hidePopupMenu): |
| (WebKit::WebKitPopupMenu::cancelTracking): |
| * UIProcess/API/gtk/WebKitPopupMenu.h: |
| * UIProcess/API/gtk/WebKitPrintOperation.cpp: |
| * UIProcess/API/gtk/WebKitScriptDialogGtk.cpp: |
| (webkitScriptDialogAccept): |
| (webkitScriptDialogDismiss): |
| (webkitScriptDialogSetUserInput): |
| * UIProcess/API/gtk/WebKitScriptDialogImpl.cpp: |
| * UIProcess/API/gtk/WebKitScriptDialogImpl.h: |
| * UIProcess/API/gtk/WebKitWebViewBase.cpp: |
| (ClickCounter::currentClickCountForGdkButtonEvent): |
| (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate): |
| (webkitWebViewBaseSetToplevelOnScreenWindow): |
| (webkitWebViewBaseRealize): |
| (webkitWebViewBaseContainerForall): |
| (webkitWebViewBaseDispose): |
| (webkitWebViewBaseConstructed): |
| (webkitWebViewBaseSizeAllocate): |
| (webkitWebViewBaseKeyPressEvent): |
| (webkitWebViewBaseKeyReleaseEvent): |
| (webkitWebViewBaseSetEnableBackForwardNavigationGesture): |
| (webkitWebViewBaseBeginBackSwipeForTesting): |
| (webkitWebViewBaseCompleteBackSwipeForTesting): |
| (webkit_web_view_base_class_init): |
| (webkitWebViewBaseWillSwapWebProcess): |
| (webkitWebViewBaseDidExitWebProcess): |
| (webkitWebViewBaseDidRelaunchWebProcess): |
| (webkitWebViewBaseTakeViewSnapshot): |
| (webkitWebViewBaseDidStartProvisionalLoadForMainFrame): |
| (webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame): |
| (webkitWebViewBaseDidFinishLoadForMainFrame): |
| (webkitWebViewBaseDidFailLoadForMainFrame): |
| (webkitWebViewBaseDidSameDocumentNavigationForMainFrame): |
| (webkitWebViewBaseDidRestoreScrollPosition): |
| (webkitWebViewBaseShowEmojiChooser): |
| (webkitWebViewBaseRequestPointerLock): |
| (webkitWebViewBaseDidLosePointerLock): |
| (webkitWebViewBaseSynthesizeCompositionKeyPress): |
| * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: |
| * UIProcess/API/gtk/WebKitWebViewDialog.cpp: |
| * UIProcess/API/gtk/WebKitWebViewDialog.h: |
| * UIProcess/API/gtk/WebKitWebViewGtk.cpp: |
| (webkitWebViewAuthenticate): |
| (webkitWebViewScriptDialog): |
| (webkitWebViewRunFileChooser): |
| (webkitWebViewMaximizeWindow): |
| (webkitWebViewMinimizeWindow): |
| (webkitWebViewRestoreWindow): |
| * UIProcess/API/gtk3/WebKitContextMenuItem.h: Copied from Source/WebKit/UIProcess/API/gtk/WebKitContextMenuItem.h. |
| * UIProcess/API/gtk3/WebKitInputMethodContext.h: Copied from Source/WebKit/UIProcess/API/gtk/WebKitInputMethodContext.h. |
| * UIProcess/API/gtk4/WebKitContextMenuItem.h: Renamed from Source/WebKit/UIProcess/API/gtk/WebKitContextMenuItem.h. |
| * UIProcess/API/gtk4/WebKitInputMethodContext.h: Renamed from Source/WebKit/UIProcess/API/gtk/WebKitInputMethodContext.h. |
| * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: |
| (WebKit::WebAutomationSession::platformSimulateMouseInteraction): |
| (WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): |
| (WebKit::WebAutomationSession::platformSimulateKeySequence): |
| * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: |
| (WebKit::RemoteWebInspectorProxy::platformSave): |
| * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: |
| (WebKit::WebInspectorProxy::platformSave): |
| * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: |
| (webkit_inspector_window_init): |
| (webkitInspectorWindowNew): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * UIProcess/cairo/BackingStoreCairo.cpp: |
| (WebKit::BackingStore::createBackend): |
| * UIProcess/glib/WebProcessPoolGLib.cpp: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: |
| (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): |
| (WebKit::AcceleratedBackingStoreWayland::paint): |
| * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: |
| (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11): |
| (WebKit::AcceleratedBackingStoreX11::update): |
| * UIProcess/gtk/DragAndDropHandler.cpp: |
| * UIProcess/gtk/DragAndDropHandler.h: |
| * UIProcess/gtk/GestureController.cpp: |
| * UIProcess/gtk/GestureController.h: |
| * UIProcess/gtk/KeyBindingTranslator.cpp: |
| (WebKit::KeyBindingTranslator::KeyBindingTranslator): |
| (WebKit::KeyBindingTranslator::commandsForKeyEvent): |
| * UIProcess/gtk/KeyBindingTranslator.h: |
| * UIProcess/gtk/PointerLockManager.cpp: |
| (WebKit::PointerLockManager::lock): |
| (WebKit::PointerLockManager::unlock): |
| * UIProcess/gtk/PointerLockManager.h: |
| * UIProcess/gtk/PointerLockManagerWayland.cpp: |
| (WebKit::PointerLockManagerWayland::lock): |
| * UIProcess/gtk/PointerLockManagerX11.cpp: |
| (WebKit::PointerLockManagerX11::didReceiveMotionEvent): |
| * UIProcess/gtk/WebColorPickerGtk.cpp: |
| * UIProcess/gtk/WebContextMenuProxyGtk.cpp: |
| (WebKit::WebContextMenuProxyGtk::show): |
| (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems): |
| (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): |
| (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): |
| * UIProcess/gtk/WebContextMenuProxyGtk.h: |
| * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: |
| * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h: |
| * UIProcess/gtk/WebPageProxyGtk.cpp: |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| * UIProcess/gtk/WebPopupMenuProxyGtk.h: |
| * WebProcess/Plugins/PluginController.h: |
| * WebProcess/Plugins/PluginView.cpp: |
| * WebProcess/Plugins/PluginView.h: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::close): |
| (WebKit::WebPage::mainFrameDidLayout): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp: |
| (WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): |
| (WebKit::AcceleratedSurfaceX11::createPixmap): |
| * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: |
| (WebKit::WebPrintOperationGtk::print): |
| |
| 2020-04-27 Rob Buis <rbuis@igalia.com> |
| |
| Make loadURLIntoChildFrame private and non-exported |
| https://bugs.webkit.org/show_bug.cgi?id=211051 |
| |
| Reviewed by Darin Adler. |
| |
| Adapt createFrame to strictly create a subframe and |
| not load anything. |
| |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::createFrame): |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: |
| |
| 2020-04-27 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [JSC] CallData/ConstructData should include CallType/ConstructType |
| https://bugs.webkit.org/show_bug.cgi?id=211059 |
| |
| Reviewed by Darin Adler. |
| |
| * WebProcess/Plugins/Netscape/JSNPObject.cpp: |
| (WebKit::JSNPObject::getCallData): |
| (WebKit::JSNPObject::getConstructData): |
| * WebProcess/Plugins/Netscape/JSNPObject.h: |
| * WebProcess/Plugins/Netscape/NPJSObject.cpp: |
| (WebKit::NPJSObject::hasMethod): |
| (WebKit::NPJSObject::construct): |
| (WebKit::NPJSObject::invoke): |
| |
| 2020-04-27 Diego Pino Garcia <dpino@igalia.com> |
| |
| Unreviewed, reverting r260672. |
| |
| [GTK] WebInspector tests are timing out after r260672 |
| |
| Reverted changeset: |
| |
| "[Win] Bundle Inspector Resources in Release builds" |
| https://bugs.webkit.org/show_bug.cgi?id=210942 |
| https://trac.webkit.org/changeset/260672 |
| |
| 2020-04-27 Diego Pino Garcia <dpino@igalia.com> |
| |
| Unreviewed, reverting r260696. |
| |
| Build fix after r260672, no needed since r260672 is also being reverted. |
| |
| Reverted changeset: |
| |
| "REGRESSION(210942): [GTK][WPE] Unreviewed, EWS build bots |
| fail in compile-webkit step" |
| https://bugs.webkit.org/show_bug.cgi?id=211014 |
| https://trac.webkit.org/changeset/260696 |
| |
| 2020-04-26 Darin Adler <darin@apple.com> |
| |
| [Cocoa] stop using out arguments for document attributes when converting to attributed strings |
| https://bugs.webkit.org/show_bug.cgi?id=211048 |
| |
| Reviewed by Sam Weinig. |
| |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::updateTaskWithFirstPartyForSameSiteCookies): Use init instead of initWithString:@"". |
| |
| * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: |
| (IPC::ArgumentCoder<WebCore::AttributedString>::encode): Moved here from AttributedString.mm. |
| (IPC::ArgumentCoder<WebCore::AttributedString>::decode): Ditto. |
| |
| * Shared/DocumentEditingContext.h: Updated to use WebCore::AttributeString. |
| * Shared/DocumentEditingContext.mm: |
| (IPC::ArgumentCoder<WebKit::DocumentEditingContext>::decode): Ditto. |
| |
| * Shared/WebCoreArgumentCoders.h: Added coder for WebCore::AttributedString. |
| |
| * Shared/mac/AttributedString.h: Removed. |
| * Shared/mac/AttributedString.mm: Removed. |
| |
| * SourcesCocoa.txt: Removed AttributedString.mm. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: Updated to use WebCore::AttributedString. |
| * UIProcess/Cocoa/TextCheckingController.mm: Ditto. |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::attributedSubstringForProposedRange): Ditto. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::getContentsAsAttributedString): Ditto. |
| * UIProcess/WebPageProxy.h: Ditto. |
| * UIProcess/WebPageProxy.messages.in: Ditto. |
| * UIProcess/mac/WebPageProxyMac.mm: |
| (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): Ditto. |
| (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback): Ditto. |
| |
| * WebKit.xcodeproj/project.pbxproj: Removed AttributedString.h and AttributedString.mm. |
| |
| * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h: Updated to use WebCore::AttributedString. |
| * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.messages.in: Ditto. |
| * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm: |
| (WebKit::TextCheckingControllerProxy::replaceRelativeToSelection): Ditto. |
| (WebKit::TextCheckingControllerProxy::annotatedSubstringBetweenPositions): Ditto. |
| |
| * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: |
| (WebKit::WebPage::dictionaryPopupInfoForRange): Updated since editingAttributedString |
| returns a struct. |
| (WebKit::WebPage::getContentsAsAttributedString): Updated to use SimpleRange and |
| since attributedString returns a struct. |
| |
| * WebProcess/WebPage/WebPage.h: Updated to use WebCore::AttributedString. |
| * WebProcess/WebPage/WebPage.messages.in: Ditto. |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::requestDocumentEditingContext): Ditto. |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::attributedSubstringForCharacterRangeAsync): Ditto. |
| (WebKit::WebPage::handleSelectionServiceClick): Ditto. |
| |
| 2020-04-26 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Rendering update steps should use Seconds for the timestamps |
| https://bugs.webkit.org/show_bug.cgi?id=210990 |
| |
| Reviewed by Daniel Bates. |
| |
| * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: |
| (WebKit::CompositingCoordinator::timestamp const): |
| |
| 2020-04-26 Peng Liu <peng.liu6@apple.com> |
| |
| Remove unused class PlaybackSessionInterface |
| https://bugs.webkit.org/show_bug.cgi?id=211031 |
| |
| Reviewed by Daniel Bates. |
| |
| * WebProcess/cocoa/PlaybackSessionManager.h: |
| |
| 2020-04-11 Darin Adler <darin@apple.com> |
| |
| Stop using live ranges in functions that return range of the selection |
| https://bugs.webkit.org/show_bug.cgi?id=210396 |
| |
| Reviewed by Sam Weinig. |
| |
| * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: |
| (WebKit::WebEditorClient::updateGlobalSelection): Remove use of live range. |
| |
| * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: |
| (WebKit::WebPage::dictionaryPopupInfoForRange): Updated for changes |
| to attributedString functions. |
| (WebKit::WebPage::getContentsAsAttributedString): Ditto. |
| |
| * WebProcess/WebPage/FindController.cpp: |
| (WebKit::FindController::updateFindUIAfterPageScroll): Use createLiveRange. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::getSelectedRangeAsync): Ditto. |
| (WebKit::WebPage::currentSelectionAsRange): Ditto. |
| |
| * WebProcess/WebPage/WebPage.h: Change m_rangeForDropSnapshot |
| to use a SimpleRange instead of a live range. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::plainTextForContext): Overloaded for SimpleRange and |
| Optional<SimpleRange> as needed by code below. |
| (WebKit::plainTextForDisplay): Ditto. |
| (WebKit::WebPage::getPlatformEditorState const): Use createLiveRange. |
| (WebKit::WebPage::getSelectionContext): Remove use of live range. |
| (WebKit::WebPage::didConcludeDrop): Ditto. |
| (WebKit::WebPage::didConcludeEditDrag): Use createLiveRange. |
| (WebKit::WebPage::computeAndSendEditDragSnapshot): Ditto. |
| (WebKit::WebPage::startAutoscrollAtPosition): Remove use of |
| live range. |
| (WebKit::WebPage::requestEvasionRectsAboveSelection): Use |
| createLiveRange. |
| (WebKit::WebPage::requestDictationContext): Remove use of live range. |
| (WebKit::WebPage::replaceSelectedText): Use createLiveRange. |
| (WebKit::WebPage::applyAutocorrectionInternal): Ditto. |
| (WebKit::WebPage::autocorrectionContext): Remove use of live range. |
| (WebKit::WebPage::requestDocumentEditingContext): Use createLiveRange. |
| |
| * WebProcess/WebPage/mac/WebPageMac.mm: |
| (WebKit::WebPage::getPlatformEditorState const): Remove use of |
| live range. |
| (WebKit::WebPage::attributedSubstringForCharacterRangeAsync): |
| Updated for change to HTMLConverter functions. |
| (WebKit::WebPage::handleSelectionServiceClick): Ditto. |
| (WebKit::WebPage::performImmediateActionHitTestAtLocation): |
| Remove use of live range. |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Fix internal iOS build. |
| https://bugs.webkit.org/show_bug.cgi?id=210521 |
| |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::platformBeginApplePaySetup): |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Move ApplePay code from WebKitAdditions to WebCore and WebKit |
| https://bugs.webkit.org/show_bug.cgi?id=210521 |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Move ApplePay code from WebKitAdditions to WebCore and WebKit |
| https://bugs.webkit.org/show_bug.cgi?id=210521 |
| |
| Reviewed by Andy Estes. |
| |
| * DerivedSources.make: |
| * Scripts/webkit/messages.py: |
| * Shared/ApplePay/ApplePayPaymentSetupFeatures.h: Added. |
| (WebKit::PaymentSetupFeatures::platformFeatures const): |
| * Shared/ApplePay/ApplePayPaymentSetupFeatures.mm: Added. |
| (WebKit::PaymentSetupFeatures::PaymentSetupFeatures): |
| (WebKit::PaymentSetupFeatures::encode const): |
| (WebKit::PaymentSetupFeatures::decode): |
| (WebKit::PaymentSetupFeatures::operator Vector<Ref<WebCore::ApplePaySetupFeature>> const): |
| * Shared/ApplePay/PaymentSetupConfiguration.h: Added. |
| (WebKit::PaymentSetupConfiguration::platformConfiguration const): |
| * Shared/ApplePay/PaymentSetupConfiguration.mm: Added. |
| (WebKit::toPlatformConfiguration): |
| (WebKit::PaymentSetupConfiguration::PaymentSetupConfiguration): |
| (WebKit::PaymentSetupConfiguration::encode const): |
| (WebKit::PaymentSetupConfiguration::decode): |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.h: |
| (WebKit::WebPaymentCoordinatorProxy::finishConstruction): Deleted. |
| * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: |
| * Shared/ApplePay/cocoa/PaymentSetupConfiguration.mm: Added. |
| (WebKitAdditions::toPlatformConfiguration): |
| (WebKitAdditions::PaymentSetupConfiguration::PaymentSetupConfiguration): |
| (WebKitAdditions::PaymentSetupConfiguration::encode const): |
| (WebKitAdditions::PaymentSetupConfiguration::decode): |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::finishCreating): |
| (WebKit::WebPaymentCoordinatorProxy::getSetupFeatures): |
| (WebKit::WebPaymentCoordinatorProxy::beginApplePaySetup): |
| (WebKit::WebPaymentCoordinatorProxy::endApplePaySetup): |
| (WebKit::WebPaymentCoordinatorProxy::platformBeginApplePaySetup): |
| (WebKit::WebPaymentCoordinatorProxy::platformEndApplePaySetup): |
| * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: |
| (IPC::finishDecoding): |
| (IPC::finishEncoding): |
| (IPC::ArgumentCoder<WebCore::PaymentInstallmentConfiguration>::encode): |
| (IPC::ArgumentCoder<WebCore::PaymentInstallmentConfiguration>::decode): |
| * SourcesCocoa.txt: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/ApplePay/WebPaymentCoordinator.cpp: |
| (WebKit::WebPaymentCoordinator::getSetupFeatures): |
| (WebKit::WebPaymentCoordinator::beginApplePaySetup): |
| (WebKit::WebPaymentCoordinator::endApplePaySetup): |
| * WebProcess/ApplePay/WebPaymentCoordinator.h: |
| |
| 2020-04-25 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Deal with another round of Xcode upgrade checks |
| https://bugs.webkit.org/show_bug.cgi?id=211027 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * WebKit.xcodeproj/project.pbxproj: Bump the upgrade check version. |
| Add a base localization. |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Prepare to remove automatic URL->String conversion operators |
| https://bugs.webkit.org/show_bug.cgi?id=211007 |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/API/APIError.h: |
| (API::Error::failingURL const): |
| * Shared/API/c/WKSharedAPICast.h: |
| (WebKit::toCopiedURLAPI): |
| * UIProcess/API/Cocoa/WKBrowsingContextController.mm: |
| (setUpPagePolicyClient): |
| * UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm: |
| (WebKit::reportAnErrorURL): |
| * UIProcess/Cocoa/UIDelegate.mm: |
| (WebKit::requestUserMediaAuthorizationForFrame): |
| (WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): |
| * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: |
| (WebKit::WebPasteboardProxy::readURLFromPasteboard): |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::cancel): |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): |
| (WebKit::WebPageProxy::loadRequestWithNavigationShared): |
| (WebKit::WebPageProxy::loadAlternateHTML): |
| (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): |
| (WebKit::WebPageProxy::didExplicitOpenForFrame): |
| (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared): |
| (WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared): |
| (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| (WebKit::WebPageProxy::createNewPage): |
| * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: |
| (-[WKWebProcessPlugInFrame URL]): |
| * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: |
| (WebKit::NetscapePluginStream::didReceiveResponse): |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::clickedLink): |
| (WebKit::PDFPlugin::openWithNativeApplication): |
| * WebProcess/Plugins/PluginView.cpp: |
| (WebKit::PluginView::performURLRequest): |
| (WebKit::PluginView::performJavaScriptURLRequest): |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect): |
| (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): |
| (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL): |
| * WebProcess/WebPage/WebFrame.cpp: |
| (WebKit::WebFrame::info const): |
| * WebProcess/WebStorage/StorageAreaMap.cpp: |
| (WebKit::StorageAreaMap::setItem): |
| (WebKit::StorageAreaMap::removeItem): |
| (WebKit::StorageAreaMap::clear): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::origin): |
| |
| 2020-04-25 Darin Adler <darin@apple.com> |
| |
| Move URL to use StringView when returning substrings of the URL |
| https://bugs.webkit.org/show_bug.cgi?id=210431 |
| |
| Reviewed by Anders Carlsson. |
| |
| * NetworkProcess/NetworkLoadChecker.cpp: |
| (WebKit::NetworkLoadChecker::checkRedirection): Use hasCredentials. |
| (WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const): |
| Remove use of ASCIILiteral for setProtocol. |
| |
| * NetworkProcess/curl/NetworkDataTaskCurl.cpp: |
| (WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl): Updated for |
| password name change. |
| (WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection): Ditto. |
| |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Updated |
| for password name change. |
| (WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection): Ditto. |
| |
| * NetworkProcess/soup/NetworkDataTaskSoup.cpp: |
| (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Updated for |
| password name change. |
| (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest): Ditto. |
| (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Ditto. |
| (WebKit::NetworkDataTaskSoup::shouldAllowHSTSPolicySetting const): |
| Use != to compare hosts, rather than hostsAreEqual. |
| (WebKit::NetworkDataTaskSoup::shouldAllowHSTSProtocolUpgrade const): |
| Refactored to use || to match the function above. |
| |
| * Shared/API/APIURL.h: |
| (API::URL::host const): Removed validity check; WTF::URL::host |
| returns null if the URL is invalid. |
| (API::URL::protocol const): Ditto. |
| (API::URL::path const): Ditto. |
| (API::URL::lastPathComponent const): Ditto. Also added toString |
| since WTF::URL::lastPathComponent now returns a StringView. |
| |
| * UIProcess/Cocoa/DownloadClient.mm: |
| (WebKit::DownloadClient::didFinish): Use hasFragmentIdentifier. |
| |
| * UIProcess/DeviceIdHashSaltStorage.cpp: |
| (WebKit::DeviceIdHashSaltStorage::loadStorageFromDisk): |
| Refactored a bit and use fileURLWithFileSystemPath and |
| updated since lastPathComponent returns a StringView. |
| |
| * UIProcess/Plugins/PluginInfoStore.cpp: |
| (WebKit::pathExtension): Updated since lastPathComponent |
| returns a StringView. Refactored a little. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): |
| Use truncatedForUseAsBase. |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| Use != to compare hosts, rather than hostsAreEqual. |
| (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Ditto. |
| (WebKit::WebPageProxy::createNewPage): Ditto. |
| |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::assumeReadAccessToBaseURL): |
| Use truncatedForUseAsBase. |
| |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::initializeAppBoundDomains): |
| Don't use ASCIILiteral for argument to setProtocol. |
| |
| * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: |
| (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins): |
| Use fileURLWithFileSystemPath, also refactored a bit. |
| |
| * WebProcess/Plugins/PDF/PDFPlugin.mm: |
| (WebKit::PDFPlugin::installPDFDocument): Updated since |
| fragmentIdentifier returns a StringView. |
| |
| * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: |
| (WebKit::WebContextMenuClient::searchWithGoogle): Streamlined |
| the implementation a bit. |
| |
| * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: |
| (WebKit::WebDragClient::declareAndWriteDragImage): |
| Updated since lastPathComponent returns a StringView. |
| |
| 2020-04-25 David Kilzer <ddkilzer@apple.com> |
| |
| IPC::Decoder::isInvalid() should be renamed to isValid() |
| <https://webkit.org/b/211000> |
| |
| Reviewed by Darin Adler. |
| |
| Negative logic is more difficult to reason about than positive |
| logic. |
| |
| * Platform/IPC/Connection.cpp: |
| (IPC::Connection::dispatchMessage): |
| (IPC::Connection::dispatchWorkQueueMessageReceiverMessage): |
| (IPC::Connection::dispatchThreadMessageReceiverMessage): |
| (IPC::Connection::dispatchSyncMessage): |
| * Platform/IPC/Connection.h: |
| (IPC::Connection::sendWithAsyncReply): |
| * Platform/IPC/Decoder.cpp: |
| (IPC::Decoder::create): |
| * Platform/IPC/Decoder.h: |
| (IPC::Decoder::isValid const): Rename from isInvalid() |
| and invert logic. |
| (IPC::Decoder::isInvalid const): Rename to isValid(). |
| * Platform/IPC/MessageSender.h: |
| * UIProcess/AuxiliaryProcessProxy.h: |
| (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply): |
| - Change Decoder::isInvalid() to Decoder::isValid() and reverse |
| the Boolean logic. |
| |
| 2020-04-25 Diego Pino Garcia <dpino@igalia.com> |
| |
| REGRESSION(210942): [GTK][WPE] EWS build bots fail in compile-webkit step |
| https://bugs.webkit.org/show_bug.cgi?id=211014 |
| |
| Make command that generates 'InspectorGResourceBundle.xml' depend on target |
| WebInspectorUI, instead of file 'inspector-resources.stamp'. |
| |
| * InspectorGResources.cmake: |
| |
| 2020-04-24 Diego Pino Garcia <dpino@igalia.com> |
| |
| [WPE][Debug] Unreviewed, fix build after r260063 |
| https://bugs.webkit.org/show_bug.cgi?id=211009 |
| |
| r260063 removed include of WebProcess.h in WebSocketProvider.cpp, |
| which broke unified builds in WPE Debug. |
| |
| * WebProcess/Network/WebSocketProvider.cpp: |
| |
| 2020-04-24 David Kilzer <ddkilzer@apple.com> |
| |
| WebPasteboardProxy::getPasteboardStringsForType() and WebPasteboardProxy::readURLFromPasteboard() should check return value of SharedMemory::createHandle() |
| <https://webkit.org/b/211002> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: |
| (WebKit::WebPasteboardProxy::getPasteboardBufferForType): |
| (WebKit::WebPasteboardProxy::readBufferFromPasteboard): |
| - Check result of SharedMemory::createHandle() and return early |
| on failure. |
| |
| 2020-04-24 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Unable to sign up on twitter.com |
| https://bugs.webkit.org/show_bug.cgi?id=211003 |
| <rdar://problem/58804852> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WKApplicationStateTrackingView.mm: |
| (-[WKApplicationStateTrackingView _willBeginSnapshotSequence]): |
| (-[WKApplicationStateTrackingView _didCompleteSnapshotSequence]): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::setShouldFireEvents): |
| (WebKit::WebPage::setShouldFireResizeEvents): Deleted. |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-24 Christopher Reid <chris.reid@sony.com> |
| |
| [Win] Bundle Inspector Resources in Release builds |
| https://bugs.webkit.org/show_bug.cgi?id=210942 |
| |
| Reviewed by Fujii Hironori. |
| |
| Move CMake logic for the inspector resource copy script to |
| Source/WebInspectorUI so it can be shared with Win and other platforms. |
| |
| * InspectorGResources.cmake: |
| * PlatformWPE.cmake: |
| * PlatformWin.cmake: |
| |
| 2020-04-24 Kate Cheney <katherine_cheney@apple.com> |
| |
| Removing website data for a domain should delete corresponding ITP entry |
| https://bugs.webkit.org/show_bug.cgi?id=210864 |
| <rdar://problem/59473193> |
| |
| Reviewed by John Wilander. |
| |
| Tests: http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-link-decoration-database.html |
| http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-link-decoration.html |
| http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-mixed-statistics-entries-database.html |
| http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-mixed-statistics-entries.html |
| http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-third-party-script-loads-database.html |
| http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-third-party-script-loads.html |
| |
| In the database store: deletes domain from the ObservedDomains table |
| when website data is deleted for that domain. This deletes every |
| instance of the domainID in the database due to cascading deletions. |
| |
| In the memory store: deletes every instance of the domain in the |
| statistics map, which will update the plist. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::removeDataForDomain): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::domainIDExistsInDatabase): |
| Needed a new function to check for the existence of domainID in any |
| table. Existing queries rely on the ObservedDomains entry, which means |
| testing using those could result in a false positive if the domainID |
| was deleted from ObservedDomains but is floating around in another |
| table. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::removeDataForDomain): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::domainIDExistsInDatabase): |
| (WebKit::WebResourceLoadStatisticsStore::removeDataForDomain): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::domainIDExistsInDatabase): |
| (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): |
| Pass RegistrableDomains vector to deleteWebsiteDataForOrigins, |
| captured based on the WebsiteData display name. |
| |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: |
| (WKWebsiteDataStoreRemoveITPDataForDomain): |
| (WKWebsiteDataStoreDoesStatisticsDomainIDExistInDatabase): |
| * UIProcess/API/C/WKWebsiteDataStoreRef.h: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins): |
| (WebKit::NetworkProcessProxy::domainIDExistsInDatabase): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::removeData): |
| (WebKit::WebsiteDataStore::domainIDExistsInDatabase): |
| * UIProcess/WebsiteData/WebsiteDataStore.h: |
| |
| 2020-04-24 David Kilzer <ddkilzer@apple.com> |
| |
| Use CocoaImage platform abstraction for NSImage/UIImage |
| <https://webkit.org/b/210974> |
| |
| Reviewed by Darin Adler. |
| |
| * Platform/cocoa/CocoaImage.h: Add. |
| - Define CocoaImage here for cross-platform use. Don't use |
| OBJC_CLASS() here because this is an Objective-C header. |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]): |
| - Combine separate platform-specific methods into one method. |
| * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: |
| - Combine separate platform-specific instance variables into |
| one instance variable. |
| (-[_WKActivatedElementInfo image]): |
| - Combine separate methods into one platform-specific method. |
| * UIProcess/QuickLookThumbnailLoader.h: |
| - Move cross-platform definition to CocoaImge.h. |
| * UIProcess/QuickLookThumbnailLoader.mm: |
| - Drive-by fix of soft-linking header include order. |
| * WebKit.xcodeproj/project.pbxproj: |
| - Add CocoaImage.h to the project. |
| * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm: |
| (-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): |
| (-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:width:]): |
| - Combine separate platform-specific methods into one method. |
| |
| 2020-04-24 David Kilzer <ddkilzer@apple.com> |
| |
| IPC::Decoder should use create() pattern |
| <https://webkit.org/b/210949> |
| <rdar://problem/62144409> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * Platform/IPC/Decoder.cpp: |
| (IPC::Decoder::create): Add implementation. Returns nullptr if |
| Decoder constructor returns an invalid object. |
| (IPC::Decoder::Decoder): Mark invalid if m_buffer is not 64-bit |
| aligned. |
| (IPC::Decoder::unwrapForTesting): Switch to Decoder::create(). |
| * Platform/IPC/Decoder.h: |
| (IPC::Decoder::create): Add declaration. |
| (IPC::Decoder::Decoder): Make explicit. (Can't be made private |
| since we use std::unique_ptr<Decoder>.) |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::createMessageDecoder): Switch to Decoder::create(). |
| |
| 2020-04-24 Tim Horton <timothy_horton@apple.com> |
| |
| iPad: "Pocket City" interaction does not work with trackpad |
| https://bugs.webkit.org/show_bug.cgi?id=210985 |
| <rdar://problem/62273077> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView shouldUseMouseGestureRecognizer]): |
| Add another app to the list who fall back to touch event synthesis until rebuilt. |
| |
| 2020-04-24 Alex Christensen <achristensen@webkit.org> |
| |
| SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation |
| https://bugs.webkit.org/show_bug.cgi?id=210533 |
| |
| Reviewed by Brady Eidson. |
| |
| * NetworkProcess/NetworkDataTask.h: |
| (WebKit::NetworkDataTaskClient::didNegotiateModernTLS): |
| * NetworkProcess/NetworkLoad.cpp: |
| (WebKit::NetworkLoad::didNegotiateModernTLS): |
| * NetworkProcess/NetworkLoad.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::didNegotiateModernTLS): |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): |
| * UIProcess/API/APINavigationClient.h: |
| (API::NavigationClient::didNegotiateModernTLS): |
| * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: |
| * UIProcess/Cocoa/NavigationState.h: |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::setNavigationDelegate): |
| (WebKit::NavigationState::NavigationClient::didNegotiateModernTLS): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::didNegotiateModernTLS): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-04-24 Brian Burg <bburg@apple.com> |
| |
| Web Automation: timeout underneath Automation.evaluateJavaScriptFunction in Selenium test frame_switching_tests.py::testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs[Safari] |
| https://bugs.webkit.org/show_bug.cgi?id=210162 |
| <rdar://problem/60561009> |
| |
| Reviewed by Devin Rousso. |
| |
| When an iframe is detached from the DOM, it is no longer exposed as a browsing context |
| and it's not possible to Evaluate JavaScript or perform other commands with it. This |
| patch adds frame lifecycle monitoring so that pending script evaluations are cancelled |
| with FrameNotFound as soon as the iframe is detached from the DOM. This change also avoids |
| running more commands with the frame if it's detached from its DOMWindow and ready to be GC'd. |
| |
| * Sources.txt: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/Automation/WebAutomationDOMWindowObserver.h: Added. |
| * WebProcess/Automation/WebAutomationDOMWindowObserver.cpp: Added. |
| (WebKit::WebAutomationDOMWindowObserver::WebAutomationDOMWindowObserver): |
| (WebKit::WebAutomationDOMWindowObserver::~WebAutomationDOMWindowObserver): |
| (WebKit::WebAutomationDOMWindowObserver::frame const): |
| (WebKit::WebAutomationDOMWindowObserver::willDestroyGlobalObjectInCachedFrame): |
| (WebKit::WebAutomationDOMWindowObserver::willDestroyGlobalObjectInFrame): |
| (WebKit::WebAutomationDOMWindowObserver::willDetachGlobalObjectFromFrame): |
| This class is a stripped-down copy of DOMWindowExtension, which is the only other |
| client of DOMWindow::Observer interface. When a frame is detached, destroyed, or |
| navigates (global object detached), then call the callback and unregister. |
| |
| * WebProcess/Automation/WebAutomationSessionProxy.h: |
| * WebProcess/Automation/WebAutomationSessionProxy.cpp: |
| (WebKit::WebAutomationSessionProxy::~WebAutomationSessionProxy): |
| (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): |
| (WebKit::WebAutomationSessionProxy::willDestroyGlobalObjectForFrame): |
| (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): |
| (WebKit::WebAutomationSessionProxy::ensureObserverForFrame): For non-main frames, |
| ensure we add a frame observer if we are about to evaluate JavaScript upon the frame. |
| This acts as a watchdog in case the frame becomes detached while waiting for pending |
| JS evaluations. When a frame is detached, the JS evaluation may or may not complete. |
| |
| (WebKit::WebAutomationSessionProxy::selectOptionElement): Fix hilarious typo. |
| |
| * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: |
| * WebProcess/GPU/media/WebMediaStrategy.cpp: |
| (WebKit::WebMediaStrategy::clearNowPlayingInfo): |
| (WebKit::WebMediaStrategy::setNowPlayingInfo): |
| Adding a new file seems to have exposed a few missing includes and namespace qualifiers. |
| This is due to unified sources chunking. |
| |
| 2020-04-24 Alex Christensen <achristensen@webkit.org> |
| |
| Use sendWithAsyncReply for ShareSheet related messages |
| https://bugs.webkit.org/show_bug.cgi?id=210828 |
| <rdar://problem/61800730> |
| |
| Reviewed by Brent Fulgham. |
| |
| * Platform/IPC/MessageSender.cpp: |
| We need to call addAsyncReplyHandler before sendMessage in case this is the first async message from this process. |
| Otherwise the reply from the first message is dropped sometimes. |
| * Shared/ShareSheetCallbackID.h: Removed. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::showShareSheet): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::showShareSheet): |
| (WebKit::nextShareSheetCallbackID): Deleted. |
| (WebKit::WebPage::didCompleteShareSheet): Deleted. |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-24 Youenn Fablet <youenn@apple.com> and Luming Yin <luming_yin@apple.com> |
| |
| Call STDynamicActivityAttributionPublisher in the WebProcess |
| https://bugs.webkit.org/show_bug.cgi?id=210772 |
| <rdar://problem/62075201> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Call STDynamicActivityAttributionPublisher in WebProcess to make use of the newly added plist entry. |
| Use of a sandbox extension to protect this call. |
| |
| * Configurations/WebKit.xcconfig: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * Scripts/process-entitlements.sh: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist: |
| * WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/InfoPlist.strings: Added. |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-24 Simon Fraser <simon.fraser@apple.com> |
| |
| Move some post-renderingUpdate code into WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=210952 |
| |
| Reviewed by Antti Koivisto. |
| |
| Factor some code called by the various DrawingArea subclasses into Page::finalizeRenderingUpdate(), |
| with some flags to control behavior that differs between drawing areas. |
| |
| ScrollingCoordinator::commitTreeStateIfNeeded() is a no-op for RemoteScrollingCoordinator so |
| it's fine to always call it. |
| |
| * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: |
| (WebKit::RemoteLayerTreeDrawingArea::updateRendering): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::finalizeRenderingUpdate): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: |
| (WebKit::TiledCoreAnimationDrawingArea::updateRendering): |
| |
| 2020-04-24 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Stop using legacy BKSApplicationStateMonitor |
| https://bugs.webkit.org/show_bug.cgi?id=210945 |
| |
| Reviewed by Tim Horton. |
| |
| Stop using legacy BKSApplicationStateMonitor and use RunningBoard API instead. |
| |
| * Configurations/WebKit.xcconfig: |
| Stop linking against ApplicationServices when using iOS 14 SDK now that we are |
| fully transitioned to RunningBoard. |
| |
| * Platform/spi/ios/RunningBoardServicesSPI.h: |
| * UIProcess/ApplicationStateTracker.h: |
| * UIProcess/ApplicationStateTracker.mm: |
| (WebKit::ApplicationStateTracker::ApplicationStateTracker): |
| (WebKit::isApplicationForeground): |
| (WebKit::ApplicationStateTracker::~ApplicationStateTracker): |
| (WebKit::isBackgroundState): Deleted. |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::isApplicationVisible): |
| |
| 2020-04-23 Simon Fraser <simon.fraser@apple.com> |
| |
| Bounce displayWasRefreshed() via EventDispatcher |
| https://bugs.webkit.org/show_bug.cgi?id=208778 |
| |
| Reviewed by Antti Koivisto. |
| |
| Allow the WebContent process to be notified of display refresh off the main thread, so other |
| threads like the scrolling thread can respond without being blocked. Achieve this |
| by having EventDispatcher receive the IPC message, then bounce it to the main thread. |
| |
| * UIProcess/mac/DisplayLink.cpp: |
| (WebKit::DisplayLink::displayLinkCallback): |
| * WebProcess/WebPage/EventDispatcher.cpp: |
| (WebKit::EventDispatcher::displayWasRefreshed): |
| * WebProcess/WebPage/EventDispatcher.h: |
| * WebProcess/WebPage/EventDispatcher.messages.in: |
| * WebProcess/WebProcess.h: |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::displayWasRefreshed): |
| |
| 2020-04-23 David Kilzer <ddkilzer@apple.com> |
| |
| Clean up QuickLookThumbnailLoader |
| <https://webkit.org/b/210814> |
| |
| Reviewed by Darin Adler. |
| |
| The following items are cleaned up: |
| - Extract `using PlatformImage` into QuickLookThumbnailLoader.h, |
| rename to `CocoaImage` and use to get rid of duplicate |
| code. |
| - Change `id` to `instancetype` for -init methods. |
| - Add `atomic` keyword to @property definitions that were using |
| it as the default. (Use of atomic properties is rare in |
| WebKit, so being explicit avoids a scenario where it looks |
| like `nonatomic` was left off by accident.) |
| - Change @property definitions to `readonly` that are never |
| written to outside of QuickLookThumbnailLoader.mm. |
| - Delete unused @property definitions. |
| - Change method declarations into read-only @property |
| definitions. |
| - Re-declare atomic read-only @property definitions in |
| QuickLookThumbnailLoader.h as read-write definitions in |
| QuickLookThumbnailLoader.mm if they are written to. |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::convertPlatformImageToBitmap): |
| * UIProcess/QuickLookThumbnailLoader.h: |
| - Rename qlThumbnailGenerationQueue @property to just `queue`. |
| - Remove `contentType` @property. It is not used anywhere. |
| This also fixes a theoretical leak found by the clang static |
| analyzer. |
| - Remove `shouldWrite` @property. It is only used within |
| QuickLookThumbnailLoader.mm. |
| - Change `identifier` and `thumbnail` to @property declarations. |
| * UIProcess/QuickLookThumbnailLoader.mm: |
| - Change WKQLThumbnailLoadOperation._identifier type from |
| NSMutableString to NSString. There was no reason for it to |
| be mutable. |
| (-[WKQLThumbnailQueueManager init]): |
| (-[WKQLThumbnailQueueManager dealloc]): |
| - Release `_queue` to fix theoretical leak found by the clang |
| static analyzer. |
| (-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]): |
| (-[WKQLThumbnailLoadOperation initWithURL:identifier:]): |
| (-[WKQLThumbnailLoadOperation start]): |
| - Rename `req` to `request`. |
| - Change separate #if macros to #if/#else since only one version |
| of this code can be used at a time. |
| (-[WKQLThumbnailLoadOperation thumbnail]): |
| - Use CocoaImage to use one copy of the method. |
| |
| 2020-04-23 Megan Gardner <megan_gardner@apple.com> |
| |
| Long pressing attachments in Notes does not activate Context Menu. |
| https://bugs.webkit.org/show_bug.cgi?id=210936 |
| <rdar://problem/61171576> |
| |
| Reviewed by Tim Horton. |
| |
| Not having the ID available for notes makes their code to create the context |
| menu and its items fail. We should probably be passing this information on |
| for any element if we have it. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::selectionPositionInformation): |
| |
| 2020-04-23 Brent Fulgham <bfulgham@apple.com> |
| |
| Allow "kern.osversion" sysctl read |
| https://bugs.webkit.org/show_bug.cgi?id=210929 |
| <rdar://problem/62256013> |
| |
| Reviewed by Per Arne Vollan. |
| |
| Libdispatch checks "kern.osversion" as part of the code path we use for launching our XPC services. |
| We already allow it for some services (Network Process), and should be doing so for our other |
| helper processes. |
| |
| * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-04-23 Peng Liu <peng.liu6@apple.com> |
| |
| Remove the WebKit.plist for Feature Flags |
| https://bugs.webkit.org/show_bug.cgi?id=210534 |
| |
| Reviewed by Simon Fraser. |
| |
| * FeatureFlags/WebKit.plist: Removed. |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-04-23 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Crash on RunningBoard process assertion invalidation |
| https://bugs.webkit.org/show_bug.cgi?id=210873 |
| <rdar://problem/62194917> |
| |
| Unreviewed, nil out the observer only after we've removed it to fix crashes on the bots. |
| |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::ProcessAssertion::~ProcessAssertion): |
| |
| 2020-04-23 Kate Cheney <katherine_cheney@apple.com> |
| |
| All ITP database tables should reference the ObservedDomains table on DELETE CASCADE |
| https://bugs.webkit.org/show_bug.cgi?id=210874 |
| <rdar://problem/62209438> |
| |
| Reviewed by Brady Eidson. |
| |
| This makes it easier to delete an ITP entry from the entire database. |
| An entry shouldn't really exist outside of ObservedDomains anyways, |
| because that table holds all data about the domain, so this is a good |
| change to make regardless of the deletion use case. |
| |
| (WebKit::needsNewCreateTableSchema): |
| Function to check for old CREATE TABLE queries. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::enableForeignKeys): |
| Must enable foreign keys to use DELETE CASCADE. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::isMigrationNecessary): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary): |
| Since this is a schema change that is executed when a table is created, we |
| need to check if the current schema is out of date. If so, we can |
| create new tables using the proper reference and migrate the data. |
| |
| (WebKit::ResourceLoadStatisticsDatabaseStore::openAndDropOldDatabaseIfNecessary): |
| We only need to migrate the data if there were no issues with the |
| schema (otherwise the entire database will already have been created |
| with the correct CREATE TABLE queries). |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: |
| |
| 2020-04-23 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] CMAKE_BINARY_DIR should always be a PRIVATE include directory |
| https://bugs.webkit.org/show_bug.cgi?id=196717 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Include CMAKE_BINARY_DIR either directly or through WebKit_PRIVATE_INCLUDE_DIRECTORIES. |
| |
| * PlatformGTK.cmake: |
| * PlatformWPE.cmake: |
| |
| 2020-04-23 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Regression after r260359 ([GTK][WPE] lowWatermarkPages() in MemoryPressureMonitor.cpp only searches the "low" value inside the first "Node" section) |
| https://bugs.webkit.org/show_bug.cgi?id=210916 |
| |
| Reviewed by Carlos Alberto Lopez Perez. |
| |
| Switch over to using a FileHandle type based on std::unique_ptr with a custom deleter and an |
| utility function for opening files. This makes easier to follow the logic inside the polling |
| loop for opening files and retrying when needed. This also fixes exiting the thread when the |
| systemMemoryUsedAsPercentage() function would return -1, to loop restart instead to keep |
| trying. |
| |
| Thanks to Pablo Saavedra for his help in making this patch. |
| |
| No new tests needed. |
| |
| * UIProcess/linux/MemoryPressureMonitor.cpp: |
| (WebKit::FileHandleDeleter::operator()): Add deleter to use with std::unique_ptr<>. |
| (WebKit::tryOpeningForUnbufferedReading): Add utility function to open a file handle if |
| needed and configuring its buffering upon opening. |
| (WebKit::MemoryPressureMonitor::start): Use FileHandle to ensure that handles are always |
| closed properly, and fix logic retry opening files on failure. |
| |
| 2020-04-23 Nikos Mouchtaris <nmouchtaris@apple.com> |
| |
| Soft link QuickLookThumbnailing framework |
| https://bugs.webkit.org/show_bug.cgi?id=210894 |
| |
| Reviewed by Megan Gardner. |
| |
| Soft link QuickLookThumbnailing framework to solve build error. |
| |
| No new tests. Unnecessary. |
| |
| * Configurations/WebKit.xcconfig: |
| * UIProcess/QuickLookThumbnailLoader.mm: |
| (-[WKQLThumbnailLoadOperation initWithURL:identifier:]): |
| (-[WKQLThumbnailLoadOperation start]): |
| * UIProcess/QuickLookThumbnailingSPI.h: Added. |
| * UIProcess/QuickLookThumbnailingSoftLink.h: Added. |
| * UIProcess/QuickLookThumbnailingSoftLink.mm: Added. |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-04-23 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Port MediaPlayback process assertion to RunningBoard |
| https://bugs.webkit.org/show_bug.cgi?id=210212 |
| <rdar://problem/61476951> |
| |
| Reviewed by Geoff Garen. |
| |
| Port MediaPlayback process assertion to RunningBoard instead of the legacy BKSProcessAssertion. |
| We can now #ifdef out the legacy BKSProcessAssertion on recent iOS builds. |
| |
| * UIProcess/ProcessAssertion.h: |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::runningBoardNameForAssertionType): |
| (WebKit::ProcessAssertion::ProcessAssertion): |
| (WebKit::ProcessAssertion::~ProcessAssertion): |
| |
| 2020-04-23 John Frankish <john.frankish@outlook.com> |
| |
| [GTK] Crash in cairo_surface_mark_dirty_rectangle() in accelerated compositing mode under X11 |
| https://bugs.webkit.org/show_bug.cgi?id=210636 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| When cairo is configured to use xcb instead of xlib, it might use an image surface attached to the xlib one as |
| snapshot. In that case a flush is needed to detach that snapshot after we have drawn the surface in the |
| context. |
| |
| * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: |
| (WebKit::AcceleratedBackingStoreX11::paint): Call cairo_surface_flush() after drawing. |
| |
| 2020-04-23 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r260133. |
| |
| We can use RunningBoard foreground assertion again now that |
| <rdar://problem/61830390> has been fixed |
| |
| Reverted changeset: |
| |
| "REGRESSION (r259610): WebGL does not work at all on iOS (was: |
| Google Maps tiles turn black after initial load)" |
| https://trac.webkit.org/changeset/260133 |
| |
| 2020-04-22 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r260553. |
| |
| Broke iOS and Catalina builds. |
| |
| Reverted changeset: |
| |
| "Soft link QuickLookThumbnailing framework" |
| https://bugs.webkit.org/show_bug.cgi?id=210894 |
| https://trac.webkit.org/changeset/260553 |
| |
| 2020-04-22 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Build with UChar as char16_t even in builds that use Apple's internal SDK |
| https://bugs.webkit.org/show_bug.cgi?id=210845 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Configurations/BaseTarget.xcconfig: Move ICU-configuring macros to Platform.h. |
| |
| * Platform/unix/EnvironmentUtilities.h: Removed unneeded includes. |
| This sidesteps a problem with Apple's internal InstallAPI tool that happens |
| if StringView.h is included and Platform.h is not included first. |
| |
| * UIProcess/API/cpp/WKRetainPtr.h: Removed unneeded includes, and used |
| #pragma once. |
| |
| * UIProcess/Cocoa/PreferenceObserver.h: Moved most things out of the header, |
| since they don't need to be there. |
| * UIProcess/Cocoa/PreferenceObserver.mm: Moved them here including using a |
| class extension for the data member of WKPreferenceObserver. |
| |
| * UIProcess/ios/fullscreen/FullscreenTouchSecheuristicParameters.h: |
| Removed unneeded WTF prefix. |
| |
| 2020-04-22 Nikos Mouchtaris <nmouchtaris@apple.com> |
| |
| Soft link QuickLookThumbnailing framework |
| https://bugs.webkit.org/show_bug.cgi?id=210894 |
| |
| Reviewed by Tim Horton. |
| |
| Soft link QuickLookThumbnailing framework to solve build error. |
| |
| No new tests. Unnecessary. |
| |
| * Configurations/WebKit.xcconfig: |
| * UIProcess/QuickLookThumbnailLoader.mm: |
| (-[WKQLThumbnailLoadOperation initWithURL:identifier:]): |
| (-[WKQLThumbnailLoadOperation start]): |
| * UIProcess/QuickLookThumbnailingSPI.h: Added. |
| * UIProcess/QuickLookThumbnailingSoftLink.h: Added. |
| * UIProcess/QuickLookThumbnailingSoftLink.mm: Added. |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| 2020-04-22 Daniel Bates <dabates@apple.com> |
| |
| Support toggling debug overlay for touch action region and editable element region independent from non-fast scrollable region |
| https://bugs.webkit.org/show_bug.cgi?id=210774 |
| |
| Reviewed by Dean Jackson. |
| |
| Expose two new enumerators to toggle touch action region and editable element region |
| overlay painting. |
| |
| * UIProcess/API/C/WKPreferencesRef.h: |
| * UIProcess/API/Cocoa/WKPreferencesPrivate.h: |
| |
| 2020-04-22 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache: |
| https://bugs.webkit.org/show_bug.cgi?id=210878 |
| <rdar://problem/62202276> |
| |
| Reviewed by Alex Christensen. |
| |
| Expose -_webView:willGoToBackForwardListItem:inPageCache: on iOS. |
| |
| * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: |
| * UIProcess/Cocoa/NavigationState.h: |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::setNavigationDelegate): |
| (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem): |
| |
| 2020-04-22 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Crash on RunningBoard process assertion invalidation |
| https://bugs.webkit.org/show_bug.cgi?id=210873 |
| <rdar://problem/62194917> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (-[WKRBSAssertionDelegate assertion:didInvalidateWithError:]): |
| Capture a weak pointer to self and make sure we only access the invalidation handler on |
| the main thread if |self| is still alive. |
| |
| (WebKit::ProcessAssertion::~ProcessAssertion): |
| Null out the WKRBSAssertionDelegate's observer in the ProcessAssertion destructor, to |
| make sure processAssertionWasInvalidated() cannot get called after the ProcessAssertion |
| has been destroyed. |
| |
| 2020-04-22 David Kilzer <ddkilzer@apple.com> |
| |
| IPC::decodeSharedBuffer() should check the return value of SharedMemory::map() |
| <https://webkit.org/b/210844> |
| <rdar://problem/60773120> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::decodeSharedBuffer): |
| - Add nullptr check and early return. |
| |
| 2020-04-22 Brent Fulgham <bfulgham@apple.com> |
| |
| Switch from debug ASSERT to RELEASE_ASSERT in toNPJSObject |
| https://bugs.webkit.org/show_bug.cgi?id=210823 |
| <rdar://problem/61774056> |
| |
| Reviewed by David Kilzer. |
| |
| * WebProcess/Plugins/Netscape/NPJSObject.h: |
| (WebKit::NPJSObject::toNPJSObject): |
| |
| 2020-04-22 Youenn Fablet <youenn@apple.com> |
| |
| Simplify SWServerWorker::whenActivated logic |
| https://bugs.webkit.org/show_bug.cgi?id=210795 |
| |
| Reviewed by Alex Christensen. |
| |
| Improve logging and update code according whenActivated implementation. |
| Add an early check for timeouts so that we return earlier in that case. |
| |
| * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp: |
| (WebKit::WebSWServerConnection::createFetchTask): |
| (WebKit::WebSWServerConnection::startFetch): |
| |
| 2020-04-21 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r260478. |
| |
| Caused TestWebKitAPI.WKAttachmentTests crashes on Catalina |
| |
| Reverted changeset: |
| |
| "Clean up QuickLookThumbnailLoader" |
| https://bugs.webkit.org/show_bug.cgi?id=210814 |
| https://trac.webkit.org/changeset/260478 |
| |
| 2020-04-21 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r260410. |
| |
| Caused crashes in Safari |
| |
| Reverted changeset: |
| |
| "SPI clients using fastServerTrustEvaluationEnabled need SPI |
| to inform them of modern TLS negotiation" |
| https://bugs.webkit.org/show_bug.cgi?id=210533 |
| https://trac.webkit.org/changeset/260410 |
| |
| 2020-04-21 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r260475. |
| |
| New assert caused layout tests to exit early on iOS and macOS |
| |
| Reverted changeset: |
| |
| "REGRESSION(r260410) Frequent Network process crashes" |
| https://bugs.webkit.org/show_bug.cgi?id=210825 |
| https://trac.webkit.org/changeset/260475 |
| |
| 2020-04-21 David Kilzer <ddkilzer@apple.com> |
| |
| IPC::Encoder::reserve() can be private |
| <https://webkit.org/b/210833> |
| <rdar://problem/62124193> |
| |
| Reviewed by Darin Adler. |
| |
| * Platform/IPC/Encoder.h: |
| (IPC::Encoder::reserve): |
| - Move from public to private. |
| |
| 2020-04-21 Stephan Szabo <stephan.szabo@sony.com> |
| |
| [PlayStation] Fix GPU Process build for VIDEO_PRESENTATION_MODE changes |
| https://bugs.webkit.org/show_bug.cgi?id=210836 |
| |
| Reviewed by Darin Adler. |
| |
| Build fix, no new tests. |
| |
| * GPUProcess/media/playstation/RemoteMediaPlayerProxyPlayStation.cpp: |
| |
| 2020-04-21 Peng Liu <peng.liu6@apple.com> |
| |
| Fix MACCATALYST build failures |
| https://bugs.webkit.org/show_bug.cgi?id=210815 |
| |
| Reviewed by Tim Horton. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (-[WKWebView _isShowingVideoPictureInPicture]): |
| (-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]): |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::applicationDidBecomeActive): |
| |
| 2020-04-19 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Use createNSArray in many more places that build NSArray objects from C++ collections |
| https://bugs.webkit.org/show_bug.cgi?id=210702 |
| |
| Reviewed by Alex Christensen. |
| |
| * Platform/cocoa/PaymentAuthorizationPresenter.mm: |
| (WebKit::toNSErrors): Use createNSArray and return a RetainPtr to cut down |
| on autorelease. |
| (WebKit::toPKShippingMethods): Ditto. |
| (WebKit::PaymentAuthorizationPresenter::completePaymentSession): Updated for RetainPtr. |
| (WebKit::PaymentAuthorizationPresenter::completeShippingContactSelection): Ditto. |
| |
| * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: |
| (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray. |
| Also removed code to support platforms without -setThumbnailURLs: since we don't |
| have those any more. |
| |
| * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm: |
| (WebKit::RemoteLayerTreePropertyApplier::updateChildren): Use createNSArray. |
| * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: |
| (coreCookiesToNSCookies); Ditto. |
| * UIProcess/API/Cocoa/WKProcessPool.mm: |
| (+[WKProcessPool _allProcessPoolsForTesting]): Ditto. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _startTextManipulationsWithConfiguration:completion:]): Cut down on |
| repeated code by adding a lambda to create a _WKTextManipulationItem and by using |
| createNSArray. |
| (wkTextManipulationErrors): Use createNSArray. Also tighten up the code that maps |
| WebCore::TextManipulationController::ManipulationFailureType to the |
| _WKTextManipulationItemError code. |
| |
| * UIProcess/API/Cocoa/WKWebpagePreferences.mm: |
| (-[WKWebpagePreferences _customHeaderFields]): Use createNSArray. |
| * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: |
| (-[WKWebsiteDataRecord _originsStrings]): Ditto. |
| * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: |
| (-[WKWebsiteDataStore _getResourceLoadStatisticsDataSummary:]): Ditto. |
| * UIProcess/API/Cocoa/_WKDownload.mm: |
| (-[_WKDownload redirectChain]): Ditto. |
| * UIProcess/API/Cocoa/_WKFrameTreeNode.mm: |
| (-[_WKFrameTreeNode childFrames]): Ditto. |
| * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: |
| (-[_WKProcessPoolConfiguration additionalReadAccessAllowedURLs]): Ditto. |
| * UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.mm: |
| (-[_WKResourceLoadStatisticsThirdParty underFirstParties]): Ditto. |
| * UIProcess/API/ios/WKWebViewIOS.mm: |
| (-[WKWebView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]): Ditto. |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::NavigationClient::didChangeBackForwardList): Ditto. |
| * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: |
| (WebKit::RemoteLayerTreeScrollingPerformanceData::data): Ditto. |
| * UIProcess/ios/DragDropInteractionState.mm: |
| (WebKit::createTargetedDragPreview): Ditto. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _updateTapHighlight]): Removed uneeded RetainPtr local variable. |
| Use createNSArray. Refactored to make the "all rectilinear" case more parallel |
| to the general case. |
| (-[WKContentView webSelectionRectsForSelectionRects:]): Use createNSArray. |
| (wkTextSelectionRects): Ditto. |
| (createTargetedPreview): Ditto. |
| (-[WKContentView _presentationRectsForPreviewItemController:]): Ditto. |
| |
| * UIProcess/mac/WKTextFinderClient.mm: |
| (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray. |
| |
| * UIProcess/mac/WKTextInputWindowController.mm: |
| (-[WKTextInputView validAttributesForMarkedText]): Use +[NSArray arrayByAddingObject:]. |
| |
| * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: |
| (collectIcons): Use createNSArray. |
| |
| * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: |
| (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Marked class here |
| as final. Cut down on local variables a bit. Use createNSArray. |
| |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm: |
| (WebKit::addAnimationToLayer): Removed unnecessary use of RetainPtr. Use createNSArray. |
| |
| * WebProcess/WebPage/WebBackForwardListProxy.cpp: |
| (WebKit::WebBackForwardListProxy::WebBackForwardListProxy): Addd a FIXME about |
| a problem I noticed, unrelated to the rest of the changes. |
| |
| * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: |
| (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]): Use createNSArray. |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::registerWithStateDumper): Ditto. |
| (WebKit::activePagesOrigins): Ditto. |
| |
| 2020-04-21 David Kilzer <ddkilzer@apple.com> |
| |
| Clean up QuickLookThumbnailLoader |
| <https://webkit.org/b/210814> |
| |
| Reviewed by Darin Adler. |
| |
| The following items are cleaned up: |
| - Extract `using PlatformImage` into QuickLookThumbnailLoader.h, |
| rename to `CocoaImage` and use to get rid of duplicate |
| code. |
| - Change `id` to `instancetype` for -init methods. |
| - Add `atomic` keyword to @property definitions that were using |
| it as the default. (Use of atomic properties is rare in |
| WebKit, so being explicit avoids a scenario where it looks |
| like `nonatomic` was left off by accident.) |
| - Change @property definitions to `readonly` that are never |
| written to outside of QuickLookThumbnailLoader.mm. |
| - Delete unused @property definitions. |
| - Change method declarations into read-only @property |
| definitions. |
| - Re-declare atomic read-only @property definitions in |
| QuickLookThumbnailLoader.h as read-write definitions in |
| QuickLookThumbnailLoader.mm if they are written to. |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::convertPlatformImageToBitmap): |
| * UIProcess/QuickLookThumbnailLoader.h: |
| - Rename qlThumbnailGenerationQueue @property to just `queue`. |
| - Remove `contentType` @property. It is not used anywhere. |
| This also fixes a theoretical leak found by the clang static |
| analyzer. |
| - Remove `shouldWrite` @property. It is only used within |
| QuickLookThumbnailLoader.mm. |
| - Change `identifier` and `thumbnail` to @property declarations. |
| * UIProcess/QuickLookThumbnailLoader.mm: |
| - Change WKQLThumbnailLoadOperation._identifier type from |
| NSMutableString to NSString. There was no reason for it to |
| be mutable. |
| (-[WKQLThumbnailQueueManager init]): |
| (-[WKQLThumbnailQueueManager dealloc]): |
| - Release `_queue` to fix theoretical leak found by the clang |
| static analyzer. |
| (-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]): |
| (-[WKQLThumbnailLoadOperation initWithURL:identifier:]): |
| (-[WKQLThumbnailLoadOperation start]): |
| - Rename `req` to `request` and use RetainPtr<>. |
| - Change separate #if macros to #if/#else since only one version |
| of this code can be used at a time. |
| (-[WKQLThumbnailLoadOperation thumbnail]): |
| - Use CocoaImage to use one copy of the method. |
| |
| 2020-04-21 David Kilzer <ddkilzer@apple.com> |
| |
| Fix extra/missing #undef statements |
| <https://webkit.org/b/210818> |
| <rdar://problem/61973329> |
| |
| Reviewed by Chris Dumez. |
| |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| - Remove #undef MESSAGE_CHECK_URL. It is no longer used. |
| * UIProcess/WebPageProxy.cpp: |
| - Add missing #undef MESSAGE_CHECK_COMPLETION. |
| - Sort #undef in reverse order of #define. |
| * UIProcess/mac/WebPageProxyMac.mm: |
| - Add missing #undef MESSAGE_CHECK_WITH_RETURN_VALUE. |
| - Sort #undef in reverse order of #define. |
| |
| 2020-04-21 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION(r260410) Frequent Network process crashes |
| https://bugs.webkit.org/show_bug.cgi?id=210825 |
| |
| Reviewed by Alex Christensen. |
| |
| The webPageProxyID in the NetworkProcessProxy::DidNegotiateModernTLS() IPC was invalid because |
| NetworkProcessProxy::preconnectTo() was failing to initialize NetworkLoadParameters::webPageProxyID. |
| This patch addresses the issue. |
| |
| No new tests, added new assertion that would be tripped by existing tests. |
| |
| * NetworkProcess/NetworkLoad.cpp: |
| (WebKit::NetworkLoad::NetworkLoad): |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::preconnectTo): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::preconnectTo): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::preconnectTo): |
| |
| 2020-04-21 Jer Noble <jer.noble@apple.com> |
| |
| PiP buttons shows up in element fullscreen when PiP is disabled in WKWebViewConfiguration |
| https://bugs.webkit.org/show_bug.cgi?id=210813 |
| |
| Reviewed by Eric Carlson. |
| |
| Not currently testable; entering fullscreen never completes in the iOS TestWebKitAPI app |
| because that process is not a UI Application. |
| |
| * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: |
| (-[WKFullScreenViewController videoControlsManagerDidChange]): |
| |
| 2020-04-21 Brent Fulgham <bfulgham@apple.com> |
| |
| [Cocoa] Don't bother compiling UpdateInfo since it's not used |
| https://bugs.webkit.org/show_bug.cgi?id=210819 |
| <rdar://problem/61774766> |
| |
| Reviewed by Darin Adler. |
| |
| Since we don't use the UpdateInfo class in Cocoa builds, let's not |
| bother building it. |
| |
| * Shared/UpdateInfo.cpp: |
| * Shared/UpdateInfo.h: |
| * UIProcess/DrawingAreaProxy.h: |
| |
| 2020-04-21 Timothy Horton <timothy_horton@apple.com> |
| |
| One more build fix after r260407 |
| |
| * Configurations/WebKit.xcconfig: |
| |
| 2020-04-21 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Provide better names for ProcessThrottler process assertions |
| https://bugs.webkit.org/show_bug.cgi?id=210808 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Provide better names for ProcessThrottler process assertions, to facilitate debugging. |
| |
| * UIProcess/GPU/GPUProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/ProcessAssertion.cpp: |
| (WebKit::ProcessAssertion::ProcessAssertion): |
| * UIProcess/ProcessAssertion.h: |
| * UIProcess/ProcessThrottler.cpp: |
| (WebKit::ProcessThrottler::assertionName const): |
| (WebKit::ProcessThrottler::setAssertionType): |
| * UIProcess/ProcessThrottler.h: |
| * UIProcess/ProcessThrottlerClient.h: |
| * UIProcess/WebProcessProxy.h: |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::ProcessAssertion::ProcessAssertion): |
| (WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion): |
| |
| 2020-04-21 Daniel Bates <dabates@apple.com> |
| |
| [iOS] -_didFinishTextInteractionInTextInputContext should only zoom to reveal focused element if it changed |
| https://bugs.webkit.org/show_bug.cgi?id=210697 |
| <rdar://problem/60997530> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Add a new state variable to use to track whether -_focusTextInputContext invoked during a |
| text interaction actually focused an element. Then in -_didFinishTextInteractionInTextInputContext |
| condition marking the page to reveal the focused element on this state. |
| |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _willBeginTextInteractionInTextInputContext:]): Turn around and call the same |
| function on the content view. |
| (-[WKWebView _didFinishTextInteractionInTextInputContext:]): Ditto. |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView cleanUpInteraction]): Reset state. |
| (-[WKContentView _didCommitLoadForMainFrame]): Ditto. |
| (-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): Update state to |
| indicate whether the focusd element did change or not. I use bitwise ORing instead of strict |
| assignment to update it because this function can be called multiple times by an internal |
| Apple client during a text interaction (e.g. <rdar://problem/59430806>). I thought about |
| making this a FIXME, but this function is otherwise capable of handling multiple invocations |
| so I didn't. |
| (-[WKContentView _willBeginTextInteractionInTextInputContext:]): Reset added state. |
| (-[WKContentView _didFinishTextInteractionInTextInputContext:]): Check if state was set to |
| indicate that a focus change happened. If so, do what we do now + reset state. Otherwise, |
| do everything we do now except for marking the page as needing to reveal the focused element |
| on the next editor state update. |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::focusTextInputContextAndPlaceCaret): Check that the target is focusable |
| before calling FocusController::setFocusedElement() because it ultimately calls Document::setFocusedElement() |
| that can return true for a non-focusable element. I added a comment in Document.h to explain |
| this subtlety. I also decided not to check the return value of FocusController::setFocusedElement(). |
| Instead I am checking the more important condition that the focused element is the target |
| element. Passing true to visiblePositionInFocusedNodeForPoint() will ultimately assert this |
| to be true. Note that setFocusedElement() may not have done anything as m_focusedElement |
| could have already been equal to the target element. This is OK and I still update the |
| caret position. |
| |
| 2020-04-21 Timothy Hatcher <timothy@apple.com> |
| |
| Reset m_userScriptsNotified when web process crashes. |
| https://bugs.webkit.org/show_bug.cgi?id=210807 |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebPageProxy::resetStateAfterProcessExited): Set m_userScriptsNotified to false. |
| |
| 2020-04-21 Timothy Horton <timothy_horton@apple.com> |
| |
| Fix the build |
| |
| * Configurations/WebKit.xcconfig: |
| |
| 2020-04-21 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] ShareableResource::create() should validate its parameters |
| <https://webkit.org/b/210779> |
| <rdar://problem/60887693> |
| |
| Reviewed by Chris Dumez. |
| |
| * NetworkProcess/cache/NetworkCache.cpp: |
| (WebKit::NetworkCache::Cache::store): |
| * NetworkProcess/cache/NetworkCacheEntry.cpp: |
| (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const): |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::didFinishLoadForQuickLookDocumentInMainFrame): |
| - Handle nullptr returned from ShareableResource::create(). |
| |
| * Shared/ShareableResource.cpp: |
| (WebKit::ShareableResource::create): |
| - Change to return RefPtr<>. |
| - Validate parameters before calling constructor. Return |
| nullptr on failure. |
| (WebKit::ShareableResource::ShareableResource): |
| - Remove assert and comment since checks are now done in |
| ShareableResource::create(). |
| * Shared/ShareableResource.h: |
| (WebKit::ShareableResource::create): |
| - Change to return RefPtr<>. |
| |
| 2020-04-21 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Cocoa] Tighten up some more IPC message checks in WebPasteboardProxy |
| https://bugs.webkit.org/show_bug.cgi?id=210780 |
| <rdar://problem/62088479> |
| |
| Reviewed by Alex Christensen. |
| |
| Adjust some existing IPC message checks in WebPasteboardProxy, and also introduces some new ones. See below for |
| more details. |
| |
| * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: |
| (WebKit::WebPasteboardProxy::didModifyContentsOfPasteboard): |
| |
| Move the `pasteboardName` check here out of `didModifyContentsOfPasteboard`, and into each call site, such that |
| we bail and kill the web process before invoking `didModifyContentsOfPasteboard` in the case where the name is |
| empty. |
| |
| (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): |
| (WebKit::WebPasteboardProxy::getPasteboardStringForType): |
| (WebKit::WebPasteboardProxy::getPasteboardStringsForType): |
| (WebKit::WebPasteboardProxy::getPasteboardBufferForType): |
| (WebKit::WebPasteboardProxy::addPasteboardTypes): |
| (WebKit::WebPasteboardProxy::setPasteboardTypes): |
| (WebKit::WebPasteboardProxy::setPasteboardURL): |
| (WebKit::WebPasteboardProxy::setPasteboardColor): |
| (WebKit::WebPasteboardProxy::setPasteboardStringForType): |
| |
| Add message checks for empty pasteboard types. |
| |
| (WebKit::WebPasteboardProxy::setPasteboardBufferForType): |
| (WebKit::WebPasteboardProxy::writeCustomData): |
| (WebKit::WebPasteboardProxy::readStringFromPasteboard): |
| (WebKit::WebPasteboardProxy::readBufferFromPasteboard): |
| (WebKit::WebPasteboardProxy::writeURLToPasteboard): |
| (WebKit::WebPasteboardProxy::writeWebContentToPasteboard): |
| (WebKit::WebPasteboardProxy::writeImageToPasteboard): |
| (WebKit::WebPasteboardProxy::writeStringToPasteboard): |
| |
| Add a message check for empty pasteboard types, but only when the string is also empty; this is because iOS |
| clears pasteboard data by writing an empty pasteboard string and type. |
| |
| 2020-04-21 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake |
| https://bugs.webkit.org/show_bug.cgi?id=210792 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * PlatformGTK.cmake: Use the GTK::UnixPrint imported target. |
| |
| 2020-04-21 Philippe Normand <pnormand@igalia.com> |
| |
| [CMake] gst-build-backed build fails |
| https://bugs.webkit.org/show_bug.cgi?id=210742 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * PlatformWPE.cmake: |
| |
| 2020-04-21 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes late February 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=210767 |
| |
| Unreviewed build fix. |
| |
| * NetworkProcess/NetworkResourceLoadMap.h: Add missing wtf/Function.h header. |
| |
| 2020-04-20 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Classes marked final should not use protected access specifier |
| https://bugs.webkit.org/show_bug.cgi?id=210775 |
| |
| Reviewed by Daniel Bates. |
| |
| * Shared/API/APIDictionary.h: |
| * WebProcess/GPU/media/TextTrackPrivateRemote.h: |
| * WebProcess/Plugins/Netscape/JSNPMethod.h: |
| * WebProcess/Plugins/Netscape/JSNPObject.h: |
| |
| 2020-04-20 Peng Liu <peng.liu6@apple.com> |
| |
| Fix build failures when video fullscreen and picture-in-picture is disabled |
| https://bugs.webkit.org/show_bug.cgi?id=210777 |
| |
| Reviewed by Eric Carlson. |
| |
| Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)". |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * GPUProcess/media/RemoteMediaPlayerProxy.cpp: |
| (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): |
| (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): |
| (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): |
| (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): |
| (WebKit::RemoteMediaPlayerProxy::setBufferingPolicy): |
| * GPUProcess/media/RemoteMediaPlayerProxy.h: |
| * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: |
| * GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: |
| (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): |
| * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: |
| (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): |
| |
| 2020-04-20 Alex Christensen <achristensen@webkit.org> |
| |
| SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation |
| https://bugs.webkit.org/show_bug.cgi?id=210533 |
| |
| Reviewed by Brady Eidson. |
| |
| * NetworkProcess/NetworkDataTask.h: |
| (WebKit::NetworkDataTaskClient::didNegotiateModernTLS): |
| * NetworkProcess/NetworkLoad.cpp: |
| (WebKit::NetworkLoad::didNegotiateModernTLS): |
| * NetworkProcess/NetworkLoad.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::didNegotiateModernTLS): |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): |
| * UIProcess/API/APINavigationClient.h: |
| (API::NavigationClient::didNegotiateModernTLS): |
| * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: |
| * UIProcess/Cocoa/NavigationState.h: |
| * UIProcess/Cocoa/NavigationState.mm: |
| (WebKit::NavigationState::setNavigationDelegate): |
| (WebKit::NavigationState::NavigationClient::didNegotiateModernTLS): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::didNegotiateModernTLS): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-04-20 Kate Cheney <katherine_cheney@apple.com> |
| |
| App-bound domain behavior should abide by the limitsNavigationsToAppBoundDomains argument in WKWebView configuration |
| https://bugs.webkit.org/show_bug.cgi?id=210769 |
| <rdar://problem/62065241> |
| |
| Reviewed by Brent Fulgham. |
| |
| Changes app-bound domain behavior to be triggered by the value of |
| limitsNavigationsToAppBoundDomains, a WebView configuration flag. |
| If the WebView has this parameter set and is currently navigating to |
| an app bound domain, then app-bound privileges will be granted. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted): |
| Update this function to return a boolean to indicate whether the |
| navigation should fail. A failure should occur if a WebView has set |
| the limitsNavigationsToAppBoundDomains flag and attempts to navigate |
| away from an app-bound domain. |
| |
| If the limitsNavigationsToAppBoundDomains value has not been set to |
| true, maintain non-app bound behavior regardless of whether the domain |
| is app-bound or not. |
| |
| (WebKit::WebPageProxy::decidePolicyForNavigationAction): |
| Check the result of setIsNavigatingToAppBoundDomainAndCheckIfPermitted and fail the |
| navigation if needed, with both RELEASE logging and an appropriate |
| error message. |
| |
| (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain): Deleted. |
| * UIProcess/WebPageProxy.h: |
| Renamed for clarity. |
| |
| 2020-04-20 Nikos Mouchtaris <nmouchtaris@apple.com> |
| |
| WK2 Quicklook for attachments |
| https://bugs.webkit.org/show_bug.cgi?id=208891 |
| |
| Reviewed by Darin Adler. |
| |
| Allow attachment elements to render QuickLook thumbnail generated |
| from contents of the file as its icon, rather than the default |
| icons associated with each mime type. |
| |
| * Configurations/WebKit.xcconfig: |
| Link QuickLook thumbnailing framework. |
| * UIProcess/API/APIAttachment.h: |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]): |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| Create thumbnail request and add to queue. |
| (WebKit::convertNSImageToBitmap): |
| (WebKit::convertUIImageToBitmap): |
| (WebKit::WebPageProxy::getQLThumbnailForGenerationRequestion): |
| (WebKit::WebPageProxy::getQLThumbnailForFileWrapper): |
| (WebKit::WebPageProxy::getQLThumbnailForAttachment): |
| * UIProcess/QLThumbnailLoad.h: Added. |
| * UIProcess/QLThumbnailLoad.mm: Added. |
| Add code to request thumbnail for file data. |
| (-[WKQLThumbnailQueueManager init]): |
| (+[WKQLThumbnailQueueManager sharedInstance]): |
| (-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]): |
| (-[WKQLThumbnailLoadOperation initWithURL:identifier:]): |
| (-[WKQLThumbnailLoadOperation start]): |
| (-[WKQLThumbnailLoadOperation isAsynchronous]): |
| (-[WKQLThumbnailLoadOperation isExecuting]): |
| (-[WKQLThumbnailLoadOperation setExecuting:]): |
| (-[WKQLThumbnailLoadOperation isFinished]): |
| (-[WKQLThumbnailLoadOperation setFinished:]): |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::updateAttachmentIcon): |
| Set thumbnail of attachment element |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| Thumbnail request message. |
| |
| 2020-04-20 Kate Cheney <katherine_cheney@apple.com> |
| |
| Unreviewed macCatalyst build fix. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess): |
| (WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride): |
| |
| 2020-04-20 Simon Fraser <simon.fraser@apple.com> |
| |
| Scrolling with background-attachment: fixed needs to trigger repaints |
| https://bugs.webkit.org/show_bug.cgi?id=193893 |
| <rdar://problem/47587017> |
| |
| Reviewed by Dean Jackson. |
| |
| When scrolling an overflow scroll which has "background-atttachment:fixed" in the content, |
| the node will have non-empty synchronous scrolling reasons. In this case we need to |
| send the scroll to the main thread, and trigger a repaint on scroll. |
| |
| If handling the wheel event on the scrolling thread determines that the scroll must be sent |
| to the main thread, EventDispatcher::wheelEvent() does so in the callback function. |
| |
| To trigger the repaint, RenderLayer::scrollTo() asks the composited layers backing whether |
| the node has synchronous scrolling reasons; this is implemented by asking the scrolling |
| coordinator. |
| |
| * WebProcess/WebPage/EventDispatcher.cpp: |
| (WebKit::EventDispatcher::wheelEvent): |
| |
| 2020-04-20 Megan Gardner <megan_gardner@apple.com> |
| |
| Date and Time form controls not showing correct initial values on immediate second invocation. |
| https://bugs.webkit.org/show_bug.cgi?id=210613 |
| |
| Reviewed by Wenson Hsieh. |
| |
| Updating the webprocess with the newly picked time did not update the local store of that data in the |
| UI process, so when the control was activated a second time, and we skipped the round trip to the |
| webprocess to get the data we were certian we already had, we did not start the popover in the |
| correct state. We now update the webprocess and the local UI stored variable at the same time. |
| |
| Test: fast/forms/ios/time-picker-value-change.html |
| |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView timePickerValueHour]): |
| (-[WKWebView timePickerValueMinute]): |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView updateValueAsNumberForViewController:]): |
| (-[WKContentView updateValueForViewController:]): |
| (-[WKContentView setTimePickerValueToHour:minute:]): |
| (-[WKContentView timePickerValueHour]): |
| (-[WKContentView timePickerValueMinute]): |
| * UIProcess/ios/forms/WKFormInputControl.h: |
| * UIProcess/ios/forms/WKFormInputControl.mm: |
| (-[WKDateTimePicker hour]): |
| (-[WKDateTimePicker minute]): |
| (-[WKDateTimePicker _dateChangedSetAsNumber]): |
| (-[WKDateTimePicker _dateChangedSetAsString]): |
| (-[WKDateTimePicker setHour:minute:]): |
| (-[WKFormInputControl setTimePickerHour:minute:]): |
| (-[WKFormInputControl timePickerValueHour]): |
| (-[WKFormInputControl timePickerValueMinute]): |
| (-[WKDateTimePopover setHour:minute:]): |
| (-[WKDateTimePopover hour]): |
| (-[WKDateTimePopover minute]): |
| |
| 2020-04-20 Timothy Horton <timothy_horton@apple.com> |
| |
| Try to fix the macCatalyst build after r260366 |
| |
| * UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h: |
| |
| 2020-04-20 Stephan Szabo <stephan.szabo@sony.com> |
| |
| Fix build when !ENABLE(RESOURCE_LOAD_STATISTICS) |
| https://bugs.webkit.org/show_bug.cgi?id=210757 |
| |
| Reviewed by Ross Kirsling. |
| |
| Build fix, no new tests |
| |
| * NetworkProcess/NetworkDataTask.cpp: |
| Add ENABLE(RESOURCE_LOAD_STATISTICS) around block |
| using NetworkSession functions only declared when |
| that is enabled. |
| |
| 2020-04-20 Alex Christensen <achristensen@webkit.org> |
| |
| When SpeculativeLoadManager is destroyed, properly clean up its PendingFrameLoads |
| https://bugs.webkit.org/show_bug.cgi?id=210759 |
| <rdar://problem/62056856> |
| |
| Reviewed by Darin Adler. |
| |
| Recent work on the resourceLoadStatistics layout tests increased the amount we swap out the WebsiteDataStore. |
| When this happens, the NetworkSession is eventually destroyed in the NetworkProcess, sometimes when running the next test. |
| An assertion was firing in the PendingFrameLoad destructor because it hadn't been marked as complete when it was destroyed. |
| Rather than remove the assertion, when we destroy the SpeculativeLoadManager (which only happens when a WebsiteDataStore |
| is destroyed) during a speculative pending frame load, just mark the pending frame load as complete because it is being cancelled. |
| Marking the pending frame load as complete can tell the SpeculativeLoadManager to mutate m_pendingFrameLoads, which we don't want |
| to do while iterating, so copy the RefPtrs into a Vector first then iterate that to get them all. |
| |
| This fixes an assertion that was sometimes hit in http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html |
| but only after running other tests that had initiated speculative pending frame loads. This was ostensibly started by r260322 but is quite unrelated. |
| |
| * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: |
| (WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager): |
| |
| 2020-04-20 Stephan Szabo <stephan.szabo@sony.com> |
| |
| [PlayStation] Fix build after r260277 |
| https://bugs.webkit.org/show_bug.cgi?id=210756 |
| |
| Reviewed by Don Olmstead. |
| |
| Build fix, no new tests. |
| |
| * PlatformPlayStation.cmake: |
| |
| 2020-04-20 Chris Dumez <cdumez@apple.com> |
| |
| Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess |
| https://bugs.webkit.org/show_bug.cgi?id=210753 |
| <rdar://problem/61896221> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::WebLoaderStrategy::startPingLoad): |
| Make sure NetworkResourceLoadParameters's webPageProxyID / webPageID / webFrameID are properly |
| initialized before sending the IPC or IPC decoding will fail. |
| |
| 2020-04-20 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Use ObjectIdentifier<> for geolocationID |
| <https://webkit.org/b/210680> |
| <rdar://problem/58892340> |
| |
| Reviewed by Chris Dumez. |
| |
| Replace uses of uint64_t with GeolocationIdentifier. |
| |
| * Scripts/webkit/messages.py: |
| * UIProcess/GeolocationIdentifier.h: Add. |
| * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: |
| (WebKit::GeolocationPermissionRequestManagerProxy::createRequest): |
| (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision): |
| * UIProcess/GeolocationPermissionRequestManagerProxy.h: |
| * UIProcess/GeolocationPermissionRequestProxy.cpp: |
| (WebKit::GeolocationPermissionRequestProxy::GeolocationPermissionRequestProxy): |
| * UIProcess/GeolocationPermissionRequestProxy.h: |
| (WebKit::GeolocationPermissionRequestProxy::create): |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: |
| (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation): |
| (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation): |
| (WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision): |
| (WebKit::generateGeolocationID): Delete. |
| - Replace with GeolocationIdentifier::generate(). |
| * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::didReceiveGeolocationPermissionDecision): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-20 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Refactor WebKit media playback process assertion logic to minimize chances of leaking them |
| https://bugs.webkit.org/show_bug.cgi?id=210670 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Refactor WebKit media playback process assertion logic to minimize chances of leaking them. In particular, |
| the following changes were made: |
| 1. Instead of the WebProcessPool having a HashMap of media playback process assertions for |
| the WebProcess, we now store the assertion on the WebProcessProxy object itself. This is |
| less likely to get out of sync and leak. |
| 2. Add a RefCounter to the WebProcessPool to count WebProcesses that have audible media. |
| Whenever a WebProcess starts or stops playing audible media, it merely grabs a RefCounter |
| token or releases it. The WebProcessPool relies on this counter to decide whether or not |
| to take a media playback assertion on behalf of the UIProcess. Since this is token-based |
| and the token is stored on the WebProcessProxy object, it makes it less likely to leak |
| the assertion. |
| 3. The WebProcessProxy object now has a AudibleMediaActivity data structure wrapping both |
| its media playback assertion and its WebProcessWithAudibleMediaToken that it got from |
| the WebProcessPool. When the WebProcess shuts down (normally or due to crash/termination), |
| we make sure to clear this data structure. |
| 4. Make sure that the WebProcessProxy updates its AudibleMediaActivity whenever a page is |
| removed from the WebProcess. |
| |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::m_webProcessWithAudibleMediaCounter): |
| (WebKit::WebProcessPool::disconnectProcess): |
| (WebKit::WebProcessPool::webProcessWithAudibleMediaToken const): |
| (WebKit::WebProcessPool::updateAudibleMediaAssertions): |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::shutDown): |
| (WebKit::WebProcessProxy::removeWebPage): |
| (WebKit::WebProcessProxy::updateAudibleMediaAssertions): |
| * UIProcess/WebProcessProxy.h: |
| |
| 2020-04-20 Kate Cheney <katherine_cheney@apple.com> |
| |
| <rdar://problem/62059046> |
| |
| Unreviewed macCatalyst build fix. |
| |
| * NetworkProcess/NetworkProcess.messages.in: |
| |
| 2020-04-20 Darin Adler <darin@apple.com> |
| |
| Use #import instead of #include in Objective-C and don't use #pragma once |
| https://bugs.webkit.org/show_bug.cgi?id=210724 |
| |
| Reviewed by David Kilzer. |
| |
| * mac/MigrateHeadersFromWebKitLegacy.make: Delete stale MemoryMeasure.h |
| forwarding header from incremental WebKit builds and ignore when generating |
| new forwarding headers. |
| |
| * Platform/foundation/LoggingFoundation.mm: |
| (WebKit::logLevelString): Use string directly instead of a named constant. |
| |
| * UIProcess/mac/WebColorPickerMac.h: Mark class final. |
| |
| * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: |
| * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: |
| * NetworkProcess/cache/NetworkCacheDataCocoa.mm: |
| * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: |
| * NetworkProcess/cocoa/NetworkActivityTrackerCocoa.mm: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| * NetworkProcess/webrtc/NetworkRTCProvider.mm: |
| * Platform/spi/Cocoa/DeviceManagementSPI.h: |
| * Platform/spi/Cocoa/LocalAuthenticationSPI.h: |
| * Platform/spi/Cocoa/NearFieldSPI.h: |
| * Platform/spi/Cocoa/SafeBrowsingSPI.h: |
| * Platform/spi/mac/AppKitSPI.h: |
| * Shared/API/Cocoa/RemoteObjectInvocation.mm: |
| * Shared/API/Cocoa/WKMain.mm: |
| * Shared/APIWebArchive.mm: |
| * Shared/APIWebArchiveResource.mm: |
| * Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm: |
| * Shared/Cocoa/LoadParametersCocoa.mm: |
| * Shared/Cocoa/SandboxInitialiationParametersCocoa.mm: |
| * Shared/Cocoa/WKNSData.mm: |
| * Shared/DocumentEditingContext.mm: |
| * Shared/Plugins/mac/PluginSandboxProfile.mm: |
| * Shared/RemoteLayerTree/WKAnimationDelegate.h: |
| * Shared/UserInterfaceIdiom.mm: |
| * Shared/ios/WebIconUtilities.mm: |
| * Shared/mac/CodeSigning.mm: |
| * Shared/mac/ColorSpaceData.mm: |
| * Shared/mac/HangDetectionDisablerMac.mm: |
| * Shared/mac/PDFKitImports.mm: |
| * UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm: |
| * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: |
| * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: |
| * UIProcess/API/Cocoa/WKContentRuleList.mm: |
| * UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm: |
| * UIProcess/API/Cocoa/WKNavigationActionPrivate.h: |
| * UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm: |
| * UIProcess/API/Cocoa/WKWebViewInternal.h: |
| * UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h: |
| * UIProcess/API/Cocoa/_WKApplicationManifest.h: |
| * UIProcess/API/Cocoa/_WKAttachment.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadInfoInternal.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstPartyInternal.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdPartyInternal.h: |
| * UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.mm: |
| * UIProcess/API/Cocoa/_WKUserContentFilter.mm: |
| * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h: |
| * UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h: |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h: |
| * UIProcess/Authentication/mac/WebCredentialMac.mm: |
| * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: |
| * UIProcess/Cocoa/IconLoadingDelegate.mm: |
| * UIProcess/Cocoa/MediaUtilities.mm: |
| * UIProcess/Cocoa/PreferenceObserver.h: |
| * UIProcess/Cocoa/PreferenceObserver.mm: |
| * UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm: |
| * UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h: |
| * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm: |
| * UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h: |
| * UIProcess/Cocoa/WKEditCommand.h: |
| * UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h: |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: |
| * UIProcess/Inspector/mac/WKInspectorViewController.h: |
| * UIProcess/Inspector/mac/WKInspectorWKWebView.h: |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h: |
| * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: |
| * UIProcess/RemoteLayerTree/mac/ScrollerMac.mm: |
| * UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm: |
| * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: |
| * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| * UIProcess/ios/WKDeferringGestureRecognizer.h: |
| * UIProcess/ios/WKHighlightLongPressGestureRecognizer.h: |
| * UIProcess/ios/WebDataListSuggestionsDropdownIOS.h: |
| * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm: |
| * UIProcess/ios/forms/WKDatePickerViewController.h: |
| * UIProcess/ios/forms/WKDatePickerViewController.mm: |
| * UIProcess/ios/forms/WKFocusedFormControlView.h: |
| * UIProcess/ios/forms/WKFocusedFormControlView.mm: |
| * UIProcess/ios/forms/WKFormColorPicker.mm: |
| * UIProcess/ios/forms/WKNumberPadViewController.h: |
| * UIProcess/ios/forms/WKNumberPadViewController.mm: |
| * UIProcess/ios/forms/WKQuickboardListViewController.h: |
| * UIProcess/ios/forms/WKQuickboardListViewController.mm: |
| * UIProcess/ios/forms/WKSelectMenuListViewController.h: |
| * UIProcess/ios/forms/WKTimePickerViewController.h: |
| * UIProcess/ios/forms/WKTimePickerViewController.mm: |
| * UIProcess/ios/fullscreen/WKFullScreenViewController.h: |
| * UIProcess/ios/fullscreen/WKFullscreenStackView.h: |
| * UIProcess/ios/fullscreen/WKFullscreenStackView.mm: |
| * UIProcess/mac/PageClientImplMac.mm: |
| * UIProcess/mac/WKSharingServicePickerDelegate.h: |
| * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: |
| * WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.h: |
| * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: |
| * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm: |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm: |
| * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp: |
| * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: |
| * WebProcess/WebPage/mac/PageBannerMac.mm: |
| * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: |
| * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| More #import, less #pragma once. |
| |
| 2020-04-20 Pablo Saavedra <psaavedra@igalia.com> |
| |
| [GTK][WPE] lowWatermarkPages() in MemoryPressureMonitor.cpp only searches the "low" value inside the first "Node" section |
| https://bugs.webkit.org/show_bug.cgi?id=210345 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/linux/MemoryPressureMonitor.cpp: |
| (WebKit::lowWatermarkPages): |
| |
| 2020-04-20 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Enable resource load statistics |
| https://bugs.webkit.org/show_bug.cgi?id=210184 |
| |
| Reviewed by Žan Doberšek. |
| |
| * NetworkProcess/NetworkDataTask.cpp: |
| (WebKit::NetworkDataTask::create): Pass page and frame identifiers to the constructor. |
| (WebKit::NetworkDataTask::isThirdPartyRequest const): Moved from NetworkDataTaskCocoa.mm. |
| (WebKit::NetworkDataTask::restrictRequestReferrerToOriginIfNeeded): Ditto. |
| * NetworkProcess/NetworkDataTask.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| * NetworkProcess/soup/NetworkDataTaskSoup.cpp: |
| (WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Initialize m_frameID and m_pageID. |
| (WebKit::NetworkDataTaskSoup::createRequest): Add WasBlockingCookies parameter. Call |
| restrictRequestReferrerToOriginIfNeeded() and disable cookies in the soup message if cookies should be blocked. |
| (WebKit::NetworkDataTaskSoup::clearRequest): Reset m_isBlockingCookies. |
| (WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Pass WasBlockingCookies to createRequest(). |
| * NetworkProcess/soup/NetworkDataTaskSoup.h: |
| * UIProcess/API/C/WKPage.cpp: |
| (WKPageLoadedThirdPartyDomains): Added for tests. |
| (WKPageClearLoadedThirdPartyDomains): Ditto. |
| * UIProcess/API/C/WKPagePrivate.h: |
| * UIProcess/glib/WebsiteDataStoreGLib.cpp: |
| (WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Use lowercase for consistency with other |
| default directories. |
| |
| 2020-04-20 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r259610): Leak of RBSAssertionInvalidationCallbackType due to missing -dealloc |
| <https://webkit.org/b/210711> |
| <rdar://problem/61993361> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (-[WKRBSAssertionDelegate dealloc]): Add. |
| - Release _invalidationCallback to fix the leak. |
| |
| 2020-04-19 Brady Eidson <beidson@apple.com> |
| |
| Add WKScriptMessageHandler API that asynchronously responds with a promise. |
| rdar://problem/57243492 and https://bugs.webkit.org/show_bug.cgi?id=206398 |
| |
| Reviewed by Andy Estes. |
| |
| Change webkit.messageHandlers.<name>.postMessage() to return a promise instead of undefined. |
| |
| Allow for that promise to be resolved by an asynchronous reply block up in the API client. |
| This is like the spiritual opposite version of [WKWebView callAsyncFunction:...] |
| |
| And while we're adding a new script message handler variant, we're adding it sandboxed by WKContentWorld. |
| |
| * Shared/API/APISerializedScriptValue.h: |
| * UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: |
| (API::validateObject): |
| (API::coreValueFromNSObject): |
| (API::SerializedScriptValue::createFromNSObject): |
| (API::SerializedScriptValue::wireBytesFromNSObject): Deleted. |
| |
| * UIProcess/API/Cocoa/WKScriptMessage.h: Now that script message handlers can be per-world, messages |
| declare which world they were posted from. |
| * UIProcess/API/Cocoa/WKScriptMessage.mm: |
| (-[WKScriptMessage _initWithBody:webView:frameInfo:name:world:]): |
| (-[WKScriptMessage world]): |
| (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]): Deleted. |
| * UIProcess/API/Cocoa/WKScriptMessageInternal.h: |
| |
| * UIProcess/API/Cocoa/WKScriptMessageHandlerWithReply.h: Added. |
| Declare the new protocol for a script message handler that can reply to messages asynchronously. |
| |
| * UIProcess/API/Cocoa/WKUserContentController.h: |
| * UIProcess/API/Cocoa/WKUserContentController.mm: |
| (-[WKUserContentController _addScriptMessageHandler:]): |
| (-[WKUserContentController addScriptMessageHandler:name:]): |
| (-[WKUserContentController addScriptMessageHandler:contentWorld:name:]): |
| (-[WKUserContentController addScriptMessageHandlerWithReply:contentWorld:name:]): |
| (-[WKUserContentController removeScriptMessageHandlerForName:contentWorld:]): |
| (-[WKUserContentController removeAllScriptMessageHandlersFromContentWorld:]): |
| (-[WKUserContentController removeAllScriptMessageHandlers]): |
| * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: |
| * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]): |
| Update for new shared API::SerializedScriptValue initialization. |
| |
| * UIProcess/API/glib/WebKitUserContentManager.cpp: |
| * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: |
| * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: |
| |
| * UIProcess/UserContent/WebScriptMessageHandler.h: |
| * UIProcess/UserContent/WebUserContentControllerProxy.cpp: |
| (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers): |
| (WebKit::WebUserContentControllerProxy::didPostMessage): |
| * UIProcess/UserContent/WebUserContentControllerProxy.h: |
| * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| |
| * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp: |
| (webkit_dom_dom_window_webkit_message_handlers_post_message): |
| |
| * WebProcess/UserContent/WebUserContentController.cpp: |
| (WebKit::WebUserContentController::removeAllUserScriptMessageHandlers): |
| (WebKit::WebUserContentController::removeAllUserScriptMessageHandlersForWorlds): |
| * WebProcess/UserContent/WebUserContentController.h: |
| * WebProcess/UserContent/WebUserContentController.messages.in: |
| |
| 2020-04-19 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r244091): Leak of TaskStateChangedCallbackType due to missing -dealloc |
| <https://webkit.org/b/210710> |
| <rdar://problem/61992856> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/Cocoa/ProcessTaskStateObserver.mm: |
| (-[WKProcessTaskStateObserverDelegate dealloc]): Add. |
| - Release _taskStateChangedCallback to fix the leak. |
| |
| 2020-04-19 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Use MESSAGE_CHECK in WebPageProxy::loadRecentSearches() and WebPageProxy::saveRecentSearches() |
| <https://webkit.org/b/210683> |
| <rdar://problem/59240446> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (MESSAGE_CHECK): Add. |
| (MESSAGE_CHECK_COMPLETION): Add. |
| (WebKit::WebPageProxy::saveRecentSearches): |
| (WebKit::WebPageProxy::loadRecentSearches): |
| - Replace boolean check of const String& with MESSAGE_CHECK. |
| |
| 2020-04-18 Darin Adler <darin@apple.com> |
| |
| Update header postprocessing version cutoff to keep Apple internal builds working |
| https://bugs.webkit.org/show_bug.cgi?id=210708 |
| |
| Reviewed by Brady Eidson. |
| |
| * Configurations/WebKit.xcconfig: Update versions to make building with older |
| Apple internal SDKs continue to work. |
| |
| * Shared/API/Cocoa/WKFoundation.h: |
| * Shared/API/Cocoa/_WKFrameHandle.h: |
| * Shared/API/Cocoa/_WKRemoteObjectInterface.h: |
| * UIProcess/API/Cocoa/WKContentWorld.h: |
| * UIProcess/API/Cocoa/WKFindConfiguration.h: |
| * UIProcess/API/Cocoa/WKFindResult.h: |
| * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: |
| * UIProcess/API/Cocoa/WKHTTPCookieStorePrivate.h: |
| * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: |
| * UIProcess/API/Cocoa/WKPDFConfiguration.h: |
| * UIProcess/API/Cocoa/WKPreferences.h: |
| * UIProcess/API/Cocoa/WKPreferencesPrivate.h: |
| * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: |
| * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: |
| * UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h: |
| * UIProcess/API/Cocoa/WKUserScriptPrivate.h: |
| * UIProcess/API/Cocoa/WKWebView.h: |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.h: |
| * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| * UIProcess/API/Cocoa/WKWebpagePreferences.h: |
| * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: |
| * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: |
| * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: |
| * UIProcess/API/Cocoa/_WKDownload.h: |
| * UIProcess/API/Cocoa/_WKFrameTreeNode.h: |
| * UIProcess/API/Cocoa/_WKInputDelegate.h: |
| * UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.h: |
| * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: |
| * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadDelegate.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadInfo.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.h: |
| * UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.h: |
| * UIProcess/API/Cocoa/_WKTextManipulationConfiguration.h: |
| * UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.h: |
| * UIProcess/API/Cocoa/_WKTextManipulationItem.h: |
| * UIProcess/API/Cocoa/_WKTextManipulationToken.h: |
| * UIProcess/API/Cocoa/_WKUserContentWorld.h: |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.h: |
| * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h: |
| * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: |
| * UIProcess/API/Cocoa/_WKWebsitePolicies.h: |
| Because the way we do post-processing of headers in the legacy Xcode |
| build system won't work once the files have been processed once, touch |
| each file that has WK_MAC_TBA, WK_IOS_TBA, or |
| WK_FRAMEWORK_HEADER_POSTPROCESSING_ENABLED in it. Found something to |
| change in each file. This is likely unnecessary in the new Xcode build |
| system, but I wasn't able to test that locally. |
| |
| * WebKit.xcodeproj/project.pbxproj: |
| (postprocess-header-rule): Added dependencies so that post-processing will be |
| redone if Configurations/WebKit.xcconfig is touched, since that is where |
| WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED is set, or if |
| Scripts/postprocess-header-rule is touched, since that is where the |
| post-processing code is. If either of those files changes it could affect the |
| output of post-processing. This should make a change like this work in the |
| new Xcode build system without touching files as is done above. |
| |
| 2020-04-18 Brady Eidson <beidson@apple.com> |
| |
| Fix WebUserContentControllerProxy vs ContentWorld lifetime |
| https://bugs.webkit.org/show_bug.cgi?id=210700 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by API test. |
| |
| WebUserContentControllerProxy currently keeps all of its associated API::ContentWorlds alive via RefPtrs. |
| |
| This is despite the fact that all of the associated WebScriptMessageHandlers, UserScripts, and |
| UserStyleSheets already keep their associated API::ContentWorlds alive. |
| |
| It then decideds to tell WebProcesses to forget a content world after all of its clients are removed. |
| |
| Unfortunately, content worlds are used for more than just content controller stuff. They're used for direct |
| JavaScript evaluation as well. |
| |
| So a client could: |
| - Add a script message handler in a content world. |
| - Evaluate JavaScript in that content world, setting up some persistent state. |
| - Remove the script message handler. |
| - Find that their persistent state from the JavaScript evaluation is gone from that world, even though they |
| still retain a usable handle to that world. |
| |
| The only party who has any business managing the lifetime of an API::ContentWorld is the API::ContentWorld itself. |
| |
| Making this change is: |
| 1 - Nice cleanup |
| 2 - Fixes the above mentioned bug |
| |
| * UIProcess/API/APIContentWorld.cpp: |
| (API::ContentWorld::worldForIdentifier): |
| (API::ContentWorld::ContentWorld): |
| (API::ContentWorld::sharedWorldWithName): |
| (API::ContentWorld::~ContentWorld): |
| (API::ContentWorld::addAssociatedUserContentControllerProxy): |
| (API::ContentWorld::userContentControllerProxyDestroyed): |
| * UIProcess/API/APIContentWorld.h: |
| |
| * UIProcess/UserContent/WebUserContentControllerProxy.cpp: |
| (WebKit::WebUserContentControllerProxy::parameters const): |
| (WebKit::WebUserContentControllerProxy::addContentWorld): |
| (WebKit::WebUserContentControllerProxy::contentWorldDestroyed): |
| (WebKit::WebUserContentControllerProxy::addUserScript): |
| (WebKit::WebUserContentControllerProxy::removeUserScript): |
| (WebKit::WebUserContentControllerProxy::removeAllUserScripts): |
| (WebKit::WebUserContentControllerProxy::addUserStyleSheet): |
| (WebKit::WebUserContentControllerProxy::removeUserStyleSheet): |
| (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets): |
| (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler): |
| (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName): |
| (WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers): |
| (WebKit::WebUserContentControllerProxy::addContentWorldUse): Deleted. |
| (WebKit::WebUserContentControllerProxy::shouldSendRemoveContentWorldsMessage): Deleted. |
| (WebKit::WebUserContentControllerProxy::removeContentWorldUses): Deleted. |
| * UIProcess/UserContent/WebUserContentControllerProxy.h: |
| |
| 2020-04-18 David Kilzer <ddkilzer@apple.com> |
| |
| Attempt #4 to fix tvOS build |
| |
| Unreviewed. |
| |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| - Add #if ENABLE(VIDEO_PRESENTATION_MODE)/#endif to protect |
| function defined in WebCore/PictureInPictureSupport.h. |
| - See previous build fixes in r260307, r260308 and r260313. |
| |
| 2020-04-18 Alex Christensen <achristensen@webkit.org> |
| |
| Fix client certificate authentication when using non-default WKWebsiteDataStores |
| https://bugs.webkit.org/show_bug.cgi?id=210681 |
| |
| Reviewed by Brady Eidson. |
| |
| NetworkProcessProxy was trying to keep a map of WebsiteDataStores, but it wasn't as accurate as the one WebsiteDataStore was maintaining. |
| Use the latter map instead and client certificate authentication works. Otherwise, the credential isn't serialized correctly. |
| I found this while working on <rdar://problem/60340449> but this was unrelated so I put it in a different change. |
| This may fix <rdar://problem/60910392>. |
| |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::websiteDataStoreFromSessionID): |
| |
| 2020-04-18 Pablo Saavedra <psaavedra@igalia.com> |
| |
| [GTK][WPE] Replace evil strtok() calls with fscanf() in MemoryPressureMonitor.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=210346 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * UIProcess/linux/MemoryPressureMonitor.cpp: |
| (WebKit::lowWatermarkPages): |
| (WebKit::getCgroupControllerPath): |
| (WebKit::systemMemoryUsedAsPercentage): |
| (WebKit::CGroupMemoryController::getCgroupFileValue): |
| |
| 2020-04-18 Rob Buis <rbuis@igalia.com> |
| |
| Reduce parameter list of the FrameLoadRequest constructor |
| https://bugs.webkit.org/show_bug.cgi?id=210668 |
| |
| Reviewed by Darin Adler. |
| |
| Adapt to API change. |
| |
| * WebProcess/Inspector/WebInspector.cpp: |
| (WebKit::WebInspector::openInNewTab): |
| * WebProcess/Plugins/PluginView.cpp: |
| (WebKit::PluginView::performFrameLoadURLRequest): |
| (WebKit::PluginView::loadURL): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::loadURLInFrame): |
| (WebKit::WebPage::loadDataInFrame): |
| (WebKit::WebPage::loadRequest): |
| (WebKit::WebPage::loadDataImpl): |
| |
| 2020-04-18 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Use MESSAGE_CHECK in WebPasteboardProxy |
| <https://webkit.org/b/210684> |
| <rdar://problem/59906721> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: |
| - Add missing #undef of MESSAGE_CHECK_COMPLETION and |
| MESSAGE_CHECK_WITH_RETURN_VALUE. |
| (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): |
| (WebKit::WebPasteboardProxy::getPasteboardStringForType): |
| (WebKit::WebPasteboardProxy::getPasteboardStringsForType): |
| (WebKit::WebPasteboardProxy::getPasteboardBufferForType): |
| (WebKit::WebPasteboardProxy::setPasteboardStringForType): |
| (WebKit::WebPasteboardProxy::setPasteboardBufferForType): |
| (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite): |
| (WebKit::WebPasteboardProxy::readStringFromPasteboard): |
| (WebKit::WebPasteboardProxy::readBufferFromPasteboard): |
| - Replace existing code with MESSAGE_CHECK_COMPLETION macros. |
| |
| * UIProcess/WebPasteboardProxy.cpp: |
| (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite): |
| * UIProcess/WebPasteboardProxy.h: |
| * UIProcess/WebPasteboardProxy.messages.in: |
| - Add IPC::Connection to TypesSafeForDOMToReadAndWrite. |
| |
| 2020-04-17 Kate Cheney <katherine_cheney@apple.com> |
| |
| Enable service workers for app-bound domains |
| https://bugs.webkit.org/show_bug.cgi?id=210451 |
| <rdar://problem/61479474> |
| |
| Reviewed by Brent Fulgham. |
| |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::createFetchTask): |
| (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): |
| (WebKit::NetworkConnectionToWebProcess::swConnection): |
| (WebKit::NetworkConnectionToWebProcess::isServiceWorkerAllowed const): Deleted. |
| * NetworkProcess/NetworkConnectionToWebProcess.h: |
| Removed ASSERTS and service worker entitlement checks which are now done along with app-bound |
| domain checks in SWServer.cpp. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::initializeNetworkProcess): |
| (WebKit::NetworkProcess::addWebsiteDataStore): |
| Remove the check for parentProcessHasServiceWorkerEntitlement() before |
| adding a serviceWorkerSession. This doesn't do anything except add an |
| entry to a map, and simplifies the case where we need a session for |
| app-bound instances which should have service workers but have no entitlement. |
| |
| Pass the entitlement and a new callback to request app-bound domains |
| from the UI Process to the SWServer. This will make sure the server |
| checks for the entitlement or list of app-bound domains before completing a load. |
| |
| (WebKit::NetworkProcess::registerSWServerConnection): |
| Remove unnecessary ASSERT for entitlement. |
| |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/ios/NetworkProcessIOS.mm: |
| (WebKit::NetworkProcess::parentProcessHasServiceWorkerEntitlement const): |
| (WebKit::NetworkProcess::disableServiceWorkerEntitlement): |
| (WebKit::NetworkProcess::clearServiceWorkerEntitlementOverride): |
| In order to test this thoroughly, TestWebKitAPI needed a way to |
| temporarily disable the service worker entitlement. This function |
| overrides the check for the entitlement if the bool is set, disabling |
| the entitlement. |
| |
| * Shared/WebPageCreationParameters.cpp: |
| (WebKit::WebPageCreationParameters::encode const): |
| (WebKit::WebPageCreationParameters::decode): |
| * Shared/WebPageCreationParameters.h: |
| WebPage needs to know if it is app-bound when created so it can update |
| the service worker preferences key accordingly. |
| |
| * Shared/WebPreferences.yaml: |
| * UIProcess/API/Cocoa/WKPreferences.mm: |
| (-[WKPreferences _serviceWorkerEntitlementDisabledForTesting]): |
| (-[WKPreferences _setServiceWorkerEntitlementDisabledForTesting:]): |
| * UIProcess/API/Cocoa/WKPreferencesPrivate.h: |
| Disable entitlement for testing. |
| |
| * UIProcess/API/APIPageConfiguration.cpp: |
| (API::PageConfiguration::copy const): |
| * UIProcess/API/APIPageConfiguration.h: |
| (API::PageConfiguration::limitsNavigationsToAppBoundDomains const): |
| (API::PageConfiguration::setLimitsNavigationsToAppBoundDomains): |
| (API::PageConfiguration::limitsNavigationToAppBoundDomains const): Deleted. |
| (API::PageConfiguration::setLimitsNavigationToAppBoundDomains): Deleted. |
| (-[WKWebViewConfiguration limitsNavigationsToAppBoundDomains]): |
| (-[WKWebViewConfiguration setLimitsNavigationsToAppBoundDomains:]): |
| (-[WKWebViewConfiguration limitsNavigationToAppBoundDomains]): Deleted. |
| (-[WKWebViewConfiguration setLimitsNavigationToAppBoundDomains:]): Deleted. |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| Inconsistent naming (Navigation vs Navigations). |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _setupPageConfiguration:]): |
| Check for entitlement or app-bound webview. |
| |
| (-[WKWebView _serviceWorkersEnabled:]): |
| (-[WKWebView _clearServiceWorkerEntitlementOverride:]): |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| Testing SPIs. |
| |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::getAppBoundDomains): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| Sends the app-bound domains to the Network Process. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::m_limitsNavigationsToAppBoundDomains): |
| (WebKit::m_limitsNavigationToAppBoundDomains): Deleted. |
| Naming inconsistency. |
| |
| (WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess): |
| (WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride): |
| * UIProcess/WebPageProxy.h: |
| Disable entitlement for testing. |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::m_isNavigatingToAppBoundDomain): |
| Set this parameter in the constructor so it will be accurate when |
| updating preferences. |
| |
| (WebKit::WebPage::updatePreferences): |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::clearServiceWorkerEntitlementOverride): |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): |
| (WebKit::WebPage::disableServiceWorkerEntitlement): |
| (WebKit::WebPage::clearServiceWorkerEntitlementOverride): |
| Disable entitlement for testing. |
| |
| 2020-04-17 Alex Christensen <achristensen@webkit.org> |
| |
| NetworkSessionCocoa should request client certificate only once per host/port |
| https://bugs.webkit.org/show_bug.cgi?id=210626 |
| <rdar://problem/60340449> |
| |
| Reviewed by Geoffrey Garen. |
| |
| NSURLSession creates more than one TCP connection to a server when using HTTP 1.1. |
| Each TCP connection with TLS generates a didReceiveChallenge to do the server trust evaluation of the certificate chain. |
| If the server requests a client certificate in the TLS handshake, it also generates a didReceiveChallenge to request client |
| certificates as well. This is an implementation detail of our networking. We should not actually ask the WKNavigationDelegate |
| for client certificates more than once per host/port. We should remember the credential and give it to NSURLSession immediately |
| if we have used this credential in the past for a task that has received bytes (either a response or a redirect). If the TLS |
| handshake fails, we should not reuse that same certificate automatically. |
| |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]): |
| (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): |
| (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): |
| (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): |
| (WebKit::NetworkSessionCocoa::clientCertificateSuggestedForHost): |
| (WebKit::NetworkSessionCocoa::taskReceivedBytes): |
| (WebKit::NetworkSessionCocoa::taskFailed): |
| (WebKit::NetworkSessionCocoa::successfulClientCertificateForHost const): |
| |
| 2020-04-17 David Kilzer <ddkilzer@apple.com> |
| |
| Bug 210646: REGRESSION (r260112): createArchiveList() leaks malloc memory on early returns due to an error |
| <https://webkit.org/b/210646> |
| <rdar://problem/61928031> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::createArchiveList): |
| - Move early returns for protocolProperties, protocolProperties |
| and mimeType above memory allocation to fix the memory leak. |
| |
| 2020-04-17 Brady Eidson <beidson@apple.com> |
| |
| Pass sandbox extensions for back/forward list navigations after the policy is decided at process-swap time. |
| <rdar://problem/59535167> and https://bugs.webkit.org/show_bug.cgi?id=210623 |
| |
| Reviewed by Geoff Garen. |
| |
| Covered by almost all existing tests, and a new API test. |
| |
| Instead of granting a sandbox extension when updating the back/forward cursor for a pending |
| back/forward list traversal, do so after the client decides the policy. |
| (Which is also along with a process swap in interesting cases) |
| |
| * Shared/PolicyDecision.h: |
| (WebKit::PolicyDecision::encode const): |
| (WebKit::PolicyDecision::decode): |
| |
| * Shared/WebPageCreationParameters.h: |
| |
| * UIProcess/API/APINavigation.cpp: |
| (API::Navigation::Navigation): |
| * UIProcess/API/APINavigation.h: |
| (API::Navigation::create): |
| (API::Navigation::reloadItem const): |
| |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::backForwardGoToItem): |
| * UIProcess/ProvisionalPageProxy.h: |
| |
| * UIProcess/WebNavigationState.cpp: |
| (WebKit::WebNavigationState::createReloadNavigation): |
| * UIProcess/WebNavigationState.h: |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::launchProcessForReload): |
| (WebKit::WebPageProxy::reload): |
| (WebKit::WebPageProxy::receivedNavigationPolicyDecision): |
| (WebKit::WebPageProxy::receivedPolicyDecision): |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::receivedPolicyDecision): |
| * UIProcess/WebPageProxy.messages.in: |
| |
| * WebProcess/WebPage/WebBackForwardListProxy.cpp: |
| (WebKit::WebBackForwardListProxy::goToItem): |
| |
| * WebProcess/WebPage/WebFrame.cpp: |
| (WebKit::WebFrame::didReceivePolicyDecision): |
| |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): |
| |
| 2020-04-17 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r234105): [iOS] WKColorButton leaks a UIColor |
| <https://webkit.org/b/210658> |
| <rdar://problem/61938137> |
| |
| Reviewed by Darin Adler. |
| |
| * UIProcess/ios/forms/WKFormColorPicker.mm: |
| (-[WKColorButton dealloc]): Add. |
| - Release _color instance variable to fix leak. |
| |
| 2020-04-17 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Deny iokit open access of unused class in the WebContent sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=210669 |
| |
| Reviewed by Brent Fulgham. |
| |
| Telemetry shows that iokit open access of an iokit class can be removed from the WebContent sandbox. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-17 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Refactor WebKit uploads process assertion logic to minimize chances of leaking them |
| https://bugs.webkit.org/show_bug.cgi?id=210664 |
| <rdar://problem/61751982> |
| |
| Reviewed by Geoff Garen. |
| |
| To minimize chances of leaking "WebKit uploads" process assertion, the following refactoring |
| was done: |
| 1. WebKit upload assertions are now held by NetworkProcessProxy instead of the WebProcessPool. |
| This makes more sense since uploads are tied to a particular network process. In base of |
| a network process crash, we would not want those assertions to persist for example. |
| 2. Store all upload assertions (UIProcess + NetworkProcess + WebProcesses) into a single |
| UploadActivity data structure that can easily be cleared. Make sure we clear it on network |
| process crash. |
| 3. No longer on the WebProcess to send IPC whenever its has pending uploads or not. Instead, |
| have the network process send such IPC. This makes more sense, especially now that all |
| webkit upload process assertions are now stored on NetworkProcessProxy. It also makes it |
| so that we deal properly with WebProcess crashes. In case of a WebProcess crash, its |
| connection to the network process will get closed. NetworkConnectionToWebProcess::didClose() |
| gets called and causes all NetworkResourceLoader objects for this connection to get |
| destroyed. As a result, the network process will properly notify the UIProcess that this |
| process no longer has any upload in progress. |
| |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess): |
| (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): |
| (WebKit::NetworkConnectionToWebProcess::hasUploadStateChanged): |
| * NetworkProcess/NetworkConnectionToWebProcess.h: |
| * NetworkProcess/NetworkResourceLoadMap.cpp: |
| (WebKit::NetworkResourceLoadMap::NetworkResourceLoadMap): |
| (WebKit::NetworkResourceLoadMap::~NetworkResourceLoadMap): |
| (WebKit::NetworkResourceLoadMap::add): |
| (WebKit::NetworkResourceLoadMap::clear): |
| (WebKit::NetworkResourceLoadMap::take): |
| (WebKit::NetworkResourceLoadMap::setHasUpload): |
| * NetworkProcess/NetworkResourceLoadMap.h: |
| (WebKit::NetworkResourceLoadMap::hasUpload const): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::didClose): |
| (WebKit::NetworkProcessProxy::setWebProcessHasUploads): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| * UIProcess/ProcessAssertion.cpp: |
| (WebKit::ProcessAssertion::ProcessAssertion): |
| * UIProcess/ProcessAssertion.h: |
| (WebKit::ProcessAssertion::pid const): |
| * UIProcess/WebProcessPool.cpp: |
| * UIProcess/WebProcessPool.h: |
| * UIProcess/WebProcessPool.messages.in: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::~WebProcessProxy): |
| * UIProcess/WebProcessProxy.h: |
| * WebProcess/Network/WebLoaderStrategy.cpp: |
| (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): |
| (WebKit::WebLoaderStrategy::remove): |
| (WebKit::WebLoaderStrategy::loadResourceSynchronously): |
| * WebProcess/Network/WebLoaderStrategy.h: |
| |
| 2020-04-17 Jer Noble <jer.noble@apple.com> |
| |
| Bring Fullscreen API + alert() behavior from iOS to macOS |
| https://bugs.webkit.org/show_bug.cgi?id=210662 |
| |
| Reviewed by Eric Carlson. |
| |
| When a page is showing an alert(), all non-synchronous messages will be blocked until the sync XPC for alert() |
| ends. And when exiting fullscreen, we block completing the fullscreen exit animation until a repaint XPC completes. |
| So a page that is showing an alert() will never fully exit element fullscreen mode. |
| |
| On iOS, we fixed this behavior by exiting fullscreen mode whenever the page shows an alert() or prompt(). We should |
| bring this behavior to macOS as well. |
| |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::runJavaScriptAlert): |
| (WebKit::WebPageProxy::runJavaScriptConfirm): |
| (WebKit::WebPageProxy::runJavaScriptPrompt): |
| |
| 2020-04-17 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Add WebKit::WebCore target |
| https://bugs.webkit.org/show_bug.cgi?id=210445 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Use the WebKit::WebCore target within the WebKit target. |
| |
| * CMakeLists.txt: |
| * PlatformGTK.cmake: |
| * PlatformWPE.cmake: |
| * PlatformWin.cmake: |
| |
| 2020-04-17 Simon Fraser <simon.fraser@apple.com> |
| |
| Turn async frame and overflow scrolling on by default on macOS |
| https://bugs.webkit.org/show_bug.cgi?id=210661 |
| rdar://problem/60420037 |
| |
| Reviewed by Tim Horton. |
| |
| Flip the plist value and the default value for macOS which is outside of the feature flag #ifdef. |
| |
| Testing keeps async overflow scrolling off by default, so this should not affect testing. |
| |
| This only impacts WebKit2. |
| |
| * FeatureFlags/WebKit.plist: |
| * Shared/WebPreferencesDefaultValues.cpp: |
| (WebKit::defaultAsyncFrameAndOverflowScrollingEnabled): |
| |
| 2020-04-17 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Add telemetry to some mach lookup sandbox extensions |
| https://bugs.webkit.org/show_bug.cgi?id=210657 |
| |
| Reviewed by Darin Adler. |
| |
| Add telemetry in order to learn more about how some of the mach lookup extensions are being used in the WebContent process on iOS. |
| |
| No new tests, since this patch does not change any behavior. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-17 Youenn Fablet <youenn@apple.com> |
| |
| Validate socket in NetworkRTCProvider::wrapNewTCPConnection |
| https://bugs.webkit.org/show_bug.cgi?id=210594 |
| |
| Reviewed by Eric Carlson. |
| |
| * NetworkProcess/webrtc/NetworkRTCProvider.cpp: |
| (WebKit::NetworkRTCProvider::wrapNewTCPConnection): |
| Add a null check in case the identifier does not relate to an existing pending socket. |
| |
| 2020-04-17 Peng Liu <peng.liu6@apple.com> |
| |
| Cleanup the macros for video fullscreen and picture-in-picture |
| https://bugs.webkit.org/show_bug.cgi?id=210638 |
| |
| Reviewed by Eric Carlson. |
| |
| Replace some "#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))" |
| and all "#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))" |
| with "#if ENABLE(VIDEO_PRESENTATION_MODE)". |
| |
| * GPUProcess/media/RemoteMediaPlayerProxy.cpp: |
| (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity): |
| (WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage): |
| (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode): |
| (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged): |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: |
| * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::didAttachToRunningProcess): |
| (WebKit::WebPageProxy::viewDidLeaveWindow): |
| (WebKit::WebPageProxy::exitFullscreenImmediately): |
| * UIProcess/WebPageProxy.h: |
| * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: |
| * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: |
| * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::~WebPage): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/cocoa/VideoFullscreenManager.h: |
| * WebProcess/cocoa/VideoFullscreenManager.messages.in: |
| * WebProcess/cocoa/VideoFullscreenManager.mm: |
| |
| 2020-04-17 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK] Update for GdkKeymap API changes |
| https://bugs.webkit.org/show_bug.cgi?id=210642 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| No new tests needed. |
| |
| gdk_keymap_get_default() is deprecated in GTK+ 3.22, so use |
| gdk_keymap_get_for_display() instead. Since in GTK4 this method is |
| removed to gdk_display_get_keymap(), add a helper to |
| GtkVersioning.h to avoid cluttering with ifdefs all over the |
| place. |
| |
| * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: |
| (WebKit::doKeyStrokeEvent): |
| |
| 2020-04-17 Antoine Quint <graouts@apple.com> |
| |
| Allow the UserStyleLevel to be set through _WKUserStyleSheet |
| https://bugs.webkit.org/show_bug.cgi?id=210653 |
| <rdar://problem/60506645> |
| |
| Reviewed by Tim Horton. |
| |
| Add a new _WKUserStyleLevel enum such that we may provide the specificity level of the backing UserStyleSheet, represented by the UserStyleLevel enum in WebCore. |
| |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.h: |
| * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: |
| (-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:level:userContentWorld:]): |
| (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:level:userContentWorld:]): |
| (-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:userContentWorld:]): Deleted. |
| * UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h: |
| (API::toWebCoreUserStyleLevel): |
| |
| 2020-04-17 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][X11] REGRESSION(r259944): Wrong position of select popup menu in X11 |
| https://bugs.webkit.org/show_bug.cgi?id=210603 |
| |
| Reviewed by Michael Catanzaro. |
| |
| gdk_window_move_to_rect expects the given rectangle in coordinates relative to the top-left corner of the window |
| that the popup window is transient for. We were using screen coordinates. |
| |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Translate widget coordinates to window coordinates before passing |
| the rectangle to gdk_window_move_to_rect(). |
| |
| 2020-04-17 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r256756): -[WKUserDefaults initWithSuiteName:]: Instance variable used while 'self' is not set to the result of '[(super or self) init...]' |
| <https://webkit.org/b/210647> |
| <rdar://problem/61928289> |
| |
| Reviewed by Anders Carlsson. |
| |
| * UIProcess/Cocoa/PreferenceObserver.mm: |
| (-[WKUserDefaults initWithSuiteName:]): |
| - Call `[self initWithSuite:]` and set `self` to fix the clang |
| static analyzer warning. |
| - Fix camelCase of `suitename` parameter. |
| |
| 2020-04-17 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Deny iokit open access to graphics related classes |
| https://bugs.webkit.org/show_bug.cgi?id=210616 |
| |
| Reviewed by Darin Adler. |
| |
| Deny iokit open access to graphics related classes in the WebContent process on iOS, but issue |
| extensions for these for some devices which still need access to them. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * Shared/Cocoa/SandboxExtensionCocoa.mm: |
| (WebKit::SandboxExtensionImpl::sandboxExtensionForType): |
| (WebKit::SandboxExtension::createHandleForIOKitClassExtension): |
| * Shared/SandboxExtension.h: |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _setDeviceHasAGXCompilerServiceForTesting]): |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| (WebKit::deviceHasAGXCompilerService): Deleted. |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::setDeviceHasAGXCompilerServiceForTesting const): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-17 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] UI process crash when entering compositing mode when WPE_RENDERER is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=209118 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Check if EGL_WL_bind_wayland_display extension is available when using WPE_RENDERER, since we don't suport the |
| SHM interface. |
| |
| * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: |
| (WebKit::AcceleratedBackingStoreWayland::checkRequirements): Return false if EGL_WL_bind_wayland_display is not present. |
| |
| 2020-04-17 Rob Buis <rbuis@igalia.com> |
| |
| Move allowPlugins to FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=205876 |
| |
| Reviewed by Darin Adler. |
| |
| Adapt to API change. |
| |
| * WebProcess/Plugins/WebPluginInfoProvider.cpp: |
| (WebKit::WebPluginInfoProvider::pluginInfo): |
| (WebKit::WebPluginInfoProvider::populatePluginCache): |
| * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: |
| (WebKit::WebFrameLoaderClient::objectContentType): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::createPlugin): |
| (WebKit::WebPage::canPluginHandleResponse): |
| (WebKit::WebPage::canShowMIMEType const): |
| |
| 2020-04-16 Peng Liu <peng.liu6@apple.com> |
| |
| Cleanup the usage of ENABLE_FULLSCREEN_API |
| https://bugs.webkit.org/show_bug.cgi?id=210630 |
| |
| Reviewed by Daniel Bates. |
| |
| Replace "#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API" with |
| "#if ENABLE(FULLSCREEN_API)". |
| |
| No new tests, no functional change |
| |
| * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: |
| (WKBundlePageSetFullScreenClient): |
| (WKBundlePageWillEnterFullScreen): |
| (WKBundlePageDidEnterFullScreen): |
| (WKBundlePageWillExitFullScreen): |
| (WKBundlePageDidExitFullScreen): |
| |
| 2020-04-16 Kate Cheney <katherine_cheney@apple.com> |
| |
| Distinguish between an empty WKAppBoundDomains array and a missing entry |
| https://bugs.webkit.org/show_bug.cgi?id=210628 |
| <rdar://problem/61909669> |
| |
| Reviewed by Brent Fulgham. |
| |
| Currently we treat a missing WKAppBoundDomains key the same as an empty |
| key, which is incorrect. Having the key present, even with no entries, |
| should opt an app into app-bound domain behavior. |
| |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::initializeAppBoundDomains): |
| (WebKit::WebsiteDataStore::beginAppBoundDomainCheck): |
| |
| 2020-04-16 Brent Fulgham <bfulgham@apple.com> |
| |
| Add a new 'limitNavigationsToAppBoundDomains' property to WKWebViewConfiguration |
| https://bugs.webkit.org/show_bug.cgi?id=210620 |
| <rdar://problem/61903225> |
| |
| Reviewed by Andy Estes. |
| |
| Follow-up fix. The property exposed by WKWebViewConfiguration should not |
| use a local BOOL; it simply exposes the APIPageConfiguration value. |
| |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration init]): |
| (-[WKWebViewConfiguration copyWithZone:]): |
| (-[WKWebViewConfiguration limitsNavigationToAppBoundDomains]): |
| (-[WKWebViewConfiguration setLimitsNavigationToAppBoundDomains:]): |
| (-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]): |
| |
| 2020-04-16 Brent Fulgham <bfulgham@apple.com> |
| |
| Switch NetworkProcess and NetworkProcessProxy messages to use CallbackID class |
| https://bugs.webkit.org/show_bug.cgi?id=210566 |
| <rdar://problem/61791784> |
| |
| Reviewed by David Kilzer. |
| |
| Instead of using the raw uint64_t type to represent callbacks, use the purpose |
| built WebKit::CallbackID type. |
| |
| Tested by existing cases. |
| |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::fetchWebsiteData): |
| (WebKit::NetworkProcess::deleteWebsiteData): |
| (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::fetchWebsiteData): |
| (WebKit::NetworkProcessProxy::deleteWebsiteData): |
| (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins): |
| (WebKit::NetworkProcessProxy::didFetchWebsiteData): |
| (WebKit::NetworkProcessProxy::didDeleteWebsiteData): |
| (WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/Network/NetworkProcessProxy.messages.in: |
| |
| 2020-04-16 Timothy Horton <timothy_horton@apple.com> |
| |
| Try to fix the macCatalyst build |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (uiImageForImage): |
| (createTargetedPreview): |
| (createFallbackTargetedPreview): |
| (-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]): |
| |
| 2020-04-16 David Kilzer <ddkilzer@apple.com> |
| |
| Re-land: [IPC Hardening] MachMessage::create() should use checked arithmetic |
| <https://webkit.org/b/210572> |
| <rdar://problem/61729947> |
| |
| Reviewed by Chris Dumez. |
| |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::Connection::sendOutgoingMessage): |
| - Add nullptr check since MachMessage::create() can return an |
| empty std::unique_ptr<> now. |
| * Platform/IPC/cocoa/MachMessage.cpp: |
| (IPC::MachMessage::create): |
| - Use CheckedSize to compute the buffer size. |
| |
| 2020-04-16 Brent Fulgham <bfulgham@apple.com> |
| |
| Add a new 'limitNavigationsToAppBoundDomains' property to WKWebViewConfiguration |
| https://bugs.webkit.org/show_bug.cgi?id=210620 |
| <rdar://problem/61903225> |
| |
| Reviewed by Andy Estes. |
| |
| Provide a way for Developers to opt-in to AppBound domains through a new WKWebViewConfiguration |
| property. |
| |
| This patch only creates the property and exposes the flag to the APIPageConfiguration and |
| WebPageProxy. A separate patch will take action based on its value. |
| |
| * UIProcess/API/APIPageConfiguration.cpp: |
| (API::PageConfiguration::copy const): |
| * UIProcess/API/APIPageConfiguration.h: |
| (API::PageConfiguration::limitsNavigationToAppBoundDomains const): |
| (API::PageConfiguration::setLimitsNavigationToAppBoundDomains): |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.h: |
| * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: |
| (-[WKWebViewConfiguration init]): |
| (-[WKWebViewConfiguration copyWithZone:]): |
| (-[WKWebViewConfiguration limitsNavigationToAppBoundDomains]): |
| (-[WKWebViewConfiguration setLimitsNavigationToAppBoundDomains:]): |
| (-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]): Keep the new property in |
| sync with this internal flag. |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::m_limitsNavigationToAppBoundDomains): |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-04-16 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed build fix for non unified builds. |
| |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: Added missing include. |
| |
| 2020-04-16 Daniel Bates <dabates@apple.com> |
| |
| Remove unused -_focusTextInputContext |
| https://bugs.webkit.org/show_bug.cgi?id=210619 |
| |
| Reviewed by Darin Adler. |
| |
| While this function was in the "SPI" header, there is no software at Apple that was using |
| this funciton and I will assume no non-Apple software was using it either. |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _focusTextInputContext:completionHandler:]): Deleted. |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| |
| 2020-04-16 Brent Fulgham <bfulgham@apple.com> |
| |
| [macOS] Switch unused IOKit classes from allow-with-report to deny-with-report |
| https://bugs.webkit.org/show_bug.cgi?id=210136 |
| <rdar://problem/61403216> |
| |
| Reviewed by Per Arne Vollan. |
| |
| After tracking telemetry for several weeks, we can now safely switch the default state |
| of a number of IOKit classes from 'allow with telemetry' to 'deny with telemetry'. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-16 Daniel Bates <dabates@apple.com> |
| |
| Fix the iOS build when building without EDITABLE_REGION after r260192 |
| (https://bugs.webkit.org/show_bug.cgi?id=210398) |
| |
| Have -_mayContainEditableElementsInRect compile-time conditionally call WebKit::mayContainEditableElementsInRect(). |
| If ENABLE(EDITABLE_REGION) is not enabled then return NO. |
| |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _mayContainEditableElementsInRect:]): |
| |
| 2020-04-16 David Kilzer <ddkilzer@apple.com> |
| |
| Rollout: [IPC Hardening] MachMessage::create() should use checked arithmetic |
| <https://webkit.org/b/210572> |
| <rdar://problem/61729947> |
| |
| Unreviewed rollout of r260160. |
| |
| Appears to have caused 8 API test failures on iOS. |
| |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::Connection::sendOutgoingMessage): |
| * Platform/IPC/cocoa/MachMessage.cpp: |
| (IPC::MachMessage::create): |
| |
| 2020-04-16 Brent Fulgham <bfulgham@apple.com> |
| |
| REGRESSION(r260081) Broke iOS PLT due to InjectedBundle initialization (edit) |
| https://bugs.webkit.org/show_bug.cgi?id=210582 |
| <rdar://problem/61838584> |
| |
| Reviewed by Darin Adler. |
| |
| The changes in r260081 began enforcing NSSecureCoding best practices, triggering |
| a bug in InjectedBundleMac.mm, which is used by iOS as well. |
| |
| This patch does the following: |
| |
| 1. Delays parameter decoding until we use the appropriate InjectedBundle mechanism |
| for expressing the valid classes to use in the Unarchiver. |
| 2. Removes a temporary workaround needed to get PLT running on iOS again. |
| |
| This patch also moves the check of the CFBundleGetFunctionPointerForName slightly earlier |
| so we can use a single function pointer check, and only invoke the parameter decoding |
| if we are using the C API. |
| |
| If not, we delay parameter decoding until we have constructed the WKWebProcessPlugIn |
| object so we can consume it's 'additionalClassesForParameterCoder' before calling |
| its initialization method. |
| |
| * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: |
| (WebKit::InjectedBundle::decodeBundleParameters): Remove temporary workaround |
| needed to get PLT working again. Instead of using a debug assert, return as |
| a decoding failure if the resulting object is not an NSDictionary. |
| (WebKit::InjectedBundle::initialize): Delay decoding the bundle parameters on |
| iOS until the Plugin's additionalClassesForParameterCoder method can be called. |
| |
| 2020-04-16 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Add a way to focus a text input and place a caret |
| https://bugs.webkit.org/show_bug.cgi?id=210611 |
| <rdar://problem/61893062> |
| |
| Reviewed by Darin Adler. |
| |
| Add some IPI that will be used by code in WebKitAdditions to focus a text input context |
| and place the caret in it. This will replace the existing -focusTextInput SPI, which I |
| will remove in a subsequent commit. |
| |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Fix up code style |
| of signature while I am here. |
| (-[WKWebView _focusTextInputContext:placeCaretAt:completionHandler:]): Added. |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _isTextInputContextFocused:]): Added. |
| (-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): Added. |
| (-[WKContentView _requestTextInputContextsInRect:completionHandler:]): Fix up code style |
| of signature while I am here. |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::WebPageProxy::focusTextInputContextAndPlaceCaret): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::focusTextInputContext): Use auto now that elementForContext() returns a RefPtr. |
| (WebKit::WebPage::elementForContext const): Have it return a RefPtr instead of a raw |
| pointer so callers don't have to remember to take out a ref of otherwise be mindful |
| of the element's lifetime. |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::removeTextPlaceholder): Use auto now that elementForContext() returns a RefPtr. |
| (WebKit::WebPage::requestDocumentEditingContext): Ditto. |
| (WebKit::WebPage::focusTextInputContextAndPlaceCaret): Added. |
| |
| 2020-04-16 Chris Dumez <cdumez@apple.com> |
| |
| Use safeRoundPage() instead of round_page() in SharedMemory |
| https://bugs.webkit.org/show_bug.cgi?id=210608 |
| <rdar://problem/60600443> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Use new safeRoundPage() instead of round_page() in SharedMemory, to deal safely with overflows. |
| |
| * Platform/cocoa/SharedMemoryCocoa.cpp: |
| (WebKit::SharedMemory::allocate): |
| (WebKit::makeMemoryEntry): |
| (WebKit::SharedMemory::~SharedMemory): |
| (WebKit::SharedMemory::createHandle): |
| |
| 2020-04-16 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes mid April 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=210599 |
| |
| Unreviewed build fix. |
| |
| * UIProcess/DeviceIdHashSaltStorage.cpp: Add missing Logging.h header. |
| * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: |
| (WebKit::WebInspectorProxy::platformSetForcedAppearance): Add missing WebCore:: namespace |
| prefix. |
| * UIProcess/linux/MemoryPressureMonitor.h: Add missing wtf/text/CString.h header. |
| |
| 2020-04-16 Daniel Bates <dabates@apple.com> |
| |
| REGRESSION (r259762): Should always hit test for editable elements if the WKWebView is fully editable |
| https://bugs.webkit.org/show_bug.cgi?id=210558 |
| <rdar://problem/61798347> |
| |
| Reviewed by Wenson Hsieh. |
| |
| If the entire WKWebView is marked editable (via SPI -[WKWebView _setEditable]) then |
| always ask the web process to hit test the page because every element is considered |
| editable. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _requestTextInputContextsInRect:completionHandler:]): |
| |
| 2020-04-16 Daniel Bates <dabates@apple.com> |
| |
| Move -_requestTextInputContextsInRect to WKContentView to simplify implementation |
| https://bugs.webkit.org/show_bug.cgi?id=210398 |
| <rdar://problem/61656931> |
| |
| Reviewed by Darin Adler. |
| |
| -_requestTextInputContextsInRect is not needed on Mac, but supporting it complicates |
| its implementation: it has to deal with coordinate space differences due to differences |
| in what is the root view on Mac and iOS + it has to know about iOS's custom content views. |
| While this function was in the "SPI" header, there is no software at Apple that was using |
| these outside of WebKit, and I will assume no non-Apple software was using them either. |
| Moving this function to WKContentView lets me simplify the implementation. |
| |
| * Platform/spi/ios/UIKitSPI.h: Add more forward declarations. |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _convertRectFromRootViewCoordinates:]): Deleted. |
| (-[WKWebView _convertRectToRootViewCoordinates:]): Deleted. |
| (-[WKWebView _mayContainEditableElementsInRect:]): Deleted; moved to WKWebViewTestingIOS.mm. |
| (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Deleted; moved to WKContentViewInteraction.mm. |
| * UIProcess/API/Cocoa/WKWebViewPrivate.h: |
| * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: |
| * UIProcess/API/ios/WKWebViewTestingIOS.mm: |
| (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Added. Turns around and |
| calls the function of the same name on the WKContentView. It takes care to convert the specified |
| rect from WKWebView coordinates to WKContentView coordinates and fixes up the bounding rects |
| for the returned contexts to be in WKWebView coordinates. This keeps existings tests passing |
| as mekes using this function intuitive since callers specify and get rects in WKWebView coordinates. |
| (-[WKWebView _requestDocumentContext:completionHandler:]): Added. |
| (-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Added. |
| (-[WKWebView _mayContainEditableElementsInRect:]): Moved from WKWebView.mm. |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _requestTextInputContextsInRect:completionHandler:]): Moved from WKWebView.mm and simplified. |
| |
| 2020-04-16 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC Hardening] Use ObjectIdentifier<> for LegacyCustomProtocol |
| <https://webkit.org/b/210580> |
| <rdar://problem/61791686> |
| |
| Reviewed by Chris Dumez. |
| |
| Replace uses of uint64_t with LegacyCustomProtocolID. |
| |
| * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: |
| (WebKit::LegacyCustomProtocolManager::didFailWithError): |
| (WebKit::LegacyCustomProtocolManager::didLoadData): |
| (WebKit::LegacyCustomProtocolManager::didReceiveResponse): |
| (WebKit::LegacyCustomProtocolManager::didFinishLoading): |
| (WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest): |
| (WebKit::LegacyCustomProtocolManager::protocolForID): |
| * NetworkProcess/CustomProtocols/LegacyCustomProtocolID.h: Add. |
| * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp: |
| (WebKit::LegacyCustomProtocolManager::addCustomProtocol): |
| (WebKit::LegacyCustomProtocolManager::removeCustomProtocol): |
| (WebKit::LegacyCustomProtocolManager::startLoading): |
| (WebKit::LegacyCustomProtocolManager::stopLoading): |
| (WebKit::generateCustomProtocolID): Delete. |
| - Replace with LegacyCustomProtocolID::generate(). |
| * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: |
| * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in: |
| * Scripts/webkit/messages.py: |
| * UIProcess/API/APICustomProtocolManagerClient.h: |
| (API::CustomProtocolManagerClient::startLoading): |
| (API::CustomProtocolManagerClient::stopLoading): |
| * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.h: |
| * UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm: |
| (-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]): |
| (WebKit::LegacyCustomProtocolManagerClient::startLoading): |
| (WebKit::LegacyCustomProtocolManagerClient::stopLoading): |
| * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp: |
| (WebKit::LegacyCustomProtocolManagerProxy::startLoading): |
| (WebKit::LegacyCustomProtocolManagerProxy::stopLoading): |
| (WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest): |
| (WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse): |
| (WebKit::LegacyCustomProtocolManagerProxy::didLoadData): |
| (WebKit::LegacyCustomProtocolManagerProxy::didFailWithError): |
| (WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading): |
| * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: |
| - Remove unused typedef and instance variable. |
| * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in: |
| * WebKit.xcodeproj/project.pbxproj: |
| - Add LegacyCustomProtocolID.h to project. |
| |
| 2020-04-16 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r259898): WebKit-based Books views are all blank |
| https://bugs.webkit.org/show_bug.cgi?id=210590 |
| <rdar://problem/61791109> |
| |
| Reviewed by Chris Dumez. |
| |
| * UIProcess/Cocoa/WebViewImpl.h: |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::enterAcceleratedCompositingWithRootLayer): |
| (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer): |
| (WebKit::WebViewImpl::setAcceleratedCompositingRootLayerAfterFlush): Deleted. |
| * UIProcess/mac/PageClientImplMac.mm: |
| (WebKit::PageClientImpl::enterAcceleratedCompositingMode): |
| (WebKit::PageClientImpl::didFirstLayerFlush): |
| The changes to setAcceleratedCompositingRootLayer in r259898 proved |
| to be wrong in a second way (the first being fixed in r260104): when |
| setAcceleratedCompositingRootLayer is called from updateAcceleratedCompositingMode, |
| because the layer hosting mode changed (Books appears to use app-hosted layers), |
| it incorrectly identified the root layer change as a process swap, resulting |
| in the correct layer never being unhidden. |
| |
| This is enough mistakes that I'm going to try a different approach: |
| put setAcceleratedCompositingRootLayer back to the way it was before, where |
| it immediately updates the layer without any smarts, remove |
| setAcceleratedCompositingRootLayerAfterFlush, because it's no longer necessary, |
| and add enterAcceleratedCompositingWithRootLayer, which is specifically only |
| called in the case where DrawingArea will for-sure send us a follow-up |
| (didFirstLayerFlush) that will unhide the root layer. |
| |
| 2020-04-16 Eric Carlson <eric.carlson@apple.com> |
| |
| [macOS] Update ScreenTime as playback state changes |
| https://bugs.webkit.org/show_bug.cgi?id=210518 |
| <rdar://problem/61181092> |
| |
| Reviewed by Jer Noble. |
| |
| Add a manager that gets media element state changes, and a Cocoa-specific |
| implementation that passes that state to ScreenTime. |
| |
| * Scripts/webkit/messages.py: |
| * Sources.txt: |
| * SourcesCocoa.txt: |
| * UIProcess/Cocoa/WebPageProxyCocoa.mm: |
| (WebKit::WebPageProxy::mediaUsageManager): |
| (WebKit::WebPageProxy::addMediaUsageManagerSession): |
| (WebKit::WebPageProxy::updateMediaUsageManagerSessionState): |
| (WebKit::WebPageProxy::removeMediaUsageManagerSession): |
| * UIProcess/Media/MediaUsageManager.cpp: Added. |
| (WebKit::MediaUsageManager::create): |
| (WebKit::reset): |
| (WebKit::MediaUsageManager::addMediaSession): |
| (WebKit::MediaUsageManager::removeMediaSession): |
| (WebKit::MediaUsageManager::updateMediaUsage): |
| * UIProcess/Media/MediaUsageManager.h: Added. |
| * UIProcess/Media/cocoa/MediaUsageManagerCocoa.h: Added. |
| (WebKit::MediaUsageManagerCocoa::SessionMediaUsage::SessionMediaUsage): |
| * UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm: Added. |
| (WebKit::usageTrackingAvailable): |
| (WebKit::MediaUsageManager::create): |
| (WebKit::MediaUsageManagerCocoa::~MediaUsageManagerCocoa): |
| (WebKit::MediaUsageManagerCocoa::reset): |
| (WebKit::MediaUsageManagerCocoa::addMediaSession): |
| (WebKit::MediaUsageManagerCocoa::removeMediaSession): |
| (WebKit::MediaUsageManagerCocoa::updateMediaUsage): |
| * UIProcess/WebAuthentication/AuthenticatorManager.cpp: |
| * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebPageProxy.messages.in: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebCoreSupport/WebChromeClient.cpp: |
| (WebKit::WebChromeClient::addMediaUsageManagerSession): |
| (WebKit::WebChromeClient::updateMediaUsageManagerSessionState): |
| (WebKit::WebChromeClient::removeMediaUsageManagerSession): |
| * WebProcess/WebCoreSupport/WebChromeClient.h: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::addMediaUsageManagerSession): |
| (WebKit::WebPage::updateMediaUsageManagerSessionState): |
| (WebKit::WebPage::removeMediaUsageManagerSession): |
| * WebProcess/WebPage/WebPage.h: |
| |
| 2020-04-16 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] DrawingArea::updateBackingStoreState() is not used on Apple platforms |
| <https://webkit.org/b/210585> |
| <rdar://problem/61802011> |
| |
| Reviewed by Geoffrey Garen. |
| |
| * UIProcess/DrawingAreaProxy.h: |
| * UIProcess/DrawingAreaProxy.messages.in: |
| * WebProcess/WebPage/DrawingArea.h: |
| (WebKit::DrawingArea::updateBackingStoreState): |
| * WebProcess/WebPage/DrawingArea.messages.in: |
| - Use USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER) to |
| protect code not used on Apple platforms. |
| |
| 2020-04-16 Carlos Alberto Lopez Perez <clopez@igalia.com> |
| |
| [GTK] MiniBrowser opens new windows too small causing failures on some WPT tests |
| https://bugs.webkit.org/show_bug.cgi?id=210206 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Provide the size of the default window (if is set) when windowRect is called |
| before the window is shown. |
| |
| * UIProcess/API/glib/WebKitUIClient.cpp: |
| |
| 2020-04-16 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| TextureMapper renders video element with "object-fit: cover" incorrectly |
| https://bugs.webkit.org/show_bug.cgi?id=210544 |
| |
| Reviewed by Žan Doberšek. |
| |
| Propagate GraphicsLayer::contentsClippingRect information to TextureMapperLayer |
| to properly clip the outside of DOM element when the element has "object-fit: cover". |
| |
| Unfortunately, the test is disabled on WebKitGTK due to bug 177536, bug 163528. |
| Test: compositing/video/video-object-fit.html |
| |
| * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: |
| (WebKit::CoordinatedGraphicsScene::updateSceneState): |
| |
| 2020-04-15 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION (r260102): ASSERTION FAILED: m_arbitrators.contains(proxy) in WebKit::SharedArbitrator::endRoutingArbitrationForArbitrator |
| https://bugs.webkit.org/show_bug.cgi?id=210589 |
| <rdar://problem/61844208> |
| |
| Reviewed by Eric Carlson. |
| |
| Protect against an assertion in the SharedArbitrator in case where a WebProcess is terminated before it can call |
| endRoutingArbitration(). |
| |
| * UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp: |
| (WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate): |
| * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: |
| * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: |
| (WebKit::SharedArbitrator::isInRoutingArbitrationForArbitrator): |
| (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): |
| (WebKit::SharedArbitrator::endRoutingArbitrationForArbitrator): |
| (WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate): |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch): |
| |
| 2020-04-15 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r258337): Crash when right clicking on link that uses the system UI font with optimizeLegibility on Mojave |
| https://bugs.webkit.org/show_bug.cgi?id=210575 |
| <rdar://problem/61646717> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/Cocoa/ArgumentCodersCocoa.mm: |
| (-[WKSecureCodingFontAttributeNormalizer archiver:willEncodeObject:]): |
| (IPC::encodeSecureCodingInternal): |
| The workaround introduced in r250640 and r251086 for archiving NSFonts |
| with optical sizing attributes is still incomplete, which was recently |
| revealed by making decoding failures more apparent (in r258337). |
| |
| Specifically, the workaround was not applied to fonts encoded inside |
| NSAttributedStrings, which are encoded using a keyed archiver... only |
| to fonts encoded directly with CoreIPC. |
| |
| Use a NSKeyedArchiver delegate to apply our fix-up to the optical sizing |
| attribute when any NSFont is being encoded, and only on platforms |
| that still exhibit the bug. |
| |
| * Shared/Cocoa/CoreTextHelpers.h: |
| * Shared/Cocoa/CoreTextHelpers.mm: |
| (WebKit::fontWithAttributes): |
| (WebKit::fontDescriptorWithFontAttributes): Deleted. |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::updateFontManagerIfNeeded): |
| * UIProcess/mac/WebPopupMenuProxyMac.mm: |
| (WebKit::WebPopupMenuProxyMac::showPopupMenu): |
| Refactor fontDescriptorWithFontAttributes to just return a font since that's what all callers actually want. |
| |
| 2020-04-15 John Wilander <wilander@apple.com> |
| |
| Add SPI to configure WebsiteDataStores with a URL for standalone web applications and use it to disable first-party website data removal in ITP |
| https://bugs.webkit.org/show_bug.cgi?id=209634 |
| <rdar://problem/60943970> |
| |
| Reviewed by Alex Christensen. |
| |
| This change adds a new property to _WKWebsiteDataStoreConfiguration.h called |
| standaloneApplicationURL with which the hosting application can inform the |
| website data store that it's running as a standalone web application. |
| |
| This change also forwards an existing standaloneApplicationURL as a |
| WebCore::RegistrableDomain into ITP so that explicit exemptions can be made |
| to first parties of standalone web applications. The exemptions made here |
| all for all of ITP's website data removal. This part of the change is |
| covered by the new layout tests. |
| |
| Tests: http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion-database.html |
| http/tests/resourceLoadStatistics/standalone-web-application-exempt-from-website-data-deletion.html |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| (WebKit::ResourceLoadStatisticsStore::setStandaloneApplicationDomain): |
| (WebKit::ResourceLoadStatisticsStore::standaloneApplicationDomain const): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: |
| (WebKit::WebResourceLoadStatisticsStore::setStandaloneApplicationDomain): |
| * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: |
| * NetworkProcess/NetworkSession.cpp: |
| (WebKit::NetworkSession::NetworkSession): |
| (WebKit::NetworkSession::forwardResourceLoadStatisticsSettings): |
| * NetworkProcess/NetworkSession.h: |
| * Shared/ResourceLoadStatisticsParameters.h: |
| (WebKit::ResourceLoadStatisticsParameters::encode const): |
| (WebKit::ResourceLoadStatisticsParameters::decode): |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: |
| (-[_WKWebsiteDataStoreConfiguration standaloneApplicationURL]): |
| (-[_WKWebsiteDataStoreConfiguration setStandaloneApplication:]): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::ensureNetworkProcess): |
| * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: |
| (WebKit::WebsiteDataStore::platformSetNetworkParameters): |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: |
| (WebKit::WebsiteDataStoreConfiguration::copy const): |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: |
| (WebKit::WebsiteDataStoreConfiguration::standaloneApplicationURL const): |
| (WebKit::WebsiteDataStoreConfiguration::setStandaloneApplicationURL): |
| |
| 2020-04-15 Chris Dumez <cdumez@apple.com> |
| |
| [IPC Hardening] MachMessage::messageSize() should use checked arithmetic |
| https://bugs.webkit.org/show_bug.cgi?id=210567 |
| <rdar://problem/61734355> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Replace call to round_msg() call with a call to our new safeRoundMsg() which does |
| the same alignment up but using checked arithmetic to protect against overflows. |
| |
| * Platform/IPC/cocoa/MachMessage.cpp: |
| (IPC::safeRoundMsg): |
| (IPC::MachMessage::messageSize): |
| |
| 2020-04-15 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC Hardening] MachMessage::create() should use checked arithmetic |
| <https://webkit.org/b/210572> |
| <rdar://problem/61729947> |
| |
| Reviewed by Chris Dumez. |
| |
| * Platform/IPC/cocoa/ConnectionCocoa.mm: |
| (IPC::Connection::sendOutgoingMessage): |
| - Add nullptr check since MachMessage::create() can return an |
| empty std::unique_ptr<> now. |
| * Platform/IPC/cocoa/MachMessage.cpp: |
| (IPC::MachMessage::create): |
| - Use CheckedSize to compute the buffer size. |
| |
| 2020-04-15 Brent Fulgham <bfulgham@apple.com> |
| |
| Unreviewed PLT fix after r260081. |
| |
| * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: |
| (WebKit::InjectedBundle::decodeBundleParameters): |
| |
| 2020-04-15 Ben Nham <nham@apple.com> |
| |
| DidFirstLayerFlush IPC can be head-of-line-blocked and delay first paint by 200+ ms on process swap |
| https://bugs.webkit.org/show_bug.cgi?id=210571 |
| |
| Reviewed by Geoffrey Garen. |
| |
| When we process swap, the layer swap/unhiding for the new hosted layer is gated by the |
| DidFirstLayerFlush IPC. But actually sending this IPC can be head-of-line blocked for an |
| arbitrarily long time because we append it to the queue of messages for the main run loop to |
| process. In some cases, e.g. for the NYT PLT content, this blocks first paint by 200 ms |
| while the WebProcess main thread is busy doing other things (like executing deferred |
| scripts). |
| |
| To fix this, use a CATransaction commit handler to send the IPC right after we commit. |
| |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: |
| (WebKit::TiledCoreAnimationDrawingArea::sendDidFirstLayerFlushIfNeeded): |
| |
| 2020-04-15 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the watchOS and tvOS builds after r260146 |
| |
| Move some code for controlling the presentation of context menus on iOS behind USE(UICONTEXTMENU). |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| |
| 2020-04-15 Peng Liu <peng.liu6@apple.com> |
| |
| Video elements don't return to the correct position when exiting fullscreen |
| https://bugs.webkit.org/show_bug.cgi?id=210529 |
| |
| Reviewed by Jer Noble. |
| |
| Some web pages use the "resize" event handler to calculate the element size after |
| they exit fullscreen, and the calculation is based on the container element size which |
| might be affected by the fullscreen mode. |
| |
| We need to call WebPageProxy::setNeedsDOMWindowResizeEvent() to fire the "resize" event |
| in the repaint callback after the exiting fullscreen process is completed and the |
| possible layout change due to exiting fullscreen is done. Otherwise the size calculation |
| might be wrong. |
| |
| * UIProcess/WebPageProxy.cpp: |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: |
| (-[WKFullScreenWindowController _completedExitFullScreen]): |
| * UIProcess/mac/WKFullScreenWindowController.mm: |
| (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::setNeedsDOMWindowResizeEvent): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/WebPage.messages.in: |
| |
| 2020-04-15 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iPadOS] Some pages indefinitely zoom in and out due to idempotent text autosizing |
| https://bugs.webkit.org/show_bug.cgi?id=210551 |
| <rdar://problem/56820674> |
| |
| Reviewed by Tim Horton. |
| |
| On a non-responsive web page with one or lines of non-wrapping text of a specific length (just under 1920px), |
| it's possible for the combination of idempotent text autosizing heuristics and viewport shrink-to-fit to cause |
| the single line of text to grow and shrink in size indefinitely, and additionally cause the initial scale to |
| thrash between multiple values indefinitely. This manifests in the entire page repeatedly zooming in and out |
| immediately after page load. |
| |
| Consider the following scenario: |
| |
| (1) A viewport configuration change (e.g. due to parsing the viewport meta tag) schedules the timer to reset |
| idempotent text autosizing. Let's suppose the page has a really long line of non-wrapping 12px text that is |
| below 1920px wide. |
| |
| (2) The timer fires, invalidating styles and recomputing text autosizing given the current initial scale. The |
| current initial scale is below 1, since ViewportConfiguration will attempt to shrink to fit the page to |
| avoid horizontal scrolling. This causes text autosizing to boost the long line of text to a larger value |
| (let's say 17px). |
| |
| (3) The next time we perform style recomputation and layout, we discover that the content width of the page is |
| now larger than 1920px, which is the maximum width which we'll attempt to shrink to fit; when computing |
| initial scale, we give up trying to shrink down to avoid making the inital scale too small, and instead just |
| keep it at 1. |
| |
| (4) This change in viewport configuration then schedules another idempotent text autosizing reset. When this |
| timer fires, it sees that the initial scale is now 1, which means that the text is no longer boosted, so we |
| make the single line of text small again (12px). |
| |
| (5) After the next style recomputation and layout, this causes the content width of the page to dip below the |
| 1920px threshold, causing the initial scale to dip below 1 again. As detailed above, this schedules another |
| idempotent text autosizing update, which now boosts font size once again, and the cycle continues. |
| |
| To fix this, instead of consulting the initial scale (`ViewportConfiguration::initialScale()`) when computing |
| the boosted font size for idempotent text autosizing, we can instead ask for the initial scale ignoring content |
| size (`ViewportConfiguration::initialScaleIgnoringContentSize()`). This prevents changes in content size due to |
| idempotent autosizing from affecting the idempotent autosizing heuristic (through the different initial scale), |
| and ensures that this method of text autosizing actually remains idempotent. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::resetIdempotentTextAutosizingIfNeeded): |
| (WebKit::WebPage::viewportConfigurationChanged): |
| |
| 2020-04-14 Megan Gardner <megan_gardner@apple.com> |
| |
| Data Detected Actions sheets are presented from odd locations. |
| https://bugs.webkit.org/show_bug.cgi?id=210531 |
| <rdar://problem/60941346> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Use the existing context menu targeted preview code to ensure that the |
| data detected menus are presented in a good location. |
| |
| * UIProcess/ios/WKActionSheetAssistant.h: |
| * UIProcess/ios/WKActionSheetAssistant.mm: |
| (-[WKActionSheetAssistant contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]): |
| |
| 2020-04-15 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Potential crash under WebProcess::platformInitializeWebProcess |
| https://bugs.webkit.org/show_bug.cgi?id=210547 |
| |
| Reviewed by Brent Fulgham. |
| |
| If the UI process fails to issue an extension to the runningboard service, the WebContent process will crash |
| while trying to consume this extension. |
| |
| No new tests, since the test runners are unsandboxed, so issuing the extension will always succeed. |
| |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-15 Brent Fulgham <bfulgham@apple.com> |
| |
| [Cocoa] Remove generic parameter serialization fallback |
| https://bugs.webkit.org/show_bug.cgi?id=210509 |
| <rdar://problem/55522650> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Tested by BundleFormDelegate parameter serialization tests... |
| |
| * UIProcess/API/Cocoa/WKWebView.mm: |
| (-[WKWebView _setInputDelegate:]): |
| * UIProcess/ios/PageClientImplIOS.mm: |
| (WebKit::PageClientImpl::elementDidFocus): |
| |
| 2020-04-15 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r259610): WebGL does not work at all on iOS (was: Google Maps tiles turn black after initial load) |
| <rdar://problem/61794480> |
| |
| Unreviewed, partial revert of r259610 because it broke Google Maps. |
| Stop using RunningBoard for the "Foreground" assertion because it fails to |
| give the target GPU access. |
| |
| * UIProcess/ios/ProcessAssertionIOS.mm: |
| (WebKit::runningBoardNameForAssertionType): |
| |
| 2020-04-15 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Fix use of gtk init functions |
| https://bugs.webkit.org/show_bug.cgi?id=210550 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Include GtkVersioning.h instead of gtk.h |
| |
| * WebProcess/gtk/WebProcessMainGtk.cpp: |
| |
| 2020-04-15 Peng Liu <peng.liu6@apple.com> |
| |
| Adopt interface AVAudioRoutingArbiter for Mac |
| https://bugs.webkit.org/show_bug.cgi?id=210167 |
| |
| Reviewed by Jer Noble. |
| |
| A follow-up patch to fix a build error. |
| |
| * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: |
| (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): |
| |
| 2020-04-15 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Provide an alternative to gtk_widget_{get,is}_toplevel() |
| https://bugs.webkit.org/show_bug.cgi?id=210463 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * UIProcess/API/glib/WebKitUIClient.cpp: Adapt to take into account that GTK4 does not |
| provide the GtkWidget.configure-event signal. |
| |
| 2020-04-15 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Unreviewed, reverting r259891. |
| |
| Causes significant iOS MotionMark regression |
| |
| Reverted changeset: |
| |
| "Switch unused IOKit classes from allow-with-report to deny- |
| with-report" |
| https://bugs.webkit.org/show_bug.cgi?id=210136 |
| https://trac.webkit.org/changeset/259891 |
| |
| 2020-04-14 Megan Gardner <megan_gardner@apple.com> |
| |
| File Upload Menus presented from odd locations. |
| https://bugs.webkit.org/show_bug.cgi?id=210523 |
| <rdar://problem/60390846> |
| |
| Use the existing context menu targeted preview code to ensure that the |
| file menus are presented in a good location. |
| |
| Reviewed by Wenson Hsieh. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/forms/WKFileUploadPanel.mm: |
| (-[WKFileUploadPanel contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): |
| |
| 2020-04-14 David Kilzer <ddkilzer@apple.com> |
| |
| dictionaryValueOfType() in WebCoreArgumentCodersMac.mm can be replaced with dynamic_cf_cast<>() |
| <https://webkit.org/b/210456> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::dictionaryValueOfType): Delete. |
| (IPC::extractDictionaryValue): Add. |
| - Use dynamic_cf_cast<>() in place of manually checking the |
| CFTypeID of each object. |
| (IPC::createArchiveList): |
| - Call new extractDictionaryValue() template function to verify |
| values are the correct types in the dictionary and to set the |
| output variables. |
| |
| 2020-04-14 David Kilzer <ddkilzer@apple.com> |
| |
| Use CFArrayGetValues() in createArchiveList() in WebCoreArgumentCodersMac.mm |
| <https://webkit.org/b/210519> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::createArchiveList): |
| - Use CFArrayGetValues() to copy array more efficiently. |
| |
| 2020-04-14 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r259898): Tabs occasionally go blank and get stuck that way |
| https://bugs.webkit.org/show_bug.cgi?id=210520 |
| <rdar://problem/61776830> |
| |
| Reviewed by Simon Fraser. |
| |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer): |
| setThumbnailView calls setAcceleratedCompositingRootLayer in order to reconnect the |
| existing root layer. After r259898, this would cause us to go down the |
| process-swap path, and hide the root layer, and nothing would ever |
| come along and fix it. |
| |
| If setAcceleratedCompositingRootLayer is called with the existing root |
| layer, that cannot be a process swap, so ignore it and proceed as before. |
| |
| 2020-04-14 Jer Noble <jer.noble@apple.com> |
| |
| Adopt interface AVAudioRoutingArbiter for Mac |
| https://bugs.webkit.org/show_bug.cgi?id=210167 |
| <rdar://problem/59113994> |
| |
| Reviewed by Eric Carlson. |
| |
| Add a new cross-process object pair, AudioSessionRouterAbitrator/Proxy which passes routing |
| arbitration commands from WebContent -> UIProcess. Because the UIProcess can represent |
| multiple WebContent processes, it must track all outstanding arbitration requests globally. |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * GPUProcess/GPUProcess.cpp: |
| (WebKit::GPUProcess::initializeGPUProcess): |
| * Sources.txt: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::mediaRelatedMachServices): |
| * UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp: Added. |
| (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): |
| (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): |
| (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): |
| (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): |
| * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: Added. |
| (WebKit::AudioSessionRoutingArbitratorProxy::category const): |
| (WebKit::AudioSessionRoutingArbitratorProxy::destinationId): |
| * UIProcess/Media/AudioSessionRoutingArbitratorProxy.messages.in: Added. |
| * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: Added. |
| (WebKit::SharedArbitrator::sharedInstance): |
| (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): |
| (WebKit::SharedArbitrator::leaveRoutingArbitrationForArbitrator): |
| (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): |
| (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): |
| (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): |
| (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/WebProcessProxy.cpp: |
| (WebKit::WebProcessProxy::WebProcessProxy): |
| * UIProcess/WebProcessProxy.h: |
| * WebKit.xcodeproj/project.pbxproj: |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::m_processDisplayName): |
| * WebProcess/WebProcess.cpp: |
| * WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp: Added. |
| (WebKit::AudioSessionRoutingArbitrator::AudioSessionRoutingArbitrator): |
| (WebKit::AudioSessionRoutingArbitrator::supplementName): |
| (WebKit::AudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory): |
| (WebKit::AudioSessionRoutingArbitrator::leaveRoutingAbritration): |
| * WebProcess/cocoa/AudioSessionRoutingArbitrator.h: Added. |
| * WebProcess/cocoa/UserMediaCaptureManager.cpp: |
| (WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource): |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-04-14 David Kilzer <ddkilzer@apple.com> |
| |
| createArchiveList() in WebCoreArgumentCodersMac.mm should do more validity checks |
| <https://webkit.org/b/210448> |
| <rdar://problem/61677029> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::createArchiveList): Add more validity checks. |
| |
| 2020-04-14 Brent Fulgham <bfulgham@apple.com> |
| |
| Do more checking before reusing precompiled sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=210304 |
| <rdar://problem/61155623> |
| |
| Reviewed by Darin Adler. |
| |
| We recently discovered that the system sandbox framework version does not always change |
| when breaking changes in the sandbox format are made. This can lead to the precompiled |
| version of a sandbox not working properly when a sandbox version changes. |
| |
| To guard against this, make the following changes: |
| |
| 1. Compare the SANDBOX_BUILD_ID in place when the sandbox was compiled to the value on |
| the current system. SANDBOX_BUILD_ID, which is a GUID, is always regenerated when the |
| sandbox framework is rebuilt. |
| |
| 2. Compare the OS version in place when the sandbox was compiled to the value on the current |
| system. This will trigger us recompiling sandboxes even when the sandbox framework did not |
| change, but this is a small performance cost that would only happen after a software update. |
| |
| * Shared/mac/AuxiliaryProcessMac.mm: |
| (WebKit::compileAndCacheSandboxProfile): |
| (WebKit::tryApplyCachedSandbox): |
| |
| 2020-04-14 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Content filtering needs access to the frontboard service |
| https://bugs.webkit.org/show_bug.cgi?id=210505 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Content filtering in the WebContent process needs access to the frontboard service on iOS. Issue an extension |
| to this service when content filtering is enabled. |
| |
| API test: WebKit.WebFilterFeatureHasFrontboardServiceAccess |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-14 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iPadOS] Wikipedia articles lay out incorrectly in 1/3 multitasking window |
| https://bugs.webkit.org/show_bug.cgi?id=210501 |
| <rdar://problem/54856323> |
| |
| Reviewed by Tim Horton. |
| |
| Apply the viewport quirk if needed; see WebCore/ChangeLog for more details. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::updateVisibleContentRects): |
| |
| 2020-04-14 Brent Fulgham <bfulgham@apple.com> |
| |
| InjectedBundle parameters often need initialization function called before unarchiving |
| https://bugs.webkit.org/show_bug.cgi?id=189709 |
| <rdar://problem/44573653> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Handle the case where the InjectedBundle parameters do not successfully decode because they contain |
| an unexpected class from the embedding program. If this happens, try decoding the bundle parameters |
| after the bundle initialiation function runs, which gives the embedding program the opportunity to |
| register additional classes that are safe for serialization. |
| |
| Extend WKWebProcessPlugIn with a method that returns the names of any custom classes that need |
| to be serialized by the InjectedBundle. |
| |
| Create a new 'decodeBundleParameters' method that contains the logic that used to live in 'initialize'. |
| Revise 'initialize' to call this new method. |
| |
| * WebProcess/InjectedBundle/InjectedBundle.h: |
| * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: |
| (WebKit::InjectedBundle::initialize): Use the new method. |
| (WebKit::InjectedBundle::decodeBundleParameters): Added. |
| (WebKit::InjectedBundle::setBundleParameters): Use 'decodeObjectOfClasses' with the more complete |
| 'classesForCoder' method to unarchive the passed bundle parameters, rather than the |
| NSDictionary-specific method, since InjectedBundles often encode other types of objects, and the |
| NSDictionary object may itself hold other kinds of objects. |
| * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h: |
| (WebKit::WKWebProcessPlugIn::additionalClassesForParameterCoder): Added. |
| |
| 2020-04-14 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Address review comments after r260035 |
| https://bugs.webkit.org/show_bug.cgi?id=210440 |
| |
| Reviewed by David Kilzer. |
| |
| Omit unused argument names. |
| |
| * UIProcess/API/C/WKPreferences.cpp: |
| (WKPreferencesSetIgnoreViewportScalingConstraints): |
| (WKPreferencesGetIgnoreViewportScalingConstraints): |
| |
| 2020-04-14 Megan Gardner <megan_gardner@apple.com> |
| |
| YouTube sometimes navigates unexpectedly when invoking a context menu on a video link. |
| https://bugs.webkit.org/show_bug.cgi?id=210467 |
| <rdar://problem/58841584> |
| |
| Reviewed by Tim Horton. |
| |
| Cancel any outstanding touches tracked by WebTouchEventsGestureRecognizer, so that we dispatch |
| `touchcancel` to the page instead of `touchend`, so that the page does not misinterpret |
| context menu invocation as a tap. |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): |
| |
| 2020-04-14 Youenn Fablet <youenn@apple.com> |
| |
| Do not process RTC Network messages coming from NetworkProcess if LibWebRTCNetwork is not active |
| https://bugs.webkit.org/show_bug.cgi?id=207376 |
| <rdar://problem/59238611> |
| |
| Unreviewed. |
| Post-commit review update, change variable name to network. |
| No change of behavior. |
| |
| * WebProcess/Network/NetworkProcessConnection.cpp: |
| (WebKit::NetworkProcessConnection::didReceiveMessage): |
| |
| 2020-04-14 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Bring back support for rendering scrollbars using the system appearance |
| https://bugs.webkit.org/show_bug.cgi?id=209805 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add WebKitWebContext:use-system-appearance-for-scrollbars property. It's enabled by default to keep backwards |
| compatibility. |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): Encode useSystemAppearanceForScrollbars. |
| (WebKit::WebProcessCreationParameters::decode): Decode useSystemAppearanceForScrollbars. |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/API/APIProcessPoolConfiguration.cpp: |
| (API::ProcessPoolConfiguration::copy): Copy m_useSystemAppearanceForScrollbars; |
| * UIProcess/API/APIProcessPoolConfiguration.h: |
| * UIProcess/API/glib/WebKitWebContext.cpp: |
| (webkitWebContextGetProperty): |
| (webkitWebContextSetProperty): |
| (webkitWebContextConstructed): |
| (webkit_web_context_class_init): |
| (webkit_web_context_set_use_system_appearance_for_scrollbars): |
| (webkit_web_context_get_use_system_appearance_for_scrollbars): |
| * UIProcess/API/gtk/WebKitWebContext.h: |
| * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: |
| * UIProcess/glib/WebProcessPoolGLib.cpp: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): Initialize useSystemAppearanceForScrollbars parameter. |
| * WebProcess/WebProcess.h: |
| * WebProcess/WebProcess.messages.in: |
| * WebProcess/glib/WebProcessGLib.cpp: |
| (WebKit::WebProcess::platformInitializeWebProcess): Call setUseSystemAppearanceForScrollbars to set |
| useSystemAppearanceForScrollbars parameter. |
| (WebKit::WebProcess::setUseSystemAppearanceForScrollbars): Call ScrollbarThemeGtk::setUseSystemAppearance(). |
| |
| 2020-04-14 Youenn Fablet <youenn@apple.com> |
| |
| WebSocketChannel should remove itself from its manager map |
| https://bugs.webkit.org/show_bug.cgi?id=210424 |
| |
| Reviewed by Alex Christensen. |
| |
| WebSocketChannelManager was never removing any entry from its map. |
| To fix this, the manager is now keeping a WeakPtr to each channel. |
| When the channel is destroyed, it will remove itself from its channel manager. |
| |
| * WebProcess/Network/WebSocketChannel.cpp: |
| (WebKit::WebSocketChannel::WebSocketChannel): |
| (WebKit::WebSocketChannel::~WebSocketChannel): |
| * WebProcess/Network/WebSocketChannel.h: |
| * WebProcess/Network/WebSocketChannelManager.cpp: |
| (WebKit::WebSocketChannelManager::addChannel): |
| (WebKit::WebSocketChannelManager::createWebSocketChannel): Deleted. |
| * WebProcess/Network/WebSocketChannelManager.h: |
| (WebKit::WebSocketChannelManager::removeChannel): |
| * WebProcess/Network/WebSocketProvider.cpp: |
| (WebKit::WebSocketProvider::createWebSocketChannel): |
| |
| 2020-04-14 Youenn Fablet <youenn@apple.com> |
| |
| Add logging in case of WebRTC socket error |
| https://bugs.webkit.org/show_bug.cgi?id=210428 |
| |
| Reviewed by Eric Carlson. |
| |
| Add some release logging in case of error when sending, setting option or closing a socket. |
| |
| * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: |
| (WebKit::LibWebRTCSocketClient::sendTo): |
| (WebKit::LibWebRTCSocketClient::close): |
| (WebKit::LibWebRTCSocketClient::setOption): |
| |
| 2020-04-13 David Kilzer <ddkilzer@apple.com> |
| |
| Replace use of Checked<size_t, RecordOverflow> with CheckedSize |
| <https://webkit.org/b/210461> |
| |
| Reviewed by Mark Lam. |
| |
| * Platform/IPC/cocoa/MachMessage.cpp: |
| (IPC::MachMessage::messageSize): |
| * Platform/IPC/cocoa/MachMessage.h: |
| * WebProcess/Network/WebSocketChannel.cpp: |
| (WebKit::WebSocketChannel::increaseBufferedAmount): |
| |
| 2020-04-13 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Update message filters in the WebContent sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=210455 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Update message filters in the WebContent sandbox on iOS with required messages. |
| |
| No new tests, since this patch should not introduce a behavior change. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-13 Brent Fulgham <bfulgham@apple.com> |
| |
| Add roblox.com to the desktop class quirks list |
| https://bugs.webkit.org/show_bug.cgi?id=210452 |
| <rdar://problem/58859657> |
| |
| Reviewed by Zalan Bujtas. |
| |
| * UIProcess/ios/WebPageProxyIOS.mm: |
| (WebKit::desktopClassBrowsingRecommendedForRequest): |
| |
| 2020-04-13 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Remove the "IgnoreViewportScalingConstraints" debug WebKit feature |
| https://bugs.webkit.org/show_bug.cgi?id=210440 |
| |
| Reviewed by Tim Horton. |
| |
| Remove the internal WebKit2 feature; this was introduced around iOS 9 to unconditionally force pages to shrink |
| to fit if they specified a responsive viewport, to avoid horizontal scrolling. |
| |
| Nowadays, this behavior is instead controlled by the `-[WKWebView _allowsViewportShrinkToFit]` SPI, which |
| ensures that this shrink-to-fit preference is updated in sync with the visible content rect update lifecycle; it |
| is currently used by Safari to scale web pages down to fit in smaller multitasking viewports. |
| |
| In contrast, this preference has no internal clients. Instead of maintaining two different ways for clients to |
| control shrink-to-fit behavior, remove support for the preference and make it a no-op. |
| |
| * Shared/WebPreferences.yaml: |
| * UIProcess/API/C/WKPreferences.cpp: |
| (WKPreferencesSetIgnoreViewportScalingConstraints): |
| (WKPreferencesGetIgnoreViewportScalingConstraints): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::updatePreferences): |
| * WebProcess/WebPage/WebPage.h: |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| |
| Remove this redundant mechanism for shrinking web pages down to fit. |
| |
| (WebKit::WebPage::updateVisibleContentRects): |
| |
| 2020-04-13 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Remove unused UTType swizzler code |
| https://bugs.webkit.org/show_bug.cgi?id=210435 |
| |
| Unreviewed rollout of r258120. |
| |
| * Shared/WebProcessCreationParameters.cpp: |
| (WebKit::WebProcessCreationParameters::encode const): |
| (WebKit::WebProcessCreationParameters::decode): |
| * Shared/WebProcessCreationParameters.h: |
| * UIProcess/Cocoa/WebProcessPoolCocoa.mm: |
| (WebKit::WebProcessPool::platformInitializeWebProcess): |
| * WebProcess/cocoa/WebProcessCocoa.mm: |
| (WebKit::WebProcess::platformInitializeWebProcess): |
| |
| 2020-04-13 Kate Cheney <katherine_cheney@apple.com> |
| |
| Turn all instances of NavigatingToAppBoundDomain into Optionals |
| https://bugs.webkit.org/show_bug.cgi?id=210363 |
| <rdar://problem/61612861> |
| |
| Reviewed by Brent Fulgham. |
| |
| NavigatingToAppBoundDomain should be an Optional when passed to the |
| Network Process to distinguish the case of an empty app-bound domain |
| list versus an actual app-bound domain navigation. An empty list and |
| an app-bound navigation should have the same behavior in NetworkSessionCocoa, |
| but we will need distinguished behavior in the future. |
| |
| * NetworkProcess/Downloads/DownloadManager.cpp: |
| (WebKit::DownloadManager::startDownload): |
| * NetworkProcess/Downloads/DownloadManager.h: |
| (WebKit::DownloadManager::startDownload): |
| * NetworkProcess/NetworkConnectionToWebProcess.cpp: |
| (WebKit::NetworkConnectionToWebProcess::startDownload): |
| (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): |
| * NetworkProcess/NetworkConnectionToWebProcess.h: |
| (WebKit::NetworkConnectionToWebProcess::startDownload): |
| * NetworkProcess/NetworkConnectionToWebProcess.messages.in: |
| * NetworkProcess/NetworkLoadParameters.h: |
| * NetworkProcess/NetworkProcess.cpp: |
| (WebKit::NetworkProcess::preconnectTo): |
| (WebKit::NetworkProcess::downloadRequest): |
| * NetworkProcess/NetworkProcess.h: |
| * NetworkProcess/NetworkProcess.messages.in: |
| * NetworkProcess/NetworkResourceLoadParameters.cpp: |
| (WebKit::NetworkResourceLoadParameters::decode): |
| * NetworkProcess/NetworkResourceLoadParameters.h: |
| * NetworkProcess/cache/AsyncRevalidation.cpp: |
| (WebKit::NetworkCache::AsyncRevalidation::AsyncRevalidation): |
| * NetworkProcess/cache/AsyncRevalidation.h: |
| * NetworkProcess/cache/NetworkCache.cpp: |
| (WebKit::NetworkCache::Cache::startAsyncRevalidationIfNeeded): |
| (WebKit::NetworkCache::Cache::retrieve): |
| * NetworkProcess/cache/NetworkCache.h: |
| * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: |
| (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): |
| * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: |
| * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: |
| (WebKit::NetworkCache::SpeculativeLoadManager::registerLoad): |
| (WebKit::NetworkCache::SpeculativeLoadManager::preconnectForSubresource): |
| (WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource): |
| (WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry): |
| (WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation): |
| * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (WebKit::NetworkSessionCocoa::sessionWrapperForTask): |
| We should treat an empty WKAppBoundDomains list like an app-bound domain |
| navigation in the network session, so this sets |
| NavigatingToAppBoundDomain to Yes if the Optional is WTF::nullopt. |
| |
| (WebKit::NetworkSessionCocoa::appBoundSession): Deleted. |
| (WebKit::NetworkSessionCocoa::isolatedSession): Deleted. |
| (WebKit::NetworkSessionCocoa::hasIsolatedSession const): Deleted. |
| (WebKit::NetworkSessionCocoa::clearIsolatedSessions): Deleted. |
| (WebKit::NetworkSessionCocoa::invalidateAndCancel): Deleted. |
| (WebKit::NetworkSessionCocoa::clearCredentials): Deleted. |
| (WebKit::certificatesMatch): Deleted. |
| (WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost): Deleted. |
| (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge): Deleted. |
| (WebKit::NetworkSessionCocoa::deviceManagementPolicyMonitor): Deleted. |
| (WebKit::NetworkSessionCocoa::createWebSocketTask): Deleted. |
| (WebKit::NetworkSessionCocoa::addWebSocketTask): Deleted. |
| (WebKit::NetworkSessionCocoa::removeWebSocketTask): Deleted. |
| (WebKit::NetworkSessionCocoa::hostNamesWithAlternativeServices const): Deleted. |
| (WebKit::NetworkSessionCocoa::deleteAlternativeServicesForHostNames): Deleted. |
| (WebKit::NetworkSessionCocoa::clearAlternativeServices): Deleted. |
| * Shared/LoadParameters.h: |
| * Shared/PolicyDecision.h: |
| (WebKit::PolicyDecision::decode): |
| * UIProcess/Network/NetworkProcessProxy.cpp: |
| (WebKit::NetworkProcessProxy::preconnectTo): |
| * UIProcess/Network/NetworkProcessProxy.h: |
| * UIProcess/ProvisionalPageProxy.cpp: |
| (WebKit::ProvisionalPageProxy::loadData): |
| (WebKit::ProvisionalPageProxy::loadRequest): |
| * UIProcess/ProvisionalPageProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::loadRequestWithNavigationShared): |
| (WebKit::WebPageProxy::loadDataWithNavigationShared): |
| (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain): |
| Set this to WTF::nullopt instead of NavigatingToAppBoundDomain::Yes |
| so the two cases are distinguished. |
| |
| (WebKit::WebPageProxy::isNavigatingToAppBoundDomainTesting): |
| * UIProcess/WebPageProxy.h: |
| (WebKit::WebPageProxy::isNavigatingToAppBoundDomain const): |
| * UIProcess/WebProcessPool.cpp: |
| (WebKit::WebProcessPool::download): |
| * WebProcess/WebPage/WebFrame.cpp: |
| (WebKit::WebFrame::startDownload): |
| (WebKit::WebFrame::convertMainResourceLoadToDownload): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::loadDataImpl): |
| * WebProcess/WebPage/WebPage.h: |
| (WebKit::WebPage::setIsNavigatingToAppBoundDomain): |
| (WebKit::WebPage::isNavigatingToAppBoundDomain const): |
| |
| 2020-04-13 David Kilzer <ddkilzer@apple.com> |
| |
| Fix clang static analyzer warnings about unused instance variables in WebIconDatabase, WKView |
| <https://webkit.org/b/210427> |
| |
| Reviewed by Alex Christensen. |
| |
| * UIProcess/API/Cocoa/WKView.h: |
| (WKView._unused): |
| - Use WK_UNUSED_INSTANCE_VARIABLE to ignore unused instance |
| variable. |
| |
| 2020-04-13 David Kilzer <ddkilzer@apple.com> |
| |
| Add WARN_UNUSED_RETURN to decode methods in Source/WebKit |
| <https://webkit.org/b/210423> |
| <rdar://problem/61715582> |
| |
| Reviewed by Alex Christensen. |
| |
| * GPUProcess/GPUProcessCreationParameters.h: |
| * NetworkProcess/Downloads/DownloadID.h: |
| (IPC::ArgumentCoder<WebKit::DownloadID>::decode): |
| * NetworkProcess/NetworkProcessCreationParameters.h: |
| * NetworkProcess/cache/NetworkCacheKey.h: |
| (WebKit::NetworkCache::DataKey::decode): |
| * NetworkProcess/cache/NetworkCacheStorage.cpp: |
| (WebKit::NetworkCache::decodeRecordMetaData): |
| (WebKit::NetworkCache::decodeRecordHeader): |
| * Platform/SharedMemory.h: |
| * PluginProcess/PluginCreationParameters.h: |
| * Shared/API/APIData.h: |
| * Shared/API/APIError.h: |
| * Shared/API/APIFrameHandle.h: |
| * Shared/API/APIGeometry.h: |
| * Shared/API/APINumber.h: |
| (API::Number::decode): |
| * Shared/API/APIPageGroupHandle.h: |
| * Shared/API/APIPageHandle.h: |
| * Shared/API/APIURL.h: |
| (API::URL::decode): |
| * Shared/API/APIURLRequest.h: |
| * Shared/API/APIURLResponse.h: |
| * Shared/API/Cocoa/RemoteObjectInvocation.h: |
| * Shared/Cocoa/ArgumentCodersCocoa.h: |
| * Shared/ContextMenuContextData.h: |
| * Shared/Databases/IndexedDB/WebIDBResult.h: |
| * Shared/EditorState.h: |
| * Shared/FocusedElementInformation.h: |
| * Shared/FontInfo.h: |
| * Shared/LayerTreeContext.h: |
| * Shared/LoadParameters.h: |
| * Shared/OptionalCallbackID.h: |
| (WebKit::OptionalCallbackID::decode): |
| * Shared/PlatformPopupMenuData.h: |
| * Shared/Plugins/PluginProcessCreationParameters.h: |
| * Shared/PrintInfo.h: |
| * Shared/RemoteLayerTree/RemoteLayerBackingStore.h: |
| * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: |
| * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: |
| * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h: |
| * Shared/SessionState.h: |
| * Shared/ShareableBitmap.h: |
| * Shared/ShareableResource.h: |
| * Shared/TouchBarMenuData.h: |
| * Shared/UpdateInfo.h: |
| * Shared/VisibleContentRectUpdateInfo.h: |
| * Shared/WebEvent.h: |
| * Shared/WebHitTestResultData.h: |
| * Shared/WebNavigationDataStore.h: |
| (WebKit::WebNavigationDataStore::decode): |
| * Shared/WebPreferencesStore.h: |
| * Shared/WebProcessCreationParameters.h: |
| * Shared/WebsiteData/WebsiteData.h: |
| * Shared/cf/ArgumentCodersCF.h: |
| * Shared/gtk/ArgumentCodersGtk.cpp: |
| (IPC::decodeImage): |
| (IPC::decodeGKeyFile): |
| * Shared/gtk/ArgumentCodersGtk.h: |
| * Shared/gtk/WebSelectionData.h: |
| * Shared/ios/InteractionInformationAtPosition.h: |
| * Shared/ios/InteractionInformationRequest.h: |
| * Shared/mac/ColorSpaceData.h: |
| * Shared/mac/ObjCObjectGraph.h: |
| * Shared/mac/SecItemRequestData.h: |
| * Shared/mac/WebGestureEvent.h: |
| * UIProcess/Cocoa/SessionStateCoding.h: |
| * UIProcess/LegacySessionStateCoding.h: |
| * UIProcess/mac/LegacySessionStateCoding.cpp: |
| (WebKit::decodeSessionHistoryEntryData): |
| (WebKit::decodeSessionHistoryEntry): |
| (WebKit::decodeSessionHistoryEntries): |
| (WebKit::decodeV0SessionHistory): |
| (WebKit::decodeV1SessionHistory): |
| (WebKit::decodeSessionHistory): |
| * WebProcess/GPU/GPUProcessConnectionInfo.h: |
| (WebKit::GPUProcessConnectionInfo::decode): |
| * WebProcess/GPU/media/RemoteAudioBusData.h: |
| (WebKit::RemoteAudioBusData::decode): |
| * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: |
| * WebProcess/Network/NetworkProcessConnectionInfo.h: |
| (WebKit::NetworkProcessConnectionInfo::decode): |
| * WebProcess/Plugins/Plugin.h: |
| - Add WARN_UNUSED_RETURN to all decode functions. |
| |
| 2020-04-13 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Add message filtering to all iokit open rules |
| https://bugs.webkit.org/show_bug.cgi?id=210352 |
| |
| Reviewed by Sam Weinig. |
| |
| Apply message filtering with reports and telemetry to all iokit-open rules in the WebContent process' sandbox on iOS |
| to gain a better understanding of which iokit-open rules we can investigate. |
| |
| No new tests, since adding telemetry will not introduce a change in behavior. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-13 Joonghun Park <jh718.park@samsung.com> |
| |
| Unreviewed. Remove redundant move in return statement. |
| |
| Return statement already returns rvalue, |
| so we don't need move here. |
| |
| This patch removes the build warning below since r259922. |
| warning: redundant move in return statement [-Wredundant-move] |
| |
| * NetworkProcess/cache/NetworkCacheCoders.cpp: |
| (WTF::Persistence::Coder<WebCore::HTTPHeaderMap>::decode): |
| |
| 2020-04-13 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| Fix various build warnings |
| https://bugs.webkit.org/show_bug.cgi?id=210429 |
| |
| Reviewed by Mark Lam. |
| |
| Use private-code instead of deprecated code command to build the Wayland protocol. |
| |
| * PlatformGTK.cmake: |
| |
| 2020-04-12 Darin Adler <darin@apple.com> |
| |
| Fix some strange uses of start/endOfDocument |
| https://bugs.webkit.org/show_bug.cgi?id=210408 |
| |
| Reviewed by Wenson Hsieh. |
| |
| * WebProcess/WebPage/ios/WebPageIOS.mm: |
| (WebKit::WebPage::replaceDictatedText): Pass the document to startOfDocument, |
| rather than getting the documentelement, because the function works on any |
| node, so there's no reason to write code to get a particular one. |
| (WebKit::WebPage::applyAutocorrectionInternal): Ditto. |
| |
| 2020-04-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Use gdk_window_move_to_rect() to position popup menus |
| https://bugs.webkit.org/show_bug.cgi?id=210069 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: |
| (WebKit::WebPopupMenuProxyGtk::showPopupMenu): |
| |
| 2020-04-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Page is not drawn with PSON, hardware acceleration and address typed in URL bar |
| https://bugs.webkit.org/show_bug.cgi?id=208091 |
| |
| Reviewed by Michael Catanzaro. |
| |
| This happens only when accelerated compositing mode policy is set to always. In this case, the |
| bindSurfaceToWebPage wayland message is received before the WebPageProxy has updated the web page identifier. We |
| should always check if there's a provisional page and get its web page identifier. |
| |
| * UIProcess/gtk/WaylandCompositor.cpp: |
| (WebKit::WaylandCompositor::bindSurfaceToWebPage): |
| |
| 2020-04-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][PSON] Crash in WaylandCompositor::Surface destructor with USE_WPE_RENDERER disabled |
| https://bugs.webkit.org/show_bug.cgi?id=209345 |
| |
| Reviewed by Michael Catanzaro. |
| |
| In case of PSON the web page identifier can change fo the same web page proxy. When swapping processes the new |
| web page calls bindSurfaceToWebPage(), but we still have the web page proxy bound to the previous surface. We |
| just need to unbind the current surface before binding the new one. |
| |
| * UIProcess/gtk/WaylandCompositor.cpp: |
| (WebKit::WaylandCompositor::bindSurfaceToWebPage): |
| |
| 2020-04-11 David Kilzer <ddkilzer@apple.com> |
| |
| Follow-up: Add WARN_UNUSED_RETURN to decode methods in Source/WebKit/Platform/IPC |
| <https://webkit.org/b/210316> |
| <rdar://problem/61559305> |
| |
| Changes based on feedback from Alex Christensen and Darin Adler: |
| - Remove WARN_UNUSED_RETURN from methods returning Optional<>. |
| - Place WARN_UNUSED_RETURN consistently before the return type. |
| |
| * Platform/IPC/ArgumentCoder.h: |
| * Platform/IPC/ArgumentCoders.cpp: |
| * Platform/IPC/ArgumentCoders.h: |
| (IPC::ArgumentCoder<OptionSet<T>>::decode): |
| (IPC::ArgumentCoder<Optional<T>>::decode): |
| (IPC::ArgumentCoder<Box<T>>::decode): |
| (IPC::TupleDecoderImpl::decode): |
| (IPC::TupleDecoderImpl<Type>::decode): |
| (IPC::TupleDecoder::decode): |
| (IPC::TupleDecoder<0>::decode): |
| (IPC::VariantCoder::decode): |
| * Platform/IPC/Attachment.h: |
| * Platform/IPC/DataReference.h: |
| * Platform/IPC/Decoder.h: |
| * Platform/IPC/FormDataReference.h: |
| (IPC::FormDataReference::decode): |
| * Platform/IPC/ImageDataReference.h: |
| (IPC::ImageDataReference::decode): |
| * Platform/IPC/SharedBufferDataReference.h: |
| (IPC::SharedBufferDataReference::decode): |
| * Platform/IPC/StringReference.h: |
| |
| 2020-04-11 David Kilzer <ddkilzer@apple.com> |
| |
| Follow-up: Add WARN_UNUSED_RETURN to decode methods in WebCoreArgumentCoders |
| <https://webkit.org/b/210322> |
| <rdar://problem/61565148> |
| |
| Changes based on feedback from Alex Christensen and Darin Adler: |
| - Remove WARN_UNUSED_RETURN from methods returning Optional<>. |
| - Place WARN_UNUSED_RETURN consistently before the return type. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| * Shared/WebCoreArgumentCoders.h: |
| |
| 2020-04-11 Daniel Bates <dabates@apple.com> |
| |
| Add text interaction delegate functions |
| https://bugs.webkit.org/show_bug.cgi?id=210395 |
| <rdar://problem/61650549> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Implement some delegate callbacks that are used to toggle selection reveal, |
| placeholder text, and selection assistance. |
| |
| * UIProcess/ios/WKContentViewInteraction.h: |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (-[WKContentView _willBeginTextInteractionInTextInputContext:]): Added. |
| (-[WKContentView _didFinishTextInteractionInTextInputContext:]): Added. |
| |
| 2020-04-10 Darin Adler <darin@apple.com> |
| |
| Move more from live range to SimpleRange: callers of absoluteTextRects |
| https://bugs.webkit.org/show_bug.cgi?id=210369 |
| |
| Reviewed by Anders Carlsson. |
| |
| * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm: |
| (-[WKDOMNode textRects]): Moved implementation here. There's no reason for Node |
| to have a textRects function, since it's a layout/rendering operation and a |
| single node is also an unusual special case, but for now at least we will keep |
| this legacy method. |
| * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm: |
| (-[WKDOMRange textRects]): Changed to call RenderObject::absoluteTextRects |
| instead of Range::absoluteTextRects. |
| |
| * WebProcess/WebPage/FindController.cpp: |
| (WebKit::FindController::updateFindUIAfterPageScroll): Use |
| RenderObject::absoluteTextRects instead of Range::absoluteRectRects. |
| (WebKit::FindController::findStringMatches): Ditto. |
| |
| 2020-04-10 Pablo Saavedra <psaavedra@igalia.com> |
| |
| [GTK][WPE] Replace fopen/fclose by fopen/fseek functions in MemoryPressureMonitor |
| https://bugs.webkit.org/show_bug.cgi?id=209942 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Replacing the open()/close() logic to get the data from /proc/meminfo, |
| /proc/self/cgroup, ... with a new logic where the files are just |
| opened once and we just perform a seek to the initial position of |
| of an unbuffered file. |
| |
| Also refactoring of some logic: |
| |
| - Added the CGroupMemoryController class what encapsulates the logic |
| to calculate the the total memory and the memory usage with |
| cgroups. |
| - CGroupMemoryController encpasulates the FILE pointers to the |
| relative files to cgroups. |
| - The memInfoFile, zoneInfoFile and cgroupControllerFile are now |
| opened once in the Thread::create() invoked by the |
| MemoryPressureMonitor::start(). |
| |
| * UIProcess/linux/MemoryPressureMonitor.cpp: |
| (WebKit::lowWatermarkPages): |
| (WebKit::calculateMemoryAvailable): |
| (WebKit::getCgroupFile): |
| (WebKit::getCgroupControllerPath): |
| (WebKit::systemMemoryUsedAsPercentage): |
| (WebKit::MemoryPressureMonitor::start): |
| (WebKit::CGroupMemoryController::setMemoryControllerPath): |
| (WebKit::CGroupMemoryController::disposeMemoryController): |
| (WebKit::CGroupMemoryController::getCgroupFileValue): |
| (WebKit::CGroupMemoryController::getMemoryTotalWithCgroup): |
| (WebKit::CGroupMemoryController::getMemoryUsageWithCgroup): |
| (WebKit::getCgroupFileValue): Deleted. |
| (WebKit::getMemoryTotalWithCgroup): Deleted. |
| (WebKit::getMemoryUsageWithCgroup): Deleted. |
| * UIProcess/linux/MemoryPressureMonitor.h: |
| (WebKit::CGroupMemoryController::isActive): |
| (WebKit::CGroupMemoryController::~CGroupMemoryController): |
| |
| 2020-04-10 Alex Christensen <achristensen@webkit.org> |
| |
| PersistentCoders should use modern decoding syntax |
| https://bugs.webkit.org/show_bug.cgi?id=207497 |
| |
| Reviewed by Darin Adler. |
| |
| * NetworkProcess/cache/CacheStorageEngineCache.cpp: |
| (WebKit::CacheStorage::decodeDOMCacheRecord): |
| (WebKit::CacheStorage::Cache::decodeRecordHeader): |
| * NetworkProcess/cache/CacheStorageEngineCaches.cpp: |
| (WebKit::CacheStorage::Caches::readOrigin): |
| (WebKit::CacheStorage::decodeCachesNames): |
| * NetworkProcess/cache/NetworkCacheCoders.cpp: |
| (WTF::Persistence::Coder<WebCore::HTTPHeaderMap>::decode): |
| * NetworkProcess/cache/NetworkCacheEntry.cpp: |
| (WebKit::NetworkCache::Entry::decodeStorageRecord): |
| * NetworkProcess/cache/NetworkCacheKey.cpp: |
| (WebKit::NetworkCache::Key::decode): |
| * NetworkProcess/cache/NetworkCacheKey.h: |
| * NetworkProcess/cache/NetworkCacheStorage.cpp: |
| (WebKit::NetworkCache::decodeRecordMetaData): |
| * NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp: |
| (WebKit::NetworkCache::SubresourceInfo::encode const): |
| (WebKit::NetworkCache::SubresourceInfo::decode): |
| (WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord): |
| * NetworkProcess/cache/NetworkCacheSubresourcesEntry.h: |
| * Shared/UserData.cpp: |
| (WebKit::UserData::decode): |
| * UIProcess/API/APIContentRuleListStore.cpp: |
| (API::decodeContentRuleListMetaData): |
| |
| 2020-04-10 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: add `broadcastConsoleMessage` calls for new ITPDebug logs after r259275 |
| https://bugs.webkit.org/show_bug.cgi?id=210362 |
| |
| Reviewed by John Wilander. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation): |
| (WebKit::ResourceLoadStatisticsDatabaseStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation): |
| (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| |
| 2020-04-10 Chris Dumez <cdumez@apple.com> |
| |
| [IPC Hardening] WebHitTestResultData IPC decoder should validate imageSharedMemory / imageSize |
| https://bugs.webkit.org/show_bug.cgi?id=210361 |
| <rdar://problem/60758280> |
| |
| Reviewed by Geoffrey Garen. |
| |
| WebHitTestResultData IPC decoder should validate imageSharedMemory / imageSize to make sure they are consistent. |
| |
| * Shared/WebHitTestResultData.cpp: |
| (WebKit::WebHitTestResultData::decode): |
| |
| 2020-04-10 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to handle proxy authentication and require secure proxy connections |
| https://bugs.webkit.org/show_bug.cgi?id=210343 |
| <rdar://problem/61546396> <rdar://problem/61546519> and <rdar://problem/61546658> |
| |
| Reviewed by Geoffrey Garen. |
| |
| I also use WKWebViewConfiguration.connectionProxyDictionary instead of CFURLRequestSetProxySettings |
| to set proxy settings. The equivalence of this behavior is covered by the API tests. |
| |
| * NetworkProcess/NetworkSessionCreationParameters.cpp: |
| (WebKit::NetworkSessionCreationParameters::encode const): |
| (WebKit::NetworkSessionCreationParameters::decode): |
| * NetworkProcess/NetworkSessionCreationParameters.h: |
| * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: |
| (WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded): |
| * NetworkProcess/cocoa/NetworkSessionCocoa.h: |
| * NetworkProcess/cocoa/NetworkSessionCocoa.mm: |
| (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): |
| (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: |
| * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: |
| (-[_WKWebsiteDataStoreConfiguration preventsSystemHTTPProxyAuthentication]): |
| (-[_WKWebsiteDataStoreConfiguration setPreventsSystemHTTPProxyAuthentication:]): |
| (-[_WKWebsiteDataStoreConfiguration requiresSecureHTTPSProxyConnection]): |
| (-[_WKWebsiteDataStoreConfiguration setRequiresSecureHTTPSProxyConnection:]): |
| * UIProcess/WebsiteData/WebsiteDataStore.cpp: |
| (WebKit::WebsiteDataStore::parameters): |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: |
| (WebKit::WebsiteDataStoreConfiguration::copy const): |
| * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: |
| (WebKit::WebsiteDataStoreConfiguration::preventsSystemHTTPProxyAuthentication const): |
| (WebKit::WebsiteDataStoreConfiguration::setPreventsSystemHTTPProxyAuthentication): |
| (WebKit::WebsiteDataStoreConfiguration::requiresSecureHTTPSProxyConnection const): |
| (WebKit::WebsiteDataStoreConfiguration::setRequiresSecureHTTPSProxyConnection): |
| |
| 2020-04-10 Chris Dumez <cdumez@apple.com> |
| |
| [IPC Hardening] WebDeviceOrientationAndMotionAccessController::shouldAllowAccess() should not crash on invalid input |
| https://bugs.webkit.org/show_bug.cgi?id=210359 |
| <rdar://problem/60092453> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Make sure the security origin is a valid HashMap key before trying to do a HashMap lookup. |
| The security origin is coming from IPC and thus cannot be trusted. |
| |
| * UIProcess/WebsiteData/WebDeviceOrientationAndMotionAccessController.cpp: |
| (WebKit::WebDeviceOrientationAndMotionAccessController::cachedDeviceOrientationPermission const): |
| |
| 2020-04-10 John Wilander <wilander@apple.com> |
| |
| Add capability to opt in specific domains into SameSite=strict bounce tracking protection |
| https://bugs.webkit.org/show_bug.cgi?id=210347 |
| <rdar://problem/61593323> |
| |
| Reviewed by Brent Fulgham. |
| |
| This change adds an additional opt-in condition to the shouldEnforceSameSiteStrictFor() |
| functions in both ResourceLoadStatisticsMemoryStore and ResourceLoadStatisticsDatabaseStore. |
| |
| No new tests. This adds domain specific logic, quirk-style. The logFrameNavigation() |
| changes are covered by existing tests. |
| |
| * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: |
| (WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation): |
| Now only captures real redirects for the purposes of the SameSite=strict rule. |
| (WebKit::ResourceLoadStatisticsDatabaseStore::shouldEnforceSameSiteStrictFor): |
| * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: |
| (WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation): |
| Now only captures real redirects for the purposes of the SameSite=strict rule. |
| (WebKit::ResourceLoadStatisticsMemoryStore::shouldEnforceSameSiteStrictFor): |
| (WebKit::ResourceLoadStatisticsMemoryStore::registrableDomainsToDeleteOrRestrictWebsiteDataFor): |
| Removed stray newline. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: |
| (WebKit::ResourceLoadStatisticsStore::shouldEnforceSameSiteStrictForSpecificDomain const): |
| The new function with domains to subject to the new rule. |
| * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: |
| |
| 2020-04-10 Chris Dumez <cdumez@apple.com> |
| |
| First render after a process swap does not use accelerated rendering |
| https://bugs.webkit.org/show_bug.cgi?id=210297 |
| <rdar://problem/61432515> |
| |
| Reviewed by Antti Koivisto. |
| |
| To prevent flashing on navigation when process-swapping, we were delaying the |
| DrawingAreaProxy::EnterAcceleratedCompositingMode IPC message from the WebProcess |
| to the UIProcess, until the new page is ready to display. The reason we did this |
| is that the EnterAcceleratedCompositingMode IPC message ends up setting the root |
| CALayer so the new content would become visible on screen. However, another side |
| effect of this is that we would also delay the point until which we get |
| accelerated rendering, which would negatively impact early page load performance. |
| |
| To address the issue, the following changes were made: |
| 1. We no longer delay the DrawingAreaProxy::EnterAcceleratedCompositingMode IPC. |
| In non process-swap cases, we send it as soon as the DrawingArea is constructed. |
| In process-swap cases, we send it as soon as we commit the load since this is |
| when the provisional drawing area gets committed and happens before we have |
| any content to paint. |
| 2. In the UIProcess, when we get the DrawingAreaProxy::EnterAcceleratedCompositingMode |
| IPC and we already have a root layer, we add the new one behind the existing one |
| instead of replacing the existing one. As a result, the new layer will get |
| accelerated compositing but will not be visible on screen yet. |
| 3. Introduce a new DrawingAreaProxy::DidFirstLayerFlush IPC which gets send at the |
| point where we used to send the EnterAcceleratedCompositingMode IPC, meaning where |
| the new content is ready to display. When the UIProcess receives this IPC, it |
| actually replaces the root layer with the new layer so that the new content visible. |
| |
| After this patch, our CALayers get accelerated compositing right away after a |
| process-swap but we still do not see any blank-flashing on navigation. |
| |
| * UIProcess/Cocoa/WebViewImpl.h: |
| * UIProcess/Cocoa/WebViewImpl.mm: |
| (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer): |
| (WebKit::WebViewImpl::setAcceleratedCompositingRootLayerAfterFlush): |
| * UIProcess/DrawingAreaProxy.h: |
| (WebKit::DrawingAreaProxy::didFirstLayerFlush): |
| * UIProcess/DrawingAreaProxy.messages.in: |
| * UIProcess/PageClient.h: |
| (WebKit::PageClient::didFirstLayerFlush): |
| * UIProcess/SuspendedPageProxy.cpp: |
| (WebKit::SuspendedPageProxy::SuspendedPageProxy): |
| (WebKit::SuspendedPageProxy::pageDidFirstLayerFlush): |
| (WebKit::SuspendedPageProxy::closeWithoutFlashing): |
| * UIProcess/SuspendedPageProxy.h: |
| * UIProcess/WebPageProxy.cpp: |
| (WebKit::WebPageProxy::suspendCurrentPageIfPossible): |
| (WebKit::WebPageProxy::commitProvisionalPage): |
| * UIProcess/WebPageProxy.h: |
| * UIProcess/mac/PageClientImplMac.h: |
| * UIProcess/mac/PageClientImplMac.mm: |
| (WebKit::PageClientImpl::didFirstLayerFlush): |
| * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: |
| * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: |
| (WebKit::TiledCoreAnimationDrawingAreaProxy::didFirstLayerFlush): |
| * WebProcess/WebPage/DrawingArea.h: |
| (WebKit::DrawingArea::sendEnterAcceleratedCompositingModeIfNeeded): |
| * WebProcess/WebPage/WebPage.cpp: |
| (WebKit::WebPage::didCommitLoad): |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: |
| * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: |
| (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): |
| (WebKit::TiledCoreAnimationDrawingArea::sendDidFirstLayerFlushIfNeeded): |
| (WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded): |
| (WebKit::TiledCoreAnimationDrawingArea::updateRendering): |
| |
| 2020-04-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] Unable to select text by tap-hold or double tap-hold when allowsLinkPreview property is set to NO |
| https://bugs.webkit.org/show_bug.cgi?id=210191 |
| <rdar://problem/60454016> |
| |
| Reviewed by Tim Horton. |
| |
| In iOS 13.4, UIWKTextInteractionAssistant no longer uses the (misleadingly-named) "force press" gesture to drive |
| text selection when performing a long press. Instead, it now uses the UIVariableDelayLoupeGestureRecognizer, |
| i.e. the text interaction assistant's loupe gesture recognizer. |
| |
| The highlight long press gesture, which is only enabled when `allowsLinkPreview` is set to `NO`, is currently |
| allowed to recognize alongside the force press gesture but not the loupe gesture. This means that when link |
| previews are disabled, we'll end up allowing the highlight long press gesture to prevent text selection. A |
| similar issue already exists for the tap-and-half gesture as well. |
| |
| To fix this, we allow the highlight long press gesture to recognize alongside both gestures. |
| |
| Test: editing/selection/ios/select-text-with-link-preview-disabled.html |
| |
| * UIProcess/ios/WKContentViewInteraction.mm: |
| (tapAndAHalfRecognizerClass): |
| |
| While UITapAndAHalfRecognizer is declared in a UIKit private header, it is (perhaps unintentionally) not |
| exported, so attempting to call +[UITapAndAHalfRecognizer class] leads to a linker error. Work around this by |
| dynamically grabbing the `Class` from the class name. |
| |
| The tap and half gesture recognizer is private in UIKit and only used for text interaction gestures, so we |
| always want the highlight long press gesture to be able to recognize alongside it. |
| |
| (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): |
| |
| Also clean up some existing code by replacing `.get().`s with Objective-C bracket operators. |
| |
| 2020-04-10 Brent Fulgham <bfulgham@apple.com> |
| |
| Switch unused IOKit classes from allow-with-report to deny-with-report |
| https://bugs.webkit.org/show_bug.cgi?id=210136 |
| <rdar://problem/61403216> |
| |
| Reviewed by Per Arne Vollan. |
| |
| After tracking telemetry for several weeks, we can now safely switch the default state |
| of a number of IOKit classes from 'allow with telemetry' to 'deny with telemetry'. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| * WebProcess/com.apple.WebProcess.sb.in: |
| |
| 2020-04-10 Daniel Bates <dabates@apple.com> |
| |
| mayContainEditableElementsInRect() can terminate search once the search rect is wholly contained inside a layer |
| https://bugs.webkit.org/show_bug.cgi?id=210340 |
| |
| Reviewed by Simon Fraser. |
| |
| Reduce false positives. This makes mayContainEditableElementsInRect() return false when the |
| search rect is wholly contained inside a higher paint order layer with no editable elements |
| that overlaps a layer with editable elements. |
| |
| * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: |
| (WebKit::mayContainEditableElementsInRect): |
| |
| 2020-04-10 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Add routines to message filter in the WebContent sandbox |
| https://bugs.webkit.org/show_bug.cgi?id=210338 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Add required routines to the message filter in the WebContent sandbox on iOS. These have been observed |
| being in use during local testing. |
| |
| * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: |
| |
| 2020-04-10 Simon Fraser <simon.fraser@apple.com> |
| |
| Reset view navigation gesture state between tests |
| https://bugs.webkit.org/show_bug.cgi?id=210283 |
| |
| Re-land r259818 with a null-check on m_webPageProxyForBackForwardListForCurrentSwipe. |
| |
| * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: |
| * UIProcess/API/Cocoa/WKWebViewTesting.mm: |
| (-[WKWebView _resetNavigationGestureStateForTesting]): |
| * UIProcess/ViewGestureController.cpp: |
| (WebKit::ViewGestureController::willBeginGesture): |
| (WebKit::ViewGestureController::didEndGesture): |
| (WebKit::ViewGestureController::PendingSwipeTracker::handleEvent): |
| (WebKit::ViewGestureController::PendingSwipeTracker::eventWasNotHandledByWebCore): |
| * UIProcess/ViewGestureController.h: |
| * UIProcess/ios/ViewGestureControllerIOS.mm: |
| (WebKit::ViewGestureController::removeSwipeSnapshot): |
| (WebKit::ViewGestureController::resetState): |
| (WebKit::ViewGestureController::reset): |
| * UIProcess/mac/ViewGestureControllerMac.mm: |
| (WebKit::ViewGestureController::removeSwipeSnapshot): |
| (WebKit::ViewGestureController::resetState): |
| (WebKit::ViewGestureController::reset): |
| |
| 2020-04-10 David Kilzer <ddkilzer@apple.com> |
| |
| Add WARN_UNUSED_RETURN to decode methods in WebCoreArgumentCoders |
| <https://webkit.org/b/210322> |
| |
| Reviewed by Darin Adler. |
| |
| * Shared/WebCoreArgumentCoders.cpp: |
| (IPC::decodeSharedBuffer): |
| (IPC::decodeTypesAndData): |
| (IPC::decodeImage): |
| (IPC::decodeOptionalImage): |
| (IPC::decodeNativeImage): |
| (IPC::decodeOptionalNativeImage): |
| * Shared/WebCoreArgumentCoders.h: |
| * Shared/mac/WebCoreArgumentCodersMac.mm: |
| (IPC::decodeNSError): |
| |
| 2020-04-10 Peng Liu <peng.liu6@apple.com> |
| |
| Add null pointer checkings in WebFullScreenManager |
| https://bugs.webkit.org/show_bug.cgi?id=210291 |
| |
| Reviewed by Daniel Bates. |
| |
| Add null pointer checkings for "element" and "m_element" in WebFullScreenManager. |
| |
| * WebProcess/FullScreen/WebFullScreenManager.cpp: |
| (WebKit::screenRectOfContents): |
| (WebKit::WebFullScreenManager::enterFullScreenForElement): |
| (WebKit::WebFullScreenManager::willEnterFullScreen): |
| (WebKit::WebFullScreenManager::didEnterFullScreen): |
| (WebKit::WebFullScreenManager::willExitFullScreen): |
| (WebKit::WebFullScreenManager::didExitFullScreen): |
| (WebKit::WebFullScreenManager::setAnimatingFullScreen): |
| (WebKit::WebFullScreenManager::requestExitFullScreen): |
| |
| == Rolled over to ChangeLog-2020-04-10 == |