Open Bug 1543647 Opened 5 years ago Updated 2 years ago

Ensure that webNavigation.onCreatedNavigationTarget is fired for clicked link element when doing a cross-process load

Categories

(WebExtensions :: Request Handling, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: rpl, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

We recently noticed that Bug 1344376 has recently regressed and the webNavigation onCreatedNavigationTarget API event is not fired when clicking a target="_blank" link which has rel attribute set to "noopener".

QA did run a mozregression to bisect the change that has potentially regressed this behavior and identified Bug 1503681.

The automated test originally added in Bug 1344376 is currently testing the behavior with the rel attribute set to "opener" and so the test case related to this scenario is not currently failing, but I verified that (as bz suggested in his comment):

  • if rel is set to "noopener" the test is getting stuck and fails for a timeout
  • if "dom.noopener.newprocess.enabled" is set to false, the test passes again (as the preference set to false restores the old behavior)

We should look into the changes needed to ensure that the onCreatedNavigationTarget AP event is going to be fired when "dom.noopener.newprocess.enabled" is set to true and clicking a link with rel set to "noopener" will do a cross-process load.

See Also: → 1344376
Regressed by: 1503681

The automated test originally added in Bug 1344376 is currently testing the behavior with the rel attribute set to "opener"

Ugh. It didn't use to be, until bug 1503681! As in, bug 1503681 in fact broke the behavior for the "default" case but changed the test to no longer test that case. :(

Note that we're going to need this is in general for fission, so it's good this is coming up...

Priority: -- → P2

I am attaching an add-on to help reproduce the bug.

Steps:

  1. Unzip the archive.
  2. Go to about:debugging#/runtime/this-firefox
  3. Click Load Temporary Add-on...
  4. Select the manifest.json from the uncompressed folder.
  5. Open a.html with Firefox from the uncompressed folder.
  6. Click "no rel".
  7. A new tab will open and you should see a message verifying that onCreatedNavigationTarget was fired.
  8. Close the tab.
  9. Click "noopener".
  10. A new tab will open.

Expected result:
You should see a message verifying that onCreatedNavigationTarget was fired.

Actual result:
You see a message saying that onCreatedNavigationTarget was NOT fired.

Is this issue is fixed?

Flags: needinfo?(jmathies)

(In reply to kranthi samala from comment #4)

Is this issue is fixed?

no, not according to the resolution.

Flags: needinfo?(jmathies)
Priority: P2 → P3

This affects uBlock Origin - some popups are not blocked: https://github.com/uBlockOrigin/uBlock-issues/issues/1393#issuecomment-869834409

Just tested Firefox 93, and found even more regression: the event is also not fired for links without "rel" attribute (the "no rel" test from comment #3 does not work anymore). The event is fired when I use "Open Link in New Tab" though.

Has Regression Range: --- → yes
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: