[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:26:08 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit e0ff32d3baa605c8c54e2f620b0cc0df21ad20f2
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 04:52:19 2009 +0000

    Made the full-screen video HUD appear when playback stops, such as when
    the end of the video is reached.
    
    Reviewed by Eric Carlson.
    
    * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.
    * WebView/WebVideoFullscreenHUDWindowController.mm:
    (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
    for the renaming of -updateRate to -updatePlayButton.
    (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
    -updateRate to this.
    (-[WebVideoFullscreenHUDWindowController updateRate]): This method now
    responds to changes to the playback rate by updating the play button
    and showing or hiding the HUD as necessary.
    (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
    toggles playing. UI updates are driven by -updateRate being called.
    (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 05e9c50..75523df 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,23 @@
+2009-11-08  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Eric Carlson.
+
+        Made the full-screen video HUD appear when playback stops, such as when
+        the end of the video is reached.
+
+        * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.
+        * WebView/WebVideoFullscreenHUDWindowController.mm:
+        (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
+        for the renaming of -updateRate to -updatePlayButton.
+        (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
+        -updateRate to this.
+        (-[WebVideoFullscreenHUDWindowController updateRate]): This method now
+        responds to changes to the playback rate by updating the play button
+        and showing or hiding the HUD as necessary.
+        (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
+        toggles playing. UI updates are driven by -updateRate being called.
+        (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.
+
 2009-11-02  Eric Carlson  <eric.carlson at apple.com>
 
         Reviewed by John Sullivan and Mark Rowe.
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
index 33358b6..15f8282 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
@@ -10,17 +10,17 @@
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #if ENABLE(VIDEO)
@@ -33,7 +33,7 @@ namespace WebCore {
 
 @interface WebVideoFullscreenHUDWindowController : NSWindowController
 {
-    id<WebVideoFullscreenHUDWindowControllerDelegate> _delegate;
+    id <WebVideoFullscreenHUDWindowControllerDelegate> _delegate;
     NSTimer *_timelineUpdateTimer;
 #if !defined(BUILDING_ON_TIGER)
     NSTrackingArea *_area;
@@ -48,8 +48,8 @@ namespace WebCore {
     NSButton *_playButton;
 }
 
-- (id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate;
-- (void)setDelegate:(id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate;
+- (id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate;
+- (void)setDelegate:(id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate;
 - (void)fadeWindowIn;
 - (void)fadeWindowOut;
 - (void)closeWindow;
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index e0c0fae..539a7eb 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -59,6 +59,7 @@ static inline CGFloat webkit_CGFloor(CGFloat value)
 - (void)decrementVolume;
 - (void)incrementVolume;
 
+- (void)updatePlayButton;
 - (void)togglePlaying:(id)sender;
 - (BOOL)playing;
 - (void)setPlaying:(BOOL)playing;
@@ -210,12 +211,12 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
     [super keyDown:event];
 }
 
-- (id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate
+- (id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate
 {
     return _delegate;
 }
 
-- (void)setDelegate:(id<WebVideoFullscreenHUDWindowControllerDelegate>)delegate
+- (void)setDelegate:(id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate
 {
     _delegate = delegate;
 }
@@ -226,7 +227,7 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
 
     // First, update right away, then schedule future update
     [self updateTime];
-    [self updateRate];
+    [self updatePlayButton];
 
     [_timelineUpdateTimer invalidate];
     [_timelineUpdateTimer release];
@@ -525,30 +526,37 @@ static NSTextField *createTimeTextField(NSRect frame)
     [self updateVolume];
 }
 
-- (void)updateRate
+- (void)updatePlayButton
 {
     [_playButton setIntValue:[self playing]];
 }
 
-- (void)togglePlaying:(id)sender
+- (void)updateRate
 {
-    BOOL nowPlaying = [self playing];
-    [self setPlaying:!nowPlaying];
+    BOOL playing = [self playing];
 
-    // Keep HUD visible when paused
-    if (!nowPlaying)
+    // Keep the HUD visible when paused.
+    if (!playing)
         [self fadeWindowIn];
     else if (!_mouseIsInHUD) {
         [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fadeWindowOut) object:nil];
         [self performSelector:@selector(fadeWindowOut) withObject:nil afterDelay:HUDWindowFadeOutDelay];
     }
+    [self updatePlayButton];
+}
+
+- (void)togglePlaying:(id)sender
+{
+    [self setPlaying:![self playing]];
 }
 
 - (BOOL)playing
 {
-    if (![_delegate mediaElement])
-        return false;
-    return ![_delegate mediaElement]->canPlay();
+    HTMLMediaElement* mediaElement = [_delegate mediaElement];
+    if (!mediaElement)
+        return NO;
+
+    return !mediaElement->canPlay();
 }
 
 - (void)setPlaying:(BOOL)playing

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list