Revision: 200941
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 26 Oct 2009 08:28:45 +0200
changeset 27 60c5402cb945
parent 17 c8a366e56285
child 28 23198bb167b0
child 29 a758fa0cb043
Revision: 200941 Kit: 200943
browserutilities/aiwbrowserprovider/Group/AiwBrowserProvider.mmp
browserutilities/browserdialogsprovider/Group/browserdialogsprovider.mmp
browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp
browserutilities/browsertelservice/group/BrowserTelService.mmp
browserutilities/connectionmanager/Group/ConnectionManager.mmp
browserutilities/connectionmanager/Inc/ConnMan.hrh
browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLib.mmp
browserutilities/feedsengine/group/FeedsApp.mmp
browserutilities/schemehandler/SchemeApp/group/SchemeApp.mmp
browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp
browserutilities/webutils/conf/webutils.confml
codhandler/Loc/CodViewer.loc
codhandler/codui/group/CodUi.mmp
codhandler/codviewer/group/CodViewer.mmp
codhandler/ddviewer/group/DdViewer.mmp
codhandler/roapapp/group/RoapApp.mmp
web_plat/browser_platform_api/inc/Browser_platform_variant.hrh
web_pub/browser_control_api/inc/BrCtlDefs.h
web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h
web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp
web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp
web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp
web_pub/settings_api/inc/BrowserUiSDKCRKeys.h
webengine/device/inc/Device.h
webengine/device/src/Device.cpp
webengine/osswebengine/JavaScriptCore/bindings/c/c_utility.cpp
webengine/osswebengine/WebCore/dom/Document.cpp
webengine/osswebengine/WebCore/dom/Document.h
webengine/osswebengine/WebCore/dom/EventNames.h
webengine/osswebengine/WebCore/dom/EventTargetNode.cpp
webengine/osswebengine/WebCore/html/HTMLAnchorElement.cpp
webengine/osswebengine/WebCore/page/ChromeClient.h
webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp
webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h
webengine/osswebengine/WebCore/platform/StringImpl.cpp
webengine/osswebengine/WebCore/platform/StringImpl.h
webengine/osswebengine/WebCore/platform/Widget.h
webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp
webengine/osswebengine/WebCore/platform/symbian/OOMHandler.h
webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h
webengine/osswebengine/WebCore/platform/symbian/ScrollViewSymbian.cpp
webengine/osswebengine/WebCore/platform/symbian/WidgetSymbian.cpp
webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp
webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h
webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp
webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h
webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp
webengine/osswebengine/WebCore/rendering/RenderListBox.h
webengine/osswebengine/WebCore/rendering/RenderText.cpp
webengine/osswebengine/WebCore/rendering/RenderText.h
webengine/osswebengine/WebKit/s60/group/JavaScriptCore/JavaScriptCore.mmp
webengine/osswebengine/WebKit/s60/group/webcore/platform/platform.mmp
webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.cpp
webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.h
webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp
webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp
webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp
webengine/osswebengine/WebKit/s60/plugins/PluginWin.h
webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp
webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.h
webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp
webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp
webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h
webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h
webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h
webengine/osswebengine/WebKit/s60/webview/SettingsContainer.cpp
webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp
webengine/osswebengine/WebKit/s60/webview/WebCursor.h
webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp
webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp
webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp
webengine/osswebengine/WebKit/s60/webview/WebFrameView.h
webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp
webengine/osswebengine/WebKit/s60/webview/WebView.cpp
webengine/osswebengine/WebKit/s60/webview/WebView.h
webengine/osswebengine/cache/cache_check.pl
webengine/osswebengine/cache/filter_emulator_output.bat
webengine/osswebengine/cache/filter_log.pl
webengine/widgetengine/group/WidgetEngine.mmp
webengine/widgetengine/src/Preferences.cpp
webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h
webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp
webengine/widgetregistry/Server/inc/WidgetRegistry.h
webengine/widgetregistry/Server/src/WidgetRegistry.cpp
webengine/widgetregistry/group/WidgetRegistryServer.mmp
webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp
webengine/wrtharvester/group/wrtharvester.mmp
webengine/wrtharvester/inc/wrtharvester.h
webengine/wrtharvester/inc/wrtusbhandler.h
webengine/wrtharvester/rom/wrtharvesterResources.iby
webengine/wrtharvester/src/wrtharvester.cpp
webengine/wrtharvester/src/wrtusbhandler.cpp
widgets/widgetapp/group/WidgetUi.mmp
widgets/widgetapp/inc/WidgetUiNetworkListener.h
widgets/widgetapp/inc/WidgetUiWindowManager.h
widgets/widgetapp/src/WidgetUiAppUi.cpp
widgets/widgetapp/src/WidgetUiNetworkListener.cpp
widgets/widgetapp/src/WidgetUiWindow.cpp
widgets/widgetapp/src/WidgetUiWindowManager.cpp
widgets/widgetinstaller/conf/widgetinstaller.confml
widgets/widgetinstaller/conf/widgetinstaller_1028281F.crml
widgets/widgetinstaller/group/WidgetInstallerUI.mmp
widgets/widgetinstaller/inc/WidgetInstallerInternalCRKeys.h
--- a/browserutilities/aiwbrowserprovider/Group/AiwBrowserProvider.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/aiwbrowserprovider/Group/AiwBrowserProvider.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -44,6 +44,7 @@
 END
 
 START RESOURCE    ../data/AiwBrowserProvider.rss
+DEPENDS avkon.rsg
 HEADER
 TARGET      AiwBrowserProvider
 TARGETPATH    RESOURCE_FILES_DIR
--- a/browserutilities/browserdialogsprovider/Group/browserdialogsprovider.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/browserdialogsprovider/Group/browserdialogsprovider.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -29,6 +29,7 @@
 SOURCEPATH      ../Src
 
 START RESOURCE	../SrcData/BrowserDialogsProvider.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH   RESOURCE_FILES_DIR
 #ifdef __S60_32__
--- a/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -159,19 +159,19 @@
         case EHttpTemporaryRedirect:
             {
             // Id for r_nw_stat_too_many_redirects is -20019, browser errors start at -20000 
-            msg.Set( textresolver->ResolveErrorString( KErrTooManyRedirects ));  
+            msg.Set( textresolver->ResolveErrorString( KErrTooManyRedirects )); 
+            DialogNoteL( msg );
             break;
             }
         default:
             {
             // Handle all others as system error dialog
-            msg.Set( textresolver->ResolveErrorString( aErrCode ));            
-        	  break;
+            CCoeEnv::Static()->HandleError( aErrCode );
+        	break;
             }
         }   // end of switch
 	
-       DialogNoteL( msg );
-       CleanupStack::PopAndDestroy(); //textresolver
+   CleanupStack::PopAndDestroy(); //textresolver
        
 	if ( iObserver )
     	{
--- a/browserutilities/browsertelservice/group/BrowserTelService.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/browsertelservice/group/BrowserTelService.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -35,6 +35,7 @@
 #endif
 
 START RESOURCE ../data/browsertelservice.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH  RESOURCE_FILES_DIR
 END
--- a/browserutilities/connectionmanager/Group/ConnectionManager.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/connectionmanager/Group/ConnectionManager.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -37,6 +37,7 @@
 MW_LAYER_SYSTEMINCLUDE
 
 START RESOURCE ../data/ConnectionManager.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH  RESOURCE_FILES_DIR
 END
--- a/browserutilities/connectionmanager/Inc/ConnMan.hrh	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/connectionmanager/Inc/ConnMan.hrh	Mon Oct 26 08:28:45 2009 +0200
@@ -23,4 +23,5 @@
 	{
 	EConnManWaitNote = 8747,
 	EConnManInfoNote
-	};
\ No newline at end of file
+	};
+	
\ No newline at end of file
--- a/browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLib.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Group/DownloadMgrUiLib.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -32,6 +32,7 @@
 //#define _DEBUG
 
 START RESOURCE  ../Data/DownloadMgrUiLib.rss
+DEPENDS avkon.rsg
 HEADER
 #ifdef __S60_32__
 LANG sc 
--- a/browserutilities/feedsengine/group/FeedsApp.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/feedsengine/group/FeedsApp.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -34,6 +34,7 @@
 CAPABILITY      CAP_APPLICATION NetworkControl -Location
 
 START RESOURCE   ../data/FeedsApp.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH       APP_RESOURCE_DIR
 #ifdef __S60_32__
--- a/browserutilities/schemehandler/SchemeApp/group/SchemeApp.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/schemehandler/SchemeApp/group/SchemeApp.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -45,6 +45,7 @@
 
 
 START RESOURCE ../data/SchemeApp.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH APP_RESOURCE_DIR
 #ifdef __S60_32__
--- a/browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/browserutilities/schemehandler/SchemeDispatcher/group/SchemeDispatcher.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,4 +1,4 @@
-/*
+  /*
 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
@@ -29,7 +29,8 @@
 
 SOURCEPATH ../data
 START RESOURCE SCHEME_DISPATCHER_UID_RSS_NAME
-	TARGET SchemeDispatcher.rsc
+DEPENDS avkon.rsg
+TARGET SchemeDispatcher.rsc
 END
 
 CAPABILITY  CAP_ECOM_PLUGIN
Binary file browserutilities/webutils/conf/webutils.confml has changed
--- a/codhandler/Loc/CodViewer.loc	Thu Sep 24 12:53:48 2009 +0300
+++ b/codhandler/Loc/CodViewer.loc	Mon Oct 26 08:28:45 2009 +0200
@@ -272,4 +272,3 @@
 //r:1.2
 //
 #define qtn_cd_info_not_enough_mem          "Not enough memory available"
- 
\ No newline at end of file
--- a/codhandler/codui/group/CodUi.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/codhandler/codui/group/CodUi.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -44,6 +44,7 @@
 SOURCE		CodConfirm.cpp 
 
 START RESOURCE ../data/CodUi.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH RESOURCE_FILES_DIR
 #ifdef __S60_32__
--- a/codhandler/codviewer/group/CodViewer.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/codhandler/codviewer/group/CodViewer.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -33,6 +33,7 @@
 SOURCE          CodViewer.cpp 
 
 START RESOURCE ../data/CodViewer.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH APP_RESOURCE_DIR
 #ifdef __S60_32__
--- a/codhandler/ddviewer/group/DdViewer.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/codhandler/ddviewer/group/DdViewer.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -33,6 +33,7 @@
 SOURCE          DdViewer.cpp 
 
 START RESOURCE ../data/DdViewer.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH APP_RESOURCE_DIR
 #ifdef __S60_32__
--- a/codhandler/roapapp/group/RoapApp.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/codhandler/roapapp/group/RoapApp.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -41,6 +41,8 @@
 SOURCE      RoapAppLogger.cpp
 
 START RESOURCE ../data/RoapApp.rss
+DEPENDS eikon.rsg
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH APP_RESOURCE_DIR
 #ifdef __S60_32__
--- a/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_plat/browser_platform_api/inc/Browser_platform_variant.hrh	Mon Oct 26 08:28:45 2009 +0200
@@ -151,6 +151,9 @@
 // Defines whether SAPI Security Manager Prompt Enhancement is available
 #define BRDO_SEC_MGR_PROMPT_ENHANCEMENT_FF
 
+// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining)
+//Flag need to be removed after this fix is supplied to Symbian 9.4
+#define BRDO_HTTP_STACK_93
 /*
 * ===================
 *        S60 3.23
@@ -270,6 +273,9 @@
 #define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(../push)
 #define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis)
 
+// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining)
+//Flag need to be removed after this fix is supplied to Symbian 9.4
+#undef BRDO_HTTP_STACK_93
 /*
 * ===================
 *        S60 5.0 PF5250+ / Ivalo / Saga
@@ -306,6 +312,9 @@
 #define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(../push)
 #define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(../stdapis)
 
+// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining)
+//Flag need to be removed after this fix is supplied to Symbian 9.4
+#undef BRDO_HTTP_STACK_93
 /*
 * ===================
 *        S60 5.1
@@ -337,6 +346,9 @@
 #define MW_LAYER_PUSH_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(push)
 #define MW_LAYER_STDAPIS_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(stdapis)
 
+// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining)
+//Flag need to be removed after this fix is supplied to Symbian 9.4
+#undef BRDO_HTTP_STACK_93
 /*
 * ===================
 *        S60 5.2
@@ -355,6 +367,10 @@
 // un-comment this line for week21 release
 #undef BRDO_MULTIPART_PARSER_FF
 
+// Defines Symbian HTTP stack parameters specific for symbian 9.3 (e.g. EHttpEnableOptimalPipelining, EHttpOptimalPipelining)
+//Flag need to be removed after this fix is supplied to Symbian 9.4
+#undef BRDO_HTTP_STACK_93
+
 #define APP_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(libc)
 #define APP_LAYER_ECOM_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(ecom)
 #define APP_LAYER_HTTP_SYSTEMINCLUDE SYSTEMINCLUDE  OS_LAYER_PUBLIC_EXPORT_PATH(http)
--- a/web_pub/browser_control_api/inc/BrCtlDefs.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/browser_control_api/inc/BrCtlDefs.h	Mon Oct 26 08:28:45 2009 +0200
@@ -470,6 +470,13 @@
             * Browser cursor show mode -- some phone doesn't have cursor inside Browser
             */
             ESettingsCursorShowMode,
+            
+            /*
+             * Enter key mode - default behavior is like in desktop browser - submit the form
+             * The alternative is to select the link is one is activated.
+             */
+            ESettingsEnterKeyMode, 
+            
             ESettingsMaxEnum              ///< Must be last one
             };
 
@@ -825,6 +832,12 @@
         ENoCursor = 0,
         EDefaultCursor
         };
+    
+    enum TEnterKeySettings
+        {
+        EEnterKeyDefault = 0,
+        EEnterKeyCanActivateLink
+        };
     };
 #endif      // BRCTLDEFS_H
 
--- a/web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/favourites_engine_api/tsrc/inc/FavouritesEngineTest.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,22 +1,25 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : FavouritesEngineTest.h
+*  Part of     : ?Subsystem_name / FavouritesEngineTest
+*
+*  Description : FavouritesEngineTest test module.
+*  Version:   0.5
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*  Copyright (C) 2002 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
 *
-* Description:  FavouritesEngineTest test module.
-*
+* ============================================================================
 */
 
 
-
 #ifndef FAVOURITESENGINETEST_H
 #define FAVOURITESENGINETEST_H
 
@@ -342,6 +345,24 @@
         TInt ItemAssignTestL( TTestResult& aResult );
 
         /**
+        * FavouritesItem Assign(=) operator test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemAssignSelfTestL( TTestResult& aResult );
+
+        /**
+        * FavouritesItem Assign(=) operator test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemAssignCompleteTestL( TTestResult& aResult );
+        
+        /**
         * FavouritesItem Uid test case.
         * @since ?Series60_version
         * @param aResult Test case result (PASS/FAIL)
@@ -432,13 +453,32 @@
         TInt ItemIsItemTestL( TTestResult& aResult );
 
         /**
-        * FavouritesItem IsFolder test case.
+        * FavouritesItem IsItemEFolder test case.
         * @since ?Series60_version
         * @param aResult Test case result (PASS/FAIL)
         * @return Symbian OS error code (test case execution error 
         *   that is not returned as test case result in aResult)
         */
+        TInt ItemIsItemEFolderTestL( TTestResult& aResult );
+
+        /**
+        * FavouritesItem IsFolder test case for type EItem.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        
         TInt ItemIsFolderTestL( TTestResult& aResult );
+        /**
+         * FavouritesItem IsFolder test case for type EFolder.
+         * @since ?Series60_version
+         * @param aResult Test case result (PASS/FAIL)
+         * @return Symbian OS error code (test case execution error 
+         *   that is not returned as test case result in aResult)
+         */
+        
+        TInt ItemIsFolderEFolderTestL( TTestResult& aResult );
 
         /**
         * FavouritesItem IsFactoryItem test case.
@@ -495,6 +535,15 @@
         TInt ItemSetTypeTestL( TTestResult& aResult );
 
         /**
+        * FavouritesItem SetTypeNone test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetTypeNoneTestL( TTestResult& aResult );        
+
+        /**
         * FavouritesItem SetNameL test case.
         * @since ?Series60_version
         * @param aResult Test case result (PASS/FAIL)
@@ -504,6 +553,60 @@
         TInt ItemSetNameLTestL( TTestResult& aResult );
 
         /**
+        * FavouritesItem ItemSetNameMaxLengthTruncateLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetNameMaxLengthTruncateLTestL( TTestResult& aResult );
+
+        /**
+        * FavouritesItem ItemSetNameTrimStringLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetNameTrimStringLTestL( TTestResult& aResult );
+
+        /**
+        * FavouritesItem ItemSetNameRTLMarkLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetNameRTLMarkLTestL( TTestResult& aResult );
+
+        /**
+        * FavouritesItem ItemSetNameEmptyStringLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetNameEmptyStringLTestL( TTestResult& aResult );   
+        
+        /**
+        * FavouritesItem ItemSetNameWhiteSpaceLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetNameWhiteSpaceLTestL( TTestResult& aResult );   
+        
+        /**
+        * FavouritesItem SetNameFolderL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */   
+        TInt ItemSetNameFolderLTestL( TTestResult& aResult );
+
+        /**
         * FavouritesItem SetUrlL test case.
         * @since ?Series60_version
         * @param aResult Test case result (PASS/FAIL)
@@ -529,6 +632,25 @@
         *   that is not returned as test case result in aResult)
         */
         TInt ItemSetUserNameLTestL( TTestResult& aResult );
+     
+  
+        /**
+        * FavouritesItem ItemSetUserNameMaxLengthLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetUserNameMaxLengthLTestL( TTestResult& aResult );
+          
+        /**
+        * FavouritesItem ItemSetUserNameTruncateLengthLTestL test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetUserNameTruncateLengthLTestL( TTestResult& aResult );
 
         /**
         * FavouritesItem SetPasswordL test case.
@@ -984,6 +1106,24 @@
         */
         TInt DbDeleteFolderTestL( TTestResult& aResult );
 
+        /**
+        * FavouritesItem IsHidden test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemIsHiddenTestL( TTestResult& aResult );
+        
+        /**
+        * FavouritesItem SetHidden test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt ItemSetHiddenTestL( TTestResult& aResult );
+
     private:   // Functions to test TFavouritesWapAp interface
 
         /**
@@ -1014,6 +1154,15 @@
         TInt WapApAssignWithApIdTest( TTestResult& aResult );
 
         /**
+        * TFavouritesWapAp assign operator using self ApId test case.
+        * @since ?Series60_version
+        * @param aResult Test case result (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error 
+        *   that is not returned as test case result in aResult)
+        */
+        TInt WapApAssignSelfWithApTest( TTestResult& aResult );
+
+        /**
         * TFavouritesWapAp SetNull test case.
         * @since ?Series60_version
         * @param aResult Test case result (PASS/FAIL)
--- a/web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesEngineTest.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,22 +1,25 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : FavouritesEngineTest.cpp
+*  Part of     : ?Subsystem_name / FavouritesEngineTest
+*
+*  Description : FavouritesBCTest class member functions
+*  Version:   0.5
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*  Copyright (C) 2006 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
 *
-* Description:  FavouritesBCTest class member functions
-*
+* ============================================================================
 */
 
 
-
 // INCLUDE FILES
 #include <Stiftestinterface.h>
 #include "FavouritesEngineTest.h"
@@ -249,7 +252,9 @@
         ENTRY( "Item NewLC test", CFavouritesEngineTest::ItemNewLCTestL ),
         ENTRY( "Item NewL test", CFavouritesEngineTest::ItemNewLTestL ),
         ENTRY( "Item Destructor test", CFavouritesEngineTest::ItemDestructorTestL ),
-        ENTRY( "Item Assign(=) operator test", CFavouritesEngineTest::ItemAssignTestL ),
+        ENTRY( "Item Assign(=) operator basic test", CFavouritesEngineTest::ItemAssignTestL ),
+        ENTRY( "Item Assign(=) to Self test", CFavouritesEngineTest::ItemAssignSelfTestL ),        
+        ENTRY( "Item Assign(=) Complete test", CFavouritesEngineTest::ItemAssignCompleteTestL ),        
         ENTRY( "Item Uid test", CFavouritesEngineTest::ItemUidTestL ),
         ENTRY( "Item ParentFolder test", CFavouritesEngineTest::ItemParentFolderTestL ),
         ENTRY( "Item Type test", CFavouritesEngineTest::ItemTypeTestL ),
@@ -259,19 +264,30 @@
         ENTRY( "Item UserName test", CFavouritesEngineTest::ItemUserNameTestL ),
         ENTRY( "Item Password test", CFavouritesEngineTest::ItemPasswordTestL ),
         ENTRY( "Item ContextId test", CFavouritesEngineTest::ItemContextIdTestL ),
-        ENTRY( "Item IsItem test", CFavouritesEngineTest::ItemIsItemTestL ),
-        ENTRY( "Item IsFolder test", CFavouritesEngineTest::ItemIsFolderTestL ),
+        ENTRY( "Item IsItem Default test", CFavouritesEngineTest::ItemIsItemTestL ),
+        ENTRY( "Item IsItem Folder test", CFavouritesEngineTest::ItemIsItemEFolderTestL ),        
+        ENTRY( "Item IsFolder Default test", CFavouritesEngineTest::ItemIsFolderTestL ),
+        ENTRY( "Item IsFolder Folder test", CFavouritesEngineTest::ItemIsFolderEFolderTestL ),      
         ENTRY( "Item IsFactoryItem test", CFavouritesEngineTest::ItemIsFactoryItemTestL ),
         ENTRY( "Item IsReadOnly test", CFavouritesEngineTest::ItemIsReadOnlyTestL ),
         ENTRY( "Item Modified test", CFavouritesEngineTest::ItemModifiedTestL ),
         ENTRY( "Item ClearL test", CFavouritesEngineTest::ItemClearLTestL ),
         ENTRY( "Item SetParentFolder test", CFavouritesEngineTest::ItemSetParentFolderTestL ),
-        ENTRY( "Item SetType test", CFavouritesEngineTest::ItemSetTypeTestL ),
-        ENTRY( "Item SetNameL test", CFavouritesEngineTest::ItemSetNameLTestL ),
-        ENTRY( "Item SetUrlL test", CFavouritesEngineTest::ItemSetUrlLTestL ),
+        ENTRY( "Item SetType Default test", CFavouritesEngineTest::ItemSetTypeTestL ),
+        ENTRY( "Item SetType None test", CFavouritesEngineTest::ItemSetTypeNoneTestL ),       
+        ENTRY( "Item SetName Default test", CFavouritesEngineTest::ItemSetNameLTestL ),
+        ENTRY( "Item SetName Truncate test", CFavouritesEngineTest::ItemSetNameMaxLengthTruncateLTestL ),
+        ENTRY( "Item SetName TrimString test", CFavouritesEngineTest::ItemSetNameTrimStringLTestL ),
+        ENTRY( "Item SetName RTLMark test", CFavouritesEngineTest::ItemSetNameRTLMarkLTestL ),
+        ENTRY( "Item SetName EmptyString test", CFavouritesEngineTest::ItemSetNameEmptyStringLTestL ),
+        ENTRY( "Item SetName WhiteSpace test", CFavouritesEngineTest::ItemSetNameWhiteSpaceLTestL ),        
+        ENTRY( "Item SetName ForFolder test", CFavouritesEngineTest::ItemSetNameFolderLTestL ),
+        ENTRY( "Item SetUrl test", CFavouritesEngineTest::ItemSetUrlLTestL ),
         ENTRY( "Item SetWapAp test", CFavouritesEngineTest::ItemSetWapApTestL ),
-        ENTRY( "Item SetUserNameL test", CFavouritesEngineTest::ItemSetUserNameLTestL ),
-        ENTRY( "Item SetPasswordL test", CFavouritesEngineTest::ItemSetPasswordLTestL ),
+        ENTRY( "Item SetUserName test", CFavouritesEngineTest::ItemSetUserNameLTestL ),
+        ENTRY( "Item SetUserName MaxLengthErr test", CFavouritesEngineTest::ItemSetUserNameMaxLengthLTestL ),        
+        ENTRY( "Item SetUserName Truncate test", CFavouritesEngineTest::ItemSetUserNameTruncateLengthLTestL ),        
+        ENTRY( "Item SetPassword test", CFavouritesEngineTest::ItemSetPasswordLTestL ),
         ENTRY( "Item SetContextId test", CFavouritesEngineTest::ItemSetContextIdTestL ),
         ENTRY( "List Constructor test", CFavouritesEngineTest::ListConstructorTestL ),
         ENTRY( "List Destructor test", CFavouritesEngineTest::ListDestructorTestL ),
@@ -321,6 +337,7 @@
         ENTRY( "WapAp Constructor test", CFavouritesEngineTest::WapApConstructorTest ),
         ENTRY( "WapAp Assign with Ap test", CFavouritesEngineTest::WapApAssignWithApTest ),
         ENTRY( "WapAp Assign with ApId test", CFavouritesEngineTest::WapApAssignWithApIdTest ),
+        ENTRY( "WapAp Self-Assign with ApId test", CFavouritesEngineTest::WapApAssignSelfWithApTest ),        
         ENTRY( "WapAp SetNull test", CFavouritesEngineTest::WapApSetNullTest ),
         ENTRY( "WapAp SetDefault test", CFavouritesEngineTest::WapApSetDefaultTest ),
         ENTRY( "WapAp SetApId test", CFavouritesEngineTest::WapApSetApIdTest ),
@@ -346,7 +363,9 @@
         ENTRY( "Notifier constructor test", CFavouritesEngineTest::NotifierConstructorTestL ),
         ENTRY( "Notifier destructor test", CFavouritesEngineTest::NotifierDestructorTestL ),
         ENTRY( "Notifier Start test", CFavouritesEngineTest::NotifierStartTestL ),
-        ENTRY( "Db DeleteFolder test", CFavouritesEngineTest::DbDeleteFolderTestL )
+        ENTRY( "Db DeleteFolder test", CFavouritesEngineTest::DbDeleteFolderTestL ),
+        ENTRY( "Item IsHidden test", CFavouritesEngineTest::ItemIsHiddenTestL ),
+        ENTRY( "Item SetHidden test", CFavouritesEngineTest::ItemSetHiddenTestL )
         };
 
     // Verify that case number is valid
--- a/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesItemTestCases.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,23 +1,26 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ============================================================================
+*  Name:      FavouritesItemTestCases.cpp
+*  Part of:   FavouritesEngineTest class member functions   
+*
+*  Description:
+*
+*  Version:   1.0
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*  Copyright (C) 2008 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
 *
-* Description: 
-*
-*
+* ============================================================================
 */
 
 
-
 // INCLUDE FILES
 #include <e32math.h>
 #include "FavouritesEngineTest.h"
@@ -260,6 +263,153 @@
 
     Class: CFavouritesEngineTest
 
+    Method: ItemAssignCompleteTestL
+
+    Description: Assigning one item to another with the Assign(=) method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemAssignCompleteTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Assigning item with Assign(=) operator");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+    
+    TFavouritesWapAp accessPoint1;
+    accessPoint1.SetApId( 22 );
+
+    CFavouritesItem* item1 = CFavouritesItem::NewLC();
+    item1->SetNameL( _L("Item1") );
+    item1->SetUrlL( _L("http://www.nokia.com") );
+    item1->SetUserNameL( _L("Name 1"));
+    item1->SetPasswordL( _L("Password 1"));
+    item1->SetParentFolder(3);
+    item1->SetContextId(22);
+    item1->SetHidden(1);
+    item1->SetWapAp( accessPoint1 );   
+    
+    
+    TFavouritesWapAp accessPoint2;
+    accessPoint2.SetApId( 24 );
+
+    CFavouritesItem* item2 = CFavouritesItem::NewLC();
+    item2->SetNameL( _L("Item2") );
+    item2->SetUrlL( _L("http://www.google.com") );
+    item2->SetUserNameL( _L("Name 2"));
+    item2->SetPasswordL( _L("Password 2"));
+    item2->SetParentFolder(4);
+    item2->SetContextId(24);
+ //   item2->SetHidden(0);
+    item2->SetWapAp( accessPoint2 );   
+     
+    
+
+
+    *item1 = *item2;
+    
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (
+            (item1->Name() == item2->Name()) &&
+            (item1->Url() == item2->Url()) &&
+            (item1->UserName() == item2->UserName()) &&
+            (item1->Password() == item2->Password()) &&
+            (item1->ContextId() == item2->ContextId()) &&
+            (item1->ParentFolder() == item2->ParentFolder()) &&
+            (item1->Type() == item2->Type()) &&
+            (item1->WapAp().ApId() == item2->WapAp().ApId()) &&
+            (item1->IsItem() == item2->IsItem()) &&
+            (item1->IsFolder() == item2->IsFolder()) &&
+            (item1->IsHidden() == item2->IsHidden()) &&
+  //          (item1->Uid() == item2->Uid()) &&               
+            (item1->Modified() == item2->Modified()) 
+           
+        )    
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( 2 );   // item1, item2
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemAssignSelfTestL
+
+    Description: Assigning one item to self with the Assign(=) method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemAssignSelfTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Assigning item with Assign(=) operator");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item1 = CFavouritesItem::NewLC();
+    item1->SetNameL( _L("Item1") );
+  
+    *item1 = *item1; //copy to self, should not affect anything
+    
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (item1->Name() == _L("Item1"))
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item1 );   
+
+    // Case was executed
+    return KErrNone;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
     Method: ItemUidTestL
 
     Description: Test getting the item's Uid using the Uid method.
@@ -391,7 +541,7 @@
     _LIT( KData2 ,"Finished");
     TestModuleIf().Printf( 0, KDefinition, KData2 );
 
-    if (itemType == 1)
+    if (itemType == CFavouritesItem::EItem)
 	    {
 	    _LIT( KDescription , "Test case passed");
 	    aResult.SetResult( KErrNone, KDescription );
@@ -769,6 +919,59 @@
     return KErrNone;
     }
 
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemIsItemEFolderTestL
+
+    Description: Test if the folder is not an item using the IsItem method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemIsItemEFolderTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Checking if the folder is not an item with IsItem method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    item->SetType(CFavouritesItem::EFolder);
+
+    TBool itemIsItem = item->IsItem();
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (!itemIsItem)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
 /*
 -------------------------------------------------------------------------------
 
@@ -793,7 +996,7 @@
     {
     /* Simple server connect */
     _LIT( KDefinition ,"State");
-    _LIT( KData ,"Checking if the item is a folder with IsFolder method");
+    _LIT( KData ,"Checking if the item is not a folder with IsFolder method");
     TestModuleIf().Printf( 0, KDefinition, KData );
 
     CFavouritesItem* item = CFavouritesItem::NewLC();
@@ -825,6 +1028,58 @@
 
     Class: CFavouritesEngineTest
 
+    Method: ItemIsFolderEFolderTestL
+
+    Description: Test if the item of type EFolder is a folder using the IsFolder method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemIsFolderEFolderTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Checking if the folder is a folder with IsFolder method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    /* set item as folder type */
+    item->SetType(CFavouritesItem::EFolder);
+    TBool itemIsFolder = item->IsFolder();
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (itemIsFolder)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
     Method: ItemIsFactoryItemTestL
 
     Description: Test if the item is a factory item using the IsFactoryItem method.
@@ -1084,7 +1339,7 @@
 
     Method: ItemSetTypeTestL
 
-    Description: Test setting the item's type using the SetType method.
+    Description: Test setting the item's type to EFolder using the SetType method.
   
     Parameters:  TTestResult& aErrorDescription: out:   
                     Test result and on error case a short description of error
@@ -1101,7 +1356,7 @@
     {
     /* Simple server connect */
     _LIT( KDefinition ,"State");
-    _LIT( KData ,"Setting the item's type with SetType method");
+    _LIT( KData ,"Setting the item's type to Folder with SetType method");
     TestModuleIf().Printf( 0, KDefinition, KData );
 
     CFavouritesItem* item = CFavouritesItem::NewLC();
@@ -1133,6 +1388,57 @@
 
     Class: CFavouritesEngineTest
 
+    Method: ItemSetTypeNoneTestL
+
+    Description: Test setting the item's type to ENone using the SetType method. Type should not be affected.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetTypeNoneTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's type to None with SetType method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    
+    item->SetType(CFavouritesItem::ENone);
+    
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+ 
+    if (item->Type() != CFavouritesItem::ENone)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
     Method: ItemSetNameLTestL
 
     Description: Test setting the item's name using the SetNameL method.
@@ -1179,11 +1485,319 @@
     return KErrNone;
     }
 
+
 /*
 -------------------------------------------------------------------------------
 
     Class: CFavouritesEngineTest
 
+    Method: ItemSetNameFolderLTestL
+
+    Description: Test setting the item (folder)'s name using the SetNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetNameFolderLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's name with SetNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    item->SetType(CFavouritesItem::EFolder);
+    item->SetNameL( _L("Fav Folder") );
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (item->Name() == _L("Fav Folder"))
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetNameMaxLengthTruncateLTestL
+
+    Description: Test setting the item's name and maxlength using the SetNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetNameMaxLengthTruncateLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's name with SetNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    TRAPD(err, item->SetNameL( _L("Item Name longer than KFavouritesMaxName limit which is 50 chars")));
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if ((item->Name().Length() == KFavouritesMaxName)&& (err==KErrOverflow))
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetNameTrimStringLTestL
+
+    Description: Test setting the item's name with trim using the SetNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetNameTrimStringLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's name with SetNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+     item->SetNameL( _L("  some   name    "));
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (item->Name()== _L("some   name"))
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetNameRTLMarkLTestL
+
+    Description: Test setting the item's name with trim using the SetNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetNameRTLMarkLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's name with SetNameL method");
+   
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+     item->SetNameL( _L("\x200F  some   name   \x200F"));
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (item->Name()== _L("some   name"))
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetNameEmptyStringLTestL
+
+    Description: Test setting the item's name with trim using the SetNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetNameEmptyStringLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's name with SetNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+ 
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    TRAPD(err, item->SetNameL( _L("")));  //returns error
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (err!=KErrNone)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetNameWhiteSpaceLTestL
+
+    Description: Test setting the item's name with trim using the SetNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetNameWhiteSpaceLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's name with SetNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+ 
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    TRAPD(err, item->SetNameL( _L("         ")));  //returns error
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (err!=KErrNone)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
+/*
+
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
     Method: ItemSetUrlLTestL
 
     Description: Test setting the item's url using the SetUrlL method.
@@ -1334,6 +1948,114 @@
     return KErrNone;
     }
 
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetUserNameMaxLengthLTestL
+
+    Description: Test setting the item's user name using the SetUserNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetUserNameMaxLengthLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's user name with SetUserNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+  //  TInt err;
+    
+    TRAPD(err, item->SetUserNameL( _L("New User name longer than allowed by the limit of KFavouritesMaxUserName which is 40 chars at this moment") ));
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (err==KErrOverflow)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetUserNameTruncateLengthLTestL
+
+    Description: Test setting the item's user name using the SetUserNameL method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetUserNameTruncateLengthLTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's user name with SetUserNameL method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    TInt truncLength;
+ 
+    TRAPD(err, item->SetUserNameL( _L("New User name longer than allowed by the limit of KFavouritesMaxUserName which is 40 chars at this moment") ));
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+    truncLength = item->UserName().Length();
+    
+    if ((truncLength==KFavouritesMaxUserName)&& (err==KErrOverflow))
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+
 /*
 -------------------------------------------------------------------------------
 
@@ -1436,6 +2158,109 @@
     return KErrNone;
     }
 
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemIsHiddenTestL
+
+    Description: Test if the item is hidden using the IsHidden method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+
+TInt CFavouritesEngineTest::ItemIsHiddenTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Checking if the item is hidden item with IsHidden method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    
+    TBool itemIsHidden = item->IsHidden();
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (!itemIsHidden)
+	    {
+	    _LIT( KDescription , "Test case passed");
+	    aResult.SetResult( KErrNone, KDescription );
+	    }
+    else
+	    {
+	    _LIT( KDescription , "Test case failed");
+	    aResult.SetResult( KErrGeneral, KDescription );
+	    }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: ItemSetHiddenTestL
+
+    Description: Test setting the item's hidden value using the SetHidden method.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::ItemSetHiddenTestL( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Setting the item's hidden value with SetHidden method");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    CFavouritesItem* item = CFavouritesItem::NewLC();
+    
+    item->SetHidden(1);
+
+    _LIT( KData2 ,"Finished");
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if (item->IsHidden() == 1)
+	    {
+	    _LIT( KDescription , "Test case passed");
+	    aResult.SetResult( KErrNone, KDescription );
+	    }
+    else
+	    {
+	    _LIT( KDescription , "Test case failed");
+	    aResult.SetResult( KErrGeneral, KDescription );
+	    }
+
+    CleanupStack::PopAndDestroy( item );
+
+    // Case was executed
+    return KErrNone;
+    }
+
 // ================= OTHER EXPORTED FUNCTIONS =================================
 
 // End of File
--- a/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/favourites_engine_api/tsrc/src/FavouritesWapApTestCases.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,23 +1,26 @@
 /*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ============================================================================
+*  Name:      FavouritesWapApTestCases.cpp
+*  Part of:   FavouritesEngineTest class member functions   
+*
+*  Description:
+*
+*  Version:   0.5
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*  Copyright (C) 2002 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
 *
-* Description: 
-*
-*
+* ============================================================================
 */
 
 
-
 // INCLUDE FILES
 #include <e32math.h>
 #include "FavouritesEngineTest.h"
@@ -151,6 +154,58 @@
     return KErrNone;
     }
 
+
+/*
+-------------------------------------------------------------------------------
+
+    Class: CFavouritesEngineTest
+
+    Method: WapApAssignSelfWithApTest
+
+    Description: Test the WapAp assign(=) operater using a WapAp as the argument.
+  
+    Parameters:  TTestResult& aErrorDescription: out:   
+                    Test result and on error case a short description of error
+
+    Return Values: TInt: Always KErrNone to indicate that test was valid
+
+    Errors/Exceptions: None
+
+    Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+TInt CFavouritesEngineTest::WapApAssignSelfWithApTest( TTestResult& aResult )
+    {
+    /* Simple server connect */
+    _LIT( KDefinition ,"State");
+    _LIT( KData ,"Test the WapAp assign(=) operater using the same WapAp as the argument");
+    TestModuleIf().Printf( 0, KDefinition, KData );
+
+    TFavouritesWapAp accessPoint1, accessPoint2;
+    
+    accessPoint1 = 222;
+    
+    accessPoint1 = accessPoint1;
+    
+    _LIT( KData2 ,"Finished" );
+    TestModuleIf().Printf( 0, KDefinition, KData2 );
+
+    if(accessPoint1.ApId() == 222)
+        {
+        _LIT( KDescription , "Test case passed");
+        aResult.SetResult( KErrNone, KDescription );
+        }
+    else
+        {
+        _LIT( KDescription , "Test case failed");
+        aResult.SetResult( KErrGeneral, KDescription );
+        }
+
+    // Case was executed
+    return KErrNone;
+    }
+
 /*
 -------------------------------------------------------------------------------
 
--- a/web_pub/settings_api/inc/BrowserUiSDKCRKeys.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/web_pub/settings_api/inc/BrowserUiSDKCRKeys.h	Mon Oct 26 08:28:45 2009 +0200
@@ -406,4 +406,8 @@
 
 // Cursormode which defines the cursor display supported status depends on phones.
 const TUint32 KBrowserCursorShowMode =          0x00000082;
+
+// Controls whether enter key can activate a link, ot just has a default behavior. 
+const TUint32 KBrowserEnterKeyMode = 0x00000083;
+
 #endif      // BROWSERUISDKCRKEYS_H
\ No newline at end of file
--- a/webengine/device/inc/Device.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/device/inc/Device.h	Mon Oct 26 08:28:45 2009 +0200
@@ -59,10 +59,8 @@
         public:
             DevicePrivate(Device* jsobj);
             ~DevicePrivate();
-            void SetUid( const TUint& aValue);
 
         private:
-            MDeviceBinding* m_deviceBinding;                 // Owned
             Identifier m_propName;
             ExecState* m_exec;                               // not owned
             Device* m_jsobj;                                 // not owned
@@ -162,6 +160,7 @@
 
         private:
             DevicePrivate* m_privateData;   // private object to hold data
+            MDeviceBinding* m_deviceBinding; // Owned
             TBool m_valid;                   // object is valid or not
         };
 
--- a/webengine/device/src/Device.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/device/src/Device.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -49,14 +49,18 @@
 Device::Device( ExecState* exec )
     : JSObject()
     {
-    m_privateData = new DevicePrivate(this);
-    if (!m_privateData || !m_privateData->m_deviceBinding )
-        m_valid = EFalse;
-    else
-        m_valid = ETrue;
+    m_valid = EFalse;
+    TRAP_IGNORE(
+        m_deviceBinding = CDeviceLiwBinding::NewL();
+    )    
+    if (m_deviceBinding)
+        {
+        m_privateData = new DevicePrivate(this);
+        if (m_privateData)
+            m_valid = ETrue;
+        }
     }
 
-
 // ----------------------------------------------------------------------------
 // Device::SetUid
 //
@@ -64,8 +68,8 @@
 //
 void Device::SetUid( const TUint& aValue)
     {
-    if(m_privateData)
-        m_privateData->SetUid( aValue);
+    if(m_deviceBinding)
+        m_deviceBinding->SetUid( aValue);
     }
 
 // ----------------------------------------------------------------------------
@@ -81,6 +85,8 @@
     m_valid = EFalse;
     delete m_privateData;
     m_privateData = NULL;
+    delete m_deviceBinding;
+    m_deviceBinding = NULL;
     }
 
 
@@ -141,7 +147,7 @@
         {
         case getServiceObject:
         case listProviders:
-                return new DeviceFunc( exec, m_privateData->m_deviceBinding, token );
+                return new DeviceFunc( exec, m_deviceBinding, token );
 
         default:
             return throwError(exec, GeneralError);
@@ -222,11 +228,8 @@
 // ---------------------------------------------------------------------------
 DevicePrivate::DevicePrivate( Device* jsobj )
     {
-    m_deviceBinding = NULL;
-    TRAP_IGNORE(
-        m_deviceBinding = CDeviceLiwBinding::NewL();
-        m_jsobj = jsobj;
-        m_exec = NULL;)
+    m_jsobj = jsobj;
+    m_exec = NULL;
     }
 
 // ---------------------------------------------------------------------------
@@ -238,19 +241,6 @@
     // invalid the Device
     if (m_jsobj)
         m_jsobj->m_valid = EFalse;
-        
-    delete m_deviceBinding;
-    m_deviceBinding = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-// DevicePrivate SetUid
-//
-// ---------------------------------------------------------------------------
-void DevicePrivate::SetUid( const TUint& aValue)
-    {
-    if(m_deviceBinding)
-        m_deviceBinding->SetUid( aValue);
     }
 
 // ----------------------------------------------------------------------------
@@ -338,7 +328,7 @@
 
 MDeviceBinding* Device::GetDeviceBinding()
 {
-    return m_privateData->m_deviceBinding;
+    return m_deviceBinding;
 }
 
 //END OF FILE
--- a/webengine/osswebengine/JavaScriptCore/bindings/c/c_utility.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/JavaScriptCore/bindings/c/c_utility.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -39,6 +39,8 @@
 #include "Platform.h"
 #if USE(ICU_UNICODE) && !USE(SYMBIAN_UNICODE)
 #include <unicode/ucnv.h>
+#elif PLATFORM(SYMBIAN)
+#include <utf.h>
 #endif
 
 namespace KJS { namespace Bindings {
@@ -88,22 +90,34 @@
             (*UTF16Chars)[i] = UTF8Chars[i] & 0xFF;
     }
 #elif PLATFORM(SYMBIAN)
-// fixme: this needs to be a little bit more sophisticated
     if (UTF8Length == -1)
         UTF8Length = strlen(UTF8Chars);
 
-    *UTF16Length = UTF8Length;
-
-    *UTF16Chars = (NPUTF16 *)malloc(sizeof(NPUTF16) * (*UTF16Length));
+    *UTF16Length = 0;
+    *UTF16Chars = 0;
 
-    for (unsigned i = 0; i < *UTF16Length; i++)
-        (*UTF16Chars)[i] = UTF8Chars[i] & 0xFF;
-
+    TPtrC8 buf8((TUint8*) UTF8Chars, UTF8Length);
+    HBufC *hbuf16 = HBufC::New(UTF8Length+1);
+    if (!hbuf16)
+        return;
+    TPtr16 buf16 = hbuf16->Des();
+    CnvUtfConverter::ConvertToUnicodeFromUtf8(buf16, buf8);
+    *UTF16Chars = new NPUTF16[buf16.Length()+1];
+    if (!(*UTF16Chars)) {
+        delete hbuf16;
+        return;
+    }
+    memcpy((void*)*UTF16Chars, (const char*)(buf16.Ptr()), buf16.Size());
+    *UTF16Length = buf16.Length();
+    (*UTF16Chars)[(*UTF16Length)] = 0;
+    delete hbuf16;
 #else
     assert(!"Implement me!");    
 #endif
 }
 
+
+
 // Variant value must be released with NPReleaseVariantValue()
 void convertValueToNPVariant(ExecState *exec, JSValue *value, NPVariant *result)
 {
--- a/webengine/osswebengine/WebCore/dom/Document.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/dom/Document.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -3520,6 +3520,12 @@
 void Document::finishedParsing()
 {
     setParsing(false);
+    if (this->hasListenerType(DOMCONTENTLOADED_LISTENER)) 
+        {
+        ExceptionCode ec = 0;
+        dispatchEvent(new MutationEvent(DOMContentLoadedEvent, false, false,
+                                 this, String(), String(), String(), 0), ec);
+        }
     if (Frame* f = frame())
         f->loader()->finishedParsing();
 }
--- a/webengine/osswebengine/WebCore/dom/Document.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/dom/Document.h	Mon Oct 26 08:28:45 2009 +0200
@@ -480,7 +480,8 @@
         DOMNODEINSERTEDINTODOCUMENT_LISTENER = 0x10,
         DOMATTRMODIFIED_LISTENER             = 0x20,
         DOMCHARACTERDATAMODIFIED_LISTENER    = 0x40,
-        OVERFLOWCHANGED_LISTENER             = 0x80
+        OVERFLOWCHANGED_LISTENER             = 0x80,
+        DOMCONTENTLOADED_LISTENER            = 0x90
     };
 
     bool hasListenerType(ListenerType listenerType) const { return (m_listenerTypes & listenerType); }
--- a/webengine/osswebengine/WebCore/dom/EventNames.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/dom/EventNames.h	Mon Oct 26 08:28:45 2009 +0200
@@ -86,6 +86,7 @@
     macro(DOMNodeRemoved) \
     macro(DOMNodeRemovedFromDocument) \
     macro(DOMSubtreeModified) \
+    macro(DOMContentLoaded)\
     \
     macro(webkitBeforeTextInserted) \
     macro(webkitEditableContentChanged) \
--- a/webengine/osswebengine/WebCore/dom/EventTargetNode.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/dom/EventTargetNode.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -108,6 +108,8 @@
         type = Document::DOMCHARACTERDATAMODIFIED_LISTENER;
     else if (eventType == overflowchangedEvent)
         type = Document::OVERFLOWCHANGED_LISTENER;
+    else if (eventType == DOMContentLoadedEvent)
+        type = Document::DOMCONTENTLOADED_LISTENER;
         
     if (type)
         document()->addListenerType(type);
--- a/webengine/osswebengine/WebCore/html/HTMLAnchorElement.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/html/HTMLAnchorElement.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -137,15 +137,22 @@
     // when pressing Enter in the combo.
     if (m_isLink && (evt->type() == clickEvent || (evt->type() == keydownEvent && m_focused))) {
         MouseEvent* e = 0;
-        if (evt->type() == clickEvent && evt->isMouseEvent())
-    
-#if PLATFORM(SYMBIAN)        
+        
+            
+#if PLATFORM(SYMBIAN)
+        if (evt->type() == clickEvent && evt->isMouseEvent()) {
+            e = static_cast<MouseEvent*>(evt);
+
             if (m_soundstart) {
                 m_soundstart->OnClick(document()->frame());
             }
+        }
+#else 
+        if (evt->type() == clickEvent && evt->isMouseEvent())
+            e = static_cast<MouseEvent*>(evt);
 #endif   
 
-            e = static_cast<MouseEvent*>(evt);
+            
 
         KeyboardEvent* k = 0;
         if (evt->type() == keydownEvent && evt->isKeyboardEvent())
--- a/webengine/osswebengine/WebCore/page/ChromeClient.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/page/ChromeClient.h	Mon Oct 26 08:28:45 2009 +0200
@@ -107,6 +107,8 @@
 #if PLATFORM(SYMBIAN)
         virtual void setElementVisibilityChanged(bool visibility) = 0;
         virtual bool elementVisibilityChanged() = 0;
+        virtual bool elementVisibilityChangedByMouse() = 0;
+        virtual bool elementVisibilityChangedByKey() = 0;
         virtual void focusedElementChanged(Element*) = 0;
 #endif
 };
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -325,7 +325,7 @@
     }
 }
 
-bool WebCoreFrameBridge::getTypeFromElement(Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const
+bool WebCoreFrameBridge::getTypeFromElement(Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect, Node*& aRNode) const
 { 
      
     if(node && m_frame) {
@@ -335,6 +335,7 @@
             if( n->isFocusable() ) {
                 aElType = nodeTypeB(n, m_frame);
                 aFocusRect = n->getRect();
+                aRNode = n;
                 return true;
             }
             else {
@@ -347,6 +348,7 @@
                     || etn->getHTMLEventListener(mouseupEvent)) ) {                
                     aFocusRect = n->getRect();
                     aElType = TBrCtlDefs::EElementMouseButtonListener;
+                    aRNode = n;
                     return true;
                 }
                 else if (n->isElementNode() && n->hasTagName(areaTag)) {
@@ -354,6 +356,7 @@
                     if(!e->getAttribute(hrefAttr).isNull()) {
                         aElType = TBrCtlDefs::EElementAreaBox;
                         aFocusRect = n->getRect();
+                        aRNode = n;
                         return true;
                     }
                 }
@@ -366,6 +369,7 @@
                             if(!ep->getAttribute(hrefAttr).isNull()) {
                                 aElType = nodeTypeB(np, m_frame);
                                 aFocusRect = np->getRect();
+                                aRNode = np;
                                 return true;
                             }
                         }
@@ -386,6 +390,7 @@
                         }
                     }
                     aFocusRect = n->getRect().Rect();
+                    aRNode = n;
                     return true;
                 }
                 else if (n->renderer() && n->renderer()->layer()) {
--- a/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/page/symbian/WebCoreFrameBridge.h	Mon Oct 26 08:28:45 2009 +0200
@@ -87,7 +87,7 @@
     void updateThumbnail();
     Vector<WebCore::IntRect>* focusableRectList() { return &m_focusableNodeList; }
     bool searchFor(TPtrC string, bool forward, bool caseSensitive, bool wrapFlag, bool startInSelection);
-    bool getTypeFromElement(WebCore::Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const;
+    bool getTypeFromElement(WebCore::Node* node, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect, WebCore::Node*& aRNode) const;
     
     virtual ~WebCoreFrameBridge();
 
--- a/webengine/osswebengine/WebCore/platform/StringImpl.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/StringImpl.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -491,14 +491,13 @@
 
 #if PLATFORM(SYMBIAN)
 
-StringImpl* StringImpl::secureShowLast(UChar aChar) const
+StringImpl* StringImpl::secureShowOffset(UChar aChar, unsigned offset) const
 {
     StringImpl* temp = secure(aChar);
     if (m_data && temp) {
-        temp->remove(m_length-1);
-        temp->insert(&(m_data[m_length-1]), 1, m_length-1);
+        temp->remove(offset);
+        temp->insert(&(m_data[offset]), 1, offset);
         }
-    
     return temp; 
 }
 
--- a/webengine/osswebengine/WebCore/platform/StringImpl.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/StringImpl.h	Mon Oct 26 08:28:45 2009 +0200
@@ -151,7 +151,7 @@
     StringImpl(const TDesC&);
     StringImpl(const TDesC8&);
     TPtrC des() const;
-    StringImpl* secureShowLast(UChar aChar) const;
+    StringImpl* secureShowOffset(UChar aChar, unsigned offset) const;
 #endif
 
     StringImpl(const DeprecatedString&);
--- a/webengine/osswebengine/WebCore/platform/Widget.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/Widget.h	Mon Oct 26 08:28:45 2009 +0200
@@ -118,9 +118,12 @@
         // e.g., in overflow:auto sections.  The clip rects coordinates are in the containing window's coordinate space.
         // This clip includes any clips that the widget itself sets up for its children.
         virtual IntRect windowClipRect() const;
-
+#if PLATFORM(SYMBIAN)
+        virtual void handleEvent(Event* event);
+#else
         virtual void handleEvent(Event*) { }
-
+#endif
+        
 #if PLATFORM(WIN)
         void setContainingWindow(HWND);
         HWND containingWindow() const;
--- a/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/HttpSessionManager.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -98,7 +98,12 @@
 
         RStringF maxToPipeline = strP.StringF(HTTP::EMaxNumTransactionsToPipeline, stringTable );
         connInfo.SetPropertyL( maxToPipeline, THTTPHdrVal( KHttpMaxTransactionNumPerConnection ) );
-
+        
+#ifdef BRDO_HTTP_STACK_93
+        // Set optimal pipelining
+        RStringF strOptimalPipelineVal = strP.StringF(HTTP::EHttpEnableOptimalPipelining, RHTTPSession::GetTable());
+        connInfo.SetPropertyL(strP.StringF(HTTP::EHttpOptimalPipelining, RHTTPSession::GetTable()), strOptimalPipelineVal);
+#endif
 		//set HTTP receive Buffer Size property
 		RStringF receiveBuffSize = strP.StringF(HTTP::ERecvBufferSize, stringTable );
 		connInfo.SetPropertyL( receiveBuffSize, THTTPHdrVal(KHttpReceiveBuffSize));
--- a/webengine/osswebengine/WebCore/platform/symbian/OOMHandler.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/OOMHandler.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,45 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : OOMHandler.h
+*  Part of     : Webcore / Platform
+*  Interface   :
+*  Description :
+*  Version     : %Version%
+*
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*
+*   Redistribution and use in source and binary forms, with or without
+*   modification, are permitted provided that the following conditions
+*   are met:
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
 *
-* Description: 
+*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*   DAMAGE.
 *
+*
+* ==============================================================================
 */
 
-
 #ifndef __OOMHANDLER_H__
 #define __OOMHANDLER_H__
 
--- a/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,45 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : OOMHandler.h
+*  Part of     : Webcore / Platform
+*  Interface   :
+*  Description :
+*  Version     : %Version%
+*
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*
+*   Redistribution and use in source and binary forms, with or without
+*   modification, are permitted provided that the following conditions
+*   are met:
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
 *
-* Description: 
+*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*   DAMAGE.
 *
+*
+* ==============================================================================
 */
 
-
 #ifndef __OOMSTOPPER_H__
 #define __OOMSTOPPER_H__
 
--- a/webengine/osswebengine/WebCore/platform/symbian/ScrollViewSymbian.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/ScrollViewSymbian.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -278,9 +278,13 @@
         }
     }
 
-void ScrollView::removeChild(Widget*)
+void ScrollView::removeChild(Widget* child)
     {
     //child->removeFromSuperview();
+	if(child)
+	    {
+		child->hide();    
+	    }
     }
 
 void ScrollView::resizeContents(int w, int h)
--- a/webengine/osswebengine/WebCore/platform/symbian/WidgetSymbian.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/WidgetSymbian.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -24,9 +24,12 @@
 #include "IntRect.h"
 #include "IntPoint.h"
 #include "Cursor.h"
+#include "Event.h"
+#include "EventNames.h"
+#include "KeyboardEvent.h"
 
 namespace WebCore {
-
+using namespace EventNames;
 static bool deferFirstResponderChanges;
 static Widget *deferredFirstResponder;
 
@@ -239,4 +242,18 @@
         return getView()->isFocusable();
     return false;
     }
+
+void Widget::handleEvent(Event* event) 
+{ 
+    if (event->type() == keydownEvent && event->isKeyboardEvent()) {
+        KeyboardEvent* kevt = static_cast<KeyboardEvent*>(event);
+        if (kevt->keyIdentifier() == "Enter") {
+            MWebCoreWidget* view = getView();
+            if(view && view->isObjectView()) {
+                view->activate();
+            }
+        }
+    }
 }
+
+}
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,38 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*
+*   Redistribution and use in source and binary forms, with or without
+*   modification, are permitted provided that the following conditions
+*   are met:
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
 *
-* Description: 
+*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*   DAMAGE.
 *
+* ==============================================================================
 */
 
-
 /*
  *  This class is a proxy for CAnimationDecoderWrapped
  *  
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoder.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,38 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*
+*   Redistribution and use in source and binary forms, with or without
+*   modification, are permitted provided that the following conditions
+*   are met:
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
 *
-* Description: 
+*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*   DAMAGE.
 *
+* ==============================================================================
 */
 
-
 #ifndef ANIMATIONDECODER_H
 #define ANIMATIONDECODER_H
 
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,38 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*
+*   Redistribution and use in source and binary forms, with or without
+*   modification, are permitted provided that the following conditions
+*   are met:
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
 *
-* Description: 
+*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*   DAMAGE.
 *
+* ==============================================================================
 */
 
-
 /*
  *  This class is wrapped by a proxy CAnimationDecoder
  *  
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/AnimationDecoderWrapped.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,38 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*
+*   Redistribution and use in source and binary forms, with or without
+*   modification, are permitted provided that the following conditions
+*   are met:
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
 *
-* Description: 
+*   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*   DAMAGE.
 *
+* ==============================================================================
 */
 
-
 /*
  *  This class is wrapped by a proxy CAnimationDecoder
  *  
--- a/webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/platform/symbian/bitmap/SyncDecodeThread.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -252,7 +252,8 @@
 void CSynDecodeThread::ConstructL()
 {   
     _LIT(KThreadName, "ImgDecoder");
-    User::LeaveIfError(iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, KMinHeapSize, KMaxHeapSize, NULL));
+    RAllocator &allocator = User::Allocator();
+    User::LeaveIfError(iDecoderThread.Create(KThreadName, CSynDecodeThread::ScaleInThread, KDefaultStackSize, &allocator, NULL));
     iDecoderThread.SetPriority(EPriorityMore);
     TRequestStatus status = KRequestPending;
     iDecoderThread.Rendezvous(status);
--- a/webengine/osswebengine/WebCore/rendering/RenderListBox.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderListBox.h	Mon Oct 26 08:28:45 2009 +0200
@@ -89,6 +89,7 @@
 #if PLATFORM(SYMBIAN)
     IntRect itemRect(int tx, int ty, int index) { return itemBoundingBoxRect(tx, ty, index); }
     int indexOffset() {return m_indexOffset;}
+    int getSize() {return size();}
 #endif
 
 private:
--- a/webengine/osswebengine/WebCore/rendering/RenderText.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderText.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -831,6 +831,9 @@
     }
 
     m_linesDirty = dirtiedLines;
+#if PLATFORM(SYMBIAN)
+    m_offset = offset;
+#endif     
     setText(text, force, backspace);
 }
 
@@ -921,19 +924,19 @@
             case TSNONE:
                 break;
             case TSCIRCLE:
-                m_text = m_text->secureShowLast(whiteBullet);
+            	m_text = m_text->secureShowOffset(bullet, m_offset);
                 break;
             case TSDISC:
                 if(backspace){
                 	m_text = m_text->secure(bullet);
                 }
                 else{
-                	m_text = m_text->secureShowLast(bullet);
+                    m_text = m_text->secureShowOffset(bullet, m_offset);
                 }
                 	
                 break;
             case TSSQUARE:
-                m_text = m_text->secureShowLast(blackSquare);
+                m_text = m_text->secureShowOffset(blackSquare, m_offset);
         }
         
         if (style()->textSecurity() != TSNONE) {
--- a/webengine/osswebengine/WebCore/rendering/RenderText.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebCore/rendering/RenderText.h	Mon Oct 26 08:28:45 2009 +0200
@@ -174,7 +174,7 @@
     
     void securityTimerFired(Timer<RenderText>*);
     Timer<RenderText> m_securityTimer;
-    
+    unsigned m_offset;
 #endif //PLATFORM(SYMBIAN)
     
 };
--- a/webengine/osswebengine/WebKit/s60/group/JavaScriptCore/JavaScriptCore.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/JavaScriptCore/JavaScriptCore.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -177,5 +177,6 @@
 LIBRARY         estlib.lib
 LIBRARY         euser.lib
 LIBRARY		memman.lib
+LIBRARY     charconv.lib
 
 
--- a/webengine/osswebengine/WebKit/s60/group/webcore/platform/platform.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/group/webcore/platform/platform.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -26,6 +26,8 @@
 VENDORID    VID_DEFAULT
 
 START RESOURCE ../../../data/webkit.rss
+DEPENDS avkon.rsg
+DEPENDS eikon.rsg
 HEADER
 TARGETPATH      RESOURCE_FILES_DIR
 #ifdef __S60_32__
--- a/webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -81,14 +81,6 @@
 void WebTabbedNavigation::updateCursorPosition(const TPoint& pos)
 {
     m_focusPosition = pos;
-    WebFrame* frame = StaticObjectsContainer::instance()->webCursor()->getFrameAtPoint(pos);
-    TPoint point(frame->frameView()->viewCoordsInFrameCoords(pos));
-
-    Element* node = core(frame)->document()->elementFromPoint(point.iX, point.iY);
-    if (node->isFocusable() && !node->hasTagName(iframeTag) && !node->hasTagName(frameTag))
-        m_webView->page()->focusController()->setFocusedNode(node, core(frame));
-    else
-        m_webView->page()->focusController()->setFocusedNode(NULL, core(frame));
     m_selectedElementRect.SetRect(pos.iX, pos.iY, pos.iX + 1, pos.iY + 1);
 }
 
@@ -101,88 +93,202 @@
     m_focusPosition = StaticObjectsContainer::instance()->webCursor()->position();
 }
 
-bool WebTabbedNavigation::navigate(int horizontalDir, int verticalDir)
+
+void WebTabbedNavigation::resetNavigationIfNeeded(TPoint& contentPos, TSize& contentSize, 
+                                                  Frame* focusedFrame, int horizontalDir, int verticalDir)
 {
-    if (handleSelectElementScrolling(m_webView, verticalDir)) {
-        StaticObjectsContainer::instance()->webCursor()->cursorUpdate(true);
-        return true;
-    }
-    // DOM can be changed so check if we are still inside the document
-    // If not reset tabbed navigation parameters to the closest point in document.
-    TSize contentSize = m_webView->mainFrame()->frameView()->contentSize();
-    TPoint contentPos = m_webView->mainFrame()->frameView()->contentPos();
-    TRect docRect = TRect(contentPos, contentSize - contentPos);
+    TPoint docBrViewCoord = kit(focusedFrame)->frameView()->frameCoordsInViewCoords(
+                                           TPoint(contentSize.iWidth, contentSize.iHeight));
+    TRect docRect = TRect(TPoint(0,0), docBrViewCoord);
     if (!docRect.Contains(m_focusPosition)) {
         TInt viewW = m_webView->Rect().Width();
         TInt viewH = m_webView->Rect().Height();
-        if (m_focusPosition.iX > contentSize.iWidth || 
-            m_focusPosition.iX < contentPos.iX) {
+        if (m_focusPosition.iX > contentSize.iWidth) {
             m_focusPosition.iX = (horizontalDir == -1) ? contentPos.iX + viewW : contentPos.iX;
         }
         
-        if (m_focusPosition.iY > contentSize.iHeight || 
-            m_focusPosition.iY < contentPos.iY) {
+        if (m_focusPosition.iY > contentSize.iHeight) {
             m_focusPosition.iY = (verticalDir == -1) ? contentPos.iY + viewH : contentPos.iY;
         }
-
-        m_selectedElementRect.SetRect(m_focusPosition.iX, m_focusPosition.iY, m_focusPosition.iX, m_focusPosition.iY);
+    
+        m_selectedElementRect.SetRect(m_focusPosition.iX, m_focusPosition.iY, 
+                                      m_focusPosition.iX, m_focusPosition.iY);
         m_node = NULL;    
     }
+}
+
+
+TPoint WebTabbedNavigation::focusPointFromFocusedNode(Frame* frame, int horizontalDir, int verticalDir)
+{
+    TPoint oldFocusPoint(m_focusPosition);
+    TPoint focusPosition(m_focusPosition);
+    TRect  selectedElementRect(m_selectedElementRect);
     
-    bool ret = m_firstNavigationOnPage;
-    Frame* focusedFrame = m_webView->page()->focusController()->focusedFrame();
-    if (focusedFrame == NULL) focusedFrame = m_webView->page()->mainFrame();
-    if (focusedFrame->document()) {
-        Node* focusNode = focusedFrame->document()->focusedNode();
-        if (focusNode) {
-            m_node = focusNode;
-            m_selectedElementRect = focusNode->getRect().Rect();
-            Frame* frame = focusNode->document()->frame();
-            m_selectedElementRect = TRect(kit(frame)->frameView()->frameCoordsInViewCoords(m_selectedElementRect.iTl), 
-                kit(frame)->frameView()->frameCoordsInViewCoords(m_selectedElementRect.iBr));
+    if (frame->document()) {
+        Node* focusedNode = frame->document()->focusedNode();
+        if (focusedNode) {
+            m_node = focusedNode;
+            selectedElementRect = focusedNode->getRect().Rect();
+            Frame* frame = focusedNode->document()->frame();
+            selectedElementRect = kit(frame)->frameView()->frameCoordsInViewCoords(selectedElementRect);
+
+            // Move the focus to the visible edge of the current object
+            TRect elemVisibleRect = selectedElementRect;
+            if (elemVisibleRect.Intersects(m_webView->Rect())) {
+                 
+                elemVisibleRect.Intersection(m_webView->Rect());
+                if (horizontalDir == -1) {
+                    focusPosition.iX = elemVisibleRect.iTl.iX;
+                }
+                else if (horizontalDir == 1) {
+                    focusPosition.iX = elemVisibleRect.iBr.iX;
+                }
+                
+                if (verticalDir == -1) {
+                    focusPosition.iY = elemVisibleRect.iTl.iY;
+                }
+                else if (verticalDir == 1) {
+                    focusPosition.iY = elemVisibleRect.iBr.iY;
+                }
+                
+                if ((verticalDir == 0) && (horizontalDir == 0)) {
+                    focusPosition = elemVisibleRect.Center();
+                }
+                m_focusPosition = focusPosition;
+            }
+            m_selectedElementRect = selectedElementRect;
         }
     }
-    TPoint oldFocusPoint(m_focusPosition);
-    // Move the focus to the edge of the current object
+    return oldFocusPoint;
+}
+
+
+void WebTabbedNavigation::calcSearchViewRect(int horizontalDir, int verticalDir, TRect& view)
+{
+    
+    TPoint br;
+    TPoint viewBr = m_webView->Rect().iBr;
+    br.iX = viewBr.iX * KMaxJumpPercent / m_webView->scalingFactor();
+    br.iY = viewBr.iY * KMaxJumpPercent / m_webView->scalingFactor();
+    // define the view rect where we are looking for a match
+    int x, y;
     if (horizontalDir == -1) {
-        m_focusPosition.iX = m_selectedElementRect.iTl.iX;
+        view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY - br.iY, 
+                m_focusPosition.iX , m_focusPosition.iY + br.iY);
     }
     else if (horizontalDir == 1) {
-        m_focusPosition.iX = m_selectedElementRect.iBr.iX;
+        view.SetRect(m_focusPosition.iX, m_focusPosition.iY - br.iY, 
+                m_focusPosition.iX + br.iX, m_focusPosition.iY + br.iY);
     }
-    if (verticalDir == -1) {
-        m_focusPosition.iY = m_selectedElementRect.iTl.iY;
+    else if (verticalDir == -1) {
+        view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY - br.iY, 
+                     m_focusPosition.iX + br.iX, m_focusPosition.iY);
     }
     else if (verticalDir == 1) {
-        m_focusPosition.iY = m_selectedElementRect.iBr.iY;
+        view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY, 
+                     m_focusPosition.iX + br.iX, m_focusPosition.iY + br.iY);
     }
-    wkDebug()<<"WebTabbedNavigation::navigate. x = "<<m_focusPosition.iX<<" y = "<<m_focusPosition.iY<<flush;
-    wkDebug()<<"x1 = "<<m_selectedElementRect.iTl.iX<<" y1 = "<<m_selectedElementRect.iTl.iY<<" x2 = "<<m_selectedElementRect.iBr.iX<<" y2 = "<<m_selectedElementRect.iBr.iY<<flush;
+}
+
+TPoint WebTabbedNavigation::updateCursorPosAfterScroll(Frame* frame, int horizontalDir, int verticalDir)
+{
+    WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
+    TPoint oldPos = cursor->position();
+    
+    focusPointFromFocusedNode(frame, horizontalDir, verticalDir);
+    if (m_node && !m_selectedElementRect.Intersects(m_webView->Rect())) {
+        static_cast<Node*>(m_node)->document()->setFocusedNode(NULL);
+        m_node = NULL;
+    }
     
-    // Adjust the move
-    TPoint br;
-    br.iX = m_webView->Rect().iBr.iX * KMaxJumpPercent / m_webView->scalingFactor();
-    br.iY = m_webView->Rect().iBr.iY * KMaxJumpPercent / m_webView->scalingFactor();
+    cursor->setPosition(m_focusPosition - TPoint(horizontalDir, verticalDir));
+    return oldPos;
+}
+
+bool WebTabbedNavigation::navigate(int horizontalDir, int verticalDir)
+{
+    WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
+    if (handleSelectElementScrolling(m_webView, verticalDir)) {
+        cursor->cursorUpdate(true);
+        return true;
+    }
+    Frame* mainFrame = core(m_webView->mainFrame());
+    FocusController* focusController = m_webView->page()->focusController();
+    Frame* focusedFrame = focusController->focusedOrMainFrame();        
+    TSize contentSize = kit(focusedFrame)->frameView()->contentSize();
+    TPoint contentPos = kit(focusedFrame)->frameView()->contentPos();
+    
+    // DOM can be changed so check if we are still inside the document
+    // If not reset tabbed navigation parameters to the closest point in document.
+    resetNavigationIfNeeded(contentPos, contentSize, focusedFrame, horizontalDir, verticalDir);
+    
+    
+    bool ret = m_firstNavigationOnPage;
+    
+    if (focusedFrame == NULL) focusedFrame = mainFrame;
+    TPoint oldFocusPoint =  focusPointFromFocusedNode(focusedFrame, horizontalDir, verticalDir);
     TRect view;
-    // define the view rect where we are looking for a match
-    if (horizontalDir == -1) {
-        view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY - br.iY, m_focusPosition.iX, m_focusPosition.iY + br.iY);
-    }
-    else if (horizontalDir == 1) {
-        view.SetRect(m_focusPosition.iX, m_focusPosition.iY - br.iY, m_focusPosition.iX + br.iX, m_focusPosition.iY + br.iY);
-    }
-    else if (verticalDir == -1) {
-        view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY - br.iY, m_focusPosition.iX + br.iX, m_focusPosition.iY);
-    }
-    else if (verticalDir == 1) {
-        view.SetRect(m_focusPosition.iX - br.iX, m_focusPosition.iY, m_focusPosition.iX + br.iX, m_focusPosition.iY + br.iY);
-    }
-    //wkDebug()<<"view x1 = "<<view.iTl.iX<<" y1 = "<<view.iTl.iY<<" x2 = "<<view.iBr.iX<<" y2 = "<<view.iBr.iY<<flush;
-    // walk all focusable nodes
-    Frame* f = m_webView->page()->mainFrame();
+    calcSearchViewRect(horizontalDir, verticalDir, view);
+
+    // walk all focusable nodes    
     TPoint selectedPoint(0, 0);
     TRect selectedRect(0, 0, 0, 0);
-    Node* selectedNode = NULL;
+    Node* selectedNode = bestFitFocusableNode(mainFrame, view, horizontalDir, verticalDir, 
+                                              selectedPoint, selectedRect);
+    
+    // Remember new selection
+    contentPos = kit(mainFrame)->frameView()->contentPos();
+    if (selectedNode) {
+        // Found an element to jump to
+        m_selectedElementRect = selectedRect;
+        m_focusPosition = selectedPoint;
+        m_node = selectedNode;
+        selectedNode->document()->setFocusedNode(selectedNode);
+        m_webView->page()->focusController()->setFocusedFrame(selectedNode->document()->frame());
+        
+        // And scroll to the selected element
+        RenderLayer *layer = selectedNode->renderer()->enclosingLayer();
+        if (layer) {
+            layer->scrollRectToVisible(selectedNode->getRect(), RenderLayer::gAlignCenterIfNeeded, RenderLayer::gAlignCenterIfNeeded);
+            WebFrameView* fv = kit(selectedNode->document()->frame())->frameView();
+            TRect newRect = fv->frameCoordsInViewCoords(selectedNode->getRect().Rect());
+            selectedRect = newRect;
+            selectedPoint = potentialFocusPoint(horizontalDir, verticalDir, newRect);
+            m_selectedElementRect = selectedRect;
+            m_focusPosition = selectedPoint;
+                        
+            cursor->updatePositionAndElemType(m_focusPosition);
+            // special handling for Select-Multi
+            if (m_webView->focusedElementType() == TBrCtlDefs::EElementSelectMultiBox) {
+                handleMultiSelect(horizontalDir, verticalDir);
+            }
+            
+            m_webView->sendMouseEventToEngine(TPointerEvent::EMove, cursor->position(), mainFrame);
+            ret = true;
+        }
+    }
+    else {
+        if (!m_firstNavigationOnPage) {
+            TInt vWidth = m_webView->Rect().Width();
+            TInt vHeight = m_webView->Rect().Height();
+            kit(mainFrame)->frameView()->scrollTo(contentPos + 
+                                                  TPoint(horizontalDir * vWidth / KScrollWhenNotFound, 
+                                                         verticalDir * vHeight / KScrollWhenNotFound));
+          
+            cursor->updatePositionAndElemType(m_focusPosition - TPoint(horizontalDir, verticalDir));
+        }
+    }
+    cursor->cursorUpdate(true);
+    return ret;
+}
+
+
+
+Node* WebTabbedNavigation::bestFitFocusableNode(Frame* topFrame, TRect& viewRect, int horizontalDir, int verticalDir, //input
+                                                TPoint& selectedPoint, TRect& selectedRect ) //output
+{
+   Node* selectedNode = NULL;
+   Frame* f = topFrame;
     while ( f ) {
         PassRefPtr<HTMLCollection> elements = f->document()->all();   
         TRect frameRect = kit(f)->frameView()->rectInGlobalCoords();
@@ -191,13 +297,11 @@
             if (n->isFocusable() && n->isElementNode() && !n->hasTagName(iframeTag) && !n->hasTagName(frameTag)) {
                 // Does the node intersect with the view rect?
                 TRect nodeRect = n->getRect().Rect();
-                //wkDebug()<<"Each node rect x1 = "<<nodeRect.iTl.iX<<" y1 = "<<nodeRect.iTl.iY<<" x2 = "<<nodeRect.iBr.iX<<" y2 = "<<nodeRect.iBr.iY<<flush;
-                nodeRect = TRect(kit(f)->frameView()->frameCoordsInViewCoords(nodeRect.iTl), 
-                    kit(f)->frameView()->frameCoordsInViewCoords(nodeRect.iBr));
-                if (nodeRect.Intersects(view)) {
+                nodeRect = kit(f)->frameView()->frameCoordsInViewCoords(nodeRect);
+                if (nodeRect.Intersects(viewRect) && 
+                    shouldConsiderRect(nodeRect, viewRect, horizontalDir, verticalDir)) {
                     // Compare nodes and select the best fit
                     TPoint newFocusPoint = potentialFocusPoint(horizontalDir, verticalDir, nodeRect);
-                    wkDebug()<<"Matching node rect x1 = "<<nodeRect.iTl.iX<<" y1 = "<<nodeRect.iTl.iY<<" x2 = "<<nodeRect.iBr.iX<<" y2 = "<<nodeRect.iBr.iY<<flush;
                     if (selectNode(horizontalDir, verticalDir, selectedRect, nodeRect, selectedPoint, newFocusPoint)) {
                         // found a better fit
                         selectedNode = n;
@@ -209,96 +313,55 @@
         } // for (Node* n = elements->firstItem(); n; n = elements->nextItem())
         f = f->tree()->traverseNext();
     } // while ( f )
-    // Remember new selection
-    contentPos = m_webView->mainFrame()->frameView()->contentPos();
-    if (selectedNode) {
-        // Found an element to jump to
-        m_selectedElementRect = selectedRect;
-        m_focusPosition = selectedPoint;
-        m_node = selectedNode;
-        selectedNode->document()->setFocusedNode(selectedNode);
-         m_webView->page()->focusController()->setFocusedFrame(selectedNode->document()->frame());
-        // And scroll to the selected element
-        RenderLayer *layer = selectedNode->renderer()->enclosingLayer();
-        if (layer) {
-            layer->scrollRectToVisible(selectedNode->getRect(), RenderLayer::gAlignCenterIfNeeded, RenderLayer::gAlignCenterIfNeeded);
-            TRect newRect = TRect(kit(selectedNode->document()->frame())->frameView()->frameCoordsInViewCoords(selectedNode->getRect().Rect().iTl), 
-                kit(selectedNode->document()->frame())->frameView()->frameCoordsInViewCoords(selectedNode->getRect().Rect().iBr));
-            selectedPoint += (newRect.iTl - selectedRect.iTl);
-            m_focusPosition = selectedPoint;
-            selectedRect = newRect;
-            m_selectedElementRect = selectedRect;
+    return selectedNode;
+}
+
 
-            int x, y;
-            selectedNode->renderer()->absolutePosition(x, y);
-            Vector<IntRect> rects;
-            selectedNode->renderer()->absoluteRects(rects, x, y);
-            WebFrameView* fv = kit(selectedNode->document()->frame())->frameView();
-            if (rects.size() > 0) {
-                 selectedPoint = TPoint(rects[0].x(), rects[0].y());
-                selectedPoint = fv->frameCoordsInViewCoords(selectedPoint);
-            }
-            StaticObjectsContainer::instance()->webCursor()->updatePositionAndElemType(selectedPoint);
-            // special handling for Select-Multi
-            if (m_webView->focusedElementType() == TBrCtlDefs::EElementSelectMultiBox) {
-                Element* e = static_cast<Element*>(m_node);
-                if (e->isControl()) {
-                    HTMLGenericFormElement* ie = static_cast<HTMLGenericFormElement*>( e );
-                    if (ie->type() == "select-multiple") {
-                        RenderListBox* render = static_cast<RenderListBox*>(e->renderer());
-                        HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>( e );
-                        IntRect itemRect = render->itemRect(0, 0, 0);
-                        TPoint cursorPoint(StaticObjectsContainer::instance()->webCursor()->position());
-                        int gap = (20 * m_webView->scalingFactor()) / 100;
-                        cursorPoint.iX = max(m_focusPosition.iX,  m_selectedElementRect.iTl.iX + gap);
-                        cursorPoint.iX = std::min(cursorPoint.iX,  m_selectedElementRect.iBr.iX - gap);
-                        if (verticalDir == -1) {
-                            cursorPoint.iY -= (itemRect.height() * m_webView->scalingFactor()) / 125;
-                        }
-                        if (cursorPoint != StaticObjectsContainer::instance()->webCursor()->position()) {
-                            StaticObjectsContainer::instance()->webCursor()->setPosition(cursorPoint);
-                        }
-                    }
-                }
-            }
-            TPointerEvent event;
-            event.iPosition = StaticObjectsContainer::instance()->webCursor()->position();
-            event.iModifiers = 0;
-            event.iType = TPointerEvent::EMove;
-            core(m_webView->mainFrame())->eventHandler()->handleMouseMoveEvent(PlatformMouseEvent(event));            
-            wkDebug()<<"Focus position x = "<<selectedPoint.iX<<" y = "<<selectedPoint.iY<<flush;
-            ret = true;
-        }
+bool WebTabbedNavigation::shouldConsiderRect(TRect& rect, TRect& searchRect, int horizontalDir, int verticalDir)
+{
+    bool considerX = false;
+    bool considerY = false;
+    
+    if (horizontalDir == 1) {
+        considerX = (rect.iTl.iX >= searchRect.iTl.iX);
+    }
+    else if (horizontalDir == -1) {
+        considerX = (rect.iBr.iX <= searchRect.iBr.iX);
+    }
+    
+    if (verticalDir == 1) {
+        considerY = (rect.iTl.iY >= searchRect.iTl.iY);
+    }
+    else if (verticalDir == -1) {
+        considerY = (rect.iBr.iY <= searchRect.iBr.iY);
     }
-    else {
-        if (!m_firstNavigationOnPage) {
-            m_webView->mainFrame()->frameView()->scrollTo(contentPos + TPoint(horizontalDir * m_webView->Rect().Width() / KScrollWhenNotFound, verticalDir * m_webView->Rect().Height() / KScrollWhenNotFound));
-            TPoint diff(m_webView->mainFrame()->frameView()->contentPos() - contentPos);
-            if (diff.iX || diff.iY) {
-                Frame* focusedFrame = m_webView->page()->focusController()->focusedFrame();
-                if (focusedFrame == NULL) focusedFrame = m_webView->page()->mainFrame();
-                Node* focusNode = focusedFrame->document()->focusedNode();
-                if (focusNode) {
-                    TRect selectedRect = focusNode->getRect().Rect();
-                    selectedRect = TRect(kit(focusedFrame)->frameView()->frameCoordsInViewCoords(selectedRect.iTl), 
-                        kit(focusedFrame)->frameView()->frameCoordsInViewCoords(selectedRect.iBr));
-                    if (!selectedRect.Intersects(kit(focusedFrame)->frameView()->visibleRect()))
-                        m_webView->page()->focusController()->setFocusedNode(NULL,0);
-                }
-                m_selectedElementRect.Move(diff);
-                m_focusPosition = oldFocusPoint + diff;
-                m_node = NULL;
-                StaticObjectsContainer::instance()->webCursor()->updatePositionAndElemType(m_focusPosition - m_webView->mainFrame()->frameView()->contentPos());
-                ret = true;
-            }
-            else
-            {
-                m_focusPosition = oldFocusPoint;
+    
+    return considerX || considerY;
+    
+}
+
+void WebTabbedNavigation::handleMultiSelect(int horizontalDir, int verticalDir)
+{
+    WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
+    Node* n = static_cast<Node*>(m_node);
+    WebFrameView* fv = kit(n->document()->frame())->frameView();
+    Element* e = static_cast<Element*>(m_node);
+    if (e->isControl()) {
+        HTMLGenericFormElement* ie = static_cast<HTMLGenericFormElement*>( e );
+        if (ie->type() == "select-multiple") {
+            RenderListBox* render = static_cast<RenderListBox*>(e->renderer());
+            HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>( e );
+            TRect itemRect = render->itemRect(0, 0, render->indexOffset()).Rect();
+            TRect itemRectViewCoord = fv->frameCoordsInViewCoords(itemRect);
+            itemRectViewCoord.Move(m_selectedElementRect.iTl);
+            itemRectViewCoord.Intersection(fv->topView()->Rect());           
+            
+            TPoint cursorPoint = itemRect.Center() + m_selectedElementRect.iTl;
+            if (cursorPoint != cursor->position()) {
+                cursor->setPosition(cursorPoint);
             }
         }
     }
-    StaticObjectsContainer::instance()->webCursor()->cursorUpdate(true);
-    return ret;
 }
 
 bool WebTabbedNavigation::selectNode(int horizontalDir, int verticalDir, TRect& selectedRect, TRect& newNodeRect, TPoint& selectedPoint, TPoint& newFocusPoint)
@@ -308,7 +371,7 @@
     }
     int selectedDist = distanceFunction(horizontalDir, verticalDir, selectedRect, selectedPoint);
     int newDist = distanceFunction(horizontalDir, verticalDir, newNodeRect, newFocusPoint);
-    wkDebug()<<"WebTabbedNavigation::selectNode. selected x = "<<selectedPoint.iX<<" y = "<<selectedPoint.iY<<" new x = "<<newFocusPoint.iX<<" y = "<<newFocusPoint.iY<<"old distance = "<<selectedDist<<" new distance = "<<newDist<<flush;
+
     return newDist < selectedDist;
 }
 
@@ -399,3 +462,4 @@
     Math::Int(o, sqrt(overlap));
     return ed + sameAxisDist + 2 * otherAxisDist - o;
 }
+
--- a/webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.h	Mon Oct 26 08:28:45 2009 +0200
@@ -24,6 +24,7 @@
 namespace WebCore {
     class Element;
     class Node;
+    class Frame;
 };
 
 class WebTabbedNavigation {
@@ -36,11 +37,19 @@
         void initializeForPage();
         void updateCursorPosition(const TPoint& pos);
         void focusedElementChanged(WebCore::Element* element);
-
+        TPoint updateCursorPosAfterScroll(WebCore::Frame* frame, int horizontalDir, int verticalDir);
     private:
         bool selectNode(int horizontalDir, int verticalDir, TRect& selectedRect, TRect& newNodeRect, TPoint& selectedPoint, TPoint& newFocusPoint);
         TPoint potentialFocusPoint(int horizontalDir, int verticalDir, TRect& newNodeRect);
         int distanceFunction(int horizontalDir, int verticalDir, TRect& rect, TPoint& point);
+        WebCore::Node* bestFitFocusableNode(WebCore::Frame* topFrame, TRect& viewRect, int horizontalDir, int verticalDir,
+                                            TPoint& selectedPoint, TRect& selectedRect );
+        void handleMultiSelect(int horizontalDir, int verticalDir);
+        void resetNavigationIfNeeded(TPoint& contentPos, TSize& contentSize, WebCore::Frame* focusedFrame,
+                                                         int horizontalDir, int verticalDir);
+        TPoint focusPointFromFocusedNode(WebCore::Frame* frame, int horizontalDir, int verticalDir);
+        void calcSearchViewRect(int horizontalDir, int verticalDir, TRect& view);
+        bool shouldConsiderRect(TRect& rect, TRect& searchRect, int horizontalDir, int verticalDir);
 
     private:
         TRect m_selectedElementRect;
--- a/webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/misc/WebUtil.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -748,12 +748,12 @@
         	//scroll only for the list which is either multiple or single but with more than one lines
             if (isScrollList) {
                 RenderListBox* render = static_cast<RenderListBox*>(e->renderer());
-                if (render->isScrollable()) {
+                
                     HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>( e );
                     IntRect r = e->getRect();
                     int curIndex = render->listIndexAtOffset(point.x() - r.x(), point.y() - r.y());
                     int topIndex = render->indexOffset();
-                    int bottomIndex = topIndex + selectElement->size() - 1;
+                    int bottomIndex = topIndex + render->getSize() - 1;
                     TPoint curPointInSelectBox(point.x() - r.x(), point.y() - r.y());
                     IntRect itemRect = render->itemRect(0, 0, curIndex);
                     int centerOfRect = itemRect.y() + (itemRect.height() * 1) / 4;
@@ -785,7 +785,7 @@
                             ret = true;
                         }
                     }
-                }//isScrollable()
+                
             }//isScrollList
         } //isControl
     } //focusedElementType()
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginSkin.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -474,7 +474,7 @@
         {
         positionChanged();
         // Force the control to be redrawn.
-        m_pluginwin->refreshPlugin(*gc);
+        m_pluginwin->refreshPlugin(*gc,newRect);
         }
     }
 
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -341,7 +341,7 @@
 // Refresh the plugin. - Called by PluginSkin
 // -----------------------------------------------------------------------------
 //
-TInt PluginWin::refreshPlugin(CFbsBitGc& bitmapContext)
+TInt PluginWin::refreshPlugin(CFbsBitGc& bitmapContext,TRect aRect)
 {
     if (m_control && IsVisible() && m_control->DrawableWindow())
         m_control->DrawNow();
@@ -352,12 +352,7 @@
         if (m_pluginskin->getNPPluginFucs() && m_pluginskin->getNPPluginFucs()->event) {
             m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), static_cast<void*>(&event));
         }
-        WebFrameView* fv = m_pluginskin->frame()->frameView();
-        TRect rect(Rect());
-        rect = TRect(fv->viewCoordsInFrameCoords(Rect().iTl), fv->viewCoordsInFrameCoords(Rect().iBr));
-        rect = fv->toViewCoords(rect);
-        rect.SetSize(m_bitmap->SizeInPixels()); // toViewCoords sometimes grows the rect by 1, which wil cause the bitmap to not draw
-        bitmapContext.DrawBitmap(rect, m_bitmap, rect.Size());
+        bitmapContext.DrawBitmap(aRect, m_bitmap);
     }
     return KErrNone;
 }
@@ -758,6 +753,21 @@
                                                          static_cast<void*>(&event));
         }
     }
+    else if(!m_windowedPlugin && m_pluginskin->getNPPluginFucs() && m_pluginskin->getNPPluginFucs()->event){
+        TRect cliprect = m_pluginskin->getClipRect();
+        TPoint newpos = aEvent.CurrentPos();
+        if(cliprect.Contains(newpos)){
+           TGestureEvent gestEvent(aEvent);
+           NPEvent event;
+           NPEventPointer ev;
+           event.event = ENppEventPointer;
+           ev.reserved = &gestEvent;
+           ev.pointerEvent = NULL;
+           event.param = &ev;
+           ret = m_pluginskin->getNPPluginFucs()->event(m_pluginskin->getNPP(), 
+                                                         static_cast<void*>(&event));
+        }
+    }    
     return ret;
 
 }
--- a/webengine/osswebengine/WebKit/s60/plugins/PluginWin.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/plugins/PluginWin.h	Mon Oct 26 08:28:45 2009 +0200
@@ -104,7 +104,7 @@
         * @since 3.1
         * @return The error code from the plugin
         */
