Closed Bug 484923 Opened 14 years ago Closed 14 years ago
Test plugin needs to support windowed mode on GTK2/X
To test the compositor changes to hoist plugin widgets to the top-level window, we need the test plugin to support windowed mode (currently it's windowless only). This bug is about doing that for GTK2. Here's my proposed API: +== Windowed/windowless mode == + +The test plugin is windowless by default. + +The test plugin supports the following parameter: + +* wmode="window" +The plugin will be given a native widget on platforms that support this +(Windows and X). + +The test plugin object supports the following scriptable method: + +* hasWidget() +Returns true if the plugin has an associated widget. This will return true if +wmode="window" was specified and the platform supports windowed plugins. The hasWidget() method will be useful for tests that depend on the plugin being windowed (or not) --- they won't have to hardcode assumptions about which platforms support windowed or windowless.
I plan to do this for GTK2 first and file a separate bug for similar support on Windows.
As described. I couldn't resist cleaning up the test plugin code a little bit. In particular pluginDraw didn't need to be exposed to nptest.cpp. A bunch of functions could be static. I replaced the if/else stack in scriptableInvoke with a loop over an array. I've also had to add a pluginInstanceShutdown hook. I had to refactor the GTK2 drawing code to accomodate drawing into a plugin window.
Attachment #369210 - Flags: review?(joshmoz)
The patch is on top of the patch in bug 469831.
14 years ago
Attachment #369210 - Flags: review?(mozbugz)
Filed bug 485120 for Windows.
Attachment #369210 - Flags: review?(mozbugz) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
14 years ago
I noticed (in the context of your patch) that the Makefile looks a little goofy: http://hg.mozilla.org/mozilla-central/annotate/2c97a6aeb0db/modules/plugin/test/mochitest/Makefile.in#l47 _TEST_FILES gets redefined. Can you just kill that first line the next time you touch this file?
You need to log in before you can comment on or make changes to this bug.