Closed Bug 144266 Opened 22 years ago Closed 12 years ago

extend NPAPI through NPP_HandleEvent such that Full-page plug-ins can access exisitng menu items

Categories

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

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
mozilla1.4alpha

People

(Reporter: rubydoo123, Assigned: peterl-bugs)

References

Details

(Whiteboard: [PL2:P1])

Full page plug-ins need access to all menu items
Whiteboard: [ADT1+] [PL RTM]
Liz McQuarrie wrote:

Most Critical

Print (already works)
SAVE
FIND
CUT/COPY/PASTE
MAIL (if available)

==================

peterl wrote:

I'm thinking we can give you:

FIND
FIND AGAIN

CUT
COPY
PASTE
CLEAR
SELECT ALL

UNDO
REDO

======================

Thankfully, nsPluginViewer.cpp (our full-page plugin implementation) inherits
from nsIContentViewerEdit which has some pretty useful methods:
http://lxr.mozilla.org/mozilla/source/docshell/base/nsIContentViewerEdit.idl

I still need to verify in the debugger, but if these are trully being called as
they appear, then it should be trivial to hookup NPP_HandleEvent once the
message format is nailed down.

NPP_HandleEvent uses a platform-specifly defined NPEvent struct:
http://www.sierratel.com/oeschger/plugins/structures5.html#1000000

On Windows, should we try to use existing Windows WM_ messages that fit the
function or define our own WM_USER+ ones?
Summary: Full-page plug-ins need access to all exisitng menu items → [RFE] extend NPAPI through NPP_HandleEvent such that Full-page plug-ins can access exisitng menu items
working on it
Status: NEW → ASSIGNED
Keywords: nsbeta1
Priority: -- → P1
Summary: [RFE] extend NPAPI through NPP_HandleEvent such that Full-page plug-ins can access exisitng menu items → extend NPAPI through NPP_HandleEvent such that Full-page plug-ins can access exisitng menu items
Target Milestone: --- → mozilla1.0
*** Bug 147368 has been marked as a duplicate of this bug. ***
mass move PL RTM 
Target Milestone: mozilla1.0 → mozilla1.0.1
I've been looking at this but I've run into some problems. I can't seem to
figure out a way to get the Edit menu items to enabled. Now I think it is
because full-page plugins don't have a DOM document wrapper so they can't take
"focus". Since they can't take focus, we don't get the event because it looks
like the global window doesn't have a DOM document or element to send it to.

One idea is to wrap full-page plugins around a synthetic document as is done in
the patch in bug 90256 but that's a pretty big re-write and I'm not sure if all
the issues have been resolved.

Could there possibly be an easier way?
removing from PL RTM list, Peter has explained that this is going to take a lot
more code change to fix this, consequently that means a heavy risk at this time.
Whiteboard: [ADT1+] [PL RTM] → [plugin2]
Target Milestone: mozilla1.0.1 → mozilla1.2beta
this should have been marked as nsbeta1- already
Keywords: nsbeta1nsbeta1-
We need a DOM to hook up the right listeners. I'm marking this depends of bug
90256 which has a patch to give full-page plugins a DOM.
Depends on: 90256
*** Bug 92415 has been marked as a duplicate of this bug. ***
Severity: critical → normal
Whiteboard: [plugin2] → [PL2:P1]
Target Milestone: mozilla1.2beta → mozilla1.3alpha
1.4 alpha
Target Milestone: mozilla1.3alpha → mozilla1.4alpha
QA Contact: shrir → plugins
We're not planning to do anything like this, and if someone wants it they will have to go through the plugin-futures mailing list.

https://wiki.mozilla.org/NPAPI
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.