-        TInt refreshPlugin(CFbsBitGc& bitmapContext);
+        TInt refreshPlugin(CFbsBitGc& bitmapContext,TRect aRect);
 
 
         /**
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -357,3 +357,8 @@
     m_webView->focusedElementChanged(element);
 }
 
+void WebChromeClient::setElementVisibilityChanged(bool visibility) {
+    m_visibility = visibility;
+    m_visibilityByMouse = m_visibility && m_webView->isMouseEventFired();
+    m_visibilityByKey = m_visibility && m_webView->isKeyEventFired();
+}
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.h	Mon Oct 26 08:28:45 2009 +0200
@@ -99,13 +99,20 @@
         virtual void setToolTip(const WebCore::String&) {}
 
         virtual void print(WebCore::Frame*) {}
-        void setElementVisibilityChanged(bool visibility) {
-            m_visibility = visibility;
-        }
+        void setElementVisibilityChanged(bool visibility);
 
         bool elementVisibilityChanged() {
             return m_visibility;   
         }
+		
+		 bool elementVisibilityChangedByMouse() {
+            return m_visibilityByMouse;
+        }
+        
+        bool elementVisibilityChangedByKey() {
+            return m_visibilityByKey;
+        }
+		
         virtual void focusedElementChanged(WebCore::Element*);
         
 protected: // new functions
@@ -115,6 +122,8 @@
     WebView *m_webView;
     void GetDateAndTimeL(TDes& date, TDes& time) const;
     bool m_visibility;
+    bool m_visibilityByMouse;
+    bool m_visibilityByKey;
 };
 
 
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebEditorClient.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -384,6 +384,9 @@
                     frame->selectionController()->end() != endPos) {
                     event->setDefaultHandled();
                 }
+                else {
+                    m_shouldEndEditing = !m_webView->fepTextEditor()->IsTextAreaFocused();
+                }
                 break;
 
             case EKeyRightArrow:
@@ -404,6 +407,9 @@
                     frame->selectionController()->end() != endPos) {
                     event->setDefaultHandled();
                 }
+                else {
+                    m_shouldEndEditing = !m_webView->fepTextEditor()->IsTextAreaFocused();
+                }
                 break;
 
             case EKeyUpArrow:
--- a/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webcoresupport/WebFrameLoaderClient.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1143,7 +1143,8 @@
 {
     if (brctl(m_webFrame)->wmlMode()) {
         TRAP_IGNORE(
-        m_WmlContentListener->CompleteL( 0, 0 );
+		if (m_WmlContentListener)
+        	m_WmlContentListener->CompleteL( 0, 0 );
         );
         return;
     }
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlSoftkeysObserverImpl.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,22 +1,46 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : BrCtlBrCtlSoftkeysObserverImpl.h
+*  Part of     : WebKit \ BrowserControl
+*  Interface   : Browser Control API
+*  Description : Handle softkeys updates
+*  Version     : %Version%
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handle softkeys updates
-*
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*  
+*  	Redistribution and use in source and binary forms, with or without
+*  	modification, are permitted provided that the following conditions
+*  	are met:
+*  
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
+*  
+*  	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*  	"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*  	LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*  	A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*  	OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*  	SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*  	LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*  	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*  	THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*  	(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*  	USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*  	DAMAGE.
+*  
+*    Please see file patentlicense.txt for further grants.
+* ==============================================================================
 */
 
 
-
 #ifndef CRCTLSOFTKEYSOBSERVERIMPL_H
 #define CRCTLSOFTKEYSOBSERVERIMPL_H
 
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlSpecialLoadObserverImpl.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,22 +1,46 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : BrCtlSpecialLoadObserverImpl.h
+*  Part of     : WebKit \ BrowserControl
+*  Interface   : Browser Control API
+*  Description : Handle special load events such as network connection, deal with non-http or non-html requests
+*  Version     : %Version%
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handle special load events such as network connection, deal with non-http or non-html requests
-*
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*  
+*  	Redistribution and use in source and binary forms, with or without
+*  	modification, are permitted provided that the following conditions
+*  	are met:
+*  
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
+*  
+*  	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*  	"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*  	LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*  	A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*  	OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*  	SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*  	LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*  	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*  	THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*  	(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*  	USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*  	DAMAGE.
+*  
+*    Please see file patentlicense.txt for further grants.
+* ==============================================================================
 */
 
 
-
 #ifndef BRCTLSPECIALLOADOBSERVERIMPL_H
 #define BRCTLSPECIALLOADOBSERVERIMPL_H
 
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtlWindowObserverImpl.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,22 +1,46 @@
 /*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ==============================================================================
+*  Name        : BrCtlWinowObserverImpl.h
+*  Part of     : WebKit \ BrowserControl
+*  Interface   : Browser Control API
+*  Description : Handle special load events such as network connection, deal with non-http or non-html requests
+*  Version     : %Version%
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handle special load events such as network connection, deal with non-http or non-html requests
-*
+*    Copyright (c) 2006, Nokia Corporation
+*    All rights reserved.
+*  
+*  	Redistribution and use in source and binary forms, with or without
+*  	modification, are permitted provided that the following conditions
+*  	are met:
+*  
+*      * Redistributions of source code must retain the above copyright
+*        notice, this list of conditions and the following disclaimer.
+*      * Redistributions in binary form must reproduce the above copyright
+*        notice, this list of conditions and the following disclaimer in
+*        the documentation and/or other materials provided with the
+*        distribution.
+*      * Neither the name of the Nokia Corporation nor the names of its
+*        contributors may be used to endorse or promote products derived
+*        from this software without specific prior written permission.
+*  
+*  	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+*  	"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+*  	LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+*  	A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+*  	OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+*  	SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+*  	LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+*  	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+*  	THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+*  	(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+*  	USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+*  	DAMAGE.
+*  
+*    Please see file patentlicense.txt for further grants.
+* ==============================================================================
 */
 
 
-
 #ifndef BRCTLWINDOWOBSERVERIMPL_H
 #define BRCTLWINDOWOBSERVERIMPL_H
 
--- a/webengine/osswebengine/WebKit/s60/webview/SettingsContainer.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/SettingsContainer.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -82,6 +82,8 @@
     brctlSettings[TBrCtlDefs::ESettingsToolbarButton7Cmd] = 13;
     brctlSettings[TBrCtlDefs::ESettingsScriptLog] = 0;
     brctlSettings[TBrCtlDefs::ESettingsCursorShowMode] = 1;
+    brctlSettings[TBrCtlDefs::ESettingsEnterKeyMode] = TBrCtlDefs::EEnterKeyCanActivateLink;
+    
 
     updatePageSetting(TBrCtlDefs::ESettingsAutoLoadImages);
     updatePageSetting(TBrCtlDefs::ESettingsFontSize);
@@ -249,6 +251,7 @@
         case TBrCtlDefs::ESettingsZoomLevelMax:
         case TBrCtlDefs::ESettingsCursorShowMode:    
         case TBrCtlDefs::ESettingsZoomLevelDefault:
+        case TBrCtlDefs::ESettingsEnterKeyMode:
             {
             retVal = brctlSettings[setting];
             break;
--- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -202,7 +202,7 @@
 {
     
     m_type = type;
-    if (m_visible && (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeCursor)) {
+    if (m_visible) {
         CFbsBitmap*  img = NULL;
         CFbsBitmap*  msk = NULL;
         switch( type )
@@ -264,19 +264,22 @@
 {
     if (!m_view || !m_view->brCtl() || !m_view->brCtl()->settings())
         return;
+
+    bool tabbedNavigation = (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed);
+    bool navigationNone = (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone); 
+    bool cursorNavigation = (m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeCursor);
+    TBrCtlDefs::TBrCtlElementType elType = m_view->focusedElementType();
     //If cursor show mode defined inside cenrep key is no cursor shown in non-tab navigation mode,
     //then no need to update the cursor
-    if (m_view->brCtl()->settings()->getNavigationType() != SettingsContainer:: NavigationTypeTabbed &&
-            (m_view->brCtl()->settings()->brctlSetting(TBrCtlDefs::ESettingsCursorShowMode) == TBrCtlDefs::ENoCursor))
+    if (!tabbedNavigation &&
+         (m_view->brCtl()->settings()->brctlSetting(TBrCtlDefs::ESettingsCursorShowMode) == TBrCtlDefs::ENoCursor))
         return;
-    if ( m_view->showCursor() ) {
-        m_visible = visible && ((m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeCursor)|| m_view->focusedElementType() == TBrCtlDefs::EElementSelectMultiBox); // check for tabbedNavigation here because it is called from so many places.
-    }
+
+    m_visible = visible && ((cursorNavigation && m_view->showCursor()) || 
+                            (tabbedNavigation && (elType == TBrCtlDefs::EElementSelectMultiBox)));
 
     resetTransparency();
-    CursorTypes type = PointerCursor;
-    TBrCtlDefs::TBrCtlElementType elType = m_view->focusedElementType();
-
+    CursorTypes type = PointerCursor;    
     if (m_visible) {
         if      (    elType == TBrCtlDefs::EElementNone
                   || elType == TBrCtlDefs::EElementImageBox
@@ -285,7 +288,7 @@
         else if (    elType == TBrCtlDefs::EElementSmartLinkTel
                   || elType == TBrCtlDefs::EElementSmartLinkEmail )
             type = IBeamCursor;
-        else if (    elType == TBrCtlDefs::EElementSelectMultiBox && m_view->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed)
+        else if (    elType == TBrCtlDefs::EElementSelectMultiBox && tabbedNavigation)
             type = SelectMultiCursor;
         else
             type = HandCursor;
@@ -364,9 +367,22 @@
     {
     setTransparent(false);
     m_transtimer->Cancel();
-    m_transtimer->Start(microsecs,0,TCallBack(TransparencyTimerCb,this));
+    
+    if (m_visible)
+        {
+        m_transtimer->Start(microsecs,0,TCallBack(TransparencyTimerCb,this));
+        }
     }
 
+void WebCursor::stopTransparencyTimer()
+    {
+    if (m_transtimer && m_transtimer->IsActive())
+        {
+        m_transtimer->Cancel();
+        }
+    }
+
+
 // -----------------------------------------------------------------------------
 // WebCursor::increaseTransparencyMoveCount
 // -----------------------------------------------------------------------------
@@ -503,14 +519,20 @@
         pfRect = TRect(ppfv->frameCoordsInViewCoords(pfRect.iTl),
                           ppfv->frameCoordsInViewCoords(pfRect.iBr));
     }
-
+    else { 
+        pfRect.SetRect(0, 0, pfRect.iBr.iX * z / 100, pfRect.iBr.iY * z / 100);
+    }
+    
     WebFrameView* fv = frame->frameView();
     TRect framerect = fv ->rect();
     if (frame->parentFrame()) {// frame is not a main frame
        framerect = TRect(pfv->frameCoordsInViewCoords(framerect.iTl),
                          pfv->frameCoordsInViewCoords(framerect.iBr));
     }
-
+    else {
+        framerect.SetRect(0, 0, framerect.iBr.iX * z / 100, framerect.iBr.iY * z / 100);
+    }
+    
     TRect pfInnerRect = pfRect;
     innerRect(pfInnerRect);
     TRect fInnerRect = framerect;
@@ -776,6 +798,9 @@
     if (m_view && navigableNodeUnderCursor(*frame, point, elType, r)) {
         m_view->setFocusedElementType(elType);
     }
+    else {
+        m_view->setFocusedElementType(TBrCtlDefs::EElementNone);
+    }
 }
 
 // -----------------------------------------------------------------------------
@@ -881,19 +906,19 @@
     }
 
 
-// -----------------------------------------------------------------------------
-// WebCursor::navigableNodeUnderCursor
-// -----------------------------------------------------------------------------
-bool WebCursor::navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const
+bool WebCursor::navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect)
 {
     Frame* coreFrame = core(&webFrame);
     if (!coreFrame->renderer() )
         return false;
 
     Element* node = coreFrame->document()->elementFromPoint(aPoint.iX, aPoint.iY);
-
+    m_elementUnderCursor = node;
     if (node) {
-        return coreFrame->bridge()->getTypeFromElement(node, aElType, aFocusRect);
+        Node* retNode = 0;
+        bool ret = coreFrame->bridge()->getTypeFromElement(node, aElType, aFocusRect, retNode);
+        m_elementUnderCursor = static_cast<Element *>(retNode);
+        return ret;
     }
 
     return false;
--- a/webengine/osswebengine/WebKit/s60/webview/WebCursor.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebCursor.h	Mon Oct 26 08:28:45 2009 +0200
@@ -27,6 +27,7 @@
 namespace WebCore {
     class IntRect;
     class IntPoint;
+    class Element;
 }
 #define KInitialOffset 5
 
@@ -68,10 +69,12 @@
         void scrollAndMoveCursor(int dir, int scrollRange, bool auto);
         void simpleScroll(int dir, int scrollRange, bool auto=true);
         WebFrame* getFrameUnderCursor();
-        bool navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect) const;
+        bool navigableNodeUnderCursor(WebFrame& webFrame, TPoint& aPoint, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect);
         WebFrame* getFrameAtPoint(const TPoint& viewPos_);
+        WebCore::Element*  getElementUnderCursor() {return m_elementUnderCursor;}
+        void stopTransparencyTimer();
         
-
+       
   private:
         void moveCursor(int lr,int tb, int scrollRange);
         bool determineCursorPosition(WebFrame& webFrame, TBrCtlDefs::TBrCtlElementType& aElType, TRect& aFocusRect, TRect& aSearchRect, 
@@ -118,6 +121,7 @@
         CursorTypes                     m_type;
         int                             m_flipCounter;
         TPoint                          m_incrLimit;
+        WebCore::Element*               m_elementUnderCursor;
     };
 
 #endif
--- a/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFepTextEditor.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -398,32 +398,18 @@
     // The other part of the rather hackish way to check if we are at the end of the editing field
     // see WebEditorClient::handleKeypress
     Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
-    if ( frame ) {
-        SelectionController* sc = frame->selectionController();
-        Node* editNode = sc->base().node();
-        if ( IsTextAreaFocused() ) {
-            while(editNode && !editNode->isTextNode()){
-                editNode = editNode->previousSibling();
-            }
-			TInt position( aCursorSelection.iAnchorPos );
-			TInt offset( 0 );
-            TInt extentoffset   = 0;
-			if ( editNode ) {
-				editNode = findTextNodeForCurPos( editNode, position );
-		    if(aCursorSelection.iAnchorPos >= position) {
-                offset = aCursorSelection.iAnchorPos - position;
-                extentoffset = aCursorSelection.iCursorPos - position;
-            }
-            extentoffset = extentoffset < 0 ? 0 : extentoffset; 
-            Position base( editNode, offset );
-			Position extent(editNode,extentoffset);
-			sc->moveTo( base, extent, DOWNSTREAM );
-			}
+    Node*  focusedNode = frame->document()->focusedNode();
+    if ( frame && focusedNode) {
+        TInt lowPos = aCursorSelection.LowerPos();
+        TInt highPos = aCursorSelection.HigherPos();
+        if (focusedNode->hasTagName(HTMLNames::textareaTag)) {
+            HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(focusedNode);
+            textArea->setSelectionRange(lowPos, highPos);
 		}
-		else if ( editNode && editNode->isTextNode() ) {
-			Position base( sc->baseNode(), aCursorSelection.iAnchorPos );
-			Position extent( sc->baseNode(), aCursorSelection.iCursorPos );
-			sc->moveTo( base, extent, DOWNSTREAM );
+		else if (focusedNode->hasTagName(HTMLNames::inputTag)) {
+		    HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(focusedNode);
+		    inputElement->setSelectionStart(lowPos);
+		    inputElement->setSelectionEnd(highPos);
 		}
 		HandleUpdateCursor();
     }
@@ -439,27 +425,21 @@
     aCursorSelection.SetSelection(0,0);
 
     Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
-    if ( frame ) {
-        SelectionController* sc = frame->selectionController();
-        Node* editNode = sc->base().node();
-		if ( frame && frame->document()->focusedNode() ) {
-			if ( IsTextAreaFocused() ) {
-                HTMLTextAreaElement* ie = static_cast<HTMLTextAreaElement*>(frame->document()->focusedNode());                                                 
-                while(editNode && !editNode->isTextNode()) {
-                    editNode = editNode->previousSibling();
-                }
-				TInt len( 0 );
-				if ( editNode ) {
-					findPrevSiblingTextLen( editNode, len );
-				}
-				aCursorSelection.SetSelection( ((sc->baseOffset()+len > ie->value().length()) ? 0 : sc->baseOffset()+len),
-                                                  ((sc->extentOffset()+len > ie->value().length()) ? 0 : sc->extentOffset()+len));
-			}
-			else {
-				aCursorSelection.SetSelection(sc->baseOffset(), sc->extentOffset());
-			}
-		}
-	}
+    Node*  focusedNode = frame->document()->focusedNode();
+    if (frame && focusedNode) {
+        if (focusedNode->hasTagName(HTMLNames::textareaTag)) {
+            HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(focusedNode);
+            TInt anchorPos = textArea->selectionStart();
+            TInt cursorPos = textArea->selectionEnd();
+            aCursorSelection.SetSelection(cursorPos, anchorPos);
+        }
+        else if (focusedNode->hasTagName(HTMLNames::inputTag)) {
+            HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(focusedNode);
+            TInt anchorPos = inputElement->selectionStart();
+            TInt cursorPos = inputElement->selectionEnd();
+            aCursorSelection.SetSelection(cursorPos, anchorPos);
+        }
+    }
 }
 
 // -----------------------------------------------------------------------------
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -347,8 +347,8 @@
     WTF::Vector<WebFrame*> ch = childFrames();
     WebFrame* frm = 0;
     // Check the children of the frame only if this frame also contains pt_
-    // If a child iframe is bigger than the parent, it should not be picked.
-    if (m_view->rectInGlobalCoords().Contains(pt_)) {
+    // If a child iframe is bigger than the parent, it should not be picked.    
+    if (m_view->isVisible() && m_view->rectInGlobalCoords().Contains(pt_)) {
         Vector<WebFrame*>::iterator end = ch.end();
         for (Vector<WebFrame*>::iterator itr = ch.begin(); itr != end; itr++) {
             WebFrame* f = (*itr);
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -29,12 +29,17 @@
 #include "PageScaler.h"
 #include "webkitlogger.h"
 #include "BrCtl.h"
+#include "SettingsContainer.h"
+#include "StaticObjectsContainer.h"
+#include "WebTabbedNavigation.h"
+
 using namespace WebCore;
 
 WebFrameView::WebFrameView() : 
       m_parent(NULL),
       m_hasBorder(true),
-      m_refCount(1)
+      m_refCount(1),
+	  m_isVisible(ETrue)
 {
     m_hScrollbar = new WebCore::PlatformScrollbar(this, WebCore::HorizontalScrollbar, WebCore::RegularScrollbar);
     m_vScrollbar = new WebCore::PlatformScrollbar(this, WebCore::VerticalScrollbar, WebCore::RegularScrollbar); 
@@ -323,7 +328,14 @@
 
             //Update scroll bar , thumb position
             m_topView->updateScrollbars(m_contentSize.iHeight, m_contentPos.iY, m_contentSize.iWidth, m_contentPos.iX);
-            
+
+            if (m_topView->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) {
+                int h = (to.iX - from.iX);
+                int v = (to.iY - from.iY);
+                h = (h != 0) ? ((h > 0) ? 1 : -1) : h;
+                v = (v != 0) ? ((v > 0) ? 1 : -1) : v;
+                m_topView->tabbedNavigation()->updateCursorPosAfterScroll(core(m_frame.get()), h, v);
+            }
             // trigger painting
             m_topView->syncRepaint();
         }
@@ -506,6 +518,13 @@
     return pt;
 }
 
+TRect WebFrameView::frameCoordsInViewCoords(const TRect &aRect)
+{
+    TSize s = aRect.Size(); 
+    return TRect(frameCoordsInViewCoords(aRect.iTl), toViewCoords(s));
+}
+
+
 TRect WebFrameView::rectInGlobalCoords() const
 {
     TRect rect(toViewCoords(m_frameRect));
@@ -526,6 +545,7 @@
 
 void WebFrameView::makeVisible(TBool aVisible) 
 {
+    m_isVisible = aVisible;
 }
 
 TBool WebFrameView::isFocused() const
@@ -535,7 +555,7 @@
 
 TBool WebFrameView::isVisible() const
 {
-    return ETrue;
+    return m_isVisible;
 }
 
 TSize WebFrameView::contentSize() const
--- a/webengine/osswebengine/WebKit/s60/webview/WebFrameView.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebFrameView.h	Mon Oct 26 08:28:45 2009 +0200
@@ -98,7 +98,8 @@
     TPoint frameCoordsInViewCoords(const TPoint& aPoint);
     TPoint viewCoordsInFrameCoords(const TPoint& aPoint);
     TRect rectInGlobalCoords() const;
-
+    TRect frameCoordsInViewCoords(const TRect &aRect);
+    
     void checkScrollbarVisibility();
     int getBidiWidth();
     bool needScroll(const TPoint& aPoint);
@@ -125,6 +126,7 @@
 
     bool    m_resizeByEngine;
     int     m_refCount;
+	TBool   m_isVisible;
 };
 
 #endif // END OF FILE
--- a/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebPointerEventHandler.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -148,7 +148,9 @@
       }
     }
     updateCursor(aEvent.CurrentPos());
-
+    if (IS_TABBED_NAVIGATION) {
+        m_webview->tabbedNavigation()->updateCursorPosition(m_highlightPos);
+    }
     switch (gtype) {
       // sent on touch down
       case EGestureStart:  
@@ -195,7 +197,7 @@
       {
           m_ignoreTap = false;
           if (!IS_NAVIGATION_NONE) {
-          handleTouchUp(aEvent);      
+              handleTouchUp(aEvent);
           }
           else {
               Frame* frm = m_webview->page()->focusController()->focusedOrMainFrame();
@@ -265,7 +267,7 @@
     }
 
     if (!IS_NAVIGATION_NONE) {
-    m_webview->pageScrollHandler()->handleTouchDownGH(aEvent);
+        m_webview->pageScrollHandler()->handleTouchDownGH(aEvent);
     }
 
     if ( TBrCtlDefs::EElementActivatedObjectBox == elType) {
@@ -305,7 +307,7 @@
     PluginHandler* pluginHandler = WebCore::StaticObjectsContainer::instance()->pluginHandler();
     pluginHandler->setPluginToActivate(NULL);
     if (!IS_NAVIGATION_NONE) {
-    m_webview->pageScrollHandler()->handleTouchUpGH(aEvent);
+        m_webview->pageScrollHandler()->handleTouchUpGH(aEvent);
     }
 }
 
@@ -360,12 +362,6 @@
         else if (aPointerEvent.iType == TPointerEvent::EButton1Up) {
             m_webview->GetContainerWindow().DisablePointerMoveBuffer();
         }
-
-        }
-
-
-    if (m_webview->brCtl()->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed) {
-        m_webview->tabbedNavigation()->updateCursorPosition(aPointerEvent.iPosition);
     }
 
 #ifdef BRDO_USE_GESTURE_HELPER
@@ -412,35 +408,31 @@
     TBrCtlDefs::TBrCtlElementType elType = TBrCtlDefs::EElementNone;
     Frame* coreFrame = core(m_webview->mainFrame());
     WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
-    m_webview->page()->chrome()->client()->setElementVisibilityChanged(false);
+    
     TPointerEvent event;
     TPoint pos = cursor->position();
-    IntPoint point(pos.iX, pos.iY);   
-    HitTestResult htresult = coreFrame->eventHandler()->hitTestResultAtPoint(point, true);
-    Node* eventNode = htresult.innerNode();
-    Frame* frm = eventNode->document()->frame();
-    WebFrame* wfrm = kit(frm);
+    WebFrame* wfrm = cursor->getFrameAtPoint(pos);
+    Frame* frm = core(wfrm);
     TPoint pt(wfrm->frameView()->viewCoordsInFrameCoords(pos));
     TPoint nodePoint;
     
+    Element* eventNode = frm->document()->elementFromPoint(pos.iX, pos.iY);
+    
     m_highlightedNode = NULL;
 
-    frm->bridge()->getTypeFromElement(eventNode, elType, elRect);
+    Node* retNode = 0;
+    frm->bridge()->getTypeFromElement(eventNode, elType, elRect, retNode);
+
     if (elType == TBrCtlDefs::EElementNone) {
-        
         Node* n = wfrm->getClosestAnchorElement(cursor->position(), pos);
-        if (n) {
-            point.setX(pos.iX);
-            point.setY(pos.iY);
-            htresult = coreFrame->eventHandler()->hitTestResultAtPoint(point, true);
-            eventNode = htresult.innerNode();
-            frm = eventNode->document()->frame();
-            frm->bridge()->getTypeFromElement(eventNode, elType, elRect);
+        if (n) {          
+            wfrm = cursor->getFrameAtPoint(pos);
+            frm = core(wfrm);
+            eventNode = frm->document()->elementFromPoint(pos.iX, pos.iY);
+            frm->bridge()->getTypeFromElement(eventNode, elType, elRect, retNode);
             TPoint nodePoint = n->getRect().Rect().Center();
             m_offset = (pt.iX- nodePoint.iX)*(pt.iX- nodePoint.iX) +
                        (pt.iY- nodePoint.iY)*(pt.iY- nodePoint.iY);
-            
-            
         }
     }
     m_highlightedNode = eventNode;
@@ -493,13 +485,17 @@
     }
 #endif // BRDO_TOUCH_ENABLED_FF
     
-
-     // We assume that if element visibility has been changed  
-     // between "up" and "down" that means that some node event 
-     // listener (onMouseOver etc) handling happened and we don't 
-     // want to send a click (mouse press + mouse release) event.
-     if (!IS_NAVIGATION_NONE && 
-         m_webview->page()->chrome()->client()->elementVisibilityChanged()) {
+     /*
+      * We assume that if element visibility has been changed  
+      * between "up" and "down" that means that some node event 
+      * listener (onMouseOver etc) handling happened and we don't 
+      * want to send a click (mouse press = mouse release) event.
+      * The exception is editable element, since we want VKB anyway
+      */
+     if (!IS_NAVIGATION_NONE &&
+         elType != TBrCtlDefs::EElementActivatedInputBox && 
+         elType != TBrCtlDefs::EElementTextAreaBox &&     
+         m_webview->page()->chrome()->client()->elementVisibilityChangedByMouse()) {
          return;
      }
 
@@ -509,12 +505,11 @@
 
     // don't pass the event if the text input is not in valid format
     if (isHighlitableElement(elType) || m_webview->fepTextEditor()->validateTextFormat()) {
-        // because of scrolling we delay sending EButton1Down till we get EButton1Up event and if the content is not scrolling
-        coreFrame->eventHandler()->handleMouseReleaseEvent(PlatformMouseEvent(m_lastTapEvent));
+        m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Up,  m_lastTapEvent.iPosition, coreFrame);
     }
 
     // special handling for broken image (why is this here??)
-    if (m_webview->focusedElementType() == TBrCtlDefs::EElementBrokenImage) {
+    if (elType == TBrCtlDefs::EElementBrokenImage) {
         loadFocusedImage(m_webview);
     }
     else if (elType == TBrCtlDefs::EElementActivatedObjectBox) {
@@ -601,6 +596,21 @@
     }
     m_isHighlighted = (m_highlightedNode != NULL) && (elType != TBrCtlDefs::EElementNone) ;
     
+    m_webview->page()->chrome()->client()->setElementVisibilityChanged(false);
+    
+    /*
+     * Tabbed navigation might already set the focused node.
+     * If it's the same as m_highlightedNode FocuseController::setFocusedNode()
+     * wouldn't do anything and setEditable won't be called.
+     * So we are setting focused node to NULL here and let mouse event handler
+     * set it through ocuseController::setFocusedNode()
+     */
+    if (IS_TABBED_NAVIGATION &&
+        elType == TBrCtlDefs::EElementInputBox || 
+        elType == TBrCtlDefs::EElementTextAreaBox) {
+        coreFrame->document()->setFocusedNode(NULL);
+    }
+         
     m_webview->sendMouseEventToEngine(TPointerEvent::EButton1Down, m_highlightPos, coreFrame);
 
     m_webview->sendMouseEventToEngine(TPointerEvent::EMove, m_highlightPos, coreFrame);
--- a/webengine/osswebengine/WebKit/s60/webview/WebView.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebView.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -143,7 +143,10 @@
         : coreFrame->tree()->traversePreviousWithWrap(wrapFlag));
 }
 
-
+#define IS_UP_KEY(keyevent) ((keyevent.iCode == EKeyUpArrow) || (keyevent.iCode == EStdKeyUpArrow))
+#define IS_DOWN_KEY(keyevent) ((keyevent.iCode == EStdKeyDevice12) || (keyevent.iCode == EKeyDownArrow) || (keyevent.iCode == EStdKeyDownArrow))
+#define IS_RIGHT_KEY(keyevent) ((keyevent.iCode == EStdKeyDevice11) || (keyevent.iCode == EKeyRightArrow) || (keyevent.iCode == EStdKeyRightArrow))
+#define IS_LEFT_KEY(keyevent) ((keyevent.iCode == EStdKeyDevice13) || (keyevent.iCode == EKeyLeftArrow) || (keyevent.iCode == EStdKeyLeftArrow))
 
 // -----------------------------------------------------------------------------
 // WebView::NewL
@@ -196,11 +199,14 @@
 , m_showCursor(false)
 , m_allowRepaints(true)
 , m_prevEditMode(false)
+, m_firedEvent(0)
 {
 }
 
 WebView::~WebView()
 {
+    StaticObjectsContainer::instance()->webCursor()->stopTransparencyTimer();
+
     // the zoom handler is a client of WebView (also owned by
     // WebView--a circular dependency) so it must be deleted before
     // the WebView object is destroyed because in its destructor it
@@ -782,6 +788,7 @@
         m_focusedElementType = TBrCtlDefs::EElementNone;
     }
     m_brctl->updateDefaultSoftkeys();
+    page()->chrome()->client()->setElementVisibilityChanged(false);
 }
 
 void WebView::updatePageScaler()
@@ -898,7 +905,8 @@
     event.iPosition = pos;
     event.iModifiers = 0;
     event.iType = eventType;
-
+    
+    setMouseEventFired();
     switch (eventType) {
         case TPointerEvent::EButton1Down:
         {
@@ -918,6 +926,7 @@
             break;
         }
     };
+    clearMouseEventFired();
 }
 
 
@@ -931,22 +940,21 @@
     }
 }
 
-bool WebView::needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)
+bool WebView::needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame, bool consumed)
 {
-    bool upOrDown = ((keyevent.iCode == EKeyUpArrow) ||
-                    (keyevent.iCode == EStdKeyUpArrow) ||
-                    (keyevent.iCode == EKeyRightUpArrow) ||
-                    (keyevent.iCode == EKeyDownArrow) ||
-                    (keyevent.iCode == EStdKeyDownArrow) ||
-                    (keyevent.iCode == EKeyLeftDownArrow));
-    bool shouldEndEditing = frame->editor()->client()->shouldEndEditing(NULL);
-    bool inEditState  = (m_isEditable && (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox));
-    bool isSelectBoxActive = (m_focusedElementType == TBrCtlDefs::EElementSelectBox);
-    bool deactivateInputBox = (inEditState && upOrDown && m_webfeptexteditor->validateTextFormat());
-    bool deactivateSelectBox = (isSelectBoxActive && isNaviKey(keyevent));
-
+    /*
+     * Here we are making an assumption that if element visibility has been changed
+     * than JavaScript used the key event. If this the the case or consumed is tru and
+     * keys are Up or Down we don't want to deactivate an editable element.
+     * Google suggest is examples if such case.
+     */
+    bool upOrDownConsumed = (consumed ||    //JavaScript consumed event or
+                               (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox && // style of input box     
+                                page()->chrome()->client()->elementVisibilityChanged())) &&      // changed
+                             (IS_UP_KEY(keyevent) || IS_DOWN_KEY(keyevent));
+    bool shouldEndEditing = frame->editor()->client()->shouldEndEditing(NULL) && !upOrDownConsumed;
     bool deactivateEditable = (m_isEditable && shouldEndEditing && m_webfeptexteditor->validateTextFormat());
-    return deactivateEditable || deactivateSelectBox; 
+    return deactivateEditable; 
 }
 
 
@@ -981,19 +989,12 @@
         }
     }
     else {
-        if (keyevent.iCode == EKeyDevice3) { //selection key (MSK)
-                // mimic ccb's behavior of onFocus
+        if (keyevent.iCode == EKeyDevice3) { // selection key (MSK)
            consumed = handleMSK(keyevent, oldKeyCode, frame);
-
-           // Toolbar is activated on long key press only if the element
-           // type is EElementNone during EEventKeyDown and EEventKey.
-           // This prevents toolbar from popping up in DHTML pages. Also,
-           // toolbar is activated when the user is not in fast scroll
-           // mode, or in page overview mode, or on wml page.
         }
         else if (isNaviKey(keyevent)) {
             consumed = handleNaviKeyEvent(keyevent, oldKeyCode, frame);
-        } // if (m_brctl->settings()->getNavigationType()
+        } 
         else { // Not an arrow key..
                  // activate hovered input element by just start typing
             consumed = !m_isEditable && handleInputElement(keyevent, eventcode, frame);
@@ -1005,90 +1006,190 @@
     return consumed;
 }
 
+
 bool WebView::handleMSK(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)
 {
     WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
     bool prevEditableState = m_isEditable;
-    if (m_focusedElementType != TBrCtlDefs::EElementActivatedInputBox ) {
-        sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Down,
-                               cursor->position(), frame);
+    bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed);
+    Node* focusedNode = frame->document()->focusedNode();
+    bool multiSelectInTabbed =  (m_focusedElementType == TBrCtlDefs::EElementSelectMultiBox) &&  // multiselect element
+                                     tabbedNavigation;                                               // in tabbed mode.
+        /*
+         * Avoiding resetting cursor position to top left corner of Select Box 
+         * See comment in handleInputElement
+         */                            
+        if (!multiSelectInTabbed) {
+            setFocusNone();
+        }
+         
+    sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Down,
+                                   cursor->position(), frame);    
+    if (!tabbedNavigation) {
+        setFocusedNode(frame); //TODO: Do we need it here?
     }
-    setFocusedNode(frame);
+    else {
+        /*
+         * Restore focused by tabbed navigation node since mouse event
+         * handler might set it to NULL.  
+         */
+        page()->focusController()->setFocusedNode(focusedNode, frame);
+    }
+    
+    /*
+     * MSK key event on editable will be interpreted as Enter.
+     * We don't want to send Enter key in case of activated
+     * input box. Also if the text area has been just activated
+     * we also don't want to send Enter since it will cause extra
+     * line feed.
+     */   
     bool textAreaJustActivated = (!prevEditableState && m_isEditable &&
                                   m_focusedElementType == TBrCtlDefs::EElementTextAreaBox);
+    
     if (eventcode == EEventKeyDown && 
         m_focusedElementType != TBrCtlDefs::EElementActivatedInputBox &&
         !textAreaJustActivated) {
+        
         sendKeyEventToEngine(keyevent, EEventKeyDown, frame);
     }
+
+    /* 
+     * Toolbar is activated on long key press only if the element
+     * type is EElementNone during EEventKeyDown and EEventKey.
+     * This prevents toolbar from popping up in DHTML pages. Also,
+     * toolbar is activated when the user is not in fast scroll
+     * mode, or in page overview mode, or on wml page.
+     */
      if ((m_focusedElementType == TBrCtlDefs::EElementNone ||
           m_focusedElementType == TBrCtlDefs::EElementBrokenImage ) &&
           keyevent.iRepeats && !m_brctl->wmlMode() ) {
          launchToolBarL();
      }
+    
      return true;
 }
-bool WebView::handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)
+
+bool WebView::handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)  
 {
     bool downEventConsumed = false;
     bool consumed = false;
     bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed);
     /*
-     * For each platform keyDown event EventHandler::keEvent() generates
+     * For each platform keyDown event EventHandler::keEvent() generates 
      * keydown and keypress.
-     * For keypress event we need a char code and since we don't
-     * have it at the time of EEventKeyDown we pospond it until EEventKey
+     * For keypress event we need a char code and since we don't 
+     * have it at the time of EEventKeyDown we pospond it until EEventKey 
      * and send it here.
      */
     if (eventcode == EEventKeyDown){
         downEventConsumed = sendKeyEventToEngine(keyevent, EEventKeyDown, frame);
     }
-
-    if (!downEventConsumed && needDeactivateEditable(keyevent, eventcode, frame)) {
+    /*
+     * downEventConsumed will be true if JavaScript consumes key event
+     * If we are not in the widget mode we want to deactivate input box
+     * regardless of whether event was consumed by JavaScript or not.
+     * Othrerwise we have a risk to be trapped inside input box.
+     */
+    bool widgetDownEventConsumed = downEventConsumed && (m_widgetextension != NULL);
+  
+    if (!widgetDownEventConsumed && needDeactivateEditable(keyevent, eventcode, frame, downEventConsumed)) {
         deactivateEditable();
     }
 
     if (tabbedNavigation) {
         consumed = downEventConsumed || handleTabbedNavigation(m_currentEventKey, m_currentEventCode);
     }
-    else {
-        consumed = (!m_isEditable &&  //avoid showing the cursor when we are in the input box
+    else {  
+        consumed = (!m_isEditable &&  //avoid showing the cursor when we are in the input box 
                     handleKeyNavigation(keyevent, eventcode, frame)) ||
                     downEventConsumed;
     }
     return consumed;
 }
 
-
 bool WebView::handleInputElement(const TKeyEvent& keyevent, TEventCode eventcode, Frame* frame)
 {
     WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
+    TBrCtlDefs::TBrCtlElementType elTypeBeforeMouseEvent = m_focusedElementType;
+    bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed);
+    bool navigationNone = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeNone); 
+    bool prevEditableState = m_isEditable;
+    bool enterOnMultiSelectInTabbed = tabbedNavigation && (keyevent.iCode == EKeyEnter) &&           // EnterKey in case of
+                                      (m_focusedElementType == TBrCtlDefs::EElementSelectMultiBox);  // multiselect eelement in tabbed mode.
+    
+    
     bool sendMousedEvent = false;
     if (m_focusedElementType == TBrCtlDefs::EElementInputBox ||
-        m_focusedElementType == TBrCtlDefs::EElementTextAreaBox) {
+        m_focusedElementType == TBrCtlDefs::EElementTextAreaBox ||
+        (tabbedNavigation && 
+         (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox))) {
         sendMousedEvent = true;
     }
     else if (m_focusedElementType == TBrCtlDefs::EElementSelectBox ||
         m_focusedElementType == TBrCtlDefs::EElementSelectMultiBox) {
-        if (m_brctl->settings()->getNavigationType() != SettingsContainer::NavigationTypeNone ||
-            keyevent.iCode == EKeyDevice3) {
+        if (!navigationNone || keyevent.iCode == EKeyDevice3) {
             sendMousedEvent = true;
         }
     }
+    
+    if (m_focusedElementType == TBrCtlDefs::EElementTextAreaBox || 
+        m_focusedElementType == TBrCtlDefs::EElementInputBox ||
+        m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox) {
+        page()->chrome()->client()->setElementVisibilityChanged(false);
+    }
+        
     if (sendMousedEvent) {
+        /*
+         * Sending mouse event to WebCore will trigger FocusController->setFocusedNode() to be called.
+         * It will do anything only if focused node has been changed. Among other thing it will 
+         * trigger the setEditable() call, which we need. The exception is the case when 
+         * we have tabbed navigation and EnterKey was hit in MultiSelect Box. 
+         * In this case we just want to select item in the select element.  
+         * HTMLSelectElement::listBoxDefaultEventHandler() will call focus() which will
+         * set the focused node, which is already set anyway, but this will cause the 
+         * reseting cursor position to the top left corner of the select box.  
+         * To avoid thos we put the check here before we reset the foocusedNode.  
+         */   
+        if (!enterOnMultiSelectInTabbed) { 
+            frame->document()->setFocusedNode(NULL);
+        }
+        
+        /*
+         * Tweek the m_isEditable flag, so setEditable will do something
+         * usefull when it's called from FocusController->setFocusedNode()
+         */
+        if (m_isEditable && tabbedNavigation) {
+            m_isEditable = false;
+        }
+        
         sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Down, cursor->position(), frame);
         sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame);
-
-        if (m_focusedElementType == TBrCtlDefs::EElementInputBox ||
-            m_focusedElementType == TBrCtlDefs::EElementTextAreaBox ||
-            m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox) {
+        
+        /*
+         * If enter key was pressed to activate an input box we don't want to 
+         * send it to WebCore since it may cause immediate form submission.
+         * Same for MultiSelect Box in tabbed mode. 
+         */
+        bool inputBoxJustActivated = (!prevEditableState &&  m_isEditable && 
+                                      (m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox||
+                                       m_focusedElementType == TBrCtlDefs::EElementTextAreaBox));
+        bool inputBoxJustActivatedByEnter = inputBoxJustActivated && (keyevent.iCode == EKeyEnter);
+        if (!inputBoxJustActivatedByEnter &&
+            !enterOnMultiSelectInTabbed &&
+            (m_focusedElementType == TBrCtlDefs::EElementInputBox ||
+             m_focusedElementType == TBrCtlDefs::EElementTextAreaBox || 
+             m_focusedElementType == TBrCtlDefs::EElementActivatedInputBox)) {
+
             if (!m_fepTimer) {
                 m_fepTimer = new WebCore::Timer<WebView>(this, &WebView::fepTimerFired);
             }
 
             m_fepTimer->startOneShot(0.2f);
-            setEditable(true);
+            if (!m_isEditable) {
+                setEditable(true);
+            }
         }
+               
         m_keyevent = keyevent;
         m_eventcode = eventcode;
         return true;
@@ -1122,6 +1223,16 @@
         cursor->scrollAndMoveCursor(keyevent.iCode, m_scrollingSpeed, fastscroll);
     }
     updateScrollbars();
+    /*
+     * In order to Enter key activate a link the link node has to be focused.
+     * When WebCursor is finding next node to snap it stores it, so here we can
+     * set it to focused.  
+     */
+    if (m_brctl->settings()->brctlSetting(TBrCtlDefs::ESettingsEnterKeyMode) == 
+                                  TBrCtlDefs::EEnterKeyCanActivateLink) {
+        setFocusedNodeUnderCursor(frame);
+    }
+
     if (!fastscroll) {
         m_fastScrollTimer->Start(KCursorInitialDelay,KCursorUpdateFrquency,TCallBack(&scrollTimerCb,this));
         m_scrollingStartTime.HomeTime();
@@ -1138,6 +1249,18 @@
     return consumed;
 }
 
+void WebView::setFocusedNodeUnderCursor(Frame* frame)
+{
+    WebCursor* cursor = StaticObjectsContainer::instance()->webCursor();
+    // focus the node we snapped to 
+    if (m_focusedElementType != TBrCtlDefs::EElementNone) {
+        frame->document()->setFocusedNode(cursor->getElementUnderCursor());
+    }
+    // or reset if there is none
+    else if (frame->document()->focusedNode() != NULL) {
+        frame->document()->setFocusedNode(NULL);
+    }
+}
 
 bool WebView::handleMinimapNavigation()
 {
@@ -1255,8 +1378,10 @@
             }
         }
         if (m_brctl->settings()->getNavigationType() != SettingsContainer::NavigationTypeNone) {
-            if (!sendKeyEventToEngine(correctedKeyEvent, eventcode, frame)) {
-                sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame);
+            if (!sendKeyEventToEngine(correctedKeyEvent, eventcode, frame)) {        
+                if (keyevent.iScanCode == EStdKeyDevice3) { //MSK
+                    sendMouseEventToEngineIfNeeded(TPointerEvent::EButton1Up, cursor->position(), frame);
+                }
             }
             consumed = true;
         }
