Let the composited selection data tell about "editable content".
authorAntonio Gomes <a1.gomes@samsung.com>
Fri, 30 Oct 2015 20:00:45 +0000 (16:00 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
This information comes as part of the composited selection data.
Lets use it instead of other sources.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=14304

Reviewed by: a.renevier, a1.gomes, djmix.kim, sns.park

Change-Id: I5dd964d04695e8f2ec121220b9efeaadc16adf6b
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc

index 25e34f3..c64f777 100755 (executable)
@@ -855,10 +855,6 @@ void RenderWidgetHostViewEfl::SetIsLoading(bool is_loading) {
 
 void RenderWidgetHostViewEfl::TextInputStateChanged(
     const ViewHostMsg_TextInputState_Params& params) {
-  if (GetSelectionController()) {
-    GetSelectionController()->SetSelectionEditable(
-        params.type != ui::TEXT_INPUT_TYPE_NONE);
-  }
 
   if (!params.show_ime_if_needed) {
     WebContentsImpl* wci = static_cast<WebContentsImpl*>(&web_contents_);
@@ -1765,6 +1761,7 @@ void RenderWidgetHostViewEfl::OnSwapCompositorFrame(
   last_scroll_offset_ = frame->metadata.root_scroll_offset;
 
   if (GetSelectionController()) {
+    GetSelectionController()->SetSelectionEditable(frame->metadata.selection.is_editable);
     ui::SelectionBound start = ConvertSelectionBound(frame->metadata.selection.start);
     ui::SelectionBound end = ConvertSelectionBound(frame->metadata.selection.end);
     GetSelectionController()->OnSelectionChanged(start, end);
index ae20894..aa6de81 100644 (file)
@@ -658,10 +658,8 @@ void SelectionControllerEfl::HandleLongPressEndEvent() {
   long_mouse_press_ = false;
   if (scrolling_)
     show_after_scroll_ = true;
-  if (GetCaretSelectionStatus()) {
+  if (GetCaretSelectionStatus())
     SetSelectionStatus(true);
-    SetSelectionEditable(true);
-  }
   ShowHandleAndContextMenuIfRequired();
 }