Closed Bug 123059 Opened 23 years ago Closed 23 years ago

Can't get handle to doc's window if plugin is HIDDEN (no view)

Categories

(Core Graveyard :: Plug-ins, defect, P1)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: TaylorToddK, Assigned: peterlubczynski-bugs)

Details

Attachments

(1 file)

Hidden windows need some ability to access a window handle to the browser, for 
cases where they need to present ui in the form of a dialog or msgbox.  Without 
this, a dialog created will not be able to be "attached" to the browser window 
it is related to.
To expand on this:

You can get the handle to the document's window by calling NPN_GetValue and
asking for the nsPluginInstancePeerVariable_NetscapeWindow. The problem is that
the method of getting the handle from the widget requires a view. Plugins that
have a HIDDEN attribute, don't have a view, so this fails. :( 

This is blocking embedding from working on their Default Plugin. 

Attaching a patch that takes a better route throug the pres shell.
Severity: normal → blocker
Status: NEW → ASSIGNED
Keywords: edt0.9.4
OS: Windows 2000 → All
Priority: -- → P1
Summary: Hidden plug-in problem → Can't get handle to doc's window if plugin is HIDDEN (no view)
Target Milestone: --- → mozilla0.9.9
Attached patch patch v.1Splinter Review
Summary: Can't get handle to doc's window if plugin is HIDDEN (no view) → Can't get handel to doc's window if plugin is HIDDEN (no view)
Summary: Can't get handel to doc's window if plugin is HIDDEN (no view) → Can't get handle to doc's window if plugin is HIDDEN (no view)
r=ToddTaylor

Tested the patch, looks good.  Was able to retrieve the window handle for 
the "parent" when the plug-in was hidden.
Comment on attachment 67500 [details] [diff] [review]
patch v.1

sr=beard
Attachment #67500 - Flags: superreview+
Patch in trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
sorry to nit here, but, can you remove the added line break and add back the
removed one at the bottom of this patch. if we're going to have to do patch
shuffling, any added/removed whitespace can wreak havoc w/ a merge.

with that, please drive into 0.9.4 branch and add fixed0.9.4 to the keyword field.

any trunk patch here?
Keywords: edt0.9.4edt0.9.4+
bugs moving to fast for me. I see this is in the trunk; my bad.
Same patch should work for both as that code hasn't changed in a while. The last
hunk of this patch is simply removing some whitspace after the bracket. I'll
take care with applying to the 0.9.4 branch.
Attachment #67500 - Flags: review+
fixed0.9.4
Keywords: fixed0.9.4
verif patch is in brnch/trunk.
Status: RESOLVED → VERIFIED
Keywords: verified0.9.4
Keywords: fixed0.9.4
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: