Open Bug 276699 Opened 20 years ago Updated 2 years ago

Chrome should not prefer links

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

People

(Reporter: neil, Unassigned)

Details

If you embed <html:a href="http://www.mozilla.org">Mozilla.org</html:a> in
chrome then clicking it will replace the chrome with the Mozilla.org website. I
feel that this is a bad idea and it should instead open in a browser window.
However the way content listeners are chained makes this difficult. I can think
of two possibilities that seem to be able to resolve this issue. In either case
the nsDSURIContentListener needs to return early from IsPreferred if the
docShell is a chrome docShell. Then the code to link doc loaders either needs to
check that the parent doc shell is a content shell before chaining the content
listener, or alternatively copy any explicit parent content listener into the
child doc shell. P.S. Why is nsDSURIContentListener not part of nsDocShell?
What if this were a link to a chrome:// URI?  Would you still want to return
early from IsPreferred?

I guess the problem is that the root URIContentListener just can't tell which
docshell the load is being targeted at, huh?
(In reply to comment #1)
>What if this were a link to a chrome:// URI?
The question is moot as there is no way you would know.
We plan to change that; the question is what the new interface should look like
and whether addressing this bug should be a design criterion for it.
Assignee: adamlock → nobody
QA Contact: adamlock → docshell
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.