Reviewed by Ken.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jul 2004 21:31:58 +0000 (21:31 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jul 2004 21:31:58 +0000 (21:31 +0000)
        - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
        now also extends selection (even if there wasn't one before)

        * khtml/khtml_part.cpp:
        (KHTMLPart::handleMousePressEventSingleClick):
        if there's a URL associated with the event, don't extend the selection

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/khtml_part.cpp

index 36f64e3e4019762d82f7fb07d04e83e9c34c9347..55613cace8553a0f3786cb2af158a31bd058f791 100644 (file)
@@ -1,3 +1,14 @@
+2004-07-08  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Ken.
+        
+        - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link 
+        now also extends selection (even if there wasn't one before)
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::handleMousePressEventSingleClick):
+        if there's a URL associated with the event, don't extend the selection
+
 2004-07-08  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Vicki
index 5f0acadf38c02dac41010e608dbb9a372bbc3c64..be41a846a9881790ad2fc7cedbc6cd3df7b35d43 100644 (file)
@@ -4401,7 +4401,8 @@ void KHTMLPart::handleMousePressEventSingleClick(khtml::MousePressEvent *event)
 
         if (!innerNode.isNull() && innerNode.handle()->renderer() &&
             innerNode.handle()->renderer()->shouldSelect()) {
-            bool extendSelection = mouse->state() & ShiftButton;
+            // Extend the selection if the Shift key is down, unless the click is in a link.
+            bool extendSelection = (mouse->state() & ShiftButton) && (!event->url().isNull());
 
             // Don't restart the selection when the mouse is pressed on an
             // existing selection so we can allow for text dragging.