Closed Bug 1385732 Opened 7 years ago Closed 7 years ago

Non-OOP Link to https URL from moz-extension URL iframe with target _blank opens a blank tab (instead of target URL)

Categories

(WebExtensions :: General, defect, P1)

54 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1357589

People

(Reporter: several27, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce:

1. Add an iframe on top of any website using javascript
2. Add an link inside of the page displayed in that iframe with target="_blank"
3. Click on the link inside that iframe

I'm attaching a simple addon that adds iframe on top of any website, click on the link in that iframe to see the problem.


Actual results:

Clicking on a link opens a new blank tab. (Right click and open in new tab works correctly)


Expected results:

Clicking on a link should open a link in new tab and load it.
This is probably a Core::DocNav bug, but I don't really know how to work out where things go wrong off-hand, so moving to webextensions first given that this is first and foremost a webextension issue. Christoph, do you know what's up here?
Component: General → WebExtensions: General
Flags: needinfo?(ckerschb)
Product: Firefox → Toolkit
Summary: Link inside an iframe added dynamicly opens an empty tab → Link to https URL from moz-extension URL iframe with target _blank opens a blank tab (instead of target URL)
(In reply to :Gijs from comment #1)
> This is probably a Core::DocNav bug, but I don't really know how to work out
> where things go wrong off-hand, so moving to webextensions first given that
> this is first and foremost a webextension issue. Christoph, do you know
> what's up here?

Not precisely - probably one could start debugging by looking whether this load requires a new target toplevel docshell around here [1] and then work their way backwards to find the root cause. Maybe a simple stacktrace already provides the necessary information.

[1] https://dxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp#9880
Flags: needinfo?(ckerschb)
This looks somehow like the inverse of the problem in bug 1385696. I don't have a debuggable nightly right now and possibly won't until next week, but Shane, maybe you want to poke at this with bug 1385696 fresh in your mind?
Flags: needinfo?(mixedpuppy)
It's unrelated.

Of note, it only happens with extensions.webextensions.remote = false, switch to true and it works fine.

nsBrowserAccess.openURIInFrame is getting null for the first param, though its getting the correct referrer.  This problem is deeper, perhaps in ContentParent::RecvCreateWindowInDifferentProcess or ContentParent::RecvCreateWindow.

Kris has fixed some similar stuff, maybe he knows something here...
Flags: needinfo?(mixedpuppy) → needinfo?(kmaglione+bmo)
Priority: -- → P1
Summary: Link to https URL from moz-extension URL iframe with target _blank opens a blank tab (instead of target URL) → Non-OOP Link to https URL from moz-extension URL iframe with target _blank opens a blank tab (instead of target URL)
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: