Closed Bug 302930 Opened 19 years ago Closed 3 years ago

sizeToContent() gives wrong size on full-page plugins

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: torben, Unassigned)

References

()

Details

(Build id: Current trunk builds of Camino and Firefox)

If a page only hosts a full-page plugin sizeToContent() resizes the window so
the content is approx. 100 x 100 px no matter how big the plugin is.

Reproducible: Always

Steps to reproduce:
1. Load URL
2. Type javascript:sizeToContent() in the location bar and hit enter (you need
   to allow javascript to resize windows for this to work)

Actual Results:  the window resizes so the content is 100 X 100 px

Expected Results:  resize to the size of the plugin, or don't resize at all.

Since I don't think there is a way for us to get the actual size of the plugin,
I suggest we do nothing (thats way better than the current behaviour).

I have a proposed fix for this in bug 155956 attachment 191111 [details] [diff] [review] (scroll to the
bottom).
Assignee: general → nobody
Component: DOM → Layout
OS: MacOS X → All
QA Contact: ian → layout
Hardware: Macintosh → All
Actually, I was pretty sure we had an existing bug on extending NPAPI to allow a
plugin to report an intrinsic size...
You're probably thinking of bug 70976. Fixing that would be better, but until
then I think we should just stop the window from resizing. We probably will need
to spwcial-case plugins anyway.
Depends on: 70976

We're in the process of removing support for plugins (bug 1677160) and bug 1687239 has removed the relevant Layout code, so this bug is irrelevant now.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.