[webkit-dev] Puzzled, can anyone give me a hint?

Joe Mason joe.mason at torchmobile.com
Mon Jun 15 09:14:42 PDT 2009


TianShijun wrote:
> Hi Joe,
> Now I get to know how it work in Qt/Windows. But i found that in
> Qt/X11, only PluginView.cpp and PluginViewQt.cpp will be compiled. Is
> that mean all the platformPluginWidget() will return 0? There are many
> "platformPluginWidget()->foo()" in PluginViewQt.cpp.

Take a closer look at PluginView.h:

#if (PLATFORM(QT) && PLATFORM(WIN_OS)) || defined(XP_MACOSX)
// On Mac OSX and Qt/Windows the plugin does not have its own native widget,
// but is using the containing window as its reference for
positioning/painting.
PlatformPluginWidget m_window;
public:
PlatformPluginWidget platformPluginWidget() const { return m_window; }
void setPlatformPluginWidget(PlatformPluginWidget widget) { m_window =
widget; }
#else
public:
PlatformPluginWidget platformPluginWidget() const { return
platformWidget(); }
#endif

On Mac and Qt/Win, platformPluginWidget() returns m_window, but on all
others (including Qt/X11) m_window doesn't even exist and it just
returns platformWidget().

Joe


More information about the webkit-dev mailing list