If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Show the URI spec if there is no URI host in the popup blocker UI

RESOLVED FIXED in Firefox 20

Status

()

Firefox
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
Firefox 20
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 685647 [details] [diff] [review]
Patch

It has always be annoying to not read "Allow pop-ups for   " when I wanted to allow pop-ups for a "file://". This patch will show the uri.spec if uri.host does not exist. It happens that this is equivalent to uri.origin and this is what will be used after we land bug 815640.
Attachment #685647 - Flags: review?(ttaubert)
Comment on attachment 685647 [details] [diff] [review]
Patch

Review of attachment 685647 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/browser.js
@@ +495,5 @@
>        var pm = Services.perms;
>        if (pm.testPermission(uri, "popup") == pm.ALLOW_ACTION) {
>          // Offer an item to block popups for this site, if a whitelist entry exists
>          // already for it.
> +        let blockString = gNavigatorBundle.getFormattedString("popupBlock", [uri.host != "" ? uri.host : uri.spec]);

Nit: we can do [uri.host || uri.spec]

@@ +501,5 @@
>          blockedPopupAllowSite.setAttribute("block", "true");
>        }
>        else {
>          // Offer an item to allow popups for this site
> +        let allowString = gNavigatorBundle.getFormattedString("popupAllow", [uri.host != "" ? uri.host : uri.spec]);

Same here.
Attachment #685647 - Flags: review?(ttaubert) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/28dc63439824

Are there tests for the popup blocker currently?
Target Milestone: --- → Firefox 20

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/28dc63439824
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.