static_cast<RWHVAuraOffscreenHelperEfl*>(data);
thiz->FocusRWHVA();
+ if (IsMobileProfile() && thiz->GetSelectionController()) {
+ thiz->GetSelectionController()->ShowHandleAndContextMenuIfRequired();
+ }
+
if (!thiz->on_focus_in_callback_.is_null())
thiz->on_focus_in_callback_.Run();
}
if (focused_window)
focused_window->LostFocus();
+ if (IsMobileProfile() && thiz->GetSelectionController()) {
+ thiz->GetSelectionController()->HideHandleAndContextMenu();
+ }
+
if (!thiz->on_focus_out_callback_.is_null())
thiz->on_focus_out_callback_.Run();
}
}
}
+void RWHVAuraOffscreenHelperEfl::MoveCaret(const gfx::Point& point) {
+ if (auto* delegate = rwhv_aura_->host()->delegate()) {
+ delegate->MoveCaret(gfx::Point(point.x() / device_scale_factor_,
+ point.y() / device_scale_factor_));
+ }
+}
+
+void RWHVAuraOffscreenHelperEfl::SelectClosestWord(
+ const gfx::Point& touch_point) {
+ int view_x, view_y;
+ EvasToBlinkCords(touch_point.x(), touch_point.y(), &view_x, &view_y);
+
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
+ // FIXME: The SelectClosestWord function was removed by
+ // commit 9720a4494c8bcd24d1f496feec5cfac7582103d2 in s-chromium
+ // It will be fixed by webview team.
+ // FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2122
+ Send(new ViewMsg_SelectClosestWord(host_->GetRoutingID(), view_x, view_y));
+#endif // EWK_BRINGUP
+}
+
+bool RWHVAuraOffscreenHelperEfl::HasSelectableText() {
+ // If the last character of textarea is '\n', We can assume an extra '\n'.
+ // Actually when you insert line break by ENTER key, '\n\n' is stored in
+ // textarea. And If you press delete key, only a '\n' character will be stored
+ // although there is no visible and selectable character in textarea. That's
+ // why we should check whether selection_text contains only one line break.
+ // Bug: http://suprem.sec.samsung.net/jira/browse/TSAM-2230
+ //
+ // Please see below commit for more information.
+ // https://codereview.chromium.org/1785603002
+ std::u16string selection_text = rwhv_aura_->GetSelectedText();
+ return !selection_text.empty() &&
+ base::UTF16ToUTF8(selection_text).compare("\n") != 0;
+}
+
void RWHVAuraOffscreenHelperEfl::FocusedNodeChanged(
bool editable
#if BUILDFLAG(IS_TIZEN_TV)