⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246224 in webkit


Ignore:
Timestamp:
Jun 7, 2019, 4:59:22 PM (7 years ago)
Author:
dino@apple.com
Message:

Introduce new SPI for context menus on iOS
https://bugs.webkit.org/show_bug.cgi?id=198590

Reviewed by Tim Horton.

Also introduce WKContextMenuElementInfo which is API.
This is part of <rdar://problem/51003503>

  • Shared/API/APIObject.h:
  • Shared/API/Cocoa/WebKit.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContextMenuElementInfo.cpp: Added.

(API::ContextMenuElementInfo::ContextMenuElementInfo):

  • UIProcess/API/APIContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.

(-[WKContextMenuElementInfo linkURL]):
(-[WKContextMenuElementInfo _apiObject]):
(-[WKContextMenuElementInfo _activatedElementInfo]):

  • UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
  • UIProcess/API/Cocoa/WKPreviewElementInfo.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
(-[_WKActivatedElementInfo isAnimatedImage]):

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebKit
Files:
17 edited
6 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r246213 r246224  
    1 2019-06-07  Antoine Quint  <graouts@apple.com>
    2 
    3         Restrict fast clicks everywhere to desktop content mode
    4         https://bugs.webkit.org/show_bug.cgi?id=198610
    5         <rdar://problem/50114230>
    6 
    7         Reviewed by Dean Jackson.
    8 
    9         We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
    10         when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
    11 
    12         This patch had been reverted once because it yielded some regressions in existing tests, notably under
    13         fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
    14         used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
    15         to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
    16         rathern than the recognition of two single taps.
    17 
    18         * UIProcess/WebPageProxy.h:
    19         (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
    20         * UIProcess/ios/WKContentViewInteraction.mm:
    21         (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
    22         (_didStartProvisionalLoadForMainFrame):
    23         * UIProcess/ios/WebPageProxyIOS.mm:
    24         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
    25 
    26 2019-06-07  Brent Fulgham  <bfulgham@apple.com>
    27 
    28         [iOS] Update sandboxes to address iokit-get-property errors
    29         https://bugs.webkit.org/show_bug.cgi?id=198494
    30         <rdar://problem/51322072> and <rdar://problem/50602737>
    31 
    32         Reviewed by Per Arne Vollan.
    33 
    34         * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
    35 
    36 2019-06-07  Andy Estes  <aestes@apple.com>
    37 
    38         process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
    39         https://bugs.webkit.org/show_bug.cgi?id=196930
    40         <rdar://problem/47819301>
    41 
    42         Reviewed by Chris Dumez.
    43 
    44         The ContentFilterDidBlockLoadForFrame message needs to be handled by ProvisionalPageProxy in
    45         order to look up the blocked frame in the correct WebProcessProxy.
    46 
    47         * UIProcess/Cocoa/WebPageProxyCocoa.mm:
    48         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
    49         (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):
    50         * UIProcess/ProvisionalPageProxy.cpp:
    51         (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
    52         (WebKit::ProvisionalPageProxy::didReceiveMessage):
    53         * UIProcess/ProvisionalPageProxy.h:
    54         * UIProcess/WebPageProxy.h:
    55 
    56 2019-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
    57 
    58         Unreviewed. Fix api used to release wpe_fdo_egl_exported_image in GTK
    59 
    60         We are using the old deprecated API in AcceleratedBackingStoreWayland::displayBuffer().
    61 
    62         * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
    63         (WebKit::AcceleratedBackingStoreWayland::displayBuffer):
    64 
    65 2019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
    66 
    67         REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
    68         https://bugs.webkit.org/show_bug.cgi?id=198561
    69 
    70         Reviewed by Chris Dumez.
    71 
    72         This is another regression of delaying the web process launch until the first load. If the session is restored
    73         before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
    74         state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
    75         from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
    76         those cases, the history item is not marked as restored from session. We need to ensure the session is restored
    77         in the web process from the IPC message handler, by launching the initial process before the session is
    78         restored.
    79 
    80         * UIProcess/WebPageProxy.cpp:
    81         (WebKit::WebPageProxy::restoreFromSessionState):
    82 
    83 2019-06-06  Youenn Fablet  <youenn@apple.com>
    84 
    85         Use an enumeration in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo callback
    86         https://bugs.webkit.org/show_bug.cgi?id=198548
    87 
    88         Reviewed by Eric Carlson.
    89 
    90         Move from an Optional<bool> to an enum having three values to ease readability.
    91 
    92         * UIProcess/UserMediaPermissionCheckProxy.cpp:
    93         (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
    94         (WebKit::UserMediaPermissionCheckProxy::complete):
    95         * UIProcess/UserMediaPermissionCheckProxy.h:
    96         (WebKit::UserMediaPermissionCheckProxy::invalidate):
    97         * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
    98         (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
    99         (WebKit::UserMediaPermissionRequestManagerProxy::startProcessingUserMediaPermissionRequest):
    100         (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
    101         (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
    102         * UIProcess/UserMediaPermissionRequestManagerProxy.h:
    103 
    104 2019-06-06  Youenn Fablet  <youenn@apple.com>
    105 
    106         Allow WebKitTestRunner to terminate network process after it finishes service worker file operations
    107         https://bugs.webkit.org/show_bug.cgi?id=198584
    108 
    109         Reviewed by Geoffrey Garen.
    110 
    111         Add IPC binding to new internal API.
    112 
    113         * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
    114         * WebProcess/Storage/WebSWClientConnection.cpp:
    115         (WebKit::WebSWClientConnection::storeRegistrationsOnDiskForTesting):
    116         * WebProcess/Storage/WebSWClientConnection.h:
    117 
    118 2019-06-06  Commit Queue  <commit-queue@webkit.org>
    119 
    120         Unreviewed, rolling out r246165.
    121         https://bugs.webkit.org/show_bug.cgi?id=198636
    122 
    123         Causing test failures in 7 content-observation tests.
    124         (Requested by ShawnRoberts on #webkit).
    125 
    126         Reverted changeset:
    127 
    128         "Restrict fast clicks everywhere to desktop content mode"
    129         https://bugs.webkit.org/show_bug.cgi?id=198610
    130         https://trac.webkit.org/changeset/246165
    131 
    132 2019-06-06  Commit Queue  <commit-queue@webkit.org>
    133 
    134         Unreviewed, rolling out r246123.
    135         https://bugs.webkit.org/show_bug.cgi?id=198634
    136 
    137         Causes test failures (Requested by ShawnRoberts on #webkit).
    138 
    139         Reverted changeset:
    140 
    141         "[iOS] Update sandboxes to address iokit-get-property errors"
    142         https://bugs.webkit.org/show_bug.cgi?id=198494
    143         https://trac.webkit.org/changeset/246123
    144 
    145 2019-06-06  Geoffrey Garen  <ggaren@apple.com>
    146 
    147         Crash using WKHTTPCookieStore when you use WKWebView and UIWebView in the same app
    148         https://bugs.webkit.org/show_bug.cgi?id=198622
    149 
    150         Reviewed by Chris Dumez.
    151 
    152         Today in a WWDC lab, I saw some crash reports from an app that mixed
    153         WKWebView and UIWebView. The proximate cause of the crash is that
    154         WKHTTPCookieStore queues a callOnMainThread function, and then
    155         UIWebView dequeues it on the WebThread.
    156 
    157         No test because this crash depends on mixing WKWebView and UIWebView and
    158         getting (un)lucky on the timing.
    159 
    160         * UIProcess/API/APIHTTPCookieStore.cpp:
    161         (API::HTTPCookieStore::cookies):
    162         (API::HTTPCookieStore::setCookies):
    163         (API::HTTPCookieStore::deleteCookie): Avoid using callOnMainThread
    164         becuase it is prohibited in the UI process.
    165 
    166 2019-06-06  Antoine Quint  <graouts@apple.com>
    167 
    168         Remove duplicated websiteDataStoreParameters code from WebsitePoliciesData::applyToDocumentLoader()
    169         https://bugs.webkit.org/show_bug.cgi?id=198608
    170 
    171         Reviewed by Wenson Hsieh.
    172 
    173         Due to a rebasing error, r244218 re-introduced code that was removed in r244197. This patch removes this code for good.
    174 
    175         * Shared/WebsitePoliciesData.cpp:
    176         (WebKit::WebsitePoliciesData::applyToDocumentLoader):
    177 
    178 2019-06-06  Antoine Quint  <graouts@apple.com>
    179 
    180         Restrict fast clicks everywhere to desktop content mode
    181         https://bugs.webkit.org/show_bug.cgi?id=198610
    182         <rdar://problem/50114230>
    183 
    184         Reviewed by Dean Jackson.
    185 
    186         * UIProcess/WebPageProxy.h:
    187         (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
    188         * UIProcess/ios/WKContentViewInteraction.mm:
    189         (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
    190         * UIProcess/ios/WebPageProxyIOS.mm:
    191         (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
    192 
    193 2019-06-06  Sihui Liu  <sihui_liu@apple.com>
    194 
    195         NetworkHTTPSUpgradeChecker should construct and destruct database on the background thread
    196         https://bugs.webkit.org/show_bug.cgi?id=198496
    197 
    198         Reviewed by Chris Dumez.
    199 
    200         * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
    201         (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
    202         (WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
    203         * NetworkProcess/NetworkHTTPSUpgradeChecker.h:
    204 
    205 2019-06-06  Truitt Savell  <tsavell@apple.com>
    206 
    207         Unreviewed, rolling out r246137.
    208 
    209         Broke internal builds.
    210 
    211         Reverted changeset:
    212 
    213         "Introduce new SPI for context menus on iOS"
    214         https://bugs.webkit.org/show_bug.cgi?id=198590
    215         https://trac.webkit.org/changeset/246137
    216 
    217 2019-06-06  Antti Koivisto  <antti@apple.com>
    218 
    219         Position fixed is buggy with overflow:auto scrolling inside iframes
    220         https://bugs.webkit.org/show_bug.cgi?id=154399
    221         <rdar://problem/24742251>
    222 
    223         Reviewed by Frederic Wang and Simon Fraser.
    224 
    225         * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
    226         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
    227 
    228         Remove viewportChangedViaDelegatedScrolling call as we were just relying on its side effect of (partially) applying
    229         the scrolling tree. Instead call the new applyScrollingTreeLayerPositionsAfterCommit() unconditionally.
    230         It only does work if there are local deltas to apply.
    231 
    232         Local deltas will potentially need to be applied in non-fixed cases too and it is hard to reason about the conditions.
    233 
    234         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
    235         (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositionsAfterCommit):
    236         (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositions): Deleted.
    237         * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
    238 
    239 2019-06-06  Michael Catanzaro  <mcatanzaro@igalia.com>
    240 
    241         [WPE][GTK] Clean up use of initiatingPageID in implementation of webkit_uri_scheme_request_get_web_view()
    242         https://bugs.webkit.org/show_bug.cgi?id=198564
    243 
    244         Reviewed by Carlos Garcia Campos.
    245 
    246         Note that we have to use RefPtr rather than Ref here because the priv struct has to remain
    247         default-constructible.
    248 
    249         * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
    250         (webkitURISchemeRequestCreate):
    251         (webkit_uri_scheme_request_get_web_view):
    252 
    253 2019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
    254 
    255         [GTK][WPE] Enable PSON
    256         https://bugs.webkit.org/show_bug.cgi?id=194979
    257 
    258         Reviewed by Žan Doberšek.
    259 
    260         * Shared/WebPreferencesDefaultValues.h:
    261 
    262 2019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
    263 
    264         [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
    265         https://bugs.webkit.org/show_bug.cgi?id=198497
    266 
    267         Reviewed by Simon Fraser.
    268 
    269         Call InspectorController::willComposite() from the CA preCommit handler
    270         similar to the call to InspectorController::didComposite() in the CA
    271         postCommit handler. Ensure these calls will be once for nested commits.
    272 
    273         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
    274         * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
    275         (WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):
    276         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
    277         * WebProcess/WebPage/WebPage.h:
    278         (WebKit::WebPage::firstFlushAfterCommit const):
    279         (WebKit::WebPage::setFirstFlushAfterCommit):
    280         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
    281         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
    282         (WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):
    283         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
    284 
    28512019-06-05  Alex Christensen  <achristensen@webkit.org>
    2862
     
    32339        * WebKit.xcodeproj/project.pbxproj:
    32440
     412019-06-07  Antoine Quint  <graouts@apple.com>
     42
     43        Restrict fast clicks everywhere to desktop content mode
     44        https://bugs.webkit.org/show_bug.cgi?id=198610
     45        <rdar://problem/50114230>
     46
     47        Reviewed by Dean Jackson.
     48
     49        We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
     50        when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.
     51
     52        This patch had been reverted once because it yielded some regressions in existing tests, notably under
     53        fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
     54        used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
     55        to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
     56        rathern than the recognition of two single taps.
     57
     58        * UIProcess/WebPageProxy.h:
     59        (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
     60        * UIProcess/ios/WKContentViewInteraction.mm:
     61        (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
     62        (_didStartProvisionalLoadForMainFrame):
     63        * UIProcess/ios/WebPageProxyIOS.mm:
     64        (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
     65
     662019-06-07  Brent Fulgham  <bfulgham@apple.com>
     67
     68        [iOS] Update sandboxes to address iokit-get-property errors
     69        https://bugs.webkit.org/show_bug.cgi?id=198494
     70        <rdar://problem/51322072> and <rdar://problem/50602737>
     71
     72        Reviewed by Per Arne Vollan.
     73
     74        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
     75
     762019-06-07  Andy Estes  <aestes@apple.com>
     77
     78        process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
     79        https://bugs.webkit.org/show_bug.cgi?id=196930
     80        <rdar://problem/47819301>
     81
     82        Reviewed by Chris Dumez.
     83
     84        The ContentFilterDidBlockLoadForFrame message needs to be handled by ProvisionalPageProxy in
     85        order to look up the blocked frame in the correct WebProcessProxy.
     86
     87        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
     88        (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
     89        (WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):
     90        * UIProcess/ProvisionalPageProxy.cpp:
     91        (WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
     92        (WebKit::ProvisionalPageProxy::didReceiveMessage):
     93        * UIProcess/ProvisionalPageProxy.h:
     94        * UIProcess/WebPageProxy.h:
     95
     962019-06-07  Carlos Garcia Campos  <cgarcia@igalia.com>
     97
     98        Unreviewed. Fix api used to release wpe_fdo_egl_exported_image in GTK
     99
     100        We are using the old deprecated API in AcceleratedBackingStoreWayland::displayBuffer().
     101
     102        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
     103        (WebKit::AcceleratedBackingStoreWayland::displayBuffer):
     104
     1052019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
     106
     107        REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
     108        https://bugs.webkit.org/show_bug.cgi?id=198561
     109
     110        Reviewed by Chris Dumez.
     111
     112        This is another regression of delaying the web process launch until the first load. If the session is restored
     113        before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
     114        state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
     115        from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
     116        those cases, the history item is not marked as restored from session. We need to ensure the session is restored
     117        in the web process from the IPC message handler, by launching the initial process before the session is
     118        restored.
     119
     120        * UIProcess/WebPageProxy.cpp:
     121        (WebKit::WebPageProxy::restoreFromSessionState):
     122
     1232019-06-06  Youenn Fablet  <youenn@apple.com>
     124
     125        Use an enumeration in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo callback
     126        https://bugs.webkit.org/show_bug.cgi?id=198548
     127
     128        Reviewed by Eric Carlson.
     129
     130        Move from an Optional<bool> to an enum having three values to ease readability.
     131
     132        * UIProcess/UserMediaPermissionCheckProxy.cpp:
     133        (WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
     134        (WebKit::UserMediaPermissionCheckProxy::complete):
     135        * UIProcess/UserMediaPermissionCheckProxy.h:
     136        (WebKit::UserMediaPermissionCheckProxy::invalidate):
     137        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
     138        (WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
     139        (WebKit::UserMediaPermissionRequestManagerProxy::startProcessingUserMediaPermissionRequest):
     140        (WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
     141        (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
     142        * UIProcess/UserMediaPermissionRequestManagerProxy.h:
     143
     1442019-06-06  Youenn Fablet  <youenn@apple.com>
     145
     146        Allow WebKitTestRunner to terminate network process after it finishes service worker file operations
     147        https://bugs.webkit.org/show_bug.cgi?id=198584
     148
     149        Reviewed by Geoffrey Garen.
     150
     151        Add IPC binding to new internal API.
     152
     153        * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
     154        * WebProcess/Storage/WebSWClientConnection.cpp:
     155        (WebKit::WebSWClientConnection::storeRegistrationsOnDiskForTesting):
     156        * WebProcess/Storage/WebSWClientConnection.h:
     157
     1582019-06-06  Commit Queue  <commit-queue@webkit.org>
     159
     160        Unreviewed, rolling out r246165.
     161        https://bugs.webkit.org/show_bug.cgi?id=198636
     162
     163        Causing test failures in 7 content-observation tests.
     164        (Requested by ShawnRoberts on #webkit).
     165
     166        Reverted changeset:
     167
     168        "Restrict fast clicks everywhere to desktop content mode"
     169        https://bugs.webkit.org/show_bug.cgi?id=198610
     170        https://trac.webkit.org/changeset/246165
     171
     1722019-06-06  Commit Queue  <commit-queue@webkit.org>
     173
     174        Unreviewed, rolling out r246123.
     175        https://bugs.webkit.org/show_bug.cgi?id=198634
     176
     177        Causes test failures (Requested by ShawnRoberts on #webkit).
     178
     179        Reverted changeset:
     180
     181        "[iOS] Update sandboxes to address iokit-get-property errors"
     182        https://bugs.webkit.org/show_bug.cgi?id=198494
     183        https://trac.webkit.org/changeset/246123
     184
     1852019-06-06  Geoffrey Garen  <ggaren@apple.com>
     186
     187        Crash using WKHTTPCookieStore when you use WKWebView and UIWebView in the same app
     188        https://bugs.webkit.org/show_bug.cgi?id=198622
     189
     190        Reviewed by Chris Dumez.
     191
     192        Today in a WWDC lab, I saw some crash reports from an app that mixed
     193        WKWebView and UIWebView. The proximate cause of the crash is that
     194        WKHTTPCookieStore queues a callOnMainThread function, and then
     195        UIWebView dequeues it on the WebThread.
     196
     197        No test because this crash depends on mixing WKWebView and UIWebView and
     198        getting (un)lucky on the timing.
     199
     200        * UIProcess/API/APIHTTPCookieStore.cpp:
     201        (API::HTTPCookieStore::cookies):
     202        (API::HTTPCookieStore::setCookies):
     203        (API::HTTPCookieStore::deleteCookie): Avoid using callOnMainThread
     204        becuase it is prohibited in the UI process.
     205
     2062019-06-06  Antoine Quint  <graouts@apple.com>
     207
     208        Remove duplicated websiteDataStoreParameters code from WebsitePoliciesData::applyToDocumentLoader()
     209        https://bugs.webkit.org/show_bug.cgi?id=198608
     210
     211        Reviewed by Wenson Hsieh.
     212
     213        Due to a rebasing error, r244218 re-introduced code that was removed in r244197. This patch removes this code for good.
     214
     215        * Shared/WebsitePoliciesData.cpp:
     216        (WebKit::WebsitePoliciesData::applyToDocumentLoader):
     217
     2182019-06-06  Antoine Quint  <graouts@apple.com>
     219
     220        Restrict fast clicks everywhere to desktop content mode
     221        https://bugs.webkit.org/show_bug.cgi?id=198610
     222        <rdar://problem/50114230>
     223
     224        Reviewed by Dean Jackson.
     225
     226        * UIProcess/WebPageProxy.h:
     227        (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
     228        * UIProcess/ios/WKContentViewInteraction.mm:
     229        (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
     230        * UIProcess/ios/WebPageProxyIOS.mm:
     231        (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
     232
     2332019-06-06  Sihui Liu  <sihui_liu@apple.com>
     234
     235        NetworkHTTPSUpgradeChecker should construct and destruct database on the background thread
     236        https://bugs.webkit.org/show_bug.cgi?id=198496
     237
     238        Reviewed by Chris Dumez.
     239
     240        * NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
     241        (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
     242        (WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):
     243        * NetworkProcess/NetworkHTTPSUpgradeChecker.h:
     244
     2452019-06-06  Truitt Savell  <tsavell@apple.com>
     246
     247        Unreviewed, rolling out r246137.
     248
     249        Broke internal builds.
     250
     251        Reverted changeset:
     252
     253        "Introduce new SPI for context menus on iOS"
     254        https://bugs.webkit.org/show_bug.cgi?id=198590
     255        https://trac.webkit.org/changeset/246137
     256
     2572019-06-06  Antti Koivisto  <antti@apple.com>
     258
     259        Position fixed is buggy with overflow:auto scrolling inside iframes
     260        https://bugs.webkit.org/show_bug.cgi?id=154399
     261        <rdar://problem/24742251>
     262
     263        Reviewed by Frederic Wang and Simon Fraser.
     264
     265        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
     266        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
     267
     268        Remove viewportChangedViaDelegatedScrolling call as we were just relying on its side effect of (partially) applying
     269        the scrolling tree. Instead call the new applyScrollingTreeLayerPositionsAfterCommit() unconditionally.
     270        It only does work if there are local deltas to apply.
     271
     272        Local deltas will potentially need to be applied in non-fixed cases too and it is hard to reason about the conditions.
     273
     274        * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
     275        (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositionsAfterCommit):
     276        (WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositions): Deleted.
     277        * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
     278
     2792019-06-06  Michael Catanzaro  <mcatanzaro@igalia.com>
     280
     281        [WPE][GTK] Clean up use of initiatingPageID in implementation of webkit_uri_scheme_request_get_web_view()
     282        https://bugs.webkit.org/show_bug.cgi?id=198564
     283
     284        Reviewed by Carlos Garcia Campos.
     285
     286        Note that we have to use RefPtr rather than Ref here because the priv struct has to remain
     287        default-constructible.
     288
     289        * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
     290        (webkitURISchemeRequestCreate):
     291        (webkit_uri_scheme_request_get_web_view):
     292
     2932019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
     294
     295        [GTK][WPE] Enable PSON
     296        https://bugs.webkit.org/show_bug.cgi?id=194979
     297
     298        Reviewed by Žan Doberšek.
     299
     300        * Shared/WebPreferencesDefaultValues.h:
     301
     3022019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
     303
     304        [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
     305        https://bugs.webkit.org/show_bug.cgi?id=198497
     306
     307        Reviewed by Simon Fraser.
     308
     309        Call InspectorController::willComposite() from the CA preCommit handler
     310        similar to the call to InspectorController::didComposite() in the CA
     311        postCommit handler. Ensure these calls will be once for nested commits.
     312
     313        * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
     314        * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
     315        (WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):
     316        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
     317        * WebProcess/WebPage/WebPage.h:
     318        (WebKit::WebPage::firstFlushAfterCommit const):
     319        (WebKit::WebPage::setFirstFlushAfterCommit):
     320        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
     321        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     322        (WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):
     323        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
     324
     3252019-06-05  Alex Christensen  <achristensen@webkit.org>
     326
     327        Introduce new SPI for context menus on iOS
     328        https://bugs.webkit.org/show_bug.cgi?id=198590
     329
     330        Reviewed by Tim Horton.
     331
     332        Also introduce WKContextMenuElementInfo which is API.
     333        This is part of <rdar://problem/51003503>
     334
     335        * Shared/API/APIObject.h:
     336        * Shared/API/Cocoa/WebKit.h:
     337        * Shared/Cocoa/APIObject.mm:
     338        (API::Object::newObject):
     339        * Sources.txt:
     340        * SourcesCocoa.txt:
     341        * UIProcess/API/APIContextMenuElementInfo.cpp: Added.
     342        (API::ContextMenuElementInfo::ContextMenuElementInfo):
     343        * UIProcess/API/APIContextMenuElementInfo.h: Added.
     344        * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
     345        * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.
     346        (-[WKContextMenuElementInfo linkURL]):
     347        (-[WKContextMenuElementInfo _apiObject]):
     348        (-[WKContextMenuElementInfo _activatedElementInfo]):
     349        * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
     350        * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
     351        * UIProcess/API/Cocoa/WKPreviewElementInfo.h:
     352        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
     353        * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
     354        * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
     355        (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
     356        (-[_WKActivatedElementInfo isAnimatedImage]):
     357        * UIProcess/ios/WKActionSheetAssistant.h:
     358        * UIProcess/ios/WKActionSheetAssistant.mm:
     359        (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
     360        (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
     361        * UIProcess/ios/WKContentView.h:
     362        * UIProcess/ios/WKContentViewInteraction.mm:
     363        * WebKit.xcodeproj/project.pbxproj:
     364
    3253652019-06-05  Jer Noble  <jer.noble@apple.com>
    326366
  • trunk/Source/WebKit/Shared/API/APIObject.h

    r246157 r246224  
    110110        ContentRuleListAction,
    111111        ContentRuleListStore,
     112#if PLATFORM(IOS_FAMILY)
     113        ContextMenuElementInfo,
     114#endif
    112115        ContextMenuListener,
    113116        CookieManager,
  • trunk/Source/WebKit/Shared/API/Cocoa/WebKit.h

    r246157 r246224  
    2828#import <WebKit/WKContentRuleList.h>
    2929#import <WebKit/WKContentRuleListStore.h>
     30#import <WebKit/WKContextMenuElementInfo.h>
    3031#import <WebKit/WKError.h>
    3132#import <WebKit/WKFoundation.h>
  • trunk/Source/WebKit/Shared/Cocoa/APIObject.mm

    r246157 r246224  
    3434#import "WKContentRuleListInternal.h"
    3535#import "WKContentRuleListStoreInternal.h"
     36#import "WKContextMenuElementInfoInternal.h"
    3637#import "WKFrameInfoInternal.h"
    3738#import "WKHTTPCookieStoreInternal.h"
     
    314315        break;
    315316
     317#if PLATFORM(IOS_FAMILY)
     318    case Type::ContextMenuElementInfo:
     319        wrapper = [WKContextMenuElementInfo alloc];
     320        break;
     321#endif
     322
    316323    case Type::CustomHeaderFields:
    317324        wrapper = [_WKCustomHeaderFields alloc];
  • trunk/Source/WebKit/Sources.txt

    r246157 r246224  
    301301UIProcess/API/APIContentRuleListAction.cpp
    302302UIProcess/API/APIContentRuleListStore.cpp
     303UIProcess/API/APIContextMenuElementInfo.cpp
    303304UIProcess/API/APIExperimentalFeature.cpp
    304305UIProcess/API/APIFrameInfo.cpp
  • trunk/Source/WebKit/SourcesCocoa.txt

    r246157 r246224  
    285285UIProcess/API/Cocoa/WKContentRuleList.mm
    286286UIProcess/API/Cocoa/WKContentRuleListStore.mm
     287UIProcess/API/Cocoa/WKContextMenuElementInfo.mm
    287288UIProcess/API/Cocoa/WKError.mm
    288289UIProcess/API/Cocoa/WKFrameInfo.mm
  • trunk/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.cpp

    r246223 r246224  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <WebKit/WKFoundation.h>
     26#include "config.h"
     27#include "APIContextMenuElementInfo.h"
    2728
    28 #if TARGET_OS_IPHONE
     29#if PLATFORM(IOS_FAMILY)
    2930
    30 #import <Foundation/Foundation.h>
     31namespace API {
    3132
    32 NS_ASSUME_NONNULL_BEGIN
     33ContextMenuElementInfo::ContextMenuElementInfo(const WebKit::InteractionInformationAtPosition& info)
     34    : m_interactionInformation(info)
     35{
     36}
    3337
    34 WK_CLASS_AVAILABLE(ios(10.0))
    35 @interface WKPreviewElementInfo : NSObject <NSCopying>
     38} // namespace API
    3639
    37 @property (nonatomic, readonly, nullable) NSURL *linkURL;
    38 
    39 @end
    40 
    41 NS_ASSUME_NONNULL_END
    42 
    43 #endif
     40#endif // PLATFORM(IOS_FAMILY)
  • trunk/Source/WebKit/UIProcess/API/APIContextMenuElementInfo.h

    r246223 r246224  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <WebKit/WKFoundation.h>
     26#pragma once
    2727
    28 #if TARGET_OS_IPHONE
     28#if PLATFORM(IOS_FAMILY)
    2929
    30 #import <Foundation/Foundation.h>
     30#include "APIObject.h"
     31#include "InteractionInformationAtPosition.h"
    3132
    32 NS_ASSUME_NONNULL_BEGIN
     33namespace API {
    3334
    34 WK_CLASS_AVAILABLE(ios(10.0))
    35 @interface WKPreviewElementInfo : NSObject <NSCopying>
     35class ContextMenuElementInfo final : public ObjectImpl<Object::Type::ContextMenuElementInfo> {
     36public:
     37    template<typename... Args> static Ref<ContextMenuElementInfo> create(Args&&... args)
     38    {
     39        return adoptRef(*new ContextMenuElementInfo(std::forward<Args>(args)...));
     40    }
     41   
     42    const WTF::URL& url() const { return m_interactionInformation.url; }
    3643
    37 @property (nonatomic, readonly, nullable) NSURL *linkURL;
     44    const WebKit::InteractionInformationAtPosition& interactionInformation() const { return m_interactionInformation; }
    3845
    39 @end
     46private:
     47    ContextMenuElementInfo(const WebKit::InteractionInformationAtPosition&);
     48   
     49    WebKit::InteractionInformationAtPosition m_interactionInformation;
     50};
    4051
    41 NS_ASSUME_NONNULL_END
     52} // namespace API
    4253
    4354#endif
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.h

    r246223 r246224  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3232NS_ASSUME_NONNULL_BEGIN
    3333
    34 WK_CLASS_AVAILABLE(ios(10.0))
    35 @interface WKPreviewElementInfo : NSObject <NSCopying>
     34WK_CLASS_AVAILABLE(ios(WK_IOS_TBA))
     35@interface WKContextMenuElementInfo : NSObject
     36
     37- (instancetype)init NS_UNAVAILABLE;
    3638
    3739@property (nonatomic, readonly, nullable) NSURL *linkURL;
     
    4244
    4345#endif
     46
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfo.mm

    r246223 r246224  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <WebKit/WKFoundation.h>
     26#import "config.h"
     27#import "WKContextMenuElementInfoInternal.h"
    2728
    28 #if TARGET_OS_IPHONE
     29#if PLATFORM(IOS_FAMILY)
    2930
    30 #import <Foundation/Foundation.h>
     31#import "_WKActivatedElementInfoInternal.h"
    3132
    32 NS_ASSUME_NONNULL_BEGIN
     33@implementation WKContextMenuElementInfo
    3334
    34 WK_CLASS_AVAILABLE(ios(10.0))
    35 @interface WKPreviewElementInfo : NSObject <NSCopying>
     35- (NSURL *)linkURL
     36{
     37    return _elementInfo->url();
     38}
    3639
    37 @property (nonatomic, readonly, nullable) NSURL *linkURL;
     40- (API::Object&)_apiObject
     41{
     42    return *_elementInfo;
     43}
    3844
    3945@end
    4046
    41 NS_ASSUME_NONNULL_END
     47@implementation WKContextMenuElementInfo (WKPrivate)
     48
     49- (_WKActivatedElementInfo *)_activatedElementInfo
     50{
     51    return [_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:_elementInfo->interactionInformation()];
     52}
     53
     54@end
    4255
    4356#endif
     57
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h

    r246223 r246224  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <WebKit/WKFoundation.h>
     26#import "APIContextMenuElementInfo.h"
     27#import "WKContextMenuElementInfo.h"
     28#import "WKObject.h"
    2729
    28 #if TARGET_OS_IPHONE
     30#if PLATFORM(IOS_FAMILY)
    2931
    30 #import <Foundation/Foundation.h>
     32namespace WebKit {
    3133
    32 NS_ASSUME_NONNULL_BEGIN
     34template<> struct WrapperTraits<API::ContextMenuElementInfo> {
     35    using WrapperClass = WKContextMenuElementInfo;
     36};
    3337
    34 WK_CLASS_AVAILABLE(ios(10.0))
    35 @interface WKPreviewElementInfo : NSObject <NSCopying>
     38}
    3639
    37 @property (nonatomic, readonly, nullable) NSURL *linkURL;
    38 
     40@interface WKContextMenuElementInfo () <WKObject> {
     41@package
     42    API::ObjectStorage<API::ContextMenuElementInfo> _elementInfo;
     43}
    3944@end
    4045
    41 NS_ASSUME_NONNULL_END
    42 
    43 #endif
     46#endif // PLATFORM(IOS_FAMILY)
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h

    r246223 r246224  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <WebKit/WKFoundation.h>
     26#import <WebKit/WKContextMenuElementInfo.h>
    2727
    28 #if TARGET_OS_IPHONE
     28@class _WKActivatedElementInfo;
    2929
    30 #import <Foundation/Foundation.h>
     30@interface WKContextMenuElementInfo (WKPrivate)
    3131
    32 NS_ASSUME_NONNULL_BEGIN
    33 
    34 WK_CLASS_AVAILABLE(ios(10.0))
    35 @interface WKPreviewElementInfo : NSObject <NSCopying>
    36 
    37 @property (nonatomic, readonly, nullable) NSURL *linkURL;
     32@property (nonatomic, copy, readonly) _WKActivatedElementInfo *_activatedElementInfo;
    3833
    3934@end
    40 
    41 NS_ASSUME_NONNULL_END
    42 
    43 #endif
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreviewElementInfo.h

    r246157 r246224  
    3232NS_ASSUME_NONNULL_BEGIN
    3333
    34 WK_CLASS_AVAILABLE(ios(10.0))
     34WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKContextMenuElementInfo", ios(10.0, WK_IOS_TBA))
    3535@interface WKPreviewElementInfo : NSObject <NSCopying>
    3636
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h

    r246157 r246224  
    4141
    4242#if TARGET_OS_IOS
     43@class UIContextMenuConfiguration;
    4344@class UIDragItem;
    4445@class UITargetedDragPreview;
     46@class WKContextMenuElementInfo;
     47@protocol UIContextMenuInteractionCommitAnimating;
    4548@protocol UIDragSession;
    4649@protocol UIDropSession;
     
    136139- (BOOL)_webView:(WKWebView *)webView shouldRequestGeolocationAuthorizationForURL:(NSURL *)url isMainFrame:(BOOL)isMainFrame mainFrameURL:(NSURL *)mainFrameURL;
    137140- (void)_webView:(WKWebView *)webView requestGeolocationAuthorizationForURL:(NSURL *)url frame:(WKFrameInfo *)frame decisionHandler:(void (^)(BOOL authorized))decisionHandler WK_API_AVAILABLE(ios(11.0));
    138 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_API_AVAILABLE(ios(9.0));
    139 - (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_API_AVAILABLE(ios(9.0));
    140 - (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_API_AVAILABLE(ios(9.0));
    141 - (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_API_AVAILABLE(ios(9.0));
    142 - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_API_AVAILABLE(ios(9.0));
    143 - (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_API_AVAILABLE(ios(9.0));
     141
     142- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:completionHandler:", ios(9.0, WK_IOS_TBA));
     143- (void)_webView:(WKWebView *)webView commitPreviewedViewController:(UIViewController *)previewedViewController WK_API_DEPRECATED_WITH_REPLACEMENT("webView:commitContextMenu:", ios(9.0, WK_IOS_TBA));
     144- (void)_webView:(WKWebView *)webView willPreviewImageWithURL:(NSURL *)imageURL WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:completionHandler:", ios(9.0, WK_IOS_TBA));
     145- (void)_webView:(WKWebView *)webView commitPreviewedImageWithURL:(NSURL *)imageURL WK_API_DEPRECATED_WITH_REPLACEMENT("webView:commitContextMenu:", ios(9.0, WK_IOS_TBA));
     146- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController committing:(BOOL)committing WK_API_DEPRECATED_WITH_REPLACEMENT("webView:dismissContextMenu:", ios(9.0, WK_IOS_TBA));
     147- (void)_webView:(WKWebView *)webView didDismissPreviewViewController:(UIViewController *)previewedViewController WK_API_DEPRECATED_WITH_REPLACEMENT("webView:dismissContextMenu:", ios(9.0, WK_IOS_TBA));
     148
     149#if TARGET_OS_IOS
     150// This needs to be removed once there is an API version to continue to do callbacks for image element context menus.
     151- (void)_webView:(WKWebView *)webView contextMenuConfigurationForElement:(WKContextMenuElementInfo *)elementInfo completionHandler:(void(^)(UIContextMenuConfiguration *))completionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));
     152
     153// These can be removed once there is an API version.
     154- (void)_webView:(WKWebView *)webView contextMenuForElement:(WKContextMenuElementInfo *)elementInfo willCommitWithAnimator:(id<UIContextMenuInteractionCommitAnimating>)animator WK_API_AVAILABLE(ios(WK_IOS_TBA));
     155- (void)_webView:(WKWebView *)webView contextMenuWillPresentForElement:(WKContextMenuElementInfo *)elementInfo WK_API_AVAILABLE(ios(WK_IOS_TBA));
     156- (void)_webView:(WKWebView *)webView contextMenuDidEndForElement:(WKContextMenuElementInfo *)elementInfo WK_API_AVAILABLE(ios(WK_IOS_TBA));
     157#endif
     158
    144159- (BOOL)_webView:(WKWebView *)webView showCustomSheetForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(10.0));
    145160- (void)_webView:(WKWebView *)webView alternateActionForURL:(NSURL *)url WK_API_AVAILABLE(ios(10.0));
     
    148163- (NSUInteger)_webView:(WKWebView *)webView indexIntoAttachmentListForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(10.3));
    149164- (UIEdgeInsets)_webView:(WKWebView *)webView finalObscuredInsetsForScrollView:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset WK_API_AVAILABLE(ios(9.0));
    150 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_AVAILABLE(ios(9.0));
    151 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_API_AVAILABLE(ios(9.0));
     165- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:", ios(9.0, WK_IOS_TBA));
     166- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForAnimatedImageAtURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo imageSize:(CGSize)imageSize WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:", ios(9.0, WK_IOS_TBA));
    152167- (UIViewController *)_presentingViewControllerForWebView:(WKWebView *)webView WK_API_AVAILABLE(ios(10.0));
    153168- (void)_webView:(WKWebView *)webView getAlternateURLFromImage:(UIImage *)image completionHandler:(void (^)(NSURL *alternateURL, NSDictionary *userInfo))completionHandler WK_API_AVAILABLE(ios(11.0));
    154169- (NSURL *)_webView:(WKWebView *)webView alternateURLFromImage:(UIImage *)image userInfo:(NSDictionary **)userInfo WK_API_AVAILABLE(ios(11.0));
    155 - (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForImage:(UIImage *)image alternateURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_AVAILABLE(ios(11.0));
     170- (UIViewController *)_webView:(WKWebView *)webView previewViewControllerForImage:(UIImage *)image alternateURL:(NSURL *)url defaultActions:(NSArray<_WKElementAction *> *)actions elementInfo:(_WKActivatedElementInfo *)elementInfo WK_API_DEPRECATED_WITH_REPLACEMENT("webView:contextMenuConfigurationForElement:", ios(11.0, WK_IOS_TBA));
    156171- (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProviders:(NSArray *)originalItemProviders WK_API_AVAILABLE(ios(11.0));
    157172- (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProvidersForItemProvider:(id)itemProvider representingObjects:(NSArray *)representingObjects additionalData:(NSDictionary *)additionalData WK_API_AVAILABLE(ios(11.0));
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.h

    r246157 r246224  
    4848@property (nonatomic, readonly) CGRect boundingRect;
    4949@property (nonatomic, readonly) NSString *ID WK_API_AVAILABLE(macos(10.12), ios(10.0));
     50@property (nonatomic, readonly) BOOL isAnimatedImage WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    5051#if TARGET_OS_IPHONE
    5152@property (nonatomic, readonly) NSDictionary *userInfo WK_API_AVAILABLE(ios(11.0));
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm

    r246157 r246224  
    5252    RetainPtr<NSImage> _nsImage;
    5353#endif
     54    BOOL _animatedImage;
    5455}
    5556
     
    8283    _image = information.image;
    8384    _ID = information.idAttribute;
     85    _animatedImage = information.isAnimatedImage;
    8486   
    8587    return self;
     
    137139}
    138140
     141- (BOOL)isAnimatedImage
     142{
     143    return _animatedImage;
     144}
     145
    139146#if PLATFORM(IOS_FAMILY)
    140147- (NSDictionary *)userInfo
  • trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h

    r246157 r246224  
    141141class WebPageProxy;
    142142class WebProcessPool;
     143class WebProcessProxy;
    143144struct ColorSpaceData;
    144145struct WebHitTestResultData;
  • trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm

    r246157 r246224  
    15701570    NSView *webView = m_view.getAutoreleased();
    15711571
    1572     if (direction == FocusDirectionForward) {
     1572    if (direction == WebCore::FocusDirectionForward) {
    15731573        // Since we're trying to move focus out of m_webView, and because
    15741574        // m_webView may contain subviews within it, we ask it for the next key
     
    36123612        if ([parameter isKindOfClass:[NSValue class]]) {
    36133613            NSRect rect = [(NSValue *)parameter rectValue];
    3614             return [NSValue valueWithRect:m_pageClient->rootViewToScreen(IntRect(rect))];
     3614            return [NSValue valueWithRect:m_pageClient->rootViewToScreen(WebCore::IntRect(rect))];
    36153615        }
    36163616    }
  • trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h

    r246157 r246224  
    3939@class WKActionSheetAssistant;
    4040@class _WKActivatedElementInfo;
     41@class _WKElementAction;
    4142@protocol WKActionSheetDelegate;
    4243
     
    7778- (void)cleanupSheet;
    7879- (void)updateSheetPosition;
    79 - (RetainPtr<NSArray>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo;
    80 - (RetainPtr<NSArray>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo;
     80- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo;
     81- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo;
    8182- (BOOL)isShowingSheet;
    8283- (void)interactionDidStartWithPositionInformation:(const WebKit::InteractionInformationAtPosition&)information;
  • trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm

    r246157 r246224  
    530530}
    531531
    532 - (RetainPtr<NSArray>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo
     532- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo
    533533{
    534534    NSURL *targetURL = [elementInfo URL];
     
    557557}
    558558
    559 - (RetainPtr<NSArray>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo
     559- (RetainPtr<NSArray<_WKElementAction *>>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo
    560560{
    561561    NSURL *targetURL = [elementInfo URL];
  • trunk/Source/WebKit/UIProcess/ios/WKContentView.h

    r246157 r246224  
    5555@package
    5656    RefPtr<WebKit::WebPageProxy> _page;
    57     WKWebView *_webView;
     57    WKWebView *_webView; // FIXME: This should be made a WeakObjCPtr once everything that refers to it is moved to OpenSource.
    5858}
    5959
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r246213 r246224  
    4343#import "UIKitSPI.h"
    4444#import "WKActionSheetAssistant.h"
     45#import "WKContextMenuElementInfoInternal.h"
    4546#import "WKDatePickerViewController.h"
    4647#import "WKDrawingCoordinator.h"
     
    75207521            if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForAnimatedImageAtURL:defaultActions:elementInfo:imageSize:)]) {
    75217522                RetainPtr<NSArray> actions = [_actionSheetAssistant defaultActionsForImageSheet:animatedImageElementInfo.get()];
     7523                ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    75227524                return [uiDelegate _webView:_webView previewViewControllerForAnimatedImageAtURL:targetURL defaultActions:actions.get() elementInfo:animatedImageElementInfo.get() imageSize:_positionInformation.image->size()];
     7525                ALLOW_DEPRECATED_DECLARATIONS_END
    75237526            }
    75247527        }
     
    75427545        }
    75437546
     7547        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    75447548        if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:defaultActions:elementInfo:)])
    75457549            return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL defaultActions:actions.get() elementInfo:elementInfo.get()];
     
    75477551        if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:)])
    75487552            return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL];
     7553        ALLOW_DEPRECATED_DECLARATIONS_END
     7554
    75497555        return nil;
    75507556    }
     
    75677573        _page->startInteractionWithElementAtPosition(_positionInformation.request.point);
    75687574
     7575        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    75697576        if ([uiDelegate respondsToSelector:@selector(_webView:willPreviewImageWithURL:)])
    75707577            [uiDelegate _webView:_webView willPreviewImageWithURL:targetURL];
     7578        ALLOW_DEPRECATED_DECLARATIONS_END
    75717579
    75727580        auto defaultActions = [_actionSheetAssistant defaultActionsForImageSheet:elementInfo.get()];
    75737581        if (imageInfo && [uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForImage:alternateURL:defaultActions:elementInfo:)]) {
     7582            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    75747583            UIViewController *previewViewController = [uiDelegate _webView:_webView previewViewControllerForImage:uiImage.get() alternateURL:alternateURL.get() defaultActions:defaultActions.get() elementInfo:elementInfo.get()];
     7584            ALLOW_DEPRECATED_DECLARATIONS_END
    75757585            if (previewViewController)
    75767586                return previewViewController;
     
    75917601            if (imageURL.isEmpty() || !(imageURL.protocolIsInHTTPFamily() || imageURL.protocolIs("data")))
    75927602                return;
     7603            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    75937604            [uiDelegate _webView:_webView commitPreviewedImageWithURL:(NSURL *)imageURL];
     7605            ALLOW_DEPRECATED_DECLARATIONS_END
    75947606            return;
    75957607        }
     
    76057617
    76067618    if ([uiDelegate respondsToSelector:@selector(_webView:commitPreviewedViewController:)]) {
     7619        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    76077620        [uiDelegate _webView:_webView commitPreviewedViewController:viewController];
     7621        ALLOW_DEPRECATED_DECLARATIONS_END
    76087622        return;
    76097623    }
     
    76297643{
    76307644    id<WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]);
     7645    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    76317646    if ([uiDelegate respondsToSelector:@selector(_webView:didDismissPreviewViewController:committing:)])
    76327647        [uiDelegate _webView:_webView didDismissPreviewViewController:viewController committing:committing];
    76337648    else if ([uiDelegate respondsToSelector:@selector(_webView:didDismissPreviewViewController:)])
    76347649        [uiDelegate _webView:_webView didDismissPreviewViewController:viewController];
    7635    
     7650    ALLOW_DEPRECATED_DECLARATIONS_END
     7651
    76367652    [_webView _didDismissForcePressPreview];
    76377653}
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r246157 r246224  
    10751075                5C5D238C227A2CDA000B9BDA /* _WKCustomHeaderFields.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C5D2389227A1892000B9BDA /* _WKCustomHeaderFields.h */; settings = {ATTRIBUTES = (Private, ); }; };
    10761076                5C62FDF91EFC271C00CE072E /* WKURLSchemeTaskPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C62FDF81EFC263C00CE072E /* WKURLSchemeTaskPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1077                5C795D70229F373F003FF1C4 /* WKContextMenuElementInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
     1078                5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    10771079                5C7FB47021E97DC5009E3241 /* WebCookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7FB46F21E97C0C009E3241 /* WebCookieJar.h */; };
    10781080                5C8BC797218CBB4800813886 /* SafeBrowsing.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5C8BC796218CB58A00813886 /* SafeBrowsing.xcassets */; };
     
    35773579                5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleListStoreInternal.h; sourceTree = "<group>"; };
    35783580                5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentRuleListStorePrivate.h; sourceTree = "<group>"; };
     3581                5CE0C366229F2D3D003695F0 /* APIContextMenuElementInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIContextMenuElementInfo.cpp; sourceTree = "<group>"; };
     3582                5CE0C367229F2D3E003695F0 /* APIContextMenuElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIContextMenuElementInfo.h; sourceTree = "<group>"; };
     3583                5CE0C368229F2D4A003695F0 /* WKContextMenuElementInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContextMenuElementInfo.mm; sourceTree = "<group>"; };
     3584                5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfo.h; sourceTree = "<group>"; };
     3585                5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfoPrivate.h; sourceTree = "<group>"; };
     3586                5CE0C36B229F2D4B003695F0 /* WKContextMenuElementInfoInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuElementInfoInternal.h; sourceTree = "<group>"; };
    35793587                5CE85B1F1C88E6430070BFCE /* PingLoad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingLoad.h; sourceTree = "<group>"; };
    35803588                5CE9120B2293C1E0005BEC78 /* WKMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKMain.h; sourceTree = "<group>"; };
     
    62586266                                5CD2864F1E722F440094FDC8 /* WKContentRuleListStoreInternal.h */,
    62596267                                5CD286501E722F440094FDC8 /* WKContentRuleListStorePrivate.h */,
     6268                                5CE0C369229F2D4A003695F0 /* WKContextMenuElementInfo.h */,
     6269                                5CE0C368229F2D4A003695F0 /* WKContextMenuElementInfo.mm */,
     6270                                5CE0C36B229F2D4B003695F0 /* WKContextMenuElementInfoInternal.h */,
     6271                                5CE0C36A229F2D4A003695F0 /* WKContextMenuElementInfoPrivate.h */,
    62606272                                1AF4592D19464B2000F9D4A2 /* WKError.h */,
    62616273                                1AF4592C19464B2000F9D4A2 /* WKError.mm */,
     
    77247736                                7C3A06A61AAB903E009D74BA /* APIContentRuleListStore.h */,
    77257737                                076E884D1A13CADF005E90FC /* APIContextMenuClient.h */,
     7738                                5CE0C366229F2D3D003695F0 /* APIContextMenuElementInfo.cpp */,
     7739                                5CE0C367229F2D3E003695F0 /* APIContextMenuElementInfo.h */,
    77267740                                5C5D238A227A1D9B000B9BDA /* APICustomHeaderFields.h */,
    77277741                                7A821F4F1E2F7A5C00604577 /* APICustomProtocolManagerClient.h */,
     
    99009914                                1A445BA1184D5FC1004B3414 /* WKContextHistoryClient.h in Headers */,
    99019915                                1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */,
     9916                                5C795D70229F373F003FF1C4 /* WKContextMenuElementInfo.h in Headers */,
     9917                                5C795D71229F3757003FF1C4 /* WKContextMenuElementInfoPrivate.h in Headers */,
    99029918                                51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */,
    99039919                                51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */,
Note: See TracChangeset for help on using the changeset viewer.