URL set by document.open() is not communicated to the UIProcess
[WebKit-https.git] / Source / WebKit / ChangeLog
index eee0ec6..9bf6a91 100644 (file)
@@ -1,3 +1,418 @@
+2019-04-16  Chris Dumez  <cdumez@apple.com>
+
+        URL set by document.open() is not communicated to the UIProcess
+        https://bugs.webkit.org/show_bug.cgi?id=196941
+        <rdar://problem/49237544>
+
+        Reviewed by Geoff Garen.
+
+        Whenever the UIProcess is notified of an explicit document.open() call, update the
+        PageLoadState to make sure the URL is up-to-date. Also make sure the page / process
+        knows it committed a load (i.e. It is no longer showing the initially empty document).
+
+        * UIProcess/PageLoadState.cpp:
+        (WebKit::PageLoadState::didExplicitOpen):
+        * UIProcess/PageLoadState.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didExplicitOpenForFrame):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidExplicitOpen):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
+2019-04-16  Chris Dumez  <cdumez@apple.com>
+
+        Show prompt for device orientation access if the client does not implement the corresponding API delegate
+        https://bugs.webkit.org/show_bug.cgi?id=196971
+        <rdar://problem/49945840>
+
+        Reviewed by Alex Christensen.
+
+        Show prompt for device orientation access if the client does not implement the corresponding
+        API delegate, instead of rejecting access by default.
+
+        * UIProcess/Cocoa/UIDelegate.mm:
+        (WebKit::UIDelegate::UIClient::shouldAllowDeviceOrientationAndMotionAccess):
+        * UIProcess/Cocoa/WKOrientationAccessAlert.h: Added.
+        * UIProcess/Cocoa/WKOrientationAccessAlert.mm: Added.
+        (WebKit::presentOrientationAccessAlert):
+        * WebKit.xcodeproj/project.pbxproj:
+
+2019-04-16  Zalan Bujtas  <zalan@apple.com>
+
+        REGRESSION(r243557)[ContentChangeObserver] Need to double tap text formatting elements in MS Word web app
+        https://bugs.webkit.org/show_bug.cgi?id=196975
+        <rdar://problem/49489849>
+
+        Reviewed by Simon Fraser.
+
+        This patch ensures that we always proceed with synthetic click on form elements.
+
+        Covered by existing tests.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleSyntheticClick):
+
+2019-04-16  Timothy Hatcher  <timothy@apple.com>
+
+        FrameView base background color always starts white.
+        https://bugs.webkit.org/show_bug.cgi?id=196976
+
+        Reviewed by Beth Dakin.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage): Set m_backgroundColor before calling
+        WebFrame::createWithCoreMainFrame so the call to create the FrameView
+        for the empty page in transitionToCommittedForNewPage() gets
+        the correct color from WebPage.
+
+2019-04-16  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, fix the build with recent SDKs.
+
+        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
+        (WebKit::WKWebViewState::store):
+
+2019-04-16  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r244321.
+        https://bugs.webkit.org/show_bug.cgi?id=196968
+
+        Causing all WK2 Debug builds to exit early after Assertion
+        failures. (Requested by ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "URL set by document.open() is not communicated to the
+        UIProcess"
+        https://bugs.webkit.org/show_bug.cgi?id=196941
+        https://trac.webkit.org/changeset/244321
+
+2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: CRASH when reopening tab with docked inspector on crashed page
+        https://bugs.webkit.org/show_bug.cgi?id=196954
+        <rdar://problem/48716433>
+
+        Reviewed by Ryosuke Niwa.
+
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
+
+2019-04-15  Chris Dumez  <cdumez@apple.com>
+
+        URL set by document.open() is not communicated to the UIProcess
+        https://bugs.webkit.org/show_bug.cgi?id=196941
+        <rdar://problem/49237544>
+
+        Reviewed by Geoffrey Garen.
+
+        Whenever the UIProcess is notified of an explicit document.open() call, update the
+        PageLoadState to make sure the URL is up-to-date. Also make sure the page / process
+        knows it committed a load (i.e. It is no longer showing the initially empty document).
+
+        * UIProcess/PageLoadState.cpp:
+        (WebKit::PageLoadState::didExplicitOpen):
+        * UIProcess/PageLoadState.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didExplicitOpenForFrame):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidExplicitOpen):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
+2019-04-15  Alex Christensen  <achristensen@webkit.org>
+
+        Stop using hyphenationFactor
+        https://bugs.webkit.org/show_bug.cgi?id=196949
+        <rdar://problem/49779594>
+
+        Reviewed by Geoffrey Garen.
+
+        * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
+        (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
+        I added this use of hyphenationFactor in r241124 but the other changes in that revision make the use of hyphenationFactor redundant.
+        There is a reason to remove it in the radar.
+
+2019-04-15  Alex Christensen  <achristensen@webkit.org>
+
+        Forward declare WKWebView in _WKDiagnosticLoggingDelegate.h
+
+        * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
+        This fixes builds where _WKDiagnosticLoggingDelegate.h is the only WebKit header included, such as my work on rdar://problem/35175989
+
+2019-04-15  Jer Noble  <jer.noble@apple.com>
+
+        Add a DiagnosticLogging method taking an arbitrary dictionary of values.
+        https://bugs.webkit.org/show_bug.cgi?id=196773
+
+        Reviewed by Alex Christensen.
+
+        In addition to adding the new logging delegate method (and piping everything into it), 
+        add a new APIObject class to represent a signed integer.
+
+        * Shared/API/APINumber.h:
+        * Shared/API/APIObject.h:
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject):
+        * Shared/Cocoa/WKNSNumber.mm:
+        (-[WKNSNumber dealloc]):
+        (-[WKNSNumber objCType]):
+        (-[WKNSNumber getValue:]):
+        (-[WKNSNumber longLongValue]):
+        (-[WKNSNumber _apiObject]):
+        * Shared/UserData.cpp:
+        (WebKit::UserData::encode):
+        (WebKit::UserData::decode):
+        * UIProcess/API/APIDiagnosticLoggingClient.h:
+        * UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
+        * UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
+        * UIProcess/Cocoa/DiagnosticLoggingClient.h:
+        * UIProcess/Cocoa/DiagnosticLoggingClient.mm:
+        (WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
+        * UIProcess/ProvisionalPageProxy.cpp:
+        (WebKit::ProvisionalPageProxy::didReceiveMessage):
+        * UIProcess/WebPageDiagnosticLoggingClient.cpp:
+        (WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
+        * UIProcess/WebPageDiagnosticLoggingClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::logDiagnosticMessageWithValueDictionary):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
+        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
+        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
+
+2019-04-15  Dean Jackson  <dino@apple.com>
+
+        Provide option to not create a longpress gesture recognizer
+        https://bugs.webkit.org/show_bug.cgi?id=196937
+        <rdar://problem/49918278>
+
+        Build fix for iOS platforms that don't have link preview.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setupInteraction]):
+
+2019-04-15  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.
+
+2019-04-15  Dean Jackson  <dino@apple.com>
+
+        Provide option to not create a longpress gesture recognizer
+        https://bugs.webkit.org/show_bug.cgi?id=196937
+        <rdar://problem/49918278>
+
+        Reviewed by Antoine Quint.
+
+        A WebKitAdditions file has changed name to WKContentViewInteractionWKInteraction.mm.
+
+        Add a property to toggle if we should add a long press gesture
+        recognizer.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setupInteraction]):
+        (shouldUsePreviewForLongPress):
+        (-[WKContentView shouldUsePreviewForLongPress]):
+
+2019-04-15  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] WebCore derived sources should only be referenced inside WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=196904
+
+        Reviewed by Konstantin Tokarev.
+
+        Remove reference to DERIVED_SOURCES_WEBCORE_DIR in PlatformMac.cmake.
+
+        * PlatformMac.cmake:
+
+2019-04-15  Zalan Bujtas  <zalan@apple.com>
+
+        DrawingArea should only capture painting related milestones
+        https://bugs.webkit.org/show_bug.cgi?id=196926
+        <rdar://problem/48003845>
+
+        Reviewed by Tim Horton.
+
+        While dispatching layout milestones (mixture of layout and painting items), the associated drawing areas should only capture the painting related milestones.
+        These captured milestones get dispatched later in the commit handler to ensure that they are not forwarded prematurely.
+        However the truly layout related milestones (e.g. DidFirstVisuallyNonEmptyLayout) should be dispatched right away with no delay.
+
+        * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
+        (WebKit::RemoteLayerTreeTransaction::newlyReachedPaintingMilestones const):
+        (WebKit::RemoteLayerTreeTransaction::setNewlyReachedPaintingMilestones):
+        (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones const): Deleted.
+        (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones): Deleted.
+        * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
+        (WebKit::RemoteLayerTreeTransaction::encode const):
+        (WebKit::RemoteLayerTreeTransaction::decode):
+        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::addMilestonesToDispatch):
+        (WebKit::DrawingArea::dispatchDidReachLayoutMilestone): Deleted.
+        * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
+        (WebKit::RemoteLayerTreeDrawingArea::addMilestonesToDispatch):
+        * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+        (WebKit::RemoteLayerTreeDrawingArea::dispatchDidReachLayoutMilestone): Deleted.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::dispatchDidReachLayoutMilestone):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        (WebKit::TiledCoreAnimationDrawingArea::addMilestonesToDispatch):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedPaintingMilestones):
+        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+        (WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Deleted.
+        (WebKit::TiledCoreAnimationDrawingArea::dispatchDidReachLayoutMilestone): Deleted.
+
+2019-04-15  John Wilander  <wilander@apple.com>
+
+        Send delayed Ad Click Attribution conversion requests to the click source
+        https://bugs.webkit.org/show_bug.cgi?id=196838
+        <rdar://problem/47650157>
+
+        Reviewed by Chris Dumez and Youenn Fablet.
+
+        This patch schedules a conversion request with appropriate data going to the
+        click source as a result of an ad click conversion.
+
+        WebKit::AdClickAttributionManager makes use of existing WebKit::PingLoad
+        infrastructure to make the request. This will probably be reworked into a
+        dedicated load class further on.
+
+        New test infrastructure allows for an override of both the conversion URL
+        and the 24-48 hour timer.
+
+        * NetworkProcess/AdClickAttributionManager.cpp: Added.
+        (WebKit::AdClickAttributionManager::ensureDestinationMapForSource):
+        (WebKit::AdClickAttributionManager::store):
+        (WebKit::AdClickAttributionManager::startTimer):
+            Convenience function to support test override.
+        (WebKit::AdClickAttributionManager::convert):
+            This function now sets the timer.
+        (WebKit::AdClickAttributionManager::fireConversionRequest):
+            Fire an individual request.
+        (WebKit::AdClickAttributionManager::firePendingConversionRequests):
+            This is the timer function that iterates over all pending attributions.
+        (WebKit::AdClickAttributionManager::clear):
+            Now clears the two new test settings members.
+        (WebKit::AdClickAttributionManager::toString const):
+        * NetworkProcess/AdClickAttributionManager.h: Renamed from Source/WebKit/NetworkProcess/NetworkAdClickAttribution.h.
+        (WebKit::AdClickAttributionManager::AdClickAttributionManager):
+        (WebKit::AdClickAttributionManager::setPingLoadFunction):
+        (WebKit::AdClickAttributionManager::setOverrideTimerForTesting):
+        (WebKit::AdClickAttributionManager::setConversionURLForTesting):
+        * NetworkProcess/NetworkAdClickAttribution.cpp: Renamed from Source/WebKit/NetworkProcess/NetworkAdClickAttribution.cpp.
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::storeAdClickAttribution):
+        (WebKit::NetworkProcess::dumpAdClickAttribution):
+        (WebKit::NetworkProcess::clearAdClickAttribution):
+        (WebKit::NetworkProcess::setAdClickAttributionOverrideTimerForTesting):
+        (WebKit::NetworkProcess::setAdClickAttributionConversionURLForTesting):
+        * NetworkProcess/NetworkProcess.h:
+        * NetworkProcess/NetworkProcess.messages.in:
+        * NetworkProcess/NetworkSession.cpp:
+        (WebKit::NetworkSession::NetworkSession):
+        (WebKit::NetworkSession::setAdClickAttributionOverrideTimerForTesting):
+        (WebKit::NetworkSession::setAdClickAttributionConversionURLForTesting):
+        * NetworkProcess/NetworkSession.h:
+        * NetworkProcess/PingLoad.cpp:
+        (WebKit::PingLoad::PingLoad):
+        (WebKit::m_blobFiles):
+        (WebKit::PingLoad::initialize):
+            The PingLoad constructor is now split in two to allow for construction
+            without a WebKit::NetworkConnectionToWebProcess object. The body of
+            the constructor was moved into the new initialize() function which is
+            shared between constructors.
+        * NetworkProcess/PingLoad.h:
+        * Sources.txt:
+            Removed NetworkProcess/NetworkAdClickAttribution.cpp and added
+            NetworkProcess/NetworkAdClickAttribution.cpp.
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetAdClickAttributionOverrideTimerForTesting):
+        (WKPageSetAdClickAttributionConversionURLForTesting):
+        * UIProcess/API/C/WKPagePrivate.h:
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::dumpAdClickAttribution): Deleted.
+        (WebKit::NetworkProcessProxy::clearAdClickAttribution): Deleted.
+        * UIProcess/Network/NetworkProcessProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::dumpAdClickAttribution):
+        (WebKit::WebPageProxy::clearAdClickAttribution):
+        (WebKit::WebPageProxy::setAdClickAttributionOverrideTimerForTesting):
+        (WebKit::WebPageProxy::setAdClickAttributionConversionURLForTesting):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::dumpAdClickAttribution): Deleted.
+        (WebKit::WebProcessPool::clearAdClickAttribution): Deleted.
+        * UIProcess/WebProcessPool.h:
+        * WebKit.xcodeproj/project.pbxproj:
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
+        WebDriver: Set Cookie endpoint does not correctly set subdomain cookies
+        https://bugs.webkit.org/show_bug.cgi?id=196872
+        <rdar://problem/49233240>
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/Automation/WebAutomationSession.cpp:
+        (WebKit::WebAutomationSession::addSingleCookie):
+        Rather than try to "force" the cookie to be set on the current active URL, use the cookie
+        itself to figure out which domain it should be set on.
+
+2019-04-15  Philippe Normand  <pnormand@igalia.com>
+
+        [GTK][WPE] Add enable-media websetting
+        https://bugs.webkit.org/show_bug.cgi?id=196863
+
+        Reviewed by Michael Catanzaro.
+
+        It can be useful for headless browsers, for instance. The setting is enabled by default.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/glib/WebKitSettings.cpp:
+        (webKitSettingsSetProperty):
+        (webKitSettingsGetProperty):
+        (webkit_settings_class_init):
+        (webkit_settings_get_enable_media):
+        (webkit_settings_set_enable_media):
+        * UIProcess/API/gtk/WebKitSettings.h:
+        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
+        * UIProcess/API/wpe/WebKitSettings.h:
+        * UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
+
 2019-04-14  Rob Buis  <rbuis@igalia.com>
 
         Link prefetch not useful for top-level navigation