diff -r 30342f40acbf -r e1bea15f9a39 webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Thu Jul 15 19:53:20 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Thu Aug 19 10:58:56 2010 +0300 @@ -285,7 +285,15 @@ PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler(); WTF::HashSet pluginObjs = plghandler->pluginObjects(); for(WTF::HashSet::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) { - notifyPluginOfPositionChange(static_cast (*it)); + PluginSkin* plg = static_cast (*it); + WebFrame* plgWebFrame = plg->getWebFrame(); + CBrCtl* plbrCtl = control(plg->frame()); + CBrCtl* pgbrCtl = control(this); + + if(plbrCtl == pgbrCtl) + { + notifyPluginOfPositionChange(static_cast (*it)); + } } } @@ -436,7 +444,9 @@ WebFrame* kit(Frame* frame) { - return frame ? ((WebFrameBridge *)frame->bridge())->webFrame(): NULL; + if( frame && frame->bridge() ) + return ((WebFrameBridge *)frame->bridge())->webFrame(); + return NULL; } WebView *kit(Page* page) @@ -603,6 +613,38 @@ } +void WebFrame::notifyPluginFocusChangeEvent(TBool visible) +{ + MWebCoreObjectWidget* view = NULL; + Frame* coreFrame = core(this); + + for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { + + PassRefPtr objects = frame->document()->objects(); + for (Node* n = objects->firstItem(); n; n = objects->nextItem()) { + view = widget(n); + if (view && static_cast(view)->isFlashPlugin()) { + if(visible) + static_cast(view)->HandleGainingForeground(); + else + static_cast(view)->HandleLosingForeground(); + } + } + + PassRefPtr embeds = frame->document()->embeds(); + for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) { + view = widget(n); + if (view && static_cast(view)->isFlashPlugin()) { + if(visible) + static_cast(view)->HandleGainingForeground(); + else + static_cast(view)->HandleLosingForeground(); + } + } + } + +} + void WebFrame::reCreatePlugins() { MWebCoreObjectWidget* view = NULL; @@ -615,8 +657,7 @@ view = widget(n); if (view) { plg = static_cast(view); - if (plg->activeStreams() > 0) - plg->reCreatePlugin(); + plg->reCreatePlugin(); } } PassRefPtr embeds = frame->document()->embeds(); @@ -624,8 +665,7 @@ view = widget(n); if (view) { plg = static_cast(view); - if (plg->activeStreams() > 0) - plg->reCreatePlugin(); + plg->reCreatePlugin(); } } }