Bug 219665 - Fix clicking on links in PDFs on Big Sur after r266654
Summary: Fix clicking on links in PDFs on Big Sur after r266654
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-08 20:18 PST by Alex Christensen
Modified: 2020-12-09 11:58 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.06 KB, patch)
2020-12-08 20:23 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-12-08 20:18:54 PST
Fix clicking on links in PDFs on Big Sur after r266654
Comment 1 Alex Christensen 2020-12-08 20:23:02 PST
Created attachment 415704 [details]
Patch
Comment 2 Alex Christensen 2020-12-08 20:23:04 PST
<rdar://problem/72080683>
Comment 3 Tim Horton 2020-12-09 00:54:53 PST
Comment on attachment 415704 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415704&action=review

> Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm:170
> +    if (_page)
> +        return fromWebPageProxy(*_page);
> +
> +    ASSERT_NOT_REACHED();
> +    return self;

I think you want to just return nil
Comment 4 Tim Horton 2020-12-09 00:55:57 PST
ALSO, don't you need to get mouse events when you're inside the HUD? It looks like WKPDFHudView implements mouseDown.
Comment 5 Tim Horton 2020-12-09 00:57:00 PST
So probably what you really want is to return nil UNLESS the point is inside _layer, in which case you return self.
Comment 6 Tim Horton 2020-12-09 00:57:19 PST
(In reply to Tim Horton from comment #5)
> So probably what you really want is to return nil UNLESS the point is inside
> _layer, in which case you return self.

(And also only if the layer is not hidden, but I think it always will be unhidden if the mouse is over it??)
Comment 7 Alex Christensen 2020-12-09 09:25:33 PST
WebViewImpl::mouseDown and friends give all HUDs the needed mouse events, not just this one, which is better than what you suggested because there may be two partially overlapping HUDs.
Comment 8 Tim Horton 2020-12-09 10:59:05 PST
Oh! So it’s called by WebKit code, not appkit? Very confusing!
Comment 9 EWS 2020-12-09 11:58:54 PST
Committed r270593: <https://trac.webkit.org/changeset/270593>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415704 [details].