Clear the text highlight when a user taps the input field
authorJinwoo Song <jinwoo7.song@samsung.com>
Thu, 27 Jun 2013 01:42:51 +0000 (10:42 +0900)
committerJinwoo Song <jinwoo7.song@samsung.com>
Thu, 27 Jun 2013 01:50:22 +0000 (10:50 +0900)
[Title] Clear the text highlight when a user taps the input field
[Issue#] N_SE-43213
[Problem] Text highlight are remained in input field eventhough user input another text.
[Cause] Text highlight are not cleared.
[Solution] Clare the text highlight when a user inputs text.

Change-Id: I0a07cac7c70484878f6d7211eff2b4018d0c37c3

Source/WTF/wtf/Platform.h
Source/WebCore/page/EventHandler.cpp

index fc04505..8a52ed6 100755 (executable)
@@ -802,6 +802,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/
 #define ENABLE_TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED 1 /* Praveen(praveen.ks@samsung.com) : Add API to signal application for change in back forward list */
 
 #define ENABLE_TIZEN_FIND_STRING 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Fix the bug to enable searching the web page which has the 'webkit-user-select: none' CSS property and value. */
+#define ENABLE_TIZEN_FIND_STRING_HIGHLIGHT_CLEAR 1 /* Jinwoo Song(jinwoo7.song@samsung.com) : Fix the bug to clear the highlight when users tap editable areas such as input field. */
 
 #define ENABLE_TIZEN_GET_EXTERNAL_RESOURCES_IN_MHTML_FROM_NETWORK 1 /* Praveen(praveen.ks@samsung.com) : Allow external resources in MHTML file to be fetched from network rather than failing them */
 #define ENABLE_TIZEN_MHTML_CSS_MEDIA_RULE_RESOURCE 1 /* Santosh Mahto(santosh.ma@samsung.com) : Collect the subresource specified in css media rule in mhtml PageSerializing */
index 23fec35..dc3d63b 100755 (executable)
@@ -507,6 +507,11 @@ bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestR
     m_frame->document()->updateLayoutIgnorePendingStylesheets();
     Node* innerNode = targetNode(event);
 
+#if ENABLE(TIZEN_FIND_STRING_HIGHLIGHT_CLEAR)
+    if (m_frame->page() && innerNode->rendererIsEditable())
+        m_frame->page()->unmarkAllTextMatches();
+#endif
+
 #if ENABLE(TIZEN_LINK_EFFECT)
     if (m_frame->page() &&m_frame->page()->settings()->linkEffectEnabled()) {
         for (Node* node = innerNode; node && !node->disabled() && !node->rendererIsEditable(); node = node->parentNode()) {