Commit 362023c1 authored by mitz@apple.com's avatar mitz@apple.com

WebCore: WebCore part of making full-screen video pause during scrubbing.

Reviewed by Eric Carlson and Darin Adler.

* WebCore.Video.exp: Sorted and added HTMLMediaElement::beginScrubbing()
and HTMLMediaElement::endScrubbing().

WebKit/mac: WebKit part of making full-screen video pause during scrubbing.

Reviewed by Eric Carlson and Darin Adler.

* WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing
ivar.
* WebView/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
_isScrubbing is NO.
(-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
HTMLMediaElement::endScrubbing().
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
and schedule -endScrubbing to be called when mouse tracking ends.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9f6b9213
2009-11-10 Dan Bernstein <mitz@apple.com>
Reviewed by Eric Carlson and Darin Adler.
WebCore part of making full-screen video pause during scrubbing.
* WebCore.Video.exp: Sorted and added HTMLMediaElement::beginScrubbing()
and HTMLMediaElement::endScrubbing().
2009-11-10 Anton Muhin <antonm@chromium.org>
Reviewed by Adam Barth.
__ZN7WebCore16HTMLMediaElement10screenRectEv
__ZN7WebCore16HTMLMediaElement12endScrubbingEv
__ZN7WebCore16HTMLMediaElement14beginScrubbingEv
__ZN7WebCore16HTMLMediaElement14exitFullscreenEv
__ZN7WebCore16HTMLMediaElement14setCurrentTimeEfRi
__ZN7WebCore16HTMLMediaElement4playEv
__ZN7WebCore16HTMLMediaElement5pauseEv
__ZNK7WebCore16HTMLMediaElement6volumeEv
__ZNK7WebCore16HTMLMediaElement7canPlayEv
__ZNK7WebCore16HTMLMediaElement8durationEv
__ZNK7WebCore16HTMLMediaElement5mutedEv
__ZN7WebCore16HTMLMediaElement6rewindEf
__ZN7WebCore16HTMLMediaElement8setMutedEb
__ZN7WebCore16HTMLMediaElement9setVolumeEfRi
__ZN7WebCore16HTMLMediaElement6rewindEf
__ZN7WebCore16HTMLMediaElement10screenRectEv
__ZNK7WebCore16HTMLMediaElement11currentTimeEv
__ZNK7WebCore16HTMLMediaElement13platformMediaEv
__ZN7WebCore16HTMLMediaElement14setCurrentTimeEfRi
__ZN7WebCore16HTMLMediaElement14exitFullscreenEv
__ZNK7WebCore16HTMLMediaElement5mutedEv
__ZNK7WebCore16HTMLMediaElement6volumeEv
__ZNK7WebCore16HTMLMediaElement7canPlayEv
__ZNK7WebCore16HTMLMediaElement8durationEv
2009-11-10 Dan Bernstein <mitz@apple.com>
Reviewed by Eric Carlson and Darin Adler.
WebKit part of making full-screen video pause during scrubbing.
* WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing
ivar.
* WebView/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
_isScrubbing is NO.
(-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
HTMLMediaElement::endScrubbing().
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
and schedule -endScrubbing to be called when mouse tracking ends.
2009-11-09 Mark Mentovai <mark@chromium.org>
Reviewed by Dan Bernstein.
......
......@@ -40,6 +40,7 @@ namespace WebCore {
#endif
BOOL _mouseIsInHUD;
BOOL _isEndingFullscreen;
BOOL _isScrubbing;
NSControl *_timeline;
NSTextField *_remainingTimeText;
......
......@@ -165,6 +165,7 @@ static const NSTimeInterval HUDWindowFadeOutDelay = 3;
#if !defined(BUILDING_ON_TIGER)
ASSERT(!_area);
#endif
ASSERT(!_isScrubbing);
[_timeline release];
[_remainingTimeText release];
[_elapsedTimeText release];
......@@ -447,9 +448,25 @@ static NSTextField *createTimeTextField(NSRect frame)
[_elapsedTimeText setStringValue:[self elapsedTimeText]];
}
- (void)endScrubbing
{
ASSERT(_isScrubbing);
_isScrubbing = NO;
if (HTMLMediaElement* mediaElement = [_delegate mediaElement])
mediaElement->endScrubbing();
}
- (void)timelinePositionChanged:(id)sender
{
[self setCurrentTime:[_timeline floatValue]];
if (!_isScrubbing) {
_isScrubbing = YES;
if (HTMLMediaElement* mediaElement = [_delegate mediaElement])
mediaElement->beginScrubbing();
static NSArray *endScrubbingModes = [[NSArray alloc] initWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, nil];
// Schedule -endScrubbing for when leaving mouse tracking mode.
[[NSRunLoop currentRunLoop] performSelector:@selector(endScrubbing) target:self argument:nil order:0 modes:endScrubbingModes];
}
}
- (float)currentTime
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment