[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:

// 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
PlatformPluginWidget m_window;
PlatformPluginWidget platformPluginWidget() const { return m_window; }
void setPlatformPluginWidget(PlatformPluginWidget widget) { m_window =
widget; }
PlatformPluginWidget platformPluginWidget() const { return
platformWidget(); }

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().


More information about the webkit-dev mailing list