[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

mitz at apple.com mitz at apple.com
Wed Apr 7 23:17:59 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1abefe3cdfb1670aa9bb43ac91be8a65e59e8c8e
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 2 03:53:23 2009 +0000

    Made the space bar toggle playing state in full-screen video when
    modifier keys are down. Made it do so without highlighting the
    Play/Pause button.
    
    Reviewed by Mark Rowe.
    
    * WebView/WebVideoFullscreenHUDWindowController.mm:
    (-[WebVideoFullscreenHUDWindowController keyDown:]):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50402 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 586df01..dc26a96 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -2,6 +2,17 @@
 
         Reviewed by Mark Rowe.
 
+        Made the space bar toggle playing state in full-screen video when
+        modifier keys are down. Made it do so without highlighting the
+        Play/Pause button.
+
+        * WebView/WebVideoFullscreenHUDWindowController.mm:
+        (-[WebVideoFullscreenHUDWindowController keyDown:]):
+
+2009-11-01  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Mark Rowe.
+
         Made the full-screen video HUD respond to the up and down arrow keys by
         increasing and decreasing the volume by 1/10 of the range or, when
         combined with the Option key, all the way up or down.
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index 2c32144..394f0b2 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -186,23 +186,30 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
 
 - (void)keyDown:(NSEvent *)event
 {
-    if ([[event characters] isEqualToString:@" "])
-        [_playButton performClick:self];
-    else {
-        NSString *charactersIgnoringModifiers = [event charactersIgnoringModifiers];
-        if ([charactersIgnoringModifiers length] == 1 && [charactersIgnoringModifiers characterAtIndex:0] == NSUpArrowFunctionKey) {
-            if ([event modifierFlags] & NSAlternateKeyMask)
-                [self setVolume:[self maxVolume]];
-            else
-                [self incrementVolume];
-        } else if ([charactersIgnoringModifiers length] == 1 && [charactersIgnoringModifiers characterAtIndex:0] == NSDownArrowFunctionKey) {
-            if ([event modifierFlags] & NSAlternateKeyMask)
-                [self setVolume:0];
-            else
-                [self decrementVolume];
-        } else
-            [super keyDown:event];
+    NSString *charactersIgnoringModifiers = [event charactersIgnoringModifiers];
+    if ([charactersIgnoringModifiers length] == 1) {
+        switch ([charactersIgnoringModifiers characterAtIndex:0]) {
+            case ' ':
+                [self togglePlaying:nil];
+                return;
+            case NSUpArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask)
+                    [self setVolume:[self maxVolume]];
+                else
+                    [self incrementVolume];
+                return;
+            case NSDownArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask)
+                    [self setVolume:0];
+                else
+                    [self decrementVolume];
+                return;
+            default:
+                break;
+        }
     }
+
+    [super keyDown:event];
 }
 
 - (id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list