<!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>[172425] trunk</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/172425">172425</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-08-11 18:12:08 -0700 (Mon, 11 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Mac, iOS] Some media content never reaches full 'loaded' state
https://bugs.webkit.org/show_bug.cgi?id=135814
&lt;rdar://problem/17476923&gt;

Reviewed by Jer Noble.

Source/WebCore:

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls
the durationDouble method and narrows to a float.
(WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration
that works with doubles.
(WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the
currentTimeDouble method and narrows to a float.
(WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for
comparison with passed 'time' argument (which is a double).
(WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can
cache the double precision version of this value.
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since
the rest of the calculation is in terms of doubles.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All
uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class)
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All
uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation.
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class)

LayoutTests:

* platform/mac/media/video-seek-past-end-paused-expected.txt: Rebaseline
result for new rounding behavior.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediavideoseekpastendpausedexpectedtxt">trunk/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationcpp">trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationh">trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFcpp">trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFh">trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/LayoutTests/ChangeLog        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-08-11  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Mac, iOS] Some media content never reaches full 'loaded' state
+        https://bugs.webkit.org/show_bug.cgi?id=135814
+        &lt;rdar://problem/17476923&gt;
+
+        Reviewed by Jer Noble.
+
+        * platform/mac/media/video-seek-past-end-paused-expected.txt: Rebaseline
+        result for new rounding behavior.
+
</ins><span class="cx"> 2014-08-11  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fixed backgrounds don't paint in blurred inset areas
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediavideoseekpastendpausedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/LayoutTests/platform/mac/media/video-seek-past-end-paused-expected.txt        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> EXPECTED (video.paused == 'true') OK
</span><span class="cx"> 
</span><span class="cx"> EXPECTED (video.paused == 'true') OK
</span><del>-EXPECTED (mediaElement.currentTime == 'mediaElement.duration'), OBSERVED '6.026666641235352' FAIL
</del><ins>+EXPECTED (mediaElement.currentTime == 'mediaElement.duration'), OBSERVED '6.026666666666666' FAIL
</ins><span class="cx"> EXPECTED (video.ended == 'true'), OBSERVED 'false' FAIL
</span><span class="cx"> 
</span><span class="cx"> END OF TEST
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/ChangeLog        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2014-08-11  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Mac, iOS] Some media content never reaches full 'loaded' state
+        https://bugs.webkit.org/show_bug.cgi?id=135814
+        &lt;rdar://problem/17476923&gt;
+
+        Reviewed by Jer Noble.
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls
+        the durationDouble method and narrows to a float.
+        (WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration
+        that works with doubles.
+        (WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the
+        currentTimeDouble method and narrows to a float.
+        (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for
+        comparison with passed 'time' argument (which is a double).
+        (WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can
+        cache the double precision version of this value.
+        (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since
+        the rest of the calculation is in terms of doubles.
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All
+        uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
+        (WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation.
+        (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class)
+        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All
+        uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation.
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class)
+
</ins><span class="cx"> 2014-08-11  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Improve look and feel of combined service menu..
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;MediaPlayerPrivateAVFoundation.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DocumentLoader.h&quot;
</span><ins>+#include &quot;FloatConversion.h&quot;
</ins><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><span class="lines">@@ -246,18 +247,28 @@
</span><span class="cx"> 
</span><span class="cx"> float MediaPlayerPrivateAVFoundation::duration() const
</span><span class="cx"> {
</span><ins>+    return narrowPrecisionToFloat(durationDouble());
+}
+
+double MediaPlayerPrivateAVFoundation::durationDouble() const
+{
</ins><span class="cx">     if (m_cachedDuration != MediaPlayer::invalidTime())
</span><span class="cx">         return m_cachedDuration;
</span><span class="cx"> 
</span><del>-    float duration = platformDuration();
</del><ins>+    double duration = platformDuration();
</ins><span class="cx">     if (!duration || duration == MediaPlayer::invalidTime())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     m_cachedDuration = duration;
</span><del>-    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::duration(%p) - caching %f&quot;, this, m_cachedDuration);
</del><ins>+    LOG(Media, &quot;MediaPlayerPrivateAVFoundation::duration(%p) - caching %g&quot;, this, m_cachedDuration);
</ins><span class="cx">     return m_cachedDuration;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+float MediaPlayerPrivateAVFoundation::currentTime() const
+{
+    return narrowPrecisionToFloat(currentTimeDouble());
+}
+
</ins><span class="cx"> void MediaPlayerPrivateAVFoundation::seek(float time)
</span><span class="cx"> {
</span><span class="cx">     seekWithTolerance(time, 0, 0);
</span><span class="lines">@@ -277,10 +288,10 @@
</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; durationDouble())
+        time = durationDouble();
</ins><span class="cx"> 
</span><del>-    if (currentTime() == time)
</del><ins>+    if (currentTimeDouble() == time)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (currentTextTrack())
</span><span class="lines">@@ -672,7 +683,7 @@
</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>-    float now = currentTime();
</del><ins>+    double now = currentTimeDouble();
</ins><span class="cx">     if (now &gt; 0)
</span><span class="cx">         m_cachedDuration = now;
</span><span class="cx"> 
</span><span class="lines">@@ -948,7 +959,7 @@
</span><span class="cx"> 
</span><span class="cx"> size_t MediaPlayerPrivateAVFoundation::extraMemoryCost() const
</span><span class="cx"> {
</span><del>-    double duration = this-&gt;duration();
</del><ins>+    double duration = durationDouble();
</ins><span class="cx">     if (!duration)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationMediaPlayerPrivateAVFoundationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -170,7 +170,9 @@
</span><span class="cx">     virtual bool hasAudio() const override { return m_cachedHasAudio; }
</span><span class="cx">     virtual void setVisible(bool) override;
</span><span class="cx">     virtual float duration() const override;
</span><del>-    virtual float currentTime() const = 0;
</del><ins>+    virtual double durationDouble() const override;
+    virtual float currentTime() const override;
+    virtual double currentTimeDouble() const = 0;
</ins><span class="cx">     virtual void seek(float) override;
</span><span class="cx">     virtual void seekWithTolerance(double, double, double) override;
</span><span class="cx">     virtual bool seeking() const override;
</span><span class="lines">@@ -242,7 +244,7 @@
</span><span class="cx">     virtual double platformMaxTimeSeekable() const = 0;
</span><span class="cx">     virtual double platformMinTimeSeekable() const = 0;
</span><span class="cx">     virtual float platformMaxTimeLoaded() const = 0;
</span><del>-    virtual float platformDuration() const = 0;
</del><ins>+    virtual double 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">@@ -329,7 +331,7 @@
</span><span class="cx">     mutable float m_cachedMaxTimeLoaded;
</span><span class="cx">     mutable double m_cachedMaxTimeSeekable;
</span><span class="cx">     mutable double m_cachedMinTimeSeekable;
</span><del>-    mutable float m_cachedDuration;
</del><ins>+    mutable double m_cachedDuration;
</ins><span class="cx">     float m_reportedDuration;
</span><span class="cx">     mutable float m_maxTimeLoadedAtLastDidLoadingProgress;
</span><span class="cx">     float m_requestedRate;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -569,7 +569,7 @@
</span><span class="cx">     setDelayCallbacks(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationCF::platformDuration() const
</del><ins>+double MediaPlayerPrivateAVFoundationCF::platformDuration() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable() || !avAsset(m_avfWrapper))
</span><span class="cx">         return 0;
</span><span class="lines">@@ -583,23 +583,23 @@
</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 narrowPrecisionToFloat(CMTimeGetSeconds(cmDuration));
</del><ins>+        return CMTimeGetSeconds(cmDuration);
</ins><span class="cx"> 
</span><span class="cx">     if (CMTIME_IS_INDEFINITE(cmDuration))
</span><del>-        return numeric_limits&lt;float&gt;::infinity();
</del><ins>+        return numeric_limits&lt;double&gt;::infinity();
</ins><span class="cx"> 
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateAVFoundationCF::platformDuration(%p) - invalid duration, returning %.0f&quot;, this, static_cast&lt;float&gt;(MediaPlayer::invalidTime()));
</span><span class="cx">     return static_cast&lt;float&gt;(MediaPlayer::invalidTime());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationCF::currentTime() const
</del><ins>+double MediaPlayerPrivateAVFoundationCF::currentTimeDouble() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable() || !avPlayerItem(m_avfWrapper))
</span><span class="cx">         return 0;
</span><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 max(narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)), 0.0f);
</del><ins>+        return std::max(CMTimeGetSeconds(itemTime), 0.0);
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationcfMediaPlayerPrivateAVFoundationCFh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -73,7 +73,8 @@
</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 float currentTime() const;
</del><ins>+    virtual float currentTime() const override;
+    virtual double currentTimeDouble() 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">@@ -96,7 +97,7 @@
</span><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; platformBufferedTimeRanges() const;
</span><span class="cx">     virtual double platformMinTimeSeekable() const;
</span><span class="cx">     virtual double platformMaxTimeSeekable() const;
</span><del>-    virtual float platformDuration() const;
</del><ins>+    virtual double platformDuration() const;
</ins><span class="cx">     virtual float platformMaxTimeLoaded() const;
</span><span class="cx">     virtual void beginLoadingMetadata();
</span><span class="cx">     virtual void sizeChanged();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2014-08-12 01:12:08 UTC (rev 172425)
</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 float currentTime() const;
</del><ins>+    virtual double currentTimeDouble() 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">@@ -181,7 +181,7 @@
</span><span class="cx">     virtual std::unique_ptr&lt;PlatformTimeRanges&gt; platformBufferedTimeRanges() const;
</span><span class="cx">     virtual double platformMinTimeSeekable() const;
</span><span class="cx">     virtual double platformMaxTimeSeekable() const;
</span><del>-    virtual float platformDuration() const;
</del><ins>+    virtual double platformDuration() const;
</ins><span class="cx">     virtual float platformMaxTimeLoaded() const;
</span><span class="cx">     virtual void beginLoadingMetadata();
</span><span class="cx">     virtual void sizeChanged();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (172424 => 172425)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2014-08-12 01:04:07 UTC (rev 172424)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2014-08-12 01:12:08 UTC (rev 172425)
</span><span class="lines">@@ -1128,12 +1128,12 @@
</span><span class="cx">     setDelayCallbacks(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationObjC::platformDuration() const
</del><ins>+double 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 MediaPlayer::invalidTime();
</ins><span class="cx">     
</span><span class="cx">     CMTime cmDuration;
</span><span class="cx">     
</span><span class="lines">@@ -1144,24 +1144,24 @@
</span><span class="cx">         cmDuration= [m_avAsset.get() duration];
</span><span class="cx"> 
</span><span class="cx">     if (CMTIME_IS_NUMERIC(cmDuration))
</span><del>-        return narrowPrecisionToFloat(CMTimeGetSeconds(cmDuration));
</del><ins>+        return CMTimeGetSeconds(cmDuration);
</ins><span class="cx"> 
</span><span class="cx">     if (CMTIME_IS_INDEFINITE(cmDuration)) {
</span><del>-        return std::numeric_limits&lt;float&gt;::infinity();
</del><ins>+        return std::numeric_limits&lt;double&gt;::infinity();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateAVFoundationObjC::platformDuration(%p) - invalid duration, returning %.0f&quot;, this, MediaPlayer::invalidTime());
</span><span class="cx">     return MediaPlayer::invalidTime();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float MediaPlayerPrivateAVFoundationObjC::currentTime() const
</del><ins>+double MediaPlayerPrivateAVFoundationObjC::currentTimeDouble() const
</ins><span class="cx"> {
</span><span class="cx">     if (!metaDataAvailable() || !m_avPlayerItem)
</span><span class="cx">         return 0;
</span><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(narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)), 0.0f);
</del><ins>+        return std::max(CMTimeGetSeconds(itemTime), 0.0);
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>