__pBlankPanel = null;
__pArticleReaderLabel = null;
__webControlHeight = 0;
+ __webControlHeightF = 0;
__prevAddressBarMode = ADDRESSBAR_MODE_INVALID;
__curAddressBarMode = ADDRESSBAR_MODE_INVALID;
__pMostVisitedSites = null;
const int Y_WEBCONTROL_POSITION = 0;
__webControlHeight = GetHeight() - __pFooterPanel->GetHeight();
+ __webControlHeightF = GetHeightF() - __pFooterPanel->GetHeightF();
if (__pMostVisitedListView)
{
return r;
}
__webControlPosition = __pWebViewer->GetPosition();
+ __webControlPositionF = __pWebViewer->GetPositionF();
r = __pWebViewer->SetSetting(SettingPresentationModel::GetInstance()->GetWebSettings());
if (IsFailed(r))
{
{
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)
// __pWebViewer->GetBlockRange(p,q);
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())))
}
}
}
- if(clipboardAvailable == false && onlyPasteOption == true)
+ if(clipboardAvailable == false && (onlyPasteOption == true || __pHitElementResult->GetAttributeValue("type").Equals(L"password",false) == true))
{
return E_FAILURE;
}
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);
}
{
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);
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)));
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
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);
}
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("\");");
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());
}
}
+ 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));
}
else
{
- UrlEncoder::Encode(url, L"UTF-8", encodedUrl);
+ UrlEncoder::Encode(url, L"UTF-8", encodedUrl);
__pWebViewer->LoadUrl(SettingPresentationModel::GetInstance()->GetSearchUrl(encodedUrl));
}
}
__pFooterPanel->SetShowState(false);
}
+ if(__pWebViewer)
+ {
+ __pWebViewer->ReleaseBlock();
+ }
+
if(__pAddressbar)
{
__pAddressbar->SetShowState(true);
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);
}
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);
}
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()));
}
{
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);
__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);
for (int count = 0; count < totalCount; count++)
{
pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count));
- if (pSceneManager != null && pWindowInfo != null && pSceneManager->GetCurrentSceneId() == pWindowInfo->sceneID)
- {
- r = SceneRegister::DestroyAndUnRegisterScene(pWindowInfo->sceneID);
- if (IsFailed(r))
- {
- AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
- return;
- }
+ if (__pWindowInfo != null && pWindowInfo != null && __pWindowInfo->sceneID == pWindowInfo->sceneID)
+ {
+ r = SceneRegister::DestroyAndUnRegisterScene(__pWindowInfo->sceneID);
r = pAllWindowList->RemoveAt(count, true);
- if(count > 0)
+ Form* pCurrentForm = null;
+ if(SceneManager::GetInstance()->GetCurrentScene() != null)
+ pCurrentForm = (SceneManager::GetInstance()->GetCurrentScene()->GetForm());
+ if (pCurrentForm)
{
- pNewWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count - 1));
+ pCurrentForm->SendUserEvent(UPDATE_MAINFORM_FOOTER_ON_WINDOWCLOSED, null);
}
- else if(pAllWindowList->GetCount() > 0)
+
+ if (pAllWindowList->GetCount() > 0)
{
+ pNewWindowInfo = null;
pNewWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(pAllWindowList->GetCount() - 1));
}
else
r = pApp->GetFrameAt(0)->SetShowMode(FRAME_SHOW_MODE_MINIMIZED);
return;
}
-
}
r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY));
- __pWindowInfo = null;
break;
}
+
}
+
}
void
{
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)
{
{
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)
{
{
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();
HistoryPresentationModel::GetInstance()->GetMostVisitedSites(*__pMostVisitedSites);
__webControlHeight = GetClientAreaBounds().height - __pFooterPanel->GetHeight();
+ __webControlHeightF = GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF();
__pMostVisitedListView = new(std::nothrow) ListView();
int height = GetClientAreaBounds().height;
void
MainForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList *pArgs)
{
- if (requestId == BACK_GROUND_APP_EVENT)
+ if (requestId == UPDATE_MAINFORM_FOOTER_ON_WINDOWCLOSED)
+ {
+ AppLog("OnWebWindowCloseRequested mainform test 1 OnUserEventReceivedN");
+ InitFooter();
+ }
+ else if (requestId == BACK_GROUND_APP_EVENT)
{
if(__pWebViewer != null)
{