Prevent to select word on which have SELECT_NONE property
authorTaeyun An <ty.an@samsung.com>
Fri, 6 Sep 2013 04:37:35 +0000 (13:37 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Sat, 28 Sep 2013 08:25:37 +0000 (08:25 +0000)
[Title] Prevent to select word on which have SELECT_NONE property
[Issue#] N/A
[Problem] Selection is working incorrectly where in wrong position on which is having SELECT_NONE property
[Cause] There is no return status while proceed selectClosestWord API if node has SELECT_NONE value
[Solution] Prevent to select word on which have SELECT_NONE property

Change-Id: I4c7c4e4ebec6c885e186c170c70ea9863f55fb2b

Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp

index f8d9606..c195e6f 100755 (executable)
@@ -1276,6 +1276,9 @@ void WebPage::selectClosestWord(const IntPoint& point, bool& result)
     if (!node)
         return;
 
+    if (node->renderer() && node->renderer()->style() && (node->renderer()->style()->userSelect() == SELECT_NONE))
+        return;
+
      Frame* newFocusFrame = node->document()->frame();
      if (focusedFrame != newFocusFrame) {
          m_page->focusController()->setFocusedFrame(newFocusFrame);