Closed Bug 1190662 Opened 9 years ago Closed 9 years ago

Browser action popup HTML should be reloaded each time popup is opened

Categories

(WebExtensions :: Untriaged, defect, P1)

34 Branch
defect

Tracking

(firefox44 fixed)

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: billm, Assigned: billm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This is needed for Adblock Plus.
Priority: -- → P1
Component: Extension Compatibility → WebExtensions
Product: Firefox → Toolkit
Could be unloaded when closed for better performance as well.
Attached patch patch (deleted) — Splinter Review
This just moves some of the logic around so that we don't create the panel until it's needed. It also eliminates prevPopups, which is nice.

I also added code to automatically size the popup to fit the content that the add-on provides. This makes it look a lot better.

Finally, I had to add some code to expose the extension ID to the test harness. That's needed so that I can find the CustomizableUI widget ID, which is based on the extension ID.
Assignee: nobody → wmccloskey
Status: NEW → ASSIGNED
Attachment #8657907 - Flags: review?(gkrizsanits)
Comment on attachment 8657907 [details] [diff] [review]
patch

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

::: browser/components/extensions/ext-browserAction.js
@@ +118,5 @@
> +        browser.removeEventListener("load", contentLoadListener);
> +
> +        let contentViewer = browser.docShell.contentViewer;
> +        let width = {}, height = {};
> +        contentViewer.getContentSize(width, height);

It seems to me that getContentSize can throw... should we handle that?
Attachment #8657907 - Flags: review?(gkrizsanits) → review+
Backed out the whole push in https://hg.mozilla.org/integration/mozilla-inbound/rev/f2e83a8b6b8e since it was intertangled and I wasn't entirely sure which part caused Mulet mochitest-5 to become permaorange with https://treeherder.mozilla.org/logviewer.html#?job_id=14545777&repo=mozilla-inbound
I confirm this patch does fix bug 1199048, although when I run it with the WebExtension version of Whimsy from https://github.com/bwinton/whimsy/tree/WebExtensionAPI, it looks like https://www.dropbox.com/s/dl8d94v7pgj65z7/Screenshot%202015-09-23%2019.05.57.png?dl=0 which leads me to believe that the auto-sizing might need some help…  :)
I'm not seeing a browser action popup at all in that version of whimsy. Are there uncommitted changes?
Also, the icon links seem to be broken. I don't see the whimsycorn images in the repo.
Ugh, yes there were uncommitted changes.  That should be fixed now.
https://hg.mozilla.org/mozilla-central/rev/52814ef8ceaa
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Is manual testing necessary here? If yes, could you provide some clear steps and the proper webextension? (I tried to submit on stage the webextension mentioned in Comment 8 but it seems to be incompatible with any platform version - see screenshot: http://screencast.com/t/VJXyQVwdf)
Flags: needinfo?(wmccloskey)
The patch contains an automated test so no manual testing is needed.
Flags: needinfo?(wmccloskey)
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: