[webkit-changes] [WebKit/WebKit] 61e2b7: Mac MiniBrowser should match Safari's behavior for...

Ryan Reno noreply at github.com
Mon Oct 24 09:52:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 61e2b7c76840679081dd4aa1518d84f006cdf175
      https://github.com/WebKit/WebKit/commit/61e2b7c76840679081dd4aa1518d84f006cdf175
  Author: Ryan Reno <rreno at apple.com>
  Date:   2022-10-24 (Mon, 24 Oct 2022)

  Changed paths:
    M Tools/MiniBrowser/mac/WK2BrowserWindowController.m

  Log Message:
  -----------
  Mac MiniBrowser should match Safari's behavior for anchor links to javascript URLs
https://bugs.webkit.org/show_bug.cgi?id=246950
rdar://101502667

Reviewed by Brent Fulgham.

Safari on Mac cancels navigation from an anchor element to a javascript URL when target=_blank.
As it is currently implemented, MiniBrowser will attempt to download what appears to be the result
of executing the javascript. This behavior difference can cause some confusion when debugging tests
or web pages using MiniBrowser.

This change mirrors Safari's behavior in Mac MiniBrowser by instructing WebKit to cancel the
navigation in the case of a javascript URL.

* Tools/MiniBrowser/mac/WK2BrowserWindowController.m:
(isJavaScriptURL):
(-[WK2BrowserWindowController webView:decidePolicyForNavigationAction:decisionHandler:]):

Canonical link: https://commits.webkit.org/255918@main




More information about the webkit-changes mailing list