[Webkit-unassigned] [Bug 199793] WKWebView PDF viewer doesn't respect selection and callout preferences

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 15 08:55:10 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199793

--- Comment #3 from Josip <josip04 at hotmail.com> ---
For reference:

I managed to workaround this by:

```
if let cls = NSClassFromString("PDFHostViewController") {
  let selector1 = #selector(canPerformAction(_:withSender:))
  let selector2 = #selector(canPerformAction2(_:withSender:))
  if let original = class_getInstanceMethod(cls, selector1),
    let replacement = class_getInstanceMethod(MyObject.self, selector2) {
    let replacemementImp = revert ? original : replacement
    let imp = method_getImplementation(replacemementImp)
    method_setImplementation(original, imp)
  }
}
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190715/4dcfb494/attachment.html>


More information about the webkit-unassigned mailing list