Title: [292676] trunk/Source/WebCore
- Revision
- 292676
- Author
- [email protected]
- Date
- 2022-04-08 23:29:20 -0700 (Fri, 08 Apr 2022)
Log Message
Sharing services picker menu Mail presents in the wrong place when compose web view is scrolled
https://bugs.webkit.org/show_bug.cgi?id=238672
<rdar://problem/88966924>
Reviewed by Wenson Hsieh.
Image menu is offset by the amount the view is scrolled. This patch
changes the menu location point by calculating the bottom corner of
the picker button then using contentsToWindow which handles
the scroll position offset
* dom/mac/ImageControlsMac.cpp:
(WebCore::ImageControlsMac::handleEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (292675 => 292676)
--- trunk/Source/WebCore/ChangeLog 2022-04-09 06:18:23 UTC (rev 292675)
+++ trunk/Source/WebCore/ChangeLog 2022-04-09 06:29:20 UTC (rev 292676)
@@ -1,3 +1,19 @@
+2022-04-08 Kate Cheney <[email protected]>
+
+ Sharing services picker menu Mail presents in the wrong place when compose web view is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=238672
+ <rdar://problem/88966924>
+
+ Reviewed by Wenson Hsieh.
+
+ Image menu is offset by the amount the view is scrolled. This patch
+ changes the menu location point by calculating the bottom corner of
+ the picker button then using contentsToWindow which handles
+ the scroll position offset
+
+ * dom/mac/ImageControlsMac.cpp:
+ (WebCore::ImageControlsMac::handleEvent):
+
2022-04-08 Chris Dumez <[email protected]>
Drop unused pluginReplacementScriptObject
Modified: trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp (292675 => 292676)
--- trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp 2022-04-09 06:18:23 UTC (rev 292675)
+++ trunk/Source/WebCore/dom/mac/ImageControlsMac.cpp 2022-04-09 06:29:20 UTC (rev 292676)
@@ -146,7 +146,17 @@
if (!image)
return false;
- page->chrome().client().handleImageServiceClick(roundedIntPoint(mouseEvent.absoluteLocation()), *image, *shadowHost);
+ Ref element = downcast<Element>(node);
+ auto* renderer = element->renderer();
+ if (!renderer)
+ return false;
+
+ RefPtr view = frame->view();
+ if (!view)
+ return false;
+
+ auto point = view->contentsToWindow(renderer->absoluteBoundingBoxRect()).minXMaxYCorner();
+ page->chrome().client().handleImageServiceClick(point, *image, *shadowHost);
event.setDefaultHandled();
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes