Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 61e2b7c76840679081dd4aa1518d84f006cdf175
      
https://github.com/WebKit/WebKit/commit/61e2b7c76840679081dd4aa1518d84f006cdf175
  Author: Ryan Reno <rr...@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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to