Prevent to select word when user longtap on picker.
authorYuni Jeong <yhnet.jung@samsung.com>
Mon, 14 Oct 2013 11:55:12 +0000 (20:55 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 15 Oct 2013 02:05:08 +0000 (02:05 +0000)
[Title] Prevent to select word when user longtap on picker.
[Issue#] P131014-02077
[Problem] Text selection is working when user longtap on picker.
[Cause] When user longTap on picker, text selection is working.
[Solution] If user longTap on picker, text selection is not working.
           And the picker popup is displayed.

Change-Id: I7abf66930b422ff15ab69decf2288f14896c12b5

Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index ad986bd..a46b91c
@@ -1312,39 +1312,20 @@ void WebPage::selectClosestWord(const IntPoint& point, bool isAutoWordSelection,
      }
 
     HTMLInputElement* inputElement = node->toInputElement();
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+    if (inputElement && inputElement->shouldUsePicker())
+        return;
+#endif
 
     if (hitTestResult.isContentEditable()) {
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-        if (!inputElement || (inputElement
-            && !inputElement->isDateField() && !inputElement->isDateTimeField() && !inputElement->isDateTimeLocalField()
-            && !inputElement->isMonthField() && !inputElement->isTimeField() && !inputElement->isWeekField())) {
-            result = setCaretPosition(point);
-            if (!isAutoWordSelection)
-                return;
-        }
-#else
         result = setCaretPosition(point);
         if (!isAutoWordSelection)
             return;
-#endif
     }
 
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-    if (!node->isTextNode() && !inputElement)
-#else
     if (!node->isTextNode())
-#endif
         return;
 
-#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
-    if (inputElement
-        && (inputElement->isDateField() || inputElement->isDateTimeField() || inputElement->isDateTimeLocalField()
-        || inputElement->isMonthField() || inputElement->isTimeField() || inputElement->isWeekField())) {
-        if (inputElement->value().isEmpty())
-            return;
-    }
-#endif
-
     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.