Title: [259227] branches/safari-610.1.7-branch
Revision
259227
Author
[email protected]
Date
2020-03-30 13:56:51 -0700 (Mon, 30 Mar 2020)

Log Message

Cherry-pick r258659. rdar://problem/60560831

    REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content
    https://bugs.webkit.org/show_bug.cgi?id=209218
    <rdar://problem/60560831>

    Reviewed by Tim Horton.

    Source/WebKit:

    In r257214, we split out the context menu hint preview container view into two views: one for drag and drop, and
    another for the context menu hint. The container view used for both drag and drop previews was removed under
    -cleanUpDragSourceSessionState, which is invoked after both drag and drop sessions have ended; however, in the
    case of a drop in editable content where the drop preview is delayed, the drop animation can end up finishing
    after -cleanUpDragSourceSessionState is invoked. This means we end up prematurely unparenting the preview
    container, which results in a broken drop animation.

    To fix this, split the drag and drop container views further, into separate container views for dragging and for
    dropping. The drag preview container will continue to be removed under -cleanUpDragSourceSessionState, and the
    drop preview container will now be removed under the delegate call to -dropInteraction:concludeDrop:, which is
    invoked by UIKit after all drop previews are finished animating.

    Covered by adding additional test assertions while running existing API tests (see Tools/ChangeLog for more
    details).

    * UIProcess/ios/WKContentViewInteraction.h:
    * UIProcess/ios/WKContentViewInteraction.mm:
    (-[WKContentView _createPreviewContainerWithLayerName:]):

    Pull out common logic for creating and setting up a preview container view into a helper method. This is used by
    the three methods below, which ensure container views for each of the types of previews we create when showing
    the context menu, dragging an element, and dropping.

    (-[WKContentView containerForDropPreviews]):
    (-[WKContentView containerForDragPreviews]):
    (-[WKContentView containerForContextMenuHintPreviews]):

    Add a third preview container view for drop previews, and factor duplicated code in these three methods into a
    common helper (see above).

    (-[WKContentView _hideTargetedPreviewContainerViews]):
    (-[WKContentView _deliverDelayedDropPreviewIfPossible:]):

    Instead of using the container for drag previews, use the container for drop previews.

    (-[WKContentView dropInteraction:concludeDrop:]):

    Remove the drop preview container after the drop has concluded (i.e. all animations are complete).

    Tools:

    Augment the drag and drop test harness to verify that for all targeted previews, if they have container views,
    those views must be parented (i.e. they must be connected to a UIWindow).

    * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
    (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
    (-[DragAndDropSimulator _expectNoDropPreviewsWithUnparentedContainerViews]):
    (-[DragAndDropSimulator _invokeDropAnimationCompletionBlocksAndConcludeDrop]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258659 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610.1.7-branch/Source/WebKit/ChangeLog (259226 => 259227)


--- branches/safari-610.1.7-branch/Source/WebKit/ChangeLog	2020-03-30 20:56:49 UTC (rev 259226)
+++ branches/safari-610.1.7-branch/Source/WebKit/ChangeLog	2020-03-30 20:56:51 UTC (rev 259227)
@@ -1,64 +1,5 @@
-b'2020-03-30  Alan Coon  <[email protected]>\n\n        Cherry-pick r258530. rdar://problem/60453086\n\n    Crash under WebCookieCache::clearForHost()\n    https://bugs.webkit.org/show_bug.cgi?id=209149\n    <rdar://problem/60453086>\n    \n    Reviewed by Darin Adler.\n    \n    Alternative fix for Bug 209149 based on comments from Darin.\n    \n    * WebProcess/WebPage/WebCookieCache.cpp:\n    (WebKit::WebCookieCache::clearForHost):\n    (WebKit::WebCookieCache::pruneCacheIfNecessary):\n    \n    \n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258530 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-16  Chris Dumez  <[email protected]>\n\n            Crash under WebCookieCache::clearForHost()\n            https://bugs.webkit.org/show_bug.cgi?id=209149\n            <rdar://problem/60453086>\n\n            Reviewed by Darin Adler.\n\n            Alternative fix for Bug 209149 based on comments from Darin.\n\n            * WebPro
 cess/WebPage/WebCookieCache.cpp:\n            (WebKit::WebCookieCache::clearForHost):\n            (WebKit::WebCookieCache::pruneCacheIfNecessary):\n\n    b\'2020-03-30  Alan Coon  <[email protected]>\\n\\n        Cherry-pick r258521. rdar://problem/60453086\\n\\n    Crash under WebCookieCache::clearForHost()\\n    https://bugs.webkit.org/show_bug.cgi?id=209149\\n    <rdar://problem/60453086>\\n    \\n    Reviewed by Alex Christensen.\\n    \\n    Source/WebKit:\\n    \\n    Make sure WebCookieCache::pruneCacheIfNecessary() keeps alive the host String it is passing\\n    to WebCookieCache::clearForHost(). Previously, it was merely deferencing a HashSet iterator\\n    and passing that to clearForHost(). However, clearForHost() would then drop the String from\\n    the HashSet and the host would no longer be valid.\\n    \\n    Change covered by new API test.\\n    \\n    * WebProcess/WebPage/WebCookieCache.cpp:\\n    (WebKit::WebCookieCache::pruneCacheIfNecessary):\\n   
  \\n    Tools:\\n    \\n    Add API test coverage.\\n    \\n    * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:\\n    (TEST):\\n    \\n    \\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258521 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\n\\n    2020-03-16  Chris Dumez  <[email protected]>\\n\\n            Crash under WebCookieCache::clearForHost()\\n            https://bugs.webkit.org/show_bug.cgi?id=209149\\n            <rdar://problem/60453086>\\n\\n            Reviewed by Alex Christensen.\\n\\n            Make sure WebCookieCache::pruneCacheIfNecessary() keeps alive the host String it is passing\\n            to WebCookieCache::clearForHost(). Previously, it was merely deferencing a HashSet iterator\\n            and passing that to clearForHost(). However, clearForHost() would then drop the String from\\n            the HashSet and the host would no longer be valid.\\n\\n            Change covered by new API test.\\n\\n            * WebProces
 s/WebPage/WebCookieCache.cpp:\\n            (WebKit::WebCookieCache::pruneCacheIfNecessary):\\n\\n    b\\\'2020-03-30  Alan Coon  <[email protected]>\\\\n\\\\n        Cherry-pick r258456. rdar://problem/59931477\\\\n\\\\n    Clean up sandbox violations found during testing\\\\n    https://bugs.webkit.org/show_bug.cgi?id=209096\\\\n    <rdar://problem/59931477>\\\\n    \\\\n    Reviewed by Geoffrey Garen.\\\\n    \\\\n    Remove telemetry from some items, and allow access to some IOKit properties\\\\n    needed for media playback on macOS and iOS.\\\\n    \\\\n    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:\\\\n    * WebProcess/com.apple.WebProcess.sb.in:\\\\n    \\\\n    \\\\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258456 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\n\\\\n    2020-03-13  Brent Fulgham  <[email protected]>\\\\n\\\\n            Clean up sandbox violations found during testing\\\\n            https://bugs.webkit
 .org/show_bug.cgi?id=209096\\\\n            <rdar://problem/59931477>\\\\n\\\\n            Reviewed by Geoffrey Garen.\\\\n\\\\n            Remove telemetry from some items, and allow access to some IOKit properties\\\\n            needed for media playback on macOS and iOS.\\\\n\\\\n            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:\\\\n            * WebProcess/com.apple.WebProcess.sb.in:\\\\n\\\\n    b"2020-03-24  Alan Coon  <[email protected]>\\\\\\\\n\\\\\\\\n        Cherry-pick r258476. rdar://problem/60839077\\\\\\\\n\\\\\\\\n    Add missing checks needed for AppBound Quirk\\\\\\\\n    https://bugs.webkit.org/show_bug.cgi?id=209117\\\\\\\\n    <rdar://problem/60460097>\\\\\\\\n    \\\\\\\\n    Reviewed by John Wilander.\\\\\\\\n    \\\\\\\\n    The checks for the \\\\\\\'NeedsInAppBrowserPrivacyQuirks\\\\\\\' flag added in r258101 was incomplete.\\\\\\\\n    Source/WebCore:\\\\\\\\n    \\\\\\\\n    Two additional call sites need
  to check the state of the flag.\\\\\\\\n    \\\\\\\\n    * bindings/js/ScriptController.cpp:\\\\\\\\n    (WebCore::ScriptController::executeScriptInWorld): Add missing check for the quirk.\\\\\\\\n    * loader/FrameLoaderClient.h: Add new API for the \\\\\\\'NeedsInAppBrowserPrivacyQuirks\\\\\\\'\\\\\\\\n    debug flag.\\\\\\\\n    * page/Frame.cpp:\\\\\\\\n    (WebCore::Frame::injectUserScriptImmediately): Ditto.\\\\\\\\n    \\\\\\\\n    Source/WebKit:\\\\\\\\n    \\\\\\\\n    These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\\\\\\\\n    \\\\\\\\n    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:\\\\\\\\n    (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\\\\\\\\n    * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\\\\\\\\n    * WebProcess/WebPage/WebPage.h:\\\\\\\\n    (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Added.\\\\\\\\n    \\\\\\\\n    \\\\\\\\n    git-svn-id: https://svn.webkit.org/repository/
 webkit/trunk@258476 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\\\\\n\\\\\\\\n    2020-03-14  Brent Fulgham  <[email protected]>\\\\\\\\n\\\\\\\\n            Add missing checks needed for AppBound Quirk\\\\\\\\n            https://bugs.webkit.org/show_bug.cgi?id=209117\\\\\\\\n            <rdar://problem/60460097>\\\\\\\\n\\\\\\\\n            Reviewed by John Wilander.\\\\\\\\n\\\\\\\\n            The checks for the \\\\\\\'NeedsInAppBrowserPrivacyQuirks\\\\\\\' flag added in r258101 was incomplete.\\\\\\\\n            These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\\\\\\\\n\\\\\\\\n            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:\\\\\\\\n            (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\\\\\\\\n            * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\\\\\\\\n            * WebProcess/WebPage/WebPage.h:\\\\\\\\n            (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Added
 .\\\\\\\\n\\\\\\\\n"2020-03-17  Alan Coon  <[email protected]>\\\\n\\\\n            Cherry-pick r258515. rdar://problem/60551856\\\\n\\\\n        [Cocoa] Crash under -[WKPreferenceObserver init]\\\\n        https://bugs.webkit.org/show_bug.cgi?id=209145\\\\n\\\\n        Reviewed by Darin Adler.\\\\n\\\\n        Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.\\\\n\\\\n        No new tests, since I have not been able to reproduce.\\\\n\\\\n        * UIProcess/Cocoa/PreferenceObserver.mm:\\\\n        (-[WKPreferenceObserver init]):\\\\n\\\\n\\\\n\\\\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258515 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\n\\\\n        2020-03-16  Per Arne Vollan  <[email protected]>\\\\n\\\\n                [Cocoa] Crash under -[WKPreferenceObserver init]\\\\n                https://bugs.webkit.org/show_bug.cgi?id=209145\\\\n\\\\n                Reviewed by Darin Adler.\\\\n\\\\n              
   Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.\\\\n\\\\n                No new tests, since I have not been able to reproduce.\\\\n\\\\n                * UIProcess/Cocoa/PreferenceObserver.mm:\\\\n                (-[WKPreferenceObserver init]):\\\\n\\\\n\\\'2020-03-17  Alan Coon  <[email protected]>\\n\\n            Cherry-pick r258518. rdar://problem/60517387\\n\\n        [macOS] Accessibility sandbox regressions\\n        https://bugs.webkit.org/show_bug.cgi?id=209065\\n        Source/WebCore/PAL:\\n\\n\\n        Reviewed by Brent Fulgham.\\n\\n        Add Accessibility notification name.\\n\\n        * pal/spi/cocoa/NSAccessibilitySPI.h:\\n\\n        Source/WebKit:\\n\\n        <rdar://problem/60202450>\\n\\n        Reviewed by Brent Fulgham.\\n\\n        When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility\\n        is relying on some advanced features of the service. A
 lso, when CF prefs direct mode is enabled, the WebContent\\n        sandbox needs to explicitly allow reading of the various plist files.\\n\\n        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\\n        (WebKit::WebProcessPool::registerNotificationObservers):\\n        * WebProcess/com.apple.WebProcess.sb.in:\\n\\n        Tools:\\n\\n\\n        Reviewed by Brent Fulgham.\\n\\n        * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:\\n        (TEST):\\n        * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:\\n        (TEST):\\n\\n\\n\\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258518 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\n\\n        2020-03-16  Per Arne Vollan  <[email protected]>\\n\\n                [macOS] Accessibility sandbox regressions\\n                https://bugs.webkit.org/show_bug.cgi?id=209065\\n                <rdar://problem/60202450>\\n\\n                Reviewed by Brent Fulgham.\\n\\n                When Acce
 ssibility is enabled, the WebContent process needs access to the preference service, since Accessibility\\n                is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent\\n                sandbox needs to explicitly allow reading of the various plist files.\\n\\n                * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\\n                (WebKit::WebProcessPool::registerNotificationObservers):\\n                * WebProcess/com.apple.WebProcess.sb.in:\\n\\n\'2020-03-17  Alan Coon  <[email protected]>\n\n            Cherry-pick r258359. rdar://problem/60517387\n\n        [macOS] _AXSApplicationAccessibilityEnabled should not be called\n        https://bugs.webkit.org/show_bug.cgi?id=208953\n\n        Reviewed by Brent Fulgham.\n\n        Source/WebCore:\n\n        The function _AXSApplicationAccessibilityEnabled and the notification kAXSApplicationAccessibilityEnabledNotification\n        exist on macOS, but they 
 do not have the same behavior as on iOS, and should not be used in the same way. Using this\n        function and notification on macOS was introduced in <https://bugs.webkit.org/show_bug.cgi?id=208690>, and this patch\n        partially reverts this behavior.\n\n        API test: WebKit.IsRemoteUIAppForAccessibility\n\n        * testing/Internals.cpp:\n        (WebCore::Internals::isRemoteUIAppForAccessibility):\n        * testing/Internals.h:\n        * testing/Internals.idl:\n        * testing/Internals.mm:\n        (WebCore::Internals::isRemoteUIAppForAccessibility):\n\n        Source/WebCore/PAL:\n\n        Declare method to check if the process is a remote UI app for accessibility.\n\n        * pal/spi/cocoa/NSAccessibilitySPI.h:\n\n        Source/WebKit:\n\n        On macOS, stop using the function _AXSApplicationAccessibilityEnabled and listening to the notification\n        kAXSApplicationAccessibilityEnabledNotification, since they do not have the same behavior as on
  iOS.\n\n        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\n        (WebKit::WebProcessPool::platformInitializeWebProcess):\n        (WebKit::WebProcessPool::registerNotificationObservers):\n        (WebKit::WebProcessPool::unregisterNotificationObservers):\n        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:\n        (WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):\n        * WebProcess/cocoa/WebProcessCocoa.mm:\n        (WebKit::WebProcess::platformInitializeProcess):\n        (WebKit::WebProcess::unblockAccessibilityServer):\n\n        Tools:\n\n        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:\n\n\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258359 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n        2020-03-12  Per Arne Vollan  <[email protected]>\n\n                [macOS] _AXSApplicationAccessibilityEnabled should not be called\n                https://bugs.webkit.org/show_bug.cgi?id=208953\n\n                Reviewed by Bre
 nt Fulgham.\n\n                On macOS, stop using the function _AXSApplicationAccessibilityEnabled and listening to the notification\n                kAXSApplicationAccessibilityEnabledNotification, since they do not have the same behavior as on iOS.\n\n                * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\n                (WebKit::WebProcessPool::platformInitializeWebProcess):\n                (WebKit::WebProcessPool::registerNotificationObservers):\n                (WebKit::WebProcessPool::unregisterNotificationObservers):\n                * UIProcess/Cocoa/WebProcessProxyCocoa.mm:\n                (WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):\n                * WebProcess/cocoa/WebProcessCocoa.mm:\n                (WebKit::WebProcess::platformInitializeProcess):\n                (WebKit::WebProcess::unblockAccessibilityServer):\n\n'2020-03-17  Alan Coon  <[email protected]>
+b'2020-03-30  Alan Coon  <[email protected]>\n\n        Cherry-pick r258659. rdar://problem/60560831\n\n    REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content\n    https://bugs.webkit.org/show_bug.cgi?id=209218\n    <rdar://problem/60560831>\n    \n    Reviewed by Tim Horton.\n    \n    Source/WebKit:\n    \n    In r257214, we split out the context menu hint preview container view into two views: one for drag and drop, and\n    another for the context menu hint. The container view used for both drag and drop previews was removed under\n    -cleanUpDragSourceSessionState, which is invoked after both drag and drop sessions have ended; however, in the\n    case of a drop in editable content where the drop preview is delayed, the drop animation can end up finishing\n    after -cleanUpDragSourceSessionState is invoked. This means we end up prematurely unparenting the preview\n    container, which results in a broke
 n drop animation.\n    \n    To fix this, split the drag and drop container views further, into separate container views for dragging and for\n    dropping. The drag preview container will continue to be removed under -cleanUpDragSourceSessionState, and the\n    drop preview container will now be removed under the delegate call to -dropInteraction:concludeDrop:, which is\n    invoked by UIKit after all drop previews are finished animating.\n    \n    Covered by adding additional test assertions while running existing API tests (see Tools/ChangeLog for more\n    details).\n    \n    * UIProcess/ios/WKContentViewInteraction.h:\n    * UIProcess/ios/WKContentViewInteraction.mm:\n    (-[WKContentView _createPreviewContainerWithLayerName:]):\n    \n    Pull out common logic for creating and setting up a preview container view into a helper method. This is used by\n    the three methods below, which ensure container views for each of the types of previews we create when showing\n    the co
 ntext menu, dragging an element, and dropping.\n    \n    (-[WKContentView containerForDropPreviews]):\n    (-[WKContentView containerForDragPreviews]):\n    (-[WKContentView containerForContextMenuHintPreviews]):\n    \n    Add a third preview container view for drop previews, and factor duplicated code in these three methods into a\n    common helper (see above).\n    \n    (-[WKContentView _hideTargetedPreviewContainerViews]):\n    (-[WKContentView _deliverDelayedDropPreviewIfPossible:]):\n    \n    Instead of using the container for drag previews, use the container for drop previews.\n    \n    (-[WKContentView dropInteraction:concludeDrop:]):\n    \n    Remove the drop preview container after the drop has concluded (i.e. all animations are complete).\n    \n    Tools:\n    \n    Augment the drag and drop test harness to verify that for all targeted previews, if they have container views,\n    those views must be parented (i.e. they must be connected to a UIWindow).\n    \n    *
  TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:\n    (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):\n    (-[DragAndDropSimulator _expectNoDropPreviewsWithUnparentedContainerViews]):\n    (-[DragAndDropSimulator _invokeDropAnimationCompletionBlocksAndConcludeDrop]):\n    \n    \n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258659 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-18  Wenson Hsieh  <[email protected]>\n\n            REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content\n            https://bugs.webkit.org/show_bug.cgi?id=209218\n            <rdar://problem/60560831>\n\n            Reviewed by Tim Horton.\n\n            In r257214, we split out the context menu hint preview container view into two views: one for drag and drop, and\n            another for the context menu hint. The container view used for both drag and drop previews was removed under\n            -
 cleanUpDragSourceSessionState, which is invoked after both drag and drop sessions have ended; however, in the\n            case of a drop in editable content where the drop preview is delayed, the drop animation can end up finishing\n            after -cleanUpDragSourceSessionState is invoked. This means we end up prematurely unparenting the preview\n            container, which results in a broken drop animation.\n\n            To fix this, split the drag and drop container views further, into separate container views for dragging and for\n            dropping. The drag preview container will continue to be removed under -cleanUpDragSourceSessionState, and the\n            drop preview container will now be removed under the delegate call to -dropInteraction:concludeDrop:, which is\n            invoked by UIKit after all drop previews are finished animating.\n\n            Covered by adding additional test assertions while running existing API tests (see Tools/ChangeLog for more\n 
            details).\n\n            * UIProcess/ios/WKContentViewInteraction.h:\n            * UIProcess/ios/WKContentViewInteraction.mm:\n            (-[WKContentView _createPreviewContainerWithLayerName:]):\n\n            Pull out common logic for creating and setting up a preview container view into a helper method. This is used by\n            the three methods below, which ensure container views for each of the types of previews we create when showing\n            the context menu, dragging an element, and dropping.\n\n            (-[WKContentView containerForDropPreviews]):\n            (-[WKContentView containerForDragPreviews]):\n            (-[WKContentView containerForContextMenuHintPreviews]):\n\n            Add a third preview container view for drop previews, and factor duplicated code in these three methods into a\n            common helper (see above).\n\n            (-[WKContentView _hideTargetedPreviewContainerViews]):\n            (-[WKContentView _deliverDelayedDr
 opPreviewIfPossible:]):\n\n            Instead of using the container for drag previews, use the container for drop previews.\n\n            (-[WKContentView dropInteraction:concludeDrop:]):\n\n            Remove the drop preview container after the drop has concluded (i.e. all animations are complete).\n\n    b\'2020-03-30  Alan Coon  <[email protected]>\\n\\n        Cherry-pick r258530. rdar://problem/60453086\\n\\n    Crash under WebCookieCache::clearForHost()\\n    https://bugs.webkit.org/show_bug.cgi?id=209149\\n    <rdar://problem/60453086>\\n    \\n    Reviewed by Darin Adler.\\n    \\n    Alternative fix for Bug 209149 based on comments from Darin.\\n    \\n    * WebProcess/WebPage/WebCookieCache.cpp:\\n    (WebKit::WebCookieCache::clearForHost):\\n    (WebKit::WebCookieCache::pruneCacheIfNecessary):\\n    \\n    \\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258530 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\n\\n    2020-03-16  Chris Dumez  <cdu
 [email protected]>\\n\\n            Crash under WebCookieCache::clearForHost()\\n            https://bugs.webkit.org/show_bug.cgi?id=209149\\n            <rdar://problem/60453086>\\n\\n            Reviewed by Darin Adler.\\n\\n            Alternative fix for Bug 209149 based on comments from Darin.\\n\\n            * WebProcess/WebPage/WebCookieCache.cpp:\\n            (WebKit::WebCookieCache::clearForHost):\\n            (WebKit::WebCookieCache::pruneCacheIfNecessary):\\n\\n    b\\\'2020-03-30  Alan Coon  <[email protected]>\\\\n\\\\n        Cherry-pick r258521. rdar://problem/60453086\\\\n\\\\n    Crash under WebCookieCache::clearForHost()\\\\n    https://bugs.webkit.org/show_bug.cgi?id=209149\\\\n    <rdar://problem/60453086>\\\\n    \\\\n    Reviewed by Alex Christensen.\\\\n    \\\\n    Source/WebKit:\\\\n    \\\\n    Make sure WebCookieCache::pruneCacheIfNecessary() keeps alive the host String it is passing\\\\n    to WebCookieCache::clearForHost(). Previousl
 y, it was merely deferencing a HashSet iterator\\\\n    and passing that to clearForHost(). However, clearForHost() would then drop the String from\\\\n    the HashSet and the host would no longer be valid.\\\\n    \\\\n    Change covered by new API test.\\\\n    \\\\n    * WebProcess/WebPage/WebCookieCache.cpp:\\\\n    (WebKit::WebCookieCache::pruneCacheIfNecessary):\\\\n    \\\\n    Tools:\\\\n    \\\\n    Add API test coverage.\\\\n    \\\\n    * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:\\\\n    (TEST):\\\\n    \\\\n    \\\\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258521 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\n\\\\n    2020-03-16  Chris Dumez  <[email protected]>\\\\n\\\\n            Crash under WebCookieCache::clearForHost()\\\\n            https://bugs.webkit.org/show_bug.cgi?id=209149\\\\n            <rdar://problem/60453086>\\\\n\\\\n            Reviewed by Alex Christensen.\\\\n\\\\n            Make sure WebCookieCache::prun
 eCacheIfNecessary() keeps alive the host String it is passing\\\\n            to WebCookieCache::clearForHost(). Previously, it was merely deferencing a HashSet iterator\\\\n            and passing that to clearForHost(). However, clearForHost() would then drop the String from\\\\n            the HashSet and the host would no longer be valid.\\\\n\\\\n            Change covered by new API test.\\\\n\\\\n            * WebProcess/WebPage/WebCookieCache.cpp:\\\\n            (WebKit::WebCookieCache::pruneCacheIfNecessary):\\\\n\\\\n    b\\\\\\\'2020-03-30  Alan Coon  <[email protected]>\\\\\\\\n\\\\\\\\n        Cherry-pick r258456. rdar://problem/59931477\\\\\\\\n\\\\\\\\n    Clean up sandbox violations found during testing\\\\\\\\n    https://bugs.webkit.org/show_bug.cgi?id=209096\\\\\\\\n    <rdar://problem/59931477>\\\\\\\\n    \\\\\\\\n    Reviewed by Geoffrey Garen.\\\\\\\\n    \\\\\\\\n    Remove telemetry from some items, and allow access to some IOKit properties\\\\
 \\\\n    needed for media playback on macOS and iOS.\\\\\\\\n    \\\\\\\\n    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:\\\\\\\\n    * WebProcess/com.apple.WebProcess.sb.in:\\\\\\\\n    \\\\\\\\n    \\\\\\\\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258456 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\\\\\n\\\\\\\\n    2020-03-13  Brent Fulgham  <[email protected]>\\\\\\\\n\\\\\\\\n            Clean up sandbox violations found during testing\\\\\\\\n            https://bugs.webkit.org/show_bug.cgi?id=209096\\\\\\\\n            <rdar://problem/59931477>\\\\\\\\n\\\\\\\\n            Reviewed by Geoffrey Garen.\\\\\\\\n\\\\\\\\n            Remove telemetry from some items, and allow access to some IOKit properties\\\\\\\\n            needed for media playback on macOS and iOS.\\\\\\\\n\\\\\\\\n            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:\\\\\\\\n            * WebProcess/com.apple.WebProcess.sb.in:\\\\\\\\n\
 \\\\\\\n    b"2020-03-24  Alan Coon  <[email protected]>\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n        Cherry-pick r258476. rdar://problem/60839077\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n    Add missing checks needed for AppBound Quirk\\\\\\\\\\\\\\\\n    https://bugs.webkit.org/show_bug.cgi?id=209117\\\\\\\\\\\\\\\\n    <rdar://problem/60460097>\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    Reviewed by John Wilander.\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    The checks for the \\\\\\\\\\\\\\\'NeedsInAppBrowserPrivacyQuirks\\\\\\\\\\\\\\\' flag added in r258101 was incomplete.\\\\\\\\\\\\\\\\n    Source/WebCore:\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    Two additional call sites need to check the state of the flag.\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    * bindings/js/ScriptController.cpp:\\\\\\\\\\\\\\\\n    (WebCore::ScriptController::executeScriptInWorld): Add missing check for the quirk.\\\\\\\\\\\\\\\\n    * loader/FrameLoaderClient.h: Add new API for the \\\\\\\\\\\\\\\'Needs
 InAppBrowserPrivacyQuirks\\\\\\\\\\\\\\\'\\\\\\\\\\\\\\\\n    debug flag.\\\\\\\\\\\\\\\\n    * page/Frame.cpp:\\\\\\\\\\\\\\\\n    (WebCore::Frame::injectUserScriptImmediately): Ditto.\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    Source/WebKit:\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:\\\\\\\\\\\\\\\\n    (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\\\\\\\\\\\\\\\\n    * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\\\\\\\\\\\\\\\\n    * WebProcess/WebPage/WebPage.h:\\\\\\\\\\\\\\\\n    (WebKit::WebPage::needsInAppBrowserPrivacyQuirks const): Added.\\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    \\\\\\\\\\\\\\\\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258476 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n    2020-03-14  Brent Fulgham  <bful
 [email protected]>\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n            Add missing checks needed for AppBound Quirk\\\\\\\\\\\\\\\\n            https://bugs.webkit.org/show_bug.cgi?id=209117\\\\\\\\\\\\\\\\n            <rdar://problem/60460097>\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n            Reviewed by John Wilander.\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n            The checks for the \\\\\\\\\\\\\\\'NeedsInAppBrowserPrivacyQuirks\\\\\\\\\\\\\\\' flag added in r258101 was incomplete.\\\\\\\\\\\\\\\\n            These changes let the WebFrameLoaderClient report the quirk state to WebCore code.\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:\\\\\\\\\\\\\\\\n            (WebKit::WebFrameLoaderClient::needsInAppBrowserPrivacyQuirks): Added.\\\\\\\\\\\\\\\\n            * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:\\\\\\\\\\\\\\\\n            * WebProcess/WebPage/WebPage.h:\\\\\\\\\\\\\\\\n            (WebKit::WebPage::needsInAppBrowserPriv
 acyQuirks const): Added.\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n"2020-03-17  Alan Coon  <[email protected]>\\\\\\\\n\\\\\\\\n            Cherry-pick r258515. rdar://problem/60551856\\\\\\\\n\\\\\\\\n        [Cocoa] Crash under -[WKPreferenceObserver init]\\\\\\\\n        https://bugs.webkit.org/show_bug.cgi?id=209145\\\\\\\\n\\\\\\\\n        Reviewed by Darin Adler.\\\\\\\\n\\\\\\\\n        Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.\\\\\\\\n\\\\\\\\n        No new tests, since I have not been able to reproduce.\\\\\\\\n\\\\\\\\n        * UIProcess/Cocoa/PreferenceObserver.mm:\\\\\\\\n        (-[WKPreferenceObserver init]):\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258515 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\\\\\n\\\\\\\\n        2020-03-16  Per Arne Vollan  <[email protected]>\\\\\\\\n\\\\\\\\n                [Cocoa] Crash under -[WKPreferenceObserver init]\\\\\\\\n     
            https://bugs.webkit.org/show_bug.cgi?id=209145\\\\\\\\n\\\\\\\\n                Reviewed by Darin Adler.\\\\\\\\n\\\\\\\\n                Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.\\\\\\\\n\\\\\\\\n                No new tests, since I have not been able to reproduce.\\\\\\\\n\\\\\\\\n                * UIProcess/Cocoa/PreferenceObserver.mm:\\\\\\\\n                (-[WKPreferenceObserver init]):\\\\\\\\n\\\\\\\\n\\\\\\\'2020-03-17  Alan Coon  <[email protected]>\\\\n\\\\n            Cherry-pick r258518. rdar://problem/60517387\\\\n\\\\n        [macOS] Accessibility sandbox regressions\\\\n        https://bugs.webkit.org/show_bug.cgi?id=209065\\\\n        Source/WebCore/PAL:\\\\n\\\\n\\\\n        Reviewed by Brent Fulgham.\\\\n\\\\n        Add Accessibility notification name.\\\\n\\\\n        * pal/spi/cocoa/NSAccessibilitySPI.h:\\\\n\\\\n        Source/WebKit:\\\\n\\\\n        <rdar://problem/60202450>\\\\n\\\\n        R
 eviewed by Brent Fulgham.\\\\n\\\\n        When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility\\\\n        is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent\\\\n        sandbox needs to explicitly allow reading of the various plist files.\\\\n\\\\n        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\\\\n        (WebKit::WebProcessPool::registerNotificationObservers):\\\\n        * WebProcess/com.apple.WebProcess.sb.in:\\\\n\\\\n        Tools:\\\\n\\\\n\\\\n        Reviewed by Brent Fulgham.\\\\n\\\\n        * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:\\\\n        (TEST):\\\\n        * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:\\\\n        (TEST):\\\\n\\\\n\\\\n\\\\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258518 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\\\n\\\\n        2020-03-16  Per Arne Vollan  <pvollan@apple
 .com>\\\\n\\\\n                [macOS] Accessibility sandbox regressions\\\\n                https://bugs.webkit.org/show_bug.cgi?id=209065\\\\n                <rdar://problem/60202450>\\\\n\\\\n                Reviewed by Brent Fulgham.\\\\n\\\\n                When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility\\\\n                is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent\\\\n                sandbox needs to explicitly allow reading of the various plist files.\\\\n\\\\n                * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\\\\n                (WebKit::WebProcessPool::registerNotificationObservers):\\\\n                * WebProcess/com.apple.WebProcess.sb.in:\\\\n\\\\n\\\'2020-03-17  Alan Coon  <[email protected]>\\n\\n            Cherry-pick r258359. rdar://problem/60517387\\n\\n        [macOS] _AXSApplicationAccessibilityEnabled sh
 ould not be called\\n        https://bugs.webkit.org/show_bug.cgi?id=208953\\n\\n        Reviewed by Brent Fulgham.\\n\\n        Source/WebCore:\\n\\n        The function _AXSApplicationAccessibilityEnabled and the notification kAXSApplicationAccessibilityEnabledNotification\\n        exist on macOS, but they do not have the same behavior as on iOS, and should not be used in the same way. Using this\\n        function and notification on macOS was introduced in <https://bugs.webkit.org/show_bug.cgi?id=208690>, and this patch\\n        partially reverts this behavior.\\n\\n        API test: WebKit.IsRemoteUIAppForAccessibility\\n\\n        * testing/Internals.cpp:\\n        (WebCore::Internals::isRemoteUIAppForAccessibility):\\n        * testing/Internals.h:\\n        * testing/Internals.idl:\\n        * testing/Internals.mm:\\n        (WebCore::Internals::isRemoteUIAppForAccessibility):\\n\\n        Source/WebCore/PAL:\\n\\n        Declare method to check if the process is a r
 emote UI app for accessibility.\\n\\n        * pal/spi/cocoa/NSAccessibilitySPI.h:\\n\\n        Source/WebKit:\\n\\n        On macOS, stop using the function _AXSApplicationAccessibilityEnabled and listening to the notification\\n        kAXSApplicationAccessibilityEnabledNotification, since they do not have the same behavior as on iOS.\\n\\n        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\\n        (WebKit::WebProcessPool::platformInitializeWebProcess):\\n        (WebKit::WebProcessPool::registerNotificationObservers):\\n        (WebKit::WebProcessPool::unregisterNotificationObservers):\\n        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:\\n        (WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):\\n        * WebProcess/cocoa/WebProcessCocoa.mm:\\n        (WebKit::WebProcess::platformInitializeProcess):\\n        (WebKit::WebProcess::unblockAccessibilityServer):\\n\\n        Tools:\\n\\n        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:\\n\\n\\n        g
 it-svn-id: https://svn.webkit.org/repository/webkit/trunk@258359 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\n\\n        2020-03-12  Per Arne Vollan  <[email protected]>\\n\\n                [macOS] _AXSApplicationAccessibilityEnabled should not be called\\n                https://bugs.webkit.org/show_bug.cgi?id=208953\\n\\n                Reviewed by Brent Fulgham.\\n\\n                On macOS, stop using the function _AXSApplicationAccessibilityEnabled and listening to the notification\\n                kAXSApplicationAccessibilityEnabledNotification, since they do not have the same behavior as on iOS.\\n\\n                * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\\n                (WebKit::WebProcessPool::platformInitializeWebProcess):\\n                (WebKit::WebProcessPool::registerNotificationObservers):\\n                (WebKit::WebProcessPool::unregisterNotificationObservers):\\n                * UIProcess/Cocoa/WebProcessProxyCocoa.mm:\\n                (WebKit::WebProc
 essProxy::unblockAccessibilityServerIfNeeded):\\n                * WebProcess/cocoa/WebProcessCocoa.mm:\\n                (WebKit::WebProcess::platformInitializeProcess):\\n                (WebKit::WebProcess::unblockAccessibilityServer):\\n\\n\'2020-03-17  Alan Coon  <[email protected]>\n\n            Cherry-pick r258557. rdar://problem/60517387\n\n        [Cocoa] Disable CF prefs direct mode\n        https://bugs.webkit.org/show_bug.cgi?id=209166\n        <rdar://problem/60517387>\n\n        Reviewed by Brent Fulgham.\n\n        Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,\n        since it caused performance regressions.\n\n        Source/WebKit:\n\n        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:\n        * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:\n        (WebKit::XPCServiceMain):\n        * UIProcess/Cocoa/PreferenceObserver.mm:\n        * UIProcess/Cocoa/WebPage
 ProxyCocoa.mm:\n        (WebKit::WebPageProxy::grantAccessToPreferenceService):\n        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\n        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:\n        * UIProcess/WebProcessPool.h:\n        * UIProcess/WebProcessProxy.h:\n        * WebProcess/WebProcess.h:\n        * WebProcess/WebProcess.messages.in:\n\n        Source/WTF:\n\n        * wtf/PlatformEnable.h:\n\n\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258557 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n        2020-03-17  Per Arne Vollan  <[email protected]>\n\n                [Cocoa] Disable CF prefs direct mode\n                https://bugs.webkit.org/show_bug.cgi?id=209166\n                <rdar://problem/60517387>\n\n                Reviewed by Brent Fulgham.\n\n                Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,\n                since it caused performance regressions.\n\n               
  * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:\n                * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:\n                (WebKit::XPCServiceMain):\n                * UIProcess/Cocoa/PreferenceObserver.mm:\n                * UIProcess/Cocoa/WebPageProxyCocoa.mm:\n                (WebKit::WebPageProxy::grantAccessToPreferenceService):\n                * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\n                * UIProcess/Cocoa/WebProcessProxyCocoa.mm:\n                * UIProcess/WebProcessPool.h:\n                * UIProcess/WebProcessProxy.h:\n                * WebProcess/WebProcess.h:\n                * WebProcess/WebProcess.messages.in:\n\n'2020-03-17  Alan Coon  <[email protected]>
 
-        Cherry-pick r258557. rdar://problem/60517387
-
-    [Cocoa] Disable CF prefs direct mode
-    https://bugs.webkit.org/show_bug.cgi?id=209166
-    <rdar://problem/60517387>
-    
-    Reviewed by Brent Fulgham.
-    
-    Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
-    since it caused performance regressions.
-    
-    Source/WebKit:
-    
-    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
-    * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
-    (WebKit::XPCServiceMain):
-    * UIProcess/Cocoa/PreferenceObserver.mm:
-    * UIProcess/Cocoa/WebPageProxyCocoa.mm:
-    (WebKit::WebPageProxy::grantAccessToPreferenceService):
-    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
-    * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
-    * UIProcess/WebProcessPool.h:
-    * UIProcess/WebProcessProxy.h:
-    * WebProcess/WebProcess.h:
-    * WebProcess/WebProcess.messages.in:
-    
-    Source/WTF:
-    
-    * wtf/PlatformEnable.h:
-    
-    
-    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
-    2020-03-17  Per Arne Vollan  <[email protected]>
-
-            [Cocoa] Disable CF prefs direct mode
-            https://bugs.webkit.org/show_bug.cgi?id=209166
-            <rdar://problem/60517387>
-
-            Reviewed by Brent Fulgham.
-
-            Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
-            since it caused performance regressions.
-
-            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
-            * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
-            (WebKit::XPCServiceMain):
-            * UIProcess/Cocoa/PreferenceObserver.mm:
-            * UIProcess/Cocoa/WebPageProxyCocoa.mm:
-            (WebKit::WebPageProxy::grantAccessToPreferenceService):
-            * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
-            * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
-            * UIProcess/WebProcessPool.h:
-            * UIProcess/WebProcessProxy.h:
-            * WebProcess/WebProcess.h:
-            * WebProcess/WebProcess.messages.in:
-
-2020-03-17  Alan Coon  <[email protected]>
-
         Cherry-pick r258512. rdar://problem/60517387
 
     [Cocoa] Only set CF prefs direct mode for the WebContent process

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (259226 => 259227)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2020-03-30 20:56:49 UTC (rev 259226)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2020-03-30 20:56:51 UTC (rev 259227)
@@ -253,6 +253,7 @@
     RetainPtr<UIView> _interactionViewsContainerView;
     RetainPtr<UIView> _contextMenuHintContainerView;
     RetainPtr<UIView> _dragPreviewContainerView;
+    RetainPtr<UIView> _dropPreviewContainerView;
     RetainPtr<NSString> _markedText;
     RetainPtr<WKActionSheetAssistant> _actionSheetAssistant;
 #if ENABLE(AIRPLAY_PICKER)

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (259226 => 259227)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-03-30 20:56:49 UTC (rev 259226)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-03-30 20:56:51 UTC (rev 259227)
@@ -6851,40 +6851,48 @@
     return WebCore::IOSApplication::isDataActivation();
 }
 
+- (RetainPtr<UIView>)_createPreviewContainerWithLayerName:(NSString *)layerName
+{
+    auto container = adoptNS([[UIView alloc] init]);
+    [container layer].anchorPoint = CGPointZero;
+    [container layer].name = layerName;
+    [_interactionViewsContainerView addSubview:container.get()];
+    return container;
+}
+
+- (UIView *)containerForDropPreviews
+{
+    if (!_dropPreviewContainerView)
+        _dropPreviewContainerView = [self _createPreviewContainerWithLayerName:@"Drop Preview Container"];
+
+    ASSERT([_dropPreviewContainerView superview]);
+    [_dropPreviewContainerView setHidden:NO];
+    return _dropPreviewContainerView.get();
+}
+
 - (UIView *)containerForDragPreviews
 {
-    if (_dragPreviewContainerView) {
-        ASSERT([_dragPreviewContainerView superview]);
-        [_dragPreviewContainerView setHidden:NO];
-        return _dragPreviewContainerView.get();
-    }
+    if (!_dragPreviewContainerView)
+        _dragPreviewContainerView = [self _createPreviewContainerWithLayerName:@"Drag Preview Container"];
 
-    _dragPreviewContainerView = adoptNS([[UIView alloc] init]);
-    [_dragPreviewContainerView layer].anchorPoint = CGPointZero;
-    [_dragPreviewContainerView layer].name = @"Drag Preview Container";
-    [_interactionViewsContainerView addSubview:_dragPreviewContainerView.get()];
-
+    ASSERT([_dragPreviewContainerView superview]);
+    [_dragPreviewContainerView setHidden:NO];
     return _dragPreviewContainerView.get();
 }
 
 - (UIView *)containerForContextMenuHintPreviews
 {
-    if (_contextMenuHintContainerView) {
-        ASSERT([_contextMenuHintContainerView superview]);
-        [_contextMenuHintContainerView setHidden:NO];
-        return _contextMenuHintContainerView.get();
-    }
+    if (!_contextMenuHintContainerView)
+        _contextMenuHintContainerView = [self _createPreviewContainerWithLayerName:@"Context Menu Hint Preview Container"];
 
-    _contextMenuHintContainerView = adoptNS([[UIView alloc] init]);
-    [_contextMenuHintContainerView layer].anchorPoint = CGPointZero;
-    [_contextMenuHintContainerView layer].name = @"Context Menu Hint Container";
-    [_interactionViewsContainerView addSubview:_contextMenuHintContainerView.get()];
-
+    ASSERT([_contextMenuHintContainerView superview]);
+    [_contextMenuHintContainerView setHidden:NO];
     return _contextMenuHintContainerView.get();
 }
 
 - (void)_hideTargetedPreviewContainerViews
 {
+    [_dropPreviewContainerView setHidden:YES];
     [_dragPreviewContainerView setHidden:YES];
     [_contextMenuHintContainerView setHidden:YES];
 }
@@ -7181,7 +7189,7 @@
     [_unselectedContentSnapshot setFrame:data->contentImageWithoutSelectionRectInRootViewCoordinates];
 
     [self insertSubview:_unselectedContentSnapshot.get() belowSubview:_visibleContentViewSnapshot.get()];
-    _dragDropInteractionState.deliverDelayedDropPreview(self, self.containerForDragPreviews, data.value());
+    _dragDropInteractionState.deliverDelayedDropPreview(self, self.containerForDropPreviews, data.value());
 }
 
 - (void)_didPerformDragOperation:(BOOL)handled
@@ -7870,6 +7878,7 @@
 
 - (void)dropInteraction:(UIDropInteraction *)interaction concludeDrop:(id <UIDropSession>)session
 {
+    [std::exchange(_dropPreviewContainerView, nil) removeFromSuperview];
     [std::exchange(_visibleContentViewSnapshot, nil) removeFromSuperview];
     [std::exchange(_unselectedContentSnapshot, nil) removeFromSuperview];
     _dragDropInteractionState.clearAllDelayedItemPreviewProviders();

Modified: branches/safari-610.1.7-branch/Tools/ChangeLog (259226 => 259227)


--- branches/safari-610.1.7-branch/Tools/ChangeLog	2020-03-30 20:56:49 UTC (rev 259226)
+++ branches/safari-610.1.7-branch/Tools/ChangeLog	2020-03-30 20:56:51 UTC (rev 259227)
@@ -1,60 +1,5 @@
-b'2020-03-30  Alan Coon  <[email protected]>\n\n        Cherry-pick r258521. rdar://problem/60453086\n\n    Crash under WebCookieCache::clearForHost()\n    https://bugs.webkit.org/show_bug.cgi?id=209149\n    <rdar://problem/60453086>\n    \n    Reviewed by Alex Christensen.\n    \n    Source/WebKit:\n    \n    Make sure WebCookieCache::pruneCacheIfNecessary() keeps alive the host String it is passing\n    to WebCookieCache::clearForHost(). Previously, it was merely deferencing a HashSet iterator\n    and passing that to clearForHost(). However, clearForHost() would then drop the String from\n    the HashSet and the host would no longer be valid.\n    \n    Change covered by new API test.\n    \n    * WebProcess/WebPage/WebCookieCache.cpp:\n    (WebKit::WebCookieCache::pruneCacheIfNecessary):\n    \n    Tools:\n    \n    Add API test coverage.\n    \n    * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:\n    (TEST):\n    \n    \n    git-svn-id: http
 s://svn.webkit.org/repository/webkit/trunk@258521 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-16  Chris Dumez  <[email protected]>\n\n            Crash under WebCookieCache::clearForHost()\n            https://bugs.webkit.org/show_bug.cgi?id=209149\n            <rdar://problem/60453086>\n\n            Reviewed by Alex Christensen.\n\n            Add API test coverage.\n\n            * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:\n            (TEST):\n\n'2020-03-17  Alan Coon  <[email protected]>
+b"2020-03-30  Alan Coon  <[email protected]>\n\n        Cherry-pick r258659. rdar://problem/60560831\n\n    REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content\n    https://bugs.webkit.org/show_bug.cgi?id=209218\n    <rdar://problem/60560831>\n    \n    Reviewed by Tim Horton.\n    \n    Source/WebKit:\n    \n    In r257214, we split out the context menu hint preview container view into two views: one for drag and drop, and\n    another for the context menu hint. The container view used for both drag and drop previews was removed under\n    -cleanUpDragSourceSessionState, which is invoked after both drag and drop sessions have ended; however, in the\n    case of a drop in editable content where the drop preview is delayed, the drop animation can end up finishing\n    after -cleanUpDragSourceSessionState is invoked. This means we end up prematurely unparenting the preview\n    container, which results in a 
 broken drop animation.\n    \n    To fix this, split the drag and drop container views further, into separate container views for dragging and for\n    dropping. The drag preview container will continue to be removed under -cleanUpDragSourceSessionState, and the\n    drop preview container will now be removed under the delegate call to -dropInteraction:concludeDrop:, which is\n    invoked by UIKit after all drop previews are finished animating.\n    \n    Covered by adding additional test assertions while running existing API tests (see Tools/ChangeLog for more\n    details).\n    \n    * UIProcess/ios/WKContentViewInteraction.h:\n    * UIProcess/ios/WKContentViewInteraction.mm:\n    (-[WKContentView _createPreviewContainerWithLayerName:]):\n    \n    Pull out common logic for creating and setting up a preview container view into a helper method. This is used by\n    the three methods below, which ensure container views for each of the types of previews we create when showing\n    t
 he context menu, dragging an element, and dropping.\n    \n    (-[WKContentView containerForDropPreviews]):\n    (-[WKContentView containerForDragPreviews]):\n    (-[WKContentView containerForContextMenuHintPreviews]):\n    \n    Add a third preview container view for drop previews, and factor duplicated code in these three methods into a\n    common helper (see above).\n    \n    (-[WKContentView _hideTargetedPreviewContainerViews]):\n    (-[WKContentView _deliverDelayedDropPreviewIfPossible:]):\n    \n    Instead of using the container for drag previews, use the container for drop previews.\n    \n    (-[WKContentView dropInteraction:concludeDrop:]):\n    \n    Remove the drop preview container after the drop has concluded (i.e. all animations are complete).\n    \n    Tools:\n    \n    Augment the drag and drop test harness to verify that for all targeted previews, if they have container views,\n    those views must be parented (i.e. they must be connected to a UIWindow).\n    \n
     * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:\n    (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):\n    (-[DragAndDropSimulator _expectNoDropPreviewsWithUnparentedContainerViews]):\n    (-[DragAndDropSimulator _invokeDropAnimationCompletionBlocksAndConcludeDrop]):\n    \n    \n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258659 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-18  Wenson Hsieh  <[email protected]>\n\n            REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content\n            https://bugs.webkit.org/show_bug.cgi?id=209218\n            <rdar://problem/60560831>\n\n            Reviewed by Tim Horton.\n\n            Augment the drag and drop test harness to verify that for all targeted previews, if they have container views,\n            those views must be parented (i.e. they must be connected to a UIWindow).\n\n            * TestWebKitAPI/ios/DragAndDrop
 SimulatorIOS.mm:\n            (-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):\n            (-[DragAndDropSimulator _expectNoDropPreviewsWithUnparentedContainerViews]):\n            (-[DragAndDropSimulator _invokeDropAnimationCompletionBlocksAndConcludeDrop]):\n\n    b'2020-03-30  Alan Coon  <[email protected]>\\n\\n        Cherry-pick r258521. rdar://problem/60453086\\n\\n    Crash under WebCookieCache::clearForHost()\\n    https://bugs.webkit.org/show_bug.cgi?id=209149\\n    <rdar://problem/60453086>\\n    \\n    Reviewed by Alex Christensen.\\n    \\n    Source/WebKit:\\n    \\n    Make sure WebCookieCache::pruneCacheIfNecessary() keeps alive the host String it is passing\\n    to WebCookieCache::clearForHost(). Previously, it was merely deferencing a HashSet iterator\\n    and passing that to clearForHost(). However, clearForHost() would then drop the String from\\n    the HashSet and the host would no longer be valid.\\n    \\n    Change cover
 ed by new API test.\\n    \\n    * WebProcess/WebPage/WebCookieCache.cpp:\\n    (WebKit::WebCookieCache::pruneCacheIfNecessary):\\n    \\n    Tools:\\n    \\n    Add API test coverage.\\n    \\n    * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:\\n    (TEST):\\n    \\n    \\n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258521 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\n\\n    2020-03-16  Chris Dumez  <[email protected]>\\n\\n            Crash under WebCookieCache::clearForHost()\\n            https://bugs.webkit.org/show_bug.cgi?id=209149\\n            <rdar://problem/60453086>\\n\\n            Reviewed by Alex Christensen.\\n\\n            Add API test coverage.\\n\\n            * TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:\\n            (TEST):\\n\\n'2020-03-17  Alan Coon  <[email protected]>\n\n            Cherry-pick r258518. rdar://problem/60517387\n\n        [macOS] Accessibility sandbox regressions\n        https://bugs
 .webkit.org/show_bug.cgi?id=209065\n        Source/WebCore/PAL:\n\n\n        Reviewed by Brent Fulgham.\n\n        Add Accessibility notification name.\n\n        * pal/spi/cocoa/NSAccessibilitySPI.h:\n\n        Source/WebKit:\n\n        <rdar://problem/60202450>\n\n        Reviewed by Brent Fulgham.\n\n        When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility\n        is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent\n        sandbox needs to explicitly allow reading of the various plist files.\n\n        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:\n        (WebKit::WebProcessPool::registerNotificationObservers):\n        * WebProcess/com.apple.WebProcess.sb.in:\n\n        Tools:\n\n\n        Reviewed by Brent Fulgham.\n\n        * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:\n        (TEST):\n        * TestWebKitAPI/Tests/WebKit/GrantAccessToPrefe
 rencesService.mm:\n        (TEST):\n\n\n\n        git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258518 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n        2020-03-16  Per Arne Vollan  <[email protected]>\n\n                [macOS] Accessibility sandbox regressions\n                https://bugs.webkit.org/show_bug.cgi?id=209065\n\n                Reviewed by Brent Fulgham.\n\n                * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:\n                (TEST):\n                * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:\n                (TEST):\n\n"2020-03-17  Alan Coon  <[email protected]>
 
-        Cherry-pick r258518. rdar://problem/60517387
-
-    [macOS] Accessibility sandbox regressions
-    https://bugs.webkit.org/show_bug.cgi?id=209065
-    Source/WebCore/PAL:
-    
-    
-    Reviewed by Brent Fulgham.
-    
-    Add Accessibility notification name.
-    
-    * pal/spi/cocoa/NSAccessibilitySPI.h:
-    
-    Source/WebKit:
-    
-    <rdar://problem/60202450>
-    
-    Reviewed by Brent Fulgham.
-    
-    When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility
-    is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent
-    sandbox needs to explicitly allow reading of the various plist files.
-    
-    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
-    (WebKit::WebProcessPool::registerNotificationObservers):
-    * WebProcess/com.apple.WebProcess.sb.in:
-    
-    Tools:
-    
-    
-    Reviewed by Brent Fulgham.
-    
-    * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:
-    (TEST):
-    * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:
-    (TEST):
-    
-    
-    
-    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
-    2020-03-16  Per Arne Vollan  <[email protected]>
-
-            [macOS] Accessibility sandbox regressions
-            https://bugs.webkit.org/show_bug.cgi?id=209065
-
-            Reviewed by Brent Fulgham.
-
-            * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:
-            (TEST):
-            * TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:
-            (TEST):
-
-2020-03-17  Alan Coon  <[email protected]>
-
         Cherry-pick r258359. rdar://problem/60517387
 
     [macOS] _AXSApplicationAccessibilityEnabled should not be called

Modified: branches/safari-610.1.7-branch/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm (259226 => 259227)


--- branches/safari-610.1.7-branch/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm	2020-03-30 20:56:49 UTC (rev 259226)
+++ branches/safari-610.1.7-branch/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm	2020-03-30 20:56:51 UTC (rev 259227)
@@ -23,13 +23,14 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "DragAndDropSimulator.h"
+#import "config.h"
+#import "DragAndDropSimulator.h"
 
 #if ENABLE(DRAG_SUPPORT) && PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
 
 #import "InstanceMethodSwizzler.h"
 #import "PlatformUtilities.h"
+#import "Test.h"
 #import "UIKitSPI.h"
 #import <UIKit/UIDragInteraction.h>
 #import <UIKit/UIDragItem.h>
@@ -500,11 +501,16 @@
                 if (preview)
                     [_delayedDropPreviews setObject:preview atIndexedSubscript:dropPreviewIndex];
 
-                if (!--numberOfPendingPreviews)
+                if (!--numberOfPendingPreviews) {
                     _isDoneWaitingForDelayedDropPreviews = true;
+                    [self _expectNoDropPreviewsWithUnparentedContainerViews];
+                }
             }];
             ++dropPreviewIndex;
         }
+
+        [self _expectNoDropPreviewsWithUnparentedContainerViews];
+
         [[_webView dropInteractionDelegate] dropInteraction:[_webView dropInteraction] performDrop:_dropSession.get()];
         _phase = DragAndDropPhasePerformingDrop;
 
@@ -826,8 +832,32 @@
     _dropAnimationCompletionBlocks.append(makeBlockPtr(completion));
 }
 
+- (void)_expectNoDropPreviewsWithUnparentedContainerViews
+{
+    auto checkDropPreview = [&](id dropPreviewOrNull) {
+        if (![dropPreviewOrNull isKindOfClass:UITargetedPreview.class])
+            return;
+
+        auto *previewContainer = [(UITargetedDragPreview *)dropPreviewOrNull target].container;
+        if (!previewContainer)
+            return;
+
+        if ([previewContainer isKindOfClass:UIWindow.class])
+            return;
+
+        EXPECT_NOT_NULL(previewContainer.window);
+    };
+
+    for (id dropPreviewOrNull in _dropPreviews.get())
+        checkDropPreview(dropPreviewOrNull);
+
+    for (id dropPreviewOrNull in _delayedDropPreviews.get())
+        checkDropPreview(dropPreviewOrNull);
+}
+
 - (void)_invokeDropAnimationCompletionBlocksAndConcludeDrop
 {
+    [self _expectNoDropPreviewsWithUnparentedContainerViews];
     for (auto block : std::exchange(_dropAnimationCompletionBlocks, { }))
         block(UIViewAnimatingPositionEnd);
     [[_webView dropInteractionDelegate] dropInteraction:[_webView dropInteraction] concludeDrop:_dropSession.get()];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to