<!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>[165476] 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/165476">165476</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-03-12 10:02:06 -0700 (Wed, 12 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Win] Remove use of QTSDK
https://bugs.webkit.org/show_bug.cgi?id=130049

Reviewed by Darin Adler.

Source/WebCore: 

Media testing already covers this functionality.

* WebCore.vcxproj/WebCore.vcxproj: Remove QuickTime files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/graphics/MediaPlayer.h: Remove QuickTime and Chromium
media references.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Removed.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: Removed.
* platform/graphics/win/QTCFDictionary.cpp: Removed.
* platform/graphics/win/QTCFDictionary.h: Removed.
* platform/graphics/win/QTDecompressionSession.cpp: Removed.
* platform/graphics/win/QTDecompressionSession.h: Removed.
* platform/graphics/win/QTMovie.cpp: Removed.
* platform/graphics/win/QTMovie.h: Removed.
* platform/graphics/win/QTMovieGWorld.cpp: Removed.
* platform/graphics/win/QTMovieGWorld.h: Removed.
* platform/graphics/win/QTMovieTask.cpp: Removed.
* platform/graphics/win/QTMovieTask.h: Removed.
* platform/graphics/win/QTMovieVisualContext.cpp: Removed.
* platform/graphics/win/QTMovieVisualContext.h: Removed.
* platform/graphics/win/QTMovieWinTimer.cpp: Removed.
* platform/graphics/win/QTMovieWinTimer.h: Removed.
* platform/graphics/win/QTPixelBuffer.cpp: Removed.
* platform/graphics/win/QTPixelBuffer.h: Removed.
* platform/graphics/win/QTTrack.cpp: Removed.
* platform/graphics/win/QTTrack.h: Removed.
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::defaultPluginDirectories): Don't look
for the QuickTime plugin anymore.

Tools: 

* DumpRenderTree/win/DumpRenderTree.cpp:
(initialize): Remove QuickTime code.
* win/AssembleBuildLogs/AssembleLogs.cmd: Don't grab logs from
building QTMovieWin.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCorepluginswinPluginDatabaseWincpp">trunk/Source/WebCore/plugins/win/PluginDatabaseWin.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreecpp">trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolswinAssembleBuildLogsAssembleLogscmd">trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicswinMediaPlayerPrivateQuickTimeVisualContextcpp">trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinMediaPlayerPrivateQuickTimeVisualContexth">trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTCFDictionarycpp">trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTCFDictionaryh">trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTDecompressionSessioncpp">trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTDecompressionSessionh">trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMoviecpp">trunk/Source/WebCore/platform/graphics/win/QTMovie.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieh">trunk/Source/WebCore/platform/graphics/win/QTMovie.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieGWorldcpp">trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieGWorldh">trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieTaskcpp">trunk/Source/WebCore/platform/graphics/win/QTMovieTask.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieTaskh">trunk/Source/WebCore/platform/graphics/win/QTMovieTask.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieVisualContextcpp">trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieVisualContexth">trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieWinTimercpp">trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTMovieWinTimerh">trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTPixelBuffercpp">trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTPixelBufferh">trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTTrackcpp">trunk/Source/WebCore/platform/graphics/win/QTTrack.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinQTTrackh">trunk/Source/WebCore/platform/graphics/win/QTTrack.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/ChangeLog        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-03-12  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Remove use of QTSDK
+        https://bugs.webkit.org/show_bug.cgi?id=130049
+
+        Reviewed by Darin Adler.
+
+        Media testing already covers this functionality.
+
+        * WebCore.vcxproj/WebCore.vcxproj: Remove QuickTime files.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+        * platform/graphics/MediaPlayer.h: Remove QuickTime and Chromium
+        media references.
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Removed.
+        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: Removed.
+        * platform/graphics/win/QTCFDictionary.cpp: Removed.
+        * platform/graphics/win/QTCFDictionary.h: Removed.
+        * platform/graphics/win/QTDecompressionSession.cpp: Removed.
+        * platform/graphics/win/QTDecompressionSession.h: Removed.
+        * platform/graphics/win/QTMovie.cpp: Removed.
+        * platform/graphics/win/QTMovie.h: Removed.
+        * platform/graphics/win/QTMovieGWorld.cpp: Removed.
+        * platform/graphics/win/QTMovieGWorld.h: Removed.
+        * platform/graphics/win/QTMovieTask.cpp: Removed.
+        * platform/graphics/win/QTMovieTask.h: Removed.
+        * platform/graphics/win/QTMovieVisualContext.cpp: Removed.
+        * platform/graphics/win/QTMovieVisualContext.h: Removed.
+        * platform/graphics/win/QTMovieWinTimer.cpp: Removed.
+        * platform/graphics/win/QTMovieWinTimer.h: Removed.
+        * platform/graphics/win/QTPixelBuffer.cpp: Removed.
+        * platform/graphics/win/QTPixelBuffer.h: Removed.
+        * platform/graphics/win/QTTrack.cpp: Removed.
+        * platform/graphics/win/QTTrack.h: Removed.
+        * plugins/win/PluginDatabaseWin.cpp:
+        (WebCore::PluginDatabase::defaultPluginDirectories): Don't look
+        for the QuickTime plugin anymore.
+
</ins><span class="cx"> 2014-03-12  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix build after r165472
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -7782,17 +7782,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\win\IntRectWin.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\win\IntSizeWin.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\graphics\win\MediaPlayerPrivateQuickTimeVisualContext.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\platform\graphics\win\MediaPlayerPrivateTaskTimer.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\opentype\OpenTypeUtilities.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\opentype\OpenTypeVerticalData.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\win\SimpleFontDataCairoWin.cpp&quot;&gt;
</span><span class="lines">@@ -19124,8 +19113,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\win\FullScreenControllerClient.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\win\LocalWindowsContext.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.h&quot; /&gt;
</span><del>-    &lt;CustomBuildStep Include=&quot;..\platform\graphics\win\MediaPlayerPrivateQuickTimeVisualContext.h&quot; /&gt;
-    &lt;ClInclude Include=&quot;..\platform\graphics\win\MediaPlayerPrivateTaskTimer.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\opentype\OpenTypeTypes.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\opentype\OpenTypeUtilities.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\opentype\OpenTypeVerticalData.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1473,12 +1473,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\graphics\win\MediaPlayerPrivateQuickTimeVisualContext.cpp&quot;&gt;
-      &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\platform\graphics\win\MediaPlayerPrivateTaskTimer.cpp&quot;&gt;
-      &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\platform\graphics\opentype\OpenTypeUtilities.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -8364,9 +8358,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\win\LocalWindowsContext.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\platform\graphics\win\MediaPlayerPrivateTaskTimer.h&quot;&gt;
-      &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\platform\graphics\opentype\OpenTypeTypes.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -14889,9 +14880,6 @@
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\graphics\win\MediaPlayerPrivateFullscreenWindow.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span><del>-    &lt;CustomBuildStep Include=&quot;..\platform\graphics\win\MediaPlayerPrivateQuickTimeVisualContext.h&quot;&gt;
-      &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
-    &lt;/CustomBuildStep&gt;
</del><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\graphics\win\WKCAImageQueue.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\graphics\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinMediaPlayerPrivateQuickTimeVisualContextcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,1226 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010, 2011 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 COMPUTER, 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 COMPUTER, 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;
-
-#if ENABLE(VIDEO)
-#include &quot;MediaPlayerPrivateQuickTimeVisualContext.h&quot;
-
-#include &quot;Cookie.h&quot;
-#include &quot;CookieJar.h&quot;
-#include &quot;Document.h&quot;
-#include &quot;DocumentLoader.h&quot;
-#include &quot;Frame.h&quot;
-#include &quot;FrameView.h&quot;
-#include &quot;GraphicsContext.h&quot;
-#include &quot;MediaPlayerPrivateTaskTimer.h&quot;
-#include &quot;Page.h&quot;
-#include &quot;PlatformCALayerWin.h&quot;
-#include &quot;QTCFDictionary.h&quot;
-#include &quot;QTDecompressionSession.h&quot;
-#include &quot;QTMovie.h&quot;
-#include &quot;QTMovieTask.h&quot;
-#include &quot;QTMovieVisualContext.h&quot;
-#include &quot;ScrollView.h&quot;
-#include &quot;Settings.h&quot;
-#include &quot;SoftLinking.h&quot;
-#include &quot;TimeRanges.h&quot;
-#include &quot;Timer.h&quot;
-#include &quot;URL.h&quot;
-#include &quot;WKCAImageQueue.h&quot;
-#include &lt;AssertMacros.h&gt;
-#include &lt;CoreGraphics/CGAffineTransform.h&gt;
-#include &lt;CoreGraphics/CGContext.h&gt;
-#include &lt;QuartzCore/CATransform3D.h&gt;
-#include &lt;Wininet.h&gt;
-#include &lt;wtf/CurrentTime.h&gt;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/MainThread.h&gt;
-#include &lt;wtf/MathExtras.h&gt;
-#include &lt;wtf/StdLibExtras.h&gt;
-#include &lt;wtf/text/StringBuilder.h&gt;
-#include &lt;wtf/text/StringHash.h&gt;
-
-using namespace std;
-
-namespace WebCore {
-
-static CGImageRef CreateCGImageFromPixelBuffer(QTPixelBuffer buffer);
-static bool requiredDllsAvailable();
-
-SOFT_LINK_LIBRARY(Wininet)
-SOFT_LINK(Wininet, InternetSetCookieExW, DWORD, WINAPI, (LPCWSTR lpszUrl, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData, DWORD dwFlags, DWORD_PTR dwReserved), (lpszUrl, lpszCookieName, lpszCookieData, dwFlags, dwReserved))
-
-// Interface declaration for MediaPlayerPrivateQuickTimeVisualContext's QTMovieClient aggregate
-class MediaPlayerPrivateQuickTimeVisualContext::MovieClient : public QTMovieClient {
-public:
-    MovieClient(MediaPlayerPrivateQuickTimeVisualContext* parent) : m_parent(parent) {}
-    virtual ~MovieClient() { m_parent = 0; }
-    virtual void movieEnded(QTMovie*);
-    virtual void movieLoadStateChanged(QTMovie*);
-    virtual void movieTimeChanged(QTMovie*);
-private:
-    MediaPlayerPrivateQuickTimeVisualContext* m_parent;
-};
-
-class MediaPlayerPrivateQuickTimeVisualContext::LayerClient : public PlatformCALayerClient {
-public:
-    LayerClient(MediaPlayerPrivateQuickTimeVisualContext* parent) : m_parent(parent) {}
-    virtual ~LayerClient() { m_parent = 0; }
-
-private:
-    virtual void platformCALayerLayoutSublayersOfLayer(PlatformCALayer*);
-    virtual bool platformCALayerRespondsToLayoutChanges() const { return true; }
-
-    virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime) { }
-    virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesBottomUp; }
-    virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&amp;, const FloatRect&amp; inClip) { }
-    virtual bool platformCALayerShowDebugBorders() const { return false; }
-    virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const { return false; }
-    virtual int platformCALayerIncrementRepaintCount(PlatformCALayer*) { return 0; }
-
-    virtual bool platformCALayerContentsOpaque() const { return false; }
-    virtual bool platformCALayerDrawsContent() const { return false; }
-    virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { }
-    virtual float platformCALayerDeviceScaleFactor() const { return 1; }
-
-    MediaPlayerPrivateQuickTimeVisualContext* m_parent;
-};
-
-void MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerLayoutSublayersOfLayer(PlatformCALayer* layer)
-{
-    ASSERT(m_parent);
-    ASSERT(m_parent-&gt;m_transformLayer == layer);
-
-    FloatSize parentSize = layer-&gt;bounds().size();
-    FloatSize naturalSize = m_parent-&gt;naturalSize();
-
-    // Calculate the ratio of these two sizes and use that ratio to scale the qtVideoLayer:
-    FloatSize ratio(parentSize.width() / naturalSize.width(), parentSize.height() / naturalSize.height());
-
-    int videoWidth = 0;
-    int videoHeight = 0;
-    m_parent-&gt;m_movie-&gt;getNaturalSize(videoWidth, videoHeight);
-    FloatRect videoBounds(0, 0, videoWidth * ratio.width(), videoHeight * ratio.height());
-    FloatPoint3D videoAnchor = m_parent-&gt;m_qtVideoLayer-&gt;anchorPoint();
-
-    // Calculate the new position based on the parent's size:
-    FloatPoint position(parentSize.width() * 0.5 - videoBounds.width() * (0.5 - videoAnchor.x()),
-        parentSize.height() * 0.5 - videoBounds.height() * (0.5 - videoAnchor.y())); 
-
-    m_parent-&gt;m_qtVideoLayer-&gt;setBounds(videoBounds);
-    m_parent-&gt;m_qtVideoLayer-&gt;setPosition(position);
-}
-
-class MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient : public QTMovieVisualContextClient {
-public:
-    VisualContextClient(MediaPlayerPrivateQuickTimeVisualContext* parent) : m_parent(parent) {}
-    virtual ~VisualContextClient() { m_parent = 0; }
-    void imageAvailableForTime(const QTCVTimeStamp*);
-    static void retrieveCurrentImageProc(void*);
-private:
-    MediaPlayerPrivateQuickTimeVisualContext* m_parent;
-};
-
-PassOwnPtr&lt;MediaPlayerPrivateInterface&gt; MediaPlayerPrivateQuickTimeVisualContext::create(MediaPlayer* player)
-{ 
-    return adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext(player));
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::registerMediaEngine(MediaEngineRegistrar registrar)
-{
-    if (isAvailable())
-        registrar(create, getSupportedTypes, supportsType, 0, 0, 0, 0);
-}
-
-MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext(MediaPlayer* player)
-    : m_player(player)
-    , m_seekTo(-1)
-    , m_seekTimer(this, &amp;MediaPlayerPrivateQuickTimeVisualContext::seekTimerFired)
-    , m_visualContextTimer(this, &amp;MediaPlayerPrivateQuickTimeVisualContext::visualContextTimerFired)
-    , m_networkState(MediaPlayer::Empty)
-    , m_readyState(MediaPlayer::HaveNothing)
-    , m_enabledTrackCount(0)
-    , m_totalTrackCount(0)
-    , m_hasUnsupportedTracks(false)
-    , m_startedPlaying(false)
-    , m_isStreaming(false)
-    , m_visible(false)
-    , m_newFrameAvailable(false)
-    , m_movieClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::MovieClient(this)))
-    , m_layerClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::LayerClient(this)))
-    , m_movieTransform(CGAffineTransformIdentity)
-    , m_visualContextClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient(this)))
-    , m_delayingLoad(false)
-    , m_privateBrowsing(false)
-    , m_preload(MediaPlayer::Auto)
-    , m_maxTimeLoadedAtLastDidLoadingProgress(0)
-{
-}
-
-MediaPlayerPrivateQuickTimeVisualContext::~MediaPlayerPrivateQuickTimeVisualContext()
-{
-    tearDownVideoRendering();
-    cancelCallOnMainThread(&amp;VisualContextClient::retrieveCurrentImageProc, this);
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen() const
-{
-    Document* document = m_player-&gt;mediaPlayerClient()-&gt;mediaPlayerOwningDocument(); 
-    if (document)
-        return document-&gt;settings()-&gt;acceleratedCompositingEnabled();
-
-    return false;
-}
-
-PlatformMedia MediaPlayerPrivateQuickTimeVisualContext::platformMedia() const
-{
-    PlatformMedia p;
-    p.type = PlatformMedia::QTMovieVisualContextType;
-    p.media.qtMovieVisualContext = m_visualContext.get();
-    return p;
-}
-
-PlatformLayer* MediaPlayerPrivateQuickTimeVisualContext::platformLayer() const
-{
-    return m_transformLayer ? m_transformLayer-&gt;platformLayer() : 0;
-}
-
-String MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime(CFAbsoluteTime time)
-{
-    static const char* const dayStrings[] = { &quot;Mon&quot;, &quot;Tue&quot;, &quot;Wed&quot;, &quot;Thu&quot;, &quot;Fri&quot;, &quot;Sat&quot;, &quot;Sun&quot; };
-    static const char* const monthStrings[] = { &quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;, &quot;Jun&quot;, &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot; };
-    static const CFStringRef dateFormatString = CFSTR(&quot;%s, %02d %s %04d %02d:%02d:%02d GMT&quot;);
-    static CFTimeZoneRef gmtTimeZone;
-    if (!gmtTimeZone)
-        gmtTimeZone = CFTimeZoneCopyDefault();
-
-    CFGregorianDate dateValue = CFAbsoluteTimeGetGregorianDate(time, gmtTimeZone); 
-    if (!CFGregorianDateIsValid(dateValue, kCFGregorianAllUnits))
-        return String();
-
-    time = CFGregorianDateGetAbsoluteTime(dateValue, gmtTimeZone);
-    SInt32 day = CFAbsoluteTimeGetDayOfWeek(time, 0);
-
-    RetainPtr&lt;CFStringRef&gt; dateCFString = adoptCF(CFStringCreateWithFormat(0, 0, dateFormatString, dayStrings[day - 1], dateValue.day, 
-        monthStrings[dateValue.month - 1], dateValue.year, dateValue.hour, dateValue.minute, (int)dateValue.second));
-    return dateCFString.get();
-}
-
-static void addCookieParam(StringBuilder&amp; cookieBuilder, const String&amp; name, const String&amp; value)
-{
-    if (name.isEmpty())
-        return;
-
-    // If this isn't the first parameter added, terminate the previous one.
-    if (cookieBuilder.length())
-        cookieBuilder.append(&quot;; &quot;);
-
-    // Add parameter name, and value if there is one.
-    cookieBuilder.append(name);
-    if (!value.isEmpty()) {
-        cookieBuilder.append('=');
-        cookieBuilder.append(value);
-    }
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime(const String&amp; url)
-{
-    // WebCore loaded the page with the movie URL with CFNetwork but QuickTime will 
-    // use WinINet to download the movie, so we need to copy any cookies needed to
-    // download the movie into WinInet before asking QuickTime to open it.
-    Document* document = m_player-&gt;mediaPlayerClient()-&gt;mediaPlayerOwningDocument();
-    Frame* frame = document ? document-&gt;frame() : 0;
-    if (!frame || !frame-&gt;page() || !frame-&gt;page()-&gt;settings().cookieEnabled())
-        return;
-
-    URL movieURL = URL(URL(), url);
-    Vector&lt;Cookie&gt; documentCookies;
-    if (!getRawCookies(frame-&gt;document(), movieURL, documentCookies))
-        return;
-
-    for (size_t ndx = 0; ndx &lt; documentCookies.size(); ndx++) {
-        const Cookie&amp; cookie = documentCookies[ndx];
-
-        if (cookie.name.isEmpty())
-            continue;
-
-        // Build up the cookie string with as much information as we can get so WinINet
-        // knows what to do with it.
-        StringBuilder cookieBuilder;
-        addCookieParam(cookieBuilder, cookie.name, cookie.value);
-        addCookieParam(cookieBuilder, &quot;path&quot;, cookie.path);
-        if (cookie.expires) 
-            addCookieParam(cookieBuilder, &quot;expires&quot;, rfc2616DateStringFromTime(cookie.expires));
-        if (cookie.httpOnly) 
-            addCookieParam(cookieBuilder, &quot;httpOnly&quot;, String());
-        cookieBuilder.append(';');
-
-        String cookieURL;
-        if (!cookie.domain.isEmpty()) {
-            StringBuilder urlBuilder;
-
-            urlBuilder.append(movieURL.protocol());
-            urlBuilder.append(&quot;://&quot;);
-            if (cookie.domain[0] == '.')
-                urlBuilder.append(cookie.domain.substring(1));
-            else
-                urlBuilder.append(cookie.domain);
-            if (cookie.path.length() &gt; 1)
-                urlBuilder.append(cookie.path);
-
-            cookieURL = urlBuilder.toString();
-        } else
-            cookieURL = movieURL;
-
-        String string = cookieBuilder.toString();
-        InternetSetCookieExW(cookieURL.charactersWithNullTermination().data(), 0, string.charactersWithNullTermination().data(), 0, 0);
-    }
-}
-
-static void disableComponentsOnce()
-{
-    static bool sComponentsDisabled = false;
-    if (sComponentsDisabled)
-        return;
-    sComponentsDisabled = true;
-
-    uint32_t componentsToDisable[][5] = {
-        {'eat ', 'TEXT', 'text', 0, 0},
-        {'eat ', 'TXT ', 'text', 0, 0},    
-        {'eat ', 'utxt', 'text', 0, 0},  
-        {'eat ', 'TEXT', 'tx3g', 0, 0},  
-    };
-
-    for (size_t i = 0; i &lt; WTF_ARRAY_LENGTH(componentsToDisable); ++i) 
-        QTMovie::disableComponent(componentsToDisable[i]);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::resumeLoad()
-{
-    m_delayingLoad = false;
-
-    if (!m_movieURL.isEmpty())
-        loadInternal(m_movieURL);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::load(const String&amp; url)
-{
-    m_movieURL = url;
-
-    if (m_preload == MediaPlayer::None) {
-        m_delayingLoad = true;
-        return;
-    }
-
-    loadInternal(url);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::loadInternal(const String&amp; url)
-{
-    if (!QTMovie::initializeQuickTime()) {
-        // FIXME: is this the right error to return?
-        m_networkState = MediaPlayer::DecodeError; 
-        m_player-&gt;networkStateChanged();
-        return;
-    }
-
-    disableComponentsOnce();
-
-    // Initialize the task timer.
-    MediaPlayerPrivateTaskTimer::initialize();
-
-    if (m_networkState != MediaPlayer::Loading) {
-        m_networkState = MediaPlayer::Loading;
-        m_player-&gt;networkStateChanged();
-    }
-    if (m_readyState != MediaPlayer::HaveNothing) {
-        m_readyState = MediaPlayer::HaveNothing;
-        m_player-&gt;readyStateChanged();
-    }
-    cancelSeek();
-
-    setUpCookiesForQuickTime(url);
-
-    m_movie = adoptRef(new QTMovie(m_movieClient.get()));
-
-    m_movie-&gt;load(url.characters16(), url.length(), m_player-&gt;preservesPitch());
-    m_movie-&gt;setVolume(m_player-&gt;volume());
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::prepareToPlay()
-{
-    if (!m_movie || m_delayingLoad)
-        resumeLoad();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::play()
-{
-    if (!m_movie)
-        return;
-    m_startedPlaying = true;
-
-    m_movie-&gt;play();
-    m_visualContextTimer.startRepeating(1.0 / 30);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::pause()
-{
-    if (!m_movie)
-        return;
-    m_startedPlaying = false;
-
-    m_movie-&gt;pause();
-    m_visualContextTimer.stop();
-}
-
-float MediaPlayerPrivateQuickTimeVisualContext::duration() const
-{
-    if (!m_movie)
-        return 0;
-    return m_movie-&gt;duration();
-}
-
-float MediaPlayerPrivateQuickTimeVisualContext::currentTime() const
-{
-    if (!m_movie)
-        return 0;
-    return m_movie-&gt;currentTime();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::seek(float time)
-{
-    cancelSeek();
-    
-    if (!m_movie)
-        return;
-    
-    if (time &gt; duration())
-        time = duration();
-    
-    m_seekTo = time;
-    if (maxTimeLoaded() &gt;= m_seekTo)
-        doSeek();
-    else 
-        m_seekTimer.start(0, 0.5f);
-}
-    
-void MediaPlayerPrivateQuickTimeVisualContext::doSeek() 
-{
-    float oldRate = m_movie-&gt;rate();
-    if (oldRate)
-        m_movie-&gt;setRate(0);
-    m_movie-&gt;setCurrentTime(m_seekTo);
-    float timeAfterSeek = currentTime();
-    // restore playback only if not at end, othewise QTMovie will loop
-    if (oldRate &amp;&amp; timeAfterSeek &lt; duration())
-        m_movie-&gt;setRate(oldRate);
-    cancelSeek();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::cancelSeek()
-{
-    m_seekTo = -1;
-    m_seekTimer.stop();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::seekTimerFired(Timer&lt;MediaPlayerPrivateQuickTimeVisualContext&gt;*)
-{        
-    if (!m_movie || !seeking() || currentTime() == m_seekTo) {
-        cancelSeek();
-        updateStates();
-        m_player-&gt;timeChanged(); 
-        return;
-    } 
-    
-    if (maxTimeLoaded() &gt;= m_seekTo)
-        doSeek();
-    else {
-        MediaPlayer::NetworkState state = networkState();
-        if (state == MediaPlayer::Empty || state == MediaPlayer::Loaded) {
-            cancelSeek();
-            updateStates();
-            m_player-&gt;timeChanged();
-        }
-    }
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::paused() const
-{
-    if (!m_movie)
-        return true;
-    return (!m_movie-&gt;rate());
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::seeking() const
-{
-    if (!m_movie)
-        return false;
-    return m_seekTo &gt;= 0;
-}
-
-IntSize MediaPlayerPrivateQuickTimeVisualContext::naturalSize() const
-{
-    if (!m_movie)
-        return IntSize();
-    int width;
-    int height;
-    m_movie-&gt;getNaturalSize(width, height);
-    CGSize originalSize = {width, height};
-    CGSize transformedSize = CGSizeApplyAffineTransform(originalSize, m_movieTransform);
-    return IntSize(abs(transformedSize.width), abs(transformedSize.height));
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::hasVideo() const
-{
-    if (!m_movie)
-        return false;
-    return m_movie-&gt;hasVideo();
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::hasAudio() const
-{
-    if (!m_movie)
-        return false;
-    return m_movie-&gt;hasAudio();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setVolume(float volume)
-{
-    if (!m_movie)
-        return;
-    m_movie-&gt;setVolume(volume);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setRate(float rate)
-{
-    if (!m_movie)
-        return;
-
-    // Do not call setRate(...) unless we have started playing; otherwise
-    // QuickTime's VisualContext can get wedged waiting for a rate change
-    // call which will never come.
-    if (m_startedPlaying)
-        m_movie-&gt;setRate(rate);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setPreservesPitch(bool preservesPitch)
-{
-    if (!m_movie)
-        return;
-    m_movie-&gt;setPreservesPitch(preservesPitch);
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::hasClosedCaptions() const
-{
-    if (!m_movie)
-        return false;
-    return m_movie-&gt;hasClosedCaptions();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setClosedCaptionsVisible(bool visible)
-{
-    if (!m_movie)
-        return;
-    m_movie-&gt;setClosedCaptionsVisible(visible);
-}
-
-std::unique_ptr&lt;PlatformTimeRanges&gt; MediaPlayerPrivateQuickTimeVisualContext::buffered() const
-{
-    auto timeRanges = PlatformTimeRanges::create();
-
-    float loaded = maxTimeLoaded();
-    // rtsp streams are not buffered
-    if (!m_isStreaming &amp;&amp; loaded &gt; 0)
-        timeRanges-&gt;add(0, loaded);
-    return timeRanges;
-}
-
-float MediaPlayerPrivateQuickTimeVisualContext::maxTimeSeekable() const
-{
-    // infinite duration means live stream
-    return !std::isfinite(duration()) ? 0 : maxTimeLoaded();
-}
-
-float MediaPlayerPrivateQuickTimeVisualContext::maxTimeLoaded() const
-{
-    if (!m_movie)
-        return 0;
-    return m_movie-&gt;maxTimeLoaded(); 
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::didLoadingProgress() const
-{
-    if (!m_movie || !duration())
-        return false;
-    float currentMaxTimeLoaded = maxTimeLoaded();
-    bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress;
-    m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded;
-    return didLoadingProgress;
-}
-
-unsigned MediaPlayerPrivateQuickTimeVisualContext::totalBytes() const
-{
-    if (!m_movie)
-        return 0;
-    return m_movie-&gt;dataSize();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::cancelLoad()
-{
-    if (m_networkState &lt; MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
-        return;
-    
-    tearDownVideoRendering();
-
-    // Cancel the load by destroying the movie.
-    m_movie.clear();
-
-    updateStates();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::updateStates()
-{
-    MediaPlayer::NetworkState oldNetworkState = m_networkState;
-    MediaPlayer::ReadyState oldReadyState = m_readyState;
-  
-    long loadState = m_movie ? m_movie-&gt;loadState() : QTMovieLoadStateError;
-
-    if (loadState &gt;= QTMovieLoadStateLoaded &amp;&amp; m_readyState &lt; MediaPlayer::HaveMetadata) {
-        m_movie-&gt;disableUnsupportedTracks(m_enabledTrackCount, m_totalTrackCount);
-        if (m_player-&gt;inMediaDocument()) {
-            if (!m_enabledTrackCount || m_enabledTrackCount != m_totalTrackCount) {
-                // This is a type of media that we do not handle directly with a &lt;video&gt; 
-                // element, eg. QuickTime VR, a movie with a sprite track, etc. Tell the 
-                // MediaPlayerClient that we won't support it.
-                sawUnsupportedTracks();
-                return;
-            }
-        } else if (!m_enabledTrackCount)
-            loadState = QTMovieLoadStateError;
-    }
-
-    // &quot;Loaded&quot; is reserved for fully buffered movies, never the case when streaming
-    if (loadState &gt;= QTMovieLoadStateComplete &amp;&amp; !m_isStreaming) {
-        m_networkState = MediaPlayer::Loaded;
-        m_readyState = MediaPlayer::HaveEnoughData;
-    } else if (loadState &gt;= QTMovieLoadStatePlaythroughOK) {
-        m_readyState = MediaPlayer::HaveEnoughData;
-    } else if (loadState &gt;= QTMovieLoadStatePlayable) {
-        // FIXME: This might not work correctly in streaming case, &lt;rdar://problem/5693967&gt;
-        m_readyState = currentTime() &lt; maxTimeLoaded() ? MediaPlayer::HaveFutureData : MediaPlayer::HaveCurrentData;
-    } else if (loadState &gt;= QTMovieLoadStateLoaded) {
-        m_readyState = MediaPlayer::HaveMetadata;
-    } else if (loadState &gt; QTMovieLoadStateError) {
-        m_networkState = MediaPlayer::Loading;
-        m_readyState = MediaPlayer::HaveNothing;        
-    } else {
-        if (m_player-&gt;inMediaDocument()) {
-            // Something went wrong in the loading of media within a standalone file. 
-            // This can occur with chained ref movies that eventually resolve to a
-            // file we don't support.
-            sawUnsupportedTracks();
-            return;
-        }
-
-        float loaded = maxTimeLoaded();
-        if (!loaded)
-            m_readyState = MediaPlayer::HaveNothing;
-
-        if (!m_enabledTrackCount)
-            m_networkState = MediaPlayer::FormatError;
-        else {
-            // FIXME: We should differentiate between load/network errors and decode errors &lt;rdar://problem/5605692&gt;
-            if (loaded &gt; 0)
-                m_networkState = MediaPlayer::DecodeError;
-            else
-                m_readyState = MediaPlayer::HaveNothing;
-        }
-    }
-
-    if (isReadyForRendering() &amp;&amp; !hasSetUpVideoRendering())
-        setUpVideoRendering();
-
-    if (seeking())
-        m_readyState = MediaPlayer::HaveNothing;
-    
-    if (m_networkState != oldNetworkState)
-        m_player-&gt;networkStateChanged();
-    if (m_readyState != oldReadyState)
-        m_player-&gt;readyStateChanged();
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::isReadyForRendering() const
-{
-    return m_readyState &gt;= MediaPlayer::HaveMetadata &amp;&amp; m_player-&gt;visible();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::sawUnsupportedTracks()
-{
-    m_movie-&gt;setDisabled(true);
-    m_hasUnsupportedTracks = true;
-    m_player-&gt;mediaPlayerClient()-&gt;mediaPlayerSawUnsupportedTracks(m_player);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::didEnd()
-{
-    if (m_hasUnsupportedTracks)
-        return;
-
-    m_startedPlaying = false;
-
-    updateStates();
-    m_player-&gt;timeChanged();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setSize(const IntSize&amp; size) 
-{ 
-    if (m_hasUnsupportedTracks || !m_movie || m_size == size)
-        return;
-    m_size = size;
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setVisible(bool visible)
-{
-    if (m_hasUnsupportedTracks || !m_movie || m_visible == visible)
-        return;
-
-    m_visible = visible;
-    if (m_visible) {
-        if (isReadyForRendering())
-            setUpVideoRendering();
-    } else
-        tearDownVideoRendering();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::paint(GraphicsContext* p, const IntRect&amp; r)
-{
-    MediaRenderingMode currentMode = currentRenderingMode();

-    if (currentMode == MediaRenderingNone)
-        return;
-
-    if (currentMode == MediaRenderingSoftwareRenderer &amp;&amp; !m_visualContext)
-        return;
-
-    QTPixelBuffer buffer = m_visualContext-&gt;imageForTime(0);
-    if (buffer.pixelBufferRef()) {
-        if (m_qtVideoLayer) {
-            // We are probably being asked to render the video into a canvas, but 
-            // there's a good chance the QTPixelBuffer is not ARGB and thus can't be
-            // drawn using CG.  If so, fire up an ICMDecompressionSession and convert 
-            // the current frame into something which can be rendered by CG.
-            if (!buffer.pixelFormatIs32ARGB() &amp;&amp; !buffer.pixelFormatIs32BGRA()) {
-                // The decompression session will only decompress a specific pixelFormat 
-                // at a specific width and height; if these differ, the session must be
-                // recreated with the new parameters.
-                if (!m_decompressionSession || !m_decompressionSession-&gt;canDecompress(buffer))
-                    m_decompressionSession = QTDecompressionSession::create(buffer.pixelFormatType(), buffer.width(), buffer.height());
-                buffer = m_decompressionSession-&gt;decompress(buffer);
-            }
-        }
-
-        CGImageRef image = CreateCGImageFromPixelBuffer(buffer);
-        
-        CGContextRef context = p-&gt;platformContext();
-        CGContextSaveGState(context);
-        CGContextTranslateCTM(context, r.x(), r.y());
-        CGContextTranslateCTM(context, 0, r.height());
-        CGContextScaleCTM(context, 1, -1);
-        CGContextDrawImage(context, CGRectMake(0, 0, r.width(), r.height()), image);
-        CGContextRestoreGState(context);
-
-        CGImageRelease(image);
-    }
-    paintCompleted(*p, r);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::paintCompleted(GraphicsContext&amp; context, const IntRect&amp; rect)
-{
-    m_newFrameAvailable = false;
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient::retrieveCurrentImageProc(void* refcon)
-{
-    static_cast&lt;MediaPlayerPrivateQuickTimeVisualContext*&gt;(refcon)-&gt;retrieveCurrentImage();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient::imageAvailableForTime(const QTCVTimeStamp* timeStamp)
-{
-    // This call may come in on another thread, so marshall to the main thread first:
-    callOnMainThread(&amp;retrieveCurrentImageProc, m_parent);
-
-    // callOnMainThread must be paired with cancelCallOnMainThread in the destructor,
-    // in case this object is deleted before the main thread request is handled.
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::visualContextTimerFired(Timer&lt;MediaPlayerPrivateQuickTimeVisualContext&gt;*)
-{
-    if (m_visualContext &amp;&amp; m_visualContext-&gt;isImageAvailableForTime(0))
-        retrieveCurrentImage();
-}
-
-static CFDictionaryRef QTCFDictionaryCreateWithDataCallback(CFAllocatorRef allocator, const UInt8* bytes, CFIndex length)
-{
-    RetainPtr&lt;CFDataRef&gt; data = adoptCF(CFDataCreateWithBytesNoCopy(allocator, bytes, length, kCFAllocatorNull));
-    if (!data)
-        return 0;
-
-    return reinterpret_cast&lt;CFDictionaryRef&gt;(CFPropertyListCreateFromXMLData(allocator, data.get(), kCFPropertyListImmutable, 0));
-}
-
-static CGImageRef CreateCGImageFromPixelBuffer(QTPixelBuffer buffer)
-{
-    CGDataProviderRef provider = 0;
-    CGColorSpaceRef colorSpace = 0;
-    CGImageRef image = 0;
-
-    size_t bitsPerComponent = 0;
-    size_t bitsPerPixel = 0;
-    CGImageAlphaInfo alphaInfo = kCGImageAlphaNone;
-        
-    if (buffer.pixelFormatIs32BGRA()) {
-        bitsPerComponent = 8;
-        bitsPerPixel = 32;
-        alphaInfo = (CGImageAlphaInfo)(kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little);
-    } else if (buffer.pixelFormatIs32ARGB()) {
-        bitsPerComponent = 8;
-        bitsPerPixel = 32;
-        alphaInfo = (CGImageAlphaInfo)(kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Big);
-    } else {
-        // All other pixel formats are currently unsupported:
-        ASSERT_NOT_REACHED();
-    }
-
-    CGDataProviderDirectAccessCallbacks callbacks = {
-        &amp;QTPixelBuffer::dataProviderGetBytePointerCallback,
-        &amp;QTPixelBuffer::dataProviderReleaseBytePointerCallback,
-        &amp;QTPixelBuffer::dataProviderGetBytesAtPositionCallback,
-        &amp;QTPixelBuffer::dataProviderReleaseInfoCallback,
-    };
-    
-    // Colorspace should be device, so that Quartz does not have to do an extra render.
-    colorSpace = CGColorSpaceCreateDeviceRGB();
-    require(colorSpace, Bail);
-            
-    provider = CGDataProviderCreateDirectAccess(buffer.pixelBufferRef(), buffer.dataSize(), &amp;callbacks);
-    require(provider, Bail);
-
-    // CGDataProvider does not retain the buffer, but it will release it later, so do an extra retain here:
-    QTPixelBuffer::retainCallback(buffer.pixelBufferRef());
-        
-    image = CGImageCreate(buffer.width(), buffer.height(), bitsPerComponent, bitsPerPixel, buffer.bytesPerRow(), colorSpace, alphaInfo, provider, 0, false, kCGRenderingIntentDefault);

-Bail:
-    // Once the image is created we can release our reference to the provider and the colorspace, they are retained by the image
-    if (provider)
-        CGDataProviderRelease(provider);
-    if (colorSpace)
-        CGColorSpaceRelease(colorSpace);

-    return image;
-}
-
-
-void MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage()
-{
-    if (!m_visualContext)
-        return;
-
-    if (m_qtVideoLayer) {
-
-        QTPixelBuffer buffer = m_visualContext-&gt;imageForTime(0);
-        if (!buffer.pixelBufferRef())
-            return;
-
-        PlatformCALayer* layer = m_qtVideoLayer.get();
-
-        if (!buffer.lockBaseAddress()) {
-            if (requiredDllsAvailable()) {
-                if (!m_imageQueue) {
-                    m_imageQueue = adoptPtr(new WKCAImageQueue(buffer.width(), buffer.height(), 30));
-                    m_imageQueue-&gt;setFlags(WKCAImageQueue::Fill, WKCAImageQueue::Fill);
-                    layer-&gt;setContents(m_imageQueue-&gt;get());
-                }
-
-                // Debug QuickTime links against a non-Debug version of CoreFoundation, so the
-                // CFDictionary attached to the CVPixelBuffer cannot be directly passed on into the
-                // CAImageQueue without being converted to a non-Debug CFDictionary.  Additionally,
-                // old versions of QuickTime used a non-AAS CoreFoundation, so the types are not 
-                // interchangable even in the release case.
-                RetainPtr&lt;CFDictionaryRef&gt; attachments = adoptCF(QTCFDictionaryCreateCopyWithDataCallback(kCFAllocatorDefault, buffer.attachments(), &amp;QTCFDictionaryCreateWithDataCallback));
-                CFTimeInterval imageTime = QTMovieVisualContext::currentHostTime();
-
-                m_imageQueue-&gt;collect();
-
-                uint64_t imageId = m_imageQueue-&gt;registerPixelBuffer(buffer.baseAddress(), buffer.dataSize(), buffer.bytesPerRow(), buffer.width(), buffer.height(), buffer.pixelFormatType(), attachments.get(), 0);
-
-                if (m_imageQueue-&gt;insertImage(imageTime, WKCAImageQueue::Buffer, imageId, WKCAImageQueue::Opaque | WKCAImageQueue::Flush, &amp;QTPixelBuffer::imageQueueReleaseCallback, buffer.pixelBufferRef())) {
-                    // Retain the buffer one extra time so it doesn't dissappear before CAImageQueue decides to release it:
-                    QTPixelBuffer::retainCallback(buffer.pixelBufferRef());
-                }
-
-            } else {
-                CGImageRef image = CreateCGImageFromPixelBuffer(buffer);
-                layer-&gt;setContents(image);
-                CGImageRelease(image);
-            }
-
-            buffer.unlockBaseAddress();
-            layer-&gt;setNeedsCommit();
-        }
-    } else
-        m_player-&gt;repaint();
-
-    m_visualContext-&gt;task();
-}
-
-static HashSet&lt;String&gt; mimeTypeCache()
-{
-    DEFINE_STATIC_LOCAL(HashSet&lt;String&gt;, typeCache, ());
-    static bool typeListInitialized = false;
-
-    if (!typeListInitialized) {
-        unsigned count = QTMovie::countSupportedTypes();
-        for (unsigned n = 0; n &lt; count; n++) {
-            const UChar* character;
-            unsigned len;
-            QTMovie::getSupportedType(n, character, len);
-            if (len)
-                typeCache.add(String(character, len));
-        }
-
-        typeListInitialized = true;
-    }
-    
-    return typeCache;
-}
-
-static CFStringRef createVersionStringFromModuleName(LPCWSTR moduleName)
-{
-    HMODULE module = GetModuleHandleW(moduleName);
-    if (!module) 
-        return 0;
-
-    wchar_t filePath[MAX_PATH] = {0};
-    if (!GetModuleFileNameW(module, filePath, MAX_PATH)) 
-        return 0;
-
-    DWORD versionInfoSize = GetFileVersionInfoSizeW(filePath, 0);
-    if (!versionInfoSize)
-        return 0;
-
-    CFStringRef versionString = 0;
-    void* versionInfo = calloc(versionInfoSize, sizeof(char));
-    if (GetFileVersionInfo(filePath, 0, versionInfoSize, versionInfo)) {
-        VS_FIXEDFILEINFO* fileInfo = 0;
-        UINT fileInfoLength = 0;
-
-        if (VerQueryValueW(versionInfo, L&quot;\\&quot;, reinterpret_cast&lt;LPVOID*&gt;(&amp;fileInfo), &amp;fileInfoLength)) {
-            versionString = CFStringCreateWithFormat(kCFAllocatorDefault, 0, CFSTR(&quot;%d.%d.%d.%d&quot;), 
-                HIWORD(fileInfo-&gt;dwFileVersionMS), LOWORD(fileInfo-&gt;dwFileVersionMS), 
-                HIWORD(fileInfo-&gt;dwFileVersionLS), LOWORD(fileInfo-&gt;dwFileVersionLS));
-        }
-    }
-    free(versionInfo);
-
-    return versionString;
-}
-
-static bool requiredDllsAvailable() 
-{
-    static bool s_prerequisitesChecked = false;
-    static bool s_prerequisitesSatisfied;
-    static const CFStringRef kMinQuartzCoreVersion = CFSTR(&quot;1.0.42.0&quot;);
-    static const CFStringRef kMinCoreVideoVersion = CFSTR(&quot;1.0.1.0&quot;);
-
-    if (s_prerequisitesChecked)
-        return s_prerequisitesSatisfied;
-    s_prerequisitesChecked = true;
-    s_prerequisitesSatisfied = false;
-
-    CFStringRef quartzCoreString = createVersionStringFromModuleName(L&quot;QuartzCore&quot;);
-    if (!quartzCoreString)
-        quartzCoreString = createVersionStringFromModuleName(L&quot;QuartzCore_debug&quot;);
-
-    CFStringRef coreVideoString = createVersionStringFromModuleName(L&quot;CoreVideo&quot;);
-    if (!coreVideoString)
-        coreVideoString = createVersionStringFromModuleName(L&quot;CoreVideo_debug&quot;);
-
-    s_prerequisitesSatisfied = (quartzCoreString &amp;&amp; coreVideoString
-        &amp;&amp; CFStringCompare(quartzCoreString, kMinQuartzCoreVersion, kCFCompareNumerically) != kCFCompareLessThan 
-        &amp;&amp; CFStringCompare(coreVideoString, kMinCoreVideoVersion, kCFCompareNumerically) != kCFCompareLessThan);
-
-    if (quartzCoreString)
-        CFRelease(quartzCoreString);
-    if (coreVideoString)
-        CFRelease(coreVideoString);
-
-    return s_prerequisitesSatisfied;
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::getSupportedTypes(HashSet&lt;String&gt;&amp; types)
-{
-    types = mimeTypeCache();
-} 
-
-bool MediaPlayerPrivateQuickTimeVisualContext::isAvailable()
-{
-#ifdef DEBUG_ALL
-    return false;
-#else
-    return QTMovie::initializeQuickTime();
-#endif
-}
-
-MediaPlayer::SupportsType MediaPlayerPrivateQuickTimeVisualContext::supportsType(const MediaEngineSupportParameters&amp; parameters)
-{
-    // only return &quot;IsSupported&quot; if there is no codecs parameter for now as there is no way to ask QT if it supports an
-    //  extended MIME type
-    return mimeTypeCache().contains(parameters.type) ? (parameters.codecs.isEmpty() ? MediaPlayer::MayBeSupported : MediaPlayer::IsSupported) : MediaPlayer::IsNotSupported;
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::MovieClient::movieEnded(QTMovie* movie)
-{
-    if (m_parent-&gt;m_hasUnsupportedTracks)
-        return;
-
-    m_parent-&gt;m_visualContextTimer.stop();
-
-    ASSERT(m_parent-&gt;m_movie.get() == movie);
-    m_parent-&gt;didEnd();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::MovieClient::movieLoadStateChanged(QTMovie* movie)
-{
-    if (m_parent-&gt;m_hasUnsupportedTracks)
-        return;
-
-    ASSERT(m_parent-&gt;m_movie.get() == movie);
-    m_parent-&gt;updateStates();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::MovieClient::movieTimeChanged(QTMovie* movie)
-{
-    if (m_parent-&gt;m_hasUnsupportedTracks)
-        return;
-
-    ASSERT(m_parent-&gt;m_movie.get() == movie);
-    m_parent-&gt;updateStates();
-    m_parent-&gt;m_player-&gt;timeChanged();
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::hasSingleSecurityOrigin() const
-{
-    // We tell quicktime to disallow resources that come from different origins
-    // so we all media is single origin.
-    return true;
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setPreload(MediaPlayer::Preload preload)
-{
-    m_preload = preload;
-    if (m_delayingLoad &amp;&amp; m_preload != MediaPlayer::None)
-        resumeLoad();
-}
-
-float MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue(float timeValue) const
-{
-    long timeScale;
-    if (m_readyState &lt; MediaPlayer::HaveMetadata || !(timeScale = m_movie-&gt;timeScale()))
-        return timeValue;
-
-    long mediaTimeValue = lroundf(timeValue * timeScale);
-    return static_cast&lt;float&gt;(mediaTimeValue) / timeScale;
-}
-
-MediaPlayerPrivateQuickTimeVisualContext::MediaRenderingMode MediaPlayerPrivateQuickTimeVisualContext::currentRenderingMode() const
-{
-    if (!m_movie)
-        return MediaRenderingNone;
-
-    if (m_qtVideoLayer)
-        return MediaRenderingMovieLayer;
-
-    return m_visualContext ? MediaRenderingSoftwareRenderer : MediaRenderingNone;
-}
-
-MediaPlayerPrivateQuickTimeVisualContext::MediaRenderingMode MediaPlayerPrivateQuickTimeVisualContext::preferredRenderingMode() const
-{
-    if (!m_player-&gt;frameView() || !m_movie)
-        return MediaRenderingNone;
-
-    if (supportsAcceleratedRendering() &amp;&amp; m_player-&gt;mediaPlayerClient()-&gt;mediaPlayerRenderingCanBeAccelerated(m_player))
-        return MediaRenderingMovieLayer;
-
-    return MediaRenderingSoftwareRenderer;
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setUpVideoRendering()
-{
-    MediaRenderingMode currentMode = currentRenderingMode();
-    MediaRenderingMode preferredMode = preferredRenderingMode();
-
-    if (currentMode == preferredMode &amp;&amp; currentMode != MediaRenderingNone)
-        return;
-
-    if (currentMode != MediaRenderingNone)  
-        tearDownVideoRendering();
-
-    if (preferredMode == MediaRenderingMovieLayer)
-        createLayerForMovie();
-
-    if (currentMode == MediaRenderingMovieLayer || preferredMode == MediaRenderingMovieLayer)
-        m_player-&gt;mediaPlayerClient()-&gt;mediaPlayerRenderingModeChanged(m_player);
-
-    QTPixelBuffer::Type contextType = requiredDllsAvailable() &amp;&amp; preferredMode == MediaRenderingMovieLayer ? QTPixelBuffer::ConfigureForCAImageQueue : QTPixelBuffer::ConfigureForCGImage;
-    m_visualContext = QTMovieVisualContext::create(m_visualContextClient.get(), contextType);
-    m_visualContext-&gt;setMovie(m_movie.get());
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::tearDownVideoRendering()
-{
-    if (m_qtVideoLayer)
-        destroyLayerForMovie();
-
-    m_visualContext = 0;
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::hasSetUpVideoRendering() const
-{
-    return m_qtVideoLayer || (currentRenderingMode() != MediaRenderingMovieLayer &amp;&amp; m_visualContext);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::retrieveAndResetMovieTransform()
-{
-    // First things first, reset the total movie transform so that
-    // we can bail out early:
-    m_movieTransform = CGAffineTransformIdentity;
-
-    if (!m_movie || !m_movie-&gt;hasVideo())
-        return;
-
-    // This trick will only work on movies with a single video track,
-    // so bail out early if the video contains more than one (or zero)
-    // video tracks.
-    QTTrackArray videoTracks = m_movie-&gt;videoTracks();
-    if (videoTracks.size() != 1)
-        return;
-
-    QTTrack* track = videoTracks[0].get();
-    ASSERT(track);
-
-    CGAffineTransform movieTransform = m_movie-&gt;getTransform();
-    if (!CGAffineTransformEqualToTransform(movieTransform, CGAffineTransformIdentity))
-        m_movie-&gt;resetTransform();
-
-    CGAffineTransform trackTransform = track-&gt;getTransform();
-    if (!CGAffineTransformEqualToTransform(trackTransform, CGAffineTransformIdentity))
-        track-&gt;resetTransform();
-
-    // Multiply the two transforms together, taking care to 
-    // do so in the correct order, track * movie = final:
-    m_movieTransform = CGAffineTransformConcat(trackTransform, movieTransform);
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie()
-{
-    ASSERT(supportsAcceleratedRendering());
-
-    if (!m_movie || m_qtVideoLayer)
-        return;
-
-    // Create a PlatformCALayer which will transform the contents of the video layer
-    // which is in m_qtVideoLayer.
-    m_transformLayer = PlatformCALayerWin::create(PlatformCALayer::LayerTypeLayer, m_layerClient.get());
-    if (!m_transformLayer)
-        return;
-
-    // Mark the layer as anchored in the top left.
-    m_transformLayer-&gt;setAnchorPoint(FloatPoint3D());
-
-    m_qtVideoLayer = PlatformCALayerWin::create(PlatformCALayer::LayerTypeLayer, 0);
-    if (!m_qtVideoLayer)
-        return;
-
-    if (CGAffineTransformEqualToTransform(m_movieTransform, CGAffineTransformIdentity))
-        retrieveAndResetMovieTransform();
-    CGAffineTransform t = m_movieTransform;
-
-    // Remove the translation portion of the transform, since we will always rotate about
-    // the layer's center point.  In our limited use-case (a single video track), this is
-    // safe:
-    t.tx = t.ty = 0;
-    m_qtVideoLayer-&gt;setTransform(CATransform3DMakeAffineTransform(t));
-
-#ifndef NDEBUG
-    m_qtVideoLayer-&gt;setName(&quot;Video layer&quot;);
-#endif
-    m_transformLayer-&gt;appendSublayer(m_qtVideoLayer.get());
-    m_transformLayer-&gt;setNeedsLayout();
-    // The layer will get hooked up via RenderLayerBacking::updateGraphicsLayerConfiguration().
-
-    // Fill the newly created layer with image data, so we're not looking at 
-    // an empty layer until the next time a new image is available, which could
-    // be a long time if we're paused.
-    if (m_visualContext)
-        retrieveCurrentImage();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::destroyLayerForMovie()
-{
-    if (m_qtVideoLayer) {
-        m_qtVideoLayer-&gt;removeFromSuperlayer();
-        m_qtVideoLayer = 0;
-    }
-
-    if (m_transformLayer)
-        m_transformLayer = 0;
-
-    if (m_imageQueue)
-        m_imageQueue = nullptr;
-}
-
-bool MediaPlayerPrivateQuickTimeVisualContext::supportsAcceleratedRendering() const
-{
-    return isReadyForRendering();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::acceleratedRenderingStateChanged()
-{
-    // Set up or change the rendering path if necessary.
-    setUpVideoRendering();
-}
-
-void MediaPlayerPrivateQuickTimeVisualContext::setPrivateBrowsingMode(bool privateBrowsing)
-{
-    m_privateBrowsing = privateBrowsing;
-    if (m_movie)
-        m_movie-&gt;setPrivateBrowsingMode(m_privateBrowsing);
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinMediaPlayerPrivateQuickTimeVisualContexth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,207 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010, 2011 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 COMPUTER, 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 COMPUTER, 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 MediaPlayerPrivateQuickTimeVisualContext_h
-#define MediaPlayerPrivateQuickTimeVisualContext_h
-
-#if ENABLE(VIDEO)
-
-#include &quot;MediaPlayerPrivate.h&quot;
-#include &quot;Timer.h&quot;
-#include &lt;CoreGraphics/CGAffineTransform.h&gt;
-#include &lt;wtf/Forward.h&gt;
-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/RetainPtr.h&gt;
-
-#ifndef DRAW_FRAME_RATE
-#define DRAW_FRAME_RATE 0
-#endif
-
-typedef struct CGImage *CGImageRef;
-class QTMovie;
-class QTMovieVisualContext;
-class QTDecompressionSession;
-
-namespace WebCore {
-
-class GraphicsContext;
-class IntSize;
-class IntRect;
-class PlatformCALayer;
-class WKCAImageQueue;
-
-class MediaPlayerPrivateQuickTimeVisualContext : public MediaPlayerPrivateInterface {
-public:
-    static void registerMediaEngine(MediaEngineRegistrar);
-
-    ~MediaPlayerPrivateQuickTimeVisualContext();
-
-private:
-    MediaPlayerPrivateQuickTimeVisualContext(MediaPlayer*);
-
-    virtual bool supportsFullscreen() const;
-    virtual PlatformMedia platformMedia() const;
-    virtual PlatformLayer* platformLayer() const;
-
-    IntSize naturalSize() const;
-    bool hasVideo() const;
-    bool hasAudio() const;
-
-    void load(const String&amp; url);
-    void cancelLoad();
-    void loadInternal(const String&amp; url);
-    void resumeLoad();
-    
-    void play();
-    void pause();    
-    void prepareToPlay();
-    
-    bool paused() const;
-    bool seeking() const;
-    
-    float duration() const;
-    float currentTime() const;
-    void seek(float time);
-    
-    void setRate(float);
-    void setVolume(float);
-    void setPreservesPitch(bool);
-    
-    MediaPlayer::NetworkState networkState() const { return m_networkState; }
-    MediaPlayer::ReadyState readyState() const { return m_readyState; }
-    
-    std::unique_ptr&lt;PlatformTimeRanges&gt; buffered() const;
-    float maxTimeSeekable() const;
-    bool didLoadingProgress() const;
-    unsigned totalBytes() const;
-    
-    void setVisible(bool);
-    void setSize(const IntSize&amp;);
-    
-    void loadStateChanged();
-    void didEnd();
-    
-    void paint(GraphicsContext*, const IntRect&amp;);
-    void paintCompleted(GraphicsContext&amp;, const IntRect&amp;);
-
-    bool hasSingleSecurityOrigin() const;
-
-    bool hasClosedCaptions() const;
-    void setClosedCaptionsVisible(bool);
-
-    void setPreload(MediaPlayer::Preload);
-
-    void updateStates();
-    void doSeek();
-    void cancelSeek();
-    void seekTimerFired(Timer&lt;MediaPlayerPrivateQuickTimeVisualContext&gt;*);
-    float maxTimeLoaded() const;
-    void sawUnsupportedTracks();
-
-    // engine support
-    static PassOwnPtr&lt;MediaPlayerPrivateInterface&gt; create(MediaPlayer*);
-    static void getSupportedTypes(HashSet&lt;String&gt;&amp; types);
-    static MediaPlayer::SupportsType supportsType(const MediaEngineSupportParameters&amp;);
-    static bool isAvailable();
-
-    virtual bool supportsAcceleratedRendering() const;
-    virtual void acceleratedRenderingStateChanged();
-
-    enum MediaRenderingMode { MediaRenderingNone, MediaRenderingSoftwareRenderer, MediaRenderingMovieLayer };
-    MediaRenderingMode currentRenderingMode() const;
-    MediaRenderingMode preferredRenderingMode() const;
-    bool isReadyForRendering() const;
-
-    void setUpVideoRendering();
-    void tearDownVideoRendering();
-    bool hasSetUpVideoRendering() const;
-
-    void createLayerForMovie();
-    void destroyLayerForMovie();
-
-    void setUpCookiesForQuickTime(const String&amp; url);
-    String rfc2616DateStringFromTime(CFAbsoluteTime);
-
-    void visualContextTimerFired(Timer&lt;MediaPlayerPrivateQuickTimeVisualContext&gt;*);
-    void retrieveCurrentImage();
-
-    virtual void setPrivateBrowsingMode(bool);
-
-    virtual String engineDescription() const { return &quot;QuickTime&quot;; }
-
-    class MovieClient;
-    friend class MovieClient;
-    OwnPtr&lt;MovieClient&gt; m_movieClient;
-
-    class LayerClient;
-    friend class LayerClient;
-    OwnPtr&lt;LayerClient&gt; m_layerClient;
-
-    class VisualContextClient;
-    friend class VisualContextClient;
-    OwnPtr&lt;VisualContextClient&gt; m_visualContextClient;
-
-    void retrieveAndResetMovieTransform();
-
-    virtual float mediaTimeForTimeValue(float) const;
-
-    MediaPlayer* m_player;
-    RefPtr&lt;QTMovie&gt; m_movie;
-    RefPtr&lt;PlatformCALayer&gt; m_qtVideoLayer;
-    RefPtr&lt;PlatformCALayer&gt; m_transformLayer;
-    OwnPtr&lt;WKCAImageQueue&gt; m_imageQueue;
-    OwnPtr&lt;QTDecompressionSession&gt; m_decompressionSession;
-    CGAffineTransform m_movieTransform; 
-    RefPtr&lt;QTMovieVisualContext&gt; m_visualContext;
-    float m_seekTo;
-    Timer&lt;MediaPlayerPrivateQuickTimeVisualContext&gt; m_seekTimer;
-    Timer&lt;MediaPlayerPrivateQuickTimeVisualContext&gt; m_visualContextTimer;
-    IntSize m_size;
-    MediaPlayer::NetworkState m_networkState;
-    MediaPlayer::ReadyState m_readyState;
-    unsigned m_enabledTrackCount;
-    unsigned m_totalTrackCount;
-    bool m_hasUnsupportedTracks;
-    bool m_startedPlaying;
-    bool m_isStreaming;
-    bool m_visible;
-    bool m_newFrameAvailable;
-    bool m_delayingLoad;
-    String m_movieURL;
-    bool m_privateBrowsing;
-    MediaPlayer::Preload m_preload;
-    mutable float m_maxTimeLoadedAtLastDidLoadingProgress;
-#if DRAW_FRAME_RATE
-    double m_frameCountWhilePlaying;
-    double m_timeStartedPlaying;
-    double m_timeStoppedPlaying;
-#endif
-
-};
-
-}
-
-#endif
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTCFDictionarycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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;QTCFDictionary.h&quot;
-
-#include &lt;CFData.h&gt;
-#include &lt;windows.h&gt;
-
-CFDataRef QTCFPropertyListCreateXMLData(CFAllocatorRef allocator, CFPropertyListRef propertyList)
-{
-
-    typedef CFDataRef (* pfnCFPropertyListCreateXMLData)(CFAllocatorRef allocator, CFPropertyListRef propertyList);
-    static pfnCFPropertyListCreateXMLData pCFPropertyListCreateXMLData = 0;
-    if (!pCFPropertyListCreateXMLData) {
-        HMODULE qtcfDLL = LoadLibraryW(L&quot;QTCF.dll&quot;);
-        if (qtcfDLL)
-            pCFPropertyListCreateXMLData = reinterpret_cast&lt;pfnCFPropertyListCreateXMLData&gt;(GetProcAddress(qtcfDLL, &quot;QTCF_CFPropertyListCreateXMLData&quot;));
-    }
-
-    if (pCFPropertyListCreateXMLData)
-        return pCFPropertyListCreateXMLData(allocator, propertyList);
-    return 0;
-}
-
-CFDictionaryRef QTCFDictionaryCreateCopyWithDataCallback(CFAllocatorRef allocator, CFDictionaryRef dictionary, QTCFDictonaryCreateFromDataCallback callback) 
-{
-    ASSERT(dictionary);
-    ASSERT(callback);
-
-    CFDataRef data = QTCFPropertyListCreateXMLData(kCFAllocatorDefault, dictionary);
-    if (!data)
-        return 0;
-    CFDictionaryRef outputDictionary = callback(allocator, CFDataGetBytePtr(data), CFDataGetLength(data));
-    CFRelease(data);
-
-    return outputDictionary;
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTCFDictionaryh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTCFDictionary.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTCFDictionary_h
-#define QTCFDictionary_h
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-#include &lt;CoreFoundation/CFBase.h&gt;
-
-typedef const struct __CFDictionary * CFDictionaryRef;
-typedef const struct __CFAllocator * CFAllocatorRef;
-
-typedef CFDictionaryRef (* QTCFDictonaryCreateFromDataCallback)(CFAllocatorRef, const UInt8*, CFIndex);
-
-QTMOVIEWIN_API CFDictionaryRef QTCFDictionaryCreateCopyWithDataCallback(CFAllocatorRef, CFDictionaryRef, QTCFDictonaryCreateFromDataCallback);
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTDecompressionSessioncpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,170 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 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 COMPUTER, 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 COMPUTER, 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;QTDecompressionSession.h&quot;
-
-#include &lt;ImageCompression.h&gt;
-#include &lt;algorithm&gt;
-
-class QTDecompressionSessionClient {
-public:
-    static void trackingCallback(void *decompressionTrackingRefCon, OSStatus, 
-        ICMDecompressionTrackingFlags decompressionTrackingFlags, CVPixelBufferRef pixelBuffer, 
-        TimeValue64, TimeValue64, ICMValidTimeFlags, void *, void *)
-    {
-        QTDecompressionSession* session = static_cast&lt;QTDecompressionSession*&gt;(decompressionTrackingRefCon);
-        ASSERT(session);
-
-        if (decompressionTrackingFlags &amp; kICMDecompressionTracking_FrameDecoded)
-            session-&gt;m_latestFrame = QTPixelBuffer(pixelBuffer);
-    }
-};
-
-PassOwnPtr&lt;QTDecompressionSession&gt; QTDecompressionSession::create(unsigned long pixelFormat, size_t width, size_t height)
-{
-    return adoptPtr(new QTDecompressionSession(pixelFormat, width, height));
-}
-
-QTDecompressionSession::QTDecompressionSession(unsigned long pixelFormat, size_t width, size_t height)
-    : m_session(0)
-    , m_pixelFormat(pixelFormat)
-    , m_width(width)
-    , m_height(height)
-{
-    initializeSession();
-}
-
-QTDecompressionSession::~QTDecompressionSession()
-{
-    if (m_session)
-        ICMDecompressionSessionRelease(m_session);
-}
-
-void QTDecompressionSession::initializeSession()
-{
-    if (m_session)
-        return;
-
-    ICMPixelFormatInfo pixelFormatInfo = {sizeof(ICMPixelFormatInfo), 0};
-    if (ICMGetPixelFormatInfo(m_pixelFormat, &amp;pixelFormatInfo) != noErr) {
-        // The ICM does not know anything about the pixelFormat contained in
-        // the pixel buffer, so it won't be able to convert it to RGBA.  
-        return;
-    }
-
-    // The depth and cType fields of the ImageDescriptionHandle are filled 
-    // out according to the instructions in Technical Q&amp;A QA1183: 
-    // http://developer.apple.com/library/mac/#qa/qa2001/qa1183.html
-    bool isIndexed = pixelFormatInfo.formatFlags &amp; kICMPixelFormatIsIndexed;
-    bool isQD = pixelFormatInfo.formatFlags &amp; kICMPixelFormatIsSupportedByQD;
-    bool isMonochrome = pixelFormatInfo.formatFlags &amp; kICMPixelFormatIsMonochrome;
-    bool hasAlpha = pixelFormatInfo.formatFlags &amp; kICMPixelFormatHasAlphaChannel;
-
-    unsigned int depth = 24; // The default depth is 24.
-    if (hasAlpha)
-        depth = 32; // Any pixel format with alpha gets a depth of 32.
-    else if (isMonochrome) {
-        // Grayscale pixel formats get depths 33 through 40, depending
-        // on their bits per pixel. Yes, this means that 16-bit grayscale
-        // and 8-bit grayscale have the same pixel depth.
-        depth = 32 + std::min&lt;unsigned int&gt;(8, pixelFormatInfo.bitsPerPixel[0]);
-    } else if (isIndexed) {
-        // Indexed pixel formats get a depth of 1 through 8, depending on
-        // the their bits per pixel.
-        depth = pixelFormatInfo.bitsPerPixel[0]; 
-    }
-
-    // If QuickDraw supports the given pixel format, the cType should be kRawCodecType.
-    // Otherwise, use the pixel format code for the cType.  We are assuming the pixel 
-    // buffer is uncompressed.
-    unsigned long cType = isQD ? kRawCodecType : m_pixelFormat;
-
-    ImageDescriptionHandle description = (ImageDescriptionHandle)NewHandleClear(sizeof(ImageDescription));
-    (**description).idSize = sizeof(ImageDescription);
-    (**description).cType = cType;
-    (**description).version = 2;
-    (**description).spatialQuality = codecLosslessQuality;
-    (**description).width = m_width;
-    (**description).height = m_height;
-    (**description).hRes = 72 &lt;&lt; 16; // 72 DPI as a fixed-point number
-    (**description).vRes = 72 &lt;&lt; 16; // 72 DPI as a fixed-point number
-    (**description).frameCount = 1;
-    (**description).depth =  depth;
-    (**description).clutID = -1;
-
-    // Create the mandatory ICMDecompressionSessionOptions, but leave
-    // all the default values.
-    ICMDecompressionSessionOptionsRef options = 0;
-    ICMDecompressionSessionOptionsCreate(kCFAllocatorDefault, &amp;options);
-
-    CFDictionaryRef pixelBufferAttributes = QTPixelBuffer::createPixelBufferAttributesDictionary(QTPixelBuffer::ConfigureForCGImage);
-
-    ICMDecompressionTrackingCallbackRecord callback = {
-        QTDecompressionSessionClient::trackingCallback,
-        this,
-    };
-
-    ICMDecompressionSessionCreate(kCFAllocatorDefault,
-        description,
-        options,
-        pixelBufferAttributes,
-        &amp;callback,
-        &amp;m_session);
-
-    if (pixelBufferAttributes)
-        CFRelease(pixelBufferAttributes);
-
-    ICMDecompressionSessionOptionsRelease(options);
-    DisposeHandle((Handle)description);
-}
-
-bool QTDecompressionSession::canDecompress(QTPixelBuffer inBuffer)
-{
-    return m_session 
-        &amp;&amp; inBuffer.pixelFormatType() == m_pixelFormat 
-        &amp;&amp; inBuffer.width() == m_width
-        &amp;&amp; inBuffer.height() == m_height;
-}
-
-QTPixelBuffer QTDecompressionSession::decompress(QTPixelBuffer inBuffer)
-{
-    if (!canDecompress(inBuffer))
-        return QTPixelBuffer();
-    
-    inBuffer.lockBaseAddress();
-    ICMDecompressionSessionDecodeFrame(m_session,
-        static_cast&lt;UInt8*&gt;(inBuffer.baseAddress()),
-        inBuffer.dataSize(),
-        0, // frameOptions
-        0, // frameTime
-        0); // sourceFrameRefCon
-
-    // Because we passed in 0 for frameTime, the above function
-    // is synchronous, and the client callback will have been
-    // called before the function returns, and m_latestFrame
-    // will contain the newly decompressed frame.
-    return m_latestFrame;
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTDecompressionSessionh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTDecompressionSession.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 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 COMPUTER, 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 COMPUTER, 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 QTDecompressionSession_h
-#define QTDecompressionSession_h
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-#include &quot;QTPixelBuffer.h&quot;
-
-#include &lt;wtf/PassOwnPtr.h&gt;
-
-class QTDecompressionSessionClient;
-typedef struct OpaqueICMDecompressionSession*  ICMDecompressionSessionRef;
-
-class QTMOVIEWIN_API QTDecompressionSession {
-public:
-    static PassOwnPtr&lt;QTDecompressionSession&gt; create(unsigned long pixelFormat, size_t width, size_t height);
-    ~QTDecompressionSession();
-
-    bool canDecompress(QTPixelBuffer);
-
-    // The resulting QTPixelBuffer will be a CG compatable ARGB pixel buffer.
-    QTPixelBuffer decompress(QTPixelBuffer);
-
-private:
-    friend class QTDecompressionSessionClient;
-    QTDecompressionSession(unsigned long pixelFormat, size_t width, size_t height);
-    void initializeSession();
-
-    unsigned long m_pixelFormat;
-    size_t m_width;
-    size_t m_height;
-    QTPixelBuffer m_latestFrame;
-    ICMDecompressionSessionRef m_session;
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMoviecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovie.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovie.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovie.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,924 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010, 2011 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 COMPUTER, 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 COMPUTER, 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;QTMovie.h&quot;
-
-#include &quot;QTMovieTask.h&quot;
-#include &quot;QTMovieWinTimer.h&quot;
-#include &lt;FixMath.h&gt;
-#include &lt;GXMath.h&gt;
-#include &lt;Movies.h&gt;
-#include &lt;QTML.h&gt;
-#include &lt;QuickTimeComponents.h&gt;
-#include &lt;WebKitSystemInterface/WebKitSystemInterface.h&gt;
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/MathExtras.h&gt;
-#include &lt;wtf/Noncopyable.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-using namespace std;
-
-static const long minimumQuickTimeVersion = 0x07300000; // 7.3
-
-static const long closedCaptionTrackType = 'clcp';
-static const long subTitleTrackType = 'sbtl';
-static const long mpeg4ObjectDescriptionTrackType = 'odsm';
-static const long mpeg4SceneDescriptionTrackType = 'sdsm';
-static const long closedCaptionDisplayPropertyID = 'disp';
-
-// Resizing GWorlds is slow, give them a minimum size so size of small 
-// videos can be animated smoothly
-static const int cGWorldMinWidth = 640;
-static const int cGWorldMinHeight = 360;
-
-static const float cNonContinuousTimeChange = 0.2f;
-
-union UppParam {
-    long longValue;
-    void* ptr;
-};
-
-static CFMutableArrayRef gSupportedTypes = 0;
-static SInt32 quickTimeVersion = 0;
-
-class QTMoviePrivate : public QTMovieTaskClient {
-    WTF_MAKE_NONCOPYABLE(QTMoviePrivate);
-public:
-    QTMoviePrivate();
-    ~QTMoviePrivate();
-    void task();
-    void startTask();
-    void endTask();
-
-    void createMovieController();
-    void cacheMovieScale();
-
-    QTMovie* m_movieWin;
-    Movie m_movie;
-    MovieController m_movieController;
-    bool m_tasking;
-    bool m_disabled;
-    Vector&lt;QTMovieClient*&gt; m_clients;
-    long m_loadState;
-    bool m_ended;
-    bool m_seeking;
-    float m_lastMediaTime;
-    double m_lastLoadStateCheckTime;
-    int m_width;
-    int m_height;
-    bool m_visible;
-    long m_loadError;
-    float m_widthScaleFactor;
-    float m_heightScaleFactor;
-    CFURLRef m_currentURL;
-    float m_timeToRestore;
-    float m_rateToRestore;
-    bool m_privateBrowsing;
-#if !ASSERT_DISABLED
-    bool m_scaleCached;
-#endif
-};
-
-QTMoviePrivate::QTMoviePrivate()
-    : m_movieWin(0)
-    , m_movie(0)
-    , m_movieController(0)
-    , m_tasking(false)
-    , m_loadState(0)
-    , m_ended(false)
-    , m_seeking(false)
-    , m_lastMediaTime(0)
-    , m_lastLoadStateCheckTime(0)
-    , m_width(0)
-    , m_height(0)
-    , m_visible(false)
-    , m_loadError(0)
-    , m_widthScaleFactor(1)
-    , m_heightScaleFactor(1)
-    , m_currentURL(0)
-    , m_timeToRestore(-1.0f)
-    , m_rateToRestore(-1.0f)
-    , m_disabled(false)
-    , m_privateBrowsing(false)
-#if !ASSERT_DISABLED
-    , m_scaleCached(false)
-#endif
-{
-}
-
-QTMoviePrivate::~QTMoviePrivate()
-{
-    endTask();
-    if (m_movieController)
-        DisposeMovieController(m_movieController);
-    if (m_movie)
-        DisposeMovie(m_movie);
-    if (m_currentURL)
-        CFRelease(m_currentURL);
-}
-
-void QTMoviePrivate::startTask() 
-{
-    if (!m_tasking) {
-        QTMovieTask::sharedTask()-&gt;addTaskClient(this);
-        m_tasking = true;
-    }
-    QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-void QTMoviePrivate::endTask() 
-{
-    if (m_tasking) {
-        QTMovieTask::sharedTask()-&gt;removeTaskClient(this);
-        m_tasking = false;
-    }
-    QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-void QTMoviePrivate::task() 
-{
-    ASSERT(m_tasking);
-
-    if (!m_loadError) {
-        if (m_movieController)
-            MCIdle(m_movieController);
-        else
-            MoviesTask(m_movie, 0);
-    }
-
-    // GetMovieLoadState documentation says that you should not call it more often than every quarter of a second.
-    if (systemTime() &gt;= m_lastLoadStateCheckTime + 0.25 || m_loadError) { 
-        // If load fails QT's load state is QTMovieLoadStateComplete.
-        // This is different from QTKit API and seems strange.
-        long loadState = m_loadError ? QTMovieLoadStateError : GetMovieLoadState(m_movie);
-        if (loadState != m_loadState) {
-            // we only need to erase the movie gworld when the load state changes to loaded while it
-            //  is visible as the gworld is destroyed/created when visibility changes
-            bool shouldRestorePlaybackState = false;
-            bool movieNewlyPlayable = loadState &gt;= QTMovieLoadStateLoaded &amp;&amp; m_loadState &lt; QTMovieLoadStateLoaded;
-            m_loadState = loadState;
-            if (movieNewlyPlayable) {
-                cacheMovieScale();
-                shouldRestorePlaybackState = true;
-            }
-
-            if (!m_movieController &amp;&amp; m_loadState &gt;= QTMovieLoadStateLoaded)
-                createMovieController();
-
-            for (size_t i = 0; i &lt; m_clients.size(); ++i)
-                m_clients[i]-&gt;movieLoadStateChanged(m_movieWin);
-            
-            if (shouldRestorePlaybackState &amp;&amp; m_timeToRestore != -1.0f) {
-                m_movieWin-&gt;setCurrentTime(m_timeToRestore);
-                m_timeToRestore = -1.0f;
-                m_movieWin-&gt;setRate(m_rateToRestore);
-                m_rateToRestore = -1.0f;
-            }
-
-            if (m_disabled) {
-                endTask();
-                return;
-            }
-        }
-        m_lastLoadStateCheckTime = systemTime();
-    }
-
-    bool ended = !!IsMovieDone(m_movie);
-    if (ended != m_ended) {
-        m_ended = ended;
-        if (ended) {
-            for (size_t i = 0; i &lt; m_clients.size(); ++i)
-               m_clients[i]-&gt;movieEnded(m_movieWin);
-        }
-    }
-
-    float time = m_movieWin-&gt;currentTime();
-    if (time &lt; m_lastMediaTime || time &gt;= m_lastMediaTime + cNonContinuousTimeChange || m_seeking) {
-        m_seeking = false;
-        for (size_t i = 0; i &lt; m_clients.size(); ++i)
-            m_clients[i]-&gt;movieTimeChanged(m_movieWin);
-    }
-    m_lastMediaTime = time;
-
-    if (m_loadError)
-        endTask();
-    else
-        QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-void QTMoviePrivate::createMovieController()
-{
-    Rect bounds;
-    long flags;
-
-    if (!m_movie)
-        return;
-
-    if (m_movieController)
-        DisposeMovieController(m_movieController);
-
-    GetMovieBox(m_movie, &amp;bounds);
-    flags = mcTopLeftMovie | mcNotVisible;
-    m_movieController = NewMovieController(m_movie, &amp;bounds, flags);
-    if (!m_movieController)
-        return;
-
-    // Disable automatic looping.
-    MCDoAction(m_movieController, mcActionSetLooping, 0);
-}
-
-void QTMoviePrivate::cacheMovieScale()
-{
-    Rect naturalRect;
-    Rect initialRect;
-
-    GetMovieNaturalBoundsRect(m_movie, &amp;naturalRect);
-    GetMovieBox(m_movie, &amp;initialRect);
-
-    float naturalWidth = naturalRect.right - naturalRect.left;
-    float naturalHeight = naturalRect.bottom - naturalRect.top;
-
-    if (naturalWidth)
-        m_widthScaleFactor = (initialRect.right - initialRect.left) / naturalWidth;
-    if (naturalHeight)
-        m_heightScaleFactor = (initialRect.bottom - initialRect.top) / naturalHeight;
-#if !ASSERT_DISABLED
-    m_scaleCached = true;
-#endif
-}
-
-QTMovie::QTMovie(QTMovieClient* client)
-    : m_private(new QTMoviePrivate())
-{
-    m_private-&gt;m_movieWin = this;
-    if (client)
-        m_private-&gt;m_clients.append(client);
-    initializeQuickTime();
-}
-
-QTMovie::~QTMovie()
-{
-    delete m_private;
-}
-
-void QTMovie::disableComponent(uint32_t cd[5])
-{
-    ComponentDescription nullDesc = {'null', 'base', kAppleManufacturer, 0, 0};
-    Component nullComp = FindNextComponent(0, &amp;nullDesc);
-    Component disabledComp = 0;
-
-    while (disabledComp = FindNextComponent(disabledComp, (ComponentDescription*)&amp;cd[0]))
-        CaptureComponent(disabledComp, nullComp);
-}
-
-void QTMovie::addClient(QTMovieClient* client)
-{
-    if (client)
-        m_private-&gt;m_clients.append(client);
-}
-
-void QTMovie::removeClient(QTMovieClient* client)
-{
-    size_t indexOfClient = m_private-&gt;m_clients.find(client);
-    if (indexOfClient != notFound)
-        m_private-&gt;m_clients.remove(indexOfClient);
-}
-
-void QTMovie::play()
-{
-    m_private-&gt;m_timeToRestore = -1.0f;
-
-    if (m_private-&gt;m_movieController)
-        MCDoAction(m_private-&gt;m_movieController, mcActionPrerollAndPlay, (void *)GetMoviePreferredRate(m_private-&gt;m_movie));
-    else
-        StartMovie(m_private-&gt;m_movie);
-    m_private-&gt;startTask();
-}
-
-void QTMovie::pause()
-{
-    m_private-&gt;m_timeToRestore = -1.0f;
-
-    if (m_private-&gt;m_movieController)
-        MCDoAction(m_private-&gt;m_movieController, mcActionPlay, 0);
-    else
-        StopMovie(m_private-&gt;m_movie);
-    QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-float QTMovie::rate() const
-{
-    if (!m_private-&gt;m_movie)
-        return 0;
-    return FixedToFloat(GetMovieRate(m_private-&gt;m_movie));
-}
-
-void QTMovie::setRate(float rate)
-{
-    if (!m_private-&gt;m_movie)
-        return;    
-    m_private-&gt;m_timeToRestore = -1.0f;
-    
-    if (m_private-&gt;m_movieController)
-        MCDoAction(m_private-&gt;m_movieController, mcActionPrerollAndPlay, (void *)FloatToFixed(rate));
-    else
-        SetMovieRate(m_private-&gt;m_movie, FloatToFixed(rate));
-    QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-float QTMovie::duration() const
-{
-    if (!m_private-&gt;m_movie)
-        return 0;
-    TimeValue val = GetMovieDuration(m_private-&gt;m_movie);
-    TimeScale scale = GetMovieTimeScale(m_private-&gt;m_movie);
-    return static_cast&lt;float&gt;(val) / scale;
-}
-
-float QTMovie::currentTime() const
-{
-    if (!m_private-&gt;m_movie)
-        return 0;
-    TimeValue val = GetMovieTime(m_private-&gt;m_movie, 0);
-    TimeScale scale = GetMovieTimeScale(m_private-&gt;m_movie);
-    return static_cast&lt;float&gt;(val) / scale;
-}
-
-void QTMovie::setCurrentTime(float time) const
-{
-    if (!m_private-&gt;m_movie)
-        return;
-
-    m_private-&gt;m_timeToRestore = -1.0f;
-    
-    m_private-&gt;m_seeking = true;
-    TimeScale scale = GetMovieTimeScale(m_private-&gt;m_movie);
-    if (m_private-&gt;m_movieController) {
-        QTRestartAtTimeRecord restart = { lroundf(time * scale) , 0 };
-        MCDoAction(m_private-&gt;m_movieController, mcActionRestartAtTime, (void *)&amp;restart);
-    } else
-        SetMovieTimeValue(m_private-&gt;m_movie, TimeValue(lroundf(time * scale)));
-    QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-void QTMovie::setVolume(float volume)
-{
-    if (!m_private-&gt;m_movie)
-        return;
-    SetMovieVolume(m_private-&gt;m_movie, static_cast&lt;short&gt;(volume * 256));
-}
-
-void QTMovie::setPreservesPitch(bool preservesPitch)
-{
-    if (!m_private-&gt;m_movie || !m_private-&gt;m_currentURL)
-        return;
-
-    OSErr error;
-    bool prop = false;
-
-    error = QTGetMovieProperty(m_private-&gt;m_movie, kQTPropertyClass_Audio, kQTAudioPropertyID_RateChangesPreservePitch,
-                               sizeof(kQTAudioPropertyID_RateChangesPreservePitch), static_cast&lt;QTPropertyValuePtr&gt;(&amp;prop), 0);
-
-    if (error || prop == preservesPitch)
-        return;
-
-    m_private-&gt;m_timeToRestore = currentTime();
-    m_private-&gt;m_rateToRestore = rate();
-    load(m_private-&gt;m_currentURL, preservesPitch);
-}
-
-unsigned QTMovie::dataSize() const
-{
-    if (!m_private-&gt;m_movie)
-        return 0;
-    return GetMovieDataSize(m_private-&gt;m_movie, 0, GetMovieDuration(m_private-&gt;m_movie));
-}
-
-float QTMovie::maxTimeLoaded() const
-{
-    if (!m_private-&gt;m_movie)
-        return 0;
-    TimeValue val;
-    GetMaxLoadedTimeInMovie(m_private-&gt;m_movie, &amp;val);
-    TimeScale scale = GetMovieTimeScale(m_private-&gt;m_movie);
-    return static_cast&lt;float&gt;(val) / scale;
-}
-
-long QTMovie::loadState() const
-{
-    return m_private-&gt;m_loadState;
-}
-
-void QTMovie::getNaturalSize(int&amp; width, int&amp; height)
-{
-    Rect rect = { 0, };
-
-    if (m_private-&gt;m_movie)
-        GetMovieNaturalBoundsRect(m_private-&gt;m_movie, &amp;rect);
-    width = (rect.right - rect.left) * m_private-&gt;m_widthScaleFactor;
-    height = (rect.bottom - rect.top) * m_private-&gt;m_heightScaleFactor;
-}
-
-void QTMovie::loadPath(const UChar* url, int len, bool preservesPitch)
-{
-    CFStringRef urlStringRef = CFStringCreateWithCharacters(kCFAllocatorDefault, reinterpret_cast&lt;const UniChar*&gt;(url), len);
-    CFURLRef cfURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, urlStringRef, kCFURLWindowsPathStyle, false);
-
-    load(cfURL, preservesPitch);
-
-    if (cfURL)
-        CFRelease(cfURL);
-    if (urlStringRef)
-        CFRelease(urlStringRef);
-}
-
-void QTMovie::load(const UChar* url, int len, bool preservesPitch)
-{
-    CFStringRef urlStringRef = CFStringCreateWithCharacters(kCFAllocatorDefault, reinterpret_cast&lt;const UniChar*&gt;(url), len);
-    CFURLRef cfURL = CFURLCreateWithString(kCFAllocatorDefault, urlStringRef, 0);
-
-    load(cfURL, preservesPitch);
-
-    if (cfURL)
-        CFRelease(cfURL);
-    if (urlStringRef)
-        CFRelease(urlStringRef);
-}
-
-void QTMovie::load(CFURLRef url, bool preservesPitch)
-{
-    if (!url)
-        return;
-
-    if (m_private-&gt;m_movie) {
-        m_private-&gt;endTask();
-        if (m_private-&gt;m_movieController)
-            DisposeMovieController(m_private-&gt;m_movieController);
-        m_private-&gt;m_movieController = 0;
-        DisposeMovie(m_private-&gt;m_movie);
-        m_private-&gt;m_movie = 0;
-        m_private-&gt;m_loadState = 0;
-    }  
-
-    // Define a property array for NewMovieFromProperties.
-    QTNewMoviePropertyElement movieProps[9]; 
-    ItemCount moviePropCount = 0; 
-
-    bool boolTrue = true;
-    
-    // Disable streaming support for now. 
-    CFStringRef scheme = CFURLCopyScheme(url);
-    bool isRTSP = CFStringHasPrefix(scheme, CFSTR(&quot;rtsp:&quot;));
-    CFRelease(scheme);
-
-    if (isRTSP) {
-        m_private-&gt;m_loadError = noMovieFound;
-        goto end;
-    }
-
-    if (m_private-&gt;m_currentURL) {
-        if (m_private-&gt;m_currentURL != url) {
-            CFRelease(m_private-&gt;m_currentURL);
-            m_private-&gt;m_currentURL = url;
-            CFRetain(url);
-        }
-    } else {
-        m_private-&gt;m_currentURL = url;
-        CFRetain(url);
-    }
-
-    // Add the movie data location to the property array 
-    movieProps[moviePropCount].propClass = kQTPropertyClass_DataLocation; 
-    movieProps[moviePropCount].propID = kQTDataLocationPropertyID_CFURL; 
-    movieProps[moviePropCount].propValueSize = sizeof(m_private-&gt;m_currentURL); 
-    movieProps[moviePropCount].propValueAddress = &amp;(m_private-&gt;m_currentURL); 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation; 
-    movieProps[moviePropCount].propID = kQTMovieInstantiationPropertyID_DontAskUnresolvedDataRefs; 
-    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
-    movieProps[moviePropCount].propValueAddress = &amp;boolTrue; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation; 
-    movieProps[moviePropCount].propID = kQTMovieInstantiationPropertyID_AsyncOK; 
-    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
-    movieProps[moviePropCount].propValueAddress = &amp;boolTrue; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_NewMovieProperty; 
-    movieProps[moviePropCount].propID = kQTNewMoviePropertyID_Active; 
-    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
-    movieProps[moviePropCount].propValueAddress = &amp;boolTrue; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_NewMovieProperty; 
-    movieProps[moviePropCount].propID = kQTNewMoviePropertyID_DontInteractWithUser; 
-    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
-    movieProps[moviePropCount].propValueAddress = &amp;boolTrue; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation;
-    movieProps[moviePropCount].propID = '!url';
-    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
-    movieProps[moviePropCount].propValueAddress = &amp;boolTrue; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation; 
-    movieProps[moviePropCount].propID = 'site';
-    movieProps[moviePropCount].propValueSize = sizeof(boolTrue); 
-    movieProps[moviePropCount].propValueAddress = &amp;boolTrue; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++;
-
-    movieProps[moviePropCount].propClass = kQTPropertyClass_Audio; 
-    movieProps[moviePropCount].propID = kQTAudioPropertyID_RateChangesPreservePitch;
-    movieProps[moviePropCount].propValueSize = sizeof(preservesPitch); 
-    movieProps[moviePropCount].propValueAddress = &amp;preservesPitch; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++; 
-
-    bool allowCaching = !m_private-&gt;m_privateBrowsing;
-    movieProps[moviePropCount].propClass = kQTPropertyClass_MovieInstantiation; 
-    movieProps[moviePropCount].propID = 'pers';
-    movieProps[moviePropCount].propValueSize = sizeof(allowCaching); 
-    movieProps[moviePropCount].propValueAddress = &amp;allowCaching; 
-    movieProps[moviePropCount].propStatus = 0; 
-    moviePropCount++;
-
-    ASSERT(moviePropCount &lt;= WTF_ARRAY_LENGTH(movieProps));
-    m_private-&gt;m_loadError = NewMovieFromProperties(moviePropCount, movieProps, 0, 0, &amp;m_private-&gt;m_movie);
-
-end:
-    m_private-&gt;startTask();
-    // get the load fail callback quickly 
-    if (m_private-&gt;m_loadError)
-        QTMovieTask::sharedTask()-&gt;updateTaskTimer(0);
-    else {
-        OSType mode = kQTApertureMode_CleanAperture;
-
-        // Set the aperture mode property on a movie to signal that we want aspect ratio
-        // and clean aperture dimensions. Don't worry about errors, we can't do anything if
-        // the installed version of QT doesn't support it and it isn't serious enough to 
-        // warrant failing.
-        QTSetMovieProperty(m_private-&gt;m_movie, kQTPropertyClass_Visual, kQTVisualPropertyID_ApertureMode, sizeof(mode), &amp;mode);
-    }
-}
-
-void QTMovie::disableUnsupportedTracks(unsigned&amp; enabledTrackCount, unsigned&amp; totalTrackCount)
-{
-    if (!m_private-&gt;m_movie) {
-        totalTrackCount = 0;
-        enabledTrackCount = 0;
-        return;
-    }
-
-    static HashSet&lt;OSType&gt;* allowedTrackTypes = 0;
-    if (!allowedTrackTypes) {
-        allowedTrackTypes = new HashSet&lt;OSType&gt;;
-        allowedTrackTypes-&gt;add(VideoMediaType);
-        allowedTrackTypes-&gt;add(SoundMediaType);
-        allowedTrackTypes-&gt;add(TextMediaType);
-        allowedTrackTypes-&gt;add(BaseMediaType);
-        allowedTrackTypes-&gt;add(closedCaptionTrackType);
-        allowedTrackTypes-&gt;add(subTitleTrackType);
-        allowedTrackTypes-&gt;add(mpeg4ObjectDescriptionTrackType);
-        allowedTrackTypes-&gt;add(mpeg4SceneDescriptionTrackType);
-        allowedTrackTypes-&gt;add(TimeCodeMediaType);
-        allowedTrackTypes-&gt;add(TimeCode64MediaType);
-    }
-
-    long trackCount = GetMovieTrackCount(m_private-&gt;m_movie);
-    enabledTrackCount = trackCount;
-    totalTrackCount = trackCount;
-
-    // Track indexes are 1-based. yuck. These things must descend from old-
-    // school mac resources or something.
-    for (long trackIndex = 1; trackIndex &lt;= trackCount; trackIndex++) {
-        // Grab the track at the current index. If there isn't one there, then
-        // we can move onto the next one.
-        Track currentTrack = GetMovieIndTrack(m_private-&gt;m_movie, trackIndex);
-        if (!currentTrack)
-            continue;
-        
-        // Check to see if the track is disabled already, we should move along.
-        // We don't need to re-disable it.
-        if (!GetTrackEnabled(currentTrack))
-            continue;
-
-        // Grab the track's media. We're going to check to see if we need to
-        // disable the tracks. They could be unsupported.
-        Media trackMedia = GetTrackMedia(currentTrack);
-        if (!trackMedia)
-            continue;
-        
-        // Grab the media type for this track. Make sure that we don't
-        // get an error in doing so. If we do, then something really funky is
-        // wrong.
-        OSType mediaType;
-        GetMediaHandlerDescription(trackMedia, &amp;mediaType, nil, nil);
-        OSErr mediaErr = GetMoviesError();    
-        if (mediaErr != noErr)
-            continue;
-        
-        if (!allowedTrackTypes-&gt;contains(mediaType)) {
-
-            // Different mpeg variants import as different track types so check for the &quot;mpeg 
-            // characteristic&quot; instead of hard coding the (current) list of mpeg media types.
-            if (GetMovieIndTrackType(m_private-&gt;m_movie, 1, 'mpeg', movieTrackCharacteristic | movieTrackEnabledOnly))
-                continue;
-
-            SetTrackEnabled(currentTrack, false);
-            --enabledTrackCount;
-        }
-        
-        // Grab the track reference count for chapters. This will tell us if it
-        // has chapter tracks in it. If there aren't any references, then we
-        // can move on the next track.
-        long referenceCount = GetTrackReferenceCount(currentTrack, kTrackReferenceChapterList);
-        if (referenceCount &lt;= 0)
-            continue;
-        
-        long referenceIndex = 0;        
-        while (1) {
-            // If we get nothing here, we've overstepped our bounds and can stop
-            // looking. Chapter indices here are 1-based as well - hence, the
-            // pre-increment.
-            referenceIndex++;
-            Track chapterTrack = GetTrackReference(currentTrack, kTrackReferenceChapterList, referenceIndex);
-            if (!chapterTrack)
-                break;
-            
-            // Try to grab the media for the track.
-            Media chapterMedia = GetTrackMedia(chapterTrack);
-            if (!chapterMedia)
-                continue;
-        
-            // Grab the media type for this track. Make sure that we don't
-            // get an error in doing so. If we do, then something really
-            // funky is wrong.
-            OSType mediaType;
-            GetMediaHandlerDescription(chapterMedia, &amp;mediaType, nil, nil);
-            OSErr mediaErr = GetMoviesError();
-            if (mediaErr != noErr)
-                continue;
-            
-            // Check to see if the track is a video track. We don't care about
-            // other non-video tracks.
-            if (mediaType != VideoMediaType)
-                continue;
-            
-            // Check to see if the track is already disabled. If it is, we
-            // should move along.
-            if (!GetTrackEnabled(chapterTrack))
-                continue;
-            
-            // Disabled the evil, evil track.
-            SetTrackEnabled(chapterTrack, false);
-            --enabledTrackCount;
-        }
-    }
-}
-
-bool QTMovie::isDisabled() const
-{
-    return m_private-&gt;m_disabled;
-}
-
-void QTMovie::setDisabled(bool b)
-{
-    m_private-&gt;m_disabled = b;
-}
-
-
-bool QTMovie::hasVideo() const
-{
-    if (!m_private-&gt;m_movie)
-        return false;
-    return (GetMovieIndTrackType(m_private-&gt;m_movie, 1, VisualMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly));
-}
-
-bool QTMovie::hasAudio() const
-{
-    if (!m_private-&gt;m_movie)
-        return false;
-    return (GetMovieIndTrackType(m_private-&gt;m_movie, 1, AudioMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly));
-}
-
-QTTrackArray QTMovie::videoTracks() const
-{
-    QTTrackArray tracks;
-    long trackIndex = 1;
-
-    while (Track theTrack = GetMovieIndTrackType(m_private-&gt;m_movie, trackIndex++, VisualMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly))
-        tracks.append(QTTrack::create(theTrack));
-
-    return tracks;
-}
-
-bool QTMovie::hasClosedCaptions() const 
-{
-    if (!m_private-&gt;m_movie)
-        return false;
-    return GetMovieIndTrackType(m_private-&gt;m_movie, 1, closedCaptionTrackType, movieTrackMediaType);
-}
-
-void QTMovie::setClosedCaptionsVisible(bool visible)
-{
-    if (!m_private-&gt;m_movie)
-        return;
-
-    Track ccTrack = GetMovieIndTrackType(m_private-&gt;m_movie, 1, closedCaptionTrackType, movieTrackMediaType);
-    if (!ccTrack)
-        return;
-
-    Boolean doDisplay = visible;
-    QTSetTrackProperty(ccTrack, closedCaptionTrackType, closedCaptionDisplayPropertyID, sizeof(doDisplay), &amp;doDisplay);
-}
-
-long QTMovie::timeScale() const 
-{
-    if (!m_private-&gt;m_movie)
-        return 0;
-
-    return GetMovieTimeScale(m_private-&gt;m_movie);
-}
-
-static void getMIMETypeCallBack(const char* type);
-
-static void initializeSupportedTypes() 
-{
-    if (gSupportedTypes)
-        return;
-
-    gSupportedTypes = CFArrayCreateMutable(kCFAllocatorDefault, 0, &amp;kCFTypeArrayCallBacks);
-    if (quickTimeVersion &lt; minimumQuickTimeVersion) {
-        LOG_ERROR(&quot;QuickTime version %x detected, at least %x required. Returning empty list of supported media MIME types.&quot;, quickTimeVersion, minimumQuickTimeVersion);
-        return;
-    }
-
-    // QuickTime doesn't have an importer for video/quicktime. Add it manually.
-    CFArrayAppendValue(gSupportedTypes, CFSTR(&quot;video/quicktime&quot;));
-    
-    wkGetQuickTimeMIMETypeList(getMIMETypeCallBack);
-}
-
-static void getMIMETypeCallBack(const char* type)
-{
-    ASSERT(type);
-    CFStringRef cfType = CFStringCreateWithCString(kCFAllocatorDefault, type, kCFStringEncodingMacRoman);
-    if (!cfType)
-        return;
-
-    // Filter out all non-audio or -video MIME Types, and only add each type once:
-    if (CFStringHasPrefix(cfType, CFSTR(&quot;audio/&quot;)) || CFStringHasPrefix(cfType, CFSTR(&quot;video/&quot;))) {
-        CFRange range = CFRangeMake(0, CFArrayGetCount(gSupportedTypes));
-        if (!CFArrayContainsValue(gSupportedTypes, range, cfType))
-            CFArrayAppendValue(gSupportedTypes, cfType);
-    }
-
-    CFRelease(cfType);
-}
-
-unsigned QTMovie::countSupportedTypes()
-{
-    initializeSupportedTypes();
-    return static_cast&lt;unsigned&gt;(CFArrayGetCount(gSupportedTypes));
-}
-
-void QTMovie::getSupportedType(unsigned index, const UChar*&amp; str, unsigned&amp; len)
-{
-    initializeSupportedTypes();
-    ASSERT(index &lt; CFArrayGetCount(gSupportedTypes));
-
-    // Allocate sufficient buffer to hold any MIME type
-    static UniChar* staticBuffer = 0;
-    if (!staticBuffer)
-        staticBuffer = new UniChar[32];
-
-    CFStringRef cfstr = (CFStringRef)CFArrayGetValueAtIndex(gSupportedTypes, index);
-    len = CFStringGetLength(cfstr);
-    CFRange range = { 0, len };
-    CFStringGetCharacters(cfstr, range, staticBuffer);
-    str = reinterpret_cast&lt;const UChar*&gt;(staticBuffer);
-    
-}
-
-CGAffineTransform QTMovie::getTransform() const
-{
-    ASSERT(m_private-&gt;m_movie);
-    MatrixRecord m = {0};
-    GetMovieMatrix(m_private-&gt;m_movie, &amp;m);
-
-    ASSERT(!m.matrix[0][2]);
-    ASSERT(!m.matrix[1][2]);
-    CGAffineTransform transform = CGAffineTransformMake(
-        Fix2X(m.matrix[0][0]),
-        Fix2X(m.matrix[0][1]),
-        Fix2X(m.matrix[1][0]),
-        Fix2X(m.matrix[1][1]),
-        Fix2X(m.matrix[2][0]),
-        Fix2X(m.matrix[2][1]));
-    return transform;
-}
-
-void QTMovie::setTransform(CGAffineTransform t)
-{
-    ASSERT(m_private-&gt;m_movie);
-    MatrixRecord m = {{
-        {X2Fix(t.a), X2Fix(t.b), 0},
-        {X2Fix(t.c), X2Fix(t.d), 0},
-        {X2Fix(t.tx), X2Fix(t.ty), fract1},
-    }};
-
-    SetMovieMatrix(m_private-&gt;m_movie, &amp;m);
-    m_private-&gt;cacheMovieScale();
-}
-
-void QTMovie::resetTransform()
-{
-    ASSERT(m_private-&gt;m_movie);
-    SetMovieMatrix(m_private-&gt;m_movie, 0);
-    m_private-&gt;cacheMovieScale();
-}
-
-void QTMovie::setPrivateBrowsingMode(bool privateBrowsing)
-{
-    m_private-&gt;m_privateBrowsing = privateBrowsing;
-    if (m_private-&gt;m_movie) {
-        bool allowCaching = !m_private-&gt;m_privateBrowsing;
-        QTSetMovieProperty(m_private-&gt;m_movie, 'cach', 'pers', sizeof(allowCaching), &amp;allowCaching);
-    }
-}
-
-bool QTMovie::initializeQuickTime() 
-{
-    static bool initialized = false;
-    static bool initializationSucceeded = false;
-    if (!initialized) {
-        initialized = true;
-        // Initialize and check QuickTime version
-        OSErr result = InitializeQTML(kInitializeQTMLEnableDoubleBufferedSurface);
-        if (result == noErr)
-            result = Gestalt(gestaltQuickTime, &amp;quickTimeVersion);
-        if (result != noErr) {
-            LOG_ERROR(&quot;No QuickTime available. Disabling &lt;video&gt; and &lt;audio&gt; support.&quot;);
-            return false;
-        }
-        if (quickTimeVersion &lt; minimumQuickTimeVersion) {
-            LOG_ERROR(&quot;QuickTime version %x detected, at least %x required. Disabling &lt;video&gt; and &lt;audio&gt; support.&quot;, quickTimeVersion, minimumQuickTimeVersion);
-            return false;
-        }
-        EnterMovies();
-        initializationSucceeded = true;
-    }
-    return initializationSucceeded;
-}
-
-Movie QTMovie::getMovieHandle() const 
-{
-    return m_private-&gt;m_movie;
-}
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
-    switch (fdwReason) {
-    case DLL_PROCESS_ATTACH:
-        return TRUE;
-    case DLL_PROCESS_DETACH:
-    case DLL_THREAD_ATTACH:
-    case DLL_THREAD_DETACH:
-        return FALSE;
-    }
-    ASSERT_NOT_REACHED();
-    return FALSE;
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovie.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovie.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovie.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,128 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTMovie_h
-#define QTMovie_h
-
-#include &quot;QTTrack.h&quot;
-#include &lt;wtf/Vector.h&gt;
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-class QTMovie;
-class QTMoviePrivate;
-typedef struct MovieType** Movie;
-typedef Vector&lt;RefPtr&lt;QTTrack&gt;&gt; QTTrackArray;
-
-class QTMovieClient {
-public:
-    virtual void movieEnded(QTMovie*) = 0;
-    virtual void movieLoadStateChanged(QTMovie*) = 0;
-    virtual void movieTimeChanged(QTMovie*) = 0;
-};
-
-enum {
-    QTMovieLoadStateError = -1L,
-    QTMovieLoadStateLoaded  = 2000L,
-    QTMovieLoadStatePlayable = 10000L,
-    QTMovieLoadStatePlaythroughOK = 20000L,
-    QTMovieLoadStateComplete = 100000L
-};
-
-typedef const struct __CFURL * CFURLRef;
-
-class QTMOVIEWIN_API QTMovie : public RefCounted&lt;QTMovie&gt; {
-public:
-    static bool initializeQuickTime();
-    static void taskTimerFired();
-
-    static void disableComponent(uint32_t[5]);
-
-    QTMovie(QTMovieClient*);
-    ~QTMovie();
-
-    void addClient(QTMovieClient*);
-    void removeClient(QTMovieClient*);
-
-    void loadPath(const UChar* url, int len, bool preservesPitch);
-    void load(const UChar* url, int len, bool preservesPitch);
-    void load(CFURLRef, bool preservesPitch);
-
-    long loadState() const;
-    float maxTimeLoaded() const;
-
-    void play();
-    void pause();
-
-    float rate() const;
-    void setRate(float);
-
-    float duration() const;
-    float currentTime() const;
-    void setCurrentTime(float) const;
-
-    void setVolume(float);
-    void setPreservesPitch(bool);
-
-    unsigned dataSize() const;
-
-    void getNaturalSize(int&amp; width, int&amp; height);
-
-    void disableUnsupportedTracks(unsigned&amp; enabledTrackCount, unsigned&amp; totalTrackCount);
-
-    bool isDisabled() const;
-    void setDisabled(bool);
-
-    bool hasVideo() const;
-    bool hasAudio() const;
-
-    QTTrackArray videoTracks() const;
-
-    bool hasClosedCaptions() const;
-    void setClosedCaptionsVisible(bool);
-
-    static unsigned countSupportedTypes();
-    static void getSupportedType(unsigned index, const UChar*&amp; str, unsigned&amp; len);
-
-    CGAffineTransform getTransform() const;
-    void setTransform(CGAffineTransform);
-    void resetTransform();
-
-    Movie getMovieHandle() const;
-
-    long timeScale() const;
-
-    void setPrivateBrowsingMode(bool);
-
-private:
-    QTMoviePrivate* m_private;
-    friend class QTMoviePrivate;
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieGWorldcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,465 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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;QTMovieGWorld.h&quot;
-
-#include &quot;QTMovieTask.h&quot;
-#include &lt;GXMath.h&gt;
-#include &lt;Movies.h&gt;
-#include &lt;QTML.h&gt;
-#include &lt;QuickTimeComponents.h&gt;
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/Noncopyable.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-using namespace std;
-
-static const long minimumQuickTimeVersion = 0x07300000; // 7.3
-
-static LPCWSTR fullscreenQTMovieGWorldPointerProp = L&quot;fullscreenQTMovieGWorldPointer&quot;;
-
-// Resizing GWorlds is slow, give them a minimum size so size of small 
-// videos can be animated smoothly
-static const int cGWorldMinWidth = 640;
-static const int cGWorldMinHeight = 360;
-
-static const float cNonContinuousTimeChange = 0.2f;
-
-union UppParam {
-    long longValue;
-    void* ptr;
-};
-
-static MovieDrawingCompleteUPP gMovieDrawingCompleteUPP = 0;
-static HashSet&lt;QTMovieGWorldPrivate*&gt;* gTaskList;
-static Vector&lt;CFStringRef&gt;* gSupportedTypes = 0;
-static SInt32 quickTimeVersion = 0;
-
-class QTMovieGWorldPrivate : public QTMovieClient {
-public:
-    QTMovieGWorldPrivate(QTMovieGWorld* movieWin);
-    virtual ~QTMovieGWorldPrivate();
-
-    void registerDrawingCallback();
-    void unregisterDrawingCallback();
-    void drawingComplete();
-    void updateGWorld();
-    void createGWorld();
-    void deleteGWorld();
-    void clearGWorld();
-    void updateMovieSize();
-
-    void setSize(int, int);
-
-    virtual void movieEnded(QTMovie*);
-    virtual void movieLoadStateChanged(QTMovie*);
-    virtual void movieTimeChanged(QTMovie*);
-
-    QTMovieGWorld* m_movieWin;
-    RefPtr&lt;QTMovie&gt; m_qtMovie;
-    Movie m_movie;
-    QTMovieGWorldClient* m_client;
-    long m_loadState;
-    int m_width;
-    int m_height;
-    bool m_visible;
-    GWorldPtr m_gWorld;
-    int m_gWorldWidth;
-    int m_gWorldHeight;
-    GWorldPtr m_savedGWorld;
-    float m_widthScaleFactor;
-    float m_heightScaleFactor;
-#if !ASSERT_DISABLED
-    bool m_scaleCached;
-#endif
-    WindowPtr m_fullscreenWindow;
-    GWorldPtr m_fullscreenOrigGWorld;
-    Rect m_fullscreenRect;
-    QTMovieGWorldFullscreenClient* m_fullscreenClient;
-    char* m_fullscreenRestoreState;
-    bool m_disabled;
-};
-
-QTMovieGWorldPrivate::QTMovieGWorldPrivate(QTMovieGWorld* movieWin)
-    : m_movieWin(movieWin)
-    , m_movie(0)
-    , m_client(0)
-    , m_loadState(0)
-    , m_width(0)
-    , m_height(0)
-    , m_visible(false)
-    , m_gWorld(0)
-    , m_gWorldWidth(0)
-    , m_gWorldHeight(0)
-    , m_savedGWorld(0)
-    , m_widthScaleFactor(1)
-    , m_heightScaleFactor(1)
-#if !ASSERT_DISABLED
-    , m_scaleCached(false)
-#endif
-    , m_fullscreenWindow(0)
-    , m_fullscreenOrigGWorld(0)
-    , m_fullscreenClient(0)
-    , m_fullscreenRestoreState(0)
-    , m_disabled(false)
-    , m_qtMovie(0)
-{
-    Rect rect = { 0, 0, 0, 0 };
-    m_fullscreenRect = rect;
-}
-
-QTMovieGWorldPrivate::~QTMovieGWorldPrivate()
-{
-    ASSERT(!m_fullscreenWindow);
-
-    if (m_gWorld)
-        deleteGWorld();
-}
-
-pascal OSErr movieDrawingCompleteProc(Movie movie, long data)
-{
-    UppParam param;
-    param.longValue = data;
-    QTMovieGWorldPrivate* mp = static_cast&lt;QTMovieGWorldPrivate*&gt;(param.ptr);
-    if (mp)
-        mp-&gt;drawingComplete();
-    return 0;
-}
-
-void QTMovieGWorldPrivate::registerDrawingCallback()
-{
-    if (!gMovieDrawingCompleteUPP)
-        gMovieDrawingCompleteUPP = NewMovieDrawingCompleteUPP(movieDrawingCompleteProc);
-
-    UppParam param;
-    param.ptr = this;
-    SetMovieDrawingCompleteProc(m_movie, movieDrawingCallWhenChanged, gMovieDrawingCompleteUPP, param.longValue);
-}
-
-void QTMovieGWorldPrivate::unregisterDrawingCallback()
-{
-    SetMovieDrawingCompleteProc(m_movie, movieDrawingCallWhenChanged, 0, 0);
-}
-
-void QTMovieGWorldPrivate::drawingComplete()
-{
-    if (!m_gWorld || m_movieWin-&gt;m_private-&gt;m_disabled || m_loadState &lt; QTMovieLoadStateLoaded)
-        return;
-    m_client-&gt;movieNewImageAvailable(m_movieWin);
-}
-
-void QTMovieGWorldPrivate::updateGWorld()
-{
-    bool shouldBeVisible = m_visible;
-    if (!m_height || !m_width)
-        shouldBeVisible = false;
-
-    if (shouldBeVisible &amp;&amp; !m_gWorld)
-        createGWorld();
-    else if (!shouldBeVisible &amp;&amp; m_gWorld)
-        deleteGWorld();
-    else if (m_gWorld &amp;&amp; (m_width &gt; m_gWorldWidth || m_height &gt; m_gWorldHeight)) {
-        // need a bigger, better gWorld
-        deleteGWorld();
-        createGWorld();
-    }
-}
-
-void QTMovieGWorldPrivate::createGWorld()
-{
-    ASSERT(!m_gWorld);
-    if (!m_movie || m_loadState &lt; QTMovieLoadStateLoaded)
-        return;
-
-    m_gWorldWidth = max(cGWorldMinWidth, m_width);
-    m_gWorldHeight = max(cGWorldMinHeight, m_height);
-    Rect bounds; 
-    bounds.top = 0;
-    bounds.left = 0; 
-    bounds.right = m_gWorldWidth;
-    bounds.bottom = m_gWorldHeight;
-    OSErr err = QTNewGWorld(&amp;m_gWorld, k32BGRAPixelFormat, &amp;bounds, 0, 0, 0); 
-    if (err) 
-        return;
-    GetMovieGWorld(m_movie, &amp;m_savedGWorld, 0);
-    SetMovieGWorld(m_movie, m_gWorld, 0);
-    bounds.right = m_width;
-    bounds.bottom = m_height;
-    SetMovieBox(m_movie, &amp;bounds);
-}
-
-void QTMovieGWorldPrivate::clearGWorld()
-{
-    if (!m_movie || !m_gWorld)
-        return;
-
-    GrafPtr savePort;
-    GetPort(&amp;savePort); 
-    MacSetPort((GrafPtr)m_gWorld);
-
-    Rect bounds; 
-    bounds.top = 0;
-    bounds.left = 0; 
-    bounds.right = m_gWorldWidth;
-    bounds.bottom = m_gWorldHeight;
-    EraseRect(&amp;bounds);
-
-    MacSetPort(savePort);
-}
-
-void QTMovieGWorldPrivate::setSize(int width, int height)
-{
-    if (m_width == width &amp;&amp; m_height == height)
-        return;
-    m_width = width;
-    m_height = height;
-
-    // Do not change movie box before reaching load state loaded as we grab
-    // the initial size when task() sees that state for the first time, and
-    // we need the initial size to be able to scale movie properly. 
-    if (!m_movie || m_loadState &lt; QTMovieLoadStateLoaded)
-        return;
-
-#if !ASSERT_DISABLED
-    ASSERT(m_scaleCached);
-#endif
-
-    updateMovieSize();
-}
-
-void QTMovieGWorldPrivate::updateMovieSize()
-{
-    if (!m_movie || m_loadState &lt; QTMovieLoadStateLoaded)
-        return;
-
-    Rect bounds; 
-    bounds.top = 0;
-    bounds.left = 0; 
-    bounds.right = m_width;
-    bounds.bottom = m_height;
-    SetMovieBox(m_movie, &amp;bounds);
-    updateGWorld();
-}
-
-
-void QTMovieGWorldPrivate::deleteGWorld()
-{
-    ASSERT(m_gWorld);
-    if (m_movie)
-        SetMovieGWorld(m_movie, m_savedGWorld, 0);
-    m_savedGWorld = 0;
-    DisposeGWorld(m_gWorld); 
-    m_gWorld = 0;
-    m_gWorldWidth = 0;
-    m_gWorldHeight = 0;
-}
-
-void QTMovieGWorldPrivate::movieEnded(QTMovie*)
-{
-    // Do nothing
-}
-
-void QTMovieGWorldPrivate::movieLoadStateChanged(QTMovie* movie)
-{
-    long loadState = GetMovieLoadState(movie-&gt;getMovieHandle());
-    if (loadState != m_loadState) {
-
-        // we only need to erase the movie gworld when the load state changes to loaded while it
-        //  is visible as the gworld is destroyed/created when visibility changes
-        bool movieNewlyPlayable = loadState &gt;= QTMovieLoadStateLoaded &amp;&amp; m_loadState &lt; QTMovieLoadStateLoaded;
-        m_loadState = loadState;
-
-        if (movieNewlyPlayable) {
-            updateMovieSize();
-            if (m_visible)
-                clearGWorld();
-        }
-    }
-}
-
-void QTMovieGWorldPrivate::movieTimeChanged(QTMovie*)
-{
-    // Do nothing
-}
-
-QTMovieGWorld::QTMovieGWorld(QTMovieGWorldClient* client)
-    : m_private(new QTMovieGWorldPrivate(this))
-{
-    m_private-&gt;m_client = client;
-}
-
-QTMovieGWorld::~QTMovieGWorld()
-{
-    delete m_private;
-}
-
-void QTMovieGWorld::setSize(int width, int height)
-{
-    m_private-&gt;setSize(width, height);
-    QTMovieTask::sharedTask()-&gt;updateTaskTimer();
-}
-
-void QTMovieGWorld::setVisible(bool b)
-{
-    m_private-&gt;m_visible = b;
-    m_private-&gt;updateGWorld();
-}
-
-void QTMovieGWorld::getCurrentFrameInfo(void*&amp; buffer, unsigned&amp; bitsPerPixel, unsigned&amp; rowBytes, unsigned&amp; width, unsigned&amp; height)
-{
-    if (!m_private-&gt;m_gWorld) {
-        buffer = 0;
-        bitsPerPixel = 0;
-        rowBytes = 0;
-        width = 0;
-        height = 0;
-        return;
-    }
-    PixMapHandle offscreenPixMap = GetGWorldPixMap(m_private-&gt;m_gWorld);
-    buffer = (*offscreenPixMap)-&gt;baseAddr;
-    bitsPerPixel = (*offscreenPixMap)-&gt;pixelSize;
-    rowBytes = (*offscreenPixMap)-&gt;rowBytes &amp; 0x3FFF;
-    width = m_private-&gt;m_width;
-    height = m_private-&gt;m_height;
-}
-
-void QTMovieGWorld::paint(HDC hdc, int x, int y)
-{
-    if (!m_private-&gt;m_gWorld)
-        return;
-
-    HDC hdcSrc = static_cast&lt;HDC&gt;(GetPortHDC(reinterpret_cast&lt;GrafPtr&gt;(m_private-&gt;m_gWorld))); 
-    if (!hdcSrc)
-        return;
-
-    // FIXME: If we could determine the movie has no alpha, we could use BitBlt for those cases, which might be faster.
-    BLENDFUNCTION blendFunction; 
-    blendFunction.BlendOp = AC_SRC_OVER;
-    blendFunction.BlendFlags = 0;
-    blendFunction.SourceConstantAlpha = 255;
-    blendFunction.AlphaFormat = AC_SRC_ALPHA;
-    AlphaBlend(hdc, x, y, m_private-&gt;m_width, m_private-&gt;m_height, hdcSrc, 
-         0, 0, m_private-&gt;m_width, m_private-&gt;m_height, blendFunction);
-}
-
-void QTMovieGWorld::setDisabled(bool b)
-{
-    m_private-&gt;m_disabled = b;
-}
-
-bool QTMovieGWorld::isDisabled() const
-{
-    return m_private-&gt;m_disabled;
-}
-
-LRESULT QTMovieGWorld::fullscreenWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    QTMovieGWorld* movie = static_cast&lt;QTMovieGWorld*&gt;(GetPropW(wnd, fullscreenQTMovieGWorldPointerProp));
-
-    if (message == WM_DESTROY)
-        RemovePropW(wnd, fullscreenQTMovieGWorldPointerProp);
-
-    if (!movie)
-        return DefWindowProc(wnd, message, wParam, lParam);
-
-    return movie-&gt;m_private-&gt;m_fullscreenClient-&gt;fullscreenClientWndProc(wnd, message, wParam, lParam);
-}
-
-HWND QTMovieGWorld::enterFullscreen(QTMovieGWorldFullscreenClient* client)
-{
-    m_private-&gt;m_fullscreenClient = client;
-    
-    BeginFullScreen(&amp;m_private-&gt;m_fullscreenRestoreState, 0, 0, 0, &amp;m_private-&gt;m_fullscreenWindow, 0, fullScreenAllowEvents); 
-    QTMLSetWindowWndProc(m_private-&gt;m_fullscreenWindow, fullscreenWndProc);
-    CreatePortAssociation(GetPortNativeWindow(m_private-&gt;m_fullscreenWindow), 0, 0);
-
-    GetMovieBox(m_private-&gt;m_movie, &amp;m_private-&gt;m_fullscreenRect);
-    GetMovieGWorld(m_private-&gt;m_movie, &amp;m_private-&gt;m_fullscreenOrigGWorld, 0);
-    SetMovieGWorld(m_private-&gt;m_movie, reinterpret_cast&lt;CGrafPtr&gt;(m_private-&gt;m_fullscreenWindow), GetGWorldDevice(reinterpret_cast&lt;CGrafPtr&gt;(m_private-&gt;m_fullscreenWindow)));
-
-    // Set the size of the box to preserve aspect ratio
-    Rect rect = m_private-&gt;m_fullscreenWindow-&gt;portRect;
-
-    float movieRatio = static_cast&lt;float&gt;(m_private-&gt;m_width) / m_private-&gt;m_height;
-    int windowWidth =  rect.right - rect.left;
-    int windowHeight = rect.bottom - rect.top;
-    float windowRatio = static_cast&lt;float&gt;(windowWidth) / windowHeight;
-    int actualWidth = (windowRatio &gt; movieRatio) ? (windowHeight * movieRatio) : windowWidth;
-    int actualHeight = (windowRatio &lt; movieRatio) ? (windowWidth / movieRatio) : windowHeight;
-    int offsetX = (windowWidth - actualWidth) / 2;
-    int offsetY = (windowHeight - actualHeight) / 2;
-
-    rect.left = offsetX;
-    rect.right = offsetX + actualWidth;
-    rect.top = offsetY;
-    rect.bottom = offsetY + actualHeight;
-
-    SetMovieBox(m_private-&gt;m_movie, &amp;rect);
-    ShowHideTaskBar(true);
-
-    // Set the 'this' pointer on the HWND
-    HWND wnd = static_cast&lt;HWND&gt;(GetPortNativeWindow(m_private-&gt;m_fullscreenWindow));
-    SetPropW(wnd, fullscreenQTMovieGWorldPointerProp, static_cast&lt;HANDLE&gt;(this));
-
-    return wnd;
-}
-
-void QTMovieGWorld::exitFullscreen()
-{
-    if (!m_private-&gt;m_fullscreenWindow)
-        return;
-
-    HWND wnd = static_cast&lt;HWND&gt;(GetPortNativeWindow(m_private-&gt;m_fullscreenWindow));
-    DestroyPortAssociation(reinterpret_cast&lt;CGrafPtr&gt;(m_private-&gt;m_fullscreenWindow));
-    SetMovieGWorld(m_private-&gt;m_movie, m_private-&gt;m_fullscreenOrigGWorld, 0);
-    EndFullScreen(m_private-&gt;m_fullscreenRestoreState, 0L);
-    SetMovieBox(m_private-&gt;m_movie, &amp;m_private-&gt;m_fullscreenRect);
-    m_private-&gt;m_fullscreenWindow = 0;
-}
-
-void QTMovieGWorld::setMovie(PassRefPtr&lt;QTMovie&gt; movie)
-{
-    if (m_private-&gt;m_qtMovie) {
-        m_private-&gt;unregisterDrawingCallback();
-        m_private-&gt;m_qtMovie-&gt;removeClient(m_private);
-        m_private-&gt;m_qtMovie = 0;
-        m_private-&gt;m_movie = 0;
-    }
-
-    m_private-&gt;m_qtMovie = movie;
-
-    if (m_private-&gt;m_qtMovie) {
-        m_private-&gt;m_qtMovie-&gt;addClient(m_private);
-        m_private-&gt;m_movie = m_private-&gt;m_qtMovie-&gt;getMovieHandle();
-        m_private-&gt;registerDrawingCallback();
-    }
-}
-
-QTMovie* QTMovieGWorld::movie() const 
-{
-    return m_private-&gt;m_qtMovie.get();
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieGWorldh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieGWorld.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,83 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTMovieGWorld_h
-#define QTMovieGWorld_h
-
-
-#include &quot;QTMovie.h&quot;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/RefPtr.h&gt;
-#include &lt;windows.h&gt;
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-class QTMovieGWorld;
-class QTMovieGWorldPrivate;
-
-class QTMovieGWorldClient {
-public:
-    virtual void movieNewImageAvailable(QTMovieGWorld*) = 0;
-};
-
-class QTMovieGWorldFullscreenClient {
-public:
-    virtual LRESULT fullscreenClientWndProc(HWND, UINT message, WPARAM, LPARAM) = 0;
-};
-
-class QTMOVIEWIN_API QTMovieGWorld : public RefCounted&lt;QTMovieGWorld&gt; {
-public:
-    QTMovieGWorld(QTMovieGWorldClient*);
-    ~QTMovieGWorld();
-
-    void getNaturalSize(int&amp; width, int&amp; height);
-    void setSize(int width, int height);
-
-    void setVisible(bool);
-    void paint(HDC, int x, int y);
-    void getCurrentFrameInfo(void*&amp; buffer, unsigned&amp; bitsPerPixel, unsigned&amp; rowBytes, unsigned&amp; width, unsigned&amp; height);
-
-    void setDisabled(bool);
-    bool isDisabled() const;
-
-    // Returns the full-screen window created
-    HWND enterFullscreen(QTMovieGWorldFullscreenClient*);
-    void exitFullscreen();
-
-    void setMovie(PassRefPtr&lt;QTMovie&gt;);
-    QTMovie* movie() const;
-
-private:
-    static LRESULT fullscreenWndProc(HWND, UINT message, WPARAM, LPARAM);
-
-    QTMovieGWorldPrivate* m_private;
-    friend class QTMovieGWorldPrivate;
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieTaskcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieTask.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieTask.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieTask.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,105 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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;QTMovieTask.h&quot;
-
-// Put Movies.h first so build failures here point clearly to QuickTime
-#include &lt;Movies.h&gt;
-
-#include &lt;wtf/HashSet.h&gt;
-#include &lt;wtf/StdLibExtras.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-QTMovieTask::QTMovieTask() 
-    : m_setTaskTimerDelay(0)
-    , m_stopTaskTimer(0)
-{
-}
-
-QTMovieTask::~QTMovieTask()
-{
-}
-
-QTMovieTask* QTMovieTask::sharedTask()
-{
-    static QTMovieTask* s_sharedTask = new QTMovieTask;
-    return s_sharedTask;
-}
-
-void QTMovieTask::updateTaskTimer(double maxInterval, double minInterval)
-{
-    ASSERT(m_setTaskTimerDelay);
-    if (!m_setTaskTimerDelay)
-        return;
-
-    ASSERT(m_stopTaskTimer);
-    if (!m_taskList.size() &amp;&amp; m_stopTaskTimer) {
-        m_stopTaskTimer();
-        return;
-    }
-    
-    long intervalInMS;
-    OSStatus status = QTGetTimeUntilNextTask(&amp;intervalInMS, 1000);
-    double interval = intervalInMS / 1000.0;
-    if (interval &lt; minInterval)
-        interval = minInterval;
-    if (interval &gt; maxInterval)
-        interval = maxInterval;
-    m_setTaskTimerDelay(interval);
-}
-
-void QTMovieTask::fireTaskClients()
-{
-    Vector&lt;QTMovieTaskClient*&gt; clients;
-    copyToVector(m_taskList, clients);
-    for (Vector&lt;QTMovieTaskClient*&gt;::iterator i = clients.begin(); i != clients.end(); ++i)
-        (*i)-&gt;task();
-}
-
-void QTMovieTask::addTaskClient(QTMovieTaskClient* client) 
-{
-    ASSERT(client);
-    if (!client)
-        return;
-
-    m_taskList.add(client);
-}
-
-void QTMovieTask::removeTaskClient(QTMovieTaskClient* client)
-{
-    ASSERT(client);
-    if (!client)
-        return;
-
-    m_taskList.remove(client);
-}
-
-void QTMovieTask::setTaskTimerFuncs(SetTaskTimerDelayFunc setTaskTimerDelay, StopTaskTimerFunc stopTaskTimer)
-{
-    m_setTaskTimerDelay = setTaskTimerDelay;
-    m_stopTaskTimer = stopTaskTimer;
-}
-
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieTaskh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieTask.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieTask.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieTask.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTMovieTask_h
-#define QTMovieTask_h
-
-#include &lt;wtf/HashSet.h&gt;
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-class QTMovieTaskClient {
-public:
-    virtual void task() = 0;
-};
-
-typedef void (*SetTaskTimerDelayFunc)(double);
-typedef void (*StopTaskTimerFunc)();
-
-class QTMOVIEWIN_API QTMovieTask {
-public:
-    static QTMovieTask* sharedTask();
-
-    void addTaskClient(QTMovieTaskClient* client);
-    void removeTaskClient(QTMovieTaskClient*);
-    void fireTaskClients();
-
-    void updateTaskTimer(double maxInterval = 1.0, double minInterval = 1.0 / 30);
-    void setTaskTimerFuncs(SetTaskTimerDelayFunc setTaskTimerDelay, StopTaskTimerFunc stopTaskTimer);
-
-protected:
-    QTMovieTask();
-    ~QTMovieTask();
-
-    SetTaskTimerDelayFunc m_setTaskTimerDelay;
-    StopTaskTimerFunc m_stopTaskTimer;
-    HashSet&lt;QTMovieTaskClient*&gt; m_taskList;
-
-private:
-    QTMovieTask(const QTMovieTask&amp;);
-    QTMovieTask&amp; operator=(const QTMovieTask&amp;);
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieVisualContextcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,224 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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;QTMovieVisualContext.h&quot;
-
-#include &quot;QTMovieTask.h&quot;
-#include &lt;CVBase.h&gt;
-#include &lt;CVHostTime.h&gt;
-#include &lt;ImageCompression.h&gt;
-#include &lt;Movies.h&gt;
-#include &lt;windows.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
-
-struct QTCVTimeStamp {
-    CVTimeStamp t;
-};
-
-class QTMovieVisualContextPriv {
-public:
-    QTMovieVisualContextPriv(QTMovieVisualContext* parent, QTMovieVisualContextClient* client, QTPixelBuffer::Type contextType);
-    ~QTMovieVisualContextPriv();
-
-    bool isImageAvailableForTime(const QTCVTimeStamp*) const;
-    QTPixelBuffer imageForTime(const QTCVTimeStamp*);
-    void task();
-
-    QTVisualContextRef visualContextRef();
-
-    void setMovie(PassRefPtr&lt;QTMovie&gt;);
-    QTMovie* movie() const;
-    
-    static void imageAvailableCallback(QTVisualContextRef visualContext, const CVTimeStamp *timeStamp, void *refCon);
-
-private:
-    QTMovieVisualContext* m_parent;
-    QTMovieVisualContextClient* m_client;
-    QTVisualContextRef m_visualContext;
-    RefPtr&lt;QTMovie&gt; m_movie;
-
-};
-
-static CFDictionaryRef createPixelBufferOptionsDictionary(QTPixelBuffer::Type contextType)
-{
-    const void* key = kQTVisualContextPixelBufferAttributesKey;
-    const void* value = QTPixelBuffer::createPixelBufferAttributesDictionary(contextType);
-    CFDictionaryRef pixelBufferOptions = CFDictionaryCreate(kCFAllocatorDefault, &amp;key, &amp;value, 1, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks);
-    CFRelease(value);
-    return pixelBufferOptions;
-}
-
-static CFDictionaryRef pixelBufferCreationOptions(QTPixelBuffer::Type contextType)
-{
-    if (contextType == QTPixelBuffer::ConfigureForCAImageQueue) {
-        static CFDictionaryRef imageQueueOptions = createPixelBufferOptionsDictionary(contextType);
-        return imageQueueOptions;
-    } 
-
-    ASSERT(contextType == QTPixelBuffer::ConfigureForCGImage);
-    static CFDictionaryRef cgImageOptions = createPixelBufferOptionsDictionary(contextType);
-    return cgImageOptions;
-}
-
-QTMovieVisualContextPriv::QTMovieVisualContextPriv(QTMovieVisualContext* parent, QTMovieVisualContextClient* client, QTPixelBuffer::Type contextType) 
-        : m_parent(parent)
-        , m_client(client)
-        , m_visualContext(0)
-{
-    typedef OSStatus ( __cdecl *pfnQTPixelBufferContextCreate)(CFAllocatorRef, CFDictionaryRef, QTVisualContextRef*);
-    static pfnQTPixelBufferContextCreate pPixelBufferContextCreate = 0;
-    if (!pPixelBufferContextCreate) {
-        HMODULE qtmlDLL = ::LoadLibraryW(L&quot;QTMLClient.dll&quot;);
-        if (!qtmlDLL)
-            return;
-        pPixelBufferContextCreate = reinterpret_cast&lt;pfnQTPixelBufferContextCreate&gt;(GetProcAddress(qtmlDLL, &quot;QTPixelBufferContextCreate&quot;));
-        if (!pPixelBufferContextCreate) 
-            return;
-    }
-
-    OSStatus status = pPixelBufferContextCreate(kCFAllocatorDefault, pixelBufferCreationOptions(contextType), &amp;m_visualContext);
-    if (status == noErr &amp;&amp; m_visualContext)
-        QTVisualContextSetImageAvailableCallback(m_visualContext, &amp;QTMovieVisualContextPriv::imageAvailableCallback, static_cast&lt;void*&gt;(this));
-}
-
-QTMovieVisualContextPriv::~QTMovieVisualContextPriv()
-{
-    if (m_visualContext)
-        QTVisualContextSetImageAvailableCallback(m_visualContext, 0, 0);
-}
-
-bool QTMovieVisualContextPriv::isImageAvailableForTime(const QTCVTimeStamp* timeStamp) const
-{
-    if (!m_visualContext)
-        return false;
-
-    return QTVisualContextIsNewImageAvailable(m_visualContext, reinterpret_cast&lt;const CVTimeStamp*&gt;(timeStamp)); 
-}
-
-QTPixelBuffer QTMovieVisualContextPriv::imageForTime(const QTCVTimeStamp* timeStamp)
-{
-    QTPixelBuffer pixelBuffer;
-    if (m_visualContext) {
-        CVImageBufferRef newImage = 0;
-        OSStatus status = QTVisualContextCopyImageForTime(m_visualContext, kCFAllocatorDefault, reinterpret_cast&lt;const CVTimeStamp*&gt;(timeStamp), &amp;newImage);
-        if (status == noErr)
-            pixelBuffer.adopt(newImage);
-    }
-    return pixelBuffer;
-}
-
-void QTMovieVisualContextPriv::task()
-{
-    if (m_visualContext)
-        QTVisualContextTask(m_visualContext);
-}
-
-QTVisualContextRef QTMovieVisualContextPriv::visualContextRef() 
-{
-    return m_visualContext;
-}
-
-void QTMovieVisualContextPriv::setMovie(PassRefPtr&lt;QTMovie&gt; movie)
-{
-    if (movie == m_movie)
-        return;
-
-    if (m_movie) {
-        SetMovieVisualContext(m_movie-&gt;getMovieHandle(), 0);
-        m_movie = 0;
-    }
-
-    if (movie)
-        OSStatus status = SetMovieVisualContext(movie-&gt;getMovieHandle(), m_visualContext);
-    
-    m_movie = movie;
-}
-
-QTMovie* QTMovieVisualContextPriv::movie() const
-{
-    return m_movie.get();
-}
-
-void QTMovieVisualContextPriv::imageAvailableCallback(QTVisualContextRef visualContext, const CVTimeStamp *timeStamp, void *refCon) 
-{
-    if (!refCon)
-        return;
-
-    QTMovieVisualContextPriv* vc = static_cast&lt;QTMovieVisualContextPriv*&gt;(refCon);
-    if (!vc-&gt;m_client)
-        return;
-
-    vc-&gt;m_client-&gt;imageAvailableForTime(reinterpret_cast&lt;const QTCVTimeStamp*&gt;(timeStamp));
-}
-
-PassRefPtr&lt;QTMovieVisualContext&gt; QTMovieVisualContext::create(QTMovieVisualContextClient* client, QTPixelBuffer::Type contextType)
-{
-    return adoptRef(new QTMovieVisualContext(client, contextType));
-}
-
-QTMovieVisualContext::QTMovieVisualContext(QTMovieVisualContextClient* client, QTPixelBuffer::Type contextType) 
-    : m_private(adoptPtr(new QTMovieVisualContextPriv(this, client, contextType)))
-{
-}
-
-QTMovieVisualContext::~QTMovieVisualContext()
-{
-}
-
-bool QTMovieVisualContext::isImageAvailableForTime(const QTCVTimeStamp* timeStamp) const
-{
-    return m_private-&gt;isImageAvailableForTime(timeStamp);
-}
-
-QTPixelBuffer QTMovieVisualContext::imageForTime(const QTCVTimeStamp* timeStamp)
-{
-    return m_private-&gt;imageForTime(timeStamp);
-}
-
-void QTMovieVisualContext::task()
-{
-    m_private-&gt;task();
-}
-
-QTVisualContextRef QTMovieVisualContext::visualContextRef() 
-{
-    return m_private-&gt;visualContextRef();
-}
-
-void QTMovieVisualContext::setMovie(PassRefPtr&lt;QTMovie&gt; movie)
-{
-    m_private-&gt;setMovie(movie);
-}
-
-QTMovie* QTMovieVisualContext::movie() const
-{
-    return m_private-&gt;movie();
-}
-
-double QTMovieVisualContext::currentHostTime()
-{
-    return CVGetCurrentHostTime() / CVGetHostClockFrequency();
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieVisualContexth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieVisualContext.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,79 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTMovieVisualContext_h
-#define QTMovieVisualContext_h
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-#include &quot;QTMovie.h&quot;
-#include &quot;QTMovieTask.h&quot;
-#include &quot;QTPixelBuffer.h&quot;
-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-typedef const struct __CFDictionary* CFDictionaryRef;
-typedef struct OpaqueQTVisualContext*   QTVisualContextRef;
-
-// QTCVTimeStamp is a struct containing only a CVTimeStamp.  This is to 
-// work around the inability of CVTimeStamp to be forward declared, in 
-// addition to it being declared in different header files when building
-// the QTMovieWin and WebCore projects.
-struct QTCVTimeStamp;
-
-class QTMovieVisualContextClient {
-public:
-    virtual void imageAvailableForTime(const QTCVTimeStamp*) = 0;
-};
-
-class QTMOVIEWIN_API QTMovieVisualContext : public RefCounted&lt;QTMovieVisualContext&gt; {
-public:
-    static PassRefPtr&lt;QTMovieVisualContext&gt; create(QTMovieVisualContextClient*, QTPixelBuffer::Type);
-    ~QTMovieVisualContext();
-
-    bool isImageAvailableForTime(const QTCVTimeStamp*) const;
-    QTPixelBuffer imageForTime(const QTCVTimeStamp*);
-    void task();
-
-    QTVisualContextRef visualContextRef();
-
-    void setMovie(PassRefPtr&lt;QTMovie&gt;);
-    QTMovie* movie() const;
-
-    static double currentHostTime();
-
-protected:
-    QTMovieVisualContext(QTMovieVisualContextClient*, QTPixelBuffer::Type);
-    void setupVisualContext();
-
-    friend class QTMovieVisualContextPriv;
-    OwnPtr&lt;QTMovieVisualContextPriv&gt; m_private;
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieWinTimercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,137 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007, 2009 Apple Computer, 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 COMPUTER, 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 COMPUTER, 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 &lt;windows.h&gt;
-
-#include &quot;QTMovieWinTimer.h&quot;
-
-#include &lt;wtf/Assertions.h&gt;
-
-// This file is used by the QuickTime access DLL. It copies some WebCore code 
-// which can't be used directly due to dependency issues.
-
-// FIXME: Find a way to do timers that can manage &lt;10ms resolution properly too.
-
-static UINT_PTR timerID;
-static void (*sharedTimerFiredFunction)();
-
-static HINSTANCE instanceHandle = 0;
-
-static HWND timerWindowHandle = 0;
-static UINT timerFiredMessage = 0;
-static const LPCWSTR kTimerWindowClassName = L&quot;TimerWindowClass&quot;;
-static bool processingCustomTimerMessage = false;
-
-static LRESULT CALLBACK TimerWindowWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    if (message == timerFiredMessage) {
-        processingCustomTimerMessage = true;
-        sharedTimerFiredFunction();
-        processingCustomTimerMessage = false;
-    } else if (message == WM_TIMER &amp;&amp; wParam == timerID) {
-        stopSharedTimer();
-        sharedTimerFiredFunction();
-    } else
-        return DefWindowProc(hWnd, message, wParam, lParam);
-    return 0;
-}
-
-static void initializeOffScreenTimerWindow()
-{
-    if (timerWindowHandle)
-        return;
-    
-    WNDCLASSEX wcex;
-    memset(&amp;wcex, 0, sizeof(WNDCLASSEX));
-    wcex.cbSize = sizeof(WNDCLASSEX);
-    wcex.lpfnWndProc    = TimerWindowWndProc;
-    wcex.hInstance      = instanceHandle;
-    wcex.lpszClassName  = kTimerWindowClassName;
-    RegisterClassEx(&amp;wcex);
-
-    timerWindowHandle = CreateWindow(kTimerWindowClassName, 0, 0,
-       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, instanceHandle, 0);
-    timerFiredMessage = RegisterWindowMessage(L&quot;com.apple.WebKit.TimerFired&quot;);
-}
-
-void setSharedTimerFiredFunction(void (*f)())
-{
-    sharedTimerFiredFunction = f;
-}
-
-void setSharedTimerFireDelay(double interval)
-{
-    ASSERT(sharedTimerFiredFunction);
-
-    unsigned intervalInMS;
-    if (interval &lt; 0)
-        intervalInMS = 0;
-    else {
-        interval *= 1000;
-        if (interval &gt; USER_TIMER_MAXIMUM)
-            intervalInMS = USER_TIMER_MAXIMUM;
-        else
-            intervalInMS = (unsigned)interval;
-    }
-
-    stopSharedTimer();
-    initializeOffScreenTimerWindow();
-
-    // We don't allow nested PostMessages, since the custom messages will effectively starve
-    // painting and user input. (Win32 has a tri-level queue with application messages &gt; 
-    // user input &gt; WM_PAINT/WM_TIMER.)
-    // In addition, if the queue contains input events that have been there since the last call to
-    // GetQueueStatus, PeekMessage or GetMessage we favor timers.
-    if (intervalInMS &lt; USER_TIMER_MINIMUM 
-        &amp;&amp; !processingCustomTimerMessage 
-        &amp;&amp; !LOWORD(::GetQueueStatus(QS_ALLINPUT))) {
-        // Windows SetTimer does not allow timeouts smaller than 10ms (USER_TIMER_MINIMUM)
-        PostMessage(timerWindowHandle, timerFiredMessage, 0, 0);
-    } else
-        timerID = SetTimer(timerWindowHandle, timerFiredMessage, intervalInMS, 0);
-}
-
-void stopSharedTimer()
-{
-    if (timerID) {
-        KillTimer(timerWindowHandle, timerID);
-        timerID = 0;
-    }
-}
-
-void setSharedTimerInstanceHandle(HINSTANCE handle)
-{
-    instanceHandle = handle;
-}
-
-double systemTime()
-{
-    FILETIME ft;
-    GetSystemTimeAsFileTime(&amp;ft);
-    ULARGE_INTEGER t;
-    memcpy(&amp;t, &amp;ft, sizeof(t));
-    return t.QuadPart * 0.0000001 - 11644473600.0;
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTMovieWinTimerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTMovieWinTimer.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007 Apple Computer, 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 COMPUTER, 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 COMPUTER, 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 QTMovieWinTimer_h
-#define QTMovieWinTimer_h
-
-// This header should not be included from WebCore.
-// It is used by the QuickTime access DLL. It copies some WebCore code 
-// which can't be used directly due to dependency issues.
-
-void setSharedTimerFiredFunction(void (*)());
-void setSharedTimerFireDelay(double delay);
-void stopSharedTimer();
-void setSharedTimerInstanceHandle(HINSTANCE handle);
-double systemTime();
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTPixelBuffercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,256 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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;QTPixelBuffer.h&quot;
-
-#include &lt;CFNumber.h&gt;
-#include &lt;CFString.h&gt;
-#include &lt;CGColorSpace.h&gt;
-#include &lt;CGImage.h&gt;
-#include &lt;CVPixelBuffer.h&gt;
-#include &lt;QuickDraw.h&gt;
-#include &lt;memory.h&gt;
-
-static OSStatus SetNumberValue(CFMutableDictionaryRef inDict, CFStringRef inKey, SInt32 inValue)
-{
-    CFNumberRef number;

-    number = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &amp;inValue);
-    if (!number) 
-        return coreFoundationUnknownErr;

-    CFDictionarySetValue(inDict, inKey, number);
-    CFRelease(number);
-
-    return noErr;
-}
-
-CFDictionaryRef QTPixelBuffer::createPixelBufferAttributesDictionary(QTPixelBuffer::Type contextType)
-{
-    static const CFStringRef kDirect3DCompatibilityKey = CFSTR(&quot;Direct3DCompatibility&quot;);
-
-    CFMutableDictionaryRef pixelBufferAttributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks);
-    if (contextType == QTPixelBuffer::ConfigureForCAImageQueue) {
-        // Ask for D3D compatible pixel buffers so no further work is needed.
-        CFDictionarySetValue(pixelBufferAttributes, kDirect3DCompatibilityKey, kCFBooleanTrue);
-    } else {
-        // Use the k32BGRAPixelFormat, as QuartzCore will be able to use the pixels directly,
-        // without needing an additional copy or rendering pass.
-        SetNumberValue(pixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, k32BGRAPixelFormat);
-            
-        // Set kCVPixelBufferBytesPerRowAlignmentKey to 16 to ensure that each row of pixels 
-        // starts at a 16 byte aligned address for most efficient data reading.
-        SetNumberValue(pixelBufferAttributes, kCVPixelBufferBytesPerRowAlignmentKey, 16);
-        CFDictionarySetValue(pixelBufferAttributes, kCVPixelBufferCGImageCompatibilityKey, kCFBooleanTrue);
-    }
-    return pixelBufferAttributes;
-}
-
-QTPixelBuffer::QTPixelBuffer() 
-    : m_pixelBuffer(0) 
-{
-}
-
-QTPixelBuffer::QTPixelBuffer(const QTPixelBuffer&amp; p) 
-    : m_pixelBuffer(p.m_pixelBuffer) 
-{
-    CVPixelBufferRetain(m_pixelBuffer);
-}
-
-QTPixelBuffer::QTPixelBuffer(CVPixelBufferRef ref) 
-    : m_pixelBuffer(ref)
-{
-    CVPixelBufferRetain(m_pixelBuffer);
-}
-
-QTPixelBuffer::~QTPixelBuffer() 
-{
-    clear();
-}
-
-QTPixelBuffer&amp; QTPixelBuffer::operator=(const QTPixelBuffer&amp; p) 
-{
-    set(p.m_pixelBuffer);
-    return *this;
-}
-
-void QTPixelBuffer::set(CVPixelBufferRef ref)
-{
-    CVPixelBufferRetain(ref);
-    CVPixelBufferRelease(m_pixelBuffer);
-    m_pixelBuffer = ref;
-}
-
-CVPixelBufferRef QTPixelBuffer::pixelBufferRef()
-{
-    return m_pixelBuffer;
-}
-
-void QTPixelBuffer::adopt(CVPixelBufferRef ref)
-{
-    if (ref == m_pixelBuffer)
-        return;
-    CVPixelBufferRelease(m_pixelBuffer);
-    m_pixelBuffer = ref;
-}
-
-void QTPixelBuffer::clear()
-{
-    CVPixelBufferRelease(m_pixelBuffer);
-    m_pixelBuffer = 0;
-}
-
-CVReturn QTPixelBuffer::lockBaseAddress()
-{
-    return CVPixelBufferLockBaseAddress(m_pixelBuffer, 0);
-}
-
-CVReturn QTPixelBuffer::unlockBaseAddress()
-{
-    return CVPixelBufferUnlockBaseAddress(m_pixelBuffer, 0);
-}
-
-void* QTPixelBuffer::baseAddress()
-{
-    return CVPixelBufferGetBaseAddress(m_pixelBuffer);
-}
-
-size_t QTPixelBuffer::width() const
-{
-    return CVPixelBufferGetWidth(m_pixelBuffer);
-}
-
-size_t QTPixelBuffer::height() const
-{
-    return CVPixelBufferGetHeight(m_pixelBuffer);
-}
-
-unsigned long QTPixelBuffer::pixelFormatType() const
-{
-    return CVPixelBufferGetPixelFormatType(m_pixelBuffer);
-}
-
-bool QTPixelBuffer::pixelFormatIs32ARGB() const
-{
-    return CVPixelBufferGetPixelFormatType(m_pixelBuffer) == k32ARGBPixelFormat;
-}
-
-bool QTPixelBuffer::pixelFormatIs32BGRA() const
-{
-    return CVPixelBufferGetPixelFormatType(m_pixelBuffer) == k32BGRAPixelFormat;
-}
-
-size_t QTPixelBuffer::bytesPerRow() const
-{
-    return CVPixelBufferGetBytesPerRow(m_pixelBuffer);
-}
-
-size_t QTPixelBuffer::dataSize() const
-{
-    return CVPixelBufferGetDataSize(m_pixelBuffer);
-}
-
-bool QTPixelBuffer::isPlanar() const
-{
-    return CVPixelBufferIsPlanar(m_pixelBuffer);
-}
-
-size_t QTPixelBuffer::planeCount() const
-{
-    return CVPixelBufferGetPlaneCount(m_pixelBuffer);
-}
-
-size_t QTPixelBuffer::widthOfPlane(size_t plane) const
-{
-    return CVPixelBufferGetWidthOfPlane(m_pixelBuffer, plane);
-}
-
-size_t QTPixelBuffer::heightOfPlane(size_t plane) const
-{
-    return CVPixelBufferGetHeightOfPlane(m_pixelBuffer, plane);
-}
-
-void* QTPixelBuffer::baseAddressOfPlane(size_t plane) const
-{
-    return CVPixelBufferGetBaseAddressOfPlane(m_pixelBuffer, plane);
-}
-
-size_t QTPixelBuffer::bytesPerRowOfPlane(size_t plane) const
-{
-    return CVPixelBufferGetBytesPerRowOfPlane(m_pixelBuffer, plane);
-}
-
-void QTPixelBuffer::getExtendedPixels(size_t* left, size_t* right, size_t* top, size_t* bottom) const
-{
-    return CVPixelBufferGetExtendedPixels(m_pixelBuffer, left, right, top, bottom);
-}
-
-CFDictionaryRef QTPixelBuffer::attachments() const
-{
-    return CVBufferGetAttachments(m_pixelBuffer, kCVAttachmentMode_ShouldPropagate);
-}
-
-void QTPixelBuffer::retainCallback(void* refcon)
-{
-    CVPixelBufferRetain(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-}
-
-void QTPixelBuffer::releaseCallback(void* refcon)
-{
-    CVPixelBufferRelease(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-}
-
-void QTPixelBuffer::imageQueueReleaseCallback(unsigned int type, uint64_t id, void* refcon)
-{
-    CVPixelBufferRelease(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-}
-
-void QTPixelBuffer::dataProviderReleaseBytePointerCallback(void* refcon, const void* pointer)
-{
-    CVPixelBufferUnlockBaseAddress(static_cast&lt;CVPixelBufferRef&gt;(refcon), 0);
-}
-
-const void* QTPixelBuffer::dataProviderGetBytePointerCallback(void* refcon)
-{
-    CVPixelBufferLockBaseAddress(static_cast&lt;CVPixelBufferRef&gt;(refcon), 0);
-    return CVPixelBufferGetBaseAddress(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-}
-
-size_t QTPixelBuffer::dataProviderGetBytesAtPositionCallback(void* refcon, void* buffer, size_t position, size_t count)
-{
-    char* data = (char*)CVPixelBufferGetBaseAddress(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-    size_t size = CVPixelBufferGetDataSize(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-    if (size - position &lt; count)
-        count = size - position;
-
-    memcpy(buffer, data+position, count);
-    return count;
-}
-
-void QTPixelBuffer::dataProviderReleaseInfoCallback(void* refcon)
-{
-    CVPixelBufferRelease(static_cast&lt;CVPixelBufferRef&gt;(refcon));
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTPixelBufferh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTPixelBuffer.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,100 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTPixelBuffer_h
-#define QTPixelBuffer_h
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-#include &lt;stdint.h&gt;
-
-typedef struct __CVBuffer *CVBufferRef;
-typedef CVBufferRef CVPixelBufferRef;
-typedef struct CGImage* CGImageRef;
-typedef int32_t CVReturn;
-typedef const struct __CFDictionary * CFDictionaryRef;
-
-// QTPixelBuffer wraps QuickTime's implementation of CVPixelBuffer, so its functions are
-// safe to call within WebKit.
-class QTMOVIEWIN_API QTPixelBuffer {
-public:
-    enum Type { ConfigureForCGImage, ConfigureForCAImageQueue };
-    static CFDictionaryRef createPixelBufferAttributesDictionary(Type);
-
-    QTPixelBuffer();
-    QTPixelBuffer(const QTPixelBuffer&amp;);
-    QTPixelBuffer(CVPixelBufferRef);
-    QTPixelBuffer&amp; operator=(const QTPixelBuffer&amp;);
-    ~QTPixelBuffer();
-
-    void set(CVPixelBufferRef);
-    CVPixelBufferRef pixelBufferRef();
-    void adopt(CVPixelBufferRef);
-    void clear();
-
-    CVReturn lockBaseAddress();
-    CVReturn unlockBaseAddress();
-    void* baseAddress();
-
-    size_t width() const;
-    size_t height() const;
-    unsigned long pixelFormatType() const;
-    bool pixelFormatIs32ARGB() const;
-    bool pixelFormatIs32BGRA() const;
-    size_t bytesPerRow() const;
-    size_t dataSize() const;
-
-    bool isPlanar() const;
-    size_t planeCount() const;
-    size_t widthOfPlane(size_t) const;
-    size_t heightOfPlane(size_t) const;
-    void* baseAddressOfPlane(size_t) const;
-    size_t bytesPerRowOfPlane(size_t) const;
-
-    void getExtendedPixels(size_t* left, size_t* right, size_t* top, size_t* bottom) const;
-    CFDictionaryRef attachments() const;
-
-    // Generic CFRetain/CFRelease callbacks
-    static void releaseCallback(void* refcon);
-    static void retainCallback(void* refcon);
-
-    // CAImageQueue callbacks
-    static void imageQueueReleaseCallback(unsigned int type, uint64_t id, void* refcon);
-
-    // CGDataProvider callbacks
-    static void dataProviderReleaseBytePointerCallback(void* refcon, const void* pointer);
-    static const void* dataProviderGetBytePointerCallback(void* refcon);
-    static size_t dataProviderGetBytesAtPositionCallback(void* refcon, void* buffer, size_t position, size_t count);
-    static void dataProviderReleaseInfoCallback(void* refcon);
-
-private:
-    CVPixelBufferRef m_pixelBuffer;
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTTrackcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTTrack.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTTrack.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTTrack.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,120 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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;QTTrack.h&quot;
-
-#include &lt;Movies.h&gt;
-#include &lt;QTML.h&gt;
-
-using namespace std;
-
-class QTTrackPrivate {
-    WTF_MAKE_NONCOPYABLE(QTTrackPrivate);
-public:
-    QTTrackPrivate();
-    ~QTTrackPrivate();
-
-    QTTrack* m_track;
-    Track m_trackHandle;
-};
-
-QTTrackPrivate::QTTrackPrivate()
-    : m_track(0)
-    , m_trackHandle(0)
-{
-}
-
-QTTrackPrivate::~QTTrackPrivate()
-{
-    m_trackHandle = 0;
-}
-
-PassRefPtr&lt;QTTrack&gt; QTTrack::create(Track trackHandle)
-{
-    return adoptRef(new QTTrack(trackHandle));
-}
-
-QTTrack::QTTrack(Track trackHandle)
-    : m_private(new QTTrackPrivate())
-{
-    m_private-&gt;m_track = this;
-    m_private-&gt;m_trackHandle = trackHandle;
-}
-
-QTTrack::~QTTrack()
-{
-    delete m_private;
-}
-
-bool QTTrack::isEnabled() const
-{
-    ASSERT(m_private-&gt;m_track);
-    return GetTrackEnabled(m_private-&gt;m_trackHandle);
-}
-
-void QTTrack::setEnabled(bool enabled)
-{
-    ASSERT(m_private-&gt;m_trackHandle);
-    SetTrackEnabled(m_private-&gt;m_trackHandle, enabled);
-}
-
-CGAffineTransform QTTrack::getTransform() const
-{
-    ASSERT(m_private-&gt;m_trackHandle);
-    MatrixRecord m = {0};
-    GetTrackMatrix(m_private-&gt;m_trackHandle, &amp;m);
-
-    ASSERT(!m.matrix[0][2]);
-    ASSERT(!m.matrix[1][2]);
-    CGAffineTransform transform = CGAffineTransformMake(
-        Fix2X(m.matrix[0][0]),
-        Fix2X(m.matrix[0][1]),
-        Fix2X(m.matrix[1][0]),
-        Fix2X(m.matrix[1][1]),
-        Fix2X(m.matrix[2][0]),
-        Fix2X(m.matrix[2][1]));
-
-    return transform;
-}
-
-void QTTrack::setTransform(CGAffineTransform t)
-{
-    ASSERT(m_private-&gt;m_trackHandle);
-    MatrixRecord m = {{
-        {X2Fix(t.a), X2Fix(t.b), 0},
-        {X2Fix(t.c), X2Fix(t.d), 0},
-        {X2Fix(t.tx), X2Fix(t.ty), fract1},
-    }};
-
-    SetTrackMatrix(m_private-&gt;m_trackHandle, &amp;m);
-}
-
-void QTTrack::resetTransform()
-{
-    ASSERT(m_private-&gt;m_trackHandle);
-    SetTrackMatrix(m_private-&gt;m_trackHandle, 0);
-}
-
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinQTTrackh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/QTTrack.h (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/QTTrack.h        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/platform/graphics/win/QTTrack.h        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2010 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 COMPUTER, 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 COMPUTER, 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 QTTrack_h
-#define QTTrack_h
-
-#include &lt;windows.h&gt;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-#include &lt;CoreGraphics/CGAffineTransform.h&gt;
-
-#ifdef QTMOVIEWIN_EXPORTS
-#define QTMOVIEWIN_API __declspec(dllexport)
-#else
-#define QTMOVIEWIN_API __declspec(dllimport)
-#endif
-
-class QTTrack;
-class QTTrackPrivate;
-typedef struct TrackType** Track;
-
-class QTMOVIEWIN_API QTTrack : public RefCounted&lt;QTTrack&gt; {
-public:
-    static PassRefPtr&lt;QTTrack&gt; create(Track);
-    ~QTTrack();
-
-    CGAffineTransform getTransform() const;
-    void setTransform(CGAffineTransform);
-    void resetTransform();
-
-    bool isEnabled() const;
-    void setEnabled(bool);
-
-    Track getTrackHandle() const;
-private:
-    QTTrack(Track);
-    QTTrackPrivate* m_private;
-    friend class QTTrackPrivate;
-};
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorepluginswinPluginDatabaseWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/win/PluginDatabaseWin.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/win/PluginDatabaseWin.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Source/WebCore/plugins/win/PluginDatabaseWin.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -257,20 +257,6 @@
</span><span class="cx">         directories.append(String(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline void addQuickTimePluginDirectory(Vector&lt;String&gt;&amp; directories)
-{
-    DWORD type;
-    WCHAR installationDirectoryStr[_MAX_PATH];
-    DWORD installationDirectorySize = sizeof(installationDirectoryStr);
-
-    HRESULT result = getRegistryValue(HKEY_LOCAL_MACHINE, L&quot;Software\\Apple Computer, Inc.\\QuickTime&quot;, L&quot;InstallDir&quot;, &amp;type, &amp;installationDirectoryStr, &amp;installationDirectorySize);
-
-    if (result == ERROR_SUCCESS &amp;&amp; type == REG_SZ) {
-        String pluginDir = String(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1) + &quot;\\plugins&quot;;
-        directories.append(pluginDir);
-    }
-}
-
</del><span class="cx"> static inline void addAdobeAcrobatPluginDirectory(Vector&lt;String&gt;&amp; directories)
</span><span class="cx"> {
</span><span class="cx">     HKEY key;
</span><span class="lines">@@ -414,7 +400,6 @@
</span><span class="cx"> 
</span><span class="cx">     if (!ourDirectory.isNull())
</span><span class="cx">         directories.append(ourDirectory);
</span><del>-    addQuickTimePluginDirectory(directories);
</del><span class="cx">     addAdobeAcrobatPluginDirectory(directories);
</span><span class="cx">     addMozillaPluginDirectories(directories);
</span><span class="cx">     addWindowsMediaPlayerPluginDirectory(directories);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Tools/ChangeLog        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-03-12  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Remove use of QTSDK
+        https://bugs.webkit.org/show_bug.cgi?id=130049
+
+        Reviewed by Darin Adler.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (initialize): Remove QuickTime code.
+        * win/AssembleBuildLogs/AssembleLogs.cmd: Don't grab logs from
+        building QTMovieWin.
+
</ins><span class="cx"> 2014-03-12  Martin Robinson  &lt;mrobinson@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK][CMAKE] Too verbose build output
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -296,43 +296,6 @@
</span><span class="cx">     return path;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void addQTDirToPATH()
-{
-    static LPCWSTR pathEnvironmentVariable = L&quot;PATH&quot;;
-    static LPCWSTR quickTimeKeyName = L&quot;Software\\Apple Computer, Inc.\\QuickTime&quot;;
-    static LPCWSTR quickTimeSysDir = L&quot;QTSysDir&quot;;
-    static bool initialized;
-
-    if (initialized)
-        return;
-    initialized = true;
-
-    // Get the QuickTime dll directory from the registry. The key can be in either HKLM or HKCU.
-    WCHAR qtPath[MAX_PATH];
-    DWORD qtPathBufferLen = sizeof(qtPath);
-    DWORD keyType;
-    HRESULT result = SHGetValue(HKEY_LOCAL_MACHINE, quickTimeKeyName, quickTimeSysDir, &amp;keyType, (LPVOID)qtPath, &amp;qtPathBufferLen);
-    if (result != ERROR_SUCCESS || !qtPathBufferLen || keyType != REG_SZ) {
-        qtPathBufferLen = sizeof(qtPath);
-        result = SHGetValue(HKEY_CURRENT_USER, quickTimeKeyName, quickTimeSysDir, &amp;keyType, (LPVOID)qtPath, &amp;qtPathBufferLen);
-        if (result != ERROR_SUCCESS || !qtPathBufferLen || keyType != REG_SZ)
-            return;
-    }
-
-    // Read the current PATH.
-    DWORD pathSize = GetEnvironmentVariableW(pathEnvironmentVariable, 0, 0);
-    Vector&lt;WCHAR&gt; oldPath(pathSize);
-    if (!GetEnvironmentVariableW(pathEnvironmentVariable, oldPath.data(), oldPath.size()))
-        return;
-
-    // And add the QuickTime dll.
-    wstring newPath;
-    newPath.append(qtPath);
-    newPath.append(L&quot;;&quot;);
-    newPath.append(oldPath.data(), oldPath.size());
-    SetEnvironmentVariableW(pathEnvironmentVariable, newPath.data());
-}
-
</del><span class="cx"> #ifdef DEBUG_ALL
</span><span class="cx"> #define WEBKITDLL TEXT(&quot;WebKit_debug.dll&quot;)
</span><span class="cx"> #else
</span><span class="lines">@@ -395,10 +358,6 @@
</span><span class="cx">         for (int i = 0; i &lt; ARRAYSIZE(fontsToInstall); ++i)
</span><span class="cx">             textRenderer-&gt;registerPrivateFont(wstring(resourcesPath + fontsToInstall[i]).c_str());
</span><span class="cx"> 
</span><del>-    // Add the QuickTime dll directory to PATH or QT 7.6 will fail to initialize on systems
-    // linked with older versions of qtmlclientlib.dll.
-    addQTDirToPATH();
-
</del><span class="cx">     // Register a host window
</span><span class="cx">     WNDCLASSEX wcex;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolswinAssembleBuildLogsAssembleLogscmd"></a>
<div class="modfile"><h4>Modified: trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd (165475 => 165476)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd        2014-03-12 16:46:49 UTC (rev 165475)
+++ trunk/Tools/win/AssembleBuildLogs/AssembleLogs.cmd        2014-03-12 17:02:06 UTC (rev 165476)
</span><span class="lines">@@ -118,16 +118,7 @@
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WebCoreGenerated\BuildLog.htm&quot; &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> 
</span><del>-if not exist &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\QTMovieWin\BuildLog.htm&quot; GOTO SkipQTMovieWin
-
</del><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><del>-echo COMPILING QTMovieWin...                                   &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\QTMovieWin\BuildLog.htm&quot; &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
-
-:SkipQTMovieWin
-
-echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</del><span class="cx"> echo COMPILING WebCore...                                      &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> echo _________________________________________________________ &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span><span class="cx"> type &quot;%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\WebCore\BuildLog.htm&quot; &gt;&gt; &quot;%CONFIGURATIONBUILDDIR%\BuildOutput.htm&quot;
</span></span></pre>
</div>
</div>

</body>
</html>