Closed Bug 1346607 Opened 7 years ago Closed 7 years ago

Begin speculative pre-load of popups on hover

Categories

(WebExtensions :: Frontend, enhancement)

enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

Details

(Whiteboard: triaged)

Attachments

(1 file)

Once bug 1333990 is fixed, and we can block loading of page scripts until we know we actually want to load the popup, we should be able to begin speculatively loading popups on hover, rather than mousedown. That should give us a few-hundred-millisecond head start on the mouseup event, and give us much better perceived responsiveness.
Whiteboard: triaged
Assignee: nobody → kmaglione+bmo
Comment on attachment 8848703 [details]
Bug 1346607: Begin speculative preload of popups on hover.

https://reviewboard.mozilla.org/r/121598/#review124006

r+ with comments addressed

::: browser/components/extensions/ext-browserAction.js:297
(Diff revision 1)
>     * @param {Window} window
>     *        The browser window in which to create the popup.
>     * @param {string} popupURL
>     *        The URL to load into the popup.
> +   * @param {boolean} [blockParser = false]
> +   *        The URL to load into the popup.

fix description

::: toolkit/components/extensions/ExtensionUtils.jsm:1304
(Diff revision 1)
>    flushJarCache,
>    getConsole,
>    getInnerWindowID,
>    getMessageManager,
>    getUniqueId,
> +  filterStack,

I don't see where this is used in this patch, is it necessary to add?

::: toolkit/components/extensions/ext-browser-content.js:80
(Diff revision 1)
>      if (name === "Extension:InitBrowser") {
>        this.init(data);
> +    } else if (name === "Extension:UnblockParser") {
> +      if (this.unblockParser) {
> +        this.unblockParser();
> +        this.blockingPromise = null;

might be nice to make this part of the resolve, but not important.
Attachment #8848703 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8848703 [details]
Bug 1346607: Begin speculative preload of popups on hover.

https://reviewboard.mozilla.org/r/121598/#review124006

> I don't see where this is used in this patch, is it necessary to add?

I was using it for debugging. I decided to leave it because it's a useful export to have.
https://hg.mozilla.org/mozilla-central/rev/038761b0c9cd
https://hg.mozilla.org/mozilla-central/rev/f2eebe34cd1a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1451058
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: