Closed Bug 495219 Opened 15 years ago Closed 15 years ago

Iframe window keeps old innerWidth/innerHeight values after iframe has style display: none

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: zwol)

References

Details

(Keywords: regression, testcase, verified1.9.1)

Attachments

(2 files)

Attached file testcase
See testcase, when clicking on the buttons, I get 300 and 150 as the innerWidth and innerHeight values for the iframe window. But it should be 0 and 0, because the iframe has style display: none.

This regressed between 2009-02-09 and 2009-02-11:
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2009-02-09+12%3A00%3A00&enddate=2009-02-11+07%3A00%3A00
I think a regression from bug 469933.

This is also basically causing a repeat of bug 493658.
Flags: blocking1.9.2?
Flags: blocking1.9.1?
Er, yes.  Sorry for missing that...  For web-facing stuff, the cases when we punted on the conversions due to lack of a prescontext probably still need to be punted on, since the docshell state can be stale.

Zack, can you take this?
QA Contact: general → zweinberg
yah, i got it.
This reverts nsGlobalWindow::GetInner{Width,Height} to their old behavior of silently returning zero if there's no prescontext.  That is sufficient to make the test case in attachment 380100 [details] happy; I've munged it into a mochitest and included it in the patch.

I did *not* revert nsGlobalWindow::SetInner{Width,Height}, which used to silently drop the change on the floor if there was no prescontext - do you think I should do that too?  (Can we come up with a test case that exhibits changed behavior for that?)
Assignee: nobody → zweinberg
Status: NEW → ASSIGNED
Attachment #380202 - Flags: review?(bzbarsky)
How the heck did I become the QA contact?  Fixing.
QA Contact: zweinberg → general
> (Can we come up with a test case that exhibits changed behavior for that?)

I don't believe so.
Comment on attachment 380202 [details] [diff] [review]
patch: report zero from nsGlobalWindow::GetInner{Width,Height} when no prescontext

Looks good.
Attachment #380202 - Flags: superreview+
Attachment #380202 - Flags: review?(bzbarsky)
Attachment #380202 - Flags: review+
Blocking -- please land _ASAP_ on m-c.
Flags: blocking1.9.2?
Flags: blocking1.9.1?
Flags: blocking1.9.1+
Pushed http://hg.mozilla.org/mozilla-central/rev/701acdb5c460
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [c-n: baking for 1.9.1]
Pushed http://hg.mozilla.org/releases/mozilla-1.9.1/rev/34083fc75f1a
Keywords: fixed1.9.1
Whiteboard: [c-n: baking for 1.9.1]
verified FIXED via the attached testcase on builds:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090727 Minefield/3.6a1pre (.NET CLR 3.5.30729) ID:20090727044731

and

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090727 Shiretoko/3.5.2pre (.NET CLR 3.5.30729) ID:20090727044703
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: