webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:28:30 +0100
branchRCL_3
changeset 94 919f36ff910f
parent 93 79859ed3eea9
child 99 ca6d8a014f4b
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201034 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     1
/*
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     8
*
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    11
*
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    12
* Contributors:
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    13
*
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    14
* Description:
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    15
*
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    16
*/
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    17
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    18
#include <browser_platform_variant.hrh>
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    19
#include "config.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    20
#include "../../bidi.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    21
#include <AknUtils.h>
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    22
#ifdef BRDO_TOUCH_ENABLED_FF
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    23
#include <touchfeedback.h>
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    24
#endif // BRDO_TOUCH_ENABLED_FF
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    25
#include "brctl.h"
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    26
#include <brctldefs.h>
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    27
#include "WebPointerEventHandler.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    28
#include "WebView.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    29
#include "WebFrame.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    30
#include "WebFrameView.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    31
#include "WebCursor.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    32
#include "WebPopupDrawer.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    33
#include "WebFormFillPopup.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    34
#include "WebPageScrollHandler.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    35
#include "WebFepTextEditor.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    36
#include "PluginSkin.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    37
#include "WebUtil.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    38
#include "WebPageFullScreenHandler.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    39
#include "PluginWin.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    40
#include "WebFrameBridge.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    41
#include "Page.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    42
#include "Chrome.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    43
#include "ChromeClient.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    44
#include "FocusController.h"
8
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    45
#include "WebTabbedNavigation.h"
13
10e98eab6f85 Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 8
diff changeset
    46
#include "SettingsContainer.h"
8
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
    47
#include "PluginHandler.h"
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    48
#include "WebGestureInterface.h"
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    49
#include "WebPagePinchZoomHandler.h"
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    50
#include "WebScrollingDeceleratorGH.h"
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    51
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    52
#include "WebKitLogger.h"
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    53
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    54
#define IS_NAVIGATION_NONE      (m_webview->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone)
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    55
#define IS_TABBED_NAVIGATION    (m_webview->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    56
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    57
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    58
// WebPointerEventHandler::NewL
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    59
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    60
WebPointerEventHandler* WebPointerEventHandler::NewL(WebView* view)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    61
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    62
    WebPointerEventHandler* self = new (ELeave) WebPointerEventHandler(view);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    63
    CleanupStack::PushL( self );
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    64
    self->ConstructL();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    65
    CleanupStack::Pop();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    66
    return self;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    67
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    68
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    69
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    70
// WebPointerEventHandler::WebPointerEventHandler
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    71
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    72
WebPointerEventHandler::WebPointerEventHandler(WebView* view)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    73
    : m_webview(view),
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    74
      m_isHighlighted(false),
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    75
      m_highlightedNode(NULL),
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    76
      m_ignoreTap(false),
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    77
      m_gestureInterface(NULL)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    78
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    79
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    80
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    81
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    82
// WebPointerEventHandler::~WebPointerEventHandler
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    83
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    84
WebPointerEventHandler::~WebPointerEventHandler()
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    85
{
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    86
   delete m_gestureInterface;
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    87
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    88
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    89
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    90
// WebPointerEventHandler::ConstructL
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    91
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    92
void WebPointerEventHandler::ConstructL()
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    93
{
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    94
#ifdef BRDO_USE_GESTURE_HELPER
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    95
  m_gestureInterface = WebGestureInterface::NewL(m_webview);
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    96
#else
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    97
  m_gestureInterface = NULL;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
    98
#endif
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
    99
}
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   100
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   101
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   102
// ======================================================================
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   103
// WebPointerEventHandler::HandleGestureEventL
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   104
// ======================================================================
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   105
void  WebPointerEventHandler::HandleGestureEventL(const TStmGestureEvent& aGesture)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   106
{
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   107
    TStmGestureUid uid = aGesture.Code();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   108
    if (m_webview->pinchZoomHandler()->isPinchActive() && uid != stmGesture::EGestureUidPinch)
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   109
        return;
73
a1a5d4e727e8 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 70
diff changeset
   110
    
8
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   111
    TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType();
73
a1a5d4e727e8 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 70
diff changeset
   112
    
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   113
    bool pluginConsumable = isPluginConsumable(uid);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   114
    PluginHandler* pluginHandler = StaticObjectsContainer::instance()->pluginHandler();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   115
    
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   116
    if (pluginConsumable && pluginHandler->getVisiblePlugins().Count() > 0) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   117
        for ( int i=0; i < pluginHandler->getVisiblePlugins().Count(); i++) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   118
             PluginSkin* plugin = pluginHandler->getVisiblePlugins()[i];
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   119
             if (plugin && plugin->pluginWin() && plugin->pluginWin()->containsPoint(*m_webview,aGesture.CurrentPos())) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   120
                 if (plugin->pluginWin()->HandleGesture(aGesture)) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   121
                     // Above call can end up in the deletion of the plugin, so check if the plugin is still alive
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   122
                     if (pluginHandler->getVisiblePlugins().Find(plugin) != KErrNotFound) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   123
                         if(!plugin->isActive()) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   124
                             plugin->activate();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   125
                         }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   126
                         else {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   127
                             m_webview->mainFrame()->frameView()->topView()->setFocusedElementType(TBrCtlDefs::EElementActivatedObjectBox);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   128
                             m_webview->page()->focusController()->setFocusedNode(plugin->getElement(), m_webview->page()->focusController()->focusedOrMainFrame());                        
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   129
                             m_webview->brCtl()->updateDefaultSoftkeys();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   130
                         }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   131
                     }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   132
                     return;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   133
                 }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   134
                 break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   135
             }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   136
        }
