[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
mitz at apple.com
mitz at apple.com
Thu Dec 3 13:24:27 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 906169e5bdf2e105e98910ce7e7db25a21047968
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 2 03:14:51 2009 +0000
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.
Reviewed by Mark Rowe.
Made the volume buttons in the full-screen video HUD match the behavior
of their equivalents in the QuickTime Player HUD by turning the volume
all the way up or down.
Made the volume slider update immediately when the keyboard or volume
buttons are used to change the volume, rather than at the nearest 1/4
second interval.
Made the elapsed and remaining time displays update immediately when the
play head is dragged across the timeline, rather than at 1/4 second
intervals.
* WebView/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController keyDown:]): Handle the up and
down arrow keys.
(-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
actions of the volume up and volume down buttons.
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]): Call
-updateTime.
(-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): Added this
action for the volume down button.
(-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): Added
this action for the volume up button.
(-[WebVideoFullscreenHUDWindowController decrementVolume]): No longer
and action method.
(-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto.
(-[WebVideoFullscreenHUDWindowController setVolume:]): Call
-updateVolume.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 81f00c6..586df01 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,40 @@
+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.
+
+ Made the volume buttons in the full-screen video HUD match the behavior
+ of their equivalents in the QuickTime Player HUD by turning the volume
+ all the way up or down.
+
+ Made the volume slider update immediately when the keyboard or volume
+ buttons are used to change the volume, rather than at the nearest 1/4
+ second interval.
+
+ Made the elapsed and remaining time displays update immediately when the
+ play head is dragged across the timeline, rather than at 1/4 second
+ intervals.
+
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindowController keyDown:]): Handle the up and
+ down arrow keys.
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
+ actions of the volume up and volume down buttons.
+ (-[WebVideoFullscreenHUDWindowController setCurrentTime:]): Call
+ -updateTime.
+ (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): Added this
+ action for the volume down button.
+ (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): Added
+ this action for the volume up button.
+ (-[WebVideoFullscreenHUDWindowController decrementVolume]): No longer
+ and action method.
+ (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto.
+ (-[WebVideoFullscreenHUDWindowController setVolume:]): Call
+ -updateVolume.
+
2009-10-30 Evan Stade <estade at chromium.org>
Reviewed by David Levin.
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index c61ae7c..2c32144 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -39,18 +39,18 @@ using namespace std;
@interface WebVideoFullscreenHUDWindowController (Private) <NSWindowDelegate>
-- (void)keyDown:(NSEvent *)event;
-
- (void)updateTime;
- (void)timelinePositionChanged:(id)sender;
- (float)currentTime;
- (void)setCurrentTime:(float)currentTime;
- (double)duration;
-- (double)maxVolume;
- (void)volumeChanged:(id)sender;
+- (double)maxVolume;
- (double)volume;
- (void)setVolume:(double)volume;
+- (void)decrementVolume;
+- (void)incrementVolume;
- (void)togglePlaying:(id)sender;
- (BOOL)playing;
@@ -188,8 +188,21 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
{
if ([[event characters] isEqualToString:@" "])
[_playButton performClick:self];
- else
- [super keyDown:event];
+ 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];
+ }
}
- (id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate
@@ -356,7 +369,7 @@ static NSTextField *createTimeTextField(NSRect frame)
NSControl *volumeDownButton = createControlWithMediaUIControlType(WKMediaUIControlVolumeDownButton, NSMakeRect(left, top - kButtonSize / 2 - kButtonMiniSize / 2, kButtonMiniSize, kButtonMiniSize));
[contentView addSubview:volumeDownButton];
[volumeDownButton setTarget:self];
- [volumeDownButton setAction:@selector(decrementVolume:)];
+ [volumeDownButton setAction:@selector(setVolumeToZero:)];
[volumeDownButton release];
static const int volumeSliderWidth = 50;
@@ -371,7 +384,7 @@ static NSTextField *createTimeTextField(NSRect frame)
left = kMargin + kButtonMiniSize + volumeSliderWidth + kButtonMiniSize / 2;
NSControl *volumeUpButton = createControlWithMediaUIControlType(WKMediaUIControlVolumeUpButton, NSMakeRect(left, top - kButtonSize / 2 - kButtonMiniSize / 2, kButtonMiniSize, kButtonMiniSize));
[volumeUpButton setTarget:self];
- [volumeUpButton setAction:@selector(incrementVolume:)];
+ [volumeUpButton setAction:@selector(setVolumeToMaximum:)];
[contentView addSubview:volumeUpButton];
[volumeUpButton release];
@@ -443,6 +456,7 @@ static NSTextField *createTimeTextField(NSRect frame)
return;
WebCore::ExceptionCode e;
[_delegate mediaElement]->setCurrentTime(currentTime, e);
+ [self updateTime];
}
- (double)duration
@@ -461,7 +475,17 @@ static NSTextField *createTimeTextField(NSRect frame)
[self setVolume:[_volumeSlider doubleValue]];
}
-- (void)decrementVolume:(id)sender
+- (void)setVolumeToZero:(id)sender
+{
+ [self setVolume:0];
+}
+
+- (void)setVolumeToMaximum:(id)sender
+{
+ [self setVolume:[self maxVolume]];
+}
+
+- (void)decrementVolume
{
if (![_delegate mediaElement])
return;
@@ -470,7 +494,7 @@ static NSTextField *createTimeTextField(NSRect frame)
[self setVolume:max(volume, 0.)];
}
-- (void)incrementVolume:(id)sender
+- (void)incrementVolume
{
if (![_delegate mediaElement])
return;
@@ -492,6 +516,7 @@ static NSTextField *createTimeTextField(NSRect frame)
if ([_delegate mediaElement]->muted())
[_delegate mediaElement]->setMuted(false);
[_delegate mediaElement]->setVolume(volume / [self maxVolume], e);
+ [self updateVolume];
}
- (void)updateRate
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list