Closed
Bug 527115
Opened 16 years ago
Closed 16 years ago
Cocoa event model: 1) fix spurious NPP_SetWindow calls 2) propagate event model immediately
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: jaas, Assigned: jaas)
Details
Attachments
(1 file, 1 obsolete file)
|
18.34 KB,
patch
|
Details | Diff | Splinter Review |
This patch fixes some plugin event bugs and generally improves some code:
- Set the plugin event model on the object frame and the widget as soon as possible to avoid a period of time during which events of the wrong type could be sent to to the plugin. For example, we don't want a Carbon mouse move going to the plugin before we lazily set the plugin's widget to Cocoa event model.
- In the Cocoa event model the plugin port set via NPP_SetWindow should always have a null graphics context and native window. Stop detecting changes to those fields and calling SetWindow in the Cocoa event model because the fields get nulled out anyway and we end up making unnecessary/identical SetWindow calls.
- nsNPAPIPluginInstance is an inappropriate place to be messing with the Mac OS X plugin port during the SetWindow process. Stop messing with the port there.
- Be internally consistent about the way we store the CG graphics port for Cocoa event model plugins. Never have non-null graphics context or native window fields in the graphics port for Cocoa event model plugins.
- Store the event model in the plugin instance owner instead of the plugin instance object. The plugin instance owner is a more appropriate place for it.
Attachment #410868 -
Flags: review?(smichaud)
Updated•16 years ago
|
Attachment #410868 -
Flags: review?(smichaud) → review+
Comment 1•16 years ago
|
||
Comment on attachment 410868 [details] [diff] [review]
fix v1.0
This looks fine to me.
I haven't been able to do much testing: My DebugEventsPlugin (from
bug 441880) appears to have out-of-date header files, which stops me
from doing more than the most basic stuff.
I'll revise my plugin tomorrow and test further. But in the meantime
I'll r+ this patch.
Attachment #410868 -
Flags: review?(roc)
Comment on attachment 410868 [details] [diff] [review]
fix v1.0
Another good cleanup would be to deCOMTaminate nsIPlugin*.
Attachment #410868 -
Flags: review?(roc) → review+
Includes a build fix for non-Mac platforms.
Attachment #410868 -
Attachment is obsolete: true
pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/ae2a1ad91022
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
pushed a bustage fix for 64-bit builds
http://hg.mozilla.org/mozilla-central/rev/3c13dfd53b59
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•