Changeset 290211 in webkit


Ignore:
Timestamp:
Feb 19, 2022 11:24:02 AM (2 years ago)
Author:
Wenson Hsieh
Message:

[macOS] Hovering over "Copy Cropped Image" context menu item should reveal the cropped image
https://bugs.webkit.org/show_bug.cgi?id=236845
rdar://89152746

Reviewed by Dean Jackson.

Add support for revealing the "cropped" region of an image element (while dimming out the rest of the image)
when the user highlights the new "Copy Cropped Image" context menu item on macOS. See below for more details.

  • Platform/cocoa/TextRecognitionUtilities.h:

Adjust requestImageAnalysisMarkup to take a completion handler with both the resulting CGImageRef, as well as
a CGRect that represents the frame of the cropped image with respect to the source image, normalized to the unit
square. Additionally, tweak all call sites of requestImageAnalysisMarkup to pass in completion handlers that
accept both arguments.

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):

  • Shared/ContextMenuContextData.h:

(WebKit::ContextMenuContextData::hitTestedElementContext const):

Add an optional ElementContext representing the inner hit-tested element for the context menu. We use this below
in WebPageProxy::willHighlightContextMenuItem to know where we need to install the cropped image overlay.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didDismissContextMenu):

Reset the cached cropped image result as well as the cropped image overlay state when the context menu is
dismissed.

(WebKit::WebPageProxy::resetStateAfterProcessExited):

Also clear the above state if the process crashes.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):
(-[WKContentView actionSheetAssistant:copyCroppedImage:sourceMIMEType:]):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(-[WKMenuDelegate menu:willHighlightItem:]):

Implement this NSMenu delegate method and call out to WebPageProxy whenever the highlighted context menu item
changes. See below for more details.

(WebKit::WebContextMenuProxyMac::applyMarkupToControlledImage):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::willHighlightContextMenuItem):

This method coordinates showing or hiding the cropped image overlay when the user highlights (but does not yet
select) the "Copy Cropped Image" context menu item. When the user first highlights this item, we trigger an
analysis request in VisionKit; when we later obtain the results, we send the image to the web process as TIFF
data, and inject it into the image using ImageOverlay::CroppedImage::install. Un-highlighting and re-
highlighting the menu item then respectively hides and shows the cropped image overlay by setting visibility.

(WebKit::WebPageProxy::handleContextMenuCopyCroppedImage):

Adjust this to use the cached m_croppedImageResult if it has already been computed.

  • WebProcess/WebPage/WebContextMenu.cpp:

(WebKit::WebContextMenu::show):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didDismissContextMenu):

Destroy the m_croppedImageOverlay after the context menu is dismissed (which uninstalls the cropped image
overlay in the process).

(WebKit::WebPage::installCroppedImageOverlay):
(WebKit::WebPage::setCroppedImageOverlayVisibility):

