Both the following tests fail because the AVFoundation back-end on Lion can report a negative currentTime. media/video-loop.html media/video-pause-immediately.html
Actually, after digging into this, only video-loop.html is being affected by the negative-time problem.
Created attachment 110017 [details] Patch
Comment on attachment 110017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=110017&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:435 > + float seconds = narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)); > + return max(seconds, 0.0f); Should not need a local variable for this. Probably reads better without it.
(In reply to comment #3) > (From update of attachment 110017 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=110017&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:435 > > + float seconds = narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)); > > + return max(seconds, 0.0f); > > Should not need a local variable for this. Probably reads better without it. You're right; I was thinking of the MAX macro. I'll change this. Thanks!
Committed r97093: <http://trac.webkit.org/changeset/97093>