webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp
changeset 13 10e98eab6f85
parent 8 7c90e6132015
child 17 c8a366e56285
equal deleted inserted replaced
8:7c90e6132015 13:10e98eab6f85
    52 #include "Page.h"
    52 #include "Page.h"
    53 #include "Chrome.h"
    53 #include "Chrome.h"
    54 #include "ChromeClient.h"
    54 #include "ChromeClient.h"
    55 #include "FocusController.h"
    55 #include "FocusController.h"
    56 #include "WebTabbedNavigation.h"
    56 #include "WebTabbedNavigation.h"
       
    57 #include "SettingsContainer.h"
    57 #include "PluginHandler.h"
    58 #include "PluginHandler.h"
    58 
    59 
    59 #include "WebKitLogger.h"
    60 #include "WebKitLogger.h"
    60 using namespace WebCore;
    61 using namespace WebCore;
    61 using namespace EventNames;
    62 using namespace EventNames;
   293 // ======================================================================
   294 // ======================================================================
   294 void WebPointerEventHandler::handleTouchUp(const TGestureEvent& aEvent)
   295 void WebPointerEventHandler::handleTouchUp(const TGestureEvent& aEvent)
   295 {
   296 {
   296     m_highlightPos = TPoint(-1,-1);
   297     m_highlightPos = TPoint(-1,-1);
   297     m_highlightedNode = NULL;
   298     m_highlightedNode = NULL;
   298        
   299     PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
       
   300     pluginHandler->setPluginToActivate(NULL);
   299     m_webview->pageScrollHandler()->handleTouchUpGH(aEvent);
   301     m_webview->pageScrollHandler()->handleTouchUpGH(aEvent);
   300 }
   302 }
   301 
   303 
   302 // ======================================================================
   304 // ======================================================================
   303 // WebPointerEventHandler::handleMoveL
   305 // WebPointerEventHandler::handleMoveL
   304 // ======================================================================
   306 // ======================================================================
   305 void WebPointerEventHandler::handleMove(const TGestureEvent& aEvent)
   307 void WebPointerEventHandler::handleMove(const TGestureEvent& aEvent)
   306 {
   308 {
   307     TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType();
   309     TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType();
   308     TPoint curPos = aEvent.CurrentPos();
   310     TPoint curPos = aEvent.CurrentPos();
   309     
   311     PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
       
   312     pluginHandler->setPluginToActivate(NULL);
   310     m_buttonDownTimer.stop();
   313     m_buttonDownTimer.stop();
   311     HandleHighlightChange(curPos);
   314     HandleHighlightChange(curPos);
   312     
       
   313     if (elType == TBrCtlDefs::EElementActivatedObjectBox) {
       
   314         PluginSkin* plugin = m_webview->mainFrame()->focusedPlugin();               
       
   315         if (plugin) {
       
   316             plugin->deActivate();
       
   317         }
       
   318     }
       
   319     
   315     
   320     m_webview->pageScrollHandler()->handleScrollingGH(aEvent);
   316     m_webview->pageScrollHandler()->handleScrollingGH(aEvent);
   321 }
   317 }
   322 
   318 
   323 
   319 
   348             m_webview->GetContainerWindow().EnablePointerMoveBuffer();
   344             m_webview->GetContainerWindow().EnablePointerMoveBuffer();
   349         }
   345         }
   350         else if (aPointerEvent.iType == TPointerEvent::EButton1Up) {
   346         else if (aPointerEvent.iType == TPointerEvent::EButton1Up) {
   351             m_webview->GetContainerWindow().DisablePointerMoveBuffer();
   347             m_webview->GetContainerWindow().DisablePointerMoveBuffer();
   352         }
   348         }
       
   349         if (m_webview->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone) {
       
   350             TPointerEvent event;
       
   351             event.iPosition = aPointerEvent.iPosition;
       
   352             event.iModifiers = 0;
       
   353             event.iType = aPointerEvent.iType;
       
   354 
       
   355             if (event.iType == TPointerEvent::EDrag) event.iType = TPointerEvent::EMove;
       
   356             m_webview->sendMouseEventToEngine(event.iType, event.iPosition, core(m_webview->mainFrame()));
       
   357             return;
       
   358         }
       
   359     }
       
   360 
       
   361     if (m_webview->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) {
       
   362         m_webview->tabbedNavigation()->updateCursorPosition(aPointerEvent.iPosition);
   353     }
   363     }
   354 
   364 
   355 #ifdef BRDO_USE_GESTURE_HELPER
   365 #ifdef BRDO_USE_GESTURE_HELPER
   356     m_gestureHelper->HandlePointerEventL(aPointerEvent);
   366     m_gestureHelper->HandlePointerEventL(aPointerEvent);
   357 #endif    
   367 #endif