93
79859ed3eea9 Revision: 201034
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 92
diff changeset
   137
    }
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   138
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   139
    updateCursor(aGesture.CurrentPos());
93
79859ed3eea9 Revision: 201034
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 92
diff changeset
   140
    if (IS_TABBED_NAVIGATION) {
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   141
        m_webview->tabbedNavigation()->updateCursorPosition(aGesture.CurrentPos());
8
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   142
    }
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   143
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   144
    switch(uid) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   145
        case stmGesture::EGestureUidTouch:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   146
        {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   147
            if (m_webview->viewIsScrolling()) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   148
                m_ignoreTap = true;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   149
                m_webview->pageScrollHandler()->handleTouchDownGH(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   150
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   151
            else {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   152
                handleTouchDownL(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   153
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   154
            break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   155
        }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   156
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   157
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   158
        case stmGesture::EGestureUidTap:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   159
        {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   160
            if (aGesture.Type() == stmGesture::ETapTypeSingle) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   161
                if (!m_ignoreTap) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   162
                    handleTapL(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   163
                }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   164
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   165
            else {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   166
                handleDoubleTap(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   167
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   168
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   169
                break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   170
        }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   171
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   172
        case stmGesture::EGestureUidRelease:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   173
        {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   174
            m_ignoreTap = false;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   175
            handleTouchUp(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   176
			m_webview->resumeJsTimers(); // resume js timers
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   177
			m_webview->setViewIsScrolling(false); 
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   178
            break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   179
        }
42
d39add9822e2 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 38
diff changeset
   180
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   181
        case stmGesture::EGestureUidPan:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   182
        {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   183
            // pause js timers (if not already done)
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   184
            if(!m_webview->jsTimersPaused()) 
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   185
                m_webview->pauseJsTimers();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   186
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   187
            handleMove(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   188
            break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   189
        }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   190
        case stmGesture::EGestureUidFlick:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   191
        {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   192
            m_ignoreTap = false;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   193
            if (!IS_NAVIGATION_NONE) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   194
                handleTouchUp(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   195
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   196
            else {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   197
                Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   198
                m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up, m_highlightPos, frm);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   199
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   200
            break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   201
        }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   202
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   203
        case stmGesture::EGestureUidPinch:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   204
        {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   205
        if (m_webview->viewIsScrolling()) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   206
            m_webview->pageScrollHandler()->stopScrolling();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   207
        }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   208
        if(!m_webview->inPageViewMode())
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   209
            {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   210
            handlePinchZoomL(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   211
            if(aGesture.GestureState() != EGestureEnter) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   212
                m_webview->resumeJsTimers(); // resume js timers
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   213
                }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   214
            }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   215
            break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   216
        }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   217
        default:
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   218
            break;
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   219
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   220
    }
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   221
    return;
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   222
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   223
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   224
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   225
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   226
// WebPointerEventHandler::handleTap
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   227
// ======================================================================
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   228
void WebPointerEventHandler::handleTapL(const TStmGestureEvent& aGesture)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   229
{
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   230
    m_lastTapEvent = m_currentEvent;
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   231
    if(!m_webview->inPageViewMode()){
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   232
    	doTapL();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   233
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   234
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   235
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   236
//  WebPointerEventHandler::handleDoubleTap
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   237
//======================================================================
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   238
void WebPointerEventHandler::handleDoubleTap(const TStmGestureEvent& aGesture)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   239
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   240
    if ( !m_webview->viewIsScrolling() &&
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   241
         (m_webview->brCtl()->capabilities() & TBrCtlDefs::ECapabilityFitToScreen)) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   242
        if (m_isHighlighted){
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   243
            dehighlight();
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   244
        }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   245
        m_webview->setZoomLevelAdaptively();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   246
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   247
    else {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   248
        m_webview->resetLastZoomLevelIfNeeded();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   249
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   250
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   251
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   252
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   253
// WebPointerEventHandler::handleTouchDownL
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   254
//======================================================================
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   255
void WebPointerEventHandler::handleTouchDownL(const TStmGestureEvent& aGesture)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   256
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   257
    TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType();
8
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   258
    PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   259
    PluginSkin* pluginToActivate = pluginHandler->pluginToActivate();
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   260
    m_buttonDownEvent = m_currentEvent;
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   261
    m_highlightPos = aGesture.CurrentPos();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   262
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   263
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   264
    if (!IS_NAVIGATION_NONE) {
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   265
        m_webview->pageScrollHandler()->handleTouchDownGH(aGesture);
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   266
    }
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   267
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   268
    if ( TBrCtlDefs::EElementActivatedObjectBox == elType) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   269
        PluginSkin* plugin = m_webview->mainFrame()->focusedPlugin();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   270
        if (plugin && plugin->pluginWin()) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   271
            if (!plugin->getClipRect().Contains(m_buttonDownEvent.iPosition)) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   272
                plugin->deActivate();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   273
            }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   274
            else {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   275
                plugin->pluginWin()->HandlePointerEventL(m_buttonDownEvent);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   276
            }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   277
        }
8
7c90e6132015 Revision: 200915
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents: 0
diff changeset
   278
    }
64
ac77f89b1d9e Revision: 201013
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 62
diff changeset
   279
    
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   280
    doTouchDownL();
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   281
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   282
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   283
// ======================================================================
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   284
// WebPointerEventHandler::handleTouchUp
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   285
// ======================================================================
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   286
void WebPointerEventHandler::handleTouchUp(const TStmGestureEvent& aGesture)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   287
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   288
    m_highlightPos = TPoint(-1,-1);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   289
    m_highlightedNode = NULL;
13
10e98eab6f85 Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 8
diff changeset
   290
    PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
10e98eab6f85 Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 8
diff changeset
   291
    pluginHandler->setPluginToActivate(NULL);
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   292
    if (!IS_NAVIGATION_NONE) {
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   293
        m_webview->pageScrollHandler()->handleTouchUpGH(aGesture);
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   294
    }
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   295
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   296
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   297
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   298
// WebPointerEventHandler::handleMoveL
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   299
// ======================================================================
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   300
void WebPointerEventHandler::handleMove(const TStmGestureEvent& aGesture)
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   301
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   302
    TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType();
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   303
    TPoint curPos =  aGesture.CurrentPos();
13
10e98eab6f85 Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 8
diff changeset
   304
    PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
10e98eab6f85 Revision: 200919
Pat Downey <patrick.downey@nokia.com>
parents: 8
diff changeset
   305
    pluginHandler->setPluginToActivate(NULL);
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   306
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   307
    if (IS_NAVIGATION_NONE) {
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   308
        Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame();
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   309
        m_webview->sendMouseEventToEngine(TPointerEvent::EMove, curPos, frm);
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   310
    }
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   311
    else {
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   312
    HandleHighlightChange(curPos);
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   313
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   314
    m_webview->pageScrollHandler()->handleScrollingGH(aGesture);
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   315
    }
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   316
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   317
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   318
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   319
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   320
// WebPointerEventHandler::HandlePointerEventL
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   321
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   322
void WebPointerEventHandler::HandlePointerEventL(const TPointerEvent& aPointerEvent)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   323
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   324
    m_currentEvent = aPointerEvent;
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   325
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   326
    if (m_webview->isSynchRequestPending()) {
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   327
       return;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   328
    }
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   329
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   330
    // Handle graphical history - should never happen, as HistoryView handles this event by itself
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   331
    if ( m_webview->brCtl()->historyHandler()->historyController()->historyView()) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   332
        return;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   333
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   334
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   335
    // Handle FormFill popup
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   336
    if (m_webview->formFillPopup() && m_webview->formFillPopup()->IsVisible()) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   337
        m_webview->formFillPopup()->HandlePointerEventL(aPointerEvent);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   338
        return;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   339
    }
58
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 42
diff changeset
   340
    
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   341
    //if scrolling is going on, it need to be stopped immediately when user touches down    
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   342
    if (aPointerEvent.iType == TPointerEvent::EButton1Down && m_webview->viewIsScrolling()) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   343
        WebScrollingDeceleratorGH* scrollDecelGH = m_webview->pageScrollHandler()->ScrollingDeceleratorGH();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   344
        if(scrollDecelGH) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   345
            scrollDecelGH->cancelDecel();            
58
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 42
diff changeset
   346
        }
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 42
diff changeset
   347
    }
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   348
    
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   349
    // pause JS timers for better ui response    
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   350
    if (aPointerEvent.iType == TPointerEvent::EButton1Down) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   351
        m_webview->pauseJsTimers();    
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   352
    }
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   353
#ifdef BRDO_USE_GESTURE_HELPER
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   354
      m_gestureInterface->HandlePointerEventL(aPointerEvent);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   355
#endif
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   356
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   357
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   358
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   359
// WebPointerEventHandler::HandleHighlightChange
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   360
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   361
void WebPointerEventHandler::HandleHighlightChange(const TPoint &aPoint)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   362
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   363
    if (!m_highlightedNode || !m_isHighlighted)    return;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   364
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   365
    if (!canDehighlight(aPoint)) return;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   366
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   367
    dehighlight();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   368
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   369
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   370
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   371
// WebPointerEventHandler::highlitableElement
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   372
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   373
TBrCtlDefs::TBrCtlElementType WebPointerEventHandler::highlitableElement()
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   374
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   375
    TRect elRect;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   376
    TBrCtlDefs::TBrCtlElementType elType = TBrCtlDefs::EElementNone;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   377
    Frame* coreFrame = core(m_webview->mainFrame());
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   378
    WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   379
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   380
    TPointerEvent event;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   381
    TPoint pos = cursor->position();
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   382
    WebFrame* wfrm = cursor->getFrameAtPoint(pos);
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   383
    Frame* frm = core(wfrm);
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   384
    TPoint pt(wfrm->frameView()->viewCoordsInFrameCoords(pos));
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   385
    TPoint nodePoint;
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   386
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   387
    Element* eventNode = frm->document()->elementFromPoint(pt.iX, pt.iY);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   388
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   389
    m_highlightedNode = NULL;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   390
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   391
    Node* retNode = 0;
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   392
    frm->bridge()->getTypeFromElement(eventNode, elType, elRect, retNode);
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   393
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   394
    if (elType == TBrCtlDefs::EElementNone) {
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   395
        Node* n = wfrm->getClosestAnchorElement(cursor->position(), pos);
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   396
        if (n) {
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   397
            wfrm = cursor->getFrameAtPoint(pos);
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   398
            frm = core(wfrm);
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   399
            //eventNode = frm->document()->elementFromPoint(pos.iX, pos.iY);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   400
            TPoint newPos(wfrm->frameView()->viewCoordsInFrameCoords(pos));
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   401
            eventNode = frm->document()->elementFromPoint(newPos.iX, newPos.iY);
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   402
            frm->bridge()->getTypeFromElement(eventNode, elType, elRect, retNode);
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   403
            TPoint nodePoint = n->getRect().Rect().Center();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   404
            m_offset = (pt.iX- nodePoint.iX)*(pt.iX- nodePoint.iX) +
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   405
                       (pt.iY- nodePoint.iY)*(pt.iY- nodePoint.iY);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   406
        }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   407
    }
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
   408
    m_highlightedNode = eventNode;
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   409
    if (m_highlightedNode) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   410
        m_highlightPos = pos;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   411
        m_buttonDownEvent.iPosition = m_highlightPos;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   412
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   413
    m_webview->setFocusedElementType(elType);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   414
    return elType;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   415
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   416
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   417
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   418
// WebPointerEventHandler::isHighlitableElement
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   419
// ======================================================================
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   420
bool WebPointerEventHandler::isHighlitableElement(TBrCtlDefs::TBrCtlElementType& elType)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   421
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   422
    return (elType == TBrCtlDefs::EElementAnchor
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   423
                    || elType == TBrCtlDefs::EElementInputBox
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   424
                    || elType == TBrCtlDefs::EElementActivatedInputBox
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   425
                    || elType == TBrCtlDefs::EElementButton
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   426
                    || elType == TBrCtlDefs::EElementCheckBoxChecked
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   427
                    || elType == TBrCtlDefs::EElementCheckBoxUnChecked
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   428
                    || elType == TBrCtlDefs::EElementTextAreaBox
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   429
                    || elType == TBrCtlDefs::EElementRadioButtonSelected
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   430
                    || elType == TBrCtlDefs::EElementRadioButtonUnSelected
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   431
                    || elType == TBrCtlDefs::EElementTelAnchor
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   432
                    || elType == TBrCtlDefs::EElementMailtoAnchor
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   433
                    || elType == TBrCtlDefs::EElementSmartLinkTel
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   434
                    || elType == TBrCtlDefs::EElementSmartLinkEmail
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   435
                    || elType == TBrCtlDefs::EElementSmartLinkVoip);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   436
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   437
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   438
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   439
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   440
// WebPointerEventHandler::doTapL
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   441
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   442
void WebPointerEventHandler::doTapL()
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   443
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   444
    TBrCtlDefs::TBrCtlElementType elType = m_webview->focusedElementType();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   445
    Frame* coreFrame = core(m_webview->mainFrame());
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   446
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   447
#ifdef BRDO_TOUCH_ENABLED_FF
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   448
    if (m_isHighlighted)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   449
    {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   450
        MTouchFeedback* feedback = MTouchFeedback::Instance();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   451
        if (feedback)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   452
           {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   453
           feedback->InstantFeedback(ETouchFeedbackBasic);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   454
           }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   455
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   456
#endif // BRDO_TOUCH_ENABLED_FF
62
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   457
    
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   458
     /*
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   459
      * We assume that if element visibility has been changed
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   460
      * between "up" and "down" that means that some node event
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   461
      * listener (onMouseOver etc) handling happened and we don't
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   462
      * want to send a click (mouse press + mouse release) event.
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   463
      * The exception is editable element, since we want VKB anyway
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   464
      */
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   465
     if (!IS_NAVIGATION_NONE &&
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   466
         elType != TBrCtlDefs::EElementActivatedInputBox &&
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   467
         elType != TBrCtlDefs::EElementTextAreaBox &&
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   468
         m_webview->page()->chrome()->client()->elementVisibilityChangedByMouse()) {
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   469
         return;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   470
     }
42
d39add9822e2 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 38
diff changeset
   471
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   472
     m_lastTapEvent.iPosition = m_buttonDownEvent.iPosition;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   473
     m_lastTapEvent.iType = TPointerEvent::EButton1Up;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   474
     m_lastTapEvent.iModifiers = 0;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   475
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   476
     m_webview->fepTextEditor()->validateTextFormat();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   477
     
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   478
     if (!IS_NAVIGATION_NONE) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   479
         // in case of navigation none button down was sent in buttonDownTimerCB()
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   480
         m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   481
     }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   482
     m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up,  m_highlightPos, coreFrame);
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   483
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   484
    // special handling for broken image (why is this here??)
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   485
    if (elType == TBrCtlDefs::EElementBrokenImage) {
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   486
        loadFocusedImage(m_webview);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   487
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   488
    else if (elType == TBrCtlDefs::EElementActivatedObjectBox) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   489
        PluginSkin* plugin = m_webview->mainFrame()->focusedPlugin();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   490
        if(plugin && plugin->pluginWin() && plugin->getClipRect().Contains(m_lastTapEvent.iPosition)){
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   491
            plugin->pluginWin()->HandlePointerEventL(m_lastTapEvent);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   492
        }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   493
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   494
    else {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   495
        m_webview->activateVirtualKeyboard();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   496
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   497
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   498
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   499
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   500
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   501
// WebPointerEventHandler::deHighlight
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   502
//-----------------------------------------------------------------------------
62
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   503
void  WebPointerEventHandler::dehighlight()
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   504
{
62
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   505
    // send dehighlight event to engine by passing -1, -1
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   506
    // sending any other pointer value may result in highligh of other links
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   507
    m_highlightPos = TPoint(-1, -1);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   508
    m_isHighlighted = EFalse;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   509
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   510
    Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame();
62
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   511
    m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, frm);
42
d39add9822e2 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 38
diff changeset
   512
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   513
    m_highlightedNode = NULL;
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   514
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   515
    m_webview->syncRepaint();
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   516
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   517
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   518
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   519
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   520
// WebPointerEventHandler::canDehighlight
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   521
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   522
 bool WebPointerEventHandler::canDehighlight(const TPoint &aPoint)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   523
 {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   524
    TBool checkDehighlight = true;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   525
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   526
    if (!m_webview->viewIsScrolling())
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   527
    {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   528
        WebFrame* frm = StaticObjectsContainer::instance()->webCursor()->getFrameUnderCursor();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   529
        IntPoint framePoint = frm->frameView()->viewCoordsInFrameCoords(aPoint);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   530
        if (m_highlightedNode->getRect().contains(framePoint)) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   531
            checkDehighlight = false;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   532
        } // check if new points are coming towards closest element
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   533
        else if(m_offset) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   534
            //Calculate the new offset
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   535
           IntPoint nodePoint = m_highlightedNode->getRect().Rect().Center();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   536
           TInt newoffset = (framePoint.x()- nodePoint.x())*(framePoint.x()- nodePoint.x()) + (framePoint.y()- nodePoint.y())*(framePoint.y()- nodePoint.y());
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   537
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   538
           if(newoffset <= m_offset ) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   539
                m_offset = newoffset;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   540
                checkDehighlight = false;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   541
           }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   542
           else {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   543
               m_offset =0;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   544
               checkDehighlight = true;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   545
           }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   546
        }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   547
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   548
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   549
    return checkDehighlight;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   550
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   551
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   552
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   553
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   554
// WebPointerEventHandler::buttonDownTimerCallback
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   555
//-----------------------------------------------------------------------------
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   556
void WebPointerEventHandler::doTouchDownL()
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   557
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   558
    Frame* coreFrame = core(m_webview->mainFrame());
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   559
    TPointerEvent event;
59
1f3c3f2f5b0a Revision: 201009
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 58
diff changeset
   560
    
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   561
    TBrCtlDefs::TBrCtlElementType elType = highlitableElement();
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   562
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   563
    if (!isHighlitableElement(elType)) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   564
        elType = TBrCtlDefs::EElementNone;
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   565
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   566
    m_isHighlighted = (m_highlightedNode != NULL) && (elType != TBrCtlDefs::EElementNone) ;
62
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   567
    m_webview->page()->chrome()->client()->setElementVisibilityChanged(false);
c711bdda59f4 Revision: 201012
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   568
    
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   569
    /*
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   570
     * Tabbed navigation might already set the focused node.
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   571
     * If it's the same as m_highlightedNode FocuseController::setFocusedNode()
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   572
     * wouldn't do anything and setEditable won't be called.
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   573
     * So we are setting focused node to NULL here and let mouse event handler
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   574
     * set it through FocuseController::setFocusedNode()
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   575
     */
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   576
    if (IS_TABBED_NAVIGATION &&
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   577
       (elType == TBrCtlDefs::EElementInputBox || elType == TBrCtlDefs::EElementTextAreaBox)) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   578
           coreFrame->document()->setFocusedNode(NULL);
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   579
    }
42
d39add9822e2 Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 38
diff changeset
   580
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   581
    if (!IS_NAVIGATION_NONE) {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   582
		m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, coreFrame);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   583
    } 
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   584
    else {
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   585
        m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   586
    }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   587
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   588
}
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   589
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   590
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   591
//-----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   592
// WebPointerEventHandler::updateCursor
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   593
//----------------------------------------------------------------------------
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   594
void WebPointerEventHandler::updateCursor(const TPoint& pos)
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   595
{
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   596
    WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   597
    if (cursor) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   598
        if (pos != TPoint(0, 0)) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   599
            cursor->setPosition(pos);
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   600
        }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   601
        if (m_webview->showCursor()) {
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   602
            cursor->resetTransparency();
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   603
            m_webview->setShowCursor(false);
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   604
            cursor->cursorUpdate(false);
0
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   605
        }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   606
    }
