[webkit-reviews] review granted: [Bug 57528] WebKit2: Link from PDF opens in a new tab instead of in the same tab : [Attachment 87675] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 31 07:42:34 PDT 2011


Darin Adler <darin at apple.com> has granted Jer Noble <jer.noble at apple.com>'s
request for review:
Bug 57528: WebKit2: Link from PDF opens in a new tab instead of in the same tab
https://bugs.webkit.org/show_bug.cgi?id=57528

Attachment 87675: Patch
https://bugs.webkit.org/attachment.cgi?id=87675&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=87675&action=review

> Source/WebKit2/UIProcess/API/mac/PDFViewController.mm:273
> +    if (!URL)
> +	   return;

Is this really needed? Does it get called with a null URL?

> Source/WebKit2/UIProcess/API/mac/PDFViewController.mm:276
> +    String urlString = [URL absoluteString];
> +    _pdfViewController->page()->loadURL(urlString);

No need for a local variable here.

Do we really just want to call loadURL on the page? What about modifier keys
and the policy delegate and such? We certainly don’t just call loadURL when you
click on a link in a webpage.

If you look at the code in WebKit1, you’ll see that it turns the current event
into a DOM event and sends that event in to the loader.


More information about the webkit-reviews mailing list