We should fold nsPluginInstanceOwner into nsObjectFrame, making nsObjectFrame implement the nsIPluginInstanceOwner interface. Right now nsPluginInstanceOwner is just an unnecessary (complicated) middle-man object and arguably the worst thing about our current NPAPI plugin implementation. This design problem is a big part of the reason that nsObjectFrame.cpp is hard to understand and a major source of bugs.
Sounds good. I'd say the other major design problem is the morass of #ifdefs in nsObjectFrame. Got a plan for fixing that too? :-)
The ifdef situation is just going to take some tedious work to iron out, but fixing this bug should reduce ifdefs some and make others easier to understand.
Are you planning to make nsIPluginInstanceOwner no longer inherit from nsISupports? frames should not implement XPCOM interfaces; they can't support reference counting.
Yeah, we're going to have to do something about the XPCOM interfaces and refcounting, maybe leave nsPluginInstanceOwner but minimize it.
Assignee: joshmoz → nobody
Actually, I don't think we should do this, the long term plan is to move away from having the layout frame own the plugin to having the DOM node own the plugin so that a plugin instance can survive a reframe of the document (i.e. due to style changes, tab being dragged from one window to another, etc), so moving more things into nsObjectFrame seems to be the wrong direction here.
Good point Johnny, thanks. I'll rethink this and find another way to simplify things.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.