Closed Bug 1242224 Opened 8 years ago Closed 7 years ago

window.sizeToContent() with resizable window does not work under e10s - blocks dict extension

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
e10s + ---

People

(Reporter: david_costanzo, Unassigned)

References

Details

(Keywords: addon-compat, Whiteboard: dom-triaged)

Attachments

(1 file)

Attached file sizetocontent.html (deleted) —
User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36

Steps to reproduce:

The dict extension opens windows with the wrong size on Nightly firefox (e10s) enabled.  This works on a non-e10s firefox and is the last remaining problem for Dict to be e10s-compatible.

Background:
For security sandboxing and improved feature set, the Dict extension opens web pages using a data:// URL, instead of a XUL page.  It encodes simple HTML pages as a data URL.  The Dict extension needs to control the size of the window that it opens.  It cannot do this from the window object that is returned (that stopped working long ago), so it does this by running some JavaScript from within the HTML encoded in the data:// URL to resize the window.  For this, it relies on window.resizeToContent().

Repro Steps:
I have created a simple HTML page which demonstrates the issue outside of the Dict extension.

1) Open the attached HTML in a e10s window
2) Click on the "Click Here" link
3) Open the attached HTML in a non-e10s window
4) Click on the "Click Here" link



Actual results:

In 2), a new window is opened using the window manager's default size.  A grey box is shown with a lot of whitespace that is not part of the content
In 4) a new window is opened using the window manager's default size, but then it quickly resizes to fit the 300x400 grey box



Expected results:

The window opened in step 2) should have behaved exactly like the window in Step 4).  That is, it should be resized to 300x400.
Blocks: e10s
Component: Untriaged → Extension Compatibility
Component: Extension Compatibility → DOM
Product: Firefox → Core
mconley, interested in this?
Flags: needinfo?(mconley)
Whiteboard: dom-noted
Potentially! Queued for triage.
tracking-e10s: --- → ?
Flags: needinfo?(mconley)
There are at least two tests, test_resize_move_windows.html and test_sizetocontent_clamp.html in dom/tests/mochitest/bugs/ that are disabled with e10s and may be related to this issue.
Whiteboard: dom-noted → dom-triaged
With Firefox 57 only WebExtensions are permitted and are, by default, e10s compatible.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: