116 if (pluginConsumable && pluginHandler->getVisiblePlugins().Count() > 0) { |
116 if (pluginConsumable && pluginHandler->getVisiblePlugins().Count() > 0) { |
117 for ( int i=0; i < pluginHandler->getVisiblePlugins().Count(); i++) { |
117 for ( int i=0; i < pluginHandler->getVisiblePlugins().Count(); i++) { |
118 PluginSkin* plugin = pluginHandler->getVisiblePlugins()[i]; |
118 PluginSkin* plugin = pluginHandler->getVisiblePlugins()[i]; |
119 if (plugin && plugin->pluginWin() && plugin->pluginWin()->containsPoint(*m_webview,aGesture.CurrentPos())) { |
119 if (plugin && plugin->pluginWin() && plugin->pluginWin()->containsPoint(*m_webview,aGesture.CurrentPos())) { |
120 if (plugin->pluginWin()->HandleGesture(aGesture)) { |
120 if (plugin->pluginWin()->HandleGesture(aGesture)) { |
121 if(!plugin->isActive()) { |
121 // Above call can end up in the deletion of the plugin, so check if the plugin is still alive |
122 plugin->activate(); |
122 if (pluginHandler->getVisiblePlugins().Find(plugin) != KErrNotFound) { |
123 } |
123 if(!plugin->isActive()) { |
124 else { |
124 plugin->activate(); |
125 m_webview->mainFrame()->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox); |
125 } |
126 m_webview->page()->focusController()->setFocusedNode(plugin->getElement(), m_webview->page()->focusController()->focusedOrMainFrame()); |
126 else { |
127 m_webview->brCtl()->updateDefaultSoftkeys(); |
127 m_webview->mainFrame()->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox); |
|
128 m_webview->page()->focusController()->setFocusedNode(plugin->getElement(), m_webview->page()->focusController()->focusedOrMainFrame()); |
|
129 m_webview->brCtl()->updateDefaultSoftkeys(); |
|
130 } |
128 } |
131 } |
129 return; |
132 return; |
130 } |
133 } |
131 break; |
134 break; |
132 } |
135 } |
468 |
471 |
469 m_lastTapEvent.iPosition = m_buttonDownEvent.iPosition; |
472 m_lastTapEvent.iPosition = m_buttonDownEvent.iPosition; |
470 m_lastTapEvent.iType = TPointerEvent::EButton1Up; |
473 m_lastTapEvent.iType = TPointerEvent::EButton1Up; |
471 m_lastTapEvent.iModifiers = 0; |
474 m_lastTapEvent.iModifiers = 0; |
472 |
475 |
473 // don't pass the event if the text input is not in valid format |
476 m_webview->fepTextEditor()->validateTextFormat(); |
474 if (m_webview->fepTextEditor()->validateTextFormat()) { |
477 |
475 if (!IS_NAVIGATION_NONE) { |
478 if (!IS_NAVIGATION_NONE) { |
476 // in case of navigation none button down was sent in buttonDownTimerCB() |
479 // in case of navigation none button down was sent in buttonDownTimerCB() |
477 m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame); |
480 m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame); |
478 } |
481 } |
479 m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, coreFrame); |
482 m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, coreFrame); |
480 } |
|
481 |
483 |
482 // special handling for broken image (why is this here??) |
484 // special handling for broken image (why is this here??) |
483 if (elType == TBrCtlDefs::EElementBrokenImage) { |
485 if (elType == TBrCtlDefs::EElementBrokenImage) { |
484 loadFocusedImage(m_webview); |
486 loadFocusedImage(m_webview); |
485 } |
487 } |