[Title] Fixed selection should not be working when long tap on button in OSP app.
[Issue#] N_SE-44397
[Problem] After long tap on button, when selecting "copy"/"paste" context menu,
"copy"/"paste" operation is not working.
[Cause] When long tap on button, selection should not be working.
But, selection is working when long tap on button in OSP app.
[Solution] Remove if (!isStartedTextSelectionOutside) condition for not selecting when the input type is button.
Change-Id: If9eb4413df1e0a01c3e6df56da10954c468dc034
m_textSelection->updateHandlesAndContextMenu(isShow, isScrolling);
}
-bool PageClientImpl::textSelectionDown(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside)
+bool PageClientImpl::textSelectionDown(const WebCore::IntPoint& point)
{
if (!evas_object_focus_get(m_viewImpl->view())) {
InputMethodContextEfl* inputMethodContext = m_viewImpl->inputMethodContext();
evas_object_focus_set(m_viewImpl->view(), true);
}
- return m_textSelection->textSelectionDown(point, isStartedTextSelectionFromOutside);
+ return m_textSelection->textSelectionDown(point);
}
-void PageClientImpl::textSelectionMove(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside)
+void PageClientImpl::textSelectionMove(const WebCore::IntPoint& point)
{
- m_textSelection->textSelectionMove(point, isStartedTextSelectionFromOutside);
+ m_textSelection->textSelectionMove(point);
}
void PageClientImpl::textSelectionUp(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside)
bool isTextSelectionMode();
void setIsTextSelectionMode(bool isTextSelectionMode);
void updateTextSelectionHandlesAndContextMenu(bool isShow, bool isScrolling = false);
- bool textSelectionDown(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside = false);
- void textSelectionMove(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside = false);
+ bool textSelectionDown(const WebCore::IntPoint& point);
+ void textSelectionMove(const WebCore::IntPoint& point);
void textSelectionUp(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside = false);
bool isTextSelectionHandleDowned();
#if ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
{
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
- return impl->pageClient->textSelectionDown(IntPoint(x, y), true);
+ return impl->pageClient->textSelectionDown(IntPoint(x, y));
}
Eina_Bool _ewk_view_text_selection_move(Ewk_View_Smart_Data* smartData, int x, int y)
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
IntPoint point(x, y);
- impl->pageClient->textSelectionMove(point, true);
+ impl->pageClient->textSelectionMove(point);
return true;
}
// 'return false' means text selection is not possible for point.
// 'return true' means text selection is possible.
-bool TextSelection::textSelectionDown(const IntPoint& point, bool isStartedTextSelectionFromOutside)
+bool TextSelection::textSelectionDown(const IntPoint& point)
{
// text selection should be ignored when longtap on handle from osp
if (!isEnabled() && isTextSelectionHandleDowned())
setIsTextSelectionMode(false);
IntPoint contentsPoint = m_viewImpl->transformFromScene().mapPoint(point);
- bool result = m_viewImpl->page()->selectClosestWord(contentsPoint, isStartedTextSelectionFromOutside);
+ bool result = m_viewImpl->page()->selectClosestWord(contentsPoint);
if (!result)
return false;
static int s_textSelectionMargin = 5;
-void TextSelection::textSelectionMove(const IntPoint& point, bool isStartedTextSelectionFromOutside)
+void TextSelection::textSelectionMove(const IntPoint& point)
{
// text selection should be ignored when longtap on handle from osp
if (!isEnabled() && isTextSelectionHandleDowned())
if (!scrolledX && !scrolledY) {
viewPoint = m_viewImpl->transformFromScene().mapPoint(updatedPoint);
- m_viewImpl->page()->selectClosestWord(viewPoint, isStartedTextSelectionFromOutside);
+ m_viewImpl->page()->selectClosestWord(viewPoint);
updateMagnifier(updatedPoint);
}
} else {
viewPoint = m_viewImpl->transformFromScene().mapPoint(point);
- m_viewImpl->page()->selectClosestWord(viewPoint, isStartedTextSelectionFromOutside);
+ m_viewImpl->page()->selectClosestWord(viewPoint);
updateMagnifier(point);
}
showMagnifier();
void updateHandlesAndContextMenu(bool isShow, bool isScrolling = false);
bool isEnabled();
bool isAutomaticClearEnabled();
- bool textSelectionDown(const WebCore::IntPoint& point, bool isStartedTextSelectionFromOutside = false);
- void textSelectionMove(const WebCore::IntPoint& point, bool isStaredTextSelectionFromOutside = false);
+ bool textSelectionDown(const WebCore::IntPoint& point);
+ void textSelectionMove(const WebCore::IntPoint& point);
void textSelectionUp(const WebCore::IntPoint& point, bool isStaredTextSelectionFromOutside = false);
// handle callback
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- bool selectClosestWord(const WebCore::IntPoint&, bool isStartedTextSelectionFromOutside);
+ bool selectClosestWord(const WebCore::IntPoint&);
bool setLeftSelection(const WebCore::IntPoint&);
bool setRightSelection(const WebCore::IntPoint&);
bool getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect);
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-bool WebPageProxy::selectClosestWord(const IntPoint& point, bool isStartedTextSelectionFromOutside)
+bool WebPageProxy::selectClosestWord(const IntPoint& point)
{
if (!isValid())
return false;
bool result = false;
- process()->sendSync(Messages::WebPage::SelectClosestWord(point, isStartedTextSelectionFromOutside), Messages::WebPage::SelectClosestWord::Reply(result), m_pageID);
+ process()->sendSync(Messages::WebPage::SelectClosestWord(point), Messages::WebPage::SelectClosestWord::Reply(result), m_pageID);
return result;
}
// FIXME: We could genericize these into a DrawingArea client interface. Would that be beneficial?
void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect&);
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- void selectClosestWord(const WebCore::IntPoint&, bool isStartedTextSelectionFromOutside, bool& result);
+ void selectClosestWord(const WebCore::IntPoint&, bool& result);
void setLeftSelection(const WebCore::IntPoint&, bool& result);
void setRightSelection(const WebCore::IntPoint&, bool& result);
void getSelectionHandlers(WebCore::IntRect& leftRect, WebCore::IntRect& rightRect);
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
- SelectClosestWord(WebCore::IntPoint point, bool isStartedTextSelectionFromOutside) -> (bool result)
+ SelectClosestWord(WebCore::IntPoint point) -> (bool result)
SetLeftSelection(WebCore::IntPoint point) -> (bool result)
SetRightSelection(WebCore::IntPoint point) -> (bool result)
GetSelectionHandlers() -> (WebCore::IntRect leftRect, WebCore::IntRect rightRect)
#endif
#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-void WebPage::selectClosestWord(const IntPoint& point, bool isStartedTextSelectionFromOutside, bool& result)
+void WebPage::selectClosestWord(const IntPoint& point, bool& result)
{
result = false;
}
#endif
- if (!isStartedTextSelectionFromOutside) {
- for (Node* node = hitTestResult.innerNonSharedNode(); node; node = node->parentNode()) {
- if (node->isFocusable()) {
- // Text selection shoud not be started when text of <button> tag is selected.
- if (node->hasTagName(HTMLNames::buttonTag))
- return;
+ for (Node* node = hitTestResult.innerNonSharedNode(); node; node = node->parentNode()) {
+ if (node->isFocusable()) {
+ // Text selection shoud not be started when text of <button> tag is selected.
+ if (node->hasTagName(HTMLNames::buttonTag))
+ return;
- if (inputElement && inputElement->isTextButton())
- return;
+ if (inputElement && inputElement->isTextButton())
+ return;
- break;
- }
+ break;
}
}