Title: [270593] trunk/Source/WebKit
- Revision
- 270593
- Author
- [email protected]
- Date
- 2020-12-09 11:58:30 -0800 (Wed, 09 Dec 2020)
Log Message
Fix clicking on links in PDFs on Big Sur after r266654
https://bugs.webkit.org/show_bug.cgi?id=219665
<rdar://problem/72080683>
Patch by Alex Christensen <[email protected]> on 2020-12-09
Reviewed by Tim Horton.
mouseUp: was being called by AppKit on the WKPDFHUDView instead of the WKWebView, causing the event to not make it to the PDFPlugin,
which meant PDFKit wasn't being told it was clicked on, which means it wasn't telling WebKit to change the frame's location.
Overriding hitTest to forward all mouse events to the WKWebView solves this problem.
Covered by the WebKit.PDFLinkReferrer API test, which was failing on Big Sur, where ENABLE(UI_PROCESS_PDF_HUD) is true.
* UIProcess/PDF/WKPDFHUDView.mm:
(-[WKPDFHUDView hitTest:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (270592 => 270593)
--- trunk/Source/WebKit/ChangeLog 2020-12-09 19:53:41 UTC (rev 270592)
+++ trunk/Source/WebKit/ChangeLog 2020-12-09 19:58:30 UTC (rev 270593)
@@ -1,3 +1,20 @@
+2020-12-09 Alex Christensen <[email protected]>
+
+ Fix clicking on links in PDFs on Big Sur after r266654
+ https://bugs.webkit.org/show_bug.cgi?id=219665
+ <rdar://problem/72080683>
+
+ Reviewed by Tim Horton.
+
+ mouseUp: was being called by AppKit on the WKPDFHUDView instead of the WKWebView, causing the event to not make it to the PDFPlugin,
+ which meant PDFKit wasn't being told it was clicked on, which means it wasn't telling WebKit to change the frame's location.
+ Overriding hitTest to forward all mouse events to the WKWebView solves this problem.
+
+ Covered by the WebKit.PDFLinkReferrer API test, which was failing on Big Sur, where ENABLE(UI_PROCESS_PDF_HUD) is true.
+
+ * UIProcess/PDF/WKPDFHUDView.mm:
+ (-[WKPDFHUDView hitTest:]):
+
2020-12-09 Wenson Hsieh <[email protected]>
[Concurrent display lists] Support playback of display list items with cached resources
Modified: trunk/Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm (270592 => 270593)
--- trunk/Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm 2020-12-09 19:53:41 UTC (rev 270592)
+++ trunk/Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm 2020-12-09 19:58:30 UTC (rev 270593)
@@ -28,6 +28,7 @@
#if ENABLE(UI_PROCESS_PDF_HUD)
+#import "WKWebViewInternal.h"
#import "WebPageProxy.h"
#import <QuartzCore/CATransaction.h>
#import <pal/spi/cocoa/QuartzCoreSPI.h>
@@ -160,6 +161,15 @@
[CATransaction commit];
}
+- (NSView *)hitTest:(NSPoint)point
+{
+ if (_page)
+ return fromWebPageProxy(*_page);
+
+ ASSERT_NOT_REACHED();
+ return self;
+}
+
- (void)mouseMoved:(NSEvent *)event
{
if (CGRectContainsPoint([self convertRect:CGRectInset([_layer frame], -16.0, -16.0) toView:nil], NSPointToCGPoint(event.locationInWindow))) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes