diff -r ac77f89b1d9e -r 4917f9bf7995 webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp --- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Wed Apr 14 17:06:56 2010 +0300 +++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp Tue Apr 27 17:46:17 2010 +0300 @@ -280,28 +280,21 @@ return frameLoader()->documentLoader(); } -void WebFrame::notifyPluginsOfScrolling() -{ - 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()) - notifyPluginOfScrolling(n->renderer()); - - PassRefPtr embeds = frame->document()->embeds(); - for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) - notifyPluginOfScrolling(n->renderer()); - - } +void WebFrame::notifyPluginsOfPositionChange() +{ + 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)); + } } -void WebFrame::notifyPluginOfScrolling(RenderObject* renderer) +void WebFrame::notifyPluginOfPositionChange(PluginSkin* plg) { - MWebCoreObjectWidget* view = widget(renderer); //Don't repaint the plugin objects if Browser is in PageView mode - if (view) { - view->positionChanged(); - TRect r = m_view->toDocCoords(static_cast(view)->getPluginWinRect()); + if (plg) { + plg->positionChanged(); + TRect r = m_view->toDocCoords(plg->getPluginWinRect()); m_view->topView()->scheduleRepaint(r); } } @@ -514,29 +507,11 @@ } void WebFrame::makeVisiblePlugins(TBool visible) -{ - MWebCoreObjectWidget* view = NULL; - int pluginCount = 0; - Frame* coreFrame = core(this); - PluginSkin* ptr = 0; - 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) { - ptr = static_cast(view); - ptr->makeVisible(visible); - } - } - PassRefPtr embeds = frame->document()->embeds(); - for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) { - view = widget(n); - if (view) { - ptr = static_cast(view); - ptr->makeVisible(visible); - } - } +{ + PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler(); + WTF::HashSet pluginObjs = plghandler->pluginObjects(); + for(WTF::HashSet::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) { + static_cast (*it)->makeVisible(visible); } } @@ -600,5 +575,15 @@ } } +void WebFrame::reCreatePlugins() +{ + PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler(); + WTF::HashSet pluginObjs = plghandler->pluginObjects(); + for(WTF::HashSet::iterator it = pluginObjs.begin() ; it != pluginObjs.end() ; ++it ) { + PluginSkin* plg = static_cast (*it); //->PlayPauseNotify(pause); + if(plg->activeStreams() > 0) + plg->reCreatePlugin(); + } +} // END OF FILE