Title: [133426] trunk
Revision
133426
Author
[email protected]
Date
2012-11-04 14:30:25 -0800 (Sun, 04 Nov 2012)

Log Message

Unreviewed, rolling out r133416.
http://trac.webkit.org/changeset/133416
https://bugs.webkit.org/show_bug.cgi?id=101169

Broke world selection by right click (Requested by rniwa on
#webkit).

Patch by Sheriff Bot <[email protected]> on 2012-11-04

Source/WebCore:

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
(WebCore::EventHandler::sendContextMenuEvent):

LayoutTests:

* fast/events/touch/gesture/disabled-input-text-selection-expected.txt: Removed.
* fast/events/touch/gesture/disabled-input-text-selection.html: Removed.
* platform/chromium/TestExpectations:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (133425 => 133426)


--- trunk/LayoutTests/ChangeLog	2012-11-04 22:26:02 UTC (rev 133425)
+++ trunk/LayoutTests/ChangeLog	2012-11-04 22:30:25 UTC (rev 133426)
@@ -1,3 +1,16 @@
+2012-11-04  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r133416.
+        http://trac.webkit.org/changeset/133416
+        https://bugs.webkit.org/show_bug.cgi?id=101169
+
+        Broke world selection by right click (Requested by rniwa on
+        #webkit).
+
+        * fast/events/touch/gesture/disabled-input-text-selection-expected.txt: Removed.
+        * fast/events/touch/gesture/disabled-input-text-selection.html: Removed.
+        * platform/chromium/TestExpectations:
+
 2012-11-04  Stephen White  <[email protected]>
 
         [chromium] Add a now-failing test.  Unreviewed.

Deleted: trunk/LayoutTests/fast/events/touch/gesture/disabled-input-text-selection-expected.txt (133425 => 133426)


--- trunk/LayoutTests/fast/events/touch/gesture/disabled-input-text-selection-expected.txt	2012-11-04 22:26:02 UTC (rev 133425)
+++ trunk/LayoutTests/fast/events/touch/gesture/disabled-input-text-selection-expected.txt	2012-11-04 22:30:25 UTC (rev 133426)
@@ -1,8 +0,0 @@
-
-This test checks that if the text from disabled input/text area is selected on long press gesture.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS
-

Deleted: trunk/LayoutTests/fast/events/touch/gesture/disabled-input-text-selection.html (133425 => 133426)


--- trunk/LayoutTests/fast/events/touch/gesture/disabled-input-text-selection.html	2012-11-04 22:26:02 UTC (rev 133425)
+++ trunk/LayoutTests/fast/events/touch/gesture/disabled-input-text-selection.html	2012-11-04 22:30:25 UTC (rev 133426)
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<input id="input" type="text" disabled value="Disabled" size="60"><br>
-<div id="console"></div>
-<script>
-description("This test checks that if the text from disabled input/text area is selected on long press gesture.");
-
-if (window.testRunner)
-    testRunner.dumpAsText();
-
-var input = document.getElementById("input");
-
-var x = input.offsetParent.offsetLeft + input.offsetLeft + 4;
-var y = input.offsetParent.offsetTop + input.offsetTop + input.offsetHeight / 2;
-
-if (window.eventSender) {
-
- if (eventSender.gestureLongPress)
-    eventSender.gestureLongPress(x, y);
- else
-    debug("gestureLongPress not implemented by this platform");
- shouldBe('window.getSelection().toString()', "'Disabled'");
-}
-</script>
-<script src=""
-</body>
-</html>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (133425 => 133426)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-11-04 22:26:02 UTC (rev 133425)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-11-04 22:30:25 UTC (rev 133426)
@@ -3124,8 +3124,6 @@
 webkit.org/b/81145 [ Lion ] fast/writing-mode/japanese-rl-text-with-broken-font.html [ Crash ]
 
 webkit.org/b/81537 fast/events/touch/gesture/pad-gesture-fling.html [ Failure Pass ]
-# Skip test as its Android Specific and gestureLongPress does not select text in chromium port
-webkit.org/b/99698 fast/events/touch/gesture/disabled-input-text-selection.html [ Skip ]
 
 webkit.org/b/81638 [ Mac Debug ] editing/selection/iframe.html [ ImageOnlyFailure Pass ]
 

Modified: trunk/Source/WebCore/ChangeLog (133425 => 133426)


--- trunk/Source/WebCore/ChangeLog	2012-11-04 22:26:02 UTC (rev 133425)
+++ trunk/Source/WebCore/ChangeLog	2012-11-04 22:30:25 UTC (rev 133426)
@@ -1,3 +1,16 @@
+2012-11-04  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r133416.
+        http://trac.webkit.org/changeset/133416
+        https://bugs.webkit.org/show_bug.cgi?id=101169
+
+        Broke world selection by right click (Requested by rniwa on
+        #webkit).
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
+        (WebCore::EventHandler::sendContextMenuEvent):
+
 2012-11-04  Gyuyoung Kim  <[email protected]>
 
         Missing ASCIILiteral in a place of accessibility

Modified: trunk/Source/WebCore/page/EventHandler.cpp (133425 => 133426)


--- trunk/Source/WebCore/page/EventHandler.cpp	2012-11-04 22:26:02 UTC (rev 133425)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2012-11-04 22:30:25 UTC (rev 133426)
@@ -2622,7 +2622,7 @@
     IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());
     HitTestResult result = hitTestResultAtPoint(hitTestPoint, true);
     Node* innerNode = result.targetNode();
-    if (!result.isLiveLink() && innerNode && canMouseDownStartSelect(innerNode)) {
+    if (!result.isLiveLink() && innerNode && (innerNode->isContentEditable() || innerNode->isTextNode())) {
         selectClosestWordFromHitTestResult(result, DontAppendTrailingWhitespace);
         if (m_frame->selection()->isRange())
             return true;
@@ -2739,7 +2739,7 @@
         // FIXME: In the editable case, word selection sometimes selects content that isn't underneath the mouse.
         // If the selection is non-editable, we do word selection to make it easier to use the contextual menu items
         // available for text selections.  But only if we're above text.
-        && canMouseDownStartSelect(mev.targetNode())) {
+        && (m_frame->selection()->isContentEditable() || (mev.targetNode() && mev.targetNode()->isTextNode()))) {
         m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
         selectClosestWordOrLinkFromMouseEvent(mev);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to