<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[286812] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/286812">286812</a></dd>
<dt>Author</dt> <dd>megan_gardner@apple.com</dd>
<dt>Date</dt> <dd>2021-12-09 15:25:50 -0800 (Thu, 09 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Markup Pane not displaying.
https://bugs.webkit.org/show_bug.cgi?id=234089

Reviewed by Tim Horton.

Source/WebCore:

Vend the image location so that the Markup Pane knows where to
present from.

* dom/mac/ImageControlsMac.cpp:
(WebCore::ImageControlsMac::handleEvent):
* page/ChromeClient.h:
(WebCore::ChromeClient::handleImageServiceClick):

Source/WebKit:

An optional method on NSSharingServiceDelegate was not implemented, meaning
that the markup pane did not know where to present, and would assert and fail to
show up. Make sure this is implemented for the image controls menu and also
give it the correct location to present form.

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::controlledImageFrame const):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
* UIProcess/mac/WKSharingServicePickerDelegate.h:
* UIProcess/mac/WKSharingServicePickerDelegate.mm:
(-[WKSharingServicePickerDelegate setSourceFrame:]):
(-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleImageServiceClick):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleImageServiceClick):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredommacImageControlsMaccpp">trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitSharedContextMenuContextDatacpp">trunk/Source/WebKit/Shared/ContextMenuContextData.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedContextMenuContextDatah">trunk/Source/WebKit/Shared/ContextMenuContextData.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWKSharingServicePickerDelegateh">trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWKSharingServicePickerDelegatemm">trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWebContextMenuProxyMacmm">trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPageh">trunk/Source/WebKit/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebCore/ChangeLog      2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2021-12-09  Megan Gardner  <megan_gardner@apple.com>
+
+        Markup Pane not displaying.
+        https://bugs.webkit.org/show_bug.cgi?id=234089
+
+        Reviewed by Tim Horton.
+
+        Vend the image location so that the Markup Pane knows where to
+        present from.
+
+        * dom/mac/ImageControlsMac.cpp:
+        (WebCore::ImageControlsMac::handleEvent):
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::handleImageServiceClick):
+
</ins><span class="cx"> 2021-12-09  Tyler Wilcock  <tyler_w@apple.com>
</span><span class="cx"> 
</span><span class="cx">         AX: Improve ASSERT while processing tree appends in AXIsolatedTree::applyPendingChanges
</span></span></pre></div>
<a id="trunkSourceWebCoredommacImageControlsMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp        2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp   2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">         if (!imageElement)
</span><span class="cx">             return false;
</span><span class="cx">         if (auto* image = imageFromImageElementNode(*imageElement)) {
</span><del>-            page->chrome().client().handleImageServiceClick(roundedIntPoint(mouseEvent.absoluteLocation()), *image, imageElement->isContentEditable());
</del><ins>+            page->chrome().client().handleImageServiceClick(roundedIntPoint(mouseEvent.absoluteLocation()), *image, imageElement->isContentEditable(), imageElement->renderBox()->absoluteContentQuad().enclosingBoundingBox());
</ins><span class="cx">             event.setDefaultHandled();
</span><span class="cx">             return true;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h 2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebCore/page/ChromeClient.h    2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -532,7 +532,7 @@
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="cx">     virtual void handleSelectionServiceClick(FrameSelection&, const Vector<String>&, const IntPoint&) { }
</span><span class="cx">     virtual bool hasRelevantSelectionServices(bool /*isTextOnly*/) const { return false; }
</span><del>-    virtual void handleImageServiceClick(const IntPoint&, Image&, bool /*isEditable*/) { }
</del><ins>+    virtual void handleImageServiceClick(const IntPoint&, Image&, bool /*isEditable*/, const IntRect&) { }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldDispatchFakeMouseMoveEvents() const { return true; }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/ChangeLog       2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2021-12-09  Megan Gardner  <megan_gardner@apple.com>
+
+        Markup Pane not displaying.
+        https://bugs.webkit.org/show_bug.cgi?id=234089
+
+        Reviewed by Tim Horton.
+
+        An optional method on NSSharingServiceDelegate was not implemented, meaning
+        that the markup pane did not know where to present, and would assert and fail to
+        show up. Make sure this is implemented for the image controls menu and also 
+        give it the correct location to present form.
+
+        * Shared/ContextMenuContextData.cpp:
+        (WebKit::ContextMenuContextData::ContextMenuContextData):
+        (WebKit::ContextMenuContextData::encode const):
+        (WebKit::ContextMenuContextData::decode):
+        * Shared/ContextMenuContextData.h:
+        (WebKit::ContextMenuContextData::controlledImageFrame const):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        * UIProcess/mac/WKSharingServicePickerDelegate.h:
+        * UIProcess/mac/WKSharingServicePickerDelegate.mm:
+        (-[WKSharingServicePickerDelegate setSourceFrame:]):
+        (-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
+        * UIProcess/mac/WebContextMenuProxyMac.mm:
+        (WebKit::WebContextMenuProxyMac::setupServicesMenu):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::handleImageServiceClick):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::handleImageServiceClick):
+
</ins><span class="cx"> 2021-12-09  Tim Horton  <timothy_horton@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
</span></span></pre></div>
<a id="trunkSourceWebKitSharedContextMenuContextDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/ContextMenuContextData.cpp (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/ContextMenuContextData.cpp    2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/Shared/ContextMenuContextData.cpp       2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -67,10 +67,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><del>-ContextMenuContextData::ContextMenuContextData(const WebCore::IntPoint& menuLocation, WebCore::Image& image, bool isEditable)
</del><ins>+ContextMenuContextData::ContextMenuContextData(const WebCore::IntPoint& menuLocation, WebCore::Image& image, bool isEditable, const WebCore::IntRect& imageRect)
</ins><span class="cx">     : m_type(Type::ServicesMenu)
</span><span class="cx">     , m_menuLocation(menuLocation)
</span><span class="cx">     , m_selectionIsEditable(isEditable)
</span><ins>+    , m_controlledImageBounds(imageRect)
</ins><span class="cx"> {
</span><span class="cx">     setImage(&image);
</span><span class="cx"> }
</span><span class="lines">@@ -102,6 +103,7 @@
</span><span class="cx">     encoder << m_controlledSelectionData;
</span><span class="cx">     encoder << m_selectedTelephoneNumbers;
</span><span class="cx">     encoder << m_selectionIsEditable;
</span><ins>+    encoder << m_controlledImageBounds;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -136,6 +138,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_selectionIsEditable))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_controlledImageBounds))
+        return false;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebKitSharedContextMenuContextDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/ContextMenuContextData.h (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/ContextMenuContextData.h      2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/Shared/ContextMenuContextData.h 2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    ContextMenuContextData(const WebCore::IntPoint& menuLocation, WebCore::Image&, bool isEditable);
</del><ins>+    ContextMenuContextData(const WebCore::IntPoint& menuLocation, WebCore::Image&, bool isEditable, const WebCore::IntRect& imageRect);
</ins><span class="cx"> 
</span><span class="cx">     ShareableBitmap* controlledImage() const { return m_controlledImage.get(); }
</span><span class="cx">     const Vector<uint8_t>& controlledSelectionData() const { return m_controlledSelectionData; }
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool isServicesMenu() const { return m_type == ContextMenuContextData::Type::ServicesMenu; }
</span><span class="cx">     bool controlledDataIsEditable() const;
</span><ins>+    WebCore::IntRect controlledImageBounds() const { return m_controlledImageBounds; };
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void encode(IPC::Encoder&) const;
</span><span class="lines">@@ -93,6 +94,7 @@
</span><span class="cx">     Vector<uint8_t> m_controlledSelectionData;
</span><span class="cx">     Vector<String> m_selectedTelephoneNumbers;
</span><span class="cx">     bool m_selectionIsEditable;
</span><ins>+    WebCore::IntRect m_controlledImageBounds;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWKSharingServicePickerDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.h (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.h       2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.h  2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx">     RetainPtr<NSSharingServicePicker> _picker;
</span><span class="cx">     BOOL _filterEditingServices;
</span><span class="cx">     BOOL _handleEditingReplacement;
</span><ins>+    NSRect _sourceFrame;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> + (WKSharingServicePickerDelegate *)sharedSharingServicePickerDelegate;
</span><span class="lines">@@ -46,6 +47,8 @@
</span><span class="cx"> - (void)setPicker:(NSSharingServicePicker *)picker;
</span><span class="cx"> - (void)setFiltersEditingServices:(BOOL)filtersEditingServices;
</span><span class="cx"> - (void)setHandlesEditingReplacement:(BOOL)handlesEditingReplacement;
</span><ins>+- (void)setSourceFrame:(NSRect)sourceFrame;
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SERVICE_CONTROLS)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWKSharingServicePickerDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm      2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/UIProcess/mac/WKSharingServicePickerDelegate.mm 2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -70,6 +70,11 @@
</span><span class="cx">     _handleEditingReplacement = handlesEditingReplacement;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)setSourceFrame:(NSRect)sourceFrame
+{
+    _sourceFrame = sourceFrame;
+}
+
</ins><span class="cx"> - (NSArray *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items mask:(NSSharingServiceMask)mask proposedSharingServices:(NSArray *)proposedServices
</span><span class="cx"> {
</span><span class="cx">     if (!_filterEditingServices)
</span><span class="lines">@@ -90,6 +95,11 @@
</span><span class="cx">     return self;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NSRect)sharingService:(NSSharingService *)sharingService sourceFrameOnScreenForShareItem:(id <NSPasteboardWriting>)item
+{
+    return _sourceFrame;
+}
+
</ins><span class="cx"> - (void)sharingService:(NSSharingService *)sharingService willShareItems:(NSArray *)items
</span><span class="cx"> {
</span><span class="cx">     _menuProxy->clearServicesMenu();
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWebContextMenuProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm      2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm 2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -238,6 +238,11 @@
</span><span class="cx">     [[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate] setPicker:picker.get()];
</span><span class="cx">     [[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate] setFiltersEditingServices:!includeEditorServices];
</span><span class="cx">     [[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate] setHandlesEditingReplacement:includeEditorServices];
</span><ins>+    
+    NSRect imageRect = m_context.controlledImageBounds();
+    imageRect = [m_webView convertRect:imageRect toView:nil];
+    imageRect = [[m_webView window] convertRectToScreen:imageRect];
+    [[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate] setSourceFrame:imageRect];
</ins><span class="cx"> 
</span><span class="cx">     m_menu = adoptNS([[picker menu] copy]);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp        2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp   2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -1347,9 +1347,9 @@
</span><span class="cx">     return (isTextOnly && WebProcess::singleton().hasSelectionServices()) || WebProcess::singleton().hasRichContentServices();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebChromeClient::handleImageServiceClick(const IntPoint& point, Image& image, bool isEditable)
</del><ins>+void WebChromeClient::handleImageServiceClick(const IntPoint& point, Image& image, bool isEditable, const IntRect& imageRect)
</ins><span class="cx"> {
</span><del>-    m_page.handleImageServiceClick(point, image, isEditable);
</del><ins>+    m_page.handleImageServiceClick(point, image, isEditable, imageRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h  2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h     2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -381,7 +381,7 @@
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="cx">     void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&) final;
</span><span class="cx">     bool hasRelevantSelectionServices(bool isTextOnly) const final;
</span><del>-    void handleImageServiceClick(const WebCore::IntPoint&, WebCore::Image&, bool isEditable) final;
</del><ins>+    void handleImageServiceClick(const WebCore::IntPoint&, WebCore::Image&, bool isEditable, const WebCore::IntRect&) final;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool shouldDispatchFakeMouseMoveEvents() const final;
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h    2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -1203,7 +1203,7 @@
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
</span><span class="cx">     void handleTelephoneNumberClick(const String& number, const WebCore::IntPoint&);
</span><span class="cx">     void handleSelectionServiceClick(WebCore::FrameSelection&, const Vector<String>& telephoneNumbers, const WebCore::IntPoint&);
</span><del>-    void handleImageServiceClick(const WebCore::IntPoint&, WebCore::Image&, bool isEditable);
</del><ins>+    void handleImageServiceClick(const WebCore::IntPoint&, WebCore::Image&, bool isEditable, const WebCore::IntRect&);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void didChangeScrollOffsetForFrame(WebCore::Frame*);
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (286811 => 286812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2021-12-09 23:20:39 UTC (rev 286811)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm    2021-12-09 23:25:50 UTC (rev 286812)
</span><span class="lines">@@ -828,9 +828,9 @@
</span><span class="cx">     send(Messages::WebPageProxy::ShowContextMenu(ContextMenuContextData(point, selectionDataVector, phoneNumbers, selection.selection().isContentEditable()), UserData()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::handleImageServiceClick(const IntPoint& point, Image& image, bool isEditable)
</del><ins>+void WebPage::handleImageServiceClick(const IntPoint& point, Image& image, bool isEditable, const IntRect& imageRect)
</ins><span class="cx"> {
</span><del>-    send(Messages::WebPageProxy::ShowContextMenu(ContextMenuContextData(point, image, isEditable), UserData()));
</del><ins>+    send(Messages::WebPageProxy::ShowContextMenu(ContextMenuContextData(point, image, isEditable, imageRect), UserData()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>