[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:24:37 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bf8fbcdd4498707d05add7d58906783d6eb61a0e
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 15 22:23:31 2002 +0000

    	A teeny weeny bit of refactoring.
    
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge stateForEvent:]): Replaces addModifiers:toState:.
            (-[WebCoreBridge mouseUp:]): Use stateForEvent:.
            (-[WebCoreBridge mouseDown:]): Use stateForEvent:.
            (-[WebCoreBridge mouseMoved:]): Use stateForEvent:.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d09cdab..2ab03a3 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,13 @@
+2002-07-15  Darin Adler  <darin at apple.com>
+
+	A teeny weeny bit of refactoring.
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge stateForEvent:]): Replaces addModifiers:toState:.
+        (-[WebCoreBridge mouseUp:]): Use stateForEvent:.
+        (-[WebCoreBridge mouseDown:]): Use stateForEvent:.
+        (-[WebCoreBridge mouseMoved:]): Use stateForEvent:.
+
 2002-07-15  Richard Williamson (Home)  <rjw at apple.com>
 
         Added isFrameSet method.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d09cdab..2ab03a3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2002-07-15  Darin Adler  <darin at apple.com>
+
+	A teeny weeny bit of refactoring.
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge stateForEvent:]): Replaces addModifiers:toState:.
+        (-[WebCoreBridge mouseUp:]): Use stateForEvent:.
+        (-[WebCoreBridge mouseDown:]): Use stateForEvent:.
+        (-[WebCoreBridge mouseMoved:]): Use stateForEvent:.
+
 2002-07-15  Richard Williamson (Home)  <rjw at apple.com>
 
         Added isFrameSet method.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d09cdab..2ab03a3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2002-07-15  Darin Adler  <darin at apple.com>
+
+	A teeny weeny bit of refactoring.
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge stateForEvent:]): Replaces addModifiers:toState:.
+        (-[WebCoreBridge mouseUp:]): Use stateForEvent:.
+        (-[WebCoreBridge mouseDown:]): Use stateForEvent:.
+        (-[WebCoreBridge mouseMoved:]): Use stateForEvent:.
+
 2002-07-15  Richard Williamson (Home)  <rjw at apple.com>
 
         Added isFrameSet method.
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index e83f522..cb624db 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -269,17 +269,23 @@
     }
 }
 
-- (void)addModifiers:(unsigned)modifiers toState:(int *)state
+- (int)stateForEvent:(NSEvent *)event
 {
+    unsigned modifiers = [event modifierFlags];
+    int state = 0;
+    
     if (modifiers & NSControlKeyMask)
-        *state |= Qt::ControlButton;
+        state |= Qt::ControlButton;
     if (modifiers & NSShiftKeyMask)
-        *state |= Qt::ShiftButton;
+        state |= Qt::ShiftButton;
     if (modifiers & NSAlternateKeyMask)
-        *state |= Qt::AltButton;
-    // Mapping command to meta is slightly questionable
+        state |= Qt::AltButton;
+    
+    // Mapping command to meta is slightly questionable, but it works for now.
     if (modifiers & NSCommandKeyMask)
-        *state |= Qt::MetaButton;
+        state |= Qt::MetaButton;
+    
+    return state;
 }
 
 - (void)mouseUp:(NSEvent *)event
@@ -301,7 +307,7 @@
         state = Qt::LeftButton;
         break;
     }
-    [self addModifiers:[event modifierFlags] toState:&state];
+    state |= [self stateForEvent:event];
     
     QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
     if (part->impl->getView()) {
@@ -328,7 +334,7 @@
         state = Qt::LeftButton;
         break;
     }
-    [self addModifiers:[event modifierFlags] toState:&state];
+    state |= [self stateForEvent:event];
     
     QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
     if (part->impl->getView()) {
@@ -340,10 +346,7 @@
 {
     NSPoint p = [event locationInWindow];
     
-    int state = 0;
-    [self addModifiers:[event modifierFlags] toState:&state];
-    
-    QMouseEvent kEvent(QEvent::MouseMove, QPoint((int)p.x, (int)p.y), 0, state);
+    QMouseEvent kEvent(QEvent::MouseMove, QPoint((int)p.x, (int)p.y), 0, [self stateForEvent:event]);
     if (part->impl->getView()) {
         part->impl->getView()->viewportMouseMoveEvent(&kEvent);
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list