Text Selection Handlers not updated with the correct position
authorbhargavi.k <bhargavi.k@samsung.com>
Tue, 9 Jul 2013 09:08:06 +0000 (14:38 +0530)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 5 Aug 2013 10:34:27 +0000 (10:34 +0000)
[Title] Text Selection Handlers not updated with
        the correct position
[Issue] NABI-RSA-42952
[Problem] Text Selection Handlers not updated
          with the correct position when content
          is modified by JS.
[Cause] No notification was being sent to UI when
        selection was being removed and modified by JS
[Solution] Sending update event to UI when selection get
           modified by JS.

Source/WebCore/editing/FrameSelection.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionHandle.cpp

index f19b20f..755a83c 100644 (file)
@@ -404,6 +404,11 @@ void FrameSelection::respondToNodeModification(Node* node, bool baseRemoved, boo
 
     if (clearDOMTreeSelection)
         setSelection(VisibleSelection(), DoNotSetFocus);
+
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+    if(clearRenderTreeSelection && !clearDOMTreeSelection && (startRemoved || endRemoved))
+         m_frame->editor()->client()->respondToChangedSelection(m_frame);
+#endif
 }
 
 static void updatePositionAfterAdoptingTextReplacement(Position& position, CharacterData* node, unsigned offset, unsigned oldLength, unsigned newLength)
index 2ca3aee..fb60c13 100755 (executable)
@@ -517,8 +517,10 @@ static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, con
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
-    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned())
+    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned()) {
+        impl->pageClient->initTextSelectionHandlesMouseDownedStatus();
         return true;
+    }
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
index 5ac84fa..47a35ae 100644 (file)
@@ -168,6 +168,9 @@ void TextSelectionHandle::mouseUp()
     edje_object_signal_emit(m_icon, "mouse,up,1", "handle");
 #endif
 
+    if (m_textSelection->isEnabled())
+        setIsMouseDowned(false);
+
     m_textSelection->handleMouseUp(this, m_mousePosition);
 }