dd21522fd290 Revision: 200911
Kiiskinen Klaus (Nokia-D-MSW/Tampere) <klaus.kiiskinen@nokia.com>
parents:
diff changeset
   607
}
94
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   608
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   609
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   610
//-----------------------------------------------------------------------------
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   611
// WebPointerEventHandler::handlePinchZoom
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   612
//----------------------------------------------------------------------------
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   613
void  WebPointerEventHandler::handlePinchZoomL(const TStmGestureEvent& aGesture)
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   614
{
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   615
 //dehighlight anything which is highlighted already
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   616
    if (m_isHighlighted){
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   617
        dehighlight();
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   618
    }
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   619
    m_webview->pinchZoomHandler()->handlePinchGestureEventL(aGesture);
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   620
}
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   621
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   622
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   623
//-----------------------------------------------------------------------------
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   624
// WebPointerEventHandler::isPluginConsumable
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   625
//-----------------------------------------------------------------------------
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   626
bool WebPointerEventHandler::isPluginConsumable(const TStmGestureUid uid)
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   627
{
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   628
    //  Gestures which a Plugin can consume
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   629
    return ( uid == stmGesture::EGestureUidRelease ||
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   630
             uid == stmGesture::EGestureUidTap ||
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   631
             uid == stmGesture::EGestureUidTouch ||
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   632
             uid == stmGesture::EGestureUidLongPress ||
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   633
             (uid == stmGesture::EGestureUidPan && m_webview->widgetExtension()) ||     // Currently Pan is consumed in Widget mode
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   634
             (uid == stmGesture::EGestureUidFlick && m_webview->widgetExtension())
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   635
           ); 
919f36ff910f Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 93
diff changeset
   636
}