Revision: 201026
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:03:49 +0300
changeset 6 1c3b8676e58c
parent 5 0f2326c2a325
child 8 2e16851ffecd
child 10 232fbd5a2dcb
Revision: 201026 Kit: 2010127
50_layers.sysdef.xml
bedrockProvisioning/bedrockprovisioning.cpp
bedrockProvisioning/template/200267EA.ini
browsercore/appfw/Api/Dialogs/WebDialogProvider.cpp
browsercore/appfw/Api/Managers/BookmarksManager.cpp
browsercore/appfw/Api/Managers/BookmarksManager.h
browsercore/appfw/Api/Managers/BookmarksManager_p.h
browsercore/appfw/Api/Managers/ContentAgent.cpp
browsercore/appfw/Api/Managers/LoadController.cpp
browsercore/appfw/Api/Managers/Managers.pri
browsercore/appfw/Api/Managers/downloadcontroller.cpp
browsercore/appfw/Api/Managers/downloadcontroller.h
browsercore/appfw/Api/Managers/downloadcontroller_p.h
browsercore/appfw/Api/Managers/downloadproxy.cpp
browsercore/appfw/Api/Managers/downloadproxy.h
browsercore/appfw/Api/Managers/downloadproxy_p.h
browsercore/appfw/Api/Managers/downloadproxydata.cpp
browsercore/appfw/Api/Managers/secureuicontroller.cpp
browsercore/appfw/Api/Managers/secureuicontroller.h
browsercore/appfw/Api/Managers/webpagecontroller.cpp
browsercore/appfw/Api/Managers/webpagecontroller.h
browsercore/appfw/Api/Views/WindowView.cpp
browsercore/appfw/Common/FilmstripFlow.cpp
browsercore/core/ZoomMetaData.h
browsercore/core/core.pro
browsercore/core/network/WebNetworkConnectionManager.cpp
browsercore/core/network/WebNetworkConnectionManager.h
browsercore/core/network/WebNetworkSession.cpp
browsercore/core/network/WebNetworkSession.h
browsercore/core/network/webnetworkaccessmanager.cpp
browsercore/core/wrtbrowsercontainer.cpp
browsercore/core/wrtbrowsercontainer.h
browsercore/core/wrtbrowsercontainer_p.h
browserui.pri
browserui.pro
ginebra2/ActionButton.cpp
ginebra2/ActionButton.h
ginebra2/ActionButtonSnippet.cpp
ginebra2/ActionButtonSnippet.h
ginebra2/BookmarksToolbarSnippet.cpp
ginebra2/BookmarksToolbarSnippet.h
ginebra2/ChromeDOM.cpp
ginebra2/ChromeDOM.h
ginebra2/ChromeEffect.h
ginebra2/ChromeLayout.cpp
ginebra2/ChromeLayout.h
ginebra2/ChromeRenderer.cpp
ginebra2/ChromeSnippet.cpp
ginebra2/ChromeSnippet.h
ginebra2/ChromeView.cpp
ginebra2/ChromeView.h
ginebra2/ChromeWidget.cpp
ginebra2/ChromeWidget.h
ginebra2/ChromeWidgetJSObject.h
ginebra2/ContentToolbarChromeItem.cpp
ginebra2/ContentToolbarChromeItem.h
ginebra2/ContentToolbarSnippet.cpp
ginebra2/ContentToolbarSnippet.h
ginebra2/ContentViews/GContentViewTouchNavigation.cpp
ginebra2/ContentViews/GContentViewTouchNavigation.h
ginebra2/ContentViews/GWebContentView.cpp
ginebra2/ContentViews/GWebContentView.h
ginebra2/ContentViews/GWebContentViewJSObject.h
ginebra2/ContentViews/GWebContentViewWidget.cpp
ginebra2/ContentViews/GWebContentViewWidget.h
ginebra2/ContentViews/ScrollableWebContentView.cpp
ginebra2/ContentViews/ScrollableWebContentView.h
ginebra2/ContentViews/SuperPageView.cpp
ginebra2/ContentViews/SuperPageView.h
ginebra2/ContentViews/ViewportMetaData.cpp
ginebra2/ContentViews/ViewportMetaData.h
ginebra2/ContentViews/ViewportMetaDataParser.cpp
ginebra2/ContentViews/ViewportMetaDataParser.h
ginebra2/ContentViews/WebContentAnimationItem.cpp
ginebra2/ContentViews/WebContentAnimationItem.h
ginebra2/ContentViews/WebContentViewWidget.cpp
ginebra2/ContentViews/WebContentViewWidget.h
ginebra2/ContentViews/WebView.cpp
ginebra2/ContentViews/WebView.h
ginebra2/Downloads.cpp
ginebra2/Downloads.h
ginebra2/DualButtonToolbarSnippet.cpp
ginebra2/DualButtonToolbarSnippet.h
ginebra2/EditorSnippet.cpp
ginebra2/EditorSnippet.h
ginebra2/EditorWidget.cpp
ginebra2/EditorWidget.h
ginebra2/FlickCharm.cpp
ginebra2/FlickCharm.h
ginebra2/GSuperWebPage.cpp
ginebra2/GSuperWebPage.h
ginebra2/GWebPage.cpp
ginebra2/GWebPage.h
ginebra2/GWebTouchNavigation.cpp
ginebra2/GWebTouchNavigation.h
ginebra2/KineticHelper.cpp
ginebra2/ObjectCharm.cpp
ginebra2/ObjectCharm.h
ginebra2/PageItem.cpp
ginebra2/PageItem.h
ginebra2/PageSnippet.cpp
ginebra2/PageSnippet.h
ginebra2/PopupWebChromeItem.cpp
ginebra2/PopupWebChromeItem.h
ginebra2/RecentUrlToolbarSnippet.cpp
ginebra2/RecentUrlToolbarSnippet.h
ginebra2/ScrollableViewBase.cpp
ginebra2/ScrollableViewBase.h
ginebra2/SettingsToolbarSnippet.cpp
ginebra2/SettingsToolbarSnippet.h
ginebra2/SlidingWidget.cpp
ginebra2/Snippets.cpp
ginebra2/SystemDeviceImpl.cpp
ginebra2/SystemNetworkImpl.cpp
ginebra2/SystemNetworkImpl.h
ginebra2/Toolbar.h
ginebra2/ToolbarChromeItem.cpp
ginebra2/ToolbarChromeItem.h
ginebra2/ToolbarSnippet.cpp
ginebra2/ToolbarSnippet.h
ginebra2/UrlSearchSnippet.cpp
ginebra2/UrlSearchSnippet.h
ginebra2/ViewController.cpp
ginebra2/ViewStack.cpp
ginebra2/ViewStack.h
ginebra2/WebChromeContainerSnippet.cpp
ginebra2/WebChromeContainerSnippet.h
ginebra2/WebChromeItem.cpp
ginebra2/WebChromeItem.h
ginebra2/WebChromeSnippet.cpp
ginebra2/WebChromeSnippet.h
ginebra2/WindowToolbarSnippet.cpp
ginebra2/WindowToolbarSnippet.h
ginebra2/animators/FadeAnimator.cpp
ginebra2/animators/SlideAnimator.cpp
ginebra2/browserIcon.svg
ginebra2/chrome/bedrockchrome/bookmarkview.superpage/BookmarkView.html
ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkDialog.js
ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.css
ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.js
ginebra2/chrome/bedrockchrome/chrome.html
ginebra2/chrome/bedrockchrome/chrome.js
ginebra2/chrome/bedrockchrome/contextmenu.snippet/ViewContextMenu.js
ginebra2/chrome/bedrockchrome/contextmenu.snippet/contextmenu.css
ginebra2/chrome/bedrockchrome/contextmenu.snippet/contextmenu.js
ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.css
ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.js
ginebra2/chrome/bedrockchrome/historyview.superpage/historyView.html
ginebra2/chrome/bedrockchrome/historyview.superpage/historyview.css
ginebra2/chrome/bedrockchrome/historyview.superpage/historyview.js
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_cancel_press.png
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_cancel_wait.png
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_ok_press.png
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_ok_wait.png
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/dialog_bottom.png
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/dialog_center.png
ginebra2/chrome/bedrockchrome/historyview.superpage/icons/dialog_top.png
ginebra2/chrome/bedrockchrome/networkstatus.snippet/networkstatus.js
ginebra2/chrome/bedrockchrome/outofmemory.snippet/icons/button_dialog_out_of_memory_ok_press.png
ginebra2/chrome/bedrockchrome/outofmemory.snippet/icons/button_dialog_out_of_memory_ok_wait.png
ginebra2/chrome/bedrockchrome/outofmemory.snippet/icons/icon_dialog_error.png
ginebra2/chrome/bedrockchrome/outofmemory.snippet/outofmemorydialog.css
ginebra2/chrome/bedrockchrome/outofmemory.snippet/outofmemorydialog.js
ginebra2/chrome/bedrockchrome/prompt.snippet/icons/Thumbs.db
ginebra2/chrome/bedrockchrome/prompt.snippet/icons/button_dialog_ok_press.png
ginebra2/chrome/bedrockchrome/prompt.snippet/icons/button_dialog_ok_wait.png
ginebra2/chrome/bedrockchrome/prompt.snippet/icons/icon_dialog_error.png
ginebra2/chrome/bedrockchrome/prompt.snippet/prompt.css
ginebra2/chrome/bedrockchrome/prompt.snippet/prompt.js
ginebra2/chrome/bedrockchrome/settingsview.superpage/LegalNotice.html
ginebra2/chrome/bedrockchrome/settingsview.superpage/SettingsView.html
ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/delete_btn.png
ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/delete_btn_pressed.png
ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/yes_btn.png
ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/yes_btn_pressed.png
ginebra2/chrome/bedrockchrome/settingsview.superpage/settingsview.css
ginebra2/chrome/bedrockchrome/settingsview.superpage/settingsview.js
ginebra2/chrome/bedrockchrome/statusbar.snippet/statusbar.css
ginebra2/chrome/bedrockchrome/statusbar.snippet/statusbar.js
ginebra2/chrome/bedrockchrome/suggests.snippet/icons/bottomshadow.png
ginebra2/chrome/bedrockchrome/suggests.snippet/icons/divider.png
ginebra2/chrome/bedrockchrome/suggests.snippet/icons/topshadow.png
ginebra2/chrome/bedrockchrome/suggests.snippet/suggests.js
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_disabled.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_pressed.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited_pressed.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB_pressed.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_fullTB.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_fullTB_pressed.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_partialTB.png
ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_partialTB_pressed.png
ginebra2/chrome/bedrockchrome/zoombar.snippet/zoombar.css
ginebra2/chrome/bedrockchrome/zoombar.snippet/zoombar.js
ginebra2/chrome/localpages/bedrock.png
ginebra2/chrome/localpages/bedrock_splash.png
ginebra2/chrome/localpages/relnotes.html
ginebra2/chrome/localpages/startpage.css
ginebra2/chrome/localpages/startpage.html
ginebra2/emulator/BrowserMainS60.cpp
ginebra2/emulator/BrowserMainS60.h
ginebra2/emulator/ChromeConsole.cpp
ginebra2/emulator/browser.cpp
ginebra2/emulator/browser.h
ginebra2/emulator/main.cpp
ginebra2/ginebra2.pro
ginebra2/ginebra2.qrc
ginebra2/linearflowsnippet.cpp
ginebra2/mostvisitedpageview.cpp
ginebra2/mostvisitedpageview.h
ginebra2/mostvisitedsnippet.cpp
ginebra2/mostvisitedsnippet.h
ginebra2/translations/Browser.xls
ginebra2/translations/browserLoc.qm
ginebra2/translations/browserLoc.ts
rom/browser.iby
--- a/50_layers.sysdef.xml	Wed Jun 23 17:59:43 2010 +0300
+++ b/50_layers.sysdef.xml	Tue Jul 06 14:03:49 2010 +0300
@@ -7,8 +7,7 @@
 <systemModel>
   <layer name="app_layer">
     <module name="browserui">
-      <unit unitID="browserui" mrp="" bldFile="&layer_real_source_path;/" name="browserui" proFile="browserui.pro" qmakeArgs="&quot;browser_addon+=fivezero&quot;" filter=""/>
-      <unit unitID="browserui_tst" mrp="" bldFile="&layer_real_source_path;/internal/tests/mw/" name="browserui_tst" proFile="mw.pro" qmakeArgs="&quot;browser_addon+=fivezero&quot;" filter=""/>
+      <unit unitID="browserui" mrp="" bldFile="&layer_real_source_path;/" name="browserui" proFile="browserui.pro" qmakeArgs="&quot;CONFIG+=release&quot; &quot;CONFIG-=debug&quot; &quot;browser_addon+=fivezero&quot;" filter=""/>
     </module>
         </layer>
     </systemModel>
--- a/bedrockProvisioning/bedrockprovisioning.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/bedrockProvisioning/bedrockprovisioning.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -95,7 +95,7 @@
         }
 
         if (!QSettings::contains("ChromeBaseDirectory")) {
-            QString chromeBaseDir = QSettings::value("ROMBaseDirectory").toString() + "chrome/";
+            QString chromeBaseDir = ":/chrome/";
 #ifndef Q_OS_SYMBIAN
             // Maemo, Linux, Windows can override using an env var
             static const QString envChromeBaseDir = QProcessEnvironment::systemEnvironment().value("BROWSER_CHROME"); // allow env var overriding for dev
@@ -105,6 +105,19 @@
           QSettings::setValue("ChromeBaseDirectory", chromeBaseDir); 
         }        	
 
+        if (!QSettings::contains("LocalPagesBaseDirectory")) {
+#ifdef Q_OS_SYMBIAN
+            QString localpagesBaseDir = QSettings::value("ROMBaseDirectory").toString() + "localpages/";
+#else        
+            QString localpagesBaseDir = QSettings::value("ChromeBaseDirectory").toString() + "localpages/";
+            // Maemo, Linux, Windows can override using an env var
+            static const QString envBaseDir = QProcessEnvironment::systemEnvironment().value("BROWSER_LOCALPAGES"); // allow env var overriding for dev
+            if (envBaseDir != "")
+                localpagesBaseDir = envBaseDir;
+#endif
+          QSettings::setValue("LocalPagesBaseDirectory", localpagesBaseDir); 
+        }
+        
         if (!QSettings::contains("StartUpChrome")) {
           QSettings::setValue("StartUpChrome", "bedrockchrome/chrome.html"); 
         }        	
@@ -124,6 +137,16 @@
 #endif
         }
 
+        if (!QSettings::contains("NetworkPort")) {
+// For s60 arm and maemo arm (i.e. not x86 emulator build) we need to set no proxy
+#if (defined(Q_OS_SYMBIAN)  && !defined(Q_CC_NOKIAX86)) || (defined(Q_WS_MAEMO_5) && !defined(QT_ARCH_I386))
+          // empty proxy only for ARMV5 Symbian targets
+	        QSettings::setValue("NetworkPort", QString()); 
+// everything else, linux, win, s60 emulator, maemo emulator needs proxy
+#else
+  	      QSettings::setValue("NetworkPort", "8080");
+#endif
+        }
         if (!QSettings::contains("DiskCacheEnabled"))
             QSettings::setValue("DiskCacheEnabled", "1");
 
@@ -152,9 +175,9 @@
         if (!QSettings::contains("StartPage"))
         {
 #ifdef PLAT_101
-            QSettings::setValue("StartPage", "localpages/startpage_101.html");
+            QSettings::setValue("StartPage", "startpage_101.html");
 #else
-            QSettings::setValue("StartPage", "localpages/startpage.html");
+            QSettings::setValue("StartPage", "startpage.html");
 #endif            
         }
 
@@ -201,7 +224,42 @@
             QString maxSize = QString::number(200 * 1024 * 1024);
             QSettings::setValue("Html5ApplicationCacheMaxSize", maxSize);
         }
+        
+        // reserved entries for local bookmarks
+        if (!QSettings::contains("Bookmark0Title")) {
+            QSettings::setValue("Bookmark0Title", "Browser Welcome Page");
+        }
+        
+        if (!QSettings::contains("Bookmark0Url")) {
+#ifdef PLAT_101
+            QSettings::setValue("Bookmark0Url", "startpage_101.html");
+#else
+            QSettings::setValue("Bookmark0Url", "startpage.html");
+#endif
+        }
+        
+        if (!QSettings::contains("Bookmark1Title")) {
+            QSettings::setValue("Bookmark1Title", "");
+        }
+        
+        if (!QSettings::contains("Bookmark1Url")) {
+            QSettings::setValue("Bookmark1Url", "");
+        }
+        
+        if (!QSettings::contains("Bookmark2Title")) {
+            QSettings::setValue("Bookmark2Title", "");
+        }
+        
+        if (!QSettings::contains("Bookmark2Url")) {
+            QSettings::setValue("Bookmark2Url", "");
+        }
     }
+	
+	        // userAgentStringSetup, default empty.  
+        if (!QSettings::contains("UserAgentString"))
+        {
+            QSettings::setValue("UserAgentString", QString());
+        }          				
     endGroup(); // m_appuid
     sync();
 }
--- a/bedrockProvisioning/template/200267EA.ini	Wed Jun 23 17:59:43 2010 +0300
+++ b/bedrockProvisioning/template/200267EA.ini	Tue Jul 06 14:03:49 2010 +0300
@@ -1,4 +1,4 @@
 [200267EA]
 Version=BedrockInternal
-BedrockVersion=8.0.34453
+BedrockVersion=8.0.36010
 DiskCacheEnabled=0
--- a/browsercore/appfw/Api/Dialogs/WebDialogProvider.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Dialogs/WebDialogProvider.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -413,8 +413,10 @@
 {
     QGroupBox* groupBox = new QGroupBox;
     QLineEdit* usernameWidget = new QLineEdit(groupBox);
+    usernameWidget->setInputMethodHints(Qt::ImhNoAutoUppercase);
     QLineEdit* passwordWidget = new QLineEdit(groupBox);
     passwordWidget->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+    passwordWidget->setInputMethodHints(Qt::ImhNoAutoUppercase);
     QGridLayout* gLayout = new QGridLayout(groupBox);
     groupBox->setLayout(gLayout);
     gLayout->addWidget(new QLabel(tr("User Name : "), groupBox), 0, 0);
--- a/browsercore/appfw/Api/Managers/BookmarksManager.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/BookmarksManager.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -45,11 +45,6 @@
 BookmarksManagerPrivate::BookmarksManagerPrivate(BookmarksManager * mgr, QWidget *parent) :
     q(mgr),
     m_connectedToBookmarks(false),
-    m_loadedBookmarks(false),
-    m_loadedHistory(false),
-    m_bookmarkRootNode(0),
-    m_historyRootNode(0),
-    m_historyRootNodeProxy(0),
     m_maxUrls(10) // TODO: read from settings
 {
     m_import = false;
@@ -82,9 +77,6 @@
 
 BookmarksManagerPrivate::~BookmarksManagerPrivate()
 {
-    delete m_bookmarkRootNode;
-    delete m_historyRootNode;
-    delete m_historyRootNodeProxy;
     delete m_bookmarkSession;
     delete m_actionClearHistory;
     delete m_actionClearJSO;
@@ -174,48 +166,44 @@
         
     } 
 #endif
-    // always add Bedrock Browser Welcome Page
-    QString chromeBaseDir(BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("ChromeBaseDirectory"));
-    QString welcomeUrl(BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("StartPage"));
-    QString welcomePage = chromeBaseDir + welcomeUrl;
-    addBookmark("Bedrock Welcome Page",welcomePage,0);
-     
+    // add local bookmarks
+    QString localPagesBaseDir(BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("LocalPagesBaseDirectory"));
+    QString indexStr;
+    for (int index = 2; index >= 0; index--) {
+        indexStr.setNum(index);
+        QString bookmarkTitle = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString(tr("Bookmark")+indexStr+tr("Title"));
+        if (bookmarkTitle == "")
+            continue;
+        QString bookmarkUrl = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString(tr("Bookmark")+indexStr+tr("Url"));
+        if (bookmarkUrl == "")
+            continue;
+        if (bookmarkUrl.contains("://") || bookmarkUrl.contains("www."))
+            addBookmark(bookmarkTitle, bookmarkUrl, 0);
+        else {
+            QString localBookmarkUrl = QFileInfo(localPagesBaseDir + bookmarkUrl).absoluteFilePath();
+            addBookmark(bookmarkTitle, tr("file:///") + localBookmarkUrl, 0);
+        }
+    }
 }
 
 QString BookmarksManager::getBookmarksJSON()
     {
     if(m_isBookmarkDbreadRequired==true)
         {
-    m_bookmakrData=d->m_bookmarkSession->FetchSerializedBookmarks();
+    m_bookmakrData=d->m_bookmarkSession->fetchSerializedBookmarks();
     m_isBookmarkDbreadRequired=false;
        }
     return m_bookmakrData;
 
     }
 
-int BookmarksManager::addBookmark(const QString &title, const QString &url,int index)
-{
-    QString updatedTitle = title;
-    QString updatedUrl = url;
-    //Setting title as url string if title is not available
-    if(url.isEmpty())
-        return ErrBookmarkUrlEmpty;
-    
-    QVector<QString> nodes;
-    d->m_bookmarkSession->FetchAllBookmarkTitles(nodes);
-    for (int iter = 0 ; iter < nodes.size() ; ++iter)   {
-     if(nodes.at(iter) == title)   {
-        //Node already exists no need to add, just return
-        return ErrBookmarkAllReadyPresent;
-      }
-    }
-
-   
-    nodes.clear();
-    
+QString BookmarksManager::normalizeUrl(const QString& url)
+    {
     // If the URL is relative, add http in front
     // so that qt doesn't make it absolute using the
     // local file path
+    QString updatedUrl = url;
+    
     if (!url.contains("://")) {
         if (!url.startsWith("www", Qt::CaseInsensitive)) {
             updatedUrl.prepend("http://www.");
@@ -223,10 +211,35 @@
            updatedUrl.prepend("http://");
         }
     }
+    return updatedUrl;
+    
+    }
 
+int BookmarksManager::addBookmark(const QString &title, const QString &url,int index)
+{
+    QString updatedTitle = title;
+	updatedTitle = updatedTitle.trimmed();
     //Setting title as url string if title is not available
-        if(title.isEmpty())
-            updatedTitle = updatedUrl;
+    if(url.isEmpty())
+        return ErrBookmarkUrlEmpty;
+    
+    QVector<QString> nodes;
+    d->m_bookmarkSession->fetchAllBookmarkTitles(nodes);
+    for (int iter = 0 ; iter < nodes.size() ; ++iter)   {
+		if(0==updatedTitle.compare(nodes.at(iter),Qt::CaseInsensitive)){
+      //Node already exists delete existing
+		 deleteBookmark(updatedTitle); 
+      }
+    }
+
+   
+    nodes.clear();
+    
+    QString updatedUrl = normalizeUrl(url);
+    
+    //Setting title as url string if title is not available
+    if(title.isEmpty())
+        updatedTitle = updatedUrl;
     
     BookmarkLeaf* leaf=new BookmarkLeaf();
     leaf->setTitle(updatedTitle);
@@ -235,7 +248,7 @@
     leaf->setTag("unknown");
     leaf->setIndex(index);
     
-    if(ErrNone == d->m_bookmarkSession->AddBookmark(leaf)) {
+    if(ErrNone == d->m_bookmarkSession->addBookmark(leaf)) {
     emit bookmarkEntryAdded(updatedTitle,updatedUrl);
     delete leaf;
     m_isBookmarkDbreadRequired=true;
@@ -247,7 +260,7 @@
 
 void BookmarksManager::deleteBookmark(QString title)
 {
-    d->m_bookmarkSession->DeleteBookmark(title);
+    d->m_bookmarkSession->deleteBookmark(title);
     m_isBookmarkDbreadRequired=true;
 }
 
@@ -255,6 +268,7 @@
 {
     d->m_bookmarkSession->clearBookmarks();
     m_isBookmarkDbreadRequired=true;
+    emit bookmarksCleared();
 }
 
 int BookmarksManager::reorderBokmarks(QString title,int new_index)
@@ -267,29 +281,33 @@
 int BookmarksManager::modifyBookmark(QString orgTitle, QString newTitle, QString newUrl)
 {
     QString updatedTitle = newTitle;
+	updatedTitle = updatedTitle.trimmed();
     //Setting title as url string if title is not available
     if(newUrl.isEmpty())
         return ErrBookmarkUrlEmpty;
     
     QList<BookmarkLeaf*> nodes;
-    nodes = d->m_bookmarkSession->FetchAllBookmarks();
+    nodes = d->m_bookmarkSession->fetchAllBookmarks();
     for (int iter = 0 ; iter < nodes.count() ; ++iter)   {
-     if((nodes.at(iter)->getTitle() == newTitle) && (nodes.at(iter)->getTitle() != orgTitle))   {
-        //Node already exists no need to add, just return
-        return ErrBookmarkAllReadyPresent;
+     if((0==updatedTitle.compare(nodes.at(iter)->getTitle(),Qt::CaseInsensitive))
+         && (0 != orgTitle.compare(nodes.at(iter)->getTitle(),Qt::CaseInsensitive))){
+         //Node already exists delete existing
+         deleteBookmark(updatedTitle);
       }
     }
     
     qDeleteAll(nodes);
     nodes.clear();
 
+   QString updatedUrl = normalizeUrl(newUrl);
+   
   //Setting title as url string if title is not available
     if(newTitle.isEmpty())
-        updatedTitle = newUrl;
+        updatedTitle = updatedUrl;
 
 
-    if(ErrNone == d->m_bookmarkSession->modifyBookmark(orgTitle, newTitle, newUrl)) {
-        emit bookmarkEntryModified(newTitle, newUrl);
+    if(ErrNone == d->m_bookmarkSession->modifyBookmark(orgTitle, updatedTitle, updatedUrl)) {
+        emit bookmarkEntryModified(updatedTitle, updatedUrl);
         m_isBookmarkDbreadRequired=true;
         return ErrNone;
     }
@@ -301,87 +319,23 @@
     emit launchBookmarkEditDailog(title,url);
 }
 
-/*!
- * Load history from database
- */
-void BookmarksManager::loadHistory()
-{
-    if (d->m_loadedHistory)
-        return;
-
-    d->m_loadedHistory = true;
-
-    if(d->m_historyRootNode) {
-        delete d->m_historyRootNode;
-        d->m_historyRootNode = NULL;
-    }
-
-    d->m_historyRootNode = new BookmarkNode(BookmarkNode::Root, NULL);
-
-    if (d->m_connectedToBookmarks) {
-        QList<HistoryLeaf*> nodes;
-        nodes = d->m_bookmarkSession->FetchHistory();
-
-        for(int i=nodes.count()-1;i>=0;i--) {
-            BookmarkNode* node = new BookmarkNode(BookmarkNode::Bookmark, NULL);
-            node->title=nodes[i]->getTitle();
-            node->url=nodes[i]->getUrl();
-            node->date=nodes[i]->getDate();
-            node->lastVisited =nodes[i]->getLastVisited();
-            d->m_historyRootNode->add(node, 0);
-        }
-
-    qDeleteAll(nodes);
-    nodes.clear();
-    }
-
-       loadHistoryProxy();
-}
-
-/*!
- * Load history proxy from existing database
- * This creates new Model class based on existing Model and arranges the items in to groups
- * "Today", "YesterDay", "This Week",  "This Month" ......... 
- */
-void BookmarksManager::loadHistoryProxy()
-{
-    if(d->m_historyRootNodeProxy) {
-        delete d->m_historyRootNodeProxy;
-        d->m_historyRootNodeProxy = NULL;
-    }
-    
-    d->m_historyRootNodeProxy  = new BookmarkNode(BookmarkNode::Root, NULL);
-
-    //Loop through the root elements and find the folder in proxy to which the elements belong     
-    for (int i = d->m_historyRootNode->children().count() - 1; i >= 0; --i) {
-        
-        BookmarkNode *node = d->m_historyRootNode->children()[i];
-        int daysToCurrentDate = node->date.daysTo(QDate::currentDate());
-
-        if(daysToCurrentDate < 0) {
-            continue;
-        }
-        //Find the Folder name to which this node belongs
-        QString strFoldername =  findFolderForDate(node->date);
-        //Add the  node to proxy model
-        addToHistoryProxy(strFoldername,node);
-    }                
-}
-
 QString BookmarksManager::getHistoryFoldersJSON(QString folderName)
     {
-    QVector<QString> folderVector;
-    QMap<QString, QString> mymap;
+
     bool flag = true;
-    mymap.clear();
-    folderVector.clear();
-    d->m_bookmarkSession->FetchSerializedHistory(folderVector, mymap);
+  
     QString historyFolders = "[";
-    for (int i = folderVector.size() - 1; i >= 0; i--)
+    if (folderName == "")
+        {
+    m_historyMap.clear();
+    m_folderVector.clear();
+    d->m_bookmarkSession->fetchSerializedHistory(m_folderVector, m_historyMap);
+
+    for (int i = m_folderVector.size() - 1; i >= 0; i--)
         {
         //check for folder nodes
         historyFolders.append("\"");
-        historyFolders.append(folderVector[i]);
+        historyFolders.append(m_folderVector[i]);
         historyFolders.append("\"");
 
 
@@ -389,7 +343,7 @@
             historyFolders.append(",");
         if (flag)
             {
-            if (folderVector[i].count() > 0)
+            if (m_folderVector[i].count() > 0)
                 {
                 d->m_actionClearHistory->setEnabled(true);
                 flag=false;
@@ -402,7 +356,8 @@
         d->m_actionClearHistory->setEnabled(false);
         }
     historyFolders.append("]");
-    folderVector.clear();
+    m_folderVector.clear();
+        }
     if (folderName == "")
         {
         return historyFolders;
@@ -410,7 +365,7 @@
         }
     else
         {
-        return mymap[folderName];
+        return m_historyMap[folderName];
         }
     }
 
@@ -418,121 +373,6 @@
  * Add the  node to the folder in proxy model. If the folder doesnt exist in proxy, create
  * the folder  and add the node to it
  */
-void BookmarksManager::addToHistoryProxy(QString &strFoldername, BookmarkNode*node)
-{
-    bool bFound = false;
-    BookmarkNode *folderNode= NULL;
-    
-    //Check if the folder exist with name $strFoldername
-    for (int i = d->m_historyRootNodeProxy->children().count() - 1; i >= 0; --i) {
-               folderNode = d->m_historyRootNodeProxy->children()[i];
-               QString title = folderNode->title ;
-               if(folderNode->title == strFoldername){
-               //folder exist
-                   bFound = true;
-                   break;
-               }         
-    }
-
-    if(!bFound){
-        //Folder doesnt exist. create new folder with name $strFoldername
-        folderNode = new BookmarkNode(BookmarkNode::Folder, d->m_historyRootNodeProxy);
-        folderNode->title = strFoldername;
-        folderNode->date = node->date;
-        
-        int index=0;
-        //Find the index to where the folder needs to be inserted
-        for (; index < d->m_historyRootNodeProxy->children().count(); index++) {
-           BookmarkNode* tmpNode = d->m_historyRootNodeProxy->children()[index];
-           if(folderNode->date  > tmpNode->date){
-             break;
-           }  
-        }
-        d->m_historyRootNodeProxy->add(folderNode,index);
-    }
-    
-    
-
-    BookmarkNode *newNode = new BookmarkNode(BookmarkNode::Bookmark,folderNode);
-    newNode->date = node->date;
-    newNode->title = node->title;
-    newNode->lastVisited = node->lastVisited;
-    newNode->favicon = node->favicon;
-    newNode->url = node->url;
-    
-    //Find the index to where the node needs to be inserted in to the foder
-    int index=0;
-    for (; index < folderNode->children().count() ;  index++) {
-       BookmarkNode* tmpNode = folderNode->children()[index];
-            if(newNode->lastVisited  > tmpNode->lastVisited){
-                 break;
-               }
-    }
-    
-    folderNode->add(newNode,index);
-}
-
-
-/*!
- * Finds the folder to which the date belongs
- * 
- */
-//QString BookmarksManager::findFolderForDate( BookmarkNode *aNode)
-QString BookmarksManager::findFolderForDate( QDate& nodeDate)const
-{
-    QDateTime currentDateTime = QDateTime::currentDateTime();
-    int currentDayOfWeek = currentDateTime.date().dayOfWeek(); 
-
-    int nodeDayOfWeek = nodeDate.dayOfWeek();
-
-    int daysToCurrentDate = nodeDate.daysTo(currentDateTime.date());
-
-    //Check if date to belongs to "ToDay" Folder
-    if(nodeDate == currentDateTime.date()){
-        QString folder = qtTrId("txt_browser_history_today");
-        return folder;
-    }
-    //Check if date to belongs to "YesterDay" Folder
-    if(nodeDate.addDays(1) == currentDateTime.date() ){
-        QString folder = qtTrId("txt_browser_history_yesterday");
-        return folder;
-    }
-
-    //Check if date to belongs to current week folder
-    //Should disply the day for the current week
-    if(daysToCurrentDate < 7  &&  currentDayOfWeek > nodeDayOfWeek ){
-        
-        QString folder = qtTrId("txt_browser_history_this_week");
-        return folder;
-    }
-
-    if(dateInThisMonth(nodeDate)){
-        QString folder = qtTrId("txt_browser_history_this_month");
-        return folder;
-    }
-
-    QString folder = nodeDate.toString("dd.MM.yyyy");
-    return folder; 
-
-}
-
-
-
-bool BookmarksManager::dateInThisMonth(QDate &date)const
-{
-    QDate currentDate = QDateTime::currentDateTime().date();
-    int daysToCurrentDate = currentDate.daysTo(date);
-
-    int currentMonth = currentDate.month();
-    int nodeMonth = date.month();
-
-    if(daysToCurrentDate <= 31 && currentMonth == nodeMonth) {
-        return true;
-    }
-    return false;  
-   
-}
-
 
 /*!
  * Add to recent urls
@@ -542,8 +382,6 @@
  */
 Q_DECL_EXPORT void BookmarksManager::addHistory(const QString &url, const QString &title)
 {
-    if (!d->m_loadedHistory)
-        loadHistory();
 
     //Check for a valid history entry
     if (url.isEmpty() || title.isEmpty())
@@ -562,9 +400,8 @@
     leaf->setLastVisited(currentDateTime.time());
     
     if (d->m_connectedToBookmarks){
-        if(ErrNone == d->m_bookmarkSession->AddHistory(leaf)){
+        if(ErrNone == d->m_bookmarkSession->addHistory(leaf)){
           d->m_actionClearHistory->setEnabled(true);
-          d->m_loadedHistory = false;
         }
     }
     delete leaf;
@@ -589,19 +426,10 @@
  */
 void BookmarksManager::clearHistory()
 {
-    if (!d->m_loadedHistory)
-        loadHistory();
 
-    //Undo Redo is not required for history(recent urls)
-    for (int i = d->m_historyRootNode->children().count() - 1; i >= 0; --i) {
-        BookmarkNode *node = d->m_historyRootNode->children()[i];     
-        d->m_historyRootNode->remove(node);
-    }
-    
     if (d->m_connectedToBookmarks) {
         d->m_bookmarkSession->clearHistory();
     }
-    d->m_loadedHistory = false;
     
     d->m_actionClearHistory->setEnabled(false);
     
@@ -615,20 +443,21 @@
 
 int BookmarksManager::getPageRank(const QString &url)
 {
-    if (!d->m_loadedHistory)
-        loadHistory();
-
-    //Check for a valid entry
+ //Check for a valid entry
     if (url.isNull())
         return 0;
 
     int rank = 0;
-    QList<BookmarkNode *> rootChildren (d->m_historyRootNode->children());
+	QList<HistoryLeaf*> historyNodes = d->m_bookmarkSession->fetchHistory();
 
-    for (int i=0; i < rootChildren.count(); i++) {
+    for (int i=0; i < historyNodes.count(); i++) {
       //Update rank if there is a history for this URL.
-        if (!rootChildren[i]->getUrl().compare(url))
+        if (!historyNodes[i]->getUrl().compare(url))
            rank++;
     }
+
+	while (!historyNodes.isEmpty())
+     delete historyNodes.takeFirst();
+
     return rank;
 }
--- a/browsercore/appfw/Api/Managers/BookmarksManager.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/BookmarksManager.h	Tue Jul 06 14:03:49 2010 +0300
@@ -59,13 +59,14 @@
     //Gets ref count of the page from history
     int getPageRank(const QString &url);
     static BookmarksManager* getSingleton();
-
+    
   signals:
     void bookmarkEntryAdded(QString,QString);
     void launchBookmarkEditDailog(QString,QString);
     void bookmarkEntryModified(QString, QString);
     void historyCleared();
     void confirmHistoryClear();
+    void bookmarksCleared();
 
     public slots:
 
@@ -88,19 +89,14 @@
 
   private:
     //For loading the history from data base
-    void loadHistory();
-    void loadHistoryProxy();
-    //Finds the folder to which the date belongs
-    QString findFolderForDate( QDate& date) const;
-    //add the node to history proxy
-    void addToHistoryProxy(QString &strFoldername, BookmarkNode*node);
-    //add the history item to root node specified
-    bool dateInThisMonth(QDate &date)const;
+    QString normalizeUrl(const QString &url);
 
   private:
      BookmarksManagerPrivate * const d;
      bool m_isBookmarkDbreadRequired;
      QString m_bookmakrData;
+     QVector<QString> m_folderVector;
+     QMap<QString, QString> m_historyMap;
      
 };
 }
--- a/browsercore/appfw/Api/Managers/BookmarksManager_p.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/BookmarksManager_p.h	Tue Jul 06 14:03:49 2010 +0300
@@ -44,16 +44,6 @@
         //! flag to indicate was able to connect to book marks
         bool m_connectedToBookmarks;
         //! flag to indicate bookmarks are loaded from data base
-        bool m_loadedBookmarks;
-        //! flag to indicate history is loaded from data base
-        bool m_loadedHistory;
-        //! Root node for bookmark
-        BookmarkNode *m_bookmarkRootNode; // owned
-        //! Root node for  history
-        BookmarkNode *m_historyRootNode; //  owned
-        
-        //! Root node for  history proxy model
-        BookmarkNode *m_historyRootNodeProxy; //  owned
         int m_maxUrls;
         BrowserContent* m_bookmarkSession;
         //flag to indicate importing bookmarks
--- a/browsercore/appfw/Api/Managers/ContentAgent.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/ContentAgent.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -85,7 +85,7 @@
 QString ContentAgent::getBookmarks()
 {
     QList<BookmarkLeaf*> nodes;
-    nodes = d->m_bookmarkSession->FetchAllBookmarks();
+    nodes = d->m_bookmarkSession->fetchAllBookmarks();
     QString bookmarkData = "[";
     for(int i=0;i<nodes.count();i++) {
         bookmarkData.append("{");
--- a/browsercore/appfw/Api/Managers/LoadController.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/LoadController.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -21,6 +21,8 @@
 
 
 #include "LoadController.h"
+#include "webpagecontroller.h"
+#include "wrtbrowsercontainer.h"
 #include <QDebug>
 
 namespace WRT {
@@ -70,6 +72,12 @@
 
     m_gotoMode = GotoModeReloadable;
 
+    // FIXME it is a temp fix for the url change issued with cached pages
+    if (ok) {
+        WebPageController * pageController = WebPageController::getSingleton();
+        if (pageController->currentPage()->loadController() == this)
+            m_textBoxValue = pageController->currentDocUrl();
+    }
 // TODO: Change to editing mode if load failed
 /*
     // if page succeed, set the text and goto reloading mode, else load mode
--- a/browsercore/appfw/Api/Managers/Managers.pri	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/Managers.pri	Tue Jul 06 14:03:49 2010 +0300
@@ -29,6 +29,8 @@
     $$PWD/webpagecontroller_p.h  \
     $$PWD/downloadcontroller_p.h \
     $$PWD/downloadcontroller.h \
+    $$PWD/downloadproxy_p.h \
+    $$PWD/downloadproxy.h \
     $$PWD/contentagent_p.h \
     $$PWD/contentagent.h \
     $$PWD/lowmemoryhandler.h \
@@ -41,6 +43,8 @@
     $$PWD/viewcontroller.cpp \
     $$PWD/webpagecontroller.cpp \
     $$PWD/downloadcontroller.cpp \
+    $$PWD/downloadproxy.cpp \
+    $$PWD/downloadproxydata.cpp \
     $$PWD/contentagent.cpp \
     $$PWD/lowmemoryhandler.cpp
  
--- a/browsercore/appfw/Api/Managers/downloadcontroller.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/downloadcontroller.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,6 +22,8 @@
 #include "downloadcontroller.h"
 #include "downloadcontroller_p.h"
 
+#include "downloadproxy_p.h"
+
 #include <QFileInfo>
 #include <QNetworkProxy>
 #include <QNetworkReply>
@@ -84,7 +86,7 @@
     case QNetworkReply::ProtocolFailure:
         return "QNetworkReply::ProtocolFailure";
     default:
-        return 0;
+        return "???";
     }
 }
 
@@ -130,293 +132,6 @@
     }
 }
 
-static const char * downloadPriorityToString(DownloadPriority priority)
-{
-    switch (priority) {
-    case High:
-        return "High";
-    case Low:
-        return "Low";
-    default:
-        return 0;
-    }
-}
-
-static const char * downloadScopeToString(DownloadScope scope)
-{
-    switch (scope) {
-    case Normal:
-        return "Normal";
-    case Background:
-        return "Background";
-    default:
-        return 0;
-    }
-}
-
-static const char * downloadStateToString(DownloadState state)
-{
-    switch (state) {
-    case DlNone:
-	return "DlNone";
-    case DlCreated:
-	return "DlCreated";
-    case DlStarted:
-	return "DlStarted";
-    case DlInprogress:
-	return "DlInprogress";
-    case DlPaused:
-	return "DlPaused";
-    case DlCompleted:
-	return "DlCompleted";
-    case DlFailed:
-	return "DlFailed";
-    case DlCancelled:
-	return "DlCancelled";
-    case DlDescriptorUpdated:
-	return "DlDescriptorUpdated";
-    default:
-        return 0;
-    }
-}
-
-static const char * downloadTypeToString(DownloadType type)
-{
-    switch (type) {
-    case Parallel:
-        return "Parallel";
-    case Sequential:
-        return "Sequential";
-    default:
-        return 0;
-    }
-}
-
-static void debugDownloadStr(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    QString value = download->getAttribute(attribute).toString();
-    if (value.length() == 0) {
-        return;
-    }
-
-    qDebug() << "DL" << download->id() << name << value;
-}
-
-static void debugDownloadInt(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    int value = download->getAttribute(attribute).toInt();
-    if (value == 0) {
-        return;
-    }
-
-    qDebug() << "DL" << download->id() << name << value;
-}
-
-static void debugDownloadUInt(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    uint value = download->getAttribute(attribute).toUInt();
-    if (value == 0) {
-        return;
-    }
-
-    qDebug() << "DL" << download->id() << name << value;
-}
-
-static void debugDownloadError(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    int num = download->getAttribute(attribute).toInt();
-
-    const char * str = downloadErrorToString(static_cast<QNetworkReply::NetworkError>(num));
-    if (str == 0) {
-        str = "???";
-    }
-
-    qDebug() << "DL" << download->id() << name << num << str;
-}
-
-static void debugDownloadPriority(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    int num = download->getAttribute(attribute).toInt();
-
-    const char * str = downloadPriorityToString(static_cast<DownloadPriority>(num));
-    if (str == 0) {
-        str = "???";
-    }
-
-    qDebug() << "DL" << download->id() << name << num << str;
-}
-
-static void debugDownloadScope(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    int num = download->getAttribute(attribute).toInt();
-
-    const char * str = downloadScopeToString(static_cast<DownloadScope>(num));
-    if (str == 0) {
-        str = "???";
-    }
-
-    qDebug() << "DL" << download->id() << name << num << str;
-}
-
-static void debugDownloadState(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    int num = download->getAttribute(attribute).toInt();
-
-    const char * str = downloadStateToString(static_cast<DownloadState>(num));
-    if (str == 0) {
-        str = "???";
-    }
-
-    qDebug() << "DL" << download->id() << name << num << str;
-}
-
-static void debugDownloadType(
-    Download * download,
-    DownloadAttribute attribute,
-    const char * name)
-{
-    int num = download->getAttribute(attribute).toInt();
-
-    const char * str = downloadTypeToString(static_cast<DownloadType>(num));
-    if (str == 0) {
-        str = "???";
-    }
-
-    qDebug() << "DL" << download->id() << name << num << str;
-}
-
-void DownloadController::debugDownload(Download * download)
-{
-    debugDownloadState(download,
-            DlDownloadState,
-            "DlDownloadState");
-
-    debugDownloadError(download,
-            DlLastError,
-            "DlLastError");
-
-    debugDownloadStr(download,
-            DlLastErrorString,
-            "DlLastErrorString");
-
-    debugDownloadStr(download,
-            DlSourceUrl,
-            "DlSourceUrl");
-
-    debugDownloadStr(download,
-            DlContentType,
-            "DlContentType");
-
-    debugDownloadStr(download,
-            DlDestPath,
-            "DlDestPath");
-
-    debugDownloadStr(download,
-            DlFileName,
-            "DlFileName");
-
-    debugDownloadInt(download,
-            DlDownloadedSize,
-            "DlDownloadedSize");
-
-    debugDownloadInt(download,
-            DlTotalSize,
-            "DlTotalSize");
-
-    debugDownloadInt(download,
-            DlLastPausedSize,
-            "DlLastPausedSize");
-
-    debugDownloadInt(download,
-            DlPercentage,
-            "DlPercentage");
-
-    debugDownloadStr(download,
-            DlStartTime,
-            "DlStartTime");
-
-    debugDownloadStr(download,
-            DlEndTime,
-            "DlEndTime");
-
-    debugDownloadUInt(download,
-            DlElapsedTime,
-            "DlElapsedTime");
-
-    debugDownloadStr(download,
-            DlRemainingTime,
-            "DlRemainingTime");
-
-    debugDownloadStr(download,
-            DlSpeed,
-            "DlSpeed");
-
-    debugDownloadScope(download,
-            DlDownloadScope,
-            "DlDownloadScope");
-
-    debugDownloadType(download,
-            DlDownloadType,
-            "DlDownloadType");
-
-    debugDownloadPriority(download,
-            DlPriority,
-            "DlPriority");
-
-    debugDownloadInt(download,
-            DlProgressInterval,
-            "DlProgressInterval");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorName,
-            "OMADownloadDescriptorName");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorVersion,
-            "OMADownloadDescriptorVersion");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorType,
-            "OMADownloadDescriptorType");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorSize,
-            "OMADownloadDescriptorSize");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorVendor,
-            "OMADownloadDescriptorVendor");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorDescription,
-            "OMADownloadDescriptorDescription");
-
-    debugDownloadStr(download,
-            OMADownloadDescriptorNextURL,
-            "OMADownloadDescriptorNextURL");
-}
-
 static void debugDownloadEvent(DEventType type)
 {
     const char * name = downloadEventToString(type);
@@ -522,9 +237,12 @@
 
     // Start download.
 
-    emit m_downloadController->downloadCreated(download);
+    DownloadProxy downloadProxy(new DownloadProxyData(download));
+
+    emit m_downloadController->downloadCreated(downloadProxy);
 
     download->registerEventReceiver(this);
+
     download->start();
 }
 
@@ -540,6 +258,9 @@
         return true;
 
     case DownloadsCleared:
+        // ;;; In new DL mgr will have DownloadManager 'Removed' event instead.
+        // ;;; Looks like this will only be generated when all downloads are removed.
+        // ;;; In that case we can emit the same signal.
         emit m_downloadController->downloadsCleared();
         return true;
 
@@ -578,34 +299,36 @@
     if (errorStr != 0)
         error = errorStr;
 
+    DownloadProxy downloadProxy(new DownloadProxyData(download));
+
     switch (type)
     {
     case Started:
-        emit m_downloadController->downloadStarted(download);
+        emit m_downloadController->downloadStarted(downloadProxy);
         return true;
 
     case HeaderReceived:
-        emit m_downloadController->downloadHeaderReceived(download);
+        emit m_downloadController->downloadHeaderReceived(downloadProxy);
         return true;
 
     case Progress:
-        emit m_downloadController->downloadProgress(download);
+        emit m_downloadController->downloadProgress(downloadProxy);
         return true;
 
     case Completed:
-        emit m_downloadController->downloadFinished(download);
+        emit m_downloadController->downloadFinished(downloadProxy);
         return true;
 
     case Paused:
-        emit m_downloadController->downloadPaused(download, error);
+        emit m_downloadController->downloadPaused(downloadProxy, error);
         return true;
 
     case Cancelled:
-        emit m_downloadController->downloadCancelled(download, error);
+        emit m_downloadController->downloadCancelled(downloadProxy, error);
         return true;
 
     case Failed:
-        emit m_downloadController->downloadFailed(download, error);
+        emit m_downloadController->downloadFailed(downloadProxy, error);
         return true;
 
     case DescriptorUpdated:
@@ -613,11 +336,11 @@
         return true;
 
     case NetworkLoss:
-        emit m_downloadController->downloadNetworkLoss(download, error);
+        emit m_downloadController->downloadNetworkLoss(downloadProxy, error);
         return true;
 
     case Error:
-        emit m_downloadController->downloadError(download, error);
+        emit m_downloadController->downloadError(downloadProxy, error);
         return true;
 
     case OMADownloadDescriptorReady:
--- a/browsercore/appfw/Api/Managers/downloadcontroller.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/downloadcontroller.h	Tue Jul 06 14:03:49 2010 +0300
@@ -25,6 +25,8 @@
 #include <QObject>
 #include "BWFGlobal.h"
 
+#include "downloadproxy.h"
+
 class QFileInfo;
 class QNetworkProxy;
 class QNetworkReply;
@@ -33,8 +35,6 @@
 class QUrl;
 class QWebPage;
 
-class Download;
-
 class DownloadControllerPrivate;
 
 class BWF_EXPORT DownloadController : public QObject
@@ -45,8 +45,6 @@
     DownloadController(const QString & client, const QNetworkProxy & proxy);
     ~DownloadController();
 
-    static void debugDownload(Download * download);
-
 public slots:
     bool handlePage(QWebPage * page);
 
@@ -57,25 +55,25 @@
     void startDownload(const QNetworkRequest & request);
 
 signals:
-    void downloadCreated(Download * download);
+    void downloadCreated(DownloadProxy downloadProxy);
 
-    void downloadStarted(Download * download);
+    void downloadStarted(DownloadProxy downloadProxy);
 
-    void downloadHeaderReceived(Download * download);
+    void downloadHeaderReceived(DownloadProxy downloadProxy);
 
-    void downloadProgress(Download * download);
+    void downloadProgress(DownloadProxy downloadProxy);
 
-    void downloadFinished(Download * download);
+    void downloadFinished(DownloadProxy downloadProxy);
 
-    void downloadPaused(Download * download, const QString & error);
+    void downloadPaused(DownloadProxy downloadProxy, const QString & error);
 
-    void downloadCancelled(Download * download, const QString & error);
+    void downloadCancelled(DownloadProxy downloadProxy, const QString & error);
 
-    void downloadFailed(Download * download, const QString & error);
+    void downloadFailed(DownloadProxy downloadProxy, const QString & error);
 
-    void downloadNetworkLoss(Download * download, const QString & error);
+    void downloadNetworkLoss(DownloadProxy downloadProxy, const QString & error);
 
-    void downloadError(Download * download, const QString & error);
+    void downloadError(DownloadProxy downloadProxy, const QString & error);
 
     void downloadsCleared();
 
--- a/browsercore/appfw/Api/Managers/downloadcontroller_p.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/downloadcontroller_p.h	Tue Jul 06 14:03:49 2010 +0300
@@ -29,6 +29,7 @@
 class QString;
 class QUrl;
 
+class Download;
 class DownloadEvent;
 class DownloadManager;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/browsercore/appfw/Api/Managers/downloadproxy.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "downloadproxy.h"
+#include "downloadproxy_p.h"
+
+DownloadProxy::DownloadProxy(DownloadProxyData * data)
+: m_data(data)
+{
+}
+
+DownloadProxy::~DownloadProxy()
+{
+}
+
+void DownloadProxy::debug()
+{
+    m_data->debug();
+}
+
+void DownloadProxy::remove()
+{
+    m_data->remove();
+}
+
+QString DownloadProxy::fileName()
+{
+    return m_data->fileName();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/browsercore/appfw/Api/Managers/downloadproxy.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef __DOWNLOAD_PROXY_H__
+#define __DOWNLOAD_PROXY_H__
+
+#include <QString>
+#include <QSharedPointer>
+
+#include "BWFGlobal.h"
+
+// Each DownloadProxy object encapsulates an instance of the Download class
+// used by the Download Manager.  DownloadProxy is used to shield client
+// code from direct knowledge of the Download class.
+//
+// Knowledge of the Download class is confined to the DownloadProxyData class.
+// DownloadProxyData objects are created by the DownloadController as necessary
+// to construct DownloadProxy objects that may be exposed to client code via
+// signals or other mechanisms.
+
+class DownloadProxyData;
+
+class BWF_EXPORT DownloadProxy
+{
+public:
+    DownloadProxy(DownloadProxyData * data);
+
+    ~DownloadProxy();
+
+    void debug();
+
+    void remove();
+
+    QString fileName();
+
+private:
+    QSharedPointer<DownloadProxyData> m_data;
+};
+
+#endif // __DOWNLOAD_PROXY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/browsercore/appfw/Api/Managers/downloadproxy_p.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef __DOWNLOAD_PROXY_P_H__
+#define __DOWNLOAD_PROXY_P_H__
+
+#include <QString>
+
+class Download;
+
+class DownloadProxyData
+{
+public:
+    DownloadProxyData(Download * download);
+
+    ~DownloadProxyData();
+
+    void debug();
+
+    void remove();
+
+    QString fileName();
+
+private:
+    Download * m_download;
+};
+
+#endif // __DOWNLOAD_PROXY_P_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/browsercore/appfw/Api/Managers/downloadproxydata.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,320 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "downloadproxy_p.h"
+
+#include <QNetworkReply>
+#include <QtDebug>
+
+#ifdef USE_DOWNLOAD_MANAGER
+#include "download.h"
+#include "downloadmanager.h"
+#endif // USE_DOWNLOAD_MANAGER
+
+DownloadProxyData::DownloadProxyData(Download * download)
+: m_download(download)
+{}
+
+DownloadProxyData::~DownloadProxyData()
+{
+    // Nothing to do, Download * is owned by DownloadManager.
+}
+
+#ifdef USE_DOWNLOAD_MANAGER
+
+// Helper functions for translating various download attribute enum values.
+
+static const char * downloadState(int state)
+{
+    switch (state) {
+    case DlNone:
+	return "None";
+    case DlCreated:
+	return "Created";
+    case DlStarted:
+	return "Started";
+    case DlInprogress:
+	return "InProgress";
+    case DlPaused:
+	return "Paused";
+    case DlCompleted:
+	return "Completed";
+    case DlFailed:
+	return "Failed";
+    case DlCancelled:
+	return "Cancelled";
+    case DlDescriptorUpdated:
+	return "DescriptorUpdated";
+    default:
+        return "???";
+    }
+}
+
+static const char * downloadError(QNetworkReply::NetworkError error)
+{
+    switch (error) {
+    case QNetworkReply::NoError:
+        return "QNetworkReply::NoError";
+    case QNetworkReply::ConnectionRefusedError:
+        return "QNetworkReply::ConnectionRefusedError";
+    case QNetworkReply::RemoteHostClosedError:
+        return "QNetworkReply::RemoteHostClosedError";
+    case QNetworkReply::HostNotFoundError:
+        return "QNetworkReply::HostNotFoundError";
+    case QNetworkReply::TimeoutError:
+        return "QNetworkReply::TimeoutError";
+    case QNetworkReply::OperationCanceledError:
+        return "QNetworkReply::OperationCanceledError";
+    case QNetworkReply::SslHandshakeFailedError:
+        return "QNetworkReply::SslHandshakeFailedError";
+    case QNetworkReply::ProxyConnectionRefusedError:
+        return "QNetworkReply::ProxyConnectionRefusedError";
+    case QNetworkReply::ProxyConnectionClosedError:
+        return "QNetworkReply::ProxyConnectionClosedError";
+    case QNetworkReply::ProxyNotFoundError:
+        return "QNetworkReply::ProxyNotFoundError";
+    case QNetworkReply::ProxyTimeoutError:
+        return "QNetworkReply::ProxyTimeoutError";
+    case QNetworkReply::ProxyAuthenticationRequiredError:
+        return "QNetworkReply::ProxyAuthenticationRequiredError";
+    case QNetworkReply::ContentAccessDenied:
+        return "QNetworkReply::ContentAccessDenied";
+    case QNetworkReply::ContentOperationNotPermittedError:
+        return "QNetworkReply::ContentOperationNotPermittedError";
+    case QNetworkReply::ContentNotFoundError:
+        return "QNetworkReply::ContentNotFoundError";
+    case QNetworkReply::AuthenticationRequiredError:
+        return "QNetworkReply::AuthenticationRequiredError";
+    case QNetworkReply::ContentReSendError:
+        return "QNetworkReply::ContentReSendError";
+    case QNetworkReply::ProtocolUnknownError:
+        return "QNetworkReply::ProtocolUnknownError";
+    case QNetworkReply::ProtocolInvalidOperationError:
+        return "QNetworkReply::ProtocolInvalidOperationError";
+    case QNetworkReply::UnknownNetworkError:
+        return "QNetworkReply::UnknownNetworkError";
+    case QNetworkReply::UnknownProxyError:
+        return "QNetworkReply::UnknownProxyError";
+    case QNetworkReply::UnknownContentError:
+        return "QNetworkReply::UnknownContentError";
+    case QNetworkReply::ProtocolFailure:
+        return "QNetworkReply::ProtocolFailure";
+    default:
+        return "???";
+    }
+}
+
+// Helper functions to get download attribute of a particular type.
+
+static int intAttribute(Download * download, DownloadAttribute which)
+{
+    return download->getAttribute(which).toInt();
+}
+
+static uint uintAttribute(Download * download, DownloadAttribute which)
+{
+    return download->getAttribute(which).toUInt();
+}
+
+static QString stringAttribute(Download * download, DownloadAttribute which)
+{
+    return download->getAttribute(which).toString();
+}
+
+// Helper functions for reporting download attributes.
+
+template<typename T>
+void debugDownloadAttribute(
+        Download * download,
+        char const * name,
+        const T & value)
+{
+    qDebug() << "DL" << download->id() << name << value;
+}
+
+static void debugDownloadInt(
+    Download * download,
+    DownloadAttribute which,
+    const char * name)
+{
+    int value = intAttribute(download, which);
+
+    debugDownloadAttribute(download, name, value);
+}
+
+static void debugDownloadUInt(
+    Download * download,
+    DownloadAttribute which,
+    const char * name)
+{
+    uint value = uintAttribute(download, which);
+
+    debugDownloadAttribute(download, name, value);
+}
+
+static void debugDownloadStr(
+    Download * download,
+    DownloadAttribute which,
+    const char * name)
+{
+    QString value = stringAttribute(download, which);
+
+    debugDownloadAttribute(download, name, value);
+}
+
+static void debugDownloadState(Download * download)
+{
+    int num = intAttribute(download, DlDownloadState);
+
+    const char * state = downloadState(num);
+
+    debugDownloadAttribute(download, "DownloadState", state);
+
+}
+
+static void debugDownloadError(Download * download)
+{
+    int num = intAttribute(download, DlLastError);
+
+    const char * error = downloadError(static_cast<QNetworkReply::NetworkError>(num));
+
+    debugDownloadAttribute(download, "DownloadError", error);
+}
+
+// Helper function for implementing DownloadProxyData::debug().
+
+static void debugDownload(Download * download)
+{
+    debugDownloadState(download);
+
+    debugDownloadError(download);
+
+    debugDownloadStr(download,
+            DlLastErrorString,
+            "LastErrorString");
+
+    debugDownloadStr(download,
+            DlSourceUrl,
+            "SourceUrl");
+
+    debugDownloadStr(download,
+            DlContentType,
+            "ContentType");
+
+    debugDownloadStr(download,
+            DlDestPath,
+            "DestPath");
+
+    debugDownloadStr(download,
+            DlFileName,
+            "FileName");
+
+    debugDownloadInt(download,
+            DlDownloadedSize,
+            "DownloadedSize");
+
+    debugDownloadInt(download,
+            DlTotalSize,
+            "TotalSize");
+
+    debugDownloadInt(download,
+            DlLastPausedSize,
+            "LastPausedSize");
+
+    debugDownloadInt(download,
+            DlPercentage,
+            "Percentage");
+
+    debugDownloadStr(download,
+            DlStartTime,
+            "StartTime");
+
+    debugDownloadStr(download,
+            DlEndTime,
+            "EndTime");
+
+    debugDownloadUInt(download,
+            DlElapsedTime,
+            "ElapsedTime");
+
+    debugDownloadStr(download,
+            DlRemainingTime,
+            "RemainingTime");
+
+    debugDownloadStr(download,
+            DlSpeed,
+            "Speed");
+
+    debugDownloadInt(download,
+            DlProgressInterval,
+            "ProgressInterval");
+}
+
+#endif // USE_DOWNLOAD_MANAGER
+
+void DownloadProxyData::debug()
+{
+#ifdef USE_DOWNLOAD_MANAGER
+    if (m_download == 0) {
+        return;
+    }
+
+    int id = m_download->id();
+
+    DownloadManager * manager = m_download->downloadManager();
+
+    Download * download = manager->findDownload(id);
+
+    if (download != 0) {
+        debugDownload(download);
+    }
+#endif // USE_DOWNLOAD_MANAGER
+}
+
+void DownloadProxyData::remove()
+{
+#ifdef USE_DOWNLOAD_MANAGER
+    if (m_download == 0) {
+        return;
+    }
+
+    DownloadManager * manager = m_download->downloadManager();
+
+    manager->removeOne(m_download);
+
+    // Download is no longer valid.
+
+    m_download = 0;
+#endif // USE_DOWNLOAD_MANAGER
+}
+
+QString DownloadProxyData::fileName()
+{
+#ifdef USE_DOWNLOAD_MANAGER
+    if (m_download == 0) {
+        return QString();
+    }
+
+    return stringAttribute(m_download, DlFileName);
+#else  // USE_DOWNLOAD_MANAGER
+    return QString();
+#endif // USE_DOWNLOAD_MANAGER
+}
--- a/browsercore/appfw/Api/Managers/secureuicontroller.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/secureuicontroller.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 
 #include "secureuicontroller_p.h"
 #include "secureuicontroller.h"
+#include "webpagecontroller.h"
 
 namespace WRT {
 
@@ -187,10 +188,13 @@
  *
  * This function should be called when the final load ended.
  */
-void SecureUIController::endSecureCheck(bool)
+void SecureUIController::endSecureCheck(bool loadFinished)
 {
     //qDebug()<<"endSecureCheck Internal state = "<<d->m_internalState;
     
+    if (!loadFinished)
+        setTopLevelScheme(WebPageController::getSingleton()->currentDocUrl());
+
     /* Save the current secure state */
     determineSecureState();
 
--- a/browsercore/appfw/Api/Managers/secureuicontroller.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/secureuicontroller.h	Tue Jul 06 14:03:49 2010 +0300
@@ -76,7 +76,7 @@
 
         void setTopLevelScheme(const QUrl & url);
         void secureCheck(QWebFrame* frame, QNetworkRequest* request);
-        void endSecureCheck(bool);
+        void endSecureCheck(bool loadFinished);
         void onSslErrors(QNetworkReply*,const QList<QSslError> &);
                 
     signals:
--- a/browsercore/appfw/Api/Managers/webpagecontroller.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/webpagecontroller.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -41,6 +41,10 @@
 #include <QDir>
 #include <QtGui>
 #include <QCoreApplication>
+#include <QWebSecurityOrigin>
+#include <QWebDatabase>
+#include <QWebSettings>
+#include <QtCore/QSettings>
 using namespace WRT;
 
 #if defined(Q_OS_SYMBIAN) // for shareToMail
@@ -143,9 +147,12 @@
     m_networkError (false),
     m_networkErrorMsg("No network error"),           
     m_networkErrorUrl("No Url"),
+    m_promptMsg("No message"),           
+    m_promptReserved(""),
     m_memoryHandler(new LowMemoryHandler(this)),
     d(new WebPageControllerPrivate(this)),
-    m_settingsLoaded(0)
+    m_settingsLoaded(0),
+    m_bErrorUrlMatches(false)
 {
     // Register a new MetaType WebPageData. It is needed to serialize history (starage)
     qRegisterMetaTypeStreamOperators<WebPageData> ("WebPageData");
@@ -158,7 +165,9 @@
     connect( d->m_actionBack, SIGNAL( triggered() ), this, SLOT( currentBack() ) );
     connect( d->m_actionForward, SIGNAL( triggered() ), this, SLOT( currentForward() ) );
 
+    connect( m_memoryHandler, SIGNAL( lowMemory() ), this, SIGNAL( lowMemory() ) );
     connect( m_memoryHandler, SIGNAL( lowMemory() ), this, SLOT( handleLowMemory() ) );
+    connect( m_memoryHandler, SIGNAL( outOfMemory() ), this, SIGNAL( outOfMemory() ) );
     connect( m_memoryHandler, SIGNAL( outOfMemory() ), this, SLOT( handleOutOfMemory() ) );
     m_memoryHandler->start();
 
@@ -197,7 +206,7 @@
 
         Q_ASSERT( page );
         page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, (bool) BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsInt("DeveloperExtras"));
-
+        connect( page, SIGNAL( loadFinished(bool) ), SLOT( onLoadFinishedForBackgroundWindow(bool) ) );
 
         // emit signal indicating that new page is being created
         emit creatingPage( page );
@@ -274,57 +283,59 @@
  */
 void WebPageController::closePage ( WRT::WrtBrowserContainer *page )
 {
-    WRT::WrtBrowserContainer * theCurrentPage = currentPage();
-    bool updateCurrentPageIndex = false;
+    if(pageCount() > 1) {
+        WRT::WrtBrowserContainer * theCurrentPage = currentPage();
+        bool updateCurrentPageIndex = false;
 
-    // get index of page we want to remove
-    int closeIndex = d->m_allPages.indexOf(page);
-    if(closeIndex < 0)
-        return;
+        // get index of page we want to remove
+        int closeIndex = d->m_allPages.indexOf(page);
+        if(closeIndex < 0)
+            return;
     
-    // was this page the "current page?"
-    // if so, we need to select the page to become the new one
-    // select the previous page unless at the beginning, then select next
-    if(page == theCurrentPage) {
-        int newCurrIndex = closeIndex - 1;
-        if(closeIndex == 0 ) {
-            newCurrIndex = closeIndex + 1;
-        }
+        // was this page the "current page?"
+        // if so, we need to select the page to become the new one
+        // select the previous page unless at the beginning, then select next
+        if(page == theCurrentPage) {
+            int newCurrIndex = closeIndex - 1;
+            if(closeIndex == 0 ) {
+                newCurrIndex = closeIndex + 1;
+            }
         
-        // change the current page
-        if(newCurrIndex >= 0) {
-            theCurrentPage = d->m_allPages.at(newCurrIndex);
-            setCurrentPage(theCurrentPage);
-            updateCurrentPageIndex = true;
+            // change the current page
+            if(newCurrIndex >= 0) {
+                theCurrentPage = d->m_allPages.at(newCurrIndex);
+                setCurrentPage(theCurrentPage);
+                updateCurrentPageIndex = true;
+            }
+            else {
+                d->m_currentPage = -1;
+                emit pageChanged(page, NULL);
+            }
         }
         else {
-            d->m_currentPage = -1;
-            emit pageChanged(page, NULL);
+             /* Adjust m_currentPage if the index of the page deleted is less than 
+             * current page 
+             */
+           if (closeIndex < d->m_currentPage ) 
+               updateCurrentPageIndex = true;
         }
-    }
-    else {
-        /* Adjust m_currentPage if the index of the page deleted is less than 
-         * current page 
-         */
-       if (closeIndex < d->m_currentPage ) 
-           updateCurrentPageIndex = true;
-    }
+
+        // actually delete the page from the list
+        d->m_allPages.removeAt(closeIndex);
 
-    // actually delete the page from the list
-    d->m_allPages.removeAt(closeIndex);
+        // update the current page index if necessary
+        // (this will just update the index now that we've removed the page from the list)
+        if(updateCurrentPageIndex) {
+            int index = d->m_allPages.indexOf(theCurrentPage);
+            if(index >= 0)
+                d->m_currentPage = index;
+        }
 
-    // update the current page index if necessary
-    // (this will just update the index now that we've removed the page from the list)
-    if(updateCurrentPageIndex) {
-        int index = d->m_allPages.indexOf(theCurrentPage);
-        if(index >= 0)
-            d->m_currentPage = index;
+        // and emit sig that it was done
+        emit pageDeleted(page);
+
+        delete page;
     }
-
-    // and emit sig that it was done
-    emit pageDeleted(page);
-
-    delete page;
 }
 
 /*!
@@ -358,7 +369,7 @@
         disconnect(oldPage->networkAccessManager(), 0, this, 0);
         disconnect(oldPage->loadController(), 0, this, 0);
         connect(oldPage, SIGNAL(createNewWindow(WrtBrowserContainer*)), this, SLOT(createWindow(WrtBrowserContainer*)));
-
+        connect(oldPage, SIGNAL(loadFinished(bool)), SLOT(onLoadFinishedForBackgroundWindow(bool)));
     }
     // aggregate "current page" signalling from this page to PageMgr clients
     connect(page, SIGNAL(secureStateChange(int)), this, SLOT(secureStateChange(int)));
@@ -367,6 +378,9 @@
     connect( page->mainFrame(), SIGNAL(initialLayoutCompleted() ), SIGNAL( initialLayoutCompleted() ) );
     connect( page, SIGNAL( loadProgress(int) ), SIGNAL( loadProgress(int) ) );
     connect( page, SIGNAL( loadFinished(bool) ), SLOT( onLoadFinished(bool) ) );
+    
+    connect( page, SIGNAL( databaseQuotaExceeded (QWebFrame *,QString) ), SLOT( onDatabaseQuotaExceeded (QWebFrame *,QString)) );  
+    
     connect( page->mainFrame(), SIGNAL( iconChanged() ), SIGNAL( pageIconChanged() ) );
     connect( page->loadController(), SIGNAL( pageLoadStarted() ), SIGNAL( pageLoadStarted() ) );
     connect( page->loadController(), SIGNAL( pageLoadFailed() ), SIGNAL( pageLoadFailed() ) );
@@ -416,6 +430,37 @@
     }
 }
 
+
+void WebPageController::onDatabaseQuotaExceeded (QWebFrame *frame, QString database)  
+{
+	QString  dbdir = QWebSettings::offlineStoragePath ();	
+  QDir dir(dbdir);
+  
+  if(!dir.exists()||(dir.count() <= 1)) // empty DB
+  	return;
+	
+		
+	if(frame)
+	{
+		QWebSecurityOrigin qwso = frame->securityOrigin();
+		qint64 quota = qwso.databaseQuota() ;
+		qint64 usage = qwso.databaseUsage() ;		
+	}
+	m_promptMsg = "Database Quota Error";
+	emit databaseQuotaExceeded (frame, database);
+	
+	return;
+}
+
+void WebPageController::onLoadFinishedForBackgroundWindow(bool ok)
+{
+    if (!ok)
+        return;
+    WRT::WrtBrowserContainer* page = qobject_cast<WRT::WrtBrowserContainer*> (sender());
+    if (page)
+        page->setUpdateThumbnail(true);
+}
+
 void WebPageController::updateHistory()
 {
     BookmarksManager::getSingleton()->addHistory(currentDocUrl(), currentDocTitle());
@@ -441,11 +486,14 @@
 void WebPageController::processNetworkErrorUrl(const QUrl & url )
     {
     QString errorUrl = url.toString();
-    QString currentUrl = currentDocUrl(); 
+    QString requestedUrl = currentRequestedUrl(); 
     m_networkErrorUrl = url.toString(); 
-// TODO: may not necessary 
-// Here we should be able to do various handling of the error url, such 
-// as comparing with QWebPage URL, ... etc 
+    
+    // Check if requestedUrl matches the URL from the network error
+    // This is to resolve the problems when error popups occur when they shouldn't
+    // especially during download.
+    int matches = m_networkErrorUrl.compare(requestedUrl);
+    if (matches == 0) m_bErrorUrlMatches = true;
     }
 
 //void QWEBKIT_EXPORT qt_drt_garbageCollector_collect();
@@ -778,6 +826,9 @@
 {
     updateActions(true);
     
+    // Reset to false for new page
+    m_bErrorUrlMatches = false;
+    
     // This is needed for loading a restored window (otherwise url bar is empty)
     currentPage()->loadController()->setUrlText(currentPage()->history()->currentItem().url().toString());
 }
@@ -797,7 +848,7 @@
 {
     d->m_actionReload->setEnabled(!pageIsLoading);
     d->m_actionStop->setEnabled(pageIsLoading);
-
+    
     WRT::WrtBrowserContainer* activePage = currentPage();    
 
     if(activePage) {
@@ -891,9 +942,10 @@
 
 void WebPageController::loadLocalFile()
 	{
-    QString chromeBaseDir = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("ChromeBaseDirectory");
+    QString chromeBaseDir = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("LocalPagesBaseDirectory");
     QString startPage = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("StartPage");
     QString startPagePath = chromeBaseDir + startPage;
+
     currentLoad(startPagePath);
 	}
 
@@ -1271,6 +1323,37 @@
     }
 }
 
+
+bool WebPageController::removeDirectory(QDir &aDir)
+{
+		bool has_err = false;
+		if (aDir.exists())
+		{
+				QFileInfoList entries = aDir.entryInfoList(QDir::NoDotAndDotDot | 
+				QDir::Dirs | QDir::Files);
+				int count = entries.size();
+				for (int idx = 0; ((idx < count) && (0 == has_err)); idx++)
+				{
+						QFileInfo entryInfo = entries[idx];
+						QString path = entryInfo.absoluteFilePath();
+						if (entryInfo.isDir())
+						{
+							QDir dir(path);
+							has_err = removeDirectory(dir);
+						}
+						else
+						{
+							QFile file(path);
+							if (!file.remove())
+							has_err = true;
+						}
+				}
+				if (!aDir.rmdir(aDir.absolutePath()))
+					has_err = true;
+		}
+		return(has_err);
+}
+
 void WebPageController::clearHistoryInMemory()
 {
     WRT::WrtBrowserContainer * activePage = currentPage();
@@ -1324,6 +1407,30 @@
 
 void WebPageController::deleteCache()
 {
+	  
+    QWebDatabase::removeAllDatabases();
+    
+    QString  str1 = QWebSettings::offlineStoragePath ();
+    QString  str2 = QWebSettings::offlineWebApplicationCachePath ();
+    QWebSettings * globalSettings = QWebSettings::globalSettings();
+    QString  LocalStoragePath = globalSettings->localStoragePath();
+    	
+    /*QString deleteFlag = d->m_historyDir + QLatin1String("/deleteOfflineStorage");
+    QFile deleteFileFlag(deleteFlag);
+    if(deleteFileFlag.open(QIODevice::WriteOnly)) { // create indicator that marks offline storage for deletion while next browser startup
+         deleteFileFlag.close();
+    }*/
+    
+    QDir LocalStorage(LocalStoragePath);  	
+    removeDirectory(LocalStorage); 
+    
+    QString applicationCacheFile = d->m_historyDir + QLatin1String("/ApplicationCache.db");  
+    QFile file(applicationCacheFile);
+    if(file.open(QIODevice::ReadOnly)) {
+         file.remove(); // may fail if file in usage; will be deleted in next browser startup
+         file.close();
+    }
+    
 	  if ( !BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->value("DiskCacheEnabled").toBool() ) 
 			return;
 		
@@ -1377,7 +1484,6 @@
     
 }
 
-
 void WebPageController::urlChanged(const QUrl& url)
 {
     //private slot
@@ -1385,7 +1491,6 @@
     emit partialUrlChanged(urlString);    
 }
 
-
 QString WebPageController::partialUrl(const QUrl& url)
 {
 
@@ -1420,31 +1525,31 @@
     bool needRestore =  false;
 
     for (int i = 0; i < allPages()->count(); i++) {
-         WRT::WrtBrowserContainer* page = allPages()->at(i);
-         QWebHistoryItem item = page->history()->currentItem();
-
-         WebPageData data = item.userData().value<WebPageData>();
+        WRT::WrtBrowserContainer* page = allPages()->at(i);
+        QWebHistoryItem item = page->history()->currentItem();
+        WebPageData data = item.userData().value<WebPageData>();
 
         // If not still a blank window, check whether we need to update the img
         if (!page->emptyWindow() ){
             QImage img = data.m_thumbnail;
-    
-             bool isSameMode = ( (img.size().width() > img.size().height()) == (currSize.width() > currSize.height()) );
-             if (img.isNull() || !isSameMode) {
-         
-                 qDebug() << "need new thumbnail!!!" << img.size() << ":" << currSize;
-                 needRestore = true;
-                 view->setPage(page);
-                 page->setWebWidget(view);
-                 QCoreApplication::sendEvent(view, new WebPageControllerUpdateViewPortEvent());
-                 page->savePageDataToHistoryItem(page->mainFrame(), &item);
-             }
+            bool isSameMode = ( (img.size().width() > img.size().height()) == (currSize.width() > currSize.height()) );
+            if (img.isNull() || !isSameMode) {
+                needRestore = true;
+                view->setPage(page);
+                page->setWebWidget(view);
+                QCoreApplication::sendEvent(view, new WebPageControllerUpdateViewPortEvent());
+                page->savePageDataToHistoryItem(page->mainFrame(), &item);
+                page->setUpdateThumbnail(false);
+            }
+            if (page->needUpdateThumbnail()) {
+                page->savePageDataToHistoryItem(page->mainFrame(), &item);
+                page->setUpdateThumbnail(false);
+            }
          }
     }
 
     // restore
-    if (needRestore)
-    {    
+    if (needRestore) {    
         view->setPage(savedPage);
         savedPage->setWebWidget(view);
     }
@@ -1452,14 +1557,11 @@
 
 void WebPageController::updatePageThumbnails()
 {
-    // update current page's thumbnail forcely
+    // update current page's thumbnail forcely since the scrolling position may change
     WRT::WrtBrowserContainer *page = currentPage();
     QWebHistoryItem item = page->history()->currentItem();
-
     page->savePageDataToHistoryItem(page->mainFrame(), &item);
-
-    WebPageData data = item.userData().value<WebPageData>();
-
+    page->setUpdateThumbnail(false);
     checkAndUpdatePageThumbnails();
 }
 
@@ -1521,6 +1623,18 @@
     return m_networkErrorUrl; 
 }
 
+bool WebPageController::errorUrlMatches() {
+  return m_bErrorUrlMatches;
+}
+
+QString WebPageController::promptMsg() {
+    return m_promptMsg; 
+}
+
+QString WebPageController::promptReserved() {
+    return m_promptReserved; 
+} 
+
 /*!
   \fn void WebPageController::pageCreated(WrtPage* newPage);
   emitted when a page is created
--- a/browsercore/appfw/Api/Managers/webpagecontroller.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Managers/webpagecontroller.h	Tue Jul 06 14:03:49 2010 +0300
@@ -32,6 +32,7 @@
 #include "browserpagefactory.h"
 #include "BWFGlobal.h"
 #include "messageboxproxy.h"
+#include <QDir>
 
 class QGraphicsWebView;
 class LowMemoryHandler;
@@ -113,6 +114,9 @@
     bool loadCanceled();
     Q_PROPERTY(bool loadCanceled READ loadCanceled)
 
+    bool errorUrlMatches();
+    Q_PROPERTY(bool errorUrlMatches READ errorUrlMatches)
+    
     bool networkError();
     Q_PROPERTY(bool networkError READ networkError)
 
@@ -121,6 +125,12 @@
 
     QString networkErrorUrl();
     Q_PROPERTY(QString networkErrorUrl READ networkErrorUrl)
+    
+    QString promptMsg();
+    Q_PROPERTY(QString promptMsg READ promptMsg)
+
+    QString promptReserved();
+    Q_PROPERTY(QString promptReserved READ promptReserved)
 
     WRT::WrtBrowserContainer* openPage();
     WRT::WrtBrowserContainer* openPageFromHistory(int index);
@@ -151,6 +161,8 @@
     void updatePageThumbnails();
     void resizeAndUpdatePageThumbnails(QSize& s);
     QString partialUrl(const QUrl &url);
+    bool removeDirectory(QDir &aDir);
+    
 
 private:
     void checkAndUpdatePageThumbnails();
@@ -221,6 +233,8 @@
     void handleOutOfMemory();
 
     void onLoadFinished(bool);
+    void onDatabaseQuotaExceeded (QWebFrame *,QString);  
+    void onLoadFinishedForBackgroundWindow(bool);
 signals:
     void creatingPage( WRT::WrtBrowserContainer* newPage);
     void pageCreated( WRT::WrtBrowserContainer* newPage);
@@ -232,6 +246,7 @@
     void initialLayoutCompleted();
     void loadProgress( const int progress );
     void loadFinished( const bool ok );
+    void databaseQuotaExceeded (QWebFrame *,QString);  
 
     void currentPageIconChanged();
     void currentPageUrlChanged( const QUrl & url);
@@ -261,12 +276,19 @@
 	
 	  // Signal for network status 
     void networkErrorHappened(const QString & msg );
+    
+    // Signals for low and out of memory
+    void lowMemory();
+    void outOfMemory();
  
 private:
 
     bool m_networkError; 
     QString m_networkErrorMsg;
     QString m_networkErrorUrl;  
+    bool m_bErrorUrlMatches;
+    QString m_promptMsg;
+    QString m_promptReserved;  
     LowMemoryHandler *m_memoryHandler;
     WebPageControllerPrivate * const d;
     int m_settingsLoaded;
--- a/browsercore/appfw/Api/Views/WindowView.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Api/Views/WindowView.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -5,14 +5,14 @@
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, version 2.1 of the License.
-* 
+*
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not, 
+* along with this program.  If not,
 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
 *
 * Description:
@@ -238,7 +238,7 @@
         {
             QString pagetitle(d->m_pageList->at(centerIndex)->mainFrame()->title());
             if(pagetitle.isEmpty())
-                title += qtTrId("txt_browser_windows_blank");
+                title += qtTrId("txt_browser_windows_new_window");
             else
                 title += pagetitle;
         }
@@ -375,7 +375,7 @@
     connect(d->m_actionDelWindow, SIGNAL(triggered()), this, SLOT(delPage()));
 }
 
-void WindowView::setMode(Mode m) 
+void WindowView::setMode(Mode m)
 {
     d->m_mode = m;
 }
@@ -437,7 +437,7 @@
          QWebHistoryItem item = window->history()->currentItem();
          WebPageData data = item.userData().value<WebPageData>();
          QImage img = data.m_thumbnail;
-         
+
          QSize size = window->webWidget()->size().toSize();
          QSize imgSize = img.size();
          float ratio = (float)size.width() / (float)size.height();
@@ -446,7 +446,7 @@
              size.scale(imgSize, Qt::KeepAspectRatio);
              img = img.copy(0, 0, size.width(), size.height());
          }
-         
+
          d->m_flowInterface->addSlide(img, title);
      }
      setCenterIndex(d->m_pageManager->currentPage());
@@ -583,7 +583,7 @@
 {
     Q_ASSERT(d->m_flowInterface);
 
-    //qDebug() << "WindowView::addPage: COUNT "<< d->m_newPages.count(); 
+    //qDebug() << "WindowView::addPage: COUNT "<< d->m_newPages.count();
     if (d->m_flowInterface->slideAnimationOngoing() || (d->m_mode ==  WindowViewModeNormal && d->m_state == WindowViewAddPage))
         return;
 
@@ -598,9 +598,9 @@
              title = pg->mainFrame()->title();
          else  if (!pg->mainFrame()->url().isEmpty() )
              title = d->m_pageManager->partialUrl(pg->mainFrame()->url());
-         else 
+         else
              title = d->m_pageManager->partialUrl(pg->mainFrame()->requestedUrl());
-             
+
          //qDebug() << "WindowView::addPage - Title " << pg->mainFrame()->title() << "Url : "<<  pg->mainFrame()->url().toString()<< "Requested Url : " << pg->mainFrame()->requestedUrl().toString()  ;
     }
 
@@ -615,12 +615,12 @@
     /* Adding a new page is completed when the index reaches the newly added index*/
     Q_ASSERT(d->m_state == WindowViewAddPage);
 
-    
-    //qDebug() << " WindowView::addPageCplt: index " << index << "add new page" << d->m_newPages.count(); 
+
+    //qDebug() << " WindowView::addPageCplt: index " << index << "add new page" << d->m_newPages.count();
     /* If new pages were added, show them before transitioning back to content view */
     if (d->m_newPages.count() ) {
 
-        //qDebug() << " WindowView::addPageCplt: index " << index << "add new page" << d->m_newPages.count(); 
+        //qDebug() << " WindowView::addPageCplt: index " << index << "add new page" << d->m_newPages.count();
         QTimer::singleShot(WINDOWVIEW_TIME_TO_ADD_NEXTPAGE, this, SLOT(addNextPage()));
 
     }
@@ -637,7 +637,7 @@
 
 void WindowView::addNextPage()
 {
-    //qDebug() << " WindowView::addNextPage " << d->m_newPages.count() << "Added Page " << d->m_newPages.at(0); 
+    //qDebug() << " WindowView::addNextPage " << d->m_newPages.count() << "Added Page " << d->m_newPages.at(0);
     addPage(d->m_newPages.takeFirst());
 }
 
@@ -663,7 +663,7 @@
     disconnect(d->m_flowInterface, SIGNAL(endAnimationCplt()), this, SLOT(addPageCplt()));
     d->m_state = WindowViewActive;
     updateActions();
-    
+
     if (d->m_mode ==  WindowViewModeTransition ) {
         emit newWindowTransitionComplete();
     }
--- a/browsercore/appfw/Common/FilmstripFlow.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/appfw/Common/FilmstripFlow.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -1651,7 +1651,9 @@
         return;
 
     if(event->pos().x() > ( (size().width() - d->m_centerWindowSize.width())/ 2) &&
-       event->pos().x() < ( (size().width() + d->m_centerWindowSize.width())/ 2) )
+       event->pos().x() < ( (size().width() + d->m_centerWindowSize.width())/ 2) &&
+       event->pos().y() > d->m_centerTopSpace &&
+       event->pos().y() < d->m_centerTopSpace + d->m_centerWindowSize.height())
     {
         emit ok(d->m_centerIndex);
     }
--- a/browsercore/core/ZoomMetaData.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/ZoomMetaData.h	Tue Jul 06 14:03:49 2010 +0300
@@ -22,6 +22,11 @@
 #ifndef __ZOOMMETADATA_H__
 #define __ZOOMMETADATA_H__
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+#include <QRectF>
+#include <QString>
+#endif
+
 // To store the view port proeperties that affect zoom set through meta data. 
 // This is available in the main frame of the page but to avoid parsing the meta
 // data again, store it
@@ -39,6 +44,14 @@
    qreal minScale;
    qreal maxScale;
    bool userScalable;
-
+#ifdef BEDROCK_TILED_BACKING_STORE
+   qreal initialScale;
+   QRectF rect;
+   QRectF webViewSize;
+   qreal scale;
+   QSizeF viewportSize;
+   QString m_specifiedWidth;
+   QString m_specifiedHeight;
+#endif
 };
 #endif  //__ZOOMMETADATA_H__
--- a/browsercore/core/core.pro	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/core.pro	Tue Jul 06 14:03:49 2010 +0300
@@ -127,6 +127,11 @@
     unix : contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
 }
 
+contains(br_tiled_backing_store, yes) {
+    DEFINES += BEDROCK_TILED_BACKING_STORE
+}
+
+
 CONFIG -= warn_on
 *-g++* : QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing
 
--- a/browsercore/core/network/WebNetworkConnectionManager.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/network/WebNetworkConnectionManager.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -27,7 +27,7 @@
     Constructs a WebNetworkConfigurationManager with the given \a parent.
 */
 WebNetworkConnectionManager::WebNetworkConnectionManager(QObject *parent)
-    : QObject(parent), m_WebNetworkSession(0)
+    : QObject(parent), m_WebNetworkSession(0), m_offlined(false)
 { 
     // set up handlers for Network Configuration Manager signals
     connect(&m_NetworkConfigurationManager, SIGNAL(updateCompleted()), 
@@ -117,8 +117,6 @@
     // set up handlers for the WebNetworkSession signals
     connect(m_WebNetworkSession, SIGNAL(sessionConfigurationChanged(const QNetworkConfiguration &)),
             this, SLOT(handleSessionConfigurationChanged(const QNetworkConfiguration &)));
-    connect(m_WebNetworkSession, SIGNAL(sessionStateChanged(const QNetworkConfiguration &, QNetworkSession::State)),
-            this, SLOT(handleSessionStateChanged(const QNetworkConfiguration &, QNetworkSession::State))); 
 }
 
 /*! 
@@ -128,6 +126,7 @@
 void WebNetworkConnectionManager::deleteSession(void)
 {   
     delete m_WebNetworkSession;
+    m_WebNetworkSession = 0;
 }
 
 /*!
@@ -164,17 +163,21 @@
 }
 
 /*! 
-    Handle the conlineStateChanged signal from Network Configuration Manager.
+    Handle the onlineStateChanged signal from Network Configuration Manager.
 */
 void WebNetworkConnectionManager::handleOnlineStateChanged(bool isOnline)
 {
+    emit networkOnlineStateChanged(isOnline);
+    
     if (!isOnline)
     {
         qDebug() << "offline";
+        m_offlined = true;
     }
     else
     {
         qDebug() << "online";
+        m_offlined = false;
     }
     // flash icon to indicate the online state change with "online" and "offline".
 }
@@ -184,8 +187,48 @@
 */
 void WebNetworkConnectionManager::handleConfigurationChanged(const QNetworkConfiguration &config)
 {
-    qDebug() << "Configuration" << config.name() << "Changed";  
-}
+    qDebug() << "Configuration" << config.name() << "Changed";
+    qDebug() << "bearername:" << config.bearerName() << "type:" << config.type() << "state:" << config.state() << "purpose:" << config.purpose();
+    
+    /* The QNetworkSession is closed becuase of previous offline condition. Re-open the session if 
+       the configuration matches the configurations hold by the QNetworkSession */
+#ifdef NO_OFFLINED_BUG
+    if (isOfflined())
+    {
+#endif // NO_OFFLINED_BUG
+        if (m_WebNetworkSession && !m_WebNetworkSession->isOpen())
+        {
+            QNetworkConfiguration sessionConfig = m_WebNetworkSession->configuration();
+            QList<QNetworkConfiguration> children = sessionConfig.children();
+        	  switch(sessionConfig.type())
+            {
+                case QNetworkConfiguration::ServiceNetwork:        
+                    /* Traverse all configuration to find the matching configuration */
+                    foreach(QNetworkConfiguration tmpConfig, children)
+                    {
+        	              if (config == tmpConfig)
+        	              {
+        	              	  if ((config.state() == QNetworkConfiguration::Discovered) ||
+        	              	  	   (config.state() == QNetworkConfiguration::Active))
+        	                      m_WebNetworkSession->open();
+            	              break;
+            	          }
+            	      }
+                    break;  
+               case QNetworkConfiguration::InternetAccessPoint:
+        	          qDebug() << "InternetAccessPoint";
+                    break;
+               case QNetworkConfiguration::UserChoice:
+        	          qDebug() << "UserChoice";
+        	          break;
+               default:
+        	         break;
+            } 	  
+        }
+#ifdef NO_OFFLINED_BUG
+    }
+#endif // NO_OFFLINED_BUG
+} 
 
 /*! 
     Handle the networkNameChanged signal from Network Configuration Manager and translate 
@@ -195,75 +238,13 @@
 */
 void WebNetworkConnectionManager::handleSessionConfigurationChanged(const QNetworkConfiguration &config)
 {  
-    qDebug() << "handleSessionConfigurationChanged" << "bearname:" << config.bearerName();
+    qDebug() << "handleSessionConfigurationChanged" << "bearername:" << config.bearerName();
 
 #ifdef QT_MOBILITY_SYSINFO  
     QSystemNetworkInfo::NetworkMode mode;
     mode = m_mapStringNetworkMode[config.bearerName()];
-    switch(mode)
-    {
-    	  case QSystemNetworkInfo::EthernetMode:
-    	  case QSystemNetworkInfo::WlanMode:
-    	  case QSystemNetworkInfo::BluetoothMode:
-    	  case QSystemNetworkInfo::WimaxMode:
-            emit networkNameChanged(mode, config.name());
-            break;
-        case QSystemNetworkInfo::GsmMode:
-        case QSystemNetworkInfo::CdmaMode:
-        case QSystemNetworkInfo::WcdmaMode:
-        	  break;
-        case QSystemNetworkInfo::UnknownMode:
-        default:
-        	  emit networkNameChanged(mode, config.name());
-        	  break;
-    }
-#endif // QT_MOBILITY_SYSINFO
-}
 
-/*! 
-    Handle the networkSignalStrengthChanged from Network Configuration Manager and
-    translate sessionStateChanged to networkSignalStrengthChanged.
-    
-    It a\ emits networkSignalStrengthChanged for non cellular network connection.
-*/
-void WebNetworkConnectionManager::handleSessionStateChanged(const QNetworkConfiguration &config, 
-	       QNetworkSession::State state)
-{
-	  int strength = 0;
-	  
-	  qDebug() << "handleSessionStateChanged" << "bearname:" << config.bearerName();
-	  
-	  switch(state)
-	  {
-	      case QNetworkSession::Connecting:
-	      case QNetworkSession::Connected:
-	      case QNetworkSession::Roaming:
-	      	  strength = 100;
-	      	  break;
-	      default:
-	       	  break;
-	  }
-
-#ifdef QT_MOBILITY_SYSINFO
-    QSystemNetworkInfo::NetworkMode mode;
-	  mode = m_mapStringNetworkMode[config.bearerName()];
-    switch(mode)
-    {
-    	  case QSystemNetworkInfo::EthernetMode:
-    	  case QSystemNetworkInfo::WlanMode:
-        case QSystemNetworkInfo::BluetoothMode:
-    	  case QSystemNetworkInfo::WimaxMode:
-    	  	  emit networkSignalStrengthChanged(mode, strength);
-            break;
-        case QSystemNetworkInfo::GsmMode:
-        case QSystemNetworkInfo::CdmaMode:
-        case QSystemNetworkInfo::WcdmaMode:
-        	  break;
-        case QSystemNetworkInfo::UnknownMode:
-        default:
-        	  emit networkSignalStrengthChanged(mode, strength);
-        	  break;
-    }
+    emit networkSessionNameChanged(mode, config.name());
 #endif // QT_MOBILITY_SYSINFO
 }
 
@@ -283,3 +264,4 @@
 #endif // QT_MOBILITY_SYSINFO
 
 } // WRT
+
--- a/browsercore/core/network/WebNetworkConnectionManager.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/network/WebNetworkConnectionManager.h	Tue Jul 06 14:03:49 2010 +0300
@@ -30,10 +30,10 @@
 
 QTM_USE_NAMESPACE
 
+namespace WRT {
+	
 class WebNetworkSession;
 
-namespace WRT {
-
 class WRT_BROWSER_EXPORT WebNetworkConnectionManager : public QObject
 {
     Q_OBJECT
@@ -46,23 +46,21 @@
     QNetworkConfiguration defaultConfiguration() const;
     void createSession(QNetworkConfiguration config);
     void deleteSession();
+    bool isOfflined() const { return m_offlined; }
 
 #ifdef QT_MOBILITY_SYSINFO
 Q_SIGNALS:
-	  void networkModeChanged(QSystemNetworkInfo::NetworkMode mode);
-	  void networkNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString &netName);
-	  void networkSignalStrengthChanged(QSystemNetworkInfo::NetworkMode mode, int strength);
+	  void networkOnlineStateChanged(bool isOnline);
+	  void networkSessionNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString &netName);
 #endif // QT_MOBILITY_SYSINFO
 
-private Q_SLOTS:
-    void handleConfigurationUpdateCompleted();
-    void handleConfigurationAdded(const QNetworkConfiguration& config);
-    void handleConfigurationRemoved(const QNetworkConfiguration& config);
-    void handleOnlineStateChanged(bool isOnline);
-    void handleConfigurationChanged(const QNetworkConfiguration& config);
-    void handleSessionConfigurationChanged(const QNetworkConfiguration &config);
-    void handleSessionStateChanged(const QNetworkConfiguration &config, 
-	  	       QNetworkSession::State state);
+protected Q_SLOTS:
+    virtual void handleConfigurationUpdateCompleted();
+    virtual void handleConfigurationAdded(const QNetworkConfiguration& config);
+    virtual void handleConfigurationRemoved(const QNetworkConfiguration& config);
+    virtual void handleOnlineStateChanged(bool isOnline);
+    virtual void handleConfigurationChanged(const QNetworkConfiguration& config);
+    virtual void handleSessionConfigurationChanged(const QNetworkConfiguration &config);
        
 private:
 #ifdef QT_MOBILITY_SYSINFO
@@ -73,7 +71,8 @@
 
     QNetworkConfigurationManager m_NetworkConfigurationManager;
     WebNetworkSession *m_WebNetworkSession;
+    bool m_offlined;
 };
 
-}
+} // namesspace WRT
 #endif /* WEBNETWORKCONNECTIONMANAGER_H_ */
--- a/browsercore/core/network/WebNetworkSession.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/network/WebNetworkSession.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -21,6 +21,8 @@
 
 #include "WebNetworkSession.h"
 
+namespace WRT {
+	
 /*!
     Constructs a Web Network Session based on \a QNetworkConfiguration with the given \a parent.
 
@@ -110,11 +112,16 @@
         // flash the old connection network
         qDebug() << "Reject new Network Connection";
     }
-    emit sessionConfigurationChanged(m_NetworkSession->configuration()); 
+
+    emit sessionConfigurationChanged(activeConfiguration()); 
 }
 
 /*! 
-    Handle the stateChanged signal from Network Session.
+    Handle the stateChanged signal from Network Session. If the session is based on a single
+    access point configuration, the state of the session is the same state of the associated
+    network interface. A QNetworkConfiguration::ServiceNetwork based session summarizes the 
+    state of all its children and therefore returns the Connected state if at least one of its 
+    sub configurations is connected.
     
     It emits networkSignalStrengthChanged signal with current QNetworkConfiguraiton 
     and QNetworkSession::State.
@@ -157,7 +164,7 @@
 void WebNetworkSession::handleOpened()
 {   
     qDebug() << "Session Opened";
-   
+
     emit sessionConfigurationChanged(activeConfiguration());
 }
 
@@ -233,4 +240,6 @@
     }
     
     return activeConfig;
-}
\ No newline at end of file
+}
+
+} // namespace WRT
\ No newline at end of file
--- a/browsercore/core/network/WebNetworkSession.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/network/WebNetworkSession.h	Tue Jul 06 14:03:49 2010 +0300
@@ -21,30 +21,36 @@
 
 #ifndef WEBNETWORKSESSION_H_
 #define WEBNETWORKSESSION_H_
+#include "brtglobal.h"
 #include <qnetworksession.h>
 
 QTM_USE_NAMESPACE
 
-class WebNetworkSession : public QObject
+namespace WRT {
+
+class WRT_BROWSER_EXPORT WebNetworkSession : public QObject
 {
 Q_OBJECT
     
 public: 
     WebNetworkSession(const QNetworkConfiguration &config, QObject *parent = 0);
     virtual ~WebNetworkSession();
-
+    QNetworkConfiguration configuration() const { return m_NetworkSession->configuration(); }
+    bool isOpen() const { return m_NetworkSession->isOpen(); }
+    void open() { m_NetworkSession->open(); }
+    
 Q_SIGNALS:
 	  void sessionConfigurationChanged(const QNetworkConfiguration &config);
 	  void sessionStateChanged(const QNetworkConfiguration &config, 
 	  	       QNetworkSession::State state);
         
-private Q_SLOTS:
-    void handlePreferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless);
-    void handleNewConfigurationActivated();
-    void handleStateChanged(QNetworkSession::State state);
-    void handleOpened();
-    void handleClosed();
-    void handleError(QNetworkSession::SessionError error);
+protected Q_SLOTS:
+    virtual void handlePreferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless);
+    virtual void handleNewConfigurationActivated();
+    virtual void handleStateChanged(QNetworkSession::State state);
+    virtual void handleOpened();
+    virtual void handleClosed();
+    virtual void handleError(QNetworkSession::SessionError error);
    
 private:
     QNetworkConfiguration activeConfiguration();
@@ -52,4 +58,6 @@
     QNetworkSession *m_NetworkSession;
 };
 
+} // namespace WRT
+
 #endif /* WEBNETWORKSESSION_H_ */
--- a/browsercore/core/network/webnetworkaccessmanager.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/network/webnetworkaccessmanager.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -23,7 +23,6 @@
 #include <QNetworkReply>
 #include <QAuthenticator>
 #include <QNetworkInterface>
-
 #if QT_VERSION >= 0x040500
 #include <QNetworkDiskCache>
 // #include "networkdiskcache.h"
@@ -68,8 +67,8 @@
 void WebNetworkAccessManager::onfinished(QNetworkReply* reply)
 {
     QNetworkReply::NetworkError networkError = reply->error();
-    QString replyUrl = reply->url().toString();
- 
+    QString requestUrl = reply->request().url().toString(); 
+    
     if ( networkError != QNetworkReply::OperationCanceledError && 
         networkError != QNetworkReply::NoError )
     {
@@ -85,7 +84,7 @@
 	          }	  
         }
         emit networkErrorHappened(errorMsg); 
-        emit networkErrorUrl(replyUrl);
+        emit networkErrorUrl(requestUrl);
     }
 }
 
@@ -93,7 +92,6 @@
 {
     delete m_cookieJar;
     setCache(NULL);
-    delete m_reply;
 }
 
 QNetworkReply* WebNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
@@ -115,9 +113,9 @@
 
 
     if(m_browserContainer->mainFrame()) {
-        if(m_browserContainer->mainFrame()->url().scheme().contains("https")) {
+        if(m_browserContainer->mainFrame()->url().scheme() == "https") {
 
-            if (op == QNetworkAccessManager::PostOperation && req.url().scheme().contains("http")) {
+            if (op == QNetworkAccessManager::PostOperation && req.url().scheme() == "http") {
 
                 m_text = tr("Secure Page Warning:");
                 m_informativeText = tr("Do you want to continue?");
@@ -133,6 +131,12 @@
             }
         }
     }
+    if(request.url().scheme() == "qrc")
+        { 
+            reply = new NetworkErrorReply(QNetworkReply::ProtocolUnknownError, "Unknown scheme", request.url());
+            QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
+        }
+                
     if (reply == NULL) {
 		reply = createRequestHelper(op, req, outgoingData);
     }
@@ -188,6 +192,7 @@
    QNetworkProxy proxy;
 	 
    QString proxyString = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("NetworkProxy");
+   QString portString = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("NetworkPort");
    
    if (proxyString.isEmpty())
    	{
@@ -199,7 +204,7 @@
 		{
       proxy.setType(QNetworkProxy::HttpProxy);
       proxy.setHostName(proxyString);
-      proxy.setPort(8080);
+      proxy.setPort(portString.toInt());
  		}
 
    	setProxy(proxy);
--- a/browsercore/core/wrtbrowsercontainer.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/wrtbrowsercontainer.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -59,6 +59,7 @@
 ,   m_pageFactory(0)
 ,   m_widget(0)
 ,   m_fileChooser(0)
+,   m_needUpdateThumbnail(false)
 {
     m_page = page;
 
@@ -111,6 +112,23 @@
   settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, !BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->value("PopupBlocking").toInt());
 	// Download related enable "forwardUnsupportedContent" to redirect unsupported content to download manager
 	setForwardUnsupportedContent(true);
+#ifdef BEDROCK_TILED_BACKING_STORE
+    settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, true);
+    settings()->setAttribute(QWebSettings::ZoomTextOnly, false);
+    settings()->setAttribute(QWebSettings::FrameFlatteningEnabled, true);
+
+    //Configure tiling properties
+    //This would set tile size to (256, 256) and add 25ms delay between constructing
+    //individual tiles. The settings would try to cache an area 1.5x width and 1.5x height
+    //of the current viewport (centered to the viewport) with tiles and would drop tiles
+    //after they are outside an area 2x the width and 2.5x the height of the viewport.
+    //Refer https://bugs.webkit.org/show_bug.cgi?id=39874
+
+    setProperty("_q_TiledBackingStoreTileSize", QSize(256, 256));
+    setProperty("_q_TiledBackingStoreTileCreationDelay", 25);
+    setProperty("_q_TiledBackingStoreCoverAreaMultiplier", QSizeF(1.5, 1.5));
+    setProperty("_q_TiledBackingStoreKeepAreaMultiplier", QSizeF(2., 2.5));
+#endif
 
 #ifndef NO_NETWORK_ACCESS_MANAGER	
 	setNetworkAccessManager(new WebNetworkAccessManager(this,this));
@@ -370,6 +388,19 @@
     return QWebPage::chooseFile(parentFrame, suggestedFile);
 }
 
+QString WrtBrowserContainer::userAgentForUrl(const QUrl& url) const
+{
+    QString uaString = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("UserAgentString");
+   
+    if (uaString.isEmpty())
+   	{
+   	    QUrl url;
+        return QWebPage::userAgentForUrl(url); 
+   	}
+   	else
+        return uaString;
+}
+	
 WRT::WrtBrowserContainer* WrtBrowserContainer::createWindow(
     QWebPage::WebWindowType webWindowType)
 {
--- a/browsercore/core/wrtbrowsercontainer.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/wrtbrowsercontainer.h	Tue Jul 06 14:03:49 2010 +0300
@@ -88,9 +88,14 @@
     bool restoreSession();
 
     void setFileChooser(WrtBrowserFileChooser * chooser);
+    
+    void setUpdateThumbnail(bool update) { d->m_needUpdateThumbnail = update; }
+    bool needUpdateThumbnail() { return d->m_needUpdateThumbnail; }
 
 protected:
     virtual QString chooseFile(QWebFrame * parentFrame, const QString & suggestedFile);
+    virtual QString userAgentForUrl(const QUrl& url) const;
+
 
 Q_SIGNALS:
 
--- a/browsercore/core/wrtbrowsercontainer_p.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/browsercore/core/wrtbrowsercontainer_p.h	Tue Jul 06 14:03:49 2010 +0300
@@ -49,6 +49,7 @@
         WRT::LoadController * m_loadController; //Owned
         ZoomMetaData m_zoomData;
         WrtBrowserFileChooser * m_fileChooser; // Owned
+        bool m_needUpdateThumbnail;
     };
 }
 #endif
--- a/browserui.pri	Wed Jun 23 17:59:43 2010 +0300
+++ b/browserui.pri	Tue Jul 06 14:03:49 2010 +0300
@@ -76,19 +76,20 @@
     br_download_mgr=no
     br_default_iap=no
     br_orbit_ui=no
-    br_increased_heap=no
+    br_openurl=no
+    br_tiled_backing_store=no
     
     # For now Symbian only, Windows, Maemo will use the defaults    
     symbian {
        contains (browser_addon, fivezero) {
           br_fast_allocator=yes
           br_download_mgr=yes
-          br_increased_heap=yes
           br_mobility_sysinfo=yes
           br_mobility_bearer=yes
        }
        contains (browser_addon, ninetwo) {
           br_fast_allocator=yes
+          br_download_mgr=yes
           br_mobility_sysinfo=yes
           br_mobility_bearer=yes
        }
@@ -97,6 +98,7 @@
           br_mobility_sysinfo=yes
           br_mobility_bearer=yes
           br_orbit_ui=yes
+          br_openurl=yes
        }
     }
 }
--- a/browserui.pro	Wed Jun 23 17:59:43 2010 +0300
+++ b/browserui.pro	Tue Jul 06 14:03:49 2010 +0300
@@ -2,14 +2,16 @@
 CONFIG += ordered
 
 include (browserui.pri)
-SUBDIRS += bedrockProvisioning
-SUBDIRS += browsercore
-SUBDIRS += ginebra2
+    SUBDIRS += bedrockProvisioning
+    SUBDIRS += browsercore
+    SUBDIRS += ginebra2
 # rom MUST come last because it depends on *_template.pkg files generated by qmake from all the other apps
-SUBDIRS += rom
+    SUBDIRS += rom
+
 contains( what, tests ) {
-	SUBDIRS += internal/tests/perfTracing
-	SUBDIRS += internal/tests/mw
+    exists($$PWD/internal/tests/perfTracing/perfTracing.pro): SUBDIRS += internal/tests/perfTracing/perfTracing.pro
+    exists($$PWD/internal/tests/mw/mw.pro): SUBDIRS += internal/tests/mw/mw.pro
+    exists($$PWD/internal/tests/Bookmarks_Test/Bookmarks_Test.pro): SUBDIRS += internal/tests/mw/Bookmarks_Test/Bookmarks_Test.pro
 }
 
 symbian: { 
--- a/ginebra2/ActionButton.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ActionButton.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -27,8 +27,10 @@
   ActionButton::ActionButton(ChromeSnippet * snippet, QGraphicsItem* parent)
     : NativeChromeItem(snippet, parent),
       m_internalAction(NULL),
-      m_triggerOn(QEvent::GraphicsSceneMouseRelease),
-      m_active(false)
+      m_triggerOnUp(true),
+      m_triggerOnDown(false),
+      m_active(false),
+      m_activeOnPress(true)
   {
 
 
@@ -44,15 +46,12 @@
     QIcon::Mode mode = QIcon::Normal;
 
     if (action) {
-        if (m_active || action->isChecked() ) {
-            mode = QIcon::Selected;
+        if (m_active) {
+            mode = QIcon::Active;
         }
         else if (!action->isEnabled()) {
             mode = QIcon::Disabled;
         }
-        else {
-            mode = QIcon::Active;
-        }
     }
     m_icon.paint(painter, boundingRect().toRect(), Qt::AlignCenter, mode, QIcon::On);
     painter->restore();
@@ -61,14 +60,18 @@
 
   void ActionButton::mousePressEvent( QGraphicsSceneMouseEvent * ev )
   {
+
     QAction * action = defaultAction();
-    if (action ) {
-      if (m_triggerOn == ev->type()){
+    if (action && (action->isEnabled()) ) {
+      //qDebug() << "mousePressEvent" << m_triggerOnDown <<  ev->type();
+      // If m_activeOnPress is true, set active flag to set icon state to Selected
+      if (m_activeOnPress )
+        setActive(true);
+      if (m_triggerOnDown == true) {
         if (ev->button() == Qt::LeftButton) {
-            if (action->isEnabled()){
+
               action->trigger();
               emit activated();
-            }
         }
       }
 
@@ -78,30 +81,32 @@
 
   void ActionButton::mouseReleaseEvent( QGraphicsSceneMouseEvent * ev )
   {
+
+    bool trigger = sceneBoundingRect().contains(ev->scenePos());
+
     QAction * action = defaultAction();
     //qDebug() << "ActionButton::mouseReleaseEvent " << m_snippet->elementId();
-    if (m_triggerOn == ev->type()){
+
+    if (   trigger && m_triggerOnUp == true) {
       if (ev->button() == Qt::LeftButton) {
         if (action && action->isEnabled()){
           action->trigger();
           emit activated();
+
         }
       }
     }
+    // If m_activeOnPress is true, reset active flag to set icon state to Normal
+    if (m_activeOnPress || !trigger)
+      setActive(false);
     emit mouseEvent(ev->type() );
   }
 
-  void ActionButton::contextMenuEvent( QGraphicsSceneContextMenuEvent * ev )
-  {
-    Q_UNUSED(ev)
-    emit contextMenuEvent();
-  }
-
   //Action buttons only have one action at a time, so whenever we add an action, we remove any previously set action
   //NB: The action is typically one of the available actions on a view (via ControllableView.getContext()).
   //ActionButtonSnippet provides the scriptable method connectAction() to create native connections to view actions
 
-  void ActionButton::setAction ( QAction * action, QEvent::Type triggerOn )
+  void ActionButton::setAction ( QAction * action, bool triggerOnDown,  bool triggerOnUp )
   {
     QAction * currentAction = defaultAction();
     if (currentAction == action)
@@ -112,39 +117,33 @@
     }
     addAction(action);
     connect(action, SIGNAL(changed()),this, SLOT(onActionChanged()));
-    m_triggerOn = triggerOn;
+    m_triggerOnUp = triggerOnUp;
+    m_triggerOnDown = triggerOnDown;
 
 
     // Save the action as the internal action and set its properties
     m_internalAction = action;
-    m_internalAction->setCheckable(true);
+    m_internalAction->setCheckable(false);
 
     update();
   }
 
-  void ActionButton::disconnectAction () {
-    setAction(NULL);
-  }
-
   void ActionButton::setEnabled(bool enabled)
   {
     m_internalAction->setEnabled(enabled);
   }
 
-  void ActionButton::setChecked(bool checked)
+  void ActionButton::setActiveOnPress(bool active)
   {
-    m_internalAction->setChecked(checked);
+    m_activeOnPress = active;
   }
   
   void ActionButton::setActive(bool active)
   {
-    m_active = active;
-    update();
-  }
-
-  void ActionButton::setInputEvent(QEvent::Type event)
-  {
-    m_triggerOn = event;
+    if (m_active != active ) {
+        m_active = active;
+        update();
+    }
   }
 
   //NB: handle icon on/off states too?
@@ -181,7 +180,7 @@
     QAction * action = defaultAction();
     if (action && action->isEnabled() && !action->isChecked()){
       action->setChecked(true);
-      update();
+      setActive(true);
     }
   }
 
--- a/ginebra2/ActionButton.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ActionButton.h	Tue Jul 06 14:03:49 2010 +0300
@@ -39,33 +39,32 @@
         void paint( QPainter * painter, const QStyleOptionGraphicsItem * opt, QWidget * widget );
         void addIcon( const QString & icon, QIcon::Mode mode = QIcon::Normal );
         QIcon icon() {return m_icon;}
-        void setAction ( QAction * action, QEvent::Type triggerOn = QEvent::GraphicsSceneMouseRelease );
-        void disconnectAction();
+        void setAction ( QAction * action, bool triggerOnDown = false,  bool triggerOnUp = true);
         void setEnabled(bool);
-        void setChecked(bool);
         void setActive(bool);
-        void setInputEvent(QEvent::Type event);
+        void setActiveOnPress(bool);
         QAction * defaultAction();
         bool isChecked() {return m_internalAction->isChecked();}
 
-    public slots:
+    public Q_SLOTS:
         void onActionChanged();
         void onHidden();
         void onShown();
 
-    signals:
+   Q_SIGNALS:
         void activated();
-        void contextMenuEvent();
+
     protected:
         void mousePressEvent( QGraphicsSceneMouseEvent * ev );
         void mouseReleaseEvent( QGraphicsSceneMouseEvent * ev );
-        void contextMenuEvent( QGraphicsSceneContextMenuEvent * ev );
     private:
         QAction * m_internalAction;
         QIcon m_icon;
-        QEvent::Type m_triggerOn;
+        bool m_triggerOnUp;
+        bool m_triggerOnDown;
         QIcon::Mode m_state;
         bool m_active;
+        bool m_activeOnPress;
     };
 } // end of namespace GVA
 
--- a/ginebra2/ActionButtonSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ActionButtonSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -30,14 +30,22 @@
 
   }
 
+  ActionButtonSnippet * ActionButtonSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+  {
+      ActionButtonSnippet* that = new ActionButtonSnippet(elementId, chrome, 0, element);
+      that->setChromeWidget( new ActionButton( that ) );
+      return that;
+  }
+
   QAction * ActionButtonSnippet::getDefaultAction()
   {
     return (static_cast<ActionButton*>(m_widget)->defaultAction());
   }
 
-  void ActionButtonSnippet::setDefaultAction( QAction * action, QEvent::Type triggerOn )
+  //void ActionButtonSnippet::setDefaultAction( QAction * action, QEvent::Type triggerOn )
+  void ActionButtonSnippet::setDefaultAction( QAction * action, bool triggerOnDown, bool triggerOnUp)
   {
-    static_cast<ActionButton*>(m_widget)->setAction(action,triggerOn);
+    static_cast<ActionButton*>(m_widget)->setAction(action,triggerOnDown, triggerOnUp);
   }
 
   QIcon  ActionButtonSnippet::icon( )
@@ -56,11 +64,6 @@
 
   }
 
-  void ActionButtonSnippet::setSelectedIcon( const QString & icon )
-  {
-    static_cast<ActionButton*>(m_widget)->addIcon(icon, QIcon::Selected);
-  }
-
   void ActionButtonSnippet::setActiveIcon( const QString & icon )
   {
     static_cast<ActionButton*>(m_widget)->addIcon(icon, QIcon::Active);
@@ -68,15 +71,14 @@
 
   // Scriptable method to directly connect an action button to a view action
 
-  void ActionButtonSnippet::connectAction( const QString & action, const QString & view, const QString & inputEvent )
+  void ActionButtonSnippet::connectAction( const QString & action, const QString & view, bool onDown, bool  onUp)
   {
     ControllableViewBase *viewBase = m_chrome->getView( view );
 
     if (viewBase){
       QAction * viewAction = viewBase->getAction(action);
       if (viewAction)
-        static_cast<ActionButton*>(m_widget)->setAction(viewAction,
-          (inputEvent == "Down") ? QEvent::GraphicsSceneMousePress : QEvent::GraphicsSceneMouseRelease);
+        static_cast<ActionButton*>(m_widget)->setAction(viewAction, onDown, onUp);
       return;
     }
   }
@@ -91,19 +93,14 @@
     static_cast<ActionButton*>(m_widget)->setEnabled(enabled);
   }
 
-  void ActionButtonSnippet::setLatched( bool latched )
-  {
-    static_cast<ActionButton*>(m_widget)->setChecked(latched);
-  }
-
   void ActionButtonSnippet::setActive( bool enabled )
   {
     static_cast<ActionButton*>(m_widget)->setActive(enabled);
   }
 
-  void ActionButtonSnippet::setInputEvent( const QString & inputEvent )
+  void ActionButtonSnippet::setActiveOnPress( bool active )
   {
-    static_cast<ActionButton*>(m_widget)->setInputEvent((inputEvent=="Down") ? QEvent::GraphicsSceneMousePress : QEvent::GraphicsSceneMouseRelease);
+    static_cast<ActionButton*>(m_widget)->setActiveOnPress(active);
   }
 
   void ActionButtonSnippet::updateButtonState(bool state) {
--- a/ginebra2/ActionButtonSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ActionButtonSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -29,33 +29,30 @@
 namespace GVA {
 
 
+
   class ActionButtonSnippet : public ChromeSnippet
   {
     Q_OBJECT
     public:
        ActionButtonSnippet(const QString & elementId, ChromeWidget * chrome, QGraphicsWidget * widget, const QWebElement & element);
        virtual ~ActionButtonSnippet() {;}
+       static ActionButtonSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
        QAction * getDefaultAction();
-       void setDefaultAction( QAction * action, QEvent::Type triggerOn = QEvent::GraphicsSceneMouseRelease );
+       void setDefaultAction( QAction * action, bool triggerOnDown =false, bool triggerOnUp=true);
        QIcon icon();
        bool isChecked();
        void setActive( bool active );
+       void setActiveOnPress( bool );
 
     public slots:
        void setIcon( const QString & icon );
        void setDisabledIcon( const QString & icon );
-       void setSelectedIcon( const QString & icon );
        void setActiveIcon( const QString & icon );
-       void connectAction ( const QString & action, const QString & view, const QString & inputEvent = "Up" );
+       void connectAction( const QString & action, const QString & view, bool onDown = false, bool onUp = true);
+
        void setEnabled( bool enabled );
-       void setLatched( bool latched );
-       void setInputEvent( const QString & inputEvent );
        void updateButtonState(bool state);
 
-       
-    signals:
-       void activated();
-       void contextMenuEvent();
   };
 }
 
--- a/ginebra2/BookmarksToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/BookmarksToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,6 +22,7 @@
  */
 
 #include "BookmarksToolbarSnippet.h"
+#include "ToolbarChromeItem.h"
 #include "ViewStack.h"
 #include "GWebContentView.h"
 #include "BookmarksManager.h"
@@ -30,8 +31,8 @@
 namespace GVA {
 
     BookmarksToolbarSnippet::BookmarksToolbarSnippet(const QString& elementId, ChromeWidget * chrome,
-                                                     const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-        : DualButtonToolbarSnippet(elementId, chrome, ownerArea, element, widget),
+                                                     const QWebElement & element)
+        : DualButtonToolbarSnippet(elementId, chrome, element),
           m_action1(0), m_action2(0)
     {      
     }
@@ -43,7 +44,14 @@
         if(m_action2)
             delete m_action2;
     }
-
+    
+    BookmarksToolbarSnippet * BookmarksToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+    {
+        BookmarksToolbarSnippet * that = new BookmarksToolbarSnippet( elementId, chrome, element );
+        that->setChromeWidget( new ToolbarChromeItem( that ) );
+        return that;
+    }
+    
     void BookmarksToolbarSnippet::addChild(ChromeSnippet * child) {
         WebChromeContainerSnippet * s =  dynamic_cast<WebChromeContainerSnippet* >(child);
         if (!s) {
@@ -51,16 +59,16 @@
             if (child->elementId() == "BookmarksBackButton" ) {
                 t->actionId = BOOKMARKS_VIEW_ACTION_BACK;
                 t->actionName = BOOKMARKS_TOOLBAR_BACK;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
                 t->disabledImg = "";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
             }
             else if (child->elementId() == "BookmarksAddButton" ) {
                 t->actionId = BOOKMARKS_VIEW_ACTION_ADD;
                 t->actionName = BOOKMARKS_TOOLBAR_ADD;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add.png";
                 t->disabledImg = "";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add_pressed.png";
             }
             t->id = child->elementId();
             m_actionInfo.append(t);
--- a/ginebra2/BookmarksToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/BookmarksToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -38,8 +38,9 @@
     {
         Q_OBJECT
     public:
-        BookmarksToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+        BookmarksToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
         virtual ~BookmarksToolbarSnippet();
+        static BookmarksToolbarSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
 
     Q_SIGNALS:
         void addBookmarkSelected();
--- a/ginebra2/ChromeDOM.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeDOM.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -16,6 +16,7 @@
 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
 *
 * Description:
+* 
 *
 */
 
@@ -120,121 +121,102 @@
     }
     return handlers;
   }
+  
 
+//TODO: Get rid of rectangle argument to snippets. This is redundant with the element argument!!
+//TODO: Rewrite using function table
+  
+  ChromeSnippet * ChromeDOM::nativeSnippetForClassName(const QString & className, const QString elementId,  QWebElement element)
+  {
+      QRectF rect = element.geometry();
+      
+      if (className == "ContentToolbar") {
+          return ContentToolbarSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "WindowToolbar") {
+          return WindowToolbarSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "RecentUrlToolbar") {
+          return RecentUrlToolbarSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "BookmarksToolbar") {
+          return BookmarksToolbarSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "SettingsToolbar") {
+          return SettingsToolbarSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "MostVisitedPagesWidget") {
+          return MostVisitedSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "ActionButton") {
+          return ActionButtonSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "PageSnippet") {
+          return PageSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "UrlSearchSnippet") {
+          return GUrlSearchSnippet::instance(elementId, m_chrome, element);
+      }
+      else if (className == "TextEditSnippet") {
+          return EditorSnippet::instance(elementId, m_chrome, element);
+      }
+      else {
+          ChromeSnippet* result = new ChromeSnippet(elementId, m_chrome, 0, element);
+          result->setChromeWidget(new QGraphicsWidget());
+          return result;
+      }
+  }
+  
   ChromeSnippet *ChromeDOM::getSnippet(const QString &docElementId, QGraphicsItem* parent) {
     Q_UNUSED(parent)
 
-    ChromeSnippet * result = 0;
+    ChromeSnippet * snippet = 0;
     QWebElement doc = m_page->mainFrame()->documentElement();
     QWebElement element = doc.findFirst("#" + docElementId);
-    QRect rect = element.geometry();//getElementRect(docElementId);
+    QRect rect = element.geometry();
+    //TODO: This may not be accurate since final heights may not have been computed at this point!!
     m_height += rect.height();
-    //m_bytes += rect.width() * rect.height() * 3; //Calculate total rendered area at 24 bit depth
-    //qDebug() << "Chrome total rects at 24 bits: " << m_bytes;
+    
     //    qDebug() << "Snippet: ID: " << docElementId << " Owner Area: " << rect << " Element Rect: " << element.geometry();
+  
     if (!rect.isNull()) {
         QString className = element.attribute("data-GinebraNativeClass", "__NO_CLASS__");
         if (className == "__NO_CLASS__") {
             if (element.attribute("data-GinebraContainer", "false") == "true") {
-                ChromeItem * widget = new ChromeItem(NULL);
-                result = new WebChromeContainerSnippet(docElementId, m_chrome, rect, element,
-                    widget);
-                widget->setSnippet(result);
+                snippet = new WebChromeContainerSnippet(docElementId, m_chrome, element);
+                snippet->setChromeWidget(new ChromeItem(snippet));
             }
             else {
-                result = new WebChromeSnippet(docElementId, m_chrome, rect, element);
-                m_renderer->addRenderItem((static_cast<WebChromeSnippet*> (result))->item());
+                snippet = new WebChromeSnippet(docElementId, m_chrome, element);
+                m_renderer->addRenderItem((static_cast<WebChromeSnippet*> (snippet))->item());
             }
         }
         else {
-     
-            if (className == "ContentToolbar" ) {
-                ContentToolbarChromeItem * widget = new ContentToolbarChromeItem();
-                result = new ContentToolbarSnippet(docElementId, m_chrome, rect, element, widget);
-                widget->setSnippet(result);
-            }
-            else if (className == "WindowToolbar" ) {
-                ToolbarChromeItem * widget = new ToolbarChromeItem();
-                result = new WindowToolbarSnippet(docElementId, m_chrome, rect, element, widget);
-                widget->setSnippet(result);
-            }
-            else if (className == "RecentUrlToolbar" ) {
-                ToolbarChromeItem * widget = new ToolbarChromeItem();
-                result = new RecentUrlToolbarSnippet(docElementId, m_chrome, rect, element, widget);
-                widget->setSnippet(result);
-            }
-            else if (className == "BookmarksToolbar" ) {
-                ToolbarChromeItem * widget = new ToolbarChromeItem();
-                result = new BookmarksToolbarSnippet(docElementId, m_chrome, rect, element, widget);
-                widget->setSnippet(result);
-            }
-            else if (className == "SettingsToolbar" ) {
-                ToolbarChromeItem * widget = new ToolbarChromeItem();
-                result = new SettingsToolbarSnippet(docElementId, m_chrome, rect, element, widget);
-                widget->setSnippet(result);
-            }
-            else if (className == "ToolBar" ) {
-                ToolbarChromeItem * widget = new ToolbarChromeItem();
-                result = new WebChromeContainerSnippet(docElementId, m_chrome, rect, element,
-                    widget);
-                widget->setSnippet(result);
-            }
-            else {
-                QGraphicsWidget * w = 0;
-                if (className == "MostVisitedPagesWidget") {
-                    result = new MostVisitedSnippet(docElementId, m_chrome, 0, element);
-                    MostVisitedPagesWidget* mostVisited;
-                    mostVisited = new MostVisitedPagesWidget(result, m_chrome);
-                    mostVisited->hide();
-                    w = mostVisited;
-                }
-                else if (className == "ActionButton") {
-                    result = new ActionButtonSnippet(docElementId, m_chrome, 0, element);
-                    w = new ActionButton(result);
-                }
-                else if (className == "PageSnippet") {
-                    result = new PageSnippet(docElementId, m_chrome, 0, element);
-                    w = new PageItem(result, m_chrome);
-                }
-                else if (className == "ProgressBar") {
-                    result = new ProgressBarSnippet(docElementId, m_chrome, 0, element);
-                    w = new ProgressBarItem(result);
-                }
-                else if (className == "UrlSearchSnippet") {
-                    result = new GUrlSearchSnippet(docElementId, m_chrome, 0, element);
-                    w = new GUrlSearchItem(result, m_chrome);
-                }
-                else if (className == "TextEditSnippet") {
-                    result = new EditorSnippet(docElementId, m_chrome, 0, element);
-                    w = new TextEditItem(result, m_chrome);
-                }
-                else {
-                    //Chrome snippet takes ownership of w
-                    result = new ChromeSnippet(docElementId, m_chrome, 0, element);
-                    w = new QGraphicsWidget();
-                }
-                result->setWidget(w);
-                //Have snippet deterimine its own size when in anchor layout
-                w->resize(rect.width(), rect.height());
-                w->setPreferredSize(rect.width(), rect.height());
-                w->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
-                //Have snippet determine its own location when NOT in anchor layout
-                w->setPos(rect.x(), rect.y());
-            }
+            snippet = nativeSnippetForClassName(className, docElementId, element);
+            //TODO: Is the following still needed?
+            QGraphicsWidget * widget = snippet->widget();
+            //Have snippet determine its own size when in anchor layout. Again, these will not
+            //necessarily be accurate at this point.
+            widget->resize(rect.width(), rect.height());
+            widget->setPreferredSize(rect.width(), rect.height());
+            widget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+            //Have snippet determine its own location when NOT in anchor layout
+            widget->setPos(rect.x(), rect.y());
+            
         }
 
         QWebElement parentElem;
 
         if (!(parentElem = findChromeParent(element)).isNull()) {
-            result->setParentId(parentElem.attribute("id"));
+            snippet->setParentId(parentElem.attribute("id"));
         }
         //Set auto-layout attributes
-        result->setAnchor(element.attribute("data-GinebraAnchor", "AnchorNone"), false);
-        result->setAnchorOffset(element.attribute("data-GinebraAnchorOffset", "0").toInt());
-        result->setInitiallyVisible(element.attribute("data-GinebraVisible", "false") == "true");
-        result->setHidesContent(element.attribute("data-GinebraHidesContent", "false") == "true");
+        snippet->setAnchor(element.attribute("data-GinebraAnchor", "AnchorNone"), false);
+        snippet->setAnchorOffset(element.attribute("data-GinebraAnchorOffset", "0").toInt());
+        snippet->setInitiallyVisible(element.attribute("data-GinebraVisible", "false") == "true");
+        snippet->setHidesContent(element.attribute("data-GinebraHidesContent", "false") == "true");
     }
-    return result;
+    return snippet;
   }
   
   QWebElement ChromeDOM::findChromeParent(QWebElement element)
--- a/ginebra2/ChromeDOM.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeDOM.h	Tue Jul 06 14:03:49 2010 +0300
@@ -57,6 +57,7 @@
   int height() { return m_height; }
 private:
   QWebElement findChromeParent(QWebElement element);
+  ChromeSnippet *nativeSnippetForClassName(const QString & className, const QString elementId, QWebElement element);
   QWebPage * m_page;
   ChromeRenderer * m_renderer;
   ChromeWidget * m_chrome;
--- a/ginebra2/ChromeEffect.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeEffect.h	Tue Jul 06 14:03:49 2010 +0300
@@ -28,12 +28,16 @@
 
 namespace GVA {
 
-/*
+/*!
  * The ChromeEffect namespace is intended to provide settings and drawing methods that can be
  * used by various classes for common display requirements, so far, just disabled mode drawing is
  * supported but more can be added...
  */
 namespace ChromeEffect {
+    /*!
+     * Paint a rectangle that will give the underlying item a "disabled" look -- ie. whitewashed
+     * or darkened or whatever the UI spec is.
+     */
     void paintDisabledRect(QPainter *painter, const QRectF &rect);
 
     static qreal disabledOpacity = 0.65;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ChromeLayout.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,308 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include <QList>
+#include <QDebug>
+#include <QGraphicsSceneContextMenuEvent>
+
+#include "ChromeSnippet.h"
+#include "WebChromeContainerSnippet.h"
+#include "ChromeLayout.h"
+#include "SlidingWidget.h"
+#include "ViewController.h"
+#include "ObjectCharm.h"
+#include "bedrockprovisioning.h"
+
+namespace GVA {
+
+// -----------------------------
+
+  ChromeLayout::ChromeLayout(QGraphicsItem * parent, Qt::WindowFlags wFlags)
+    : QGraphicsWidget(parent, wFlags),
+      m_topBar(0),
+      m_bottomBar(0),
+      m_leftBar(0),
+      m_rightBar(0),
+      m_aspect(portrait),
+      m_bottomBarHeight(0)
+  {
+    m_layout = new QGraphicsAnchorLayout();
+    m_layout->setContentsMargins(0,0,0,0);
+    m_layout->setSpacing(0);
+    setLayout(m_layout);
+    addAnchors();
+    m_viewPort = new SlidingWidget(this);
+    m_layout->addAnchor(m_viewPort, Qt::AnchorTop, m_topBar, Qt::AnchorBottom);
+    m_layout->addAnchor(m_viewPort, Qt::AnchorBottom, m_bottomBar, Qt::AnchorTop);
+    m_layout->addAnchor(m_viewPort, Qt::AnchorLeft, m_leftBar, Qt::AnchorRight);
+    m_layout->addAnchor(m_viewPort, Qt::AnchorRight, m_rightBar, Qt::AnchorLeft);
+  }
+  
+  ChromeLayout::~ChromeLayout()
+  {
+    delete m_bottomBar;
+    delete m_topBar;
+    delete m_leftBar;
+    delete m_rightBar;
+    delete m_viewPort;
+  }
+  
+  void ChromeLayout::addAnchors(){
+    if (!m_bottomBar){
+      m_bottomBar = new QGraphicsWidget(this);
+      m_bottomBar->setPreferredHeight(0);
+      m_bottomBar->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+      m_layout->addAnchor(m_bottomBar, Qt::AnchorBottom, m_layout, Qt::AnchorBottom);
+      m_layout->addAnchors(m_bottomBar, m_layout, Qt::Horizontal);
+    }
+    if (!m_topBar){
+      m_topBar = new QGraphicsWidget(this);
+      m_topBar->setPreferredHeight(0);
+      m_topBar->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+      m_layout->addAnchor(m_topBar, Qt::AnchorTop, m_layout, Qt::AnchorTop);
+      m_layout->addAnchors(m_topBar, m_layout, Qt::Horizontal);
+    }
+    if (!m_leftBar){
+      m_leftBar = new QGraphicsWidget(this);
+      m_leftBar->setPreferredWidth(0);
+      m_leftBar->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
+      m_layout->addAnchor(m_leftBar, Qt::AnchorLeft, m_layout, Qt::AnchorLeft);
+      m_layout->addAnchors(m_leftBar, m_layout, Qt::Vertical);
+    }
+    if (!m_rightBar){
+      m_rightBar = new QGraphicsWidget(this);
+      m_rightBar->setPreferredWidth(0);
+      m_rightBar->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
+      m_layout->addAnchor(m_rightBar, Qt::AnchorRight, m_layout, Qt::AnchorRight);
+      m_layout->addAnchors(m_rightBar, m_layout, Qt::Vertical);
+    }
+  }
+  
+  void ChromeLayout::resizeEvent(QGraphicsSceneResizeEvent *ev)
+  {
+    emit resizing(ev->newSize());
+    int aspect = m_aspect;
+    m_aspect = (ev->newSize().width() > ev->newSize().height())?landscape:portrait;
+    if (m_aspect != aspect) {
+      QString mode = (m_aspect == landscape ? "Landscape" : "Portrait");
+      emit aspectChanged(m_aspect);
+    }
+    QGraphicsWidget::resizeEvent(ev);
+  }
+  
+  void ChromeLayout::addView(ControllableViewBase * controllableView){
+    if (controllableView->widget()) {
+      m_viewPort->setWindow(controllableView->widget());
+      controllableView->widget()->setFocusPolicy(Qt::ClickFocus); //NB: Is this needed? Does it break anything?
+      controllableView->widget()->setZValue(-1.0); //Make sure we are behind any center anchored snippets
+    }
+  }
+  
+  void ChromeLayout::anchorToView(ChromeSnippet* snippet, const QString& where)
+  {
+    Q_UNUSED(where)
+      m_viewPort->attachItem(snippet->widget());
+  }
+  
+  void ChromeLayout::detachFromView(ChromeSnippet* snippet, const QString& where)
+  {
+    Q_UNUSED(where)
+      m_viewPort->detachItem(snippet->widget());
+  }
+  
+  void ChromeLayout::anchorTogether(ChromeSnippet * first, ChromeSnippet * second, qreal x, qreal y)
+  {
+      first->widget()->setParentItem(second->widget());
+      first->widget()->setPos(x,y);
+  }
+  
+  void ChromeLayout::unAnchor(ChromeSnippet* snippet)
+  {
+    snippet->widget()->setParentItem(0);
+    snippet->widget()->setParentItem(this);
+  }
+  
+  qreal ChromeLayout::shrinkView(qreal delta)
+  {
+    m_viewPort->setShrinkMax(bottomBarHeight());
+    return m_viewPort->shrink(delta);
+  }
+  
+  qreal ChromeLayout::slideView(qreal delta)
+  {
+    return m_viewPort->slide(delta);
+  }
+  
+  //Check to see if snippet has an anchor and lay it out accordingly.
+  //Otherwise snippets determine their own positions from html
+  
+  void ChromeLayout::anchorSnippet(ChromeSnippet * snippet)
+  {
+    if (snippet->anchor() == anchorBottom){
+      if (snippet->hidesContent()){
+	m_layout->addAnchor(snippet->widget(), Qt::AnchorBottom, m_bottomBar, Qt::AnchorTop);
+	m_layout->addAnchor(snippet->widget(), Qt::AnchorHorizontalCenter, m_bottomBar, Qt::AnchorHorizontalCenter);
+      } else {
+	snippet->widget()->setParentItem(m_bottomBar);
+	snippet->widget()->setY(-snippet->anchorOffset());
+      }
+    }
+    else if (snippet->anchor() == anchorTop){
+      if (snippet->hidesContent()){
+	m_layout->addAnchor(snippet->widget(),Qt::AnchorTop, m_topBar, Qt::AnchorBottom);
+	m_layout->addAnchor(snippet->widget(), Qt::AnchorHorizontalCenter, m_topBar, Qt::AnchorHorizontalCenter);
+      }
+      else {
+	snippet->widget()->setParentItem(m_topBar);
+	snippet->widget()->setY(snippet->anchorOffset());
+      }
+    }
+    else if (snippet->anchor() == anchorLeft){
+      if (snippet->hidesContent())
+	m_layout->addAnchor(snippet->widget(),Qt::AnchorLeft, m_leftBar, Qt::AnchorRight);
+      else {
+	snippet->widget()->setParentItem(m_leftBar);
+	snippet->widget()->setX(snippet->anchorOffset());
+      }
+    }
+    else if (snippet->anchor() == anchorRight){
+      if (snippet->hidesContent())
+	m_layout->addAnchor(snippet->widget(),Qt::AnchorRight, m_rightBar, Qt::AnchorLeft);
+      else {
+	snippet->widget()->setParentItem(m_rightBar);
+	snippet->widget()->setX(-snippet->anchorOffset());
+      }
+    }
+    else if (snippet->anchor() == anchorCenter) {
+      snippet->widget()->setParentItem(m_viewPort);
+      snippet->widget()->setZValue(0.0);
+      QGraphicsAnchorLayout * vl = static_cast<QGraphicsAnchorLayout*>(m_viewPort->layout());
+      vl->addAnchor(snippet->widget(), Qt::AnchorVerticalCenter, vl, Qt::AnchorVerticalCenter);
+      vl->addAnchor(snippet->widget(), Qt::AnchorHorizontalCenter, vl, Qt::AnchorHorizontalCenter);
+    }
+    else if (snippet->anchor() == anchorTopLeft){
+      m_layout->addCornerAnchors(snippet->widget(), Qt::TopLeftCorner, m_layout, Qt::TopLeftCorner);
+    }
+    else if (snippet->anchor() == anchorTopRight)
+      m_layout->addCornerAnchors(snippet->widget(), Qt::TopRightCorner, m_layout, Qt::TopRightCorner);
+    else if (snippet->anchor() == anchorBottomLeft)
+      m_layout->addCornerAnchors(snippet->widget(), Qt::BottomLeftCorner, m_layout, Qt::BottomLeftCorner);
+    else if (snippet->anchor() == anchorBottomRight)
+      m_layout->addCornerAnchors(snippet->widget(), Qt::BottomRightCorner, m_layout, Qt::BottomRightCorner);
+  }
+  
+  void ChromeLayout:: addSnippet(ChromeSnippet * snippet, ChromeSnippet * container )
+  {
+    snippet->widget()->setParentItem(this);
+    if (container){
+	container->addChild(snippet);
+    }
+    anchorSnippet(snippet);
+  }
+  
+  // Call after a snippet changes to visible state
+    
+  void ChromeLayout::snippetShown(ChromeSnippet * snippet)
+  {
+    if (snippet->hidesContent()) {
+      if (snippet->anchor() == anchorBottom) {
+	/* snippet->widget()->size().height() is zero for  WebChromeContainerSnippet
+	   when default visible container snippet is shown, get ownerArea height instead */
+	WebChromeContainerSnippet * s = dynamic_cast<WebChromeContainerSnippet *>(snippet);
+	if (!s) {
+	  m_bottomBarHeight = snippet->widget()->size().height();
+	}
+	else {
+	  m_bottomBarHeight = s->ownerArea().height();
+	}
+      }
+      return;
+    }
+    if (snippet->anchor() == anchorBottom)
+      m_bottomBar->setPreferredHeight(m_bottomBar->preferredHeight() + snippet->widget()->preferredHeight());
+    else if (snippet->anchor() == anchorTop)
+      m_topBar->setPreferredHeight(m_topBar->preferredHeight() + snippet->widget()->preferredHeight());
+    else if (snippet->anchor() == anchorLeft){
+      m_leftBar->setPreferredWidth(m_leftBar->preferredWidth() + snippet->widget()->preferredWidth());
+    }
+    else if (snippet->anchor() == anchorRight){
+      m_rightBar->setPreferredWidth(m_rightBar->preferredWidth() + snippet->widget()->preferredWidth());
+    }
+  }
+  
+  // Call before a snippet changes to invisible state
+    
+  void ChromeLayout::snippetHiding(ChromeSnippet * snippet)
+  {
+    if (snippet->hidesContent())
+      return;
+    if (snippet->anchor() == anchorBottom)
+      m_bottomBar->setPreferredHeight(m_bottomBar->preferredHeight() - snippet->widget()->preferredHeight());
+    else if (snippet->anchor() == anchorTop)
+      m_topBar->setPreferredHeight(m_topBar->preferredHeight() - snippet->widget()->preferredHeight());
+    else if (snippet->anchor() == anchorLeft){
+      m_leftBar->setPreferredWidth(m_leftBar->preferredWidth() - snippet->widget()->preferredWidth());
+    }
+    else if (snippet->anchor() == anchorRight){
+      m_rightBar->setPreferredWidth(m_rightBar->preferredWidth() - snippet->widget()->preferredWidth());
+    }
+  }
+  
+  QString ChromeLayout::getDisplayMode() const {
+    return (m_aspect==portrait)?"portrait":"landscape";
+  }
+  
+  void ChromeLayout::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
+  {
+    event->accept();
+  }
+
+  //NB: Deprecate. This really shouldn't be necessary: anchor bars should be implemented as an expanding
+  //widget class.
+
+  void ChromeLayout::adjustAnchorOffset(ChromeSnippet * snippet, qreal delta)
+  {
+    if (snippet->anchor() == anchorBottom)
+      m_bottomBar->setPreferredHeight(m_bottomBar->preferredHeight() + delta);
+    else if (snippet->anchor() == anchorTop)
+      m_topBar->setPreferredHeight(m_topBar->preferredHeight() + delta);
+    else if (snippet->anchor() == anchorLeft){
+      m_leftBar->setPreferredWidth(m_leftBar->preferredWidth() + delta);
+    }
+    else if (snippet->anchor() == anchorRight){
+      m_rightBar->setPreferredWidth(m_rightBar->preferredWidth() + delta);
+    }
+  }
+
+  void ChromeLayout::setScene(QGraphicsScene *scene)
+  {
+    m_scene = scene;
+    //This is the root of the scene hierarchy
+    m_scene->addItem(this);
+
+    // For testing, turn on red dot that appears in response to various mouse events.
+    if(BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsInt("EnableTouchCircle", false)) {
+        new TouchCircleCharm(m_scene, this);
+    }
+
+  }
+  
+} // endof namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ChromeLayout.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef __GINEBRA_CHROMELAYOUT_H__
+#define __GINEBRA_CHROMELAYOUT_H__
+
+#include <QtGui>
+
+class ControllableViewBase;
+class QGraphicsSceneContextMenuEvent;
+
+namespace GVA {
+
+  class ChromeSnippet;
+  class SlidingWidget;
+
+  enum ChromeAnchor
+  {
+    anchorNone,
+    anchorCenter,
+    anchorTop,
+    anchorBottom,
+    anchorLeft,
+    anchorRight,
+    anchorTopLeft,
+    anchorTopRight,
+    anchorBottomLeft,
+    anchorBottomRight
+  };
+
+  enum Aspect
+  {
+    portrait,
+    landscape
+  };
+ 
+
+  /*!
+   * \brief This class is responsible for laying out the snippets and views that constitute the UI
+   */
+
+  class ChromeLayout : public QGraphicsWidget
+  {
+
+  Q_OBJECT
+
+  public:
+    ChromeLayout(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0);
+    virtual ~ChromeLayout();
+    void addView(ControllableViewBase * controllableView);
+    void addSnippet(ChromeSnippet * snippet, ChromeSnippet * container);
+    void anchorSnippet(ChromeSnippet * snippet); //TODO: should be private, but is needed from ChromeWidget::anchorSnippet which is caled from ChromeSnippet
+    //NB: Should be deprecated (see comment in .cpp)
+    void adjustAnchorOffset(ChromeSnippet * snippet, qreal delta);
+    void anchorToView(ChromeSnippet* snippet, const QString & where = "top");
+    void detachFromView(ChromeSnippet* snippet, const QString & where = "top");
+    void anchorTogether(ChromeSnippet* first, ChromeSnippet *  second, qreal x = 0, qreal y = 0);
+    void unAnchor(ChromeSnippet* first);
+    QGraphicsScene * scene() { return m_scene; }
+    void setScene(QGraphicsScene *scene);
+    int bottomBarHeight() { return m_bottomBarHeight;}
+    /// \brief Returns either "portrait" or "landscape".
+    QString getDisplayMode() const;
+    Q_PROPERTY(QString displayMode READ getDisplayMode)
+
+  public slots:
+    void snippetShown(ChromeSnippet * snippet);
+    void snippetHiding(ChromeSnippet * snippet);
+    qreal slideView(qreal delta);
+    qreal shrinkView(qreal delta);
+    int width(){ return (int)size().width(); }
+  
+  signals:
+    void resizing(QSizeF newSize);
+    void aspectChanged(int aspect);
+
+  protected:
+    virtual void resizeEvent(QGraphicsSceneResizeEvent *ev);
+    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
+
+  private:
+    void addAnchors();
+    QGraphicsScene * m_scene;
+    QGraphicsAnchorLayout *m_layout;
+    QGraphicsAnchorLayout *m_viewLayout;
+    SlidingWidget *m_viewPort;
+    QGraphicsWidget *m_topBar;
+    QGraphicsWidget *m_bottomBar;
+    QGraphicsWidget *m_leftBar;
+    QGraphicsWidget *m_rightBar;
+    Aspect m_aspect;
+    int m_bottomBarHeight;
+  };
+
+} // end of namespace GVA
+
+#endif // __GINEBRA_CHROMEWIDGET_H__
--- a/ginebra2/ChromeRenderer.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeRenderer.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -56,8 +56,7 @@
   WebChromeItem * item;    
   if(!m_renderList.isEmpty()){
       foreach(item, m_renderList){
-          item->setOwnerArea(QRectF(item->element().geometry()));
-          if (item->ownerArea().intersects(dirtyRect) && !item->isPainting()){
+          if (item->elementRect().intersects(dirtyRect) && !item->isPainting()){
               item->update();
           }
       }
--- a/ginebra2/ChromeSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -76,10 +76,14 @@
 
   void ChromeSnippet::onContextMenuEvent(QGraphicsSceneContextMenuEvent * ev)
   {
-    qDebug() << "ChromeSnippet::contextMenuEvent: " << ev->pos();
     emit contextMenuEvent(ev->pos().x(), ev->pos().y());
   }
 
+  void ChromeSnippet::setChromeWidget(QGraphicsWidget * widget)
+  { 
+      m_widget = widget; 
+      m_widget->hide(); 
+  }
 
   //NB: Would be architecturally cleaner to do this translation in ChromeDOM
   //so snippets don't have to know anything about dom attribute string values
@@ -108,7 +112,7 @@
     else
       setAnchor(anchorNone);
     if (update)
-      m_chrome->anchorSnippet(this);
+      m_chrome->layout()->anchorSnippet(this);
   }
 
   void ChromeSnippet::setAnchorOffset(int offset, bool update)
@@ -118,8 +122,8 @@
 
     if (update){
       if (m_widget->isVisible())
-    m_chrome->adjustAnchorOffset(this, delta);
-      m_chrome->anchorSnippet(this);
+	m_chrome->adjustAnchorOffset(this, delta);
+      m_chrome->layout()->anchorSnippet(this);
     }
   }
 
@@ -166,12 +170,12 @@
       m_widget->show();
       if (m_vAnimator && animate)
         m_vAnimator->setVisible(m_visible, animate);
-      m_chrome->snippetShown(this); //NB: handle this via shown signal
+      m_chrome->layout()->snippetShown(this); //NB: handle this via shown signal
       m_hiding = false;
       emit shown();
     }
     else{
-      m_chrome->snippetHiding(this); //NB: handle this via hiding signal
+      m_chrome->layout()->snippetHiding(this); //NB: handle this via hiding signal
       m_hiding = true;
       if (m_vAnimator)
         m_vAnimator->setVisible(m_visible, animate);
@@ -210,8 +214,7 @@
   }
 
   void ChromeSnippet::setEnabled(bool value) {
-      qDebug() << "ChromeSnippet::setEnabled: " << objectName() << value;
-      if(m_enabled == value)
+       if(m_enabled == value)
           return;
 
       m_enabled = value;
@@ -315,7 +318,6 @@
       QRect parentGeo = m_element.geometry();
       //Get child geometry relative to parent
       QRectF childGeom(childGeo.x()-parentGeo.x(), childGeo.y()-parentGeo.y(), childGeo.width(), childGeo.height());
-      qDebug() << "Parent geometry: " << parentGeo << " child geometry: " << childGeo;
       childSnippet->widget()->setGeometry(childGeom);
     }
 
@@ -323,7 +325,6 @@
 
   void ChromeSnippet::addChild(ChromeSnippet * child)
   {
-    qDebug() << "ChromeSnippet::addChild: " << child->elementId();
     QWebElement c = m_element.findFirst("#" + child->elementId());
     if (c.isNull())
       return;
@@ -357,13 +358,13 @@
   void ChromeSnippet::anchorToView(const QString& view, const QString& where)
   {
     Q_UNUSED(where)
-    m_chrome->anchorToView(this, view);
+    m_chrome->layout()->anchorToView(this, view);
   }
 
   void ChromeSnippet::detachFromView(const QString& view, const QString& where)
   {
     Q_UNUSED(where)
-    m_chrome->detachFromView(this, view);
+    m_chrome->layout()->detachFromView(this, view);
   }
 
   void ChromeSnippet::anchorTo(const QString & id, int x, int y)
@@ -374,7 +375,7 @@
   void ChromeSnippet::unAnchor()
   {
     setAnchor("AnchorNone");
-    m_chrome->unAnchor(this);
+    m_chrome->layout()->unAnchor(this);
   }
 
  QObject *ChromeSnippet::animate(int duration) {
@@ -392,8 +393,7 @@
 
   void ChromeSnippet::grabFocus()
   {
-    qDebug() << "ChromeSnippet::grabFocus()";
-    m_widget->setFocus();
+     m_widget->setFocus();
   }
 
   int ChromeSnippet::zValue()
--- a/ginebra2/ChromeSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -27,6 +27,7 @@
 #include <QTransform>
 #include <QWebElement>
 #include "ChromeWidget.h"
+#include "ChromeLayout.h"
 
 class QGraphicsWidget;
 
@@ -57,7 +58,7 @@
   public:
     ChromeSnippet(const QString & elementId, ChromeWidget * chrome, QGraphicsWidget * widget, const QWebElement & element);
     virtual ~ChromeSnippet();
-    ChromeWidget* chrome() { return m_chrome; }
+    ChromeWidget * chrome() { return m_chrome; }
     void setInitiallyVisible(bool initiallyVisible) { m_initiallyVisible = initiallyVisible; } //NB: needed?
     void setHidesContent(bool hidesContent) { m_hidesContent = hidesContent; }
     void setAnchor(ChromeAnchor anchor) {m_anchor = anchor;}
@@ -68,7 +69,7 @@
     QString elementId() { return m_elementId; }
     QGraphicsWidget* widget() { return m_widget; }
     QGraphicsWidget const * constWidget() const { return m_widget; }
-    virtual void setWidget(QGraphicsWidget * widget) { m_widget = widget; }
+    virtual void setChromeWidget(QGraphicsWidget * widget);
     QString parentId() { return m_parentId; }
     void setParentId(const QString& parent) { m_parentId = parent; }
     void setTransform(QTransform transform);
@@ -111,12 +112,12 @@
     //NB: deprecate repaint: if this is needed, then there are bugs that are preventing updates
     void repaint() { m_widget->update(); }
     void onContextMenuEvent(QGraphicsSceneContextMenuEvent * ev);
-    void disableDontShowFlag() {m_dontshowFlag = false ;}
+
   signals:
     void hidden();
     void shown();
     void externalMouseEvent(
-            int type,
+            QEvent * ev,
             const QString & name,
             const QString & description);
     void contextMenuEvent(int x, int y);
@@ -137,12 +138,10 @@
     Q_PROPERTY(int anchorOffset READ anchorOffset WRITE setAnchorOffset)
     Q_PROPERTY(int zValue READ zValue WRITE setZValue)
     Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
-    Q_PROPERTY(bool dontShow READ getDontShowFlag WRITE setDontShowFlag)
     Q_PROPERTY(QObject* position READ getPosition)
     Q_PROPERTY(QObject* geometry READ getGeometry)
     Q_PROPERTY(bool enabled WRITE setEnabled READ enabled)
-    bool getDontShowFlag() {return m_dontshowFlag;}
-    void setDontShowFlag(bool flag){ m_dontshowFlag = flag;}
+
     bool enabled() const;
     void setEnabled(bool value);
   protected:
--- a/ginebra2/ChromeView.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeView.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -23,7 +23,8 @@
 #include <QWebPage>
 
 #include "ChromeView.h"
-#include "ChromeWidget.h"
+#include "ChromeWidget.h" //TODO: get rid of this, refer directly to layout
+#include "ChromeLayout.h" 
 #ifndef NO_QSTM_GESTURE
 #include "qstmgestureevent.h"
 #endif
@@ -40,20 +41,21 @@
 
 namespace GVA {
 
-ChromeView::ChromeView(ChromeWidget * chrome, QWidget * parent)
+ChromeView::ChromeView(QGraphicsScene *graphicsScene, ChromeWidget * chrome, QWidget * parent)
 #ifdef ORBIT_UI
   : HbMainWindow(parent),
 #else
-  : QGraphicsView(new QGraphicsScene(), parent),
+  : QGraphicsView(graphicsScene, parent),
 #endif // ORBIT_UI
-    m_topWidget(chrome)
+    m_chrome(chrome),
+    m_topWidget(chrome->layout())
 {
 #ifdef ORBIT_UI
-    addView(chrome);
+  addView(chrome->layout());
 #endif // ORRBIT_UI
 
   // Initialize the ChromeWidget with the scene created in the ChromeView
-  chrome->setScene(scene());
+  chrome->layout()->setScene(scene());
 
   //setGeometry(chrome->geometry().toRect());
   setObjectName("ChromeView");
@@ -62,6 +64,13 @@
   setStyleSheet("QGraphicsView#ChromeView {margin:0; border: 0; padding:0; background:#fff}");
   setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
   setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+#ifdef BEDROCK_TILED_BACKING_STORE
+  setFrameShape(QFrame::NoFrame);
+  setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+  scene()->setItemIndexMethod(QGraphicsScene::NoIndex);
+#endif  
+	
   //NB: maybe not needed?
   setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
   //installEventFilter(this);
@@ -84,7 +93,6 @@
 
 ChromeView::~ChromeView()
 {
-
 }
 
 void ChromeView::resizeEvent(QResizeEvent * ev)
@@ -92,15 +100,23 @@
     //Resize the chrome to match the view and scene rectangle size
     if (m_topWidget) {
 
-        // On calling setGeometry on QGraphicsWidget, the layout resize if
-        // first called before resize on children happens. In order to avoid painting
-        // the children in the worn positions, first let children change size
-        ChromeWidget * w = static_cast<ChromeWidget*>(m_topWidget);
-        w->sizeChange(ev->size());
-
-        m_topWidget->setGeometry(0,0, ev->size().width(), ev->size().height());
+      // On calling setGeometry on QGraphicsWidget, the layout resizes if
+      // first called before resize on children happens. In order to avoid painting
+      // the children in their old positions, first let children change size
+      // ChromeWidget * w = static_cast<ChromeWidget*>(m_topWidget);
+      // w->sizeChange(ev->size());
+      //TODO: move sizeChange to ChromeLayout, remove m_chrome member !!!!!
+      m_chrome->sizeChange(ev->size());
+      m_topWidget->setGeometry(0,0, ev->size().width(), ev->size().height());
     }
     QGraphicsView::resizeEvent(ev);
+	
+#ifdef BEDROCK_TILED_BACKING_STORE
+    if (scene()) {
+        QRectF rect(QPointF(0, 0), size());
+        scene()->setSceneRect(rect);
+    }
+#endif	
 }
 
 //Never scroll the chrome
--- a/ginebra2/ChromeView.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeView.h	Tue Jul 06 14:03:49 2010 +0300
@@ -38,7 +38,7 @@
 {
     Q_OBJECT
  public:
-  ChromeView(ChromeWidget * chrome, QWidget * parent = 0 );
+  ChromeView(QGraphicsScene *graphicsScene, ChromeWidget * chrome, QWidget * parent = 0 );
   ~ChromeView();
   void resizeEvent(QResizeEvent * ev);
   bool event(QEvent* event);
@@ -55,6 +55,7 @@
 
  private:
   QGraphicsWidget * m_topWidget;
+  ChromeWidget * m_chrome; //TODO: get rid of this
 };
 }
 #endif //__GINEBRA_CHROMEVIEW_H__
--- a/ginebra2/ChromeWidget.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeWidget.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -26,10 +26,10 @@
 #include <QKeyEvent>
 #include <QDebug>
 #include <QDesktopServices>
-#include <QGraphicsSceneContextMenuEvent>
 
 #include "bedrockprovisioning.h"
 #include "ChromeWidgetJSObject.h"
+#include "ChromeLayout.h"
 #include "ChromeRenderer.h"
 #include "ChromeDOM.h"
 #include "Snippets.h"
@@ -71,20 +71,18 @@
 // -----------------------------
 
   ChromeWidget::ChromeWidget(QGraphicsItem * parent, Qt::WindowFlags wFlags)
-    : QGraphicsWidget(parent, wFlags),
+    : QObject(0),
       m_renderer(0),
       m_dom(0),
       m_viewController(new ViewController()),
-      m_topBar(0),
-      m_bottomBar(0),
-      m_leftBar(0),
-      m_rightBar(0),
-      m_aspect(portrait),
       m_jsObject(new ChromeWidgetJSObject(0, this)),
       m_localeDelegate(new LocaleDelegate(this)),
-      m_downloads(new Downloads()),
-      m_bottomBarHeight(0)
+      m_downloads(new Downloads())
   {
+    m_layout = new ChromeLayout(parent, wFlags);
+    QObject::connect(m_layout, SIGNAL(resizing(QSizeF)), this, SLOT(onResize(QSizeF)));
+    QObject::connect(m_layout, SIGNAL(aspectChanged(int)), this, SLOT(onAspectChanged(int)));
+
     DeviceImpl *deviceImpl = new DEVICEIMPL();
     NetworkImpl *networkImpl = new NETWORKIMPL();
     m_deviceDelegate = new DeviceDelegate(deviceImpl);
@@ -94,22 +92,9 @@
     ChromeEffect::disabledColor.setNamedColor(provisioning->valueAsString("DisabledColor", "#FFFFFF"));
     ChromeEffect::disabledOpacity = static_cast<qreal>(provisioning->valueAsString("DisabledOpacity", "0.65").toFloat());
 
-    //Keep key events not otherwise consumed from going to the scene
-    //installEventFilter(this);
-    m_layout = new QGraphicsAnchorLayout();
-    m_layout->setContentsMargins(0,0,0,0);
-    m_layout->setSpacing(0);
-    setLayout(m_layout);
-    addAnchors();
-    m_viewPort = new SlidingWidget(this);
-    //m_viewBar = new CollapsingWidget(m_viewPort);
 #ifndef __gva_no_chrome__
     m_snippets = new Snippets(this, this);
 #endif
-    m_layout->addAnchor(m_viewPort, Qt::AnchorTop, m_topBar, Qt::AnchorBottom);
-    m_layout->addAnchor(m_viewPort, Qt::AnchorBottom, m_bottomBar, Qt::AnchorTop);
-    m_layout->addAnchor(m_viewPort, Qt::AnchorLeft, m_leftBar, Qt::AnchorRight);
-    m_layout->addAnchor(m_viewPort, Qt::AnchorRight, m_rightBar, Qt::AnchorLeft);
 #ifndef __gva_no_chrome__
     m_page =  static_cast<QWebPage *>(new GVA::WebPageWrapper(this, "Chrome Javascript error"));
     m_page->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
@@ -121,6 +106,7 @@
 #ifndef __gva_no_chrome__
 
     m_jsObject->setObjectName("chrome");
+
     // Pass some signals from this object to the Javascript object.
     QObject::connect(this, SIGNAL(chromeComplete()), m_jsObject, SIGNAL(chromeComplete()));
     QObject::connect(this, SIGNAL(aspectChanged(int)), m_jsObject, SIGNAL(aspectChanged(int)));
@@ -130,7 +116,9 @@
     QObject::connect(this, SIGNAL(popupHidden(const QString &)), m_jsObject, SIGNAL(popupHidden(const QString &)));
 
     //addJSObjectToEngine(this);
+
     m_app = new GinebraApplication();
+
     //addJSObjectToEngine(m_app);
 
     QObject::connect(
@@ -150,8 +138,70 @@
     // TO DO: need a better home for this.
     qMetaTypeId<QObjectList>();
     qRegisterMetaType<QObjectList>("QObjectList");
+	
+	//for QA Automation test tool purpose
+#if !defined(QT_NO_LIBRARY)
+    QLibrary testLib("qttestability");
+    if(testLib.load()){
+        typedef void (*TasInitialize)(void);
+        TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
+#ifdef Q_OS_SYMBIAN
+        //not found so use ordinal
+        if(!initFunction){
+            initFunction = (TasInitialize)testLib.resolve("1");
+        }
+#endif
+        if(initFunction){
+            initFunction();
+        }
+    }
+#endif
   }
 
+  ChromeWidget::~ChromeWidget()
+  {
+    delete m_viewController;
+    delete m_jsObject;
+    delete m_layout;
+    delete m_renderer;
+    delete m_dom;
+    delete m_page;
+    delete m_snippets;
+    delete m_localeDelegate;
+    delete m_deviceDelegate;
+    delete m_networkDelegate;
+    delete m_app;
+    delete m_downloads;
+  }
+
+  //Handle resizing signal from layout
+
+  void ChromeWidget::onResize(QSizeF size)
+  {
+#ifndef __gva_no_chrome__
+    if (m_dom && m_renderer) {
+      emit prepareForGeometryChange();
+      m_renderer->resize(size);
+    }
+#endif
+  }
+
+  //Handle aspectChanged signal from layout
+
+  void ChromeWidget::onAspectChanged(int aspect)
+  {
+    QString mode = (aspect == landscape ? "Landscape" : "Portrait");
+    ControllableViewBase* cview = m_viewController->currentView();
+    if (cview)
+      cview->displayModeChanged(mode);
+    emit aspectChanged(aspect);
+  }
+
+  void ChromeWidget::updateChromeLayout() {
+    m_renderer->updateChromeLayout();
+  }
+
+
   void ChromeWidget::loadUrlToCurrentPage(const QUrl & url)
   {
     WRT::WrtBrowserContainer * activePage = WebPageController::getSingleton()->currentPage();
@@ -171,84 +221,16 @@
     m_downloads->handlePage(page);
   }
 
-  ChromeWidget::~ChromeWidget()
-  {
-    // clearChrome(); // Crashes on exit
-    delete m_viewController;
-    delete m_jsObject;
-    delete m_bottomBar;
-    delete m_topBar;
-    delete m_leftBar;
-    delete m_rightBar;
-    delete m_viewPort;
-    // delete m_viewLayout; // Crashes on exit
-    delete m_renderer;
-    delete m_dom;
-    delete m_page;
-    // delete m_scene; // Crashes on exit
-    delete m_snippets;
-    // delete m_layout; // Crashes on exit
-    delete m_localeDelegate;
-    delete m_deviceDelegate;
-    delete m_networkDelegate;
-    delete m_app;
-    delete m_downloads;
-  }
-
-
-  //Eat key events not otherwise consumed.
-  /*bool ChromeWidget::eventFilter(QObject * obj, QEvent * ev)
-  {
-   if (ev->type() == QEvent::KeyPress){
-      return true;
-    }
-    return QObject::eventFilter(obj,ev);
-
-  }*/
-
-  void ChromeWidget::resizeEvent(QGraphicsSceneResizeEvent *ev)
-  {
-#ifndef __gva_no_chrome__
-    if (m_dom && m_renderer) {
-      emit prepareForGeometryChange();
-     // m_renderer->setGeometry(QRectF(-1200,-1200, ev->newSize().width(), m_dom->height()));
-      m_renderer->resize(QSizeF(ev->newSize().width(), m_dom->height()));
-    }
-    int aspect = m_aspect;
-    m_aspect = (ev->newSize().width() > ev->newSize().height())?landscape:portrait;
-    if (m_aspect != aspect) {
-      QString mode = (m_aspect == landscape ? "Landscape" : "Portrait");
-      ControllableViewBase* cview = m_viewController->currentView();
-      if (cview)
-        cview->displayModeChanged(mode);
-      emit aspectChanged(m_aspect);
-    }
-#endif
-    QGraphicsWidget::resizeEvent(ev);
-  }
-
-  void ChromeWidget::updateChromeLayout() {
-    qDebug() << "ChromeWidget::updateChromeLayout";
-    m_renderer->updateChromeLayout();
-  }
-
-  /*
-  //For layout debugging
-  void ChromeWidget::paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget* widget){
-    painter->fillRect(geometry(), Qt::red);
-  }
-  */
-
   void ChromeWidget::setChromeBaseDirectory(const QString dir) {
     m_baseDirectory = dir;
+    if(m_baseDirectory.left(2) == ":/") // resource path have to be converted to resource url
+        m_baseDirectory = "qrc:///" + m_baseDirectory.mid(2);
   }
 
   void ChromeWidget::setChromeFile(const QString filePath)
   {
 #ifndef __gva_no_chrome__
-    qDebug() << "ChromeWidget::setChromeFile: " << m_baseDirectory << filePath;
     m_page->mainFrame()->load(QUrl(m_baseDirectory + filePath));
-    qDebug() << "ChromeWidget::setChromeFile: done";
 #else
     Q_UNUSED(filePath)
 #endif
@@ -260,92 +242,38 @@
     m_page->triggerAction(QWebPage::Reload);
   }
 
+  // TODO: needed?
   void ChromeWidget::addViewToLayout(ControllableViewBase * controllableView){
-    //qDebug() << "ChromeWidget::addViewToLayout: " << controllableView->widget();
-    if (controllableView->widget()) {
-      m_viewPort->setWindow(controllableView->widget());
-      controllableView->widget()->setFocusPolicy(Qt::ClickFocus); //NB: Is this needed? Does it break anything?
-      controllableView->widget()->setZValue(-1.0); //Make sure we are behind any center anchored snippets
-    }
+    m_layout->addView(controllableView);
   }
 
   void ChromeWidget::addView(ControllableViewBase * controllableView) {
     //qDebug() << "ChromeWidget::addView: " << controllableView->widget();
     m_viewController->addView(controllableView);
-
-    /*
-    if (controllableView->widget()) {
-      addViewToLayout(controllableView);
-    }
-    else {
-      qWarning() << "ChromeWidget::addView: view has no widget. " << controllableView;
-      connect(controllableView, SIGNAL(instantiated(ControllableViewBase *)), this, SLOT(onViewInstantiated(ControllableViewBase *)));
-    }
-//    m_jsObjects.append(controllableView); // Add to list of exported objects
-#ifndef __gva_no_chrome__
-    addJSObjectToWindow(controllableView); // Export to DOM
-#endif
-    //addJSObjectToEngine(viewDelegate); // Export to script engine
-    */
   }
-
-  void ChromeWidget::anchorToView(ChromeSnippet* snippet, const QString& where)
-  {
-    Q_UNUSED(where)
-      //m_viewBar->addItem(snippet);
-    m_viewPort->attachItem(snippet->widget());
-  }
-
-  void ChromeWidget::detachFromView(ChromeSnippet* snippet, const QString& where)
-  {
-    Q_UNUSED(where)
-      //  m_viewBar->removeItem(snippet);
-    m_viewPort->detachItem(snippet->widget());
-  }
-
+  
   void ChromeWidget::anchorTogether(ChromeSnippet* first, const QString& secondId, qreal x, qreal y)
   {
     ChromeSnippet* second = getSnippet(secondId);
     if (second){
-      //qDebug() << "Anchoring: " << first->objectName() << " to: " << second->objectName();
-      first->widget()->setParentItem(second->widget());
-      first->widget()->setPos(x,y);
+      m_layout->anchorTogether(first, second, x, y);
     }
     else {
-      qDebug() << "ChromeWidget::anchorTogether: error, not found: " << secondId;
+      qDebug() << "Chrome::anchorTogether: error, not found: " << secondId;
     }
   }
 
-  void ChromeWidget::unAnchor(ChromeSnippet* snippet)
-  {
-    snippet->widget()->setParentItem(0);
-    snippet->widget()->setParentItem(this);
-  }
-
-  qreal ChromeWidget::shrinkView(qreal delta)
-    {
-      m_viewPort->setShrinkMax(bottomBarHeight());
-      return m_viewPort->shrink(delta);
-    }
-
-  qreal ChromeWidget::slideView(qreal delta)
-  {
-    //return m_viewBar->collapse(delta);
-    return m_viewPort->slide(delta);
-  }
-
   ControllableViewBase * ChromeWidget::getView(const QString& view)
   {
     return m_viewController->view(view);
   }
 
   void ChromeWidget::showView(const QString &name) {
-    qDebug() << "ChromeWidget::showView: " << name;
     m_viewController->showView(name);
   }
 
   void ChromeWidget::onCurrentViewChanged() {
-    addViewToLayout(m_viewController->currentView());
+    m_layout->addView(m_viewController->currentView());
   }
 
   // Clean up all existing snippets;
@@ -362,41 +290,25 @@
 
   void ChromeWidget::loadFinished(bool ok)  // slot
   {
-    qDebug() << "ChromeWidget::loadFinished: " << ok;
     if (!ok) {
-      qDebug() << "ChromeWidget::loadFinished: error";
       return;
     }
-    //NB: do we really need to instantiate a new renderer?
-    if (m_renderer)
-      delete m_renderer;
-    // qDebug() << "Instantiate renderer";
-    m_renderer = new ChromeRenderer(m_page, this);
-    // qDebug() << "Resize the renderer 1";
-    m_renderer->resize(size());
-   // m_renderer->setPos(-1200, -1200);
-   // m_renderer->setZValue(-3);
-#ifdef Q_OS_SYMBIAN
-   //connect(m_renderer, SIGNAL(symbianCarriageReturn()), this, SIGNAL(symbianCarriageReturn()));
-#endif
+    if (!m_renderer)
+      m_renderer = new ChromeRenderer(m_page, this);
+    m_renderer->resize(m_layout->size());
     if (m_dom)
       delete m_dom; // NB: This may need some further investigation
     m_dom = new ChromeDOM(m_page, this);
     getInitialSnippets();
-    //Set the final renderer size to match the chrome
-    //m_renderer->resize(size().width(), m_dom->height());
-    m_renderer->resize(QSizeF(size().width(), m_dom->height()));
+    m_renderer->resize(QSizeF(m_layout->size().width(), m_dom->height()));
     //qDebug() << m_dom->getCacheableScript();
-
     // Let internal objects know that the chrome is complete.
     emit internalChromeComplete();
     // Now let the javascript world know that it is complete.
     emit chromeComplete();
-
     // connect ViewStack to creatingPage signal
     connect( WebPageController::getSingleton(), SIGNAL(creatingPage(WRT::WrtBrowserContainer*)),
              ViewStack::getSingleton(), SLOT(creatingPage(WRT::WrtBrowserContainer*)));
-    qDebug() << "ChromeWidget::loadFinished: done";
   }
 
   void ChromeWidget::chromeInitialized()
@@ -438,108 +350,16 @@
     }
   }
 
-  void ChromeWidget::addAnchors(){
-    if (!m_bottomBar){
-      m_bottomBar = new QGraphicsWidget(this);
-      m_bottomBar->setPreferredHeight(0);
-      m_bottomBar->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
-      m_layout->addAnchor(m_bottomBar, Qt::AnchorBottom, m_layout, Qt::AnchorBottom);
-      m_layout->addAnchors(m_bottomBar, m_layout, Qt::Horizontal);
-    }
-    if (!m_topBar){
-      m_topBar = new QGraphicsWidget(this);
-      m_topBar->setPreferredHeight(0);
-      m_topBar->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
-      m_layout->addAnchor(m_topBar, Qt::AnchorTop, m_layout, Qt::AnchorTop);
-      m_layout->addAnchors(m_topBar, m_layout, Qt::Horizontal);
-    }
-    if (!m_leftBar){
-      m_leftBar = new QGraphicsWidget(this);
-      m_leftBar->setPreferredWidth(0);
-      m_leftBar->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
-      m_layout->addAnchor(m_leftBar, Qt::AnchorLeft, m_layout, Qt::AnchorLeft);
-      m_layout->addAnchors(m_leftBar, m_layout, Qt::Vertical);
-    }
-    if (!m_rightBar){
-      m_rightBar = new QGraphicsWidget(this);
-      m_rightBar->setPreferredWidth(0);
-      m_rightBar->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
-      m_layout->addAnchor(m_rightBar, Qt::AnchorRight, m_layout, Qt::AnchorRight);
-      m_layout->addAnchors(m_rightBar, m_layout, Qt::Vertical);
-    }
-  }
-
-  //Check to see if snippet has an anchor and lay it out accordingly.
-  //Otherwise snippets determine their own positions from html
-
-  void ChromeWidget::anchorSnippet(ChromeSnippet * snippet)
-  {
-    if (snippet->anchor() == anchorBottom){
-      if (snippet->hidesContent()){
-    m_layout->addAnchor(snippet->widget(), Qt::AnchorBottom, m_bottomBar, Qt::AnchorTop);
-    m_layout->addAnchor(snippet->widget(), Qt::AnchorHorizontalCenter, m_bottomBar, Qt::AnchorHorizontalCenter);
-      } else {
-    snippet->widget()->setParentItem(m_bottomBar);
-    snippet->widget()->setY(-snippet->anchorOffset());
-      }
-    }
-    else if (snippet->anchor() == anchorTop){
-      if (snippet->hidesContent()){
-    m_layout->addAnchor(snippet->widget(),Qt::AnchorTop, m_topBar, Qt::AnchorBottom);
-    m_layout->addAnchor(snippet->widget(), Qt::AnchorHorizontalCenter, m_topBar, Qt::AnchorHorizontalCenter);
-      }
-      else {
-    snippet->widget()->setParentItem(m_topBar);
-    snippet->widget()->setY(snippet->anchorOffset());
-      }
-    }
-    else if (snippet->anchor() == anchorLeft){
-      if (snippet->hidesContent())
-    m_layout->addAnchor(snippet->widget(),Qt::AnchorLeft, m_leftBar, Qt::AnchorRight);
-      else {
-    snippet->widget()->setParentItem(m_leftBar);
-    snippet->widget()->setX(snippet->anchorOffset());
-      }
-    }
-    else if (snippet->anchor() == anchorRight){
-      if (snippet->hidesContent())
-    m_layout->addAnchor(snippet->widget(),Qt::AnchorRight, m_rightBar, Qt::AnchorLeft);
-      else {
-    snippet->widget()->setParentItem(m_rightBar);
-    snippet->widget()->setX(-snippet->anchorOffset());
-      }
-    }
-    else if (snippet->anchor() == anchorCenter) {
-      snippet->widget()->setParentItem(m_viewPort);
-      snippet->widget()->setZValue(0.0);
-      QGraphicsAnchorLayout * vl = static_cast<QGraphicsAnchorLayout*>(m_viewPort->layout());
-      vl->addAnchor(snippet->widget(), Qt::AnchorVerticalCenter, vl, Qt::AnchorVerticalCenter);
-      vl->addAnchor(snippet->widget(), Qt::AnchorHorizontalCenter, vl, Qt::AnchorHorizontalCenter);
-    }
-    else if (snippet->anchor() == anchorTopLeft){
-      qDebug() << "Setting top left anchor";
-      m_layout->addCornerAnchors(snippet->widget(), Qt::TopLeftCorner, m_layout, Qt::TopLeftCorner);
-    }
-    else if (snippet->anchor() == anchorTopRight)
-      m_layout->addCornerAnchors(snippet->widget(), Qt::TopRightCorner, m_layout, Qt::TopRightCorner);
-    else if (snippet->anchor() == anchorBottomLeft)
-      m_layout->addCornerAnchors(snippet->widget(), Qt::BottomLeftCorner, m_layout, Qt::BottomLeftCorner);
-    else if (snippet->anchor() == anchorBottomRight)
-      m_layout->addCornerAnchors(snippet->widget(), Qt::BottomRightCorner, m_layout, Qt::BottomRightCorner);
-  }
-
+  //TODO: check new logic
+ 
   void ChromeWidget:: addSnippet(ChromeSnippet * snippet, const QString & docElementId )
   {
     m_snippets->addSnippet(snippet, docElementId);
-    snippet->widget()->setParentItem(this);
-
+    ChromeSnippet * container = 0;
     if (!snippet->parentId().isNull()){
-      ChromeSnippet * container = getSnippet(snippet->parentId());
-      if (container)
-    container->addChild(snippet);
+      container = getSnippet(snippet->parentId());
     }
-
-    anchorSnippet(snippet);
+    m_layout->addSnippet(snippet, container);
   }
 
   //NB: This really shouldn't be necessary: anchor bars should be implemented as an expanding
@@ -547,72 +367,7 @@
 
   void ChromeWidget::adjustAnchorOffset(ChromeSnippet * snippet, qreal delta)
   {
-    if (snippet->anchor() == anchorBottom)
-      m_bottomBar->setPreferredHeight(m_bottomBar->preferredHeight() + delta);
-    else if (snippet->anchor() == anchorTop)
-      m_topBar->setPreferredHeight(m_topBar->preferredHeight() + delta);
-    else if (snippet->anchor() == anchorLeft){
-      m_leftBar->setPreferredWidth(m_leftBar->preferredWidth() + delta);
-    }
-    else if (snippet->anchor() == anchorRight){
-      m_rightBar->setPreferredWidth(m_rightBar->preferredWidth() + delta);
-    }
-  }
-
-  // Call after a snippet changes to visible state
-  // (NB: does not check to see whether snippet has been
-  // correctly added to chrome (by calling addSnippet).
-  // At a minimum should assert that the anchor "bars"
-  // are not null.)
-
-  void ChromeWidget::snippetShown(ChromeSnippet * snippet)
-  {
-     if (snippet->hidesContent()) {
-        if (snippet->anchor() == anchorBottom) {
-            /* snippet->widget()->size().height() is zero for  WebChromeContainerSnippet
-               when default visible container snippet is shown, get ownerArea height instead */
-            WebChromeContainerSnippet * s = dynamic_cast<WebChromeContainerSnippet *>(snippet);
-            if (!s) {
-                m_bottomBarHeight = snippet->widget()->size().height();
-            }
-            else {
-                m_bottomBarHeight = s->ownerArea().height();
-            }
-        }
-        return;
-    }
-    if (snippet->anchor() == anchorBottom)
-      m_bottomBar->setPreferredHeight(m_bottomBar->preferredHeight() + snippet->widget()->preferredHeight());
-    else if (snippet->anchor() == anchorTop)
-      m_topBar->setPreferredHeight(m_topBar->preferredHeight() + snippet->widget()->preferredHeight());
-    else if (snippet->anchor() == anchorLeft){
-      m_leftBar->setPreferredWidth(m_leftBar->preferredWidth() + snippet->widget()->preferredWidth());
-    }
-    else if (snippet->anchor() == anchorRight){
-      m_rightBar->setPreferredWidth(m_rightBar->preferredWidth() + snippet->widget()->preferredWidth());
-    }
-  }
-
-  // Call before a snippet changes to invisible state
-  // (NB: does not check to see whether snippet has been
-  // correctly added to chrome (by calling addSnippet).
-  // At a minimum should assert that the anchor "bars"
-  // are not null.)
-
-  void ChromeWidget::snippetHiding(ChromeSnippet * snippet)
-  {
-    if (snippet->hidesContent())
-      return;
-    if (snippet->anchor() == anchorBottom)
-      m_bottomBar->setPreferredHeight(m_bottomBar->preferredHeight() - snippet->widget()->preferredHeight());
-    else if (snippet->anchor() == anchorTop)
-      m_topBar->setPreferredHeight(m_topBar->preferredHeight() - snippet->widget()->preferredHeight());
-    else if (snippet->anchor() == anchorLeft){
-      m_leftBar->setPreferredWidth(m_leftBar->preferredWidth() - snippet->widget()->preferredWidth());
-    }
-    else if (snippet->anchor() == anchorRight){
-      m_rightBar->setPreferredWidth(m_rightBar->preferredWidth() - snippet->widget()->preferredWidth());
-    }
+    m_layout->adjustAnchorOffset(snippet, delta);
   }
 
   ChromeSnippet *ChromeWidget::getSnippet(const QString & docElementId, QGraphicsItem * parent) {
@@ -658,28 +413,18 @@
     qDebug() << msg;
   }
 
-  QString ChromeWidget::getDisplayMode() const {
-    return (m_aspect==portrait)?"portrait":"landscape";
-  }
-
   void ChromeWidget::onViewInstantiated(ControllableViewBase *view) {   // slot
-    qDebug() << "ChromeWidget::onViewInstantiated: "; // << view;
     addViewToLayout(view);
   }
 
   QObject*  ChromeWidget::getDisplaySize() const
   {
-    ScriptSize * sz = new ScriptSize(size().toSize());
+    ScriptSize * sz = new ScriptSize(m_layout->size().toSize());
     m_page->mainFrame()->addToJavaScriptWindowObject("size", sz, QScriptEngine::ScriptOwnership);
     return sz;
 
   }
 
-void ChromeWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
-{
-    event->accept();
-}
-
   /*
   void ChromeWidget::addJSObjectToEngine(QObject *object)
   {
@@ -693,27 +438,17 @@
   }
   */
 
-  void ChromeWidget::setScene(QGraphicsScene *scene)
+  void ChromeWidget::emitPopupShown(const QString &popupId) 
   {
-    m_scene = scene;
-    //This is the root of the scene hierarchy
-    m_scene->addItem(this);
-
-    // For testing, turn on red dot that appears in response to various mouse events.
-    if(BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsInt("EnableTouchCircle", false)) {
-        new TouchCircleCharm(m_scene, this);
-    }
-  }
-
-  void ChromeWidget::emitPopupShown(const QString &popupId) {
-      qDebug() << "ChromeWidget::emitPopupShown: " << popupId;
       emit popupShown(popupId);
   }
 
-  void ChromeWidget::emitPopupHidden(const QString &popupId) {
+  void ChromeWidget::emitPopupHidden(const QString &popupId) 
+  {
       emit popupHidden(popupId);
   }
 
+
   void ChromeWidget::dump() {
     qDebug() << "---------------------";
     qDebug() << "ChromeWidget::dump";
--- a/ginebra2/ChromeWidget.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeWidget.h	Tue Jul 06 14:03:49 2010 +0300
@@ -34,12 +34,13 @@
 
 class MostVisitedPageStore;
 class ControllableViewBase;
-class QGraphicsSceneContextMenuEvent;
+
 using namespace WRT;
 
 namespace GVA {
 
   class ChromeSnippet;
+  class ChromeLayout;
   class ChromeDOM;
   class ChromeRenderer;
   class GinebraApplication;
@@ -53,32 +54,11 @@
   class NetworkDelegate;
   class Downloads;
 
-  enum ChromeAnchor
-  {
-    anchorNone,
-    anchorCenter,
-    anchorTop,
-    anchorBottom,
-    anchorLeft,
-    anchorRight,
-    anchorTopLeft,
-    anchorTopRight,
-    anchorBottomLeft,
-    anchorBottomRight
-  };
-
-  enum Aspect
-  {
-    portrait,
-    landscape
-  };
-
   /*!
    * \brief This class is responsible for maintaining the browser chrome and
    * most of the other major components of the application.
-   *
    */
-  class ChromeWidget : public QGraphicsWidget
+  class ChromeWidget : public QObject
   {
 
   Q_OBJECT
@@ -89,8 +69,10 @@
     void setChromeBaseDirectory(const QString dir);
     void setChromeFile(const QString file);
     void addView(ControllableViewBase * controllableView);
-    QGraphicsScene * getScene() { return m_scene; } //NB: change name to scene() !!
-    void setScene(QGraphicsScene *scene);
+
+    void addViewToLayout(ControllableViewBase * controllableView);
+    ChromeLayout * layout() { return m_layout; }
+    void setLayout(ChromeLayout * layout) { m_layout = layout; }
     ChromeRenderer * renderer() { return m_renderer; }
     ChromeDOM * dom() { return m_dom; }
     QRect getSnippetRect(const QString &docElementId);
@@ -99,42 +81,33 @@
     ControllableViewBase * getView(const QString& name);
     void showView(const QString &name);
     QWebPage * page() { return m_page; }
-    void anchorSnippet(ChromeSnippet * snippet);
     //NB: get rid of this (see comment in .cpp)!!!
     void adjustAnchorOffset(ChromeSnippet * snippet, qreal delta);
-    void anchorToView(ChromeSnippet* snippet, const QString & where = "top");
-    void detachFromView(ChromeSnippet* snippet, const QString & where = "top");
     void anchorTogether(ChromeSnippet* first, const QString &  secondId, qreal x = 0, qreal y = 0);
-    void unAnchor(ChromeSnippet* first);
-    //void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget* widget = 0);
     QGraphicsView *graphicsView() { return m_view; }
     void dump();
     QString getBaseDirectory() const { return m_baseDirectory; }
     ViewController * viewController() { return m_viewController; } // needed for UrlSearchSnippet
     QString currentView() {return m_viewController->currentView()->type() ;}
-    int bottomBarHeight() { return m_bottomBarHeight;}
     void updateChromeLayout();
     void sizeChange(QSize sz){ emit prepareForSizeChange(sz) ;}
     void emitPopupShown(const QString &popupId);
     void emitPopupHidden(const QString &popupId);
 
   public slots:
-    int width(){return (int)size().width();}
-    void snippetShown(ChromeSnippet * snippet);
-    void snippetHiding(ChromeSnippet * snippet);
     void loadStarted();
     void loadFinished(bool ok);
     void exportJSObjects();
     void exportJSObjectsToPage(QWebPage *page);
     void alert(const QString & msg);
-    qreal slideView(qreal delta);
-    qreal shrinkView(qreal delta);
     void onViewInstantiated(ControllableViewBase *view);
     void onCurrentViewChanged();
     void chromeInitialized();
     void reloadChrome();
     void loadUrlToCurrentPage(const QUrl & url);
     void pageCreated(WRT::WrtBrowserContainer * page);
+    void onResize(QSizeF size);
+    void onAspectChanged(int aspect);
 
   signals:
     void internalChromeComplete();
@@ -150,31 +123,20 @@
   public:
     Q_PROPERTY(QObjectList snippets READ getSnippets)
     QObjectList getSnippets();
-    /// \brief Returns either "portrait" or "landscape".
-    QString getDisplayMode() const;
-    Q_PROPERTY(QString displayMode READ getDisplayMode)
 
     QObject* getDisplaySize() const;
     Q_PROPERTY(QObject* displaySize READ getDisplaySize)
 
-  protected:
-    virtual void resizeEvent(QGraphicsSceneResizeEvent *ev);
-    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
-    //bool eventFilter(QObject *obj, QEvent *ev);
   private:
     void addSnippet( ChromeSnippet * snippet, const QString & docElementId);
     void getInitialSnippets();
     void clearChrome();
-    void addAnchors();
     void addJSObjectToWindow(QObject *object);
     void addJSObjectToPage(QObject *object, QWebPage *page);
     void updateMVGeometry();
-    void addViewToLayout(ControllableViewBase * controllableView);
-
     //void addJSObjectToEngine(QObject *object);
-    QGraphicsScene * m_scene;
-    QGraphicsView *m_view;
-    QGraphicsAnchorLayout *m_layout;
+    ChromeLayout * m_layout;
+    QGraphicsView *m_view; //TBD: not used?
     QString m_baseDirectory;
     QWebPage * m_page;
     ChromeRenderer * m_renderer;
@@ -183,21 +145,12 @@
     ViewController *m_viewController;
     //QList<QObject*> m_jsObjects;
     //QScriptEngine m_engine;
-    QGraphicsAnchorLayout *m_viewLayout;
-    SlidingWidget *m_viewPort;
-    QGraphicsWidget *m_topBar;
-    QGraphicsWidget *m_bottomBar;
-    QGraphicsWidget *m_leftBar;
-    QGraphicsWidget *m_rightBar;
-    //CollapsingWidget *m_viewBar;
     GinebraApplication *m_app;
-    Aspect m_aspect;
     ChromeWidgetJSObject *m_jsObject;
     LocaleDelegate *m_localeDelegate; // Owned
     DeviceDelegate *m_deviceDelegate;
     NetworkDelegate *m_networkDelegate;
     Downloads * m_downloads; // Owned
-    int m_bottomBarHeight;
   };
 
 } // end of namespace GVA
--- a/ginebra2/ChromeWidgetJSObject.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ChromeWidgetJSObject.h	Tue Jul 06 14:03:49 2010 +0300
@@ -25,6 +25,7 @@
 #include <QObject>
 #include <QUrl>
 
+#include "ChromeLayout.h"
 #include "ChromeWidget.h"
 #include "ChromeEffect.h"
 
@@ -33,8 +34,6 @@
 
 namespace GVA {
 
-class ChromeWidget;
-
 /*!
  * \defgroup JavascriptAPI Javascript API objects.
  * All classes in this group provide Javascript API access to the underlying
@@ -61,9 +60,9 @@
   ChromeWidgetJSObject(QObject *parent, ChromeWidget *chromeWidget);
 
 public slots:
-  int width() { return m_chromeWidget->width(); }
+  int width() { return m_chromeWidget->layout()->size().width(); }
   void alert(const QString & msg) { m_chromeWidget->alert(msg); }
-  qreal slideView(qreal delta) { return m_chromeWidget->slideView(delta); }
+  qreal slideView(qreal delta) { return m_chromeWidget->layout()->slideView(delta); }
   void chromeInitialized() { m_chromeWidget->chromeInitialized(); }
   void reloadChrome() { m_chromeWidget->reloadChrome(); }
   void loadUrlToCurrentPage(const QString & url) { m_chromeWidget->loadUrlToCurrentPage(url); }
@@ -89,7 +88,7 @@
   Q_PROPERTY(QObjectList snippets READ getSnippets)
 
   /// \brief Returns either "portrait" or "landscape".
-  QString getDisplayMode() const { return m_chromeWidget->getDisplayMode(); }
+  QString getDisplayMode() const { return m_chromeWidget->layout()->getDisplayMode(); }
   Q_PROPERTY(QString displayMode READ getDisplayMode)
 
   QObject* getDisplaySize() const { return m_chromeWidget->getDisplaySize(); }
--- a/ginebra2/ContentToolbarChromeItem.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentToolbarChromeItem.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -29,6 +29,7 @@
 #include "mostvisitedsnippet.h"
 #include "webpagecontroller.h"
 #include "ViewController.h"
+#include "ChromeEffect.h"
 
 
 #include <QTimeLine>
@@ -83,11 +84,12 @@
     emit  updateVisibility(step);
   }
 
-  ContentToolbarChromeItem::ContentToolbarChromeItem(QGraphicsItem* parent)
-      : ToolbarChromeItem(parent),
+  ContentToolbarChromeItem::ContentToolbarChromeItem(ChromeSnippet* snippet, QGraphicsItem* parent)
+      : ToolbarChromeItem(snippet, parent),
       m_background(NULL),
       m_state(CONTENT_TOOLBAR_STATE_FULL),
-      m_autoHideToolbar(true)
+      m_autoHideToolbar(true),
+      m_timerState(CONTENT_TOOLBAR_TIMER_STATE_ALLOW)
   {
 
     m_inactivityTimer = new QTimer(this);
@@ -96,7 +98,12 @@
     m_animator = new ToolbarFadeAnimator();
     connect(m_animator, SIGNAL(updateVisibility(qreal)), this, SLOT(onUpdateVisibility(qreal)));
     connect(m_animator, SIGNAL(finished()), this, SLOT(onAnimFinished()));
-
+    
+    m_maxOpacity = m_bgopacity = opacity();   
+    if (m_autoHideToolbar ) {
+       connect(m_snippet->chrome(), SIGNAL(chromeComplete()), this, SLOT(onChromeComplete()));
+    }
+    
     setFlags(QGraphicsItem::ItemDoesntPropagateOpacityToChildren);
 
   }
@@ -119,6 +126,29 @@
 
   }
 
+  void ContentToolbarChromeItem::mousePressEvent(QGraphicsSceneMouseEvent * ev)
+  {
+      // If we are not in full state, ignore the event. Once igonre, none of the
+      // other mouse events are received until the next mouse press
+      if (m_state == CONTENT_TOOLBAR_STATE_PARTIAL ) {
+          ev->ignore();
+      }
+      else {
+          ChromeSnippet * mv = m_snippet->chrome()->getSnippet("MostVisitedViewId");
+          // Let mostvisited snippet handle the key press if it is visible
+          if (mv && mv->isVisible() ){
+              ev->ignore();
+          }
+      }
+  }
+
+  void ContentToolbarChromeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * ev)
+  {
+      Q_UNUSED(ev);
+      // Do nothing - prevent the event from trickling down
+      
+  }
+
   void ContentToolbarChromeItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt, QWidget* widget)
   {
     Q_UNUSED(opt)
@@ -143,6 +173,10 @@
           // fill path with color
           painter->fillPath(*m_background,QBrush(grad()));
           painter->drawPath(*m_background);
+          if(m_state == CONTENT_TOOLBAR_STATE_FULL && !isEnabled()) {
+              // Disabled, apply whitewash.
+              ChromeEffect::paintDisabledRect(painter, opt->exposedRect);
+          }
           break;
         default:
           qDebug() << "ContentToolbarChromeItem::paint invalid state" ;
@@ -170,24 +204,33 @@
     //qDebug() << __PRETTY_FUNCTION__ << webView;
     if (webView ) {
         connect(webView, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
-        connect(webView, SIGNAL(loadStarted()), this, SLOT(stopInactivityTimer()));
-        connect(webView->widget(), SIGNAL(contextEvent(::WebViewEventContext *)), this, SLOT(stopInactivityTimer()));
+        connect(webView, SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
+#ifdef BEDROCK_TILED_BACKING_STORE
+        connect(webView, SIGNAL(contextEvent(::WebViewEventContext *)), this, SLOT(resetTimer()));
+#else
+        connect(webView->widget(), SIGNAL(contextEvent(::WebViewEventContext *)), this, SLOT(resetTimer()));
+#endif
     }
 
   }
 
+  void ContentToolbarChromeItem::onLoadStarted() {
+
+      m_timerState = CONTENT_TOOLBAR_TIMER_STATE_ALLOW;
+      stopInactivityTimer();
+  }
+
 
   void ContentToolbarChromeItem::onLoadFinished(bool ok) {
 
     Q_UNUSED(ok);
-    //qDebug() << __PRETTY_FUNCTION__ << m_state;
+    //qDebug() << __PRETTY_FUNCTION__ << m_state << "Timer Allowed" << m_timerState;
 
-    if (m_autoHideToolbar ) {
+    if (m_autoHideToolbar  && m_timerState == CONTENT_TOOLBAR_TIMER_STATE_ALLOW) {
         ControllableViewBase* curView = m_snippet->chrome()->viewController()->currentView();
         if (curView && curView->type() == "webView") {
             GWebContentView * gView = qobject_cast<GWebContentView*> (curView);
             bool isSuperPage = gView ? gView->currentPageIsSuperPage() : false;
-            qDebug() << "Super Page " << isSuperPage;
 
         // Start inactivity timer if full toolbar is visible 
         if (!isSuperPage && m_state ==  CONTENT_TOOLBAR_STATE_FULL ) 
@@ -196,6 +239,11 @@
     }
 
   }
+  void ContentToolbarChromeItem::resetTimer() {
+      
+      m_timerState = CONTENT_TOOLBAR_TIMER_STATE_NONE;
+      stopInactivityTimer();
+  }
 
   void ContentToolbarChromeItem::stopInactivityTimer() {
 
@@ -221,9 +269,7 @@
     //qDebug() << __PRETTY_FUNCTION__ << type ;
 
     if (type == QEvent::MouseButtonPress || type ==  QEvent::GraphicsSceneMousePress) {
-      // stop inactivity timer 
-      if (m_inactivityTimer->isActive() )
-        m_inactivityTimer->stop();
+        resetTimer();
     } 
   }
 
@@ -289,18 +335,25 @@
 
   void ContentToolbarChromeItem::onAnimFinished() {
 
+    ContentToolbarState state = CONTENT_TOOLBAR_STATE_INVALID;
+    bool animate = false;
     //qDebug() << __PRETTY_FUNCTION__ << m_state;
     switch (m_state) {
         case CONTENT_TOOLBAR_STATE_ANIM_TO_PARTIAL:
-          changeState(CONTENT_TOOLBAR_STATE_PARTIAL);
+          state = CONTENT_TOOLBAR_STATE_PARTIAL; 
           break;
         case CONTENT_TOOLBAR_STATE_ANIM_TO_FULL:
-          changeState(CONTENT_TOOLBAR_STATE_FULL, true);
+          state = CONTENT_TOOLBAR_STATE_FULL; 
+          animate = true;
           break;
         default:
           break;
 
     }
+  
+    ContentToolbarSnippet * s = static_cast<ContentToolbarSnippet*>(m_snippet);
+    s->handleToolbarStateChange(state);
+    changeState(state, animate);
     //qDebug() << __PRETTY_FUNCTION__ << m_state;
 
   }
--- a/ginebra2/ContentToolbarChromeItem.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentToolbarChromeItem.h	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 #define __GINEBRA_CONTENTTOOLBARCHROMEITEM_H
 
 #include <QtGui>
+#include "Toolbar.h"
 #include "ToolbarChromeItem.h"
 
 class QTimeLine;
@@ -59,17 +60,8 @@
   {
     Q_OBJECT
 
-    enum  ContentToolbarState {
-
-      CONTENT_TOOLBAR_STATE_FULL,
-      CONTENT_TOOLBAR_STATE_PARTIAL,
-      CONTENT_TOOLBAR_STATE_ANIM_TO_PARTIAL,
-      CONTENT_TOOLBAR_STATE_ANIM_TO_FULL,
-      CONTENT_TOOLBAR_STATE_INVALID
-    };
-
     public:
-      ContentToolbarChromeItem(QGraphicsItem* parent = 0);
+      ContentToolbarChromeItem(ChromeSnippet* snippet, QGraphicsItem* parent = 0);
       virtual ~ContentToolbarChromeItem();
       virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* opt, QWidget* widget);
       virtual void setSnippet(ChromeSnippet * s);
@@ -80,12 +72,18 @@
 
     protected:
       virtual void resizeEvent(QGraphicsSceneResizeEvent * ev);
+      /// Reimplemented to consume the events
+      virtual void mousePressEvent( QGraphicsSceneMouseEvent * ev );
+      virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent * ev );
+
 
 
     private slots:
       void onChromeComplete();
       void stopInactivityTimer();
       void onLoadFinished(bool);
+      void onLoadStarted();
+      void resetTimer();
       void onInactivityTimer();
       void onSnippetMouseEvent( QEvent::Type type);
 
@@ -114,6 +112,7 @@
       qreal m_maxOpacity;
       ContentToolbarState m_state;
       bool m_autoHideToolbar;
+      ContentToolbarTimerState m_timerState;
   };
 
 } // end of namespace GVA
--- a/ginebra2/ContentToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -1,3 +1,4 @@
+
 /*
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
@@ -17,27 +18,28 @@
 *
 * Description:
 * This class extends WebChromeContainerSnippet class to hold the
-* content view toolbar buttons
-* Note: Showing/Hiding of the sub-chrome snippets in response to
-* the button selection is not entirely done here as we have a
-* a hybrid html-native design.
+* content view toolbar buttons. Showing/Hiding of the sub-chrome snippets in response to
+* the button selection is not entirely done here as we have a hybrid html-native design.
 * MostVisited: Show/Hide is handled in handleMVButton.
 * Menu: Show is handled in Javascript. Hide is handled here.
-* Zoom: Show/Hide is handled here
+* Zoom: Show/Hide is handled here. Zoom action buttons
 * Note: Most Visited is native while Menu and Zoom are html based. All three of them need to 
 * be dismissed if the user taps anywhere else on the screen. Since mv is native, it handles
 * all mouse events and dismisses itself. Zoom/Menu are created as PopupChromeItem which receives
 * the mouse events in its event filter and emits a signal if the user taps anywhere on the screen
 * other than itself. This signal is handled here.
+* Sub-chromes are hidden after a specified timeout if there is no user interaction with the
+* particular chrome. This class listens to the mouse events of the sub-chromes and
+* their children to manage this.
 *
 */
 
 #include "ContentToolbarSnippet.h"
 #include "ContentToolbarChromeItem.h"
 #include "mostvisitedsnippet.h"
-#include "Toolbar.h"
 #include "ViewStack.h"
 #include "webpagecontroller.h"
+#include "ExternalEventCharm.h"
 
 #include <QDebug>
 
@@ -45,8 +47,8 @@
 namespace GVA {
 
 
-  ContentToolbarSnippet::ContentToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-                       : ToolbarSnippet(elementId, chrome, ownerArea, element, widget),
+  ContentToolbarSnippet::ContentToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+                       : ToolbarSnippet(elementId, chrome, element),
                        m_middleSnippet(NULL),
                        m_subChromeSnippet(NULL)
   {
@@ -62,19 +64,26 @@
       delete m_subChromeInactiveTimer;
   }
 
+  ContentToolbarSnippet * ContentToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+  {
+      ContentToolbarSnippet * that = new ContentToolbarSnippet( elementId, chrome, element );
+      that->setChromeWidget( new ContentToolbarChromeItem( that ) );
+      return that;
+  }
+  
   void ContentToolbarSnippet::updateSize(QSize size) {
-      //qDebug() << "ContentToolbarSnippet::updateSize" << size.width() ;
-      setWidth(size.width());
-      ToolbarSnippet::updateSize(size);
+    //qDebug() << "ContentToolbarSnippet::updateSize" << size.width() ;
+    setWidth(size.width());
+    ToolbarSnippet::updateSize(size);
 
   }
 
   void ContentToolbarSnippet::updateOwnerArea() {
 
 
-      //qDebug() << "ContentToolbarSnippet::updateOwnerArea" << m_chrome->width() ;
-      setWidth(m_chrome->width());
-      ToolbarSnippet::updateOwnerArea();
+    //qDebug() << "ContentToolbarSnippet::updateOwnerArea" << m_chrome->width() ;
+    setWidth(m_chrome->layout()->size().width());
+    ToolbarSnippet::updateOwnerArea();
 
       //qDebug()  << "------------Relayout "<< elementId() << hidesContent();
       // If hidesContent is true, it means that the snippet is tied to the chrome's layout. Hence, we
@@ -83,8 +92,8 @@
       // that would cause the this snippet to be painted in incorrect position before the layoutRequest
       // is handled
       if (hidesContent() ) {
-          chrome()->layout()->invalidate();
-          chrome()->layout()->activate();
+	chrome()->layout()->layout()->invalidate();
+	chrome()->layout()->layout()->activate();
       }
   }
 
@@ -113,37 +122,37 @@
       if (id == "BackButtonSnippet" ) {
           t->actionId = CONTENT_VIEW_ACTION_BACK;
           t->actionName = CONTENT_TOTOLBAR_BACK;
-          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
+          t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
           t->disabledImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_disabled.png";
-          t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
+          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
       }
       else if (id  == "ZoomButtonSnippet" ) {
           t->actionId = CONTENT_VIEW_ACTION_ZOOM;
           t->actionName = CONTENT_TOTOLBAR_ZOOM;
-          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom.png";
+          t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom.png";
           t->disabledImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_disabled.png";
-          t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_pressed.png";
+          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_pressed.png";
       }
       else if (id == "MenuButtonSnippet" ) {
           t->actionId = CONTENT_VIEW_ACTION_MENU;
           t->actionName = CONTENT_TOTOLBAR_MENU;
-          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_menu.png";
+          t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_menu.png";
           t->disabledImg = "";
-          t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_menu_pressed.png";
+          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_menu_pressed.png";
       }
       else if (id == "MostVisitedButtonSnippet" ) {
           t->actionId = CONTENT_VIEW_ACTION_MOSTVISITED;
           t->actionName = CONTENT_TOTOLBAR_MOSTVISITED;
-          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited.png";
+          t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited.png";
           t->disabledImg = "";
-          t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited_pressed.png";
+          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited_pressed.png";
       }
       else if (id == "ToggleTBButtonSnippet" ) {
           t->actionId = CONTENT_VIEW_ACTION_TOGGLETB;
           t->actionName = CONTENT_TOTOLBAR_TOGGLETB;
-          t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB.png";
+          t->normalImg = TOOLBAR_FULL_TB_TOGGLE_ICON;
           t->disabledImg = "";
-          t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB_pressed.png";
+          t->activeImg = TOOLBAR_FULL_TB_SELECTED_TOGGLE_ICON;
       }
       t->id = id;
       m_actionInfo.append(t);
@@ -156,7 +165,7 @@
           connect(child, SIGNAL(childAdded(ChromeSnippet*)), this, SLOT(childAdded(ChromeSnippet*)));
           m_middleSnippet = s;
           // Set the snippet width
-          setWidth(m_chrome->width());
+          setWidth(m_chrome->layout()->size().width());
       }
       else  {
           addActionInfo(child->elementId());
@@ -174,6 +183,7 @@
       // Connect back to initialLayoutCompleted signal
       ActionButtonSnippet * button  =  getActionButtonSnippet(CONTENT_VIEW_ACTION_BACK);
       connect(WebPageController::getSingleton(), SIGNAL(initialLayoutCompleted()), button->widget(), SLOT(onHidden()));
+      connect(WebPageController::getSingleton(), SIGNAL(loadFinished(bool)), button->widget(), SLOT(onHidden()));
 
       connect(m_chrome, SIGNAL(aspectChanged(int)) , this, SLOT(onAspectChanged()));
 
@@ -191,7 +201,6 @@
        * widget's mosueEvent signal
        */
       QList<QGraphicsItem *> items = it->childItems();
-      ContentToolbarChromeItem * w = static_cast<ContentToolbarChromeItem*>(widget());
       //qDebug() << " ------------------- Num of children " << items.count();
       for (int i = 0; i < items.count() ; i++) {
 
@@ -205,40 +214,67 @@
                 manageChildren(item);
               }
               else { // Individual item
-                  //qDebug() << "Item: " << item->snippet()->elementId();
-                  if (w->autoHideToolbar()) {
-                      connect(item, SIGNAL(mouseEvent(QEvent::Type)), w, SLOT(onSnippetMouseEvent(QEvent::Type)));
-                  }
-                  // Connect to the mouse event to show selected image on key press
-                  //connect(item, SIGNAL(mouseEvent( QEvent::Type )), this, SLOT(onMouseEvent(QEvent::Type)));
-                  setAction(item->snippet());
-
-
-                  ChromeSnippet * link = item->snippet()->linkedSnippet();
+                //qDebug() << "Item: " << item->snippet()->elementId();
+                ContentToolbarChromeItem * w = static_cast<ContentToolbarChromeItem*>(widget());
+                if (w->autoHideToolbar()) {
+                    // Connect to the snippet's mouse event to cancel auto-timeout
+                    connect(item, SIGNAL(mouseEvent(QEvent::Type)), w, SLOT(onSnippetMouseEvent(QEvent::Type)));
+                }
 
-                  if (link) {
-                      ChromeItem* it = dynamic_cast <ChromeItem * > (link->widget());
-                      if (it ) {
-                          connect(it, SIGNAL(mouseEvent(QEvent::Type)), this, SLOT(onSnippetMouseEvent(QEvent::Type)));
-                          // Save the linked children to be used later for hiding
-                          w->addLinkedChild(link);
-
-                          // In case it has more children, recurse
-                          manageChildren(it);
-                    }
-                }
+                setAction(item->snippet());
+                manageLink(item);
             }
         }
     }
 
   }
 
+  void ContentToolbarSnippet::manageLink(ChromeItem * item) {
+
+      // If it has a linked snippet, connect to it's mouse event and also
+      // to it's children's mouse events
+      ChromeSnippet * link = item->snippet()->linkedSnippet();
+      if (link) {
+          ChromeItem* it = dynamic_cast <ChromeItem * > (link->widget());
+          if (it ) {
+              // Connect to linked snippet's mouse events to control the sub-chrome 
+              connect(it, SIGNAL(mouseEvent(QEvent::Type)), this, SLOT(onSnippetMouseEvent(QEvent::Type)));
+
+              // Save the linked children to be used later for hiding
+              ContentToolbarChromeItem * w = static_cast<ContentToolbarChromeItem*>(widget());
+              w->addLinkedChild(link);
+
+              // In case it has children, connect to their mouse events as well
+              QList<QGraphicsItem *> childItems = it->childItems();
+              int count = childItems.count();
+
+              // If the linked snippet has children that are widgets themselves, listen to their
+              // mouse events as well. 
+              for (int i = 0; i < count ; i++) {
+                  ChromeItem * child =  dynamic_cast<ChromeItem* >(childItems.at(i));
+
+                  // To control sub-chrome timer
+                  connect(child, SIGNAL(mouseEvent(QEvent::Type)), this, SLOT(onSnippetMouseEvent(QEvent::Type)));
+              }
+          }
+      }
+  }
+
 
   void ContentToolbarSnippet::setAction(ChromeSnippet * s) {
 
       //qDebug() << "setAction: " << s->elementId();
       ToolbarSnippet::setAction(s);
       ActionButtonSnippet * button  = static_cast<ActionButtonSnippet*> (s);
+
+      // Set selected on press to false here so that we can control when to
+      // change action button icon state
+      button->setActiveOnPress(false); 
+      button->getDefaultAction()->setCheckable(true);
+
+      ChromeItem * item = static_cast<ChromeItem*>(s->widget());
+      connect(item, SIGNAL(mouseEvent( QEvent::Type )), this, SLOT(onMouseEvent(QEvent::Type)));
+
       int index = getIndex(s);
 
       if (index != -1) {
@@ -275,7 +311,8 @@
 
       // Connect to hide and show signals of the linked snippet
       connectHideShowSignals(button);
-      connect( button->linkedSnippet(),  SIGNAL(externalMouseEvent(int, const QString , const QString )), this, SLOT(onExternalMouse(int, const QString , const QString)));
+      connect( button->linkedSnippet(),  SIGNAL(externalMouseEvent(QEvent *, const QString , const QString )), this, SLOT(onExternalMouse(QEvent *, const QString , const QString)));
+
      
   }
 
@@ -288,7 +325,7 @@
 
       // Connect to hide and show signals of the linked snippet
       connectHideShowSignals(button);
-      connect( button->linkedSnippet(),  SIGNAL(externalMouseEvent(int, const QString , const QString )), this, SLOT(onExternalMouse(int, const QString , const QString)));
+      connect( button->linkedSnippet(),  SIGNAL(externalMouseEvent(QEvent *, const QString , const QString )), this, SLOT(onExternalMouse(QEvent *, const QString , const QString)));
       
   }
 
@@ -317,20 +354,24 @@
       ActionButtonSnippet * button  = getActionButtonSnippet(CONTENT_VIEW_ACTION_ZOOM);
       ChromeSnippet * zoomSnippet = button->linkedSnippet();
 
-      //qDebug() << "ContentToolbarSnippet::handleZoomButton() : Show flag: "  << zoomSnippet->getDontShowFlag() << "Checked " << button->isChecked();
 
-      // Zoom bar is dismissed if the user taps anywhere on the screen. We get externalMouseEvent 
-      // if the user presses the button also. In addition to that the action is triggered and the
-      // handler is called. In this case, we don't need to do anything, so we use the DontShowFlag
-      // to determine if there is any action needed.
-      if (zoomSnippet->getDontShowFlag() ){
-          // Set selected state to false as it gets enabled in ActionButton mousePressEvent handling
-          button->setLatched(false);
-          zoomSnippet->setDontShowFlag(false);
+      if (zoomSnippet->isVisible() ) {
+          zoomSnippet->hide();  
       }
       else {
           hideOtherPopups(button->elementId());
-          zoomSnippet->show();          
+          zoomSnippet->show();  
+
+          // Show the action buttons. We can get the snippets by their id or do this to show them.
+          ChromeItem* it = dynamic_cast <ChromeItem * > (zoomSnippet->widget());
+          QList<QGraphicsItem *> childItems = it->childItems();
+          int count = childItems.count();
+
+          for (int i = 0; i < count ; i++) {
+              ChromeItem * child =  dynamic_cast<ChromeItem* >(childItems.at(i));
+              child->snippet()->show();
+          
+          }
       }
 
   }
@@ -340,20 +381,14 @@
       ActionButtonSnippet * button  = getActionButtonSnippet(CONTENT_VIEW_ACTION_MENU);
       ChromeSnippet * menuSnippet = button->linkedSnippet();
 
-      //qDebug() << "ContentToolbarSnippet::handleMenuButton() : Show flag: "  << button->linkedSnippet()->getDontShowFlag()  << "Checked: " << button->isChecked();
-      if (menuSnippet  ) {
-              //qDebug() << "ContentToolbarSnippet::handleMenuButton() : Dont show flag " << menuSnippet->getDontShowFlag();
-          if (menuSnippet->getDontShowFlag() ){
-              // Set selected state to false as it gets enabled in ActionButton mousePressEvent handling
-              button->setLatched(false);
-              menuSnippet->setDontShowFlag(false);
-          }
-          else {
-              // Hide other pop-ups if any. Showing the menu is handled in
-              // javascript
-              emit menuButtonSelected();
-              hideOtherPopups(button->elementId());
-          }
+      if (!menuSnippet->isVisible() ) {
+
+          emit menuButtonSelected();
+          hideOtherPopups(button->elementId());
+      
+      }
+      else {
+          menuSnippet->hide();
       }
 
   }
@@ -367,11 +402,8 @@
   }
 
  void ContentToolbarSnippet::handleToggleTBButton() {
-     ActionButtonSnippet * button  = getActionButtonSnippet(CONTENT_VIEW_ACTION_TOGGLETB);
      ContentToolbarChromeItem * w = static_cast<ContentToolbarChromeItem*>(widget());
-     
      w->toggleMiddleSnippet();
-     button->updateButtonState(false);
   }
 
 
@@ -445,16 +477,17 @@
       ActionButton* button  = static_cast<ActionButton*> ( sender());
       ActionButtonSnippet * buttonSnippet =  static_cast<ActionButtonSnippet*>( button->snippet());
       ChromeSnippet * linkedSnippet = buttonSnippet->linkedSnippet();
-      //qDebug() << "ContentToolbarSnippet::onMouseEvent : Button : " << buttonSnippet->elementId() << " type: " << type  << "Is Enabled " << button->defaultAction()->isEnabled();
+      //qDebug() << "ContentToolbarSnippet::onMouseEvent : Button : " << buttonSnippet->elementId() << " type: " << type ;
       
       // Set the action button state to active so that we can show a selected image before the
       // action is acted upon
-      if (button->defaultAction()->isEnabled() && type == QEvent::GraphicsSceneMousePress ) {
+      if ( (button->defaultAction()->isEnabled() && type == QEvent::GraphicsSceneMousePress ) ||  
+           (button->defaultAction()->isEnabled() && type == QEvent::GraphicsSceneMouseDoubleClick )) {
 
           // Set active flag if there is no linked snippet (the button acts as toggle if it
           // has a linked snippet. If there is linked snippet, set active flag if the linked snippet 
-          // is not visible and dont show flag is false
-          if (!linkedSnippet || (linkedSnippet && (!linkedSnippet->isVisible() &&  !linkedSnippet->getDontShowFlag()))){
+          // is not visible
+          if (!linkedSnippet || (linkedSnippet && (!linkedSnippet->isVisible() ))) {
               buttonSnippet->setActive(true);
           } 
       }
@@ -526,25 +559,74 @@
       }
 
   }
-  void ContentToolbarSnippet::onExternalMouse( int type,
+  void ContentToolbarSnippet::onExternalMouse( QEvent * ev ,
                                                const QString & name,
                                                const QString & description) {
 
-      Q_UNUSED(type);
       Q_UNUSED(description);
       ChromeSnippet * snippet = static_cast<ChromeSnippet *> (sender());
-      //qDebug() << "ContentToolbarSnippet::onExternalMouse"  << snippet->elementId() << name;
+      QGraphicsSceneMouseEvent * me = static_cast<QGraphicsSceneMouseEvent*>(ev);
+      ChromeSnippet * linkedButton = getLinkedButton(snippet);
+
+      // For sub-chromes like zoom and menu, we get mouse events anywhere on the
+      // screen including the ones on the corresponding button on the toolbar. Hide
+      // the sub-chrome only if the mouse press is anywhere other than the 
+      // corresponding button
+      if (linkedButton )  {
+          ChromeItem * item =  static_cast<ChromeItem* >(linkedButton->widget());
+          if (item && item->sceneBoundingRect().contains(me->scenePos() )) {
+              return;
+          }
+      }
     
-      if (name  == "QGraphicsSceneMousePressEvent" || name == "QGraphicsSceneResizeEvent" ) {
+      if (name  == ExternalEventCharm::s_mouseClick) {
           snippet->hide();
-          snippet->setDontShowFlag(true);
-          QTimer::singleShot(500, snippet, SLOT(disableDontShowFlag()));
       }
 
       
   }
 
 
+void ContentToolbarSnippet::handleToolbarStateChange(ContentToolbarState state){
+
+
+    ActionButtonSnippet * button  =  getActionButtonSnippet(CONTENT_VIEW_ACTION_TOGGLETB);
+
+    // set the appopriate icons based on the state
+
+    if (state != CONTENT_TOOLBAR_STATE_INVALID ) {
+        if (state  == CONTENT_TOOLBAR_STATE_PARTIAL ) {
+            button->setIcon(TOOLBAR_PARTIAL_TB_TOGGLE_ICON);
+            button->setActiveIcon(TOOLBAR_PARTIAL_TB_SELECTED_TOGGLE_ICON);
+        }
+        else if (state == CONTENT_TOOLBAR_STATE_FULL ) {
+            button->setIcon(TOOLBAR_FULL_TB_TOGGLE_ICON);
+            button->setActiveIcon(TOOLBAR_FULL_TB_SELECTED_TOGGLE_ICON);
+
+        }
+        // Also reset the button state if the change in state was triggered by toggle-button selection 
+        button->updateButtonState(false);
+
+    }
+}  
+
+ChromeSnippet* ContentToolbarSnippet::getLinkedButton(ChromeSnippet * snippet ) {
+
+    ChromeSnippet * linkedButton = NULL;
+    for (int i = 0; i < m_actionInfo.size() ; i++ ) {
+        ToolbarActions_t * t = m_actionInfo.at(i);
+        ChromeSnippet * s = getActionButtonSnippet (t->actionId) ;
+        if (s->linkedSnippet() && s->linkedSnippet()->elementId() == snippet->elementId() )  {
+            linkedButton = s;
+            break;
+        }
+
+    }
+    return linkedButton;
+
+
+}
+
 } // end of namespace GVA
 
 
--- a/ginebra2/ContentToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 
 #include <QtGui>
 #include "ActionButtonSnippet.h"
+#include "Toolbar.h"
 #include "ToolbarSnippet.h"
 #include "WebChromeContainerSnippet.h"
 
@@ -35,10 +36,13 @@
   {
     Q_OBJECT
   public:
-    ContentToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    ContentToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~ContentToolbarSnippet();
 
+    static ContentToolbarSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     WebChromeContainerSnippet * middleSnippet() { return m_middleSnippet;}
+    void handleToolbarStateChange(ContentToolbarState);
+
   Q_SIGNALS:
     void menuButtonSelected();
     void menuButtonCanceled();
@@ -52,12 +56,18 @@
     void childAdded(ChromeSnippet* child);
     void updateOwnerArea();
     void updateSize(QSize );
+
+    /// Slot that sets the state of the action button to active. Handles mouseEvent signal of toolbar
+    /// action buttons and any sub-chrome children action buttons
     void onMouseEvent( QEvent::Type type); 
+
+    /// Slot that resets the timer that controls the sub-chrome. Handles mouseEvent signal of the sub-chrome
+    /// as well as those of the sub-chrome chidlren's
     void onSnippetMouseEvent( QEvent::Type type); 
     void onHidden();
     void onShown();
     void onInactivityTimer();
-    void onExternalMouse(int type, const QString & name, const QString & description);
+    void onExternalMouse(QEvent * ev, const QString & name, const QString & description);
     void onAspectChanged( ); 
 
 
@@ -76,7 +86,8 @@
     void setWidth(int);
     void resetTimer(bool start=true);
     void hideOtherPopups(QString); 
-
+    void manageLink(ChromeItem * item) ;
+    ChromeSnippet* getLinkedButton(ChromeSnippet * snippet );
 
 
     WebChromeContainerSnippet* m_middleSnippet;
--- a/ginebra2/ContentViews/GContentViewTouchNavigation.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GContentViewTouchNavigation.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -30,5 +30,4 @@
     install();
     connect(m_view, SIGNAL(BlockFocusChanged(QPoint)), this, SLOT(BlockFocusChanged(QPoint)));
 }
-
 }
--- a/ginebra2/ContentViews/GContentViewTouchNavigation.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GContentViewTouchNavigation.h	Tue Jul 06 14:03:49 2010 +0300
@@ -25,6 +25,7 @@
 #include <QObject>
 #include "GWebTouchNavigation.h"
 #include "GWebContentViewWidget.h"
+#include "ChromeLayout.h"
 #include "ChromeWidget.h"
 
 namespace GVA
@@ -40,17 +41,22 @@
         GContentViewTouchNavigation(QWebPage* webPage, GWebContentViewWidget* view);
         void setChromeWidget(ChromeWidget* chrome) { m_chrome = chrome;}
 
+        Q_PROPERTY(qreal doubleClickEnabled READ getDoubleClickEnabled WRITE setDoubleClickEnabled)
+        qreal getDoubleClickEnabled() const { return m_doubleClickEnabled; }
+        void setDoubleClickEnabled(qreal value)  { m_doubleClickEnabled = value; }
+    
     protected:
         GWebContentViewWidget *contentViewWidget() { return static_cast<GWebContentViewWidget*>(m_view); }
 
-        virtual qreal slideView(qreal delta) { return m_chrome->slideView(delta); }
-        virtual qreal shrinkView(qreal delta) { return m_chrome->shrinkView(delta); }
+        virtual qreal slideView(qreal delta) { return m_chrome->layout()->slideView(delta); }
+        virtual qreal shrinkView(qreal delta) { return m_chrome->layout()->shrinkView(delta); }
         virtual qreal viewInitialScale() { return contentViewWidget()->initialScale(); }
         virtual void setViewBlockElement(const QWebElement &el) { contentViewWidget()->setBlockElement(el); }
         virtual void setViewZoomFactor(qreal zoom) { return contentViewWidget()->setZoomFactor(zoom); }
 
     protected:
         ChromeWidget* m_chrome;
+    
     };
 
 }
--- a/ginebra2/ContentViews/GWebContentView.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GWebContentView.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,11 +22,19 @@
 #include "GWebContentView.h"
 #include "GWebContentViewWidget.h"
 #include "GWebContentViewJSObject.h"
+#include "SuperPageView.h"
 #include "ChromeWidget.h"
 #include "WebViewEventContext.h"
 #include "browserpagefactory.h"
 #include "wrtbrowsercontainer.h"
+
+#ifdef BEDROCK_TILED_BACKING_STORE
+#include "WebContentViewWidget.h"
+#endif
+
 #include "webpagecontroller.h"
+#include "Utilities.h"
+#include "GSuperWebPage.h"
 #ifndef NO_QSTM_GESTURE
 #include "qstmgestureevent.h"
 #endif
@@ -39,10 +47,6 @@
 #include <QDebug>
 #include <QtGui>
 
-
-#define safe_connect(src, srcSig, target, targetSlot) \
-  { int res = connect(src, srcSig, target, targetSlot); assert(res); }
-
 namespace GVA {
 
 
@@ -66,11 +70,20 @@
       m_enabled(true)
   {
       setObjectName(objectName);
-      qDebug() << "GWebContentView::GWebContentView: this=" << this;
       WRT::WrtBrowserContainer* page = BrowserPageFactory::openBrowserPage();
 
       setActions();
+
+#ifdef BEDROCK_TILED_BACKING_STORE
+      m_widget = new WebContentViewWidget(parent, page);
+      connect(m_widget
+              , SIGNAL(updateZoomActions(bool,bool))
+              , this
+              , SLOT(setZoomActions(bool, bool)));
+#else
       m_widget = new GWebContentViewWidget(parent, this, page);
+#endif
+
 #ifndef __gva_no_chrome__
       setJSObject(objectName);
 #endif
@@ -79,10 +92,16 @@
       webWidget()->page()->currentFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
       webWidget()->page()->currentFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
 
+#ifndef BEDROCK_TILED_BACKING_STORE
 #ifdef NO_QSTM_GESTURE
       m_touchNavigation = new GContentViewTouchNavigation(page, m_widget);
       m_touchNavigation->setChromeWidget(m_chrome);
-      connect(m_touchNavigation, SIGNAL(mouseEvent(QEvent::Type)) , this, SIGNAL(contentViewMouseEvent(QEvent::Type)));
+      m_touchNavigation->setParent(m_jsObject);
+      m_touchNavigation->setObjectName("touchNav");
+      safe_connect(m_touchNavigation, SIGNAL(mouseEvent(QEvent::Type)) , this, SIGNAL(contentViewMouseEvent(QEvent::Type)));
+      safe_connect(m_touchNavigation, SIGNAL(longPressEvent(QPoint)),
+                   webWidget(), SLOT(onLongPressEvent(QPoint)));
+#endif
 #endif
       WRT::WrtBrowserContainer * wrtPage = static_cast<WRT::WrtBrowserContainer *>(page);
       if (wrtPage) {
@@ -96,17 +115,36 @@
   GWebContentView::~GWebContentView() {
       disconnect(m_jsObject);
       disconnect(webWidget());
+#ifndef BEDROCK_TILED_BACKING_STORE
       delete m_touchNavigation;
+#endif
       foreach(QAction * action, m_actions) {
           delete action;
       }
 
       delete m_widget;
-      foreach(GWebPage *page, m_superPages) {
+      foreach(GSuperWebPage *page, m_superPages) {
           delete page;
       }
   }
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+void GWebContentView::zoomIn(qreal deltaPercent)
+{
+    //FIX ME : Do we need deltaPercent?
+    Q_UNUSED(deltaPercent);
+    m_widget->setPageZoom(true);
+}
+
+void GWebContentView::zoomOut(qreal deltaPercent)
+{
+    //FIX ME : Do we need deltaPercent?
+    Q_UNUSED(deltaPercent);
+    m_widget->setPageZoom(false);
+}
+#endif
+
+#ifndef BEDROCK_TILED_BACKING_STORE
 void GWebContentView::bitmapZoomStop()
 {
     if (m_timer) {
@@ -206,12 +244,30 @@
     }
 }
 
+#endif
   void GWebContentView::connectAll() {
     //qDebug() << "GWebContentView::connectAll: " << widget();
 
 #ifndef __gva_no_chrome__
+#ifndef BEDROCK_TILED_BACKING_STORE
     safe_connect(widget(), SIGNAL(contextEvent(::WebViewEventContext *)),
                  m_jsObject, SLOT(onContextEvent(::WebViewEventContext *)));
+#else
+    safe_connect(this
+                 , SIGNAL(contextEvent(::WebViewEventContext*))
+                 ,  m_jsObject
+                 , SLOT(onContextEvent(::WebViewEventContext*)));
+
+    safe_connect(m_widget
+                , SIGNAL(contextEventObject(QWebHitTestResult*))
+                , this
+                , SLOT(handleContextEventObject(QWebHitTestResult*)));
+
+    safe_connect(m_widget
+                 , SIGNAL(viewScrolled(QPoint&, QPoint&))
+                 , this
+                 , SLOT(handleViewScrolled(QPoint&, QPoint&)));
+#endif
     QObject::connect(webWidget(), SIGNAL(titleChanged(const QString &)), m_jsObject, SIGNAL(titleChanged(const QString &)));
     QObject::connect(webWidget(), SIGNAL(loadStarted()), m_jsObject, SIGNAL(loadStarted()));
     QObject::connect(webWidget(), SIGNAL(loadProgress(int)), m_jsObject, SIGNAL(loadProgress(int)));
@@ -226,8 +282,12 @@
     QObject::connect(this, SIGNAL(forwardEnabled(bool)), m_jsObject, SIGNAL(forwardEnabled(bool)));
     QObject::connect(this, SIGNAL(loadFinished(bool)), m_jsObject, SIGNAL(loadFinished(bool)));
     QObject::connect(this, SIGNAL(secureConnection(bool)), m_jsObject, SIGNAL(secureConnection(bool)));
+#ifndef BEDROCK_TILED_BACKING_STORE
     connect(m_touchNavigation, SIGNAL(startingPanGesture(int)), m_jsObject, SIGNAL(startingPanGesture(int)));
 #endif
+	QObject::connect(this, SIGNAL(superPageShown(const QString&)), m_jsObject, SIGNAL(superPageShown(const QString&)));    
+     
+#endif
     connect(WebPageController::getSingleton(), SIGNAL(pageCreated(WRT::WrtBrowserContainer*)),
             this, SLOT(pageCreated(WRT::WrtBrowserContainer*)));
     connect(WebPageController::getSingleton(), SIGNAL(pageChanged(WRT::WrtBrowserContainer*, WRT::WrtBrowserContainer*)),
@@ -250,9 +310,15 @@
     return static_cast<QGraphicsWidget*>(m_widget);
   }
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+  QGraphicsWebView* GWebContentView::webWidget() const {
+    return m_widget->webView();
+  }
+#else
   GWebContentViewWidget *GWebContentView::webWidget() const {
     return m_widget;
   }
+#endif
 
   QString GWebContentView::title() const {
     return webWidget()->title();
@@ -263,7 +329,11 @@
   }
 
   QWebPage* GWebContentView::wrtPage() {
+#ifdef BEDROCK_TILED_BACKING_STORE
+    return m_widget->page();
+#else
     return m_widget->wrtPage();
+#endif
   }
 
   void GWebContentView::setActions(){
@@ -303,7 +373,6 @@
 
   void GWebContentView::triggerAction(const QString & action)
   {
-    qDebug() << "GWebContentView::triggerAction: " << action;
     QWebPage::WebAction webAction;
     if (action=="Stop")
       webAction = QWebPage::Stop;
@@ -325,6 +394,7 @@
   }
 
   void GWebContentView::changeZoomAction(qreal zoom){
+  #ifndef BEDROCK_TILED_BACKING_STORE
     if (!webWidget()) return;
     if (!(webWidget()->isUserScalable() ) ){
         deactivateZoomActions();
@@ -346,24 +416,53 @@
          zoomInAction->setEnabled(true);
       }
     }
+#endif
   }
 
   void GWebContentView::setZoomFactor(qreal factor){
     if (webWidget())
+#ifdef BEDROCK_TILED_BACKING_STORE
+        webWidget()->setScale(factor);
+#else
         webWidget()->setZoomFactor(factor);
+#endif
   }
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+QGraphicsWidget* GWebContentView::webWidgetConst()  {
+    return m_widget;
+}
+
+void GWebContentView::setZoomActions(bool enableZoomIn, bool enableZoomOut)
+{
+    m_actions.value("zoomIn")->setEnabled(enableZoomIn);
+    m_actions.value("zoomOut")->setEnabled(enableZoomOut);
+}
+  qreal GWebContentView::getZoomFactor(){
+    return webWidgetConst() ? webWidgetConst()->scale() : 0.0;
+  }
+
+#else
   qreal GWebContentView::getZoomFactor() const {
     return webWidgetConst() ? webWidgetConst()->zoomFactor() : 0.0;
   }
-
-  void GWebContentView::activate() {
-      qDebug() << "GWebContentView::activate";
-      ControllableViewBase::activate();
+#endif
+  
+void GWebContentView::activate() {
+#ifdef BEDROCK_TILED_BACKING_STORE
+    WRT::WrtBrowserContainer* newPage = WebPageController::getSingleton()->currentPage();
+    changeContentViewZoomInfo(newPage);
+#endif
+    ControllableViewBase::activate();
   }
 
   void GWebContentView::deactivate() {
-      qDebug() << "GWebContentView::deactivate";
+#ifdef BEDROCK_TILED_BACKING_STORE
+    if (!currentPageIsSuperPage()) {
+        WRT::WrtBrowserContainer* currentPage = WebPageController::getSingleton()->currentPage();
+        currentPage->setPageZoomMetaData(m_widget->currentPageInfo());
+    }
+#endif
       ControllableViewBase::deactivate();
   }
 
@@ -479,7 +578,6 @@
 
   void GWebContentView::back()
   {
-    qDebug() << "GWebContentView::back";
     webWidget()->back();
   }
 
@@ -526,10 +624,12 @@
 
   void GWebContentView::updateZoom(qreal delta){
     Q_UNUSED(delta)
+#ifndef BEDROCK_TILED_BACKING_STORE
     if (m_zoomIn)
       zoomBy(0.1);
     else
       zoomBy(-0.1);
+#endif
   }
 
   void GWebContentView::onUrlChanged(const QUrl& url)
@@ -542,9 +642,8 @@
       emit secureConnection(false);
   }
 
-  GWebPage *GWebContentView::createSuperPage(const QString &name, bool persist) {
-    qDebug() << "GWebContentView::createSuperPage: " << name;
-    GWebPage *page = 0;
+  GSuperWebPage *GWebContentView::createSuperPage(const QString &name, bool persist) {
+    GSuperWebPage *page = 0;
     PageMap::iterator it = m_superPages.find(name);
     // If page doesn't exist create a new one.
     if (it == m_superPages.end()) {
@@ -565,8 +664,7 @@
           //No history for super pages
           page->page()->history()->setMaximumItemCount(0);
           //Limit page cache usage by super pages
-          //TODO: This needs to be further tested to weigh the costs and benefits.
-          page->page()->settings()->setMaximumPagesInCache(2);
+
           //NB: needed?
           QPalette viewPalette = widget()->palette();
           viewPalette.setBrush(QPalette::Base, Qt::white);
@@ -588,14 +686,15 @@
     else {
       qDebug() << "GWebContentView::createPage: page already exists: " << name;
     }
+    //Create a controllable view onto the super page so that it can be controlled by the view controller.
+    m_chrome->addView(new SuperPageView(this, page, name));
     return page;
   }
 
   void GWebContentView::destroySuperPage(const QString &name) {
-    qDebug() << "GWebContentView::destroySuperPage: " << name;
     if (!m_superPages.contains(name)) return;
 
-    GWebPage *page = m_superPages.take(name);
+    GSuperWebPage *page = m_superPages.take(name);
     //This will destroy any QWebPage owned by the super page. The shared page is not
     //owned by the super page and will be deleted when the GWebContentView is deleted.
     if (page){
@@ -603,66 +702,93 @@
     }
   }
 
-  void GWebContentView::setCurrentSuperPage(const QString &name) {
+  bool GWebContentView::setCurrentSuperPage(const QString &name) {
     PageMap::iterator it = m_superPages.find(name);
     if (it != m_superPages.end()) {
       m_currentSuperPage = it;
+      return true;
     }
     else {
       qDebug() << "GWebContentView::setCurrentSuperPage: not found: " << name;
+      return false;
     }
   }
 
   bool GWebContentView::isSuperPage(const QString &name){
       PageMap::iterator it = m_superPages.find(name);
-        if (it != m_superPages.end()) {
-          return true;
-        }
-        qDebug() << "GWebContentView::superPage: not found: " << name;
-        return false;
+      if (it != m_superPages.end()) {
+        return true;
+      }
+      qDebug() << "GWebContentView::superPage: not found: " << name;
+      return false;
  }
 
 
-  GWebPage * GWebContentView::superPage(const QString &name) {
-    PageMap::iterator it = m_superPages.find(name);
-    if (it != m_superPages.end()) {
-      return it.value();
-    }
-    qDebug() << "GWebContentView::superPage: not found: " << name;
-    return 0;
+  GSuperWebPage * GWebContentView::superPage(const QString &name) {
+      PageMap::iterator it = m_superPages.find(name);
+      if (it != m_superPages.end()) {
+          return it.value();
+      }
+      qDebug() << "GWebContentView::superPage: not found: " << name;
+      return 0;
   }
 
   void GWebContentView::showSuperPage(const QString &name) {
-    setCurrentSuperPage(name);
-    qDebug() << "GWebContentView::showSuperPage: " << currentSuperPage();
-    m_currentPageIsSuperPage = true;
-    webWidget()->setPage(currentSuperPage()->page());
-    m_touchNavigation->setPage(webWidget()->page());
-    m_touchNavigation->setWantSlideViewCalls(false);
-    webWidget()->page()->setPreferredContentsSize(webWidget()->size().toSize());
+      if(isSuperPage(name)) {
+          if(currentPageIsSuperPage()) {
+              currentSuperPage()->onHidden();
+          }
+
+          setCurrentSuperPage(name);
+          m_currentPageIsSuperPage = true;
+#ifndef BEDROCK_TILED_BACKING_STORE
+          webWidget()->setPage(currentSuperPage()->page());
+          m_touchNavigation->setPage(webWidget()->page());
+          m_touchNavigation->setWantSlideViewCalls(false);
+          webWidget()->page()->setPreferredContentsSize(webWidget()->size().toSize());
+#else
+          WRT::WrtBrowserContainer *pg = WebPageController::getSingleton()->currentPage();
+          pg->setPageZoomMetaData(m_widget->currentPageInfo());
+          m_widget->setPage(currentSuperPage()->page());
+          m_widget->showPage(true);
+#endif  
+          emit superPageShown(name);
+          currentSuperPage()->onShown();
+      }
+      else {
+          qDebug() << "GWebContentView::showSuperPage: error, not found: " << name;
+      }
   }
 
   void GWebContentView::showNormalPage() {
     if (webWidget()) {
+#ifndef BEDROCK_TILED_BACKING_STORE
       webWidget()->showNormalPage();
       webWidget()->setViewportSize();
       m_touchNavigation->setPage(currentPage());
       m_touchNavigation->setWantSlideViewCalls(true);
+#else
+        m_widget->showPage(false);
+#endif
       //TODO: Further testing is needed to show if the following is a net benefit.
-      if (m_currentPageIsSuperPage && (currentSuperPage()->page() == m_sharedPage)){
-          //Clear contents of shared page to free resources. This should save
-          //memory for big pages, but at the performance cost of loading an empty page.
-          //An alternative is to delete the shared page every time and reallocate it when
-          //a super page is loaded.
-          currentSuperPage()->page()->mainFrame()->setHtml(QString());
+      if (currentPageIsSuperPage()) {
+          if(currentSuperPage()->page() == m_sharedPage){
+              //Clear contents of shared page to free resources. This should save
+              //memory for big pages, but at the performance cost of loading an empty page.
+              //An alternative is to delete the shared page every time and reallocate it when
+              //a super page is loaded.
+              currentSuperPage()->page()->mainFrame()->setHtml(QString());
+          }
+
+          currentSuperPage()->onHidden();
+          m_currentPageIsSuperPage =false;
       }
-      m_currentPageIsSuperPage =false;
     }
   }
 
   QObjectList GWebContentView::getSuperPages() {
     QObjectList *result = new QObjectList;
-    foreach(GVA::GWebPage *page, m_superPages) {
+    foreach(GVA::GSuperWebPage *page, m_superPages) {
       result->append(page);
     }
     // TO DO: Need to add result to JS engine so it can be cleaned up.
@@ -719,7 +845,7 @@
     qDebug() << "\tcurrent page=: " << currentPage() << " title=" << currentPage()->mainFrame()->title();
     qDebug() << "\tcurrent superpage=: " << currentSuperPage();
     qDebug() << "\tsuperpage count=: " << m_superPages.count();
-    foreach(GVA::GWebPage *page, m_superPages) {
+    foreach(GVA::GSuperWebPage *page, m_superPages) {
       page->dump();
     }
     qDebug() << "GWebContentView::dump: finished";
@@ -735,7 +861,6 @@
 
   void GWebContentView::pageCreated(WRT::WrtBrowserContainer* newPage) {
 
-      qDebug() << "GWebContentView::pageCreated";
       /* save the page snapshot before changing the current page to the new page*/
       WRT::WrtBrowserContainer * currPage = WebPageController::getSingleton()->currentPage();
       if (currPage) {
@@ -747,44 +872,82 @@
       // zoom actions. Set the user-scalable to false and also init the other zoom params
       // so that even if we change to windows view again without loading a page we are safe.
       // In the code-driven window usecase, this will be overwritten when the page is loaded and setViewportSize is invoked
+#ifndef BEDROCK_TILED_BACKING_STORE
       newPage->setPageZoomMetaData(webWidget()->defaultZoomData());
-
+#else
+	newPage->setPageZoomMetaData(m_widget->defaultZoomData());
+#endif
       /* Set the new page as the current page */
       WebPageController::getSingleton()->setCurrentPage(newPage);
 
       /* Set the web widget- this one is responsible for webnavigation etc */
       newPage->setWebWidget(webWidget());
 
+#ifndef BEDROCK_TILED_BACKING_STORE
       //connect new page main frame's initialLayoutCompleted with WebContentWidget' setViewportSize SLOT
       connect(newPage->mainFrame(), SIGNAL(initialLayoutCompleted()), webWidget(), SLOT(setViewportSize()));
+#endif
   }
 
   void GWebContentView::updateWebPage(WRT::WrtBrowserContainer* pg)
   {
+#ifdef BEDROCK_TILED_BACKING_STORE
+      QGraphicsWebView* w = webWidget();
+#else
       GWebContentViewWidget* w = webWidget();
+#endif
+	  
+#ifndef BEDROCK_TILED_BACKING_STORE
       w->setPage(pg);
+#else	  
+	  m_widget->setPage(pg);
+#endif
       if (pg)
       {
           pg->setWebWidget(w);
 
+#ifndef BEDROCK_TILED_BACKING_STORE
           // Change navigation also to the current page
           m_touchNavigation->setPage(pg);
           m_touchNavigation->setWantSlideViewCalls(true);
+#endif
 
       }
   }
 
   void GWebContentView::pageChanged(WRT::WrtBrowserContainer* oldPage, WRT::WrtBrowserContainer* newPage) {
-    qDebug() << "GWebContentView::pageChanged";
       Q_UNUSED(oldPage)
       updateWebPage(newPage);
 
+#ifndef BEDROCK_TILED_BACKING_STORE
       // Set new page zoom info
       changeContentViewZoomInfo(newPage);
+#endif
   }
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+  void GWebContentView::handleContextEventObject(QWebHitTestResult* eventTarget)
+  {
+      WebViewEventContext context(type(), *eventTarget);
+      if (currentPageIsSuperPage()) {
+          // Let the superpage handle the event.
+          currentSuperPage()->onContextEvent(&context);
+      }
+      else {
+          // Send the event directly.
+          emit contextEvent(&context);
+      }
+  }
+void GWebContentView::handleViewScrolled(QPoint& scrollPos, QPoint& delta)
+{
+    if (delta.manhattanLength() && scrollPos.y() <= 5 && !currentPageIsSuperPage())
+        m_chrome->layout()->slideView(-delta.y());
+}
+
+#endif
   void GWebContentView::changeContentViewZoomInfo(WRT::WrtBrowserContainer* newPage){
      // Copy the new page zoom info into cv
+#ifndef BEDROCK_TILED_BACKING_STORE
      webWidget()->setPageZoomMetaData(newPage->pageZoomMetaData());
 
      if (webWidget()->isUserScalable()) {
@@ -797,6 +960,9 @@
          // that we might have been on another page earlier
          webWidget()->setPageZoomFactor(newPage->mainFrame()->zoomFactor());
       }
+#else
+	 m_widget->setCurrentPageInfo(newPage->pageZoomMetaData());
+#endif
   }
 
   void GWebContentView::setJSObject(const QString &objectName) {
@@ -809,7 +975,6 @@
   }
 
   void GWebContentView::setEnabled(bool value) {
-      qDebug() << "GWebContentView::setEnabled: " << value;
       if(m_enabled == value)
           return;
 
--- a/ginebra2/ContentViews/GWebContentView.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GWebContentView.h	Tue Jul 06 14:03:49 2010 +0300
@@ -30,7 +30,7 @@
 #include "controllableviewimpl.h"
 #include "messageboxproxy.h"
 #include "ZoomMetaData.h"
-#include "GWebPage.h"
+#include "GSuperWebPage.h"
 #include "ContentViewDelegate.h"
 #include "GContentViewTouchNavigation.h"
 
@@ -40,6 +40,7 @@
 class QWebFrame;
 class QTimeLine;
 class GWebContentViewWidget;
+
 namespace WRT {
     class WrtBrowserContainer;
 }
@@ -50,6 +51,9 @@
   class WebPageWrapper;
   class ChromeWidget;
   class ContentViewDelegate;
+#ifdef BEDROCK_TILED_BACKING_STORE
+  class WebContentViewWidget;
+#endif
 
   class GWebContentView : public ControllableViewBase
   {
@@ -63,8 +67,11 @@
 
 // do we need both of these?
       QGraphicsWidget* widget() const;
+#ifdef BEDROCK_TILED_BACKING_STORE
+      QGraphicsWebView* webWidget() const;
+#else
       GWebContentViewWidget *webWidget() const;
-
+#endif
       // Returns the DOM 'window' object of the page.
       QVariant getContentWindowObject();
 
@@ -79,8 +86,11 @@
       QUrl url();
       QWebPage *currentPage();
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+      qreal getZoomFactor();
+#else
       qreal getZoomFactor() const;
-
+#endif
       static ControllableView* createNew(QWidget *parent);
 
       /*!
@@ -98,35 +108,60 @@
       void deactivateZoomActions();
 
       // Super page methods.
-      GWebPage * createSuperPage(const QString &name, bool persist = false);
+      GSuperWebPage * createSuperPage(const QString &name, bool persist = false);
       void destroySuperPage(const QString &name);
       QObjectList getSuperPages();
-      void setCurrentSuperPage(const QString &name);
-      GWebPage * currentSuperPage() {return m_currentSuperPage.value();}
+      bool setCurrentSuperPage(const QString &name);
+      GSuperWebPage * currentSuperPage() {return m_currentSuperPage.value();}
       void showSuperPage(const QString &name);
-      GWebPage * superPage(const QString &name);
+      GSuperWebPage * superPage(const QString &name);
       bool isSuperPage(const QString &name);
       bool currentPageIsSuperPage() const;
+
       void bitmapZoomStop();
       virtual void show() {
-          qDebug() << "GWebContentView::show: " << widget();
           widget()->show();
       }
 
       virtual void hide() {
-          qDebug() << "GWebContentView::hide: " << widget();
-          widget()->hide();
+           widget()->hide();
       }
 
-      bool gesturesEnabled() const { return m_touchNavigation->enabled(); }
-      void setGesturesEnabled(bool value) { m_touchNavigation->setEnabled(value); }
+      bool gesturesEnabled() const { 
+#ifndef BEDROCK_TILED_BACKING_STORE
+		return m_touchNavigation->enabled(); 
+#endif	
+		return false;
+	  }
+
+      void setGesturesEnabled(bool value) { 
+#ifndef BEDROCK_TILED_BACKING_STORE		  
+		  m_touchNavigation->setEnabled(value); 
+#endif
+	  	}
 
       bool enabled() const;
       void setEnabled(bool value);
 
-      bool frozen() const { return webWidget()->frozen(); }
-      void freeze() { return webWidget()->freeze(); }
-      void unfreeze() { return webWidget()->unfreeze(); }
+
+      bool frozen() const { 
+#ifndef BEDROCK_TILED_BACKING_STORE		  
+		  return webWidget()->frozen(); 
+#else	  
+		  return false;
+#endif
+	  }
+
+      void freeze() { 
+#ifndef BEDROCK_TILED_BACKING_STORE			  
+		  return webWidget()->freeze(); 
+#endif
+	  }
+      void unfreeze() { 
+#ifndef BEDROCK_TILED_BACKING_STORE			  
+		  return webWidget()->unfreeze(); 
+#endif
+		}
 
   signals:
       void ContextChanged();
@@ -142,20 +177,28 @@
       void forwardEnabled(bool enabled);
       void startingPanGesture(int);
       void contentViewMouseEvent(QEvent::Type type);
+	  void superPageShown(const QString &name);
+#ifdef BEDROCK_TILED_BACKING_STORE
+      void contextEvent(::WebViewEventContext* context);
+#endif      
 
   public slots:
       void loadUrlToCurrentPage(const QString & url);
       void zoomIn(qreal factor = 0.1);
       void zoomOut(qreal factor = 0.1);
+#ifndef BEDROCK_TILED_BACKING_STORE
+      void zoomP();
+      void zoomN();
+      void zoomBy(qreal delta) { zoomIn(delta); }
+#else
+      void setZoomActions(bool enableZoomIn, bool enableZoomOut);
+#endif
       void setZoomFactor(qreal factor);
       void showMessageBox(WRT::MessageBoxProxy* data);
-      void zoomP();
-      void zoomN();
       void stop();
       void back();
       void forward();
       void reload();
-      void zoomBy(qreal delta) { zoomIn(delta); }
       void zoom(bool in);
       void toggleZoom();
       void stopZoom();
@@ -182,14 +225,26 @@
     // Called by the page controller when changes a page.
     void pageChanged(WRT::WrtBrowserContainer * , WRT::WrtBrowserContainer *);
 
+#ifdef BEDROCK_TILED_BACKING_STORE
+    void handleContextEventObject(QWebHitTestResult* eventTarget);
+    void handleViewScrolled(QPoint& scrollPos, QPoint& delta);
+#endif
   protected:
+#ifdef BEDROCK_TILED_BACKING_STORE
+    QGraphicsWidget* webWidgetConst();
+#else
     GWebContentViewWidget *webWidgetConst() const { return m_widget; }
+#endif
     ChromeWidget *chrome() { return m_chrome; }
     void updateWebPage(WRT::WrtBrowserContainer * pg);
     void changeContentViewZoomInfo(WRT::WrtBrowserContainer* newPage);
 
   protected:
+#ifdef BEDROCK_TILED_BACKING_STORE
+    WebContentViewWidget* m_widget;
+#else
     GWebContentViewWidget *m_widget;
+#endif
     QNetworkAccessManager *m_networkMgr; //Owned
     ChromeWidget *m_chrome;  // not owned
 
@@ -200,13 +255,15 @@
     QTimeLine * m_timeLine;
     bool m_zoomIn;
 
+#ifndef BEDROCK_TILED_BACKING_STORE
     GContentViewTouchNavigation* m_touchNavigation;
+#endif
     bool m_backEnabled;
     bool m_forwardEnabled;
 
     ChromeWidget *m_chromeWidget;  // not owned
     WebPageWrapper* m_sharedPage;
-    typedef QMap<QString, GWebPage *> PageMap;
+    typedef QMap<QString, GSuperWebPage *> PageMap;
     PageMap m_superPages;
     PageMap::iterator m_currentSuperPage;
     bool m_currentPageIsSuperPage;
--- a/ginebra2/ContentViews/GWebContentViewJSObject.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GWebContentViewJSObject.h	Tue Jul 06 14:03:49 2010 +0300
@@ -24,6 +24,7 @@
 #include <QObject>
 #include "controllableviewimpl.h"
 #include "GWebContentView.h"
+#include "GSuperWebPage.h"
 
 class WebViewEventContext;
 
@@ -51,8 +52,20 @@
     /*! This property holds whether touch navigation is enabled.
      */
     Q_PROPERTY(bool gesturesEnabled READ getGesturesEnabled WRITE setGesturesEnabled)
-    bool getGesturesEnabled() const { return webContentViewConst()->gesturesEnabled(); }
-    void setGesturesEnabled(bool value) { webContentView()->setGesturesEnabled(value); }
+    bool getGesturesEnabled() const
+    {
+#ifdef BEDROCK_TILED_BACKING_STORE
+        return false;
+#else
+        return webContentViewConst()->gesturesEnabled();
+#endif
+    }
+    void setGesturesEnabled(bool value)
+    {
+#ifndef BEDROCK_TILED_BACKING_STORE
+        webContentView()->setGesturesEnabled(value);
+#endif
+    }
 
     Q_PROPERTY(bool enabled WRITE setEnabled READ enabled)
     bool enabled() const { return webContentViewConst()->enabled(); }
@@ -65,9 +78,11 @@
     void back() { webContentView()->back(); }
     void forward() { webContentView()->forward(); }
     void reload() { webContentView()->reload(); }
+#ifndef BEDROCK_TILED_BACKING_STORE
     void zoomIn(qreal deltaPercent = 0.1) { webContentView()->zoomIn(deltaPercent); }
     void zoomOut(qreal deltaPercent = 0.1) { webContentView()->zoomOut(deltaPercent); }
     void zoomBy(qreal delta) { zoomIn(delta); }
+#endif	
     void zoom(bool in) { webContentView()->zoom(in); }
     void toggleZoom() { webContentView()->toggleZoom(); }
     void stopZoom() { webContentView()->stopZoom(); }
@@ -81,7 +96,7 @@
     bool currentPageIsSuperPage() { return webContentView()->currentPageIsSuperPage(); }
     void dump() { return webContentView()->dump(); }
     bool frozen() const { return webContentViewConst()->frozen(); }
-    void freeze() { qDebug() << "FREEZE"; return webContentView()->freeze(); }
+    void freeze() { return webContentView()->freeze(); }
     void unfreeze() { return webContentView()->unfreeze(); }
 
     // Super page slots.
@@ -94,6 +109,15 @@
     QObject * superPage(const QString &name) { return webContentView()->superPage(name); }
     bool isSuperPage(const QString &name) { return webContentView()->isSuperPage(name); }
 
+    bool bedrockTiledBackingStoreEnabled() 
+    {
+#ifdef BEDROCK_TILED_BACKING_STORE
+        return true;
+#else
+        return false;
+#endif
+    }
+
 signals:
     void ContextChanged();
     void iconChanged();
@@ -113,6 +137,8 @@
     void onDisplayModeChanged(const QString &orientation);
 
     void contextEvent(QObject *context);
+	void superPageShown(const QString &name);
+    
 
 private slots:
     void statusBarMessage( const QString & text );
--- a/ginebra2/ContentViews/GWebContentViewWidget.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GWebContentViewWidget.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -77,8 +77,7 @@
 , m_bitmapImage(NULL)
 , m_checkeredBoxPixmap(NULL)
 {
-  qDebug() << "GWebContentViewWidget::GWebContentViewWidget: page=" << pg;
-  setParent(parent);
+   setParent(parent);
   if ( pg ) {
     setPage(pg);
   }
@@ -87,7 +86,7 @@
 #endif //ENABLE_PERF_TRACE
 
   m_currentinitialScale = zoomFactor();
-  //connect(this->page()->mainFrame(), SIGNAL(initialLayoutCompleted()), this, SLOT(onInitLayout()));
+
 #ifndef NO_QSTM_GESTURE
   m_touchNavigation = new WebTouchNavigation(this);
 #endif
@@ -121,8 +120,6 @@
 {
     delete m_checkeredBoxPixmap;
     m_checkeredBoxPixmap = NULL;
-    int checkerPixmapSizeX = size().toSize().width();
-    int checkerPixmapSizeY = size().toSize().height() + 50;
     m_checkeredBoxPixmap = new QPixmap(checkerSize, checkerSize);
     QPainter painter(m_checkeredBoxPixmap);
     painter.fillRect(0, 0, checkerSize, checkerSize, QColor(checkerColor1));
@@ -152,22 +149,24 @@
 }
 
 void GWebContentViewWidget::updateFrozenImage() {
-    // Take a snapshot for to be displayed while in frozen state.
-    QStyleOptionGraphicsItem opt;
-    opt.levelOfDetail = 1.0;
-    opt.exposedRect = QRectF(QPointF(0,0), size());
+    // Take a snapshot to be displayed while in frozen state.
+
+    QStyleOptionGraphicsItem option;
+    option.levelOfDetail = 1.0;
+    option.exposedRect = QRectF(QPointF(0,0), size());
 
-    m_frozenPixmap = new QPixmap(opt.exposedRect.size().toSize());
-    QPainter painter(m_frozenPixmap);
-    paint(&painter, &opt);
+    // Discard existing pixmap.
+    delete m_frozenPixmap;
+    m_frozenPixmap = 0;
 
-    if(!isEnabled()) {
-        // Disabled, apply whitewash.
+    // Paint the window into a new pixmap (m_frozenPixmap must be 0 here for this to work).
+    QPixmap *frozenPixmap = new QPixmap(option.exposedRect.size().toSize());
+    QPainter painter(frozenPixmap);
+    paint(&painter, &option);
+    painter.end();
 
-        painter.setOpacity(ChromeEffect::disabledOpacity);
-        painter.fillRect(opt.exposedRect, ChromeEffect::disabledColor);
-    }
-    painter.end();
+    // Now point m_frozenPixmap at the new pixmap.
+    m_frozenPixmap = frozenPixmap;
 }
 
 QImage GWebContentViewWidget::getPageSnapshot()
@@ -201,6 +200,11 @@
     //if there is change in mode (like landscape, potraite relayout the content)
     if (e->newSize().width() == e->oldSize().width())
         return;
+
+    //if page is empty do not update 
+    if (page()->currentFrame()->url().isEmpty())
+        return;
+
     m_isResize = true;
     setViewportSize();
     m_isResize = false;
@@ -226,7 +230,6 @@
 
 void GWebContentViewWidget::resizeEvent(QGraphicsSceneResizeEvent* e)
 {
-   
   // set the fixed text layout size for text wrapping
 #if defined CWRTINTERNALWEBKIT
   if (page()) {
@@ -257,19 +260,23 @@
 
   updateViewportSize(e);
 
-  if(frozen())
+  if(frozen()) {
     updateFrozenImage();
+//    if(m_frozenPixmap && (m_frozenPixmap->size() != this->size())) {
+//        QTimer::singleShot(50, this, SLOT(updateFrozenImage()));
+//    }
+  }
 }
 
-void GWebContentViewWidget::contextMenuEvent(::QGraphicsSceneContextMenuEvent *event) {
-    QWebHitTestResult hitTest = page()->currentFrame()->hitTestContent(event->pos().toPoint());
-    qDebug() << "GWebContentViewWidget::contextMenuEvent:"
-            << "\n\t pos=" << hitTest.pos()
-            << "\n\t linkUrl=" << hitTest.linkUrl()
-            << "\n\t imageUrl=" << hitTest.imageUrl();
+void GWebContentViewWidget::onLongPressEvent(QPoint pos) {
+    QWebHitTestResult hitTest = page()->currentFrame()->hitTestContent(pos);
+    //qDebug() << "GWebContentViewWidget::contextMenuEvent:"
+    //        << "\n\t pos=" << hitTest.pos()
+    //        << "\n\t linkUrl=" << hitTest.linkUrl()
+    //        << "\n\t imageUrl=" << hitTest.imageUrl();
 
-    WebViewEventContext *context =
-        new WebViewEventContext(view()->type(), hitTest);
+    ::WebViewEventContext *context =
+            new ::WebViewEventContext(view()->type(), hitTest);
 
     if (m_webContentView && m_webContentView->currentPageIsSuperPage()) {
         // Let the superpage handle the event.
@@ -279,6 +286,10 @@
         // Send the event directly.
         emit contextEvent(context);
     }
+}
+
+void GWebContentViewWidget::contextMenuEvent(::QGraphicsSceneContextMenuEvent *event) {
+    // Ignore.  The touch navigation code handles long presses.
     event->accept();
 }
 
@@ -292,7 +303,7 @@
 }
 
 void GWebContentViewWidget::setPageZoomFactor(qreal zoom)
-{  
+{
 //not zooming if it's bookmark or historyview or not a page
   if (!page() ||
 	  	(m_webContentView->type() == "webView" && 
@@ -500,6 +511,10 @@
 
     }
 
+    if(!isEnabled()) {
+        // Disabled, apply whitewash.
+        ChromeEffect::paintDisabledRect(painter, option->exposedRect);
+    }
 #ifdef ENABLE_PERF_TRACE
     PERF_DEBUG() << "GWebContentViewWidget::paint__end: " <<
         WrtPerfTracer::tracer()->elapsedTime(st) << "\n";
@@ -531,7 +546,6 @@
 {
   if (m_wrtPage == pg) return;
 
-  qDebug() << "GWebContentViewWidget::setPage: " << pg;
   if (m_wrtPage) {
     disconnect(page()->mainFrame(), 0, this, 0);
     m_wrtPage->setView(0);
@@ -586,7 +600,6 @@
     //find the content size before applying zoom
     QSize docSizeBeforeZoom = page()->mainFrame()->contentsSize();
 
-    qDebug()<<"setPageCenterZoomFactor() : "<<zoom;
     setZoomFactor(zoom);
     //after applying zoom calculate the document size and document center point
     QSize docSizeAfterZoom = page()->mainFrame()->contentsSize();
--- a/ginebra2/ContentViews/GWebContentViewWidget.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentViews/GWebContentViewWidget.h	Tue Jul 06 14:03:49 2010 +0300
@@ -109,10 +109,38 @@
     void setPageZoomMetaData(ZoomMetaData params);
     ZoomMetaData defaultZoomData();
     void setCheckeredPixmap();
+
+    void onLoadStarted();
+    void onLoadFinished();
+
+    /*!
+     * \brief Freeze the on-screen state of the window.
+     * Takes a snapshot of the window in its current state.  The paint() method will then use
+     * this snapshot for all further paints, until unfreeze() is called.  Freeze() increments
+     * a counter and unfreeze() decrements the counter so that nested calls to them are handled
+     * correctly.
+     * \sa unfreeze
+     */
+    void freeze();
+
+    /*!
+     * \brief Unfreeze the on-screen state of the window.
+     * \sa freeze
+     */
+    void unfreeze();
+
+    /*!
+     * \brief Returns true if the window is currently frozen.
+     * \sa freeze
+     * \sa unfreeze
+     */
+    bool frozen() const { return m_frozenCount > 0; }
+
 public slots:
     void setViewportSize();
 
     void onInitLayout();
+    void onLongPressEvent(QPoint pos);
 
 signals:
     void contextEvent(::WebViewEventContext *context);
@@ -120,19 +148,17 @@
 
     void pageZoomMetaDataChange(QWebFrame* frame, ZoomMetaData data);protected:
     void paintEvent(QPaintEvent *event);
+    void longPressEvent(::WebViewEventContext *context);
 
-public:
-    void onLoadStarted();
-    void onLoadFinished();
-
-    bool frozen() const { return m_frozenCount > 0; }
-    void freeze();
-    void unfreeze();
+private slots:
+    /*!
+     * \brief Update the "frozen" image of this window.
+     */
+    void updateFrozenImage();
 
 private:
     void updateViewportSize(QGraphicsSceneResizeEvent *e);
     virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
-    void updateFrozenImage();
 
     GVA::GWebContentView* m_webContentView;
     qreal       m_dirtyZoomFactor;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/ScrollableWebContentView.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,518 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "ScrollableWebContentView.h"
+
+#include "Gestures/GestureRecognizer.h"
+#include "Kinetics/KineticScroller.h"
+#include "ScrollableViewBase.h"
+#include "ViewportMetaDataParser.h"
+#include "WebContentAnimationItem.h"
+
+#include <QApplication>
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QGraphicsWebView>
+#include <QWebElement>
+#include <QWebHitTestResult>
+
+//Kinetic scroll constants
+static const int ScrollsPerSecond = 30;
+static const int MinimumScrollVelocity = 10;
+static const qreal AxisLockThreshold = .8;
+
+
+//Zooming constants
+static const int ZoomAnimationDuration = 300;   //ms. Zooming transition duration
+static const qreal ZoomStep = .5;               //Incremental zoom step
+const int TileUpdateEnableDelay = 500;         //Wait duration before tiling updates are enabled.
+
+namespace GVA {
+
+ScrollableWebContentView::ScrollableWebContentView(WebContentAnimationItem* webAnimationItem, QGraphicsItem* parent)
+    : ScrollableViewBase(parent)
+    , m_gestureRecognizer(this)
+{
+    m_viewportMetaData = new ViewportMetaData();
+
+    //Kinetic scroller settings
+    //Sets the number of scrolls (frames) per second to sps.
+    m_kineticScroller->setScrollsPerSecond(ScrollsPerSecond);
+    //For elastic scroll in page edges
+    m_kineticScroller->setOvershootPolicy(KineticScroller::OvershootWhenScrollable);
+
+    //Gesture settings
+    //For detecting scroll direction
+    m_gestureRecognizer.setAxisLockThreshold(AxisLockThreshold);
+    //To enable touch and drag scrolling
+    m_gestureRecognizer.setMinimumVelocity(MinimumScrollVelocity);
+
+    setWidget(webAnimationItem);
+    //FIX ME : Revisit this code. Duplicate info sharing!
+    webAnimationItem->setViewportMetaData(m_viewportMetaData);
+
+
+    m_tileUpdateEnableTimer.setSingleShot(true);
+    connect(&m_tileUpdateEnableTimer, SIGNAL(timeout()), webAnimationItem, SLOT(enableContentUpdates()));
+
+    //Setup zooming animator
+    m_zoomAnimator = new QPropertyAnimation(webAnimationItem, "geometry");
+    m_zoomAnimator->setDuration(ZoomAnimationDuration);
+    connect(m_zoomAnimator, SIGNAL(stateChanged(QAbstractAnimation::State,QAbstractAnimation::State)), this, SLOT(zoomAnimationStateChanged(QAbstractAnimation::State,QAbstractAnimation::State)));
+}
+
+ScrollableWebContentView::~ScrollableWebContentView()
+{
+    delete m_viewportMetaData;
+    delete m_kineticScroller;
+
+    if(m_zoomAnimator) {
+        m_zoomAnimator->stop();
+        delete m_zoomAnimator;
+    }
+}
+
+WebContentAnimationItem* ScrollableWebContentView::viewportWidget() const
+{
+    return qobject_cast<WebContentAnimationItem*>(scrollWidget());
+}
+
+void ScrollableWebContentView::zoomToScreenCenter(bool zoomIn)
+{
+    //If viewport metadata has user scalable false.
+    //Do not zoom.
+    if (!m_viewportMetaData->m_userScalable)
+        return;
+
+    qreal scale = 1;
+    scale += ZoomStep;
+
+    if (!zoomIn)
+        scale = 1/scale;
+
+    qreal curScale =  viewportWidget()->zoomScale();
+
+    if (zoomIn && (curScale * scale > m_viewportMetaData->m_maximumScale))
+        scale = m_viewportMetaData->m_maximumScale / curScale;
+    else if (!zoomIn && (curScale * scale < m_viewportMetaData->m_minimumScale))
+        scale = m_viewportMetaData->m_minimumScale / curScale;
+
+    if(scale == 1.)
+        return;
+
+    //Screen center
+    QPointF scrCenter(size().width()/2, size().height()/2);
+    //Map screen center to document
+    QPointF docPoint(viewportWidget()->mapFromScene(scrCenter));
+    //Maintain that spot in the same point on the viewport
+    QPointF docPointInScr(viewportWidget()->mapToParent(docPoint));
+    startZoomAnimToItemHotspot(docPoint, docPointInScr, scale);
+}
+
+ZoomMetaData ScrollableWebContentView::currentPageInfo()
+{
+    ZoomMetaData data;
+
+    data.initialScale = m_viewportMetaData->m_initialScale;
+    data.minScale = m_viewportMetaData->m_minimumScale;
+    data.maxScale = m_viewportMetaData->m_maximumScale;
+    data.userScalable = m_viewportMetaData->m_userScalable;
+    data.m_specifiedWidth = m_viewportMetaData->m_specifiedData.m_width;
+    data.m_specifiedHeight= m_viewportMetaData->m_specifiedData.m_height;
+
+    data.rect = viewportWidget()->geometry();
+    data.scale = viewportWidget()->zoomScale();
+    data.webViewSize = viewportWidget()->webView()->geometry();
+    data.viewportSize = size();
+
+    return data;
+}
+
+void ScrollableWebContentView::setCurrentPageInfo(ZoomMetaData data)
+{
+    m_viewportMetaData->m_initialScale = data.initialScale;
+    m_viewportMetaData->m_minimumScale = data.minScale;
+    m_viewportMetaData->m_maximumScale = data.maxScale;
+    m_viewportMetaData->m_userScalable = data.userScalable;
+    m_viewportMetaData->m_specifiedData.m_width = data.m_specifiedWidth;
+    m_viewportMetaData->m_specifiedData.m_height = data.m_specifiedHeight;
+    m_viewportMetaData->m_isValid = true;
+
+    m_viewportMetaData->m_width = data.webViewSize.width();
+    m_viewportMetaData->m_height = data.webViewSize.height();
+
+    viewportWidget()->webView()->setGeometry(data.webViewSize);
+    viewportWidget()->setZoomScale(data.scale, true);
+    viewportWidget()->setGeometry(data.rect);
+
+    if (data.viewportSize.width() != size().width())
+        adjustViewportSize(data.viewportSize, size());
+}
+
+ZoomMetaData ScrollableWebContentView::defaultZoomData()
+{
+    ZoomMetaData data;
+
+    data.initialScale = m_viewportMetaData->m_initialScale;
+    data.minScale = m_viewportMetaData->m_minimumScale;
+    data.maxScale = m_viewportMetaData->m_maximumScale;
+    data.userScalable = m_viewportMetaData->m_userScalable;
+
+    data.scale = 1.0;
+    data.rect = QRectF();
+    data.webViewSize = QRectF();
+    data.viewportSize = QSizeF();
+
+    return data;
+}
+
+void ScrollableWebContentView::updatePreferredContentSize()
+{
+    viewportWidget()->updatePreferredContentSize(QSize(m_viewportMetaData->m_width
+                                                       , m_viewportMetaData->m_height));
+}
+
+void ScrollableWebContentView::setSuperPage()
+{
+    m_viewportMetaData->m_initialScale = 1.;
+    m_viewportMetaData->m_minimumScale = 1.;
+    m_viewportMetaData->m_maximumScale = 1.;
+    m_viewportMetaData->m_specifiedData.m_width = "device-width";
+    m_viewportMetaData->m_specifiedData.m_height = "device-height";
+    m_viewportMetaData->m_userScalable = false;
+
+    QSize contentSize = viewportWidget()->contentsSize();
+    QRect webViewRect(0, 0, size().width(), contentSize.height());
+    viewportWidget()->webView()->setGeometry(webViewRect);
+    viewportWidget()->setZoomScale(1., true);
+    viewportWidget()->setGeometry(webViewRect);
+
+    m_viewportMetaData->m_width = size().width();
+    m_viewportMetaData->m_height = size().height();
+    m_viewportMetaData->m_isValid = true;
+
+    updatePreferredContentSize();
+}
+
+void ScrollableWebContentView::reset()
+{
+    // TODO: INVESTIGATE: In the case of multiple windows loading pages simultaneously, it is possible
+    // to be calling this slot on a signal from a frame that is not
+    // the frame of the page saved here. It might be better to use 'sender' instead of
+    // page->mainFrame() to get the metaData so that we use the meta data of the corresponding
+    // frame
+
+    QWebPage* page = viewportWidget()->webView()->page();
+    if (!page)
+        return;
+
+    //Initialize viewport metadata
+    m_viewportMetaData->reset();
+
+    QWebFrame* frame = page->mainFrame();
+    QMap<QString, QString> metaData = frame->metaData();
+    QString viewportTag = metaData.value("viewport");
+
+    QRect clientRect = geometry().toAlignedRect();
+    ViewportMetaDataParser parser(clientRect);
+    *m_viewportMetaData = parser.parse(viewportTag);
+
+    updatePreferredContentSize();
+    setViewportWidgetGeometry(QRectF(QPointF(),
+                                     QSize(m_viewportMetaData->m_width, m_viewportMetaData->m_height)
+                                     * m_viewportMetaData->m_initialScale));
+}
+
+void ScrollableWebContentView::contentsSizeChanged(const QSize& newContentSize)
+{
+    QRect clientRect = geometry().toAlignedRect();
+    m_viewportMetaData->updateViewportData(newContentSize, clientRect);
+    viewportWidget()->resize(QSize(m_viewportMetaData->m_width, m_viewportMetaData->m_height)
+                             * m_viewportMetaData->m_initialScale);
+}
+
+void ScrollableWebContentView::pageLoadFinished(bool ok)
+{
+    Q_UNUSED(ok);
+    QSize contentSize = viewportWidget()->contentsSize();
+    QRect clientRect = geometry().toAlignedRect();
+    m_viewportMetaData->updateViewportData(contentSize, clientRect);
+
+    viewportWidget()->resize(QSize(m_viewportMetaData->m_width, m_viewportMetaData->m_height)
+                             * m_viewportMetaData->m_initialScale);
+    viewportWidget()->setZoomScale(m_viewportMetaData->m_initialScale, true);
+}
+
+bool ScrollableWebContentView::sceneEventFilter(QGraphicsItem* item, QEvent* event)
+{
+    Q_UNUSED(item);
+
+    bool handled = false;
+    if (!isVisible())
+        return handled;
+
+    //Pass all events to recognizer
+    handled  = m_gestureRecognizer.mouseEventFilter(static_cast<QGraphicsSceneMouseEvent *>(event));
+    return handled;
+}
+
+void ScrollableWebContentView::handleGesture(GestureEvent* gestureEvent)
+{
+    switch (gestureEvent->type()) {
+    case GestureEvent::Touch:
+        handlePress(gestureEvent);
+        break;
+    case GestureEvent::Release:
+        handleRelease(gestureEvent);
+        break;
+    case GestureEvent::Pan:
+        handlePan(gestureEvent);
+        break;
+    case GestureEvent::Flick:
+        handleFlick(gestureEvent);
+        break;
+    case GestureEvent::DoubleTap:
+        handleDoubleTap(gestureEvent);
+        break;
+    case GestureEvent::LongTap:
+        handleLongTap(gestureEvent);
+        break;
+    default:
+        break;
+    }
+
+}
+
+void ScrollableWebContentView::handlePress(GestureEvent* gestureEvent)
+{
+    m_kineticScroller->stop();
+    QPointF pos = gestureEvent->position();
+    sendEventToWebKit(QEvent::GraphicsSceneMousePress, pos);
+}
+
+void ScrollableWebContentView::handleRelease(GestureEvent* gestureEvent)
+{
+    //Cache release event to send on release
+    QPointF pos = gestureEvent->position();
+    sendEventToWebKit(QEvent::GraphicsSceneMouseRelease, pos);
+}
+
+void ScrollableWebContentView::handleDoubleTap(GestureEvent* gestureEvent)
+{
+    if (!m_viewportMetaData->m_userScalable)
+        return;
+
+    QRectF target;
+    WebContentAnimationItem* webViewProxy = viewportWidget();
+
+    // Contentview center is the focus hotspot
+    QPointF viewTargetHotspot(size().width() / 2, size().height() / 2);
+
+    //Get the focussable element rect from current touch position
+    QPointF touchPoint = webViewProxy->mapFromScene(gestureEvent->position());
+    QRectF zoomRect = webViewProxy->findZoomableRectForPoint(touchPoint);
+
+    if (!zoomRect.isValid()) {
+        //FIX ME: Add an event ignore animation
+        return;
+    }
+
+    // target is the center of the identified rect x-wise
+    // y-wise it's the place user touched
+    QPointF hotspot(zoomRect.center().x(), touchPoint.y());
+    qreal scale = size().width() / zoomRect.size().width();
+    startZoomAnimToItemHotspot(hotspot, viewTargetHotspot, scale, zoomRect);
+}
+
+void ScrollableWebContentView::handlePan(GestureEvent* gestureEvent)
+{
+    QPoint scrollPos = ScrollableViewBase::scrollPosition();
+    m_kineticScroller->doPan(gestureEvent->delta());
+    QPoint delta;
+    delta.setX(-gestureEvent->delta().x());
+    delta.setY(-gestureEvent->delta().y());
+    emit viewScrolled(scrollPos, delta);
+}
+
+void ScrollableWebContentView::handleFlick(GestureEvent* gestureEvent)
+{
+    QPoint scrollPos = ScrollableViewBase::scrollPosition();
+    m_kineticScroller->doFlick(gestureEvent->velocity());
+}
+
+void ScrollableWebContentView::handleLongTap(GestureEvent* gestureEvent)
+{
+    QWebPage* page = viewportWidget()->webView()->page();
+    QPointF contextPt = viewportWidget()->webView()->mapFromScene(gestureEvent->position());
+    QWebHitTestResult result = page->currentFrame()->hitTestContent(contextPt.toPoint());
+
+    //Notify context menu observers
+    emit contextEventObject(&result);
+}
+
+void ScrollableWebContentView::setViewportWidgetGeometry(const QRectF& r)
+{
+    ScrollableViewBase::setScrollWidgetGeometry(r);
+}
+
+void ScrollableWebContentView::startZoomAnimToItemHotspot(const QPointF& hotspot, const QPointF& viewTargetHotspot, qreal scale,  QRectF target)
+{
+    WebContentAnimationItem* animWidget = viewportWidget();
+
+    QPointF newHotspot = hotspot * scale;
+    QPointF newViewportOrigon = newHotspot - viewTargetHotspot;
+    QRectF zoomedRect(-newViewportOrigon, animWidget->size() * scale);
+
+    QRectF temp = adjustScrollWidgetRect(zoomedRect);
+    qreal diff = qAbs(scrollWidget()->geometry().y() - temp.y());
+
+    //FIX ME : Seperate the logic for centerzoom and block-focus zoom
+    if (qFuzzyCompare(scrollWidget()->geometry().topLeft().x(), temp.topLeft().x())
+        && qFuzzyCompare(scrollWidget()->geometry().width(), temp.width())
+        && qFuzzyCompare(scrollWidget()->geometry().height(), temp.height())
+        && !target.isEmpty() && (diff <= target.height())) {
+
+            scale = size().width() / animWidget->size().width();
+            newHotspot = QPointF(0, -animWidget->pos().y()) * scale;
+            newViewportOrigon = newHotspot - viewTargetHotspot;
+            zoomedRect = QRectF(-newViewportOrigon, animWidget->size() * scale);
+    }
+
+    startZoomAnimation(zoomedRect);
+}
+
+bool ScrollableWebContentView::isZoomedIn() const
+{
+    return size().width() < viewportWidget()->size().width();
+}
+
+void ScrollableWebContentView::stateChanged(KineticScrollable::State oldState
+                                            , KineticScrollable::State newState)
+{
+    ScrollableViewBase::stateChanged(oldState, newState);
+
+    if (newState == KineticScrollable::Pushing) {
+        m_tileUpdateEnableTimer.stop();
+        viewportWidget()->disableContentUpdates();
+    }
+    else if (newState == KineticScrollable::AutoScrolling) {
+        m_tileUpdateEnableTimer.stop();
+        viewportWidget()->disableContentUpdates();
+    }
+    else if (newState == KineticScrollable::Inactive) {
+        m_tileUpdateEnableTimer.start(TileUpdateEnableDelay);
+    }
+}
+
+void ScrollableWebContentView::startZoomAnimation(const QRectF& destRect)
+{
+    QAbstractAnimation::State animState = m_zoomAnimator->state();
+    if (animState == QAbstractAnimation::Running)
+        return;
+
+    m_zoomAnimator->setStartValue(scrollWidget()->geometry());
+    m_animationEndRect = adjustScrollWidgetRect(destRect);
+    m_zoomAnimator->setEndValue(m_animationEndRect);
+    m_zoomAnimator->start();
+}
+
+void ScrollableWebContentView::stopZoomAnimation()
+{
+    m_animationEndRect = QRectF();
+    m_zoomAnimator->stop();
+}
+
+void ScrollableWebContentView::updateZoomEndRect()
+{
+    if (m_animationEndRect.isValid())
+        scrollWidget()->setGeometry(m_animationEndRect);
+}
+
+void ScrollableWebContentView::zoomAnimationStateChanged(QAbstractAnimation::State newState,QAbstractAnimation::State)
+{
+    switch (newState) {
+    case QAbstractAnimation::Stopped:
+        updateZoomEndRect();
+        break;
+    default:
+        break;
+    }
+}
+
+void ScrollableWebContentView::resizeEvent(QGraphicsSceneResizeEvent* event)
+{
+    QGraphicsWidget::resizeEvent(event);
+
+    //Ignore resize when chrome is being still setup
+    if (!event->oldSize().width())
+        return;
+
+    adjustViewportSize(event->oldSize(), event->newSize());
+}
+
+void ScrollableWebContentView::adjustViewportSize(QSizeF oldSize, QSizeF newSize)
+{
+    //FIX ME : Check this
+    if (m_viewportMetaData->m_isValid) {
+
+        QRect clientRect = geometry().toAlignedRect();
+        if (m_viewportMetaData->isLayoutNeeded())  {
+            m_viewportMetaData->orientationChanged(clientRect);
+            updatePreferredContentSize();
+            return;
+        } else
+            m_viewportMetaData->updateViewportData(viewportWidget()->contentsSize(), clientRect);
+    }
+
+    qreal scale = newSize.width() / oldSize.width();
+    QPointF middleLeft(0, oldSize.height()/2);
+    QPointF docPoint(viewportWidget()->mapFromScene(middleLeft));
+
+    QPointF resizedMiddleLeft(0, newSize.height()/2);
+    QPointF resizedDocPoint(viewportWidget()->mapFromScene(resizedMiddleLeft));
+    QPointF docPointInScr(viewportWidget()->mapToParent(resizedDocPoint));
+
+    //FIX ME : Should be handled with only following function call
+    //Since its not working, work-around is added. Plz fix it
+    //startZoomAnimToItemHotspot(docPoint, docPointInScr, scale);
+
+    QPointF newHotspot = docPoint * scale;
+    QPointF newViewportOrigon = newHotspot - docPointInScr;
+    QRectF zoomedRect(-newViewportOrigon,  viewportWidget()->size() * scale);
+    QRectF adjustRect = adjustScrollWidgetRect(zoomedRect);
+
+    setScrollWidgetGeometry(zoomedRect);
+}
+
+void ScrollableWebContentView::sendEventToWebKit(QEvent::Type type, QPointF& scenPos)
+{
+    //Setup event and send it to webkit
+    QGraphicsSceneMouseEvent event(type);
+    event.setScenePos(scenPos);
+    event.setPos(viewportWidget()->webView()->mapFromScene(event.scenePos()));
+    event.setButton(Qt::LeftButton);
+    event.setButtons(Qt::LeftButton);
+    event.setModifiers(Qt::NoModifier);
+
+    viewportWidget()->webView()->page()->event(&event);
+}
+
+} //namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/ScrollableWebContentView.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef ScrollableWebContentView_h
+#define ScrollableWebContentView_h
+
+#include "Gestures/GestureEvent.h"
+#include "Gestures/GestureListener.h"
+#include "Gestures/GestureRecognizer.h"
+#include "ScrollableViewBase.h"
+#include "ZoomMetaData.h"
+
+#include <QPropertyAnimation>
+#include <QTimer>
+
+class QWebHitTestResult;
+
+namespace GVA {
+
+class ViewportMetaData;
+class WebContentAnimationItem;
+
+class ScrollableWebContentView : public ScrollableViewBase, protected GestureListener {
+    Q_OBJECT
+public:
+    ScrollableWebContentView(WebContentAnimationItem* viewportProxyWidget, QGraphicsItem* parent = 0);
+    ~ScrollableWebContentView();
+
+    WebContentAnimationItem* viewportWidget() const;
+    void zoomToScreenCenter(bool zoomIn);
+
+    ZoomMetaData currentPageInfo();
+    void setCurrentPageInfo(ZoomMetaData data);
+    ZoomMetaData defaultZoomData();
+    void updatePreferredContentSize();
+    void setSuperPage();
+
+Q_SIGNALS:
+    void contextEventObject(QWebHitTestResult* eventTarget);
+    void viewScrolled(QPoint& scrollPos, QPoint& delta);
+
+public Q_SLOTS:
+    void reset();
+    void contentsSizeChanged(const QSize&);
+    void pageLoadFinished(bool);
+
+protected:
+    bool sceneEventFilter(QGraphicsItem*, QEvent*);
+
+    //From GestureListener
+    void handleGesture(GestureEvent*);
+
+    //Helpers
+    void handlePress(GestureEvent*);
+    void handleRelease(GestureEvent*);
+    void handleFlick(GestureEvent*);
+    void handleDoubleTap(GestureEvent*);
+    void handlePan(GestureEvent*);
+    void handleLongTap(GestureEvent*);
+
+    void setViewportWidgetGeometry(const QRectF& r);
+    void startZoomAnimToItemHotspot(const QPointF& hotspot, const QPointF& viewTargetHotspot, qreal scale, QRectF target = QRectF());
+    bool isZoomedIn() const;
+
+    //To handle kinetic scroller state changes
+    void stateChanged(KineticScrollable::State oldState, KineticScrollable::State newState);
+
+    void startZoomAnimation(const QRectF& zoomedRect);
+    void stopZoomAnimation();
+    void updateZoomEndRect();
+    void resizeEvent(QGraphicsSceneResizeEvent* event);
+    void adjustViewportSize(QSizeF oldSize, QSizeF newSize);
+    void sendEventToWebKit(QEvent::Type type, QPointF& scenPos);
+   
+protected Q_SLOTS:
+    void zoomAnimationStateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State);
+
+private:
+    GestureRecognizer m_gestureRecognizer;
+    QRectF m_animationEndRect;
+    QPropertyAnimation* m_zoomAnimator;          //Animates zooming transitions
+    ViewportMetaData* m_viewportMetaData;
+    QTimer m_tileUpdateEnableTimer;
+}; //ScrollableWebContentView
+
+} //namespace GVA
+
+#endif //ScrollableWebContentView_h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/SuperPageView.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,60 @@
+/*
+ * SuperPageView.cpp
+ *
+ *  Created on: Jun 11, 2010
+ *      Author: lewontin
+ */
+
+#include "SuperPageView.h"
+#include "GWebContentView.h"
+
+namespace GVA {
+
+SuperPageView::SuperPageView(GWebContentView * contentView, QObject * parent, const QString &objectName)
+: ControllableViewBase(parent),
+  m_contentView(contentView)
+{
+    setObjectName(objectName);  
+}
+
+SuperPageView::~SuperPageView(){
+    
+}
+
+QGraphicsWidget* SuperPageView::widget() const 
+{
+    //SuperPageView's widget is the content view widget
+    return m_contentView->widget();
+}
+
+void SuperPageView::show(){
+    //Ask the content view to show the super page
+    m_contentView->showSuperPage(objectName());
+    ControllableViewBase::activate();
+}
+
+QList<QAction*> SuperPageView::getContext() {
+    return m_actions.values();
+}
+
+//Creates an action, visible to JavaScript as name. If the script parameter is supplied, the
+//the action will invoke the supplied script in the context of the super page main frame 
+//(not in the context of the caller).
+
+void SuperPageView::addAction(const QString & name, const QString & script){
+    QAction* action;    
+    action = m_actions[name] =  new QAction(name, this);
+    action->setObjectName(name);
+    if(!script.isNull()){
+        action->setData(script);
+        connect(action, SIGNAL(triggered()), this, SLOT(invokeScriptAction()));
+    }
+}
+
+void SuperPageView::invokeScriptAction() {
+    QAction * action  = static_cast<QAction*>(sender());
+    QString script = action->data().toString();
+    m_contentView->webWidget()->page()->mainFrame()->evaluateJavaScript(script);
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/SuperPageView.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,40 @@
+/*
+ * SuperPageView.h
+ *
+ *  Created on: Jun 11, 2010
+ *      Author: lewontin
+ */
+
+#include "controllableviewimpl.h"
+
+#ifndef SUPERPAGEVIEW_H_
+#define SUPERPAGEVIEW_H_
+
+namespace GVA {
+
+class GWebContentView;
+
+class SuperPageView : public ControllableViewBase
+{
+      Q_OBJECT
+      
+  public:
+      SuperPageView(GWebContentView * contentView, QObject * parent = 0, const QString &objectName = QString::null);
+      virtual ~SuperPageView();
+      //Reimplement ControllableViewBase methods
+      static QString Type() { return "superPage"; }
+      virtual QString type() const { return Type(); }
+      QGraphicsWidget* widget() const;
+      virtual QList<QAction*> getContext();
+      virtual void show();
+      virtual void hide() {;}
+  public slots:
+      void addAction(const QString& action, const QString & script = QString());
+  private slots:
+      void invokeScriptAction();
+  private:
+      GWebContentView * m_contentView;
+      QMap<QString, QAction*>  m_actions;
+};
+}
+#endif /* SUPERPAGEVIEW_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/ViewportMetaData.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,223 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "ViewportMetaData.h"
+
+static const int DefaultViewportWidth = 640;
+static const int DefaultViewportHeight = 640;
+static const int MinViewportWidth = 200;
+static const int MaxViewportWidth = 10000;
+static const int MinViewportHeight = 200;
+static const int MaxViewportHeight = 10000;
+static const qreal DefaultMinScale = 0.2;
+static const qreal DefaultMaxScale = 5.;
+
+namespace GVA {
+
+ViewportMetaData::ViewportMetaData()
+{
+    initialize();
+}
+
+ViewportMetaData::ViewportMetaData(const ViewportMetaData& other)
+{
+    m_initialScale = other.m_initialScale;
+    m_minimumScale = other.m_minimumScale;
+    m_maximumScale = other.m_maximumScale;
+    m_width = other.m_width;
+    m_height = other.m_height;
+    m_userScalable = other.m_userScalable;
+    m_isValid = other.m_isValid;
+    m_scaleLimits = other.m_scaleLimits;
+    m_specifiedData.m_width = other.m_specifiedData.m_width;
+    m_specifiedData.m_height = other.m_specifiedData.m_height;
+    m_specifiedData.m_minScale = other.m_specifiedData.m_minScale;
+}
+
+ViewportMetaData& ViewportMetaData::operator=(const ViewportMetaData& other)
+{
+    m_initialScale = other.m_initialScale;
+    m_minimumScale = other.m_minimumScale;
+    m_maximumScale = other.m_maximumScale;
+    m_width = other.m_width;
+    m_height = other.m_height;
+    m_userScalable = other.m_userScalable;
+    m_isValid = other.m_isValid;
+    m_scaleLimits = other.m_scaleLimits;
+    m_specifiedData.m_width = other.m_specifiedData.m_width;
+    m_specifiedData.m_height = other.m_specifiedData.m_height;
+    m_specifiedData.m_minScale = other.m_specifiedData.m_minScale;
+
+    return *this;
+}
+
+ViewportMetaData::~ViewportMetaData()
+{}
+
+void ViewportMetaData::adjustViewportData(const QRect& clientRect)
+{
+    //Data updated from viewport tag
+    m_isValid = true;
+
+    //Adjust viewport dimensions
+    m_width = qBound(MinViewportWidth, m_width, MaxViewportWidth);
+    m_height = qBound(MinViewportHeight, m_height, MaxViewportHeight);
+
+    //Aspect ratio
+    qreal aspectRation = (qreal)clientRect.width() / clientRect.height();
+
+    if (m_width != DefaultViewportWidth && m_height == DefaultViewportHeight) {
+        //Width has been specified. Adjust height, min scale and max scale
+        m_height = m_width * (1 / aspectRation);
+    } else if (m_width == DefaultViewportWidth && m_height != DefaultViewportHeight) {
+        //Height has been specified. Adjust width, min scale and max scale
+        m_width = m_height * aspectRation;
+    } else {
+        //Putting below code under seperate 'else' to make it readable!
+        m_height = m_width * (1 / aspectRation);
+    }
+
+    //Adjust zoom limits
+    adjustZoomValues(clientRect);
+}
+
+void ViewportMetaData::updateViewportData(const QSize& newContentSize, const QRect& clientRect)
+{
+    //If still viewport tag has not been parsed
+    //Do not update values.
+    if(!m_isValid)
+        return;
+
+    //Update with viewport dimensions
+    m_width = qBound(MinViewportWidth, newContentSize.width(), MaxViewportWidth);
+    m_height = qBound(MinViewportHeight, newContentSize.height(), MaxViewportHeight);
+
+    //Adjust zoom limits
+    adjustZoomValues(clientRect);
+}
+
+void ViewportMetaData::orientationChanged(const QRect& newClientRect)
+{
+    //If still viewport tag has not been parsed
+    //Do not update values.
+    if(!m_isValid)
+        return;
+
+    //Aspect ratio
+    qreal aspectRation = (qreal)newClientRect.width() / newClientRect.height();
+
+    //Update with viewport dimensions
+    if (m_specifiedData.m_width.length()) {
+        if (QString::compare(m_specifiedData.m_width, "device-width", Qt::CaseInsensitive) == 0)
+            m_width = newClientRect.width();
+        else if(QString::compare(m_specifiedData.m_width, "device-height", Qt::CaseInsensitive) == 0)
+            m_width = newClientRect.height();
+
+        m_height = m_width * (1 / aspectRation);
+    }
+
+    //Check if width has not bee specified.
+    if (!m_specifiedData.m_width.length()) {
+        if (QString::compare(m_specifiedData.m_height, "device-width", Qt::CaseInsensitive) == 0)
+            m_height = newClientRect.width();
+        else if(QString::compare(m_specifiedData.m_height, "device-height", Qt::CaseInsensitive) == 0)
+            m_height = newClientRect.height();
+
+        m_width = m_height * aspectRation;
+    }
+
+    //Update with bounds
+    m_width = qBound(MinViewportWidth, m_width, MaxViewportWidth);
+    m_height = qBound(MinViewportHeight, m_height, MaxViewportHeight);
+}
+
+bool ViewportMetaData::isLayoutNeeded()
+{
+    if (!isUserSpecifiedWidth() || !isUserSpecifiedHeight())
+        return true;
+    return false;
+}
+void ViewportMetaData::initialize()
+{
+    m_initialScale = ValueUndefined;
+    m_minimumScale = DefaultMinScale;
+    m_maximumScale = DefaultMaxScale;
+    m_width = DefaultViewportWidth;
+    m_height = DefaultViewportHeight;
+    m_userScalable = true;
+    m_isValid = false;
+
+    //Clear user defined scales
+    setFlag(UserDefinedMinumumScale, false);
+    setFlag(UserDefinedMaximumScale, false);
+    setFlag(UserDefinedInitialScale, false);
+}
+
+void ViewportMetaData::adjustZoomValues(const QRect& clientRect)
+{
+    qreal fitToWidthZoom = (qreal)clientRect.width() / m_width;
+    fitToWidthZoom = qBound(DefaultMinScale, fitToWidthZoom, DefaultMaxScale);
+
+    m_maximumScale = qBound(fitToWidthZoom, m_maximumScale, DefaultMaxScale);
+
+    //Adjust minimum-sclae
+    if (getFlag(UserDefinedMinumumScale)) {
+        m_minimumScale = m_specifiedData.m_minScale;
+        m_minimumScale = qBound(fitToWidthZoom, m_minimumScale, m_maximumScale);
+    }
+    else
+        m_minimumScale = fitToWidthZoom;
+
+    //Adjust initial-scale
+    if (getFlag(UserDefinedInitialScale))
+        m_initialScale = qBound(m_minimumScale, m_initialScale, m_maximumScale);
+    else
+        m_initialScale = m_minimumScale;
+
+    //Turn off zooming if min and max zoom are same
+    if (m_minimumScale == m_maximumScale)
+        m_userScalable = false;
+}
+
+
+//FIX ME : Merge below functions to single. Now in Hurry!!
+bool ViewportMetaData::isUserSpecifiedWidth()
+{
+    if (m_specifiedData.m_width.length()) {
+        if (!QString::compare(m_specifiedData.m_width, "device-width", Qt::CaseInsensitive)
+            || !QString::compare(m_specifiedData.m_width, "device-height", Qt::CaseInsensitive))
+            return false;
+    }
+    return true;
+}
+
+bool ViewportMetaData::isUserSpecifiedHeight()
+{
+    if (m_specifiedData.m_height.length()) {
+        if (!QString::compare(m_specifiedData.m_height, "device-width", Qt::CaseInsensitive)
+            || !QString::compare(m_specifiedData.m_height, "device-height", Qt::CaseInsensitive))
+            return false;
+    }
+    return true;
+}
+
+}//namespace GVA
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/ViewportMetaData.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef ViewportMetaData_h
+#define ViewportMetaData_h
+
+#include <QFlags>
+#include <QObject>
+#include <QRect>
+
+namespace GVA {
+
+struct ParsedViewportData{
+    QString m_width;
+    QString m_height;
+    qreal m_minScale;
+};
+
+class ViewportMetaData {
+public:
+    enum {
+        ValueUndefined = -1
+    };
+
+    enum ScaleLimit {
+        UserDefinedMinumumScale = 0x1,
+        UserDefinedMaximumScale = 0x2,
+        UserDefinedInitialScale = 0x4,
+    };
+    Q_DECLARE_FLAGS(ScaleLimits, ScaleLimit)
+
+    ViewportMetaData();
+    ViewportMetaData(const ViewportMetaData&);
+    ViewportMetaData& operator=(const ViewportMetaData&);
+    ~ViewportMetaData();
+
+    void adjustViewportData(const QRect& clientRect);
+    void updateViewportData(const QSize& size, const QRect& clientRect);
+    void orientationChanged(const QRect& newClientRect);
+    bool isLayoutNeeded();
+    void reset() {initialize();}
+
+    void setFlag(ScaleLimit scaleLimit, bool enable)
+    {
+        if (enable)
+            m_scaleLimits |= scaleLimit;
+        else
+            m_scaleLimits &= !scaleLimit;
+    }
+
+    bool getFlag(ScaleLimit scaleLimit)
+    {
+        return m_scaleLimits.testFlag(scaleLimit);
+    }
+
+protected:
+    void initialize();
+    void adjustZoomValues(const QRect& clientRect);
+    bool isUserSpecifiedWidth();
+    bool isUserSpecifiedHeight();
+
+public:
+    qreal m_initialScale;
+    qreal m_minimumScale;
+    qreal m_maximumScale;
+    int m_width;
+    int m_height;
+    bool m_userScalable;
+    ScaleLimits m_scaleLimits;
+    bool m_isValid;
+    ParsedViewportData m_specifiedData;
+};//ViewportMetaData
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(ViewportMetaData::ScaleLimits)
+
+} //namespace GVA
+
+#endif //ViewportMetaData_h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/ViewportMetaDataParser.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "ViewportMetaDataParser.h"
+
+namespace GVA {
+
+ViewportMetaDataParser::ViewportMetaDataParser(const QRect& clientRect)
+            : m_clientRect(clientRect)
+{}
+
+ViewportMetaDataParser::~ViewportMetaDataParser()
+{}
+
+ViewportMetaData ViewportMetaDataParser::parse(const QString& viewportParams)
+{
+    ViewportMetaData viewportMetaData = processArguments(viewportParams);
+    viewportMetaData.adjustViewportData(m_clientRect);
+    return viewportMetaData;
+}
+
+
+//W A R N I N G
+//FOLLOWING CODE HAS BEEN TAKEN FROM WebCore/dom/Document.cpp
+//NEED TO REMOVE WHEN QtWebkit provides viewport param API
+
+// Though isspace() considers \t and \v to be whitespace, Win IE doesn't.
+bool ViewportMetaDataParser::isSeparator(QChar c)
+{
+    return c == ' '
+            || c == '\t'
+            || c == '\n'
+            || c == '\r'
+            || c == '='
+            || c == ','
+            || c == '\0'
+            || c == ';';
+}
+
+ViewportMetaData ViewportMetaDataParser::processArguments(const QString& features)
+{
+    int keyBegin, keyEnd;
+    int valueBegin, valueEnd;
+    ViewportMetaData viewportMetaData;
+
+    int i = 0;
+    int length = features.length();
+    QString buffer = features.toLower();
+
+    while (i < length) {
+        // skip to first non-separator, but don't skip past the end of the string
+        while (isSeparator(buffer[i])) {
+            if (i >= length)
+                break;
+            i++;
+        }
+        keyBegin = i;
+
+        // skip to first separator
+        while (!isSeparator(buffer[i]))
+            i++;
+        keyEnd = i;
+
+        // skip to first '=', but don't skip past a ',' or the end of the string
+        while (buffer[i] != '=') {
+            if (buffer[i] == ',' || i >= length)
+                break;
+            i++;
+        }
+        // skip to first non-separator, but don't skip past a ',' or the end of the string
+        while (isSeparator(buffer[i])) {
+            if (buffer[i] == ',' || i >= length)
+                break;
+            i++;
+        }
+        valueBegin = i;
+
+        // skip to first separator
+        while (!isSeparator(buffer[i]))
+            i++;
+        valueEnd = i;
+
+        Q_ASSERT(i <= length);
+
+        QString keyString = buffer.mid(keyBegin, keyEnd - keyBegin);
+        QString valueString = buffer.mid(valueBegin, valueEnd - valueBegin);
+        setViewportFeature(keyString, valueString, viewportMetaData);
+    }
+    return viewportMetaData;
+}
+
+void ViewportMetaDataParser::setViewportFeature(const QString& keyString, const QString& valueString, ViewportMetaData& viewportMetaData)
+{
+    float value = ViewportMetaData::ValueUndefined;
+
+    if (QString::compare(valueString, "device-width", Qt::CaseInsensitive) == 0)
+        value = m_clientRect.width();
+    else if (QString::compare(valueString, "device-height", Qt::CaseInsensitive) == 0)
+        value = m_clientRect.height();
+    else if (QString::compare(valueString, "default", Qt::CaseInsensitive) == 0) {
+        // This allows us to distinguish the omission of a key from asking for the default value.
+        value = -2;
+    }
+    else if (valueString.length()) {
+        // listing a key with no value is shorthand for key=default
+        value = valueString.toDouble();
+    }
+
+    if (keyString == "initial-scale") {
+        viewportMetaData.m_initialScale = value;
+        viewportMetaData.setFlag(ViewportMetaData::UserDefinedInitialScale,true);
+    }
+    else if (keyString == "minimum-scale") {
+        viewportMetaData.m_minimumScale = value;
+        viewportMetaData.m_specifiedData.m_minScale = value;
+        viewportMetaData.setFlag(ViewportMetaData::UserDefinedMinumumScale,true);
+    }
+    else if (keyString == "maximum-scale") {
+        viewportMetaData.m_maximumScale = value;
+        viewportMetaData.setFlag(ViewportMetaData::UserDefinedMaximumScale,true);
+    }
+    else if (keyString == "user-scalable") {
+        if (QString::compare(valueString, "yes", Qt::CaseInsensitive) == 0)
+            viewportMetaData.m_userScalable = true;
+        else
+            viewportMetaData.m_userScalable = false;
+    }
+    else if (keyString == "width") {
+        viewportMetaData.m_width = value;
+        viewportMetaData.m_specifiedData.m_width = valueString;
+    }
+    else if (keyString == "height") {
+        viewportMetaData.m_height = value;
+        viewportMetaData.m_specifiedData.m_height = valueString;
+    }
+}
+
+} //namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/ViewportMetaDataParser.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef ViewportMetaDataParser_h
+#define ViewportMetaDataParser_h
+
+#include "ViewportMetaData.h"
+
+namespace GVA {
+
+class ViewportMetaDataParser : public QObject {
+public:
+    ViewportMetaDataParser(const QRect& clientRect);
+    ~ViewportMetaDataParser();
+
+    ViewportMetaData parse(const QString&);
+
+private:
+    void adjustViewportData(ViewportMetaData& viewportMetaData);
+    bool isSeparator(QChar c);
+    ViewportMetaData processArguments(const QString& features);
+    void setViewportFeature(const QString& keyString, const QString& valueString, ViewportMetaData& viewportMetaData);
+
+    QRect m_clientRect;
+};
+
+} //namespace GVA
+
+#endif //ViewportMetaDataParser_h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/WebContentAnimationItem.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,177 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "WebContentAnimationItem.h"
+
+#include <QGraphicsWebView>
+#include <QtGlobal>
+#include <QWebElement>
+#include <QWebFrame>
+
+static const int MinDoubleClickZoomTargetWidth = 100;     //Target block width for applying double tap zoom
+static const int ZoomCommitDuration = 50;                 //Timeout before commiting zoom
+static const qreal ZoomableContentMinWidth = 300.;
+
+namespace GVA {
+
+WebContentAnimationItem::WebContentAnimationItem(QGraphicsWidget* parent, Qt::WindowFlags wFlags)
+    : QGraphicsWidget(parent, wFlags)
+    , m_zoomCommitTimer(this)
+    , m_viewportMetaData(0)
+{
+    setFlag(QGraphicsItem::ItemHasNoContents, true);
+    setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
+    setFlag(QGraphicsItem::ItemClipsToShape, true);
+
+    setFiltersChildEvents(true);
+
+    connect(&m_zoomCommitTimer, SIGNAL(timeout()), this, SLOT(commitZoom()));
+    m_zoomCommitTimer.setSingleShot(true);
+}
+
+WebContentAnimationItem::~WebContentAnimationItem()
+{}
+
+void WebContentAnimationItem::setWebView(QGraphicsWebView* webView)
+{
+    Q_ASSERT(m_webView);
+    m_webView = webView;
+
+    //Enabling resize to contents avoids scrollbars in mainframe
+    m_webView->setResizesToContents(true);
+    m_webView->setParentItem(this);
+    m_webView->setAttribute(Qt::WA_OpaquePaintEvent, true);
+}
+
+void WebContentAnimationItem::updatePreferredContentSize(const QSize& size)
+{
+    // FIXME: we have bug in QtWebKit API when tileCacheEnabled is true.
+    // this causes viewport not to reset between the page loads.
+    // Thus, we need to update viewport manually until we have fix for this.
+
+    m_webView->page()->setPreferredContentsSize(size);
+    resize(contentsSize());
+}
+
+QSize WebContentAnimationItem::contentsSize() const
+{
+    return m_webView->page()->mainFrame()->contentsSize();
+}
+
+void WebContentAnimationItem::setZoomScale(qreal value, bool immediateCommit)
+{
+    value = qBound(m_viewportMetaData->m_minimumScale, value, m_viewportMetaData->m_maximumScale);
+    qreal curZoomScale = zoomScale();
+
+    if (qFuzzyCompare(value, curZoomScale)) {
+        notifyZoomActions(curZoomScale);
+        return;
+    }
+
+    if (!immediateCommit)
+        disableContentUpdates();
+
+    m_webView->setScale(value);
+
+    if (immediateCommit)
+        commitZoom();
+    else
+        m_zoomCommitTimer.start(ZoomCommitDuration);
+}
+
+qreal WebContentAnimationItem::zoomScale() const
+{
+    if (!m_webView)
+        return 1.;
+
+    return m_webView->scale();
+}
+
+QRectF WebContentAnimationItem::findZoomableRectForPoint(const QPointF& point)
+{
+    QPointF zoomPoint = m_webView->mapFromParent(point);
+
+    QWebHitTestResult hitResult = m_webView->page()->mainFrame()->hitTestContent(zoomPoint.toPoint());
+    QWebElement targetElement = hitResult.enclosingBlockElement();
+
+    while (!targetElement.isNull() && targetElement.geometry().width() < MinDoubleClickZoomTargetWidth)
+        targetElement = targetElement.parent();
+
+    if (!targetElement.isNull()) {
+        QRectF elementRect = targetElement.geometry();
+        qreal overMinWidth = elementRect.width() - ZoomableContentMinWidth;
+        if (overMinWidth < 0)
+            elementRect.adjust(overMinWidth / 2, 0, -overMinWidth / 2, 0);
+        zoomPoint.setX(elementRect.x());
+        QRectF resultRect(zoomPoint, elementRect.size());
+        return QRectF(m_webView->mapToParent(resultRect.topLeft()),
+                      m_webView->mapToParent(resultRect.bottomRight()));
+    }
+    return QRectF();
+}
+
+void WebContentAnimationItem::disableContentUpdates()
+{
+    //Disable tiling updates
+    m_webView->setTiledBackingStoreFrozen(true);
+}
+
+void WebContentAnimationItem::enableContentUpdates()
+{
+    //Enable tiling updates
+    m_webView->setTiledBackingStoreFrozen(false);
+}
+
+void WebContentAnimationItem::commitZoom()
+{
+    m_zoomCommitTimer.stop();
+    notifyZoomActions(zoomScale());
+    enableContentUpdates();
+}
+
+void WebContentAnimationItem::resizeEvent(QGraphicsSceneResizeEvent* event)
+{
+    QGraphicsWidget::resizeEvent(event);
+    setZoomScale(size().width() / contentsSize().width());
+}
+
+void WebContentAnimationItem::notifyZoomActions(qreal newScale)
+{
+    bool enableZoomIn = false;
+    bool enableZoomOut = false;
+
+    if (m_viewportMetaData->m_userScalable) {
+
+        if (newScale > m_viewportMetaData->m_minimumScale)
+            enableZoomOut = true;
+        else
+            enableZoomOut = false;
+
+        if (newScale < m_viewportMetaData->m_maximumScale)
+            enableZoomIn = true;
+        else
+            enableZoomIn = false;
+	} 
+
+    emit updateZoomActions(enableZoomIn, enableZoomOut);
+}
+
+} //namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/WebContentAnimationItem.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef WebContentAnimationItem_h
+#define WebContentAnimationItem_h
+
+#include "ViewportMetaDataParser.h"
+
+#include <QGraphicsWidget>
+#include <QTimer>
+
+class QGraphicsWebView;
+
+namespace GVA {
+
+class WebContentAnimationItem : public QGraphicsWidget {
+    Q_OBJECT
+    Q_PROPERTY(qreal zoomScale READ zoomScale WRITE setZoomScale)
+
+public:
+    WebContentAnimationItem(QGraphicsWidget* parent = 0, Qt::WindowFlags wFlags = 0);
+    ~WebContentAnimationItem();
+
+    void setWebView(QGraphicsWebView* webView);
+    QGraphicsWebView* webView() const { return m_webView; }
+
+    void updatePreferredContentSize(const QSize& size);
+    QSize contentsSize() const;
+
+    void setZoomScale(qreal, bool immediateCommit = false);
+    qreal zoomScale() const;
+
+    QRectF findZoomableRectForPoint(const QPointF& point);
+
+    void setViewportMetaData(ViewportMetaData* viewportMetaData) { m_viewportMetaData = viewportMetaData; }
+
+public Q_SLOTS:
+    void enableContentUpdates();
+    void disableContentUpdates();
+    void commitZoom();
+
+protected:
+    void resizeEvent(QGraphicsSceneResizeEvent* event);
+	void notifyZoomActions(qreal newScale);
+
+Q_SIGNALS:
+    void updateZoomActions(bool enableZoomIn, bool enableZoomOut);
+
+private:
+    QGraphicsWebView* m_webView;
+    QTimer m_zoomCommitTimer;
+    ViewportMetaData* m_viewportMetaData; //Not owned!
+}; //WebContentAnimationItem
+
+} //namespace GVA
+
+#endif //WebContentAnimationItem_h
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/WebContentViewWidget.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,146 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "WebContentViewWidget.h"
+
+#include "ScrollableWebContentView.h"
+#include "WebContentAnimationItem.h"
+#include "webpagecontroller.h"
+#include "WebView.h"
+#include "wrtbrowsercontainer.h"
+#include "ZoomMetaData.h"
+
+#include <QGraphicsLinearLayout>
+#include <QStyleOptionGraphicsItem>
+#include <QWebFrame>
+
+namespace GVA {
+
+WebContentViewWidget::WebContentViewWidget(QObject* parent, QWebPage* page)
+    : m_webViewportProxy(new WebContentAnimationItem())
+{
+    setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
+    setParent(parent);
+
+    m_webViewport = new ScrollableWebContentView(m_webViewportProxy, this);
+
+    m_webView = new WebView();
+
+    if (page)
+        setPage(page);
+
+    m_webViewportProxy->setWebView(m_webView);
+    updatePreferredContentSize();
+    m_webViewportProxy->setPos(QPointF(0,0));
+
+    //FIX ME : Should we have to delete layout??
+    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical, this);
+    layout->setContentsMargins(0,0,0,0);
+    layout->setSpacing(0.);
+    layout->addItem(m_webViewport);
+
+    connect(m_webViewportProxy
+            , SIGNAL(updateZoomActions(bool,bool))
+            , this
+            , SIGNAL(updateZoomActions(bool,bool)));
+    connect(m_webViewport
+            , SIGNAL(contextEventObject(QWebHitTestResult*))
+            , this
+            , SIGNAL(contextEventObject(QWebHitTestResult*)));
+
+    connect(m_webViewport
+            , SIGNAL(viewScrolled(QPoint&, QPoint&))
+            , this
+            , SIGNAL(viewScrolled(QPoint&, QPoint&)));
+}
+
+WebContentViewWidget::~WebContentViewWidget()
+{
+    delete m_webView;
+    delete m_webViewportProxy;
+    delete m_webViewport;
+}
+
+void WebContentViewWidget::resizeEvent(QGraphicsSceneResizeEvent* event)
+{
+    QGraphicsWidget::resizeEvent(event);
+
+    setGeometry(QRectF(pos(), size()));
+    setPreferredSize(size());
+}
+
+QWebPage* WebContentViewWidget::page()
+{
+    return m_webView->page();
+}
+
+void WebContentViewWidget::setPage(QWebPage* page)
+{
+    m_webView->setPage(page);
+
+    connect(this->page()->mainFrame(), SIGNAL(initialLayoutCompleted()), m_webViewport, SLOT(reset()));
+    connect(this->page()->mainFrame(), SIGNAL(contentsSizeChanged(const QSize &)), m_webViewport, SLOT(contentsSizeChanged(const QSize&)));
+    connect(this->page()->mainFrame(), SIGNAL(loadFinished(bool)), m_webViewport, SLOT(pageLoadFinished(bool)));
+}
+
+QGraphicsWebView* WebContentViewWidget::webView()
+{
+    return m_webView;
+}
+
+ZoomMetaData WebContentViewWidget::currentPageInfo()
+{
+    return m_webViewport->currentPageInfo();
+}
+
+void WebContentViewWidget::setCurrentPageInfo(ZoomMetaData data)
+{
+    m_webViewport->setCurrentPageInfo(data);
+}
+
+ZoomMetaData WebContentViewWidget::defaultZoomData()
+{
+    return m_webViewport->defaultZoomData();
+}
+
+void WebContentViewWidget::setPageZoom(bool zoomIn)
+{
+    Q_ASSERT(m_webViewport);
+    m_webViewport->zoomToScreenCenter(zoomIn);
+}
+
+void WebContentViewWidget::showPage(bool isSuperPage)
+{
+    if (!isSuperPage) {
+        WRT::WrtBrowserContainer* wbc = WebPageController::getSingleton()->currentPage();
+        setPage((QWebPage*)wbc);  // static_cast here gives compiler error
+    } else { 
+        //Its a super page
+        m_webViewport->setSuperPage();
+    }
+}
+
+void WebContentViewWidget::updatePreferredContentSize()
+{
+   m_webViewport->updatePreferredContentSize();
+}
+
+} // namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/WebContentViewWidget.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef WebContentViewWidget_h
+#define WebContentViewWidget_h
+
+#include <QGraphicsWidget>
+
+class QGraphicsWebView;
+class QWebPage;
+class QWebHitTestResult;
+struct ZoomMetaData;
+
+namespace GVA {
+
+class ScrollableWebContentView;
+class WebContentAnimationItem;
+class WebView;
+
+class WebContentViewWidget : public QGraphicsWidget {
+    Q_OBJECT
+    Q_PROPERTY(QWebPage* page READ page WRITE setPage)
+
+public:
+    WebContentViewWidget(QObject* parent, QWebPage* page = 0);
+    ~WebContentViewWidget();
+
+    void resizeEvent(QGraphicsSceneResizeEvent* event);
+
+    QWebPage* page();
+    void setPage(QWebPage* page);
+
+    QGraphicsWebView* webView();
+    void setPageZoom(bool zoomIn);
+
+    ZoomMetaData currentPageInfo();
+    void setCurrentPageInfo(ZoomMetaData);
+    ZoomMetaData defaultZoomData();
+    void showPage(bool isSuperPage);
+    void updatePreferredContentSize();
+
+Q_SIGNALS:
+    void updateZoomActions(bool enableZoomIn, bool enableZoomOut);
+    void contextEventObject(QWebHitTestResult* eventTarget);
+    void viewScrolled(QPoint& scrollPos, QPoint& delta);
+
+private:
+    WebView* m_webView;
+    ScrollableWebContentView* m_webViewport;
+    WebContentAnimationItem* m_webViewportProxy;
+};
+
+}// namespace GVA
+
+#endif //WebContentViewWidget_h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/WebView.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+#include "WebView.h"
+
+#include "browserpagefactory.h"
+#include "wrtbrowsercontainer.h"
+
+#include <QWebFrame>
+#include <QWebPage>
+
+namespace GVA {
+
+WebView::WebView()
+    : QGraphicsWebView()
+    , m_webPage(0)
+{}
+
+WebView::~WebView()
+{}
+
+QWebPage* WebView::page() const
+{
+    return m_webPage;
+}
+
+void WebView::setPage(QWebPage* page)
+{
+    if (m_webPage == page)
+        return;
+
+    if (m_webPage) {
+        disconnect(m_webPage->mainFrame(), 0, this, 0);
+        m_webPage->setView(0);
+    }
+
+    m_webPage = page;
+
+    if (!m_webPage)
+        m_webPage = createWebPage();
+
+    QGraphicsWebView::setPage(m_webPage);
+
+    emit titleChanged(title());
+    emit urlChanged(url());
+}
+
+QWebPage* WebView::createWebPage()
+{
+    return reinterpret_cast<QWebPage*>(BrowserPageFactory::openBrowserPage());
+}
+
+}//namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ContentViews/WebView.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef WebView_h
+#define WebView_h
+
+#include <QGraphicsWebView>
+
+class QWebPage;
+
+namespace GVA {
+
+class WebView :public QGraphicsWebView {
+    Q_OBJECT
+    Q_PROPERTY(QWebPage* page READ page WRITE setPage)
+public:
+    WebView();
+    ~WebView();
+
+    QWebPage* page()const;
+    void setPage(QWebPage* page);
+
+protected:
+    QWebPage* createWebPage();
+
+private:
+    QWebPage* m_webPage;
+
+};//WebView
+}//namespace GVA
+
+#endif //WebView_h
--- a/ginebra2/Downloads.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/Downloads.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -33,11 +33,7 @@
 
 #include "bedrockprovisioning.h"
 #include "downloadcontroller.h"
-
-#ifdef USE_DOWNLOAD_MANAGER
-#include "download.h"
-#include "downloadmanager.h"
-#endif
+#include "downloadproxy.h"
 
 namespace GVA {
 
@@ -62,33 +58,31 @@
 
         m_downloadController = new DownloadController(client, proxy);
 
-#ifdef USE_DOWNLOAD_MANAGER
-        safe_connect(m_downloadController, SIGNAL(downloadCreated(Download *)),
-                this, SLOT(reportDownloadCreated(Download *)));
+        safe_connect(m_downloadController, SIGNAL(downloadCreated(DownloadProxy)),
+                this, SLOT(reportDownloadCreated(DownloadProxy)));
 
-        safe_connect(m_downloadController, SIGNAL(downloadStarted(Download *)),
-                this, SLOT(reportDownloadStarted(Download *)));
+        safe_connect(m_downloadController, SIGNAL(downloadStarted(DownloadProxy)),
+                this, SLOT(reportDownloadStarted(DownloadProxy)));
 
-        safe_connect(m_downloadController, SIGNAL(downloadFinished(Download *)),
-                this, SLOT(reportDownloadSuccess(Download *)));
+        safe_connect(m_downloadController, SIGNAL(downloadFinished(DownloadProxy)),
+                this, SLOT(reportDownloadSuccess(DownloadProxy)));
 
-        safe_connect(m_downloadController, SIGNAL(downloadFailed(Download *, const QString &)),
-                this, SLOT(reportDownloadFailure(Download *, const QString &)));
+        safe_connect(m_downloadController, SIGNAL(downloadFailed(DownloadProxy, const QString &)),
+                this, SLOT(reportDownloadFailure(DownloadProxy, const QString &)));
 
-        safe_connect(m_downloadController, SIGNAL(downloadPaused(Download *, const QString &)),
-                this, SLOT(reportDownloadFailure(Download *, const QString &)));
+        safe_connect(m_downloadController, SIGNAL(downloadPaused(DownloadProxy, const QString &)),
+                this, SLOT(reportDownloadFailure(DownloadProxy, const QString &)));
 
-        safe_connect(m_downloadController, SIGNAL(downloadCancelled(Download *, const QString &)),
-                this, SLOT(reportDownloadFailure(Download *, const QString &)));
+        safe_connect(m_downloadController, SIGNAL(downloadCancelled(DownloadProxy, const QString &)),
+                this, SLOT(reportDownloadFailure(DownloadProxy, const QString &)));
 
-        safe_connect(m_downloadController, SIGNAL(downloadNetworkLoss(Download *, const QString &)),
-                this, SLOT(reportDownloadFailure(Download *, const QString &)));
+        safe_connect(m_downloadController, SIGNAL(downloadNetworkLoss(DownloadProxy, const QString &)),
+                this, SLOT(reportDownloadFailure(DownloadProxy, const QString &)));
 
-        // There is no Download* argument to extract data from so we may as well
+        // There is no argument to extract data from so we may as well
         // just connect signal to signal without going through another slot.
         safe_connect(m_downloadController, SIGNAL(downloadsCleared()),
                 this, SIGNAL(downloadsCleared()));
-#endif
 
         safe_connect(m_downloadController, SIGNAL(unsupportedDownload(const QUrl &)),
                 this, SLOT(reportUnsupportedDownload(const QUrl &)));
@@ -128,7 +122,6 @@
         return false;
     }
 
-    qDebug() << "Download to:" << saveFile;
     saveInfo.setFile(saveFile);
     return true;
 }
@@ -146,50 +139,46 @@
     m_downloadController->startDownload(url, saveInfo);
 }
 
-#ifdef USE_DOWNLOAD_MANAGER
-
-void Downloads::reportDownloadCreated(Download * download)
+void Downloads::reportDownloadCreated(DownloadProxy downloadProxy)
 {
     // Localize dialog message.
 
     QString fmt = qtTrId("txt_browser_downloading_file");
-    QString msg = fmt.arg(download->getAttribute(DlFileName).toString());
+    QString msg = fmt.arg(downloadProxy.fileName());
 
     emit downloadCreated(msg);
 }
 
-void Downloads::reportDownloadStarted(Download * download)
+void Downloads::reportDownloadStarted(DownloadProxy downloadProxy)
 {
     // Localize dialog message.
 
     QString fmt = qtTrId("txt_browser_downloading_file");
-    QString msg = fmt.arg(download->getAttribute(DlFileName).toString());
+    QString msg = fmt.arg(downloadProxy.fileName());
 
     emit downloadCreated(msg);
 }
 
-void Downloads::reportDownloadSuccess(Download * download)
+void Downloads::reportDownloadSuccess(DownloadProxy downloadProxy)
 {
     // Localize dialog message.
 
     QString fmt = qtTrId("txt_browser_file_has_finished_downloading");
-    QString msg = fmt.arg(download->getAttribute(DlFileName).toString());
+    QString msg = fmt.arg(downloadProxy.fileName());
 
     emit downloadSuccess(msg);
 
     // Don't forget to remove the download; otherwise the download
     // controller won't know to emit the DownloadsCleared signal.
 
-    DownloadManager * manager = download->downloadManager();
-
-    manager->removeOne(download);
+    downloadProxy.remove();
 }
 
-void Downloads::reportDownloadFailure(Download * download, const QString & error)
+void Downloads::reportDownloadFailure(DownloadProxy downloadProxy, const QString & error)
 {
     // What went wrong?
 
-    DownloadController::debugDownload(download);
+    downloadProxy.debug();
 
     // Localize dialog message.
 
@@ -197,24 +186,18 @@
     QString msg = fmt.arg(
             "<span style=\"color:red\">",
             "</span>",
-            download->getAttribute(DlFileName).toString());
+            downloadProxy.fileName());
 
     emit downloadFailure(msg);
 
     // Don't forget to remove the download; otherwise the download
     // controller won't know to emit the DownloadsCleared signal.
 
-    DownloadManager * manager = download->downloadManager();
-
-    manager->removeOne(download);
+    downloadProxy.remove();
 }
 
-#endif // USE_DOWNLOAD_MANAGER
-
 void Downloads::reportUnsupportedDownload(const QUrl & url)
 {
-    qDebug() << "Unsupported download:" << url;
-
     emit unsupportedDownload("Unsupported content"); // ;;; localize? or not b/c this is temporary?
 }
 
--- a/ginebra2/Downloads.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/Downloads.h	Tue Jul 06 14:03:49 2010 +0300
@@ -24,11 +24,12 @@
 
 #include <QObject>
 
+#include "downloadproxy.h"
+
 class QUrl;
 class QWebPage;
 
 class DownloadController;
-class Download;
 
 namespace GVA {
 
@@ -46,12 +47,10 @@
     void downloadImage(const QString & imageUrl);
 
 private slots:
-#ifdef USE_DOWNLOAD_MANAGER
-    void reportDownloadCreated(Download * download);
-    void reportDownloadStarted(Download * download);
-    void reportDownloadSuccess(Download * download);
-    void reportDownloadFailure(Download * download, const QString & error);
-#endif
+    void reportDownloadCreated(DownloadProxy downloadProxy);
+    void reportDownloadStarted(DownloadProxy downloadProxy);
+    void reportDownloadSuccess(DownloadProxy downloadProxy);
+    void reportDownloadFailure(DownloadProxy downloadProxy, const QString & error);
     void reportUnsupportedDownload(const QUrl & url);
 
 signals:
--- a/ginebra2/DualButtonToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/DualButtonToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -28,8 +28,8 @@
 namespace GVA {
 
     DualButtonToolbarSnippet::DualButtonToolbarSnippet(const QString& elementId, ChromeWidget * chrome,
-                                                       const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-        : ToolbarSnippet(elementId, chrome, ownerArea, element, widget)
+                                                       const QWebElement & element)
+        : ToolbarSnippet(elementId, chrome, element)
     {      
         m_type = "";
     }
@@ -50,7 +50,7 @@
       Update the item spacing based on the chrome width
     */
     void DualButtonToolbarSnippet::updateOwnerArea() {
-        setChildSpacing(m_chrome->width());
+      setChildSpacing(m_chrome->layout()->size().width());
         ToolbarSnippet::updateOwnerArea();
     }
 
@@ -65,19 +65,6 @@
         ToolbarSnippet::updateOwnerArea();
     }
 
-    void DualButtonToolbarSnippet::onMouseEvent(QEvent::Type type) {
-
-        //qDebug() << "DualButtonToolbarSnippet::onMouseEvent - Type:" << type;
-        ActionButton* button  = static_cast<ActionButton*> ( sender());
-        ActionButtonSnippet * buttonSnippet =  static_cast<ActionButtonSnippet*>( button->snippet());
- 
-        if (type == QEvent::GraphicsSceneMousePress ) {
-            buttonSnippet->setActive(true);
-        }
-        else if (type == QEvent::GraphicsSceneMouseRelease ) {
-            buttonSnippet->updateButtonState(false);
-        }
-    }
 } // end of namespace GVA
 
 
--- a/ginebra2/DualButtonToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/DualButtonToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -34,16 +34,13 @@
   {
     Q_OBJECT
   public:
-    DualButtonToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    DualButtonToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~DualButtonToolbarSnippet();
 
     /// Reimplemented 
     void updateOwnerArea();
     void updateSize(QSize );
 
-  private Q_SLOTS:
-      void onMouseEvent(QEvent::Type type);
-
   private:
     /// Must be Reimplemented
     virtual void setAction(ChromeSnippet * s) = 0;
--- a/ginebra2/EditorSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/EditorSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -29,11 +29,18 @@
     connectAll();
   }
 
-  void EditorSnippet::setWidget(QGraphicsWidget * widget){
-    ChromeSnippet::setWidget(widget);
+  void EditorSnippet::setChromeWidget(QGraphicsWidget * widget){
+    ChromeSnippet::setChromeWidget(widget);
     connectAll();
   }
 
+  EditorSnippet * EditorSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+  {
+      EditorSnippet* that = new EditorSnippet(elementId, chrome, 0, element);
+      that->setChromeWidget( new TextEditItem( that, chrome ) );
+      return that;
+  }
+  
   void EditorSnippet::connectAll(){
     if(m_widget){
       GTextEditor * editor = static_cast<TextEditItem*>(m_widget)->editor();
@@ -82,4 +89,16 @@
   void EditorSnippet::unselect(){
     return static_cast<TextEditItem*>(m_widget)->unselect();
   }
+  
+  int EditorSnippet::getTextOptions(){
+    return (int) static_cast<TextEditItem*>(m_widget)->getTextOptions(); 
+  }
+  
+  void EditorSnippet::setTextOptions(int flag){
+    return static_cast<TextEditItem*>(m_widget)->setTextOptions(flag);
+  }
+
+  void EditorSnippet::setMaxTextLength(int length){
+    return static_cast<TextEditItem*>(m_widget)->setMaxTextLength(length);
+  }
 }
--- a/ginebra2/EditorSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/EditorSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -35,7 +35,8 @@
     public:
        EditorSnippet(const QString & elementId, ChromeWidget * chrome, QGraphicsWidget * widget, const QWebElement & element);
        virtual ~EditorSnippet() {;}
-       virtual void setWidget(QGraphicsWidget * widget);
+       static EditorSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
+       virtual void setChromeWidget(QGraphicsWidget * widget);
        Q_PROPERTY( QString text READ text WRITE setText)
        void setText( const QString & text );
        QString text();
@@ -46,6 +47,10 @@
        void unselect();
        void onFocusChanged(bool in);
        void onTapped(QPointF& pos);
+       int getTextOptions();
+       // Calling this function will overwrite the existing options
+       void setTextOptions(int flag);
+       void setMaxTextLength(int length);
     signals:
        void activated();
        void lostFocus();
--- a/ginebra2/EditorWidget.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/EditorWidget.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -42,8 +42,8 @@
 
   GTextLineItem::GTextLineItem(QGraphicsItem * parent)
   : QGraphicsTextItem(parent)
-  , m_predictionDisabled(false)
-  , m_autoUppercase(false)
+  , m_maxTextLength(0)
+  , m_hints(Qt::ImhNoPredictiveText) // disable the predictive text
   {
     // Disable wrapping, force text to be stored and displayed
     // as a single line.
@@ -60,15 +60,47 @@
 
   GTextLineItem::~GTextLineItem()
   {
+    if (m_maxTextLength > 0)
+      disconnect(document(), SIGNAL(contentsChange(int, int, int)), this, SLOT(contentsChange(int, int, int)));
     QApplication::setStartDragDistance(m_defaultStartDragDistance);
   }
 
   void GTextLineItem::setText(const QString & text)
   {
-    setPlainText(text);
+    QString newText = text;
+    if(m_maxTextLength > 0 && text.length() > m_maxTextLength ) {
+        newText = newText.left(m_maxTextLength);
+    }
+    setPlainText(newText);
     m_textLine = document()->begin().layout()->lineForTextPosition(0);
   }
 
+  void GTextLineItem::setMaxTextLength(int length)
+  {
+    if (m_maxTextLength <= 0 && length > 0) {
+        QString text = toPlainText();
+        if( text.length() > length ) {
+          setPlainText(text.left(length));
+        }
+        connect(document(), SIGNAL(contentsChange(int, int, int)), this, SLOT(contentsChange(int, int, int)));
+    } else if (m_maxTextLength > 0 && length <= 0) {
+        disconnect(document(), SIGNAL(contentsChange(int, int, int)), this, SLOT(contentsChange(int, int, int)));
+    }
+    m_maxTextLength = length;
+  }
+
+  void GTextLineItem::contentsChange(int position, int charsRemoved, int charsAdded)
+  {
+    Q_UNUSED(position);
+    Q_UNUSED(charsRemoved);
+    Q_UNUSED(charsAdded);
+    if( m_maxTextLength > 0 && toPlainText().length() > m_maxTextLength ) {
+      QTextCursor cursor = textCursor();
+      cursor.deletePreviousChar();
+      setTextCursor(cursor);
+    }
+  }
+
   // Get the pixel offset of the cursor. Needed to implement scrolling.
 
   qreal GTextLineItem::cursorX()
@@ -179,21 +211,14 @@
     // disable the drag & drop to fix the auto-delete-all issue
     QApplication::setStartDragDistance(1000);
     QGraphicsTextItem::focusInEvent(event);
-    // disable the text predictive
-    if (!m_predictionDisabled) {
-      QWidget* fw = QApplication::focusWidget();
-      Qt::InputMethodHints hints = fw->inputMethodHints();
-      hints |= Qt::ImhNoPredictiveText;
-      if (!m_autoUppercase)
-          hints |= Qt::ImhNoAutoUppercase;
-      fw->setInputMethodHints(hints);
-      m_predictionDisabled = true;
-    }
-    qDebug() << "GTextLineItem::focusInEvent";
-    if (event->reason() != Qt::PopupFocusReason){ // to fix the special char issue on VKB
-      qDebug() << "GTextLineItem::focusInEvent: emit focus changed ";
+
+    QWidget* fw = QApplication::focusWidget();
+    Qt::InputMethodHints hints = fw->inputMethodHints();
+    if (hints != m_hints)
+      fw->setInputMethodHints(m_hints);
+
+    if (event->reason() != Qt::PopupFocusReason) // to fix the special char issue on VKB
       emit focusChanged(true);
-    }
   }
 
   void GTextLineItem::focusOutEvent(QFocusEvent * event)
@@ -212,6 +237,11 @@
     event->ignore();
   }
 
+  void GTextLineItem::setInputMethodHints(Qt::InputMethodHints hints)
+  { 
+    m_hints = hints;
+    m_hints |= Qt::ImhNoPredictiveText;  // disable the predictive text
+  }
 
   // Methods for class GLineEditor
   // GLineEditor is a QGraphicsWidget that wraps a GTextLineItem to implement scrolling, 
@@ -291,7 +321,6 @@
     painter->save();
     painter->setRenderHint(QPainter::Antialiasing);
     // First, fill rectangle with background color.
-    qDebug() << "GLineEditor::paint" << boundingRect().width() << " " << size().width();
     painter->fillRect(boundingRect(), m_backgroundColor);
     painter->restore();
     if(!isEnabled()) {
@@ -535,6 +564,7 @@
 
   TextEditItem::TextEditItem(ChromeSnippet * snippet, ChromeWidget * chrome, QGraphicsItem * parent)
     : NativeChromeItem(snippet, parent)
+	, m_justFocusIn(false)
   {
     m_textEditor = new GTextEditor(snippet, chrome, this);
   
@@ -560,8 +590,35 @@
     //Padding sets the "border" width
     QString cssPadding = we.styleProperty("padding-top", QWebElement::ComputedStyle);
     m_textEditor->setPadding(cssPadding.remove("px").toInt());
-  }
+
+	safe_connect(m_textEditor, SIGNAL(focusChanged(bool)),this, SLOT(focusChanged(bool)));
+    safe_connect(m_textEditor, SIGNAL(tapped(QPointF&)),this, SLOT(tapped(QPointF&)));
+}
   
+  void TextEditItem::tapped(QPointF& pos)
+{
+    bool hitText = m_textEditor->tappedOnText(pos.x());
+    if (!m_justFocusIn && !hitText)
+        m_textEditor->unselect();
+
+    if (m_justFocusIn) {
+        m_justFocusIn = false;
+        if (hitText && !m_textEditor->hasSelection())
+            m_textEditor->selectAll();
+    }
+}
+
+void TextEditItem::focusChanged(bool focusIn)
+{
+    if (focusIn)
+        m_justFocusIn = true;
+    else {
+        m_justFocusIn = false;
+        m_textEditor->unselect();
+        m_textEditor->shiftToLeftEnd();
+    }
+}
+
   TextEditItem::~TextEditItem()
   {
     delete m_textEditor;
@@ -571,5 +628,10 @@
   {
     m_textEditor->resize(ev->newSize());
   }
+  
+  void TextEditItem::setTextOptions(int flag)
+  {
+    m_textEditor->setInputMethodHints((Qt::InputMethodHints)flag);
+  }
 
 } // namespace GVA
--- a/ginebra2/EditorWidget.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/EditorWidget.h	Tue Jul 06 14:03:49 2010 +0300
@@ -46,12 +46,14 @@
     qreal anchorX();
     QRectF selectionRectF();
     void setText(const QString & text);
+    void setMaxTextLength(int length);
     void selectAll();
     void unselect();
     qreal textWidth();
     void setCursorPosition(int pos);
-    void setAutoUppercase(bool enable) { m_autoUppercase = enable; }
     bool hasSelection() { return (cursorX()!= anchorX()); }
+    Qt::InputMethodHints inputMethodHints() const { return m_hints; }
+    void setInputMethodHints(Qt::InputMethodHints hints);
 
   protected:
     virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget);
@@ -64,6 +66,9 @@
     virtual void focusOutEvent(QFocusEvent * event);
     virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
 
+  private slots:
+    void contentsChange(int position, int charsRemoved, int charsAdded);
+
   signals:
     void cursorXChanged(qreal newx);
     void textMayChanged();
@@ -73,8 +78,8 @@
   private:
     QTextLine m_textLine;
     int m_defaultStartDragDistance;
-    bool m_predictionDisabled;
-    bool m_autoUppercase;
+    int m_maxTextLength;
+    Qt::InputMethodHints m_hints;
   };
 
   class GLineEditor : public QGraphicsWidget
@@ -101,6 +106,10 @@
     void shiftToLeftEnd() { setCursorPosition(0); }
     int characterCount() { return m_editor->document()->characterCount(); }
     bool hasSelection() { return m_editor->hasSelection(); }
+    Qt::InputMethodHints inputMethodHints() { return m_editor->inputMethodHints(); }
+    // Calling this function will overwrite the existing hints
+    void setInputMethodHints(Qt::InputMethodHints hints) { m_editor->setInputMethodHints(hints); }
+    void setMaxTextLength(int length) { m_editor->setMaxTextLength(length); }
 
   protected:
     virtual bool eventFilter(QObject * object, QEvent * event);
@@ -195,10 +204,20 @@
     void setCursorPosition(int pos) { m_textEditor->setCursorPosition(pos); }
     void selectAll() { m_textEditor->selectAll(); }
     void unselect() { m_textEditor->unselect(); }
+    int getTextOptions() { return (int) m_textEditor->inputMethodHints(); }
+    // Calling this function will overwrite the existing options
+    void setTextOptions (int flag);
+    void setMaxTextLength(int length) { m_textEditor->setMaxTextLength(length); }
+ 
+  private slots:	
+	void tapped(QPointF&);
+	void focusChanged(bool focusIn);
+
   protected:
     virtual void resizeEvent(QGraphicsSceneResizeEvent * ev);
   private:
     GTextEditor * m_textEditor;
+	 bool m_justFocusIn;
   };
 
 } // namespace GVA
--- a/ginebra2/FlickCharm.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,409 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the Graphics Dojo project on Qt Labs.
-**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 or 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file.  Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
-
-#include "FlickCharm.h"
-
-#include <QAbstractScrollArea>
-#include <QApplication>
-#include <QBasicTimer>
-#include <QEvent>
-#include <QHash>
-#include <QList>
-#include <QMouseEvent>
-#include <QScrollBar>
-#include <QWebFrame>
-#include <QWebView>
-#include <QGraphicsWebView>
-#include <QGraphicsSceneMouseEvent>
-
-#include <QDebug>
-
-struct FlickData {
-    typedef enum { Steady, Pressed, ManualScroll, AutoScroll, Stop } State;
-    State state;
-    QObject *widget;
-    QPoint pressPos;
-    QPoint offset;
-    QPoint dragPos;
-    QPoint speed;
-    QList<QEvent*> ignored;
-};
-
-class FlickCharmPrivate
-{
-public:
-    QHash<QObject*, FlickData*> flickData;
-    QBasicTimer ticker;
-};
-
-FlickCharm::FlickCharm(QObject *parent): QObject(parent)
-{
-    d = new FlickCharmPrivate;
-}
-
-FlickCharm::~FlickCharm()
-{
-    delete d;
-}
-
-void FlickCharm::activateOn(QWidget *widget)
-{
-    QAbstractScrollArea *scrollArea = dynamic_cast<QAbstractScrollArea*>(widget);
-    if (scrollArea) {
-        scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-        scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
-        QWidget *viewport = scrollArea->viewport();
-
-        viewport->installEventFilter(this);
-        scrollArea->installEventFilter(this);
-
-        d->flickData.remove(viewport);
-        d->flickData[viewport] = new FlickData;
-        d->flickData[viewport]->widget = widget;
-        d->flickData[viewport]->state = FlickData::Steady;
-
-        return;
-    }
-}
-
-void FlickCharm::activateOn(QWebView *webView)
-{
-    if (webView) {
-        QWebFrame *frame = webView->page()->mainFrame();
-        frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
-        frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
-
-        webView->installEventFilter(this);
-
-        d->flickData.remove(webView);
-        d->flickData[webView] = new FlickData;
-        d->flickData[webView]->widget = webView;
-        d->flickData[webView]->state = FlickData::Steady;
-
-        return;
-    }
-}
-
-void FlickCharm::activateOn(QGraphicsWebView *webView)
-{
-    qDebug() << "FlickCharm::activateOn";
-    if (webView) {
-        QWebFrame *frame = webView->page()->mainFrame();
-        frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
-        frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
-
-        webView->installEventFilter(this);
-
-        d->flickData.remove(webView);
-        d->flickData[webView] = new FlickData;
-        d->flickData[webView]->widget = webView;
-        d->flickData[webView]->state = FlickData::Steady;
-
-        return;
-    }
-}
-
-void FlickCharm::deactivateFrom(QWidget *widget)
-{
-    QAbstractScrollArea *scrollArea = dynamic_cast<QAbstractScrollArea*>(widget);
-    if (scrollArea) {
-        QWidget *viewport = scrollArea->viewport();
-
-        viewport->removeEventFilter(this);
-        scrollArea->removeEventFilter(this);
-
-        delete d->flickData[viewport];
-        d->flickData.remove(viewport);
-
-        return;
-    }
-
-    QWebView *webView = dynamic_cast<QWebView*>(widget);
-    if (webView) {
-        webView->removeEventFilter(this);
-
-        delete d->flickData[webView];
-        d->flickData.remove(webView);
-
-        return;
-    }
-}
-
-static QPoint scrollOffset(QObject *widget)
-{
-    int x = 0, y = 0;
-
-    QGraphicsWebView *gWebView = dynamic_cast<QGraphicsWebView*>(widget);
-    if (gWebView) {
-        QWebFrame *frame = gWebView->page()->mainFrame();
-        x = frame->evaluateJavaScript("window.scrollX").toInt();
-        y = frame->evaluateJavaScript("window.scrollY").toInt();
-    }
-
-    QAbstractScrollArea *scrollArea = dynamic_cast<QAbstractScrollArea*>(widget);
-    if (scrollArea) {
-        x = scrollArea->horizontalScrollBar()->value();
-        y = scrollArea->verticalScrollBar()->value();
-    }
-
-    QWebView *webView = dynamic_cast<QWebView*>(widget);
-    if (webView) {
-        QWebFrame *frame = webView->page()->mainFrame();
-        x = frame->evaluateJavaScript("window.scrollX").toInt();
-        y = frame->evaluateJavaScript("window.scrollY").toInt();
-    }
-
-    return QPoint(x, y);
-}
-
-static void setScrollOffset(QObject *widget, const QPoint &p)
-{
-    QGraphicsWebView *gWebView = dynamic_cast<QGraphicsWebView*>(widget);
-    if (gWebView) {
-        QWebFrame *frame = gWebView->page()->mainFrame();
-        if (frame)
-            frame->evaluateJavaScript(QString("window.scrollTo(%1,%2);").arg(p.x()).arg(p.y()));
-        return;
-    }
-
-    QAbstractScrollArea *scrollArea = dynamic_cast<QAbstractScrollArea*>(widget);
-    if (scrollArea) {
-        scrollArea->horizontalScrollBar()->setValue(p.x());
-        scrollArea->verticalScrollBar()->setValue(p.y());
-        return;
-    }
-
-    QWebView *webView = dynamic_cast<QWebView*>(widget);
-    QWebFrame *frame = webView ? webView->page()->mainFrame() : 0;
-    if (frame)
-        frame->evaluateJavaScript(QString("window.scrollTo(%1,%2);").arg(p.x()).arg(p.y()));
-}
-
-static QPoint deaccelerate(const QPoint &speed, int a = 1, int max = 64)
-{
-    int x = qBound(-max, speed.x(), max);
-    int y = qBound(-max, speed.y(), max);
-    x = (x == 0) ? x : (x > 0) ? qMax(0, x - a) : qMin(0, x + a);
-    y = (y == 0) ? y : (y > 0) ? qMax(0, y - a) : qMin(0, y + a);
-    return QPoint(x, y);
-}
-
-bool FlickCharm::eventFilter(QObject *object, QEvent *event)
-{
-//    qDebug() << "FlickCharm::eventFilter: " << object << event;
-//    if (!object->isWidgetType())
-//        return false;
-
-    QEvent::Type type = event->type();
-    switch (type) {
-        case QEvent::MouseButtonPress:
-        case QEvent::MouseButtonRelease:
-        case QEvent::MouseMove:
-        case QEvent::GraphicsSceneMousePress:
-        case QEvent::GraphicsSceneMouseRelease:
-        case QEvent::GraphicsSceneMouseMove:
-            break;
-        default:
-            return false;
-    }
-
-    QPoint eventPos;
-    QEvent::Type eventType;
-    Qt::MouseButtons eventButtons;
-    QMouseEvent *mouseEvent = dynamic_cast<QMouseEvent*>(event);
-    if (mouseEvent) {
-        if (mouseEvent->modifiers() != Qt::NoModifier)
-            return false;
-        eventPos = mouseEvent->pos();
-        eventType = mouseEvent->type();
-        eventButtons = mouseEvent->buttons();
-    }
-    else {
-        QGraphicsSceneMouseEvent *mouseEvent = dynamic_cast<QGraphicsSceneMouseEvent*>(event);
-        if (mouseEvent && mouseEvent->modifiers() == Qt::NoModifier) {
-            eventPos = mouseEvent->pos().toPoint();
-            eventType = mouseEvent->type();
-            eventButtons = mouseEvent->buttons();
-        }
-        else
-            return false;
-    }
-
-//    QWidget *viewport = dynamic_cast<QWidget*>(object);
-    FlickData *data = d->flickData.value(object);
-    if (!data || data->ignored.removeAll(event)) {
-        return false;
-    }
-
-    bool consumed = false;
-    switch (data->state) {
-
-    case FlickData::Steady:
-        if (eventType == QEvent::MouseButtonPress ||
-            eventType == QEvent::GraphicsSceneMousePress)
-            if (eventButtons == Qt::LeftButton) {
-                consumed = true;
-                data->state = FlickData::Pressed;
-                data->pressPos = eventPos;
-                data->offset = scrollOffset(data->widget);
-            }
-        break;
-
-    case FlickData::Pressed:
-        if (eventType == QEvent::MouseButtonRelease) {
-            consumed = true;
-            data->state = FlickData::Steady;
-
-            QMouseEvent *event1 = new QMouseEvent(QEvent::MouseButtonPress,
-                                                  data->pressPos, Qt::LeftButton,
-                                                  Qt::LeftButton, Qt::NoModifier);
-            QMouseEvent *event2 = new QMouseEvent(*mouseEvent);
-
-            data->ignored << event1;
-            data->ignored << event2;
-            QApplication::postEvent(object, event1);
-            QApplication::postEvent(object, event2);
-        }
-        else if (eventType == QEvent::GraphicsSceneMouseRelease) {
-            consumed = true;
-            data->state = FlickData::Steady;
-
-            QGraphicsSceneMouseEvent *origMouseEvent = static_cast<QGraphicsSceneMouseEvent*>(event);
-            QGraphicsSceneMouseEvent *event1 =
-                    new QGraphicsSceneMouseEvent(QEvent::GraphicsSceneMousePress);
-            event1->setPos(origMouseEvent->pos());
-            event1->setScenePos(origMouseEvent->scenePos());
-            event1->setLastPos(origMouseEvent->lastPos());
-            event1->setLastScenePos(origMouseEvent->lastScenePos());
-            event1->setButtons(origMouseEvent->buttons());
-            event1->setButton(origMouseEvent->button());
-            event1->setModifiers(origMouseEvent->modifiers());
-
-            QGraphicsSceneMouseEvent *event2 = new QGraphicsSceneMouseEvent(origMouseEvent->type());
-            event2->setPos(origMouseEvent->pos());
-            event2->setScenePos(origMouseEvent->scenePos());
-            event2->setLastPos(origMouseEvent->lastPos());
-            event2->setLastScenePos(origMouseEvent->lastScenePos());
-            event2->setButtons(origMouseEvent->buttons());
-            event2->setButton(origMouseEvent->button());
-            event2->setModifiers(origMouseEvent->modifiers());
-
-            data->ignored << event1;
-            data->ignored << event2;
-            QApplication::postEvent(object, event1);
-            QApplication::postEvent(object, event2);
-        }
-        if (eventType == QEvent::MouseMove ||
-            eventType == QEvent::GraphicsSceneMouseMove) {
-            consumed = true;
-            data->state = FlickData::ManualScroll;
-            data->dragPos = QCursor::pos();
-            if (!d->ticker.isActive())
-                d->ticker.start(20, this);
-        }
-        break;
-
-    case FlickData::ManualScroll:
-        if (eventType == QEvent::MouseMove ||
-            eventType == QEvent::GraphicsSceneMouseMove) {
-            consumed = true;
-            QPoint delta = eventPos - data->pressPos;
-            setScrollOffset(data->widget, data->offset - delta);
-        }
-        if (eventType == QEvent::MouseButtonRelease ||
-            eventType == QEvent::GraphicsSceneMouseRelease) {
-            consumed = true;
-            data->state = FlickData::AutoScroll;
-        }
-        break;
-
-    case FlickData::AutoScroll:
-        if (eventType == QEvent::MouseButtonPress ||
-            eventType == QEvent::GraphicsSceneMousePress) {
-            consumed = true;
-            data->state = FlickData::Stop;
-            data->speed = QPoint(0, 0);
-            data->pressPos = eventPos;
-            data->offset = scrollOffset(data->widget);
-        }
-        if (eventType == QEvent::MouseButtonRelease ||
-            eventType == QEvent::GraphicsSceneMouseRelease) {
-            consumed = true;
-            data->state = FlickData::Steady;
-            data->speed = QPoint(0, 0);
-        }
-        break;
-
-    case FlickData::Stop:
-        if (eventType == QEvent::MouseButtonRelease ||
-            eventType == QEvent::GraphicsSceneMouseRelease) {
-            consumed = true;
-            data->state = FlickData::Steady;
-        }
-        if (eventType == QEvent::MouseMove ||
-            eventType == QEvent::GraphicsSceneMouseMove) {
-            consumed = true;
-            data->state = FlickData::ManualScroll;
-            data->dragPos = QCursor::pos();
-            if (!d->ticker.isActive())
-                d->ticker.start(20, this);
-        }
-        break;
-
-    default:
-        break;
-    }
-
-    return consumed;
-}
-
-void FlickCharm::timerEvent(QTimerEvent *event)
-{
-    int count = 0;
-    QHashIterator<QObject*, FlickData*> item(d->flickData);
-    while (item.hasNext()) {
-        item.next();
-        FlickData *data = item.value();
-
-        if (data->state == FlickData::ManualScroll) {
-            count++;
-            data->speed = QCursor::pos() - data->dragPos;
-            data->dragPos = QCursor::pos();
-        }
-
-        if (data->state == FlickData::AutoScroll) {
-            count++;
-            data->speed = deaccelerate(data->speed);
-            QPoint p = scrollOffset(data->widget);
-            setScrollOffset(data->widget, p - data->speed);
-            if (data->speed == QPoint(0, 0))
-                data->state = FlickData::Steady;
-        }
-    }
-
-    if (!count)
-        d->ticker.stop();
-
-    QObject::timerEvent(event);
-}
--- a/ginebra2/FlickCharm.h	Wed Jun 23 17:59:43 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the Graphics Dojo project on Qt Labs.
-**
-** This file may be used under the terms of the GNU General Public
-** License version 2.0 or 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of
-** this file.  Please review the following information to ensure GNU
-** General Public Licensing requirements will be met:
-** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-****************************************************************************/
-
-#ifndef FLICKCHARM_H
-#define FLICKCHARM_H
-
-#include <QObject>
-
-class FlickCharmPrivate;
-class QWidget;
-class QGraphicsWebView;
-class QWebView;
-
-class FlickCharm: public QObject
-{
-    Q_OBJECT
-public:
-    FlickCharm(QObject *parent = 0);
-    ~FlickCharm();
-    void activateOn(QWidget *widget);
-    void activateOn(QWebView *webView);
-    void activateOn(QGraphicsWebView *webView);
-    void deactivateFrom(QWidget *widget);
-    bool eventFilter(QObject *object, QEvent *event);
-
-protected:
-    void timerEvent(QTimerEvent *event);
-
-private:
-    FlickCharmPrivate *d;
-};
-
-#endif // FLICKCHARM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/GSuperWebPage.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "GSuperWebPage.h"
+
+namespace GVA {
+
+GSuperWebPage::GSuperWebPage(WebPageWrapper *page, ChromeWidget *chromeWidget)
+    : GWebPage(page),
+    m_chromeWidget(chromeWidget)
+{
+    if (!m_page) {
+        m_page = new WebPageWrapper(this, "Superpage javascript error");
+    }
+    //qDebug() << "GSuperWebPage::GSuperWebPage: page=" << GWebPage::page();
+    connect(GWebPage::page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(onJavaScriptWindowObjectCleared()));
+}
+
+void GSuperWebPage::load(const QString &url) {
+    //qDebug() << "GSuperWebPage::load: " << url;
+    QString tmpUrl = url;
+    if(tmpUrl.left(2) == ":/") // resource path have to be converted to resource url
+        tmpUrl = "qrc:///" + tmpUrl.mid(2);
+    page()->mainFrame()->load(tmpUrl);
+}
+
+void GSuperWebPage::onJavaScriptWindowObjectCleared() {
+    //qDebug() << "GSuperWebPage::onJavaScriptWindowObjectCleared: " << objectName();
+    if (m_chromeWidget)
+        m_chromeWidget->exportJSObjectsToPage(m_page);
+}
+
+}  // GVA namespace
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/GSuperWebPage.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef GSUPERWEBPAGE_H
+#define GSUPERWEBPAGE_H
+
+#include "GWebPage.h"
+
+namespace GVA {
+
+// ------------------------------
+/*! \ingroup JavascriptAPI
+* \brief A content view that has full access to the Javascript APIs.
+*
+* Example code to load an HTML file into a super page:
+* \code
+* window.views.WebView.createSuperPage("BookmarkView", true);
+* window.views.WebView.BookmarkView.load("./chrome/BookmarkView.html");
+* \endcode
+*/
+class GSuperWebPage : public GWebPage {
+    Q_OBJECT
+public:
+    GSuperWebPage(WebPageWrapper *page, ChromeWidget *chromeWidget);
+    void onShown() { emit shown(); }
+    void onHidden() { emit hidden(); }
+
+public slots:
+    void load(const QString &url);
+
+signals:
+    /*!
+    * Triggered by the javascript code within the superpage when it wants a context menu to be displayed by
+    * the chrome's javascript.
+    *
+    * The normal chain of events is:
+    * \li User executes a long-press (or RMB click).
+    * \li Qt sends QContextMenuEvent from QWebView.
+    * \li GWebContentViewWidget::contextMenuEvent is called, which passes the event to the superpage
+    * (if one is currently displayed).
+    * \li The superpage emits \c contextEvent().
+    * \li The context event handler in the superpage's javascript determines what was clicked on
+    * and emits \c showContextMenu() from the superpage.
+    * \li Javascript \c showContextMenu signal handler in the chrome is called which then displays the context menu.
+    */
+    void showContextMenu(QVariant obj);
+
+    /*!
+     * Triggered when the page is shown.
+     */
+    void shown();
+
+    /*!
+     * Triggered when the page is hidden.
+     */
+    void hidden();
+
+private slots:
+    void onJavaScriptWindowObjectCleared();
+
+private:
+    ChromeWidget *m_chromeWidget;  // not owned
+};
+
+}   // GVA namespace
+
+#endif // GSUPERWEBPAGE_H
--- a/ginebra2/GWebPage.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/GWebPage.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -42,30 +42,4 @@
             .arg(message).toAscii();
 }
 
-// ----------------------------------------
-// GSuperWebPage
-// ----------------------------------------
-
-GSuperWebPage::GSuperWebPage(WebPageWrapper *page, ChromeWidget *chromeWidget)
-    : GWebPage(page),
-    m_chromeWidget(chromeWidget)
-{
-    if (!m_page) {
-        m_page = new WebPageWrapper(this, "Superpage javascript error");
-    }
-    qDebug() << "GSuperWebPage::GSuperWebPage: page=" << GWebPage::page();
-    connect(GWebPage::page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(onJavaScriptWindowObjectCleared()));
-}
-
-void GSuperWebPage::load(const QString &url) {
-    qDebug() << "GSuperWebPage::load: " << url;
-    page()->mainFrame()->load(url);
-}
-
-void GSuperWebPage::onJavaScriptWindowObjectCleared() {
-    qDebug() << "GSuperWebPage::onJavaScriptWindowObjectCleared: " << objectName();
-    if (m_chromeWidget)
-        m_chromeWidget->exportJSObjectsToPage(m_page);
-}
-
 }  // GVA namespace
--- a/ginebra2/GWebPage.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/GWebPage.h	Tue Jul 06 14:03:49 2010 +0300
@@ -72,8 +72,11 @@
 signals:
     /// Triggered by a QContextEvent such as a long-press or right mouse button click.
     void contextEvent(::WebViewEventContext *context);
-
+#ifdef BEDROCK_TILED_BACKING_STORE
+public slots:
+#else
 protected slots:
+#endif
     void onContextEvent(::WebViewEventContext *context) { emit contextEvent(context); }
 
 protected:
@@ -82,48 +85,6 @@
     friend class GWebContentViewWidget;
 };
 
-// ------------------------------
-/*! \ingroup JavascriptAPI
-* \brief A content view that has full access to the Javascript APIs.
-*
-* Example code to load an HTML file into a super page:
-* \code
-* window.views.WebView.createSuperPage("BookmarkView", true);
-* window.views.WebView.BookmarkView.load("./chrome/BookmarkView.html");
-* \endcode
-*/
-class GSuperWebPage : public GWebPage {
-    Q_OBJECT
-public:
-    GSuperWebPage(WebPageWrapper *page, ChromeWidget *chromeWidget);
-
-public slots:
-    void load(const QString &url);
-
-signals:
-    /*!
-    * Triggered by the javascript code within the superpage when it wants a context menu to be displayed by
-    * the chrome's javascript.
-    *
-    * The normal chain of events is:
-    * \li User executes a long-press (or RMB click).
-    * \li Qt sends QContextMenuEvent from QWebView.
-    * \li GWebContentViewWidget::contextMenuEvent is called, which passes the event to the superpage
-    * (if one is currently displayed).
-    * \li The superpage emits \c contextEvent().
-    * \li The context event handler in the superpage's javascript determines what was clicked on
-    * and emits \c showContextMenu() from the superpage.
-    * \li Javascript \c showContextMenu signal handler in the chrome is called which then displays the context menu.
-    */
-    void showContextMenu(QVariant obj);
-
-private slots:
-    void onJavaScriptWindowObjectCleared();
-
-private:
-    ChromeWidget *m_chromeWidget;  // not owned
-};
-
 }
 
 #endif // __GINEBRA_GWEBPAGE_H__
--- a/ginebra2/GWebTouchNavigation.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/GWebTouchNavigation.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -20,25 +20,20 @@
 */
 
 #include "GWebTouchNavigation.h"
+#include "wrtBrowserUtils.h"
+
 #include <QWebPage>
 #include <QWebFrame>
 #include <QApplication>
 #include <QWebElement>
-#include "GWebContentViewWidget.h"
-#include "GWebContentView.h"
 #include <QGraphicsSceneMouseEvent>
 #include <QTimer>
 #include <qmath.h>
 #include <QDebug>
 #include <QGraphicsView>
-#include <QGraphicsSceneContextMenuEvent>
-
-#include "wrtBrowserUtils.h"
-#include "ChromeWidget.h"
-#include <QDebug>
 
 
-#define LONG_PRESS_DURATION 500
+namespace GVA {
 
 const int KFlickSpeed = 400;
 const qreal PI = 3.1415926535897932;
@@ -58,19 +53,14 @@
 const int KPanThreshold = 2;
 const int KThreshHoldValForLink = 10;
 const qreal KDeccelaration = 1000.00;
-//const int KDefaultViewportWidth = 980;
-//const int KDefaultPortraitScaleWidth = 540;
-
-//const int KKineticTimeout = 60;
 
 static const int KStartPanDistance = 50;
 static const int KWaitForClickTimeoutMS = 200;
+static const int KLongPressDuration = 1000;
+static const int KLongPressThreshold = 30;
 //The amount of pixels to try to pan before pan mode unlocks
 static const int KPanModeChangeDelta = 100;
 
-
-namespace GVA {
-
 /*!
     \class WebTouchNavigation
     \since cwrt 1.0
@@ -99,11 +89,13 @@
 , m_contentHeight(0)
 , m_isContextEvent(false)
 , m_wantSlideViewCalls(true)
+, m_doubleClickEnabled(true)
 {
         install();
         connect(m_webPage, SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
         connect(m_webPage, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
 }
+
 inline void GWebTouchNavigation::cancelPressEvent() {
     if (m_pressEvent) {
         delete m_pressEvent;
@@ -122,16 +114,10 @@
 */
 GWebTouchNavigation::~GWebTouchNavigation()
 {
-    disconnect(m_doubleClickTimer, SIGNAL(timeout()), this, SLOT(doubleClickTimerExpired()));
-    if (m_doubleClickTimer) {
-        m_doubleClickTimer->stop();
-        delete m_doubleClickTimer;
-    }
-    disconnect(m_scrollTimer, SIGNAL(timeout()),this,SLOT(pan()));
+    delete m_doubleClickTimer;
     delete m_scrollTimer;
-
-    disconnect(m_kineticTimer, SIGNAL(timeout()),this,SLOT(kineticScroll()));
     delete m_kineticTimer;
+    delete m_longPressTimer;
     uninstall();
 
     cancelPressEvent();
@@ -293,15 +279,15 @@
 {
     if (qAbs(diff.x()) < KPanThreshold && qAbs(diff.y()) < KPanThreshold)
         return;
-        else if (m_dragPoints.size() == 1) {
-            setViewBlockElement(QWebElement());
-        }
+    else if (m_dragPoints.size() == 1) {
+        setViewBlockElement(QWebElement());
+    }
 
-        if (!m_isPanning) {
+    if (!m_isPanning) {
         qreal dy = qAbs(diff.y());
         qreal dx = qAbs(diff.x());
         if (dy > KStartPanDistance || dx > KStartPanDistance
-        || m_delayedPressMoment.elapsed() > KWaitForClickTimeoutMS) {
+            || m_delayedPressMoment.elapsed() > KWaitForClickTimeoutMS) {
             //get the scroll direction
             Direction scrollDir = findDirectionWithAngle(diff);
             if (scrollDir == UP || scrollDir == DOWN)
@@ -314,15 +300,15 @@
         }
     }
 
-        if (m_isPanning) {
-                m_scrolled= false;
-                m_frame = getNextScrollableFrame(diff);
-                QPoint scrollPosition = m_frame->scrollPosition();
-                if (diff.manhattanLength())
-                        panBy(diff);
+    if (m_isPanning) {
+        m_scrolled= false;
+        m_frame = getNextScrollableFrame(diff);
+        QPoint scrollPosition = m_frame->scrollPosition();
+        if (diff.manhattanLength())
+            panBy(diff);
 
-                m_scrolled = (scrollPosition != m_frame->scrollPosition());
-        }
+        m_scrolled = (scrollPosition != m_frame->scrollPosition());
+    }
 }
 
 void GWebTouchNavigation::startPanGesture(PanDirection directionHint) {
@@ -469,7 +455,7 @@
         m_higlightedPos = m_touchPosition = pos;
         m_frame = m_webPage->frameAt(pos);
         if (!m_frame)
-              m_frame = m_webPage->currentFrame();
+            m_frame = m_webPage->currentFrame();
 
         m_dragPoints.clear();
 
@@ -507,17 +493,14 @@
 
     m_doubleClickTimer->start(KDoubleClickTimeOut);
     m_pressEvent = new QMouseEvent(QEvent::MouseButtonPress, pos, Qt::LeftButton, Qt::LeftButton, getEventModifier(pos));
+    m_longPressPosition = pos;
+    startLongPressTimer();
 }
 
 void GWebTouchNavigation::handleMousePressEvent(QMouseEvent* ev)
 {
     if (!ev) return;
     m_lastMoveEventTime.setHMS(0,0,0,0); //H, M, S, mS
-    if (!m_longPressTimer){
-        delete m_longPressTimer;
-        m_longPressTimer = 0;
-    }
-    startTimer();
     m_scrolled = false;
     m_ishighlighted = false;
     m_higlightedPos = m_touchPosition = ev->pos();
@@ -535,7 +518,7 @@
     m_offset = 0;
 
     highlightableElement(ev);
-    getFocusedElement();
+    emitFocusedElementChanged();
 
     //send a mouse press
     QMouseEvent iev(ev->type(), m_touchPosition, ev->button(), ev->buttons(), getEventModifier(m_higlightedPos));
@@ -560,7 +543,7 @@
 }
 
 bool GWebTouchNavigation::canDehighlight(QMouseEvent* ev)
- {
+{
     bool checkDehighlight = false;
     QPoint pt = ev->pos() + m_frame->scrollPosition();
 
@@ -578,8 +561,8 @@
             int newoffset = (pt.x()- centerpt.x())*(pt.x()- centerpt.x()) + (pt.y()- centerpt.y())*(pt.y()- centerpt.y());
 
             if (newoffset <= m_offset ) {
-                 m_offset = newoffset;
-                 checkDehighlight = false;
+                m_offset = newoffset;
+                checkDehighlight = false;
             }
             else {
                 m_offset =0;
@@ -592,7 +575,7 @@
     }
     return checkDehighlight;
 }
- void  GWebTouchNavigation::dehighlight(QMouseEvent* ev)
+void  GWebTouchNavigation::dehighlight(QMouseEvent* ev)
 {
     m_higlightedPos = QPoint(0,0);
     m_ishighlighted = false;
@@ -613,11 +596,18 @@
 */
 void GWebTouchNavigation::mouseMoveEvent(const QPoint& pos, const QPoint& diff)
 {
+    if (m_longPressTimer && m_longPressTimer->isActive()){
+        QPoint diff2 = m_longPressPosition - pos;
+        if (qAbs(diff2.x()) > KLongPressThreshold || qAbs(diff2.y()) > KLongPressThreshold) {
+            stopLongPressTimer();
+        }
+    }
 
     if (m_pressEvent){
         QPoint diff2 = m_pressEvent->pos() - pos;
-      if (qAbs(diff2.x()) < KTouchThresholdX && qAbs(diff2.y()) < KTouchThresholdY)
-        return;
+        if (qAbs(diff2.x()) < KTouchThresholdX && qAbs(diff2.y()) < KTouchThresholdY) {
+            return;
+        }
     }
 
     if (m_doubleClickTimer && m_doubleClickTimer->isActive()) {
@@ -627,7 +617,6 @@
         cancelPressEvent();
     }
 
-    stopTimer();
     QMouseEvent tmpEv(QEvent::MouseMove, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
     handleHighlightChange(&tmpEv);
 
@@ -649,17 +638,17 @@
     if (!m_textSelected)
         scrollFrame(diff);
 
-        //m_touchPosition = pos;
-        DragPoint dragPoint;
-        dragPoint.iPoint = pos;
-        dragPoint.iTime = QTime::currentTime();
-        m_dragPoints.append(dragPoint);
+    //m_touchPosition = pos;
+    DragPoint dragPoint;
+    dragPoint.iPoint = pos;
+    dragPoint.iTime = QTime::currentTime();
+    m_dragPoints.append(dragPoint);
 
-        QTime now(QTime::currentTime());
-        m_lastMoveEventTime.setHMS(now.hour(),now.minute(), now.second(), now.msec());
+    QTime now(QTime::currentTime());
+    m_lastMoveEventTime.setHMS(now.hour(),now.minute(), now.second(), now.msec());
 
-        while (m_dragPoints.size() > 4)
-                m_dragPoints.removeFirst();
+    while (m_dragPoints.size() > 4)
+        m_dragPoints.removeFirst();
 
 }
 
@@ -670,6 +659,8 @@
 */
 void GWebTouchNavigation::mouseReleaseEvent(const QPoint& pos)
 {
+    stopLongPressTimer();
+
     if (m_isPanning)
         m_isPanning = false;
     if (m_doubleClickTimer && m_doubleClickTimer->isActive()) {
@@ -709,10 +700,10 @@
     m_frame = m_webPage->frameAt(ev->pos());
     if (!m_frame)
         m_frame = m_webPage->currentFrame();
-    assert(m_frame);
+    Q_ASSERT(m_frame);
 
-     stopTimer();
-     if (m_scrolled) {
+    stopLongPressTimer();
+    if (m_scrolled) {
         int msecs = 0;
         if (!m_lastMoveEventTime.isNull()) {
             //Start deceleration only if the delta since last drag event is less than threshold
@@ -735,10 +726,14 @@
             startScrollTimer();
         }
     } else {
+        // we don't want to automatically display the SIP (Software input panel) by qtwebkit
+        bool sipEnabled = qApp->autoSipEnabled();
+        qApp->setAutoSipEnabled(false);
         QMouseEvent iev = m_ishighlighted ?
         QMouseEvent(ev->type(), m_higlightedPos, ev->button(), ev->buttons(), getEventModifier(m_higlightedPos)) :
         QMouseEvent(QEvent::MouseButtonRelease, m_touchPosition, ev->button(), ev->buttons(), getEventModifier(m_touchPosition));
         m_webPage->event(&iev);
+        qApp->setAutoSipEnabled(sipEnabled);
 #if defined __SYMBIAN32__
 // FIXME Remove this, it will be fixed Qt 4.6.3 ?
         if (ev->button() == Qt::LeftButton) {
@@ -774,6 +769,9 @@
 
 void GWebTouchNavigation::handleDoubleClickEvent(QMouseEvent* ev)
 {
+    if (!m_doubleClickEnabled)
+        return;
+
     QPoint imageFocusPoint;
     QWebHitTestResult hitTest = getHitTestResult(ev);
 
@@ -1048,6 +1046,7 @@
                     if (m_scrollDistance.y() > ((contentSize.height()-documentViewPoint.y())/2))
                         m_scrollDistance.setY((contentSize.height()-documentViewPoint.y())/2);
                     break;
+        default: break;
     }
 }
 
@@ -1144,7 +1143,7 @@
     else if (isNear(angle, 300.0, 330.0)) {
         direction = TOPRIGHT;
     }
-    assert(direction != NONE);
+    Q_ASSERT(direction != NONE);
 
     return direction;
 }
@@ -1279,26 +1278,35 @@
     }
     scrollCurrentFrame(diffX, diffY);
 }
-void GWebTouchNavigation::timerControl()
+
+void GWebTouchNavigation::onLongPressTimer()
 {
-    stopTimer();// stop timer as soon as timeout
-    emit longPressEvent();
+    stopLongPressTimer();// stop timer as soon as timeout
+    emit longPressEvent(m_touchPosition);
 }
-void GWebTouchNavigation::startTimer()
+
+void GWebTouchNavigation::startLongPressTimer()
 {
-    m_longPressTimer = new QTimer(this);
-    connect(m_longPressTimer,SIGNAL(timeout()),this,SLOT(timerControl()));
-    m_longPressTimer->start(LONG_PRESS_DURATION);
+    if(!m_longPressTimer) {
+        m_longPressTimer = new QTimer(this);
+        connect(m_longPressTimer, SIGNAL(timeout()), this, SLOT(onLongPressTimer()));
+    }
+    else {
+        m_longPressTimer->stop();
+    }
+    m_longPressTimer->start(KLongPressDuration);
 }
-void GWebTouchNavigation::stopTimer()
+
+void GWebTouchNavigation::stopLongPressTimer()
 {
     if (m_longPressTimer){
-            m_longPressTimer->stop();
-            delete m_longPressTimer;
-            m_longPressTimer = 0;
-        }
+        m_longPressTimer->stop();
+        delete m_longPressTimer;
+        m_longPressTimer = 0;
+    }
 }
-void GWebTouchNavigation::getFocusedElement()
+
+void GWebTouchNavigation::emitFocusedElementChanged()
 {
     QWebHitTestResult htRes = m_frame->hitTestContent(m_touchPosition);
     wrtBrowserDefs::BrowserElementType elType = wrtBrowserUtils::getTypeFromElement(htRes);
@@ -1317,16 +1325,14 @@
 
      /* shrink the viewport size at bottom if content is scrolled to bottom,
         so that use can click the link under the toolbar */
+    /*
      if (m_frame == m_webPage->mainFrame()) {
         if (scrollPosition.y() + m_webPage->viewportSize().height() >= m_frame->contentsSize().height()) {
             qreal slide = shrinkView(-dy);
             dy+=slide;
         }
-        /*
-        else {
-            qDebug()<<"scrollPosition.y() = "<<scrollPosition.y()<<" m_webPage->viewportSize().height() = "<<m_webPage->viewportSize().height()<<" m_frame->contentsSize().height() = "<<m_frame->contentsSize().height();
-        }*/
      }
+     */
      m_frame->scroll(dx, dy);
 
 }
@@ -1346,6 +1352,7 @@
           dy+=slide;
           finalPos.setY(scrollPosition.y() - dy);
     }
+    /*
     if (m_frame == m_webPage->mainFrame()) {
        if (scrollPosition.y() + m_webPage->viewportSize().height() == m_frame->contentsSize().height()) {
            qreal slide = shrinkView(-dy);
@@ -1353,7 +1360,7 @@
        }
        finalPos.setY(scrollPosition.y() - dy);
     }
-
+    */
     m_frame->setScrollPosition(finalPos);
 }
 
@@ -1372,13 +1379,13 @@
     if (m_webPage) {
         disconnect(m_webPage, SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
         disconnect(m_webPage, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
-        disconnect(m_webPage->mainFrame(), SIGNAL(contentsSizeChanged(const QSize &)), this, SLOT(onContentsSizeChanged(const QSize &)));
+        //disconnect(m_webPage->mainFrame(), SIGNAL(contentsSizeChanged(const QSize &)), this, SLOT(onContentsSizeChanged(const QSize &)));
     }
     m_webPage = page;
     if (m_webPage) {
         connect(m_webPage, SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
         connect(m_webPage, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
-        connect(m_webPage->mainFrame(), SIGNAL(contentsSizeChanged(const QSize &)), this, SLOT(onContentsSizeChanged(const QSize &)));
+        //connect(m_webPage->mainFrame(), SIGNAL(contentsSizeChanged(const QSize &)), this, SLOT(onContentsSizeChanged(const QSize &)));
     }
 }
 
@@ -1391,4 +1398,9 @@
         shrinkView(100);
     }
 }
+
+void GWebTouchNavigation::enableDClick(bool aValue)
+{
+    m_doubleClickEnabled = aValue;
 }
+}
--- a/ginebra2/GWebTouchNavigation.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/GWebTouchNavigation.h	Tue Jul 06 14:03:49 2010 +0300
@@ -40,6 +40,7 @@
 class QWebPage;
 class QTimer;
 class QWebElement;
+class WebViewEventContext;
 
 namespace GVA
 {
@@ -86,8 +87,8 @@
         void setWantSlideViewCalls(bool value) { m_wantSlideViewCalls = value; }
 
     signals:
-        void longPressEvent();// mouse long press signal
-        void focusElementChanged(wrtBrowserDefs::BrowserElementType &);// mouse long press signal
+        void longPressEvent(QPoint pos);// mouse long press signal
+        void focusElementChanged(wrtBrowserDefs::BrowserElementType &);
         void pageScrollPositionZero();
 
         /// Sent when this object starts panning/scrolling the page.  Can be useful for
@@ -96,16 +97,19 @@
         void startingPanGesture(int directionHint);
         void mouseEvent(QEvent::Type type);
 
+        
     protected slots:
         void scrollToEdge();
         void doubleClickTimerExpired();
-        void timerControl();// local slot for controlling timer
+        void onLongPressTimer();
         void pan();
         void kineticScroll();
         void BlockFocusChanged(QPoint pt);
         void onLoadStarted();
         void onLoadFinished(bool ok);
         void onContentsSizeChanged(const QSize &);
+        void enableDClick(bool aValue);
+        
     protected:
         bool eventFilter(QObject *object, QEvent *event);
         void mousePressEvent(const QPoint& pos);
@@ -154,9 +158,9 @@
         void handleHighlightChange(QMouseEvent* ev);
         bool canDehighlight(QMouseEvent* ev);
         void dehighlight(QMouseEvent* ev);
-        void getFocusedElement();
-        void startTimer();
-        void stopTimer();
+        void emitFocusedElementChanged();
+        void startLongPressTimer();
+        void stopLongPressTimer();
 
         void stopScrolling();
         void startPanGesture(PanDirection);
@@ -187,6 +191,7 @@
         bool m_ishighlighted;
         int m_offset;
         QTimer* m_longPressTimer;// long press timer
+        QPoint m_longPressPosition;
         QPoint m_initialSpeed;
         qreal m_finalzoomfactor;
         QTimer* m_scrollTimer;
@@ -213,6 +218,8 @@
         bool m_isContextEvent;
         // Flag that governs whether calls to slideView should be made or not.
         bool m_wantSlideViewCalls;
+        
+        bool m_doubleClickEnabled;
     };
 
 }
--- a/ginebra2/KineticHelper.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/KineticHelper.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -60,7 +60,6 @@
     m_kineticTimer->start(m_kineticTimeout);
     m_actualTime = QTime::currentTime();
     m_actualTime.start();
-    qDebug() << "starting kinetic timer at " << m_initialPos << ", at " << m_actualTime;
 }
 
 
@@ -77,12 +76,8 @@
     int t = m_actualTime.elapsed();
     m_kineticScrollTime += (((qreal)t) / 1000);
 
-    qDebug() << "kineticScroll(): elapsed: " << t << ", m_kineticSteps: " << m_kineticSteps <<
-                ", m_kineticScrollTime: " << m_kineticScrollTime <<
-                ", decelX: "<< decelX << ", decelY: " << decelY << ", m_initialSpeed: " << m_initialSpeed;
     if (m_initialSpeed.x()) {
         vx = m_initialSpeed.x() + decelX * m_kineticScrollTime;
-        qDebug() << "vx: " << vx;
         if (vx * m_initialSpeed.x() < 0) {
             dx = 0;
             vx = 0;
@@ -95,7 +90,6 @@
 
     if (m_initialSpeed.y()) {
         vy = m_initialSpeed.y() + decelY * m_kineticScrollTime;
-        qDebug() << "vy: " << vy;
         if (vy * m_initialSpeed.y() < 0) {
             dy = 0;
             vy = 0;
@@ -110,12 +104,10 @@
     QPoint distPos = m_initialPos + QPointF(dx, dy).toPoint();
 
     if (vx != 0 || vy != 0) {
-        qDebug() << "kineticScroll(): scroll from " << scrollPos << " to " << distPos;
         m_scrollable->scrollTo(distPos);
     }
 
     if ((vx == 0 && vy == 0) || scrollPos == m_scrollable->getScrollPosition()) {
-        qDebug() << "kineticScroll(): stopping timer";
         stopScrolling();
     }
 }
--- a/ginebra2/ObjectCharm.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-
-#include <QtGui>
-#include <QObject>
-#include <QDebug>
-#include <QApplication>
-#include <QTimer>
-
-#include "ObjectCharm.h"
-
-namespace GVA {
-
-// ----------------------------
-// ObjectCharm
-// ----------------------------
-
-ObjectCharm::ObjectCharm(QObject *object)
-  : m_object(object)
-{
-    m_object->installEventFilter(this);
-    connect(m_object, SIGNAL(destroyed()), this, SLOT(onObjectDestroyed()));
-}
-
-void ObjectCharm::onObjectDestroyed() {
-    deleteLater();
-}
-
-// ----------------------------
-// ExternalEventCharm
-// ----------------------------
-
-inline QGraphicsScene *ExternalEventCharm::scene() {
-    QGraphicsObject *item = static_cast<QGraphicsObject*>(m_object);
-    return item->scene();
-}
-
-ExternalEventCharm::ExternalEventCharm(QGraphicsObject *object)
-  : ObjectCharm(object)
-{
-}
-
-bool ExternalEventCharm::eventFilter(QObject *object, QEvent *event) {
-    //qDebug() << "ExternalEventCharm::eventFilter: " << object << event;
-    // Check for external events grabbed by this item.
-
-    checkForExternalEvent(this, event);
-
-    switch (event->type()) {
-      case QEvent::Show:
-      {
-          scene()->installEventFilter(this);
-          break;
-      }
-      case QEvent::Hide:
-      {
-          scene()->removeEventFilter(this);
-          break;
-      }
-      default: break;
-    }
-
-    // standard event processing
-    return object->eventFilter(object, event);
-}
-
-void ExternalEventCharm::checkForExternalEvent(QObject * o, QEvent * e)
-{
-    Q_UNUSED(o);
-
-    // Ignore all but a few mouse press events.
-
-    switch (e->type()) {
-    case QEvent::GraphicsSceneMousePress:
-    case QEvent::GraphicsSceneMouseRelease:
-    case QEvent::GraphicsSceneMouseDoubleClick:
-        break;
-    default:
-        return;
-    }
-
-    QGraphicsSceneMouseEvent * me = static_cast<QGraphicsSceneMouseEvent*>(e);
-
-    QPointF eventPosition = me->scenePos();
-
-    QGraphicsObject *item = static_cast<QGraphicsObject*>(m_object);
-
-    QRectF itemGeometry = item->sceneBoundingRect();
-
-    if (!itemGeometry.contains(eventPosition)) {
-        emitExternalEvent(e);
-    }
-}
-
-void ExternalEventCharm::emitExternalEvent(QEvent * e)
-{
-    QString description;
-
-    QDebug stream(&description);
-    stream << e;
-
-    QString name = description;
-    name.truncate(name.indexOf('('));
-
-    emit externalMouseEvent(e->type(), name, description.trimmed());
-}
-
-// ----------------------------
-// TouchCircleCharm
-// ----------------------------
-
-TouchCircleCharm::TouchCircleCharm(QObject *object, QGraphicsItem *parent)
-    : ObjectCharm(object),
-      m_timer(new QTimer())
-{
-    m_item = new QGraphicsEllipseItem(QRect(0,0,20,20), parent);
-    m_item->hide();
-    m_item->setPen(QPen(QColor(Qt::black)));
-    m_item->setBrush(QBrush(QColor(200, 0, 0)));
-    m_item->setZValue(100);  // make sure it isn't obscured
-
-    m_timer->setSingleShot(true);
-    connect(m_timer, SIGNAL(timeout()), this, SLOT(onTimer()));
-}
-
-TouchCircleCharm::~TouchCircleCharm() {
-    delete m_item;
-    delete m_timer;
-}
-
-bool TouchCircleCharm::eventFilter(QObject *object, QEvent *event) {
-    switch (event->type()) {
-        case QEvent::GraphicsSceneMousePress: {
-            // Show the item.
-            QGraphicsSceneMouseEvent * me = static_cast<QGraphicsSceneMouseEvent*>(event);
-            m_item->setPos(me->scenePos().x() - m_item->rect().width()/2,
-                           me->scenePos().y() - m_item->rect().height()/2);
-
-            // Change the color to indicate click.
-            m_item->setBrush(QBrush(QColor(0, 0, 200)));
-
-            m_item->show();
-            m_timer->stop();
-            break;
-        }
-        case QEvent::GraphicsSceneMouseMove: {
-            if(m_item->isVisible()) {
-                // Move it to new position.
-                QGraphicsSceneMouseEvent * me = static_cast<QGraphicsSceneMouseEvent*>(event);
-                m_item->setPos(me->scenePos().x() - m_item->rect().width()/2,
-                               me->scenePos().y() - m_item->rect().height()/2);
-
-                // Change the color to indicate drag.
-                m_item->setBrush(QBrush(QColor(200, 0, 0)));
-            }
-            break;
-        }
-        case QEvent::GraphicsSceneMouseDoubleClick: {
-            if(m_item->isVisible()) {
-                // Change the color to indicate double click.
-                m_item->setBrush(QBrush(QColor(0, 200, 0)));
-
-                m_timer->stop();
-            }
-            break;
-        }
-        case QEvent::GraphicsSceneMouseRelease: {
-            if(m_item->isVisible()) {
-                // Start timer to hide it.
-                m_timer->start(2000);
-            }
-            break;
-        }
-    }
-    return object->eventFilter(object, event);
-}
-
-void TouchCircleCharm::onTimer() {   // slot
-    m_item->hide();
-}
-
-}   // namespace GVA
--- a/ginebra2/ObjectCharm.h	Wed Jun 23 17:59:43 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-
-
-#ifndef OBJECTCHARM_H_
-#define OBJECTCHARM_H_
-
-#include <QObject>
-
-class QGraphicsObject;
-class QGraphicsScene;
-class QGraphicsItem;
-
-namespace GVA {
-
-// -------------------------------
-
-/*!
- * Base class for object "charms".  Charms set an event filter on a particular
- * object and perform some action in response to the events sent to the object.
- * ObjectCharms automatically destroy themselves when the target object is
- * destroyed.
- */
-class ObjectCharm : public QObject {
-    Q_OBJECT
-  public:
-    ObjectCharm(QObject *object);
-
-  private slots:
-    virtual void onObjectDestroyed();
-
-  protected:
-    QObject *m_object;
-};
-
-// -------------------------------
-
-/*!
- * This class emits a signal when the user clicks outside of the given graphics object.
- */
-class ExternalEventCharm : public ObjectCharm {
-    Q_OBJECT
-  public:
-    ExternalEventCharm(QGraphicsObject *object);
-
-  signals:
-    /*! This signal is emitted when the user clicks outside of the object.
-     * \param type The Qt event type.
-     * \param name The Qt event name.
-     * \param description The Qt event description.
-     */
-    void externalMouseEvent(
-            int type,
-            const QString & name,
-            const QString & description);
-  private:
-    void checkForExternalEvent(QObject * o, QEvent * e);
-    void emitExternalEvent(QEvent * e);
-    bool eventFilter(QObject *object, QEvent *event);
-    QGraphicsScene *scene();
-};
-
-// -------------------------------
-
-/*!
- * This class draws a circle in response to mouse click events on the given object.  Intended
- * for testing purposes only.
- */
-class TouchCircleCharm : public ObjectCharm {
-    Q_OBJECT
-  public:
-    TouchCircleCharm(QObject *object, QGraphicsItem *parent = 0);
-    ~TouchCircleCharm();
-
-  private slots:
-    void onTimer();
-
-  private:
-    bool eventFilter(QObject *object, QEvent *event);
-
-    class QGraphicsEllipseItem * m_item;
-    class QTimer * m_timer;
-};
-
-}
-
-#endif /* OBJECTCHARM_H_ */
--- a/ginebra2/PageItem.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/PageItem.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,7 +22,7 @@
 #include "PageItem.h"
 #include "GWebTouchNavigation.h"
 #include "Utilities.h"
-#include "GWebPage.h"
+#include "GSuperWebPage.h"
 #include "ChromeWidget.h"
 
 #include <QGraphicsWebView>
@@ -45,7 +45,7 @@
 // ---------------------------------
 
 PageItem::PageItem(ChromeSnippet * snippet, ChromeWidget* chrome)
-  : NativeChromeItem(snippet, chrome),
+  : NativeChromeItem(snippet, chrome->layout()),
     m_webView(0),
     m_touchNavigation(0),
     m_superPage(0),
@@ -68,8 +68,6 @@
         return;
     }
 
-    qDebug() << "PageItem::instantiate";
-
     // Create the web page.
     m_page = new WebPageWrapper(this, "Page snippet javascript error");
     m_page->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
@@ -88,7 +86,6 @@
     // Create the web view.
     m_webView = new PageItemWebView(this);
     m_webView->setPage(m_page);
-    safe_connect(m_webView, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
 
     m_touchNavigation = new GWebTouchNavigation(m_page, m_webView);
 
@@ -115,7 +112,6 @@
 }
 
 void PageItem::cleanUp() {   // slot
-    qDebug() << "PageItem::cleanUp";
     delete m_cleanupTimer;
     m_cleanupTimer = 0;
     delete m_touchNavigation;
@@ -128,7 +124,6 @@
 }
 
 void PageItem::resizeEvent(::QGraphicsSceneResizeEvent *event) {
-    qDebug() << "PageItem::resizeEvent: " << event->newSize();
     setWebViewSize(event->newSize());
 }
 
@@ -187,7 +182,6 @@
 //}
 
 QVariant PageItem::evaluateJavaScript(const QString &expression) {
-    qDebug() << "PageItem::evaluateJavaScript: " << expression;
     if (m_webView) {
         QWebFrame *frame = m_webView->page()->mainFrame();
         if (frame)
@@ -196,8 +190,4 @@
     return QVariant();
 }
 
-void PageItem::onLoadFinished(bool ok) {   // slot
-    qDebug() << "PageItem::onLoadFinished: " << ok;
-}
-
 } // GVA namespace
--- a/ginebra2/PageItem.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/PageItem.h	Tue Jul 06 14:03:49 2010 +0300
@@ -27,7 +27,6 @@
 #include <QVariant>
 
 class QGraphicsWebView;
-class FlickCharm;
 
 namespace GVA {
 
@@ -62,7 +61,6 @@
     void cleanUpOnTimer();
 
   public slots:
-    void onLoadFinished(bool ok);
     void cleanUp();
 
   protected:
--- a/ginebra2/PageSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/PageSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,7 +22,7 @@
 #include "PageSnippet.h"
 #include "PageItem.h"
 #include "Utilities.h"
-#include "ObjectCharm.h"
+#include "ExternalEventCharm.h"
 
 #include <QGraphicsWebView>
 #include <QVariant>
@@ -47,32 +47,38 @@
 
 PageSnippet::PageSnippet(const QString & elementId, ChromeWidget * chrome,
                          QGraphicsWidget * widget, const QWebElement & element)
-  : ChromeSnippet(elementId, chrome, widget, element)
+  : ChromeSnippet(elementId, chrome, widget, element),
+    m_externalEventCharm(0)
 {
 }
 
-void PageSnippet::setWidget(QGraphicsWidget * widget) {
-    ChromeSnippet::setWidget(widget);
-    ExternalEventCharm *charm = new ExternalEventCharm(widget);  // auto deleted
-    safe_connect(charm, SIGNAL(externalMouseEvent(int, const QString &, const QString &)),
-                 this, SIGNAL(externalMouseEvent(int, const QString &, const QString &)));
+PageSnippet::~PageSnippet() {
+    delete m_externalEventCharm;
+}
+
+PageSnippet * PageSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+{
+    PageSnippet* that = new PageSnippet(elementId, chrome, 0, element);
+    that->setChromeWidget( new PageItem( that, chrome ) );
+    return that;
+}
+
+void PageSnippet::setChromeWidget(QGraphicsWidget * widget) {
+    ChromeSnippet::setChromeWidget(widget);
+    m_externalEventCharm = new ExternalEventCharm(widget);
+    safe_connect(m_externalEventCharm, SIGNAL(externalMouseEvent(QEvent*, const QString &, const QString &)),
+                 this, SIGNAL(externalMouseEvent(QEvent*, const QString &, const QString &)));
 }
 
 void PageSnippet::setVisible(bool visiblity, bool animate) {
-    qDebug() << "PageSnippet::setVisible: " << visiblity;
     ChromeSnippet::setVisible(visiblity, animate);
 }
 
-void PageSnippet::onLoadFinished(bool ok) {  // slot
-    qDebug() << "PageSnippet::onLoadFinished: " << ok;
-}
-
 QString PageSnippet::url() const {
     return constPageItem()->url();
 }
 
 void PageSnippet::setUrl(const QString &url) {
-    qDebug() << "PageSnippet::setUrl: " << url;
     pageItem()->setUrl(url);
 }
 
--- a/ginebra2/PageSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/PageSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -49,10 +49,13 @@
 public:
   PageSnippet(const QString & elementId, ChromeWidget * chrome,
               QGraphicsWidget * widget, const QWebElement & element);
+  ~PageSnippet();
+
+  static PageSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
 
   // ChromeSnippet overrides:
   virtual void setVisible(bool visiblity, bool animate = true);
-  virtual void setWidget(QGraphicsWidget * widget);
+  virtual void setChromeWidget(QGraphicsWidget * widget);
 
   /// The URL of the web page.
   QString url() const;
@@ -78,13 +81,11 @@
   /// Destroys the web view, web page, etc. to free up memory.
   void cleanUp();
 
-private slots:
-  /// Called when the page has finished loading.
-  void onLoadFinished(bool ok);
-
 private:
   PageItem *pageItem();
   PageItem const *constPageItem() const;
+
+  ExternalEventCharm *m_externalEventCharm;
 };
 
 }
--- a/ginebra2/PopupWebChromeItem.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/PopupWebChromeItem.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,50 +22,48 @@
 #include "PopupWebChromeItem.h"
 #include "ChromeWidget.h"
 #include "WebChromeSnippet.h"
+#include "ExternalEventCharm.h"
 
 namespace GVA {
 
 PopupWebChromeItem::PopupWebChromeItem(
-        const QRectF & ownerArea,
         ChromeWidget * chrome,
         const QWebElement & element,
         QGraphicsItem * parent,
         bool modal)
-: WebChromeItem(ownerArea, chrome, element, parent),
-  m_modal(modal)
+: WebChromeItem(chrome, element, parent),
+  m_modal(modal),
+  m_externalEventCharm(0)
 {
 }
 
 PopupWebChromeItem::~PopupWebChromeItem()
-{}
+{
+    delete m_externalEventCharm;
+}
 
 void PopupWebChromeItem::init(WebChromeSnippet * snippet)
 {
     WebChromeItem::init(snippet);
+    m_externalEventCharm = new ExternalEventCharm(this);
 
     // Forward externalMouseEvent signals from context items.
     QObject::connect(
-            this,
-            SIGNAL(externalMouseEvent(int, const QString &, const QString &)),
+            m_externalEventCharm,
+            SIGNAL(externalMouseEvent(QEvent *, const QString &, const QString &)),
             snippet,
-            SIGNAL(externalMouseEvent(int, const QString &, const QString &)));
+            SIGNAL(externalMouseEvent(QEvent *, const QString &, const QString &)));
 }
 
 bool PopupWebChromeItem::event(QEvent * e)
 {
-    // Check for external events grabbed by this item.
-
-    checkForExternalEvent(this, e);
-
     switch (e->type()) {
       case QEvent::Show:
-        scene()->installEventFilter(this);
         if(snippet() && m_modal) {
             chrome()->emitPopupShown(snippet()->objectName());
         }
         break;
       case QEvent::Hide:
-        scene()->removeEventFilter(this);
         if(snippet() && m_modal) {
             chrome()->emitPopupHidden(snippet()->objectName());
         }
@@ -78,78 +76,4 @@
     return WebChromeItem::event(e);
 }
 
-bool PopupWebChromeItem::eventFilter(QObject * o, QEvent * e)
-{
-    // Check for external events NOT grabbed by this item.
-
-    checkForExternalEvent(o, e);
-
-    // Don't filter any events.
-
-    return false;
-}
-
-void PopupWebChromeItem::checkForExternalEvent(QObject * o, QEvent * e)
-{
-    Q_UNUSED(o);
-
-    // Ignore all events when this item is not showing.
-
-    if (!isVisible()) {
-        return;
-    }
-
-    // Ignore all but a few mouse press events.
-
-    switch (e->type()) {
-    case QEvent::GraphicsSceneMousePress:
-    case QEvent::GraphicsSceneMouseRelease:
-    case QEvent::GraphicsSceneMouseDoubleClick:
-// Commented out because new context menu resizes itself, don't want externalMouseEvents
-// in that case.
-//    case QEvent::GraphicsSceneResize:
-        break;
-    default:
-        return;
-    }
-
-    // Check where the mouse press event occurred.
-    // If it was outside this item's bounding rectangle,
-    // then tell the world.
-
-// Commented out because new context menu resizes itself, don't want externalMouseEvents
-// in that case.
-//    if (e->type() == QEvent::GraphicsSceneResize)
-//    {
-//        QGraphicsSceneResizeEvent *resizeEvent = static_cast<QGraphicsSceneResizeEvent *>(e);
-//        qDebug() << "PopupWebChromeItem::checkForExternalEvent: " << resizeEvent->newSize() << resizeEvent->oldSize();
-//        if (resizeEvent->newSize() != resizeEvent->oldSize())
-//          emitExternalEvent(e);
-//      return;
-//    }
-
-    QGraphicsSceneMouseEvent * me = static_cast<QGraphicsSceneMouseEvent*>(e);
-
-    QPointF eventPosition = me->scenePos();
-
-    QRectF itemGeometry = sceneBoundingRect();
-
-    if (!itemGeometry.contains(eventPosition)) {
-        emitExternalEvent(e);
-    }
-}
-
-void PopupWebChromeItem::emitExternalEvent(QEvent * e)
-{
-    QString description;
-
-    QDebug stream(&description);
-    stream << e;
-
-    QString name = description;
-    name.truncate(name.indexOf('('));
-
-    emit externalMouseEvent(e->type(), name, description.trimmed());
-}
-
 } // end of namespace GVA
--- a/ginebra2/PopupWebChromeItem.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/PopupWebChromeItem.h	Tue Jul 06 14:03:49 2010 +0300
@@ -59,7 +59,6 @@
 
 public:
     PopupWebChromeItem(
-            const QRectF & ownerArea,
             ChromeWidget * chrome,
             const QWebElement & element,
             QGraphicsItem * parent = 0,
@@ -71,19 +70,17 @@
 
 signals:
     void externalMouseEvent(
-            int type,
+            QEvent * ev,
             const QString & name,
             const QString & description);
 
-protected:
-    virtual bool event(QEvent * event);
-    virtual bool eventFilter(QObject * object, QEvent * event);
-
 private:
     void checkForExternalEvent(QObject * object, QEvent * event);
     void emitExternalEvent(QEvent * event);
+    bool event(QEvent * e);
 
     bool m_modal;
+    class ExternalEventCharm *m_externalEventCharm;
 };
 
 } // end of namespace GVA
--- a/ginebra2/RecentUrlToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/RecentUrlToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,6 +22,7 @@
  */
 
 #include "RecentUrlToolbarSnippet.h"
+#include "ToolbarChromeItem.h"
 #include "ViewStack.h"
 #include "GWebContentView.h"
 #include "BookmarksManager.h"
@@ -30,8 +31,8 @@
 namespace GVA {
 
     RecentUrlToolbarSnippet::RecentUrlToolbarSnippet(const QString& elementId, ChromeWidget * chrome,
-                                                     const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-        : DualButtonToolbarSnippet(elementId, chrome, ownerArea, element, widget),
+                                                     const QWebElement & element)
+        : DualButtonToolbarSnippet(elementId, chrome, element),
           m_action1(0)
     {      
     }
@@ -42,6 +43,13 @@
             delete m_action1;
     }
 
+    RecentUrlToolbarSnippet * RecentUrlToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+    {
+        RecentUrlToolbarSnippet * that = new RecentUrlToolbarSnippet( elementId, chrome, element );
+        that->setChromeWidget( new ToolbarChromeItem( that ) );
+        return that;
+    }
+    
     void RecentUrlToolbarSnippet::addChild(ChromeSnippet * child) {
         WebChromeContainerSnippet * s =  dynamic_cast<WebChromeContainerSnippet* >(child);
         if (!s) {
@@ -49,16 +57,16 @@
             if (child->elementId() == "RecentBackButton" ) {
                 t->actionId = RECENTURL_VIEW_ACTION_BACK;
                 t->actionName = RECENTURL_TOOLBAR_BACK;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
                 t->disabledImg = "";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
             }
             else if (child->elementId() == "RecentClearallButton" ) {
                 t->actionId = RECENTURL_VIEW_ACTION_CLEARALL;
                 t->actionName = RECENTURL_TOOLBAR_CLEARALL;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall.png";
                 t->disabledImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_disabled.png";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_pressed.png";
             }
             t->id = child->elementId();
             m_actionInfo.append(t);
--- a/ginebra2/RecentUrlToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/RecentUrlToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -38,8 +38,9 @@
   {
     Q_OBJECT
   public:
-    RecentUrlToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    RecentUrlToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~RecentUrlToolbarSnippet();
+    static RecentUrlToolbarSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
 
   private Q_SLOTS:
     /// Back action trigger handler. Switches back to webview
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ScrollableViewBase.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#include "ScrollableViewBase.h"
+
+
+#include "Kinetics/KineticScroller.h"
+
+#include <QGraphicsScene>
+#include <QGraphicsSceneMouseEvent>
+#include <QPointF>
+
+namespace GVA {
+
+ScrollableViewBase::ScrollableViewBase(QGraphicsItem* parent, Qt::WindowFlags wFlags)
+    : QGraphicsWidget(parent, wFlags)
+    , m_scrollWidget(0)
+{
+    //To get only the mouse events within the ScrollableViewBase.
+    setFlag(QGraphicsItem::ItemClipsToShape, true);
+
+    //To disable childrens painting outside the ViewportItem's rect.
+    setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
+
+    //To speed up painting.
+    setFlag(QGraphicsItem::ItemHasNoContents, true);
+    setAttribute(Qt::WA_OpaquePaintEvent, true);
+
+    m_kineticScroller = new KineticScroller(this);
+
+    //Event filter on all children of the viewport, so that all mouse
+    //events can be intercepted and used for kinetic scrolling.
+    setFiltersChildEvents(true);
+}
+
+ScrollableViewBase::~ScrollableViewBase()
+{}
+
+void ScrollableViewBase::setWidget(QGraphicsWidget* view)
+{
+    if (view == m_scrollWidget)
+        return;
+
+    if (m_scrollWidget) {
+        m_scrollWidget->setParentItem(0);
+        delete m_scrollWidget;
+    }
+
+    m_scrollWidget = view;
+    m_scrollWidget->setAttribute(Qt::WA_OpaquePaintEvent, true);
+    m_scrollWidget->setParentItem(this);
+}
+
+QSize ScrollableViewBase::viewportSize() const
+{
+    return size().toSize();
+}
+
+QPoint ScrollableViewBase::maximumScrollPosition() const
+{
+    QSizeF contentsSize = m_scrollWidget->size();
+    QSizeF viewportSize = size();
+    QSize maxScrollSize = (contentsSize - viewportSize).toSize();
+
+    return QPoint(qMax(0, maxScrollSize.width()), qMax(0, maxScrollSize.height()));
+}
+
+QPoint ScrollableViewBase::scrollPosition() const
+{
+    return (-scrollWidgetPos()).toPoint();
+}
+
+void ScrollableViewBase::setScrollPosition(const QPoint& pos, const QPoint& overShoot)
+{
+    m_overShoot = overShoot;
+    setScrollWidgetPos(-pos);
+}
+
+void ScrollableViewBase::stateChanged(KineticScrollable::State oldState
+                                      , KineticScrollable::State newState)
+{
+    Q_UNUSED(oldState);
+    Q_UNUSED(newState);
+}
+
+void ScrollableViewBase::setScrollWidgetGeometry(const QRectF& geom)
+{
+    scrollWidget()->setGeometry(adjustScrollWidgetRect(geom));
+}
+
+QRectF ScrollableViewBase::adjustScrollWidgetRect(const QRectF& rect)
+{
+    //FIX ME : Stop animation of scroll widget before adjusting it here??
+    QRectF newRect(rect);
+
+    QSizeF widgetSize = rect.size();
+    QSizeF viewportSize = size();
+
+    qreal w = viewportSize.width() - widgetSize.width();
+    qreal h = viewportSize.height() - widgetSize.height();
+
+    if ( w > 0 ) {
+        newRect.moveLeft(0);
+        m_extraPos.setX(w/2);
+      }
+    else {
+    	m_extraPos.setX(0);
+        if (newRect.x() < w)
+            newRect.moveLeft(w);
+        if (newRect.x() > 0)
+            newRect.moveLeft(0);
+    }
+
+    if ( h > 0 ) {
+        m_extraPos.setY(h/2);
+        newRect.moveTop(0);
+      }
+    else {
+    	 m_extraPos.setY(0);
+        if (newRect.y() < h)
+            newRect.moveTop(h);
+        if (newRect.y() > 0)
+            newRect.moveTop(0);
+    }
+    //newRect.translate(m_extraPos);
+    newRect.translate(m_overShoot);
+    return newRect;
+}
+
+void ScrollableViewBase::setScrollWidgetPos(const QPointF& pos)
+{
+    setScrollWidgetGeometry(QRectF(pos, scrollWidget()->size()));
+}
+
+QPointF ScrollableViewBase::scrollWidgetPos() const
+{
+    return scrollWidget()->pos()  /*- m_extraPos*/ - m_overShoot;
+}
+
+} //namespace GVA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/ScrollableViewBase.h	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+*
+* Description:
+*
+*/
+
+#ifndef ScrollableViewBase_h
+#define ScrollableViewBase_h
+
+#include "Kinetics/KineticScrollable.h"
+
+#include <QGraphicsWidget>
+
+namespace GVA {
+
+class KineticScroller;
+
+class ScrollableViewBase : public QGraphicsWidget, public KineticScrollable {
+public:
+    ScrollableViewBase(QGraphicsItem* parent = 0, Qt::WindowFlags wFlags = 0);
+    ~ScrollableViewBase();
+
+    void setWidget(QGraphicsWidget*);
+
+protected:
+
+    //KineticScrollable pure virtuals
+    QSize viewportSize() const;
+    QPoint maximumScrollPosition() const ;
+    QPoint scrollPosition() const;
+    void setScrollPosition(const QPoint& pos, const QPoint& overshootDelta);
+    void stateChanged(KineticScrollable::State oldState, KineticScrollable::State newState);
+
+    QGraphicsWidget* scrollWidget() const { return m_scrollWidget; }
+    virtual void setScrollWidgetGeometry(const QRectF& r);
+    QRectF adjustScrollWidgetRect(const QRectF&);
+
+    //Helpers for adjusting scroll pos
+    void setScrollWidgetPos(const QPointF& pos);
+    QPointF scrollWidgetPos() const;
+
+protected:
+    KineticScroller* m_kineticScroller;
+
+private:
+    QGraphicsWidget* m_scrollWidget;
+    QPointF m_overShoot;
+    QPointF m_extraPos;
+}; //ScrollableViewBase
+
+} //namespace GVA
+
+#endif //ScrollableViewBase_h
--- a/ginebra2/SettingsToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/SettingsToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,6 +22,7 @@
  */
 
 #include "SettingsToolbarSnippet.h"
+#include "ToolbarChromeItem.h"
 #include "ViewStack.h"
 #include "GWebContentView.h"
 #include "webpagecontroller.h"
@@ -30,8 +31,8 @@
 namespace GVA {
 
     SettingsToolbarSnippet::SettingsToolbarSnippet(const QString& elementId, ChromeWidget * chrome,
-                                                     const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-        : DualButtonToolbarSnippet(elementId, chrome, ownerArea, element, widget),
+                                                   const QWebElement & element)
+        : DualButtonToolbarSnippet(elementId, chrome, element),
           m_action1(0), m_action2(0)
     {      
     }
@@ -44,6 +45,13 @@
             delete m_action2;
     }
 
+    SettingsToolbarSnippet * SettingsToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+    {
+        SettingsToolbarSnippet * that = new SettingsToolbarSnippet( elementId, chrome, element );
+        that->setChromeWidget( new ToolbarChromeItem( that ) );
+        return that;
+    }
+    
     void SettingsToolbarSnippet::addChild(ChromeSnippet * child) {
         WebChromeContainerSnippet * s =  dynamic_cast<WebChromeContainerSnippet* >(child);
         if (!s) {
@@ -51,16 +59,16 @@
             if (child->elementId() == "SettingsBackButton" ) {
                 t->actionId = SETTINGS_VIEW_ACTION_BACK;
                 t->actionName = SETTINGS_TOOLBAR_BACK;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
                 t->disabledImg = "";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
             }
             else if (child->elementId() == "SettingsFeedbackButton" ) {
                 t->actionId = SETTINGS_VIEW_ACTION_FEEDBACK;
                 t->actionName = SETTINGS_TOOLBAR_FEEDBACK;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback.png";
                 t->disabledImg = "";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback_pressed.png";
             }
             t->id = child->elementId();
             m_actionInfo.append(t);
@@ -100,6 +108,10 @@
     void SettingsToolbarSnippet::handleBackButton() {
         GWebContentView* webView = static_cast<GWebContentView*> (chrome()->getView("WebView"));
         if(webView) {
+            // Reloading here because otherwise the settings won't collapse when leaving and
+            // re-entering the view. This fixes BR-3525. If there's a better way to do this in
+            // the future this can be removed.
+            webView->reload();
             webView->showNormalPage();
             webView->setGesturesEnabled(true);
         }
--- a/ginebra2/SettingsToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/SettingsToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -36,8 +36,9 @@
     {
         Q_OBJECT
     public:
-        SettingsToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+        SettingsToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
         virtual ~SettingsToolbarSnippet();
+        static SettingsToolbarSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
 
     private Q_SLOTS:
         // Back action trigger handler. Switches back to webview
--- a/ginebra2/SlidingWidget.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/SlidingWidget.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -55,8 +55,6 @@
 
   void SlidingWidget::resizeEvent(QGraphicsSceneResizeEvent *ev)
   {
-    qDebug() << "SlidingWidget::resizeEvent: " << ev->newSize();
-    qDebug()<<"m_shrinked="<<m_shrinked;
     if (m_window)
       m_window->resize(ev->newSize());
       m_windowSize = ev->newSize();
--- a/ginebra2/Snippets.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/Snippets.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -61,9 +61,9 @@
     foreach(ChromeSnippet *snippet, m_snippetMap){
       if (snippet){
         //If anchored, shrink the anchor bar
-        m_chrome->snippetHiding(snippet);
+        m_chrome->layout()->snippetHiding(snippet);
         //Remove about-to-be-deleted snippet from scene
-        m_chrome->getScene()->removeItem(snippet->widget());
+        m_chrome->layout()->scene()->removeItem(snippet->widget());
         delete snippet;
       }
     }
--- a/ginebra2/SystemDeviceImpl.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/SystemDeviceImpl.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -38,8 +38,6 @@
     // set current charging state then keep it up to date with signal handler
     m_batteryCharging = (m_deviceInfo->currentPowerState() ==
         QSystemDeviceInfo::WallPowerChargingBattery) ? true : false;
-    qDebug() << "DeviceDelegate: charging state = " << m_deviceInfo->currentPowerState();
-    qDebug() << "DeviceDelegate: charging = " << m_batteryCharging;
     safe_connect(m_deviceInfo, SIGNAL(powerStateChanged(QSystemDeviceInfo::PowerState)),
                  this, SLOT(handlePowerStateChanged(QSystemDeviceInfo::PowerState)));
 }
@@ -65,7 +63,6 @@
     bool batteryCharging =
         (state == QSystemDeviceInfo::WallPowerChargingBattery) ? true : false;
 
-    qDebug() << "DeviceDelegate: new charging state = " << state;
     if (batteryCharging != m_batteryCharging) {
         m_batteryCharging = batteryCharging;
         //qDebug() << "DeviceDelegate: new charging = " << m_batteryCharging;
--- a/ginebra2/SystemNetworkImpl.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/SystemNetworkImpl.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -29,8 +29,11 @@
 
 namespace GVA {
 
+#define WCDMA2GSM_WORKAROUND // work around for QtMobility issue
+
 SystemNetworkImpl::SystemNetworkImpl()
-    : m_currentMode(QSystemNetworkInfo::UnknownMode)
+    : m_currentMode(QSystemNetworkInfo::UnknownMode),
+      m_sessionNetworkName("")
 {
     // create Qt Mobility API objects for network information
     m_networkInfo = new QSystemNetworkInfo(this);
@@ -49,17 +52,16 @@
         QSystemNetworkInfo::NetworkMode, QSystemNetworkInfo::NetworkStatus)), this,
         SLOT(handleNetworkStatusChanged(QSystemNetworkInfo::NetworkMode, QSystemNetworkInfo::NetworkStatus)));
 
-#ifdef QT_MOBILITY_BEARER_MANAGEMENT        	
+#ifdef QT_MOBILITY_BEARER_MANAGEMENT
     // Get the singleton instance of WebNetworkConnectionManager 
     WRT::WebNetworkConnectionManager &webNetworkConnectionManager 
     	  = WRT::WebNetworkConnectionManagerSingleton::Instance();
-     	
-    safe_connect(&webNetworkConnectionManager, SIGNAL(networkNameChanged(
+    
+    safe_connect(&webNetworkConnectionManager, SIGNAL(networkOnlineStateChanged(bool)),
+        this, SLOT(handleNetworkOnlineStateChanged(bool)));
+    safe_connect(&webNetworkConnectionManager, SIGNAL(networkSessionNameChanged(
         QSystemNetworkInfo::NetworkMode, const QString&)), this,
-        SLOT(handleNetworkNameChanged(QSystemNetworkInfo::NetworkMode, const QString&)));
-    safe_connect(&webNetworkConnectionManager, SIGNAL(networkSignalStrengthChanged(
-        QSystemNetworkInfo::NetworkMode, int)), this,
-        SLOT(handleNetworkSignalStrengthChanged(QSystemNetworkInfo::NetworkMode, int)));
+        SLOT(handleNetworkSessionNameChanged(QSystemNetworkInfo::NetworkMode, const QString&)));
 
       // Update all configurations
     webNetworkConnectionManager.updateConfigurations();
@@ -74,28 +76,43 @@
 //! Gets the network name for the current network mode.
 QString SystemNetworkImpl::getNetworkName() const
 {
-    QString netName = m_networkInfo->networkName(m_currentMode);
+    QString netName;
 
-    // if WLAN SSID name is unknown show "WiFi"
-    if ((m_currentMode == QSystemNetworkInfo::WlanMode) &&
-        (netName == "")) {
-        netName = "WiFi";
+    switch(m_currentMode) {
+        case QSystemNetworkInfo::WlanMode:
+        case QSystemNetworkInfo::EthernetMode:
+        case QSystemNetworkInfo::BluetoothMode:
+        case QSystemNetworkInfo::WimaxMode:
+            // for wireless cases use name from session.
+#ifdef QT_MOBILITY_BEARER_MANAGEMENT
+            netName = m_sessionNetworkName;
+#else
+            netName = m_networkInfo->networkName(m_currentMode);
+            // if WLAN SSID name is unknown show "WiFi"
+            if (netName == "")
+                netName = "WiFi";
+#endif // QT_MOBILITY_BEARER_MANAGEMENT
+            break;
+
+        default:
+            netName = m_networkInfo->networkName(m_currentMode);
+            break;
     }
 
-    //qDebug() << "DeviceDelegate: network name " << netName;
+    qDebug() << "SystemNetworkImpl::getNetworkName: network name " << netName;
     return (netName);
 }
 
 //! Gets the network signal strength for the current network mode.
 int SystemNetworkImpl::getNetworkSignalStrength() const
 {
-      int strength = m_networkInfo->networkSignalStrength(m_currentMode);
-
+    int strength = m_networkInfo->networkSignalStrength(m_currentMode);
+    
     // Strength in WLAN mode is reported as -1 by QtMobility
     if ((strength == -1) && (m_currentMode == QSystemNetworkInfo::WlanMode)) {
         strength = 100;
     }
-
+    
     return (strength);
 }
 
@@ -106,8 +123,7 @@
 void SystemNetworkImpl::handleNetworkModeChanged(
     QSystemNetworkInfo::NetworkMode mode)
 {
-      qDebug() << "handleNetworkModeChanged" << "Mode:" << mode;
-      m_currentMode = mode;
+    qDebug() << "SystemNetworkImpl::handleNetworkModeChanged" << "Mode:" << mode;
 }
 
 //! Handles the networkSignalStrengthChanged signal from system network info.
@@ -118,15 +134,17 @@
 void SystemNetworkImpl::handleNetworkSignalStrengthChanged(
     QSystemNetworkInfo::NetworkMode mode, int strength)
 {
-    qDebug() << "handleNetworkSignalStrengthChanged" << "Mode:" << mode << "strength:" << strength;
+    qDebug() << "SystemNetworkImpl::handleNetworkSignalStrengthChanged" << "Mode:" << mode << "strength:" << strength;
+    
+    // Only send signal strength changes for current mode.
+    if (mode == m_currentMode) {
+        // Unknown mode could mean network error so send negative strength to indicate offline.
+        if (m_currentMode == QSystemNetworkInfo::UnknownMode)
+            strength = -1;
 
-    // Bootstrap the mode change if no networkModeChanged signal is recived
-      if (m_currentMode == 0)
-          m_currentMode = mode;
-
-    // Only send signal strength changes for current mode.
-    if (mode == m_currentMode)
+        qDebug() << "SystemNetworkImpl::handleNetworkSignalStrengthChanged" << "emit strength:" << strength;
         emit networkSignalStrengthChanged(strength);
+    }
 }
 
 //! Handles the networkNameChanged signal from system network info.
@@ -137,15 +155,13 @@
 void SystemNetworkImpl::handleNetworkNameChanged(
         QSystemNetworkInfo::NetworkMode mode, const QString& name)
 {
-      qDebug() << "handleNetworkStatusChanged" << "Mode:" << mode << "name:" << name;
-
-      // Bootstrap the mode change if no networkModeChanged signal is recived
-      if (m_currentMode == 0)
-          m_currentMode = mode;
-
+    qDebug() << "SystemNetworkImpl::handleNetworkNameChanged" << "Mode:" << mode << "name:" << name;
+    
     // Only send network name changes for current mode.
-    if (mode == m_currentMode)
+    if (mode == m_currentMode) {
+        // Now update name.
         emit networkNameChanged(name);
+    }
 }
 
 //! Handles the networkStatusChanged signal from system network info.
@@ -156,8 +172,73 @@
 void SystemNetworkImpl::handleNetworkStatusChanged(
         QSystemNetworkInfo::NetworkMode mode, QSystemNetworkInfo::NetworkStatus status)
 {
-      qDebug() << "handleNetworkSignalStrengthChanged" << "Mode:" << mode << "status:" << status;
+    qDebug() << "SystemNetworkImpl::handleNetworkStatusChanged" << "mode: " << mode << "status: " << status; 
+}
+
+#ifdef QT_MOBILITY_BEARER_MANAGEMENT
+//! Handles online state changed signal from the web network connection manager.
+/*!
+  \param mode network mode of connection that changed
+*/
+void SystemNetworkImpl::handleNetworkOnlineStateChanged(bool isOnline)
+{
+    qDebug() << "SystemNetworkImpl::handleOnlineStateChanged" << "isOnline:" << isOnline;
+    
+    // Offline indicates no active network configurations.
+    if (!isOnline) {
+        qDebug() << "SystemNetworkImpl::handleOnlineStateChanged: change mode to unknown, emit -1 str";
+        m_currentMode = QSystemNetworkInfo::UnknownMode;
+        // negative strength indicates offline to UI
+        emit networkSignalStrengthChanged(-1);
+    }
+    // Online indicates at least 1 active network config but not necessarily 
+    // one being used by the browser.
 }
 
+void SystemNetworkImpl::handleNetworkSessionNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString& name)
+{
+    // UI must get non-negative strength to indicate online status
+    int strength = m_networkInfo->networkSignalStrength(mode);
+    
+    qDebug() << "SystemNetworkImpl::handleNetworkSessionNameChanged" << "Mode:" << mode << "name:" << name << "strength:" << strength;
+    
+    switch (mode) {
+        case QSystemNetworkInfo::WlanMode:
+        case QSystemNetworkInfo::EthernetMode:
+        case QSystemNetworkInfo::BluetoothMode:
+        case QSystemNetworkInfo::WimaxMode:
+            // for wireless cases use name from session.
+            m_sessionNetworkName = name;
+            break;
+
+        default:
+            // clear session name - not needed in this mode
+            m_sessionNetworkName = "";
+            break;
+    }
+
+#ifdef WCDMA2GSM_WORKAROUND
+    // Work around for QtMobility issue. Bearer management reports WCDMA bearer but
+    // QSystemNetworkInfo sees connection as GSM mode. 
+    if ((mode == QSystemNetworkInfo::WcdmaMode) && (strength < 0)) {
+        strength = m_networkInfo->networkSignalStrength(QSystemNetworkInfo::GsmMode);
+        if (strength >= 0)
+            mode = QSystemNetworkInfo::GsmMode;
+    }
+#endif
+
+    qDebug() << "SystemNetworkImpl::handleNetworkSessionNameChanged: set mode to " << mode;
+    m_currentMode = mode;
+
+    // emit signal strength of new connection,
+    // use wrapper access method for correct WLAN strength
+    qDebug() << "SystemNetworkImpl::handleNetworkSessionNameChanged: emit str=" << getNetworkSignalStrength();
+    emit networkSignalStrengthChanged(getNetworkSignalStrength());
+
+    // Update network name on mode change.
+    qDebug() << "SystemNetworkImpl::handleNetworkSessionNameChanged: emit network name= " << getNetworkName();
+    emit networkNameChanged(getNetworkName());
+}
+#endif // QT_MOBILITY_BEARER_MANAGEMENT
+
 } // GVA
-
--- a/ginebra2/SystemNetworkImpl.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/SystemNetworkImpl.h	Tue Jul 06 14:03:49 2010 +0300
@@ -49,10 +49,15 @@
       void handleNetworkNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString& name);
       void handleNetworkStatusChanged(QSystemNetworkInfo::NetworkMode mode,
         QSystemNetworkInfo::NetworkStatus status);
+#ifdef QT_MOBILITY_BEARER_MANAGEMENT
+      void handleNetworkOnlineStateChanged(bool isOnline);
+      void handleNetworkSessionNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString& name);
+#endif // QT_MOBILITY_BEARER_MANAGEMENT
 
 private:
       QSystemNetworkInfo *m_networkInfo;
       QSystemNetworkInfo::NetworkMode m_currentMode;
+      QString m_sessionNetworkName;
 };
 
 } // GVA
--- a/ginebra2/Toolbar.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/Toolbar.h	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,20 @@
 
 namespace GVA {
 
+  enum  ContentToolbarTimerState {
+      CONTENT_TOOLBAR_TIMER_STATE_NONE,
+      CONTENT_TOOLBAR_TIMER_STATE_ALLOW
+  };
+
+  enum  ContentToolbarState {
+
+      CONTENT_TOOLBAR_STATE_FULL,
+      CONTENT_TOOLBAR_STATE_PARTIAL,
+      CONTENT_TOOLBAR_STATE_ANIM_TO_PARTIAL,
+      CONTENT_TOOLBAR_STATE_ANIM_TO_FULL,
+      CONTENT_TOOLBAR_STATE_INVALID
+  };
+
   enum ContentViewActions {
 
       CONTENT_VIEW_ACTION_BACK,
@@ -62,14 +76,21 @@
 
        int actionId;
        QString actionName;
+       QString normalImg;
        QString activeImg;
        QString disabledImg;
-       QString selectedImg;
        QString id;
   };
 
+#define TOOLBAR_BUTTON_PATH ":/chrome/bedrockchrome/toolbar.snippet/icons/"
+#define TOOLBAR_FULL_TB_TOGGLE_ICON  TOOLBAR_BUTTON_PATH  "icon_toggle_fullTB.png"
+#define TOOLBAR_FULL_TB_SELECTED_TOGGLE_ICON TOOLBAR_BUTTON_PATH  "icon_toggle_fullTB_pressed.png"
+#define TOOLBAR_PARTIAL_TB_TOGGLE_ICON  TOOLBAR_BUTTON_PATH "icon_toggle_partialTB.png"
+#define TOOLBAR_PARTIAL_TB_SELECTED_TOGGLE_ICON  TOOLBAR_BUTTON_PATH "icon_toggle_partialTB_pressed.png"
 
-#define TOOLBAR_POPUP_INACTIVITY_DURATION 5000
+
+
+#define TOOLBAR_POPUP_INACTIVITY_DURATION 8000
 #define TOOLBAR_ZOOMBAR_INACTIVITY_DURATION 8000
 
 #define DUAL_TOOLBAR_NUM_BUTTONS 2
--- a/ginebra2/ToolbarChromeItem.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ToolbarChromeItem.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 #include "NativeChromeItem.h"
 #include "GWebContentView.h"
 #include "WebChromeContainerSnippet.h"
+#include "ChromeEffect.h"
 
 #include <QDebug>
 
@@ -33,12 +34,12 @@
 
 namespace GVA {
 
-  ToolbarChromeItem::ToolbarChromeItem(QGraphicsItem* parent)
+  ToolbarChromeItem::ToolbarChromeItem(ChromeSnippet* snippet, QGraphicsItem* parent)
     : ChromeItem(NULL, parent),
       m_partialbg(NULL),
       m_opacity(TOOLBAR_BG_OPACITY)
   {
-
+      setSnippet(snippet);
   }
 
   ToolbarChromeItem::~ToolbarChromeItem()
@@ -76,6 +77,10 @@
     // restore painter
     painter->restore();
 
+    if(!isEnabled()) {
+        // Disabled, apply whitewash.
+        ChromeEffect::paintDisabledRect(painter, opt->exposedRect);
+    }
   }
 
   void ToolbarChromeItem::setProperties() {
@@ -91,6 +96,8 @@
   void ToolbarChromeItem::addPartialbg() {
 
     WebChromeContainerSnippet * s = static_cast<WebChromeContainerSnippet*>(m_snippet);
+    if(!s->layout()->itemAt(TOOLBAR_LEFTCORNER_ITEM))
+        return;
     QRectF rc = s->layout()->itemAt(TOOLBAR_LEFTCORNER_ITEM)->geometry();
     if (m_partialbg) {
       delete m_partialbg;
@@ -112,17 +119,15 @@
   void ToolbarChromeItem::setSnippet(ChromeSnippet* snippet) {
 
     ChromeItem::setSnippet(snippet);
-
-    QString cssVal = m_snippet->element().styleProperty("border-top-color", QWebElement::ComputedStyle);
+    QString cssVal = m_snippet->element().styleProperty("border-top-color",
+        QWebElement::ComputedStyle);
     NativeChromeItem::CSSToQColor(cssVal, m_borderColor);
 
     cssVal = m_snippet->element().styleProperty("padding-top", QWebElement::ComputedStyle);
-    m_padding =  cssVal.remove("px").toInt();
-
+    m_padding = cssVal.remove("px").toInt();
 
     cssVal = m_snippet->element().styleProperty("border-top-width", QWebElement::ComputedStyle);
     m_borderWidth = cssVal.remove("px").toInt();
-
     setProperties();
   }
 
--- a/ginebra2/ToolbarChromeItem.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ToolbarChromeItem.h	Tue Jul 06 14:03:49 2010 +0300
@@ -24,7 +24,7 @@
 
 #include <QtGui>
 #include "ChromeSnippet.h"
-#include "ChromeItem.h"
+#include "NativeChromeItem.h"
 
 namespace GVA {
 
@@ -33,7 +33,7 @@
   {
     Q_OBJECT
   public:
-    ToolbarChromeItem(QGraphicsItem* parent = 0);
+    ToolbarChromeItem(ChromeSnippet* snippet, QGraphicsItem* parent = 0);
     virtual ~ToolbarChromeItem();
     virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* opt, QWidget* widget);
     virtual void setSnippet(ChromeSnippet* snippet);
--- a/ginebra2/ToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -29,8 +29,8 @@
 
 namespace GVA {
 
-  ToolbarSnippet::ToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-                       : WebChromeContainerSnippet(elementId, chrome, ownerArea, element, widget)
+  ToolbarSnippet::ToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+                       : WebChromeContainerSnippet(elementId, chrome, element)
   {
 
       connect(m_chrome,  SIGNAL(chromeComplete()), this, SLOT(onChromeComplete()));
@@ -53,8 +53,8 @@
 
   void ToolbarSnippet::updateOwnerArea() {
 
-      setLayoutWidth(m_chrome->width());
-      WebChromeContainerSnippet::updateOwnerArea();
+    setLayoutWidth(m_chrome->layout()->size().width());
+    WebChromeContainerSnippet::updateOwnerArea();
 
   }
 
@@ -69,10 +69,7 @@
   void ToolbarSnippet::setAction(ChromeSnippet * s) {
 
       //qDebug() << "setAction: " << s->elementId() << m_actionInfo.size();
-      ChromeItem * item = static_cast<ChromeItem*>(s->widget());
      
-      bool res = connect(item, SIGNAL(mouseEvent( QEvent::Type )), this, SLOT(onMouseEvent(QEvent::Type)));
-
       ActionButtonSnippet * button  = static_cast<ActionButtonSnippet*> (s);
       int index = getIndex(s);
 
@@ -83,9 +80,9 @@
           // Set the button icons if it has not been set for any state (we can do this through Javascript)
           //qDebug() << "setAction " << s->elementId() << button->icon().isNull();
           if (button->icon().isNull() ) {
-              button->setIcon(t->activeImg);
+              button->setIcon(t->normalImg);
               button->setDisabledIcon(t->disabledImg);
-              button->setSelectedIcon(t->selectedImg);
+              button->setActiveIcon(t->activeImg);
           }
 
       }
--- a/ginebra2/ToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -42,11 +42,9 @@
   {
     Q_OBJECT
   public:
-    ToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    ToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~ToolbarSnippet();
 
-  protected Q_SLOTS:
-    virtual void onMouseEvent( QEvent::Type type) = 0;
   private Q_SLOTS:
     virtual void onChromeComplete();
 
--- a/ginebra2/UrlSearchSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/UrlSearchSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 #include "Utilities.h"
 
 #include "ChromeRenderer.h"
+#include "ChromeLayout.h"
 #include "ChromeWidget.h"
 #include "PageSnippet.h"
 #include "ViewController.h"
@@ -33,6 +34,8 @@
 #include "GWebContentView.h"
 #include "WindowFlowView.h"
 
+#include <QWebHistoryItem>
+
 namespace GVA {
 
 #define GO_BUTTON_ICON ":/chrome/bedrockchrome/urlsearch.snippet/icons/go_btn.png"
@@ -95,6 +98,7 @@
     m_urlSearchEditor->setProgressColor(progressColor);
     m_urlSearchEditor->setBorderColor(m_borderColor);
     m_urlSearchEditor->setPadding(0.1); // draw the Rounded Rect
+    m_urlSearchEditor->setInputMethodHints(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
     safe_connect(m_urlSearchEditor, SIGNAL(textMayChanged()), this, SLOT(updateLoadStateAndSuggest()));
     safe_connect(m_urlSearchEditor, SIGNAL(activated()),this, SLOT(urlSearchActivatedByEnterKey()));
     safe_connect(m_urlSearchEditor, SIGNAL(focusChanged(bool)),this, SLOT(focusChanged(bool)));
@@ -104,6 +108,8 @@
     m_urlSearchBtn = new ActionButton(snippet, m_viewPort);
     QAction* urlSearchBtnAction = new QAction(this);
     m_urlSearchBtn->setAction(urlSearchBtnAction); // FIXME: should use diff QActions
+
+    m_urlSearchBtn->setActiveOnPress(false);
     safe_connect(urlSearchBtnAction, SIGNAL(triggered()), this, SLOT(urlSearchActivated()));
 
     // Get the icon size
@@ -150,8 +156,8 @@
     safe_connect(viewController, SIGNAL(currentViewChanged()),
             this, SLOT(viewChanged()));
 
-    safe_connect(ViewStack::getSingleton(), SIGNAL(currentViewChanged()),
-            this, SLOT(viewChanged()));
+ /*   safe_connect(ViewStack::getSingleton(), SIGNAL(currentViewChanged()),
+            this, SLOT(viewChanged()));*/
 }
 
 GUrlSearchItem::~GUrlSearchItem()
@@ -251,7 +257,7 @@
         GWebContentView * gView = qobject_cast<GWebContentView*> (curView);
         bool isSuperPage = gView ? gView->currentPageIsSuperPage() : false;
         if(!isSuperPage)
-            m_chrome->slideView(100);
+	  m_chrome->layout()->slideView(100);
     }
     // Strictly speaking we should set progress to 0.
     // But set it higher to give immediate visual feedback
@@ -312,7 +318,7 @@
     ViewController * viewController = m_chrome->viewController();
     ControllableViewBase* curView = viewController->currentView();
     if (curView && curView->type() == "webView" && pageController->contentsYPos() > 0)
-        m_chrome->slideView(-100);
+      m_chrome->layout()->slideView(-100);
 
     ++m_pendingClearCalls;
 
@@ -322,7 +328,7 @@
 void GUrlSearchItem::setPageCreated()
 {
     // remove slideview(100) since the new transition for the code-driven window
-    //m_chrome->slideView(100);
+    //m_chrome->layout()->slideView(100);
 }
 
 void GUrlSearchItem::setPageChanged()
@@ -363,7 +369,6 @@
 
     // view changes to web content view
     if (curView && curView->type() == "webView" && !isSuperPage) {
-        m_urlSearchEditor->setText(formattedUrl());
         int progress = pageController->loadProgressValue();
         if (progress >= 100)
             progress = 0;
@@ -382,18 +387,17 @@
             }
         }
         if (!isSuperPage  && (pageController->contentsYPos() <= 0 || pageController->isPageLoading())){
-            m_chrome->slideView(100);
+	  m_chrome->layout()->slideView(100);
         } else {
-            m_chrome->slideView(-100);
+	  m_chrome->layout()->slideView(-100);
         }
         m_backFromNewWinTrans = false;
     } else {
          pageController->urlTextChanged(m_urlSearchEditor->text());
-         // Remove progress bar and url text field value so that
+         // Remove progress bar
          // incorrect values are not seen before we can update when we come back
-         m_urlSearchEditor->setText("");
          m_urlSearchEditor->setProgress(0);
-         m_chrome->slideView(-100);
+         m_chrome->layout()->slideView(-100);
     }
 }
 
@@ -505,6 +509,13 @@
         m_justFocusIn = false;
         m_urlSearchEditor->unselect();
         m_urlSearchEditor->shiftToLeftEnd();
+        
+        // Suggestion snippet needs to know about this event.
+        PageSnippet * suggestSnippet = qobject_cast<PageSnippet*>(m_chrome->getSnippet("SuggestsChromeId"));
+        if (suggestSnippet) {
+            QString cmd = "searchSuggests.urlSearchLostFocus();";
+            suggestSnippet->evaluateJavaScript(cmd);
+        }
     }
 }
 
@@ -525,7 +536,13 @@
 QString GUrlSearchItem::formattedUrl() const
 {
     WebPageController * pageController = WebPageController::getSingleton();
-    return pageController->currentDocUrl().replace(" ","+");
+    QString url = pageController->loadText();
+    // for first load of the windows restored from last session
+    if (url.isEmpty()&& pageController->currentDocUrl().isEmpty()) {
+        QWebHistoryItem item = pageController->currentPage()->history()->currentItem();
+        url = item.url().toString();
+    }
+    return url.replace(" ","+");
 }
 
 GUrlSearchSnippet::GUrlSearchSnippet(const QString & elementId, ChromeWidget * chrome,
@@ -534,6 +551,13 @@
 {
 }
 
+GUrlSearchSnippet * GUrlSearchSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+{
+    GUrlSearchSnippet* that = new GUrlSearchSnippet(elementId, chrome, 0, element);
+    that->setChromeWidget( new GUrlSearchItem( that, chrome ) );
+    return that;
+}
+
 inline GUrlSearchItem* GUrlSearchSnippet::urlSearchItem()
 {
     return static_cast<GUrlSearchItem *>(widget());
--- a/ginebra2/UrlSearchSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/UrlSearchSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -93,6 +93,8 @@
 public:
   GUrlSearchSnippet(const QString & elementId, ChromeWidget * chrome,
               QGraphicsWidget * widget, const QWebElement & element);
+  
+  static GUrlSearchSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
 
   /// The URL of the web page.
   QString url() const;
--- a/ginebra2/ViewController.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ViewController.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -37,8 +37,6 @@
 
   void ViewController::addView(ControllableViewBase *controllableView) {
     assert(controllableView);
-    qDebug() << "ViewController::addView: adding " << controllableView
-             << " jsObject=" << controllableView->jsObject();
     QString key;
     // Set up parent/child link for javascript access to the view.
     if (controllableView->jsObject()) {
@@ -69,7 +67,6 @@
   }
 
   void ViewController::showCurrent() {
-      qDebug() << "ViewController::showCurrent: " << m_current.value();
       ControllableViewBase *currentView = m_current.value();
       if (!currentView) return;
 
@@ -82,8 +79,11 @@
           // Deactivate all others.
           foreach(ControllableViewBase *view, m_viewMap) {
               if (view && view->isActive() && view != currentView) {
-                  view->hide();
-                  view->deactivate();
+                //If this view has the same widget as the current view,
+                //then don't hide this view.
+		if(currentView->widget() != view->widget())
+		  view->hide();
+		view->deactivate();
               }
           }
           emit currentViewChanged();
--- a/ginebra2/ViewStack.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ViewStack.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -72,14 +72,12 @@
 
 void ViewStack::fromSettingsView(const QString &to)  // goto WebView
 {
+    m_viewController->showContent(to);
     ChromeSnippet* tbSnippet = m_chrome->getSnippet("SettingsViewToolbarId");
     if (tbSnippet)
         tbSnippet->hide();
 
     WebPageController::getSingleton()->setSettingsLoaded(0);
-
-    emit (currentViewChanged());
-    m_viewController->showContent(to);
 }
 
 void ViewStack::fromWebView(const QString &to)
@@ -92,10 +90,7 @@
 
 void ViewStack::fromBookmarkTreeView(const QString &to)
 {
-    Q_UNUSED(to);
-
-    m_viewController->viewChanged();
-
+     m_viewController->showContent(to);
     // Hide toolbar and dialog if visible
     ChromeSnippet* visibleSnippet = m_chrome->getSnippet("BookmarkViewToolbarId");
     if (visibleSnippet)
@@ -109,9 +104,7 @@
 
 void ViewStack::fromBookmarkHistoryView(const QString &to)
 {
-    Q_UNUSED(to);
-
-    m_viewController->viewChanged();
+    m_viewController->showContent(to);
     ChromeSnippet* tbSnippet = m_chrome->getSnippet("RecentUrlViewToolbarId");
     if (tbSnippet)
         tbSnippet->hide();
@@ -144,7 +137,6 @@
 
     WebPageController::getSingleton()->setSettingsLoaded(0);
 
-    emit(currentViewChanged());
 }
 
 void ViewStack::toWebView()
@@ -159,8 +151,6 @@
     ChromeSnippet* tbSnippet = m_chrome->getSnippet("RecentUrlViewToolbarId");
     if (tbSnippet)
         tbSnippet->show();
-
-    m_viewController->viewChanged();
 }
 
 void ViewStack::toBookmarkView()
@@ -170,9 +160,6 @@
         tbSnippet->show();
 
     emit activateBookmark();
-
-
-    m_viewController->viewChanged();
 }
 
 void ViewStack::creatingPage(WRT::WrtBrowserContainer* page) {
--- a/ginebra2/ViewStack.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ViewStack.h	Tue Jul 06 14:03:49 2010 +0300
@@ -80,7 +80,6 @@
     void activateBookmark();
     void activateWindowView();
     void deActivateWindowView();
-    void currentViewChanged();
 
     void pageChanged(int);
 
--- a/ginebra2/WebChromeContainerSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WebChromeContainerSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -30,17 +30,16 @@
 
 namespace GVA {
 
-  WebChromeContainerSnippet::WebChromeContainerSnippet(const QString & elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget* gwidget)
-    : ChromeSnippet(elementId, chrome, gwidget, element),
-      m_ownerArea(ownerArea),
-      m_layoutHeight(0)
+  WebChromeContainerSnippet::WebChromeContainerSnippet(const QString & elementId, ChromeWidget * chrome, const QWebElement & element)
+    : ChromeSnippet(elementId, chrome, 0, element)
+      ,m_layoutHeight(0)
   {
 
-    m_layoutWidth = chrome->width();
+    m_layoutWidth = chrome->layout()->size().width();
 
-    QGraphicsWidget * item = static_cast<QGraphicsWidget*> (widget());
+    //QGraphicsWidget * item = static_cast<QGraphicsWidget*> (widget());
     //NB: maybe size should be fixed only in one direction?
-    item->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+    //item->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     //NB: add a method for setting owner area
     //item->setPreferredSize(m_ownerArea.width(), m_ownerArea.height());
     //Also resize in case item is not part of anchor layout
@@ -53,8 +52,8 @@
 
     //Add a stretch element at the beginning.
     m_layout->addStretch();
-    item->setLayout(m_layout);
-    //When chrome is resized owner areas for snippets may change
+    //item->setLayout(m_layout);
+    //When chrome is resized sizes for snippets may change
     QObject::connect(m_chrome->renderer(), SIGNAL(chromeResized()), this, SLOT(updateOwnerArea()));
     QObject::connect(m_chrome, SIGNAL(prepareForSizeChange(QSize)), this, SLOT(updateSize(QSize)));
 
@@ -69,7 +68,13 @@
   {
     ; //Do nothing since the layout positions children automatically.
   }
-
+  
+  void WebChromeContainerSnippet::setChromeWidget(QGraphicsWidget * widget){
+      widget->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+      widget->setLayout(m_layout);
+      ChromeSnippet::setChromeWidget(widget);
+  }
+  
   void WebChromeContainerSnippet::addChild(ChromeSnippet * child)
   {
     //Prevent layout from stretching the child widgets. NB: Revisit this to make configurable from chrome?
@@ -83,7 +88,7 @@
     if (childHeight > m_layoutHeight){
       m_layoutHeight = childHeight;
 
-      setOwnerArea();
+      updateSizes();
     }
     emit childAdded(child);
 
@@ -92,8 +97,7 @@
 
   void WebChromeContainerSnippet:: updateOwnerArea()
   {
-
-    setOwnerArea();
+    updateSizes();
     QObject::disconnect(m_chrome->renderer(), SIGNAL(chromeResized()), this, SLOT(updateOwnerArea()));
 
   }
@@ -101,15 +105,15 @@
   void WebChromeContainerSnippet::setLayoutHeight(int height){
     if (m_layoutHeight != height){
       m_layoutHeight = height;
-      setOwnerArea();
+      updateSizes();
     }
   }
 
-  void WebChromeContainerSnippet::setLayoutWidth(int width, bool update){
+  void WebChromeContainerSnippet::setLayoutWidth(qreal width, bool update){
     if (m_layoutWidth != width){
       m_layoutWidth = width;
       if (update ) {
-        setOwnerArea();
+        updateSizes();
       }
     }
   }
@@ -120,15 +124,12 @@
     // m_layoutWidth should have been set by now through derived classes. We don't want to set it
     // here as that would overwrite any width set before. For example, width of the middle snippet
     // in toolbar is set by the main toolbar.
-    setOwnerArea();
-
+    updateSizes();
   }
 
-  void WebChromeContainerSnippet::setOwnerArea() {
-
+  void WebChromeContainerSnippet::updateSizes() {
+      
     QGraphicsWidget * item = static_cast<QGraphicsWidget*> (widget());
-    m_ownerArea =  m_chrome->getSnippetRect(m_elementId);
-
     //Resize the item
     item->setPreferredSize(m_layoutWidth, m_layoutHeight);
     //Also resize in case item is not part of anchor layout
--- a/ginebra2/WebChromeContainerSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WebChromeContainerSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -32,27 +32,26 @@
   {
     Q_OBJECT
   public:
-    WebChromeContainerSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    WebChromeContainerSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~WebChromeContainerSnippet();
+    virtual void setChromeWidget(QGraphicsWidget * widget);
     virtual void addChild(ChromeSnippet * child);
     QGraphicsLinearLayout* layout() { return m_layout;}
-    QRectF ownerArea() { return m_ownerArea;}
 
   Q_SIGNALS:
     void childAdded(ChromeSnippet * );
   public slots:
     void setLayoutHeight(int height);
-    void setLayoutWidth(int width, bool update = false);
+    void setLayoutWidth(qreal width, bool update = false);
     virtual void updateSize(QSize );
+    void updateSizes();
+    QRectF ownerArea() { return QRectF(m_element.geometry());}
     virtual void updateOwnerArea();
 
   protected slots:
     void positionChildren();
 
   private:
-    void setOwnerArea();
-
-    QRectF m_ownerArea;
     qreal m_layoutHeight;
     qreal m_layoutWidth;
     QGraphicsLinearLayout * m_layout;
--- a/ginebra2/WebChromeItem.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WebChromeItem.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -1,23 +1,23 @@
 /*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, version 2.1 of the License.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not,
-* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
-*
-* Description:
-*
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, version 2.1 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not,
+ * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+ *
+ * Description:
+ *
+ */
 
 #include "WebChromeItem.h"
 #include "ChromeWidget.h"
@@ -33,217 +33,195 @@
 #include <QGraphicsView>
 #include <QDebug>
 
-namespace GVA {
+namespace GVA
+{
 #ifndef NO_QSTM_GESTURE
 using namespace qstmGesture;
 #endif
-  WebChromeItem::WebChromeItem(const QRectF& ownerArea, ChromeWidget *chrome, const QWebElement & element, QGraphicsItem* parent)
-    : ChromeItem(NULL, parent),
-      m_ownerArea(ownerArea),
-      m_chrome(chrome),
-      m_element(element),
-      m_painting(false)
-  {
-
-
-    // G1: Prevent hover events from passing through to the underlying widget.
-    //setAcceptHoverEvents(true); ?
-
-    //setFocusPolicy(Qt::ClickFocus);
-    //setOpacity(0.50);
-    //Set preferred size so item will resize as part of anchor layout
+WebChromeItem::WebChromeItem(ChromeWidget *chrome, const QWebElement & element, QGraphicsItem* parent) :
+    ChromeItem(NULL, parent)
+    , m_chrome(chrome)
+    , m_element(element)
+    , m_painting(false)
+{
     setFlags(QGraphicsItem::ItemIsFocusable);
-    setPreferredSize(ownerArea.width(), ownerArea.height());
-    //Also resize in case item is not part of anchor layout
-    resize(preferredSize());
+    //Adjust the element size to match the element rectangle
+    updateSizes();
 #ifndef NO_QSTM_GESTURE
     grabGesture(QStm_Gesture::assignedType());
 #endif
     //Use QGraphicsScene cached rendering NB: This might degrade rendering quality for some animation transforms
     setCacheMode(QGraphicsItem::ItemCoordinateCache);
-  }
+}
 
-  WebChromeItem::~WebChromeItem()
-  {
+WebChromeItem::~WebChromeItem()
+{
 
-  }
+}
 
-  void WebChromeItem::init(WebChromeSnippet * snippet)
-  {
-    setCachedHandlers(chrome()->dom()->getCachedHandlers(snippet->elementId(), ownerArea()));
+void WebChromeItem::init(WebChromeSnippet * snippet)
+{
+    //TODO: revisit this, don't use owner area
+    //setCachedHandlers(chrome()->dom()->getCachedHandlers(snippet->elementId(), ownerArea()));
     m_snippet = snippet;
 
     //When chrome is resized owner areas for snippets may change
     //NB: Maybe this needs to be done on chromeRepainted too?
-    
-    QObject::connect(
-            renderer(),
-            SIGNAL(chromeResized()),
-            snippet,
-            SLOT(updateOwnerArea()));
+
+    QObject::connect(renderer(), SIGNAL(chromeResized()), snippet, SLOT(updateOwnerArea()));
 
-    QObject::connect(
-            this,
-            SIGNAL(contextMenu(QGraphicsSceneContextMenuEvent *)),
-            snippet,
-            SLOT(onContextMenuEvent(QGraphicsSceneContextMenuEvent *)));
-  }
+    QObject::connect(this, SIGNAL(contextMenu(QGraphicsSceneContextMenuEvent *)), snippet,
+        SLOT(onContextMenuEvent(QGraphicsSceneContextMenuEvent *)));
+}
 
-  QGraphicsScene * WebChromeItem::scene()
-  {
-    return m_chrome->getScene();
-  }
+QGraphicsScene * WebChromeItem::scene()
+{
+  return m_chrome->layout()->scene();
+}
 
-  ChromeRenderer * WebChromeItem::renderer()
-  {
+ChromeRenderer * WebChromeItem::renderer()
+{
     return m_chrome->renderer();
-  }
+}
 
-  void WebChromeItem::setOwnerArea(const QRectF& ownerArea)
-  {
-    m_ownerArea = ownerArea;
+//Adjust size to match the element rectangle
+void WebChromeItem::updateSizes()
+{
     //Set preferred size so item will resize as part of anchor layout
-    setPreferredSize(ownerArea.width(), ownerArea.height());
+    setPreferredSize(m_element.geometry().width(), m_element.geometry().height());
     //Also resize in case item is not part of anchor layout
     resize(preferredSize());
-  }
+}
 
-  // NB: For now we only handle onclick (actually mouseUp). Fix this
-  // NB: Modify for multiple cached handlers: mouse click, long press
-  // and support handlers not executed in js engine.
+// NB: For now we only handle onclick (actually mouseUp). Fix this
+// NB: Modify for multiple cached handlers: mouse click, long press
+// and support handlers not executed in js engine.
 
-  void WebChromeItem::cachedHandlerEvent(QGraphicsSceneMouseEvent * ev)
-  {
-    for (int i = 0; i < m_handlers.size(); i++){
-     const CachedHandler & handler = m_handlers.at(i);
-      if (handler.rect().contains(ev->pos())){
-    qDebug() << "Invoking cached handler: " << handler.script();
-        //m_chrome->evalWithEngineContext(handler.script());
-    handler.invoke();
-        return;
-      }
+void WebChromeItem::cachedHandlerEvent(QGraphicsSceneMouseEvent * ev)
+{
+    for (int i = 0; i < m_handlers.size(); i++) {
+        const CachedHandler & handler = m_handlers.at(i);
+        if (handler.rect().contains(ev->pos())) {
+            //m_chrome->evalWithEngineContext(handler.script());
+            handler.invoke();
+            return;
+        }
     }
-  }
+}
 
-  void WebChromeItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt, QWidget* widget)
-  {
+void WebChromeItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt, QWidget* widget)
+{
     Q_UNUSED(opt)
     Q_UNUSED(widget)
 
-      //For debugging
-    //painter->fillRect(QRectF(0,0, m_ownerArea.width(), m_ownerArea.height()), Qt::yellow);
-    //qDebug() << " WebChromeItem::paint: " << m_element.attribute("id");
     m_painting = true;
     m_element.render(painter);
     m_painting = false;
     ChromeItem::paint(painter, opt, widget);
-  }
-
+}
 
-  void WebChromeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent * ev)
-  {
-
-    // qDebug() << "ChromeRenderer::contextMenuEvent";
+void WebChromeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent * ev)
+{
     ev->setAccepted(true);
     //Signal context menu event
     emit contextMenu(ev);
-  }
-
-  void WebChromeItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent * ev)
-  {
+}
 
+void WebChromeItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent * ev)
+{
     forwardMouseEvent(QEvent::MouseButtonDblClick, ev);
-  }
+}
 
-  void WebChromeItem::grabFocus()
-  {
+void WebChromeItem::grabFocus()
+{
     //setFocusProxy(m_chrome->renderer());
     setFocus();
-  }
+}
 
-  void WebChromeItem::mousePressEvent(QGraphicsSceneMouseEvent * ev)
-  {
+void WebChromeItem::mousePressEvent(QGraphicsSceneMouseEvent * ev)
+{
     //On mouse press, first invoke any cached handlers.
     cachedHandlerEvent(ev);
     //Then do normal mouse press handling
     setFocus();
-   // setFocusProxy(m_chrome->renderer());
+    // setFocusProxy(m_chrome->renderer());
     forwardMouseEvent(QEvent::MouseButtonPress, ev);
-  }
+}
 
-  void WebChromeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * ev)
-  {
+void WebChromeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * ev)
+{
     forwardMouseEvent(QEvent::MouseButtonRelease, ev);
 #if defined __SYMBIAN32__
-// FIXME Remove this, it will be fixed Qt 4.6.3 ?
- /*   
-   if (ev->button() == Qt::LeftButton) {
-        QPoint p = QPoint(int(m_ownerArea.x()), int(m_ownerArea.y())) + ev->pos().toPoint();
-        QWebFrame* frame = m_chrome->renderer()->page()->mainFrame();
-        QWebHitTestResult htr = frame->hitTestContent(p);
-        if (htr.isContentEditable()) {
-            QEvent vkbEvent(QEvent::RequestSoftwareInputPanel);
-            QList<QGraphicsView*> views = m_chrome->renderer()->scene()->views();
-            QWidget* view = qobject_cast<QWidget*>(views.value(0));
-            if (view)
-              QApplication::sendEvent(view, &vkbEvent);
-        }
-    }
-    */
+    // FIXME Remove this, it will be fixed Qt 4.6.3 ?
+    /*   
+     if (ev->button() == Qt::LeftButton) {
+     QRectF elementRectangle = m_element.geometry();
+     QPoint p = QPoint(int(elementRectangle.x()), int(elementRectangle.y())) + ev->pos().toPoint();
+     QWebFrame* frame = m_chrome->renderer()->page()->mainFrame();
+     QWebHitTestResult htr = frame->hitTestContent(p);
+     if (htr.isContentEditable()) {
+     QEvent vkbEvent(QEvent::RequestSoftwareInputPanel);
+     QList<QGraphicsView*> views = m_chrome->renderer()->scene()->views();
+     QWidget* view = qobject_cast<QWidget*>(views.value(0));
+     if (view)
+     QApplication::sendEvent(view, &vkbEvent);
+     }
+     }
+     */
 #endif
-  }
-
+}
 
-  void WebChromeItem::mouseMoveEvent(QGraphicsSceneMouseEvent * ev)
-  {
+void WebChromeItem::mouseMoveEvent(QGraphicsSceneMouseEvent * ev)
+{
     forwardMouseEvent(QEvent::MouseMove, ev);
-  }
+}
 
-
-  void WebChromeItem::forwardMouseEvent(QEvent::Type type, QGraphicsSceneMouseEvent *ev) {
+void WebChromeItem::forwardMouseEvent(QEvent::Type type, QGraphicsSceneMouseEvent *ev)
+{
 
     emit mouseEvent(type);
-    // m_chrome->renderer()->setFocus();
-    QMouseEvent shiftedEv( type, QPoint(int(m_ownerArea.x()), int(m_ownerArea.y()))+ev->pos().toPoint(),
-               ev->button(), ev->buttons(), ev->modifiers() );
-    //qDebug() << "m_ownerArea: " << m_ownerArea << "ev->pos(): " << ev->pos() <<
+    QRectF elementRectangle = m_element.geometry();
+    QMouseEvent shiftedEv(type, QPoint(int(elementRectangle.x()), int(elementRectangle.y()))
+        + ev->pos().toPoint(), ev->button(), ev->buttons(), ev->modifiers());
+    //qDebug() << "elementRectangle: " << elementRectangle << "ev->pos(): " << ev->pos() <<
     //      "shiftedEv.pos(): " << shiftedEv.pos();
-    QApplication::sendEvent(m_chrome->renderer()->page(),&shiftedEv);
-  }
+    QApplication::sendEvent(m_chrome->renderer()->page(), &shiftedEv);
+}
 
-  void WebChromeItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event ) {
+void WebChromeItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+{
     // Translate to a mouse move event.
-   /* QMouseEvent shiftedEv( QEvent::MouseMove, QPoint(int(m_ownerArea.x()), int(m_ownerArea.y()))+event->pos().toPoint(),
-               Qt::NoButton, Qt::NoButton, Qt::NoModifier);
-    QApplication::sendEvent(m_chrome->renderer(), &shiftedEv); */
-  } 
-  /*
-  void WebChromeItem::keyPressEvent ( QKeyEvent * event ) {
-    qDebug() << "WebChromeItem: keyPressEvent " << event->type();
-    QApplication::sendEvent(m_chrome->renderer(), event);
-  }
+    /*
+     QRectF elementRectangle = m_element.geometry(); 
+     QMouseEvent shiftedEv( QEvent::MouseMove, QPoint(int(elementRectangle.x()), int(elementRectangle.y()))+event->pos().toPoint(),
+     Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+     QApplication::sendEvent(m_chrome->renderer(), &shiftedEv); */
+}
+/*
+ void WebChromeItem::keyPressEvent ( QKeyEvent * event ) {
+ QApplication::sendEvent(m_chrome->renderer(), event);
+ }
 
-  void WebChromeItem::keyReleaseEvent ( QKeyEvent * event ) {
-    qDebug() << "WebChromeItem: keyReleaseEvent " << event->type();
-    QApplication::sendEvent(m_chrome->renderer(), event);
-  }
-  */
+ void WebChromeItem::keyReleaseEvent ( QKeyEvent * event ) {
+ QApplication::sendEvent(m_chrome->renderer(), event);
+ }
+ */
 
-  bool WebChromeItem::event(QEvent* event)
-  {
+bool WebChromeItem::event(QEvent* event)
+{
 #ifndef NO_QSTM_GESTURE
-      if (event->type() == QEvent::Gesture) {
-          QStm_Gesture* gesture = getQStmGesture(event);
-          if (gesture) {
-              QStm_GestureType gtype = gesture->getGestureStmType();
-              if (gtype == QStmTouchGestureType || gtype == QStmReleaseGestureType) {
-                  gesture->sendMouseEvents();
-                  return true;
-              }
-          }
-      }
+    if (event->type() == QEvent::Gesture) {
+        QStm_Gesture* gesture = getQStmGesture(event);
+        if (gesture) {
+            QStm_GestureType gtype = gesture->getGestureStmType();
+            if (gtype == QStmTouchGestureType || gtype == QStmReleaseGestureType) {
+                gesture->sendMouseEvents();
+                return true;
+            }
+        }
+    }
 #endif
-      return QGraphicsWidget::event(event);
-  }
+    return QGraphicsWidget::event(event);
+}
 
 } // endof namespace GVA
--- a/ginebra2/WebChromeItem.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WebChromeItem.h	Tue Jul 06 14:03:49 2010 +0300
@@ -19,6 +19,7 @@
 *
 */
 
+
 #ifndef __GINEBRA_WEBCHROMEITEM_H__
 #define __GINEBRA_WEBCHROMEITEM_H__
 
@@ -37,12 +38,12 @@
   {
     Q_OBJECT
   public:
-    WebChromeItem(const QRectF& ownerArea, ChromeWidget* chrome, const QWebElement & element, QGraphicsItem* parent=0);
+    WebChromeItem(ChromeWidget* chrome, const QWebElement & element, QGraphicsItem* parent=0);
     virtual ~WebChromeItem();
     virtual void init(WebChromeSnippet * snippet);
     void paint(QPainter* painter, const QStyleOptionGraphicsItem* opt, QWidget* widget);
-    QRectF ownerArea() {return m_ownerArea;}\
-    void setOwnerArea(const QRectF& ownerArea);
+    QRectF elementRect() {return QRectF(m_element.geometry());}
+    void updateSizes();
     void setCachedHandlers(QList<CachedHandler> handlers) {m_handlers = handlers;}
     QGraphicsScene * scene();
     ChromeRenderer * renderer();
@@ -69,7 +70,8 @@
     //virtual bool event(QEvent * ev);
   private:
     void cachedHandlerEvent(QGraphicsSceneMouseEvent * ev);
-    QRectF m_ownerArea;
+    //Owner area obsolete, use element rectangle
+    //QRectF m_ownerArea;
     QPixmap * m_pageBits;
     ChromeWidget* m_chrome;
     QWebElement m_element;
--- a/ginebra2/WebChromeSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WebChromeSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -32,25 +32,23 @@
 
   static WebChromeItem * newChromeItem(
       ChromeWidget * chrome,
-      const QRectF& ownerArea,
       const QWebElement & element)
   {
     QString type = element.attribute("data-GinebraItemType", "normal");
 
     if (type == "popup") {
       QString modal = element.attribute("data-GinebraPopupModal", "true");
-      return new PopupWebChromeItem(ownerArea, chrome, element, 0, modal == "true");
+      return new PopupWebChromeItem(chrome, element, 0, modal == "true");
     }
 
-    return new WebChromeItem(ownerArea, chrome, element);
+    return new WebChromeItem(chrome, element);
   }
 
   WebChromeSnippet::WebChromeSnippet(
           const QString & elementId,
           ChromeWidget * chrome,
-          const QRectF& ownerArea,
           const QWebElement & element)
-    : ChromeSnippet(elementId, chrome, newChromeItem(chrome, ownerArea, element), element)
+    : ChromeSnippet(elementId, chrome, newChromeItem(chrome, element), element)
 
   {
     WebChromeItem * item = static_cast<WebChromeItem*> (widget());
@@ -77,11 +75,9 @@
   {
 
     WebChromeItem * item = static_cast<WebChromeItem*> (widget());
-    //Setting owner area also resets the item's size and preferred size
-    item->setOwnerArea(m_chrome->getSnippetRect(m_elementId));
-    //qDebug() << WebChromeSnippet::updateOwnerArea: id: " << m_elementId << " element rect: " << item->ownerArea();
-    //NB: Should move this to WebChromeItem::setOwnerArea()?
-    item->setCachedHandlers(m_chrome->dom()->getCachedHandlers(m_elementId, item->ownerArea()));
+    item->updateSizes();
+    //TODO: Revisit this, don't use owner area
+    //item->setCachedHandlers(m_chrome->dom()->getCachedHandlers(m_elementId, item->ownerArea()));
 
   }
 
--- a/ginebra2/WebChromeSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WebChromeSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -36,7 +36,7 @@
   {
     Q_OBJECT
   public:
-    WebChromeSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element);
+    WebChromeSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~WebChromeSnippet();
     WebChromeItem* item();
   public slots:
--- a/ginebra2/WindowToolbarSnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WindowToolbarSnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -22,14 +22,15 @@
  */
 
 #include "WindowToolbarSnippet.h"
+#include "ToolbarChromeItem.h"
 #include "ViewStack.h"
 #include <QDebug>
 
 namespace GVA {
 
     WindowToolbarSnippet::WindowToolbarSnippet(const QString& elementId, ChromeWidget * chrome,
-                                               const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget)
-        : DualButtonToolbarSnippet(elementId, chrome, ownerArea, element, widget)
+                                               const QWebElement & element)
+        : DualButtonToolbarSnippet(elementId, chrome, element)
     {
         m_type = TOOLBAR_WINDOWS_VIEW;
     }
@@ -38,6 +39,13 @@
     {
     }
 
+    WindowToolbarSnippet * WindowToolbarSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+    {
+        WindowToolbarSnippet * that = new WindowToolbarSnippet(elementId, chrome, element);
+        that->setChromeWidget(new ToolbarChromeItem(that));
+        return that;
+    }
+    
     void WindowToolbarSnippet::addChild(ChromeSnippet * child) {
 
         WebChromeContainerSnippet * s =  dynamic_cast<WebChromeContainerSnippet* >(child);
@@ -46,17 +54,17 @@
             if (child->elementId() == "WinBackButton" ) {
                 t->actionId = WINDOW_VIEW_ACTION_BACK;
                 t->actionName = WINDOW_TOOLBAR_BACK;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png";
                 t->disabledImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_disabled.png";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png";
 
             }
             else if (child->elementId() == "WinAddWindow" ) {
                 t->actionId = WINDOW_VIEW_ACTION_ADD;
                 t->actionName = WINDOW_TOOLBAR_ADD;
-                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add.png";
+                t->normalImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add.png";
                 t->disabledImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add_disabled.png";
-                t->selectedImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add_pressed.png";
+                t->activeImg = ":/chrome/bedrockchrome/toolbar.snippet/icons/icon_add_pressed.png";
             }
             t->id = child->elementId();
             m_actionInfo.append(t);
--- a/ginebra2/WindowToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/WindowToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -38,8 +38,9 @@
   {
     Q_OBJECT
   public:
-    WindowToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    WindowToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~WindowToolbarSnippet();
+    static WindowToolbarSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
 
   private Q_SLOTS:
     /// Back action trigger handler. Switches back to webview
--- a/ginebra2/animators/FadeAnimator.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/animators/FadeAnimator.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -46,8 +46,6 @@
 {
   qreal o = 1.0 - step;
   m_snippet->widget()->setOpacity((o > m_minOpacity)?o:m_minOpacity);
-
-  qDebug() << step;
 }
 
 }
--- a/ginebra2/animators/SlideAnimator.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/animators/SlideAnimator.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -62,7 +62,6 @@
 
 void SlideAnimator::updateVisibility(qreal step)
 {
-  qDebug() << step;
   QTransform transform = m_originalTransform;
   transform.translate(step*m_xRange, step*m_yRange);
   m_snippet->widget()->setTransform(transform);
--- a/ginebra2/browserIcon.svg	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/browserIcon.svg	Tue Jul 06 14:03:49 2010 +0300
@@ -1,94 +1,120 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363)  -->
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" id="browserIcon.svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
-	 y="0px" width="360px" height="359.998px" viewBox="0 0 360 359.998" enable-background="new 0 0 360 359.998"
-	 xml:space="preserve">
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="655.7227" y1="309.877" x2="669.624" y2="293.1677" gradientTransform="matrix(6.8182 0 0 -6.8182 -4338.6855 2234.5732)">
-	<stop  offset="0" style="stop-color:#DEE9F3"/>
-	<stop  offset="1" style="stop-color:#235487"/>
-</linearGradient>
-<circle fill="url(#SVGID_1_)" cx="180" cy="179.28" r="126.802"/>
-<radialGradient id="SVGID_2_" cx="666.2812" cy="313.0107" r="33.1886" gradientTransform="matrix(6.8182 0 0 -6.8182 -4338.6855 2234.5732)" gradientUnits="userSpaceOnUse">
-	<stop  offset="0" style="stop-color:#FFFFFF"/>
-	<stop  offset="0.53" style="stop-color:#A2C2DD"/>
-	<stop  offset="0.87" style="stop-color:#6C83BB"/>
-	<stop  offset="1" style="stop-color:#003D6D"/>
-</radialGradient>
-<circle fill="url(#SVGID_2_)" cx="180" cy="179.27" r="122.318"/>
-<radialGradient id="SVGID_3_" cx="666.5264" cy="311.1816" r="22.5747" gradientTransform="matrix(6.8182 0 0 -6.8182 -4338.6855 2234.5732)" gradientUnits="userSpaceOnUse">
-	<stop  offset="0" style="stop-color:#E6EEF4"/>
-	<stop  offset="0.08" style="stop-color:#C6DCC1"/>
-	<stop  offset="0.21" style="stop-color:#91C06F"/>
-	<stop  offset="0.32" style="stop-color:#6BAB33"/>
-	<stop  offset="0.4" style="stop-color:#539E0E"/>
-	<stop  offset="0.44" style="stop-color:#4A9900"/>
-	<stop  offset="0.55" style="stop-color:#398419"/>
-	<stop  offset="0.71" style="stop-color:#22663B"/>
-	<stop  offset="0.85" style="stop-color:#135550"/>
-	<stop  offset="0.94" style="stop-color:#0E4E58"/>
-</radialGradient>
-<path fill="url(#SVGID_3_)" d="M241.449,221.041l-7.838,7.84c0,0-4.721,0-4.954,1.896c-0.104,0.809-0.394,4.314-1.165,6.104
-	c-1.567,1.097-3.453,4.701-3.453,4.701s-0.965,6.983,4.234,5.803c5.197-1.184,13.881-15.942,13.881-15.942
-	S247.357,219.862,241.449,221.041z M60.795,179.49l-3.093-1.035c0,0.278-0.021,0.554-0.021,0.83c0,2.932,0.139,5.823,0.34,8.698
-	c0.041,0.608,0.086,1.229,0.139,1.838c0.245,2.873,0.564,5.726,1.006,8.544c0.018,0.112,0.045,0.235,0.062,0.354
-	c0.445,2.793,1.002,5.535,1.636,8.268c0.09,0.404,0.18,0.801,0.278,1.207c0.687,2.83,1.459,5.641,2.344,8.396
-	c0.008,0.029,0.021,0.06,0.027,0.089c0.09-0.998,0.135-2.021,0.1-3.076c-0.238-7.285-1.412-6.351-1.412-6.351l1.881-1.416
-	l6.354-9.646v-7.058l-5.883-4.942L60.795,179.49z M139.635,69.933c1.55,1.063,3.888,1.804,5.262,1.215
-	c1.375-0.585,4.319-2.716,4.319-2.716s-1.784-0.225-3.56,0.455C143.874,69.577,140.92,68.985,139.635,69.933z M299.958,155.363
-	c-0.47-2.389-1.015-4.758-1.62-7.098c-0.113-0.441-0.258-0.875-0.376-1.312c-0.512-1.877-1.077-3.744-1.669-5.584
-	c-0.238-0.717-0.475-1.432-0.729-2.145c-0.572-1.648-1.184-3.275-1.816-4.895c-0.249-0.629-0.486-1.271-0.748-1.894
-	c-0.893-2.147-1.829-4.271-2.84-6.353c-0.204-0.422-0.43-0.83-0.639-1.248c-0.83-1.678-1.701-3.331-2.612-4.963
-	c-0.401-0.721-0.813-1.437-1.236-2.148c-0.793-1.363-1.62-2.708-2.467-4.034c-0.429-0.684-0.862-1.366-1.306-2.042
-	c-1.193-1.792-2.426-3.562-3.709-5.29c-0.319-0.43-0.65-0.847-0.979-1.269c-1.134-1.48-2.295-2.933-3.486-4.356
-	c-0.572-0.675-1.147-1.333-1.729-1.996c-0.974-1.109-1.963-2.201-2.981-3.276c-0.613-0.65-1.224-1.301-1.845-1.939
-	c-1.248-1.264-2.517-2.491-3.812-3.698c-0.537-0.5-1.063-1.002-1.607-1.489c-1.488-1.342-3.011-2.643-4.564-3.907
-	c-0.707-0.573-1.429-1.125-2.137-1.686c-1.125-0.875-2.273-1.738-3.432-2.573c-0.771-0.556-1.538-1.112-2.312-1.648
-	c-1.305-0.9-2.643-1.768-3.986-2.619c-0.61-0.393-1.221-0.802-1.838-1.183c-1.869-1.137-3.771-2.213-5.707-3.252
-	c-0.803-0.43-1.617-0.835-2.438-1.248c-1.279-0.65-2.562-1.28-3.855-1.886c-0.896-0.412-1.793-0.822-2.688-1.215
-	c-1.374-0.597-2.766-1.162-4.16-1.706c-0.63-0.246-1.257-0.507-1.887-0.745c-1.292,0.847-8.864,5.134-8.864,5.134
-	s-7.784-1.35-9.921-1.35c-2.132,0-10.486-1.493-12.383-1.726c-1.902-0.241-8.902-1.182-11.021,0.94
-	c-2.132,2.131-10.44,4.308-12.348,4.545c-1.881,0.241-5.801,1.255-1.1,7.056c-0.696,0.712-14.109,10.06-14.109,5.801
-	c0-4.25,2.99-11.855-1.215-7.78c-3.021,2.925-7.817,1.183-5.215,4.492c2.602,3.318,0.393,2.397,0,3.142
-	c-0.995,1.885-1.597,2.798-0.88,8.238c0.708,5.433-8.686,5.4-9.312,3.997c-1.677-3.772-5.67,1.878-6.615,3.31
-	c-0.943,1.416-4.36,5.163-4.36,5.163l3.919,5.021l-11.447,10.034c0,0-15.917,11.042-16.149,12.466
-	c-0.242,1.414-7.069,19.727-4.705,25.166c2.364,5.44,8.341,19.171,14,19.627c7.408,0.604,25.399-3.397,25.399-3.397
-	c0.479,1.189,3.649,5.885,3.649,5.885s9.041,1.055,9.526,2c0.164,0.336-4.536,9.475-1.645,13.52
-	c6.271,8.783,12.269,17.57,8.82,21.646c-8.235,12.357-0.356,16.107,1.644,22.586c0.716,1.895,3.056,7.838,6.665,13.955
-	c3.608,10.506,5.92,5.801,10.661,7.529c5.841,0.511,10.759,2.652,15.721-3.727c1.438-1.174,3.883-0.234,3.883-1.887
-	c0-0.936,4.234-3.646,5.317-6.186c1.149-0.523,4.091-2.52,6.092-3.469c1.81-0.117-1.729-4.98,1.882-10.121
-	c3.874-1.523,14.348-8.582,14.348-8.582c0.475-10.346-5.098-23.131,5.293-30.465c6.707-6.812,15.488-10.705,19.752-21.107
-	c1.182-3.069,3.82-9.356-3.756-7.471c-7.115,1.793-15.056,2.197-11.291-0.937c-0.426-3.838-5.18-5.649-9.412-9.414
-	c-2.193-5.18-5.646-14.43-5.646-14.43l-7.524-11.441l0.938-2.356l8.939,13.177l8.94,10.819c3.294,10.82,6.112,11.763,6.112,11.763
-	c4.954-1.742,16.699-6.582,16.699-6.582l11.521-11.06c0,0-1.17-3.521-5.878-7.998l-3.527-2.119
-	c-0.771,2.166-4.859,2.983-4.859,2.983l-2.662-3.923l-3.523-3.997l-3.771-3.998l3.702-0.752l2.852,5.433l6.854,2.373
-	c0,0,1.896-1.391,5.416,2.246c2.867-0.231,8.933,0.577,8.933,0.577s5.146-0.024,7.763,3.294c0.504,0.646,1.23,3.698,2.195,4.394
-	c3.293,2.35,6.042,6.983,8.619,15.836c1.511,5.18,3.056,13.8,5.688,13.841c1.145,0.017,1.99,0.471,1.605-1.55
-	c-0.467-0.941-1.176-10.875-1.176-10.875s1.176-11.032,1.885-15.524c1.791-3.814,2.086,0.008,6.354,7.286
-	C299.999,155.605,299.982,155.488,299.958,155.363z M182.332,74.265c0.939-2.782,6.357-3.731,6.357-3.731s-1.56,2.868-1.194,4.353
-	c0.362,1.493-2.472,2.446-2.798,5.952c-0.295,3.505-6.779,1.452-7.319,0.225C176.863,79.833,181.383,77.049,182.332,74.265z
-	 M205.536,121.613c-4.011,0-16.054,1.19-19.362-1.174c-3.311-2.355-5.883,0.241-8.269,2.605c-1.562,1.542-7.249-1.575-8.906-3.939
-	c-1.656-2.365-7.213-2.189-7.213-2.189l1.256-6.74l-15.996-0.782l-9.098,2.66l-8.563,0.257l4.799-2.295l5.96-1.416
-	c0,0,8.689-7.126,11.291-9.254c2.206-1.796,10.98-0.781,10.98-0.781l9.642,6.959c0,0-2.131,5.441-3.08,6.615
-	c3.539-0.241,7.708-6.672,7.708-6.672c-7.527-6.905-7.216-9.254-7.216-9.254l9.912,6.951l0.09,0.065c0,0,4.009,9.454,5.679,9.454
-	c1.648,0,3.76-6.512,3.76-6.512l2.826-0.704c1.257,2.982,3.604,9.725,6.423,8.148c1.62-0.896,4.309-0.082,7.377,1.104
-	c3.08,1.174,5.18-0.63,7.687,1.567C212.907,126.013,207.195,122.089,205.536,121.613z M211.836,105.341
-	c-4.152-1.575-9.368-0.937-9.368-0.937c-1.792,1.661-8.741-0.208-5.629-3.898c3.112-3.682,5.956-5.465,7.416-2.455
-	c0.377,1.231,5.037,3.15,5.013,0.544c-0.041-2.614,4.666-3.997,5.358-2.054c-2.513,1.804,0.144,3.301,2.017,4.316
-	C221.907,103.724,224.451,107.763,211.836,105.341z M238.165,113.289c-2.288-1.846,1.034-3.429-2.345-6.321
-	c-4.854-4.148-8.615-5.936-2.014-9.29c8.125-1.023,1.311,2.589,2.656,4.762c0.725,1.158,4.846,5.027,8.049,9.773
-	C247.173,116.156,240.443,115.125,238.165,113.289z M122.188,74.809c2.603-0.233,9.394-6.128,12.939-4.938
-	c3.555,1.174,6.472-1.207,9.781-3.326c1.178-0.241,2.831,0.462,5.683-0.957c2.839-1.415,8.509-4.484,9.924-4.484
-	s6.138-0.176,7.311-2.062c0,0,3.525,0.471,5.646,0.711c2.93,0.319,14.731,2.827,17.801,1.645c1.688-0.65,8.781-1.224,14.84-1.608
-	c-0.277-0.061-0.562-0.135-0.846-0.196c-0.813-0.172-1.646-0.315-2.475-0.47c-1.277-0.241-2.562-0.487-3.855-0.688
-	c-0.562-0.086-1.125-0.151-1.691-0.233c-1.566-0.221-3.135-0.438-4.713-0.597c-0.055-0.004-0.1-0.004-0.151-0.013
-	c-4.065-0.409-8.198-0.622-12.367-0.622c-0.846,0-1.677,0.045-2.515,0.065c-1.555,0.032-3.11,0.074-4.651,0.164
-	c-1.203,0.069-2.396,0.167-3.588,0.274c-1.346,0.115-2.679,0.257-4.012,0.421c-1.146,0.139-2.295,0.266-3.434,0.434
-	c-2.185,0.327-4.348,0.7-6.491,1.141c-1.047,0.212-2.074,0.479-3.109,0.716c-1.358,0.315-2.708,0.642-4.045,1.002
-	c-1.102,0.294-2.189,0.602-3.277,0.928c-1.357,0.409-2.704,0.847-4.041,1.301c-0.944,0.319-1.905,0.617-2.844,0.961
-	c-2.045,0.749-4.066,1.559-6.059,2.414c-0.971,0.417-1.924,0.863-2.885,1.301c-1.243,0.573-2.475,1.158-3.693,1.772
-	c-0.966,0.482-1.932,0.965-2.88,1.473c-1.411,0.752-2.798,1.546-4.173,2.352c-0.586,0.339-1.179,0.662-1.756,1.01
-	C117.086,75.674,118.755,75.898,122.188,74.809z"/>
-<rect y="-0.72" fill="none" width="360" height="360"/>
-<text transform="matrix(1 0 0 1 98.5283 242.8828)" fill="#FFFFFF" font-family="'TrebuchetMS'" font-size="63.3535" letter-spacing="6">BETA</text>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="360px"
+	 height="360px" viewBox="0 0 360 360" enable-background="new 0 0 360 360" xml:space="preserve">
+<g id="outline">
+	<circle fill="none" stroke="#99CCFF" stroke-width="18" stroke-miterlimit="10" cx="179.998" cy="181.07" r="121.977"/>
+	<circle fill="none" stroke="#0066CC" stroke-width="8" stroke-miterlimit="10" cx="179.998" cy="181.07" r="121.977"/>
+</g>
+<g id="back">
+	<radialGradient id="SVGID_1_" cx="234.8599" cy="242.4453" r="150.0417" gradientUnits="userSpaceOnUse">
+		<stop  offset="0" style="stop-color:#33CCFF"/>
+		<stop  offset="1" style="stop-color:#0033CC"/>
+	</radialGradient>
+	<circle fill="url(#SVGID_1_)" cx="179.998" cy="181.07" r="121.977"/>
+</g>
+<g id="earth_-_fronrt">
+	<path fill="#CCFFFF" d="M128.642,291.741c0.809-0.269,16.876-11.755,17.821-11.35c0.944,0.404,11.867,6.741,11.867,6.741
+		l13.351,1.079l8.898-0.675c0,0,6.475-1.618,6.88-2.157c0.404-0.538,4.988-3.234,5.663-2.966s3.507,2.428,5.53,2.562
+		c2.022,0.135,5.394,0.81,7.416,0.81c2.023,0,3.64,0.27,4.585-0.405c0.944-0.675,2.832-2.562,3.507-2.697
+		c0.675-0.134,2.832-0.539,2.832-0.539s6.877,4.855,7.282,4.855c0.404,0,11.132,2.767,11.132,2.767
+		c-16.627,8.491-35.458,13.281-55.409,13.281C161.651,303.047,144.251,298.996,128.642,291.741z"/>
+	<path fill="#CCFFFF" d="M170.872,71.973h-9.709c0,0,0.541,1.82,1.08,2.225c0.539,0.405,1.887,2.967,2.966,2.967
+		c1.079,0,2.293-0.81,2.293-0.81l1.82-1.079L170.872,71.973z"/>
+	<path fill="#CCFFFF" d="M277.273,219.572c0,0-9.979,9.44-10.653,10.789c-0.675,1.348-5.531,6.608-5.396,7.687
+		c0.136,1.077-1.22,5.664-0.003,5.798c1.217,0.135,6.612,0,6.612,0s5.933-7.418,6.337-7.957s3.911-7.416,3.911-7.416l0.539-7.148
+		L277.273,219.572z"/>
+	<path fill="#CCFFFF" d="M81.45,109.176C93.768,92.32,110.306,78.743,129.51,70c-0.405,0.304-10.961,12.694-11.096,13.099
+		c-0.135,0.405-6.339,10.518-6.744,10.788c-0.404,0.271-6.743,0.134-7.282,0c-0.539-0.134-6.067,4.45-7.012,5.395
+		s-9.44,7.013-9.44,7.013L81.45,109.176z"/>
+	<path fill="#CCFFFF" d="M148.515,63.195c10.043-2.675,20.597-4.101,31.483-4.101c10.641,0,20.964,1.363,30.805,3.923
+		c0,0-21.187,3.09-22.534,2.416s-14.429-0.747-14.429-0.747l-5.664,3.579l-7.147,1.888c0,0-5.259,2.697-5.799,2.832
+		c-0.54,0.135-8.766,0.944-8.766,0.944l-2.564,0.944c0,0-3.37,0.539-3.235,1.483s-0.674,3.776-0.674,3.776l-7.957-0.674v-2.292
+		c0,0,8.9-6.609,10.519-7.957C144.17,67.86,148.515,63.195,148.515,63.195z"/>
+	<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="221.1353" y1="73.2783" x2="221.1352" y2="260.7821">
+		<stop  offset="0" style="stop-color:#CCFFFF"/>
+		<stop  offset="0.3041" style="stop-color:#CAFDFF"/>
+		<stop  offset="0.4137" style="stop-color:#C3F6FD"/>
+		<stop  offset="0.4918" style="stop-color:#B8EBFA"/>
+		<stop  offset="0.5549" style="stop-color:#A7DAF6"/>
+		<stop  offset="0.6089" style="stop-color:#91C4F0"/>
+		<stop  offset="0.6568" style="stop-color:#75A8EA"/>
+		<stop  offset="0.6991" style="stop-color:#5689E2"/>
+		<stop  offset="0.7117" style="stop-color:#4B7EDF"/>
+	</linearGradient>
+	<path fill="url(#SVGID_2_)" d="M240.785,75.295c28.329,16.318,49.489,43.69,57.585,76.224l-4.239-0.454l-1.755-3.641
+		c0,0-4.045-5.664-4.719-6.338c-0.673-0.674-2.563-0.405-3.507-0.675c-0.943-0.271-10.652-7.417-11.058-7.417
+		c-0.404,0,5.26,7.956,5.26,7.956l8.765,2.832l0.54,9.305l-3.341,5.529l-6.505,7.417l-4.719,0.54l-0.944-3.641l-17.531-27.105
+		l-1.752,0.539l19.688,31.152l0.136,2.562l3.775,0.54l0.943-1.349c0,0,5.935-0.404,6.609-0.404s0,5.799,0,5.799l-2.023,6.203
+		c0,0-6.204,10.25-6.608,10.789s-10.639,10.114-10.639,10.114s-0.15,3.236-0.01,3.641s-1.22,4.989-1.49,5.394
+		c-0.271,0.405,1.618,4.855,1.483,5.664c-0.134,0.81,0,10.25,0,10.25l-15.508,9.306l-0.809,8.63l-8.632,6.202l-11.867,11.464
+		c0,0-5.663,0.405-8.361,0.539c-2.697,0.135-4.18-1.214-4.989-2.022c-0.809-0.81-4.315-4.989-5.664-6.068
+		c-1.348-1.08,0-15.239,0-15.239l-4.584-6.474c0,0,1.078-7.551,1.078-7.955s3.506-5.26,3.506-5.26v-6.608l-1.752-7.417l-5.529-8.091
+		c0,0,0.404-3.507,0.404-4.316c0-0.809,1.079-6.607,1.079-6.607s-5.529-2.831-6.743-3.236c-1.214-0.404-6.068-4.315-6.068-4.315
+		s-16.048,2.697-18.61,1.889c-2.562-0.81-11.328,0-12.271,0c-0.944,0-15.509-17.937-15.509-17.937l0.944-18.476
+		c0,0,4.315-9.035,4.45-9.709s13.485-10.114,16.183-12.542c2.698-2.428,7.687-9.439,7.687-9.439s-5.258-0.405-5.258-0.944
+		s0.27-6.068,0.27-6.068l1.888-5.124h13.621l-0.136-1.619l-4.315-4.45l0.765-1.618l0.582-1.618v-1.349l-2.427-1.753
+		c0,0-0.541-6.743,0-6.743c0.542,0,2.427-1.214,2.427-1.214l5.127,2.562c0,0,1.348,2.427,1.348,3.237c0,0.809-1.214,3.371,0,3.371
+		s5.125-0.134,5.53-0.27c0.404-0.135,2.695-1.349,2.695-1.349l2.428-1.618l-4.45-5.259l-0.539-3.102l3.371-2.427l8.228-2.697h15.237
+		c0,0,8.361,3.235,8.766,3.371c0.405,0.135,2.967-0.674,2.967-0.674L240.785,75.295z M213.215,113.979v-4.045l-8.9-8.091h-8.632
+		l-12.405,9.709l-5.125,2.427c0,0,1.532,2.428,1.845,2.428s18.653-2.967,18.653-2.967l3.775-0.54l4.046,1.619l1.348,4.854
+		l16.453,7.552l5.394-4.584l6.204,4.584l10.249-1.348l3.775,1.348l1.889-3.237l-1.08-2.966l-8.63-2.427l-7.553-3.911l-4.854-4.72
+		l-1.078,8.361l-7.552-7.012l-0.271-3.776l-8.9-5.395c0,0,0.271,1.618,0.54,2.427s2.562,3.236,2.562,3.236l1.483,1.08l1.349,2.157
+		l-2.832-0.27v3.911L213.215,113.979z M212.003,76.355c0,0-2.159,2.562-2.159,2.967c0,0.404,1.079,4.585,1.079,4.585v2.562
+		c0,0,4.181,0.944,4.585,0.54s0-4.72,0-4.72l-0.54-3.776L212.003,76.355z M244.233,100.899l-3.642,1.888
+		c0,0-3.911,0.269-4.046,0.809c-0.134,0.54-2.291,2.292-2.291,2.292s0.133,1.214,0.673,1.349c0.541,0.135,2.563,1.483,3.507,1.618
+		c0.943,0.135,8.36-0.405,9.844,0c1.484,0.404,4.721,0.022,4.721,0.022l-4.584-3.907L244.233,100.899z M260.281,101.843
+		l-1.618,2.562v2.562l5.26,6.742l1.079,3.372l1.887,1.618h4.046v-2.293c0,0-4.314-3.237-4.314-3.642
+		c0-0.404-4.991-6.068-4.991-6.068L260.281,101.843z"/>
+	<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="80.5977" y1="73.2783" x2="80.5976" y2="260.7821">
+		<stop  offset="0" style="stop-color:#CCFFFF"/>
+		<stop  offset="0.3041" style="stop-color:#CAFDFF"/>
+		<stop  offset="0.4137" style="stop-color:#C3F6FD"/>
+		<stop  offset="0.4918" style="stop-color:#B8EBFA"/>
+		<stop  offset="0.5549" style="stop-color:#A7DAF6"/>
+		<stop  offset="0.6089" style="stop-color:#91C4F0"/>
+		<stop  offset="0.6568" style="stop-color:#75A8EA"/>
+		<stop  offset="0.6991" style="stop-color:#5689E2"/>
+		<stop  offset="0.7117" style="stop-color:#4B7EDF"/>
+	</linearGradient>
+	<path fill="url(#SVGID_3_)" d="M86.838,259.812c-17.941-21.237-28.817-48.764-28.817-78.742
+		c-0.001-10.235,1.26-20.176,3.635-29.676l7.266,5.739l4.854,12.002l6.608,11.058c0,0,8.227,8.496,9.305,8.765
+		c1.079,0.271,9.575,7.014,10.519,7.014s2.967,1.214,2.967,1.214v8.765l-5.395,7.147v18.881h-7.956l-1.888,3.236
+		c0,0,0.675,2.966,1.753,3.775c1.079,0.81,2.158,4.046,2.158,4.046l-0.809,4.45l-2.293,3.507L86.838,259.812z"/>
+</g>
+<g id="browserIcon_x5F_alpha.svg">
+	<g>
+		<path fill="#054E9E" stroke="#054E9E" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" d="M111.253,247.28
+			l-2.984-9.814H92.083l-3.042,9.814h-5.769l14.119-42.786h6.859l13.459,42.786H111.253z M106.977,233.247l-6.772-22.239
+			l-6.83,22.239H106.977z"/>
+		<path fill="#054E9E" stroke="#054E9E" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" d="M128.724,247.28
+			v-42.786h6.285v38.481h16.701v4.305H128.724z"/>
+		<path fill="#054E9E" stroke="#054E9E" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" d="M163.269,204.494
+			h13.286c4.477,0,7.84,1.103,10.087,3.312c2.247,2.211,3.372,5.516,3.372,9.915c0,4.363-1.363,7.802-4.09,10.317
+			c-2.726,2.517-6.366,3.772-10.919,3.772h-5.452v15.469h-6.284V204.494z M169.553,208.597v19.054h5.051
+			c2.927,0,5.146-0.836,6.658-2.51c1.511-1.675,2.267-4.09,2.267-7.245c0-2.985-0.632-5.281-1.894-6.888
+			c-1.264-1.608-3.387-2.411-6.371-2.411H169.553z"/>
+		<path fill="#054E9E" stroke="#054E9E" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" d="M231.502,204.494
+			v42.786h-6.284v-21.149h-15.696v21.149h-6.285v-42.786h6.285v17.447h15.696v-17.447H231.502z"/>
+		<path fill="#054E9E" stroke="#054E9E" stroke-width="12" stroke-linejoin="round" stroke-miterlimit="10" d="M270.411,247.28
+			l-2.985-9.814h-16.184l-3.043,9.814h-5.768l14.118-42.786h6.859l13.458,42.786H270.411z M266.134,233.247l-6.771-22.239
+			l-6.83,22.239H266.134z"/>
+	</g>
+	<g>
+		<path fill="#FFFFFF" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M111.253,247.28l-2.984-9.814H92.083
+			l-3.042,9.814h-5.769l14.119-42.786h6.859l13.459,42.786H111.253z M106.977,233.247l-6.772-22.239l-6.83,22.239H106.977z"/>
+		<path fill="#FFFFFF" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M128.724,247.28v-42.786h6.285v38.481h16.701
+			v4.305H128.724z"/>
+		<path fill="#FFFFFF" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M163.269,204.494h13.286
+			c4.477,0,7.84,1.103,10.087,3.312c2.247,2.211,3.372,5.516,3.372,9.915c0,4.363-1.363,7.802-4.09,10.317
+			c-2.726,2.517-6.366,3.772-10.919,3.772h-5.452v15.469h-6.284V204.494z M169.553,208.597v19.054h5.051
+			c2.927,0,5.146-0.836,6.658-2.51c1.511-1.675,2.267-4.09,2.267-7.245c0-2.985-0.632-5.281-1.894-6.888
+			c-1.264-1.608-3.387-2.411-6.371-2.411H169.553z"/>
+		<path fill="#FFFFFF" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M231.502,204.494v42.786h-6.284v-21.149
+			h-15.696v21.149h-6.285v-42.786h6.285v17.447h15.696v-17.447H231.502z"/>
+		<path fill="#FFFFFF" stroke="#FFFFFF" stroke-width="3" stroke-miterlimit="10" d="M270.411,247.28l-2.985-9.814h-16.184
+			l-3.043,9.814h-5.768l14.118-42.786h6.859l13.458,42.786H270.411z M266.134,233.247l-6.771-22.239l-6.83,22.239H266.134z"/>
+	</g>
+</g>
 </svg>
--- a/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/BookmarkView.html	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/BookmarkView.html	Tue Jul 06 14:03:49 2010 +0300
@@ -6,7 +6,6 @@
     <script src="../../js/3rdparty/jquery-ui/ui.sortable.js" type="text/javascript"></script>
   <script src="../../js/LongPress.js" type="text/javascript"></script>
   <script src="../../js/Bind.js" type="text/javascript"></script>
-  <script src="../../js/ActionButton.js" type="text/javascript"></script>
   <script src="bookmarkview.js" type="text/javascript"></script>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="stylesheet" id="CSSLink" type="text/css" href="bookmarkview.css"/>
@@ -14,26 +13,43 @@
     <title>Bookmark View</title>
 
   <script type="text/javascript">
+  		function scrollToTop()
+  		{
+				  if(__prevOpenedBookmarkControl)
+				  	_bookmarkHideControl(__prevOpenedBookmarkControl);
+  			
+		    	$('html, body').attr({scrollTop: 0});
+					
+					_updateBookmarkViewGoemetry(0);
+  		}
+  		
       function updateBookmakrView()
       {
+    		window.views.WebView.BookmarkTreeView.shown.connect(scrollToTop);
+        
         launchBookmarkView();
 
 
-        // set the Width & Height
-        $("#bookmarkListId").css({"width": window.innerWidth+"px", "height": window.innerHeight+"px"});
+      //set the Width & Height
+          if (!window.views.WebView.bedrockTiledBackingStoreEnabled()) 
+              $("#bookmarkListId").css({"width": window.innerWidth+"px", "height": window.innerHeight+"px"});
+      
       }
 
-        var __sortingEnabled = false;
-        var __sortEleOffsetTop = 0;
-        window.onresize = function(){
+    var __sortingEnabled = false;
+    var __sortEleOffsetTop = 0;
+    window.onresize = function(){
+
+
+        if (!window.views.WebView.bedrockTiledBackingStoreEnabled())
             $("#bookmarkListId").css({"width": window.innerWidth+"px", "height": window.innerHeight+"px"});
 
-            if (__sortingEnabled)
-            {
-                    $('html, body').animate({
-                                        scrollTop: parseInt(__sortEleOffsetTop)}, 1000);
-            }
+        if (__sortingEnabled)
+        {
+            $('html, body').animate({
+                                scrollTop: parseInt(__sortEleOffsetTop)}, 1000);
         }
+    }
 
   </script>
 
@@ -42,6 +58,7 @@
 <body onload=updateBookmakrView()>
 <div id="bookmarkListId" class="bookmarkList">
         <ul id="bookmarkListTree"></ul>
+        <div id="BottomPad"></div>
     </div>
 
 <div class="hiddenLoadImages"></div>
--- a/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkDialog.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkDialog.js	Tue Jul 06 14:03:49 2010 +0300
@@ -28,11 +28,16 @@
 
 function bookmarkDialogIdHide(){
     window.snippets.BookmarkDialogId.hide();
+    snippets.BookmarkViewToolbarId.enabled = true;
+    snippets.WebViewToolbarId.enabled = true;
 }
 
 function launchBookmarkDialog(bmtitle, bmurl, dialogFlag)
 {
     try{
+        snippets.BookmarkViewToolbarId.enabled = false;
+        snippets.WebViewToolbarId.enabled = false;
+
         if (dialogFlag == 0) {
                 var dlgTitle = document.getElementById("bookmarkDialogTitle");
                   dlgTitle.firstChild.nodeValue= window.localeDelegate.translateText("txt_browser_input_dial_add_bm");                 
@@ -48,8 +53,11 @@
         window.snippets.BookmarkDialogUrlId.lostFocus.connect(urlFieldLostFocus);
         window.snippets.BookmarkDialogTitleId.gainedFocus.connect(titleFieldGainedFocus);
         window.snippets.BookmarkDialogUrlId.gainedFocus.connect(urlFieldGainedFocus);
-        
- 
+        // set max text length
+        // window.snippets.BookmarkDialogTitleId.setMaxTextLength(30);
+        var hints = window.snippets.BookmarkDialogUrlId.getTextOptions();
+        hints |= 2; // Qt::ImhNoAutoUppercase 0x2
+        window.snippets.BookmarkDialogUrlId.setTextOptions(hints);
         if (bmtitle == "")
             window.snippets.BookmarkDialogTitleId.text = "Title";
         else
@@ -61,7 +69,9 @@
            window.snippets.BookmarkDialogUrlId.text = bmurl; 
 
         window.snippets.BookmarkDialogId.show(false);
-  
+
+        window.snippets.BookmarkDialogTitleId.selectAll();
+        
        }catch(e){ alert(e); }
 
 }
@@ -69,6 +79,8 @@
 
 function bookmarkOperation()
 {
+    snippets.BookmarkViewToolbarId.enabled = true;
+    snippets.WebViewToolbarId.enabled = true;
     //get title and url from the dialog
     var bmtitle = window.snippets.BookmarkDialogTitleId.text;
     var bmurl = window.snippets.BookmarkDialogUrlId.text;
@@ -78,22 +90,21 @@
     var errCode;
 
     if (_dailogFlag == 0)
-  errCode = window.bookmarksManager.addBookmark(bmtitle,bmurl);
+       errCode = window.bookmarksManager.addBookmark(bmtitle,bmurl);
     else if (_dailogFlag == 1)
-  errCode = window.bookmarksManager.modifyBookmark(_OriginalTitle,bmtitle,bmurl);
+       errCode = window.bookmarksManager.modifyBookmark(_OriginalTitle,bmtitle,bmurl);
     
-    if (errCode == -2) {
-	alert("Bookmark Already Present");
-	return;
-    }
-    else if (errCode == -3){
-	alert("Bookmark Url Is Empty");
-	return;
+    
+    if (errCode == -3){
+	     alert("Bookmark Url Is Empty");
+	     return;
     }
     else if (errCode != -0){
-	alert("General Error");
-	return;
+	       alert("General Error");
+	       return;
     }
+     
+	
 }
 
 function titleFieldLostFocus()
@@ -114,13 +125,11 @@
 function titleFieldGainedFocus()
 {
     window.snippets.BookmarkDialogUrlId.unselect();
-    window.snippets.BookmarkDialogTitleId.selectAll();
 }
 
 function urlFieldGainedFocus()
 {
     window.snippets.BookmarkDialogTitleId.unselect();
-    window.snippets.BookmarkDialogUrlId.selectAll();
 }
 
 
--- a/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.css	Tue Jul 06 14:03:49 2010 +0300
@@ -2,6 +2,7 @@
     padding : 0px;
     margin : 0px;
     height:100%;
+    background-color: #889cbf;
 }
 /*
 .bookmarkList li.ui-state-highlight {
@@ -11,6 +12,11 @@
     }
 */
 
+#BottomPad {
+ padding: 8px 10px 8px 10px;
+ height: 54px;
+}
+
 .bookmarkList li.highlight{
     background-image: url(icons/list_itembg_pressed.png);
     font-weight: bold;
--- a/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.js	Tue Jul 06 14:03:49 2010 +0300
@@ -148,7 +148,24 @@
 
 function _addNewBookmark(bmtitle,bmurl)
 {
-    if (__previousSortEle    != null)
+	  if(__prevOpenedBookmarkControl)
+  		_bookmarkHideControl(__prevOpenedBookmarkControl);
+
+    var ul=document.getElementById('bookmarkListTree');
+    for (x=0; x< ul.childNodes.length; x++)
+        {
+        	 var li_element= ul.childNodes[x];
+        	 var bm_title= li_element.childNodes[1].childNodes[0].innerText; 
+        	 
+        	 if(bmtitle.toLowerCase() ==  bm_title.toLowerCase())
+        	 {
+        	 	ul.removeChild(li_element);
+        	 	break;
+        	 }
+        	 
+        }
+    
+    if(__previousSortEle    != null)
         _disableSorting(__previousSortEle)
 
     __bookmarkCount += 1;
@@ -168,6 +185,23 @@
 
 function _editBookmark(bmtitle,bmurl)
 {
+  if(__prevOpenedBookmarkControl)
+  	_bookmarkHideControl(__prevOpenedBookmarkControl);
+
+	var ul=document.getElementById('bookmarkListTree');
+	for (x=0; x< ul.childNodes.length; x++)
+        {
+        	 var li_element= ul.childNodes[x];
+        	 var bm_title= li_element.childNodes[1].childNodes[0].innerText; 
+        	 
+        	 if(bmtitle.toLowerCase() == bm_title.toLowerCase() &&
+        	   __bookmarkEditElement.childNodes[1].childNodes[0].innerText.toLowerCase() != bmtitle.toLowerCase())
+        	 {
+        	 	ul.removeChild(li_element);
+        	 	break;
+        	 }
+        	 
+         }
     __bookmarkEditElement.childNodes[1].childNodes[0].innerText  = bmtitle;
     __bookmarkEditElement.childNodes[1].childNodes[2].innerText  = bmurl;
 }
--- a/ginebra2/chrome/bedrockchrome/chrome.html	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/chrome.html	Tue Jul 06 14:03:49 2010 +0300
@@ -7,13 +7,15 @@
  <link rel="stylesheet" id="CSSLink" type="text/css" href="historyview.superpage/clearhistorydialog.css"/>
  <link rel="stylesheet" id="CSSLink" type="text/css" href="windowcount.snippet/windowcount.css"/>
  <link rel="stylesheet" id="CSSLink" type="text/css" href="networkstatus.snippet/networkstatus.css">
+ <link rel="stylesheet" id="CSSLink" type="text/css" href="outofmemory.snippet/outofmemorydialog.css"/>
+ <link rel="stylesheet" id="CSSLink" type="text/css" href="prompt.snippet/prompt.css">
 
 <head>
   <script src="../js/Bind.js" type="text/javascript"></script>
-  <script src="../js/ActionButton.js" type="text/javascript"></script>
   <script src="../js/SimpleButton.js" type="text/javascript"></script>
   <script src="statusbar.snippet/statusbar.js" type="text/javascript"></script>
   <script src="networkstatus.snippet/networkstatus.js" type="text/javascript"></script>
+  <script src="prompt.snippet/prompt.js" type="text/javascript"></script>
   <script src="zoombar.snippet/zoombar.js" type="text/javascript"></script>
   <script src="download.snippet/download.js" type="text/javascript"></script>
   <script src="windowcount.snippet/windowcount.js" type="text/javascript"></script>
@@ -22,6 +24,7 @@
   <script src="chrome.js" type="text/javascript"></script>
   <script src="contextmenu.snippet/ContextMenu.js" type="text/javascript"></script>
   <script src="contextmenu.snippet/ViewContextMenu.js" type="text/javascript"></script>
+  <script src="outofmemory.snippet/outofmemorydialog.js" type="text/javascript"></script>
   <script type="text/javascript">
      window.chrome.chromeComplete.connect(onChromeComplete);
   </script>
@@ -36,7 +39,7 @@
     </script>
   </div>
 
-  <div class = "GinebraSnippet" id="StatusBarChromeId" name="statusbar" data-GinebraAnchor="AnchorTop" data-GinebraVisible="false">
+  <div class = "GinebraSnippet" id="StatusBarChromeId" name="statusbar" data-GinebraAnchor="AnchorTop" data-GinebraVisible="true">
     <link rel="stylesheet" id="CSSLink" type="text/css" href="statusbar.snippet/statusbar.css"/>
     <script type="text/javascript">
       var statusbar = new StatusBar();
@@ -61,6 +64,14 @@
       var networkstatus = new NetworkStatusDialog();
     </script>
   </div>
+  
+  <div class = "GinebraSnippet" id="PromptChromeId" name="prompt" 
+    data-GinebraItemType="popup" data-GinebraHidesContent="true" data-GinebraVisible="false" data-GinebraAnchor="AnchorCenter"
+    style="width: 310px; height: 200px">
+    <script type="text/javascript">
+      var prompts = new promptDialog();
+    </script>
+  </div>
 
     <!--  Most Visited Pages-->
     <div class = "GinebraSnippet" id="MostVisitedViewId" data-GinebraVisible="false" data-GinebraHidesContent="true" data-GinebraNativeClass="MostVisitedPagesWidget"  data-GinebraItemLinkedTo="MostVisitedButtonSnippet" style="width:1%; height:1px; color:red; opacity:0.5">
@@ -204,5 +215,12 @@
     </script>
   </div>
 
+
+  <div class="GinebraSnippet" id="OutOfMemoryDialogId" data-GinebraItemType="popup" data-GinebraHidesContent="true" data-GinebraVisible="false" data-GinebraAnchor="AnchorCenter">
+    <script type="text/javascript">
+      addDialog = new outOfMemoryDialog();
+    </script>    
+  </div>
+
 </body>
 </html>
--- a/ginebra2/chrome/bedrockchrome/chrome.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/chrome.js	Tue Jul 06 14:03:49 2010 +0300
@@ -1,4 +1,4 @@
-
+var preLoadBookmarksDone=0;
 function calcToolbarPopAnchorOffset(anchoredSnippet,
                                     anchorToSnippet,
                                     xCenterOffset,
@@ -26,44 +26,42 @@
 
 // Display the super-page with the given name and path.
 function showSuperPage(pageName, path) {
+
     if (window.views.WebView[pageName] == undefined) {
         window.views.WebView.createSuperPage(pageName, true);
+    		window.views.WebView[pageName].load(chrome.baseDirectory + path);
     }
-    window.views.WebView[pageName].load(chrome.baseDirectory + path);
-
-    // Show it.
-    window.views.WebView.zoomFactor = 1.0;
-    window.views.WebView.showSuperPage(pageName);
+	
+    if (!window.views.WebView.bedrockTiledBackingStoreEnabled())
+        window.views.WebView.zoomFactor = 1.0;
+    //window.views.WebView.showSuperPage(pageName);
     window.ViewStack.switchView(pageName, "WebView");
+    if (!window.views.WebView.bedrockTiledBackingStoreEnabled())
+        window.views.WebView.touchNav.doubleClickEnabled = false;
 }
 
 function chrome_showBookmarksView() {
-    app.debug("chrome_showBookmarksView");
     showSuperPage("BookmarkTreeView", "bookmarkview.superpage/BookmarkView.html");
 }
 
 function chrome_showHistoryView() {
-    app.debug("chrome_showHistoryView");
     showSuperPage("BookmarkHistoryView", "historyview.superpage/historyView.html");
-//    showHistoryView();
 }
 
 function chrome_showWindowsView() {
-    app.debug("chrome_showWindowsView");
     window.snippets.ZoomBarId.hide(); // hide Zoom Bar while showing windows view
     window.snippets.MostVisitedViewId.hide();
     window.ViewStack.switchView("WindowView", "WebView");
 }
 
 function chrome_showSettingsView() {
-    app.debug("chrome_showSettingsView");
     showSuperPage("SettingsView", "settingsview.superpage/SettingsView.html");
 }
 
 function chrome_showBasicMenu() {
-    if (!snippets.ContextMenuId.dontShow) {
-        cm_TheContextMenu.show(viewMenu_getWebViewContextMenuData());
-    }
+
+    cm_TheContextMenu.show(viewMenu_getWebViewContextMenuData());
+
 }
 
 function chrome_addBookmark() {
@@ -95,29 +93,68 @@
 function onActivateBookmarkView() {
     window.bookmarksManager.launchBookmarkEditDailog.connect(showBookmarkEditDialog);
 }
+function preLoad()
+{   
+    preloadSuperPage("BookmarkTreeView", "bookmarkview.superpage/BookmarkView.html");
+    preloadSuperPage("SettingsView", "settingsview.superpage/SettingsView.html"); 
+    preLoadBookmarksDone=1;
+}
+function _updateHistory()
+{
+	preloadSuperPage("BookmarkHistoryView", "historyview.superpage/historyView.html");
+
+}
+
+function _updateBookmarks()
+{
+    preloadSuperPage("BookmarkTreeView", "bookmarkview.superpage/BookmarkView.html");
+}
+
+// chrome_popupShownCount keeps a count of how many popups are currently being shown so that
+// we can re-enable the appropriate UI elements only when the last one is hidden.
+var chrome_popupShownCount = 0;
 
 // Called when a PopupChromeItem is displayed.
 function onPopupShown(id) {
-    // Disable snippets etc. that should be greyed-out while the popup is shown. 
-    snippets.UrlSearchChromeId.enabled = false;
-    views.WebView.enabled = false;
-    views.WebView.freeze();
+    if(chrome_popupShownCount == 0) {
+        // Disable snippets etc. that should be greyed-out while the popup is shown. 
+        snippets.UrlSearchChromeId.enabled = false;
+        views.WebView.enabled = false;
+        views.WebView.freeze();
+        
+        // Note: this can be expanded as needed.  We may want to disable all snippets except
+        // for the status bar and the one who's id was passed in.
+    }
+    chrome_popupShownCount++;
     
-    // Note: this can be expanded as needed.  We may want to disable all snippets except
-    // for the urlSearchBar and the one who's id was passed in.
+    if(preLoadBookmarksDone==0)
+    {
+    	preLoad();
+    }
 }
 
 // Called when a PopupChromeItem is hidden.
 function onPopupHidden(id) {
-    // Re-enable snippets etc. that were greyed-out while the popup is shown.
-    snippets.UrlSearchChromeId.enabled = true;
-    views.WebView.enabled = true;
-    views.WebView.unfreeze();
+    chrome_popupShownCount--;
+    if(chrome_popupShownCount == 0) {
+        // Re-enable snippets etc. that were greyed-out while popups were being shown.
+        snippets.UrlSearchChromeId.enabled = true;
+        views.WebView.enabled = true;
+        views.WebView.unfreeze();
+    }
+    if(chrome_popupShownCount < 0) app.debug("onPopupHidden: error, chrome_popupShownCount invalid");
+}
+
+function preloadSuperPage(pageName, path) {
+    if (window.views.WebView[pageName] == undefined) {
+        window.views.WebView.createSuperPage(pageName, true);
+    }
+    window.views.WebView[pageName].load(chrome.baseDirectory + path);
 }
 
 function onChromeComplete(){
-    if (app.ui() != "orbit_ui") {
-        snippets.StatusBarChromeId.show();
+    if (app.ui() == "orbit_ui") {
+        snippets.StatusBarChromeId.hide();
     }
 
     window.snippets.WebViewToolbarId.menuButtonSelected.connect(chrome_showBasicMenu);
@@ -139,6 +176,9 @@
 
     chrome.popupShown.connect(onPopupShown);
     chrome.popupHidden.connect(onPopupHidden);
+    window.pageController.loadFinished.connect(_updateHistory);
+    window.bookmarksManager.bookmarksCleared.connect(_updateBookmarks);
+    window.bookmarksManager.historyCleared.connect(_updateHistory);
 }
 
 // For debugging: prints all properties and functions attached to a given object.
--- a/ginebra2/chrome/bedrockchrome/contextmenu.snippet/ViewContextMenu.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/contextmenu.snippet/ViewContextMenu.js	Tue Jul 06 14:03:49 2010 +0300
@@ -90,6 +90,10 @@
                  "text": window.localeDelegate.translateText("txt_browser_content_view_menu_nav_settings"),
                  "onclick": chrome_showSettingsView,
                },
+               {
+                 "text": window.localeDelegate.translateText("txt_browser_content_view_menu_nav_exit"),
+                 "onclick": window.app.quit,
+               },               
              ],
     };
 }
--- a/ginebra2/chrome/bedrockchrome/contextmenu.snippet/contextmenu.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/contextmenu.snippet/contextmenu.css	Tue Jul 06 14:03:49 2010 +0300
@@ -168,12 +168,6 @@
   display: table-cell;
 }
 
-/* Any Menu items when clicked. */
-.ContextMenu .MenuDiv ul li.RegularMenuLi:active, .ContextMenu .MenuDiv ul li ul li.MenuRowLi:active
-{
-  background: #ddd;
-}
-
 /* Last top-level menu item. */
 .ContextMenu .MenuDiv ul li.MenuLi:last-child
 {
@@ -182,6 +176,12 @@
   border-bottom: 3px solid #374358;
 }
 
+/* Menu item during mouse over. */
+.ContextMenu .MenuDiv ul li.MouseOverItem
+{
+  background: #d8dfed;
+}
+
 /* Item icons. */
 .ContextMenu ul li img
 {
--- a/ginebra2/chrome/bedrockchrome/contextmenu.snippet/contextmenu.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/contextmenu.snippet/contextmenu.js	Tue Jul 06 14:03:49 2010 +0300
@@ -1,5 +1,18 @@
 var cm_TheContextMenu;
-    
+
+// Return true if the given element's className includes the given class.
+function hasClass(ele,cls) {
+    return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
+}
+
+// Remove a class from an element's className.
+function removeClass(ele,cls) {
+    if (hasClass(ele,cls)) {
+        var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
+        ele.className=ele.className.replace(reg,' ');
+    }
+}
+
 function ContextMenu(snippetId, contentView) {
     this.snippetId = snippetId;
     this.mainDiv = undefined;
@@ -9,6 +22,8 @@
     // Width of a tab with no text, just the icon.  Icons must all be the same width.
     // Update this if icon size or tab border width etc. changes -- or better yet, determine it dynamically.
     this.normalTabWidth = 64;
+    // Height of the menu is the max possible height to be used when positioning the snippet
+    this.menuHeight = 272;
 
     // ContextMenu is a singleton to avoid problems with scope-chaining in some of the
     // callbacks that it uses.  See handleTabActivate.
@@ -196,6 +211,14 @@
                     }.bind(this))(menuItem.onclick);
                 }
 
+                itemLi.onmouseover = function() {
+                    this.className += " MouseOverItem";
+                }.bind(itemLi)
+
+                itemLi.onmouseout = function() {
+                    removeClass(this, "MouseOverItem");
+                }.bind(itemLi)
+
                 // Create the item's icon.
                 if (menuItem.icon != undefined) {
                     var iconEl = document.createElement("img");
@@ -379,12 +402,6 @@
         this.showTimeoutId = 0;
         this.cleanUp();
     }
-    
-    this.show = function(menuData) {
-        this.cleanUp();
-        this.create(menuData);
-        this.showTimeoutId = setTimeout('cm_TheContextMenu.showIt()', 10);
-    }
 
     this.cleanUp = function() {
         // Remove elements from DOM to save memory.
@@ -404,7 +421,10 @@
         this.cleanUp();
     }
 
-    this.showIt = function() {
+    this.show = function(menuData) {
+        this.cleanUp();
+        this.create(menuData);
+
         cm_TheContextMenu.updateTabSizes();
         // Use a timer to actually show the window to allow the page re-layout
         // to finish.  We don't know when this really happens but 50ms seems to
@@ -414,12 +434,12 @@
     }
 
     this.showIt2 = function() {
+
         var snippet = snippets[cm_TheContextMenu.snippetId];
-
         snippet.updateOwnerArea();
         snippet.setZValue(2);
 
-        centerSnippet(snippet);
+        this.centerSnippet();
 
 //        if (showTail) {
 //            cm_TheContextMenu.positionTail();
@@ -428,13 +448,27 @@
         snippet.show();
     }
 
+
+    this.centerSnippet = function() {
+
+        
+        var statusBarHeight = snippets.StatusBarChromeId.geometry.height;
+        
+        var snippet = snippets[cm_TheContextMenu.snippetId];
+        var x = (chrome.displaySize.width - snippet.geometry.width) / 2;
+        
+        // Center the menu in the space between status bar and tool bar
+        var y = (chrome.displaySize.height - statusBarHeight - snippets.WebViewToolbarId.geometry.height - cm_TheContextMenu.menuHeight)/2;
+        snippet.setPosition(x, (y+statusBarHeight));
+    
+    }
     chrome.chromeComplete.connect(createDelegate(this,
         function() {
-            var snippet = snippets[this.snippetId];
+            var snippet = snippets[cm_TheContextMenu.snippetId];
 
             chrome.aspectChanged.connect(createDelegate(this,
                     function(a) {
-                        centerSnippet(snippets[this.snippetId]);
+                        this.centerSnippet();
                     }));
 
             snippet.hidden.connect(createDelegate(this, this.onHide));
--- a/ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.css	Tue Jul 06 14:03:49 2010 +0300
@@ -1,85 +1,59 @@
-//ClearHistory dialog
-
-#dummy
-{
-}
+/* ClearHistory dialog */
 
 #ClearHistoryDialogId
 {
-   width: 302px;   
-}
-
-#ClearHistoryDialogId div.top{
-    background-image: url(icons/dialog_top.png);
-    background-repeat: no-repeat;
-    height:11px;
-    width: 302px;   
-}
-
-#ClearHistoryDialogId div.body{
-    background-image: url(icons/dialog_center.png);
-    height: 97px;
-    background-repeat: repeat-y;
-    width: 302px;   
-}
-
-#ClearHistoryDialogId div.bottom{
-    background-image: url(icons/dialog_bottom.png);
-    background-repeat: no-repeat;
-    height:10px;
-    background-position:left bottom;
-    width: 302px;   
+  width: 275px;
+  background: -webkit-gradient(linear, left top, left bottom, from(#556c90), to(#3c4d6a));
+  border: 3px solid #002447;
+  padding: 20px;
+  -webkit-border-top-left-radius: 10px;
+  -webkit-border-top-right-radius: 10px;
+  -webkit-border-bottom-left-radius: 10px;
+  -webkit-border-bottom-right-radius: 10px;
 }
 
 #ClearHistoryDialogId div.textLabel{
-    background-image: url(icons/icon_dialog_history_clear.png);
-    background-repeat: no-repeat;
-    font-size: 22px;
-    height: 21px;
-    width: 250px;
-    padding-left: 40px;
-    color: #fff;
-    margin-bottom: 20px;
-    margin-left: 15px;
+  text-align: center;
+  font-size: 22px;
+  color: #fff;
+  margin-bottom: 20px;
 }
 
 #ClearHistoryDialogId div.controls{
   height: 50px;
-  /*width: 230px;*/
-  width: 302px;
+  text-align: center;
 }
 
-#ClearHistoryDialogId div.clearDoneButton{
+#ClearHistoryDialogId div.historyDialogButton { 
+  width: 100px;
+  height: 54px;
+  display: inline-block;
+  background-repeat: no-repeat;
+  background-repeat: center center;
+ }
 
-   width: 100px;
-   height: 50px;
-   background-image: url(icons/button_dialog_history_clear_ok_wait.png);
-   background-repeat: no-repeat;
-   background-repeat: center center;
-   /*margin-right:10px;*/
-   float: left;
-   margin-left:50px;
-  
-    
+#ClearHistoryDialogId div.clearDoneButton {
+  background-image: url(icons/button_dialog_history_clear_ok_wait.png);
 }
 
- #ClearHistoryDialogId  div.clearDoneButton:active{
-    background-image: url(icons/button_dialog_history_clear_ok_press.png);
+#ClearHistoryDialogId  div.clearDoneButton:active {
+  background-image: url(icons/button_dialog_history_clear_ok_press.png);
 }
 
 
-#ClearHistoryDialogId  div.clearCancelButton{
+#ClearHistoryDialogId  div.clearCancelButton {
+  background-image: url(icons/button_dialog_history_clear_cancel_wait.png);
+}
 
-    width: 150px;
-    height: 50px;
-    background-image: url(icons/button_dialog_history_clear_cancel_wait.png);
-    background-repeat: no-repeat;
-    background-repeat: center center;
-    border: none;
-    margin:none;
-    float: left;
+#ClearHistoryDialogId  div.clearCancelButton:active {
+  background-image: url(icons/button_dialog_history_clear_cancel_press.png);
 }
 
- #ClearHistoryDialogId  div.clearCancelButton:active {
-    background-image: url(icons/button_dialog_history_clear_cancel_press.png);
+#hiddenDialogOK {
+  visibility: hidden;
+  background-image: url(icons/button_dialog_history_clear_ok_press.png);
 }
+#hiddenDialogCancel {
+  visibility: hidden;
+  background-image: url(icons/button_dialog_history_clear_cancel_press.png);	
+}
--- a/ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/historyview.superpage/clearhistorydialog.js	Tue Jul 06 14:03:49 2010 +0300
@@ -12,26 +12,22 @@
 
 function writeClearHistoryDialog()
 {
-	  var message = window.localeDelegate.translateText("txt_browser_history_delete_are_you_sure");
-	  //Following string to be localized - BR-2979 
-	  //var message = "Clear All History ?";
+    var message = window.localeDelegate.translateText("txt_browser_history_delete_are_you_sure");
     var html =
-        '<div class="top"></div>'+
-        '<div class="body">'+
-               '<div class="textLabel">'+message +'</div>' +
-               '<div class="controls">' +
-                 '<div type="button" onmouseup="clearAllHistoryDialog();" class="clearDoneButton"></div>'+ 
-                 '<div type="button" onmouseup="clearHistoryDialogIdHide();" class="clearCancelButton"></div>'+         
-                 '</div>'+ 
-          '</div>' +  /*body*/
-        '<div class="bottom"></div>';
-
+        '<div class="textLabel">'+message +'</div>' +
+        '<div class="controls">' +
+            '<div type="button" onmouseup="clearAllHistoryDialog();" class="historyDialogButton clearDoneButton"></div>'+ 
+            '<div type="button" onmouseup="clearHistoryDialogIdHide();" class="historyDialogButton clearCancelButton"></div>'+         
+        '</div>' +
+        '<div id="hiddenDialogOK"></div>' +
+        '<div id="hiddenDialogCancel"></div>';
   document.write(html);
 }
 
 function showClearHistoryDialog() {
   try{
-	    window.snippets.ClearHistoryDialogId.show(false);
+      window.snippets.ClearHistoryDialogId.show(false);
+      window.snippets.RecentUrlViewToolbarId.enabled = false;
   }catch(e){ alert(e); }
 } 
 
@@ -39,9 +35,10 @@
 {
     window.bookmarksManager.clearHistory();
     window.views.WebView.reload();    
-    window.snippets.ClearHistoryDialogId.hide();
+    clearHistoryDialogIdHide();
 }
 
 function clearHistoryDialogIdHide(){
     window.snippets.ClearHistoryDialogId.hide();
+    window.snippets.RecentUrlViewToolbarId.enabled = true;
 }
--- a/ginebra2/chrome/bedrockchrome/historyview.superpage/historyView.html	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/historyview.superpage/historyView.html	Tue Jul 06 14:03:49 2010 +0300
@@ -13,8 +13,28 @@
    <script src="historyview.js" type="text/javascript"></script>
 
   <script type="text/javascript">
- function update() {
-          updateHistoryList();
+  
+		var _prevExpandedUL = null;
+		var _prevExpandedATag = null;
+
+  	function scrollToTop()
+  		{
+	    	$('html, body').attr({scrollTop: 0});
+
+        var todayFolder = document.getElementById("aTagId_"+0);
+        var todaySubUl = document.getElementById("subUlId_"+0);
+        if(_prevExpandedUL != null && _prevExpandedATag.className == 'opened')
+        	toggleHistoryFolder(_prevExpandedATag,_prevExpandedUL);
+        _prevExpandedATag = todayFolder;
+        _prevExpandedUL = todaySubUl;
+        toggleHistoryFolder(todayFolder,todaySubUl);
+
+			}
+		
+		function update() {
+      updateHistoryList();
+    	
+			window.views.WebView.BookmarkHistoryView.shown.connect(scrollToTop);          
       }
   </script>
 
--- a/ginebra2/chrome/bedrockchrome/historyview.superpage/historyview.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/historyview.superpage/historyview.css	Tue Jul 06 14:03:49 2010 +0300
@@ -1,6 +1,7 @@
 body{
   padding: 0px;
   margin: 0px;
+  background-color: #889cbf;
 }
 
 .HistoryView{
@@ -8,6 +9,11 @@
   height:100%;
 }
 
+#BottomPad {
+ padding: 8px 10px 8px 10px;
+ height: 54px;
+}
+
 ul#folderMenu, ul#folderMenu ul {
   list-style-type:none;
   margin: 0;
--- a/ginebra2/chrome/bedrockchrome/historyview.superpage/historyview.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/historyview.superpage/historyview.js	Tue Jul 06 14:03:49 2010 +0300
@@ -1,5 +1,3 @@
-var _prevExpandedUL = null;
-var _prevExpandedATag;
 
 function openHistoryElement(historyURL)
 {
@@ -35,21 +33,12 @@
             var aTag  = document.createElement('a');
             var subUL = document.createElement('ul');
 
-            // Expand First Item & Hide all the other Items
-            if (i > 0)
-            {
-                aTag.className = 'closed';
-                subUL.style.display = 'none';
-            }
-            else
-            {
-                  aTag.className = 'opened';
-                subUL.style.display = 'block';
-                _prevExpandedATag = aTag;
-                _prevExpandedUL = subUL;
-            }
+       
+            aTag.className = 'closed';
+            subUL.style.display = 'none';
 
             aTag.href = "#";
+            aTag.id = "aTagId_"+i;
             aTag.innerHTML = '<div></div>'+folderObjects[i];
             aTag.onclick = eval('( function(){ toggleHistoryFolder(this, "#'+subUlId+'"); } )');
 
@@ -88,12 +77,28 @@
         snippetId.innerHTML = "";
         snippetId.appendChild(mainUL);
 
+        var bottomPad = document.createElement("div");
+        bottomPad.id = 'BottomPad';
+        snippetId.appendChild(bottomPad);
+        
+        var todayFolder = document.getElementById("aTagId_"+0);
+        var todaySubUl = document.getElementById("subUlId_"+0);
+     		toggleHistoryFolder(todayFolder,todaySubUl);
+        
+
     } catch(E) { alert(E); }
 
 }
 
 function toggleHistoryFolder(aTag, subUlId){
-  try{
+
+   try{
+   	   var filderList = document.getElementById('folderMenu');
+       if (filderList.childNodes.length == 0 ) {
+  	       return;
+       }
+     
+    
       aTag.className = (aTag.className == 'opened') ? 'closed' : 'opened';
       $(subUlId).toggle();
       //$(subUlId).toggle("blind", {}, 175);
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_cancel_press.png has changed
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_cancel_wait.png has changed
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_ok_press.png has changed
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_ok_wait.png has changed
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/dialog_bottom.png has changed
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/dialog_center.png has changed
Binary file ginebra2/chrome/bedrockchrome/historyview.superpage/icons/dialog_top.png has changed
--- a/ginebra2/chrome/bedrockchrome/networkstatus.snippet/networkstatus.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/networkstatus.snippet/networkstatus.js	Tue Jul 06 14:03:49 2010 +0300
@@ -12,10 +12,12 @@
         // Watch for page load errors.
         window.pageController.pageLoadFailed.connect(
           function() {
-                if (!window.pageController.loadCanceled ) {
-                    update();
-                    showNetworkStatus();
+             if (!window.pageController.loadCanceled ) {
+                if (window.pageController.errorUrlMatches) {
+                   update();
+                   showNetworkStatus();
                 }
+             }
           }
         );        
     }
Binary file ginebra2/chrome/bedrockchrome/outofmemory.snippet/icons/button_dialog_out_of_memory_ok_press.png has changed
Binary file ginebra2/chrome/bedrockchrome/outofmemory.snippet/icons/button_dialog_out_of_memory_ok_wait.png has changed
Binary file ginebra2/chrome/bedrockchrome/outofmemory.snippet/icons/icon_dialog_error.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/chrome/bedrockchrome/outofmemory.snippet/outofmemorydialog.css	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,47 @@
+/* OutOfMemory dialog */
+
+#OutOfMemoryDialogId
+{
+  width: 275px;
+  background: -webkit-gradient(linear, left top, left bottom, from(#556c90), to(#3c4d6a));
+  border: 3px solid #002447;
+  padding: 20px;
+  -webkit-border-top-left-radius: 10px;
+  -webkit-border-top-right-radius: 10px;
+  -webkit-border-bottom-left-radius: 10px;
+  -webkit-border-bottom-right-radius: 10px;
+}
+
+#OutOfMemoryDialogId span.title {
+  font-size: 22px;
+  color: #fff;
+  margin-left: 20px;
+}
+
+#OutOfMemoryDialogId div.textLabel {
+  text-align: left;
+  font-size: 22px;
+  color: #fff;
+  margin-top: 20px;
+}
+
+#OutOfMemoryDialogId div.controls {
+  height: 40px;
+  text-align: center;
+}
+
+#OutOfMemoryDialogId div.outOfMemoryDialogButton { 
+  width: 100px;
+  height: 40px;
+  display: inline-block;
+  background-repeat: no-repeat;
+  background-repeat: center center;
+ }
+
+#OutOfMemoryDialogId div.outOfMemoryDoneButton {
+  background-image: url(icons/button_dialog_out_of_memory_ok_wait.png);
+}
+
+#OutOfMemoryDialogId div.outOfMemoryDoneButton:active {
+  background-image: url(icons/button_dialog_out_of_memory_ok_press.png);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/chrome/bedrockchrome/outofmemory.snippet/outofmemorydialog.js	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,33 @@
+//outofmemorydialog.js
+
+function outOfMemoryDialog()
+{
+	window.pageController.lowMemory.connect(showOutOfMemoryDialog);
+	window.pageController.outOfMemory.connect(showOutOfMemoryDialog);
+	  
+    this.write = writeOutOfMemoryDialog;
+    // do setup
+    this.write();
+    
+}
+
+function writeOutOfMemoryDialog()
+{
+    var title = window.localeDelegate.translateText("txt_browser_error_dialog_device_low");
+    var message = window.localeDelegate.translateText("txt_browser_error_dialog_close_some");
+    var html =
+        '<div><img src="outofmemory.snippet/icons/icon_dialog_error.png"/>&nbsp;&nbsp;<span class="title">' + title + '</span></div>' +
+        '<div class="textLabel">' + message +'</div>' +
+        '<div class="controls">' +
+            '<div type="button" onmouseup="hideOutOfMemoryDialog();" class="outOfMemoryDialogButton outOfMemoryDoneButton"></div>'+ 
+        '</div>'
+    document.write(html);
+}
+
+function showOutOfMemoryDialog() {
+    window.snippets.OutOfMemoryDialogId.show(false);
+} 
+
+function hideOutOfMemoryDialog(){
+    window.snippets.OutOfMemoryDialogId.hide();
+}
Binary file ginebra2/chrome/bedrockchrome/prompt.snippet/icons/Thumbs.db has changed
Binary file ginebra2/chrome/bedrockchrome/prompt.snippet/icons/button_dialog_ok_press.png has changed
Binary file ginebra2/chrome/bedrockchrome/prompt.snippet/icons/button_dialog_ok_wait.png has changed
Binary file ginebra2/chrome/bedrockchrome/prompt.snippet/icons/icon_dialog_error.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/chrome/bedrockchrome/prompt.snippet/prompt.css	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,55 @@
+/* Network status (error) dialog styles. */
+
+.promptBox {
+    background: -webkit-gradient(linear, left top, left bottom, from(#546b8f), to(#3b4c69), color-stop(0.0, #aab));
+    -webkit-user-select: none;
+
+    padding: 10px;
+    color: #fff;
+
+    border-radius: 7px;
+
+    border-style: solid;
+    border-width: 4px;
+    border-color: #243447;
+}
+
+.promptBox img {
+    vertical-align: middle;
+    padding: 0px;
+}
+
+.promptBox ul {
+	margin: 0px; 
+    padding: 0px;
+}
+
+.promptBox li {
+    list-style-type: none;
+    margin-top: 20px;
+}
+
+.promptBox li:first-child {
+    margin-top: 0px;
+}
+
+.promptBox li:last-child {
+    margin-top: 4px;
+	margin-bottom: 0px;
+}
+
+.promptText {
+    vertical-align: middle;
+    white-space: nowrap;  
+    overflow: hidden;
+    //border: solid 1px #f00;  
+}
+
+/* Second line of URL text, truncate the text and append an ellipsis. */
+.promptText2 {  
+    vertical-align: middle;
+    white-space: nowrap;
+    overflow: hidden;  
+    text-overflow: ellipsis;
+} 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/chrome/bedrockchrome/prompt.snippet/prompt.js	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,125 @@
+/*!
+  \file prompt.js This module contains the promptDialog class which
+  displays messages.
+*/
+
+function promptDialog() {
+    var onChromeComplete = function()
+    {
+        // Get external mouse events.
+        snippets.PromptChromeId.externalMouseEvent.connect(this.handleExternalMouseEvent.bind(this));
+
+        // Watch for page load errors.
+                
+        window.pageController.databaseQuotaExceeded.connect(
+        	function() {
+                update();
+                showPrompt();
+          }
+        );
+
+    }
+    
+    //! Add text to the given DOM element, truncate it at the given width (in pixels).
+    //! Returns the remainder of the string.
+    function truncateTextToWidth(element, text, width)
+    {
+       element.innerHTML = '<span style="white-space:nowrap;">' + text + '</span>';
+       if(element.offsetWidth > width)
+       {
+          var i = 1;
+          element.innerHTML = '';
+          while(element.offsetWidth < (width) && i < text.length)
+          {
+             element.innerHTML = text.substr(0,i);
+             i++;
+          }
+          return text.substr(i-1);
+       }
+       return "";
+    } 
+    
+    //! Update text elements with error info.
+    var update = function()
+    {
+        // Set URL.  Two lines of it are displayed, the first wraps to the second and the second
+        // is truncated with an ellipsis appended by CSS.
+        document.getElementById("promptTextUrl2Id").innerHTML = pageController.promptReserved;
+
+        // Set error message.
+        if(pageController.promptMsg != undefined && pageController.promptMsg != "") {
+            document.getElementById("promptTextMsgId").innerHTML = pageController.promptMsg;
+        }
+        else {
+            document.getElementById("promptTextMsgId").innerHTML = window.localeDelegate.translateText("txt_browser_error_generic_error_msg");
+        }
+    }
+    
+    //! Handles external mouse events - dismisses status dialog.
+    /*!
+      \param type the type of event
+      \param name the name of event
+      \param description event description
+    */
+    this.handleExternalMouseEvent = function(type, name, description)
+    {
+        if (name == "QGraphicsSceneMousePressEvent") {
+            this.hidePrompt();
+        }
+    }
+    
+    //! Show the dialog and shaded overlay.
+    var showPrompt = function(){
+
+        var snippet = snippets.PromptChromeId;
+        snippet.updateOwnerArea();
+        snippet.show(true);
+        snippet.zValue = 1;
+        snippet.repaint();
+    
+    }
+
+    //! Hide the dialog and shaded overlay.
+    this.hidePrompt = function(){
+        snippets.PromptChromeId.hide();
+    }
+
+    //! Create the DOM elements for the dialog.
+    this.setupPage = function(){    
+        var html =
+            '<div class="promptBox">' +
+                '<ul>' +
+                    '<li>' +
+                        '<img src="prompt.snippet/icons/icon_dialog_error.png"/>&nbsp;&nbsp;' +
+                        '<span class="promptText">' +
+                            window.localeDelegate.translateText("txt_browser_info_message") +
+                        '</span>' +
+                    '</li>' +
+                    '<li id="promptTextUrlParent">' +
+                        '<span class="promptText" id="promptTextUrl1Id"></span><br/>' +
+                        '<div class="promptText2" id="promptTextUrl2Id"></div>' +
+                    '</li>' +
+                    '<li>' +
+                        '<span class="promptText" id="promptTextMsgId"/>' +
+                    '</li>' +
+                    '<li>' +
+                        '<center><img id="prompt_okId" class="promptOkButton"/></center>' +
+                    '</li>' +
+                '</ul>' +
+            '</div>';
+        document.write(html);
+        new SimpleButton("prompt_okId",
+                         "prompt.snippet/icons/button_dialog_ok_wait.png",
+                         "prompt.snippet/icons/button_dialog_ok_press.png",
+                         "",
+                         this.onOkPressed.bind(this));
+    }
+
+    this.onOkPressed = function() {
+        this.hidePrompt();
+    }
+
+    this.setupPage();
+
+    chrome.chromeComplete.connect(onChromeComplete.bind(this));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra2/chrome/bedrockchrome/settingsview.superpage/LegalNotice.html	Tue Jul 06 14:03:49 2010 +0300
@@ -0,0 +1,22 @@
+<html>
+									Nokia and Nokia Connection People are trademarks
+									or registered trademarks of Nokia Corporation.
+									
+									<p> Copyright 2009 Nokia. All rights reserved. 
+																			
+									<p> This product is based on Symbia n OS S60 5th Edition software. 
+									
+									<p> Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. 
+									
+									<p> This product includes certain open source software. The exact terms of the licenses, 
+									disclaimers, acknolwegements and notices are provided below. Nokia offers to provide you
+									with the source code as defined in the applicable license. Plase send an e-mail 
+									to sourcecode.request@nokia.com or written request to:
+									
+									<p>Source Code Requests
+									<p>Nokia Corporation
+									<p>P.O.BOX 407
+									<p>FI-00045 Nokia Group
+									<p>Finland 
+	
+</html>	
\ No newline at end of file
--- a/ginebra2/chrome/bedrockchrome/settingsview.superpage/SettingsView.html	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/settingsview.superpage/SettingsView.html	Tue Jul 06 14:03:49 2010 +0300
@@ -31,10 +31,11 @@
     //HIDE THE DIVS ON PAGE LOAD
     var settingsLoaded = window.pageController.getSettingsLoaded();
     var image1;
-    var image2  
+    var image2;
+    var image3;   
     var imagesrc1;
     var imagesrc2;
-   
+    var imagesrc3;    
     
     if(settingsLoaded == 0)
     {
@@ -43,35 +44,63 @@
 	   	image1.setAttribute("src", "icons/list_headerarrow_closed.png")	
 	   	imagesrc1 = "icons/list_headerarrow_closed.png";
     	
-  	  image2 = document.getElementById("im2");   
+  	    image2 = document.getElementById("im2");   
    		image2.setAttribute("src", "icons/list_headerarrow_closed.png");  
    		imagesrc2 = "icons/list_headerarrow_closed.png";
 
+  	    image3 = document.getElementById("im3");   
+   		image3.setAttribute("src", "icons/list_headerarrow_closed.png");  
+   		imagesrc3 = "icons/list_headerarrow_closed.png";
+
     }
     else if(settingsLoaded == 1){
       $('div.accordionButtonGS').next().show();
       
-      image1 = document.getElementById("im1");   
+        image1 = document.getElementById("im1");   
 	   	image1.setAttribute("src", "icons/list_headerarrow_open.png")	
 	   	imagesrc1 = "icons/list_headerarrow_open.png";
     	
-  	  image2 = document.getElementById("im2");   
+  	    image2 = document.getElementById("im2");   
    		image2.setAttribute("src", "icons/list_headerarrow_closed.png");  
    		imagesrc2 = "icons/list_headerarrow_closed.png";
+   		
+   	    image3 = document.getElementById("im3");   
+   		image3.setAttribute("src", "icons/list_headerarrow_closed.png");  
+   		imagesrc3 = "icons/list_headerarrow_closed.png";   		
     }  
     else if(settingsLoaded == 2)
     {	
       $('div.accordionButtonCD').next().show();
       
        image1 = document.getElementById("im1");   
-	     image1.setAttribute("src", "icons/list_headerarrow_closed.png");	
-	     imagesrc1 = "icons/list_headerarrow_closed.png";
+	   image1.setAttribute("src", "icons/list_headerarrow_closed.png");	
+	   imagesrc1 = "icons/list_headerarrow_closed.png";
     	
   	   image2 = document.getElementById("im2");   
-   		 image2.setAttribute("src", "icons/list_headerarrow_open.png");  
-   		 imagesrc2 = "icons/list_headerarrow_open.png";
+   	   image2.setAttribute("src", "icons/list_headerarrow_open.png");  
+   	   imagesrc2 = "icons/list_headerarrow_open.png";
+   		 
+   	   image3 = document.getElementById("im3");   
+   	   image3.setAttribute("src", "icons/list_headerarrow_closed.png");  
+       imagesrc3 = "icons/list_headerarrow_closed.png";
+
    	}	
-  
+    else if(settingsLoaded == 3)
+    {	
+      $('div.accordionButtonABT').next().show();
+      
+       image1 = document.getElementById("im1");   
+	   image1.setAttribute("src", "icons/list_headerarrow_closed.png");	
+	   imagesrc1 = "icons/list_headerarrow_closed.png";
+    	
+  	   image2 = document.getElementById("im2");   
+   	   image2.setAttribute("src", "icons/list_headerarrow_closed.png");  
+   	   imagesrc2 = "icons/list_headerarrow_closed.png";
+   		 
+  	   image3 = document.getElementById("im3");   
+   	   image3.setAttribute("src", "icons/list_headerarrow_open.png");  
+   	   imagesrc3 = "icons/list_headerarrow_open.png";
+   	}	  
   
     //ACCORDION BUTTON ACTION
     $('div.accordionButtonGS').click(function() {
@@ -80,15 +109,17 @@
 
         $(this).next().toggle();
         $('div.accordionButtonCD').next().hide();  
-        
+        $('div.accordionButtonABT').next().hide();  
+                
         image1 = document.getElementById("im1");   
         image2 = document.getElementById("im2");  
-        
+        image3 = document.getElementById("im3");  
+                
         if(imagesrc1 == "icons/list_headerarrow_closed.png") // current state
         {
         	imagesrc1 = "icons/list_headerarrow_open.png";
         	imagesrc2 = "icons/list_headerarrow_closed.png";        	
-        		
+        	imagesrc3 = "icons/list_headerarrow_closed.png";        		
         }       
         else // imagesrc1 == "icons/list_headerarrow_open.png"
         {
@@ -96,7 +127,7 @@
         }       
         image1.setAttribute("src", imagesrc1);
         image2.setAttribute("src", imagesrc2);  
-        
+        image3.setAttribute("src", imagesrc3);  
 
     });
 
@@ -104,14 +135,17 @@
 
         $(this).next().toggle();
         $('div.accordionButtonGS').next().hide();
+        $('div.accordionButtonABT').next().hide();
         
         image1 = document.getElementById("im1");   
         image2 = document.getElementById("im2");  
-        
+        image3 = document.getElementById("im3");  
+                
         if(imagesrc2 == "icons/list_headerarrow_closed.png") // current state
         {
         	imagesrc2 = "icons/list_headerarrow_open.png";
-        	imagesrc1 = "icons/list_headerarrow_closed.png";        	
+        	imagesrc1 = "icons/list_headerarrow_closed.png"; 
+        	imagesrc3 = "icons/list_headerarrow_closed.png";       	
         		
         }       
         else // imagesrc2 == "icons/list_headerarrow_open.png"
@@ -119,10 +153,36 @@
         	imagesrc2 = "icons/list_headerarrow_closed.png";
         }       
         image1.setAttribute("src", imagesrc1);
-        image2.setAttribute("src", imagesrc2);       
+        image2.setAttribute("src", imagesrc2);
+        image3.setAttribute("src", imagesrc3);       
 
     });
 
+    $('div.accordionButtonABT').click(function() {
+
+        $(this).next().toggle();
+        $('div.accordionButtonGS').next().hide();
+        $('div.accordionButtonCD').next().hide();
+                
+        image1 = document.getElementById("im1");   
+        image2 = document.getElementById("im2");  
+        image3 = document.getElementById("im3");  
+        
+        if(imagesrc3 == "icons/list_headerarrow_closed.png") // current state
+        {
+        	imagesrc3 = "icons/list_headerarrow_open.png";
+        	imagesrc1 = "icons/list_headerarrow_closed.png";        	
+        	imagesrc2 = "icons/list_headerarrow_closed.png";        		
+        }       
+        else // imagesrc3 == "icons/list_headerarrow_open.png"
+        {
+        	imagesrc3 = "icons/list_headerarrow_closed.png";
+        }       
+        image1.setAttribute("src", imagesrc1);
+        image2.setAttribute("src", imagesrc2);       
+     image3.setAttribute("src", imagesrc3);          
+
+    });
    
      
     
@@ -138,11 +198,11 @@
 
 <div id="wrapper">
        
-       <div class="accordionButtonGS">&nbsp;&nbsp;&nbsp;&nbsp;General Settings   <img id="im1" align="right" style="padding-right: 20px; vertical-align: middle; " ></div>                
+       <div class="accordionButtonGS">&nbsp;&nbsp;&nbsp;&nbsp;<span id="txt_browser_settings_general_settings"></span>   <img id="im1" align="right" style="padding-right: 20px; vertical-align: middle; " ></div>                
         
         <div class="accordionContent"><br />
 
-            <form name="encoding" >Character Encoding <br> 
+            <form name="encoding" ><span id="txt_browser_settings_general_settings_character_encoding"></span> <br> 
             	
             <table width="100%" cellspacing="0">
          	 <tr>
@@ -208,7 +268,7 @@
            
          <table width="100%" cellspacing="0">
          	 <tr>
-            <td class="settingstext" style="border-top: solid 1px #E0E0E0;">Save Browsing History</td>
+            <td class="settingstext" style="border-top: solid 1px #E0E0E0;"><span id="txt_browser_settings_general_settings_save_browser_history"></span></td>
             <td style="border-top: solid 1px #E0E0E0;"><input id="saverestore1" onclick="saveSR('yes')"    type="image" STYLE="vertical-align: middle; padding:5px" >
                 <input id="saverestore2" onclick="saveSR('no')"     type="image" STYLE="vertical-align: middle; padding:5px" ></td> 
            </tr>
@@ -226,7 +286,7 @@
         </div>
 
 
-        <div class="accordionButtonCD">&nbsp;&nbsp;&nbsp;&nbsp;Clear Data <img id="im2" align="right" style="padding-right: 20px; vertical-align: middle; "></div>
+        <div class="accordionButtonCD">&nbsp;&nbsp;&nbsp;&nbsp;<span id="txt_browser_settings_clear_data"></span> <img id="im2" align="right" style="padding-right: 20px; vertical-align: middle; "></div>
         <div class="accordionContent"><br />
              <form name="deleteform">
 
@@ -234,27 +294,24 @@
 
 
 								  <tr>
-								    <td class="settingstext">Cache&nbsp;&nbsp;</td>
+								    <td class="settingstext"><span id="txt_browser_settings_clear_data_cache"></span>&nbsp;&nbsp;</td>
 								    <td style="text-align: right;  white-space: nowrap;"><img id="id1" onclick="clearSelected('cache')"     type="image" STYLE="vertical-align: middle;"></td>
 								  </tr>
 								  <tr>
-								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">Cookies&nbsp;&nbsp;</td>
+								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;"><span id="txt_browser_settings_clear_data_cookies"></span>&nbsp;&nbsp;</td>
 								    <td style="text-align: right; border-top: solid 1px #E0E0E0; white-space: nowrap;"><img id="id2" onclick="clearSelected('cookies')"   type="image" STYLE="vertical-align: middle;" ></td>
 								  </tr>
 								  <tr>
-								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">History&nbsp;&nbsp;</td>
+								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;"><span id="txt_browser_settings_clear_data_history"></span>&nbsp;&nbsp;</td>
 								    <td style="text-align: right; border-top: solid 1px #E0E0E0;  white-space: nowrap;"><img id="id3" onclick="clearSelected('history')"   type="image" STYLE="vertical-align: middle;" ></td>
 								  </tr>
 								  <tr>
-								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">Bookmarks&nbsp;&nbsp;</td>
+								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;"><span id="txt_browser_settings_clear_data_bookmarks"></span>&nbsp;&nbsp;</td>
 								    <td style="text-align: right; border-top: solid 1px #E0E0E0;  white-space: nowrap;"><img id="id4" onclick="clearSelected('bookmarks')"   type="image" STYLE="vertical-align: middle;" ></td>
 								  </tr>
+								  
 								  <tr>
-								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">Forms and Passwords&nbsp;&nbsp;</td>
-								    <td style="text-align: right; border-top: solid 1px #E0E0E0;  white-space: nowrap;"><img id="id5" onclick="clearSelected('forms')"   type="image" STYLE="vertical-align: middle;" ></td>
-								  </tr>
-								  <tr>
-								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">All&nbsp;&nbsp;</td>
+								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;"><span id="txt_browser_settings_clear_data_all"></span>&nbsp;&nbsp;</td>
 								    <td style="text-align: right; border-top: solid 1px #E0E0E0; white-space: nowrap;"><img id="id6" onclick="clearSelected('all')"   type="image" STYLE="vertical-align: middle;" ></td>
 								  </tr>
 								</table>
@@ -262,8 +319,54 @@
             </form>
         </div>
 
-    </div>
+        <div class="accordionButtonABT">&nbsp;&nbsp;&nbsp;&nbsp;<span id="txt_browser_settings_general_settings_about"></span> <img id="im3" align="right" style="padding-right: 20px; vertical-align: middle; "></div>
+        <div class="accordionContent"><br />
+            <form name="aboutform">
 
+                  <table width="100%" cellspacing="0">
+								  <tr>
+								    <td class="settingstext">Nokia Browser&nbsp;&nbsp;</td>
+								  </tr>
+								  <tr>
+								    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">
+								                <div id="release_version">
+	                				<script type="text/javascript">
+					                var UAString = navigator.userAgent;
+	            				    var brNameVer = "unknown";
+					                var UALen = 1;
+	            				    var nameStart = 1;	        
+					                UALen = UAString.length;
+	            				    nameStart = UAString.indexOf("NokiaBrowser");
+					                // test to see if "NokiaBrowser" is in the UA String at all
+	            				    if (nameStart < 0)
+					                    brNameVer = "NOT a NokiaBrowser Browser";
+	            				    else
+					                {
+	            				        // crop string starting at "NokiaBrowser"
+					                    brNameVer = UAString.substring(nameStart, UALen);
+	            				        // limit substring to "NokiaBrowser" and version only 
+					                    brNameVer = brNameVer.substr(0, brNameVer.indexOf(" "));
+	            				        // clean up string for presentation
+					                    brNameVer = brNameVer.replace("NokiaBrowser/", " Version: ");
+	            				    }
+					                document.write(brNameVer);
+									document.write("<br/>");
+					            </script>
+            					</div>	
+								</td> 
+								</tr>
+								    
+								<tr>
+							    <td class="settingstext" style="border-top: solid 1px #E0E0E0;">
+							    <iframe src = "LegalNotice.html" frameborder="0" scrolling="auto"> 
+								</iframe>						    	
+								</td>
+								</tr>
+								</table>                  
+            </form>
+        </div>
 
+    </div>
+    <div id="BottomPad"></div>
 </body>
 </html>
Binary file ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/delete_btn.png has changed
Binary file ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/delete_btn_pressed.png has changed
Binary file ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/yes_btn.png has changed
Binary file ginebra2/chrome/bedrockchrome/settingsview.superpage/icons/yes_btn_pressed.png has changed
--- a/ginebra2/chrome/bedrockchrome/settingsview.superpage/settingsview.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/settingsview.superpage/settingsview.css	Tue Jul 06 14:03:49 2010 +0300
@@ -2,6 +2,7 @@
   padding: 0px;
   margin: 0px;  
   font-size: 20px;
+  background-color: #889cbf;
 }
 
 #wrapper {
@@ -9,6 +10,12 @@
     margin-right: auto;
     }
 
+#BottomPad {
+    clear: both;
+    padding: 8px 10px 8px 10px;
+    height: 54px;
+    }
+
 .accordionButton {
     float: left;
     background: #AAAAAA;
@@ -39,6 +46,18 @@
     cursor: pointer;
     }
 
+.accordionButtonABT {
+    font-size: 20px;
+    width: 100%;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    float: left;
+    color:#283F52;
+    background: #E1F1FF;
+    border-bottom: 1px solid #FFFFFF;
+    cursor: pointer;
+    }
+    
 .accordionContent {
     font-size: 20px;
     padding-left: 20px;
--- a/ginebra2/chrome/bedrockchrome/settingsview.superpage/settingsview.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/settingsview.superpage/settingsview.js	Tue Jul 06 14:03:49 2010 +0300
@@ -93,6 +93,10 @@
         
 }
 
+function localizeString(logicalString)
+{
+    document.getElementById(logicalString).innerHTML = window.localeDelegate.translateText(logicalString);
+}
 
 function initForms()
 {
@@ -141,22 +145,29 @@
     var cs2 = document.getElementById("id2");
     var cs3 = document.getElementById("id3");
     var cs4 = document.getElementById("id4");
-    var cs5 = document.getElementById("id5");
+    //var cs5 = document.getElementById("id5");
     var cs6 = document.getElementById("id6");
    
    	cs1.setAttribute("src", "icons/broom_sweep.png");
    	cs2.setAttribute("src", "icons/broom_sweep.png");
    	cs3.setAttribute("src", "icons/broom_sweep.png");
    	cs4.setAttribute("src", "icons/broom_sweep.png");
-   	cs5.setAttribute("src", "icons/broom_sweep.png");
-   	cs6.setAttribute("src", "icons/broom_sweep.png");  
-   
-
-    if(window.chrome.displayMode == "portrait")
-      document.getElementById("cd2").width = "100%";
-    else
-    	document.getElementById("cd2").width = "100%";  //I need this line to handle some problems with landscape in the future. The value may be different  from 100%
-
+   	//cs5.setAttribute("src", "icons/broom_sweep.png");
+   	cs6.setAttribute("src", "icons/broom_sweep.png");
+   	
+   	localizeString("txt_browser_settings_general_settings");
+   	localizeString("txt_browser_settings_general_settings_character_encoding");
+   	localizeString("txt_browser_settings_general_settings_save_browser_history");
+   	localizeString("txt_browser_settings_clear_data");
+   	localizeString("txt_browser_settings_clear_data_cache");
+   	localizeString("txt_browser_settings_clear_data_cookies");
+   	localizeString("txt_browser_settings_clear_data_history");
+   	localizeString("txt_browser_settings_clear_data_bookmarks");
+   	//localizeString("txt_browser_settings_clear_data_form_data");
+   	localizeString("txt_browser_settings_clear_data_all");
+   	localizeString("txt_browser_settings_general_settings_about");
+   	
+   	
 }
 
 window.onload = initForms;
@@ -226,6 +237,8 @@
       window.pageController.deleteCache();
       var cs1 = document.getElementById("id1");
       cs1.setAttribute("src", "icons/broom_sweep.gif");
+      setTimeout("initForms()", 2000);
+      return;
     }
       
     if (field == "cookies") // Cookies
@@ -233,7 +246,8 @@
     	    var cs2 = document.getElementById("id2");
          	cs2.setAttribute("src", "icons/broom_sweep.gif");
       		window.pageController.deleteCookies();
-      		//pausecomp(5000);     		
+      		setTimeout("initForms()", 2000);	
+      		return;
           
   	}
 
@@ -243,8 +257,8 @@
               window.bookmarksManager.clearHistory();
               var cs3 = document.getElementById("id3");
       				cs3.setAttribute("src", "icons/broom_sweep.gif");
-      				
-      				        			 
+      				setTimeout("initForms()", 2000);  
+      				return;    				        			 
          			 
               //window.views.WebView.reload();
 
@@ -256,36 +270,35 @@
               window.bookmarksManager.clearBookmarks();
               var cs4 = document.getElementById("id4");
       				cs4.setAttribute("src", "icons/broom_sweep.gif");
+      				setTimeout("initForms()", 2000);
+      				return;
               //window.views.WebView.reload();
 
    }
 
-  if (field == "forms") // forms and passwords
-  {
-
-						 var cs5 = document.getElementById("id5");
-      			 cs5.setAttribute("src", "icons/broom_sweep.gif");
-             ;// place holder
-
-   }
-
+ 
     if (field == "all") // everything
     {
-    	window.pageController.deleteCache();
+    	var cs6 = document.getElementById("id6");
+      cs6.setAttribute("src", "icons/broom_sweep.gif");
+      setTimeout("initForms();deleteData()", 2000);  
+      return;
+     
+    }
+
+    
+}
+
+function deleteData()
+{
+	window.pageController.deleteCache();
     	window.pageController.deleteCookies();
     	window.bookmarksManager.clearHistory();
     	window.bookmarksManager.clearBookmarks();
       window.pageController.deleteDataFiles();
-      var cs6 = document.getElementById("id6");
-      cs6.setAttribute("src", "icons/broom_sweep.gif");
-    }
-
-    setTimeout("initForms()", 2000);
 }
 
 
-
-
 function setValue(selectedIndex)
 {
 	//alert(this.options[this.selectedIndex].value);
--- a/ginebra2/chrome/bedrockchrome/statusbar.snippet/statusbar.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/statusbar.snippet/statusbar.css	Tue Jul 06 14:03:49 2010 +0300
@@ -77,7 +77,7 @@
    padding: 1;
 }
 
-#ruler {
+#sbruler {
    font-size:12px;
    font-weight: bold;
    visibility: hidden;
--- a/ginebra2/chrome/bedrockchrome/statusbar.snippet/statusbar.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/statusbar.snippet/statusbar.js	Tue Jul 06 14:03:49 2010 +0300
@@ -65,10 +65,10 @@
             if (window.views.WebView.currentPageIsSuperPage()) {
                    //alert(window.views.WebView.currentSuperPageName());
                  if (window.views.WebView.currentSuperPageName() == "BookmarkTreeView") {
-                    setTitle(window.localeDelegate.translateText("txt_browser_content_view_menu_nav_bookmarks"), false);
+                    setTitle(window.localeDelegate.translateText("txt_browser_bookmarks_bookmarks"), false);
                   }
                 else if (window.views.WebView.currentSuperPageName() == "BookmarkHistoryView") {
-                         setTitle(window.localeDelegate.translateText("txt_browser_content_view_menu_nav_history"), false);
+                         setTitle(window.localeDelegate.translateText("txt_browser_history_history"), false);
                        }
                 else if (window.views.WebView.currentSuperPageName() == "SettingsView") {
                          setTitle(window.localeDelegate.translateText("txt_browser_settings_settings"), false);
@@ -76,9 +76,14 @@
            }
            else {
                  if (window.views.current().type == "webView")  {
+                  
+                 //enable the double click for the content view page
+                 if (!window.views.WebView.bedrockTiledBackingStoreEnabled())
+                     window.views.WebView.touchNav.doubleClickEnabled = true;                 
+                   
                       /* For new windows, show title as 'New Window' */
                     if ((window.pageController.currentDocTitle == "") && (window.pageController.currentRequestedUrl == "")) {
-                        setTitle(window.localeDelegate.translateText("txt_browser_windows_new_window"), false);
+                        setTitle(window.localeDelegate.translateText("txt_browser_content_view_new_window"), false);
                     }
                     else if (window.pageController.currentDocTitle == "") {
                         if (window.pageController.currentDocUrl == "")  {
@@ -268,7 +273,7 @@
             updateFieldWidth(htmlEncode(networkName));
             document.getElementById('provider').innerHTML = htmlEncode(networkName);
 
-            // repaint if status bar exists (first call to this function, it doesn't)
+            // repaint if status bar exists
             if (window.snippets.StatusBarChromeId)
                 window.snippets.StatusBarChromeId.repaint();
         }
@@ -308,7 +313,6 @@
                 currentState = state;
                 document.getElementById('strength').innerHTML =
                     networkIconSrc[currentState];
-                window.snippets.StatusBarChromeId.repaint();
 
                 // if we went offline, change the provider name to "offline"
                 if (currentState == enumNetworkStrengths.state.Offline)
@@ -411,7 +415,6 @@
         {
             document.getElementById('battery').innerHTML =
                 batteryIconSrc[convertLevelToState(level)];
-            window.snippets.StatusBarChromeId.repaint();
         }
     }
 
@@ -475,13 +478,8 @@
             '</tr>'+
             '</table>'+
             // ruler span used for getting the width of network name
-            // style included here because style sheet not applied early
-            // enough for sbNetworkStatus.showInitialNetworkName call below
-            // which needs text width which depends on font
-            '<span id="sbruler" style="font-size:12px;font-weight:bold;visibility:hidden;"></span>';
+            '<span id="sbruler"></span>';
         document.write(html);
-
-        sbNetworkStatus.showInitialNetworkName();
     }
 
     // StatusBar Constructor
@@ -494,6 +492,10 @@
     // This is because they don't have access to "this" as they are invoked
     // as functions rather than as methods.
 
+    // On chromeComplete signal, show initial network name.
+    window.chrome.chromeComplete.connect(
+        function() {sbNetworkStatus.showInitialNetworkName();});
+    
     // Connect page controller signals to slots.
     window.pageController.titleChanged.connect(
         function(title) {sbTitle.handleTitleChange(title);});
@@ -512,13 +514,6 @@
         }
     );
 
-    window.ViewStack.currentViewChanged.connect(
-        function() {
-            sbTitle.handleCurrentViewChange();
-            sbLockStatus.handleCurrentViewChange();
-        }
-    );
-
     // Connect device delegate signals to slots.
     window.deviceDelegate.batteryLevelChanged.connect(
        function(level) {sbBatteryStatus.handleLevelChange(level);});
Binary file ginebra2/chrome/bedrockchrome/suggests.snippet/icons/bottomshadow.png has changed
Binary file ginebra2/chrome/bedrockchrome/suggests.snippet/icons/divider.png has changed
Binary file ginebra2/chrome/bedrockchrome/suggests.snippet/icons/topshadow.png has changed
--- a/ginebra2/chrome/bedrockchrome/suggests.snippet/suggests.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/suggests.snippet/suggests.js	Tue Jul 06 14:03:49 2010 +0300
@@ -84,7 +84,7 @@
     {
         var recenturl;
         var recenttitle = window.localeDelegate.translateText(
-            "txt_browser_url_bar_drop_down_search_for");
+            "txt_browser_chrome_suggests_search_for");
         var snippetId = document.getElementById('SuggestsId');
         var suggests = window.pageController.fetchSuggestions(input);
         var suggestUL = document.createElement('ul');
@@ -210,7 +210,7 @@
     */
     this.handleExternalMouseEvent = function(type, name, description)
     {
-        if (name == "QGraphicsSceneMousePressEvent") {
+        if (name == "MouseClick") {
             _hideSuggests();
         }
     }
@@ -236,6 +236,19 @@
         }
     }
 
+    //! Called when URL search bar looses focus. The external mouse event
+    //! handler deals with most cases where the suggestion list should be
+    //! dismissed but we don't get those events when the list isn't visible
+    //! so this handler is needed to cancel the timer in those cases.
+    this.urlSearchLostFocus = function()
+    {
+        // if visible user may be scrolling suggestion page so ignore focus change
+        if (!snippets.SuggestsChromeId.visible) {
+            // prevent suggestion list from being displayed until URL edited again
+            clearTimeout(inputTimeoutId);
+        }
+    }
+
     //! Sets the user input URL suggest delay.
     /*!
       \param to the new delay time.
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_disabled.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_pressed.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited_pressed.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB_pressed.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_fullTB.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_fullTB_pressed.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_partialTB.png has changed
Binary file ginebra2/chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_partialTB_pressed.png has changed
--- a/ginebra2/chrome/bedrockchrome/zoombar.snippet/zoombar.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/zoombar.snippet/zoombar.css	Tue Jul 06 14:03:49 2010 +0300
@@ -17,6 +17,7 @@
   width: 58px;
   padding-left: 10px;
   padding-top: 5px;
+  float:left;
 }
 
 
--- a/ginebra2/chrome/bedrockchrome/zoombar.snippet/zoombar.js	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/bedrockchrome/zoombar.snippet/zoombar.js	Tue Jul 06 14:03:49 2010 +0300
@@ -6,12 +6,10 @@
   Class to handle displaying the zoom bar. The zoom bar is displayed when the
   user presses the zoom button on the toolbar. It provides access to the zoom
   in and out functions. It is hidden when the main toolbar is hidden on user inactivity
+  and on timer maintained by native code
 */
 function ZoomBar()
 {
-    var timeoutId = 0; // inactivity timer ID
-    var ZB_TIMEOUT = 5000; // hide zoombar after 5 secs
-    var zooming = false; // true when in the process of zooming
     var enabled = true; // zooming enabled flag - initially enabled
 
     // Private Methods
@@ -19,63 +17,30 @@
     function _zoombar_write() {
         var html = ''+
             '<div id="zoomBarDiv">'+
-            '<img class="zoomBarBtn" id="zoomBarBtnIn">'+
-            '<img class="zoomBarBtn" id="zoomBarBtnOut">'+
+            '<div class = "GinebraSnippet zoomBarBtn" id="zoomBarBtnIn" data-GinebraVisible="false" data-GinebraHidesContent="true"   data-GinebraNativeClass="ActionButton"> </div>'+
+            '<div class = "GinebraSnippet zoomBarBtn" id="zoomBarBtnOut" data-GinebraVisible="false" data-GinebraHidesContent="true"   data-GinebraNativeClass="ActionButton"> </div>'+
+
             '</div>';
         document.write(html);
     }
 
     //! Create zoom in & out buttons.
     function _setActions() {
-        new ActionButton("zoomBarBtnIn",
-                         "zoombar.snippet/icons/icon_zoom+.png",
-                         "zoombar.snippet/icons/icon_zoom+_pressed.png",
-                         "zoombar.snippet/icons/icon_zoom+_disabled.png",
-                         window.views.WebView.actions.zoomIn,
-                         true,true,true);
+        snippets.zoomBarBtnIn.connectAction("zoomIn", "WebView", true, true);
+        snippets.zoomBarBtnOut.connectAction("zoomOut", "WebView",  true, true);
+        snippets.zoomBarBtnIn.setIcon(":/chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom+.png");
+        snippets.zoomBarBtnIn.setActiveIcon(":/chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom+_pressed.png");
+        snippets.zoomBarBtnIn.setDisabledIcon(":/chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom+_disabled.png");
+        snippets.zoomBarBtnOut.setIcon(":/chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom-.png");
+        snippets.zoomBarBtnOut.setActiveIcon(":/chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom-_pressed.png");
+        snippets.zoomBarBtnOut.setDisabledIcon(":/chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom-_disabled.png");
 
-        new ActionButton("zoomBarBtnOut",
-                         "zoombar.snippet/icons/icon_zoom-.png",
-                         "zoombar.snippet/icons/icon_zoom-_pressed.png",
-                         "zoombar.snippet/icons/icon_zoom-_disabled.png",
-                         window.views.WebView.actions.zoomOut,
-                         true,true,true);
-
-        // reset toolbar timeout each time a zoom is triggered
-//        window.views.WebView.actions.zoomIn.triggered.connect(
-//            function(checked) {handleZoom();});
-//        window.views.WebView.actions.zoomOut.triggered.connect(
-//            function(checked) {handleZoom();});
         // Connect to each action's "changed" signal.
         window.views.WebView.actions.zoomIn.changed.connect(
             createDelegate(this, handleChange));
         window.views.WebView.actions.zoomOut.changed.connect(
             createDelegate(this, handleChange));
-    }
 
-    //! Set inactivity timer when not zooming.
-    function handleZoom()
-    {
-        // zoom activation toggles zoom on/off
-        zooming = !zooming; // toggle zoom state
-        clearTimeout(timeoutId);
-        if (!zooming) {
-            // close zoom after 5 secs
-            timeoutId = setTimeout('window.snippets.ZoomBarId.hide()', ZB_TIMEOUT);
-        }
-    }
-
-    //! Start inactivity timer when zoom bar is shown.
-    function handleShow()
-    {
-        timeoutId = setTimeout('window.snippets.ZoomBarId.hide()', ZB_TIMEOUT); // close zoom after 5 secs
-    }
-
-    //! Clear inactivity timer when zoom bar is hidden.
-    function handleHide()
-    {
-        clearTimeout(timeoutId);
-        zooming = false; // ensure zooming state doesn't get out of sync
     }
 
     //! Handle action object changes. In particular we are interested in
@@ -97,17 +62,11 @@
             window.snippets.ZoomButtonSnippet.setEnabled(enabled);
         }
     }
-    function handleLoadStarted() {
-        window.snippets.ZoomBarId.hide()
-    }
 
     //! After chrome is loaded, create zoombar buttons and setup show/hide
     //! handlers.
     function _chromeLoadComplete() {
         _setActions();
-        window.pageController.loadStarted.connect(handleLoadStarted);
-//        window.snippets.ZoomBarId.shown.connect(handleShow);
-//        window.snippets.ZoomBarId.hidden.connect(handleHide);
     }
 
     _zoombar_write();
Binary file ginebra2/chrome/localpages/bedrock.png has changed
Binary file ginebra2/chrome/localpages/bedrock_splash.png has changed
--- a/ginebra2/chrome/localpages/relnotes.html	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/localpages/relnotes.html	Tue Jul 06 14:03:49 2010 +0300
@@ -1,6 +1,6 @@
 <html>
   <head>
-      <title>Bedrock Browser Release Notes</title>
+      <title>Nokia Browser 8.0 Release Notes</title>
       <meta name = "viewport" content = "width = device-width, height = device-height, initial-scale = 1.0, user-scalable = no">
       <link rel="stylesheet" type="text/css" href="startpage.css"/>
   </head>
@@ -25,25 +25,25 @@
     <center>
     <a href="startpage.html" onMouseDown="pressed(1)"><img id="back_button" class="button" src="button_back.png" /></a><br/><br/>
     <b>Release Notes for<br/>
-    Bedrock Browser TRUNK VERSION</b>
+    Nokia Browser 8.0 TRUNK VERSION</b>
     <br/><br/>
-    Updated: 25-May-2010<br/>
+    Updated: 2-Jun-2010<br/>
     </center>
     <br/>NOTE: These release notes are for TRUNK version releases ONLY. When branched for final release, a final set of release notes will be replace this file.<br/>
     <br/>NOTE: These release notes were current as of the time the software was packaged for release. For up-to-date release notes, visit the Browser Team's Wiki pages.
     <br/>
     <h4>Overview of the Release:</h4>
-    <p>The Bedrock Browser is Nokia's latest web browser based on the latest open-source WebKit
+    <p>The Nokia Browser is Nokia's latest web browser based on the latest open-source WebKit
     engine and built using the Qt application framework.</p>
-    <p>The Bedrock project's mission is to provide a fast, easy to use, web-standards based browser
+    <p>The Nokia ASF Browser project's mission is to provide a fast, easy to use, web-standards based browser
       that can compete alongside the best of the mobile browsers. </p>
-    <p>This release of Bedrock is the Alpha 3 release. While the functionality has certainly has been enhanced
+    <p>This is the Alpha 4 release of the Nokia Browser. While the functionality has certainly has been enhanced
     since the Alpha 1 and 2 releases (which were released to a very limited audience) and the performance has also been improved significantly,
     the performance is still behind where we want and need it to be.</p>
     <p>Please review the rest of the Release Notes and provide feedback on this release via the feedback mechanisms on the Backstage site. </p>
     <h4>Target Platforms/Devices:</h4>
     <ul>
-    <li>The Bedrock Browser is released as a signed SIS package that can be installed on N97 devices. We recommend using a CE device with the latest
+    <li>The Nokia Browser is released as a signed SIS package that can be installed on N97 devices. We recommend using a CE device with the latest
     firmware patches as opposed to an R&D / prototype devices.</li>
     </ul>
     <h4>Prerequisites:</h4>
@@ -54,7 +54,7 @@
     <li>NOTE: It is required for this release that you install ALL of the provided software packages on the C: drive.</li>
     <li>NOTE: If you had previously installed the Alpha 1 release OR any version of the Qt framework, please review the installation notes carefully and remove older components from your device as directed..</li>
     <li>Default network setup on the device. The N97 connection settings must contain a default Destination Network of "Internet" that contains the proper access points (APs). The browser will connect to the network via this "Internet" Destination Network. </li>
-    <li>IMPORTANT: Ensure that the default access point (as defined in the connection settings for the Destination Network) is available when running the Bedrock browser. There have been cases where an unavailable WLAN AP prevented loading of pages. </li>
+    <li>IMPORTANT: Ensure that the default access point (as defined in the connection settings for the Destination Network) is available when running the browser. There have been cases where an unavailable WLAN AP prevented loading of pages. </li>
     </ul>
     <h4>Functionality to Evaluate:</h4>
     The following features are a few we encourage you to try out!
@@ -75,7 +75,7 @@
     </ul>
     <h4>Known Limitations:</h4>
     <ul>
-    <li>WebKit Performance: Although improved, there are a number of known issues with the Qt WebKit used in the release of Bedrock. Some have a major impact on performance of the engine. For example, rendering after a zoom-level change is known to be slow. See our wiki page for more details.</li>
+    <li>WebKit Performance: Although improved, there are a number of known issues with the Qt WebKit used in the release of the Browser. Some have a major impact on performance of the engine. For example, rendering after a zoom-level change is known to be slow. See our wiki page for more details.</li>
     <li>Out of Memory Handling: Handling of low memory conditions is not yet optimized for browsing large web pages. In some case, loading large or image-intensive pages can cause the browser to lock-up or crash. Please report the sites/pages to us if you experience this.</li>
     <li>UI Performance: We are still evaluating and responding to performance issues. When using this Alpha release, please be patient when performing actions. Avoid repeating the same actions quickly in response to a lack of response. Once a button or link is pressed or a touch gesture is applied, it may take some time for the resulting action to be reflected in the UI. Also, sometimes touch gestures are "lost" and you may need to repeat them to activate the control.</li>
     <li></li>
@@ -100,6 +100,10 @@
       <li>The URL entry bar is now designed to "scroll off" the top of the view when the page is scrolled up. It has been noticed that sometimes the bar will not re-display after scrolling back up.   </li>
     </ul>
     <h4>END OF RELEASE NOTES</h4>
+	<h4>&nbsp;</h4>
+	<h4>&nbsp;</h4>
+	<h4>&nbsp;</h4>
+	<h4>&nbsp;</h4>
   </div>
 </body>
 </html>
--- a/ginebra2/chrome/localpages/startpage.css	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/localpages/startpage.css	Tue Jul 06 14:03:49 2010 +0300
@@ -23,7 +23,7 @@
 	margin-left:auto;
 	margin-right:auto;
 }
-img#bedrock_logo {
+img#browser_logo {
 	height:40%;
 	display:block;
 	margin-left:auto;
--- a/ginebra2/chrome/localpages/startpage.html	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/chrome/localpages/startpage.html	Tue Jul 06 14:03:49 2010 +0300
@@ -1,6 +1,6 @@
 <html>
   <head>
-	  <title>Bedrock Browser Welcome Page</title>
+	  <title>Welcome Page</title>
 	  <meta name = "viewport" content = "width = device-width, height = device-height, initial-scale = 1.0, user-scalable = no">
 	  <link rel="stylesheet" type="text/css" href="startpage.css"/>
   </head>
@@ -23,7 +23,6 @@
 				butt2.setAttribute('class', 'button');
 				break;
 		}
-
 	}
   
   </script>
@@ -32,7 +31,7 @@
   <div id="content">
     <div id="row1_logos">
 	    <img id="nokia_logo" src="nokia_logo.png" />
-	    <img id="bedrock_logo" src="bedrock.png" />
+	    <img id="browser_logo" src="bedrock.png" />
         <div id="browser_version">
             <div id="release_version">
 	            <script type="text/javascript">
@@ -46,19 +45,19 @@
 		            //document.write("BETA");
 		            document.write("TRUNK BUILD");
 
-
+					// Get, parse, display UA String
 	                UALen = UAString.length;
-	                // NOTE: if UA String changes browser name from Bedrock to 
+	                // NOTE: if UA String changes browser name to 
 	                // something else we'll need to change the following line!
-	                nameStart = UAString.indexOf("Bedrock");
-	                // test to see if "Bedrock" is in the UA String at all
+	                nameStart = UAString.indexOf("NokiaBrowser");
+	                // test to see if "NokiaBrowser" is in the UA String at all
 	                if (nameStart < 0)
-	                    brNameVer = "NOT a Bedrock Browser";
+						brNameVer = "UA = <br/>" + UAString;
 	                else
 	                {
-	                    // crop string starting at "Bedrock"
+	                    // crop string starting at "NokiaBrowser"
 	                    brNameVer = UAString.substring(nameStart, UALen);
-	                    // limit substring to "Bedrock" and version only
+	                    // limit substring to "NokiaBrowser" and version only
 	                    brNameVer = brNameVer.substr(0, brNameVer.indexOf(" "));
 	                    // clean up string for presentation
 	                    brNameVer = brNameVer.replace("/", " v");
--- a/ginebra2/emulator/BrowserMainS60.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/emulator/BrowserMainS60.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -30,8 +30,8 @@
 MCoeMessageObserver::TMessageResponse BrowserMainAppUiS60::HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8 &aMessageParameters)
 {
     QString url = QString::fromUtf8((const char *)aMessageParameters.Ptr(), aMessageParameters.Length());
-    qDebug() << "BrowserMainAppUiS60::HandleMessageL " <<
-            QString::fromUtf16(aMessageUid.Name().Ptr(), aMessageUid.Name().Length()) << ", " << url;
+    //qDebug() << "BrowserMainAppUiS60::HandleMessageL " <<
+    //        QString::fromUtf16(aMessageUid.Name().Ptr(), aMessageUid.Name().Length()) << ", " << url;
     // I have no idea if the browser is thread-safe and what will happen when it receives this signal when it's in the middle of something else - mm
     GinebraBrowser *urlHandler = ((BrowserMainApplicationS60 *)Application())->UrlHandler();
     if (urlHandler != 0) {
@@ -58,7 +58,7 @@
 // These functions handle when an app calls QDesktopServices.openUrl when the browser isn't already started
 TBool BrowserMainAppUiS60::ProcessCommandParametersL(TApaCommand aCommand,TFileName& aFilename)
 {
-    qDebug() << "BrowserMainAppUiS60:: ProcessCmdParms2 - " << aCommand << ", " << QString::fromUtf16(aFilename.Ptr(), aFilename.Length());
+    //qDebug() << "BrowserMainAppUiS60:: ProcessCmdParms2 - " << aCommand << ", " << QString::fromUtf16(aFilename.Ptr(), aFilename.Length());
 //        ((RealBrowserApp *)QApplication::instance())->setInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
     ((BrowserMainApplicationS60 *)Application())->SetInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
     return ETrue;
@@ -66,10 +66,10 @@
 
 TBool BrowserMainAppUiS60::ProcessCommandParametersL(TApaCommand aCommand,TFileName& aFilename, const TDesC8& aTail)
 {
-    qDebug()
-            << "BrowserMainAppUiS60:: ProcessCmdParms3 - " << aCommand << ", "
-            << QString::fromUtf16(aFilename.Ptr(), aFilename.Length()) << ", "
-            << QString::fromUtf8((const char*)aTail.Ptr(), aTail.Length());
+    //qDebug()
+    //       << "BrowserMainAppUiS60:: ProcessCmdParms3 - " << aCommand << ", "
+    //       << QString::fromUtf16(aFilename.Ptr(), aFilename.Length()) << ", "
+    //       << QString::fromUtf8((const char*)aTail.Ptr(), aTail.Length());
     ((BrowserMainApplicationS60 *)Application())->SetInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
 //        ((RealBrowserApp *)QApplication::instance())->setInitialUrl(QString::fromUtf16(aFilename.Ptr(), aFilename.Length()));
     return ETrue;
@@ -93,24 +93,13 @@
 //        qDebug() << "BrowserMainDocumentS60::OpenFileL fs - " << QString::fromUtf16(name.Ptr(), name.Length());
 //    }
 
-static const TUid KUidBrowserMainApplicationS60 = { 0x1000BEEF };
-
-BrowserMainApplicationS60* BrowserMainApplicationS60::Instance()
-{
-    BrowserMainApplicationS60* pInstance = static_cast<BrowserMainApplicationS60 *>(CCoeEnv::Static(KUidBrowserMainApplicationS60));
-    if (!pInstance) {
-        pInstance = new (ELeave) BrowserMainApplicationS60;
-    }
-    return pInstance;
-}
-
 CApaDocument *BrowserMainApplicationS60::CreateDocumentL()
 {
 //    qDebug() << "BrowserMainApplicationS60::CreateDocumentL";
     return new (ELeave) BrowserMainDocumentS60(*this);
 }
 
-BrowserMainApplicationS60::BrowserMainApplicationS60() : QS60MainApplication(), CCoeStatic( KUidBrowserMainApplicationS60 ), urlHandler(0)
+BrowserMainApplicationS60::BrowserMainApplicationS60() : QS60MainApplication(), urlHandler(0)
 {
 //        CApaCommandLine* commandLine = 0;
 //        TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine);
--- a/ginebra2/emulator/BrowserMainS60.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/emulator/BrowserMainS60.h	Tue Jul 06 14:03:49 2010 +0300
@@ -29,6 +29,7 @@
 #include <QtGui>
 
 #include "browser.h"
+#include "singleton.h"
 
 /*
  * Handles calls from other apps to QDesktopServices.openUrl
@@ -54,11 +55,11 @@
     CEikAppUi *CreateAppUiL();
 };
 
-class BrowserMainApplicationS60 : public QS60MainApplication, CCoeStatic
+class BrowserMainApplicationS60 : public  QS60MainApplication
 {
-  // BrowserMainApp is a singleton so we can get at it from anywhere
+  
   public:
-    static BrowserMainApplicationS60* Instance();
+    BrowserMainApplicationS60();
     void SetInitialUrl(QString url) { initialUrl = url; }
     QString InitialUrl() { return initialUrl; }
     void setUrlHandler(GinebraBrowser *uh);
@@ -68,11 +69,11 @@
     CApaDocument *CreateDocumentL();
 
   private:
-    BrowserMainApplicationS60();
-
-  private:
     QString initialUrl;
     GinebraBrowser *urlHandler;
 };
 
+// Define the Meyer's singleton for BrowserMainApplicationS60
+typedef Singleton<BrowserMainApplicationS60, CreateGamma> CBrowserMainAppSingleton;
+
 #endif /* BROWSERMAINS60_H_ */
--- a/ginebra2/emulator/ChromeConsole.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/emulator/ChromeConsole.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -70,7 +70,6 @@
     m_historyIndex = 0;
 
     QVariant result = m_chromeWidget->page()->mainFrame()->evaluateJavaScript(expression);
-    qDebug() << result;
     return result;
 }
 
--- a/ginebra2/emulator/browser.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/emulator/browser.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 #ifndef NO_QSTM_GESTURE
 #include "WebGestureHelper.h"
 #endif
+#include "../ChromeLayout.h"
 #include "../ChromeWidget.h"
 #include "HistoryFlowView.h"
 #include "WindowFlowView.h"
@@ -45,12 +46,11 @@
 
 GinebraBrowser::GinebraBrowser(QObject * parent, QString *url)
   : QObject(parent),
+    m_scene(new QGraphicsScene()),
     m_splashScreen(NULL)
 {
   // The initial url to go to when the browser is called from another app
   if (url != 0) {
-      qDebug() << "GinebraBrowser::GinebraBrowser - initialurl=" << *url;
-//      m_initialUrl = url->mid(2);
       m_initialUrl = *url;
   }
   QString startUpChrome(BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("StartUpChrome"));
@@ -86,7 +86,7 @@
   connect(m_chrome->page(), SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show()));
 #endif
   //Create a view onto the chrome
-  m_view = new GVA::ChromeView(m_chrome);
+  m_view = new GVA::ChromeView(m_scene, m_chrome);
 #ifndef NO_QSTM_GESTURE
   WebGestureHelper* gh = new WebGestureHelper(m_view);
   browserApp->setGestureHelper(gh);
@@ -128,6 +128,7 @@
   delete WebPageController::getSingleton();
   delete m_view;
   destroySplashScreen();
+  delete m_scene;
 
 #ifndef NO_QSTM_GESTURE
   WebGestureHelper* gh = browserApp->gestureHelper();
@@ -168,11 +169,11 @@
 void GinebraBrowser::onChromeComplete()
 {
 #ifndef __gva_no_chrome__
-  ControllableViewBase *windowView = WRT::WindowFlowView::createNew(m_chrome);
+  ControllableViewBase *windowView = WRT::WindowFlowView::createNew(m_chrome->layout());
   windowView->setObjectName("WindowView");
   m_chrome->addView(windowView);
 
-  ControllableViewBase *historyView = WRT::HistoryFlowView::createNew(m_chrome);
+  ControllableViewBase *historyView = WRT::HistoryFlowView::createNew(m_chrome->layout());
   historyView->setObjectName("HistoryView");
   m_chrome->addView(historyView);
 
@@ -183,25 +184,21 @@
   //content page won't hang up rendering the chrome.
   m_chrome->addView(content);
 
-  QString chromeBaseDir = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("ChromeBaseDirectory");
+  QString chromeBaseDir = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("LocalPagesBaseDirectory");
   QString startPage = chromeBaseDir + m_contentUrl;
-  qDebug() << "GinebraBrowser::onChromeComplete: startPage: " << startPage;
 
   bool enabled = (bool) BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsInt("SaveSession");
 
   // If the browser was launched by some other app calling QDesktopServices.openUrl, go to that url
   if (!m_initialUrl.isEmpty()) {
-      qDebug() << "called from openurl, loading page " << m_initialUrl;
       openUrl(m_initialUrl);
   }
   // Otherwise, load the previous page from history (if that option is enabled)
   else if (enabled && m_initialUrl.isEmpty()) {
-    qDebug() << "loading page from history";
     WebPageController::getSingleton()->loadFromHistory();
   }
   // Otherwise, load the start page
   else {
-    qDebug() << "loading startpage " << startPage;
     content->loadUrlToCurrentPage(startPage);
   }
 
@@ -250,7 +247,6 @@
         m_view->activateWindow();
         m_view->raise();
     }
-    qDebug() << "GinebraBrowser::openUrl - " << url;
     m_contentUrl = url;
     WebPageController::getSingleton()->loadInitialUrlFromOtherApp(url);
 //    GVA::GWebContentView *webView = (GVA::GWebContentView *)m_chrome->getView("WebView");
@@ -265,7 +261,6 @@
   QString baseDir = BEDROCK_PROVISIONING::BedrockProvisioning::createBedrockProvisioning()->valueAsString("ChromeBaseDirectory");
   QString imagePath =   baseDir + splashImage;
 
-  qDebug() << "ChromeView::showSplashScreen: " << imagePath;
   if (!imagePath.isNull()) {
     m_splashScreen = new QLabel(NULL);
     m_splashScreen->setAlignment(Qt::AlignCenter);
--- a/ginebra2/emulator/browser.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/emulator/browser.h	Tue Jul 06 14:03:49 2010 +0300
@@ -59,6 +59,7 @@
   QString m_installBase;
   GVA::ChromeWidget * m_chrome;
   GVA::ChromeView * m_view;
+  QGraphicsScene *m_scene;
   QLabel *m_splashScreen;  // Owned
   QString m_initialUrl;
 };
--- a/ginebra2/emulator/main.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/emulator/main.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -116,14 +116,14 @@
 #include <hbapplication.h>
 #endif // ORBIT_UI
 
-#ifdef PLAT_101
+#ifdef OPENURL
 #include "BrowserMainS60.h"
 
 static CApaApplication *AppFactoryL()
 {
-    return(BrowserMainApplicationS60::Instance());
+    return(&CBrowserMainAppSingleton::Instance());
 }
-#endif
+#endif // OPENURL
 
 
 static void configureHtml5OfflineStorage()
@@ -215,19 +215,19 @@
 
 /* openurl should only work in Orbit UI application. */
 #ifdef ORBIT_UI
-#ifdef PLAT_101
+#ifdef OPENURL
 #ifdef NO_QSTM_GESTURE
     HbApplication app(AppFactoryL, argc, argv);
 #else
     BrowserApp app(AppFactoryL, argc, argv);
 #endif
-#else /* !PLAT_101 */
+#else /* !OPENURL */
 #ifdef NO_QSTM_GESTURE
   HbApplication app(argc, argv);
 #else // ORBIT_UI
   BrowserApp app(argc, argv);
 #endif
-#endif /* PLAT_101 */
+#endif /* OPENURL */
 #else
 #ifdef NO_QSTM_GESTURE
   QApplication app(argc, argv);
@@ -277,13 +277,12 @@
     QApplication::setKeypadNavigationEnabled(true);
 #endif
 */
-#ifdef PLAT_101
+#ifdef OPENURL
     // Handle QDesktopServices.openUrl (when browser wasn't already running)
-    QString url = BrowserMainApplicationS60::Instance()->InitialUrl();
-    qDebug() << "main - initialurl = " << url;
+    QString url = CBrowserMainAppSingleton::Instance().InitialUrl();
     GinebraBrowser * browser = new GinebraBrowser(0, &url); // Pass the initial url so it will be loaded as soon as the browser chrome finishes
     // Set things up to handle QDesktopServices.openUrl calls when browser is already running
-    BrowserMainApplicationS60::Instance()->setUrlHandler(browser);
+    CBrowserMainAppSingleton::Instance().setUrlHandler(browser);
 #else
     GinebraBrowser * browser = new GinebraBrowser();
 #endif
--- a/ginebra2/ginebra2.pro	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ginebra2.pro	Tue Jul 06 14:03:49 2010 +0300
@@ -37,6 +37,7 @@
 # Common build options, library includes (browsercore etc), and Qt settings.
 include($$ROOT_DIR/common/commonExternals.pri)
 INCLUDEPATH += $$PWD/ContentViews
+INCLUDEPATH += $$PWD/Charms
 
 
 # Gesture lib
@@ -94,13 +95,15 @@
     ChromeSnippet.h \
     LocaleDelegate.h \
     ChromeEffect.h \
+    ChromeLayout.h \
     ChromeWidget.h \
     ChromeWidgetJSObject.h \
     ChromeView.h \
-    ContentViews\GWebContentViewJSObject.h \
-    ContentViews\GWebContentViewWidget.h \
-    ContentViews\GWebContentView.h \
-    ContentViews\GContentViewTouchNavigation.h \
+    ContentViews/GWebContentViewJSObject.h \
+    ContentViews/GWebContentViewWidget.h \
+    ContentViews/GWebContentView.h \
+    ContentViews/GContentViewTouchNavigation.h \
+    ContentViews/SuperPageView.h \
     DeviceDelegate.h \
     NetworkDelegate.h \
     VisibilityAnimator.h \
@@ -111,10 +114,12 @@
     WebChromeContainerSnippet.h \
     GGraphicsWebView.h \
     GWebPage.h \
+    GSuperWebPage.h \
     GraphicsItemAnimation.h \
     NativeChromeItem.h \
     SlidingWidget.h \
-    ObjectCharm.h \
+    Charms\ObjectCharm.h \
+    Charms\ExternalEventCharm.h \
     PageSnippet.h \
     PageItem.h \
     ProgressBarItem.h \
@@ -148,7 +153,6 @@
     EditorWidget.h \
     EditorSnippet.h
 
-
 symbian: {
   contains(br_default_iap, yes) {
     DEFINES += SET_DEFAULT_IAP
@@ -156,11 +160,31 @@
   }
 }
 
+contains(br_tiled_backing_store, yes) {
+    DEFINES += BEDROCK_TILED_BACKING_STORE
+}
+
 !contains(DEFINES, NO_QSTM_GESTURE) {
     HEADERS += WebGestureHelper.h \
                WebTouchNavigation.h
 }
 
+contains(DEFINES, BEDROCK_TILED_BACKING_STORE) {
+    HEADERS += ContentViews/ScrollableWebContentView.h \
+               ContentViews/ViewportMetaData.h \
+               ContentViews/ViewportMetaDataParser.h \
+               ContentViews/WebContentAnimationItem.h \
+               ContentViews/WebContentViewWidget.h \
+               ContentViews/WebView.h \
+               Gestures/GestureEvent.h \
+               Gestures/GestureListener.h \
+               Gestures/GestureRecognizer.h \
+               Gestures/GestureRecognizer_p.h \
+               Kinetics/KineticScrollable.h \
+               Kinetics/KineticScroller.h \
+               ScrollableViewBase.h
+}
+
 SOURCES = \
     ActionButton.cpp \
     ActionButtonSnippet.cpp \
@@ -171,13 +195,15 @@
     ChromeSnippet.cpp \
     LocaleDelegate.cpp \
     ChromeEffect.cpp \
+    ChromeLayout.cpp \
     ChromeWidget.cpp \
     ChromeWidgetJSObject.cpp \
     ChromeView.cpp \
-    ContentViews\GWebContentViewJSObject.cpp \
-    ContentViews\GWebContentViewWidget.cpp \
-    ContentViews\GWebContentView.cpp \
-    ContentViews\GContentViewTouchNavigation.cpp \
+    ContentViews/GWebContentViewJSObject.cpp \
+    ContentViews/GWebContentViewWidget.cpp \
+    ContentViews/GWebContentView.cpp \
+    ContentViews/GContentViewTouchNavigation.cpp \
+    ContentViews/SuperPageView.cpp \
     DeviceDelegate.cpp \
     NetworkDelegate.cpp \
     VisibilityAnimator.cpp \
@@ -189,11 +215,13 @@
     GGraphicsWebView.cpp \
     GraphicsItemAnimation.cpp \
     GWebPage.cpp \
+    GSuperWebPage.cpp \
     NativeChromeItem.cpp \
     Snippets.cpp \
     ScriptObjects.cpp \
     SlidingWidget.cpp \
-    ObjectCharm.cpp \
+    Charms\ObjectCharm.cpp \
+    Charms\ExternalEventCharm.cpp \
     PageSnippet.cpp \
     PageItem.cpp \
     ProgressBarItem.cpp \
@@ -230,6 +258,19 @@
                WebTouchNavigation.cpp
 }
 
+contains(DEFINES, BEDROCK_TILED_BACKING_STORE) {
+    SOURCES += ContentViews/ScrollableWebContentView.cpp \
+               ContentViews/ViewportMetaData.cpp \
+               ContentViews/ViewportMetaDataParser.cpp \
+               ContentViews/WebContentAnimationItem.cpp \
+               ContentViews/WebContentViewWidget.cpp \
+               ContentViews/WebView.cpp \
+               Gestures/GestureEvent.cpp \
+               Gestures/GestureRecognizer.cpp \
+               Kinetics/KineticScroller.cpp \
+               ScrollableViewBase.cpp
+}
+
 FORMS += emulator/ui/console.ui
 
 contains(br_mobility_sysinfo, yes) {
@@ -259,31 +300,30 @@
 symbian: {
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.EPOCSTACKSIZE = 0x14000
-    contains(br_increased_heap,yes){
-    TARGET.EPOCHEAPSIZE = 0x20000 \
-        0x4000000 \
-        // \
-        Min \
-        128kB, \
-        Max \
-        64MB
-
-    emulatorHeapSize = \
-        "$${LITERAL_HASH}ifdef WINSCW" \
-        "EPOCHEAPSIZE 0x20000 0x2000000 // Min 128kB, Max 32MB" \
-        "$${LITERAL_HASH}endif"
-
-    MMP_RULES += emulatorHeapSize
-    }else{
-    TARGET.EPOCHEAPSIZE = 0x20000 \
-        0x2000000 \
-        // \
-        Min \
-        128kB, \
-        Max \
-        32MB
+    
+    lessThan(QT_MAJOR_VERSION, 4) | lessThan(QT_MINOR_VERSION, 6) | lessThan(QT_PATCH_VERSION, 3) {
+        TARGET.EPOCHEAPSIZE = 0x20000 \
+            0x4000000 \
+            // \
+            Min \
+            128kB, \
+            Max \
+            64MB
+        emulatorHeapSize = \
+            "$${LITERAL_HASH}ifdef WINSCW" \
+            "EPOCHEAPSIZE 0x20000 0x2000000 // Min 128kB, Max 32MB" \
+            "$${LITERAL_HASH}endif"
+        MMP_RULES += emulatorHeapSize
+    } else { 
+        # Set conditional Epoc Heap Size
+        EHZ.WINSCW = "EPOCHEAPSIZE 0x20000 0x2000000"
+        EHZ.default = "EPOCHEAPSIZE 0x20000 0x4000000"
+        # Add the conditional MMP rules
+        MYCONDITIONS = WINSCW
+        MYVARIABLES = EHZ
+        addMMPRules(MYCONDITIONS, MYVARIABLES)
     }
-
+    
     TARGET.CAPABILITY = All -TCB -DRM -AllFiles
     ICON = ./browserIcon.svg
     contains(browser_addon, no) {
@@ -294,8 +334,10 @@
     }
     LIBS += -lcommdb
     LIBS += -lesock -lconnmon -linsock
-contains(browser_addon, no) {
-    DEFINES += PLAT_101
+    LIBS += -lavkon -lapparc -leikcore -lcone
+    
+contains(br_openurl, yes) {
+    DEFINES += OPENURL
 }
 
 contains(br_fast_allocator, yes) {
@@ -304,27 +346,14 @@
 
     LIBS += -lhal -lsysutil
 
-    chrome.sources = ./chrome/*.htm \
-                     ./chrome/*.js \
-                     ./chrome/*.css
-    chrome.path = ./chrome
-    DEPLOYMENT += chrome
-
-    # for all chromes
-    globaljs.sources =  ./chrome/js/*.htm \
-                        ./chrome/js/*.js \
-                        ./chrome/js/*.css
-    globaljs.path = ./chrome/js
-    CHROME_DEPLOYS += globaljs
-
     # localpages
     localpages.sources =    ./chrome/localpages/*.htm* \
                             ./chrome/localpages/*.js \
                             ./chrome/localpages/*.css \
                             ./chrome/localpages/*.jpg \
                             ./chrome/localpages/*.png
-    localpages.path = ./chrome/localpages
-    CHROME_DEPLOYS += localpages
+    localpages.path = ./localpages
+    DEPLOYMENT += localpages
 
 !contains(DEFINES, NO_QSTM_GESTURE) {
     qstmgesturelib.sources = qstmgesturelib.dll
@@ -338,164 +367,6 @@
     DEPLOYMENT += brperftrace
 }
 
-    chromehtml.sources =    ./chrome/bedrockchrome/*.htm* \
-                            ./chrome/bedrockchrome/*.js \
-                            ./chrome/bedrockchrome/*.css
-    chromehtml.path = ./chrome/bedrockchrome
-    BEDROCKCHROME_DEPLOYS += chromehtml
-
-    globaljsthp.sources =   ./chrome/js/3rdparty/*.htm* \
-                            ./chrome/js/3rdparty/*.js \
-                            ./chrome/js/3rdparty/*.css
-    globaljsthp.path = ./chrome/js/3rdparty
-    CHROME_DEPLOYS += globaljsthp
-
-    globaljsjui.sources =   ./chrome/js/3rdparty/jquery-ui/*.htm* \
-                            ./chrome/js/3rdparty/jquery-ui/*.js \
-                            ./chrome/js/3rdparty/jquery-ui/*.css
-    globaljsjui.path = ./chrome/js/3rdparty/jquery-ui
-    CHROME_DEPLOYS += globaljsjui
-
-    statusbar.sources = ./chrome/bedrockchrome/statusbar.snippet/*.htm* \
-                        ./chrome/bedrockchrome/statusbar.snippet/*.js \
-                        ./chrome/bedrockchrome/statusbar.snippet/*.css
-    statusbar.path = ./chrome/bedrockchrome/statusbar.snippet
-    BEDROCKCHROME_DEPLOYS += statusbar
-
-    statusbaricons.sources = ./chrome/bedrockchrome/statusbar.snippet/icons/*.png
-    statusbaricons.path = ./chrome/bedrockchrome/statusbar.snippet/icons
-    BEDROCKCHROME_DEPLOYS += statusbaricons
-
-    statusbariconsbattery.sources = ./chrome/bedrockchrome/statusbar.snippet/icons/battery/*.png
-    statusbariconsbattery.path = ./chrome/bedrockchrome/statusbar.snippet/icons/battery
-    BEDROCKCHROME_DEPLOYS += statusbariconsbattery
-
-    statusbariconssignal.sources = ./chrome/bedrockchrome/statusbar.snippet/icons/signal/*.png
-    statusbariconssignal.path = ./chrome/bedrockchrome/statusbar.snippet/icons/signal
-    BEDROCKCHROME_DEPLOYS += statusbariconssignal
-
-    toolbar.sources =   ./chrome/bedrockchrome/toolbar.snippet/*.htm* \
-                        ./chrome/bedrockchrome/toolbar.snippet/*.js \
-                        ./chrome/bedrockchrome/toolbar.snippet/*.css
-    toolbar.path = ./chrome/bedrockchrome/toolbar.snippet
-    BEDROCKCHROME_DEPLOYS += toolbar
-
-    # Toolbar icon deployment not necessary as they are in resources
-    #toolbaricons.sources = ./chrome/bedrockchrome/toolbar.snippet/icons/*.png
-    #toolbaricons.path = ./chrome/bedrockchrome/toolbar.snippet/icons
-    #BEDROCKCHROME_DEPLOYS += toolbaricons
-
-    download.sources =  ./chrome/bedrockchrome/download.snippet/*.htm* \
-                        ./chrome/bedrockchrome/download.snippet/*.js \
-                        ./chrome/bedrockchrome/download.snippet/*.css
-    download.path = ./chrome/bedrockchrome/download.snippet
-    BEDROCKCHROME_DEPLOYS += download
-
-    downloadicons.sources = ./chrome/bedrockchrome/download.snippet/icons/*.png
-    downloadicons.path = ./chrome/bedrockchrome/download.snippet/icons
-    BEDROCKCHROME_DEPLOYS += downloadicons
-
-    contextmenu.sources =   ./chrome/bedrockchrome/contextmenu.snippet/*.htm* \
-                            ./chrome/bedrockchrome/contextmenu.snippet/*.js \
-                            ./chrome/bedrockchrome/contextmenu.snippet/*.css
-    contextmenu.path = ./chrome/bedrockchrome/contextmenu.snippet
-    BEDROCKCHROME_DEPLOYS += contextmenu
-
-    contexticons.sources = ./chrome/bedrockchrome/contextmenu.snippet/icons/*.png
-    contexticons.path = ./chrome/bedrockchrome/contextmenu.snippet/icons
-    BEDROCKCHROME_DEPLOYS += contexticons
-
-    urlsearch.sources = ./chrome/bedrockchrome/urlsearch.snippet/*.htm* \
-                        ./chrome/bedrockchrome/urlsearch.snippet/*.js \
-                        ./chrome/bedrockchrome/urlsearch.snippet/*.css
-    urlsearch.path = ./chrome/bedrockchrome/urlsearch.snippet
-    BEDROCKCHROME_DEPLOYS += urlsearch
-
-    urlsearchicons.sources = ./chrome/bedrockchrome/urlsearch.snippet/icons/*.png
-    urlsearchicons.path = ./chrome/bedrockchrome/urlsearch.snippet/icons
-    BEDROCKCHROME_DEPLOYS += urlsearchicons
-
-    suggests.sources =  ./chrome/bedrockchrome/suggests.snippet/*.htm* \
-                        ./chrome/bedrockchrome/suggests.snippet/*.js \
-                        ./chrome/bedrockchrome/suggests.snippet/*.css
-    suggests.path = ./chrome/bedrockchrome/suggests.snippet
-    BEDROCKCHROME_DEPLOYS += suggests
-
-    suggestsicons.sources = ./chrome/bedrockchrome/suggests.snippet/icons/*.png
-    suggestsicons.path = ./chrome/bedrockchrome/suggests.snippet/icons
-    BEDROCKCHROME_DEPLOYS += suggestsicons
-
-    windowcount.sources =   ./chrome/bedrockchrome/windowcount.snippet/*.htm* \
-                            ./chrome/bedrockchrome/windowcount.snippet/*.js \
-                            ./chrome/bedrockchrome/windowcount.snippet/*.css
-    windowcount.path = ./chrome/bedrockchrome/windowcount.snippet
-    BEDROCKCHROME_DEPLOYS += windowcount
-
-    networkstatus.sources = ./chrome/bedrockchrome/networkstatus.snippet/*.htm* \
-                            ./chrome/bedrockchrome/networkstatus.snippet/*.js \
-                            ./chrome/bedrockchrome/networkstatus.snippet/*.css
-    networkstatus.path = ./chrome/bedrockchrome/networkstatus.snippet
-    BEDROCKCHROME_DEPLOYS += networkstatus
-
-    networkstatusicons.sources = ./chrome/bedrockchrome/networkstatus.snippet/icons/*.png
-    networkstatusicons.path = ./chrome/bedrockchrome/networkstatus.snippet/icons
-    BEDROCKCHROME_DEPLOYS += networkstatusicons
-
-    windowcounticons.sources = ./chrome/bedrockchrome/windowcount.snippet/icons/*.png
-    windowcounticons.path = ./chrome/bedrockchrome/windowcount.snippet/icons
-    BEDROCKCHROME_DEPLOYS += windowcounticons
-
-    zoombar.sources =   ./chrome/bedrockchrome/zoombar.snippet/*.htm* \
-                        ./chrome/bedrockchrome/zoombar.snippet/*.js \
-                        ./chrome/bedrockchrome/zoombar.snippet/*.css
-    zoombar.path = ./chrome/bedrockchrome/zoombar.snippet
-    BEDROCKCHROME_DEPLOYS += zoombar
-
-    zoombaricons.sources = ./chrome/bedrockchrome/zoombar.snippet/icons/*.png
-    zoombaricons.path = ./chrome/bedrockchrome/zoombar.snippet/icons
-    BEDROCKCHROME_DEPLOYS += zoombaricons
-
-    bookmarkview.sources =  ./chrome/bedrockchrome/bookmarkview.superpage/*.htm* \
-                            ./chrome/bedrockchrome/bookmarkview.superpage/*.js \
-                            ./chrome/bedrockchrome/bookmarkview.superpage/*.css
-    bookmarkview.path = ./chrome/bedrockchrome/bookmarkview.superpage
-    BEDROCKCHROME_DEPLOYS += bookmarkview
-
-    bookmarkviewicons.sources = ./chrome/bedrockchrome/bookmarkview.superpage/icons/*.png \
-                                ./chrome/bedrockchrome/bookmarkview.superpage/icons/*.gif \
-                                ./chrome/bedrockchrome/bookmarkview.superpage/icons/*.db
-    bookmarkviewicons.path = ./chrome/bedrockchrome/bookmarkview.superpage/icons
-    BEDROCKCHROME_DEPLOYS += bookmarkviewicons
-
-    historyview.sources =   ./chrome/bedrockchrome/historyview.superpage/*.htm* \
-                            ./chrome/bedrockchrome/historyview.superpage/*.js \
-                            ./chrome/bedrockchrome/historyview.superpage/*.css
-    historyview.path = ./chrome/bedrockchrome/historyview.superpage
-    BEDROCKCHROME_DEPLOYS += historyview
-
-    historyviewicons.sources = ./chrome/bedrockchrome/historyview.superpage/icons/*.png
-    historyviewicons.path = ./chrome/bedrockchrome/historyview.superpage/icons
-    BEDROCKCHROME_DEPLOYS += historyviewicons
-
-    settingsview.sources =  ./chrome/bedrockchrome/settingsview.superpage/*.htm* \
-                            ./chrome/bedrockchrome/settingsview.superpage/*.js \
-                            ./chrome/bedrockchrome/settingsview.superpage/*.css
-    settingsview.path = ./chrome/bedrockchrome/settingsview.superpage
-    BEDROCKCHROME_DEPLOYS += settingsview
-
-    settingsviewicons.sources = ./chrome/bedrockchrome/settingsview.superpage/icons/*.png \
-                                ./chrome/bedrockchrome/settingsview.superpage/icons/*.gif \
-                                ./chrome/bedrockchrome/settingsview.superpage/icons/*.db
-    settingsviewicons.path = ./chrome/bedrockchrome/settingsview.superpage/icons
-    BEDROCKCHROME_DEPLOYS += settingsviewicons
-
-
-     # Deploy common chrome files.
-     DEPLOYMENT += $$CHROME_DEPLOYS
-
-     # Deploy bedrock chrome files.
-     DEPLOYMENT += $$BEDROCKCHROME_DEPLOYS
-
     contains(browser_addon, no) {
         HEADERS += emulator/BrowserMainS60.h
         SOURCES += emulator/BrowserMainS60.cpp
--- a/ginebra2/ginebra2.qrc	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ginebra2.qrc	Tue Jul 06 14:03:49 2010 +0300
@@ -1,29 +1,175 @@
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_back_disabled.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_disabled.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_menu.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_menu_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_add.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_add_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_add_disabled.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_toggleTB_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_disabled.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_pressed.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback.png</file>
-     <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback_pressed.png</file>
-     <file>chrome/bedrockchrome/urlsearch.snippet/icons/go_btn.png</file>
-     <file>chrome/bedrockchrome/urlsearch.snippet/icons/stop_btn.png</file>
-     <file>chrome/bedrockchrome/urlsearch.snippet/icons/refresh_btn.png</file>
-     <file>translations/browserLoc.qm</file>
-     <file>translations/browserLoc_zh.qm</file>
- </qresource>
- </RCC>
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file>translations/browserLoc.qm</file>
+    <file>translations/browserLoc_zh.qm</file>
+    <file>chrome/localpages/bedrock_splash.png</file>
+    <file>chrome/js/3rdparty/jquery-ui/effects.core.js</file>
+    <file>chrome/js/3rdparty/jquery-ui/ui.core.js</file>
+    <file>chrome/js/3rdparty/jquery-ui/effects.blind.js</file>
+    <file>chrome/js/3rdparty/jquery-ui/ui.sortable.js</file>
+    <file>chrome/js/3rdparty/jquery-1.4.2.min.js</file>
+    <file>chrome/js/LongPress.js</file>
+    <file>chrome/js/Bind.js</file>
+    <file>chrome/js/SimpleButton.js</file>
+    <file>chrome/js/Test.js</file>
+    <file>chrome/js/ContextMenu.js</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/SettingsView.html</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/settingsview.css</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/LegalNotice.html</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons.old/list_headerbg_open.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons.old/list_itembg.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons.old/list_headerarrow_open.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons.old/list_headerarrow_closed.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons.old/list_headerbg_closed.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/settingsview.js</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/no_selected.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/no_deselected.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/broom_sweep.gif</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/list_headerarrow_open.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/list_headerarrow_closed.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/yes_deselected.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/broom_sweep.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/yes_selected.png</file>    
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/delete_btn.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/delete_btn_pressed.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/yes_btn.png</file>
+    <file>chrome/bedrockchrome/settingsview.superpage/icons/yes_btn_pressed.png</file>    
+    <file>chrome/bedrockchrome/networkstatus.snippet/networkstatus.js</file>
+    <file>chrome/bedrockchrome/networkstatus.snippet/networkstatus.css</file>
+    <file>chrome/bedrockchrome/networkstatus.snippet/icons/button_dialog_ok_wait.png</file>
+    <file>chrome/bedrockchrome/networkstatus.snippet/icons/button_dialog_ok_press.png</file>
+    <file>chrome/bedrockchrome/networkstatus.snippet/icons/icon_dialog_error.png</file>
+    <file>chrome/bedrockchrome/urlsearch.snippet/icons/stop_btn.png</file>
+    <file>chrome/bedrockchrome/urlsearch.snippet/icons/stop_btn_pressed.png</file>
+    <file>chrome/bedrockchrome/urlsearch.snippet/icons/refresh_btn.png</file>
+    <file>chrome/bedrockchrome/urlsearch.snippet/icons/go_btn.png</file>
+    <file>chrome/bedrockchrome/urlsearch.snippet/icons/refresh_btn_pressed.png</file>
+    <file>chrome/bedrockchrome/urlsearch.snippet/icons/go_btn_pressed.png</file>
+    <file>chrome/bedrockchrome/prompt.snippet/prompt.js</file>
+    <file>chrome/bedrockchrome/prompt.snippet/prompt.css</file>
+    <file>chrome/bedrockchrome/prompt.snippet/icons/button_dialog_ok_wait.png</file>
+    <file>chrome/bedrockchrome/prompt.snippet/icons/button_dialog_ok_press.png</file>
+    <file>chrome/bedrockchrome/prompt.snippet/icons/icon_dialog_error.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/ContextMenu.css</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/ViewContextMenu.js</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/ContextMenu.js</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/menu_tail.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/nav_selected.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/nav_deselected.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/links_deselected.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/page_deselected.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/page_selected.png</file>
+    <file>chrome/bedrockchrome/contextmenu.snippet/icons/links_selected.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_disabled.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_back_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_partialTB.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_fullTB.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_fullTB_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_menu.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall_disabled.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_zoom.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_mostvisited.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_add.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_clearall.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_back.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_menu_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_back_disabled.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_add_pressed.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_add_disabled.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_feedback.png</file>
+    <file>chrome/bedrockchrome/toolbar.snippet/icons/icon_toggle_partialTB_pressed.png</file>
+    <file>chrome/bedrockchrome/chrome.css</file>
+    <file>chrome/bedrockchrome/historyview.superpage/clearhistorydialog.css</file>
+    <file>chrome/bedrockchrome/historyview.superpage/historyview.css</file>
+    <file>chrome/bedrockchrome/historyview.superpage/clearhistorydialog.js</file>
+    <file>chrome/bedrockchrome/historyview.superpage/historyview.js</file>
+    <file>chrome/bedrockchrome/historyview.superpage/historyView.html</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/list_headerbg_open.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_cancel_press.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/list_itembg.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/clear_history_bg.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_cancel_wait.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/list_headerarrow_open.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_ok_wait.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/list_headerarrow_closed.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/list_headerbg_closed.png</file>
+    <file>chrome/bedrockchrome/historyview.superpage/icons/button_dialog_history_clear_ok_press.png</file>
+    <file>chrome/bedrockchrome/chrome.html</file>
+    <file>chrome/bedrockchrome/windowcount.snippet/windowcount.css</file>
+    <file>chrome/bedrockchrome/windowcount.snippet/windowcount.js</file>
+    <file>chrome/bedrockchrome/windowcount.snippet/icons/emptycircle.png</file>
+    <file>chrome/bedrockchrome/windowcount.snippet/icons/filledcircle.png</file>
+    <file>chrome/bedrockchrome/chrome.js</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/zoombar.js</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/zoombar.css</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/zoom_menu_bg.png</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom+.png</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom+_disabled.png</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom-.png</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom-_disabled.png</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom+_pressed.png</file>
+    <file>chrome/bedrockchrome/zoombar.snippet/icons/icon_zoom-_pressed.png</file>
+    <file>chrome/bedrockchrome/download.snippet/download.js</file>
+    <file>chrome/bedrockchrome/download.snippet/download.css</file>
+    <file>chrome/bedrockchrome/download.snippet/icons/download_dialog_icon.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.css</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/BookmarkView.html</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/bookmarkDialog.js</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/bookmarkDialog.css</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/bookmarkview.js</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dogear.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dogear_open_bg.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_buttons_cross_pressed.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/cc0d0d-hatch.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/add_bookmark_bg.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/list_itembg.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dogear_pressed.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dogear_open_bg_pressed.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_buttons_cross.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/list_itembg_pressed.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/menu_icon_bookmarks.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_bottom.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/delete_btn.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dogear_open.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_buttons_tick_pressed.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_center.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_buttons_tick.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/dialog_top.png</file>
+    <file>chrome/bedrockchrome/bookmarkview.superpage/icons/edit_btn.png</file>
+    <file>chrome/bedrockchrome/suggests.snippet/suggests.css</file>
+    <file>chrome/bedrockchrome/suggests.snippet/suggests.html</file>
+    <file>chrome/bedrockchrome/suggests.snippet/icons/divider.png</file>
+    <file>chrome/bedrockchrome/suggests.snippet/icons/topshadow.png</file>
+    <file>chrome/bedrockchrome/suggests.snippet/icons/bottomshadow.png</file>
+    <file>chrome/bedrockchrome/suggests.snippet/suggests.js</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/statusbar.css</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/statusbar.js</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/download_statusbar_icon.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/lock.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt40.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt100.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt90.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt10.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt80.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt70.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt60.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt30.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt100_charging.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt20.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/battery/batt50.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/signal/signal25.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/signal/signal50.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/signal/signal0.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/signal/signal100.png</file>
+    <file>chrome/bedrockchrome/statusbar.snippet/icons/signal/signal75.png</file>
+    <file>chrome/bedrockchrome/outofmemory.snippet/outofmemorydialog.css</file>
+    <file>chrome/bedrockchrome/outofmemory.snippet/outofmemorydialog.js</file>
+    <file>chrome/bedrockchrome/outofmemory.snippet/icons/button_dialog_out_of_memory_ok_press.png</file>
+    <file>chrome/bedrockchrome/outofmemory.snippet/icons/button_dialog_out_of_memory_ok_wait.png</file>
+    <file>chrome/bedrockchrome/outofmemory.snippet/icons/icon_dialog_error.png</file>
+</qresource>
+</RCC>
--- a/ginebra2/linearflowsnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/linearflowsnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -201,7 +201,7 @@
 class FilmstripFlowPrivate
 {
 public:
-    FilmstripFlowPrivate(): m_bgColor(QColor(99,105,115).rgb()), m_buffer(NULL), m_titleBuffer(NULL),m_closeIcon(NULL), m_centerTopSpace(0), m_sideTopSpace(0), m_space(0), m_incIndex(0), m_centerIndex(INVALID_INDEX) {}
+    FilmstripFlowPrivate(): m_bgColor(QColor(68,88,125).rgb()), m_buffer(NULL), m_titleBuffer(NULL),m_closeIcon(NULL), m_centerTopSpace(0), m_sideTopSpace(0), m_space(0), m_incIndex(0), m_centerIndex(INVALID_INDEX) {}
 
     ~FilmstripFlowPrivate() {
         for (int i = 0; i < m_films.size(); i++)
@@ -575,16 +575,10 @@
 void FilmstripMovieFactory::addRectByFrame(FilmstripMovie* movie, QRectF& startRect, QRectF& endRect, qreal x1, qreal y1, qreal x2, qreal y2, bool debug)
 {
     movie->m_movieClips.append(startRect);
-    if (debug)
-        qDebug() << "0:" << startRect;
     for (int i = 1; i < ANIMATION_MAX_FRAME; i++) {
-        if (debug)
-            qDebug() << i << ":" << movie->m_movieClips[i - 1].adjusted(x1, y1, x2, y2);
         movie->m_movieClips.append(movie->m_movieClips[i - 1].adjusted(x1, y1, x2, y2));
     }
     movie->m_movieClips.append(endRect);
-    if (debug)
-        qDebug() << movie->m_movieClips.size() - 1 << ":"  << endRect;
 }
 
 void FilmstripMovieFactory::createLeftToCenterMovie(FilmstripMovie* movie)
@@ -1222,11 +1216,11 @@
 
     QFont font;
     font.setBold(true);
-    font.setPixelSize(13);
+    font.setPixelSize(20);
     font.setWeight(QFont::Bold);
-    painter.setPen(QColor(169,169,169));
+    painter.setPen(QColor(255,255,255));
     painter.setFont(font);
-    painter.drawText(QPointF(0,s.height() * TITLE_HEIGHT - 3),m_titleName);
+    painter.drawText(QPointF(3,s.height() * TITLE_HEIGHT),m_titleName);
 
     d->m_sideWindowSize = QSize(WIDTH * L_SIDE_WIDTH_P_C, h * L_SIDE_HEIGHT_P_C);
     d->m_centerWindowSize = QSize(WIDTH * L_CENTER_WIDTH_P_C, h * L_CENTER_HEIGHT_P_C);
@@ -1273,7 +1267,6 @@
 {
     //FIXME
     Q_ASSERT(d);
-    qDebug() << "showInsertOnLeft is not implemented.";
 }
 
 //! Show the previous item
--- a/ginebra2/mostvisitedpageview.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/mostvisitedpageview.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -31,11 +31,12 @@
 const int KLinearSnippetHeight = 120;
 
 namespace GVA {
-MostVisitedPagesWidget::MostVisitedPagesWidget(ChromeSnippet* snippet,QGraphicsWidget* parent)
-                        : ChromeItem(snippet, parent)
-                        , m_parent(parent)
-                        , m_flowInterface(0)
-                        , m_hideOnClose(true)
+MostVisitedPagesWidget::MostVisitedPagesWidget(ChromeSnippet* snippet, ChromeWidget* chrome)
+  : ChromeItem(snippet, chrome->layout())
+  , m_parent(chrome->layout())
+  , m_chrome(chrome)
+  , m_flowInterface(0)
+  , m_hideOnClose(true)
 {
     setFlags(QGraphicsItem::ItemDoesntPropagateOpacityToChildren);
     setOpacity(0.5);
@@ -116,7 +117,7 @@
 void MostVisitedPagesWidget::updatePos(QPointF pos, qreal &toolBarHeight)
 {
     QGraphicsWidget::setPos(pos);
-    m_flowInterface->setPos(pos.x(), m_parent->size().height() - toolBarHeight - KLinearSnippetHeight);
+    m_flowInterface->setPos(pos.x(), m_parent->size().height() - (toolBarHeight+5) - KLinearSnippetHeight);
 }
 
 void MostVisitedPagesWidget::resize(const QSize &size)
@@ -132,7 +133,7 @@
 
 void MostVisitedPagesWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 {
-    painter->fillRect(0, 0, size().width(), size().height(), QColor(107, 109, 107));
+    painter->fillRect(0, 0, size().width(), size().height(), QColor(255, 255, 255));
     QGraphicsWidget::paint(painter, option, widget);
 }
 
@@ -169,7 +170,7 @@
     m_flowInterface = NULL;
 
     if (m_selectIndex != -1)
-        static_cast<ChromeWidget*>(m_parent)->loadUrlToCurrentPage(m_mostVisitedPageStore->pageAt(m_selectIndex)->pageUrl());
+        m_chrome->loadUrlToCurrentPage(m_mostVisitedPageStore->pageAt(m_selectIndex)->pageUrl());
 
     if (m_snippet->isVisible() && m_hideOnClose)
         m_snippet->ChromeSnippet::toggleVisibility();
@@ -182,7 +183,7 @@
 {
     qreal toolBarHeight;
 
-    ChromeSnippet* visibleSnippet= static_cast<ChromeWidget*>(m_parent)->getSnippet("WebViewToolbarId");
+    ChromeSnippet* visibleSnippet= m_chrome->getSnippet("WebViewToolbarId");
     if (visibleSnippet)
         toolBarHeight = visibleSnippet->widget()->geometry().height();
 
@@ -198,7 +199,7 @@
     QUrl pageUrl = page->mainFrame()->url();
     int pageRank = 0;
     QImage* pageThumbnail = NULL;
-    //check if page exits in store along with its thumbnail
+    //check if page exists in store along with its thumbnail
     if (!m_mostVisitedPageStore->contains(pageUrl.toString(), true)) {
         qreal scale = 200.0 / page->viewportSize().width();
         QImage img = page->pageThumbnail(scale, scale);
--- a/ginebra2/mostvisitedpageview.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/mostvisitedpageview.h	Tue Jul 06 14:03:49 2010 +0300
@@ -21,6 +21,7 @@
 #include <QtGui>
 #include "ChromeItem.h"
 #include "ChromeSnippet.h"
+#include "ChromeWidget.h"
 
 namespace GVA {
     class LinearFlowSnippet;
@@ -34,7 +35,7 @@
     Q_OBJECT
 public :
     //construction and destruction
-    MostVisitedPagesWidget(ChromeSnippet* snippet,QGraphicsWidget* parent);
+    MostVisitedPagesWidget(ChromeSnippet* snippet, ChromeWidget* chrome);
     ~MostVisitedPagesWidget();
 
     void open();
@@ -62,6 +63,7 @@
 private :
     MostVisitedPageStore* m_mostVisitedPageStore;
     QGraphicsWidget* m_parent;
+    ChromeWidget * m_chrome;
     GVA::LinearFlowSnippet *m_flowInterface;
     int m_selectIndex;
     bool m_hideOnClose;
--- a/ginebra2/mostvisitedsnippet.cpp	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/mostvisitedsnippet.cpp	Tue Jul 06 14:03:49 2010 +0300
@@ -29,6 +29,14 @@
     m_chrome = chrome;
 }
 
+MostVisitedSnippet * MostVisitedSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
+{
+    MostVisitedSnippet* that = new MostVisitedSnippet(elementId, chrome, 0, element);
+    that->setChromeWidget( new MostVisitedPagesWidget(that, chrome) );
+    that->widget()->hide(); //TODO: Shouldn't be needed?
+    return that;
+}
+
 void MostVisitedSnippet::toggleVisibility(bool animate)
 {
     MostVisitedPagesWidget *mostVisitedPagesWidget = dynamic_cast<MostVisitedPagesWidget*>(widget());
@@ -47,10 +55,10 @@
 }
 
 
-void MostVisitedSnippet::setWidget(QGraphicsWidget * widget)
+void MostVisitedSnippet::setChromeWidget(QGraphicsWidget * widget)
 {
     connect(m_chrome , SIGNAL(aspectChanged(int)), this, SLOT(displayModeChanged(int)));
-    ChromeSnippet::setWidget(widget);
+    ChromeSnippet::setChromeWidget(widget);
     MostVisitedPagesWidget *mostVisitedPagesWidget = dynamic_cast<MostVisitedPagesWidget*>(widget);
     connect(mostVisitedPagesWidget, SIGNAL(closeComplete()), this, SIGNAL(mostVisitedSnippetCloseComplete()));
 }
@@ -64,7 +72,7 @@
     if (visibleSnippet)
         toolBarHeight = visibleSnippet->widget()->rect().height();
 
-    mostVisitedPagesWidget->resize(m_chrome->size().toSize());
+    mostVisitedPagesWidget->resize(m_chrome->layout()->size().toSize());
     mostVisitedPagesWidget->updatePos(QPointF(0, 0), toolBarHeight);
 }
 
--- a/ginebra2/mostvisitedsnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/mostvisitedsnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -32,10 +32,11 @@
     Q_OBJECT
 public:
     MostVisitedSnippet(const QString & elementId, ChromeWidget * chrome, QGraphicsWidget * widget, const QWebElement & element);
+    static MostVisitedSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     void toggleVisibility(bool animate);
     void hide(bool animate);
     void updateMVGeometry();
-    void setWidget(QGraphicsWidget * widget);
+    void setChromeWidget(QGraphicsWidget * widget);
     virtual ~MostVisitedSnippet();
     void close();
 Q_SIGNALS:
Binary file ginebra2/translations/Browser.xls has changed
Binary file ginebra2/translations/browserLoc.qm has changed
--- a/ginebra2/translations/browserLoc.ts	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/translations/browserLoc.ts	Tue Jul 06 14:03:49 2010 +0300
@@ -1,51 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
+<TS version="3.0" sourcelanguage="en_GB">
 <context>
 <message numerus="no" id="txt_browser_tag_error_tag_file_could_not_be_downloaded">
-    <comment>Info note for when there is a download error and item is not downloaded.</comment>        
+    <comment>Info note for when there is a download error and item is not downloaded, %1 is the name of the item</comment>        
     <source>Error: %1 could not be downloaded</source>
-    <translation variants="no">Error: %1 could not be downloaded</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_downloading_file</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Downloads_001</extra-loc-viewid>
     <extra-loc-positionid>dpopinfo</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_network_switch_connection">
-    <comment>Prompt shown when a new network is available to use as the browser&apos;s network connection</comment>        
-    <source>%1 is now in range.  Switch connection?</source>
-    <translation variants="no">%1 is now in range.  Switch connection?</translation>
-    <extra-loc-layout_id>txt_browser_network_switch_connection</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Network_001</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_content_view_menu_image_save_image">
-    <comment>Content View Context Menu Image tab Save Image menu item</comment>        
-    <source>Save Image</source>
-    <translation variants="no">Save Image</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_image_save_image</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001d</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_content_view_menu_nav_history">
-    <comment>Content View Context Menu Navigation tab History menu item</comment>        
-    <source>History</source>
-    <translation variants="no">History</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_content_view_browser">
-    <comment>Title of Content View.  We may not need this string, so this is a placeholder for now, just in case</comment>        
+    <comment>Title of Content View.</comment>        
     <source>Browser</source>
-    <translation variants="no">Browser</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Content_Title_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
@@ -55,27 +25,17 @@
 <message numerus="no" id="txt_browser_windows_windows">
     <comment>Title of Windows View</comment>        
     <source>Windows</source>
-    <translation variants="no">Windows</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Windows_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_most_visited">
-    <comment>For the title of the Most Visited pages grid</comment>        
-    <source>Most Visited Pages</source>
-    <translation variants="no">Most Visited Pages</translation>
-    <extra-loc-layout_id>txt_browser_content_view_most_visited</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Most_Visited_001</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_history_this_month">
     <comment>Subheading Label in History List</comment>        
     <source>This Month</source>
-    <translation variants="no">This Month</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_history_today</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
@@ -83,139 +43,79 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_bookmarks_cancel">
-    <comment>Button text when adding/editing a bookmark - right now we are using icons for this, this is a placeholder for possible future text</comment>        
+    <comment>Button text when adding/editing a bookmark</comment>        
     <source>Cancel</source>
-    <translation variants="no">Cancel</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_bookmarks_done</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Bookmarks_001a</extra-loc-viewid>
     <extra-loc-positionid>button</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_menu_tab_navigation">
-    <comment>Content View Context Menu label for Navigation tab</comment>        
-    <source>Navigation</source>
-    <translation variants="no">Navigation</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001</extra-loc-viewid>
-    <extra-loc-positionid>tab</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_page_load_failed">
-    <comment>Error info notification message</comment>        
-    <source>Page load failed</source>
-    <translation variants="no">Page load failed</translation>
-    <extra-loc-layout_id>txt_browser_page_load_failed</extra-loc-layout_id>    
+<message numerus="no" id="txt_browser_error_page_load_failed">
+    <comment>Layout ID parent. Error info notification message</comment>        
+    <source>Unable to load page</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_error_page_load_failed</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Error_Dialog_001</extra-loc-viewid>
     <extra-loc-positionid>dpopinfo</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_menu_link_open_link">
-    <comment>Content View Context Menu Link tab Open Link in New Window menu item</comment>        
-    <source>Open Link in New Window</source>
-    <translation variants="no">Open Link in New Window</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_link_open_link</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001c</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
+<message numerus="no" id="txt_browser_info_message">
+    <comment>Layout ID parent. Error info notification message</comment>        
+    <source>Info Message</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_info_message</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Error_Dialog_001</extra-loc-viewid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_most_visited_title">
-    <comment>Title for Most Visited view</comment>        
+    <comment>For the title of the Most Visited pages grid</comment>        
     <source>Most Visited</source>
-    <translation variants="no">Most Visited</translation>
-    <extra-loc-layout_id>txt_browser_most_visited_title</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Most_Visited_01</extra-loc-viewid>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_most_visited_title_most_visited</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Most_Visited_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_menu_nav_windows">
-    <comment>Content View Context Menu Navigation tab Windows menu item</comment>        
-    <source>Windows</source>
-    <translation variants="no">Windows</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_settings_clear_data_cookies">
-    <comment>In the Browser Settings, for clearing cookies</comment>        
-    <source>Cookies</source>
-    <translation variants="no">Cookies</translation>
-    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_content_view_menu_page_allow_popups">
-    <comment>Content View Context Menu Page tab Allow Pop-ups menu item</comment>        
+    <comment>Layout ID parent. Content View Context Menu Page tab Allow Pop-ups menu item</comment>        
     <source>Allow Pop-ups</source>
-    <translation variants="no">Allow Pop-ups</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_page_allow_popups</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_menu_page_block_popups">
-    <comment>Content View Context Menu Page tab Block Pop-ups menu item</comment>        
-    <source>Block Pop-ups</source>
-    <translation variants="no">Block Pop-ups</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_page_block_popups</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_settings_clear_data_all">
-    <comment>In the Browser Settings, for clearing all at once</comment>        
-    <source>Clear All</source>
-    <translation variants="no">Clear All</translation>
-    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_settings_general_settings">
     <comment>Subheader in Settings View for General Settings</comment>        
     <source>General Settings</source>
-    <translation variants="no">General Settings</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_settings_clear_data</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001</extra-loc-viewid>
-    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_windows_new_window">
-    <comment>Title of New Window in Windows View and in Content View</comment>        
+    <comment>Layout ID parent. Title displayed above a new, blank window in the Windows view.</comment>        
     <source>New Window</source>
-    <translation variants="no">New Window</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Title_001</extra-loc-viewid>
+    <extra-loc-viewid>Browser_Windows_001 </extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_menu_page_share">
-    <comment>Content View Context Menu Page tab Share menu item</comment>        
-    <source>Share</source>
-    <translation variants="no">Share</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_page_allow_popups</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_content_view_menu_nav_exit">
-    <comment>Content View Context Menu Navigation tab Exit menu item - not needed now, but for future</comment>        
-    <source>Exit</source>
-    <translation variants="no">Exit</translation>
+    <comment>Content View Context Menu Navigation tab Exit menu item</comment>        
+    <source>Exit Browser</source>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
@@ -225,219 +125,99 @@
 <message numerus="no" id="txt_short_caption_browser">
     <comment>Caption for Application Library - grid view</comment>        
     <source>Web Browser</source>
-    <translation variants="no">Web Browser</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>qtl_grid_applications_sec</extra-loc-layout_id>    
     <extra-loc-viewid>browser</extra-loc-viewid>
     <extra-loc-positionid>grid</extra-loc-positionid>
     <extra-loc-feature>br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_settings_general_settings_save_browser_history">
-    <comment>In the Browser Settings, for saving history</comment>        
-    <source>Save Browser History</source>
-    <translation variants="no">Save Browser History</translation>
-    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_chrome_suggests_search_for">
-    <comment></comment>        
+    <comment>Displayed in the URL bar search suggestions drop-down menu, %1 is the search string</comment>        
     <source>Search for %1</source>
-    <translation variants="no">Search for %1</translation>
-    <extra-loc-layout_id></extra-loc-layout_id>    
-    <extra-loc-viewid></extra-loc-viewid>
-    <extra-loc-positionid></extra-loc-positionid>
-    <extra-loc-feature></extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_long_caption_browser">
-    <comment>Caption for Application Library - list view</comment>        
-    <source>Web Browser</source>
-    <translation variants="no">Web Browser</translation>
-    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>browser</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>br</extra-loc-feature>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_chrome_suggests_search_for</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_URLbar_001</extra-loc-viewid>
+    <extra-loc-positionid>opt</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_content_view_menu_nav_settings">
     <comment>Content View Context Menu Navigation tab Settings menu item</comment>        
     <source>Settings</source>
-    <translation variants="no">Settings</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_content_view_menu_nav_bookmarks">
-    <comment>Content View Context Menu Navigation tab Bookmarks menu item</comment>        
-    <source>Bookmarks</source>
-    <translation variants="no">Bookmarks</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_content_view_menu_tab_image">
-    <comment>Content View Context Menu Image tab</comment>        
-    <source>Image</source>
-    <translation variants="no">Image</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001</extra-loc-viewid>
-    <extra-loc-positionid>tab</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_content_view_menu_link_share_link">
-    <comment>Content View Context Menu Link tab Share Link menu item</comment>        
-    <source>Share Link</source>
-    <translation variants="no">Share Link</translation>
-    <extra-loc-layout_id>txt_browser_content_view_menu_link_open_link</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001c</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_content_view_menu_tab_link">
     <comment>Content View Context Menu Link tab</comment>        
     <source>Link</source>
-    <translation variants="no">Link</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001</extra-loc-viewid>
+    <extra-loc-viewid>Browser_Content_Context_Menu_001c</extra-loc-viewid>
     <extra-loc-positionid>tab</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_browser_content_view_menu_nav_bookmarks">
+    <comment>Layout ID parent. Content View Context Menu Navigation tab Bookmarks menu item</comment>        
+    <source>Bookmarks</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_browser_content_view_menu_tab_link_image">
-    <comment>Content View Context Menu Link/Image tab</comment>        
+    <comment>Content View Context Menu Link/Image tab - this tab is for images that are also links.  So under it are: &quot;open link in new window&quot;, &quot;share link&quot;, &quot;save image&quot;</comment>        
     <source>Link/Image</source>
-    <translation variants="no">Link/Image</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Content_Context_Menu_001</extra-loc-viewid>
     <extra-loc-positionid>tab</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_offline">
-    <comment></comment>        
-    <source>Offline</source>
-    <translation variants="no">Offline</translation>
-    <extra-loc-layout_id></extra-loc-layout_id>    
-    <extra-loc-viewid></extra-loc-viewid>
-    <extra-loc-positionid></extra-loc-positionid>
-    <extra-loc-feature></extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_settings_clear_data">
-    <comment>Subheader in Settings View for Clear Data</comment>        
+    <comment>Layout ID parent. Subheader in Settings View for Clear Data</comment>        
     <source>Clear Data</source>
-    <translation variants="no">Clear Data</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_settings_clear_data</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001</extra-loc-viewid>
-    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_settings_clear_data_cache">
-    <comment>In the Browser Settings, for clearing cache</comment>        
+    <comment>Layout ID parent. In the Browser Settings, for clearing cache</comment>        
     <source>Cache</source>
-    <translation variants="no">Cache</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
     <extra-loc-positionid>list</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_file_has_finished_downloading">
-    <comment>Info note for when an item has finished downloading.</comment>        
-    <source>%1 has finished downloading</source>
-    <translation variants="no">%1 has finished downloading</translation>
-    <extra-loc-layout_id>txt_browser_downloading_file</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Downloads_001</extra-loc-viewid>
-    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_windows_blank">
-    <comment>Title displayed above a new, blank window in the Windows view.</comment>        
-    <source>New Window</source>
-    <translation variants="no">New Window</translation>
-    <extra-loc-layout_id>txt_browser_windows_blank</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Windows_001 </extra-loc-viewid>
+<message numerus="no" id="txt_browser_bookmarks_bookmarks">
+    <comment>Page title in Bookmarks View</comment>        
+    <source>Bookmarks</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Bookmarks_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_settings_general_settings_character_encoding">
-    <comment>In the Browser Settings, for character encoding</comment>        
-    <source>Character Encoding</source>
-    <translation variants="no">Character Encoding</translation>
-    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001</extra-loc-viewid>
-    <extra-loc-positionid>formlabel_1</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_settings_general_settings_yes">
-    <comment>In the Browser Settings, for setting an option to Yes, also in Browser Network connection dialog</comment>        
-    <source>Yes</source>
-    <translation variants="no">Yes</translation>
-    <extra-loc-layout_id>txt_browser_settings_general_settings_yes</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001, Browser_Network_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_bookmarks_done">
-    <comment>Button text when adding/editing a bookmark - right now we are using icons for this, this is a placeholder for possible future text</comment>        
-    <source>Done</source>
-    <translation variants="no">Done</translation>
-    <extra-loc-layout_id>txt_browser_bookmarks_done</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Bookmarks_001a</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_settings_general_settings_save_forms_passwords">
-    <comment>In the Browser Settings, for saving forms and passwords</comment>        
-    <source>Save Forms/Passwords</source>
-    <translation variants="no">Save Forms/Passwords</translation>
-    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_history_delete_are_you_sure">
-    <comment>Dialog displayed in the History View when a user clears their History</comment>        
-    <source>Are you sure you want to permanently delete your history?</source>
-    <translation variants="no">Are you sure you want to permanently delete your history?</translation>
-    <extra-loc-layout_id>txt_browser_history_delete_are_you_sure</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_url_bar_drop_down_search_for">
-    <comment>Displayed in the URL bar search suggestions drop-down menu</comment>        
-    <source>Search for %1</source>
-    <translation variants="no">Search for %1</translation>
-    <extra-loc-layout_id>txt_browser_url_bar_drop_down_search_for</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_URLbar_001</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_bookmarks_bookmarks">
-    <comment>Page title in Bookmarks View</comment>        
-    <source>Bookmarks</source>
-    <translation variants="no">Bookmarks</translation>
-    <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Bookmarks_001</extra-loc-viewid>
+<message numerus="no" id="txt_browser_content_view_new_window">
+    <comment>Title of New Window in Content View</comment>        
+    <source>New Window</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_new_window</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Title_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
@@ -445,7 +225,7 @@
 <message numerus="no" id="txt_browser_history_history">
     <comment>Title of History View</comment>        
     <source>History</source>
-    <translation variants="no">History</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
@@ -455,7 +235,7 @@
 <message numerus="no" id="txt_browser_settings_settings">
     <comment>Title of Settings View</comment>        
     <source>Settings</source>
-    <translation variants="no">Settings</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_windows_new_window</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Settings_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
@@ -463,9 +243,9 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_history_today">
-    <comment>Subheading Label in History List</comment>        
+    <comment>Layout ID parent. Subheading Label in History List</comment>        
     <source>Today</source>
-    <translation variants="no">Today</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_history_today</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
@@ -473,144 +253,414 @@
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_settings_general_settings_no">
-    <comment>In the Browser Settings, for setting an option to No, also in Browser Network connection dialog</comment>        
+    <comment>In the Browser Settings, for setting an option to No</comment>        
     <source>No</source>
-    <translation variants="no">No</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_settings_general_settings_yes</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001, Browser_Network_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_settings_clear_data_history">
-    <comment>In the Browser Settings, for clearing history</comment>        
-    <source>History</source>
-    <translation variants="no">History</translation>
-    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>setlabel_1_2_val</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_content_view_menu_page_add_bookmark">
     <comment>Content View Context Menu Page tab Add Bookmark menu item</comment>        
     <source>Add Bookmark</source>
-    <translation variants="no">Add Bookmark</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_page_allow_popups</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_history_yesterday">
-    <comment>Subheading Label in History List</comment>        
-    <source>Yesterday</source>
-    <translation variants="no">Yesterday</translation>
-    <extra-loc-layout_id>txt_browser_history_today</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
-    <extra-loc-positionid>subhead</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_settings_clear_data_bookmarks">
-    <comment>In the Browser Settings, for clearing bookmarks</comment>        
-    <source>Bookmarks</source>
-    <translation variants="no">Bookmarks</translation>
-    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_browser_input_dial_add_bm">
-    <comment>Title for bookmarks input editor for adding a bm</comment>        
-    <source>Add Bookmark</source>
-    <translation variants="no">Add Bookmark</translation>
-    <extra-loc-layout_id>txt_browser_input_dial_add_bm</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Dialog_01</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 <message numerus="no" id="txt_browser_downloading_file">
-    <comment>Info note for when a new item starts downloading</comment>        
+    <comment>Layout ID parent. Info note for when a new item starts downloading, %1 is the name of the item that is downloading</comment>        
     <source>Downloading %1</source>
-    <translation variants="no">Downloading %1</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_downloading_file</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_Downloads_001</extra-loc-viewid>
     <extra-loc-positionid>dpopinfo</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_settings_general_settings_character_encoding_automatic">
-    <comment>In the Browser Settings, drop-down menu item for character encoding.  Automatic is the default item.</comment>        
-    <source>Automatic</source>
-    <translation variants="no">Automatic</translation>
-    <extra-loc-layout_id>txt_browser_settings_general_settings_character_encoding_automatic</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001c</extra-loc-viewid>
-    <extra-loc-positionid>formlabel_1_val</extra-loc-positionid>
+<message numerus="no" id="txt_browser_content_view_menu_page_block_popups">
+    <comment>Content View Context Menu Page tab Block Pop-ups menu item</comment>        
+    <source>Block Popups</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_page_allow_popups</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_browser_content_view_menu_tab_page">
     <comment>Content View Context Menu label for Page tab</comment>        
     <source>Page</source>
-    <translation variants="no">Page</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Content_Context_Menu_001</extra-loc-viewid>
+    <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
+    <extra-loc-positionid>tab</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_clear_data_form_data">
+    <comment>In the Browser Settings, for clearing form data</comment>        
+    <source>Form Data</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_error_dialog_close_some">
+    <comment>Error dialog shown when device is running out of memory.</comment>        
+    <source>Close some browser windows or applications.</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_error_dialog_device_low</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Memory_Low_Dialog_001</extra-loc-viewid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_nav_history">
+    <comment>Content View Context Menu Navigation tab History menu item</comment>        
+    <source>History</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_image_save_image">
+    <comment>Content View Context Menu Image tab Save Image menu item</comment>        
+    <source>Save Image</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_image_save_image</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001d</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_network_switch_connection">
+    <comment>Prompt shown when a new network is available to use as the browser&apos;s network connection, %1 is the network name</comment>        
+    <source>%1 is now in range.  Switch connection?</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_network_switch_connection</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Network_001</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_tab_navigation">
+    <comment>Layout ID parent. Content View Context Menu label for Navigation tab</comment>        
+    <source>Navigation</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
     <extra-loc-positionid>tab</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_history_this_week">
+<message numerus="no" id="txt_browser_content_view_menu_link_open_link">
+    <comment>Layout ID parent. Content View Context Menu Link tab Open Link in New Window menu item</comment>        
+    <source>Open Link in New Window</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_link_open_link</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001c</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_clear_data_cookies">
+    <comment>In the Browser Settings, for clearing cookies</comment>        
+    <source>Cookies</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_nav_windows">
+    <comment>Content View Context Menu Navigation tab Windows menu item</comment>        
+    <source>Windows</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_nav_bookmarks</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001a</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_clear_data_all">
+    <comment>In the Browser Settings, for clearing all at once</comment>        
+    <source>Clear All</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_page_share">
+    <comment>Content View Context Menu Page tab Share menu item</comment>        
+    <source>Share</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_page_allow_popups</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001b</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_general_settings_save_browser_history">
+    <comment>Layout ID parent. In the Browser Settings, for saving history</comment>        
+    <source>Save Browser History</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>setlabel_1</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_long_caption_browser">
+    <comment>Caption for Application Library - list view</comment>        
+    <source>Web Browser</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>browser</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_error_generic_error_msg">
+    <comment>Generic error message in dialog when the network does not send an error.</comment>        
+    <source>Network error</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_error_page_load_failed</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Error_Dialog_001</extra-loc-viewid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_network_switch_connection_yes">
+    <comment>Layout ID parent. In the Browser Network switch connection dialog</comment>        
+    <source>Yes</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_network_switch_connection_yes</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Network_001</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_link_share_link">
+    <comment>Content View Context Menu Link tab Share Link menu item</comment>        
+    <source>Share Link</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_link_open_link</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001c</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_content_view_menu_tab_image">
+    <comment>Content View Context Menu Image tab</comment>        
+    <source>Image</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_content_view_menu_tab_navigation</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Context_Menu_001d</extra-loc-viewid>
+    <extra-loc-positionid>tab</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_offline">
+    <comment>Status of browser connection, shown next to Page Title in Browser status bar in Content View</comment>        
+    <source>Offline</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_offline</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Content_Title_001</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_file_has_finished_downloading">
+    <comment>Info note for when an item has finished downloading, %1 is the name of the item that has been downloaded</comment>        
+    <source>%1 has finished downloading</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_downloading_file</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Downloads_001</extra-loc-viewid>
+    <extra-loc-positionid>dpopinfo</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_general_settings_yes">
+    <comment>Layout ID parent. In the Browser Settings, for setting an option to Yes</comment>        
+    <source>Yes</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_general_settings_yes</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>setlabel_1_2_val</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_general_settings_character_encoding">
+    <comment>In the Browser Settings, for character encoding</comment>        
+    <source>Character Encoding</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>formlabel_1</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_bookmarks_done">
+    <comment>Layout ID parent. Button text when adding/editing a bookmark</comment>        
+    <source>Done</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_bookmarks_done</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Bookmarks_001a</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_network_switch_connection_no">
+    <comment>In the Browser Network switch connection dialog</comment>        
+    <source>No</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_network_switch_connection_yes</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Network_001</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_general_settings_save_forms_passwords">
+    <comment>In the Browser Settings, for saving forms and passwords</comment>        
+    <source>Save Forms/Passwords</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>setlabel_2</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_history_delete_are_you_sure">
+    <comment>Dialog displayed in the History View when a user clears their History</comment>        
+    <source>Are you sure you want to permanently delete your history?</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_history_delete_are_you_sure</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_clear_data_history">
+    <comment>In the Browser Settings, for clearing history</comment>        
+    <source>History</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_general_settings_about">
+    <comment>In the Browser Settings, for info about the browser (version info etc)</comment>        
+    <source>About Browser</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_general_settings_save_browser_history</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_error_dialog_device_low">
+    <comment>Layout ID parent.  Error dialog shown when device is running out of memory.</comment>        
+    <source>Device Low On Memory</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_error_dialog_device_low</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Memory_Low_Dialog_001</extra-loc-viewid>
+    <extra-loc-positionid>dpophead</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_settings_clear_data_bookmarks">
+    <comment>In the Browser Settings, for clearing bookmarks</comment>        
+    <source>Bookmarks</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_history_yesterday">
     <comment>Subheading Label in History List</comment>        
-    <source>This Week</source>
-    <translation variants="no">This Week</translation>
+    <source>Yesterday</source>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_history_today</extra-loc-layout_id>    
     <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
     <extra-loc-positionid>subhead</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_input_dial_edit_bm">
-    <comment>Title for bookmarks input editor for editing a bm</comment>        
-    <source>Edit Bookmark</source>
-    <translation variants="no">Edit Bookmark</translation>
+<message numerus="no" id="txt_browser_settings_general_settings_character_encoding_automatic">
+    <comment>Layout ID parent. In the Browser Settings, drop-down menu item for character encoding.  Automatic is the default item.</comment>        
+    <source>Automatic</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_settings_general_settings_character_encoding_automatic</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
+    <extra-loc-positionid>formlabel_1_val</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_browser_input_dial_add_bm">
+    <comment>Layout ID parent. Title for bookmarks dialog for adding a bm</comment>        
+    <source>Add Bookmark</source>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_input_dial_add_bm</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Dialog_01</extra-loc-viewid>
+    <extra-loc-viewid>Browser_Bookmark_Dialog_001</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_browser_history_this_week">
+    <comment>Subheading Label in History List</comment>        
+    <source>This Week</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_history_today</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_History_001</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_tsw_caption_browser">
     <comment>Caption for Task Switcher</comment>        
     <source>Web Browser</source>
-    <translation variants="no">Web Browser</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_tsw_caption_browser</extra-loc-layout_id>    
     <extra-loc-viewid>tsw_01</extra-loc-viewid>
     <extra-loc-positionid>caption</extra-loc-positionid>
     <extra-loc-feature>ts</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
+<message numerus="no" id="txt_browser_input_dial_edit_bm">
+    <comment>Title for bookmarks dialog for editing a bm</comment>        
+    <source>Edit Bookmark</source>
+    <translation variants="no" type="unfinished"></translation>
+    <extra-loc-layout_id>txt_browser_input_dial_add_bm</extra-loc-layout_id>    
+    <extra-loc-viewid>Browser_Bookmark_Dialog_001</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>Br</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
 <message numerus="no" id="txt_browser_settings_general_settings_character_encoding_unicode">
     <comment>In the Browser Settings, drop-down menu item for character encoding</comment>        
     <source>Unicode</source>
-    <translation variants="no">Unicode</translation>
+    <translation variants="no" type="unfinished"></translation>
     <extra-loc-layout_id>txt_browser_settings_general_settings_character_encoding_automatic</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001c</extra-loc-viewid>
+    <extra-loc-viewid>Browser_Settings_001b</extra-loc-viewid>
     <extra-loc-positionid>formlabel_1_val</extra-loc-positionid>
     <extra-loc-feature>Br</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_browser_settings_clear_data_form_data">
-    <comment>In the Browser Settings, for clearing form data</comment>        
-    <source>Form Data</source>
-    <translation variants="no">Form Data</translation>
-    <extra-loc-layout_id>txt_browser_settings_clear_data_cache</extra-loc-layout_id>    
-    <extra-loc-viewid>Browser_Settings_001a</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Br</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
 </context>
 </TS>
--- a/rom/browser.iby	Wed Jun 23 17:59:43 2010 +0300
+++ b/rom/browser.iby	Tue Jul 06 14:03:49 2010 +0300
@@ -1,24 +1,25 @@
+
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
 *
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, version 2.1 of the License.
-* 
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
 *
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not, 
-* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
+* Contributors:
 *
 * Description:
 *
 */
 
+/*
+ *  DO NOT MODIFY BY HAND - this file was automagically generated by the
+ *  generate-rom-iby.bat script
+ */
 
 #ifndef BROWSER_IBY
 #define BROWSER_IBY
@@ -41,158 +42,28 @@
 data=DATAZ_\RESOURCE_FILES_DIR\apps\NokiaBrowser.rsc  resource\apps\NokiaBrowser.rsc
 data=DATAZ_\private\10003a3f\import\apps\NokiaBrowser_reg.rsc  private\10003a3f\import\apps\NokiaBrowser_reg.rsc
 data=DATAZ_\RESOURCE_FILES_DIR\apps\NokiaBrowser.mif  resource\apps\NokiaBrowser.mif
-data=\sf\app\browserui\ginebra2\chrome\js\ActionButton.js  private\10008D39\chrome\js\ActionButton.js
-data=\sf\app\browserui\ginebra2\chrome\js\Bind.js  private\10008D39\chrome\js\Bind.js
-data=\sf\app\browserui\ginebra2\chrome\js\ContextMenu.js  private\10008D39\chrome\js\ContextMenu.js
-data=\sf\app\browserui\ginebra2\chrome\js\LongPress.js  private\10008D39\chrome\js\LongPress.js
-data=\sf\app\browserui\ginebra2\chrome\js\SimpleButton.js  private\10008D39\chrome\js\SimpleButton.js
-data=\sf\app\browserui\ginebra2\chrome\js\Test.js  private\10008D39\chrome\js\Test.js
-data=\sf\app\browserui\ginebra2\chrome\localpages\installnotes.html  private\10008D39\chrome\localpages\installnotes.html
-data=\sf\app\browserui\ginebra2\chrome\localpages\relnotes.html  private\10008D39\chrome\localpages\relnotes.html
-data=\sf\app\browserui\ginebra2\chrome\localpages\startpage.html  private\10008D39\chrome\localpages\startpage.html
-data=\sf\app\browserui\ginebra2\chrome\localpages\startpage_101.html  private\10008D39\chrome\localpages\startpage_101.html
-data=\sf\app\browserui\ginebra2\chrome\localpages\startpage.css  private\10008D39\chrome\localpages\startpage.css
-data=\sf\app\browserui\ginebra2\chrome\localpages\subpage.css  private\10008D39\chrome\localpages\subpage.css
-data=\sf\app\browserui\ginebra2\chrome\localpages\grad_tall.jpg  private\10008D39\chrome\localpages\grad_tall.jpg
-data=\sf\app\browserui\ginebra2\chrome\localpages\back.png  private\10008D39\chrome\localpages\back.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\bedrock.png  private\10008D39\chrome\localpages\bedrock.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\bedrock_splash.png  private\10008D39\chrome\localpages\bedrock_splash.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button1.png  private\10008D39\chrome\localpages\button1.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button2.png  private\10008D39\chrome\localpages\button2.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button3.png  private\10008D39\chrome\localpages\button3.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button4.png  private\10008D39\chrome\localpages\button4.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button_back.png  private\10008D39\chrome\localpages\button_back.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button_del.png  private\10008D39\chrome\localpages\button_del.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button_rel_notes.png  private\10008D39\chrome\localpages\button_rel_notes.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button_report_bug.png  private\10008D39\chrome\localpages\button_report_bug.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button_search_google.png  private\10008D39\chrome\localpages\button_search_google.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\button_survey.png  private\10008D39\chrome\localpages\button_survey.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\google.png  private\10008D39\chrome\localpages\google.png
-data=\sf\app\browserui\ginebra2\chrome\localpages\nokia_logo.png  private\10008D39\chrome\localpages\nokia_logo.png
-data=\sf\app\browserui\ginebra2\chrome\js\3rdparty\jquery-1.4.2.min.js  private\10008D39\chrome\js\3rdparty\jquery-1.4.2.min.js
-data=\sf\app\browserui\ginebra2\chrome\js\3rdparty\jquery-ui\effects.blind.js  private\10008D39\chrome\js\3rdparty\jquery-ui\effects.blind.js
-data=\sf\app\browserui\ginebra2\chrome\js\3rdparty\jquery-ui\effects.core.js  private\10008D39\chrome\js\3rdparty\jquery-ui\effects.core.js
-data=\sf\app\browserui\ginebra2\chrome\js\3rdparty\jquery-ui\ui.core.js  private\10008D39\chrome\js\3rdparty\jquery-ui\ui.core.js
-data=\sf\app\browserui\ginebra2\chrome\js\3rdparty\jquery-ui\ui.sortable.js  private\10008D39\chrome\js\3rdparty\jquery-ui\ui.sortable.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\chrome.html  private\10008D39\chrome\bedrockchrome\chrome.html
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\chrome.js  private\10008D39\chrome\bedrockchrome\chrome.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\chrome.css  private\10008D39\chrome\bedrockchrome\chrome.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\statusbar.js  private\10008D39\chrome\bedrockchrome\statusbar.snippet\statusbar.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\statusbar.css  private\10008D39\chrome\bedrockchrome\statusbar.snippet\statusbar.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\download_statusbar_icon.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\download_statusbar_icon.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\lock.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\lock.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt10.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt10.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt100.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt100.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt100_charging.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt100_charging.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt20.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt20.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt30.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt30.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt40.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt40.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt50.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt50.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt60.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt60.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt70.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt70.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt80.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt80.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt90.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\battery\batt90.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal0.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal0.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal100.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal100.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal25.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal25.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal50.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal50.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal75.png  private\10008D39\chrome\bedrockchrome\statusbar.snippet\icons\signal\signal75.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\download.snippet\download.js  private\10008D39\chrome\bedrockchrome\download.snippet\download.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\download.snippet\download.css  private\10008D39\chrome\bedrockchrome\download.snippet\download.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\download.snippet\icons\download_dialog_icon.png  private\10008D39\chrome\bedrockchrome\download.snippet\icons\download_dialog_icon.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\ContextMenu.js  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\ContextMenu.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\ViewContextMenu.js  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\ViewContextMenu.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\ContextMenu.css  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\ContextMenu.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\links_deselected.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\links_deselected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\links_selected.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\links_selected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\menu_tail.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\menu_tail.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\nav_deselected.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\nav_deselected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\nav_selected.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\nav_selected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\page_deselected.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\page_deselected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\contextmenu.snippet\icons\page_selected.png  private\10008D39\chrome\bedrockchrome\contextmenu.snippet\icons\page_selected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\urlsearch.snippet\icons\go_btn.png  private\10008D39\chrome\bedrockchrome\urlsearch.snippet\icons\go_btn.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\urlsearch.snippet\icons\go_btn_pressed.png  private\10008D39\chrome\bedrockchrome\urlsearch.snippet\icons\go_btn_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\urlsearch.snippet\icons\refresh_btn.png  private\10008D39\chrome\bedrockchrome\urlsearch.snippet\icons\refresh_btn.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\urlsearch.snippet\icons\refresh_btn_pressed.png  private\10008D39\chrome\bedrockchrome\urlsearch.snippet\icons\refresh_btn_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\urlsearch.snippet\icons\stop_btn.png  private\10008D39\chrome\bedrockchrome\urlsearch.snippet\icons\stop_btn.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\urlsearch.snippet\icons\stop_btn_pressed.png  private\10008D39\chrome\bedrockchrome\urlsearch.snippet\icons\stop_btn_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\suggests.snippet\suggests.html  private\10008D39\chrome\bedrockchrome\suggests.snippet\suggests.html
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\suggests.snippet\suggests.js  private\10008D39\chrome\bedrockchrome\suggests.snippet\suggests.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\suggests.snippet\suggests.css  private\10008D39\chrome\bedrockchrome\suggests.snippet\suggests.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\suggests.snippet\icons\bottomshadow.png  private\10008D39\chrome\bedrockchrome\suggests.snippet\icons\bottomshadow.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\suggests.snippet\icons\divider.png  private\10008D39\chrome\bedrockchrome\suggests.snippet\icons\divider.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\suggests.snippet\icons\topshadow.png  private\10008D39\chrome\bedrockchrome\suggests.snippet\icons\topshadow.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\windowcount.snippet\windowcount.js  private\10008D39\chrome\bedrockchrome\windowcount.snippet\windowcount.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\windowcount.snippet\windowcount.css  private\10008D39\chrome\bedrockchrome\windowcount.snippet\windowcount.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\networkstatus.snippet\networkstatus.js  private\10008D39\chrome\bedrockchrome\networkstatus.snippet\networkstatus.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\networkstatus.snippet\networkstatus.css  private\10008D39\chrome\bedrockchrome\networkstatus.snippet\networkstatus.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\networkstatus.snippet\icons\button_dialog_ok_press.png  private\10008D39\chrome\bedrockchrome\networkstatus.snippet\icons\button_dialog_ok_press.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\networkstatus.snippet\icons\button_dialog_ok_wait.png  private\10008D39\chrome\bedrockchrome\networkstatus.snippet\icons\button_dialog_ok_wait.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\networkstatus.snippet\icons\icon_dialog_error.png  private\10008D39\chrome\bedrockchrome\networkstatus.snippet\icons\icon_dialog_error.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\windowcount.snippet\icons\emptycircle.png  private\10008D39\chrome\bedrockchrome\windowcount.snippet\icons\emptycircle.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\windowcount.snippet\icons\filledcircle.png  private\10008D39\chrome\bedrockchrome\windowcount.snippet\icons\filledcircle.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\zoombar.js  private\10008D39\chrome\bedrockchrome\zoombar.snippet\zoombar.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\zoombar.css  private\10008D39\chrome\bedrockchrome\zoombar.snippet\zoombar.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom+.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom+.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom+_disabled.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom+_disabled.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom+_pressed.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom+_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom-.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom-.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom-_disabled.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom-_disabled.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom-_pressed.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\icon_zoom-_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\zoombar.snippet\icons\zoom_menu_bg.png  private\10008D39\chrome\bedrockchrome\zoombar.snippet\icons\zoom_menu_bg.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\BookmarkView.html  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\BookmarkView.html
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\bookmarkDialog.js  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\bookmarkDialog.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\bookmarkview.js  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\bookmarkview.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\bookmarkDialog.css  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\bookmarkDialog.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\bookmarkview.css  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\bookmarkview.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\add_bookmark_bg.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\add_bookmark_bg.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\cc0d0d-hatch.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\cc0d0d-hatch.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\delete_btn.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\delete_btn.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_bottom.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_bottom.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_cross.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_cross.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_cross_pressed.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_cross_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_tick.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_tick.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_tick_pressed.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_buttons_tick_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_center.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_center.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_top.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dialog_top.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_open.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_open.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_open_bg.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_open_bg.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_open_bg_pressed.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_open_bg_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_pressed.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\dogear_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\edit_btn.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\edit_btn.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\list_itembg.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\list_itembg.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\list_itembg_pressed.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\list_itembg_pressed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\bookmarkview.superpage\icons\menu_icon_bookmarks.png  private\10008D39\chrome\bedrockchrome\bookmarkview.superpage\icons\menu_icon_bookmarks.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\historyView.html  private\10008D39\chrome\bedrockchrome\historyview.superpage\historyView.html
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\clearhistorydialog.js  private\10008D39\chrome\bedrockchrome\historyview.superpage\clearhistorydialog.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\historyview.js  private\10008D39\chrome\bedrockchrome\historyview.superpage\historyview.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\clearhistorydialog.css  private\10008D39\chrome\bedrockchrome\historyview.superpage\clearhistorydialog.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\historyview.css  private\10008D39\chrome\bedrockchrome\historyview.superpage\historyview.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_cancel_press.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_cancel_press.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_cancel_wait.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_cancel_wait.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_ok_press.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_ok_press.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_ok_wait.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\button_dialog_history_clear_ok_wait.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\clear_history_bg.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\clear_history_bg.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\dialog_bottom.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\dialog_bottom.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\dialog_center.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\dialog_center.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\dialog_top.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\dialog_top.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\list_headerarrow_closed.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\list_headerarrow_closed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\list_headerarrow_open.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\list_headerarrow_open.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\list_headerbg_closed.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\list_headerbg_closed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\list_headerbg_open.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\list_headerbg_open.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\historyview.superpage\icons\list_itembg.png  private\10008D39\chrome\bedrockchrome\historyview.superpage\icons\list_itembg.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\SettingsView.html  private\10008D39\chrome\bedrockchrome\settingsview.superpage\SettingsView.html
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\settingsview.js  private\10008D39\chrome\bedrockchrome\settingsview.superpage\settingsview.js
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\settingsview.css  private\10008D39\chrome\bedrockchrome\settingsview.superpage\settingsview.css
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\broom_sweep.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\broom_sweep.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\list_headerarrow_closed.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\list_headerarrow_closed.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\list_headerarrow_open.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\list_headerarrow_open.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\no_deselected.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\no_deselected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\no_selected.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\no_selected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\yes_deselected.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\yes_deselected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\yes_selected.png  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\yes_selected.png
-data=\sf\app\browserui\ginebra2\chrome\bedrockchrome\settingsview.superpage\icons\broom_sweep.gif  private\10008D39\chrome\bedrockchrome\settingsview.superpage\icons\broom_sweep.gif
+data=\sf\app\browserui\ginebra2\chrome\localpages\installnotes.html  private\10008D39\localpages\installnotes.html
+data=\sf\app\browserui\ginebra2\chrome\localpages\relnotes.html  private\10008D39\localpages\relnotes.html
+data=\sf\app\browserui\ginebra2\chrome\localpages\startpage.html  private\10008D39\localpages\startpage.html
+data=\sf\app\browserui\ginebra2\chrome\localpages\startpage_101.html  private\10008D39\localpages\startpage_101.html
+data=\sf\app\browserui\ginebra2\chrome\localpages\startpage.css  private\10008D39\localpages\startpage.css
+data=\sf\app\browserui\ginebra2\chrome\localpages\subpage.css  private\10008D39\localpages\subpage.css
+data=\sf\app\browserui\ginebra2\chrome\localpages\grad_tall.jpg  private\10008D39\localpages\grad_tall.jpg
+data=\sf\app\browserui\ginebra2\chrome\localpages\back.png  private\10008D39\localpages\back.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\bedrock.png  private\10008D39\localpages\bedrock.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\bedrock_splash.png  private\10008D39\localpages\bedrock_splash.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button1.png  private\10008D39\localpages\button1.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button2.png  private\10008D39\localpages\button2.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button3.png  private\10008D39\localpages\button3.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button4.png  private\10008D39\localpages\button4.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button_back.png  private\10008D39\localpages\button_back.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button_del.png  private\10008D39\localpages\button_del.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button_rel_notes.png  private\10008D39\localpages\button_rel_notes.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button_report_bug.png  private\10008D39\localpages\button_report_bug.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button_search_google.png  private\10008D39\localpages\button_search_google.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\button_survey.png  private\10008D39\localpages\button_survey.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\google.png  private\10008D39\localpages\google.png
+data=\sf\app\browserui\ginebra2\chrome\localpages\nokia_logo.png  private\10008D39\localpages\nokia_logo.png
 
 /* From sf\mw\browser\bookmarksengine\browsercontentdll\browsercontentdll_template.pkg ***********************/