Ensure old binaries have old snapshotting behaviors
[WebKit-https.git] / Source / WebKit / ChangeLog
index b566fc1..ce65a9e 100644 (file)
@@ -1,3 +1,442 @@
+2019-02-08  Beth Dakin  <bdakin@apple.com>
+
+        Ensure old binaries have old snapshotting behaviors
+        https://bugs.webkit.org/show_bug.cgi?id=194449
+        -and corresponding-
+        rdar://problem/47931954
+
+        Reviewed by Darin Adler.
+
+        Make sure that a nil configuration behaves the same way that it used to on apps 
+        that were linked before FirstWithSnapshotAfterScreenUpdates
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
+        * UIProcess/Cocoa/VersionChecks.h:
+
+2019-02-12  Andy Estes  <aestes@apple.com>
+
+        [iOSMac] Enable Parental Controls Content Filtering
+        https://bugs.webkit.org/show_bug.cgi?id=194521
+        <rdar://39732376>
+
+        Reviewed by Tim Horton.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2019-02-11  Alex Christensen  <achristensen@webkit.org>
+
+        Remove noisy and unnecessary logs added in r241223
+        https://bugs.webkit.org/show_bug.cgi?id=194427
+
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::ProcessLauncher::launchProcess):
+        Errors occur all the time in the XPC connection's event handler, like when a process terminates.
+        We don't need to print an "error" every time any process terminates.
+
+2019-02-11  Brian Burg  <bburg@apple.com>
+
+        [Cocoa] Web Automation: client callbacks are not called if delegate does not override
+        https://bugs.webkit.org/show_bug.cgi?id=194519
+        <rdar://problem/47981961>
+
+        Reviewed by Joseph Pecoraro.
+
+        Call the completion handler directly if the delegate does not implement the relevant method.
+
+        * UIProcess/Cocoa/AutomationSessionClient.mm:
+        (WebKit::AutomationSessionClient::requestNewPageWithOptions):
+        (WebKit::AutomationSessionClient::requestSwitchToPage):
+        (WebKit::AutomationSessionClient::requestHideWindowOfPage):
+        (WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
+        (WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):
+
+2019-02-11  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Adopt SPI to support Emacs bindings: transpose and delete to end of paragraph
+        https://bugs.webkit.org/show_bug.cgi?id=194505
+        <rdar://problem/47743533>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _deleteToEndOfParagraph]): Added.
+        (-[WKContentView _transpose]): Added.
+
+2019-02-11  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [GTK][WPE] Add content extensions support in WKTR and unskip layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=193622
+
+        Reviewed by Michael Catanzaro.
+
+        * NetworkProcess/cache/NetworkCacheData.h: Define an adoptAndMapFile() implementation
+        for GFileIOStream objects.
+        * NetworkProcess/cache/NetworkCacheDataSoup.cpp:
+        (WebKit::NetworkCache::adoptAndMapFile): Added implementation, which extracts the file
+        descriptor from a GFileIOStream, as it inherits from GFileDescriptorBased, and then
+        reuses the version of adoptAndMapFile() which takes a file descritor for the actual work.
+        * NetworkProcess/NetworkLoadChecker.cpp:
+        (Webkit::NetworkLoadChecker::checkRequest): Use "this" when referring to
+        processContentExtensionRulesForLoad() in order to avoid ambiguity.
+        * Sources.txt: Add WKUserContentExtensionStoreRef.cpp, all ports use it now.
+        * SourcesCocoa.txt: Remove WKUserContentExtensionStoreRef.cpp, because it is not
+        Cocoa-specific anymore.
+        * SourcesGTK.txt: Add APIContentRuleListStoreGLib.cpp.
+        * SourcesWPE.txt: Ditto.
+        * UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
+        (WKUserContentExtensionStoreCreate): Added.
+        (toResult): Added.
+        (WKUserContentExtensionStoreCompile): Added.
+        (WKUserContentExtensionStoreLookup): Added.
+        (WKUserContentExtensionStoreRemove): Added.
+        * UIProcess/API/C/WKUserContentExtensionStoreRef.h: Add declarations for the new C API
+        functions and for the WKUserContentExtensionStoreResult status enum.
+        * UIProcess/API/glib/APIContentRuleListStoreGLib.cpp: Added.
+        (API::ContentRuleListStore::defaultStorePath): Add a dummy implementation. The public API
+        for the GLib based ports (GTK+ and WPE) will not allow using the default store and will
+        always indicating a path.
+
+2019-02-11  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Mouse/Touch/Pointer events are missing modifier keys
+        https://bugs.webkit.org/show_bug.cgi?id=191446
+        <rdar://problem/45929460>
+
+        Reviewed by Tim Horton.
+
+        Make use of UIKit SPI to retreive the modifier flags when dispatching mouse and touch events.
+        Add new WebKit SPI for iOS, -[WKNavigationAction modifierFlags], to retrieve the the modifier
+        flags held when a navigation action was initiated.
+
+        * Platform/spi/ios/UIKitSPI.h: Expose SPI.
+        * Shared/NativeWebTouchEvent.h: Re-arrange macro guards so that we can expose the helper function
+        WebKit::webEventModifierFlags(). This is a bit more involved that usual since this header is included
+        from both C++ and Objective-C source files. It only makes sense to expose this function when
+        compiling as part of an Objective-C source file.
+        * Shared/ios/NativeWebTouchEventIOS.mm:
+        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Modified to take the modifier flags held down
+        when the platform touch event was received and pass them through to the base constructor.
+        (WebKit::webEventModifierFlags): Added. Converts from the platform-speciifc UIKeyModifierFlags to
+        OptionSet<WebKit::WebEvent::Modifier>.
+        * Shared/ios/WebIOSEventFactory.h:
+        * Shared/ios/WebIOSEventFactory.mm:
+        (WebIOSEventFactory::toUIKeyModifierFlags): Added. Converts from OptionSet<WebKit::WebEvent::Modifier>
+        to the platform-specific UIKeyModifierFlags.
+        * UIProcess/API/Cocoa/WKNavigationAction.mm:
+        (-[WKNavigationAction modifierFlags]): Added.
+        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (gestureRecognizerModifierFlags): Added.
+
+        (-[WKContentView _webTouchEventsRecognized:]):
+        (-[WKContentView _highlightLongPressRecognized:]):
+        (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
+        (-[WKContentView _singleTapCommited:]):
+        Pass modifier flags through.
+
+        (-[WKContentView _attemptClickAtLocation:modifierFlags:]): Added.
+        (-[WKContentView actionSheetAssistant:openElementAtLocation:]): This is invoked when a person opens a link
+        via the action sheet. We don't have access to the modifier flags to pass. It also seems like an implementation
+        detail that this action is implemented via mouse click and we should re-evaluate this decision in light of
+        the fact tht the action sheet is browser UI and we tend to be very reserved on what UI actions are visible
+        to the page. On Mac, opening a link via the context menu is not visible to the page, at least from a mouse
+        event perspective.
+        (webEventFlagsForUIKeyModifierFlags): Added.
+        (-[WKContentView _hoverGestureRecognizerChanged:]): Pass modifier flags through.
+        (-[WKContentView _attemptClickAtLocation:]): Deleted.
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
+        (WebKit::WebPageProxy::commitPotentialTap):
+        (WebKit::WebPageProxy::handleTap):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleSyntheticClick):
+        (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
+        (WebKit::WebPage::completeSyntheticClick):
+        (WebKit::WebPage::handleTap):
+        (WebKit::WebPage::handleTwoFingerTapAtPoint):
+        (WebKit::WebPage::commitPotentialTap):
+        Pass modifier flags through.
+
+2019-02-11  Jer Noble  <jer.noble@apple.com>
+
+        [Cocoa] Notify AVSystemController of our presenting PID before registering as a Now Playing app.
+        https://bugs.webkit.org/show_bug.cgi?id=194504
+
+        Reviewed by Eric Carlson.
+
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
+        (WebKit::WebUserMediaClient::requestUserMediaAccess):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::userMediaPermissionRequestManager):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::prepareToSendUserMediaPermissionRequest): Deleted.
+
+2019-02-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r241272 and r241276.
+        https://bugs.webkit.org/show_bug.cgi?id=194514
+
+        Broke the Apple Internal build and the fix requires human
+        intervention :( (Requested by dydz on #webkit).
+
+        Reverted changesets:
+
+        "[iOS] Mouse/Touch/Pointer events are missing modifier keys"
+        https://bugs.webkit.org/show_bug.cgi?id=191446
+        https://trac.webkit.org/changeset/241272
+
+        "Fix internal iOS build after r241272"
+        https://bugs.webkit.org/show_bug.cgi?id=191446
+        https://trac.webkit.org/changeset/241276
+
+2019-02-11  Alex Christensen  <achristensen@webkit.org>
+
+        Fix internal iOS build after r241272
+        https://bugs.webkit.org/show_bug.cgi?id=191446
+
+        * Platform/spi/ios/UIKitSPI.h:
+        Declare the _modifierFlags when using the internal SDK also.
+
+2019-02-11  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        fast/forms/ios/force-gregorian-calendar-for-credit-card-expiry.html does not work on iPad
+        https://bugs.webkit.org/show_bug.cgi?id=194313
+
+        Reviewed by Tim Horton.
+
+        Make `-dateTimePickerCalendarType` work on iPad by handling the case where the date picker control is a
+        WKDateTimePopover. This fixes UIScriptController::calendarType() returning null on iPad.
+
+        * UIProcess/ios/forms/WKFormInputControl.mm:
+        (-[WKFormInputControl dateTimePickerCalendarType]):
+        (-[WKDateTimePopover calendarType]):
+
+2019-02-11  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Mouse/Touch/Pointer events are missing modifier keys
+        https://bugs.webkit.org/show_bug.cgi?id=191446
+        <rdar://problem/45929460>
+
+        Reviewed by Tim Horton.
+
+        Make use of UIKit SPI to retreive the modifier flags when dispatching mouse and touch events.
+        Add new WebKit SPI for iOS, -[WKNavigationAction modifierFlags], to retrieve the the modifier
+        flags held when a navigation action was initiated.
+
+        * Platform/spi/ios/UIKitSPI.h: Expose SPI.
+        * Shared/NativeWebTouchEvent.h: Re-arrange macro guards so that we can expose the helper function
+        WebKit::webEventModifierFlags(). This is a bit more involved that usual since this header is included
+        from both C++ and Objective-C source files. It only makes sense to expose this function when
+        compiling as part of an Objective-C source file.
+        * Shared/ios/NativeWebTouchEventIOS.mm:
+        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Modified to take the modifier flags held down
+        when the platform touch event was received and pass them through to the base constructor.
+        (WebKit::webEventModifierFlags): Added. Converts from the platform-speciifc UIKeyModifierFlags to
+        OptionSet<WebKit::WebEvent::Modifier>.
+        * Shared/ios/WebIOSEventFactory.h:
+        * Shared/ios/WebIOSEventFactory.mm:
+        (WebIOSEventFactory::toUIKeyModifierFlags): Added. Converts from OptionSet<WebKit::WebEvent::Modifier>
+        to the platform-specific UIKeyModifierFlags.
+        * UIProcess/API/Cocoa/WKNavigationAction.mm:
+        (-[WKNavigationAction modifierFlags]): Added.
+        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (gestureRecognizerModifierFlags): Added.
+
+        (-[WKContentView _webTouchEventsRecognized:]):
+        (-[WKContentView _highlightLongPressRecognized:]):
+        (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
+        (-[WKContentView _singleTapCommited:]):
+        Pass modifier flags through.
+
+        (-[WKContentView _attemptClickAtLocation:modifierFlags:]): Added.
+        (-[WKContentView actionSheetAssistant:openElementAtLocation:]): This is invoked when a person opens a link
+        via the action sheet. We don't have access to the modifier flags to pass. It also seems like an implementation
+        detail that this action is implemented via mouse click and we should re-evaluate this decision in light of
+        the fact tht the action sheet is browser UI and we tend to be very reserved on what UI actions are visible
+        to the page. On Mac, opening a link via the context menu is not visible to the page, at least from a mouse
+        event perspective.
+        (webEventFlagsForUIKeyModifierFlags): Added.
+        (-[WKContentView _hoverGestureRecognizerChanged:]): Pass modifier flags through.
+        (-[WKContentView _attemptClickAtLocation:]): Deleted.
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
+        (WebKit::WebPageProxy::commitPotentialTap):
+        (WebKit::WebPageProxy::handleTap):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleSyntheticClick):
+        (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
+        (WebKit::WebPage::completeSyntheticClick):
+        (WebKit::WebPage::handleTap):
+        (WebKit::WebPage::handleTwoFingerTapAtPoint):
+        (WebKit::WebPage::commitPotentialTap):
+        Pass modifier flags through.
+
+2019-02-11  Youenn Fablet  <youenn@apple.com>
+
+        Filter out Overconstrainederror.constraint when getUserMedia is not granted
+        https://bugs.webkit.org/show_bug.cgi?id=194240
+
+        Reviewed by Eric Carlson.
+
+        Make sure in UIProcess to filter out constraint if either the page was not granted gum access or it has no persistent access.
+
+        Refactor UserMediaPermissionRequestManagerProxy to make the implementation easier to understand.
+
+        Covered by added test.
+
+        * UIProcess/UserMediaPermissionCheckProxy.cpp:
+        (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
+        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+        (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
+        (WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
+        (WebKit::UserMediaPermissionRequestManagerProxy::grantAccess):
+        (WebKit::UserMediaPermissionRequestManagerProxy::getRequestAction):
+        (WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
+        (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest):
+        (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
+        (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionValidRequest):
+        (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
+        (WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
+        (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):
+        (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
+        (WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest): Deleted.
+        * UIProcess/UserMediaPermissionRequestManagerProxy.h:
+        * UIProcess/UserMediaPermissionRequestProxy.h:
+        (WebKit::UserMediaPermissionRequestProxy::isPending const):
+        (WebKit::UserMediaPermissionRequestProxy::setEligibleVideoDeviceUIDs):
+        (WebKit::UserMediaPermissionRequestProxy::setEligibleAudioDeviceUIDs):
+        (WebKit::UserMediaPermissionRequestProxy::hasAudioDevice const):
+        (WebKit::UserMediaPermissionRequestProxy::hasVideoDevice const):
+        (WebKit::UserMediaPermissionRequestProxy::hasPersistentAccess const):
+        (WebKit::UserMediaPermissionRequestProxy::setHasPersistentAccess):
+        (WebKit::UserMediaPermissionRequestProxy::userMediaID const):
+        (WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin const):
+        (WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin const):
+        (WebKit::UserMediaPermissionRequestProxy::userRequest const):
+        (WebKit::UserMediaPermissionRequestProxy::setDeviceIdentifierHashSalt):
+        (WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const):
+        (WebKit::UserMediaPermissionRequestProxy::audioDevice const):
+        (WebKit::UserMediaPermissionRequestProxy::videoDevice const):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
+        * UIProcess/WebPageProxy.h:
+
+2019-02-11  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [WPE] Do not try to create empty egl windows
+        https://bugs.webkit.org/show_bug.cgi?id=194497
+
+        Reviewed by Žan Doberšek.
+
+        In AcceleratedSurfaceWPE we ensure the size we pass to wpe is at least 0x0, but wl_egl_window_create() returns
+        nullptr if 0 is passed as width or height. We should use at least 1x1 instead.
+
+        * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
+        (WebKit::AcceleratedSurfaceWPE::initialize):
+        (WebKit::AcceleratedSurfaceWPE::clientResize):
+
+2019-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [WPE] Do not use a sync IPC message to send the host FD to the web process
+        https://bugs.webkit.org/show_bug.cgi?id=194216
+
+        Reviewed by Darin Adler.
+
+        It can be sent as a web page creation parameter instead.
+
+        * PlatformWPE.cmake:
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode const):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+        * SourcesWPE.txt:
+        * UIProcess/API/wpe/CompositingManagerProxy.cpp: Removed.
+        * UIProcess/API/wpe/CompositingManagerProxy.h: Removed.
+        * UIProcess/API/wpe/CompositingManagerProxy.messages.in: Removed.
+        * UIProcess/API/wpe/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::hostFileDescriptor):
+        * UIProcess/API/wpe/PageClientImpl.h:
+        * UIProcess/API/wpe/WPEView.cpp:
+        (WKWPE::m_backend):
+        * UIProcess/API/wpe/WPEView.h:
+        (WKWPE::View::create):
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::creationParameters):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_hostFileDescriptor):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::releaseHostFileDescriptor):
+        * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
+        (WebKit::AcceleratedSurfaceWPE::AcceleratedSurfaceWPE):
+        (WebKit::AcceleratedSurfaceWPE::initialize):
+        * WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.h:
+        * WebProcess/WebPage/wpe/CompositingManager.cpp: Removed.
+        * WebProcess/WebPage/wpe/CompositingManager.h: Removed.
+
+2019-02-04  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK][WPE] Add enable-javascript-markup setting
+        https://bugs.webkit.org/show_bug.cgi?id=193439
+
+        Reviewed by Michael Catanzaro.
+
+        Expose JavaScriptMarkupEnabled setting in the GLib API.
+
+        * UIProcess/API/glib/WebKitSettings.cpp:
+        (webKitSettingsSetProperty):
+        (webKitSettingsGetProperty):
+        (webkit_settings_class_init):
+        (webkit_settings_get_enable_javascript_markup):
+        (webkit_settings_set_enable_javascript_markup):
+        * UIProcess/API/gtk/WebKitSettings.h:
+        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
+        * UIProcess/API/wpe/WebKitSettings.h:
+        * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
+
+2019-02-10  Darin Adler  <darin@apple.com>
+
+        Switch uses of StringBuilder with String::format for hex numbers to use HexNumber.h instead
+        https://bugs.webkit.org/show_bug.cgi?id=194485
+
+        Reviewed by Daniel Bates.
+
+        * UIProcess/DeviceIdHashSaltStorage.cpp:
+        (WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall): Use
+        appendUnsignedAsHex instead of appendUnsigned64AsHex.
+
+        * UIProcess/WebBackForwardList.cpp:
+        (WebKit::WebBackForwardList::loggingString): Use appendUnsignedAsHex and
+        reinterpret_cast<uintptr_t> instead of String::format and "%p".
+
+2019-02-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r241167.
+        https://bugs.webkit.org/show_bug.cgi?id=194482
+
+        Broke the GTK mediastream tests (Requested by philn on
+        #webkit).
+
+        Reverted changeset:
+
+        "Filter out Overconstrainederror.constraint when getUserMedia
+        is not granted"
+        https://bugs.webkit.org/show_bug.cgi?id=194240
+        https://trac.webkit.org/changeset/241167
+
 2019-02-09  Darin Adler  <darin@apple.com>
 
         Eliminate unnecessary String temporaries by using StringConcatenateNumbers