Add methods to install and toggle the visibility of the cropped image overlay.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
Location:
trunk/Source/WebKit
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r290203 r290211  
     12022-02-19  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [macOS] Hovering over "Copy Cropped Image" context menu item should reveal the cropped image
     4        https://bugs.webkit.org/show_bug.cgi?id=236845
     5        rdar://89152746
     6
     7        Reviewed by Dean Jackson.
     8
     9        Add support for revealing the "cropped" region of an image element (while dimming out the rest of the image)
     10        when the user highlights the new "Copy Cropped Image" context menu item on macOS. See below for more details.
     11
     12        * Platform/cocoa/TextRecognitionUtilities.h:
     13
     14        Adjust `requestImageAnalysisMarkup` to take a completion handler with both the resulting CGImageRef, as well as
     15        a CGRect that represents the frame of the cropped image with respect to the source image, normalized to the unit
     16        square. Additionally, tweak all call sites of `requestImageAnalysisMarkup` to pass in completion handlers that
     17        accept both arguments.
     18
     19        * Shared/ContextMenuContextData.cpp:
     20        (WebKit::ContextMenuContextData::ContextMenuContextData):
     21        (WebKit::ContextMenuContextData::encode const):
     22        (WebKit::ContextMenuContextData::decode):
     23        * Shared/ContextMenuContextData.h:
     24        (WebKit::ContextMenuContextData::hitTestedElementContext const):
     25
     26        Add an optional ElementContext representing the inner hit-tested element for the context menu. We use this below
     27        in `WebPageProxy::willHighlightContextMenuItem` to know where we need to install the cropped image overlay.
     28
     29        * UIProcess/WebPageProxy.cpp:
     30        (WebKit::WebPageProxy::didDismissContextMenu):
     31
     32        Reset the cached cropped image result as well as the cropped image overlay state when the context menu is
     33        dismissed.
     34
     35        (WebKit::WebPageProxy::resetStateAfterProcessExited):
     36
     37        Also clear the above state if the process crashes.
     38
     39        * UIProcess/WebPageProxy.h:
     40        * UIProcess/ios/WKContentViewInteraction.mm:
     41        (-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):
     42        (-[WKContentView actionSheetAssistant:copyCroppedImage:sourceMIMEType:]):
     43        * UIProcess/mac/WebContextMenuProxyMac.mm:
     44        (-[WKMenuDelegate menu:willHighlightItem:]):
     45
     46        Implement this NSMenu delegate method and call out to WebPageProxy whenever the highlighted context menu item
     47        changes. See below for more details.
     48
     49        (WebKit::WebContextMenuProxyMac::applyMarkupToControlledImage):
     50        * UIProcess/mac/WebPageProxyMac.mm:
     51        (WebKit::WebPageProxy::willHighlightContextMenuItem):
     52
     53        This method coordinates showing or hiding the cropped image overlay when the user highlights (but does not yet
     54        select) the "Copy Cropped Image" context menu item. When the user first highlights this item, we trigger an
     55        analysis request in VisionKit; when we later obtain the results, we send the image to the web process as TIFF
     56        data, and inject it into the image using `ImageOverlay::CroppedImage::install`. Un-highlighting and re-
     57        highlighting the menu item then respectively hides and shows the cropped image overlay by setting visibility.
     58
     59        (WebKit::WebPageProxy::handleContextMenuCopyCroppedImage):
     60
     61        Adjust this to use the cached `m_croppedImageResult` if it has already been computed.
     62
     63        * WebProcess/WebPage/WebContextMenu.cpp:
     64        (WebKit::WebContextMenu::show):
     65        * WebProcess/WebPage/WebPage.cpp:
     66        (WebKit::WebPage::didDismissContextMenu):
     67
     68        Destroy the `m_croppedImageOverlay` after the context menu is dismissed (which uninstalls the cropped image
     69        overlay in the process).
     70
     71        (WebKit::WebPage::installCroppedImageOverlay):
     72        (WebKit::WebPage::setCroppedImageOverlayVisibility):
     73
     74        Add methods to install and toggle the visibility of the cropped image overlay.
     75
     76        * WebProcess/WebPage/WebPage.h:
     77        * WebProcess/WebPage/WebPage.messages.in:
     78
    1792022-02-19  Kimmo Kinnunen  <kkinnunen@apple.com>
    280
  • trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.h

    r289623 r290211  
    6060#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
    6161void requestImageAnalysisWithIdentifier(CocoaImageAnalyzer *, const String& identifier, CGImageRef, CompletionHandler<void(WebCore::TextRecognitionResult&&)>&&);
    62 void requestImageAnalysisMarkup(CGImageRef, CompletionHandler<void(CGImageRef)>&&);
     62void requestImageAnalysisMarkup(CGImageRef, CompletionHandler<void(CGImageRef, CGRect)>&&);
    6363#endif
    6464
  • trunk/Source/WebKit/Shared/ContextMenuContextData.cpp

    r289882 r290211  
    4444}
    4545
    46 ContextMenuContextData::ContextMenuContextData(const WebCore::IntPoint& menuLocation, const Vector<WebKit::WebContextMenuItemData>& menuItems, const ContextMenuContext& context)
     46ContextMenuContextData::ContextMenuContextData(const IntPoint& menuLocation, std::optional<ElementContext>&& hitTestedElementContext, const Vector<WebKit::WebContextMenuItemData>& menuItems, const ContextMenuContext& context)
    4747#if ENABLE(SERVICE_CONTROLS)
    4848    : m_type(context.controlledImage() ? Type::ServicesMenu : context.type())
     
    5151#endif
    5252    , m_menuLocation(menuLocation)
     53    , m_hitTestedElementContext(WTFMove(hitTestedElementContext))
    5354    , m_menuItems(menuItems)
    5455    , m_webHitTestResultData({ context.hitTestResult(), true })
     
    9596    encoder << m_type;
    9697    encoder << m_menuLocation;
     98    encoder << m_hitTestedElementContext;
    9799    encoder << m_menuItems;
    98100    encoder << m_webHitTestResultData;
     
    120122
    121123    if (!decoder.decode(result.m_menuLocation))
     124        return false;
     125
     126    if (!decoder.decode(result.m_hitTestedElementContext))
    122127        return false;
    123128
  • trunk/Source/WebKit/Shared/ContextMenuContextData.h

    r289882 r290211  
    4747
    4848    ContextMenuContextData();
    49     ContextMenuContextData(const WebCore::IntPoint& menuLocation, const Vector<WebKit::WebContextMenuItemData>& menuItems, const WebCore::ContextMenuContext&);
     49    ContextMenuContextData(const WebCore::IntPoint& menuLocation, std::optional<WebCore::ElementContext>&& hitTestedElementContext, const Vector<WebKit::WebContextMenuItemData>& menuItems, const WebCore::ContextMenuContext&);
    5050
    5151    Type type() const { return m_type; }
     
    5353    const Vector<WebKit::WebContextMenuItemData>& menuItems() const { return m_menuItems; }
    5454
     55    std::optional<WebCore::ElementContext> hitTestedElementContext() const { return m_hitTestedElementContext; }
    5556    const std::optional<WebHitTestResultData>& webHitTestResultData() const { return m_webHitTestResultData; }
    5657    const String& selectedText() const { return m_selectedText; }
     
    8788
    8889    WebCore::IntPoint m_menuLocation;
     90    std::optional<WebCore::ElementContext> m_hitTestedElementContext;
    8991    Vector<WebKit::WebContextMenuItemData> m_menuItems;
    9092
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r290186 r290211  
    70067006
    70077007    pageClient().didDismissContextMenu();
     7008
     7009#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     7010    m_croppedImageResult = { };
     7011    m_croppedImageOverlayState = CroppedImageOverlayState::Inactive;
     7012#endif
    70087013}
    70097014
     
    81398144    m_fullscreenVideoExtractionTimer.stop();
    81408145    m_currentFullscreenVideoSessionIdentifier = std::nullopt;
     8146#endif
     8147
     8148#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     8149    m_croppedImageResult = { };
     8150    m_croppedImageOverlayState = CroppedImageOverlayState::Inactive;
    81418151#endif
    81428152
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r290186 r290211  
    13721372    void contextMenuItemSelected(const WebContextMenuItemData&);
    13731373    void handleContextMenuKeyEvent();
     1374    void willHighlightContextMenuItem(WebCore::ContextMenuAction);
    13741375#endif
    13751376
     
    32123213    RunLoop::Timer<WebPageProxy> m_fullscreenVideoExtractionTimer;
    32133214#endif
     3215
     3216#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     3217    enum class CroppedImageOverlayState : uint8_t {
     3218        Inactive,
     3219        Analyzing,
     3220        Hidden,
     3221        Showing,
     3222    };
     3223    WebCore::PlatformImagePtr m_croppedImageResult;
     3224    CroppedImageOverlayState m_croppedImageOverlayState { CroppedImageOverlayState::Inactive };
     3225#endif // ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
    32143226};
    32153227
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r290009 r290211  
    47664766        }
    47674767
    4768         WebKit::requestImageAnalysisMarkup(cgImage.get(), [sourceMIMEType, context, completion = WTFMove(completion), weakSelf](CGImageRef result) mutable {
     4768        WebKit::requestImageAnalysisMarkup(cgImage.get(), [sourceMIMEType, context, completion = WTFMove(completion), weakSelf](CGImageRef result, CGRect) mutable {
    47694769            auto strongSelf = weakSelf.get();
    47704770            if (!strongSelf) {
     
    1090410904{
    1090510905    auto changeCount = UIPasteboard.generalPasteboard.changeCount;
    10906     WebKit::requestImageAnalysisMarkup(image.CGImage, [changeCount, weakSelf = WeakObjCPtr<WKContentView>(self), originalImage = RetainPtr { image }, sourceMIMEType = RetainPtr { sourceMIMEType }](CGImageRef result) mutable {
     10906    WebKit::requestImageAnalysisMarkup(image.CGImage, [changeCount, weakSelf = WeakObjCPtr<WKContentView>(self), originalImage = RetainPtr { image }, sourceMIMEType = RetainPtr { sourceMIMEType }](CGImageRef result, CGRect) mutable {
    1090710907        auto strongSelf = weakSelf.get();
    1090810908        if (!strongSelf)
  • trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm

    r290103 r290211  
    187187}
    188188
     189- (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item
     190{
     191    _menuProxy->page()->willHighlightContextMenuItem(static_cast<WebCore::ContextMenuAction>(item.tag));
     192}
     193
    189194@end
    190195
     
    344349        return;
    345350
    346     requestImageAnalysisMarkup(image.get(), [weakPage = WeakPtr { page() }, preferredMIMEType = m_context.controlledImageMIMEType(), elementContext = WTFMove(*elementContext)](CGImageRef result) {
     351    requestImageAnalysisMarkup(image.get(), [weakPage = WeakPtr { page() }, preferredMIMEType = m_context.controlledImageMIMEType(), elementContext = WTFMove(*elementContext)](CGImageRef result, CGRect) {
    347352        RefPtr protectedPage = weakPage.get();
    348353        if (!protectedPage || !result)
  • trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm

    r289851 r290211  
    776776#endif // ENABLE(IMAGE_ANALYSIS)
    777777
     778void WebPageProxy::willHighlightContextMenuItem(ContextMenuAction action)
     779{
    778780#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     781    if (action != ContextMenuItemTagCopyCroppedImage) {
     782        if (m_croppedImageOverlayState == CroppedImageOverlayState::Showing) {
     783            m_croppedImageOverlayState = CroppedImageOverlayState::Hidden;
     784            send(Messages::WebPage::SetCroppedImageOverlayVisibility(false));
     785        }
     786        return;
     787    }
     788
     789    if (m_croppedImageOverlayState == CroppedImageOverlayState::Hidden) {
     790        m_croppedImageOverlayState = CroppedImageOverlayState::Showing;
     791        send(Messages::WebPage::SetCroppedImageOverlayVisibility(true));
     792        return;
     793    }
     794
     795    if (m_croppedImageOverlayState != CroppedImageOverlayState::Inactive)
     796        return;
     797
     798    auto elementContext = m_activeContextMenuContextData.hitTestedElementContext();
     799    if (!elementContext)
     800        return;
     801
     802    auto& hitTestData = m_activeContextMenuContextData.webHitTestResultData().value();
     803    auto imageBitmap = hitTestData.imageBitmap;
     804    if (!imageBitmap)
     805        return;
     806
     807    auto image = imageBitmap->makeCGImageCopy();
     808    if (!image)
     809        return;
     810
     811    m_croppedImageOverlayState = CroppedImageOverlayState::Analyzing;
     812
     813    requestImageAnalysisMarkup(image.get(), [weakPage = WeakPtr { *this }, elementContext = WTFMove(*elementContext)](CGImageRef resultImage, CGRect normalizedCropRect) {
     814        if (!resultImage || CGRectIsEmpty(normalizedCropRect))
     815            return;
     816
     817        RefPtr protectedPage = weakPage.get();
     818        if (!protectedPage)
     819            return;
     820
     821        protectedPage->m_croppedImageResult = resultImage;
     822
     823        if (protectedPage->m_croppedImageOverlayState != CroppedImageOverlayState::Analyzing)
     824            return;
     825
     826        auto tiffData = transcode(resultImage, (__bridge CFStringRef)UTTypeTIFF.identifier);
     827        if (!tiffData)
     828            return;
     829
     830        auto sharedMemory = SharedMemory::allocate([tiffData length]);
     831        if (!sharedMemory)
     832            return;
     833
     834        [tiffData getBytes:sharedMemory->data() length:[tiffData length]];
     835
     836        SharedMemory::Handle handle;
     837        sharedMemory->createHandle(handle, SharedMemory::Protection::ReadOnly);
     838        protectedPage->send(Messages::WebPage::InstallCroppedImageOverlay(elementContext, { WTFMove(handle), sharedMemory->size() }, "image/tiff"_s, normalizedCropRect));
     839        protectedPage->m_croppedImageOverlayState = CroppedImageOverlayState::Showing;
     840    });
     841#else
     842    UNUSED_PARAM(action);
     843#endif
     844}
     845
     846#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
    779847
    780848void WebPageProxy::handleContextMenuCopyCroppedImage(ShareableBitmap& imageBitmap, const String& preferredMIMEType)
    781849{
    782     auto originalImage = imageBitmap.makeCGImage();
    783     if (!originalImage)
    784         return;
    785 
    786850    auto changeCount = NSPasteboard.generalPasteboard.changeCount;
    787     requestImageAnalysisMarkup(originalImage.get(), [changeCount, originalImage, preferredMIMEType](CGImageRef resultImage) {
     851    auto performCopy = [changeCount, preferredMIMEType](CGImageRef resultImage) {
    788852        auto pasteboard = NSPasteboard.generalPasteboard;
    789         if (changeCount != pasteboard.changeCount)
    790             return;
    791 
    792         auto [data, type] = WebKit::transcodeWithPreferredMIMEType(resultImage ?: originalImage.get(), preferredMIMEType.createCFString().get(), (__bridge CFStringRef)UTTypeTIFF.identifier);
     853        if (changeCount != pasteboard.changeCount || !resultImage)
     854            return;
     855
     856        auto [data, type] = transcodeWithPreferredMIMEType(resultImage, preferredMIMEType.createCFString().get(), (__bridge CFStringRef)UTTypeTIFF.identifier);
    793857        if (!data)
    794858            return;
     
    796860        [pasteboard declareTypes:@[(__bridge NSString *)type.get()] owner:nil];
    797861        [pasteboard setData:data.get() forType:(__bridge NSString *)type.get()];
     862    };
     863
     864    if (m_croppedImageResult) {
     865        performCopy(m_croppedImageResult.get());
     866        return;
     867    }
     868
     869    auto originalImage = imageBitmap.makeCGImageCopy();
     870    if (!originalImage)
     871        return;
     872
     873    requestImageAnalysisMarkup(originalImage.get(), [performCopy = WTFMove(performCopy)](auto image, auto) {
     874        performCopy(image);
    798875    });
    799876}
  • trunk/Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp

    r284142 r290211  
    6464    menuItemsWithUserData(menuItems, userData);
    6565
     66    std::optional<ElementContext> hitTestedElementContext;
     67    if (RefPtr hitTestedElement = controller.hitTestResult().innerNonSharedElement())
     68        hitTestedElementContext = m_page->contextForElement(*hitTestedElement);
     69
    6670    auto menuLocation = view->contentsToRootView(controller.hitTestResult().roundedPointInInnerNodeFrame());
    6771
    68     ContextMenuContextData contextMenuContextData(menuLocation, menuItems, controller.context());
     72    ContextMenuContextData contextMenuContextData(menuLocation, WTFMove(hitTestedElementContext), menuItems, controller.context());
    6973
    7074    // Mark the WebPage has having a shown context menu then notify the UIProcess.
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r290183 r290211  
    29062906{
    29072907    corePage()->contextMenuController().didDismissContextMenu();
     2908
     2909#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     2910    m_croppedImageOverlay = nullptr;
     2911#endif
    29082912}
    29092913
     
    77927796}
    77937797
     7798#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     7799
     7800void WebPage::installCroppedImageOverlay(const ElementContext& context, const SharedMemory::IPCHandle& imageData, const String& mimeType, FloatRect normalizedCropRect)
     7801{
     7802    auto sharedMemory = SharedMemory::map(imageData.handle, SharedMemory::Protection::ReadOnly);
     7803    if (!sharedMemory)
     7804        return;
     7805
     7806    RefPtr element = dynamicDowncast<HTMLElement>(elementForContext(context).get());
     7807    if (!element)
     7808        return;
     7809
     7810    m_croppedImageOverlay = ImageOverlay::CroppedImage::install(*element, sharedMemory->createSharedBuffer(imageData.dataSize), mimeType, normalizedCropRect);
     7811}
     7812
     7813void WebPage::setCroppedImageOverlayVisibility(bool visible)
     7814{
     7815    if (m_croppedImageOverlay)
     7816        m_croppedImageOverlay->setVisibility(visible);
     7817}
     7818
     7819#endif // ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     7820
    77947821#if ENABLE(MEDIA_CONTROLS_CONTEXT_MENUS) && USE(UICONTEXTMENU)
    77957822void WebPage::showMediaControlsContextMenu(FloatRect&& targetFrame, Vector<MediaControlsContextMenuItem>&& items, CompletionHandler<void(MediaControlsContextMenuItem::ID)>&& completionHandler)
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r290186 r290211  
    269269struct TranslationContextMenuInfo;
    270270#endif
     271
     272namespace ImageOverlay {
     273class CroppedImage;
     274}
    271275}
    272276
     
    14531457
    14541458    void requestImageBitmap(const WebCore::ElementContext&, CompletionHandler<void(const ShareableBitmap::Handle&, const String& sourceMIMEType)>&&);
     1459#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     1460    void installCroppedImageOverlay(const WebCore::ElementContext&, const SharedMemory::IPCHandle& imageData, const String& mimeType, WebCore::FloatRect normalizedCropRect);
     1461    void setCroppedImageOverlayVisibility(bool);
     1462#endif
    14551463
    14561464#if HAVE(TRANSLATION_UI_SERVICES) && ENABLE(CONTEXT_MENUS)
     
    24422450    WebCore::HighlightVisibility m_appHighlightsVisible { WebCore::HighlightVisibility::Hidden };
    24432451#endif
     2452
     2453#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     2454    std::unique_ptr<WebCore::ImageOverlay::CroppedImage> m_croppedImageOverlay;
     2455#endif
    24442456};
    24452457
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in

    r290186 r290211  
    135135    RequestImageBitmap(struct WebCore::ElementContext elementContext) -> (WebKit::ShareableBitmap::Handle image, String sourceMIMEType) Async
    136136
     137#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     138    InstallCroppedImageOverlay(struct WebCore::ElementContext elementContext, WebKit::SharedMemory::IPCHandle imageData, String mimeType, WebCore::FloatRect normalizedCropRect)
     139    SetCroppedImageOverlayVisibility(bool visible)
     140#endif
     141
    137142    SetControlledByAutomation(bool controlled)
    138143
Note: See TracChangeset for help on using the changeset viewer.