Closed Bug 302889 Opened 19 years ago Closed 19 years ago

GMail popup "mail sent" window doesn't close itself

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: jst)

References

Details

(Keywords: fixed1.8, regression)

Attachments

(1 file)

When you compose a message in a new window in GMail, after you press send it
normally replaces itself with a message "This email has been sent" (or something
like that) and then closes itself after a couple of seconds. In today's trunk
build (post split-window) the close doesn't happen, it just stays open until the
user closes it.
Works in 20050730 build. Probably also a fallout from bug 296639.
Blocks: splitwindows
Keywords: regression
Assignee: general → jst
Flags: blocking1.8b4+
This goes pretty deep, but on the surface the problem is that we're dispatching
events with an inner window as the event target when it should be the outer
window.

The reason the window didn't close was that our browser code didn't think the
window that was being closed was the one in the only remaining tab, and that
was because contentWindow == event.target check failed. The reason that failed
was that this was chrome code, so we got automatic wrapping of the event target
with XPCNativeWrapper. XPCNativeWrapper has an equality hook that compares the
native pointers, which in this case would be different.

Now, I also added an equality hook to the window objects with the split window
work, but since XPCNativeWrapper is wrapping one of the window objects here, we
don't end up in the window equality hook. Now having thought about his more
(even before I investigated this bug), I've realized that we probably don't
even need an equality hook on our window objects since we should never be
comparing an inner window against an outer in the first place... I'll file a
followup bug on that...
Attachment #191287 - Flags: superreview?(dbaron)
Attachment #191287 - Flags: review?(dbaron)
Comment on attachment 191287 [details] [diff] [review]
Always set the outer window as event target.

This changes which nsISupports* is passed to DispatchNewEvent, but that looks
ok, so r+sr=dbaron.
Attachment #191287 - Flags: superreview?(dbaron)
Attachment #191287 - Flags: superreview+
Attachment #191287 - Flags: review?(dbaron)
Attachment #191287 - Flags: review+
Attachment #191287 - Flags: approval1.8b4?
Comment on attachment 191287 [details] [diff] [review]
Always set the outer window as event target.

Frickin' sweet.
Attachment #191287 - Flags: approval1.8b4? → approval1.8b4+
Fix checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Blocks: 302902
Fixed on the trunk before we branched for 1.8.
Keywords: fixed1.8
Depends on: 337716
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: