WebKit Bugzilla
Attachment 369255 Details for
Bug 197649
: iOSMac Share Sheet shows up at the wrong place
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197649-20190507011757.patch (text/plain), 3.05 KB, created by
Tim Horton
on 2019-05-07 01:17:58 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-05-07 01:17:58 PDT
Size:
3.05 KB
patch
obsolete
>Subversion Revision: 244966 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index c7fe70b3fbeb31c435e1db53999dde573ddfdab8..7442d4a5a259e35a6695d0422d75a3e2d871482b 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-07 Tim Horton <timothy_horton@apple.com> >+ >+ iOSMac Share Sheet shows up at the wrong place >+ https://bugs.webkit.org/show_bug.cgi?id=197649 >+ <rdar://problem/50295563> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/ios/WKContentViewInteraction.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView _showShareSheet:inRect:completionHandler:]): >+ (-[WKContentView _hoverGestureRecognizerChanged:]): >+ Pass the last mouse-over location as the presentation location for the >+ share sheet, if we don't have a rect to present from. Centering the popover >+ like we do on iPad doesn't work so well (at all) with a macOS context menu. >+ > 2019-05-06 Wenson Hsieh <wenson_hsieh@apple.com> > > Introduce SPI to request modern compatibility mode but defer to site-specific quirks >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >index 05a05b0e68cfa050bc5503fcb0a3c0b1def76b31..799e2d7226fb010d78920a490d1372d963252937 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >@@ -230,6 +230,7 @@ struct WKAutoCorrectionData { > #if PLATFORM(IOSMAC) > RetainPtr<UIHoverGestureRecognizer> _hoverGestureRecognizer; > RetainPtr<_UILookupGestureRecognizer> _lookupGestureRecognizer; >+ CGPoint _lastHoverLocation; > #endif > > RetainPtr<UIWKTextInteractionAssistant> _textSelectionAssistant; >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 12e8f3da0113f288e7df4e77836dd11c0dba9278..e62f7374f27e21fce0d02f6ae74eac3b15a525ff 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -5830,6 +5830,13 @@ - (void)_showShareSheet:(const WebCore::ShareDataWithParsedURL&)data inRect:(WTF > > _shareSheet = adoptNS([[WKShareSheet alloc] initWithView:_webView]); > [_shareSheet setDelegate:self]; >+ >+#if PLATFORM(IOSMAC) >+ if (!rect) { >+ auto hoverLocationInWebView = [self convertPoint:_lastHoverLocation toView:_webView]; >+ rect = WebCore::FloatRect(hoverLocationInWebView.x, hoverLocationInWebView.y, 1, 1); >+ } >+#endif > > [_shareSheet presentWithParameters:data inRect:rect completionHandler:WTFMove(completionHandler)]; > #endif >@@ -7041,6 +7048,7 @@ - (void)_hoverGestureRecognizerChanged:(UIGestureRecognizer *)gestureRecognizer > case UIGestureRecognizerStateBegan: > case UIGestureRecognizerStateChanged: > point = [gestureRecognizer locationInView:self]; >+ _lastHoverLocation = point; > break; > case UIGestureRecognizerStateEnded: > case UIGestureRecognizerStateCancelled:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
megan_gardner
:
review+
thorton
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197649
: 369255