Closed Bug 282296 Opened 20 years ago Closed 20 years ago

[FIX]nsWindowWatcher::FindItemWithName() broken

Categories

(Core :: DOM: Navigation, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: jst, Assigned: bzbarsky)

Details

Attachments

(1 file)

According to your bug 103638 comment 58, nsWindowWatcher::FindItemWithName() is,
and has been broken wrt how it uses the docshell API FindItemWithName().
So specifically, as currently written nsWindowWatcher::GetWindowByName will
never return a window for things like "_self", say.  Is that the desired
behavior?  Or should those just return the first window the windowwatcher tries?
Attached patch Proposed patchSplinter Review
This patch just makes us do the same thing in nsWindowWatcher::FindItemWithName
as we do in nsDocShellTreeOwner::FindItemWithNameAcrossWindows (and in fact,
implements the latter in terms of the former).	The rest of what the patch does
should be either pretty clear or commented in the patch...

I tested the testcases in bug 279495 and bug 278916 in TestGTKEmbed with this
patch, and they look good.
Attachment #176060 - Flags: superreview?(jst)
Attachment #176060 - Flags: review?(danm.moz)
Priority: -- → P1
Summary: nsWindowWatcher::FindItemWithName() broken → [FIX]nsWindowWatcher::FindItemWithName() broken
Target Milestone: --- → mozilla1.8beta2
Comment on attachment 176060 [details] [diff] [review]
Proposed patch

sr=jst
Attachment #176060 - Flags: superreview?(jst) → superreview+
Attachment #176060 - Flags: review?(danm.moz) → review+
Fixed.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: