[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jparent at chromium.org jparent at chromium.org
Wed Dec 22 16:26:33 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a77a7e696f2f247f2cda3b4efb2a453ecfbd25bc
Author: jparent at chromium.org <jparent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 23 20:50:02 2010 +0000

    2010-11-23  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r72618.
            http://trac.webkit.org/changeset/72618
            https://bugs.webkit.org/show_bug.cgi?id=49987
    
            "Newly added test is failing on Chromium-linux, patch author
            said to rollout" (Requested by jparent on #webkit).
    
            * editing/EditingBehavior.h:
            * page/EventHandler.cpp:
            (WebCore::EventHandler::sendContextMenuEvent):
    2010-11-23  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r72618.
            http://trac.webkit.org/changeset/72618
            https://bugs.webkit.org/show_bug.cgi?id=49987
    
            "Newly added test is failing on Chromium-linux, patch author
            said to rollout" (Requested by jparent on #webkit).
    
            * editing/selection/context-menu-text-selection-expected.txt: Removed.
            * editing/selection/context-menu-text-selection.html: Removed.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3d5af61..b89cb84 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-23  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r72618.
+        http://trac.webkit.org/changeset/72618
+        https://bugs.webkit.org/show_bug.cgi?id=49987
+
+        "Newly added test is failing on Chromium-linux, patch author
+        said to rollout" (Requested by jparent on #webkit).
+
+        * editing/selection/context-menu-text-selection-expected.txt: Removed.
+        * editing/selection/context-menu-text-selection.html: Removed.
+
 2010-11-23  Julie Parent  <jparent at chromium.org>
 
         Unreviewed, fixing chromium baselines.
diff --git a/LayoutTests/editing/selection/context-menu-text-selection-expected.txt b/LayoutTests/editing/selection/context-menu-text-selection-expected.txt
deleted file mode 100644
index 3caf907..0000000
--- a/LayoutTests/editing/selection/context-menu-text-selection-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This test checks that triggering the context menu selects/doesn't select as platform-appropriate.
-
-Lorem ipsum
-SUCCESS
-SUCCESS
-SUCCESS
diff --git a/LayoutTests/editing/selection/context-menu-text-selection.html b/LayoutTests/editing/selection/context-menu-text-selection.html
deleted file mode 100644
index 69c470d..0000000
--- a/LayoutTests/editing/selection/context-menu-text-selection.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<body onload="load()">
-<p>This test checks that triggering the context menu selects/doesn't select as platform-appropriate.</p>
-<div id="text">Lorem ipsum</div>
-<div id="resultmac">RUNNING</div>
-<div id="resultwin">RUNNING</div>
-<div id="resultunix">RUNNING</div>
-</body>
-<script>
-function test(platform, selectionExpected, result)
-{
-    // clear selection
-    window.getSelection().removeAllRanges();
-
-    layoutTestController.setEditingBehavior(platform);
-
-    var text = document.getElementById("text");
-    var resultElement = document.getElementById(result);
-
-    var x = text.offsetParent.offsetLeft + text.offsetLeft + 4;
-    var y = text.offsetParent.offsetTop + text.offsetTop + text.offsetHeight / 2;
-
-    eventSender.mouseMoveTo(x, y);
-
-    var items = eventSender.contextClick();
-    if (items.length == 0) {
-        resultElement.innerHTML = 'FAILURE: No context menu';
-        return;
-    }
-
-    // esc key to kill the context menu
-    eventSender.keyDown(String.fromCharCode(0x001B), null);
-
-    var selectionType = window.getSelection().type;
-    if (selectionExpected) {
-        if (selectionType == "Range")
-            resultElement.innerHTML = "SUCCESS";
-        else
-            resultElement.innerHTML = "FAILURE: There should be a selection.";
-    } else {
-        if (selectionType == "Range")
-            resultElement.innerHTML = "FAILURE: There shouldn't be a selection.";
-        else
-            resultElement.innerHTML = "SUCCESS";
-    }
-}
-
-function load()
-{
-    if (!window.eventSender || !window.layoutTestController)
-        return;
-
-    layoutTestController.dumpAsText();
-
-    test('mac', true, 'resultmac');
-    test('win', false, 'resultwin');
-    test('unix', false, 'resultunix');
-}
-</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fdb3461..6e820c4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-23  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r72618.
+        http://trac.webkit.org/changeset/72618
+        https://bugs.webkit.org/show_bug.cgi?id=49987
+
+        "Newly added test is failing on Chromium-linux, patch author
+        said to rollout" (Requested by jparent on #webkit).
+
+        * editing/EditingBehavior.h:
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::sendContextMenuEvent):
+
 2010-11-23  Avi Drissman  <avi at google.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebCore/editing/EditingBehavior.h b/WebCore/editing/EditingBehavior.h
index a367c52..842d3f2 100644
--- a/WebCore/editing/EditingBehavior.h
+++ b/WebCore/editing/EditingBehavior.h
@@ -57,9 +57,6 @@ public:
     // in place and moving the extent. Matches NSTextView.
     bool shouldAlwaysGrowSelectionWhenExtendingToBoundary() const { return m_type == EditingMacBehavior; }
 
-    // On Mac, when processing a contextual click, the object being clicked upon should be selected.
-    bool shouldSelectOnContextualMenuClick() const { return m_type == EditingMacBehavior; }
-
 private:
     EditingBehaviorType m_type;
 };
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index e095136..f6a2353 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2007,8 +2007,11 @@ bool EventHandler::sendContextMenuEvent(const PlatformMouseEvent& event)
     HitTestRequest request(HitTestRequest::Active);
     MouseEventWithHitTestResults mev = doc->prepareMouseEvent(request, viewportPos, event);
 
-    if (m_frame->editor()->behavior().shouldSelectOnContextualMenuClick()
-        && !m_frame->selection()->contains(viewportPos)
+    // Context menu events shouldn't select text in GTK+ applications or in Chromium.
+    // FIXME: This should probably be configurable by embedders. Consider making it a WebPreferences setting.
+    // See: https://bugs.webkit.org/show_bug.cgi?id=15279
+#if !PLATFORM(GTK) && !PLATFORM(CHROMIUM)
+    if (!m_frame->selection()->contains(viewportPos)
         // 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.
@@ -2016,6 +2019,7 @@ bool EventHandler::sendContextMenuEvent(const PlatformMouseEvent& event)
         m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
         selectClosestWordOrLinkFromMouseEvent(mev);
     }
+#endif
 
     swallowEvent = dispatchMouseEvent(eventNames().contextmenuEvent, mev.targetNode(), true, 0, event, false);
     

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list