@@ -1301,10 +1426,12 @@
 {
     bool tabbedNavigation = (m_brctl->settings()->getNavigationType() == SettingsContainer::NavigationTypeTabbed);
     Node* targetNode = frame->document()->focusedNode();
-    if (!m_isEditable) {
-
-
-
+    /* 
+     * we dont want to send key event for navi key to the elements 
+     * like select element since it has default key event handling, 
+     * which will prevent user to leave the element.  
+     */
+    if (!m_isEditable && isNaviKey(keyevent)) {
         frame->document()->setFocusedNode(NULL);
     }
     bool consumed = frame->eventHandler()->keyEvent(PlatformKeyboardEvent(keyevent,eventcode));
--- a/webengine/osswebengine/WebKit/s60/webview/WebView.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/WebView.h	Mon Oct 26 08:28:45 2009 +0200
@@ -67,6 +67,12 @@
 class WebFrameView;
 class WebFrameBridge;
 
+
+const TUint KMouseEventFired = 0x00000001;
+const TUint KKeyEventFired = 0x00000002;
+
+
+
 class WebView : public CEikBorderedControl, public WebCore::Shared<WebView>, private MPageScalerCallback, public MOOMStopper
     {
     public:
@@ -459,13 +465,14 @@
         bool handleEventKeyUp(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame);
         bool handleEditable(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame );
         bool isNaviKey(const TKeyEvent& keyevent);
-        bool needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame);
+        bool needDeactivateEditable(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame, bool consumed);
         bool deactivateEditable();
         TUint correctKeyCode();
         bool handleNaviKeyEvent(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame); 
         bool handleMSK(const TKeyEvent& keyevent, TEventCode eventcode, WebCore::Frame* frame);
-        void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame);
-   
+	    void sendMouseEventToEngineIfNeeded(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame);
+	    void setFocusedNodeUnderCursor(WebCore::Frame* frame);
+	    
     public:
         void sendMouseEventToEngine(TPointerEvent::TType eventType, TPoint pos, WebCore::Frame* frame);
         void fepTimerFired(WebCore::Timer<WebView>*);
@@ -478,6 +485,14 @@
         void focusedElementChanged(WebCore::Element* element);
         void windowObjectCleared() const;
 
+        bool isMouseEventFired() { return m_firedEvent & KMouseEventFired; }
+        bool isKeyEventFired() { return m_firedEvent & KKeyEventFired; }
+        void setMouseEventFired() { m_firedEvent |= KMouseEventFired; }
+        void setKeyEventFired() { m_firedEvent |= KKeyEventFired; }
+        void clearMouseEventFired() { m_firedEvent &= ~KMouseEventFired; }
+        void clearKeyEventFired() { m_firedEvent &= ~KKeyEventFired; }
+        void clearEventFired() { m_firedEvent = 0; }
+        
     private:
         WebCore::Page*          m_page;
         WebFrameView*           m_frameView;
@@ -559,7 +574,8 @@
         //Indicates any plugin is activated/deactivated
         bool                m_showCursor;
         bool                m_allowRepaints;
-        bool                m_prevEditMode; 
+        bool                m_prevEditMode;
+        int                 m_firedEvent;
     };
 
 #endif
--- a/webengine/osswebengine/cache/cache_check.pl	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/cache/cache_check.pl	Mon Oct 26 08:28:45 2009 +0200
@@ -1,18 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
 #!/usr/bin/perl
 
 #use Encode;
--- a/webengine/osswebengine/cache/filter_emulator_output.bat	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/cache/filter_emulator_output.bat	Mon Oct 26 08:28:45 2009 +0200
@@ -1,18 +1,2 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of the License "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@rem
-
 filter_log.pl %tmp%\epocwind.out log.txt"
 log.txt
--- a/webengine/osswebengine/cache/filter_log.pl	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/osswebengine/cache/filter_log.pl	Mon Oct 26 08:28:45 2009 +0200
@@ -1,18 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
 #!/usr/bin/perl
 
 open INH,"<",$ARGV[0];
--- a/webengine/widgetengine/group/WidgetEngine.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetengine/group/WidgetEngine.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -116,6 +116,7 @@
 SOURCE      WidgetEngineBridge.cpp
 
 START RESOURCE ../Src/WidgetMenu.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH RESOURCE_FILES_DIR
 #ifdef __S60_32__
--- a/webengine/widgetengine/src/Preferences.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetengine/src/Preferences.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -58,7 +58,7 @@
 // ----------------------------------------------------------------------------
 WidgetPreferences::~WidgetPreferences()
 {
-    TRAP_IGNORE( saveL() );
+    //TRAP_IGNORE( saveL() );
     if (m_preferences) {
         m_preferences->ResetAndDestroy();
         m_preferences->Close();
@@ -262,6 +262,9 @@
         }
 
         CleanupStack::Pop();   // k
+
+        // Save update to persistent storage
+		saveL();
     }
 
 }
@@ -301,6 +304,9 @@
         }
 
         CleanupStack::PopAndDestroy();   // k
+
+        // Save update to persistent storage
+		saveL();
     }
 }
 
--- a/webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetinstaller/Inc/WidgetBackupRegistryXml.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,23 +1,25 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This file contains the header file of the CWidgetBackupRegistryXml class.
+* ==============================================================================
+*  Name        : WidgetRegistryXml.h
+*  Part of     : Widget Registry
+*  Interface   : Widget Registry API
+*  Description : This file contains the header file of the CWidgetBackupRegistryXml class.
 *
 *                This class processes persistent registry data in XML.
+*  Version     : %version: 7 %
 *
+*  Copyright © 2008 Nokia Corporation.
+*  This material, including documentation and any related
+*  computer programs, is protected by copyright controlled by
+*  Nokia Corporation. All rights are reserved. Copying,
+*  including reproducing, storing, adapting or translating, any
+*  or all of this material requires the prior written consent of
+*  Nokia Corporation. This material also contains confidential
+*  information which may not be disclosed to others without the
+*  prior written consent of Nokia Corporation.
+* ==============================================================================
 */
 
-
 #ifndef WIDGETBACKUPREGISTRYXML_H
 #define WIDGETBACKUPREGISTRYXML_H
 
--- a/webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetinstaller/Src/WidgetBackupRegistryXml.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,20 +1,24 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Processes registry persistent data in XML.
-*
-*/
+//
+// ==============================================================================
+//  Name        : WidgetBackupRegistryXml.cpp
+//  Part of     : WidgetRegistry
+//  Interface   :
+//  Description : Processes registry persistent data in XML.
+//  Version     : 5.0
+//
+//  Copyright © 2008 Nokia Corporation.
+//  This material, including documentation and any related
+//  computer programs, is protected by copyright controlled by
+//  Nokia Corporation. All rights are reserved. Copying,
+//  including reproducing, storing, adapting or translating, any
+//  or all of this material requires the prior written consent of
+//  Nokia Corporation. This material also contains confidential
+//  information which may not be disclosed to others without the
+//  prior written consent of Nokia Corporation.
+// ==============================================================================
+///
 
+// INCLUDE FILES
 
 #include <e32base.h>
 #include <f32file.h>
--- a/webengine/widgetregistry/Server/inc/WidgetRegistry.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetregistry/Server/inc/WidgetRegistry.h	Mon Oct 26 08:28:45 2009 +0200
@@ -24,6 +24,7 @@
 #include <e32hashtab.h>
 #include <apgcli.h>
 #include <Browser_platform_variant.hrh>
+#include <apgnotif.h>
 #include "WidgetRegistryData.h"
 #include "WidgetRegistryConstants.h"
 #include "WidgetPropertyValue.h"
@@ -36,7 +37,6 @@
 
 // FORWARD DECLARATIONS
 class RFs;
-class CWidgetMMCHandler;
 class CWidgetEntry;
 class CWidgetInstaller;
 class CWidgetRegistryXml;
@@ -58,7 +58,7 @@
 *  @since 3.1
 */
 
-class CWidgetRegistry : public CBase
+class CWidgetRegistry : public CBase, public MApaAppListServObserver
     {
 public:
     /**
@@ -200,7 +200,10 @@
      * dirty flag is true only in non leave case and some change
      * needs to be written out
      */
-    void InternalizeL( TBool& aDirtyFlag );
+    void InternalizeL( TBool aDoConsistency,
+                       TBool aIgnoreParseError,
+                       TBool& aDirtyFlag,
+                       TInt& aParseError );
 
     /**
      * Store widget information to a file
@@ -212,6 +215,9 @@
      */
      TInt SecurityPolicyId() { return FetchSecurityPolicyIdL(); }
 
+		//from MApaAppListServObserver
+		void HandleAppListEvent(TInt aEvent);
+
 private:
 
     /**
@@ -361,9 +367,9 @@
 
     // map of language code to lproj dir
     RPtrHashMap<TInt,HBufC8>    iLangDirList;
-    CWidgetMMCHandler*          iMMCHandler;
     TInt                        iPolicyId;
     CWidgetRegistryXml*         iXmlProcessor;
+    CApaAppListNotifier* iApaAppListNotifier;
 public:
     LOG_MEMBER_VARS
     };
--- a/webengine/widgetregistry/Server/src/WidgetRegistry.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetregistry/Server/src/WidgetRegistry.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -30,7 +30,6 @@
 #include <libxml2_parser.h>
 #include <libxml2_tree.h>
 #include <xmlengxestd.h>
-#include "WidgetMMCHandler.h"
 #include "UidAllocator.h"
 #if defined( BRDO_WRT_SECURITY_MGR_FF )
 #include <RTSecManager.h>
@@ -189,9 +188,8 @@
     iAppArch.Close();
     delete iInstaller;
     iLangDirList.ResetAndDestroy();
-    delete iMMCHandler;
     delete iXmlProcessor;
-
+	delete iApaAppListNotifier;
     iFs.Close();
     LOG_DESTRUCT;
     }
@@ -220,8 +218,23 @@
     // it should be detected and corrected once the resource limit
     // that caused the leave is removed.
     TBool dirtyFlag = EFalse;
+    TInt parseError = KErrNone;
     iXmlProcessor = CWidgetRegistryXml::NewL();
-    TRAP_IGNORE( InternalizeL( dirtyFlag ) );
+    // For first attempt assume usual case that things are consistent
+    // and the registry entry file can be parsed and used.
+    TRAP_IGNORE( InternalizeL( EFalse, // aDoConsistency,
+                               EFalse, // aIgnoreParseError
+                               dirtyFlag,
+                               parseError ) );
+    if ( parseError )
+        {
+        // Special case where we need to do consistency because
+        // the widget registry entry file is corrupt.
+        TRAP_IGNORE( InternalizeL( ETrue, // aDoConsistency,
+                                   ETrue, // aIgnoreParseError
+                                   dirtyFlag,
+                                   parseError ) );
+        }
     if ( dirtyFlag )
         {
         // Basically same reason to ignore leaves here.
@@ -237,9 +250,7 @@
     LOG1( "ConstructL internalize done, registry count %d",
               iEntries.Count() );
     LOG_CLOSE;
-
-    iMMCHandler = CWidgetMMCHandler::NewL( *this, iFs );
-    iMMCHandler->Start();
+    iApaAppListNotifier = CApaAppListNotifier::NewL(this,CActive::EPriorityStandard);
     }
 
 // ============================================================================
@@ -496,7 +507,10 @@
 // @since 3.1
 // ============================================================================
 //
-void CWidgetRegistry::InternalizeL( TBool& aDirtyFlag )
+void CWidgetRegistry::InternalizeL( TBool doConsistency, // in param
+                                    TBool aIgnoreParseError, // in param
+                                    TBool& aDirtyFlag, // out param
+                                    TInt& aParseError )// out param
     {
     LOG_OPEN;
     LOG( "Internalize" );
@@ -520,7 +534,10 @@
 
     CleanupClosePushL( appArchList );
     CleanupClosePushL( appArchListFlags );
-    TBool doConsistency = AppArchWidgets( appArchList, appArchListFlags );
+    if ( doConsistency )
+        {
+        doConsistency = AppArchWidgets( appArchList, appArchListFlags );
+        }
     if ( doConsistency )
         {
 
@@ -622,25 +639,31 @@
         // that caused the leave is removed.
         if ( xmlExists )
             {
-            TRAP_IGNORE( InternalizeXmlL( iRegistryXmlFileName,
-                                          driveUnit,
-                                          doConsistency,
-                                          appArchList,
-                                          appArchListFlags,
-                                          installedListForDrive,
-                                          installedListForDriveFlags,
-                                          dirtyFlag ) );
+            TRAP( aParseError,
+                  InternalizeXmlL( iRegistryXmlFileName,
+                                   driveUnit,
+                                   doConsistency,
+                                   appArchList,
+                                   appArchListFlags,
+                                   installedListForDrive,
+                                   installedListForDriveFlags,
+                                   dirtyFlag ) );
             }
         else if ( binaryExists )
             {
-            TRAP_IGNORE( InternalizeBinaryL( iRegistryBinaryFileName,
-                                             driveUnit,
-                                             doConsistency,
-                                             appArchList,
-                                             appArchListFlags,
-                                             installedListForDrive,
-                                             installedListForDriveFlags,
-                                             dirtyFlag ) );
+            TRAP( aParseError,
+                  InternalizeBinaryL( iRegistryBinaryFileName,
+                                      driveUnit,
+                                      doConsistency,
+                                      appArchList,
+                                      appArchListFlags,
+                                      installedListForDrive,
+                                      installedListForDriveFlags,
+                                      dirtyFlag ) );
+            }
+        if ( !aIgnoreParseError && aParseError )
+            {
+            User::Leave( aParseError );
             }
 
         if ( doConsistency )
@@ -2222,5 +2245,23 @@
     LOG( "AppArchListConsistency done" );
     }
 
-
+void CWidgetRegistry::HandleAppListEvent(TInt aEvent)
+    {
+    TBool dirtyFlag = EFalse;
+    TInt parseError = KErrNone;
+    // Assume usual case and things are consistent
+    // and the registry entry file can be parsed and used.
+    TRAPD( error, InternalizeL( EFalse,
+                                EFalse,
+                                dirtyFlag,
+                                parseError ) );
+    if ( KErrNone == error )
+        {
+        // internalize consistency enforcement may have altered registry
+        if ( dirtyFlag )
+            {
+            TRAP_IGNORE( ExternalizeL(); );
+            }
+        }
+    }
 // End of File
--- a/webengine/widgetregistry/group/WidgetRegistryServer.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/widgetregistry/group/WidgetRegistryServer.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -41,7 +41,6 @@
 SOURCE WidgetRegistrySession.cpp
 SOURCE WidgetRegistryServer.cpp
 SOURCE UidAllocator.cpp
-SOURCE WidgetMMCHandler.cpp
 
 USERINCLUDE       ../Server/inc
 USERINCLUDE       ../Common/inc
--- a/webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wmlengine/src/fbox/src/Epoc32SelectSkin.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -720,6 +720,7 @@
         }
         // CAUTION: this eventually calls NW_UI_CreateCard which may remove 'skin' if onpick to intradeck card exists in content
         NW_FBox_OptionBox_ChangeState( optionBox );
+        break;
       }
     }
   }
--- a/webengine/wrtharvester/group/wrtharvester.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wrtharvester/group/wrtharvester.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -40,6 +40,7 @@
 END
 
 START RESOURCE  ../data/wrtharvester.rss 
+DEPENDS avkon.rsg
 HEADER
 TARGET          wrtharvester.rsc
 TARGETPATH      resource 
@@ -65,5 +66,6 @@
 LIBRARY		  cone.lib 		    // CoeControl
 LIBRARY		  CommonEngine.lib
 LIBRARY       ws32.lib
+LIBRARY       PlatformEnv.lib
 
 //end of file
--- a/webengine/wrtharvester/inc/wrtharvester.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wrtharvester/inc/wrtharvester.h	Mon Oct 26 08:28:45 2009 +0200
@@ -32,7 +32,7 @@
 class MLiwInterface;
 class CLiwGenericParamList;
 class CWrtInfo;
-class CWidgetMMCHandler;
+class CWrtUsbHandler;
 
 
 // CONSTANTS
@@ -271,7 +271,7 @@
          * Publish & Subscribe listener
          * own
          */        
-        CWidgetMMCHandler* iWidgetUsbListener;
+        CWrtUsbHandler* iWidgetUsbListener;
         
 		/**
     	* 
--- a/webengine/wrtharvester/inc/wrtusbhandler.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wrtharvester/inc/wrtusbhandler.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,21 +1,22 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* ============================================================================
+*  Name        : WidgetMMCHandler.h
+*  Part of     : Widget Registry
+*  Description : Acts on MMC card insertion/removal
+*  Version     : 3.1
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Acts on MMC card insertion/removal
-*
+*  Copyright © 2008 Nokia Corporation.
+*  This material, including documentation and any related
+*  computer programs, is protected by copyright controlled by
+*  Nokia Corporation. All rights are reserved. Copying,
+*  including reproducing, storing, adapting or translating, any
+*  or all of this material requires the prior written consent of
+*  Nokia Corporation. This material also contains confidential
+*  information which may not be disclosed to others without the
+*  prior written consent of Nokia Corporation.
+* =============================================================================
 */
 
-
 #ifndef WIDGETMMCHANDLER_H
 #define WIDGETMMCHANDLER_H
 
@@ -35,16 +36,18 @@
  *
  * @since 3.1
  */
-class CWidgetMMCHandler : public CActive
+class CWrtUsbHandler : public CActive
     {
 public:
 
-    static CWidgetMMCHandler* NewL( CWrtHarvester* aHarvester, RFs& aFs );
+    static CWrtUsbHandler* NewL( CWrtHarvester* aHarvester, RFs& aFs );
 
-    virtual ~CWidgetMMCHandler();
+    virtual ~CWrtUsbHandler();
 
     void Start();
     void ToggleUSBMode();
+    void DoScanAndUpdate();
+    void DeleteTimer();
 
 protected:
 
@@ -57,11 +60,11 @@
 private:
 
     // no copy constructor
-    CWidgetMMCHandler( const CWidgetMMCHandler& );
+    CWrtUsbHandler( const CWrtUsbHandler& );
     // no assignment
-    CWidgetMMCHandler& operator=( const CWidgetMMCHandler& );
+    CWrtUsbHandler& operator=( const CWrtUsbHandler& );
 
-    CWidgetMMCHandler( CWrtHarvester* aHarvester, RFs& aFs );
+    CWrtUsbHandler( CWrtHarvester* aHarvester, RFs& aFs );
 
     void ConstructL();
 
@@ -73,6 +76,7 @@
     RFs iFs;
 
     TInt iDriveFlags;
+    CPeriodic* iCallBackTimer;
 
     };
 
--- a/webengine/wrtharvester/rom/wrtharvesterResources.iby	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wrtharvester/rom/wrtharvesterResources.iby	Mon Oct 26 08:28:45 2009 +0200
@@ -1,22 +1,22 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* =============================================================================
+*  Name        : wrtharvesterResources.iby
+*  Part of     :  
+*  Description : The resource iby file contains resource that needs to be  
+*                localized for wrtharvester
+*  Version     : %version: 1 % 
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  The resource iby file contains resource that needs to be  
-*                localized for wrtharvester
-*
+*  Copyright (c) 2009 Nokia.  All rights reserved.
+*  This material, including documentation and any related computer
+*  programs, is protected by copyright controlled by Nokia.  All
+*  rights are reserved.  Copying, including reproducing, storing,
+*  adapting or translating, any or all of this material requires the
+*  prior written consent of Nokia.  This material also contains
+*  confidential information which may not be disclosed to others
+*  without the prior written consent of Nokia.
+* ============================================================================
 */
 
-
 #ifndef WRTHARVESTERRESOURCES_IBY
 #define WRTHARVESTERRESOURCES_IBY
 
--- a/webengine/wrtharvester/src/wrtharvester.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wrtharvester/src/wrtharvester.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -224,7 +224,7 @@
     iWidgetRegListener = CWrtHarvesterPSNotifier::NewL( this, EWidgetRegAltered );
     
     User::LeaveIfError( iFs.Connect() );
-    iWidgetUsbListener = CWidgetMMCHandler::NewL( this, iFs );
+    iWidgetUsbListener = CWrtUsbHandler::NewL( this, iFs );
     
     iWidgetUsbListener->Start();
     SetMSMode(0);
--- a/webengine/wrtharvester/src/wrtusbhandler.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/webengine/wrtharvester/src/wrtusbhandler.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,45 +1,60 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Handle notifications of MMC events.
-*
-*
-*
-*/
+//
+// ============================================================================
+//  Name     : WidgetMMCHandler.cpp
+//  Part of  : SW Installer UIs / WidgetInstallerUI
+//
+//  Description: Handle notifications of MMC events.
+//
+//
+//  Version     : 3.1
+//
+//  Copyright © 2006 Nokia Corporation.
+//  This material, including documentation and any related
+//  computer programs, is protected by copyright controlled by
+//  Nokia Corporation. All rights are reserved. Copying,
+//  including reproducing, storing, adapting or translating, any
+//  or all of this material requires the prior written consent of
+//  Nokia Corporation. This material also contains confidential
+//  information which may not be disclosed to others without the
+//  prior written consent of Nokia Corporation.
+// ==============================================================================
+///
 
+// INCLUDE FILES
 #include "wrtusbhandler.h"
 #include "wrtharvester.h"
 #include "wrtusbhandler.h"
+#include <DriveInfo.h>
 
 // CONSTANTS
 
 
+static TInt TimerCallBack( TAny* ptr )
+{    
+    CWrtUsbHandler* temp = static_cast<CWrtUsbHandler*>(ptr);
+    if(temp)
+        {
+        temp->DeleteTimer();
+        temp->DoScanAndUpdate();       
+        }
+    return 0;    
+}
 // ============================================================================
-// CWidgetMMCHandler::NewL()
+// CWrtUsbHandler::NewL()
 // two-phase constructor
 //
 // @since 3.1
 // @param aRegistry - Widget registry for callback.
 // @param aFs - file session
-// @return pointer to CWidgetMMCHandler
+// @return pointer to CWrtUsbHandler
 // ============================================================================
 //
-CWidgetMMCHandler* CWidgetMMCHandler::NewL(
+CWrtUsbHandler* CWrtUsbHandler::NewL(
     CWrtHarvester* aHarvester,
     RFs& aFs )
     {
-    CWidgetMMCHandler* self =
-        new(ELeave) CWidgetMMCHandler( aHarvester , aFs );
+    CWrtUsbHandler* self =
+        new(ELeave) CWrtUsbHandler( aHarvester , aFs );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -47,13 +62,13 @@
     }
 
 // ============================================================================
-// CWidgetMMCHandler::CWidgetMMCHandler()
+// CWrtUsbHandler::CWrtUsbHandler()
 // C++ default constructor
 //
 // @since 3.1
 // ============================================================================
 //
-CWidgetMMCHandler::CWidgetMMCHandler( CWrtHarvester* aHarvester,
+CWrtUsbHandler::CWrtUsbHandler( CWrtHarvester* aHarvester,
                                       RFs& aFs )
     : CActive( CActive::EPriorityUserInput ),
       iHarvester( aHarvester ),
@@ -64,159 +79,139 @@
     }
 
 // ============================================================================
-// CWidgetMMCHandler::ConstructL()
+// CWrtUsbHandler::ConstructL()
 // Symbian default constructor
 //
 // @since 3.1
 // ============================================================================
 //
-void CWidgetMMCHandler::ConstructL()
+void CWrtUsbHandler::ConstructL()
     {
     if ( KErrNone != ScanDrives( iDriveFlags ) )
         {
         iDriveFlags = 0;
-        }
-        RDebug::Print(_L("iDriveFlags ConstructL() : %x %d"), iDriveFlags,iDriveFlags);
+        }        
     }
 
 // ============================================================================
-// CWidgetMMCHandler::~CWidgetMMCHandler()
+// CWrtUsbHandler::~CWrtUsbHandler()
 // destructor
 //
 // @since 3.1
 // ============================================================================
-CWidgetMMCHandler::~CWidgetMMCHandler()
+CWrtUsbHandler::~CWrtUsbHandler()
     {
     Cancel();
-
     }
 
 // ============================================================================
-// CWidgetMMCHandler::Start()
+// CWrtUsbHandler::Start()
 // Start monitoring.
 //
 // @since 5.0
 // ============================================================================
-void CWidgetMMCHandler::Start()
+void CWrtUsbHandler::Start()
     {
     iFs.NotifyChange( ENotifyDisk, iStatus );
     SetActive();
     }
 
 // ============================================================================
-// CWidgetMMCHandler::RunL()
+// CWrtUsbHandler::RunL()
 // Handle notifications of MMC events.
 //
 // @since 3.1
 // ============================================================================
-void CWidgetMMCHandler::RunL()
+void CWrtUsbHandler::RunL()
     {
     if ( iStatus == KErrNone )
-      {
-        TInt driveFlags = 0;
-        TInt deltaDriveFlags = 0;
-      
+        {
+        //Call back Timer
+        iCallBackTimer = CPeriodic::NewL(CActive::EPriorityLow);
+        iCallBackTimer->Start(10000000,0,TCallBack(&TimerCallBack,this));         
+        }
+    }
 
-         User::After( 10000000 );
-         
-       if ( KErrNone == ScanDrives( driveFlags ) )
-         {
-            deltaDriveFlags = iDriveFlags ^ driveFlags;
-            
-            iDriveFlags = driveFlags;
-         }
-        
-       if ( deltaDriveFlags )
-          {
-          //Unpluging USB from Mass storage . . . 
-          if(iHarvester->IsInMSMode() == 1)
-            {
-             iHarvester->SetMSMode(0);
-             iHarvester->ClearAllOperations();
-             iHarvester->UpdateL();
-             
-             iFs.NotifyChange( ENotifyDisk, iStatus );
-             SetActive();
-             return;
+void CWrtUsbHandler::DoScanAndUpdate()
+    {
+    TInt err = 0;
+    TInt driveFlags = 0;
+    TInt deltaDriveFlags = 0;
+    if ( KErrNone == ScanDrives( driveFlags ) )
+        {
+        deltaDriveFlags = iDriveFlags ^ driveFlags;
+        iDriveFlags = driveFlags;
+        }
+    
+    if ( deltaDriveFlags )
+        {           
+        //Unpluging USB from Mass storage . . . 
+        if(iHarvester->IsInMSMode() == 1)
+            {                  
+            iHarvester->SetMSMode(0);
+            iHarvester->ClearAllOperations();
+            TRAP(err, iHarvester->UpdateL() );            
+            iFs.NotifyChange( ENotifyDisk, iStatus );
+            SetActive();
+            return;
             }
 
-          TVolumeInfo volInfo;
-          TInt temp = deltaDriveFlags;
-          TBool massMemAltered = EFalse;
-          TBool mmcAltered = EFalse;
-          for(TInt DriveNo = EDriveA+1 ; DriveNo<=EDriveY; DriveNo++ )
-            {
-                
+        TVolumeInfo volInfo;
+        TInt temp = deltaDriveFlags;
+        TBool massMemAltered = EFalse;        
+        for(TInt DriveNo = EDriveA+1 ; DriveNo<=EDriveY; DriveNo++ )
+            {   
             temp =  temp >> 1;
             if( temp & 01)
-              {
-                switch (DriveNo)
-                  {
-                    case EDriveE :
-                      {
-                      massMemAltered = ETrue;   
-                      break; 
-                      }
-                    case EDriveF:
-                      {
-                           
-                      mmcAltered = ETrue;
-                      break;
-                      }
-                         
-                   }
-              }
-            
+                {
+                TUint status(0);
+                err = DriveInfo::GetDriveStatus( iFs, DriveNo , status );
+                if(!err && (status & DriveInfo::EDriveExternallyMountable) && (status & DriveInfo::EDriveInternal ))
+                    {
+                    //Internal Memory
+                    massMemAltered = ETrue;
+                    }                     
+                }            
             }
-                     
-       if( !massMemAltered && mmcAltered)    
-         {
-          iHarvester->UpdateL();   
-         }
-       else if( massMemAltered )
-         {
-          iHarvester->SetMSMode(1);  
-          iHarvester->UpdateL(); 
-         }
-
+       if( massMemAltered )
+           {           
+           iHarvester->SetMSMode(1);            
+           }
+       
+        TRAP( err, iHarvester->UpdateL() ); 
         }
-      }
-      
-      
     iFs.NotifyChange( ENotifyDisk, iStatus );
     SetActive();
     }
 
+
 // ============================================================================
-// CWidgetMMCHandler::RunError()
+// CWrtUsbHandler::RunError()
 // Ignore errors from RunL.
 //
 // @since 5.0
 // ============================================================================
-TInt CWidgetMMCHandler::RunError( TInt /* aError */ )
+TInt CWrtUsbHandler::RunError( TInt /* aError */ )
     {
-
     return KErrNone; // indicates error was handled
     }
 
 // ============================================================================
-// CWidgetMMCHandler::DoCancel()
+// CWrtUsbHandler::DoCancel()
 // Cancel the MMC event handler
 //
 // @since 3.1
 // ============================================================================
-void CWidgetMMCHandler::DoCancel()
+void CWrtUsbHandler::DoCancel()
     {
-
     iFs.NotifyChangeCancel();
     }
 
 /* Scans drives and records a bit flag for those that exist and are
  * suitable for installing widgets to.
  */
-TInt CWidgetMMCHandler::ScanDrives( TInt& aDriveFlags )
+TInt CWrtUsbHandler::ScanDrives( TInt& aDriveFlags )
     {
-
     // List all drives in the system
     TDriveList driveList;
     TInt error = iFs.DriveList( driveList );
@@ -259,3 +254,9 @@
 
     return error;
     }
+void CWrtUsbHandler::DeleteTimer()
+    {
+    iCallBackTimer->Cancel();
+    delete iCallBackTimer;
+    iCallBackTimer = NULL; 
+    }
--- a/widgets/widgetapp/group/WidgetUi.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/group/WidgetUi.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -37,6 +37,7 @@
 // RESOURCE INFO
 
 START RESOURCE ../Data/WidgetUi.rss
+DEPENDS avkon.rsg
 HEADER
 TARGETPATH APP_RESOURCE_DIR
 #ifdef __S60_32__
@@ -64,6 +65,7 @@
 #ifdef BRDO_WRT_HS_FF
 SOURCE  cpspublisher.cpp
 #endif
+
 START RESOURCE ../Data/WidgetUi_reg.rss
 DEPENDS widgetui.rsg
 // Do not change the UID below.
--- a/widgets/widgetapp/inc/WidgetUiNetworkListener.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/inc/WidgetUiNetworkListener.h	Mon Oct 26 08:28:45 2009 +0200
@@ -1,20 +1,22 @@
-/*
-* Copyright (c) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
+//
+//==============================================================================
+// Name        : WidgetUiNetworkListener.h
+// Part of     : WidgetUI
+// Interface   :
+// Description :
+// Version      : %version: 5 %
+//
+// Copyright  2008, 2009 Nokia Corporation.
+// This material, including documentation and any related
+// computer programs, is protected by copyright controlled by
+// Nokia Corporation. All rights are reserved. Copying,
+// including reproducing, storing, adapting or translating, any
+// or all of this material requires the prior written consent of
+// Nokia Corporation. This material also contains confidential
+// information which may not be disclosed to others without the
+// prior written consent of Nokia Corporation.
+//==============================================================================
+//
 
 #ifndef WIDGETUINETWORKLISTENER_H_
 #define WIDGETUINETWORKLISTENER_H_
--- a/widgets/widgetapp/inc/WidgetUiWindowManager.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/inc/WidgetUiWindowManager.h	Mon Oct 26 08:28:45 2009 +0200
@@ -382,6 +382,8 @@
         */        
         void NotifyConnecionChange(TBool aConn);
         TBrCtlDefs::TCursorSettings CursorShowMode() {return iWidgetCursorMode;}
+        
+        TBrCtlDefs::TEnterKeySettings  EnterKeyMode() {return iWidgetEnterKeyMode;}
 
         /**
         * AnyWidgetOnHs
@@ -423,7 +425,13 @@
         */        
         void SetLastWidgetRestartTime(TTime aStartTime){iTimeLastWidgetOpen = aStartTime;}
 #endif  // OOM_WIDGET_CLOSEALL
-        
+           /**  
+           * CloseAllWidgets  
+           * Basic pre-exit routine to make sure all widgets are closed out  
+           * @param none  
+           * @return none  
+           */          
+           void CloseAllWidgets(); 
     protected:
 
         /**
@@ -566,6 +574,8 @@
         TNetworkMode                        iNetworkMode;       // unknown mode =  0, online mode = 1, offline mode = 2
         TBool                               iNetworkConnected;  // ETrue if there is an active network connection, else EFalse
         TBrCtlDefs::TCursorSettings                     iWidgetCursorMode;
+        TBrCtlDefs::TEnterKeySettings       iWidgetEnterKeyMode;
+        
 #ifdef BRDO_WRT_HS_FF       
         CCpsPublisher*                      iCpsPublisher;      // Owned, interface to publish bitmap to CPS
 #endif
--- a/widgets/widgetapp/src/WidgetUiAppUi.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/src/WidgetUiAppUi.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -166,6 +166,7 @@
         {
         case EEikCmdExit:
             {
+            iWindowManager->CloseAllWidgets();
             Exit();
             break;
             }
--- a/widgets/widgetapp/src/WidgetUiNetworkListener.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/src/WidgetUiNetworkListener.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -1,20 +1,22 @@
-/*
-* Copyright (c) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
+//
+//==============================================================================
+// Name        : WidgetUiNetworkListener.cpp
+// Part of     : WidgetUI
+// Interface   :
+// Description :
+// Version      : %version: 5 %
+//
+// Copyright  2008, 2009 Nokia Corporation.
+// This material, including documentation and any related
+// computer programs, is protected by copyright controlled by
+// Nokia Corporation. All rights are reserved. Copying,
+// including reproducing, storing, adapting or translating, any
+// or all of this material requires the prior written consent of
+// Nokia Corporation. This material also contains confidential
+// information which may not be disclosed to others without the
+// prior written consent of Nokia Corporation.
+//==============================================================================
+//
 
 #include "WidgetUiNetworkListener.h"
 
--- a/widgets/widgetapp/src/WidgetUiWindow.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/src/WidgetUiWindow.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description: 
+* Description:
 *
 */
 
@@ -121,7 +121,7 @@
     iWidgetUiObserver = CWidgetUiObserver::NewL( *this );
 
     iWidgetUiDialogsProviderProxy = CWidgetUiDialogsProviderProxy::NewL(*(iWindowManager.DialogsProvider()), NULL, *this);
-    
+
 #ifdef BRDO_WRT_HS_FF
     iNetworkModeWait = new(ELeave) CActiveSchedulerWait();
 #endif
@@ -157,6 +157,7 @@
         iWidgetUiObserver /* download observer */);
     //Set the cursor mode inside Widget
     iEngine->SetBrowserSettingL(TBrCtlDefs::ESettingsCursorShowMode, iWindowManager.CursorShowMode());
+    iEngine->SetBrowserSettingL(TBrCtlDefs::ESettingsEnterKeyMode, iWindowManager.EnterKeyMode());
 
     iEngine->AddLoadEventObserverL( iWidgetUiObserver );
     iEngine->AddStateChangeObserverL( view );
@@ -190,9 +191,9 @@
         {
         SetWindowStateMiniViewL( EMiniViewNotEnabled );
         }
-     
+
     iDlId = 0;
-    
+
     // determine initial widget online/offline network state
     DetermineNetworkState();
     }
@@ -273,7 +274,7 @@
     {
 
     switch(widgetMiniViewState)
-    	{
+        {
         case 0: iWidgetWindowState.miniViewState = EMiniViewNotEnabled;
                 break;
         case 1: iWidgetWindowState.miniViewState = EMiniViewEnabled;
@@ -530,7 +531,7 @@
             Engine()->MakeVisible(EFalse);// hide the active widget
             }
         if ( !aCurrent &&  (EPublishStart != WidgetMiniViewState()) )
-            {			
+            {
             iWidgetExtension->HandleCommandL ( (TInt)TBrCtlDefs::ECommandAppBackground + (TInt)TBrCtlDefs::ECommandIdBase );
             if( iWindowManager.AnyWidgetOnHs() )
                 {
@@ -630,7 +631,7 @@
             {
             iMiniviewBitmap = new CFbsBitmap();
             }
-            
+
         if ( iMiniviewBitmap && iCpsPublisher)
             {
             TRAP_IGNORE(
@@ -668,15 +669,16 @@
 TBool CWidgetUiWindow::CheckNetworkAccessL()
     {
     // if widgets in offline mode, deny network access
-    if (iWindowManager.GetNetworkMode() == EOfflineMode)
+    if (iWindowManager.GetNetworkMode() == EOfflineMode && !( EMiniViewEnabled == WidgetMiniViewState() ||
+        EMiniViewNotEnabled == WidgetMiniViewState() ))
         {
-        // if widget is in full view, offer user the option to go to online mode
+        // if widget is in full view, offer user the option to go to online mode.The widget should be in HS else dont ask HS for prompt.
 #ifdef BRDO_WRT_HS_FF
         if ( WidgetFullViewState() && WidgetMiniViewState() != EPublishStart )
             {
             iCpsPublisher->NetworkConnectionAllowedL();
+            iNetworkModeWait->Start();
             }
-        iNetworkModeWait->Start();
 #endif
         if (iWindowManager.GetNetworkMode() == EOfflineMode)
             {
@@ -684,18 +686,18 @@
             User::Leave( KErrAccessDenied );
             }
         }
-    
+
     // begin info.plist (declare EAllowNetworkAccess or EAllowFullAccess ?)
     RWidgetRegistryClientSession& widgetRegistry
                 = iWindowManager.WidgetUIClientSession();
 
-    CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowNetworkAccess ); 
+    CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowNetworkAccess );
     TInt networkAccess = *propValue;
     delete propValue;
     propValue = widgetRegistry.GetWidgetPropertyValueL(iUid, EAllowFullAccess );
     TInt fullAccess = *propValue;
     delete propValue;
- 
+
     if ( !( networkAccess || fullAccess ) )
         {
         SetNetworkAccessGrant( EDeny );
@@ -733,7 +735,7 @@
                 }
                 delete rep;
             }
-        
+
             if ( prompt )
                 {
                 CBrowserDialogsProvider* dialogProvider
@@ -746,7 +748,7 @@
                 CleanupStack::PopAndDestroy( 3 );
                 // save prompt result for session
                 SetNetworkAccessGrant( grant? EAllow : EDeny );
-                
+
                 CheckUserPermissionChanged( grant );
                 }
             else
@@ -779,7 +781,7 @@
         // 2.1. deal with access point settings
         TInt ask( 1 );
         TInt wmlId( KWmlNoDefaultAccessPoint );
-        TInt snapId( KWmlNoDefaultSnapId ); 
+        TInt snapId( KWmlNoDefaultSnapId );
         CRepository* rep( NULL );
         TRAPD( cenrepError, rep = CRepository::NewL( KCRUidBrowser ) );
         if ( KErrNone == cenrepError )
@@ -789,12 +791,12 @@
             (void)rep->Get( KBrowserNGDefaultSnapId, snapId );
             }
         delete rep;
-        if ( ask == EBrowserCenRepApSelModeDestination &&  
-           ( snapId != KWmlNoDefaultSnapId) )  
-            {  
-            iWindowManager.GetConnection()->SetRequestedSnap( snapId );  
-            iWindowManager.GetConnection()->SetConnectionType( CMManager::EDestination );  
-            }  
+        if ( ask == EBrowserCenRepApSelModeDestination &&
+           ( snapId != KWmlNoDefaultSnapId) )
+            {
+            iWindowManager.GetConnection()->SetRequestedSnap( snapId );
+            iWindowManager.GetConnection()->SetConnectionType( CMManager::EDestination );
+            }
 
         if ( !ask && (KWmlNoDefaultAccessPoint != wmlId) )
             {
@@ -840,7 +842,7 @@
             // kicks in and sets a EDeny.
             User::Leave( connFailure );
             }
-		*aNewConn = ETrue;
+        *aNewConn = ETrue;
 
         }
     }
@@ -933,7 +935,7 @@
                             aTypeArray,
                             aDesArray,
                             paramFound );
-                            
+
     HBufC8* contentType8 = 0;
     if ( !paramFound )
         {
@@ -945,7 +947,7 @@
         // 16 bit buffer copied into 8 bit buffer.
         contentType8->Des().Copy( contentType );
         }
-        
+
     //Get the download Id of the transaction.
     //Because, resource loader will not delete the download
     //So after handling the download, it will be cleared.
@@ -954,16 +956,16 @@
                             aTypeArray,
                             aDesArray,
                             paramFound );
-    
+
     TLex lex(dlId);
-    User::LeaveIfError(lex.Val(iDlId));                        
-                            
+    User::LeaveIfError(lex.Val(iDlId));
+
     TDataType dataType( *contentType8 );
     CAiwGenericParamList* genericParamList =
         BrCtlParamList2GenericParamListL( aTypeArray, aDesArray );
     CleanupStack::PushL( genericParamList );
     RFile tempFile;
-    
+
     iWindowManager.DocHandler().SetExitObserver(this);
     iWindowManager.DocHandler().OpenTempFileL( fileName, tempFile );
     CleanupClosePushL( tempFile );
@@ -1120,10 +1122,10 @@
     TNetworkState currNetState;
     RWidgetRegistryClientSession& widgetRegistry = iWindowManager.WidgetUIClientSession();
     TInt inMiniView = widgetRegistry.IsWidgetInMiniView( iUid);
-    CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowNetworkAccess ); 
+    CWidgetPropertyValue* propValue = widgetRegistry.GetWidgetPropertyValueL( iUid, EAllowNetworkAccess );
     TInt netAccessWdgtProp = *propValue;    // AllowNetworkAccess in the info.plist file
-    
-    if ( netAccessWdgtProp && ((inMiniView && (iWindowManager.GetNetworkMode() == (TInt)EOnlineMode)) 
+
+    if ( netAccessWdgtProp && ((inMiniView && (iWindowManager.GetNetworkMode() == (TInt)EOnlineMode))
                                     || (!inMiniView && iUserPermission)) )
         {
         if ( iWindowManager.GetNetworkConn() )
@@ -1139,7 +1141,7 @@
         {
         currNetState = ENetworkNotAllowed;
         }
-    
+
     if ( iNetworkState != currNetState )
         {
         iNetworkState = currNetState;
@@ -1173,7 +1175,7 @@
         //Check if the container rect needs change and then call setRect
         if(clientRect != iWindowManager.View()->Container()->Rect())
            iWindowManager.View()->Container()->SetRect(clientRect);
-        
+
         if (!aTextBoxUpdate)
             {
             // status pane always off unless in text box
--- a/widgets/widgetapp/src/WidgetUiWindowManager.cpp	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetapp/src/WidgetUiWindowManager.cpp	Mon Oct 26 08:28:45 2009 +0200
@@ -146,6 +146,8 @@
         {
         TInt strictMode;
         TInt cursorMode = -1;
+        TInt enterKeyMode = -1;
+        
         if (cenRep->Get( KWidgetInstallerStrictMode, strictMode ) == KErrNone)
             {
             iStrictMode = strictMode;
@@ -154,6 +156,12 @@
             {
             iWidgetCursorMode = (TBrCtlDefs::TCursorSettings) cursorMode;
             }
+        
+        if (cenRep->Get( KWidgetEnterKeyMode, enterKeyMode ) == KErrNone)
+            {
+            iWidgetEnterKeyMode = (TBrCtlDefs::TEnterKeySettings) enterKeyMode;
+            }
+        
         delete cenRep;
         }
         
@@ -1286,6 +1294,16 @@
     }
  
 #endif  //OOM_WIDGET_CLOSEALL    
+void CWidgetUiWindowManager::CloseAllWidgets()  
+   {   
+   TInt nWidgetsCount = iWindowList.Count();  
+       for ( TInt i = (nWidgetsCount-1); i >= 0; i-- )  
+           {  
+           CWidgetUiWindow* window = iWindowList[i];    
+           delete window;  
+           }  
+   iWindowList.Reset();
+   } 
 
 void CWidgetUiWindowManager::SendAppToBackground()
     {
Binary file widgets/widgetinstaller/conf/widgetinstaller.confml has changed
Binary file widgets/widgetinstaller/conf/widgetinstaller_1028281F.crml has changed
--- a/widgets/widgetinstaller/group/WidgetInstallerUI.mmp	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetinstaller/group/WidgetInstallerUI.mmp	Mon Oct 26 08:28:45 2009 +0200
@@ -37,6 +37,7 @@
 END
 
 START RESOURCE  ../data/WidgetInstallerUI.rss
+DEPENDS avkon.rsg
 DEPENDS swinstcommonui.rsg
 HEADER
 TARGETPATH      Resource
--- a/widgets/widgetinstaller/inc/WidgetInstallerInternalCRKeys.h	Thu Sep 24 12:53:48 2009 +0300
+++ b/widgets/widgetinstaller/inc/WidgetInstallerInternalCRKeys.h	Mon Oct 26 08:28:45 2009 +0200
@@ -40,4 +40,9 @@
 // The setting to define the cursor show mode inside widgets
 // Valid values: 0 = not showing the cursor, 1 = cursor shown
 const TUint32 KWidgetCursorShowMode =   0x00000005;
+
+// Controls whether enter key can activate a link or just has a default behavior.
+const TUint32 KWidgetEnterKeyMode =  0x00000006;
+
+
 #endif