Closed
Bug 19559
Opened 25 years ago
Closed 24 years ago
[dogfood] Plugin can not draw itself on linux and solaris.
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: blackconnect, Assigned: blizzard)
References
Details
(Whiteboard: [PDT+])
This bug is a regression, it was working week ago. PluginInstance::SetWindow(nsPluginWindow *window) get pointer to invalid PluginWindow structure. window->window has to point to valid GtkWidget, but it points to NULL. Step to reproduce. 1. Apply this patch to mozilla/modules/plugin/test/npsimple.cpp ---------------------- Index: npsimple.cpp =================================================================== RCS file: /cvsroot/mozilla/modules/plugin/test/npsimple.cpp,v retrieving revision 1.14 diff -c -r1.14 npsimple.cpp *** npsimple.cpp 1999/11/06 03:32:49 1.14 --- npsimple.cpp 1999/11/22 19:10:52 *************** *** 804,810 **** NS_METHOD SimplePluginInstance::SetWindow(nsPluginWindow* window) ! { #ifdef NS_DEBUG printf("SimplePluginInstance::SetWindow\n"); #endif --- 804,814 ---- NS_METHOD SimplePluginInstance::SetWindow(nsPluginWindow* window) ! { ! if (window) { ! printf("--SetWindow window->window %d window->type %d \n", ! window->window, window->type); ! } #ifdef NS_DEBUG printf("SimplePluginInstance::SetWindow\n"); #endif ---------------------- 2. Make npsimple. 3. Run mozilla and load mozilla/modules/plugin/test/samples/embed-test.html Expected results: 1. Non zero window->window on stdout 2. Some plugin gui on the page ------------
Summary: [dogfood] Plugin can not draw itself on linux and solaris. → [dogfood] Plugin can not draw itself on linux and solaris.
Whiteboard: [PDT+]
Assignee | ||
Comment 2•25 years ago
|
||
It's very likely that you aren't getting back a GtkWidget * from that call because we don't return those for the plugin type anymore. Sorry, I should have made that clear. Is nsPluginWindow * cast to a GtkWidget * on unix? It needs to be a GdkSuperWindow *. From there you should be able to use the SuperWin->bin_window or SuperWin->shell_window, depending on what you need.
Reporter | ||
Comment 3•25 years ago
|
||
>Is nsPluginWindow * cast to a GtkWidget * on unix? -- nspluginplugindefs.h -- struct nsPluginWindow { nsPluginPort* window; /* Platform specific window handle */ /* OS/2: x - Position of bottom left corner */ /* OS/2: y - relative to visible netscape window */ PRUint32 x; /* Position of top left corner relative */ PRUint32 y; /* to a netscape page. */ PRUint32 width; /* Maximum window size */ PRUint32 height; nsPluginRect clipRect; /* Clipping rectangle in port coordinates */ /* Used by MAC only. */ #ifdef XP_UNIX void* ws_info; /* Platform-dependent additonal data */ #endif /* XP_UNIX */ nsPluginWindowType type; /* Is this a window or a drawable? */ }; --------------------------- nsPluginPort is cast to a GtkWidget on Unix. >It needs to be a GdkSuperWindow * Do you mean GdkSuperWin? Do you mean nsPluginWindow or nsPluginPort ?
Assignee | ||
Comment 4•25 years ago
|
||
Sorry, you do need to cast it to a GdkSuperWin * and I mean the nsPluginPort. Is that returned via an NS_NATIVE_WINDOW or NS_NATIVE_WIDGET in nsIWidget::GetNativeData()? I'm guessing it's _WIDGET since in the past you've always cast it to a GtkWidget *.
Reporter | ||
Comment 5•25 years ago
|
||
The problem is nsPluginPort (window->window) equal to NULL. It has to point to GdkSuperWin, as you said. (before it pointed to GtkWidget)
I tried to change npsimple.cpp in function SimplePluginInstance::PlatformSetWindow to fPlatform.widget = GDK_SUPERWIN(window->window); but I get an error npsimple.cpp:1081: type `GtkWidget' is not a base type for type `GdkSuperWin' gmake: *** [npsimple.o] Error 1 Where else do we need to change this?
Assignee | ||
Updated•25 years ago
|
Assignee: av → blizzard
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•25 years ago
|
||
There's example code of how to fix this problem in the webshell/embed directory now. Follow that and you should be able to figure out how it works.
Updated•25 years ago
|
QA Contact: elig → shrir
Comment 9•25 years ago
|
||
Setting shrir as qa contact, shrir, can you see if you can verify this with 12/7 builds?
Assignee | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Assignee | ||
Comment 10•25 years ago
|
||
Oops, I should have read this more carefully. This shouldn't be closed.
Updated•25 years ago
|
Resolution: FIXED → ---
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•25 years ago
|
||
Fix checked in.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 12•25 years ago
|
||
Marking Verified/Fixed
Assignee | ||
Comment 13•24 years ago
|
||
Please ignore the spam. Changing address.
Assignee: blizzard → blizzard
Status: VERIFIED → NEW
Assignee | ||
Comment 14•24 years ago
|
||
bustage from my reassign
Status: NEW → RESOLVED
Closed: 25 years ago → 24 years ago
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•