{
if (pItem != null)
{
- pItem->AddElement(pageURLRect, IDA_FORMAT_URL_STRING, pageURL, 32, CUSTOM_COLOR_GREY, CUSTOM_COLOR_GREY, CUSTOM_COLOR_GREY, true);
+ pItem->AddElement(pageURLRect, IDA_FORMAT_URL_STRING, pageURL, 32, CUSTOM_COLOR_GREY, CUSTOM_COLOR_LISTVIEW_TEXT, CUSTOM_COLOR_LISTVIEW_TEXT, true);
}
}
void
MainForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
{
+ AppLog("MainForm::OnListViewItemStateChanged called");
History* pHistory = static_cast < History* >(__pMostVisitedSites->GetAt(index));
String url = pHistory->GetHistoryUrl();
if (url != null)
String idElement = __pHitElementResult->GetAttributeValue(L"id");
String nameElement = __pHitElementResult->GetAttributeValue(L"name");
String tagElement = __pHitElementResult->GetTagName();
+ String contenteditable = __pHitElementResult->GetAttributeValue("contenteditable");
AppLog("MainForm::IDA_PASTE_TEXT_CLICKED id is %ls",idElement.GetPointer());
String str = L"document.getElementsByName('";
str.Append(nameElement);
String* pCount = __pWebViewer->EvaluateJavascriptN(str);
String script;
- if(idElement.GetLength() != 0)
+ if(contenteditable.Equals(L"true",false) == true)
+ {
+ AppLog("gmail paste need to support");
+
+ script = L"function replaceSelectedText(replacementText) { var sel, range; if (window.getSelection) { sel = window.getSelection(); if (sel.rangeCount) { range = sel.getRangeAt(0); range.deleteContents(); range.insertNode(document.createTextNode(replacementText)); } } else if (document.selection && document.selection.createRange) { range = document.selection.createRange(); range.text = replacementText; } }";
+ script.Append("replaceSelectedText(");
+ script.Append("\"");
+ script.Append(*pString);
+ script.Append("\");");
+ }
+ 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('");
{
String tagName = __pHitElementResult->GetTagName();
String type = __pHitElementResult->GetAttributeValue("type");
+ String contenteditable = __pHitElementResult->GetAttributeValue("contenteditable");
AppLog("TagName %ls",tagName.GetPointer());
AppLog("Tagnameseemstobe INPUT");
}
- if (((tagName.Equals(L"INPUT",false) == true) || tagName.Equals(L"TEXTAREA",false) == true) /*&& __isLongPressedDone == true*/ && __currentSelectedStr.CompareTo(L"") !=0 )
+ if (((tagName.Equals(L"INPUT",false) == true) || tagName.Equals(L"TEXTAREA",false) == true) || contenteditable.Equals(L"true",false) == true/*&& __isLongPressedDone == true*/ && __currentSelectedStr.CompareTo(L"") !=0 )
{
AppLog("MainForm::OnWebPageBlockSelected show paste option");
if (__pHitElementResult->HasImage() == true)
{
if(__pWebViewer != null)
+ {
+ __pWebViewer->ReleaseBlock();//N_SE-52389
InitImageContextMenu(Point(currentPosition.x,currentPosition.y + __pWebViewer->GetY()));
+ }
__pImageMenu->SetShowState(true);
__pImageMenu->Show();
__pImageMenu->Invalidate(true);
}
else if(__pHitElementResult->HasUrl() == true)
{
+ if(__pWebViewer != null)
+ __pWebViewer->ReleaseBlock();//N_SE-52389
String tempURl = __pHitElementResult->GetUrl();
AppLog("tempURl is %ls", tempURl.GetPointer());
const Bitmap* pBitmap = __pHitElementResult->GetImage();
result r = E_SUCCESS;
- if (__pWebViewer != null && __pMostVisitedListView != null)
+ if (__pMostVisitedListView != null)
{
return E_SUCCESS;
}