WebKit Bugzilla
Attachment 339964 Details for
Bug 185472
: [iOS] Consider the annotation bounds when positioning action sheets near long-pressed PDF links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185472-20180509081124.patch (text/plain), 3.98 KB, created by
Andy Estes
on 2018-05-09 08:11:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2018-05-09 08:11:24 PDT
Size:
3.98 KB
patch
obsolete
>Subversion Revision: 231509 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5b14e10b391baaee02a3e2bab2f76ca8d9a2bb10..276a8fb15a2bdb31371aa825f4dd8fd47e271878 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,26 @@ >+2018-05-09 Andy Estes <aestes@apple.com> >+ >+ [iOS] Consider the annotation bounds when positioning action sheets near long-pressed PDF links >+ https://bugs.webkit.org/show_bug.cgi?id=185472 >+ <rdar://problem/39967092> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adopted new PDFHostViewControllerDelegate methods that include annotation rects >+ when URLs and page indices are long-pressed. This allows us to avoid obscuring >+ annotations when positioning action sheet popovers. >+ >+ We also no longer need to convert the press location into host view coordinate >+ space, as PDFKit now does that for us. >+ >+ * UIProcess/ios/WKPDFView.mm: >+ (-[WKPDFView _showActionSheetForURL:atLocation:withAnnotationRect:]): >+ (-[WKPDFView pdfHostViewController:didLongPressURL:atLocation:withAnnotationRect:]): >+ (-[WKPDFView pdfHostViewController:didLongPressPageIndex:atLocation:withAnnotationRect:]): >+ (-[WKPDFView _showActionSheetForURL:atLocation:]): Deleted. >+ (-[WKPDFView pdfHostViewController:didLongPressURL:atLocation:]): Deleted. >+ (-[WKPDFView pdfHostViewController:didLongPressPageIndex:atLocation:]): Deleted. >+ > 2018-05-08 Dean Jackson <dino@apple.com> > > System Preview links should trigger a download >diff --git a/Source/WebKit/UIProcess/ios/WKPDFView.mm b/Source/WebKit/UIProcess/ios/WKPDFView.mm >index 5cbe8ceaf664f287c636e9ecb14bd4b28653e27a..bf73129f3568fc10bb8e8bd4aaae169ad79045a0 100644 >--- a/Source/WebKit/UIProcess/ios/WKPDFView.mm >+++ b/Source/WebKit/UIProcess/ios/WKPDFView.mm >@@ -404,31 +404,29 @@ - (void)pdfHostViewController:(PDFHostViewController *)controller goToPageIndex: > [self _goToURL:[self _URLWithPageIndex:pageIndex] atLocation:documentViewRect.origin]; > } > >-- (void)_showActionSheetForURL:(NSURL *)url atLocation:(CGPoint)location >+- (void)_showActionSheetForURL:(NSURL *)url atLocation:(CGPoint)location withAnnotationRect:(CGRect)annotationRect > { > WKWebView *webView = _webView.getAutoreleased(); > if (!webView) > return; > >- CGPoint locationInHostView = [webView.scrollView convertPoint:location toView:[_hostViewController view]]; >- > WebKit::InteractionInformationAtPosition positionInformation; >- positionInformation.bounds = WebCore::roundedIntRect(CGRect { locationInHostView, CGSizeMake(0, 0) }); >- positionInformation.request.point = WebCore::roundedIntPoint(locationInHostView); >+ positionInformation.bounds = WebCore::roundedIntRect(annotationRect); >+ positionInformation.request.point = WebCore::roundedIntPoint(location); > positionInformation.url = url; > > _positionInformation = WTFMove(positionInformation); > [_actionSheetAssistant showLinkSheet]; > } > >-- (void)pdfHostViewController:(PDFHostViewController *)controller didLongPressURL:(NSURL *)url atLocation:(CGPoint)location >+- (void)pdfHostViewController:(PDFHostViewController *)controller didLongPressURL:(NSURL *)url atLocation:(CGPoint)location withAnnotationRect:(CGRect)annotationRect > { >- [self _showActionSheetForURL:url atLocation:location]; >+ [self _showActionSheetForURL:url atLocation:location withAnnotationRect:annotationRect]; > } > >-- (void)pdfHostViewController:(PDFHostViewController *)controller didLongPressPageIndex:(NSInteger)pageIndex atLocation:(CGPoint)location >+- (void)pdfHostViewController:(PDFHostViewController *)controller didLongPressPageIndex:(NSInteger)pageIndex atLocation:(CGPoint)location withAnnotationRect:(CGRect)annotationRect > { >- [self _showActionSheetForURL:[self _URLWithPageIndex:pageIndex] atLocation:location]; >+ [self _showActionSheetForURL:[self _URLWithPageIndex:pageIndex] atLocation:location withAnnotationRect:annotationRect]; > } > > #pragma mark WKActionSheetAssistantDelegate
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185472
: 339964