Rollout r156635 since the old behavior was intentional.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Apr 2014 23:05:53 +0000 (23:05 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Apr 2014 23:05:53 +0000 (23:05 +0000)
Source/WebCore:
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):

LayoutTests:
* editing/caret/selection-with-caret-type-progress-expected.txt: Removed.
* editing/caret/selection-with-caret-type-progress.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/editing/caret/selection-with-caret-type-progress-expected.txt [deleted file]
LayoutTests/editing/caret/selection-with-caret-type-progress.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp

index f40a8c2c0a7f8e45122bc676c4da985e1d39519e..672bfb380e5d98de7bd744299c71f38b3c208c09 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Rollout r156635 since the old behavior was intentional.
+
+        * editing/caret/selection-with-caret-type-progress-expected.txt: Removed.
+        * editing/caret/selection-with-caret-type-progress.html: Removed.
+
 2014-04-22  Andreas Kling  <akling@apple.com>
 
         REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
diff --git a/LayoutTests/editing/caret/selection-with-caret-type-progress-expected.txt b/LayoutTests/editing/caret/selection-with-caret-type-progress-expected.txt
deleted file mode 100644 (file)
index 61fd740..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Tests whether explicitly set caret style is retained on performing text selection
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Try selecting this text by dragging the mouse.
-PASS currentCursorType is "Progress"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/editing/caret/selection-with-caret-type-progress.html b/LayoutTests/editing/caret/selection-with-caret-type-progress.html
deleted file mode 100644 (file)
index 835ac90..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<p id="description"></p>
-<div style="cursor:progress; border: 2px solid red;" id="test">Try selecting this text by dragging the mouse.</div>
-<div id="console"></div>
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-description('Tests whether explicitly set caret style is retained on performing text selection');
-if (window.eventSender && window.internals) {
-    var div = document.getElementById("test");
-    div.focus();
-
-    var y = div.offsetTop + div.offsetHeight / 2;
-
-    function leapForwardAndMove(x) {
-        eventSender.leapForward(200);
-        eventSender.mouseMoveTo(div.offsetLeft + x, y);
-    }
-
-    eventSender.dragMode = false;
-    leapForwardAndMove(div.offsetLeft + 5);
-    eventSender.mouseDown();
-
-    leapForwardAndMove(div.offsetLeft + 10);
-    leapForwardAndMove(div.offsetLeft + 20);
-    leapForwardAndMove(div.offsetWidth - 10);
-
-    var cursorInfo = window.internals.getCurrentCursorInfo();
-    var currentCursorType = cursorInfo.substring(cursorInfo.indexOf('=') + 1, cursorInfo.lastIndexOf(' '));
-    shouldBeEqualToString('currentCursorType', 'Progress');
-} else {
-    debug('To test manually, select the text within the red bordered div above by dragging the mouse. Progress cursor should be displayed while doing so.');
-}
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
index 14d9e650fe2903e2f29f6a5417ff1f832164e8e0..bb825346117a50dd01a3c02be1179883d00591aa 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Rollout r156635 since the old behavior was intentional.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::selectCursor):
+
 2014-04-22  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r167674.
index 6b1b02b61d6cddc31e0beb4aa4d30e764499dd25..bbda67ed162794c8be433af026b52a61404d6ea4 100644 (file)
@@ -1373,6 +1373,17 @@ OptionalCursor EventHandler::selectCursor(const HitTestResult& result, bool shif
         }
     }
 
+    // During selection, use an I-beam regardless of the content beneath the cursor.
+    // If a drag may be starting or we're capturing mouse events for a particular node, don't treat this as a selection.
+    if (m_mousePressed
+        && m_mouseDownMayStartSelect
+#if ENABLE(DRAG_SUPPORT)
+        && !m_mouseDownMayStartDrag
+#endif
+        && m_frame.selection().isCaretOrRange()
+        && !m_capturingMouseEventsElement)
+        return iBeam;
+
     switch (style ? style->cursor() : CURSOR_AUTO) {
     case CURSOR_AUTO: {
         bool editable = node->hasEditableStyle();
@@ -1388,17 +1399,6 @@ OptionalCursor EventHandler::selectCursor(const HitTestResult& result, bool shif
             }
         }
 
-        // During selection, use an I-beam regardless of the content beneath the cursor when cursor style is not explicitly specified.
-        // If a drag may be starting or we're capturing mouse events for a particular node, don't treat this as a selection.
-        if (m_mousePressed && m_mouseDownMayStartSelect
-#if ENABLE(DRAG_SUPPORT)
-            && !m_mouseDownMayStartDrag
-#endif
-            && m_frame.selection().isCaretOrRange()
-            && !m_capturingMouseEventsElement) {
-            return iBeam;
-        }
-
         if ((editable || (renderer && renderer->isText() && node->canStartSelection())) && !inResizer && !result.scrollbar())
             return iBeam;
         return pointerCursor();