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

eric.carlson at apple.com eric.carlson at apple.com
Wed Apr 7 23:13:38 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9bfaaa38e7fd6b6ac5f5e280f16dcd487a2d254f
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 28 22:36:47 2009 +0000

    2009-10-28  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Simon Fraser.
    
            <rdar://problem/7303145>
            Can't exit full screen mode or restart movie after pressing command -R.
    
            * html/HTMLMediaElement.cpp:
            (WebCore::HTMLMediaElement::removedFromDocument):
            (WebCore::HTMLMediaElement::documentWillBecomeInactive):
                Exit from fullscreen if necessary.
            * html/HTMLMediaElement.h:
    
    2009-10-28  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Simon Fraser.
    
            <rdar://problem/7303145>
            Can't exit full screen mode or restart movie after pressing command -R.
    
            * WebView/WebVideoFullscreenController.mm:
            (-[WebVideoFullscreenController _requestExit]):
                New, call media element's exitFullscreen method.
            (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]):
                Call mediaElement->exitFullscreen() after a delay as it turns around and calls
                WebVideoFullscreenController:exitFullscreen.
    
            * WebView/WebVideoFullscreenHUDWindowController.h:
            * WebView/WebVideoFullscreenHUDWindowController.mm:
            (-[WebVideoFullscreenHUDWindow resignFirstResponder]):
                New, don't give up responder status.
            (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
                New, block all command key events.
            (-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
                Remember when we are in the process of exiting fullscreen, don't allow recursion.
    
            * WebView/WebView.mm:
            (-[WebView _exitFullscreen]):
                Early return if fullscreen controller is nil.
    
            * WebView/WebWindowAnimation.h:
                Correct comment about _window retain status.
            * WebView/WebWindowAnimation.m:
            (-[WebWindowScaleAnimation dealloc]):
                Don't release _window, we never reatained it.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b23e41b..c42a4af 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-28  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/7303145> 
+        Can't exit full screen mode or restart movie after pressing command -R.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::removedFromDocument):
+        (WebCore::HTMLMediaElement::documentWillBecomeInactive):
+            Exit from fullscreen if necessary.
+        * html/HTMLMediaElement.h:
+
 2009-10-28  Alexey Proskuryakov  <ap at apple.com>
 
         Unreviewed - a trivial fix to get Windows bots running.
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 11ca3ba..729aceb 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -247,16 +247,12 @@ void HTMLMediaElement::insertedIntoDocument()
         scheduleLoad();
 }
 
-void HTMLMediaElement::willRemove()
-{
-    if (m_isFullscreen)
-        exitFullscreen();
-    HTMLElement::willRemove();
-}
 void HTMLMediaElement::removedFromDocument()
 {
     if (m_networkState > NETWORK_EMPTY)
         pause();
+    if (m_isFullscreen)
+        exitFullscreen();
     HTMLElement::removedFromDocument();
 }
 
@@ -1678,6 +1674,9 @@ void HTMLMediaElement::userCancelledLoad()
 
 void HTMLMediaElement::documentWillBecomeInactive()
 {
+    if (m_isFullscreen)
+        exitFullscreen();
+
     m_inActiveDocument = false;
     userCancelledLoad();
 
diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h
index 0005e07..405f013 100644
--- a/WebCore/html/HTMLMediaElement.h
+++ b/WebCore/html/HTMLMediaElement.h
@@ -57,7 +57,6 @@ public:
     virtual bool rendererIsNeeded(RenderStyle*);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     virtual void insertedIntoDocument();
-    virtual void willRemove();
     virtual void removedFromDocument();
     virtual void attach();
     virtual void recalcStyle(StyleChange);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 906d571..9104b89 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,36 @@
+2009-10-28  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/7303145> 
+        Can't exit full screen mode or restart movie after pressing command -R.
+
+        * WebView/WebVideoFullscreenController.mm:
+        (-[WebVideoFullscreenController _requestExit]): 
+            New, call media element's exitFullscreen method.
+        (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]): 
+            Call mediaElement->exitFullscreen() after a delay as it turns around and calls
+            WebVideoFullscreenController:exitFullscreen.
+
+        * WebView/WebVideoFullscreenHUDWindowController.h:
+        * WebView/WebVideoFullscreenHUDWindowController.mm:
+        (-[WebVideoFullscreenHUDWindow resignFirstResponder]):
+            New, don't give up responder status.
+        (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
+            New, block all command key events.
+        (-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
+            Remember when we are in the process of exiting fullscreen, don't allow recursion.
+
+        * WebView/WebView.mm:
+        (-[WebView _exitFullscreen]):
+            Early return if fullscreen controller is nil.
+
+        * WebView/WebWindowAnimation.h: 
+            Correct comment about _window retain status.
+        * WebView/WebWindowAnimation.m:
+        (-[WebWindowScaleAnimation dealloc]):
+            Don't release _window, we never reatained it.
+
 2009-10-27  Shinichiro Hamaji  <hamaji at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm
index 39ec72a..fe07f3e 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm
@@ -280,14 +280,21 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
 #pragma mark -
 #pragma mark Window callback
 
+- (void)_requestExit
+{
+    if (_mediaElement)
+        _mediaElement->exitFullscreen();
+    _forceDisableAnimation = NO;
+}
+
 - (void)requestExitFullscreenWithAnimation:(BOOL)animation
 {
     if (_isEndingFullscreen)
         return;
 
     _forceDisableAnimation = !animation;
-    _mediaElement->exitFullscreen();
-    _forceDisableAnimation = NO;
+    [self performSelector:@selector(_requestExit) withObject:nil afterDelay:0];
+
 }
 
 - (void)requestExitFullscreen
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
index abc8092..1ffa596 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h
@@ -38,6 +38,7 @@
     NSTrackingArea *_area;
 #endif
     BOOL _mouseIsInHUD;
+    BOOL _isEndingFullscreen;
 
     NSControl *_timeline;
     NSTextField *_remainingTimeText;
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index 666ea10..c61ae7c 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -117,6 +117,23 @@ using namespace std;
     [[self windowController] fadeWindowIn];
 }
 
+- (BOOL)resignFirstResponder
+{
+    return NO;
+}
+
+- (BOOL)performKeyEquivalent:(NSEvent *)event
+{
+    // Block all command key events while the fullscreen window is up.
+    if ([event type] != NSKeyDown)
+        return NO;
+    
+    if (!([event modifierFlags] & NSCommandKeyMask))
+        return NO;
+    
+    return YES;
+}
+
 @end
 
 //
@@ -604,6 +621,9 @@ static NSString *stringToTimeTextAttributed(NSString *string, NSTextAlignment al
 
 - (void)exitFullscreen:(id)sender
 {
+    if (_isEndingFullscreen)
+        return;
+    _isEndingFullscreen = YES;
     [_delegate requestExitFullscreen]; 
 }
 
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index dcd3989..25da631 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -5544,6 +5544,8 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
 
 - (void)_exitFullscreen
 {
+    if (!_private->fullscreenController)
+        return;
     [_private->fullscreenController exitFullscreen];
     [_private->fullscreenController release];
     _private->fullscreenController = nil;
diff --git a/WebKit/mac/WebView/WebWindowAnimation.h b/WebKit/mac/WebView/WebWindowAnimation.h
index c73dcce..ecf975b 100644
--- a/WebKit/mac/WebView/WebWindowAnimation.h
+++ b/WebKit/mac/WebView/WebWindowAnimation.h
@@ -46,7 +46,7 @@
 @interface WebWindowFadeAnimation : NSAnimation {
 @private
     CGFloat _initialAlpha, _finalAlpha;
-    NSWindow *_window; // (retain)
+    NSWindow *_window; // (assign)
     BOOL _isStopped;
     
 }
diff --git a/WebKit/mac/WebView/WebWindowAnimation.m b/WebKit/mac/WebView/WebWindowAnimation.m
index 3ab64bf..6eadb21 100644
--- a/WebKit/mac/WebView/WebWindowAnimation.m
+++ b/WebKit/mac/WebView/WebWindowAnimation.m
@@ -80,7 +80,6 @@ static CGFloat squaredDistance(NSPoint point1, NSPoint point2)
 
 - (void) dealloc
 {
-    [_window release];
     [_subAnimation release];
     [super dealloc];
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list