<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178447] branches/safari-600.5-branch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178447">178447</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2015-01-14 14:37:51 -0800 (Wed, 14 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/173318">r173318</a>. &lt;rdar://problem/19424143&gt;</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6005branchLayoutTestsChangeLog">branches/safari-600.5-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6005branchLayoutTestshttptestsmediareloadafterdialoghtml">branches/safari-600.5-branch/LayoutTests/http/tests/media/reload-after-dialog.html</a></li>
<li><a href="#branchessafari6005branchLayoutTestshttptestsmediavideoerroraborthtml">branches/safari-600.5-branch/LayoutTests/http/tests/media/video-error-abort.html</a></li>
<li><a href="#branchessafari6005branchLayoutTestshttptestsmediavideothrottledloadcgi">branches/safari-600.5-branch/LayoutTests/http/tests/media/video-throttled-load.cgi</a></li>
<li><a href="#branchessafari6005branchLayoutTestsplatformmacTestExpectations">branches/safari-600.5-branch/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#branchessafari6005branchSourceJavaScriptCoreChangeLog">branches/safari-600.5-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceJavaScriptCoreruntimeJSCJSValueh">branches/safari-600.5-branch/Source/JavaScriptCore/runtime/JSCJSValue.h</a></li>
<li><a href="#branchessafari6005branchSourceWTFChangeLog">branches/safari-600.5-branch/Source/WTF/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWTFwtfMediaTimecpp">branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWTFwtfMediaTimeh">branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreChangeLog">branches/safari-600.5-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreModulesmediasourceMediaSourcecpp">branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreModulesmediasourceMediaSourceh">branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreModulesmediasourceSourceBuffercpp">branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreModulesmediasourceSourceBufferh">branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreWebCorevcxprojWebCorevcxproj">branches/safari-600.5-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-600.5-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari6005branchSourceWebCorebindingsjsJSDataCueCustomcpp">branches/safari-600.5-branch/Source/WebCore/bindings/js/JSDataCueCustom.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlHTMLMediaElementcpp">branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlHTMLMediaElementh">branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlMediaControllercpp">branches/safari-600.5-branch/Source/WebCore/html/MediaController.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlMediaFragmentURIParsercpp">branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlMediaFragmentURIParserh">branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlTimeRangesh">branches/safari-600.5-branch/Source/WebCore/html/TimeRanges.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackDataCuecpp">branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackDataCueh">branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackInbandDataTextTrackcpp">branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackInbandDataTextTrackh">branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackInbandGenericTextTrackcpp">branches/safari-600.5-branch/Source/WebCore/html/track/InbandGenericTextTrack.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackInbandTextTrackcpp">branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackInbandTextTrackh">branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackcpp">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackh">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackCuecpp">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackCueh">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackCueGenericcpp">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackCueGenerich">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackTextTrackCueListcpp">branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueList.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackVTTCuecpp">branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackVTTCueh">branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackWebVTTParsercpp">branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmltrackWebVTTParserh">branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsInbandTextTrackPrivateClienth">branches/safari-600.5-branch/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayercpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayerh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayerPrivateh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayerPrivate.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsMediaSourcePrivateClienth">branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaSourcePrivateClient.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsTrackPrivateBaseh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/TrackPrivateBase.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandMetadataTextTrackPrivateAVFcpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandMetadataTextTrackPrivateAVFh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandTextTrackPrivateAVFcpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandTextTrackPrivateAVFh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationcpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFcpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaSourceAVFObjCh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaSourceAVFObjCmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaSourcePrivateAVFObjCmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcOutOfBandTextTrackPrivateAVFh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsgstreamerInbandMetadataTextTrackPrivateGStreamerh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamercpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsgstreamerMediaSourceGStreamercpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKith">branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKitmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmacPlatformClockCMmm">branches/safari-600.5-branch/Source/WebCore/platform/mac/PlatformClockCM.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaPlayerMediaSourcecpp">branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaPlayerMediaSourceh">branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaSourcePrivatecpp">branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaSourcePrivateh">branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmockmediasourceMockSourceBufferPrivatecpp">branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaTimeAVFoundationcpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaTimeAVFoundationh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaTimeQTKith">branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaTimeQTKitmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari6005branchLayoutTestsplatformmacmediavideoseekpastendpausedexpectedtxt">branches/safari-600.5-branch/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmacMediaTimeMaccpp">branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformmacMediaTimeMach">branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6005branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/ChangeLog (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/ChangeLog        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/LayoutTests/ChangeLog        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-01-14  Dana Burkart  &lt;dburkart@apple.com&gt;
+
+        Merged r173318. &lt;rdar://problem/19424143&gt;
+
+    2014-06-10  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+            Refactoring: make MediaTime the primary time type for audiovisual times.
+            https://bugs.webkit.org/show_bug.cgi?id=133579
+
+            Reviewed by Eric Carlson.
+
+            Update the http/media tests to use byte-ranges, and update our byte-range CGI script
+            to return correct headers. Remove the platform expected results for media/video-seek-past-end-paused.html
+            now that we pass.
+
+            * http/tests/media/reload-after-dialog.html:
+            * http/tests/media/video-error-abort.html:
+            * http/tests/media/video-throttled-load.cgi:
+            * platform/mac/media/video-seek-past-end-paused-expected.txt: Removed.
+            * platform/mac/TestExpectations:
+
</ins><span class="cx"> 2014-12-16  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r176399. rdar://problem/19267545
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestshttptestsmediareloadafterdialoghtml"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/http/tests/media/reload-after-dialog.html (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/http/tests/media/reload-after-dialog.html        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/LayoutTests/http/tests/media/reload-after-dialog.html        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">                 findMediaElement();
</span><span class="cx">                 var movie = findMediaFile(&quot;video&quot;, &quot;../resources/test&quot;);
</span><del>-                video.src = &quot;http://127.0.0.1:8000/media/video-throttled-load.cgi?name=&quot; + movie + &quot;&amp;throttle=100&quot;;
</del><ins>+                video.src = &quot;http://127.0.0.1:8000/media/video-throttled-load.cgi?name=&quot; + movie + &quot;&amp;throttle=100&amp;nph=1&quot;;
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">         &lt;/script&gt;
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestshttptestsmediavideoerroraborthtml"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/http/tests/media/video-error-abort.html (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/http/tests/media/video-error-abort.html        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/LayoutTests/http/tests/media/video-error-abort.html        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">                 testExpected(&quot;video.error&quot;, null);
</span><span class="cx"> 
</span><span class="cx">                 var movie = findMediaFile(&quot;video&quot;, &quot;../resources/test&quot;);
</span><del>-                video.src = &quot;http://127.0.0.1:8000/media/video-throttled-load.cgi?name=&quot; + movie + &quot;&amp;throttle=256&quot;;
</del><ins>+                video.src = &quot;http://127.0.0.1:8000/media/video-throttled-load.cgi?name=&quot; + movie + &quot;&amp;throttle=256&amp;nph=1&quot;;
</ins><span class="cx">             }
</span><span class="cx">         &lt;/script&gt;
</span><span class="cx">     &lt;/head&gt;
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestshttptestsmediavideothrottledloadcgi"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/http/tests/media/video-throttled-load.cgi (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/http/tests/media/video-throttled-load.cgi        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/LayoutTests/http/tests/media/video-throttled-load.cgi        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> if ($nph) {
</span><span class="cx">     # Handle HTTP Range requests.
</span><span class="cx">     my $httpContentRange;
</span><ins>+    my $httpContentLength;
</ins><span class="cx">     my $httpStatus;
</span><span class="cx"> 
</span><span class="cx">     if ($contentRange) {
</span><span class="lines">@@ -42,13 +43,15 @@
</span><span class="cx">         }
</span><span class="cx">         $httpStatus = &quot;206 Partial Content&quot;;
</span><span class="cx">         $httpContentRange = &quot;bytes &quot; . $parsedRange[0] . &quot;-&quot; . $parsedRange[1] . &quot;/&quot; . $filesize;
</span><ins>+        $httpContentLength = $parsedRange[1] - $parsedRange[0] + 1;
</ins><span class="cx">     } else {
</span><span class="cx">         $httpStatus = &quot;200 OK&quot;;
</span><ins>+        $httpContentLength = $filesize;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     print &quot;Status: &quot; . $httpStatus . &quot;\n&quot;;
</span><span class="cx">     print &quot;Connection: close\n&quot;;
</span><del>-    print &quot;Content-Length: &quot; . $filesize . &quot;\n&quot;;
</del><ins>+    print &quot;Content-Length: &quot; . $httpContentLength . &quot;\n&quot;;
</ins><span class="cx">     print &quot;Content-Type: &quot; . $type . &quot;\n&quot;;
</span><span class="cx">     print &quot;Accept-Ranges: bytes\n&quot;;
</span><span class="cx">     if ($httpContentRange) {
</span><span class="lines">@@ -67,10 +70,12 @@
</span><span class="cx"> binmode FILE;
</span><span class="cx"> my ($data, $n);
</span><span class="cx"> my $total = $parsedRange[0];
</span><ins>+my $length = $parsedRange[1] - $parsedRange[0];
+my $chunkLength = $length &lt; 1024 ? $length : 1024;
</ins><span class="cx"> 
</span><span class="cx"> seek(FILE, $parsedRange[0], 0);
</span><span class="cx"> 
</span><del>-while (($n = read FILE, $data, 1024) != 0) {
</del><ins>+while (($n = read FILE, $data, $chunkLength) != 0) {
</ins><span class="cx">     print $data;
</span><span class="cx"> 
</span><span class="cx">     $total += $n;
</span></span></pre></div>
<a id="branchessafari6005branchLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/LayoutTests/platform/mac/TestExpectations (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/platform/mac/TestExpectations        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/LayoutTests/platform/mac/TestExpectations        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1485,3 +1485,6 @@
</span><span class="cx"> platform/mac/accessibility/select-text.html [ Failure ]
</span><span class="cx"> fast/text/systemFont.html [ Failure ]
</span><span class="cx"> fast/text/vertical-no-sideways.html [ Failure ]
</span><ins>+
+webkit.org/b/136532 [ MountainLion ] media/audio-data-url.html [ Failure ]
+webkit.org/b/136532 [ MountainLion ] media/sources-fallback-codecs.html [ Failure ]
</ins></span></pre></div>
<a id="branchessafari6005branchLayoutTestsplatformmacmediavideoseekpastendpausedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.5-branch/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,19 +0,0 @@
</span><del>-
-Test that seeking a paused video past its end sets currentTime to duration and leaves the video paused.
-
-EVENT(canplaythrough)
-EXPECTED (video.paused == 'true') OK
-EXPECTED (video.ended == 'false') OK
-RUN(video.play())
-
-EXPECTED (video.paused == 'false') OK
-EXPECTED (mediaElement.currentTime &gt; '0') OK
-
-EXPECTED (video.paused == 'true') OK
-
-EXPECTED (video.paused == 'true') OK
-EXPECTED (mediaElement.currentTime == 'mediaElement.duration'), OBSERVED '6.026666666666666' FAIL
-EXPECTED (video.ended == 'true'), OBSERVED 'false' FAIL
-
-END OF TEST
-
</del></span></pre></div>
<a id="branchessafari6005branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/JavaScriptCore/ChangeLog (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/JavaScriptCore/ChangeLog        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/JavaScriptCore/ChangeLog        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-01-14  Dana Burkart  &lt;dburkart@apple.com&gt;
+
+        Merged r173318. &lt;rdar://problem/19424143&gt;
+
+    2014-06-06  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+            Refactoring: make MediaTime the primary time type for audiovisual times.
+            https://bugs.webkit.org/show_bug.cgi?id=133579
+
+            Reviewed by Eric Carlson.
+
+            Add a utility function which converts a MediaTime to a JSNumber.
+
+            * runtime/JSCJSValue.h:
+            (JSC::jsNumber):
+
</ins><span class="cx"> 2014-12-16  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r176399. rdar://problem/19267545
</span></span></pre></div>
<a id="branchessafari6005branchSourceJavaScriptCoreruntimeJSCJSValueh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/JavaScriptCore/runtime/JSCJSValue.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/JavaScriptCore/runtime/JSCJSValue.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/JavaScriptCore/runtime/JSCJSValue.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/HashTraits.h&gt;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/TriState.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -470,6 +471,11 @@
</span><span class="cx">     return JSValue(d);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ALWAYS_INLINE JSValue jsNumber(MediaTime t)
+{
+    return jsNumber(t.toDouble());
+}
+
</ins><span class="cx"> ALWAYS_INLINE JSValue jsNumber(char i)
</span><span class="cx"> {
</span><span class="cx">     return JSValue(i);
</span></span></pre></div>
<a id="branchessafari6005branchSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WTF/ChangeLog (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WTF/ChangeLog        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WTF/ChangeLog        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-01-14  Dana Burkart  &lt;dburkart@apple.com&gt;
+
+        Merged r173318. &lt;rdar://problem/19424143&gt;
+
+    2014-06-06  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+            Refactoring: make MediaTime the primary time type for audiovisual times.
+            https://bugs.webkit.org/show_bug.cgi?id=133579
+
+            Reviewed by Eric Carlson.
+
+            Add a unary minus operator, and add unimplemented private casting operators, to make
+            unintentional double-&gt;MediaTime and MediaTime-&gt;double casts hard errors.
+
+            * wtf/MediaTime.cpp:
+            (WTF::MediaTime::operator-):
+            * wtf/MediaTime.h:
+
</ins><span class="cx"> 2014-10-29  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge parts of 172749 for rdar://problem/18757166
</span></span></pre></div>
<a id="branchessafari6005branchSourceWTFwtfMediaTimecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -219,6 +219,25 @@
</span><span class="cx">     return a;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+MediaTime MediaTime::operator-() const
+{
+    if (isInvalid())
+        return invalidTime();
+
+    if (isIndefinite())
+        return indefiniteTime();
+
+    if (isPositiveInfinite())
+        return negativeInfiniteTime();
+
+    if (isNegativeInfinite())
+        return positiveInfiniteTime();
+
+    MediaTime negativeTime = *this;
+    negativeTime.m_timeValue = -negativeTime.m_timeValue;
+    return negativeTime;
+}
+
</ins><span class="cx"> MediaTime MediaTime::operator*(int32_t rhs) const
</span><span class="cx"> {
</span><span class="cx">     if (isInvalid())
</span><span class="lines">@@ -283,6 +302,16 @@
</span><span class="cx">     return compare(rhs) &lt;= EqualTo;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool MediaTime::operator!() const
+{
+    return compare(zeroTime()) == EqualTo;
+}
+
+MediaTime::operator bool() const
+{
+    return compare(zeroTime()) != EqualTo;
+}
+
</ins><span class="cx"> MediaTime::ComparisonFlags MediaTime::compare(const MediaTime&amp; rhs) const
</span><span class="cx"> {
</span><span class="cx">     if ((isPositiveInfinite() &amp;&amp; rhs.isPositiveInfinite())
</span></span></pre></div>
<a id="branchessafari6005branchSourceWTFwtfMediaTimeh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WTF/wtf/MediaTime.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx">     MediaTime&amp; operator-=(const MediaTime&amp; rhs) { return *this = *this - rhs; }
</span><span class="cx">     MediaTime operator+(const MediaTime&amp; rhs) const;
</span><span class="cx">     MediaTime operator-(const MediaTime&amp; rhs) const;
</span><ins>+    MediaTime operator-() const;
</ins><span class="cx">     MediaTime operator*(int32_t) const;
</span><span class="cx">     bool operator&lt;(const MediaTime&amp; rhs) const;
</span><span class="cx">     bool operator&gt;(const MediaTime&amp; rhs) const;
</span><span class="lines">@@ -74,6 +75,8 @@
</span><span class="cx">     bool operator==(const MediaTime&amp; rhs) const;
</span><span class="cx">     bool operator&gt;=(const MediaTime&amp; rhs) const;
</span><span class="cx">     bool operator&lt;=(const MediaTime&amp; rhs) const;
</span><ins>+    bool operator!() const;
+    explicit operator bool() const;
</ins><span class="cx"> 
</span><span class="cx">     typedef enum {
</span><span class="cx">         LessThan = -1,
</span><span class="lines">@@ -101,6 +104,12 @@
</span><span class="cx"> 
</span><span class="cx">     void dump(PrintStream&amp; out) const;
</span><span class="cx"> 
</span><ins>+    // Make the following casts errors:
+    operator double() const = delete;
+    MediaTime(double) = delete;
+    operator int() const = delete;
+    MediaTime(int) = delete;
+
</ins><span class="cx">     friend WTF_EXPORT_PRIVATE MediaTime abs(const MediaTime&amp; rhs);
</span><span class="cx"> private:
</span><span class="cx">     static const int32_t DefaultTimeScale = 10000000;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,5 +1,301 @@
</span><span class="cx"> 2015-01-14  Dana Burkart  &lt;dburkart@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merged r173318. &lt;rdar://problem/19424143&gt;
+
+    2014-06-06  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+            Refactoring: make MediaTime the primary time type for audiovisual times.
+            https://bugs.webkit.org/show_bug.cgi?id=133579
+
+            Reviewed by Eric Carlson.
+
+            In order to limit the number of floating-point rounding errors for media systems which
+            can make use of rational time objects.
+
+            Add some convenience methods to convert between QTTime and MediaTime.
+            * platform/graphics/mac/MediaTimeQTKit.h: Added.
+            * platform/graphics/mac/MediaTimeQTKit.mm: Added.
+            (WebCore::toMediaTime):
+            (WebCore::toQTTime):
+
+            Rename MediaTimeMac -&gt; MediaTimeAVFoundation:
+            * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp: Renamed from Source/WebCore/platform/mac/MediaTimeMac.cpp.
+            (WebCore::toMediaTime):
+            (WebCore::toCMTime):
+            * platform/graphics/avfoundation/MediaTimeAVFoundation.h: Renamed from Source/WebCore/platform/mac/MediaTimeMac.h.
+
+            Use MediaTime instead of double:
+            * Modules/mediasource/MediaSource.cpp:
+            (WebCore::MediaSource::duration):
+            (WebCore::MediaSource::currentTime):
+            (WebCore::MediaSource::buffered):
+            (WebCore::MediaSource::setDuration):
+            (WebCore::MediaSource::activeRanges):
+            * Modules/mediasource/MediaSource.h:
+            * Modules/mediasource/SourceBuffer.cpp:
+            (WebCore::SourceBuffer::remove):
+            (WebCore::SourceBuffer::removeCodedFrames):
+            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
+            (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+            (WebCore::SourceBuffer::hasCurrentTime):
+            (WebCore::SourceBuffer::hasFutureTime):
+            (WebCore::SourceBuffer::canPlayThrough):
+            * WebCore.xcodeproj/project.pbxproj:
+            * bindings/js/JSDataCueCustom.cpp:
+            (WebCore::JSDataCueConstructor::constructJSDataCue):
+            * html/HTMLMediaElement.cpp:
+            (WebCore::HTMLMediaElement::HTMLMediaElement):
+            (WebCore::HTMLMediaElement::parseAttribute):
+            * html/HTMLMediaElement.h:
+            (WebCore::ValueToString&lt;MediaTime&gt;::string):
+            * html/MediaFragmentURIParser.cpp:
+            (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
+            (WebCore::MediaFragmentURIParser::startTime):
+            (WebCore::MediaFragmentURIParser::endTime):
+            (WebCore::MediaFragmentURIParser::parseTimeFragment):
+            (WebCore::MediaFragmentURIParser::parseNPTFragment):
+            (WebCore::MediaFragmentURIParser::parseNPTTime):
+            (WebCore::MediaFragmentURIParser::invalidTimeValue): Deleted.
+            * html/MediaFragmentURIParser.h:
+            * html/TimeRanges.h:
+            (WebCore::TimeRanges::ranges):
+            * html/track/DataCue.cpp:
+            (WebCore::DataCue::DataCue):
+            * html/track/DataCue.h:
+            (WebCore::DataCue::create):
+            * html/track/InbandDataTextTrack.cpp:
+            (WebCore::InbandDataTextTrack::addDataCue):
+            (WebCore::InbandDataTextTrack::updateDataCue):
+            (WebCore::InbandDataTextTrack::removeDataCue):
+            * html/track/InbandDataTextTrack.h:
+            * html/track/InbandGenericTextTrack.cpp:
+            (WebCore::InbandGenericTextTrack::updateCueFromCueData):
+            (WebCore::InbandGenericTextTrack::addGenericCue):
+            (WebCore::InbandGenericTextTrack::removeGenericCue):
+            * html/track/InbandTextTrack.cpp:
+            (WebCore::InbandTextTrack::startTimeVariance):
+            * html/track/InbandTextTrack.h:
+            * html/track/InbandWebVTTTextTrack.cpp:
+            (WebCore::InbandWebVTTTextTrack::newCuesParsed):
+            * html/track/TextTrack.cpp:
+            (WebCore::TextTrack::addCue):
+            (WebCore::TextTrack::hasCue):
+            * html/track/TextTrack.h:
+            (WebCore::TextTrack::startTimeVariance):
+            * html/track/TextTrackCue.cpp:
+            (WebCore::TextTrackCue::create):
+            (WebCore::TextTrackCue::TextTrackCue):
+            (WebCore::TextTrackCue::setStartTime):
+            (WebCore::TextTrackCue::setEndTime):
+            (WebCore::TextTrackCue::hasEquivalentStartTime):
+            * html/track/TextTrackCue.h:
+            (WebCore::TextTrackCue::startTime):
+            (WebCore::TextTrackCue::endTime):
+            * html/track/TextTrackCueGeneric.cpp:
+            (WebCore::TextTrackCueGeneric::TextTrackCueGeneric):
+            * html/track/TextTrackCueGeneric.h:
+            * html/track/TextTrackCueList.cpp:
+            (WebCore::TextTrackCueList::add):
+            * html/track/VTTCue.cpp:
+            (WebCore::VTTCue::VTTCue):
+            (WebCore::VTTCue::markFutureAndPastNodes):
+            (WebCore::VTTCue::updateDisplayTree):
+            * html/track/VTTCue.h:
+            (WebCore::VTTCue::create):
+            * html/track/WebVTTParser.cpp:
+            (WebCore::WebVTTParser::WebVTTParser):
+            (WebCore::WebVTTParser::resetCueValues):
+            (WebCore::WebVTTParser::collectTimeStamp):
+            (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
+            * html/track/WebVTTParser.h:
+            (WebCore::WebVTTCueData::startTime):
+            (WebCore::WebVTTCueData::setStartTime):
+            (WebCore::WebVTTCueData::endTime):
+            (WebCore::WebVTTCueData::setEndTime):
+            (WebCore::WebVTTCueData::WebVTTCueData): Deleted.
+            * platform/graphics/InbandTextTrackPrivateClient.h:
+            (WebCore::GenericCueData::startTime):
+            (WebCore::GenericCueData::setStartTime):
+            (WebCore::GenericCueData::endTime):
+            (WebCore::GenericCueData::setEndTime):
+            (WebCore::GenericCueData::GenericCueData):
+            * platform/graphics/MediaPlayer.cpp:
+            (WebCore::MediaPlayer::duration):
+            (WebCore::MediaPlayer::startTime):
+            (WebCore::MediaPlayer::initialTime):
+            (WebCore::MediaPlayer::currentTime):
+            (WebCore::MediaPlayer::seekWithTolerance):
+            (WebCore::MediaPlayer::seek):
+            (WebCore::MediaPlayer::maxTimeSeekable):
+            (WebCore::MediaPlayer::minTimeSeekable):
+            (WebCore::MediaPlayer::mediaTimeForTimeValue):
+            (WebCore::MediaPlayer::totalFrameDelay):
+            * platform/graphics/MediaPlayer.h:
+            * platform/graphics/MediaPlayerPrivate.h:
+            (WebCore::MediaPlayerPrivateInterface::durationMediaTime):
+            (WebCore::MediaPlayerPrivateInterface::currentMediaTime):
+            (WebCore::MediaPlayerPrivateInterface::seek):
+            (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
+            (WebCore::MediaPlayerPrivateInterface::startTime):
+            (WebCore::MediaPlayerPrivateInterface::initialTime):
+            (WebCore::MediaPlayerPrivateInterface::seekable):
+            (WebCore::MediaPlayerPrivateInterface::maxMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateInterface::minMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValue):
+            (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
+            (WebCore::MediaPlayerPrivateInterface::startTimeDouble): Deleted.
+            (WebCore::MediaPlayerPrivateInterface::maxTimeSeekableDouble): Deleted.
+            (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValueDouble): Deleted.
+            * platform/graphics/MediaSourcePrivateClient.h:
+            * platform/graphics/TrackPrivateBase.h:
+            (WebCore::TrackPrivateBase::startTimeVariance):
+            * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
+            (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
+            (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
+            (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
+            (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
+            * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
+            (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue):
+            (WebCore::IncompleteMetaDataCue::startTime):
+            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
+            (WebCore::InbandTextTrackPrivateAVF::processCue):
+            (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
+            * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
+            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+            (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
+            (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime):
+            (WebCore::MediaPlayerPrivateAVFoundation::seek):
+            (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance):
+            (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundation::maxTimeLoaded):
+            (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
+            (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
+            (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
+            (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
+            (WebCore::MediaPlayerPrivateAVFoundation::timeChanged):
+            (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
+            (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
+            (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
+            (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
+            (WebCore::MediaPlayerPrivateAVFoundation::duration): Deleted.
+            (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble): Deleted.
+            (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Deleted.
+            * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+            (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
+            (WebCore::MediaPlayerPrivateAVFoundation::Notification::time):
+            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
+            (WebCore::AVFWrapper::seekToTime): Deleted.
+            (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
+            (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
+            (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
+            (WebCore::AVFWrapper::seekToTime): Deleted.
+            (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
+            (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
+            (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
+            (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted.
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTime):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Deleted.
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Deleted.
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): Deleted.
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): Deleted.
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): Deleted.
+            * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
+            * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+            * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
+            (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
+            * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
+            (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
+            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+            (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
+            (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
+            (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
+            (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
+            * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+            (WebCore::maxValueForTimeRanges):
+            (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
+            (WebCore::MediaPlayerPrivateQTKit::durationMediaTime):
+            (WebCore::MediaPlayerPrivateQTKit::currentMediaTime):
+            (WebCore::MediaPlayerPrivateQTKit::seek):
+            (WebCore::MediaPlayerPrivateQTKit::doSeek):
+            (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
+            (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
+            (WebCore::MediaPlayerPrivateQTKit::seeking):
+            (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
+            (WebCore::MediaPlayerPrivateQTKit::buffered):
+            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
+            (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress):
+            (WebCore::MediaPlayerPrivateQTKit::updateStates):
+            (WebCore::MediaPlayerPrivateQTKit::timeChanged):
+            (WebCore::MediaPlayerPrivateQTKit::didEnd):
+            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
+            (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
+            (WebCore::MediaPlayerPrivateQTKit::createQTTime): Deleted.
+            (WebCore::MediaPlayerPrivateQTKit::duration): Deleted.
+            (WebCore::MediaPlayerPrivateQTKit::currentTime): Deleted.
+            (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): Deleted.
+            (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): Deleted.
+            (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): Deleted.
+            * platform/mac/PlatformClockCM.mm:
+            * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
+            (WebCore::MockMediaPlayerMediaSource::maxMediaTimeSeekable):
+            (WebCore::MockMediaPlayerMediaSource::currentMediaTime):
+            (WebCore::MockMediaPlayerMediaSource::durationMediaTime):
+            (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
+            (WebCore::MockMediaPlayerMediaSource::totalFrameDelay):
+            (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Deleted.
+            (WebCore::MockMediaPlayerMediaSource::currentTimeDouble): Deleted.
+            (WebCore::MockMediaPlayerMediaSource::durationDouble): Deleted.
+            * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
+            * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
+            (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
+            * platform/mock/mediasource/MockMediaSourcePrivate.h:
+            * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
+            (WebCore::MockSourceBufferPrivate::enqueueSample):
+
+2015-01-14  Dana Burkart  &lt;dburkart@apple.com&gt;
+
</ins><span class="cx">         Merged r173197. &lt;rdar://problem/19424142&gt;
</span><span class="cx"> 
</span><span class="cx">     2014-09-02  Jer Noble  &lt;jer.noble@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreModulesmediasourceMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> MediaSource::MediaSource(ScriptExecutionContext&amp; context)
</span><span class="cx">     : ActiveDOMObject(&amp;context)
</span><span class="cx">     , m_mediaElement(0)
</span><del>-    , m_duration(std::numeric_limits&lt;double&gt;::quiet_NaN())
</del><ins>+    , m_duration(MediaTime::invalidTime())
</ins><span class="cx">     , m_pendingSeekTime(MediaTime::invalidTime())
</span><span class="cx">     , m_readyState(closedKeyword())
</span><span class="cx">     , m_asyncEventQueue(*this)
</span><span class="lines">@@ -128,58 +128,56 @@
</span><span class="cx">     unsetPendingActivity(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaSource::duration() const
</del><ins>+MediaTime MediaSource::duration() const
</ins><span class="cx"> {
</span><span class="cx">     return m_duration;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaSource::currentTime() const
</del><ins>+MediaTime MediaSource::currentTime() const
</ins><span class="cx"> {
</span><del>-    return m_mediaElement ? m_mediaElement-&gt;currentTime() : 0;
</del><ins>+    return m_mediaElement ? m_mediaElement-&gt;currentMediaTime() : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;PlatformTimeRanges&gt; MediaSource::buffered() const
</span><span class="cx"> {
</span><span class="cx">     // Implements MediaSource algorithm for HTMLMediaElement.buffered.
</span><span class="cx">     // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#htmlmediaelement-extensions
</span><del>-    Vector&lt;RefPtr&lt;TimeRanges&gt;&gt; ranges = activeRanges();
</del><ins>+    Vector&lt;PlatformTimeRanges&gt; activeRanges = this-&gt;activeRanges();
</ins><span class="cx"> 
</span><span class="cx">     // 1. If activeSourceBuffers.length equals 0 then return an empty TimeRanges object and abort these steps.
</span><del>-    if (ranges.isEmpty())
</del><ins>+    if (activeRanges.isEmpty())
</ins><span class="cx">         return PlatformTimeRanges::create();
</span><span class="cx"> 
</span><span class="cx">     // 2. Let active ranges be the ranges returned by buffered for each SourceBuffer object in activeSourceBuffers.
</span><span class="cx">     // 3. Let highest end time be the largest range end time in the active ranges.
</span><del>-    double highestEndTime = -1;
-    for (size_t i = 0; i &lt; ranges.size(); ++i) {
-        unsigned length = ranges[i]-&gt;length();
</del><ins>+    MediaTime highestEndTime = MediaTime::zeroTime();
+    for (auto&amp; ranges : activeRanges) {
+        unsigned length = ranges.length();
</ins><span class="cx">         if (length)
</span><del>-            highestEndTime = std::max(highestEndTime, ranges[i]-&gt;end(length - 1, ASSERT_NO_EXCEPTION));
</del><ins>+            highestEndTime = std::max(highestEndTime, ranges.end(length - 1));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Return an empty range if all ranges are empty.
</span><del>-    if (highestEndTime &lt; 0)
</del><ins>+    if (!highestEndTime)
</ins><span class="cx">         return PlatformTimeRanges::create();
</span><span class="cx"> 
</span><span class="cx">     // 4. Let intersection ranges equal a TimeRange object containing a single range from 0 to highest end time.
</span><del>-    RefPtr&lt;TimeRanges&gt; intersectionRanges = TimeRanges::create(0, highestEndTime);
</del><ins>+    PlatformTimeRanges intersectionRanges(MediaTime::zeroTime(), highestEndTime);
</ins><span class="cx"> 
</span><span class="cx">     // 5. For each SourceBuffer object in activeSourceBuffers run the following steps:
</span><span class="cx">     bool ended = readyState() == endedKeyword();
</span><del>-    for (size_t i = 0; i &lt; ranges.size(); ++i) {
</del><ins>+    for (auto&amp; sourceRanges : activeRanges) {
</ins><span class="cx">         // 5.1 Let source ranges equal the ranges returned by the buffered attribute on the current SourceBuffer.
</span><del>-        TimeRanges* sourceRanges = ranges[i].get();
-
</del><span class="cx">         // 5.2 If readyState is &quot;ended&quot;, then set the end time on the last range in source ranges to highest end time.
</span><del>-        if (ended &amp;&amp; sourceRanges-&gt;length())
-            sourceRanges-&gt;add(sourceRanges-&gt;start(sourceRanges-&gt;length() - 1, ASSERT_NO_EXCEPTION), highestEndTime);
</del><ins>+        if (ended &amp;&amp; sourceRanges.length())
+            sourceRanges.add(sourceRanges.start(sourceRanges.length() - 1), highestEndTime);
</ins><span class="cx"> 
</span><span class="cx">         // 5.3 Let new intersection ranges equal the the intersection between the intersection ranges and the source ranges.
</span><span class="cx">         // 5.4 Replace the ranges in intersection ranges with the new intersection ranges.
</span><del>-        intersectionRanges-&gt;intersectWith(*sourceRanges);
</del><ins>+        intersectionRanges.intersectWith(sourceRanges);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return PlatformTimeRanges::create(intersectionRanges-&gt;ranges());
</del><ins>+    return PlatformTimeRanges::create(intersectionRanges);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaSource::seekToTime(const MediaTime&amp; time)
</span><span class="lines">@@ -343,10 +341,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // 4. Run the duration change algorithm with new duration set to the value being assigned to this attribute.
</span><del>-    setDurationInternal(duration);
</del><ins>+    setDurationInternal(MediaTime::createWithDouble(duration));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaSource::setDurationInternal(double duration)
</del><ins>+void MediaSource::setDurationInternal(const MediaTime&amp; duration)
</ins><span class="cx"> {
</span><span class="cx">     // Duration Change Algorithm
</span><span class="cx">     // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#duration-change-algorithm
</span><span class="lines">@@ -356,14 +354,14 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // 2. Set old duration to the current value of duration.
</span><del>-    double oldDuration = m_duration;
</del><ins>+    MediaTime oldDuration = m_duration;
</ins><span class="cx"> 
</span><span class="cx">     // 3. Update duration to new duration.
</span><span class="cx">     m_duration = duration;
</span><span class="cx"> 
</span><span class="cx">     // 4. If the new duration is less than old duration, then call remove(new duration, old duration)
</span><span class="cx">     // on all objects in sourceBuffers.
</span><del>-    if (!isnan(oldDuration) &amp;&amp; duration &lt; oldDuration) {
</del><ins>+    if (!oldDuration.isValid() &amp;&amp; duration &lt; oldDuration) {
</ins><span class="cx">         for (auto&amp; sourceBuffer : *m_sourceBuffers)
</span><span class="cx">             sourceBuffer-&gt;remove(duration, oldDuration, IGNORE_EXCEPTION);
</span><span class="cx">     }
</span><span class="lines">@@ -376,7 +374,7 @@
</span><span class="cx">     // NOTE: Assume UA is able to partially render audio frames.
</span><span class="cx"> 
</span><span class="cx">     // 6. Update the media controller duration to new duration and run the HTMLMediaElement duration change algorithm.
</span><del>-    LOG(MediaSource, &quot;MediaSource::setDurationInternal(%p) - duration(%g)&quot;, this, duration);
</del><ins>+    LOG(MediaSource, &quot;MediaSource::setDurationInternal(%p) - duration(%g)&quot;, this, duration.toDouble());
</ins><span class="cx">     m_private-&gt;durationChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -390,7 +388,7 @@
</span><span class="cx">     if (state == closedKeyword()) {
</span><span class="cx">         m_private.clear();
</span><span class="cx">         m_mediaElement = 0;
</span><del>-        m_duration = std::numeric_limits&lt;double&gt;::quiet_NaN();
</del><ins>+        m_duration = MediaTime::invalidTime();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (oldState == state)
</span><span class="lines">@@ -444,10 +442,10 @@
</span><span class="cx">         // â†³ If error is not set, is null, or is an empty string
</span><span class="cx">         // 1. Run the duration change algorithm with new duration set to the highest end time reported by
</span><span class="cx">         // the buffered attribute across all SourceBuffer objects in sourceBuffers.
</span><del>-        double maxEndTime = 0;
</del><ins>+        MediaTime maxEndTime;
</ins><span class="cx">         for (auto&amp; sourceBuffer : *m_sourceBuffers) {
</span><span class="cx">             if (auto length = sourceBuffer-&gt;buffered()-&gt;length())
</span><del>-                maxEndTime = std::max(sourceBuffer-&gt;buffered()-&gt;end(length - 1, IGNORE_EXCEPTION), maxEndTime);
</del><ins>+                maxEndTime = std::max(sourceBuffer-&gt;buffered()-&gt;ranges().end(length - 1), maxEndTime);
</ins><span class="cx">         }
</span><span class="cx">         setDurationInternal(maxEndTime);
</span><span class="cx"> 
</span><span class="lines">@@ -812,12 +810,11 @@
</span><span class="cx">     scheduleEvent(eventNames().sourcecloseEvent);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector&lt;RefPtr&lt;TimeRanges&gt;&gt; MediaSource::activeRanges() const
</del><ins>+Vector&lt;PlatformTimeRanges&gt; MediaSource::activeRanges() const
</ins><span class="cx"> {
</span><del>-    Vector&lt;RefPtr&lt;TimeRanges&gt;&gt; activeRanges(m_activeSourceBuffers-&gt;length());
-    for (size_t i = 0, length = m_activeSourceBuffers-&gt;length(); i &lt; length; ++i)
-        activeRanges[i] = m_activeSourceBuffers-&gt;item(i)-&gt;buffered(ASSERT_NO_EXCEPTION);
-
</del><ins>+    Vector&lt;PlatformTimeRanges&gt; activeRanges(m_activeSourceBuffers-&gt;length());
+    for (auto&amp; sourceBuffer : *m_activeSourceBuffers)
+        activeRanges.append(sourceBuffer-&gt;buffered()-&gt;ranges());
</ins><span class="cx">     return activeRanges;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreModulesmediasourceMediaSourceh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/MediaSource.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> 
</span><span class="cx">     // MediaSourcePrivateClient
</span><span class="cx">     virtual void setPrivateAndOpen(PassRef&lt;MediaSourcePrivate&gt;) override;
</span><del>-    virtual double duration() const override;
</del><ins>+    virtual MediaTime duration() const override;
</ins><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const override;
</span><span class="cx">     virtual void seekToTime(const MediaTime&amp;) override;
</span><span class="cx"> 
</span><span class="lines">@@ -83,8 +83,8 @@
</span><span class="cx">     void completeSeek();
</span><span class="cx"> 
</span><span class="cx">     void setDuration(double, ExceptionCode&amp;);
</span><del>-    void setDurationInternal(double);
-    double currentTime() const;
</del><ins>+    void setDurationInternal(const MediaTime&amp;);
+    MediaTime currentTime() const;
</ins><span class="cx">     const AtomicString&amp; readyState() const { return m_readyState; }
</span><span class="cx">     void setReadyState(const AtomicString&amp;);
</span><span class="cx">     void endOfStream(ExceptionCode&amp;);
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">     explicit MediaSource(ScriptExecutionContext&amp;);
</span><span class="cx"> 
</span><span class="cx">     void onReadyStateChange(const AtomicString&amp; oldState, const AtomicString&amp; newState);
</span><del>-    Vector&lt;RefPtr&lt;TimeRanges&gt;&gt; activeRanges() const;
</del><ins>+    Vector&lt;PlatformTimeRanges&gt; activeRanges() const;
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SourceBufferPrivate&gt; createSourceBufferPrivate(const ContentType&amp;, ExceptionCode&amp;);
</span><span class="cx">     void scheduleEvent(const AtomicString&amp; eventName);
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">     RefPtr&lt;SourceBufferList&gt; m_sourceBuffers;
</span><span class="cx">     RefPtr&lt;SourceBufferList&gt; m_activeSourceBuffers;
</span><span class="cx">     HTMLMediaElement* m_mediaElement;
</span><del>-    double m_duration;
</del><ins>+    MediaTime m_duration;
</ins><span class="cx">     MediaTime m_pendingSeekTime;
</span><span class="cx">     AtomicString m_readyState;
</span><span class="cx">     GenericEventQueue m_asyncEventQueue;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreModulesmediasourceSourceBuffercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -241,12 +241,17 @@
</span><span class="cx"> 
</span><span class="cx"> void SourceBuffer::remove(double start, double end, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    LOG(MediaSource, &quot;SourceBuffer::remove(%p) - start(%lf), end(%lf)&quot;, this, start, end);
</del><ins>+    remove(MediaTime::createWithDouble(start), MediaTime::createWithDouble(end), ec);
+}
</ins><span class="cx"> 
</span><ins>+void SourceBuffer::remove(const MediaTime&amp; start, const MediaTime&amp; end, ExceptionCode&amp; ec)
+{
+    LOG(MediaSource, &quot;SourceBuffer::remove(%p) - start(%lf), end(%lf)&quot;, this, start.toDouble(), end.toDouble());
+
</ins><span class="cx">     // Section 3.2 remove() method steps.
</span><span class="cx">     // 1. If start is negative or greater than duration, then throw an InvalidAccessError exception and abort these steps.
</span><span class="cx">     // 2. If end is less than or equal to start, then throw an InvalidAccessError exception and abort these steps.
</span><del>-    if (start &lt; 0 || (m_source &amp;&amp; (std::isnan(m_source-&gt;duration()) || start &gt; m_source-&gt;duration())) || end &lt;= start) {
</del><ins>+    if (start &lt; MediaTime::zeroTime() || (m_source &amp;&amp; (!m_source-&gt;duration().isValid() || start &gt; m_source-&gt;duration())) || end &lt;= start) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -271,8 +276,8 @@
</span><span class="cx">     scheduleEvent(eventNames().updatestartEvent);
</span><span class="cx"> 
</span><span class="cx">     // 8. Return control to the caller and run the rest of the steps asynchronously.
</span><del>-    m_pendingRemoveStart = MediaTime::createWithDouble(start);
-    m_pendingRemoveEnd = MediaTime::createWithDouble(end);
</del><ins>+    m_pendingRemoveStart = start;
+    m_pendingRemoveEnd = end;
</ins><span class="cx">     m_removeTimer.startOneShot(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -512,7 +517,7 @@
</span><span class="cx">     if (m_source)
</span><span class="cx">         m_source-&gt;monitorSourceBuffers();
</span><span class="cx"> 
</span><del>-    MediaTime currentMediaTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
</del><ins>+    MediaTime currentMediaTime = m_source-&gt;currentTime();
</ins><span class="cx">     for (auto&amp; trackBufferPair : m_trackBufferMap) {
</span><span class="cx">         TrackBuffer&amp; trackBuffer = trackBufferPair.value;
</span><span class="cx">         const AtomicString&amp; trackID = trackBufferPair.key;
</span><span class="lines">@@ -599,8 +604,8 @@
</span><span class="cx">     // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebuffer-coded-frame-removal
</span><span class="cx"> 
</span><span class="cx">     // 1. Let start be the starting presentation timestamp for the removal range.
</span><del>-    MediaTime durationMediaTime = MediaTime::createWithDouble(m_source-&gt;duration());
-    MediaTime currentMediaTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
</del><ins>+    MediaTime durationMediaTime = m_source-&gt;duration();
+    MediaTime currentMediaTime = m_source-&gt;currentTime();
</ins><span class="cx"> 
</span><span class="cx">     // 2. Let end be the end presentation timestamp for the removal range.
</span><span class="cx">     // 3. For each track buffer in this source buffer, run the following steps:
</span><span class="lines">@@ -713,11 +718,11 @@
</span><span class="cx">     // NOTE: begin by removing data from the beginning of the buffered ranges, 30 seconds at
</span><span class="cx">     // a time, up to 30 seconds before currentTime.
</span><span class="cx">     MediaTime thirtySeconds = MediaTime(30, 1);
</span><del>-    MediaTime currentTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
</del><ins>+    MediaTime currentTime = m_source-&gt;currentTime();
</ins><span class="cx">     MediaTime maximumRangeEnd = currentTime - thirtySeconds;
</span><span class="cx"> 
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-    LOG(MediaSource, &quot;SourceBuffer::evictCodedFrames(%p) - currentTime = %lf, require %zu bytes, maximum buffer size is %zu&quot;, this, m_source-&gt;currentTime(), extraMemoryCost() + newDataSize, maximumBufferSize);
</del><ins>+    LOG(MediaSource, &quot;SourceBuffer::evictCodedFrames(%p) - currentTime = %lf, require %zu bytes, maximum buffer size is %zu&quot;, this, m_source-&gt;currentTime().toDouble(), extraMemoryCost() + newDataSize, maximumBufferSize);
</ins><span class="cx">     size_t initialBufferedSize = extraMemoryCost();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -753,7 +758,7 @@
</span><span class="cx"> 
</span><span class="cx">     MediaTime minimumRangeStart = currentTime + thirtySeconds;
</span><span class="cx"> 
</span><del>-    rangeEnd = MediaTime::createWithDouble(m_source-&gt;duration());
</del><ins>+    rangeEnd = m_source-&gt;duration();
</ins><span class="cx">     rangeStart = rangeEnd - thirtySeconds;
</span><span class="cx">     while (rangeStart &gt; minimumRangeStart) {
</span><span class="cx"> 
</span><span class="lines">@@ -864,13 +869,13 @@
</span><span class="cx">     // 3.5.7 Initialization Segment Received
</span><span class="cx">     // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#sourcebuffer-init-segment-received
</span><span class="cx">     // 1. Update the duration attribute if it currently equals NaN:
</span><del>-    if (std::isnan(m_source-&gt;duration())) {
</del><ins>+    if (m_source-&gt;duration().isInvalid()) {
</ins><span class="cx">         // â†³ If the initialization segment contains a duration:
</span><span class="cx">         //   Run the duration change algorithm with new duration set to the duration in the initialization segment.
</span><span class="cx">         // â†³ Otherwise:
</span><span class="cx">         //   Run the duration change algorithm with new duration set to positive Infinity.
</span><span class="cx">         MediaTime newDuration = segment.duration.isValid() ? segment.duration : MediaTime::positiveInfiniteTime();
</span><del>-        m_source-&gt;setDurationInternal(newDuration.toDouble());
</del><ins>+        m_source-&gt;setDurationInternal(newDuration);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // 2. If the initialization segment has no audio, video, or text tracks, then run the end of stream
</span><span class="lines">@@ -1182,7 +1187,7 @@
</span><span class="cx">         // FIXME: add support for &quot;sequence&quot; mode
</span><span class="cx"> 
</span><span class="cx">         // 1.5 If timestampOffset is not 0, then run the following steps:
</span><del>-        if (m_timestampOffset != MediaTime::zeroTime()) {
</del><ins>+        if (m_timestampOffset) {
</ins><span class="cx">             // 1.5.1 Add timestampOffset to the presentation timestamp.
</span><span class="cx">             presentationTimestamp += m_timestampOffset;
</span><span class="cx"> 
</span><span class="lines">@@ -1359,7 +1364,7 @@
</span><span class="cx"> 
</span><span class="cx">             // Only force the TrackBuffer to re-enqueue if the removed ranges overlap with enqueued and possibly
</span><span class="cx">             // not yet displayed samples.
</span><del>-            MediaTime currentMediaTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
</del><ins>+            MediaTime currentMediaTime = m_source-&gt;currentTime();
</ins><span class="cx">             if (currentMediaTime &lt; trackBuffer.lastEnqueuedPresentationTime) {
</span><span class="cx">                 PlatformTimeRanges possiblyEnqueuedRanges(currentMediaTime, trackBuffer.lastEnqueuedPresentationTime);
</span><span class="cx">                 possiblyEnqueuedRanges.intersectWith(erasedRanges-&gt;ranges());
</span><span class="lines">@@ -1368,7 +1373,7 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             erasedRanges-&gt;invert();
</span><del>-            m_buffered-&gt;intersectWith(*erasedRanges.get());
</del><ins>+            m_buffered-&gt;intersectWith(*erasedRanges);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // 1.17 If spliced audio frame is set:
</span><span class="lines">@@ -1413,8 +1418,8 @@
</span><span class="cx"> 
</span><span class="cx">     // 5. If the media segment contains data beyond the current duration, then run the duration change algorithm with new
</span><span class="cx">     // duration set to the maximum of the current duration and the highest end timestamp reported by HTMLMediaElement.buffered.
</span><del>-    if (highestPresentationEndTimestamp().toDouble() &gt; m_source-&gt;duration())
-        m_source-&gt;setDurationInternal(highestPresentationEndTimestamp().toDouble());
</del><ins>+    if (highestPresentationEndTimestamp() &gt; m_source-&gt;duration())
+        m_source-&gt;setDurationInternal(highestPresentationEndTimestamp());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SourceBuffer::hasAudio() const
</span><span class="lines">@@ -1667,7 +1672,7 @@
</span><span class="cx">     std::unique_ptr&lt;PlatformTimeRanges&gt; virtualRanges = PlatformTimeRanges::create(m_buffered-&gt;ranges());
</span><span class="cx">     if (m_source-&gt;isEnded()) {
</span><span class="cx">         MediaTime start = virtualRanges-&gt;maximumBufferedTime();
</span><del>-        MediaTime end = MediaTime::createWithDouble(m_source-&gt;duration());
</del><ins>+        MediaTime end = m_source-&gt;duration();
</ins><span class="cx">         if (start &lt;= end)
</span><span class="cx">             virtualRanges-&gt;add(start, end);
</span><span class="cx">     }
</span><span class="lines">@@ -1679,8 +1684,8 @@
</span><span class="cx">     if (isRemoved() || !m_buffered-&gt;length())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    MediaTime currentTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
-    MediaTime duration = MediaTime::createWithDouble(m_source-&gt;duration());
</del><ins>+    MediaTime currentTime = m_source-&gt;currentTime();
+    MediaTime duration = m_source-&gt;duration();
</ins><span class="cx">     if (currentTime &gt;= duration)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="lines">@@ -1697,8 +1702,8 @@
</span><span class="cx">     if (!ranges-&gt;length())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    MediaTime currentTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
-    MediaTime duration = MediaTime::createWithDouble(m_source-&gt;duration());
</del><ins>+    MediaTime currentTime = m_source-&gt;currentTime();
+    MediaTime duration = m_source-&gt;duration();
</ins><span class="cx">     if (currentTime &gt;= duration)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="lines">@@ -1730,8 +1735,8 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     // Add up all the time yet to be buffered.
</span><del>-    MediaTime currentTime = MediaTime::createWithDouble(m_source-&gt;currentTime());
-    MediaTime duration = MediaTime::createWithDouble(m_source-&gt;duration());
</del><ins>+    MediaTime currentTime = m_source-&gt;currentTime();
+    MediaTime duration = m_source-&gt;duration();
</ins><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;PlatformTimeRanges&gt; unbufferedRanges = bufferedAccountingForEndOfStream();
</span><span class="cx">     unbufferedRanges-&gt;invert();
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreModulesmediasourceSourceBufferh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/Modules/mediasource/SourceBuffer.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx">     void appendBuffer(PassRefPtr&lt;ArrayBufferView&gt; data, ExceptionCode&amp;);
</span><span class="cx">     void abort(ExceptionCode&amp;);
</span><span class="cx">     void remove(double start, double end, ExceptionCode&amp;);
</span><ins>+    void remove(const MediaTime&amp;, const MediaTime&amp;, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void abortIfUpdating();
</span><span class="cx">     void removedFromMediaSource();
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -8530,6 +8530,7 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\avfoundation\MediaPlayerPrivateAVFoundation.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\graphics\avfoundation\MediaTimeAVFoundation.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\avfoundation\cf\MediaPlayerPrivateAVFoundationCF.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\AuthenticationChallengeBase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\BlobData.cpp&quot; /&gt;
</span><span class="lines">@@ -19759,6 +19760,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\ca\win\PlatformCALayerWinInternal.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\ca\win\WKCACFViewLayerTreeHost.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\avfoundation\MediaPlayerPrivateAVFoundation.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\platform\graphics\avfoundation\MediaTimeAVFoundation.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\avfoundation\cf\AVFoundationCFSoftLinking.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\avfoundation\cf\CoreMediaSoftLinking.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\avfoundation\cf\MediaPlayerPrivateAVFoundationCF.h&quot; /&gt;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -5674,12 +5674,14 @@
</span><span class="cx">                 CD5596921475B678001D0BD0 /* AudioFileReaderIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5596901475B678001D0BD0 /* AudioFileReaderIOS.h */; };
</span><span class="cx">                 CD5E5B5F1A15CE54000C609E /* PageConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5E5B5E1A15CE54000C609E /* PageConfiguration.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 CD5E5B611A15F156000C609E /* PageConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5E5B601A15F156000C609E /* PageConfiguration.cpp */; };
</span><ins>+                CD60C0C6193E87C7003C656B /* MediaTimeQTKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD60C0C4193E87C7003C656B /* MediaTimeQTKit.mm */; };
+                CD60C0C7193E87C7003C656B /* MediaTimeQTKit.h in Headers */ = {isa = PBXBuildFile; fileRef = CD60C0C5193E87C7003C656B /* MediaTimeQTKit.h */; };
</ins><span class="cx">                 CD61FE671794AADB004101EB /* MediaSourceRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1A942E115B5CE2200D525D1 /* MediaSourceRegistry.cpp */; };
</span><span class="cx">                 CD61FE681794AADB004101EB /* MediaSourceRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = B1A942E215B5CE2200D525D1 /* MediaSourceRegistry.h */; };
</span><span class="cx">                 CD641EB31818F5ED00EE4C41 /* MediaSourcePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EB11818F5ED00EE4C41 /* MediaSourcePrivate.h */; };
</span><span class="cx">                 CD641EB41818F5ED00EE4C41 /* SourceBufferPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */; };
</span><del>-                CD641EBF1819B36000EE4C41 /* MediaTimeMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */; };
-                CD641EC01819B36000EE4C41 /* MediaTimeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */; };
</del><ins>+                CD641EBF1819B36000EE4C41 /* MediaTimeAVFoundation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD641EBD1819B35900EE4C41 /* MediaTimeAVFoundation.cpp */; };
+                CD641EC01819B36000EE4C41 /* MediaTimeAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = CD641EBE1819B35900EE4C41 /* MediaTimeAVFoundation.h */; };
</ins><span class="cx">                 CD7DBB2818CA19A400C11066 /* CSSGridLineNamesValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD7DBB2618CA11FF00C11066 /* CSSGridLineNamesValue.cpp */; };
</span><span class="cx">                 CD7DBB2918CA19C600C11066 /* CSSGridLineNamesValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CD7DBB2718CA11FF00C11066 /* CSSGridLineNamesValue.h */; };
</span><span class="cx">                 CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */; };
</span><span class="lines">@@ -13145,10 +13147,12 @@
</span><span class="cx">                 CD5596901475B678001D0BD0 /* AudioFileReaderIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioFileReaderIOS.h; path = ios/AudioFileReaderIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5E5B5E1A15CE54000C609E /* PageConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageConfiguration.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5E5B601A15F156000C609E /* PageConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageConfiguration.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                CD60C0C4193E87C7003C656B /* MediaTimeQTKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaTimeQTKit.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                CD60C0C5193E87C7003C656B /* MediaTimeQTKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTimeQTKit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 CD641EB11818F5ED00EE4C41 /* MediaSourcePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourcePrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferPrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTimeMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaTimeMac.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                CD641EBD1819B35900EE4C41 /* MediaTimeAVFoundation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTimeAVFoundation.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                CD641EBE1819B35900EE4C41 /* MediaTimeAVFoundation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaTimeAVFoundation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 CD641EC7181ED60100EE4C41 /* MediaSample.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaSample.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD7DBB2618CA11FF00C11066 /* CSSGridLineNamesValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGridLineNamesValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD7DBB2718CA11FF00C11066 /* CSSGridLineNamesValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGridLineNamesValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14593,6 +14597,8 @@
</span><span class="cx">                                 07B442D5166C70B000556CAD /* InbandTextTrackPrivateAVF.h */,
</span><span class="cx">                                 076F0D0912B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.cpp */,
</span><span class="cx">                                 076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */,
</span><ins>+                                CD641EBD1819B35900EE4C41 /* MediaTimeAVFoundation.cpp */,
+                                CD641EBE1819B35900EE4C41 /* MediaTimeAVFoundation.h */,
</ins><span class="cx">                                 CD336F6317FA0A4D00DDDCD0 /* VideoTrackPrivateAVF.h */,
</span><span class="cx">                         );
</span><span class="cx">                         path = avfoundation;
</span><span class="lines">@@ -16521,8 +16527,6 @@
</span><span class="cx">                                 06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
</span><span class="cx">                                 BC25B528131C6D3900180E10 /* LocalizedStringsMac.cpp */,
</span><span class="cx">                                 1402645D0AFDC19B005919E2 /* LoggingMac.mm */,
</span><del>-                                CD641EBD1819B35900EE4C41 /* MediaTimeMac.cpp */,
-                                CD641EBE1819B35900EE4C41 /* MediaTimeMac.h */,
</del><span class="cx">                                 BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */,
</span><span class="cx">                                 93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */,
</span><span class="cx">                                 52F52E1014A0134F00ACC397 /* NSScrollerImpDetails.mm */,
</span><span class="lines">@@ -20475,6 +20479,8 @@
</span><span class="cx">                                 49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */,
</span><span class="cx">                                 0FCF332B0F2B9A25004B6795 /* WebLayer.h */,
</span><span class="cx">                                 0FCF332A0F2B9A25004B6795 /* WebLayer.mm */,
</span><ins>+                                CD60C0C4193E87C7003C656B /* MediaTimeQTKit.mm */,
+                                CD60C0C5193E87C7003C656B /* MediaTimeQTKit.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = mac;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -25497,7 +25503,7 @@
</span><span class="cx">                                 076306D017E1478D005A7C4E /* MediaStreamTrackSourcesCallback.h in Headers */,
</span><span class="cx">                                 076306D317E1478D005A7C4E /* MediaStreamTrackSourcesRequest.h in Headers */,
</span><span class="cx">                                 076306E317E22A43005A7C4E /* MediaStreamTrackSourcesRequestClient.h in Headers */,
</span><del>-                                CD641EC01819B36000EE4C41 /* MediaTimeMac.h in Headers */,
</del><ins>+                                CD641EC01819B36000EE4C41 /* MediaTimeAVFoundation.h in Headers */,
</ins><span class="cx">                                 0705852117FDC140005F2BCB /* MediaTrackConstraint.h in Headers */,
</span><span class="cx">                                 0705852417FDC140005F2BCB /* MediaTrackConstraints.h in Headers */,
</span><span class="cx">                                 0705852917FDE02C005F2BCB /* MediaTrackConstraintSet.h in Headers */,
</span><span class="lines">@@ -25876,6 +25882,7 @@
</span><span class="cx">                                 436708E912D9CA4B00044234 /* RenderSVGTransformableContainer.h in Headers */,
</span><span class="cx">                                 0854B01D1255E4E600B9CDD0 /* RenderSVGTSpan.h in Headers */,
</span><span class="cx">                                 436708EB12D9CA4B00044234 /* RenderSVGViewportContainer.h in Headers */,
</span><ins>+                                CD60C0C7193E87C7003C656B /* MediaTimeQTKit.h in Headers */,
</ins><span class="cx">                                 A8DF4AEB0980C42C0052981B /* RenderTable.h in Headers */,
</span><span class="cx">                                 6ED878C5147493F4004C3597 /* RenderTableCaption.h in Headers */,
</span><span class="cx">                                 A8DF4AE90980C42C0052981B /* RenderTableCell.h in Headers */,
</span><span class="lines">@@ -29053,7 +29060,7 @@
</span><span class="cx">                                 078E090317D14CEE00420AA1 /* MediaStreamTrackEvent.cpp in Sources */,
</span><span class="cx">                                 07FFDE68181AED420072D409 /* MediaStreamTrackPrivate.cpp in Sources */,
</span><span class="cx">                                 076306D217E1478D005A7C4E /* MediaStreamTrackSourcesRequest.cpp in Sources */,
</span><del>-                                CD641EBF1819B36000EE4C41 /* MediaTimeMac.cpp in Sources */,
</del><ins>+                                CD641EBF1819B36000EE4C41 /* MediaTimeAVFoundation.cpp in Sources */,
</ins><span class="cx">                                 0705853A17FE0770005F2BCB /* MediaTrackConstraint.cpp in Sources */,
</span><span class="cx">                                 0705852317FDC140005F2BCB /* MediaTrackConstraints.cpp in Sources */,
</span><span class="cx">                                 0705853817FE044F005F2BCB /* MediaTrackConstraintSet.cpp in Sources */,
</span><span class="lines">@@ -29594,6 +29601,7 @@
</span><span class="cx">                                 51E0BABC0DA5547100A9E417 /* StorageEvent.cpp in Sources */,
</span><span class="cx">                                 C5E9B67710697E1300C7BB1A /* StorageEventDispatcher.cpp in Sources */,
</span><span class="cx">                                 51E0BB390DA5ACB600A9E417 /* StorageMap.cpp in Sources */,
</span><ins>+                                CD60C0C6193E87C7003C656B /* MediaTimeQTKit.mm in Sources */,
</ins><span class="cx">                                 C50D0E820FF4272900AC2644 /* StorageNamespace.cpp in Sources */,
</span><span class="cx">                                 C55E38C010040D5D00A56BDB /* StorageNamespaceImpl.cpp in Sources */,
</span><span class="cx">                                 5D5975B419635F1100D00878 /* SystemVersion.mm in Sources */,
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorebindingsjsJSDataCueCustomcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/bindings/js/JSDataCueCustom.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/bindings/js/JSDataCueCustom.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/bindings/js/JSDataCueCustom.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">         if (UNLIKELY(exec-&gt;hadException()))
</span><span class="cx">             return JSValue::encode(jsUndefined());
</span><span class="cx"> 
</span><del>-        object = DataCue::create(*context, startTime, endTime, data, type, ec);
</del><ins>+        object = DataCue::create(*context, MediaTime::createWithDouble(startTime), MediaTime::createWithDouble(endTime), data, type, ec);
</ins><span class="cx">         if (ec) {
</span><span class="cx">             setDOMException(exec, ec);
</span><span class="cx">             return JSValue::encode(JSValue());
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> #if !ENABLE(DATACUE_VALUE)
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> #else
</span><del>-    object = DataCue::create(*context, startTime, endTime, valueArgument, type);
</del><ins>+    object = DataCue::create(*context, MediaTime::createWithDouble(startTime), MediaTime::createWithDouble(endTime), valueArgument, type);
</ins><span class="cx">     return JSValue::encode(asObject(toJS(exec, castedThis-&gt;globalObject(), object.get())));
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -269,10 +269,9 @@
</span><span class="cx">     , m_readyStateMaximum(HAVE_NOTHING)
</span><span class="cx">     , m_volume(1.0f)
</span><span class="cx">     , m_volumeInitialized(false)
</span><del>-    , m_lastSeekTime(0)
</del><span class="cx">     , m_previousProgressTime(std::numeric_limits&lt;double&gt;::max())
</span><span class="cx">     , m_clockTimeAtLastUpdateEvent(0)
</span><del>-    , m_lastTimeUpdateEventMovieTime(std::numeric_limits&lt;double&gt;::max())
</del><ins>+    , m_lastTimeUpdateEventMovieTime(MediaTime::positiveInfiniteTime())
</ins><span class="cx">     , m_loadState(WaitingForSource)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     , m_videoFullscreenGravity(MediaPlayer::VideoGravityResizeAspect)
</span><span class="lines">@@ -283,11 +282,8 @@
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx">     , m_droppedVideoFrames(0)
</span><span class="cx"> #endif
</span><del>-    , m_cachedTime(MediaPlayer::invalidTime())
</del><span class="cx">     , m_clockTimeAtLastCachedTimeUpdate(0)
</span><span class="cx">     , m_minimumClockTimeToUpdateCachedTime(0)
</span><del>-    , m_fragmentStartTime(MediaPlayer::invalidTime())
-    , m_fragmentEndTime(MediaPlayer::invalidTime())
</del><span class="cx">     , m_pendingActionFlags(0)
</span><span class="cx">     , m_actionAfterScan(Nothing)
</span><span class="cx">     , m_scanType(Scan)
</span><span class="lines">@@ -323,7 +319,7 @@
</span><span class="cx">     , m_tracksAreReady(true)
</span><span class="cx">     , m_haveVisibleTextTrack(false)
</span><span class="cx">     , m_processingPreferenceChange(false)
</span><del>-    , m_lastTextTrackUpdateTime(-1)
</del><ins>+    , m_lastTextTrackUpdateTime(MediaTime(-1, 1))
</ins><span class="cx">     , m_captionDisplayMode(CaptionUserPreferences::Automatic)
</span><span class="cx">     , m_audioTracks(0)
</span><span class="cx">     , m_textTracks(0)
</span><span class="lines">@@ -975,7 +971,7 @@
</span><span class="cx">         updateMediaController();
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">         if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
</span><del>-            updateActiveTextTrackCues(0);
</del><ins>+            updateActiveTextTrackCues(MediaTime::zeroTime());
</ins><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1000,7 +996,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Investigate whether these can be moved into m_networkState != NETWORK_EMPTY block above
</span><span class="cx">     // so they are closer to the relevant spec steps.
</span><del>-    m_lastSeekTime = 0;
</del><ins>+    m_lastSeekTime = MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     // The spec doesn't say to block the load event until we actually run the asynchronous section
</span><span class="cx">     // algorithm, but do it now because we won't start that until after the timer fires and the 
</span><span class="lines">@@ -1273,13 +1269,12 @@
</span><span class="cx">     return a-&gt;trackIndex() - b-&gt;trackIndex() &lt; 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool eventTimeCueCompare(const std::pair&lt;double, TextTrackCue*&gt;&amp; a,
-                                const std::pair&lt;double, TextTrackCue*&gt;&amp; b)
</del><ins>+static bool eventTimeCueCompare(const std::pair&lt;MediaTime, TextTrackCue*&gt;&amp; a, const std::pair&lt;MediaTime, TextTrackCue*&gt;&amp; b)
</ins><span class="cx"> {
</span><span class="cx">     // 12 - Sort the tasks in events in ascending time order (tasks with earlier
</span><span class="cx">     // times first).
</span><span class="cx">     if (a.first != b.first)
</span><del>-        return a.first - b.first &lt; 0;
</del><ins>+        return a.first - b.first &lt; MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     // If the cues belong to different text tracks, it doesn't make sense to
</span><span class="cx">     // compare the two tracks by the relative cue order, so return the relative
</span><span class="lines">@@ -1299,7 +1294,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::updateActiveTextTrackCues(double movieTime)
</del><ins>+void HTMLMediaElement::updateActiveTextTrackCues(const MediaTime&amp; movieTime)
</ins><span class="cx"> {
</span><span class="cx">     // 4.8.10.8 Playing the media resource
</span><span class="cx"> 
</span><span class="lines">@@ -1337,7 +1332,7 @@
</span><span class="cx">     // 3 - Let last time be the current playback position at the time this
</span><span class="cx">     // algorithm was last run for this media element, if this is not the first
</span><span class="cx">     // time it has run.
</span><del>-    double lastTime = m_lastTextTrackUpdateTime;
</del><ins>+    MediaTime lastTime = m_lastTextTrackUpdateTime;
</ins><span class="cx"> 
</span><span class="cx">     // 4 - If the current playback position has, since the last time this
</span><span class="cx">     // algorithm was run, only changed through its usual monotonic increase
</span><span class="lines">@@ -1345,13 +1340,13 @@
</span><span class="cx">     // cues whose start times are greater than or equal to last time and whose
</span><span class="cx">     // end times are less than or equal to the current playback position.
</span><span class="cx">     // Otherwise, let missed cues be an empty list.
</span><del>-    if (lastTime &gt;= 0 &amp;&amp; m_lastSeekTime &lt; movieTime) {
</del><ins>+    if (lastTime &gt;= MediaTime::zeroTime() &amp;&amp; m_lastSeekTime &lt; movieTime) {
</ins><span class="cx">         CueList potentiallySkippedCues =
</span><span class="cx">             m_cueTree.allOverlaps(m_cueTree.createInterval(lastTime, movieTime));
</span><span class="cx"> 
</span><span class="cx">         for (size_t i = 0; i &lt; potentiallySkippedCues.size(); ++i) {
</span><del>-            double cueStartTime = potentiallySkippedCues[i].low();
-            double cueEndTime = potentiallySkippedCues[i].high();
</del><ins>+            MediaTime cueStartTime = potentiallySkippedCues[i].low();
+            MediaTime cueEndTime = potentiallySkippedCues[i].high();
</ins><span class="cx"> 
</span><span class="cx">             // Consider cues that may have been missed since the last seek time.
</span><span class="cx">             if (cueStartTime &gt; std::max(m_lastSeekTime, lastTime) &amp;&amp; cueEndTime &lt; movieTime)
</span><span class="lines">@@ -1419,7 +1414,7 @@
</span><span class="cx">     // 8 - Let events be a list of tasks, initially empty. Each task in this
</span><span class="cx">     // list will be associated with a text track, a text track cue, and a time,
</span><span class="cx">     // which are used to sort the list before the tasks are queued.
</span><del>-    Vector&lt;std::pair&lt;double, TextTrackCue*&gt;&gt; eventTasks;
</del><ins>+    Vector&lt;std::pair&lt;MediaTime, TextTrackCue*&gt;&gt; eventTasks;
</ins><span class="cx"> 
</span><span class="cx">     // 8 - Let affected tracks be a list of text tracks, initially empty.
</span><span class="cx">     Vector&lt;TextTrack*&gt; affectedTracks;
</span><span class="lines">@@ -1427,7 +1422,7 @@
</span><span class="cx">     for (size_t i = 0; i &lt; missedCuesSize; ++i) {
</span><span class="cx">         // 9 - For each text track cue in missed cues, prepare an event named enter
</span><span class="cx">         // for the TextTrackCue object with the text track cue start time.
</span><del>-        eventTasks.append(std::make_pair(missedCues[i].data()-&gt;startTime(),
</del><ins>+        eventTasks.append(std::make_pair(missedCues[i].data()-&gt;startMediaTime(),
</ins><span class="cx">                                          missedCues[i].data()));
</span><span class="cx"> 
</span><span class="cx">         // 10 - For each text track [...] in missed cues, prepare an event
</span><span class="lines">@@ -1439,9 +1434,8 @@
</span><span class="cx">         // checked when these tasks are actually queued below. This doesn't
</span><span class="cx">         // affect sorting events before dispatch either, because the exit
</span><span class="cx">         // event has the same time as the enter event.
</span><del>-        if (missedCues[i].data()-&gt;startTime() &lt; missedCues[i].data()-&gt;endTime())
-            eventTasks.append(std::make_pair(missedCues[i].data()-&gt;endTime(),
-                                             missedCues[i].data()));
</del><ins>+        if (missedCues[i].data()-&gt;startMediaTime() &lt; missedCues[i].data()-&gt;endMediaTime())
+            eventTasks.append(std::make_pair(missedCues[i].data()-&gt;endMediaTime(), missedCues[i].data()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; previousCuesSize; ++i) {
</span><span class="lines">@@ -1449,7 +1443,7 @@
</span><span class="cx">         // track cue active flag set prepare an event named exit for the
</span><span class="cx">         // TextTrackCue object with the text track cue end time.
</span><span class="cx">         if (!currentCues.contains(previousCues[i]))
</span><del>-            eventTasks.append(std::make_pair(previousCues[i].data()-&gt;endTime(),
</del><ins>+            eventTasks.append(std::make_pair(previousCues[i].data()-&gt;endMediaTime(),
</ins><span class="cx">                                              previousCues[i].data()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1458,7 +1452,7 @@
</span><span class="cx">         // text track cue active flag set, prepare an event named enter for the
</span><span class="cx">         // TextTrackCue object with the text track cue start time.
</span><span class="cx">         if (!previousCues.contains(currentCues[i]))
</span><del>-            eventTasks.append(std::make_pair(currentCues[i].data()-&gt;startTime(),
</del><ins>+            eventTasks.append(std::make_pair(currentCues[i].data()-&gt;startMediaTime(),
</ins><span class="cx">                                              currentCues[i].data()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1486,7 +1480,7 @@
</span><span class="cx">             event-&gt;setTarget(eventTasks[i].second);
</span><span class="cx">             m_asyncEventQueue.enqueueEvent(event.release());
</span><span class="cx">         } else {
</span><del>-            if (eventTasks[i].first == eventTasks[i].second-&gt;startTime())
</del><ins>+            if (eventTasks[i].first == eventTasks[i].second-&gt;startMediaTime())
</ins><span class="cx">                 event = Event::create(eventNames().enterEvent, false, false);
</span><span class="cx">             else
</span><span class="cx">                 event = Event::create(eventNames().exitEvent, false, false);
</span><span class="lines">@@ -1639,7 +1633,7 @@
</span><span class="cx">     ASSERT(m_ignoreTrackDisplayUpdate);
</span><span class="cx">     --m_ignoreTrackDisplayUpdate;
</span><span class="cx">     if (!m_ignoreTrackDisplayUpdate &amp;&amp; m_inActiveDocument)
</span><del>-        updateActiveTextTrackCues(currentTime());
</del><ins>+        updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::textTrackAddCues(TextTrack* track, const TextTrackCueList* cues) 
</span><span class="lines">@@ -1659,28 +1653,31 @@
</span><span class="cx">         textTrackRemoveCue(cues-&gt;item(i)-&gt;track(), cues-&gt;item(i));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtr&lt;TextTrackCue&gt; cue)
</del><ins>+void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtr&lt;TextTrackCue&gt; prpCue)
</ins><span class="cx"> {
</span><span class="cx">     if (track-&gt;mode() == TextTrack::disabledKeyword())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    RefPtr&lt;TextTrackCue&gt; cue = prpCue;
+
</ins><span class="cx">     // Negative duration cues need be treated in the interval tree as
</span><span class="cx">     // zero-length cues.
</span><del>-    double endTime = std::max(cue-&gt;startTime(), cue-&gt;endTime());
</del><ins>+    MediaTime endTime = std::max(cue-&gt;startMediaTime(), cue-&gt;endMediaTime());
</ins><span class="cx"> 
</span><del>-    CueInterval interval = m_cueTree.createInterval(cue-&gt;startTime(), endTime, cue.get());
</del><ins>+    CueInterval interval = m_cueTree.createInterval(cue-&gt;startMediaTime(), endTime, cue.get());
</ins><span class="cx">     if (!m_cueTree.contains(interval))
</span><span class="cx">         m_cueTree.add(interval);
</span><del>-    updateActiveTextTrackCues(currentTime());
</del><ins>+    updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr&lt;TextTrackCue&gt; cue)
</del><ins>+void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr&lt;TextTrackCue&gt; prpCue)
</ins><span class="cx"> {
</span><ins>+    RefPtr&lt;TextTrackCue&gt; cue = prpCue;
</ins><span class="cx">     // Negative duration cues need to be treated in the interval tree as
</span><span class="cx">     // zero-length cues.
</span><del>-    double endTime = std::max(cue-&gt;startTime(), cue-&gt;endTime());
</del><ins>+    MediaTime endTime = std::max(cue-&gt;startMediaTime(), cue-&gt;endMediaTime());
</ins><span class="cx"> 
</span><del>-    CueInterval interval = m_cueTree.createInterval(cue-&gt;startTime(), endTime, cue.get());
</del><ins>+    CueInterval interval = m_cueTree.createInterval(cue-&gt;startMediaTime(), endTime, cue.get());
</ins><span class="cx">     m_cueTree.remove(interval);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBVTT_REGIONS)
</span><span class="lines">@@ -1699,7 +1696,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (cue-&gt;isRenderable())
</span><span class="cx">         toVTTCue(cue.get())-&gt;removeDisplayTree();
</span><del>-    updateActiveTextTrackCues(currentTime());
</del><ins>+    updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBVTT_REGIONS)
</span><span class="cx">     if (cue-&gt;isRenderable())
</span><span class="lines">@@ -2128,7 +2125,7 @@
</span><span class="cx">     updateMediaController();
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
</span><del>-        updateActiveTextTrackCues(currentTime());
</del><ins>+        updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2281,7 +2278,7 @@
</span><span class="cx"> void HTMLMediaElement::rewind(double timeDelta)
</span><span class="cx"> {
</span><span class="cx">     LOG(Media, &quot;HTMLMediaElement::rewind(%f)&quot;, timeDelta);
</span><del>-    setCurrentTime(std::max(currentTime() - timeDelta, minTimeSeekable()));
</del><ins>+    setCurrentTime(std::max(currentMediaTime() - MediaTime::createWithDouble(timeDelta), minTimeSeekable()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::returnToRealtime()
</span><span class="lines">@@ -2290,12 +2287,12 @@
</span><span class="cx">     setCurrentTime(maxTimeSeekable());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::addPlayedRange(double start, double end)
</del><ins>+void HTMLMediaElement::addPlayedRange(const MediaTime&amp; start, const MediaTime&amp; end)
</ins><span class="cx"> {
</span><del>-    LOG(Media, &quot;HTMLMediaElement::addPlayedRange(%f, %f)&quot;, start, end);
</del><ins>+    LOG(Media, &quot;HTMLMediaElement::addPlayedRange(%s, %s)&quot;, toString(start).utf8().data(), toString(end).utf8().data());
</ins><span class="cx">     if (!m_playedTimeRanges)
</span><span class="cx">         m_playedTimeRanges = TimeRanges::create();
</span><del>-    m_playedTimeRanges-&gt;add(start, end);
</del><ins>+    m_playedTimeRanges-&gt;ranges().add(start, end);
</ins><span class="cx"> }  
</span><span class="cx"> 
</span><span class="cx"> bool HTMLMediaElement::supportsScanning() const
</span><span class="lines">@@ -2314,7 +2311,12 @@
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::fastSeek(double time)
</span><span class="cx"> {
</span><del>-    LOG(Media, &quot;HTMLMediaElement::fastSeek(%f)&quot;, time);
</del><ins>+    fastSeek(MediaTime::createWithDouble(time));
+}
+
+void HTMLMediaElement::fastSeek(const MediaTime&amp; time)
+{
+    LOG(Media, &quot;HTMLMediaElement::fastSeek(%s)&quot;, toString(time).utf8().data());
</ins><span class="cx">     // 4.7.10.9 Seeking
</span><span class="cx">     // 9. If the approximate-for-speed flag is set, adjust the new playback position to a value that will
</span><span class="cx">     // allow for playback to resume promptly. If new playback position before this step is before current
</span><span class="lines">@@ -2322,28 +2324,29 @@
</span><span class="cx">     // position. Similarly, if the new playback position before this step is after current playback position,
</span><span class="cx">     // then the adjusted new playback position must also be after the current playback position.
</span><span class="cx">     refreshCachedTime();
</span><del>-    double delta = time - currentTime();
-    double negativeTolerance = delta &gt;= 0 ? delta : std::numeric_limits&lt;double&gt;::infinity();
-    double positiveTolerance = delta &lt; 0 ? -delta : std::numeric_limits&lt;double&gt;::infinity();
</del><ins>+    MediaTime delta = time - currentMediaTime();
+    MediaTime negativeTolerance = delta &gt;= MediaTime::zeroTime() ? delta : MediaTime::positiveInfiniteTime();
+    MediaTime positiveTolerance = delta &lt; MediaTime::zeroTime() ? -delta : MediaTime::positiveInfiniteTime();
</ins><span class="cx"> 
</span><span class="cx">     seekWithTolerance(time, negativeTolerance, positiveTolerance, true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::seek(double time)
</del><ins>+void HTMLMediaElement::seek(const MediaTime&amp; time)
</ins><span class="cx"> {
</span><del>-    LOG(Media, &quot;HTMLMediaElement::seek(%f)&quot;, time);
-    seekWithTolerance(time, 0, 0, true);
</del><ins>+    LOG(Media, &quot;HTMLMediaElement::seek(%s)&quot;, toString(time).utf8().data());
+    seekWithTolerance(time, MediaTime::zeroTime(), MediaTime::zeroTime(), true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::seekInternal(double time)
</del><ins>+void HTMLMediaElement::seekInternal(const MediaTime&amp; time)
</ins><span class="cx"> {
</span><del>-    LOG(Media, &quot;HTMLMediaElement::seekInternal(%f)&quot;, time);
-    seekWithTolerance(time, 0, 0, false);
</del><ins>+    LOG(Media, &quot;HTMLMediaElement::seekInternal(%s)&quot;, toString(time).utf8().data());
+    seekWithTolerance(time, MediaTime::zeroTime(), MediaTime::zeroTime(), false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLMediaElement::seekWithTolerance(double time, double negativeTolerance, double positiveTolerance, bool fromDOM)
</del><ins>+void HTMLMediaElement::seekWithTolerance(const MediaTime&amp; inTime, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance, bool fromDOM)
</ins><span class="cx"> {
</span><span class="cx">     // 4.8.10.9 Seeking
</span><ins>+    MediaTime time = inTime;
</ins><span class="cx"> 
</span><span class="cx">     // 1 - Set the media element's show poster flag to false.
</span><span class="cx">     setDisplayMode(Video);
</span><span class="lines">@@ -2358,7 +2361,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Get the current time before setting m_seeking, m_lastSeekTime is returned once it is set.
</span><span class="cx">     refreshCachedTime();
</span><del>-    double now = currentTime();
</del><ins>+    MediaTime now = currentMediaTime();
</ins><span class="cx"> 
</span><span class="cx">     // 3 - If the element's seeking IDL attribute is true, then another instance of this algorithm is
</span><span class="cx">     // already running. Abort that other instance of the algorithm without waiting for the step that
</span><span class="lines">@@ -2394,18 +2397,18 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_pendingSeek);
</span><del>-    double now = m_pendingSeek-&gt;now;
-    double time = m_pendingSeek-&gt;targetTime;
-    double negativeTolerance = m_pendingSeek-&gt;negativeTolerance;
-    double positiveTolerance = m_pendingSeek-&gt;positiveTolerance;
</del><ins>+    MediaTime now = m_pendingSeek-&gt;now;
+    MediaTime time = m_pendingSeek-&gt;targetTime;
+    MediaTime negativeTolerance = m_pendingSeek-&gt;negativeTolerance;
+    MediaTime positiveTolerance = m_pendingSeek-&gt;positiveTolerance;
</ins><span class="cx">     m_pendingSeek = nullptr;
</span><span class="cx"> 
</span><span class="cx">     // 6 - If the new playback position is later than the end of the media resource, then let it be the end 
</span><span class="cx">     // of the media resource instead.
</span><del>-    time = std::min(time, duration());
</del><ins>+    time = std::min(time, durationMediaTime());
</ins><span class="cx"> 
</span><span class="cx">     // 7 - If the new playback position is less than the earliest possible position, let it be that position instead.
</span><del>-    double earliestTime = m_player-&gt;startTime();
</del><ins>+    MediaTime earliestTime = m_player-&gt;startTime();
</ins><span class="cx">     time = std::max(time, earliestTime);
</span><span class="cx"> 
</span><span class="cx">     // Ask the media engine for the time value in the movie's time scale before comparing with current time. This
</span><span class="lines">@@ -2414,9 +2417,9 @@
</span><span class="cx">     // not generate a timechanged callback. This means m_seeking will never be cleared and we will never 
</span><span class="cx">     // fire a 'seeked' event.
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-    double mediaTime = m_player-&gt;mediaTimeForTimeValue(time);
</del><ins>+    MediaTime mediaTime = m_player-&gt;mediaTimeForTimeValue(time);
</ins><span class="cx">     if (time != mediaTime)
</span><del>-        LOG(Media, &quot;HTMLMediaElement::seekTimerFired(%f) - media timeline equivalent is %f&quot;, time, mediaTime);
</del><ins>+        LOG(Media, &quot;HTMLMediaElement::seekTimerFired(%s) - media timeline equivalent is %s&quot;, toString(time).utf8().data(), toString(mediaTime).utf8().data());
</ins><span class="cx"> #endif
</span><span class="cx">     time = m_player-&gt;mediaTimeForTimeValue(time);
</span><span class="cx"> 
</span><span class="lines">@@ -2447,7 +2450,7 @@
</span><span class="cx">         m_seeking = false;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    time = seekableRanges-&gt;nearest(time);
</del><ins>+    time = seekableRanges-&gt;ranges().nearest(time);
</ins><span class="cx"> 
</span><span class="cx">     m_sentEndEvent = false;
</span><span class="cx">     m_lastSeekTime = time;
</span><span class="lines">@@ -2509,7 +2512,7 @@
</span><span class="cx"> void HTMLMediaElement::refreshCachedTime() const
</span><span class="cx"> {
</span><span class="cx">     m_cachedTime = m_player-&gt;currentTime();
</span><del>-    if (!m_cachedTime) { 
</del><ins>+    if (!m_cachedTime) {
</ins><span class="cx">         // Do not use m_cachedTime until the media engine returns a non-zero value because we can't 
</span><span class="cx">         // estimate current time until playback actually begins. 
</span><span class="cx">         invalidateCachedTime(); 
</span><span class="lines">@@ -2522,7 +2525,7 @@
</span><span class="cx"> void HTMLMediaElement::invalidateCachedTime() const
</span><span class="cx"> {
</span><span class="cx"> #if !LOG_DISABLED
</span><del>-    if (m_cachedTime != MediaPlayer::invalidTime())
</del><ins>+    if (m_cachedTime.isValid())
</ins><span class="cx">         LOG(Media, &quot;HTMLMediaElement::invalidateCachedTime&quot;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2532,29 +2535,34 @@
</span><span class="cx">     static const double minimumTimePlayingBeforeCacheSnapshot = 0.5;
</span><span class="cx"> 
</span><span class="cx">     m_minimumClockTimeToUpdateCachedTime = monotonicallyIncreasingTime() + minimumTimePlayingBeforeCacheSnapshot;
</span><del>-    m_cachedTime = MediaPlayer::invalidTime();
</del><ins>+    m_cachedTime = MediaTime::invalidTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // playback state
</span><span class="cx"> double HTMLMediaElement::currentTime() const
</span><span class="cx"> {
</span><ins>+    return currentMediaTime().toDouble();
+}
+
+MediaTime HTMLMediaElement::currentMediaTime() const
+{
</ins><span class="cx"> #if LOG_CACHED_TIME_WARNINGS
</span><del>-    static const double minCachedDeltaForWarning = 0.01;
</del><ins>+    static const MediaTime minCachedDeltaForWarning = MediaTime::create(1, 100);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (!m_player)
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     if (m_seeking) {
</span><del>-        LOG(Media, &quot;HTMLMediaElement::currentTime - seeking, returning %f&quot;, m_lastSeekTime);
</del><ins>+        LOG(Media, &quot;HTMLMediaElement::currentTime - seeking, returning %s&quot;, toString(m_lastSeekTime).utf8().data());
</ins><span class="cx">         return m_lastSeekTime;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_cachedTime != MediaPlayer::invalidTime() &amp;&amp; m_paused) {
</del><ins>+    if (m_cachedTime.isValid() &amp;&amp; m_paused) {
</ins><span class="cx"> #if LOG_CACHED_TIME_WARNINGS
</span><del>-        double delta = m_cachedTime - m_player-&gt;currentTime();
</del><ins>+        MediaTime delta = m_cachedTime - m_player-&gt;currentTime();
</ins><span class="cx">         if (delta &gt; minCachedDeltaForWarning)
</span><del>-            LOG(Media, &quot;HTMLMediaElement::currentTime - WARNING, cached time is %f seconds off of media time when paused&quot;, delta);
</del><ins>+            LOG(Media, &quot;HTMLMediaElement::currentTime - WARNING, cached time is %s seconds off of media time when paused&quot;, toString(delta).utf8().data());
</ins><span class="cx"> #endif
</span><span class="cx">         return m_cachedTime;
</span><span class="cx">     }
</span><span class="lines">@@ -2563,15 +2571,15 @@
</span><span class="cx">     double now = monotonicallyIncreasingTime();
</span><span class="cx">     double maximumDurationToCacheMediaTime = m_player-&gt;maximumDurationToCacheMediaTime();
</span><span class="cx"> 
</span><del>-    if (maximumDurationToCacheMediaTime &amp;&amp; m_cachedTime != MediaPlayer::invalidTime() &amp;&amp; !m_paused &amp;&amp; now &gt; m_minimumClockTimeToUpdateCachedTime) {
</del><ins>+    if (maximumDurationToCacheMediaTime &amp;&amp; m_cachedTime.isValid() &amp;&amp; !m_paused &amp;&amp; now &gt; m_minimumClockTimeToUpdateCachedTime) {
</ins><span class="cx">         double clockDelta = now - m_clockTimeAtLastCachedTimeUpdate;
</span><span class="cx"> 
</span><span class="cx">         // Not too soon, use the cached time only if it hasn't expired.
</span><span class="cx">         if (clockDelta &lt; maximumDurationToCacheMediaTime) {
</span><del>-            double adjustedCacheTime = m_cachedTime + (effectivePlaybackRate() * clockDelta);
</del><ins>+            MediaTime adjustedCacheTime = m_cachedTime + MediaTime::createWithDouble(effectivePlaybackRate() * clockDelta);
</ins><span class="cx"> 
</span><span class="cx"> #if LOG_CACHED_TIME_WARNINGS
</span><del>-            double delta = adjustedCacheTime - m_player-&gt;currentTime();
</del><ins>+            MediaTime delta = adjustedCacheTime - m_player-&gt;currentTime();
</ins><span class="cx">             if (delta &gt; minCachedDeltaForWarning)
</span><span class="cx">                 LOG(Media, &quot;HTMLMediaElement::currentTime - WARNING, cached time is %f seconds off of media time when playing&quot;, delta);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2582,21 +2590,26 @@
</span><span class="cx"> #if LOG_CACHED_TIME_WARNINGS
</span><span class="cx">     if (maximumDurationToCacheMediaTime &amp;&amp; now &gt; m_minimumClockTimeToUpdateCachedTime &amp;&amp; m_cachedTime != MediaPlayer::invalidTime()) {
</span><span class="cx">         double clockDelta = now - m_clockTimeAtLastCachedTimeUpdate;
</span><del>-        double delta = m_cachedTime + (effectivePlaybackRate() * clockDelta) - m_player-&gt;currentTime();
-        LOG(Media, &quot;HTMLMediaElement::currentTime - cached time was %f seconds off of media time when it expired&quot;, delta);
</del><ins>+        MediaTime delta = m_cachedTime + MediaTime::createWithDouble(effectivePlaybackRate() * clockDelta) - m_player-&gt;currentTime();
+        LOG(Media, &quot;HTMLMediaElement::currentTime - cached time was %s seconds off of media time when it expired&quot;, toString(delta).utf8().data());
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     refreshCachedTime();
</span><span class="cx"> 
</span><del>-    if (m_cachedTime == MediaPlayer::invalidTime())
-        return 0;
</del><ins>+    if (m_cachedTime.isInvalid())
+        return MediaTime::zeroTime();
</ins><span class="cx">     
</span><span class="cx">     return m_cachedTime;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::setCurrentTime(double time)
</span><span class="cx"> {
</span><ins>+    setCurrentTime(MediaTime::createWithDouble(time));
+}
+
+void HTMLMediaElement::setCurrentTime(const MediaTime&amp; time)
+{
</ins><span class="cx">     if (m_mediaController)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -2612,15 +2625,20 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    seek(time);
</del><ins>+    seek(MediaTime::createWithDouble(time));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> double HTMLMediaElement::duration() const
</span><span class="cx"> {
</span><ins>+    return durationMediaTime().toDouble();
+}
+
+MediaTime HTMLMediaElement::durationMediaTime() const
+{
</ins><span class="cx">     if (m_player &amp;&amp; m_readyState &gt;= HAVE_METADATA)
</span><span class="cx">         return m_player-&gt;duration();
</span><span class="cx"> 
</span><del>-    return std::numeric_limits&lt;double&gt;::quiet_NaN();
</del><ins>+    return MediaTime::invalidTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool HTMLMediaElement::paused() const
</span><span class="lines">@@ -2766,7 +2784,7 @@
</span><span class="cx">         scheduleDelayedAction(LoadMediaResource);
</span><span class="cx"> 
</span><span class="cx">     if (endedPlayback())
</span><del>-        seekInternal(0);
</del><ins>+        seekInternal(MediaTime::zeroTime());
</ins><span class="cx"> 
</span><span class="cx">     if (m_mediaController)
</span><span class="cx">         m_mediaController-&gt;bringElementUpToSpeed(this);
</span><span class="lines">@@ -3141,8 +3159,8 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_player);
</span><span class="cx"> 
</span><del>-    if (m_fragmentEndTime != MediaPlayer::invalidTime() &amp;&amp; currentTime() &gt;= m_fragmentEndTime &amp;&amp; effectivePlaybackRate() &gt; 0) {
-        m_fragmentEndTime = MediaPlayer::invalidTime();
</del><ins>+    if (m_fragmentEndTime.isValid() &amp;&amp; currentMediaTime() &gt;= m_fragmentEndTime &amp;&amp; effectivePlaybackRate() &gt; 0) {
+        m_fragmentEndTime = MediaTime::invalidTime();
</ins><span class="cx">         if (!m_mediaController &amp;&amp; !m_paused) {
</span><span class="cx">             // changes paused to true and fires a simple event named pause at the media element.
</span><span class="cx">             pauseInternal();
</span><span class="lines">@@ -3159,7 +3177,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
</span><del>-        updateActiveTextTrackCues(currentTime());
</del><ins>+        updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="lines">@@ -3179,7 +3197,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Some media engines make multiple &quot;time changed&quot; callbacks at the same time, but we only want one
</span><span class="cx">     // event at a given time so filter here
</span><del>-    double movieTime = currentTime();
</del><ins>+    MediaTime movieTime = currentMediaTime();
</ins><span class="cx">     if (movieTime != m_lastTimeUpdateEventMovieTime) {
</span><span class="cx">         scheduleEvent(eventNames().timeupdateEvent);
</span><span class="cx">         m_clockTimeAtLastUpdateEvent = now;
</span><span class="lines">@@ -3196,9 +3214,9 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_player)
</span><span class="cx">         return 0;
</span><del>-    double duration = m_player-&gt;duration();
</del><ins>+    MediaTime duration = m_player-&gt;duration();
</ins><span class="cx"> 
</span><del>-    if (!duration || std::isinf(duration))
</del><ins>+    if (!duration || duration.isPositiveInfinite() || duration.isNegativeInfinite())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     MediaTime buffered = MediaTime::zeroTime();
</span><span class="lines">@@ -3209,7 +3227,7 @@
</span><span class="cx">         MediaTime end = timeRanges-&gt;end(i, ignored);
</span><span class="cx">         buffered += end - start;
</span><span class="cx">     }
</span><del>-    return buffered.toDouble() / duration;
</del><ins>+    return buffered.toDouble() / duration.toDouble();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="lines">@@ -4088,7 +4106,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
</span><del>-        updateActiveTextTrackCues(currentTime());
</del><ins>+        updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     beginProcessingMediaPlayerCallback();
</span><span class="lines">@@ -4105,20 +4123,20 @@
</span><span class="cx">     else
</span><span class="cx">         scheduleTimeupdateEvent(false);
</span><span class="cx"> 
</span><del>-    double now = currentTime();
-    double dur = duration();
</del><ins>+    MediaTime now = currentMediaTime();
+    MediaTime dur = durationMediaTime();
</ins><span class="cx">     double playbackRate = effectivePlaybackRate();
</span><span class="cx">     
</span><span class="cx">     // When the current playback position reaches the end of the media resource then the user agent must follow these steps:
</span><del>-    if (!std::isnan(dur) &amp;&amp; dur) {
</del><ins>+    if (dur.isValid() &amp;&amp; dur) {
</ins><span class="cx">         // If the media element has a loop attribute specified and does not have a current media controller,
</span><span class="cx">         if (loop() &amp;&amp; !m_mediaController &amp;&amp; playbackRate &gt; 0) {
</span><span class="cx">             m_sentEndEvent = false;
</span><span class="cx">             // then seek to the earliest possible position of the media resource and abort these steps when the direction of
</span><span class="cx">             // playback is forwards,
</span><span class="cx">             if (now &gt;= dur)
</span><del>-                seekInternal(0);
-        } else if ((now &lt;= 0 &amp;&amp; playbackRate &lt; 0) || (now &gt;= dur &amp;&amp; playbackRate &gt; 0)) {
</del><ins>+                seekInternal(MediaTime::zeroTime());
+        } else if ((now &lt;= MediaTime::zeroTime() &amp;&amp; playbackRate &lt; 0) || (now &gt;= dur &amp;&amp; playbackRate &gt; 0)) {
</ins><span class="cx">             // If the media element does not have a current media controller, and the media element
</span><span class="cx">             // has still ended playback and paused is false,
</span><span class="cx">             if (!m_mediaController &amp;&amp; !m_paused) {
</span><span class="lines">@@ -4185,8 +4203,8 @@
</span><span class="cx">     scheduleEvent(eventNames().durationchangeEvent);
</span><span class="cx">     mediaPlayerCharacteristicChanged(player);
</span><span class="cx"> 
</span><del>-    double now = currentTime();
-    double dur = duration();
</del><ins>+    MediaTime now = currentMediaTime();
+    MediaTime dur = durationMediaTime();
</ins><span class="cx">     if (now &gt; dur)
</span><span class="cx">         seekInternal(dur);
</span><span class="cx"> 
</span><span class="lines">@@ -4363,7 +4381,7 @@
</span><span class="cx"> PassRefPtr&lt;TimeRanges&gt; HTMLMediaElement::played()
</span><span class="cx"> {
</span><span class="cx">     if (m_playing) {
</span><del>-        double time = currentTime();
</del><ins>+        MediaTime time = currentMediaTime();
</ins><span class="cx">         if (time &gt; m_lastSeekTime)
</span><span class="cx">             addPlayedRange(m_lastSeekTime, time);
</span><span class="cx">     }
</span><span class="lines">@@ -4415,8 +4433,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool HTMLMediaElement::endedPlayback() const
</span><span class="cx"> {
</span><del>-    double dur = duration();
-    if (!m_player || std::isnan(dur))
</del><ins>+    MediaTime dur = durationMediaTime();
+    if (!m_player || !dur.isValid())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // 4.8.10.8 Playing the media resource
</span><span class="lines">@@ -4429,14 +4447,14 @@
</span><span class="cx">     // and the current playback position is the end of the media resource and the direction
</span><span class="cx">     // of playback is forwards, Either the media element does not have a loop attribute specified,
</span><span class="cx">     // or the media element has a current media controller.
</span><del>-    double now = currentTime();
</del><ins>+    MediaTime now = currentMediaTime();
</ins><span class="cx">     if (effectivePlaybackRate() &gt; 0)
</span><del>-        return dur &gt; 0 &amp;&amp; now &gt;= dur &amp;&amp; (!loop() || m_mediaController);
</del><ins>+        return dur &gt; MediaTime::zeroTime() &amp;&amp; now &gt;= dur &amp;&amp; (!loop() || m_mediaController);
</ins><span class="cx"> 
</span><span class="cx">     // or the current playback position is the earliest possible position and the direction 
</span><span class="cx">     // of playback is backwards
</span><span class="cx">     if (effectivePlaybackRate() &lt; 0)
</span><del>-        return now &lt;= 0;
</del><ins>+        return now &lt;= MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="lines">@@ -4460,14 +4478,14 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double HTMLMediaElement::minTimeSeekable() const
</del><ins>+MediaTime HTMLMediaElement::minTimeSeekable() const
</ins><span class="cx"> {
</span><del>-    return m_player ? m_player-&gt;minTimeSeekable() : 0;
</del><ins>+    return m_player ? m_player-&gt;minTimeSeekable() : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double HTMLMediaElement::maxTimeSeekable() const
</del><ins>+MediaTime HTMLMediaElement::maxTimeSeekable() const
</ins><span class="cx"> {
</span><del>-    return m_player ? m_player-&gt;maxTimeSeekable() : 0;
</del><ins>+    return m_player ? m_player-&gt;maxTimeSeekable() : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void HTMLMediaElement::updateVolume()
</span><span class="lines">@@ -4559,7 +4577,7 @@
</span><span class="cx"> 
</span><span class="cx">         m_playbackProgressTimer.stop();
</span><span class="cx">         m_playing = false;
</span><del>-        double time = currentTime();
</del><ins>+        MediaTime time = currentMediaTime();
</ins><span class="cx">         if (time &gt; m_lastSeekTime)
</span><span class="cx">             addPlayedRange(m_lastSeekTime, time);
</span><span class="cx"> 
</span><span class="lines">@@ -4643,7 +4661,7 @@
</span><span class="cx">     updateMediaController();
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
</span><del>-        updateActiveTextTrackCues(0);
</del><ins>+        updateActiveTextTrackCues(MediaTime::zeroTime());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5255,7 +5273,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (checkType == CheckTextTrackVisibility &amp;&amp; m_haveVisibleTextTrack == haveVisibleTextTrack) {
</span><del>-        updateActiveTextTrackCues(currentTime());
</del><ins>+        updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -5279,7 +5297,7 @@
</span><span class="cx">     
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled()) {
</span><span class="cx">         updateTextTrackDisplay();
</span><del>-        updateActiveTextTrackCues(currentTime());
</del><ins>+        updateActiveTextTrackCues(currentMediaTime());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5491,31 +5509,31 @@
</span><span class="cx"> void HTMLMediaElement::prepareMediaFragmentURI()
</span><span class="cx"> {
</span><span class="cx">     MediaFragmentURIParser fragmentParser(m_currentSrc);
</span><del>-    double dur = duration();
</del><ins>+    MediaTime dur = durationMediaTime();
</ins><span class="cx">     
</span><del>-    double start = fragmentParser.startTime();
-    if (start != MediaFragmentURIParser::invalidTimeValue() &amp;&amp; start &gt; 0) {
</del><ins>+    MediaTime start = fragmentParser.startTime();
+    if (start.isValid() &amp;&amp; start &gt; MediaTime::zeroTime()) {
</ins><span class="cx">         m_fragmentStartTime = start;
</span><span class="cx">         if (m_fragmentStartTime &gt; dur)
</span><span class="cx">             m_fragmentStartTime = dur;
</span><span class="cx">     } else
</span><del>-        m_fragmentStartTime = MediaPlayer::invalidTime();
</del><ins>+        m_fragmentStartTime = MediaTime::invalidTime();
</ins><span class="cx">     
</span><del>-    double end = fragmentParser.endTime();
-    if (end != MediaFragmentURIParser::invalidTimeValue() &amp;&amp; end &gt; 0 &amp;&amp; end &gt; m_fragmentStartTime) {
</del><ins>+    MediaTime end = fragmentParser.endTime();
+    if (end.isValid() &amp;&amp; end &gt; MediaTime::zeroTime() &amp;&amp; (!m_fragmentStartTime.isValid() || end &gt; m_fragmentStartTime)) {
</ins><span class="cx">         m_fragmentEndTime = end;
</span><span class="cx">         if (m_fragmentEndTime &gt; dur)
</span><span class="cx">             m_fragmentEndTime = dur;
</span><span class="cx">     } else
</span><del>-        m_fragmentEndTime = MediaPlayer::invalidTime();
</del><ins>+        m_fragmentEndTime = MediaTime::invalidTime();
</ins><span class="cx">     
</span><del>-    if (m_fragmentStartTime != MediaPlayer::invalidTime() &amp;&amp; m_readyState &lt; HAVE_FUTURE_DATA)
</del><ins>+    if (m_fragmentStartTime.isValid() &amp;&amp; m_readyState &lt; HAVE_FUTURE_DATA)
</ins><span class="cx">         prepareToPlay();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::applyMediaFragmentURI()
</span><span class="cx"> {
</span><del>-    if (m_fragmentStartTime != MediaPlayer::invalidTime()) {
</del><ins>+    if (m_fragmentStartTime.isValid()) {
</ins><span class="cx">         m_sentEndEvent = false;
</span><span class="cx">         seek(m_fragmentStartTime);
</span><span class="cx">     }
</span><span class="lines">@@ -5778,7 +5796,7 @@
</span><span class="cx">         m_droppedVideoFrames + m_player-&gt;totalVideoFrames(),
</span><span class="cx">         m_droppedVideoFrames + m_player-&gt;droppedVideoFrames(),
</span><span class="cx">         m_player-&gt;corruptedVideoFrames(),
</span><del>-        m_player-&gt;totalFrameDelay());
</del><ins>+        m_player-&gt;totalFrameDelay().toDouble());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> class VideoTrackList;
</span><span class="cx"> class VideoTrackPrivate;
</span><span class="cx"> 
</span><del>-typedef PODIntervalTree&lt;double, TextTrackCue*&gt; CueIntervalTree;
</del><ins>+typedef PODIntervalTree&lt;MediaTime, TextTrackCue*&gt; CueIntervalTree;
</ins><span class="cx"> typedef CueIntervalTree::IntervalType CueInterval;
</span><span class="cx"> typedef Vector&lt;CueInterval&gt; CueList;
</span><span class="cx"> #endif
</span><span class="lines">@@ -177,6 +177,13 @@
</span><span class="cx">     virtual void setDefaultPlaybackRate(double) override;
</span><span class="cx">     virtual double playbackRate() const override;
</span><span class="cx">     virtual void setPlaybackRate(double) override;
</span><ins>+
+// MediaTime versions of playback state
+    MediaTime currentMediaTime() const;
+    void setCurrentTime(const MediaTime&amp;);
+    MediaTime durationMediaTime() const;
+    void fastSeek(const MediaTime&amp;);
+
</ins><span class="cx">     void updatePlaybackRate();
</span><span class="cx">     bool webkitPreservesPitch() const;
</span><span class="cx">     void setWebkitPreservesPitch(bool);
</span><span class="lines">@@ -587,12 +594,12 @@
</span><span class="cx">     void startProgressEventTimer();
</span><span class="cx">     void stopPeriodicTimers();
</span><span class="cx"> 
</span><del>-    void seek(double time);
-    void seekInternal(double time);
-    void seekWithTolerance(double time, double negativeTolerance, double positiveTolerance, bool fromDOM);
</del><ins>+    void seek(const MediaTime&amp;);
+    void seekInternal(const MediaTime&amp;);
+    void seekWithTolerance(const MediaTime&amp;, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance, bool fromDOM);
</ins><span class="cx">     void finishSeek();
</span><span class="cx">     void checkIfSeekNeeded();
</span><del>-    void addPlayedRange(double start, double end);
</del><ins>+    void addPlayedRange(const MediaTime&amp; start, const MediaTime&amp; end);
</ins><span class="cx">     
</span><span class="cx">     void scheduleTimeupdateEvent(bool periodicEvent);
</span><span class="cx">     void scheduleEvent(const AtomicString&amp; eventName);
</span><span class="lines">@@ -613,7 +620,7 @@
</span><span class="cx">     URL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-    void updateActiveTextTrackCues(double);
</del><ins>+    void updateActiveTextTrackCues(const MediaTime&amp;);
</ins><span class="cx">     HTMLTrackElement* showingTrackWithSameKind(HTMLTrackElement*) const;
</span><span class="cx"> 
</span><span class="cx">     enum ReconfigureMode {
</span><span class="lines">@@ -644,8 +651,8 @@
</span><span class="cx">     bool pausedForUserInteraction() const;
</span><span class="cx">     bool couldPlayIfEnoughData() const;
</span><span class="cx"> 
</span><del>-    double minTimeSeekable() const;
-    double maxTimeSeekable() const;
</del><ins>+    MediaTime minTimeSeekable() const;
+    MediaTime maxTimeSeekable() const;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     bool parseMediaPlayerAttribute(const QualifiedName&amp;, const AtomicString&amp;);
</span><span class="lines">@@ -725,23 +732,23 @@
</span><span class="cx">     RefPtr&lt;MediaError&gt; m_error;
</span><span class="cx"> 
</span><span class="cx">     struct PendingSeek {
</span><del>-        PendingSeek(double now, double targetTime, double negativeTolerance, double positiveTolerance)
</del><ins>+        PendingSeek(const MediaTime&amp; now, const MediaTime&amp; targetTime, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx">             : now(now)
</span><span class="cx">             , targetTime(targetTime)
</span><span class="cx">             , negativeTolerance(negativeTolerance)
</span><span class="cx">             , positiveTolerance(positiveTolerance)
</span><span class="cx">         {
</span><span class="cx">         }
</span><del>-        double now;
-        double targetTime;
-        double negativeTolerance;
-        double positiveTolerance;
</del><ins>+        MediaTime now;
+        MediaTime targetTime;
+        MediaTime negativeTolerance;
+        MediaTime positiveTolerance;
</ins><span class="cx">     };
</span><span class="cx">     std::unique_ptr&lt;PendingSeek&gt; m_pendingSeek;
</span><span class="cx"> 
</span><span class="cx">     double m_volume;
</span><span class="cx">     bool m_volumeInitialized;
</span><del>-    double m_lastSeekTime;
</del><ins>+    MediaTime m_lastSeekTime;
</ins><span class="cx">     
</span><span class="cx">     unsigned m_previousProgress;
</span><span class="cx">     double m_previousProgressTime;
</span><span class="lines">@@ -750,7 +757,7 @@
</span><span class="cx">     double m_clockTimeAtLastUpdateEvent;
</span><span class="cx"> 
</span><span class="cx">     // The last time a timeupdate event was sent in movie time.
</span><del>-    double m_lastTimeUpdateEventMovieTime;
</del><ins>+    MediaTime m_lastTimeUpdateEventMovieTime;
</ins><span class="cx">     
</span><span class="cx">     // Loading state.
</span><span class="cx">     enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElement };
</span><span class="lines">@@ -779,12 +786,12 @@
</span><span class="cx">     unsigned long m_droppedVideoFrames;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    mutable double m_cachedTime;
</del><ins>+    mutable MediaTime m_cachedTime;
</ins><span class="cx">     mutable double m_clockTimeAtLastCachedTimeUpdate;
</span><span class="cx">     mutable double m_minimumClockTimeToUpdateCachedTime;
</span><span class="cx"> 
</span><del>-    double m_fragmentStartTime;
-    double m_fragmentEndTime;
</del><ins>+    MediaTime m_fragmentStartTime;
+    MediaTime m_fragmentEndTime;
</ins><span class="cx"> 
</span><span class="cx">     typedef unsigned PendingActionFlags;
</span><span class="cx">     PendingActionFlags m_pendingActionFlags;
</span><span class="lines">@@ -843,7 +850,7 @@
</span><span class="cx">     bool m_processingPreferenceChange : 1;
</span><span class="cx"> 
</span><span class="cx">     String m_subtitleTrackLanguage;
</span><del>-    float m_lastTextTrackUpdateTime;
</del><ins>+    MediaTime m_lastTextTrackUpdateTime;
</ins><span class="cx"> 
</span><span class="cx">     CaptionUserPreferences::CaptionDisplayMode m_captionDisplayMode;
</span><span class="cx"> 
</span><span class="lines">@@ -906,7 +913,7 @@
</span><span class="cx">         String text;
</span><span class="cx">         if (cue-&gt;isRenderable())
</span><span class="cx">             text = toVTTCue(cue)-&gt;text();
</span><del>-        return String::format(&quot;%p id=%s interval=%f--&gt;%f cue=%s)&quot;, cue, cue-&gt;id().utf8().data(), cue-&gt;startTime(), cue-&gt;endTime(), text.utf8().data());
</del><ins>+        return String::format(&quot;%p id=%s interval=%s--&gt;%s cue=%s)&quot;, cue, cue-&gt;id().utf8().data(), toString(cue-&gt;startTime()).utf8().data(), toString(cue-&gt;endTime()).utf8().data(), text.utf8().data());
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="lines">@@ -919,6 +926,16 @@
</span><span class="cx"> 
</span><span class="cx"> NODE_TYPE_CASTS(HTMLMediaElement)
</span><span class="cx"> 
</span><ins>+#ifndef NDEBUG
+template&lt;&gt;
+struct ValueToString&lt;MediaTime&gt; {
+    static String string(const MediaTime&amp; time)
+    {
+        return toString(time);
+    }
+};
+#endif
+
</ins><span class="cx"> } //namespace
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlMediaControllercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/MediaController.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/MediaController.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/MediaController.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">     
</span><span class="cx">     // Seek each slaved media element to the new playback position relative to the media element timeline.
</span><span class="cx">     for (size_t index = 0; index &lt; m_mediaElements.size(); ++index)
</span><del>-        m_mediaElements[index]-&gt;seek(time);
</del><ins>+        m_mediaElements[index]-&gt;seek(MediaTime::createWithDouble(time));
</ins><span class="cx"> 
</span><span class="cx">     scheduleTimeupdateEvent();
</span><span class="cx"> }
</span><span class="lines">@@ -479,7 +479,7 @@
</span><span class="cx">     // When the user agent is to bring a media element up to speed with its new media controller,
</span><span class="cx">     // it must seek that media element to the MediaController's media controller position relative
</span><span class="cx">     // to the media element's timeline.
</span><del>-    element-&gt;seekInternal(currentTime());
</del><ins>+    element-&gt;seekInternal(MediaTime::createWithDouble(currentTime()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MediaController::isBlocked() const
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlMediaFragmentURIParsercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -70,32 +70,27 @@
</span><span class="cx">     return digits.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaFragmentURIParser::invalidTimeValue()
-{
-    return MediaPlayer::invalidTime();
-}
-
</del><span class="cx"> MediaFragmentURIParser::MediaFragmentURIParser(const URL&amp; url)
</span><span class="cx">     : m_url(url)
</span><span class="cx">     , m_timeFormat(None)
</span><del>-    , m_startTime(MediaPlayer::invalidTime())
-    , m_endTime(MediaPlayer::invalidTime())
</del><ins>+    , m_startTime(MediaTime::invalidTime())
+    , m_endTime(MediaTime::invalidTime())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaFragmentURIParser::startTime()
</del><ins>+MediaTime MediaFragmentURIParser::startTime()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_url.isValid())
</span><del>-        return MediaPlayer::invalidTime();
</del><ins>+        return MediaTime::invalidTime();
</ins><span class="cx">     if (m_timeFormat == None)
</span><span class="cx">         parseTimeFragment();
</span><span class="cx">     return m_startTime;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaFragmentURIParser::endTime()
</del><ins>+MediaTime MediaFragmentURIParser::endTime()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_url.isValid())
</span><del>-        return MediaPlayer::invalidTime();
</del><ins>+        return MediaTime::invalidTime();
</ins><span class="cx">     if (m_timeFormat == None)
</span><span class="cx">         parseTimeFragment();
</span><span class="cx">     return m_endTime;
</span><span class="lines">@@ -184,8 +179,8 @@
</span><span class="cx">         // in the same format. The format is specified by name, followed by a colon (:), with npt: being
</span><span class="cx">         // the default.
</span><span class="cx">         
</span><del>-        double start = MediaPlayer::invalidTime();
-        double end = MediaPlayer::invalidTime();
</del><ins>+        MediaTime start = MediaTime::invalidTime();
+        MediaTime end = MediaTime::invalidTime();
</ins><span class="cx">         if (parseNPTFragment(fragment.second.characters8(), fragment.second.length(), start, end)) {
</span><span class="cx">             m_startTime = start;
</span><span class="cx">             m_endTime = end;
</span><span class="lines">@@ -202,7 +197,7 @@
</span><span class="cx">     m_fragments.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MediaFragmentURIParser::parseNPTFragment(const LChar* timeString, unsigned length, double&amp; startTime, double&amp; endTime)
</del><ins>+bool MediaFragmentURIParser::parseNPTFragment(const LChar* timeString, unsigned length, MediaTime&amp; startTime, MediaTime&amp; endTime)
</ins><span class="cx"> {
</span><span class="cx">     unsigned offset = 0;
</span><span class="cx">     if (length &gt;= nptIdentiferLength &amp;&amp; timeString[0] == 'n' &amp;&amp; timeString[1] == 'p' &amp;&amp; timeString[2] == 't' &amp;&amp; timeString[3] == ':')
</span><span class="lines">@@ -215,7 +210,7 @@
</span><span class="cx">     // If a single number only is given, this corresponds to the begin time except if it is preceded
</span><span class="cx">     // by a comma that would in this case indicate the end time.
</span><span class="cx">     if (timeString[offset] == ',')
</span><del>-        startTime = 0;
</del><ins>+        startTime = MediaTime::zeroTime();
</ins><span class="cx">     else {
</span><span class="cx">         if (!parseNPTTime(timeString, length, offset, startTime))
</span><span class="cx">             return false;
</span><span class="lines">@@ -241,7 +236,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MediaFragmentURIParser::parseNPTTime(const LChar* timeString, unsigned length, unsigned&amp; offset, double&amp; time)
</del><ins>+bool MediaFragmentURIParser::parseNPTTime(const LChar* timeString, unsigned length, unsigned&amp; offset, MediaTime&amp; time)
</ins><span class="cx"> {
</span><span class="cx">     enum Mode { minutes, hours };
</span><span class="cx">     Mode mode = minutes;
</span><span class="lines">@@ -271,17 +266,17 @@
</span><span class="cx">     String digits1 = collectDigits(timeString, length, offset);
</span><span class="cx">     int value1 = digits1.toInt();
</span><span class="cx">     if (offset &gt;= length || timeString[offset] == ',') {
</span><del>-        time = value1;
</del><ins>+        time = MediaTime::createWithDouble(value1);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    double fraction = 0;
</del><ins>+    MediaTime fraction;
</ins><span class="cx">     if (timeString[offset] == '.') {
</span><span class="cx">         if (offset == length)
</span><span class="cx">             return true;
</span><span class="cx">         String digits = collectFraction(timeString, length, offset);
</span><del>-        fraction = digits.toDouble();
-        time = value1 + fraction;
</del><ins>+        fraction = MediaTime::createWithDouble(digits.toDouble());
+        time = MediaTime::createWithDouble(value1) + fraction;
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -318,9 +313,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (offset &lt; length &amp;&amp; timeString[offset] == '.')
</span><del>-        fraction = collectFraction(timeString, length, offset).toDouble();
</del><ins>+        fraction = MediaTime::createWithDouble(collectFraction(timeString, length, offset).toDouble());
</ins><span class="cx">     
</span><del>-    time = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + fraction;
</del><ins>+    time = MediaTime::createWithDouble((value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3) + fraction;
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlMediaFragmentURIParserh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/MediaFragmentURIParser.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;URL.h&quot;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -40,24 +41,22 @@
</span><span class="cx">     
</span><span class="cx">     MediaFragmentURIParser(const URL&amp;);
</span><span class="cx"> 
</span><del>-    double startTime();
-    double endTime();
</del><ins>+    MediaTime startTime();
+    MediaTime endTime();
</ins><span class="cx"> 
</span><del>-    static double invalidTimeValue();
-
</del><span class="cx"> private:
</span><span class="cx"> 
</span><span class="cx">     void parseFragments();
</span><span class="cx">     
</span><span class="cx">     enum TimeFormat { None, Invalid, NormalPlayTime, SMPTETimeCode, WallClockTimeCode };
</span><span class="cx">     void parseTimeFragment();
</span><del>-    bool parseNPTFragment(const LChar*, unsigned length, double&amp; startTime, double&amp; endTime);
-    bool parseNPTTime(const LChar*, unsigned length, unsigned&amp; offset, double&amp; time);
</del><ins>+    bool parseNPTFragment(const LChar*, unsigned length, MediaTime&amp; startTime, MediaTime&amp; endTime);
+    bool parseNPTTime(const LChar*, unsigned length, unsigned&amp; offset, MediaTime&amp;);
</ins><span class="cx"> 
</span><span class="cx">     URL m_url;
</span><span class="cx">     TimeFormat m_timeFormat;
</span><del>-    double m_startTime;
-    double m_endTime;
</del><ins>+    MediaTime m_startTime;
+    MediaTime m_endTime;
</ins><span class="cx">     Vector&lt;std::pair&lt;String, String&gt;&gt; m_fragments;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlTimeRangesh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/TimeRanges.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/TimeRanges.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/TimeRanges.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     double totalDuration() const;
</span><span class="cx"> 
</span><span class="cx">     const PlatformTimeRanges&amp; ranges() const { return m_ranges; }
</span><ins>+    PlatformTimeRanges&amp; ranges() { return m_ranges; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit TimeRanges();
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackDataCuecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -36,28 +36,28 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DataCue::DataCue(ScriptExecutionContext&amp; context, double start, double end, ArrayBuffer* data, const String&amp; type, ExceptionCode&amp; ec)
</del><ins>+DataCue::DataCue(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, ArrayBuffer* data, const String&amp; type, ExceptionCode&amp; ec)
</ins><span class="cx">     : TextTrackCue(context, start, end)
</span><span class="cx">     , m_type(type)
</span><span class="cx"> {
</span><span class="cx">     setData(data, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DataCue::DataCue(ScriptExecutionContext&amp; context, double start, double end, const void* data, unsigned length)
</del><ins>+DataCue::DataCue(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const void* data, unsigned length)
</ins><span class="cx">     : TextTrackCue(context, start, end)
</span><span class="cx"> {
</span><span class="cx">     m_data = ArrayBuffer::create(data, length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-DataCue::DataCue(ScriptExecutionContext&amp; context, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; platformValue, const String&amp; type)
</del><ins>+DataCue::DataCue(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; platformValue, const String&amp; type)
</ins><span class="cx">     : TextTrackCue(context, start, end)
</span><span class="cx">     , m_type(type)
</span><span class="cx">     , m_platformValue(platformValue)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DataCue::DataCue(ScriptExecutionContext&amp; context, double start, double end, JSC::JSValue value, const String&amp; type)
</del><ins>+DataCue::DataCue(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, JSC::JSValue value, const String&amp; type)
</ins><span class="cx">     : TextTrackCue(context, start, end)
</span><span class="cx">     , m_type(type)
</span><span class="cx">     , m_value(value)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackDataCueh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/DataCue.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;TextTrackCue.h&quot;
</span><span class="cx"> #include &lt;runtime/ArrayBuffer.h&gt;
</span><span class="cx"> #include &lt;runtime/JSCInlines.h&gt;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="lines">@@ -44,28 +45,28 @@
</span><span class="cx"> 
</span><span class="cx"> class DataCue : public TextTrackCue {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, double start, double end, ArrayBuffer* data, ExceptionCode&amp; ec)
</del><ins>+    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, ArrayBuffer* data, ExceptionCode&amp; ec)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new DataCue(context, start, end, data, emptyString(), ec));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, double start, double end, const void* data, unsigned length)
</del><ins>+    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const void* data, unsigned length)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new DataCue(context, start, end, data, length));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, double start, double end, ArrayBuffer* data, const String&amp; type, ExceptionCode&amp; ec)
</del><ins>+    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, ArrayBuffer* data, const String&amp; type, ExceptionCode&amp; ec)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new DataCue(context, start, end, data, type, ec));
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; platformValue, const String&amp; type)
</del><ins>+    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; platformValue, const String&amp; type)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new DataCue(context, start, end, platformValue, type));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, double start, double end, JSC::JSValue value, const String&amp; type)
</del><ins>+    static PassRefPtr&lt;DataCue&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, JSC::JSValue value, const String&amp; type)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new DataCue(context, start, end, value, type));
</span><span class="cx">     }
</span><span class="lines">@@ -94,11 +95,11 @@
</span><span class="cx">     virtual bool doesExtendCue(const TextTrackCue&amp;) const override;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    DataCue(ScriptExecutionContext&amp;, double start, double end, ArrayBuffer*, const String&amp;, ExceptionCode&amp;);
-    DataCue(ScriptExecutionContext&amp;, double start, double end, const void*, unsigned);
</del><ins>+    DataCue(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, ArrayBuffer*, const String&amp;, ExceptionCode&amp;);
+    DataCue(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, const void*, unsigned);
</ins><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-    DataCue(ScriptExecutionContext&amp;, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;);
-    DataCue(ScriptExecutionContext&amp;, double start, double end, JSC::JSValue, const String&amp;);
</del><ins>+    DataCue(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;);
+    DataCue(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, JSC::JSValue, const String&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackInbandDataTextTrackcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -52,14 +52,14 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandDataTextTrack::addDataCue(InbandTextTrackPrivate*, double start, double end, const void* data, unsigned length)
</del><ins>+void InbandDataTextTrack::addDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, const void* data, unsigned length)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;DataCue&gt; cue = DataCue::create(*scriptExecutionContext(), start, end, data, length);
</span><span class="cx">     addCue(cue.release(), ASSERT_NO_EXCEPTION);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-void InbandDataTextTrack::addDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpPlatformValue, const String&amp; type)
</del><ins>+void InbandDataTextTrack::addDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpPlatformValue, const String&amp; type)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;SerializedPlatformRepresentation&gt; platformValue = prpPlatformValue;
</span><span class="cx">     if (m_incompleteCueMap.find(platformValue.get()) != m_incompleteCueMap.end())
</span><span class="lines">@@ -67,20 +67,22 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;DataCue&gt; cue = DataCue::create(*scriptExecutionContext(), start, end, platformValue, type);
</span><span class="cx">     if (hasCue(cue.get(), TextTrackCue::IgnoreDuration)) {
</span><del>-        LOG(Media, &quot;InbandDataTextTrack::addDataCue ignoring already added cue: start=%.2f, end=%.2f\n&quot;, cue-&gt;startTime(), cue-&gt;endTime());
</del><ins>+        LOG(Media, &quot;InbandDataTextTrack::addDataCue ignoring already added cue: start=%s, end=%s\n&quot;, toString(cue-&gt;startTime()).utf8().data(), toString(cue-&gt;endTime()).utf8().data());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (std::isinf(end) &amp;&amp; mediaElement()) {
-        cue-&gt;setEndTime(mediaElement()-&gt;duration(), IGNORE_EXCEPTION);
</del><ins>+    if (end.isPositiveInfinite() &amp;&amp; mediaElement()) {
+        cue-&gt;setEndTime(mediaElement()-&gt;durationMediaTime());
</ins><span class="cx">         m_incompleteCueMap.add(platformValue, cue);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     addCue(cue.release(), ASSERT_NO_EXCEPTION);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandDataTextTrack::updateDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpPlatformValue)
</del><ins>+void InbandDataTextTrack::updateDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; inEnd, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpPlatformValue)
</ins><span class="cx"> {
</span><ins>+    MediaTime end = inEnd;
+
</ins><span class="cx">     RefPtr&lt;SerializedPlatformRepresentation&gt; platformValue = prpPlatformValue;
</span><span class="cx">     auto iter = m_incompleteCueMap.find(platformValue.get());
</span><span class="cx">     if (iter == m_incompleteCueMap.end())
</span><span class="lines">@@ -92,20 +94,20 @@
</span><span class="cx"> 
</span><span class="cx">     cue-&gt;willChange();
</span><span class="cx"> 
</span><del>-    if (std::isinf(end) &amp;&amp; mediaElement())
-        end = mediaElement()-&gt;duration();
</del><ins>+    if (end.isPositiveInfinite() &amp;&amp; mediaElement())
+        end = mediaElement()-&gt;durationMediaTime();
</ins><span class="cx">     else
</span><span class="cx">         m_incompleteCueMap.remove(platformValue.get());
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;InbandDataTextTrack::updateDataCue: was start=%.2f, end=%.2f, will be start=%.2f, end=%.2f\n&quot;, cue-&gt;startTime(), cue-&gt;endTime(), start, end);
</del><ins>+    LOG(Media, &quot;InbandDataTextTrack::updateDataCue: was start=%s, end=%s, will be start=%s, end=%s\n&quot;, toString(cue-&gt;startTime()).utf8().data(), toString(cue-&gt;endTime()).utf8().data(), toString(start).utf8().data(), toString(end).utf8().data());
</ins><span class="cx"> 
</span><del>-    cue-&gt;setStartTime(start, IGNORE_EXCEPTION);
-    cue-&gt;setEndTime(end, IGNORE_EXCEPTION);
</del><ins>+    cue-&gt;setStartTime(start);
+    cue-&gt;setEndTime(end);
</ins><span class="cx"> 
</span><span class="cx">     cue-&gt;didChange();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandDataTextTrack::removeDataCue(InbandTextTrackPrivate*, double, double, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpPlatformValue)
</del><ins>+void InbandDataTextTrack::removeDataCue(InbandTextTrackPrivate*, const MediaTime&amp;, const MediaTime&amp;, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpPlatformValue)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;SerializedPlatformRepresentation&gt; platformValue = prpPlatformValue;
</span><span class="cx">     auto iter = m_incompleteCueMap.find(platformValue.get());
</span><span class="lines">@@ -114,7 +116,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;DataCue&gt; cue = iter-&gt;value;
</span><span class="cx">     if (cue) {
</span><del>-        LOG(Media, &quot;InbandDataTextTrack::removeDataCue removing cue: start=%.2f, end=%.2f\n&quot;, cue-&gt;startTime(), cue-&gt;endTime());
</del><ins>+        LOG(Media, &quot;InbandDataTextTrack::removeDataCue removing cue: start=%s, end=%s\n&quot;, toString(cue-&gt;startTime()).utf8().data(), toString(cue-&gt;endTime()).utf8().data());
</ins><span class="cx">         removeCue(cue.get(), IGNORE_EXCEPTION);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackInbandDataTextTrackh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/InbandDataTextTrack.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -50,12 +50,12 @@
</span><span class="cx"> private:
</span><span class="cx">     InbandDataTextTrack(ScriptExecutionContext*, TextTrackClient*, PassRefPtr&lt;InbandTextTrackPrivate&gt;);
</span><span class="cx"> 
</span><del>-    virtual void addDataCue(InbandTextTrackPrivate*, double start, double end, const void*, unsigned) override;
</del><ins>+    virtual void addDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, const void*, unsigned) override;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-    virtual void addDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;) override;
-    virtual void updateDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override;
-    virtual void removeDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override;
</del><ins>+    virtual void addDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;) override;
+    virtual void updateDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override;
+    virtual void removeDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override;
</ins><span class="cx">     virtual void removeCue(TextTrackCue*, ExceptionCode&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     HashMap&lt;RefPtr&lt;SerializedPlatformRepresentation&gt;, RefPtr&lt;DataCue&gt;&gt; m_incompleteCueMap;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackInbandGenericTextTrackcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/InbandGenericTextTrack.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/InbandGenericTextTrack.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/InbandGenericTextTrack.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -110,11 +110,11 @@
</span><span class="cx"> {
</span><span class="cx">     cue-&gt;willChange();
</span><span class="cx"> 
</span><del>-    cue-&gt;setStartTime(cueData-&gt;startTime(), IGNORE_EXCEPTION);
-    double endTime = cueData-&gt;endTime();
-    if (std::isinf(endTime) &amp;&amp; mediaElement())
-        endTime = mediaElement()-&gt;duration();
-    cue-&gt;setEndTime(endTime, IGNORE_EXCEPTION);
</del><ins>+    cue-&gt;setStartTime(cueData-&gt;startTime());
+    MediaTime endTime = cueData-&gt;endTime();
+    if (endTime.isPositiveInfinite() &amp;&amp; mediaElement())
+        endTime = mediaElement()-&gt;durationMediaTime();
+    cue-&gt;setEndTime(endTime);
</ins><span class="cx">     cue-&gt;setText(cueData-&gt;content());
</span><span class="cx">     cue-&gt;setId(cueData-&gt;id());
</span><span class="cx">     cue-&gt;setBaseFontSizeRelativeToVideoHeight(cueData-&gt;baseFontSize());
</span><span class="lines">@@ -156,11 +156,11 @@
</span><span class="cx">     RefPtr&lt;TextTrackCueGeneric&gt; cue = TextTrackCueGeneric::create(*scriptExecutionContext(), cueData-&gt;startTime(), cueData-&gt;endTime(), cueData-&gt;content());
</span><span class="cx">     updateCueFromCueData(cue.get(), cueData.get());
</span><span class="cx">     if (hasCue(cue.get(), TextTrackCue::IgnoreDuration)) {
</span><del>-        LOG(Media, &quot;InbandGenericTextTrack::addGenericCue ignoring already added cue: start=%.2f, end=%.2f, content=\&quot;%s\&quot;\n&quot;, cueData-&gt;startTime(), cueData-&gt;endTime(), cueData-&gt;content().utf8().data());
</del><ins>+        LOG(Media, &quot;InbandGenericTextTrack::addGenericCue ignoring already added cue: start=%s, end=%s, content=\&quot;%s\&quot;\n&quot;, toString(cueData-&gt;startTime()).utf8().data(), toString(cueData-&gt;endTime()).utf8().data(), cueData-&gt;content().utf8().data());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;InbandGenericTextTrack::addGenericCue added cue: start=%.2f, end=%.2f, content=\&quot;%s\&quot;\n&quot;, cueData-&gt;startTime(), cueData-&gt;endTime(), cueData-&gt;content().utf8().data());
</del><ins>+    LOG(Media, &quot;InbandGenericTextTrack::addGenericCue added cue: start=%.2f, end=%.2f, content=\&quot;%s\&quot;\n&quot;, cueData-&gt;startTime().toDouble(), cueData-&gt;endTime().toDouble(), cueData-&gt;content().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (cueData-&gt;status() != GenericCueData::Complete)
</span><span class="cx">         m_cueMap.add(cueData.get(), cue.get());
</span><span class="lines">@@ -184,10 +184,10 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;TextTrackCueGeneric&gt; cue = m_cueMap.find(cueData);
</span><span class="cx">     if (cue) {
</span><del>-        LOG(Media, &quot;InbandGenericTextTrack::removeGenericCue removing cue: start=%.2f, end=%.2f, content=\&quot;%s\&quot;\n&quot;, cueData-&gt;startTime(), cueData-&gt;endTime(), cueData-&gt;content().utf8().data());
</del><ins>+        LOG(Media, &quot;InbandGenericTextTrack::removeGenericCue removing cue: start=%s, end=%s, content=\&quot;%s\&quot;\n&quot;,  toString(cueData-&gt;startTime()).utf8().data(), toString(cueData-&gt;endTime()).utf8().data(), cueData-&gt;content().utf8().data());
</ins><span class="cx">         removeCue(cue.get(), IGNORE_EXCEPTION);
</span><span class="cx">     } else {
</span><del>-        LOG(Media, &quot;InbandGenericTextTrack::removeGenericCue UNABLE to find cue: start=%.2f, end=%.2f, content=\&quot;%s\&quot;\n&quot;, cueData-&gt;startTime(), cueData-&gt;endTime(), cueData-&gt;content().utf8().data());
</del><ins>+        LOG(Media, &quot;InbandGenericTextTrack::removeGenericCue UNABLE to find cue: start=%.2f, end=%.2f, content=\&quot;%s\&quot;\n&quot;, cueData-&gt;startTime().toDouble(), cueData-&gt;endTime().toDouble(), cueData-&gt;content().utf8().data());
</ins><span class="cx">         m_cueMap.remove(cueData);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackInbandTextTrackcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -213,10 +213,10 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double InbandTextTrack::startTimeVariance() const
</del><ins>+MediaTime InbandTextTrack::startTimeVariance() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_private)
</span><del>-        return false;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx">     
</span><span class="cx">     return m_private-&gt;startTimeVariance();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackInbandTextTrackh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/InbandTextTrack.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -69,12 +69,12 @@
</span><span class="cx">     virtual void languageChanged(TrackPrivateBase*, const AtomicString&amp;) override;
</span><span class="cx">     virtual void willRemove(TrackPrivateBase*) override;
</span><span class="cx"> 
</span><del>-    virtual void addDataCue(InbandTextTrackPrivate*, double, double, const void*, unsigned) override { ASSERT_NOT_REACHED(); }
</del><ins>+    virtual void addDataCue(InbandTextTrackPrivate*, const MediaTime&amp;, const MediaTime&amp;, const void*, unsigned) override { ASSERT_NOT_REACHED(); }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-    virtual void addDataCue(InbandTextTrackPrivate*, double, double, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;) override { ASSERT_NOT_REACHED(); }
-    virtual void updateDataCue(InbandTextTrackPrivate*, double, double, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override  { ASSERT_NOT_REACHED(); }
-    virtual void removeDataCue(InbandTextTrackPrivate*, double, double, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override  { ASSERT_NOT_REACHED(); }
</del><ins>+    virtual void addDataCue(InbandTextTrackPrivate*, const MediaTime&amp;, const MediaTime&amp;, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;) override { ASSERT_NOT_REACHED(); }
+    virtual void updateDataCue(InbandTextTrackPrivate*, const MediaTime&amp;, const MediaTime&amp;, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override  { ASSERT_NOT_REACHED(); }
+    virtual void removeDataCue(InbandTextTrackPrivate*, const MediaTime&amp;, const MediaTime&amp;, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) override  { ASSERT_NOT_REACHED(); }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     virtual void addGenericCue(InbandTextTrackPrivate*, PassRefPtr&lt;GenericCueData&gt;) override { ASSERT_NOT_REACHED(); }
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">     virtual void parseWebVTTCueData(InbandTextTrackPrivate*, const char*, unsigned) override { ASSERT_NOT_REACHED(); }
</span><span class="cx">     virtual void parseWebVTTCueData(InbandTextTrackPrivate*, const ISOWebVTTCue&amp;) override { ASSERT_NOT_REACHED(); }
</span><span class="cx"> 
</span><del>-    virtual double startTimeVariance() const;
</del><ins>+    virtual MediaTime startTimeVariance() const;
</ins><span class="cx"> 
</span><span class="cx"> #if USE(PLATFORM_TEXT_TRACK_MENU)
</span><span class="cx">     virtual InbandTextTrackPrivate* privateTrack() override { return m_private.get(); }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // TODO(93143): Add spec-compliant behavior for negative time values.
</span><del>-    if (std::isnan(cue-&gt;startTime()) || std::isnan(cue-&gt;endTime()) || cue-&gt;startTime() &lt; 0 || cue-&gt;endTime() &lt; 0)
</del><ins>+    if (!cue-&gt;startMediaTime().isValid() || !cue-&gt;endMediaTime().isValid() || cue-&gt;startMediaTime() &lt; MediaTime::zeroTime() || cue-&gt;endMediaTime() &lt; MediaTime::zeroTime())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // 4.8.10.12.5 Text track API
</span><span class="lines">@@ -485,7 +485,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool TextTrack::hasCue(TextTrackCue* cue, TextTrackCue::CueMatchRules match)
</span><span class="cx"> {
</span><del>-    if (cue-&gt;startTime() &lt; 0 || cue-&gt;endTime() &lt; 0)
</del><ins>+    if (cue-&gt;startMediaTime() &lt; MediaTime::zeroTime() || cue-&gt;endMediaTime() &lt; MediaTime::zeroTime())
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     if (!m_cues || !m_cues-&gt;length())
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx">                 if (!existingCue)
</span><span class="cx">                     return false;
</span><span class="cx"> 
</span><del>-                if (cue-&gt;startTime() &gt; (existingCue-&gt;startTime() + startTimeVariance()))
</del><ins>+                if (cue-&gt;startMediaTime() &gt; (existingCue-&gt;startMediaTime() + startTimeVariance()))
</ins><span class="cx">                     return false;
</span><span class="cx"> 
</span><span class="cx">                 if (existingCue-&gt;isEqual(*cue, match))
</span><span class="lines">@@ -532,7 +532,7 @@
</span><span class="cx">         
</span><span class="cx">         size_t index = (searchStart + searchEnd) / 2;
</span><span class="cx">         existingCue = m_cues-&gt;item(index);
</span><del>-        if ((cue-&gt;startTime() + startTimeVariance()) &lt; existingCue-&gt;startTime() || (match != TextTrackCue::IgnoreDuration &amp;&amp; cue-&gt;hasEquivalentStartTime(*existingCue) &amp;&amp; cue-&gt;endTime() &gt; existingCue-&gt;endTime()))
</del><ins>+        if ((cue-&gt;startMediaTime() + startTimeVariance()) &lt; existingCue-&gt;startMediaTime() || (match != TextTrackCue::IgnoreDuration &amp;&amp; cue-&gt;hasEquivalentStartTime(*existingCue) &amp;&amp; cue-&gt;endMediaTime() &gt; existingCue-&gt;endMediaTime()))
</ins><span class="cx">             searchEnd = index;
</span><span class="cx">         else
</span><span class="cx">             searchStart = index + 1;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrack.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isInband() const { return false; }
</span><span class="cx"> 
</span><del>-    virtual double startTimeVariance() const { return 0; }
</del><ins>+    virtual MediaTime startTimeVariance() const { return MediaTime::zeroTime(); }
</ins><span class="cx"> 
</span><span class="cx">     using RefCounted&lt;TrackBase&gt;::ref;
</span><span class="cx">     using RefCounted&lt;TrackBase&gt;::deref;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackCuecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -60,10 +60,15 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;TextTrackCue&gt; TextTrackCue::create(ScriptExecutionContext&amp; context, double start, double end, const String&amp; content)
</span><span class="cx"> {
</span><ins>+    return create(context, MediaTime::createWithDouble(start), MediaTime::createWithDouble(end), content);
+}
+
+PassRefPtr&lt;TextTrackCue&gt; TextTrackCue::create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content)
+{
</ins><span class="cx">     return VTTCue::create(context, start, end, content);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-TextTrackCue::TextTrackCue(ScriptExecutionContext&amp; context, double start, double end)
</del><ins>+TextTrackCue::TextTrackCue(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end)
</ins><span class="cx">     : m_startTime(start)
</span><span class="cx">     , m_endTime(end)
</span><span class="cx">     , m_cueIndex(invalidCueIndex)
</span><span class="lines">@@ -128,9 +133,14 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // TODO(93143): Add spec-compliant behavior for negative time values.
</span><del>-    if (m_startTime == value || value &lt; 0)
</del><ins>+    if (m_startTime.toDouble() == value || value &lt; 0)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    setStartTime(MediaTime::createWithDouble(value));
+}
+
+void TextTrackCue::setStartTime(const MediaTime&amp; value)
+{
</ins><span class="cx">     willChange();
</span><span class="cx">     m_startTime = value;
</span><span class="cx">     didChange();
</span><span class="lines">@@ -145,9 +155,14 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // TODO(93143): Add spec-compliant behavior for negative time values.
</span><del>-    if (m_endTime == value || value &lt; 0)
</del><ins>+    if (m_endTime.toDouble() == value || value &lt; 0)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    setEndTime(MediaTime::createWithDouble(value));
+}
+
+void TextTrackCue::setEndTime(const MediaTime&amp; value)
+{
</ins><span class="cx">     willChange();
</span><span class="cx">     m_endTime = value;
</span><span class="cx">     didChange();
</span><span class="lines">@@ -199,7 +214,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool TextTrackCue::isOrderedBefore(const TextTrackCue* other) const
</span><span class="cx"> {
</span><del>-    return startTime() &lt; other-&gt;startTime() || (startTime() == other-&gt;startTime() &amp;&amp; endTime() &gt; other-&gt;endTime());
</del><ins>+    return startMediaTime() &lt; other-&gt;startMediaTime() || (startMediaTime() == other-&gt;startMediaTime() &amp;&amp; endMediaTime() &gt; other-&gt;endMediaTime());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool TextTrackCue::cueContentsMatch(const TextTrackCue&amp; cue) const
</span><span class="lines">@@ -218,7 +233,7 @@
</span><span class="cx">     if (cueType() != cue.cueType())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (match != IgnoreDuration &amp;&amp; endTime() != cue.endTime())
</del><ins>+    if (match != IgnoreDuration &amp;&amp; endMediaTime() != cue.endMediaTime())
</ins><span class="cx">         return false;
</span><span class="cx">     if (!hasEquivalentStartTime(cue))
</span><span class="cx">         return false;
</span><span class="lines">@@ -230,13 +245,13 @@
</span><span class="cx"> 
</span><span class="cx"> bool TextTrackCue::hasEquivalentStartTime(const TextTrackCue&amp; cue) const
</span><span class="cx"> {
</span><del>-    double startTimeVariance = 0;
</del><ins>+    MediaTime startTimeVariance = MediaTime::zeroTime();
</ins><span class="cx">     if (track())
</span><span class="cx">         startTimeVariance = track()-&gt;startTimeVariance();
</span><span class="cx">     else if (cue.track())
</span><span class="cx">         startTimeVariance = cue.track()-&gt;startTimeVariance();
</span><span class="cx"> 
</span><del>-    return std::abs(std::abs(startTime()) - std::abs(cue.startTime())) &lt;= startTimeVariance;
</del><ins>+    return abs(abs(startMediaTime()) - abs(cue.startMediaTime())) &lt;= startTimeVariance;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool TextTrackCue::doesExtendCue(const TextTrackCue&amp; cue) const
</span><span class="lines">@@ -244,7 +259,7 @@
</span><span class="cx">     if (!cueContentsMatch(cue))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (endTime() != cue.startTime())
</del><ins>+    if (endMediaTime() != cue.startMediaTime())
</ins><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackCueh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCue.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -45,6 +46,7 @@
</span><span class="cx"> class TextTrackCue : public RefCounted&lt;TextTrackCue&gt;, public EventTargetWithInlineData {
</span><span class="cx"> public:
</span><span class="cx">     static PassRefPtr&lt;TextTrackCue&gt; create(ScriptExecutionContext&amp;, double start, double end, const String&amp; content);
</span><ins>+    static PassRefPtr&lt;TextTrackCue&gt; create(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content);
</ins><span class="cx"> 
</span><span class="cx">     static const AtomicString&amp; cueShadowPseudoId()
</span><span class="cx">     {
</span><span class="lines">@@ -60,10 +62,14 @@
</span><span class="cx">     const String&amp; id() const { return m_id; }
</span><span class="cx">     void setId(const String&amp;);
</span><span class="cx"> 
</span><del>-    double startTime() const { return m_startTime; }
</del><ins>+    MediaTime startMediaTime() const { return m_startTime; }
+    double startTime() const { return startMediaTime().toDouble(); }
+    void setStartTime(const MediaTime&amp;);
</ins><span class="cx">     void setStartTime(double, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    double endTime() const { return m_endTime; }
</del><ins>+    MediaTime endMediaTime() const { return m_endTime; }
+    double endTime() const { return endMediaTime().toDouble(); }
+    void setEndTime(const MediaTime&amp;);
</ins><span class="cx">     void setEndTime(double, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     bool pauseOnExit() const { return m_pauseOnExit; }
</span><span class="lines">@@ -112,7 +118,7 @@
</span><span class="cx">     using RefCounted&lt;TextTrackCue&gt;::deref;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    TextTrackCue(ScriptExecutionContext&amp;, double start, double end);
</del><ins>+    TextTrackCue(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end);
</ins><span class="cx"> 
</span><span class="cx">     Document&amp; ownerDocument() { return toDocument(m_scriptExecutionContext); }
</span><span class="cx"> 
</span><span class="lines">@@ -122,8 +128,8 @@
</span><span class="cx">     virtual void derefEventTarget() override final { deref(); }
</span><span class="cx"> 
</span><span class="cx">     String m_id;
</span><del>-    double m_startTime;
-    double m_endTime;
</del><ins>+    MediaTime m_startTime;
+    MediaTime m_endTime;
</ins><span class="cx">     int m_cueIndex;
</span><span class="cx">     int m_processingCueChanges;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackCueGenericcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">     setInlineStyleProperty(CSSPropertyWhiteSpace, CSSValuePreWrap);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-TextTrackCueGeneric::TextTrackCueGeneric(ScriptExecutionContext&amp; context, double start, double end, const String&amp; content)
</del><ins>+TextTrackCueGeneric::TextTrackCueGeneric(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content)
</ins><span class="cx">     : VTTCue(context, start, end, content)
</span><span class="cx">     , m_baseFontSizeRelativeToVideoHeight(0)
</span><span class="cx">     , m_fontSizeMultiplier(0)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackCueGenerich"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueGeneric.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> // A &quot;generic&quot; cue is a non-WebVTT cue, so it is not positioned/sized with the WebVTT logic.
</span><span class="cx"> class TextTrackCueGeneric final : public VTTCue {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;TextTrackCueGeneric&gt; create(ScriptExecutionContext&amp; context, double start, double end, const String&amp; content)
</del><ins>+    static PassRefPtr&lt;TextTrackCueGeneric&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content)
</ins><span class="cx">     {
</span><span class="cx">         return adoptRef(new TextTrackCueGeneric(context, start, end, content));
</span><span class="cx">     }
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">     virtual bool isOrderedBefore(const TextTrackCue*) const override;
</span><span class="cx">     virtual bool isPositionedAbove(const TextTrackCue*) const override;
</span><span class="cx"> 
</span><del>-    TextTrackCueGeneric(ScriptExecutionContext&amp;, double start, double end, const String&amp;);
</del><ins>+    TextTrackCueGeneric(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp;);
</ins><span class="cx">     
</span><span class="cx">     Color m_foregroundColor;
</span><span class="cx">     Color m_backgroundColor;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackTextTrackCueListcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueList.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueList.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/TextTrackCueList.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -77,8 +77,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool TextTrackCueList::add(PassRefPtr&lt;TextTrackCue&gt; cue)
</span><span class="cx"> {
</span><del>-    ASSERT(cue-&gt;startTime() &gt;= 0);
-    ASSERT(cue-&gt;endTime() &gt;= 0);
</del><ins>+    ASSERT(cue-&gt;startMediaTime() &gt;= MediaTime::zeroTime());
+    ASSERT(cue-&gt;endMediaTime() &gt;= MediaTime::zeroTime());
</ins><span class="cx"> 
</span><span class="cx">     return add(cue, 0, m_list.size());
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackVTTCuecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -247,17 +247,12 @@
</span><span class="cx">     return cueBackdropShadowPseudoId;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;VTTCue&gt; VTTCue::create(ScriptExecutionContext&amp; context, double start, double end, const String&amp; content)
-{
-    return adoptRef(new VTTCue(context, start, end, content));
-}
-
</del><span class="cx"> PassRefPtr&lt;VTTCue&gt; VTTCue::create(ScriptExecutionContext&amp; context, const WebVTTCueData&amp; data)
</span><span class="cx"> {
</span><span class="cx">     return adoptRef(new VTTCue(context, data));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-VTTCue::VTTCue(ScriptExecutionContext&amp; context, double start, double end, const String&amp; content)
</del><ins>+VTTCue::VTTCue(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content)
</ins><span class="cx">     : TextTrackCue(context, start, end)
</span><span class="cx">     , m_content(content)
</span><span class="cx"> {
</span><span class="lines">@@ -265,12 +260,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> VTTCue::VTTCue(ScriptExecutionContext&amp; context, const WebVTTCueData&amp; cueData)
</span><del>-    : TextTrackCue(context, 0, 0)
</del><ins>+    : TextTrackCue(context, MediaTime::zeroTime(), MediaTime::zeroTime())
</ins><span class="cx"> {
</span><span class="cx">     initialize(context);
</span><span class="cx">     setText(cueData.content());
</span><del>-    setStartTime(cueData.startTime(), IGNORE_EXCEPTION);
-    setEndTime(cueData.endTime(), IGNORE_EXCEPTION);
</del><ins>+    setStartTime(cueData.startTime());
+    setEndTime(cueData.endTime());
</ins><span class="cx">     setId(cueData.id());
</span><span class="cx">     setCueSettings(cueData.settings());
</span><span class="cx">     m_originalStartTime = cueData.originalStartTime();
</span><span class="lines">@@ -300,7 +295,7 @@
</span><span class="cx">     m_snapToLines = true;
</span><span class="cx">     m_displayTreeShouldChange = true;
</span><span class="cx">     m_notifyRegion = true;
</span><del>-    m_originalStartTime = 0;
</del><ins>+    m_originalStartTime = MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;VTTCueBox&gt; VTTCue::createDisplayTree()
</span><span class="lines">@@ -751,18 +746,18 @@
</span><span class="cx">         m_displayPosition.first = m_computedLinePosition;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-void VTTCue::markFutureAndPastNodes(ContainerNode* root, double previousTimestamp, double movieTime)
</del><ins>+void VTTCue::markFutureAndPastNodes(ContainerNode* root, const MediaTime&amp; previousTimestamp, const MediaTime&amp; movieTime)
</ins><span class="cx"> {
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(const String, timestampTag, (ASCIILiteral(&quot;timestamp&quot;)));
</span><span class="cx">     
</span><span class="cx">     bool isPastNode = true;
</span><del>-    double currentTimestamp = previousTimestamp;
</del><ins>+    MediaTime currentTimestamp = previousTimestamp;
</ins><span class="cx">     if (currentTimestamp &gt; movieTime)
</span><span class="cx">         isPastNode = false;
</span><span class="cx">     
</span><span class="cx">     for (Node* child = root-&gt;firstChild(); child; child = NodeTraversal::next(child, root)) {
</span><span class="cx">         if (child-&gt;nodeName() == timestampTag) {
</span><del>-            double currentTimestamp;
</del><ins>+            MediaTime currentTimestamp;
</ins><span class="cx">             bool check = WebVTTParser::collectTimeStamp(child-&gt;nodeValue(), currentTimestamp);
</span><span class="cx">             ASSERT_UNUSED(check, check);
</span><span class="cx">             
</span><span class="lines">@@ -780,7 +775,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void VTTCue::updateDisplayTree(double movieTime)
</del><ins>+void VTTCue::updateDisplayTree(const MediaTime&amp; movieTime)
</ins><span class="cx"> {
</span><span class="cx">     // The display tree may contain WebVTT timestamp objects representing
</span><span class="cx">     // timestamps (processing instructions), along with displayable nodes.
</span><span class="lines">@@ -796,7 +791,7 @@
</span><span class="cx">     if (!referenceTree)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    markFutureAndPastNodes(referenceTree.get(), startTime(), movieTime);
</del><ins>+    markFutureAndPastNodes(referenceTree.get(), startMediaTime(), movieTime);
</ins><span class="cx">     m_cueHighlightBox-&gt;appendChild(referenceTree);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackVTTCueh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/VTTCue.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -74,7 +74,16 @@
</span><span class="cx"> 
</span><span class="cx"> class VTTCue : public TextTrackCue {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;VTTCue&gt; create(ScriptExecutionContext&amp;, double start, double end, const String&amp;);
</del><ins>+    static PassRefPtr&lt;VTTCue&gt; create(ScriptExecutionContext&amp; context, double start, double end, const String&amp; content)
+    {
+        return create(context, MediaTime::createWithDouble(start), MediaTime::createWithDouble(end), content);
+    }
+
+    static PassRefPtr&lt;VTTCue&gt; create(ScriptExecutionContext&amp; context, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content)
+    {
+        return adoptRef(new VTTCue(context, start, end, content));
+    }
+
</ins><span class="cx">     static PassRefPtr&lt;VTTCue&gt; create(ScriptExecutionContext&amp;, const WebVTTCueData&amp;);
</span><span class="cx"> 
</span><span class="cx">     static const AtomicString&amp; cueBackdropShadowPseudoId();
</span><span class="lines">@@ -120,9 +129,9 @@
</span><span class="cx">     VTTCueBox* getDisplayTree(const IntSize&amp; videoSize, int fontSize);
</span><span class="cx">     HTMLSpanElement* element() const { return m_cueHighlightBox.get(); }
</span><span class="cx"> 
</span><del>-    void updateDisplayTree(double);
</del><ins>+    void updateDisplayTree(const MediaTime&amp;);
</ins><span class="cx">     void removeDisplayTree();
</span><del>-    void markFutureAndPastNodes(ContainerNode*, double, double);
</del><ins>+    void markFutureAndPastNodes(ContainerNode*, const MediaTime&amp;, const MediaTime&amp;);
</ins><span class="cx"> 
</span><span class="cx">     int calculateComputedLinePosition();
</span><span class="cx">     std::pair&lt;double, double&gt; getPositionCoordinates() const;
</span><span class="lines">@@ -164,7 +173,7 @@
</span><span class="cx">     virtual void didChange() override;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    VTTCue(ScriptExecutionContext&amp;, double start, double end, const String&amp; content);
</del><ins>+    VTTCue(ScriptExecutionContext&amp;, const MediaTime&amp; start, const MediaTime&amp; end, const String&amp; content);
</ins><span class="cx">     VTTCue(ScriptExecutionContext&amp;, const WebVTTCueData&amp;);
</span><span class="cx"> 
</span><span class="cx">     virtual PassRefPtr&lt;VTTCueBox&gt; createDisplayTree();
</span><span class="lines">@@ -215,7 +224,7 @@
</span><span class="cx">     int m_displaySize;
</span><span class="cx">     std::pair&lt;float, float&gt; m_displayPosition;
</span><span class="cx"> 
</span><del>-    double m_originalStartTime;
</del><ins>+    MediaTime m_originalStartTime;
</ins><span class="cx"> 
</span><span class="cx">     bool m_snapToLines : 1;
</span><span class="cx">     bool m_displayTreeShouldChange : 1;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackWebVTTParsercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -89,8 +89,6 @@
</span><span class="cx">     : m_scriptExecutionContext(context)
</span><span class="cx">     , m_state(Initial)
</span><span class="cx">     , m_decoder(TextResourceDecoder::create(&quot;text/plain&quot;, UTF8Encoding()))
</span><del>-    , m_currentStartTime(0)
-    , m_currentEndTime(0)
</del><span class="cx">     , m_client(client)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -128,15 +126,15 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;WebVTTCueData&gt; cue = WebVTTCueData::create();
</span><span class="cx"> 
</span><del>-    double startTime = data.presentationTime().toDouble();
</del><ins>+    MediaTime startTime = data.presentationTime();
</ins><span class="cx">     cue-&gt;setStartTime(startTime);
</span><del>-    cue-&gt;setEndTime(startTime + data.duration().toDouble());
</del><ins>+    cue-&gt;setEndTime(startTime + data.duration());
</ins><span class="cx"> 
</span><span class="cx">     cue-&gt;setContent(data.cueText());
</span><span class="cx">     cue-&gt;setId(data.id());
</span><span class="cx">     cue-&gt;setSettings(data.settings());
</span><span class="cx"> 
</span><del>-    double originalStartTime;
</del><ins>+    MediaTime originalStartTime;
</ins><span class="cx">     if (WebVTTParser::collectTimeStamp(data.originalStartTime(), originalStartTime))
</span><span class="cx">         cue-&gt;setOriginalStartTime(originalStartTime);
</span><span class="cx"> 
</span><span class="lines">@@ -437,8 +435,8 @@
</span><span class="cx"> {
</span><span class="cx">     m_currentId = emptyString();
</span><span class="cx">     m_currentSettings = emptyString();
</span><del>-    m_currentStartTime = 0;
-    m_currentEndTime = 0;
</del><ins>+    m_currentStartTime = MediaTime::zeroTime();
+    m_currentEndTime = MediaTime::zeroTime();
</ins><span class="cx">     m_currentContent.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -465,7 +463,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool WebVTTParser::collectTimeStamp(const String&amp; line, double&amp; timeStamp)
</del><ins>+bool WebVTTParser::collectTimeStamp(const String&amp; line, MediaTime&amp; timeStamp)
</ins><span class="cx"> {
</span><span class="cx">     if (line.isEmpty())
</span><span class="cx">         return false;
</span><span class="lines">@@ -474,7 +472,7 @@
</span><span class="cx">     return collectTimeStamp(input, timeStamp);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebVTTParser::collectTimeStamp(VTTScanner&amp; input, double&amp; timeStamp)
</del><ins>+bool WebVTTParser::collectTimeStamp(VTTScanner&amp; input, MediaTime&amp; timeStamp)
</ins><span class="cx"> {
</span><span class="cx">     // Collect a WebVTT timestamp (5.3 WebVTT cue timings and settings parsing.)
</span><span class="cx">     // Steps 1 - 4 - Initial checks, let most significant units be minutes.
</span><span class="lines">@@ -514,7 +512,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // Steps 18 - 19 - Calculate result.
</span><del>-    timeStamp = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + (value4 * secondsPerMillisecond);
</del><ins>+    timeStamp = MediaTime::createWithDouble((value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + (value4 * secondsPerMillisecond));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -611,7 +609,7 @@
</span><span class="cx">     }
</span><span class="cx">     case WebVTTTokenTypes::TimestampTag: {
</span><span class="cx">         String charactersString = m_token.characters();
</span><del>-        double parsedTimeStamp;
</del><ins>+        MediaTime parsedTimeStamp;
</ins><span class="cx">         if (WebVTTParser::collectTimeStamp(charactersString, parsedTimeStamp))
</span><span class="cx">             m_currentNode-&gt;parserAppendChild(ProcessingInstruction::create(document, &quot;timestamp&quot;, charactersString));
</span><span class="cx">         break;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmltrackWebVTTParserh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/html/track/WebVTTParser.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include &quot;VTTRegion.h&quot;
</span><span class="cx"> #include &quot;WebVTTTokenizer.h&quot;
</span><span class="cx"> #include &lt;memory&gt;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -69,11 +70,11 @@
</span><span class="cx">     static PassRefPtr&lt;WebVTTCueData&gt; create() { return adoptRef(new WebVTTCueData()); }
</span><span class="cx">     virtual ~WebVTTCueData() { }
</span><span class="cx"> 
</span><del>-    double startTime() const { return m_startTime; }
-    void setStartTime(double startTime) { m_startTime = startTime; }
</del><ins>+    MediaTime startTime() const { return m_startTime; }
+    void setStartTime(const MediaTime&amp; startTime) { m_startTime = startTime; }
</ins><span class="cx"> 
</span><del>-    double endTime() const { return m_endTime; }
-    void setEndTime(double endTime) { m_endTime = endTime; }
</del><ins>+    MediaTime endTime() const { return m_endTime; }
+    void setEndTime(const MediaTime&amp; endTime) { m_endTime = endTime; }
</ins><span class="cx"> 
</span><span class="cx">     String id() const { return m_id; }
</span><span class="cx">     void setId(String id) { m_id = id; }
</span><span class="lines">@@ -84,20 +85,15 @@
</span><span class="cx">     String settings() const { return m_settings; }
</span><span class="cx">     void setSettings(String settings) { m_settings = settings; }
</span><span class="cx"> 
</span><del>-    double originalStartTime() const { return m_originalStartTime; }
-    void setOriginalStartTime(double time) { m_originalStartTime = time; }
</del><ins>+    MediaTime originalStartTime() const { return m_originalStartTime; }
+    void setOriginalStartTime(const MediaTime&amp; time) { m_originalStartTime = time; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WebVTTCueData()
-        : m_startTime(0)
-        , m_endTime(0)
-        , m_originalStartTime(0)
-    {
-    }
</del><ins>+    WebVTTCueData() { }
</ins><span class="cx"> 
</span><del>-    double m_startTime;
-    double m_endTime;
-    double m_originalStartTime;
</del><ins>+    MediaTime m_startTime;
+    MediaTime m_endTime;
+    MediaTime m_originalStartTime;
</ins><span class="cx">     String m_id;
</span><span class="cx">     String m_content;
</span><span class="cx">     String m_settings;
</span><span class="lines">@@ -137,7 +133,7 @@
</span><span class="cx">         // U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.
</span><span class="cx">         return c == ' ' || c == '\t';
</span><span class="cx">     }
</span><del>-    static bool collectTimeStamp(const String&amp;, double&amp;);
</del><ins>+    static bool collectTimeStamp(const String&amp;, MediaTime&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Useful functions for parsing percentage settings.
</span><span class="cx">     static bool parseFloatPercentageValue(VTTScanner&amp; valueScanner, float&amp;);
</span><span class="lines">@@ -183,13 +179,13 @@
</span><span class="cx">     void createNewRegion(const String&amp; headerValue);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    static bool collectTimeStamp(VTTScanner&amp; input, double&amp; timeStamp);
</del><ins>+    static bool collectTimeStamp(VTTScanner&amp; input, MediaTime&amp; timeStamp);
</ins><span class="cx"> 
</span><span class="cx">     BufferedLineReader m_lineReader;
</span><span class="cx">     RefPtr&lt;TextResourceDecoder&gt; m_decoder;
</span><span class="cx">     String m_currentId;
</span><del>-    double m_currentStartTime;
-    double m_currentEndTime;
</del><ins>+    MediaTime m_currentStartTime;
+    MediaTime m_currentEndTime;
</ins><span class="cx">     StringBuilder m_currentContent;
</span><span class="cx">     String m_currentSettings;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsInbandTextTrackPrivateClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Color.h&quot;
</span><span class="cx"> #include &quot;TrackPrivateBase.h&quot;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="cx"> #include &quot;SerializedPlatformRepresentation.h&quot;
</span><span class="lines">@@ -46,11 +47,11 @@
</span><span class="cx">     static PassRefPtr&lt;GenericCueData&gt; create() { return adoptRef(new GenericCueData()); }
</span><span class="cx">     virtual ~GenericCueData() { }
</span><span class="cx"> 
</span><del>-    double startTime() const { return m_startTime; }
-    void setStartTime(double startTime) { m_startTime = startTime; }
</del><ins>+    MediaTime startTime() const { return m_startTime; }
+    void setStartTime(const MediaTime&amp; startTime) { m_startTime = startTime; }
</ins><span class="cx"> 
</span><del>-    double endTime() const { return m_endTime; }
-    void setEndTime(double endTime) { m_endTime = endTime; }
</del><ins>+    MediaTime endTime() const { return m_endTime; }
+    void setEndTime(const MediaTime&amp; endTime) { m_endTime = endTime; }
</ins><span class="cx"> 
</span><span class="cx">     String id() const { return m_id; }
</span><span class="cx">     void setId(String id) { m_id = id; }
</span><span class="lines">@@ -106,9 +107,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     GenericCueData()
</span><del>-        : m_startTime(0)
-        , m_endTime(0)
-        , m_line(-1)
</del><ins>+        : m_line(-1)
</ins><span class="cx">         , m_position(-1)
</span><span class="cx">         , m_size(-1)
</span><span class="cx">         , m_align(None)
</span><span class="lines">@@ -118,8 +117,8 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    double m_startTime;
-    double m_endTime;
</del><ins>+    MediaTime m_startTime;
+    MediaTime m_endTime;
</ins><span class="cx">     String m_id;
</span><span class="cx">     String m_content;
</span><span class="cx">     double m_line;
</span><span class="lines">@@ -169,12 +168,12 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~InbandTextTrackPrivateClient() { }
</span><span class="cx"> 
</span><del>-    virtual void addDataCue(InbandTextTrackPrivate*, double start, double end, const void*, unsigned) = 0;
</del><ins>+    virtual void addDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, const void*, unsigned) = 0;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-    virtual void addDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;) = 0;
-    virtual void updateDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) = 0;
-    virtual void removeDataCue(InbandTextTrackPrivate*, double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) = 0;
</del><ins>+    virtual void addDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;) = 0;
+    virtual void updateDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) = 0;
+    virtual void removeDataCue(InbandTextTrackPrivate*, const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     virtual void addGenericCue(InbandTextTrackPrivate*, PassRefPtr&lt;GenericCueData&gt;) = 0;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -517,34 +517,34 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">     
</span><del>-double MediaPlayer::duration() const
</del><ins>+MediaTime MediaPlayer::duration() const
</ins><span class="cx"> {
</span><del>-    return m_private-&gt;durationDouble();
</del><ins>+    return m_private-&gt;durationMediaTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::startTime() const
</del><ins>+MediaTime MediaPlayer::startTime() const
</ins><span class="cx"> {
</span><del>-    return m_private-&gt;startTimeDouble();
</del><ins>+    return m_private-&gt;startTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::initialTime() const
</del><ins>+MediaTime MediaPlayer::initialTime() const
</ins><span class="cx"> {
</span><span class="cx">     return m_private-&gt;initialTime();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::currentTime() const
</del><ins>+MediaTime MediaPlayer::currentTime() const
</ins><span class="cx"> {
</span><del>-    return m_private-&gt;currentTimeDouble();
</del><ins>+    return m_private-&gt;currentMediaTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayer::seekWithTolerance(double time, double negativeTolerance, double positiveTolerance)
</del><ins>+void MediaPlayer::seekWithTolerance(const MediaTime&amp; time, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx"> {
</span><span class="cx">     m_private-&gt;seekWithTolerance(time, negativeTolerance, positiveTolerance);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayer::seek(double time)
</del><ins>+void MediaPlayer::seek(const MediaTime&amp; time)
</ins><span class="cx"> {
</span><del>-    m_private-&gt;seekDouble(time);
</del><ins>+    m_private-&gt;seek(time);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MediaPlayer::paused() const
</span><span class="lines">@@ -722,14 +722,14 @@
</span><span class="cx">     return m_private-&gt;seekable();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::maxTimeSeekable()
</del><ins>+MediaTime MediaPlayer::maxTimeSeekable()
</ins><span class="cx"> {
</span><del>-    return m_private-&gt;maxTimeSeekableDouble();
</del><ins>+    return m_private-&gt;maxMediaTimeSeekable();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::minTimeSeekable()
</del><ins>+MediaTime MediaPlayer::minTimeSeekable()
</ins><span class="cx"> {
</span><del>-    return m_private-&gt;minTimeSeekable();
</del><ins>+    return m_private-&gt;minMediaTimeSeekable();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MediaPlayer::didLoadingProgress()
</span><span class="lines">@@ -950,9 +950,9 @@
</span><span class="cx">     return m_private-&gt;movieLoadType();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::mediaTimeForTimeValue(double timeValue) const
</del><ins>+MediaTime MediaPlayer::mediaTimeForTimeValue(const MediaTime&amp; timeValue) const
</ins><span class="cx"> {
</span><del>-    return m_private-&gt;mediaTimeForTimeValueDouble(timeValue);
</del><ins>+    return m_private-&gt;mediaTimeForTimeValue(timeValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> double MediaPlayer::maximumDurationToCacheMediaTime() const
</span><span class="lines">@@ -1379,10 +1379,10 @@
</span><span class="cx">     return m_private-&gt;corruptedVideoFrames();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayer::totalFrameDelay()
</del><ins>+MediaTime MediaPlayer::totalFrameDelay()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_private)
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     return m_private-&gt;totalFrameDelay();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayerh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -366,15 +366,14 @@
</span><span class="cx">     bool seeking() const;
</span><span class="cx"> 
</span><span class="cx">     static double invalidTime() { return -1.0;}
</span><del>-    double duration() const;
-    double currentTime() const;
-    void seek(double time);
-    void seekWithTolerance(double time, double negativeTolerance, double positiveTolerance);
</del><ins>+    MediaTime duration() const;
+    MediaTime currentTime() const;
+    void seek(const MediaTime&amp;);
+    void seekWithTolerance(const MediaTime&amp;, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance);
</ins><span class="cx"> 
</span><del>-    double startTime() const;
</del><ins>+    MediaTime startTime() const;
+    MediaTime initialTime() const;
</ins><span class="cx"> 
</span><del>-    double initialTime() const;
-
</del><span class="cx">     double rate() const;
</span><span class="cx">     void setRate(double);
</span><span class="cx"> 
</span><span class="lines">@@ -383,8 +382,8 @@
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;PlatformTimeRanges&gt; buffered();
</span><span class="cx">     std::unique_ptr&lt;PlatformTimeRanges&gt; seekable();
</span><del>-    double minTimeSeekable();
-    double maxTimeSeekable();
</del><ins>+    MediaTime minTimeSeekable();
+    MediaTime maxTimeSeekable();
</ins><span class="cx"> 
</span><span class="cx">     bool didLoadingProgress();
</span><span class="cx"> 
</span><span class="lines">@@ -506,7 +505,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool didPassCORSAccessCheck() const;
</span><span class="cx"> 
</span><del>-    double mediaTimeForTimeValue(double) const;
</del><ins>+    MediaTime mediaTimeForTimeValue(const MediaTime&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     double maximumDurationToCacheMediaTime() const;
</span><span class="cx"> 
</span><span class="lines">@@ -587,7 +586,7 @@
</span><span class="cx">     unsigned long totalVideoFrames();
</span><span class="cx">     unsigned long droppedVideoFrames();
</span><span class="cx">     unsigned long corruptedVideoFrames();
</span><del>-    double totalFrameDelay();
</del><ins>+    MediaTime totalFrameDelay();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool shouldWaitForResponseToAuthenticationChallenge(const AuthenticationChallenge&amp;);
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayerPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayerPrivate.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayerPrivate.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayerPrivate.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -83,21 +83,22 @@
</span><span class="cx"> 
</span><span class="cx">     virtual float duration() const { return 0; }
</span><span class="cx">     virtual double durationDouble() const { return duration(); }
</span><ins>+    virtual MediaTime durationMediaTime() const { return MediaTime::createWithDouble(durationDouble()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual float currentTime() const { return 0; }
</span><span class="cx">     virtual double currentTimeDouble() const { return currentTime(); }
</span><ins>+    virtual MediaTime currentMediaTime() const { return MediaTime::createWithDouble(currentTimeDouble()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual void seek(float) { }
</span><span class="cx">     virtual void seekDouble(double time) { seek(time); }
</span><del>-    virtual void seekWithTolerance(double time, double, double) { seekDouble(time); }
</del><ins>+    virtual void seek(const MediaTime&amp; time) { seekDouble(time.toDouble()); }
+    virtual void seekWithTolerance(const MediaTime&amp; time, const MediaTime&amp;, const MediaTime&amp;) { seek(time); }
</ins><span class="cx"> 
</span><span class="cx">     virtual bool seeking() const = 0;
</span><span class="cx"> 
</span><del>-    virtual float startTime() const { return 0; }
-    virtual double startTimeDouble() const { return startTime(); }
</del><ins>+    virtual MediaTime startTime() const { return MediaTime::zeroTime(); }
+    virtual MediaTime initialTime() const { return MediaTime::zeroTime(); }
</ins><span class="cx"> 
</span><del>-    virtual double initialTime() const { return 0; }
-
</del><span class="cx">     virtual void setRate(float) { }
</span><span class="cx">     virtual void setRateDouble(double rate) { setRate(rate); }
</span><span class="cx"> 
</span><span class="lines">@@ -123,10 +124,11 @@
</span><span class="cx">     virtual MediaPlayer::NetworkState networkState() const = 0;
</span><span class="cx">     virtual MediaPlayer::ReadyState readyState() const = 0;
</span><span class="cx"> 
</span><del>-    virtual std::unique_ptr&lt;PlatformTimeRanges&gt; seekable() const { return maxTimeSeekableDouble() ? PlatformTimeRanges::create(MediaTime::createWithDouble(minTimeSeekable()), MediaTime::createWithDouble(maxTimeSeekableDouble())) : PlatformTimeRanges::create(); }
</del><ins>+    virtual std::unique_ptr&lt;PlatformTimeRanges&gt; seekable() const { return maxMediaTimeSeekable() == MediaTime::zeroTime() ? PlatformTimeRanges::create() : PlatformTimeRanges::create(minMediaTimeSeekable(), maxMediaTimeSeekable()); }
</ins><span class="cx">     virtual float maxTimeSeekable() const { return 0; }
</span><del>-    virtual double maxTimeSeekableDouble() const { return maxTimeSeekable(); }
</del><ins>+    virtual MediaTime maxMediaTimeSeekable() const { return MediaTime::createWithDouble(maxTimeSeekable()); }
</ins><span class="cx">     virtual double minTimeSeekable() const { return 0; }
</span><ins>+    virtual MediaTime minMediaTimeSeekable() const { return MediaTime::createWithDouble(minTimeSeekable()); }
</ins><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual bool didLoadingProgress() const = 0;
</span><span class="lines">@@ -189,8 +191,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Time value in the movie's time scale. It is only necessary to override this if the media
</span><span class="cx">     // engine uses rational numbers to represent media time.
</span><del>-    virtual float mediaTimeForTimeValue(float timeValue) const { return timeValue; }
-    virtual double mediaTimeForTimeValueDouble(double timeValue) const { return timeValue; }
</del><ins>+    virtual MediaTime mediaTimeForTimeValue(const MediaTime&amp; timeValue) const { return timeValue; }
</ins><span class="cx"> 
</span><span class="cx">     // Overide this if it is safe for HTMLMediaElement to cache movie time and report
</span><span class="cx">     // 'currentTime' as [cached time + elapsed wall time]. Returns the maximum wall time
</span><span class="lines">@@ -255,7 +256,7 @@
</span><span class="cx">     virtual unsigned long totalVideoFrames() { return 0; }
</span><span class="cx">     virtual unsigned long droppedVideoFrames() { return 0; }
</span><span class="cx">     virtual unsigned long corruptedVideoFrames() { return 0; }
</span><del>-    virtual double totalFrameDelay() { return 0; }
</del><ins>+    virtual MediaTime totalFrameDelay() { return MediaTime::zeroTime(); }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(AVF_CAPTIONS)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsMediaSourcePrivateClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaSourcePrivateClient.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaSourcePrivateClient.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaSourcePrivateClient.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     virtual ~MediaSourcePrivateClient() { }
</span><span class="cx"> 
</span><span class="cx">     virtual void setPrivateAndOpen(PassRef&lt;MediaSourcePrivate&gt;) = 0;
</span><del>-    virtual double duration() const = 0;
</del><ins>+    virtual MediaTime duration() const = 0;
</ins><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const = 0;
</span><span class="cx">     virtual void seekToTime(const MediaTime&amp;) = 0;
</span><span class="cx"> };
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsTrackPrivateBaseh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/TrackPrivateBase.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/TrackPrivateBase.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/TrackPrivateBase.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #define TrackPrivateBase_h
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/text/AtomicString.h&gt;
</span><span class="lines">@@ -61,7 +62,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual int trackIndex() const { return 0; }
</span><span class="cx"> 
</span><del>-    virtual double startTimeVariance() const { return 0; }
</del><ins>+    virtual MediaTime startTimeVariance() const { return MediaTime::zeroTime(); }
</ins><span class="cx">     
</span><span class="cx">     void willBeRemoved()
</span><span class="cx">     {
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandMetadataTextTrackPrivateAVFcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx">     : InbandTextTrackPrivate(cueFormat)
</span><span class="cx">     , m_kind(kind)
</span><span class="cx">     , m_id(id)
</span><del>-    , m_currentCueStartTime(0)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -56,7 +55,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-void InbandMetadataTextTrackPrivateAVF::addDataCue(double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpCueData, const String&amp; type)
</del><ins>+void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt; prpCueData, const String&amp; type)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(cueFormat() == Data);
</span><span class="cx">     if (!client())
</span><span class="lines">@@ -64,42 +63,42 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SerializedPlatformRepresentation&gt; cueData = prpCueData;
</span><span class="cx">     m_currentCueStartTime = start;
</span><del>-    if (end == std::numeric_limits&lt;double&gt;::infinity())
</del><ins>+    if (end.isPositiveInfinite())
</ins><span class="cx">         m_incompleteCues.append(new IncompleteMetaDataCue(start, cueData));
</span><span class="cx">     client()-&gt;addDataCue(this, start, end, cueData, type);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes(double time)
</del><ins>+void InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes(const MediaTime&amp; time)
</ins><span class="cx"> {
</span><span class="cx">     if (time &gt;= m_currentCueStartTime) {
</span><span class="cx">         for (size_t i = 0; i &lt; m_incompleteCues.size(); i++) {
</span><span class="cx">             IncompleteMetaDataCue* partialCue = m_incompleteCues[i];
</span><span class="cx"> 
</span><del>-            LOG(Media, &quot;InbandMetadataTextTrackPrivateAVF::addDataCue(%p) - updating cue: start=%.2f, end=%.2f&quot;, this, partialCue-&gt;startTime(), time);
</del><ins>+            LOG(Media, &quot;InbandMetadataTextTrackPrivateAVF::addDataCue(%p) - updating cue: start=%s, end=%s&quot;, this, toString(partialCue-&gt;startTime()).utf8().data(), toString(time).utf8().data());
</ins><span class="cx">             client()-&gt;updateDataCue(this, partialCue-&gt;startTime(), time, partialCue-&gt;cueData());
</span><span class="cx">         }
</span><span class="cx">     } else
</span><del>-        LOG(Media, &quot;InbandMetadataTextTrackPrivateAVF::addDataCue negative length cue(s) ignored: start=%.2f, end=%.2f\n&quot;, m_currentCueStartTime, time);
</del><ins>+        LOG(Media, &quot;InbandMetadataTextTrackPrivateAVF::addDataCue negative length cue(s) ignored: start=%s, end=%s\n&quot;, toString(m_currentCueStartTime).utf8().data(), toString(time).utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     m_incompleteCues.resize(0);
</span><del>-    m_currentCueStartTime = 0;
</del><ins>+    m_currentCueStartTime = MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void InbandMetadataTextTrackPrivateAVF::flushPartialCues()
</span><span class="cx"> {
</span><span class="cx">     if (m_currentCueStartTime &amp;&amp; m_incompleteCues.size())
</span><del>-        LOG(Media, &quot;InbandMetadataTextTrackPrivateAVF::resetCueValues flushing incomplete data for cues: start=%.2f\n&quot;, m_currentCueStartTime);
</del><ins>+        LOG(Media, &quot;InbandMetadataTextTrackPrivateAVF::resetCueValues flushing incomplete data for cues: start=%s\n&quot;, toString(m_currentCueStartTime).utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (client()) {
</span><span class="cx">         for (size_t i = 0; i &lt; m_incompleteCues.size(); i++) {
</span><span class="cx">             IncompleteMetaDataCue* partialCue = m_incompleteCues[i];
</span><del>-            client()-&gt;removeDataCue(this, partialCue-&gt;startTime(), std::numeric_limits&lt;double&gt;::infinity(), partialCue-&gt;cueData());
</del><ins>+            client()-&gt;removeDataCue(this, partialCue-&gt;startTime(), MediaTime::positiveInfiniteTime(), partialCue-&gt;cueData());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_incompleteCues.resize(0);
</span><del>-    m_currentCueStartTime = 0;
</del><ins>+    m_currentCueStartTime = MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandMetadataTextTrackPrivateAVFh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="cx"> class IncompleteMetaDataCue {
</span><span class="cx"> public:
</span><del>-    IncompleteMetaDataCue(double time, PassRefPtr&lt;SerializedPlatformRepresentation&gt; cueData)
</del><ins>+    IncompleteMetaDataCue(const MediaTime&amp; time, PassRefPtr&lt;SerializedPlatformRepresentation&gt; cueData)
</ins><span class="cx">         : m_cueData(cueData)
</span><span class="cx">         , m_startTime(time)
</span><span class="cx">     {
</span><span class="lines">@@ -43,11 +43,11 @@
</span><span class="cx">     ~IncompleteMetaDataCue() { }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SerializedPlatformRepresentation&gt; cueData() const { return m_cueData; }
</span><del>-    double startTime() const { return m_startTime; }
</del><ins>+    MediaTime startTime() const { return m_startTime; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     RefPtr&lt;SerializedPlatformRepresentation&gt; m_cueData;
</span><del>-    double m_startTime;
</del><ins>+    MediaTime m_startTime;
</ins><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -63,8 +63,8 @@
</span><span class="cx">     void setInBandMetadataTrackDispatchType(const AtomicString&amp; value) { m_inBandMetadataTrackDispatchType = value; }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><del>-    void addDataCue(double start, double end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;);
-    void updatePendingCueEndTimes(double);
</del><ins>+    void addDataCue(const MediaTime&amp; start, const MediaTime&amp; end, PassRefPtr&lt;SerializedPlatformRepresentation&gt;, const String&amp;);
+    void updatePendingCueEndTimes(const MediaTime&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void flushPartialCues();
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     Kind m_kind;
</span><span class="cx">     AtomicString m_id;
</span><span class="cx">     AtomicString m_inBandMetadataTrackDispatchType;
</span><del>-    double m_currentCueStartTime;
</del><ins>+    MediaTime m_currentCueStartTime;
</ins><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="cx">     Vector&lt;IncompleteMetaDataCue*&gt; m_incompleteCues;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandTextTrackPrivateAVFcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;ISOVTTCue.h&quot;
</span><span class="cx"> #include &quot;InbandTextTrackPrivateClient.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><ins>+#include &quot;MediaTimeAVFoundation.h&quot;
</ins><span class="cx"> #include &quot;SoftLinking.h&quot;
</span><span class="cx"> #include &lt;CoreMedia/CoreMedia.h&gt;
</span><span class="cx"> #include &lt;runtime/ArrayBuffer.h&gt;
</span><span class="lines">@@ -46,10 +47,6 @@
</span><span class="cx"> #include &lt;wtf/unicode/CharacterNames.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(WIN)
</span><del>-#include &quot;MediaTimeMac.h&quot;
-#endif
-
-#if !PLATFORM(WIN)
</del><span class="cx"> #define SOFT_LINK_AVF_FRAMEWORK(Lib) SOFT_LINK_FRAMEWORK_OPTIONAL(Lib)
</span><span class="cx"> #define SOFT_LINK_AVF_POINTER(Lib, Name, Type) SOFT_LINK_POINTER_OPTIONAL(Lib, Name, Type)
</span><span class="cx"> #else
</span><span class="lines">@@ -380,7 +377,7 @@
</span><span class="cx">         cueData.setContent(content.toString());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandTextTrackPrivateAVF::processCue(CFArrayRef attributedStrings, CFArrayRef nativeSamples, double time)
</del><ins>+void InbandTextTrackPrivateAVF::processCue(CFArrayRef attributedStrings, CFArrayRef nativeSamples, const MediaTime&amp; time)
</ins><span class="cx"> {
</span><span class="cx">     if (!client())
</span><span class="cx">         return;
</span><span class="lines">@@ -389,9 +386,9 @@
</span><span class="cx">     processNativeSamples(nativeSamples, time);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandTextTrackPrivateAVF::processAttributedStrings(CFArrayRef attributedStrings, double time)
</del><ins>+void InbandTextTrackPrivateAVF::processAttributedStrings(CFArrayRef attributedStrings, const MediaTime&amp; time)
</ins><span class="cx"> {
</span><del>-    LOG(Media, &quot;InbandTextTrackPrivateAVF::processAttributedStrings - %li attributed strings at time %.2f\n&quot;, attributedStrings ? CFArrayGetCount(attributedStrings) : 0, time);
</del><ins>+    LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue - %li cues at time %s\n&quot;, attributedStrings ? CFArrayGetCount(attributedStrings) : 0, toString(time).utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;RefPtr&lt;GenericCueData&gt;&gt; arrivingCues;
</span><span class="cx">     if (attributedStrings) {
</span><span class="lines">@@ -410,14 +407,14 @@
</span><span class="cx">             arrivingCues.append(cueData);
</span><span class="cx">             
</span><span class="cx">             cueData-&gt;setStartTime(time);
</span><del>-            cueData-&gt;setEndTime(std::numeric_limits&lt;double&gt;::infinity());
</del><ins>+            cueData-&gt;setEndTime(MediaTime::positiveInfiniteTime());
</ins><span class="cx">             
</span><span class="cx">             // AVFoundation cue &quot;position&quot; is to the center of the text so adjust relative to the edge because we will use it to
</span><span class="cx">             // set CSS &quot;left&quot;.
</span><span class="cx">             if (cueData-&gt;position() &gt;= 0 &amp;&amp; cueData-&gt;size() &gt; 0)
</span><span class="cx">                 cueData-&gt;setPosition(cueData-&gt;position() - cueData-&gt;size() / 2);
</span><span class="cx">             
</span><del>-            LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - considering cue (\&quot;%s\&quot;) for time = %.2f, position =  %.2f, line =  %.2f&quot;, this, cueData-&gt;content().utf8().data(), cueData-&gt;startTime(), cueData-&gt;position(), cueData-&gt;line());
</del><ins>+            LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - considering cue (\&quot;%s\&quot;) for time = %s, position =  %.2f, line =  %.2f&quot;, this, cueData-&gt;content().utf8().data(), toString(cueData-&gt;startTime()).utf8().data(), cueData-&gt;position(), cueData-&gt;line());
</ins><span class="cx">             
</span><span class="cx">             cueData-&gt;setStatus(GenericCueData::Partial);
</span><span class="cx">         }
</span><span class="lines">@@ -435,7 +432,7 @@
</span><span class="cx">                     if (!arrivingCue-&gt;doesExtendCueData(*cueData))
</span><span class="cx">                         nonExtensionCues.append(arrivingCue);
</span><span class="cx">                     else
</span><del>-                        LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - found an extension cue (\&quot;%s\&quot;) for time = %.2f, end = %.2f, position =  %.2f, line =  %.2f&quot;, this, arrivingCue-&gt;content().utf8().data(), arrivingCue-&gt;startTime(), arrivingCue-&gt;endTime(), arrivingCue-&gt;position(), arrivingCue-&gt;line());
</del><ins>+                        LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - found an extension cue (\&quot;%s\&quot;) for time = %.2f, end = %.2f, position =  %.2f, line =  %.2f&quot;, this, arrivingCue-&gt;content().utf8().data(), arrivingCue-&gt;startTime().toDouble(), arrivingCue-&gt;endTime().toDouble(), arrivingCue-&gt;position(), arrivingCue-&gt;line());
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 bool currentCueIsExtended = (arrivingCues.size() != nonExtensionCues.size());
</span><span class="lines">@@ -449,16 +446,16 @@
</span><span class="cx">                     cueData-&gt;setEndTime(m_currentCueEndTime);
</span><span class="cx">                     cueData-&gt;setStatus(GenericCueData::Complete);
</span><span class="cx"> 
</span><del>-                    LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - updating cue \&quot;%s\&quot;: start=%.2f, end=%.2f&quot;, this, cueData-&gt;content().utf8().data(), cueData-&gt;startTime(), m_currentCueEndTime);
</del><ins>+                    LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - updating cue \&quot;%s\&quot;: start=%.2f, end=%.2f&quot;, this, cueData-&gt;content().utf8().data(), cueData-&gt;startTime().toDouble(), m_currentCueEndTime.toDouble());
</ins><span class="cx">                     client()-&gt;updateGenericCue(this, cueData.get());
</span><span class="cx">                 } else {
</span><span class="cx">                     // We have to assume that the implicit duration is invalid for cues delivered during a seek because the AVF decode pipeline may not
</span><span class="cx">                     // see every cue, so DO NOT update cue duration while seeking.
</span><del>-                    LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - ignoring cue delivered during seek: start=%.2f, end=%.2f, content=\&quot;%s\&quot;&quot;, this, cueData-&gt;startTime(), m_currentCueEndTime, cueData-&gt;content().utf8().data());
</del><ins>+                    LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - ignoring cue delivered during seek: start=%s, end=%s, content=\&quot;%s\&quot;&quot;, this, toString(cueData-&gt;startTime()).utf8().data(), toString(m_currentCueEndTime).utf8().data(), cueData-&gt;content().utf8().data());
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">         } else
</span><del>-            LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue negative length cue(s) ignored: start=%.2f, end=%.2f\n&quot;, m_currentCueStartTime, m_currentCueEndTime);
</del><ins>+            LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue negative length cue(s) ignored: start=%s, end=%s\n&quot;,  toString(m_currentCueStartTime).utf8().data(), toString(m_currentCueEndTime).utf8().data());
</ins><span class="cx"> 
</span><span class="cx">         removeCompletedCues();
</span><span class="cx">     }
</span><span class="lines">@@ -472,7 +469,7 @@
</span><span class="cx"> 
</span><span class="cx">         m_cues.append(cueData);
</span><span class="cx">         
</span><del>-        LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - adding cue \&quot;%s\&quot; for time = %.2f, end = %.2f, position =  %.2f, line =  %.2f&quot;, this, cueData-&gt;content().utf8().data(), cueData-&gt;startTime(), cueData-&gt;endTime(), cueData-&gt;position(), cueData-&gt;line());
</del><ins>+        LOG(Media, &quot;InbandTextTrackPrivateAVF::processCue(%p) - adding cue \&quot;%s\&quot; for time = %.2f, end = %.2f, position =  %.2f, line =  %.2f&quot;, this, cueData-&gt;content().utf8().data(), cueData-&gt;startTime().toDouble(), cueData-&gt;endTime().toDouble(), cueData-&gt;position(), cueData-&gt;line());
</ins><span class="cx"> 
</span><span class="cx">         client()-&gt;addGenericCue(this, cueData.release());
</span><span class="cx">     }
</span><span class="lines">@@ -503,7 +500,7 @@
</span><span class="cx">             if (m_cues[currentCue]-&gt;status() != GenericCueData::Complete)
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><del>-            LOG(Media, &quot;InbandTextTrackPrivateAVF::removeCompletedCues(%p) - removing cue \&quot;%s\&quot;: start=%.2f, end=%.2f&quot;, this, m_cues[currentCue]-&gt;content().utf8().data(), m_cues[currentCue]-&gt;startTime(), m_cues[currentCue]-&gt;endTime());
</del><ins>+            LOG(Media, &quot;InbandTextTrackPrivateAVF::removeCompletedCues(%p) - removing cue \&quot;%s\&quot;: start=%.2f, end=%.2f&quot;, this, m_cues[currentCue]-&gt;content().utf8().data(), m_cues[currentCue]-&gt;startTime().toDouble(), m_cues[currentCue]-&gt;endTime().toDouble());
</ins><span class="cx"> 
</span><span class="cx">             m_cues.remove(currentCue);
</span><span class="cx">         }
</span><span class="lines">@@ -512,14 +509,14 @@
</span><span class="cx">     if (m_cues.isEmpty())
</span><span class="cx">         m_pendingCueStatus = None;
</span><span class="cx"> 
</span><del>-    m_currentCueStartTime = 0;
-    m_currentCueEndTime = 0;
</del><ins>+    m_currentCueStartTime = MediaTime::zeroTime();
+    m_currentCueEndTime = MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InbandTextTrackPrivateAVF::resetCueValues()
</span><span class="cx"> {
</span><span class="cx">     if (m_currentCueEndTime &amp;&amp; m_cues.size())
</span><del>-        LOG(Media, &quot;InbandTextTrackPrivateAVF::resetCueValues flushing data for cues: start=%.2f\n&quot;, m_currentCueStartTime);
</del><ins>+        LOG(Media, &quot;InbandTextTrackPrivateAVF::resetCueValues flushing data for cues: start=%s\n&quot;, toString(m_currentCueStartTime).utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (client()) {
</span><span class="cx">         for (size_t i = 0; i &lt; m_cues.size(); i++)
</span><span class="lines">@@ -528,8 +525,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_cues.resize(0);
</span><span class="cx">     m_pendingCueStatus = None;
</span><del>-    m_currentCueStartTime = 0;
-    m_currentCueEndTime = 0;
</del><ins>+    m_currentCueStartTime = MediaTime::zeroTime();
+    m_currentCueEndTime = MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InbandTextTrackPrivateAVF::setMode(InbandTextTrackPrivate::Mode newMode)
</span><span class="lines">@@ -546,7 +543,7 @@
</span><span class="cx">     m_owner-&gt;trackModeChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InbandTextTrackPrivateAVF::processNativeSamples(CFArrayRef nativeSamples, double presentationTime)
</del><ins>+void InbandTextTrackPrivateAVF::processNativeSamples(CFArrayRef nativeSamples, const MediaTime&amp; presentationTime)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx">     UNUSED_PARAM(nativeSamples);
</span><span class="lines">@@ -560,7 +557,7 @@
</span><span class="cx">     if (!count)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;InbandTextTrackPrivateAVF::processNativeSamples - %li sample buffers at time %.2f\n&quot;, count, presentationTime);
</del><ins>+    LOG(Media, &quot;InbandTextTrackPrivateAVF::processNativeSamples - %li sample buffers at time %.2f\n&quot;, count, presentationTime.toDouble());
</ins><span class="cx"> 
</span><span class="cx">     for (CFIndex i = 0; i &lt; count; i++) {
</span><span class="cx"> 
</span><span class="lines">@@ -597,11 +594,7 @@
</span><span class="cx">         LOG(Media, &quot;InbandTextTrackPrivateAVF::processNativeSamples(%p) - chunk type = '%s', size = %zu&quot;, this, type.utf8().data(), boxLength);
</span><span class="cx"> 
</span><span class="cx">         if (type == ISOWebVTTCue::boxType()) {
</span><del>-#if !PLATFORM(WIN)
-            ISOWebVTTCue cueData = ISOWebVTTCue(MediaTime::createWithDouble(presentationTime), toMediaTime(timingInfo.duration), buffer.get());
-#else
-            ISOWebVTTCue cueData = ISOWebVTTCue(MediaTime::createWithDouble(presentationTime), MediaTime::createWithDouble(CMTimeGetSeconds(timingInfo.duration)), buffer.get());
-#endif
</del><ins>+            ISOWebVTTCue cueData = ISOWebVTTCue(presentationTime, toMediaTime(timingInfo.duration), buffer.get());
</ins><span class="cx">             LOG(Media, &quot;    sample presentation time = %.2f, duration = %.2f&quot;, cueData.presentationTime().toDouble(), cueData.duration().toDouble());
</span><span class="cx">             LOG(Media, &quot;    id = \&quot;%s\&quot;, settings = \&quot;%s\&quot;, cue text = \&quot;%s\&quot;&quot;, cueData.id().utf8().data(), cueData.settings().utf8().data(), cueData.cueText().utf8().data());
</span><span class="cx">             LOG(Media, &quot;    sourceID = \&quot;%s\&quot;, originalStartTime = \&quot;%s\&quot;&quot;, cueData.sourceID().utf8().data(), cueData.originalStartTime().utf8().data());
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationInbandTextTrackPrivateAVFh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">     bool hasBeenReported() const { return m_hasBeenReported; }
</span><span class="cx">     void setHasBeenReported(bool reported) { m_hasBeenReported = reported; }
</span><span class="cx"> 
</span><del>-    virtual void processCue(CFArrayRef attributedStrings, CFArrayRef nativeSamples, double);
</del><ins>+    virtual void processCue(CFArrayRef attributedStrings, CFArrayRef nativeSamples, const MediaTime&amp;);
</ins><span class="cx">     virtual void resetCueValues();
</span><span class="cx"> 
</span><span class="cx">     void beginSeeking();
</span><span class="lines">@@ -68,19 +68,19 @@
</span><span class="cx">         InBand
</span><span class="cx">     };
</span><span class="cx">     virtual Category textTrackCategory() const = 0;
</span><del>-
-    virtual double startTimeVariance() const override { return 0.25; }
-
</del><ins>+    
+    virtual MediaTime startTimeVariance() const override { return MediaTime(1, 4); }
+    
</ins><span class="cx"> protected:
</span><span class="cx">     InbandTextTrackPrivateAVF(AVFInbandTrackParent*, CueFormat);
</span><span class="cx"> 
</span><span class="cx">     void processCueAttributes(CFAttributedStringRef, GenericCueData&amp;);
</span><del>-    void processAttributedStrings(CFArrayRef, double);
-    void processNativeSamples(CFArrayRef, double);
</del><ins>+    void processAttributedStrings(CFArrayRef, const MediaTime&amp;);
+    void processNativeSamples(CFArrayRef, const MediaTime&amp;);
</ins><span class="cx">     void removeCompletedCues();
</span><span class="cx"> 
</span><del>-    double m_currentCueStartTime;
-    double m_currentCueEndTime;
</del><ins>+    MediaTime m_currentCueStartTime;
+    MediaTime m_currentCueEndTime;
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;RefPtr&lt;GenericCueData&gt;&gt; m_cues;
</span><span class="cx">     AVFInbandTrackParent* m_owner;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -58,12 +58,9 @@
</span><span class="cx">     , m_networkState(MediaPlayer::Empty)
</span><span class="cx">     , m_readyState(MediaPlayer::HaveNothing)
</span><span class="cx">     , m_preload(MediaPlayer::Auto)
</span><del>-    , m_cachedMaxTimeLoaded(0)
-    , m_cachedMaxTimeSeekable(0)
-    , m_cachedMinTimeSeekable(0)
-    , m_cachedDuration(MediaPlayer::invalidTime())
-    , m_reportedDuration(MediaPlayer::invalidTime())
-    , m_maxTimeLoadedAtLastDidLoadingProgress(MediaPlayer::invalidTime())
</del><ins>+    , m_cachedDuration(MediaTime::invalidTime())
+    , m_reportedDuration(MediaTime::invalidTime())
+    , m_maxTimeLoadedAtLastDidLoadingProgress(MediaTime::invalidTime())
</ins><span class="cx">     , m_requestedRate(1)
</span><span class="cx">     , m_delayCallbacks(0)
</span><span class="cx">     , m_delayCharacteristicsChangedNotification(0)
</span><span class="lines">@@ -245,37 +242,29 @@
</span><span class="cx">     platformPause();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundation::duration() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundation::durationMediaTime() const
</ins><span class="cx"> {
</span><del>-    return narrowPrecisionToFloat(durationDouble());
-}
-
-double MediaPlayerPrivateAVFoundation::durationDouble() const
-{
-    if (m_cachedDuration != MediaPlayer::invalidTime())
</del><ins>+    if (m_cachedDuration.isValid())
</ins><span class="cx">         return m_cachedDuration;
</span><span class="cx"> 
</span><del>-    double duration = platformDuration();
-    if (!duration || duration == MediaPlayer::invalidTime())
-        return 0;
</del><ins>+    MediaTime duration = platformDuration();
+    if (!duration || duration.isInvalid())
+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     m_cachedDuration = duration;
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::duration(%p) - caching %g&quot;, this, m_cachedDuration);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::duration(%p) - caching %s&quot;, this, toString(m_cachedDuration).utf8().data());
</ins><span class="cx">     return m_cachedDuration;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundation::currentTime() const
</del><ins>+void MediaPlayerPrivateAVFoundation::seek(const MediaTime&amp; time)
</ins><span class="cx"> {
</span><del>-    return narrowPrecisionToFloat(currentTimeDouble());
</del><ins>+    seekWithTolerance(time, MediaTime::zeroTime(), MediaTime::zeroTime());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundation::seek(float time)
</del><ins>+void MediaPlayerPrivateAVFoundation::seekWithTolerance(const MediaTime&amp; mediaTime, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx"> {
</span><del>-    seekWithTolerance(time, 0, 0);
-}
</del><ins>+    MediaTime time = mediaTime;
</ins><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundation::seekWithTolerance(double time, double negativeTolerance, double positiveTolerance)
-{
</del><span class="cx">     if (m_seeking) {
</span><span class="cx">         LOG(Media, &quot;MediaPlayerPrivateAVFoundation::seekWithTolerance(%p) - save pending seek&quot;, this);
</span><span class="cx">         m_pendingSeek = [this, time, negativeTolerance, positiveTolerance]() {
</span><span class="lines">@@ -288,16 +277,16 @@
</span><span class="cx">     if (!metaDataAvailable())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (time &gt; durationDouble())
-        time = durationDouble();
</del><ins>+    if (time &gt; durationMediaTime())
+        time = durationMediaTime();
</ins><span class="cx"> 
</span><del>-    if (currentTimeDouble() == time)
</del><ins>+    if (currentMediaTime() == time)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (currentTextTrack())
</span><span class="cx">         currentTextTrack()-&gt;beginSeeking();
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::seek(%p) - seeking to %f&quot;, this, time);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::seek(%p) - seeking to %s&quot;, this, toString(time).utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     seekToTime(time, negativeTolerance, positiveTolerance);
</span><span class="cx"> }
</span><span class="lines">@@ -407,34 +396,34 @@
</span><span class="cx">     return PlatformTimeRanges::create(*m_cachedLoadedTimeRanges);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     if (!m_cachedMaxTimeSeekable)
</span><span class="cx">         m_cachedMaxTimeSeekable = platformMaxTimeSeekable();
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::maxTimeSeekable(%p) - returning %f&quot;, this, m_cachedMaxTimeSeekable);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::maxTimeSeekable(%p) - returning %s&quot;, this, toString(m_cachedMaxTimeSeekable).utf8().data());
</ins><span class="cx">     return m_cachedMaxTimeSeekable;   
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundation::minTimeSeekable() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundation::minMediaTimeSeekable() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     if (!m_cachedMinTimeSeekable)
</span><span class="cx">         m_cachedMinTimeSeekable = platformMinTimeSeekable();
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::minTimeSeekable(%p) - returning %f&quot;, this, m_cachedMinTimeSeekable);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::minTimeSeekable(%p) - returning %s&quot;, this, toString(m_cachedMinTimeSeekable).utf8().data());
</ins><span class="cx">     return m_cachedMinTimeSeekable;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundation::maxTimeLoaded() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundation::maxTimeLoaded() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     if (!m_cachedMaxTimeLoaded)
</span><span class="cx">         m_cachedMaxTimeLoaded = platformMaxTimeLoaded();
</span><span class="lines">@@ -446,7 +435,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!duration() || !totalBytes())
</span><span class="cx">         return false;
</span><del>-    float currentMaxTimeLoaded = maxTimeLoaded();
</del><ins>+    MediaTime currentMaxTimeLoaded = maxTimeLoaded();
</ins><span class="cx">     bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress;
</span><span class="cx">     m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded;
</span><span class="cx"> 
</span><span class="lines">@@ -545,7 +534,7 @@
</span><span class="cx">                 FALLTHROUGH;
</span><span class="cx"> 
</span><span class="cx">             case MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty:
</span><del>-                if (maxTimeLoaded() &gt; currentTime())
</del><ins>+                if (maxTimeLoaded() &gt; currentMediaTime())
</ins><span class="cx">                     m_readyState = MediaPlayer::HaveFutureData;
</span><span class="cx">                 else
</span><span class="cx">                     m_readyState = MediaPlayer::HaveCurrentData;
</span><span class="lines">@@ -557,7 +546,7 @@
</span><span class="cx">             else if (itemStatus == MediaPlayerAVPlayerItemStatusFailed)
</span><span class="cx">                 m_networkState = MediaPlayer::DecodeError;
</span><span class="cx">             else if (itemStatus != MediaPlayerAVPlayerItemStatusPlaybackBufferFull &amp;&amp; itemStatus &gt;= MediaPlayerAVPlayerItemStatusReadyToPlay)
</span><del>-                m_networkState = (maxTimeLoaded() == duration()) ? MediaPlayer::Loaded : MediaPlayer::Loading;
</del><ins>+                m_networkState = (maxTimeLoaded() == durationMediaTime()) ? MediaPlayer::Loaded : MediaPlayer::Loading;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -640,19 +629,19 @@
</span><span class="cx"> void MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged()
</span><span class="cx"> {
</span><span class="cx">     m_cachedLoadedTimeRanges = nullptr;
</span><del>-    m_cachedMaxTimeLoaded = 0;
</del><ins>+    m_cachedMaxTimeLoaded = MediaTime::zeroTime();
</ins><span class="cx">     invalidateCachedDuration();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged()
</span><span class="cx"> {
</span><del>-    m_cachedMaxTimeSeekable = 0;
-    m_cachedMinTimeSeekable = 0;
</del><ins>+    m_cachedMaxTimeSeekable = MediaTime::zeroTime();
+    m_cachedMinTimeSeekable = MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundation::timeChanged(double time)
</del><ins>+void MediaPlayerPrivateAVFoundation::timeChanged(const MediaTime&amp; time)
</ins><span class="cx"> {
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::timeChanged(%p) - time = %f&quot;, this, time);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::timeChanged(%p) - time = %s&quot;, this, toString(time).utf8().data());
</ins><span class="cx">     UNUSED_PARAM(time);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -683,8 +672,8 @@
</span><span class="cx"> {
</span><span class="cx">     // Hang onto the current time and use it as duration from now on since we are definitely at
</span><span class="cx">     // the end of the movie. Do this because the initial duration is sometimes an estimate.
</span><del>-    double now = currentTimeDouble();
-    if (now &gt; 0)
</del><ins>+    MediaTime now = currentMediaTime();
+    if (now &gt; MediaTime::zeroTime())
</ins><span class="cx">         m_cachedDuration = now;
</span><span class="cx"> 
</span><span class="cx">     updateStates();
</span><span class="lines">@@ -695,13 +684,13 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateAVFoundation::invalidateCachedDuration(%p)&quot;, this);
</span><span class="cx">     
</span><del>-    m_cachedDuration = MediaPlayer::invalidTime();
</del><ins>+    m_cachedDuration = MediaTime::invalidTime();
</ins><span class="cx"> 
</span><span class="cx">     // For some media files, reported duration is estimated and updated as media is loaded
</span><span class="cx">     // so report duration changed when the estimate is upated.
</span><del>-    float duration = this-&gt;duration();
</del><ins>+    MediaTime duration = this-&gt;durationMediaTime();
</ins><span class="cx">     if (duration != m_reportedDuration) {
</span><del>-        if (m_reportedDuration != MediaPlayer::invalidTime())
</del><ins>+        if (m_reportedDuration.isValid())
</ins><span class="cx">             m_player-&gt;durationChanged();
</span><span class="cx">         m_reportedDuration = duration;
</span><span class="cx">     }
</span><span class="lines">@@ -772,7 +761,7 @@
</span><span class="cx">     m_mainThreadCallPending = false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification(Notification::Type type, double time)
</del><ins>+void MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification(Notification::Type type, const MediaTime&amp; time)
</ins><span class="cx"> {
</span><span class="cx">     scheduleMainThreadNotification(Notification(type, time));
</span><span class="cx"> }
</span><span class="lines">@@ -959,11 +948,11 @@
</span><span class="cx"> 
</span><span class="cx"> size_t MediaPlayerPrivateAVFoundation::extraMemoryCost() const
</span><span class="cx"> {
</span><del>-    double duration = durationDouble();
</del><ins>+    MediaTime duration = this-&gt;durationMediaTime();
</ins><span class="cx">     if (!duration)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    unsigned long long extra = totalBytes() * buffered()-&gt;totalDuration().toDouble() / duration;
</del><ins>+    unsigned long long extra = totalBytes() * buffered()-&gt;totalDuration().toDouble() / duration.toDouble();
</ins><span class="cx">     return static_cast&lt;unsigned&gt;(extra);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     virtual void rateChanged();
</span><span class="cx">     virtual void loadedTimeRangesChanged();
</span><span class="cx">     virtual void seekableTimeRangesChanged();
</span><del>-    virtual void timeChanged(double);
</del><ins>+    virtual void timeChanged(const MediaTime&amp;);
</ins><span class="cx">     virtual void seekCompleted(bool);
</span><span class="cx">     virtual void didEnd();
</span><span class="cx">     virtual void contentsNeedsDisplay() { }
</span><span class="lines">@@ -96,12 +96,11 @@
</span><span class="cx">         
</span><span class="cx">         Notification()
</span><span class="cx">             : m_type(None)
</span><del>-            , m_time(0)
</del><span class="cx">             , m_finished(false)
</span><span class="cx">         {
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        Notification(Type type, double time)
</del><ins>+        Notification(Type type, const MediaTime&amp; time)
</ins><span class="cx">             : m_type(type)
</span><span class="cx">             , m_time(time)
</span><span class="cx">             , m_finished(false)
</span><span class="lines">@@ -110,14 +109,12 @@
</span><span class="cx">         
</span><span class="cx">         Notification(Type type, bool finished)
</span><span class="cx">             : m_type(type)
</span><del>-            , m_time(0)
</del><span class="cx">             , m_finished(finished)
</span><span class="cx">         {
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         Notification(std::function&lt;void ()&gt; function)
</span><span class="cx">             : m_type(FunctionType)
</span><del>-            , m_time(0)
</del><span class="cx">             , m_finished(false)
</span><span class="cx">             , m_function(function)
</span><span class="cx">         {
</span><span class="lines">@@ -125,19 +122,19 @@
</span><span class="cx">         
</span><span class="cx">         Type type() { return m_type; }
</span><span class="cx">         bool isValid() { return m_type != None; }
</span><del>-        double time() { return m_time; }
</del><ins>+        MediaTime time() { return m_time; }
</ins><span class="cx">         bool finished() { return m_finished; }
</span><span class="cx">         std::function&lt;void ()&gt;&amp; function() { return m_function; }
</span><span class="cx">         
</span><span class="cx">     private:
</span><span class="cx">         Type m_type;
</span><del>-        double m_time;
</del><ins>+        MediaTime m_time;
</ins><span class="cx">         bool m_finished;
</span><span class="cx">         std::function&lt;void ()&gt; m_function;
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     void scheduleMainThreadNotification(Notification);
</span><del>-    void scheduleMainThreadNotification(Notification::Type, double time = 0);
</del><ins>+    void scheduleMainThreadNotification(Notification::Type, const MediaTime&amp; = MediaTime::zeroTime());
</ins><span class="cx">     void scheduleMainThreadNotification(Notification::Type, bool completed);
</span><span class="cx">     void dispatchNotification();
</span><span class="cx">     void clearMainThreadPendingFlag();
</span><span class="lines">@@ -169,12 +166,10 @@
</span><span class="cx">     virtual bool hasVideo() const override { return m_cachedHasVideo; }
</span><span class="cx">     virtual bool hasAudio() const override { return m_cachedHasAudio; }
</span><span class="cx">     virtual void setVisible(bool) override;
</span><del>-    virtual float duration() const override;
-    virtual double durationDouble() const override;
-    virtual float currentTime() const override;
-    virtual double currentTimeDouble() const = 0;
-    virtual void seek(float) override;
-    virtual void seekWithTolerance(double, double, double) override;
</del><ins>+    virtual MediaTime durationMediaTime() const override;
+    virtual MediaTime currentMediaTime() const = 0;
+    virtual void seek(const MediaTime&amp;) override;
+    virtual void seekWithTolerance(const MediaTime&amp;, const MediaTime&amp;, const MediaTime&amp;) override;
</ins><span class="cx">     virtual bool seeking() const override;
</span><span class="cx">     virtual void setRate(float) override;
</span><span class="cx">     virtual bool paused() const override;
</span><span class="lines">@@ -183,8 +178,8 @@
</span><span class="cx">     virtual void setClosedCaptionsVisible(bool) = 0;
</span><span class="cx">     virtual MediaPlayer::NetworkState networkState() const override { return m_networkState; }
</span><span class="cx">     virtual MediaPlayer::ReadyState readyState() const override { return m_readyState; }
</span><del>-    virtual double maxTimeSeekableDouble() const override;
-    virtual double minTimeSeekable() const override;
</del><ins>+    virtual MediaTime maxMediaTimeSeekable() const override;
+    virtual MediaTime minMediaTimeSeekable() const override;
</ins><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const override;
</span><span class="cx">     virtual bool didLoadingProgress() const override;
</span><span class="cx">     virtual void setSize(const IntSize&amp;) override;
</span><span class="lines">@@ -200,7 +195,6 @@
</span><span class="cx"> 
</span><span class="cx">     virtual MediaPlayer::MovieLoadType movieLoadType() const;
</span><span class="cx">     virtual void prepareForRendering();
</span><del>-    virtual float mediaTimeForTimeValue(float) const = 0;
</del><span class="cx"> 
</span><span class="cx">     virtual bool supportsFullscreen() const;
</span><span class="cx">     virtual bool supportsScanning() const { return true; }
</span><span class="lines">@@ -239,13 +233,13 @@
</span><span class="cx">     virtual void checkPlayability() = 0;
</span><span class="cx">     virtual void updateRate() = 0;
</span><span class="cx">     virtual float rate() const = 0;
</span><del>-    virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance) = 0;
</del><ins>+    virtual void seekToTime(const MediaTime&amp;, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance) = 0;
</ins><span class="cx">     virtual unsigned long long totalBytes() const = 0;
</span><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; platformBufferedTimeRanges() const = 0;
</span><del>-    virtual double platformMaxTimeSeekable() const = 0;
-    virtual double platformMinTimeSeekable() const = 0;
-    virtual float platformMaxTimeLoaded() const = 0;
-    virtual double platformDuration() const = 0;
</del><ins>+    virtual MediaTime platformMaxTimeSeekable() const = 0;
+    virtual MediaTime platformMinTimeSeekable() const = 0;
+    virtual MediaTime platformMaxTimeLoaded() const = 0;
+    virtual MediaTime platformDuration() const = 0;
</ins><span class="cx"> 
</span><span class="cx">     virtual void beginLoadingMetadata() = 0;
</span><span class="cx">     virtual void tracksChanged() = 0;
</span><span class="lines">@@ -283,7 +277,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool metaDataAvailable() const { return m_readyState &gt;= MediaPlayer::HaveMetadata; }
</span><span class="cx">     float requestedRate() const { return m_requestedRate; }
</span><del>-    float maxTimeLoaded() const;
</del><ins>+    MediaTime maxTimeLoaded() const;
</ins><span class="cx">     bool isReadyForVideoSetup() const;
</span><span class="cx">     virtual void setUpVideoRendering();
</span><span class="cx">     virtual void tearDownVideoRendering();
</span><span class="lines">@@ -331,12 +325,12 @@
</span><span class="cx">     MediaPlayer::Preload m_preload;
</span><span class="cx"> 
</span><span class="cx">     IntSize m_cachedNaturalSize;
</span><del>-    mutable float m_cachedMaxTimeLoaded;
-    mutable double m_cachedMaxTimeSeekable;
-    mutable double m_cachedMinTimeSeekable;
-    mutable double m_cachedDuration;
-    float m_reportedDuration;
-    mutable float m_maxTimeLoadedAtLastDidLoadingProgress;
</del><ins>+    mutable MediaTime m_cachedMaxTimeLoaded;
+    mutable MediaTime m_cachedMaxTimeSeekable;
+    mutable MediaTime m_cachedMinTimeSeekable;
+    mutable MediaTime m_cachedDuration;
+    MediaTime m_reportedDuration;
+    mutable MediaTime m_maxTimeLoadedAtLastDidLoadingProgress;
</ins><span class="cx">     float m_requestedRate;
</span><span class="cx">     mutable int m_delayCallbacks;
</span><span class="cx">     int m_delayCharacteristicsChangedNotification;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaTimeAVFoundationcppfromrev173318trunkSourceWebCoreplatformgraphicsavfoundationMediaTimeAVFoundationcpp"></a>
<div class="copfile"><h4>Copied: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.cpp (from rev 173318, trunk/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.cpp) (0 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.cpp                                (rev 0)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    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 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 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. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaTimeAVFoundation.h&quot;
+
+#if USE(AVFOUNDATION)
+
+namespace WebCore {
+
+static bool CMTimeHasFlags(const CMTime&amp; cmTime, uint32_t flags)
+{
+    return (cmTime.flags &amp; flags) == flags;
+}
+
+MediaTime toMediaTime(const CMTime&amp; cmTime)
+{
+    uint32_t flags = 0;
+    if (CMTimeHasFlags(cmTime, kCMTimeFlags_Valid))
+        flags |= MediaTime::Valid;
+    if (CMTimeHasFlags(cmTime, kCMTimeFlags_Valid | kCMTimeFlags_HasBeenRounded))
+        flags |= MediaTime::HasBeenRounded;
+    if (CMTimeHasFlags(cmTime, kCMTimeFlags_Valid | kCMTimeFlags_PositiveInfinity))
+        flags |= MediaTime::PositiveInfinite;
+    if (CMTimeHasFlags(cmTime, kCMTimeFlags_Valid | kCMTimeFlags_NegativeInfinity))
+        flags |= MediaTime::NegativeInfinite;
+    if (CMTimeHasFlags(cmTime, kCMTimeFlags_Valid | kCMTimeFlags_Indefinite))
+        flags |= MediaTime::Indefinite;
+
+    return MediaTime(cmTime.value, cmTime.timescale, flags);
+}
+
+CMTime toCMTime(const MediaTime&amp; mediaTime)
+{
+    CMTime time = {mediaTime.timeValue(), mediaTime.timeScale(), 0, 0};
+
+    if (mediaTime.isValid())
+        time.flags |= kCMTimeFlags_Valid;
+    if (mediaTime.hasBeenRounded())
+        time.flags |= kCMTimeFlags_HasBeenRounded;
+    if (mediaTime.isPositiveInfinite())
+        time.flags |= kCMTimeFlags_PositiveInfinity;
+    if (mediaTime.isNegativeInfinite())
+        time.flags |= kCMTimeFlags_NegativeInfinity;
+
+    return time;
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationMediaTimeAVFoundationhfromrev173318trunkSourceWebCoreplatformgraphicsavfoundationMediaTimeAVFoundationh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.h (from rev 173318, trunk/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.h) (0 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.h                                (rev 0)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/MediaTimeAVFoundation.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    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 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 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. 
+ */
+
+#ifndef MediaTimeAVFoundation_h
+#define MediaTimeAVFoundation_h
+
+#if USE(AVFOUNDATION)
+
+#include &lt;CoreMedia/CMTime.h&gt;
+#include &lt;wtf/MediaTime.h&gt;
+
+namespace WebCore {
+
+CMTime toCMTime(const MediaTime&amp;);
+MediaTime toMediaTime(const CMTime&amp;);
+
+}
+
+#endif
+
+#endif
</ins></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #else
</span><span class="cx"> #include &quot;InbandTextTrackPrivateLegacyAVCF.h&quot;
</span><span class="cx"> #endif
</span><ins>+#include &quot;MediaTimeAVFoundation.h&quot;
</ins><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;PlatformCALayerWin.h&quot;
</span><span class="lines">@@ -106,7 +107,7 @@
</span><span class="cx"> 
</span><span class="cx">     void createImageGenerator();
</span><span class="cx">     void destroyImageGenerator();
</span><del>-    RetainPtr&lt;CGImageRef&gt; createImageForTimeInRect(float, const IntRect&amp;);
</del><ins>+    RetainPtr&lt;CGImageRef&gt; createImageForTimeInRect(const MediaTime&amp;, const IntRect&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void createAssetForURL(const String&amp; url, bool inheritURI);
</span><span class="cx">     void setAsset(AVCFURLAssetRef);
</span><span class="lines">@@ -117,7 +118,7 @@
</span><span class="cx">     void checkPlayability();
</span><span class="cx">     void beginLoadingMetadata();
</span><span class="cx">     
</span><del>-    void seekToTime(double, double, double);
</del><ins>+    void seekToTime(const MediaTime&amp;, const MediaTime&amp;, const MediaTime&amp;);
</ins><span class="cx">     void updateVideoLayerGravity();
</span><span class="cx"> 
</span><span class="cx">     void setCurrentTextTrack(InbandTextTrackPrivateAVF*);
</span><span class="lines">@@ -569,10 +570,10 @@
</span><span class="cx">     setDelayCallbacks(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationCF::platformDuration() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationCF::platformDuration() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable() || !avAsset(m_avfWrapper))
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     CMTime cmDuration;
</span><span class="cx"> 
</span><span class="lines">@@ -583,28 +584,28 @@
</span><span class="cx">         cmDuration = AVCFAssetGetDuration(avAsset(m_avfWrapper));
</span><span class="cx"> 
</span><span class="cx">     if (CMTIME_IS_NUMERIC(cmDuration))
</span><del>-        return CMTimeGetSeconds(cmDuration);
</del><ins>+        return toMediaTime(cmDuration);
</ins><span class="cx"> 
</span><span class="cx">     if (CMTIME_IS_INDEFINITE(cmDuration))
</span><del>-        return numeric_limits&lt;double&gt;::infinity();
</del><ins>+        return MediaTime::positiveInfiniteTime();
</ins><span class="cx"> 
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundationCF::platformDuration(%p) - invalid duration, returning %.0f&quot;, this, static_cast&lt;float&gt;(MediaPlayer::invalidTime()));
-    return static_cast&lt;float&gt;(MediaPlayer::invalidTime());
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundationCF::platformDuration(%p) - invalid duration, returning %s&quot;, this, toString(MediaTime::invalidTime()).utf8().data());
+    return MediaTime::invalidTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationCF::currentTimeDouble() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationCF::currentMediaTime() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable() || !avPlayerItem(m_avfWrapper))
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     CMTime itemTime = AVCFPlayerItemGetCurrentTime(avPlayerItem(m_avfWrapper));
</span><span class="cx">     if (CMTIME_IS_NUMERIC(itemTime))
</span><del>-        return std::max(CMTimeGetSeconds(itemTime), 0.0);
</del><ins>+        return max(toMediaTime(itemTime), MediaTime::zeroTime());
</ins><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundationCF::seekToTime(double time, double negativeTolerance, double positiveTolerance)
</del><ins>+void MediaPlayerPrivateAVFoundationCF::seekToTime(const MediaTime&amp; time, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_avfWrapper)
</span><span class="cx">         return;
</span><span class="lines">@@ -685,22 +686,22 @@
</span><span class="cx">         CMTime duration = CMTimeMakeFromDictionary(static_cast&lt;CFDictionaryRef&gt;(CFDictionaryGetValue(range, CMTimeRangeDurationKey())));
</span><span class="cx">         
</span><span class="cx">         if (timeRangeIsValidAndNotEmpty(start, duration)) {
</span><del>-            double rangeStart = CMTimeGetSeconds(start);
-            double rangeEnd = rangeStart + CMTimeGetSeconds(duration);
-            timeRanges-&gt;add(MediaTime::createWithDouble(rangeStart), MediaTime::createWithDouble(rangeEnd));
</del><ins>+            MediaTime rangeStart = toMediaTime(start);
+            MediaTime rangeEnd = rangeStart + toMediaTime(duration);
+            timeRanges-&gt;add(rangeStart, rangeEnd);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return timeRanges;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable() const 
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable() const 
</ins><span class="cx"> { 
</span><span class="cx">     RetainPtr&lt;CFArrayRef&gt; seekableRanges = adoptCF(AVCFPlayerItemCopySeekableTimeRanges(avPlayerItem(m_avfWrapper)));
</span><span class="cx">     if (!seekableRanges) 
</span><del>-        return 0; 
</del><ins>+        return MediaTime::zeroTime(); 
</ins><span class="cx"> 
</span><del>-    double minTimeSeekable = std::numeric_limits&lt;double&gt;::infinity(); 
</del><ins>+    MediaTime minTimeSeekable = MediaTime::positiveInfiniteTime();
</ins><span class="cx">     bool hasValidRange = false; 
</span><span class="cx">     CFIndex rangeCount = CFArrayGetCount(seekableRanges.get());
</span><span class="cx">     for (CFIndex i = 0; i &lt; rangeCount; i++) {
</span><span class="lines">@@ -711,23 +712,23 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         hasValidRange = true; 
</span><del>-        double startOfRange = CMTimeGetSeconds(start); 
</del><ins>+        MediaTime startOfRange = toMediaTime(start); 
</ins><span class="cx">         if (minTimeSeekable &gt; startOfRange) 
</span><span class="cx">             minTimeSeekable = startOfRange; 
</span><span class="cx">     } 
</span><del>-    return hasValidRange ? minTimeSeekable : 0; 
</del><ins>+    return hasValidRange ? minTimeSeekable : MediaTime::zeroTime(); 
</ins><span class="cx"> } 
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable() const
</ins><span class="cx"> {
</span><span class="cx">     if (!avPlayerItem(m_avfWrapper))
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CFArrayRef&gt; seekableRanges = adoptCF(AVCFPlayerItemCopySeekableTimeRanges(avPlayerItem(m_avfWrapper)));
</span><span class="cx">     if (!seekableRanges)
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><del>-    double maxTimeSeekable = 0;
</del><ins>+    MediaTime maxTimeSeekable;
</ins><span class="cx">     CFIndex rangeCount = CFArrayGetCount(seekableRanges.get());
</span><span class="cx">     for (CFIndex i = 0; i &lt; rangeCount; i++) {
</span><span class="cx">         CFDictionaryRef range = static_cast&lt;CFDictionaryRef&gt;(CFArrayGetValueAtIndex(seekableRanges.get(), i));
</span><span class="lines">@@ -736,7 +737,7 @@
</span><span class="cx">         if (!timeRangeIsValidAndNotEmpty(start, duration))
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        double endOfRange = CMTimeGetSeconds(CMTimeAdd(start, duration));
</del><ins>+        MediaTime endOfRange = toMediaTime(CMTimeAdd(start, duration));
</ins><span class="cx">         if (maxTimeSeekable &lt; endOfRange)
</span><span class="cx">             maxTimeSeekable = endOfRange;
</span><span class="cx">     }
</span><span class="lines">@@ -744,16 +745,16 @@
</span><span class="cx">     return maxTimeSeekable;   
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded() const
</ins><span class="cx"> {
</span><span class="cx">     if (!avPlayerItem(m_avfWrapper))
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CFArrayRef&gt; loadedRanges = adoptCF(AVCFPlayerItemCopyLoadedTimeRanges(avPlayerItem(m_avfWrapper)));
</span><span class="cx">     if (!loadedRanges)
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><del>-    float maxTimeLoaded = 0;
</del><ins>+    MediaTime maxTimeLoaded;
</ins><span class="cx">     CFIndex rangeCount = CFArrayGetCount(loadedRanges.get());
</span><span class="cx">     for (CFIndex i = 0; i &lt; rangeCount; i++) {
</span><span class="cx">         CFDictionaryRef range = static_cast&lt;CFDictionaryRef&gt;(CFArrayGetValueAtIndex(loadedRanges.get(), i));
</span><span class="lines">@@ -762,7 +763,7 @@
</span><span class="cx">         if (!timeRangeIsValidAndNotEmpty(start, duration))
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        float endOfRange = narrowPrecisionToFloat(CMTimeGetSeconds(CMTimeAdd(start, duration)));
</del><ins>+        MediaTime endOfRange = toMediaTime(CMTimeAdd(start, duration));
</ins><span class="cx">         if (maxTimeLoaded &lt; endOfRange)
</span><span class="cx">             maxTimeLoaded = endOfRange;
</span><span class="cx">     }
</span><span class="lines">@@ -847,7 +848,7 @@
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateAVFoundationCF::paint(%p)&quot;, this);
</span><span class="cx"> 
</span><span class="cx">     setDelayCallbacks(true);
</span><del>-    RetainPtr&lt;CGImageRef&gt; image = m_avfWrapper-&gt;createImageForTimeInRect(currentTime(), rect);
</del><ins>+    RetainPtr&lt;CGImageRef&gt; image = m_avfWrapper-&gt;createImageForTimeInRect(currentMediaTime(), rect);
</ins><span class="cx">     if (image) {
</span><span class="cx">         context-&gt;save();
</span><span class="cx">         context-&gt;translate(rect.x(), rect.y() + rect.height());
</span><span class="lines">@@ -930,7 +931,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue(float timeValue) const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue(const MediaTime&amp; timeValue) const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><span class="cx">         return timeValue;
</span><span class="lines">@@ -1682,12 +1683,12 @@
</span><span class="cx">     self-&gt;m_owner-&gt;scheduleMainThreadNotification(MediaPlayerPrivateAVFoundation::Notification::SeekCompleted, static_cast&lt;bool&gt;(finished));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void AVFWrapper::seekToTime(double time, double negativeTolerance, double positiveTolerance)
</del><ins>+void AVFWrapper::seekToTime(const MediaTime&amp; time, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(avPlayerItem());
</span><del>-    CMTime cmTime = CMTimeMakeWithSeconds(time, 600);
-    CMTime cmBefore = CMTimeMakeWithSeconds(negativeTolerance, 600);
-    CMTime cmAfter = CMTimeMakeWithSeconds(positiveTolerance, 600);
</del><ins>+    CMTime cmTime = toCMTime(time);
+    CMTime cmBefore = toCMTime(negativeTolerance);
+    CMTime cmAfter = toCMTime(positiveTolerance);
</ins><span class="cx">     AVCFPlayerItemSeekToTimeWithToleranceAndCompletionCallback(avPlayerItem(), cmTime, cmBefore, cmAfter, &amp;seekCompletedCallback, callbackContext());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1695,10 +1696,10 @@
</span><span class="cx"> struct LegibleOutputData {
</span><span class="cx">     RetainPtr&lt;CFArrayRef&gt; m_attributedStrings;
</span><span class="cx">     RetainPtr&lt;CFArrayRef&gt; m_samples;
</span><del>-    double m_time;
</del><ins>+    MediaTime m_time;
</ins><span class="cx">     void* m_context;
</span><span class="cx"> 
</span><del>-    LegibleOutputData(CFArrayRef strings, CFArrayRef samples, double time, void* context)
</del><ins>+    LegibleOutputData(CFArrayRef strings, CFArrayRef samples, const MediaTime &amp;time, void* context)
</ins><span class="cx">         : m_attributedStrings(strings), m_samples(samples), m_time(time), m_context(context)
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -1741,7 +1742,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(legibleOutput == self-&gt;m_legibleOutput);
</span><span class="cx"> 
</span><del>-    auto legibleOutputData = std::make_unique&lt;LegibleOutputData&gt;(attributedStrings, nativeSampleBuffers, CMTimeGetSeconds(itemTime), context);
</del><ins>+    auto legibleOutputData = std::make_unique&lt;LegibleOutputData&gt;(attributedStrings, nativeSampleBuffers, toMediaTime(itemTime), context);
</ins><span class="cx"> 
</span><span class="cx">     dispatch_async_f(dispatch_get_main_queue(), legibleOutputData.release(), processCue);
</span><span class="cx"> }
</span><span class="lines">@@ -1938,7 +1939,7 @@
</span><span class="cx">     m_imageGenerator = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RetainPtr&lt;CGImageRef&gt; AVFWrapper::createImageForTimeInRect(float time, const IntRect&amp; rect)
</del><ins>+RetainPtr&lt;CGImageRef&gt; AVFWrapper::createImageForTimeInRect(const MediaTime&amp; time, const IntRect&amp; rect)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_imageGenerator)
</span><span class="cx">         return 0;
</span><span class="lines">@@ -1948,7 +1949,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     AVCFAssetImageGeneratorSetMaximumSize(m_imageGenerator.get(), CGSize(rect.size()));
</span><del>-    RetainPtr&lt;CGImageRef&gt; rawimage = adoptCF(AVCFAssetImageGeneratorCopyCGImageAtTime(m_imageGenerator.get(), CMTimeMakeWithSeconds(time, 600), 0, 0));
</del><ins>+    RetainPtr&lt;CGImageRef&gt; rawimage = adoptCF(AVCFAssetImageGeneratorCopyCGImageAtTime(m_imageGenerator.get(), toCMTime(time), 0, 0));
</ins><span class="cx">     RetainPtr&lt;CGImageRef&gt; image = adoptCF(CGImageCreateCopyWithColorSpace(rawimage.get(), adoptCF(CGColorSpaceCreateDeviceRGB()).get()));
</span><span class="cx"> 
</span><span class="cx"> #if !LOG_DISABLED
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -73,14 +73,14 @@
</span><span class="cx">     virtual void platformSetVisible(bool);
</span><span class="cx">     virtual void platformPlay();
</span><span class="cx">     virtual void platformPause();
</span><del>-    virtual double currentTimeDouble() const override;
</del><ins>+    virtual MediaTime currentMediaTime() const override;
</ins><span class="cx">     virtual void setVolume(float);
</span><span class="cx">     virtual void setClosedCaptionsVisible(bool);
</span><span class="cx">     virtual void paint(GraphicsContext*, const IntRect&amp;);
</span><span class="cx">     virtual void paintCurrentFrameInContext(GraphicsContext*, const IntRect&amp;);
</span><span class="cx">     virtual PlatformLayer* platformLayer() const;
</span><span class="cx">     virtual bool supportsAcceleratedRendering() const { return true; }
</span><del>-    virtual float mediaTimeForTimeValue(float) const;
</del><ins>+    virtual MediaTime mediaTimeForTimeValue(const MediaTime&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     virtual void createAVPlayer();
</span><span class="cx">     virtual void createAVPlayerItem();
</span><span class="lines">@@ -91,13 +91,13 @@
</span><span class="cx">     virtual void checkPlayability();
</span><span class="cx">     virtual void updateRate();
</span><span class="cx">     virtual float rate() const;
</span><del>-    virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance);
</del><ins>+    virtual void seekToTime(const MediaTime&amp;, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance);
</ins><span class="cx">     virtual unsigned long long totalBytes() const;
</span><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; platformBufferedTimeRanges() const;
</span><del>-    virtual double platformMinTimeSeekable() const;
-    virtual double platformMaxTimeSeekable() const;
-    virtual double platformDuration() const;
-    virtual float platformMaxTimeLoaded() const;
</del><ins>+    virtual MediaTime platformMinTimeSeekable() const;
+    virtual MediaTime platformMaxTimeSeekable() const;
+    virtual MediaTime platformDuration() const;
+    virtual MediaTime platformMaxTimeLoaded() const;
</ins><span class="cx">     virtual void beginLoadingMetadata();
</span><span class="cx">     virtual void sizeChanged();
</span><span class="cx">     virtual bool requiresImmediateCompositing() const override;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
</span><span class="cx">     RetainPtr&lt;AVPlayerItem&gt; playerItem() const { return m_avPlayerItem; }
</span><del>-    void processCue(NSArray *, NSArray *, double);
</del><ins>+    void processCue(NSArray *, NSArray *, const MediaTime&amp;);
</ins><span class="cx">     void flushCues();
</span><span class="cx"> #endif
</span><span class="cx">     
</span><span class="lines">@@ -103,9 +103,9 @@
</span><span class="cx">     void tracksDidChange(RetainPtr&lt;NSArray&gt;);
</span><span class="cx">     void hasEnabledAudioDidChange(bool);
</span><span class="cx">     void presentationSizeDidChange(FloatSize);
</span><del>-    void durationDidChange(double);
</del><ins>+    void durationDidChange(const MediaTime&amp;);
</ins><span class="cx">     void rateDidChange(double);
</span><del>-    void metadataDidArrive(RetainPtr&lt;NSArray&gt;, double);
</del><ins>+    void metadataDidArrive(RetainPtr&lt;NSArray&gt;, const MediaTime&amp;);
</ins><span class="cx">     void firstFrameAvailableDidChange(bool);
</span><span class="cx">     void trackEnabledDidChange(bool);
</span><span class="cx">     void canPlayFastReverseDidChange(bool);
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">     virtual void platformSetVisible(bool);
</span><span class="cx">     virtual void platformPlay();
</span><span class="cx">     virtual void platformPause();
</span><del>-    virtual double currentTimeDouble() const override;
</del><ins>+    virtual MediaTime currentMediaTime() const override;
</ins><span class="cx">     virtual void setVolume(float);
</span><span class="cx">     virtual void setClosedCaptionsVisible(bool);
</span><span class="cx">     virtual void paint(GraphicsContext*, const IntRect&amp;);
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     virtual bool supportsAcceleratedRendering() const { return true; }
</span><del>-    virtual float mediaTimeForTimeValue(float) const;
</del><ins>+    virtual MediaTime mediaTimeForTimeValue(const MediaTime&amp;) const;
</ins><span class="cx">     virtual double maximumDurationToCacheMediaTime() const { return 5; }
</span><span class="cx"> 
</span><span class="cx">     virtual void createAVPlayer();
</span><span class="lines">@@ -176,13 +176,13 @@
</span><span class="cx">     virtual void checkPlayability();
</span><span class="cx">     virtual void updateRate();
</span><span class="cx">     virtual float rate() const;
</span><del>-    virtual void seekToTime(double time, double negativeTolerance, double positiveTolerance);
</del><ins>+    virtual void seekToTime(const MediaTime&amp;, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance);
</ins><span class="cx">     virtual unsigned long long totalBytes() const;
</span><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; platformBufferedTimeRanges() const;
</span><del>-    virtual double platformMinTimeSeekable() const;
-    virtual double platformMaxTimeSeekable() const;
-    virtual double platformDuration() const;
-    virtual float platformMaxTimeLoaded() const;
</del><ins>+    virtual MediaTime platformMinTimeSeekable() const;
+    virtual MediaTime platformMaxTimeSeekable() const;
+    virtual MediaTime platformDuration() const;
+    virtual MediaTime platformMaxTimeLoaded() const;
</ins><span class="cx">     virtual void beginLoadingMetadata();
</span><span class="cx">     virtual void sizeChanged();
</span><span class="cx"> 
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">     RetainPtr&lt;NSArray&gt; m_cachedTracks;
</span><span class="cx">     RetainPtr&lt;NSArray&gt; m_currentMetaData;
</span><span class="cx">     FloatSize m_cachedPresentationSize;
</span><del>-    double m_cachedDuration;
</del><ins>+    MediaTime m_cachedDuration;
</ins><span class="cx">     double m_cachedRate;
</span><span class="cx">     mutable long long m_cachedTotalBytes;
</span><span class="cx">     unsigned m_pendingStatusChanges;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> #import &quot;OutOfBandTextTrackPrivateAVF.h&quot;
</span><span class="cx"> #import &quot;URL.h&quot;
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><del>-#import &quot;MediaTimeMac.h&quot;
</del><ins>+#import &quot;MediaTimeAVFoundation.h&quot;
</ins><span class="cx"> #import &quot;PlatformTimeRanges.h&quot;
</span><span class="cx"> #import &quot;SecurityOrigin.h&quot;
</span><span class="cx"> #import &quot;SerializedPlatformRepresentationMac.h&quot;
</span><span class="lines">@@ -399,7 +399,6 @@
</span><span class="cx">     , m_loaderDelegate(adoptNS([[WebCoreAVFLoaderDelegate alloc] initWithCallback:this]))
</span><span class="cx"> #endif
</span><span class="cx">     , m_currentTextTrack(0)
</span><del>-    , m_cachedDuration(MediaPlayer::invalidTime())
</del><span class="cx">     , m_cachedRate(0)
</span><span class="cx">     , m_cachedTotalBytes(0)
</span><span class="cx">     , m_pendingStatusChanges(0)
</span><span class="lines">@@ -494,7 +493,7 @@
</span><span class="cx">     m_cachedLoadedRanges = nullptr;
</span><span class="cx">     m_cachedHasEnabledAudio = false;
</span><span class="cx">     m_cachedPresentationSize = FloatSize();
</span><del>-    m_cachedDuration = 0;
</del><ins>+    m_cachedDuration = MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     for (AVPlayerItemTrack *track in m_cachedTracks.get())
</span><span class="cx">         [track removeObserver:m_objcObserver.get() forKeyPath:@&quot;enabled&quot;];
</span><span class="lines">@@ -1130,12 +1129,12 @@
</span><span class="cx">     setDelayCallbacks(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationObjC::platformDuration() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationObjC::platformDuration() const
</ins><span class="cx"> {
</span><span class="cx">     // Do not ask the asset for duration before it has been loaded or it will fetch the
</span><span class="cx">     // answer synchronously.
</span><span class="cx">     if (!m_avAsset || assetStatus() &lt; MediaPlayerAVAssetStatusLoaded)
</span><del>-        return MediaPlayer::invalidTime();
</del><ins>+        return MediaTime::invalidTime();
</ins><span class="cx">     
</span><span class="cx">     CMTime cmDuration;
</span><span class="cx">     
</span><span class="lines">@@ -1143,32 +1142,31 @@
</span><span class="cx">     if (m_avPlayerItem &amp;&amp; playerItemStatus() &gt;= MediaPlayerAVPlayerItemStatusReadyToPlay)
</span><span class="cx">         cmDuration = [m_avPlayerItem.get() duration];
</span><span class="cx">     else
</span><del>-        cmDuration= [m_avAsset.get() duration];
</del><ins>+        cmDuration = [m_avAsset.get() duration];
</ins><span class="cx"> 
</span><span class="cx">     if (CMTIME_IS_NUMERIC(cmDuration))
</span><del>-        return CMTimeGetSeconds(cmDuration);
</del><ins>+        return toMediaTime(cmDuration);
</ins><span class="cx"> 
</span><del>-    if (CMTIME_IS_INDEFINITE(cmDuration)) {
-        return std::numeric_limits&lt;double&gt;::infinity();
-    }
</del><ins>+    if (CMTIME_IS_INDEFINITE(cmDuration))
+        return MediaTime::positiveInfiniteTime();
</ins><span class="cx"> 
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundationObjC::platformDuration(%p) - invalid duration, returning %.0f&quot;, this, MediaPlayer::invalidTime());
-    return MediaPlayer::invalidTime();
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundationObjC::platformDuration(%p) - invalid duration, returning %.0f&quot;, this, toString(MediaTime::invalidTime()).utf8().data());
+    return MediaTime::invalidTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationObjC::currentTimeDouble() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationObjC::currentMediaTime() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable() || !m_avPlayerItem)
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     CMTime itemTime = [m_avPlayerItem.get() currentTime];
</span><span class="cx">     if (CMTIME_IS_NUMERIC(itemTime))
</span><del>-        return std::max(CMTimeGetSeconds(itemTime), 0.0);
</del><ins>+        return std::max(toMediaTime(itemTime), MediaTime::zeroTime());
</ins><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundationObjC::seekToTime(double time, double negativeTolerance, double positiveTolerance)
</del><ins>+void MediaPlayerPrivateAVFoundationObjC::seekToTime(const MediaTime&amp; time, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx"> {
</span><span class="cx">     // setCurrentTime generates several event callbacks, update afterwards.
</span><span class="cx">     setDelayCallbacks(true);
</span><span class="lines">@@ -1176,9 +1174,9 @@
</span><span class="cx">     if (m_metadataTrack)
</span><span class="cx">         m_metadataTrack-&gt;flushPartialCues();
</span><span class="cx"> 
</span><del>-    CMTime cmTime = CMTimeMakeWithSeconds(time, 600);
-    CMTime cmBefore = CMTimeMakeWithSeconds(negativeTolerance, 600);
-    CMTime cmAfter = CMTimeMakeWithSeconds(positiveTolerance, 600);
</del><ins>+    CMTime cmTime = toCMTime(time);
+    CMTime cmBefore = toCMTime(negativeTolerance);
+    CMTime cmAfter = toCMTime(positiveTolerance);
</ins><span class="cx"> 
</span><span class="cx">     auto weakThis = createWeakPtr();
</span><span class="cx"> 
</span><span class="lines">@@ -1249,12 +1247,12 @@
</span><span class="cx">     return timeRanges;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_cachedSeekableRanges || ![m_cachedSeekableRanges count])
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><del>-    double minTimeSeekable = std::numeric_limits&lt;double&gt;::infinity();
</del><ins>+    MediaTime minTimeSeekable = MediaTime::positiveInfiniteTime();
</ins><span class="cx">     bool hasValidRange = false;
</span><span class="cx">     for (NSValue *thisRangeValue in m_cachedSeekableRanges.get()) {
</span><span class="cx">         CMTimeRange timeRange = [thisRangeValue CMTimeRangeValue];
</span><span class="lines">@@ -1262,32 +1260,32 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         hasValidRange = true;
</span><del>-        double startOfRange = CMTimeGetSeconds(timeRange.start);
</del><ins>+        MediaTime startOfRange = toMediaTime(timeRange.start);
</ins><span class="cx">         if (minTimeSeekable &gt; startOfRange)
</span><span class="cx">             minTimeSeekable = startOfRange;
</span><span class="cx">     }
</span><del>-    return hasValidRange ? minTimeSeekable : 0;
</del><ins>+    return hasValidRange ? minTimeSeekable : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_cachedSeekableRanges)
</span><span class="cx">         m_cachedSeekableRanges = [m_avPlayerItem seekableTimeRanges];
</span><span class="cx"> 
</span><del>-    double maxTimeSeekable = 0;
</del><ins>+    MediaTime maxTimeSeekable;
</ins><span class="cx">     for (NSValue *thisRangeValue in m_cachedSeekableRanges.get()) {
</span><span class="cx">         CMTimeRange timeRange = [thisRangeValue CMTimeRangeValue];
</span><span class="cx">         if (!CMTIMERANGE_IS_VALID(timeRange) || CMTIMERANGE_IS_EMPTY(timeRange))
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        double endOfRange = CMTimeGetSeconds(CMTimeRangeGetEnd(timeRange));
</del><ins>+        MediaTime endOfRange = toMediaTime(CMTimeRangeGetEnd(timeRange));
</ins><span class="cx">         if (maxTimeSeekable &lt; endOfRange)
</span><span class="cx">             maxTimeSeekable = endOfRange;
</span><span class="cx">     }
</span><span class="cx">     return maxTimeSeekable;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded() const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded() const
</ins><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &lt;= 1080
</span><span class="cx">     // AVFoundation on Mountain Lion will occasionally not send a KVO notification
</span><span class="lines">@@ -1298,15 +1296,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (!m_cachedLoadedRanges)
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><del>-    float maxTimeLoaded = 0;
</del><ins>+    MediaTime maxTimeLoaded;
</ins><span class="cx">     for (NSValue *thisRangeValue in m_cachedLoadedRanges.get()) {
</span><span class="cx">         CMTimeRange timeRange = [thisRangeValue CMTimeRangeValue];
</span><span class="cx">         if (!CMTIMERANGE_IS_VALID(timeRange) || CMTIMERANGE_IS_EMPTY(timeRange))
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        float endOfRange = narrowPrecisionToFloat(CMTimeGetSeconds(CMTimeRangeGetEnd(timeRange)));
</del><ins>+        MediaTime endOfRange = toMediaTime(CMTimeRangeGetEnd(timeRange));
</ins><span class="cx">         if (maxTimeLoaded &lt; endOfRange)
</span><span class="cx">             maxTimeLoaded = endOfRange;
</span><span class="cx">     }
</span><span class="lines">@@ -1594,7 +1592,7 @@
</span><span class="cx">     return AVFoundationLibrary() &amp;&amp; CoreMediaLibrary();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue(float timeValue) const
</del><ins>+MediaTime MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue(const MediaTime&amp; timeValue) const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><span class="cx">         return timeValue;
</span><span class="lines">@@ -2261,7 +2259,7 @@
</span><span class="cx">     player()-&gt;addTextTrack(m_metadataTrack);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundationObjC::processCue(NSArray *attributedStrings, NSArray *nativeSamples, double time)
</del><ins>+void MediaPlayerPrivateAVFoundationObjC::processCue(NSArray *attributedStrings, NSArray *nativeSamples, const MediaTime&amp; time)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_currentTextTrack)
</span><span class="cx">         return;
</span><span class="lines">@@ -2538,11 +2536,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundationObjC::metadataDidArrive(RetainPtr&lt;NSArray&gt; metadata, double mediaTime)
</del><ins>+void MediaPlayerPrivateAVFoundationObjC::metadataDidArrive(RetainPtr&lt;NSArray&gt; metadata, const MediaTime&amp; mediaTime)
</ins><span class="cx"> {
</span><span class="cx">     m_currentMetaData = metadata &amp;&amp; ![metadata isKindOfClass:[NSNull class]] ? metadata : nil;
</span><span class="cx"> 
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundationObjC::metadataDidArrive(%p) - adding %i cues at time %.2f&quot;, this, m_currentMetaData ? static_cast&lt;int&gt;([m_currentMetaData.get() count]) : 0, mediaTime);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundationObjC::metadataDidArrive(%p) - adding %i cues at time %s&quot;, this, m_currentMetaData ? static_cast&lt;int&gt;([m_currentMetaData.get() count]) : 0, toString(mediaTime).utf8().data());
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="cx">     if (seeking())
</span><span class="lines">@@ -2557,19 +2555,19 @@
</span><span class="cx">         processMetadataTrack();
</span><span class="cx"> 
</span><span class="cx">     // Set the duration of all incomplete cues before adding new ones.
</span><del>-    double earliesStartTime = std::numeric_limits&lt;double&gt;::infinity();
</del><ins>+    MediaTime earliestStartTime = MediaTime::positiveInfiniteTime();
</ins><span class="cx">     for (AVMetadataItemType *item in m_currentMetaData.get()) {
</span><del>-        double start = CMTimeGetSeconds(item.time);
-        if (start &lt; earliesStartTime)
-            earliesStartTime = start;
</del><ins>+        MediaTime start = toMediaTime(item.time);
+        if (start &lt; earliestStartTime)
+            earliestStartTime = start;
</ins><span class="cx">     }
</span><del>-    m_metadataTrack-&gt;updatePendingCueEndTimes(earliesStartTime);
</del><ins>+    m_metadataTrack-&gt;updatePendingCueEndTimes(earliestStartTime);
</ins><span class="cx"> 
</span><span class="cx">     for (AVMetadataItemType *item in m_currentMetaData.get()) {
</span><del>-        double start = CMTimeGetSeconds(item.time);
-        double end = std::numeric_limits&lt;double&gt;::infinity();
</del><ins>+        MediaTime start = toMediaTime(item.time);
+        MediaTime end = MediaTime::positiveInfiniteTime();
</ins><span class="cx">         if (CMTIME_IS_VALID(item.duration))
</span><del>-            end = start + CMTimeGetSeconds(item.duration);
</del><ins>+            end = start + toMediaTime(item.duration);
</ins><span class="cx"> 
</span><span class="cx">         AtomicString type = nullAtom;
</span><span class="cx">         if (item.keySpace)
</span><span class="lines">@@ -2611,7 +2609,7 @@
</span><span class="cx">     updateStates();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundationObjC::durationDidChange(double duration)
</del><ins>+void MediaPlayerPrivateAVFoundationObjC::durationDidChange(const MediaTime&amp; duration)
</ins><span class="cx"> {
</span><span class="cx">     m_cachedDuration = duration;
</span><span class="cx"> 
</span><span class="lines">@@ -2789,12 +2787,12 @@
</span><span class="cx">         else if ([keyPath isEqualToString:@&quot;presentationSize&quot;])
</span><span class="cx">             function = WTF::bind(&amp;MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange, m_callback, FloatSize([newValue sizeValue]));
</span><span class="cx">         else if ([keyPath isEqualToString:@&quot;duration&quot;])
</span><del>-            function = WTF::bind(&amp;MediaPlayerPrivateAVFoundationObjC::durationDidChange, m_callback, CMTimeGetSeconds([newValue CMTimeValue]));
</del><ins>+            function = WTF::bind(&amp;MediaPlayerPrivateAVFoundationObjC::durationDidChange, m_callback, toMediaTime([newValue CMTimeValue]));
</ins><span class="cx">         else if ([keyPath isEqualToString:@&quot;timedMetadata&quot;] &amp;&amp; newValue) {
</span><del>-            double now = 0;
</del><ins>+            MediaTime now;
</ins><span class="cx">             CMTime itemTime = [(AVPlayerItemType *)object currentTime];
</span><span class="cx">             if (CMTIME_IS_NUMERIC(itemTime))
</span><del>-                now = std::max(narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)), 0.0f);
</del><ins>+                now = std::max(toMediaTime(itemTime), MediaTime::zeroTime());
</ins><span class="cx">             function = WTF::bind(&amp;MediaPlayerPrivateAVFoundationObjC::metadataDidArrive, m_callback, RetainPtr&lt;NSArray&gt;(newValue), now);
</span><span class="cx">         } else if ([keyPath isEqualToString:@&quot;canPlayFastReverse&quot;])
</span><span class="cx">             function = WTF::bind(&amp;MediaPlayerPrivateAVFoundationObjC::canPlayFastReverseDidChange, m_callback, [newValue boolValue]);
</span><span class="lines">@@ -2841,7 +2839,7 @@
</span><span class="cx">         MediaPlayerPrivateAVFoundationObjC* callback = strongSelf-&gt;m_callback;
</span><span class="cx">         if (!callback)
</span><span class="cx">             return;
</span><del>-        callback-&gt;processCue(strongStrings.get(), strongSamples.get(), CMTimeGetSeconds(itemTime));
</del><ins>+        callback-&gt;processCue(strongStrings.get(), strongSamples.get(), toMediaTime(itemTime));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaSourceAVFObjCh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -119,18 +119,18 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void setVisible(bool) override;
</span><span class="cx"> 
</span><del>-    virtual double durationDouble() const override;
-    virtual double currentTimeDouble() const override;
-    virtual double startTimeDouble() const override;
-    virtual double initialTime() const override;
</del><ins>+    virtual MediaTime durationMediaTime() const override;
+    virtual MediaTime currentMediaTime() const override;
+    virtual MediaTime startTime() const override;
+    virtual MediaTime initialTime() const override;
</ins><span class="cx"> 
</span><del>-    virtual void seekWithTolerance(double time, double negativeThreshold, double positiveThreshold) override;
</del><ins>+    virtual void seekWithTolerance(const MediaTime&amp;, const MediaTime&amp; negativeThreshold, const MediaTime&amp; positiveThreshold) override;
</ins><span class="cx">     virtual bool seeking() const override;
</span><span class="cx">     virtual void setRateDouble(double) override;
</span><span class="cx"> 
</span><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; seekable() const override;
</span><del>-    virtual double maxTimeSeekableDouble() const override;
-    virtual double minTimeSeekable() const override;
</del><ins>+    virtual MediaTime maxMediaTimeSeekable() const override;
+    virtual MediaTime minMediaTimeSeekable() const override;
</ins><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const override;
</span><span class="cx"> 
</span><span class="cx">     virtual bool didLoadingProgress() const override;
</span><span class="lines">@@ -159,10 +159,8 @@
</span><span class="cx">     virtual unsigned long totalVideoFrames() override;
</span><span class="cx">     virtual unsigned long droppedVideoFrames() override;
</span><span class="cx">     virtual unsigned long corruptedVideoFrames() override;
</span><del>-    virtual double totalFrameDelay() override;
</del><ins>+    virtual MediaTime totalFrameDelay() override;
</ins><span class="cx"> 
</span><del>-    MediaTime currentMediaTime() const;
-
</del><span class="cx">     void ensureLayer();
</span><span class="cx">     void destroyLayer();
</span><span class="cx">     bool shouldBePlaying() const;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaSourceAVFObjCmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><span class="cx"> #import &quot;MediaSourcePrivateAVFObjC.h&quot;
</span><span class="cx"> #import &quot;MediaSourcePrivateClient.h&quot;
</span><del>-#import &quot;MediaTimeMac.h&quot;
</del><ins>+#import &quot;MediaTimeAVFoundation.h&quot;
</ins><span class="cx"> #import &quot;PlatformClockCM.h&quot;
</span><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><span class="cx"> #import &quot;WebCoreSystemInterface.h&quot;
</span><span class="lines">@@ -377,9 +377,9 @@
</span><span class="cx">     // No-op.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::durationDouble() const
</del><ins>+MediaTime MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime() const
</ins><span class="cx"> {
</span><del>-    return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;duration().toDouble() : 0;
</del><ins>+    return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;duration() : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaTime MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime() const
</span><span class="lines">@@ -392,27 +392,22 @@
</span><span class="cx">     return synchronizerTime;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble() const
</del><ins>+MediaTime MediaPlayerPrivateMediaSourceAVFObjC::startTime() const
</ins><span class="cx"> {
</span><del>-    return currentMediaTime().toDouble();
</del><ins>+    return MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble() const
</del><ins>+MediaTime MediaPlayerPrivateMediaSourceAVFObjC::initialTime() const
</ins><span class="cx"> {
</span><del>-    return 0;
</del><ins>+    return MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::initialTime() const
</del><ins>+void MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance(const MediaTime&amp; time, const MediaTime&amp; negativeThreshold, const MediaTime&amp; positiveThreshold)
</ins><span class="cx"> {
</span><del>-    return 0;
-}
-
-void MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance(double time, double negativeThreshold, double positiveThreshold)
-{
</del><span class="cx">     LOG(MediaSource, &quot;MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance(%p) - time(%s), negativeThreshold(%s), positiveThreshold(%s)&quot;, this, toString(time).utf8().data(), toString(negativeThreshold).utf8().data(), toString(positiveThreshold).utf8().data());
</span><span class="cx">     m_seeking = true;
</span><span class="cx">     auto weakThis = createWeakPtr();
</span><del>-    m_pendingSeek = std::make_unique&lt;PendingSeek&gt;(MediaTime::createWithDouble(time), MediaTime::createWithDouble(negativeThreshold), MediaTime::createWithDouble(positiveThreshold));
</del><ins>+    m_pendingSeek = std::make_unique&lt;PendingSeek&gt;(time, negativeThreshold, positiveThreshold);
</ins><span class="cx"> 
</span><span class="cx">     if (m_seekTimer.isActive())
</span><span class="cx">         m_seekTimer.stop();
</span><span class="lines">@@ -435,7 +430,7 @@
</span><span class="cx">     if (!m_mediaSourcePrivate)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (pendingSeek-&gt;negativeThreshold == MediaTime::zeroTime() &amp;&amp; pendingSeek-&gt;positiveThreshold == MediaTime::zeroTime())
</del><ins>+    if (!pendingSeek-&gt;negativeThreshold &amp;&amp; !pendingSeek-&gt;positiveThreshold)
</ins><span class="cx">         m_lastSeekTime = pendingSeek-&gt;targetTime;
</span><span class="cx">     else
</span><span class="cx">         m_lastSeekTime = m_mediaSourcePrivate-&gt;fastSeekTimeForMediaTime(pendingSeek-&gt;targetTime, pendingSeek-&gt;positiveThreshold, pendingSeek-&gt;negativeThreshold);
</span><span class="lines">@@ -490,17 +485,17 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;PlatformTimeRanges&gt; MediaPlayerPrivateMediaSourceAVFObjC::seekable() const
</span><span class="cx"> {
</span><del>-    return PlatformTimeRanges::create(MediaTime::createWithDouble(minTimeSeekable()), MediaTime::createWithDouble(maxTimeSeekableDouble()));
</del><ins>+    return PlatformTimeRanges::create(minMediaTimeSeekable(), maxMediaTimeSeekable());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble() const
</del><ins>+MediaTime MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable() const
</ins><span class="cx"> {
</span><del>-    return durationDouble();
</del><ins>+    return durationMediaTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable() const
</del><ins>+MediaTime MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable() const
</ins><span class="cx"> {
</span><del>-    return startTimeDouble();
</del><ins>+    return startTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;PlatformTimeRanges&gt; MediaPlayerPrivateMediaSourceAVFObjC::buffered() const
</span><span class="lines">@@ -590,9 +585,9 @@
</span><span class="cx">     return [[m_sampleBufferDisplayLayer videoPerformanceMetrics] numberOfCorruptedVideoFrames];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay()
</del><ins>+MediaTime MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay()
</ins><span class="cx"> {
</span><del>-    return [[m_sampleBufferDisplayLayer videoPerformanceMetrics] totalFrameDelay];
</del><ins>+    return MediaTime::createWithDouble([[m_sampleBufferDisplayLayer videoPerformanceMetrics] totalFrameDelay]);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #pragma mark -
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaSourcePrivateAVFObjCmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> 
</span><span class="cx"> MediaTime MediaSourcePrivateAVFObjC::duration()
</span><span class="cx"> {
</span><del>-    return MediaTime::createWithDouble(m_client-&gt;duration());
</del><ins>+    return m_client-&gt;duration();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;PlatformTimeRanges&gt; MediaSourcePrivateAVFObjC::buffered()
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcOutOfBandTextTrackPrivateAVFh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">         return adoptRef(new OutOfBandTextTrackPrivateAVF(player, selection));
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    virtual void processCue(CFArrayRef, CFArrayRef, double) override { }
</del><ins>+    virtual void processCue(CFArrayRef, CFArrayRef, const MediaTime&amp;) override { }
</ins><span class="cx">     virtual void resetCueValues() override { }
</span><span class="cx">     
</span><span class="cx">     virtual Category textTrackCategory() const override { return OutOfBand; }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> #import &quot;MediaPlayerPrivateMediaSourceAVFObjC.h&quot;
</span><span class="cx"> #import &quot;MediaSample.h&quot;
</span><span class="cx"> #import &quot;MediaSourcePrivateAVFObjC.h&quot;
</span><del>-#import &quot;MediaTimeMac.h&quot;
</del><ins>+#import &quot;MediaTimeAVFoundation.h&quot;
</ins><span class="cx"> #import &quot;NotImplemented.h&quot;
</span><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><span class="cx"> #import &quot;SourceBufferPrivateClient.h&quot;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsgstreamerInbandMetadataTextTrackPrivateGStreamerh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     virtual AtomicString inBandMetadataTrackDispatchType() const override { return m_inBandMetadataTrackDispatchType; }
</span><span class="cx">     void setInBandMetadataTrackDispatchType(const AtomicString&amp; value) { m_inBandMetadataTrackDispatchType = value; }
</span><span class="cx"> 
</span><del>-    void addDataCue(double start, double end, const void* data, unsigned length)
</del><ins>+    void addDataCue(const MediaTime&amp; start, const MediaTime&amp; end, const void* data, unsigned length)
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(cueFormat() == Data);
</span><span class="cx">         client()-&gt;addDataCue(this, start, end, data, length);
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include &lt;gst/pbutils/missing-plugins.h&gt;
</span><span class="cx"> #include &lt;limits&gt;
</span><span class="cx"> #include &lt;wtf/HexNumber.h&gt;
</span><ins>+#include &lt;wtf/MediaTime.h&gt;
</ins><span class="cx"> #include &lt;wtf/gobject/GUniquePtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -1091,7 +1092,7 @@
</span><span class="cx">         gsize size;
</span><span class="cx">         const void* bytes = g_bytes_get_data(data.get(), &amp;size);
</span><span class="cx"> 
</span><del>-        track-&gt;addDataCue(currentTimeDouble(), currentTimeDouble(), bytes, size);
</del><ins>+        track-&gt;addDataCue(MediaTime::createWithDouble(currentTimeDouble()), MediaTime::createWithDouble(currentTimeDouble()), bytes, size);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -1124,9 +1125,9 @@
</span><span class="cx">     gint64 start = -1, stop = -1;
</span><span class="cx">     gst_toc_entry_get_start_stop_times(entry, &amp;start, &amp;stop);
</span><span class="cx">     if (start != -1)
</span><del>-        cue-&gt;setStartTime(static_cast&lt;double&gt;(start) / GST_SECOND);
</del><ins>+        cue-&gt;setStartTime(MediaTime(start, GST_SECOND));
</ins><span class="cx">     if (stop != -1)
</span><del>-        cue-&gt;setEndTime(static_cast&lt;double&gt;(stop) / GST_SECOND);
</del><ins>+        cue-&gt;setEndTime(MediaTime(stop, GST_SECOND));
</ins><span class="cx"> 
</span><span class="cx">     GstTagList* tags = gst_toc_entry_get_tags(entry);
</span><span class="cx">     if (tags) {
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsgstreamerMediaSourceGStreamercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaSourceGStreamer::durationChanged()
</span><span class="cx"> {
</span><del>-    m_client-&gt;didReceiveDuration(m_mediaSource-&gt;duration());
</del><ins>+    m_client-&gt;didReceiveDuration(m_mediaSource-&gt;duration().toDouble());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaSourceGStreamer::markEndOfStream(EndOfStreamStatus)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKith"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -104,9 +104,9 @@
</span><span class="cx">     bool paused() const;
</span><span class="cx">     bool seeking() const;
</span><span class="cx">     
</span><del>-    float duration() const;
-    float currentTime() const;
-    void seek(float time);
</del><ins>+    virtual MediaTime durationMediaTime() const override;
+    virtual MediaTime currentMediaTime() const override;
+    virtual void seek(const MediaTime&amp;) override;
</ins><span class="cx">     
</span><span class="cx">     void setRate(float);
</span><span class="cx">     void setVolume(float);
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">     MediaPlayer::ReadyState readyState() const { return m_readyState; }
</span><span class="cx">     
</span><span class="cx">     std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const;
</span><del>-    float maxTimeSeekable() const;
</del><ins>+    MediaTime maxMediaTimeSeekable() const;
</ins><span class="cx">     bool didLoadingProgress() const;
</span><span class="cx">     unsigned totalBytes() const;
</span><span class="cx">     
</span><span class="lines">@@ -163,13 +163,11 @@
</span><span class="cx">     void createQTMovieLayer();
</span><span class="cx">     void destroyQTMovieLayer();
</span><span class="cx"> 
</span><del>-    QTTime createQTTime(float time) const;
-    
</del><span class="cx">     void updateStates();
</span><span class="cx">     void doSeek();
</span><span class="cx">     void cancelSeek();
</span><span class="cx">     void seekTimerFired(Timer&lt;MediaPlayerPrivateQTKit&gt;&amp;);
</span><del>-    float maxTimeLoaded() const;
</del><ins>+    MediaTime maxMediaTimeLoaded() const;
</ins><span class="cx">     void disableUnsupportedTracks();
</span><span class="cx">     
</span><span class="cx">     void sawUnsupportedTracks();
</span><span class="lines">@@ -177,8 +175,6 @@
</span><span class="cx">     bool metaDataAvailable() const { return m_qtMovie &amp;&amp; m_readyState &gt;= MediaPlayer::HaveMetadata; }
</span><span class="cx"> 
</span><span class="cx">     bool isReadyForVideoSetup() const;
</span><del>-    
-    virtual float mediaTimeForTimeValue(float) const;
</del><span class="cx"> 
</span><span class="cx">     virtual double maximumDurationToCacheMediaTime() const { return 5; }
</span><span class="cx"> 
</span><span class="lines">@@ -194,7 +190,7 @@
</span><span class="cx">     RetainPtr&lt;QTVideoRendererWebKitOnly&gt; m_qtVideoRenderer;
</span><span class="cx">     RetainPtr&lt;WebCoreMovieObserver&gt; m_objcObserver;
</span><span class="cx">     String m_movieURL;
</span><del>-    float m_seekTo;
</del><ins>+    MediaTime m_seekTo;
</ins><span class="cx">     Timer&lt;MediaPlayerPrivateQTKit&gt; m_seekTimer;
</span><span class="cx">     MediaPlayer::NetworkState m_networkState;
</span><span class="cx">     MediaPlayer::ReadyState m_readyState;
</span><span class="lines">@@ -202,9 +198,9 @@
</span><span class="cx">     FloatSize m_scaleFactor;
</span><span class="cx">     unsigned m_enabledTrackCount;
</span><span class="cx">     unsigned m_totalTrackCount;
</span><del>-    float m_reportedDuration;
-    float m_cachedDuration;
-    float m_timeToRestore;
</del><ins>+    MediaTime m_reportedDuration;
+    MediaTime m_cachedDuration;
+    MediaTime m_timeToRestore;
</ins><span class="cx">     RetainPtr&lt;QTMovieLayer&gt; m_qtVideoLayer;
</span><span class="cx">     MediaPlayer::Preload m_preload;
</span><span class="cx">     bool m_startedPlaying;
</span><span class="lines">@@ -214,11 +210,11 @@
</span><span class="cx">     bool m_videoFrameHasDrawn;
</span><span class="cx">     bool m_isAllowedToRender;
</span><span class="cx">     bool m_privateBrowsing;
</span><del>-    mutable float m_maxTimeLoadedAtLastDidLoadingProgress;
</del><ins>+    mutable MediaTime m_maxTimeLoadedAtLastDidLoadingProgress;
</ins><span class="cx"> #if DRAW_FRAME_RATE
</span><span class="cx">     int  m_frameCountWhilePlaying;
</span><del>-    double m_timeStartedPlaying;
-    double m_timeStoppedPlaying;
</del><ins>+    MediaTime m_timeStartedPlaying;
+    MediaTime m_timeStoppedPlaying;
</ins><span class="cx"> #endif
</span><span class="cx">     mutable FloatSize m_cachedNaturalSize;
</span><span class="cx"> };
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKitmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #import &quot;URL.h&quot;
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><span class="cx"> #import &quot;MIMETypeRegistry.h&quot;
</span><ins>+#import &quot;MediaTimeQTKit.h&quot;
</ins><span class="cx"> #import &quot;PlatformLayer.h&quot;
</span><span class="cx"> #import &quot;PlatformTimeRanges.h&quot;
</span><span class="cx"> #import &quot;SecurityOrigin.h&quot;
</span><span class="lines">@@ -96,6 +97,12 @@
</span><span class="cx"> SOFT_LINK_POINTER_OPTIONAL(QTKit, QTSecurityPolicyNoLocalToRemoteSiteAttribute, NSString *)
</span><span class="cx"> SOFT_LINK_POINTER_OPTIONAL(QTKit, QTSecurityPolicyNoRemoteToLocalSiteAttribute, NSString *)
</span><span class="cx"> 
</span><ins>+@interface QTMovie(WebKitExtras)
+- (QTTime)maxTimeLoaded;
+- (NSArray *)availableRanges;
+- (NSArray *)loadedRanges;
+@end
+
</ins><span class="cx"> #define QTMovie getQTMovieClass()
</span><span class="cx"> #define QTMovieView getQTMovieViewClass()
</span><span class="cx"> #define QTMovieLayer getQTMovieLayerClass()
</span><span class="lines">@@ -191,7 +198,7 @@
</span><span class="cx"> MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit(MediaPlayer* player)
</span><span class="cx">     : m_player(player)
</span><span class="cx">     , m_objcObserver(adoptNS([[WebCoreMovieObserver alloc] initWithCallback:this]))
</span><del>-    , m_seekTo(-1)
</del><ins>+    , m_seekTo(MediaTime::invalidTime())
</ins><span class="cx">     , m_seekTimer(this, &amp;MediaPlayerPrivateQTKit::seekTimerFired)
</span><span class="cx">     , m_networkState(MediaPlayer::Empty)
</span><span class="cx">     , m_readyState(MediaPlayer::HaveNothing)
</span><span class="lines">@@ -199,9 +206,9 @@
</span><span class="cx">     , m_scaleFactor(1, 1)
</span><span class="cx">     , m_enabledTrackCount(0)
</span><span class="cx">     , m_totalTrackCount(0)
</span><del>-    , m_reportedDuration(-1)
-    , m_cachedDuration(-1)
-    , m_timeToRestore(-1)
</del><ins>+    , m_reportedDuration(MediaTime::invalidTime())
+    , m_cachedDuration(MediaTime::invalidTime())
+    , m_timeToRestore(MediaTime::invalidTime())
</ins><span class="cx">     , m_preload(MediaPlayer::Auto)
</span><span class="cx">     , m_startedPlaying(false)
</span><span class="cx">     , m_isStreaming(false)
</span><span class="lines">@@ -210,7 +217,6 @@
</span><span class="cx">     , m_videoFrameHasDrawn(false)
</span><span class="cx">     , m_isAllowedToRender(false)
</span><span class="cx">     , m_privateBrowsing(false)
</span><del>-    , m_maxTimeLoadedAtLastDidLoadingProgress(0)
</del><span class="cx"> #if DRAW_FRAME_RATE
</span><span class="cx">     , m_frameCountWhilePlaying(0)
</span><span class="cx">     , m_timeStartedPlaying(0)
</span><span class="lines">@@ -610,14 +616,6 @@
</span><span class="cx">         || m_qtVideoRenderer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-QTTime MediaPlayerPrivateQTKit::createQTTime(float time) const
-{
-    if (!metaDataAvailable())
-        return QTMakeTime(0, 600);
-    long timeScale = [[m_qtMovie.get() attributeForKey:QTMovieTimeScaleAttribute] longValue];
-    return QTMakeTime(lroundf(time * timeScale), timeScale);
-}
-
</del><span class="cx"> void MediaPlayerPrivateQTKit::resumeLoad()
</span><span class="cx"> {
</span><span class="cx">     if (!m_movieURL.isNull())
</span><span class="lines">@@ -713,31 +711,32 @@
</span><span class="cx">     [m_objcObserver.get() setDelayCallbacks:NO];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateQTKit::duration() const
</del><ins>+MediaTime MediaPlayerPrivateQTKit::durationMediaTime() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><del>-    if (m_cachedDuration != MediaPlayer::invalidTime())
</del><ins>+    if (m_cachedDuration.isValid())
</ins><span class="cx">         return m_cachedDuration;
</span><span class="cx"> 
</span><span class="cx">     QTTime time = [m_qtMovie.get() duration];
</span><span class="cx">     if (time.flags == kQTTimeIsIndefinite)
</span><del>-        return std::numeric_limits&lt;float&gt;::infinity();
-    return static_cast&lt;float&gt;(time.timeValue) / time.timeScale;
</del><ins>+        return MediaTime::positiveInfiniteTime();
+    return toMediaTime(time);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateQTKit::currentTime() const
</del><ins>+MediaTime MediaPlayerPrivateQTKit::currentMediaTime() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx">     QTTime time = [m_qtMovie.get() currentTime];
</span><del>-    return static_cast&lt;float&gt;(time.timeValue) / time.timeScale;
</del><ins>+    return toMediaTime(time);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateQTKit::seek(float time)
</del><ins>+void MediaPlayerPrivateQTKit::seek(const MediaTime&amp; inTime)
</ins><span class="cx"> {
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateQTKit::seek(%p) - time %f&quot;, this, time);
</del><ins>+    MediaTime time = inTime;
+    LOG(Media, &quot;MediaPlayerPrivateQTKit::seek(%p) - time %s&quot;, this, toString(time).utf8().data());
</ins><span class="cx">     // Nothing to do if we are already in the middle of a seek to the same time.
</span><span class="cx">     if (time == m_seekTo)
</span><span class="cx">         return;
</span><span class="lines">@@ -747,11 +746,11 @@
</span><span class="cx">     if (!metaDataAvailable())
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    if (time &gt; duration())
-        time = duration();
</del><ins>+    if (time &gt; durationMediaTime())
+        time = durationMediaTime();
</ins><span class="cx"> 
</span><span class="cx">     m_seekTo = time;
</span><del>-    if (maxTimeSeekable() &gt;= m_seekTo)
</del><ins>+    if (maxMediaTimeSeekable() &gt;= m_seekTo)
</ins><span class="cx">         doSeek();
</span><span class="cx">     else 
</span><span class="cx">         m_seekTimer.start(0, 0.5f);
</span><span class="lines">@@ -759,7 +758,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateQTKit::doSeek() 
</span><span class="cx"> {
</span><del>-    QTTime qttime = createQTTime(m_seekTo);
</del><ins>+    QTTime qttime = toQTTime(m_seekTo);
</ins><span class="cx">     // setCurrentTime generates several event callbacks, update afterwards
</span><span class="cx">     [m_objcObserver.get() setDelayCallbacks:YES];
</span><span class="cx">     float oldRate = [m_qtMovie.get() rate];
</span><span class="lines">@@ -769,8 +768,8 @@
</span><span class="cx">     [m_qtMovie.get() setCurrentTime:qttime];
</span><span class="cx"> 
</span><span class="cx">     // restore playback only if not at end, otherwise QTMovie will loop
</span><del>-    float timeAfterSeek = currentTime();
-    if (oldRate &amp;&amp; timeAfterSeek &lt; duration())
</del><ins>+    MediaTime timeAfterSeek = currentMediaTime();
+    if (oldRate &amp;&amp; timeAfterSeek &lt; durationMediaTime())
</ins><span class="cx">         [m_qtMovie.get() setRate:oldRate];
</span><span class="cx"> 
</span><span class="cx">     cancelSeek();
</span><span class="lines">@@ -780,20 +779,20 @@
</span><span class="cx"> void MediaPlayerPrivateQTKit::cancelSeek()
</span><span class="cx"> {
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateQTKit::cancelSeek(%p)&quot;, this);
</span><del>-    m_seekTo = -1;
</del><ins>+    m_seekTo = MediaTime::invalidTime();
</ins><span class="cx">     m_seekTimer.stop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateQTKit::seekTimerFired(Timer&lt;MediaPlayerPrivateQTKit&gt;&amp;)
</span><span class="cx"> {        
</span><del>-    if (!metaDataAvailable()|| !seeking() || currentTime() == m_seekTo) {
</del><ins>+    if (!metaDataAvailable() || !seeking() || currentMediaTime() == m_seekTo) {
</ins><span class="cx">         cancelSeek();
</span><span class="cx">         updateStates();
</span><span class="cx">         m_player-&gt;timeChanged(); 
</span><span class="cx">         return;
</span><span class="cx">     } 
</span><span class="cx"> 
</span><del>-    if (maxTimeSeekable() &gt;= m_seekTo)
</del><ins>+    if (maxMediaTimeSeekable() &gt;= m_seekTo)
</ins><span class="cx">         doSeek();
</span><span class="cx">     else {
</span><span class="cx">         MediaPlayer::NetworkState state = networkState();
</span><span class="lines">@@ -816,7 +815,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><span class="cx">         return false;
</span><del>-    return m_seekTo &gt;= 0;
</del><ins>+    return m_seekTo &gt;= MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IntSize MediaPlayerPrivateQTKit::naturalSize() const
</span><span class="lines">@@ -912,7 +911,7 @@
</span><span class="cx">     RetainPtr&lt;NSDictionary&gt; movieAttributes = adoptNS([[m_qtMovie.get() movieAttributes] mutableCopy]);
</span><span class="cx">     ASSERT(movieAttributes);
</span><span class="cx">     [movieAttributes.get() setValue:[NSNumber numberWithBool:preservesPitch] forKey:QTMovieRateChangesPreservePitchAttribute];
</span><del>-    m_timeToRestore = currentTime();
</del><ins>+    m_timeToRestore = currentMediaTime();
</ins><span class="cx"> 
</span><span class="cx">     createQTMovie([movieAttributes.get() valueForKey:QTMovieURLAttribute], movieAttributes.get());
</span><span class="cx"> }
</span><span class="lines">@@ -920,36 +919,60 @@
</span><span class="cx"> std::unique_ptr&lt;PlatformTimeRanges&gt; MediaPlayerPrivateQTKit::buffered() const
</span><span class="cx"> {
</span><span class="cx">     auto timeRanges = PlatformTimeRanges::create();
</span><del>-    float loaded = maxTimeLoaded();
-    if (loaded &gt; 0)
-        timeRanges-&gt;add(MediaTime::zeroTime(), MediaTime::createWithDouble(loaded));
</del><ins>+    MediaTime loaded = maxMediaTimeLoaded();
+    if (loaded &gt; MediaTime::zeroTime())
+        timeRanges-&gt;add(MediaTime::zeroTime(), loaded);
</ins><span class="cx">     return timeRanges;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateQTKit::maxTimeSeekable() const
</del><ins>+static MediaTime maxValueForTimeRanges(NSArray *ranges)
</ins><span class="cx"> {
</span><ins>+    if (!ranges)
+        return MediaTime::zeroTime();
+
+    MediaTime max;
+    for (NSValue *value in ranges) {
+        QTTimeRange range = [value QTTimeRangeValue];
+        if (!range.time.timeScale || !range.duration.timeScale)
+            continue;
+
+        MediaTime time = toMediaTime(range.time);
+        MediaTime duration = toMediaTime(range.duration);
+        if (time.isValid() &amp;&amp; duration.isValid())
+            max = std::max(max, time + duration);
+    }
+
+    return max;
+}
+
+MediaTime MediaPlayerPrivateQTKit::maxMediaTimeSeekable() const
+{
</ins><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
</del><ins>+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><span class="cx">     // infinite duration means live stream
</span><del>-    if (std::isinf(duration()))
-        return 0;
</del><ins>+    if (durationMediaTime().isPositiveInfinite())
+        return MediaTime::zeroTime();
</ins><span class="cx"> 
</span><del>-    return wkQTMovieMaxTimeSeekable(m_qtMovie.get());
</del><ins>+    NSArray* seekableRanges = [m_qtMovie availableRanges];
+
+    return maxValueForTimeRanges(seekableRanges);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateQTKit::maxTimeLoaded() const
</del><ins>+MediaTime MediaPlayerPrivateQTKit::maxMediaTimeLoaded() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable())
</span><del>-        return 0;
-    return wkQTMovieMaxTimeLoaded(m_qtMovie.get()); 
</del><ins>+        return MediaTime::zeroTime();
+    if ([m_qtMovie respondsToSelector:@selector(loadedRanges)])
+        return maxValueForTimeRanges([m_qtMovie loadedRanges]);
+    return toMediaTime([m_qtMovie maxTimeLoaded]);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MediaPlayerPrivateQTKit::didLoadingProgress() const
</span><span class="cx"> {
</span><span class="cx">     if (!duration() || !totalBytes())
</span><span class="cx">         return false;
</span><del>-    float currentMaxTimeLoaded = maxTimeLoaded();
</del><ins>+    MediaTime currentMaxTimeLoaded = maxMediaTimeLoaded();
</ins><span class="cx">     bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress;
</span><span class="cx">     m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded;
</span><span class="cx">     return didLoadingProgress;
</span><span class="lines">@@ -1049,9 +1072,9 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // If this movie is reloading and we mean to restore the current time/rate, this might be the right time to do it.
</span><del>-    if (loadState &gt;= QTMovieLoadStateLoaded &amp;&amp; oldNetworkState &lt; MediaPlayer::Loaded &amp;&amp; m_timeToRestore != MediaPlayer::invalidTime()) {
-        QTTime qttime = createQTTime(m_timeToRestore);
-        m_timeToRestore = MediaPlayer::invalidTime();
</del><ins>+    if (loadState &gt;= QTMovieLoadStateLoaded &amp;&amp; oldNetworkState &lt; MediaPlayer::Loaded &amp;&amp; m_timeToRestore.isValid()) {
+        QTTime qttime = toQTTime(m_timeToRestore);
+        m_timeToRestore = MediaTime::invalidTime();
</ins><span class="cx">             
</span><span class="cx">         // Disable event callbacks from setCurrentTime for restoring time in a recreated video
</span><span class="cx">         [m_objcObserver.get() setDelayCallbacks:YES];
</span><span class="lines">@@ -1065,7 +1088,7 @@
</span><span class="cx">     // Note: QT indicates that we are fully loaded with QTMovieLoadStateComplete.
</span><span class="cx">     // However newer versions of QT do not, so we check maxTimeLoaded against duration.
</span><span class="cx">     if (!completelyLoaded &amp;&amp; !m_isStreaming &amp;&amp; metaDataAvailable())
</span><del>-        completelyLoaded = maxTimeLoaded() == duration();
</del><ins>+        completelyLoaded = maxMediaTimeLoaded() == durationMediaTime();
</ins><span class="cx"> 
</span><span class="cx">     if (completelyLoaded) {
</span><span class="cx">         // &quot;Loaded&quot; is reserved for fully buffered movies, never the case when streaming
</span><span class="lines">@@ -1076,7 +1099,7 @@
</span><span class="cx">         m_networkState = MediaPlayer::Loading;
</span><span class="cx">     } else if (loadState &gt;= QTMovieLoadStatePlayable) {
</span><span class="cx">         // FIXME: This might not work correctly in streaming case, &lt;rdar://problem/5693967&gt;
</span><del>-        m_readyState = currentTime() &lt; maxTimeLoaded() ? MediaPlayer::HaveFutureData : MediaPlayer::HaveCurrentData;
</del><ins>+        m_readyState = currentMediaTime() &lt; maxMediaTimeLoaded() ? MediaPlayer::HaveFutureData : MediaPlayer::HaveCurrentData;
</ins><span class="cx">         m_networkState = MediaPlayer::Loading;
</span><span class="cx">     } else if (loadState &gt;= QTMovieLoadStateLoaded) {
</span><span class="cx">         m_readyState = MediaPlayer::HaveMetadata;
</span><span class="lines">@@ -1094,7 +1117,7 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        float loaded = maxTimeLoaded();
</del><ins>+        MediaTime loaded = maxMediaTimeLoaded();
</ins><span class="cx">         if (!loaded)
</span><span class="cx">             m_readyState = MediaPlayer::HaveNothing;
</span><span class="cx"> 
</span><span class="lines">@@ -1102,7 +1125,7 @@
</span><span class="cx">             m_networkState = MediaPlayer::FormatError;
</span><span class="cx">         else {
</span><span class="cx">             // FIXME: We should differentiate between load/network errors and decode errors &lt;rdar://problem/5605692&gt;
</span><del>-            if (loaded &gt; 0)
</del><ins>+            if (loaded &gt; MediaTime::zeroTime())
</ins><span class="cx">                 m_networkState = MediaPlayer::DecodeError;
</span><span class="cx">             else
</span><span class="cx">                 m_readyState = MediaPlayer::HaveNothing;
</span><span class="lines">@@ -1126,9 +1149,9 @@
</span><span class="cx">         m_player-&gt;readyStateChanged();
</span><span class="cx"> 
</span><span class="cx">     if (loadState &gt;= QTMovieLoadStateLoaded) {
</span><del>-        float dur = duration();
</del><ins>+        MediaTime dur = durationMediaTime();
</ins><span class="cx">         if (dur != m_reportedDuration) {
</span><del>-            if (m_reportedDuration != MediaPlayer::invalidTime())
</del><ins>+            if (m_reportedDuration.isValid())
</ins><span class="cx">                 m_player-&gt;durationChanged();
</span><span class="cx">             m_reportedDuration = dur;
</span><span class="cx">         }
</span><span class="lines">@@ -1179,10 +1202,10 @@
</span><span class="cx">     // It may not be possible to seek to a specific time in a streamed movie. When seeking in a 
</span><span class="cx">     // stream QuickTime sets the movie time to closest time possible and posts a timechanged 
</span><span class="cx">     // notification. Update m_seekTo so we can detect when the seek completes.
</span><del>-    if (m_seekTo != -1)
-        m_seekTo = currentTime();
</del><ins>+    if (!m_seekTo.isValid())
+        m_seekTo = currentMediaTime();
</ins><span class="cx"> 
</span><del>-    m_timeToRestore = MediaPlayer::invalidTime();
</del><ins>+    m_timeToRestore = MediaTime::invalidTime();
</ins><span class="cx">     updateStates();
</span><span class="cx">     m_player-&gt;timeChanged();
</span><span class="cx"> }
</span><span class="lines">@@ -1202,8 +1225,8 @@
</span><span class="cx">     // are at the end. Do this because QuickTime sometimes reports one time for duration and stops
</span><span class="cx">     // playback at another time, which causes problems in HTMLMediaElement. QTKit's 'ended' event 
</span><span class="cx">     // fires when playing in reverse so don't update duration when at time zero!
</span><del>-    float now = currentTime();
-    if (now &gt; 0)
</del><ins>+    MediaTime now = currentMediaTime();
+    if (now &gt; MediaTime::zeroTime())
</ins><span class="cx">         m_cachedDuration = now;
</span><span class="cx"> 
</span><span class="cx">     updateStates();
</span><span class="lines">@@ -1647,15 +1670,6 @@
</span><span class="cx">         [m_qtMovie.get() setAttribute:[NSNumber numberWithBool:NO] forKey:@&quot;QTMovieLimitReadAheadAttribute&quot;];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateQTKit::mediaTimeForTimeValue(float timeValue) const
-{
-    if (!metaDataAvailable())
-        return timeValue;
-
-    QTTime qttime = createQTTime(timeValue);
-    return static_cast&lt;float&gt;(qttime.timeValue) / qttime.timeScale;
-}
-
</del><span class="cx"> void MediaPlayerPrivateQTKit::setPrivateBrowsingMode(bool privateBrowsing)
</span><span class="cx"> {
</span><span class="cx">     m_privateBrowsing = privateBrowsing;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaTimeQTKithfromrev173318trunkSourceWebCoreplatformgraphicsmacMediaTimeQTKith"></a>
<div class="copfile"><h4>Copied: branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h (from rev 173318, trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h) (0 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h                                (rev 0)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    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 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.
+ */
+
+#ifndef MediaTimeQTKit_h
+#define MediaTimeQTKit_h
+
+#if PLATFORM(MAC)
+
+#include &lt;QTKit/QTTime.h&gt;
+#include &lt;wtf/MediaTime.h&gt;
+
+namespace WebCore {
+
+QTTime toQTTime(const MediaTime&amp;);
+MediaTime toMediaTime(const QTTime&amp;);
+    
+}
+
+#endif
+
+#endif // MediaTimeQTKit_h
</ins></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsmacMediaTimeQTKitmmfromrev173318trunkSourceWebCoreplatformgraphicsmacMediaTimeQTKitmm"></a>
<div class="copfile"><h4>Copied: branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm (from rev 173318, trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm) (0 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm                                (rev 0)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    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 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaTimeQTKit.h&quot;
+
+#if PLATFORM(MAC)
+
+#import &quot;SoftLinking.h&quot;
+#import &lt;QTKit/QTTime.h&gt;
+
+SOFT_LINK_FRAMEWORK(QTKit);
+SOFT_LINK_CONSTANT(QTKit, QTIndefiniteTime, QTTime);
+SOFT_LINK_CONSTANT(QTKit, QTZeroTime, QTTime);
+SOFT_LINK(QTKit, QTTimeCompare, NSComparisonResult, (QTTime time, QTTime otherTime), (time, otherTime));
+SOFT_LINK(QTKit, QTMakeTime, QTTime, (long long timeValue, long timeScale), (timeValue, timeScale));
+
+namespace WebCore {
+
+MediaTime toMediaTime(const QTTime&amp; qtTime)
+{
+    if (qtTime.flags &amp; kQTTimeIsIndefinite)
+        return MediaTime::indefiniteTime();
+    return MediaTime(qtTime.timeValue, qtTime.timeScale);
+}
+
+QTTime toQTTime(const MediaTime&amp; mediaTime)
+{
+    if (mediaTime.isIndefinite() || mediaTime.isInvalid())
+        return getQTIndefiniteTime();
+    if (!mediaTime)
+        return getQTZeroTime();
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
+    return QTMakeTime(mediaTime.timeValue(), mediaTime.timeScale());
+#pragma clang diagnostic pop
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmacMediaTimeMaccpp"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,68 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    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 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 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. 
- */
-
-#include &quot;config.h&quot;
-#include &quot;MediaTimeMac.h&quot;
-
-#if USE(COREMEDIA)
-
-namespace WebCore {
-
-MediaTime toMediaTime(const CMTime&amp; cmTime)
-{
-    uint32_t flags = 0;
-    if (CMTIME_IS_VALID(cmTime))
-        flags |= MediaTime::Valid;
-    if (CMTIME_HAS_BEEN_ROUNDED(cmTime))
-        flags |= MediaTime::HasBeenRounded;
-    if (CMTIME_IS_POSITIVE_INFINITY(cmTime))
-        flags |= MediaTime::PositiveInfinite;
-    if (CMTIME_IS_NEGATIVE_INFINITY(cmTime))
-        flags |= MediaTime::NegativeInfinite;
-    if (CMTIME_IS_INDEFINITE(cmTime))
-        flags |= MediaTime::Indefinite;
-
-    return MediaTime(cmTime.value, cmTime.timescale, flags);
-}
-
-CMTime toCMTime(const MediaTime&amp; mediaTime)
-{
-    CMTime time = {mediaTime.timeValue(), mediaTime.timeScale(), 0, 0};
-
-    if (mediaTime.isValid())
-        time.flags |= kCMTimeFlags_Valid;
-    if (mediaTime.hasBeenRounded())
-        time.flags |= kCMTimeFlags_HasBeenRounded;
-    if (mediaTime.isPositiveInfinite())
-        time.flags |= kCMTimeFlags_PositiveInfinity;
-    if (mediaTime.isNegativeInfinite())
-        time.flags |= kCMTimeFlags_NegativeInfinity;
-
-    return time;
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmacMediaTimeMach"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mac/MediaTimeMac.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    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 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 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. 
- */
-
-#ifndef MediaTimeMac_h
-#define MediaTimeMac_h
-
-#if USE(COREMEDIA)
-
-#include &lt;CoreMedia/CMTime.h&gt;
-#include &lt;wtf/MediaTime.h&gt;
-
-namespace WebCore {
-
-CMTime toCMTime(const MediaTime&amp;);
-MediaTime toMediaTime(const CMTime&amp;);
-
-}
-
-#endif
-
-#endif
</del></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmacPlatformClockCMmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/mac/PlatformClockCM.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mac/PlatformClockCM.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mac/PlatformClockCM.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import &quot;PlatformClockCM.h&quot;
</span><span class="cx"> 
</span><del>-#import &quot;MediaTimeMac.h&quot;
</del><ins>+#import &quot;MediaTimeAVFoundation.h&quot;
</ins><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #import &lt;CoreMedia/CMAudioClock.h&gt;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaPlayerMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -159,9 +159,9 @@
</span><span class="cx">     return m_readyState;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MockMediaPlayerMediaSource::maxTimeSeekableDouble() const
</del><ins>+MediaTime MockMediaPlayerMediaSource::maxMediaTimeSeekable() const
</ins><span class="cx"> {
</span><del>-    return m_duration.toDouble();
</del><ins>+    return m_duration;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;PlatformTimeRanges&gt; MockMediaPlayerMediaSource::buffered() const
</span><span class="lines">@@ -185,23 +185,23 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MockMediaPlayerMediaSource::currentTimeDouble() const
</del><ins>+MediaTime MockMediaPlayerMediaSource::currentMediaTime() const
</ins><span class="cx"> {
</span><del>-    return m_currentTime.toDouble();
</del><ins>+    return m_currentTime;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MockMediaPlayerMediaSource::durationDouble() const
</del><ins>+MediaTime MockMediaPlayerMediaSource::durationMediaTime() const
</ins><span class="cx"> {
</span><del>-    return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;duration() : 0;
</del><ins>+    return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;duration() : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MockMediaPlayerMediaSource::seekWithTolerance(double time, double negativeTolerance, double positiveTolerance)
</del><ins>+void MockMediaPlayerMediaSource::seekWithTolerance(const MediaTime&amp; time, const MediaTime&amp; negativeTolerance, const MediaTime&amp; positiveTolerance)
</ins><span class="cx"> {
</span><span class="cx">     if (!negativeTolerance &amp;&amp; !positiveTolerance) {
</span><del>-        m_currentTime = MediaTime::createWithDouble(time);
-        m_mediaSourcePrivate-&gt;seekToTime(MediaTime::createWithDouble(time));
</del><ins>+        m_currentTime = time;
+        m_mediaSourcePrivate-&gt;seekToTime(time);
</ins><span class="cx">     } else
</span><del>-        m_currentTime = m_mediaSourcePrivate-&gt;seekToTime(MediaTime::createWithDouble(time), MediaTime::createWithDouble(negativeTolerance), MediaTime::createWithDouble(positiveTolerance));
</del><ins>+        m_currentTime = m_mediaSourcePrivate-&gt;seekToTime(time, negativeTolerance, positiveTolerance);
</ins><span class="cx"> 
</span><span class="cx">     if (m_seekCompleted) {
</span><span class="cx">         m_player-&gt;timeChanged();
</span><span class="lines">@@ -285,9 +285,9 @@
</span><span class="cx">     return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;corruptedVideoFrames() : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MockMediaPlayerMediaSource::totalFrameDelay()
</del><ins>+MediaTime MockMediaPlayerMediaSource::totalFrameDelay()
</ins><span class="cx"> {
</span><del>-    return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;totalFrameDelay() : 0;
</del><ins>+    return m_mediaSourcePrivate ? m_mediaSourcePrivate-&gt;totalFrameDelay() : MediaTime::zeroTime();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaPlayerMediaSourceh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -71,18 +71,18 @@
</span><span class="cx">     virtual bool seeking() const override;
</span><span class="cx">     virtual bool paused() const override;
</span><span class="cx">     virtual MediaPlayer::NetworkState networkState() const override;
</span><del>-    virtual double maxTimeSeekableDouble() const override;
</del><ins>+    virtual MediaTime maxMediaTimeSeekable() const override;
</ins><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const override;
</span><span class="cx">     virtual bool didLoadingProgress() const override;
</span><span class="cx">     virtual void setSize(const IntSize&amp;) override;
</span><span class="cx">     virtual void paint(GraphicsContext*, const IntRect&amp;) override;
</span><del>-    virtual double currentTimeDouble() const override;
-    virtual double durationDouble() const override;
-    virtual void seekWithTolerance(double time, double, double) override;
</del><ins>+    virtual MediaTime currentMediaTime() const override;
+    virtual MediaTime durationMediaTime() const override;
+    virtual void seekWithTolerance(const MediaTime&amp;, const MediaTime&amp;, const MediaTime&amp;) override;
</ins><span class="cx">     virtual unsigned long totalVideoFrames() override;
</span><span class="cx">     virtual unsigned long droppedVideoFrames() override;
</span><span class="cx">     virtual unsigned long corruptedVideoFrames() override;
</span><del>-    virtual double totalFrameDelay() override;
</del><ins>+    virtual MediaTime totalFrameDelay() override;
</ins><span class="cx"> 
</span><span class="cx">     MediaPlayer* m_player;
</span><span class="cx">     RefPtr&lt;MockMediaSourcePrivate&gt; m_mediaSourcePrivate;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaSourcePrivatecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -50,7 +50,6 @@
</span><span class="cx">     , m_totalVideoFrames(0)
</span><span class="cx">     , m_droppedVideoFrames(0)
</span><span class="cx">     , m_corruptedVideoFrames(0)
</span><del>-    , m_totalFrameDelay(0)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -87,7 +86,7 @@
</span><span class="cx">     m_sourceBuffers.remove(pos);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double MockMediaSourcePrivate::duration()
</del><ins>+MediaTime MockMediaSourcePrivate::duration()
</ins><span class="cx"> {
</span><span class="cx">     return m_client-&gt;duration();
</span><span class="cx"> }
</span><span class="lines">@@ -99,7 +98,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MockMediaSourcePrivate::durationChanged()
</span><span class="cx"> {
</span><del>-    m_player-&gt;updateDuration(MediaTime::createWithDouble(duration()));
</del><ins>+    m_player-&gt;updateDuration(duration());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MockMediaSourcePrivate::markEndOfStream(EndOfStreamStatus status)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmockmediasourceMockMediaSourcePrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     bool hasAudio() const;
</span><span class="cx">     bool hasVideo() const;
</span><span class="cx"> 
</span><del>-    double duration();
</del><ins>+    MediaTime duration();
</ins><span class="cx">     std::unique_ptr&lt;PlatformTimeRanges&gt; buffered();
</span><span class="cx"> 
</span><span class="cx">     MockMediaPlayerMediaSource* player() const { return m_player; }
</span><span class="lines">@@ -58,12 +58,12 @@
</span><span class="cx">     unsigned long totalVideoFrames() const { return m_totalVideoFrames; }
</span><span class="cx">     unsigned long droppedVideoFrames() const  { return m_droppedVideoFrames; }
</span><span class="cx">     unsigned long corruptedVideoFrames() const { return m_corruptedVideoFrames; }
</span><del>-    double totalFrameDelay() const { return m_totalFrameDelay; }
</del><ins>+    MediaTime totalFrameDelay() const { return m_totalFrameDelay; }
</ins><span class="cx"> 
</span><span class="cx">     void incrementTotalVideoFrames() { ++m_totalVideoFrames; }
</span><span class="cx">     void incrementDroppedFrames() { ++m_droppedVideoFrames; }
</span><span class="cx">     void incrementCorruptedFrames() { ++m_corruptedVideoFrames; }
</span><del>-    void incrementTotalFrameDelayBy(double delay) { m_totalFrameDelay += delay; }
</del><ins>+    void incrementTotalFrameDelayBy(const MediaTime&amp; delay) { m_totalFrameDelay += delay; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     MockMediaSourcePrivate(MockMediaPlayerMediaSource*, MediaSourcePrivateClient*);
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">     unsigned long m_totalVideoFrames;
</span><span class="cx">     unsigned long m_droppedVideoFrames;
</span><span class="cx">     unsigned long m_corruptedVideoFrames;
</span><del>-    double m_totalFrameDelay;
</del><ins>+    MediaTime m_totalFrameDelay;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformmockmediasourceMockSourceBufferPrivatecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx">     if (box-&gt;isDropped())
</span><span class="cx">         m_mediaSource-&gt;incrementDroppedFrames();
</span><span class="cx">     if (box-&gt;isDelayed())
</span><del>-        m_mediaSource-&gt;incrementTotalFrameDelayBy(1);
</del><ins>+        m_mediaSource-&gt;incrementTotalFrameDelayBy(MediaTime(1, 1));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MockSourceBufferPrivate::hasVideo() const
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (178446 => 178447)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2015-01-14 22:20:48 UTC (rev 178446)
+++ branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2015-01-14 22:37:51 UTC (rev 178447)
</span><span class="lines">@@ -361,8 +361,8 @@
</span><span class="cx">     ASSERT(!m_isPaintingSuspended);
</span><span class="cx">     m_isPaintingSuspended = true;
</span><span class="cx"> 
</span><del>-    [m_hostingLayer setValue:@YES forKey:@&quot;NSCAViewRenderPaused&quot;];
-    [[NSNotificationCenter defaultCenter] postNotificationName:@&quot;NSCAViewRenderDidPauseNotification&quot; object:nil userInfo:[NSDictionary dictionaryWithObject:m_hostingLayer.get() forKey:@&quot;layer&quot;]];
</del><ins>+//    [m_hostingLayer setValue:@YES forKey:@&quot;NSCAViewRenderPaused&quot;];
+//    [[NSNotificationCenter defaultCenter] postNotificationName:@&quot;NSCAViewRenderDidPauseNotification&quot; object:nil userInfo:[NSDictionary dictionaryWithObject:m_hostingLayer.get() forKey:@&quot;layer&quot;]];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::resumePainting()
</span><span class="lines">@@ -374,8 +374,8 @@
</span><span class="cx">     }
</span><span class="cx">     m_isPaintingSuspended = false;
</span><span class="cx"> 
</span><del>-    [m_hostingLayer setValue:@NO forKey:@&quot;NSCAViewRenderPaused&quot;];
-    [[NSNotificationCenter defaultCenter] postNotificationName:@&quot;NSCAViewRenderDidResumeNotification&quot; object:nil userInfo:[NSDictionary dictionaryWithObject:m_hostingLayer.get() forKey:@&quot;layer&quot;]];
</del><ins>+//    [m_hostingLayer setValue:@NO forKey:@&quot;NSCAViewRenderPaused&quot;];
+//    [[NSNotificationCenter defaultCenter] postNotificationName:@&quot;NSCAViewRenderDidResumeNotification&quot; object:nil userInfo:[NSDictionary dictionaryWithObject:m_hostingLayer.get() forKey:@&quot;layer&quot;]];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::setExposedRect(const FloatRect&amp; exposedRect)
</span></span></pre>
</div>
</div>

</body>
</html>