Fixed Nabi Issues N_SE-56966,56735
[apps/osp/Internet.git] / src / IntMainForm.cpp
index ec2673a..0005ffc 100644 (file)
@@ -201,6 +201,7 @@ MainForm::MainForm(void)
        __pBlankPanel = null;
        __pArticleReaderLabel = null;
        __webControlHeight = 0;
+       __webControlHeightF = 0;
        __prevAddressBarMode = ADDRESSBAR_MODE_INVALID;
        __curAddressBarMode = ADDRESSBAR_MODE_INVALID;
        __pMostVisitedSites = null;
@@ -458,6 +459,7 @@ MainForm::InitWebControl()
        const int Y_WEBCONTROL_POSITION = 0;
 
        __webControlHeight = GetHeight() - __pFooterPanel->GetHeight();
+       __webControlHeightF = GetHeightF() - __pFooterPanel->GetHeightF();
 
        if (__pMostVisitedListView)
        {
@@ -495,6 +497,7 @@ MainForm::InitWebControl()
                        return r;
                }
                __webControlPosition = __pWebViewer->GetPosition();
+               __webControlPositionF = __pWebViewer->GetPositionF();
                r = __pWebViewer->SetSetting(SettingPresentationModel::GetInstance()->GetWebSettings());
                if (IsFailed(r))
                {
@@ -563,6 +566,7 @@ MainForm::InitFooter(void)
        {
                return E_FAILURE;
        }
+//     __pFooterPanel->SetBackgroundColor(Color(255,0,0));
        //__pFooterPanel->SetBackgroundColor(CUSTOM_COLOR_TRANSPARENT);
        Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_SEARCH_INPUT_FIELD_BG, __pFooterLabel->GetWidth(), __pFooterLabel->GetHeight());
        if (pBitmap != null)
@@ -815,6 +819,7 @@ result MainForm::InitImageContextMenu(Tizen::Graphics::Point p)
 {
        result r = E_SUCCESS;
        ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_AUTO;
+       String srcUrl = __pHitElementResult->GetAttributeValue(L"src");
 
        AppLog("MainForm::InitImageContextMenu clicked on image");
        if (__pImageMenu != null)
@@ -831,8 +836,12 @@ result MainForm::InitImageContextMenu(Tizen::Graphics::Point p)
        r = __pImageMenu->Construct(p, CONTEXT_MENU_STYLE_LIST, direction);
        TryCatch(!IsFailed(r),, "Context image menu creation failed with%s",GetErrorMessage(r));
 
+
        r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_COPY_IMAGE"),IDA_COPY_IMAGE_CLICKED);
-       r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_VIEW_IMAGE"),IDA_VIEW_IMAGE_CLICKED);
+       AppLog("srcUrl %ls __pWebViewer->GetUrl() %ls",srcUrl.GetPointer(),__pWebViewer->GetUrl().GetPointer());
+
+       if(__pWebViewer && srcUrl.Equals(__pWebViewer->GetUrl(),false) == false)
+               r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_VIEW_IMAGE"),IDA_VIEW_IMAGE_CLICKED);
        r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SAVE_IMAGE"),IDA_SAVE_IMAGE_CLICKED);
        r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SHARE"),IDA_SHARE_IMAGE_CLICKED);
        __pImageMenu->SetMaxVisibleItemsCount(4);
@@ -981,9 +990,15 @@ MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPa
        }
 //     FloatPoint q(0.0,0.0);
 //             __pWebViewer->GetBlockRange(p,q);
+       if(p.y < 0)
+               p.y =0;
        if(p.y < 150)
        {
-               p.y = p.y + 50;
+               p.y = p.y + 100;
+               if(GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE )
+               {
+                       p.y = p.y - 50;
+               }
                direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
        }
        else if(__pWebViewer != null && (p.y > (__pWebViewer->GetHeight() + __pWebViewer->GetY())))
@@ -1027,7 +1042,7 @@ MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPa
                        }
                }
        }
-       if(clipboardAvailable == false && onlyPasteOption == true)
+       if(clipboardAvailable == false && (onlyPasteOption == true ||  __pHitElementResult->GetAttributeValue("type").Equals(L"password",false) == true))
        {
                return E_FAILURE;
        }
@@ -1035,11 +1050,7 @@ MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPa
        r = __pImageMenu->Construct(p, CONTEXT_MENU_STYLE_GRID, direction);
        TryCatch(!IsFailed(r),, "Context image menu creation failed with%s",GetErrorMessage(r));
 
-
-
-
-
-       if(onlyPasteOption == false)
+       if(onlyPasteOption == false && __pHitElementResult->GetAttributeValue("type").Equals(L"password",false) == false)
        {
                r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_COM_OPT_COPY"),IDA_COPY_TEXT_CLICKED);
        }
@@ -1047,7 +1058,7 @@ MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPa
        {
                r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_COM_BODY_PASTE"),IDA_PASTE_TEXT_CLICKED);
        }
-       if(onlyPasteOption == false)
+       if(onlyPasteOption == false && __pHitElementResult->GetAttributeValue("type").Equals(L"password",false) == false)
        {
                r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_FIND_ON_PAGE_ABB"),IDA_FIND_TEXT__CLICKED);
                r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SHARE"),IDA_SHARE_TEXT_CLICKED);
@@ -1123,7 +1134,7 @@ MainForm::InitFindWordPanel(void)
                Rectangle pRect = pPanel1->GetBounds();
                pRect.x = pRect.y = 0;
                __pFindWordBgLabel->SetBounds(pRect);
-               Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.9.png", __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
+               Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.#.png", __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
                if (pBitmap != null)
                {
                        AppLogDebug("InitFindWordPanel: Coming here");
@@ -1143,7 +1154,7 @@ MainForm::InitFindWordPanel(void)
                        Rectangle pRect = pPanel1->GetBounds();
                        pRect.x = pRect.y = 0;
                        __pFindWordBgLabelRightToLeft->SetBounds(pRect);
-                       Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.9.png", __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
+                       Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.#.png", __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
                        if (pBitmap != null)
                        {
                                AppLogDebug("InitFindWordPanel: Coming here");
@@ -1215,6 +1226,7 @@ MainForm::InitFindWordPanel(void)
                AppLogException("There is some problem in the xml file. Please check.");
                return E_FAILURE;
        }
+       __pFindWordCountLabel->SetText(L"0/0");
 
        __pFindWordCountLabelRightToLeft = static_cast<Label*>(__pFindWordControl->GetControl(L"IDC_FIND_COUNT_LABEL2", true));
        if (__pFindWordCountLabelRightToLeft == null)
@@ -1222,6 +1234,7 @@ MainForm::InitFindWordPanel(void)
                AppLogException("There is some problem in the xml file. Please check.");
                return E_FAILURE;
        }
+       __pFindWordCountLabelRightToLeft->SetText(L"0/0");
 
        __pFindWordEditField = static_cast<EditField*>(__pFindWordControl->GetControl(L"IDC_FIND_WORD_EDITFIELD", true));
        if (__pFindWordEditField == null)
@@ -1629,12 +1642,10 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                if(__pFindWordPanelLeftToRight && __pFindWordPanelLeftToRight->GetShowState() == true)
                {
                        __pFindWordEditField->SetFocus();
-//                     __pFindWordCountLabel->SetShowState(false);
                }
                else
                {
                        __pFindWordEditFieldRightToLeft->SetFocus();
-                       __pFindWordCountLabelRightToLeft->SetShowState(false);
                }
        }
        break;
@@ -2186,8 +2197,22 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                {
                        String srcUrl = __pHitElementResult->GetAttributeValue(L"src");
                        AppLog("MainForm::OnTouchLongPressed srcUrl is %ls",srcUrl.GetPointer());
-                       LoadUrl(srcUrl);
 
+                       Uri currentUri;
+                       currentUri.SetUri(__pWebViewer->GetUrl());
+
+                       String newUrl;
+                       Uri newUri;
+                       newUri.SetUri(srcUrl);
+                       AppLog("newuri gethost %ls",newUri.GetHost().GetPointer());
+                       if(newUri.GetHost().GetLength() == 0)
+                       {
+                               newUrl = currentUri.GetHost();
+                               newUrl.Append(srcUrl);
+                               srcUrl = newUrl;
+                       }
+
+                       LoadUrl(srcUrl);
                }
        }
        break;
@@ -2403,7 +2428,9 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                if (__pAddressbar != null && __pWebViewer != NULL)
                {
                        __webControlPosition.y = __pAddressbar->GetHeight() - 12;
+                       __webControlPositionF.y = __pAddressbar->GetHeightF() - 12.0f;
                        __webControlHeight = GetClientAreaBounds().height - __pFooterPanel->GetHeight() - ( /*__pAddressbar->GetY() +*/ __pAddressbar->GetHeight() - 12);
+                       __webControlHeightF = GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF() - ( /*__pAddressbar->GetY() +*/ __pAddressbar->GetHeightF() - 12.0f);
 
                        if (__pFooterPanel->GetShowState() == false)
                                __pWebViewer->SetBounds(Rectangle(0,__webControlPosition.y,GetClientAreaBounds().width, GetClientAreaBounds().height - ( /*__pAddressbar->GetY() +*/ __pAddressbar->GetHeight() - 12)));
@@ -2471,7 +2498,7 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
        break;
        case IDA_COPY_TEXT_CLICKED:
        {
-               __pWebViewer->ReleaseBlock();
+//             __pWebViewer->ReleaseBlock();//as per hyunn lee request for issue 53500
                // need to implement
                //__currentSelectedStr
                // Sets data to a clip board item
@@ -2519,8 +2546,8 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        String* pNameCount = __pWebViewer->EvaluateJavascriptN(str);
 
                        str.Clear();
-                       str = L"document.getElementsByName('";
-                       str.Append(nameElement);
+                       str = L"document.getElementsByClassName('";
+                       str.Append(classElement);
                        str.Append("').length");
                        String* pClassCount = __pWebViewer->EvaluateJavascriptN(str);
 
@@ -2537,10 +2564,10 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        }
                        else if(idElement.GetLength() != 0)
                        {
-                               script = L"function insertAtCursor(myField, myValue) {  if (document.selection) {   document.getElementById(myField).focus();   sel = document.selection.createRange();   sel.text = myValue;  }   else if (document.getElementById(myField).selectionStart || document.getElementById(myField).selectionStart == '0'){   var startPos = document.getElementById(myField).selectionStart;   var endPos = document.getElementById(myField).selectionEnd;   document.getElementById(myField).value = document.getElementById(myField).value.substring(0, startPos)+ myValue + document.getElementById(myField).value.substring(endPos, document.getElementById(myField).value.length);   } else {    document.getElementById(myField).value += myValue;   }  } ";
-                               script.Append("insertAtCursor('");
-                               script.Append(idElement);
-                               script.Append("',");
+                               script = L"function insertAtCursor(myField, myValue) {  if (document.selection) {   myField.focus();   sel = document.selection.createRange();   sel.text = myValue;  }   else if (myField.selectionStart || myField.selectionStart == '0'){   var startPos = myField.selectionStart;   var endPos = myField.selectionEnd;   myField.value = myField.value.substring(0, startPos)+ myValue + myField.value.substring(endPos, myField.value.length);   } else {    myField.value += myValue;   }  } ";
+                               script.Append("insertAtCursor(");
+                               script.Append(L"document.activeElement");
+                               script.Append(",");
                                script.Append("\"");
                                script.Append(*pString);
                                script.Append("\");");
@@ -2837,7 +2864,8 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
        InitFooter();
        InitAddressbar();
 
-       __pFooterPanel->SetBounds(0, GetClientAreaBounds().height - __pFooterPanel->GetHeight(), GetClientAreaBounds().width, __pFooterPanel->GetHeight());
+       FloatRectangle footerPanelBounds = FloatRectangle(0.0f, (GetClientAreaBoundsF().height) - __pFooterPanel->GetHeightF(), GetClientAreaBoundsF().width, __pFooterPanel->GetHeightF());
+       __pFooterPanel->SetBounds(CoordinateSystem::AlignToDevice(footerPanelBounds));
 
        // hiding the address bar
        //      __pAddressbar->SetBounds(__pAddressbar->GetX(), __pAddressbar->GetY() - __pAddressbar->GetHeight(), __pAddressbar->GetWidth(), __pAddressbar->GetHeight());
@@ -2879,7 +2907,7 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
        {
                InitMostVisitedSitesView(GetOrientationStatus());
        }
-       else if (homePage.CompareTo((L"IDS_BR_BODY_BLANK_PAGE")) == 0)
+       else
        {
                if(__pMostVisitedListView != null)
                {
@@ -2887,6 +2915,10 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                }
        }
 
+       if(__pMostVisitedListView && __pMostVisitedListView->GetShowState() == true)
+       {
+               __pMostVisitedListView->UpdateList();
+       }
        if (__pAddressbar != null && pArgs != null && (previousSceneId == IDSCN_BOOKMARK_VIEW || previousSceneId == IDSCN_HISTORY_LIST))
        {
                String* pBookmarkUrl = dynamic_cast< String* >(pArgs->GetAt(0));
@@ -2951,7 +2983,10 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
        RelayoutControls(false);
        AppLog("ABC: OnSceneActivatedN started exit");
        if(__pWebViewer)
+       {
                AppLog("WebControl's width height %d %d,",__pWebViewer->GetWidth(),__pWebViewer->GetHeight());
+               __pWebViewer->Resume();
+       }
 
 }
 
@@ -3000,6 +3035,10 @@ MainForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
        delete pWebCanvas;
        if(__pAddressbar)
                __pAddressbar->SetShowState(false);
+       if(__pWebViewer)
+       {
+               __pWebViewer->Pause();
+       }
        AppLog("Coming here");
 }
 
@@ -3405,8 +3444,12 @@ MainForm::OnUrlSubmitted(Addressbar& addBar)
        String url = addBar.GetUrl();
        AppLog("MainForm::OnUrlSubmitted url is %ls", url.GetPointer());
 
+
        if(__pFooterUrlField)
+       {
+               AppLog("Position:: %d, %ls",__pFooterUrlField->GetTextLength(),__pFooterUrlField->GetText().GetPointer());
                __pFooterUrlField->SetCursorPosition(__pFooterUrlField->GetTextLength());
+       }
        AddressBarCancelledClicked(*__pAddressbar);
        LoadUrl(url);
 }
@@ -3452,6 +3495,8 @@ MainForm::LoadUrl(String& url)
        ret = firstRegex.Match(url, false); // This returns true value
        flag = secondRegex.Match(url, false);  // Checks whether URL typed is of type  abc.com (i.e without protocol in front of it)
 
+
+
        if (ret == true && __pWebViewer != null)
        {
                SetUrl(url);
@@ -3468,7 +3513,7 @@ MainForm::LoadUrl(String& url)
                }
                else
                {
-                               UrlEncoder::Encode(url, L"UTF-8", encodedUrl);
+                       UrlEncoder::Encode(url, L"UTF-8", encodedUrl);
                        __pWebViewer->LoadUrl(SettingPresentationModel::GetInstance()->GetSearchUrl(encodedUrl));
                }
        }
@@ -3493,6 +3538,11 @@ MainForm::OnFocusGained(const Tizen::Ui::Control& source)
                __pFooterPanel->SetShowState(false);
        }
 
+       if(__pWebViewer)
+       {
+               __pWebViewer->ReleaseBlock();
+       }
+
        if(__pAddressbar)
        {
                __pAddressbar->SetShowState(true);
@@ -3522,7 +3572,8 @@ MainForm::OnFocusGained(const Tizen::Ui::Control& source)
                __pFindWordNext->SetEnabled(false);
                __pFindWordPrev->SetEnabled(false);
 
-               __pWebViewer->SearchTextAllAsync(L"",true);
+               if(__pWebViewer)
+                       __pWebViewer->SearchTextAllAsync(L"",true);
                __pFindWordControl->SetShowState(false);
        }
        RelayoutControls(false);
@@ -3745,6 +3796,7 @@ MainForm::OnAddressBarModeChanged(/*const Addressbar& addBar*/)
                if (__pAddressbar != null)
                {
                        __webControlPosition.y = __pAddressbar->GetHeight() - 12;
+                       __webControlPositionF.y = __pAddressbar->GetHeightF() - 12.0f;
                        __pAddressbar->SetBounds(Rectangle(0,0,GetClientAreaBounds().width,__pAddressbar->GetHeight()));
                        __pAddressbar->Invalidate(true);
                }
@@ -3759,6 +3811,7 @@ MainForm::OnAddressBarModeChanged(/*const Addressbar& addBar*/)
                if (__pAddressbar != null)
                {
                        __webControlPosition.y = 0;
+                       __webControlPositionF.y = 0.0f;
                        __pAddressbar->SetBounds(Rectangle(0, __pAddressbar->GetY() - __pAddressbar->GetHeight(), GetClientAreaBounds().width, __pAddressbar->GetHeight()));
                        __pAddressbar->Invalidate(true);
                }
@@ -3845,6 +3898,7 @@ MainForm::OnPageTitleReceived(const Tizen::Base::String& title)
 void
 MainForm::UpdateFavicon(void)
 {
+       AppLog("MainForm::UpdateFavicon called");
        bool urlImageType = false;
        String *tempPath = null;
        if(__pWebViewer)
@@ -3882,6 +3936,7 @@ MainForm::UpdateFavicon(void)
 
                        if (pBitmap != null)
                        {
+                               AppLog("__pWindowInfo->pFavicon updating favicon");
                                if (__pWindowInfo->pFavicon != NULL)
                                {
                                        __pWindowInfo->pFavicon = null;
@@ -4040,6 +4095,10 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint
                        if(GetLastResult() == E_INVALID_ARG || (__pHitElementResult->GetTagName().Equals(L"INPUT",false) == false && __pHitElementResult->GetTagName().Equals(L"TEXTAREA",false) == false))
                        {
                                __pHitElementResult = __pWebViewer->GetElementByPointN(__longPressPoint);
+                               if(__pHitElementResult == null)
+                               {
+                                       __pHitElementResult = __pWebViewer->GetElementByPointN(endPoint);
+                               }
                        }
                        AppLog("datafirst endpoint error %s",GetErrorMessage(GetLastResult()));
                }
@@ -4075,7 +4134,7 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint
                {
                        AppLog("MainForm::OnWebPageBlockSelected show paste option");
 
-                       InitSelectTextContextMenuF(FloatPoint(endPoint.x,endPoint.y + __pWebViewer->GetY()),true);
+                       InitSelectTextContextMenuF(FloatPoint(startPoint.x,startPoint.y + __pWebViewer->GetY()),true);
                        if(__pImageMenu)
                        {
                                __pImageMenu->SetShowState(true);
@@ -4092,7 +4151,7 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint
                                __currentSelectedStr.Clear();
                                __currentSelectedStr = __pHitElementResult->GetUrl();
                        }
-                       InitSelectTextContextMenuF(FloatPoint(endPoint.x,endPoint.y + __pWebViewer->GetY()),false);
+                       InitSelectTextContextMenuF(FloatPoint(startPoint.x,startPoint.y + __pWebViewer->GetY()),false);
                        if(__pImageMenu)
                        {
                                __pImageMenu->SetShowState(true);
@@ -4236,7 +4295,8 @@ MainForm::OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source)
                                        return;
                                }
                        }
-                       r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY));
+                       if(pNewWindowInfo)
+                               r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY));
 
                        break;
                }
@@ -4251,30 +4311,41 @@ MainForm::RelayoutControls(bool showAddressbar,bool relayoutFooter)
 {
        AppLog("xyz:: MainForm::RelayoutControls called");
        __webControlPosition.y = 0;
+       __webControlPositionF.y = 0.0f;
        __webControlHeight = GetClientAreaBounds().height;
+       __webControlHeightF = GetClientAreaBoundsF().height;
        AppLog("Client area height: %d width %d", __webControlHeight,GetClientAreaBounds().width);
 
        AppLog("Client area height: %d", __webControlHeight);
        if(__pAddressbar != null && __pAddressbar->GetShowState() == true)
        {
                __webControlPosition.y += __pAddressbar->GetHeight();
+               __webControlPositionF.y += __pAddressbar->GetHeightF();
                __webControlHeight -= __pAddressbar->GetHeight();
+               __webControlHeightF -= __pAddressbar->GetHeightF();
                __pAddressbar->SetBounds(0, 0, __pAddressbar->GetWidth(), __pAddressbar->GetHeight());
        }
        else if(__pFindWordControl != null && __pFindWordControl->GetShowState() == true)
        {
                __webControlPosition.y += __pFindWordControl->GetHeight();
+               __webControlPositionF.y += __pFindWordControl->GetHeightF();
                __webControlHeight -= __pFindWordControl->GetHeight();
+               __webControlHeightF -= __pFindWordControl->GetHeightF();
                __pFindWordControl->SetBounds(0, 0, GetClientAreaBounds().width, __pFindWordControl->GetHeight());
        }
 
        if(__pFooterPanel != null && __pFooterPanel->GetShowState() == true && relayoutFooter == true)
        {
                __webControlHeight -= __pFooterPanel->GetHeight();
+               __webControlHeightF -= __pFooterPanel->GetHeightF();
 
-               __pFooterPanel->SetBounds(0, __webControlPosition.y + __webControlHeight, GetClientAreaBounds().width, __pFooterPanel->GetHeight());
+               __pFooterPanel->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(0.0F, __webControlPositionF.y + __webControlHeightF, GetClientAreaBoundsF().width, __pFooterPanel->GetHeightF())));
                __webControlHeight = __webControlHeight + 12;
+               __webControlHeightF = __webControlHeightF + 12.0f;
        }
+
+
+
        if (__pWebViewer != null && __pWebViewer->GetShowState() == true)
        {
                if(__pWebViewer->GetX() == 0 && __pWebViewer->GetY() == __webControlPosition.y &&__pWebViewer->GetWidth() == GetClientAreaBounds().width &&__pWebViewer->GetHeight() == __webControlHeight )
@@ -4282,11 +4353,12 @@ MainForm::RelayoutControls(bool showAddressbar,bool relayoutFooter)
                }
                else
                {
-                       __pWebViewer->SetBounds(0, __webControlPosition.y, GetClientAreaBounds().width, __webControlHeight );
+                       __pWebViewer->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(0.0f, __webControlPositionF.y, GetClientAreaBoundsF().width, __webControlHeightF)));
                        AppLog("xyz:: MainForm::RelayoutControls called __webControlHeight %d",__webControlHeight);
                        __pWebViewer->Invalidate(false);
                }
        }
+
        if(__pMostVisitedListView != null && __pAddressbar != null && __pFooterPanel != null)
        {
                __pMostVisitedListView->SetBounds(Tizen::Graphics::Rectangle(0,__webControlPosition.y , GetClientAreaBounds().width, __webControlHeight));
@@ -4467,7 +4539,8 @@ void MainForm::OnTextFound(int totalCount, int currentOrdinal)
        {
                AppLog("Word not found");
                //Show error notification to user
-               __pFindWordNext->SetEnabled(false);
+               if(__pFindWordNext)
+                       __pFindWordNext->SetEnabled(false);
                if(__pFindWordCountLabel && __pFindWordCountLabel->GetShowState() == true)
                {
                        __pFindWordCountLabel->SetText(L"0/0");
@@ -4478,7 +4551,8 @@ void MainForm::OnTextFound(int totalCount, int currentOrdinal)
                        __pFindWordCountLabelRightToLeft->SetText(L"0/0");
                        __pFindWordCountLabelRightToLeft->Invalidate(false);
                }
-               __pFindWordNext->Invalidate(false);
+               if(__pFindWordNext)
+                       __pFindWordNext->Invalidate(false);
                __pFindWordPrev->Invalidate(false);
 
                return;
@@ -4486,11 +4560,13 @@ void MainForm::OnTextFound(int totalCount, int currentOrdinal)
 
        if (totalCount == 1 || totalCount == currentOrdinal)
        {
-               __pFindWordNext->SetEnabled(false);
+               if(__pFindWordNext)
+                       __pFindWordNext->SetEnabled(false);
        }
        else
        {
-               __pFindWordNext->SetEnabled(true);
+               if(__pFindWordNext)
+                       __pFindWordNext->SetEnabled(true);
        }
 
        String countStr = L"";
@@ -4906,8 +4982,8 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori
 {
        AppLog("MainForm::OnOrientationChanged GetClientAreaBounds %d, %d",GetClientAreaBounds().width,GetClientAreaBounds().height);
        int widthContextItem = 0;
-       if(__pFindWordCountLabel)
-               __pFindWordCountLabel->SetBounds(__pFindWordCountLabel->GetX(),__pFindWordCountLabel->GetY(),124,__pFindWordCountLabel->GetHeight());
+       //if(__pFindWordCountLabel)
+       //      __pFindWordCountLabel->SetBounds(__pFindWordCountLabel->GetX(),__pFindWordCountLabel->GetY(),124,__pFindWordCountLabel->GetHeight());
        // As per the platform engineer comment removed this line
        /*if(__pWebViewer != null)
        {
@@ -4984,7 +5060,7 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori
        {
                AppLog("__pFooterPanel->GetShowState() is true");
                InitFooter();
-               __pFooterPanel->SetBounds(0, GetClientAreaBounds().height - __pFooterPanel->GetHeight(), __pFooterPanel->GetWidth(), __pFooterPanel->GetHeight());
+               __pFooterPanel->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(0, GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF(), __pFooterPanel->GetWidthF(), __pFooterPanel->GetHeightF())));
                __pFooterPanel->Invalidate(true);
        }
        InitAddressbar();
@@ -5424,6 +5500,7 @@ MainForm::InitMostVisitedSitesView(Tizen::Ui::OrientationStatus orientationStatu
 
        if (__pMostVisitedListView != null)
        {
+               __pMostVisitedListView->SetShowState(true);
                return E_SUCCESS;
        }
 
@@ -5439,6 +5516,7 @@ MainForm::InitMostVisitedSitesView(Tizen::Ui::OrientationStatus orientationStatu
        HistoryPresentationModel::GetInstance()->GetMostVisitedSites(*__pMostVisitedSites);
 
        __webControlHeight = GetClientAreaBounds().height - __pFooterPanel->GetHeight();
+       __webControlHeightF = GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF();
        __pMostVisitedListView = new(std::nothrow) ListView();
 
        int height = GetClientAreaBounds().height;
@@ -5548,8 +5626,7 @@ MainForm::ShowIndicatorNotification(const String& messageText, const String& con
        request.SetAlertText(messageText);
        request.SetTitleText(L"");
        request.SetAppMessage(contentPath);
-       request.SetOngoingActivityType(ONGOING_ACTIVITY_TYPE_TEXT);
-       request.SetNotificationStyle(NOTIFICATION_STYLE_THUMBNAIL);
+
        Tizen::App::App* pApp = Tizen::App::App::GetInstance();
        String homePath = pApp->GetAppRootPath();
        String iconPath = homePath + L"res/screen-density-xhigh/Notification_download_complete.png";
@@ -5558,7 +5635,7 @@ MainForm::ShowIndicatorNotification(const String& messageText, const String& con
 
        Tizen::Shell::NotificationManager notiMgr;
        notiMgr.Construct();
-       notiMgr.NotifyOngoingActivity(request);
+       notiMgr.Notify(request);
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
        return;
 }
@@ -5807,7 +5884,10 @@ void MainForm::SetUrl(const String& url)
                                __pAddressbar->SetUrl(__displayUrl);
                }
                if(__pFooterUrlField)
+               {
+                       AppLog("Position:: %d, %ls",__pFooterUrlField->GetTextLength(),__pFooterUrlField->GetText().GetPointer());
                        __pFooterUrlField->SetCursorPosition(__pFooterUrlField->GetTextLength());
+               }
                __pFooterUrlField->Invalidate(false);
                if(__pAddressbar != NULL && __pAddressbar->HasFocus())
                        __pAddressbar->Invalidate(true);