<!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>[46937] trunk/WebCore</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/46937">46937</a></dd>
<dt>Author</dt> <dd>cmarrin@apple.com</dd>
<dt>Date</dt> <dd>2009-08-07 18:01:16 -0700 (Fri, 07 Aug 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Move Canvas related file to a subdirectories
        https://bugs.webkit.org/show_bug.cgi?id=28026</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreDerivedSourcesmake">trunk/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkWebCoreGNUmakefileam">trunk/WebCore/GNUmakefile.am</a></li>
<li><a href="#trunkWebCoreWebCoregypi">trunk/WebCore/WebCore.gypi</a></li>
<li><a href="#trunkWebCoreWebCorepro">trunk/WebCore/WebCore.pro</a></li>
<li><a href="#trunkWebCoreWebCorevcprojWebCorevcproj">trunk/WebCore/WebCore.vcproj/WebCore.vcproj</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCoreWebCoreSourcesbkl">trunk/WebCore/WebCoreSources.bkl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/WebCore/html/canvas/</li>
<li><a href="#trunkWebCorehtmlcanvasCanvasGradientcpp">trunk/WebCore/html/canvas/CanvasGradient.cpp</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasGradienth">trunk/WebCore/html/canvas/CanvasGradient.h</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasGradientidl">trunk/WebCore/html/canvas/CanvasGradient.idl</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasPatterncpp">trunk/WebCore/html/canvas/CanvasPattern.cpp</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasPatternh">trunk/WebCore/html/canvas/CanvasPattern.h</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasPatternidl">trunk/WebCore/html/canvas/CanvasPattern.idl</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasPixelArraycpp">trunk/WebCore/html/canvas/CanvasPixelArray.cpp</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasPixelArrayh">trunk/WebCore/html/canvas/CanvasPixelArray.h</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasPixelArrayidl">trunk/WebCore/html/canvas/CanvasPixelArray.idl</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasRenderingContext2Dh">trunk/WebCore/html/canvas/CanvasRenderingContext2D.h</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasRenderingContext2Didl">trunk/WebCore/html/canvas/CanvasRenderingContext2D.idl</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasStylecpp">trunk/WebCore/html/canvas/CanvasStyle.cpp</a></li>
<li><a href="#trunkWebCorehtmlcanvasCanvasStyleh">trunk/WebCore/html/canvas/CanvasStyle.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkWebCorehtmlCanvasGradientcpp">trunk/WebCore/html/CanvasGradient.cpp</a></li>
<li><a href="#trunkWebCorehtmlCanvasGradienth">trunk/WebCore/html/CanvasGradient.h</a></li>
<li><a href="#trunkWebCorehtmlCanvasGradientidl">trunk/WebCore/html/CanvasGradient.idl</a></li>
<li><a href="#trunkWebCorehtmlCanvasPatterncpp">trunk/WebCore/html/CanvasPattern.cpp</a></li>
<li><a href="#trunkWebCorehtmlCanvasPatternh">trunk/WebCore/html/CanvasPattern.h</a></li>
<li><a href="#trunkWebCorehtmlCanvasPatternidl">trunk/WebCore/html/CanvasPattern.idl</a></li>
<li><a href="#trunkWebCorehtmlCanvasPixelArraycpp">trunk/WebCore/html/CanvasPixelArray.cpp</a></li>
<li><a href="#trunkWebCorehtmlCanvasPixelArrayh">trunk/WebCore/html/CanvasPixelArray.h</a></li>
<li><a href="#trunkWebCorehtmlCanvasPixelArrayidl">trunk/WebCore/html/CanvasPixelArray.idl</a></li>
<li><a href="#trunkWebCorehtmlCanvasRenderingContext2Dcpp">trunk/WebCore/html/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkWebCorehtmlCanvasRenderingContext2Dh">trunk/WebCore/html/CanvasRenderingContext2D.h</a></li>
<li><a href="#trunkWebCorehtmlCanvasRenderingContext2Didl">trunk/WebCore/html/CanvasRenderingContext2D.idl</a></li>
<li><a href="#trunkWebCorehtmlCanvasStylecpp">trunk/WebCore/html/CanvasStyle.cpp</a></li>
<li><a href="#trunkWebCorehtmlCanvasStyleh">trunk/WebCore/html/CanvasStyle.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/ChangeLog        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2009-08-07  Chris Marrin  &lt;cmarrin@apple.com&gt;
+
+        Reviewed by Oliver Hunt.
+
+        Move Canvas related file to a subdirectories
+        https://bugs.webkit.org/show_bug.cgi?id=28026
+
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+        * html/CanvasGradient.cpp: Removed.
+        * html/CanvasGradient.h: Removed.
+        * html/CanvasGradient.idl: Removed.
+        * html/CanvasPattern.cpp: Removed.
+        * html/CanvasPattern.h: Removed.
+        * html/CanvasPattern.idl: Removed.
+        * html/CanvasPixelArray.cpp: Removed.
+        * html/CanvasPixelArray.h: Removed.
+        * html/CanvasPixelArray.idl: Removed.
+        * html/CanvasRenderingContext2D.cpp: Removed.
+        * html/CanvasRenderingContext2D.h: Removed.
+        * html/CanvasRenderingContext2D.idl: Removed.
+        * html/CanvasStyle.cpp: Removed.
+        * html/CanvasStyle.h: Removed.
+        * html/canvas: Added.
+        * html/canvas/CanvasGradient.cpp: Copied from WebCore/html/CanvasGradient.cpp.
+        * html/canvas/CanvasGradient.h: Copied from WebCore/html/CanvasGradient.h.
+        * html/canvas/CanvasGradient.idl: Copied from WebCore/html/CanvasGradient.idl.
+        * html/canvas/CanvasPattern.cpp: Copied from WebCore/html/CanvasPattern.cpp.
+        * html/canvas/CanvasPattern.h: Copied from WebCore/html/CanvasPattern.h.
+        * html/canvas/CanvasPattern.idl: Copied from WebCore/html/CanvasPattern.idl.
+        * html/canvas/CanvasPixelArray.cpp: Copied from WebCore/html/CanvasPixelArray.cpp.
+        * html/canvas/CanvasPixelArray.h: Copied from WebCore/html/CanvasPixelArray.h.
+        * html/canvas/CanvasPixelArray.idl: Copied from WebCore/html/CanvasPixelArray.idl.
+        * html/canvas/CanvasRenderingContext2D.cpp: Copied from WebCore/html/CanvasRenderingContext2D.cpp.
+        * html/canvas/CanvasRenderingContext2D.h: Copied from WebCore/html/CanvasRenderingContext2D.h.
+        * html/canvas/CanvasRenderingContext2D.idl: Copied from WebCore/html/CanvasRenderingContext2D.idl.
+        * html/canvas/CanvasStyle.cpp: Copied from WebCore/html/CanvasStyle.cpp.
+        * html/canvas/CanvasStyle.h: Copied from WebCore/html/CanvasStyle.h.
+
</ins><span class="cx"> 2009-08-07  Szabo Carol  &lt;carol.szabo@nokia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by David Hyatt.
</span></span></pre></div>
<a id="trunkWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/DerivedSources.make (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/DerivedSources.make        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/DerivedSources.make        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx">     $(WebCore)/css \
</span><span class="cx">     $(WebCore)/dom \
</span><span class="cx">     $(WebCore)/html \
</span><ins>+    $(WebCore)/html/canvas \
</ins><span class="cx">     $(WebCore)/inspector \
</span><span class="cx">     $(WebCore)/loader/appcache \
</span><span class="cx">     $(WebCore)/page \
</span></span></pre></div>
<a id="trunkWebCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/GNUmakefile.am (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/GNUmakefile.am        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/GNUmakefile.am        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -151,9 +151,9 @@
</span><span class="cx">         WebCore/dom/WebKitAnimationEvent.idl \
</span><span class="cx">         WebCore/dom/WebKitTransitionEvent.idl \
</span><span class="cx">         WebCore/dom/WheelEvent.idl \
</span><del>-        WebCore/html/CanvasGradient.idl \
-        WebCore/html/CanvasPattern.idl \
-        WebCore/html/CanvasRenderingContext2D.idl \
</del><ins>+        WebCore/html/canvas/CanvasGradient.idl \
+        WebCore/html/canvas/CanvasPattern.idl \
+        WebCore/html/canvas/CanvasRenderingContext2D.idl \
</ins><span class="cx">         WebCore/html/DataGridColumn.idl \
</span><span class="cx">         WebCore/html/DataGridColumnList.idl \
</span><span class="cx">         WebCore/html/File.idl \
</span><span class="lines">@@ -901,16 +901,16 @@
</span><span class="cx">         WebCore/history/HistoryItem.h \
</span><span class="cx">         WebCore/history/PageCache.cpp \
</span><span class="cx">         WebCore/history/PageCache.h \
</span><del>-        WebCore/html/CanvasGradient.cpp \
-        WebCore/html/CanvasGradient.h \
-        WebCore/html/CanvasPattern.cpp \
-        WebCore/html/CanvasPattern.h \
-        WebCore/html/CanvasPixelArray.cpp \
-        WebCore/html/CanvasPixelArray.h \
-        WebCore/html/CanvasRenderingContext2D.cpp \
-        WebCore/html/CanvasRenderingContext2D.h \
-        WebCore/html/CanvasStyle.cpp \
-        WebCore/html/CanvasStyle.h \
</del><ins>+        WebCore/html/canvas/CanvasGradient.cpp \
+        WebCore/html/canvas/CanvasGradient.h \
+        WebCore/html/canvas/CanvasPattern.cpp \
+        WebCore/html/canvas/CanvasPattern.h \
+        WebCore/html/canvas/CanvasPixelArray.cpp \
+        WebCore/html/canvas/CanvasPixelArray.h \
+        WebCore/html/canvas/CanvasRenderingContext2D.cpp \
+        WebCore/html/canvas/CanvasRenderingContext2D.h \
+        WebCore/html/canvas/CanvasStyle.cpp \
+        WebCore/html/canvas/CanvasStyle.h \
</ins><span class="cx">         WebCore/html/CollectionCache.cpp \
</span><span class="cx">         WebCore/html/CollectionCache.h \
</span><span class="cx">         WebCore/html/CollectionType.h \
</span></span></pre></div>
<a id="trunkWebCoreWebCoregypi"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.gypi (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.gypi        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/WebCore.gypi        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -75,10 +75,10 @@
</span><span class="cx">             'dom/WebKitAnimationEvent.idl',
</span><span class="cx">             'dom/WebKitTransitionEvent.idl',
</span><span class="cx">             'dom/WheelEvent.idl',
</span><del>-            'html/CanvasGradient.idl',
-            'html/CanvasPattern.idl',
-            'html/CanvasPixelArray.idl',
-            'html/CanvasRenderingContext2D.idl',
</del><ins>+            'html/canvas/CanvasGradient.idl',
+            'html/canvas/CanvasPattern.idl',
+            'html/canvas/CanvasPixelArray.idl',
+            'html/canvas/CanvasRenderingContext2D.idl',
</ins><span class="cx">             'html/DataGridColumn.idl',
</span><span class="cx">             'html/DataGridColumnList.idl',
</span><span class="cx">             'html/File.idl',
</span><span class="lines">@@ -1204,16 +1204,16 @@
</span><span class="cx">             'history/HistoryItem.h',
</span><span class="cx">             'history/PageCache.cpp',
</span><span class="cx">             'history/PageCache.h',
</span><del>-            'html/CanvasGradient.cpp',
-            'html/CanvasGradient.h',
-            'html/CanvasPattern.cpp',
-            'html/CanvasPattern.h',
-            'html/CanvasPixelArray.cpp',
-            'html/CanvasPixelArray.h',
-            'html/CanvasRenderingContext2D.cpp',
-            'html/CanvasRenderingContext2D.h',
-            'html/CanvasStyle.cpp',
-            'html/CanvasStyle.h',
</del><ins>+            'html/canvas/CanvasGradient.cpp',
+            'html/canvas/CanvasGradient.h',
+            'html/canvas/CanvasPattern.cpp',
+            'html/canvas/CanvasPattern.h',
+            'html/canvas/CanvasPixelArray.cpp',
+            'html/canvas/CanvasPixelArray.h',
+            'html/canvas/CanvasRenderingContext2D.cpp',
+            'html/canvas/CanvasRenderingContext2D.h',
+            'html/canvas/CanvasStyle.cpp',
+            'html/canvas/CanvasStyle.h',
</ins><span class="cx">             'html/CollectionCache.cpp',
</span><span class="cx">             'html/CollectionCache.h',
</span><span class="cx">             'html/CollectionType.h',
</span></span></pre></div>
<a id="trunkWebCoreWebCorepro"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.pro (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.pro        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/WebCore.pro        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -340,9 +340,9 @@
</span><span class="cx">     dom/WebKitAnimationEvent.idl \
</span><span class="cx">     dom/WebKitTransitionEvent.idl \
</span><span class="cx">     dom/WheelEvent.idl \
</span><del>-    html/CanvasGradient.idl \
-    html/CanvasPattern.idl \
-    html/CanvasRenderingContext2D.idl \
</del><ins>+    html/canvas/CanvasGradient.idl \
+    html/canvas/CanvasPattern.idl \
+    html/canvas/CanvasRenderingContext2D.idl \
</ins><span class="cx">     html/DataGridColumn.idl \
</span><span class="cx">     html/DataGridColumnList.idl \
</span><span class="cx">     html/File.idl \
</span><span class="lines">@@ -916,11 +916,11 @@
</span><span class="cx">     history/HistoryItem.cpp \
</span><span class="cx">     history/qt/HistoryItemQt.cpp \
</span><span class="cx">     history/PageCache.cpp \
</span><del>-    html/CanvasGradient.cpp \
-    html/CanvasPattern.cpp \
-    html/CanvasPixelArray.cpp \
-    html/CanvasRenderingContext2D.cpp \
-    html/CanvasStyle.cpp \
</del><ins>+    html/canvas/CanvasGradient.cpp \
+    html/canvas/CanvasPattern.cpp \
+    html/canvas/CanvasPixelArray.cpp \
+    html/canvas/CanvasRenderingContext2D.cpp \
+    html/canvas/CanvasStyle.cpp \
</ins><span class="cx">     html/CollectionCache.cpp \
</span><span class="cx">     html/DataGridColumn.cpp \
</span><span class="cx">     html/DataGridColumnList.cpp \
</span><span class="lines">@@ -1570,11 +1570,11 @@
</span><span class="cx">     history/CachedPage.h \
</span><span class="cx">     history/HistoryItem.h \
</span><span class="cx">     history/PageCache.h \
</span><del>-    html/CanvasGradient.h \
-    html/CanvasPattern.h \
-    html/CanvasPixelArray.h \
-    html/CanvasRenderingContext2D.h \
-    html/CanvasStyle.h \
</del><ins>+    html/canvas/CanvasGradient.h \
+    html/canvas/CanvasPattern.h \
+    html/canvas/CanvasPixelArray.h \
+    html/canvas/CanvasRenderingContext2D.h \
+    html/canvas/CanvasStyle.h \
</ins><span class="cx">     html/CollectionCache.h \
</span><span class="cx">     html/DataGridColumn.h \
</span><span class="cx">     html/DataGridColumnList.h \
</span></span></pre></div>
<a id="trunkWebCoreWebCorevcprojWebCorevcproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.vcproj/WebCore.vcproj (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.vcproj/WebCore.vcproj        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/WebCore.vcproj/WebCore.vcproj        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -24672,43 +24672,43 @@
</span><span class="cx">                         Name=&quot;html&quot;
</span><span class="cx">                         &gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasGradient.cpp&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasGradient.cpp&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasGradient.h&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasGradient.h&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasPattern.cpp&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasPattern.cpp&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasPattern.h&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasPattern.h&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasPixelArray.cpp&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasPixelArray.cpp&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasPixelArray.h&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasPixelArray.h&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasRenderingContext2D.cpp&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasRenderingContext2D.cpp&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasRenderingContext2D.h&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasRenderingContext2D.h&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasStyle.cpp&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasStyle.cpp&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><del>-                                RelativePath=&quot;..\html\CanvasStyle.h&quot;
</del><ins>+                                RelativePath=&quot;..\html\canvas\CanvasStyle.h&quot;
</ins><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -742,6 +742,20 @@
</span><span class="cx">                 46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DA0B0D60170028EE36 /* aliasCursor.png */; };
</span><span class="cx">                 46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DB0B0D60170028EE36 /* noDropCursor.png */; };
</span><span class="cx">                 46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
</span><ins>+                49484FC1102CF23C00187DD3 /* CanvasGradient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */; };
+                49484FC2102CF23C00187DD3 /* CanvasGradient.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FB4102CF23C00187DD3 /* CanvasGradient.h */; };
+                49484FC3102CF23C00187DD3 /* CanvasGradient.idl in Resources */ = {isa = PBXBuildFile; fileRef = 49484FB5102CF23C00187DD3 /* CanvasGradient.idl */; };
+                49484FC4102CF23C00187DD3 /* CanvasPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */; };
+                49484FC5102CF23C00187DD3 /* CanvasPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FB7102CF23C00187DD3 /* CanvasPattern.h */; };
+                49484FC6102CF23C00187DD3 /* CanvasPattern.idl in Resources */ = {isa = PBXBuildFile; fileRef = 49484FB8102CF23C00187DD3 /* CanvasPattern.idl */; };
+                49484FC7102CF23C00187DD3 /* CanvasPixelArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49484FB9102CF23C00187DD3 /* CanvasPixelArray.cpp */; };
+                49484FC8102CF23C00187DD3 /* CanvasPixelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FBA102CF23C00187DD3 /* CanvasPixelArray.h */; };
+                49484FC9102CF23C00187DD3 /* CanvasPixelArray.idl in Resources */ = {isa = PBXBuildFile; fileRef = 49484FBB102CF23C00187DD3 /* CanvasPixelArray.idl */; };
+                49484FCA102CF23C00187DD3 /* CanvasRenderingContext2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */; };
+                49484FCB102CF23C00187DD3 /* CanvasRenderingContext2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */; };
+                49484FCC102CF23C00187DD3 /* CanvasRenderingContext2D.idl in Resources */ = {isa = PBXBuildFile; fileRef = 49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */; };
+                49484FCD102CF23C00187DD3 /* CanvasStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */; };
+                49484FCE102CF23C00187DD3 /* CanvasStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FC0102CF23C00187DD3 /* CanvasStyle.h */; };
</ins><span class="cx">                 494BD7950F55C8EE00747828 /* WebKitPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 494BD7930F55C8EE00747828 /* WebKitPoint.h */; };
</span><span class="cx">                 494BD7990F55C90E00747828 /* JSWebKitPointConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 494BD7970F55C90E00747828 /* JSWebKitPointConstructor.cpp */; };
</span><span class="cx">                 494BD79A0F55C90E00747828 /* JSWebKitPointConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 494BD7980F55C90E00747828 /* JSWebKitPointConstructor.h */; };
</span><span class="lines">@@ -1928,7 +1942,6 @@
</span><span class="cx">                 85F74E0A0AA8DF8C000DC284 /* DOMCSSUnknownRule.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85032DD50AA8C9BE007D3B7D /* DOMCSSUnknownRule.h */; };
</span><span class="cx">                 85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; };
</span><span class="cx">                 85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; };
</span><del>-                898D1FB30F27934B004BBAC7 /* CanvasPixelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 898D1FB20F27934B004BBAC7 /* CanvasPixelArray.h */; };
</del><span class="cx">                 929264770B61FC7200B41D34 /* JSDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 929264760B61FC7200B41D34 /* JSDocumentCustom.cpp */; };
</span><span class="cx">                 9302B0BD0D79F82900C7EE83 /* PageGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */; };
</span><span class="cx">                 9302B0BF0D79F82C00C7EE83 /* PageGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2124,14 +2137,6 @@
</span><span class="cx">                 93EB169709F880C00091F8FF /* WebCoreSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EB169609F880C00091F8FF /* WebCoreSystemInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 93EB355F09E37FD600F43799 /* MouseEventWithHitTestResults.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EB355E09E37FD600F43799 /* MouseEventWithHitTestResults.cpp */; };
</span><span class="cx">                 93EEC1FA09C2877700C515D1 /* DocPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EEC1E709C2877700C515D1 /* DocPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                93EEC1FF09C2877700C515D1 /* CanvasRenderingContext2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EEC1ED09C2877700C515D1 /* CanvasRenderingContext2D.cpp */; };
-                93EEC20009C2877700C515D1 /* CanvasRenderingContext2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EEC1EE09C2877700C515D1 /* CanvasRenderingContext2D.h */; };
-                93EEC20109C2877700C515D1 /* CanvasStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EEC1EF09C2877700C515D1 /* CanvasStyle.h */; };
-                93EEC20209C2877700C515D1 /* CanvasGradient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EEC1F009C2877700C515D1 /* CanvasGradient.cpp */; };
-                93EEC20309C2877700C515D1 /* CanvasGradient.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EEC1F109C2877700C515D1 /* CanvasGradient.h */; };
-                93EEC20409C2877700C515D1 /* CanvasPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EEC1F209C2877700C515D1 /* CanvasPattern.h */; };
-                93EEC26F09C3218000C515D1 /* CanvasPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EEC26E09C3218000C515D1 /* CanvasPattern.cpp */; };
-                93EEC27109C3218800C515D1 /* CanvasStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EEC27009C3218800C515D1 /* CanvasStyle.cpp */; };
</del><span class="cx">                 93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23C02DE4396018635CA /* HTMLDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 93F198E608245E59001E9ABC /* HTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* HTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 93F198EF08245E59001E9ABC /* HTMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25102DE4396018635CA /* HTMLParser.h */; };
</span><span class="lines">@@ -2200,7 +2205,6 @@
</span><span class="cx">                 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; };
</span><span class="cx">                 A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
</span><span class="cx">                 A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
</span><del>-                A7094AFA0F27AE6000596CEC /* CanvasPixelArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7094AF90F27AE6000596CEC /* CanvasPixelArray.cpp */; };
</del><span class="cx">                 A718760E0B2A120100A16ECE /* DragActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A718760D0B2A120100A16ECE /* DragActions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A71878900B2D04AC00A16ECE /* DragControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */; };
</span><span class="cx">                 A7352C190B1BB89D00A986D0 /* RenderSVGBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7352C170B1BB89D00A986D0 /* RenderSVGBlock.cpp */; };
</span><span class="lines">@@ -5751,6 +5755,20 @@
</span><span class="cx">                 46F9D5DA0B0D60170028EE36 /* aliasCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = aliasCursor.png; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 46F9D5DB0B0D60170028EE36 /* noDropCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noDropCursor.png; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasGradient.cpp; path = canvas/CanvasGradient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FB4102CF23C00187DD3 /* CanvasGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasGradient.h; path = canvas/CanvasGradient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FB5102CF23C00187DD3 /* CanvasGradient.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CanvasGradient.idl; path = canvas/CanvasGradient.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasPattern.cpp; path = canvas/CanvasPattern.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FB7102CF23C00187DD3 /* CanvasPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasPattern.h; path = canvas/CanvasPattern.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FB8102CF23C00187DD3 /* CanvasPattern.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CanvasPattern.idl; path = canvas/CanvasPattern.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FB9102CF23C00187DD3 /* CanvasPixelArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasPixelArray.cpp; path = canvas/CanvasPixelArray.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FBA102CF23C00187DD3 /* CanvasPixelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasPixelArray.h; path = canvas/CanvasPixelArray.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FBB102CF23C00187DD3 /* CanvasPixelArray.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CanvasPixelArray.idl; path = canvas/CanvasPixelArray.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasRenderingContext2D.cpp; path = canvas/CanvasRenderingContext2D.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasRenderingContext2D.h; path = canvas/CanvasRenderingContext2D.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CanvasRenderingContext2D.idl; path = canvas/CanvasRenderingContext2D.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasStyle.cpp; path = canvas/CanvasStyle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                49484FC0102CF23C00187DD3 /* CanvasStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasStyle.h; path = canvas/CanvasStyle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 494BD7930F55C8EE00747828 /* WebKitPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitPoint.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 494BD7940F55C8EE00747828 /* WebKitPoint.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitPoint.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 494BD7970F55C90E00747828 /* JSWebKitPointConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitPointConstructor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -6928,7 +6946,6 @@
</span><span class="cx">                 85F56A790A98CE3700ADB60A /* DOMProcessingInstruction.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMProcessingInstruction.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                898D1FB20F27934B004BBAC7 /* CanvasPixelArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasPixelArray.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 929264760B61FC7200B41D34 /* JSDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroup.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroup.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -6943,9 +6960,6 @@
</span><span class="cx">                 9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResult.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9307F1D60AF2D59000DBA31A /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 930908900AF7EDE40081DF01 /* HitTestRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HitTestRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                930CAAD609C495B600229C04 /* CanvasRenderingContext2D.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasRenderingContext2D.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
-                930CAB8809C49EFA00229C04 /* CanvasGradient.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasGradient.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
-                930CAB8F09C49F1B00229C04 /* CanvasPattern.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasPattern.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLOptionsCollection.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 932871BF0B20DEB70049035A /* PlatformMenuDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlatformMenuDescription.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 932E16080AF578340025F408 /* FrameLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameLoader.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7147,19 +7161,11 @@
</span><span class="cx">                 93EEC1E909C2877700C515D1 /* DOMImplementation.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMImplementation.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93EEC1EA09C2877700C515D1 /* Element.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Element.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93EEC1EB09C2877700C515D1 /* Entity.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Entity.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                93EEC1ED09C2877700C515D1 /* CanvasRenderingContext2D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasRenderingContext2D.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93EEC1EE09C2877700C515D1 /* CanvasRenderingContext2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasRenderingContext2D.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93EEC1EF09C2877700C515D1 /* CanvasStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasStyle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93EEC1F009C2877700C515D1 /* CanvasGradient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasGradient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93EEC1F109C2877700C515D1 /* CanvasGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasGradient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93EEC1F209C2877700C515D1 /* CanvasPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasPattern.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 93EEC1F309C2877700C515D1 /* MutationEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MutationEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93EEC1F409C2877700C515D1 /* Notation.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Notation.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93EEC1F509C2877700C515D1 /* ProcessingInstruction.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ProcessingInstruction.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93EEC1F609C2877700C515D1 /* Text.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Text.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93EEC1F709C2877700C515D1 /* WheelEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WheelEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                93EEC26E09C3218000C515D1 /* CanvasPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasPattern.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93EEC27009C3218800C515D1 /* CanvasStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasStyle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 93F19B1908245E59001E9ABC /* Info.plist */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 93F19B1A08245E5A001E9ABC /* WebCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 93F1D31A0558CC5C00821BC0 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = &quot;compiled.mach-o.dylib&quot;; name = libicucore.dylib; path = /usr/lib/libicucore.dylib; sourceTree = &quot;&lt;absolute&gt;&quot;; };
</span><span class="lines">@@ -7182,8 +7188,6 @@
</span><span class="cx">                 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A7094AF90F27AE6000596CEC /* CanvasPixelArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasPixelArray.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A7094AFB0F27AEE300596CEC /* CanvasPixelArray.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasPixelArray.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 A718760D0B2A120100A16ECE /* DragActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragActions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DragControllerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A7352C170B1BB89D00A986D0 /* RenderSVGBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGBlock.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -10069,6 +10073,27 @@
</span><span class="cx">                         name = Exports;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                49484FAE102CF01E00187DD3 /* canvas */ = {
+                        isa = PBXGroup;
+                        children = (
+                                49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
+                                49484FB4102CF23C00187DD3 /* CanvasGradient.h */,
+                                49484FB5102CF23C00187DD3 /* CanvasGradient.idl */,
+                                49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */,
+                                49484FB7102CF23C00187DD3 /* CanvasPattern.h */,
+                                49484FB8102CF23C00187DD3 /* CanvasPattern.idl */,
+                                49484FB9102CF23C00187DD3 /* CanvasPixelArray.cpp */,
+                                49484FBA102CF23C00187DD3 /* CanvasPixelArray.h */,
+                                49484FBB102CF23C00187DD3 /* CanvasPixelArray.idl */,
+                                49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */,
+                                49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */,
+                                49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */,
+                                49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */,
+                                49484FC0102CF23C00187DD3 /* CanvasStyle.h */,
+                        );
+                        name = canvas;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 49E911B20EF86D27009D0CAF /* transforms */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -11807,20 +11832,7 @@
</span><span class="cx">                 93EEC1EC09C2877700C515D1 /* html */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                93EEC1F009C2877700C515D1 /* CanvasGradient.cpp */,
-                                93EEC1F109C2877700C515D1 /* CanvasGradient.h */,
-                                930CAB8809C49EFA00229C04 /* CanvasGradient.idl */,
-                                93EEC26E09C3218000C515D1 /* CanvasPattern.cpp */,
-                                93EEC1F209C2877700C515D1 /* CanvasPattern.h */,
-                                930CAB8F09C49F1B00229C04 /* CanvasPattern.idl */,
-                                A7094AF90F27AE6000596CEC /* CanvasPixelArray.cpp */,
-                                898D1FB20F27934B004BBAC7 /* CanvasPixelArray.h */,
-                                A7094AFB0F27AEE300596CEC /* CanvasPixelArray.idl */,
-                                93EEC1ED09C2877700C515D1 /* CanvasRenderingContext2D.cpp */,
-                                93EEC1EE09C2877700C515D1 /* CanvasRenderingContext2D.h */,
-                                930CAAD609C495B600229C04 /* CanvasRenderingContext2D.idl */,
-                                93EEC27009C3218800C515D1 /* CanvasStyle.cpp */,
-                                93EEC1EF09C2877700C515D1 /* CanvasStyle.h */,
</del><ins>+                                49484FAE102CF01E00187DD3 /* canvas */,
</ins><span class="cx">                                 93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
</span><span class="cx">                                 93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
</span><span class="cx">                                 93C441FF0F813AE100C1A634 /* CollectionType.h */,
</span><span class="lines">@@ -14963,11 +14975,6 @@
</span><span class="cx">                                 BCB16C260979C3BD00467741 /* CachedXBLDocument.h in Headers */,
</span><span class="cx">                                 BCB16C280979C3BD00467741 /* CachedXSLStyleSheet.h in Headers */,
</span><span class="cx">                                 93F1995008245E59001E9ABC /* CachePolicy.h in Headers */,
</span><del>-                                93EEC20309C2877700C515D1 /* CanvasGradient.h in Headers */,
-                                93EEC20409C2877700C515D1 /* CanvasPattern.h in Headers */,
-                                898D1FB30F27934B004BBAC7 /* CanvasPixelArray.h in Headers */,
-                                93EEC20009C2877700C515D1 /* CanvasRenderingContext2D.h in Headers */,
-                                93EEC20109C2877700C515D1 /* CanvasStyle.h in Headers */,
</del><span class="cx">                                 6550B69E099DF0270090D781 /* CDATASection.h in Headers */,
</span><span class="cx">                                 514185EE0CD65F0400763C99 /* ChangeVersionWrapper.h in Headers */,
</span><span class="cx">                                 6550B6A0099DF0270090D781 /* CharacterData.h in Headers */,
</span><span class="lines">@@ -17173,6 +17180,11 @@
</span><span class="cx">                                 0FF50263102BA92C0066F39A /* DOMMediaInternal.h in Headers */,
</span><span class="cx">                                 0FF5026A102BA9430066F39A /* JSMedia.h in Headers */,
</span><span class="cx">                                 0FF50272102BA96A0066F39A /* Media.h in Headers */,
</span><ins>+                                49484FC2102CF23C00187DD3 /* CanvasGradient.h in Headers */,
+                                49484FC5102CF23C00187DD3 /* CanvasPattern.h in Headers */,
+                                49484FC8102CF23C00187DD3 /* CanvasPixelArray.h in Headers */,
+                                49484FCB102CF23C00187DD3 /* CanvasRenderingContext2D.h in Headers */,
+                                49484FCE102CF23C00187DD3 /* CanvasStyle.h in Headers */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -17274,6 +17286,10 @@
</span><span class="cx">                                 85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
</span><span class="cx">                                 1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
</span><span class="cx">                                 1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
</span><ins>+                                49484FC3102CF23C00187DD3 /* CanvasGradient.idl in Resources */,
+                                49484FC6102CF23C00187DD3 /* CanvasPattern.idl in Resources */,
+                                49484FC9102CF23C00187DD3 /* CanvasPixelArray.idl in Resources */,
+                                49484FCC102CF23C00187DD3 /* CanvasRenderingContext2D.idl in Resources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -17498,11 +17514,6 @@
</span><span class="cx">                                 BCB16C230979C3BD00467741 /* CachedScript.cpp in Sources */,
</span><span class="cx">                                 BCB16C250979C3BD00467741 /* CachedXBLDocument.cpp in Sources */,
</span><span class="cx">                                 BCB16C270979C3BD00467741 /* CachedXSLStyleSheet.cpp in Sources */,
</span><del>-                                93EEC20209C2877700C515D1 /* CanvasGradient.cpp in Sources */,
-                                93EEC26F09C3218000C515D1 /* CanvasPattern.cpp in Sources */,
-                                A7094AFA0F27AE6000596CEC /* CanvasPixelArray.cpp in Sources */,
-                                93EEC1FF09C2877700C515D1 /* CanvasRenderingContext2D.cpp in Sources */,
-                                93EEC27109C3218800C515D1 /* CanvasStyle.cpp in Sources */,
</del><span class="cx">                                 6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */,
</span><span class="cx">                                 514185EF0CD65F0400763C99 /* ChangeVersionWrapper.cpp in Sources */,
</span><span class="cx">                                 6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */,
</span><span class="lines">@@ -19220,6 +19231,11 @@
</span><span class="cx">                                 0FF5025C102BA9010066F39A /* DOMMedia.mm in Sources */,
</span><span class="cx">                                 0FF50269102BA9430066F39A /* JSMedia.cpp in Sources */,
</span><span class="cx">                                 0FF50271102BA96A0066F39A /* Media.cpp in Sources */,
</span><ins>+                                49484FC1102CF23C00187DD3 /* CanvasGradient.cpp in Sources */,
+                                49484FC4102CF23C00187DD3 /* CanvasPattern.cpp in Sources */,
+                                49484FC7102CF23C00187DD3 /* CanvasPixelArray.cpp in Sources */,
+                                49484FCA102CF23C00187DD3 /* CanvasRenderingContext2D.cpp in Sources */,
+                                49484FCD102CF23C00187DD3 /* CanvasStyle.cpp in Sources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="trunkWebCoreWebCoreSourcesbkl"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCoreSources.bkl (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCoreSources.bkl        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/WebCoreSources.bkl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -567,11 +567,11 @@
</span><span class="cx">     &lt;/set&gt;
</span><span class="cx">     
</span><span class="cx">     &lt;set append=&quot;1&quot; var=&quot;WEBCORE_SOURCES_HTML&quot;&gt;
</span><del>-        html/CanvasGradient.cpp
-        html/CanvasPattern.cpp
-        html/CanvasPixelArray.cpp
-        html/CanvasRenderingContext2D.cpp
-        html/CanvasStyle.cpp
</del><ins>+        html/canvas/CanvasGradient.cpp
+        html/canvas/CanvasPattern.cpp
+        html/canvas/CanvasPixelArray.cpp
+        html/canvas/CanvasRenderingContext2D.cpp
+        html/canvas/CanvasStyle.cpp
</ins><span class="cx">         html/CollectionCache.cpp
</span><span class="cx">         html/DOMDataGridDataSource.cpp
</span><span class="cx">         html/File.cpp
</span></span></pre></div>
<a id="trunkWebCorehtmlCanvasGradientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasGradient.cpp (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasGradient.cpp        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasGradient.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
- *
- * 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;CanvasGradient.h&quot;
-
-#include &quot;CSSParser.h&quot;
-#include &quot;ExceptionCode.h&quot;
-
-namespace WebCore {
-
-CanvasGradient::CanvasGradient(const FloatPoint&amp; p0, const FloatPoint&amp; p1)
-    : m_gradient(Gradient::create(p0, p1))
-    , m_dashbardCompatibilityMode(false)
-{
-}
-
-CanvasGradient::CanvasGradient(const FloatPoint&amp; p0, float r0, const FloatPoint&amp; p1, float r1)
-    : m_gradient(Gradient::create(p0, r0, p1, r1))
-    , m_dashbardCompatibilityMode(false)
-{
-}
-
-void CanvasGradient::addColorStop(float value, const String&amp; color, ExceptionCode&amp; ec)
-{
-    if (!(value &gt;= 0 &amp;&amp; value &lt;= 1.0f)) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-
-    RGBA32 rgba = 0;
-    if (!CSSParser::parseColor(rgba, color)) {
-        if (!m_dashbardCompatibilityMode)
-            ec = SYNTAX_ERR;
-        return;
-    }
-
-    m_gradient-&gt;addColorStop(value, Color(rgba));
-}
-
-} // namespace
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasGradienth"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasGradient.h (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasGradient.h        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasGradient.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
- *
- * 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 CanvasGradient_h
-#define CanvasGradient_h
-
-#include &quot;Gradient.h&quot;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-namespace WebCore {
-
-    class String;
-
-    typedef int ExceptionCode;
-
-    class CanvasGradient : public RefCounted&lt;CanvasGradient&gt; {
-    public:
-        static PassRefPtr&lt;CanvasGradient&gt; create(const FloatPoint&amp; p0, const FloatPoint&amp; p1)
-        {
-            return adoptRef(new CanvasGradient(p0, p1));
-        }
-        static PassRefPtr&lt;CanvasGradient&gt; create(const FloatPoint&amp; p0, float r0, const FloatPoint&amp; p1, float r1)
-        {
-            return adoptRef(new CanvasGradient(p0, r0, p1, r1));
-        }
-        
-        Gradient* gradient() const { return m_gradient.get(); }
-
-        void addColorStop(float value, const String&amp; color, ExceptionCode&amp;);
-
-        void getColor(float value, float* r, float* g, float* b, float* a) const { m_gradient-&gt;getColor(value, r, g, b, a); }
-
-#if ENABLE(DASHBOARD_SUPPORT)
-        void setDashboardCompatibilityMode() { m_dashbardCompatibilityMode = true; }
-#endif
-
-    private:
-        CanvasGradient(const FloatPoint&amp; p0, const FloatPoint&amp; p1);
-        CanvasGradient(const FloatPoint&amp; p0, float r0, const FloatPoint&amp; p1, float r1);
-        
-        RefPtr&lt;Gradient&gt; m_gradient;
-        bool m_dashbardCompatibilityMode;
-    };
-
-} //namespace
-
-#endif
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasGradientidl"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasGradient.idl (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasGradient.idl        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasGradient.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006 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. 
- */
-
-module html {
-
-    interface [
-        InterfaceUUID=bb1108ea-6b8c-4a08-894a-218628630cdb,
-        ImplementationUUID=a2942ae6-2731-4286-98cc-9d5e79e20de1
-    ] CanvasGradient {
-
-        void addColorStop(in float offset, in DOMString color)
-            raises (DOMException);
-
-    };
-
-}
-
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasPatterncpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasPattern.cpp (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasPattern.cpp        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasPattern.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,66 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2008 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;CanvasPattern.h&quot;
-
-#include &quot;ExceptionCode.h&quot;
-#include &quot;PlatformString.h&quot;
-
-namespace WebCore {
-
-void CanvasPattern::parseRepetitionType(const String&amp; type, bool&amp; repeatX, bool&amp; repeatY, ExceptionCode&amp; ec)
-{
-    ec = 0;
-    if (type.isEmpty() || type == &quot;repeat&quot;) {
-        repeatX = true;
-        repeatY = true;
-        return;
-    }
-    if (type == &quot;no-repeat&quot;) {
-        repeatX = false;
-        repeatY = false;
-        return;
-    }
-    if (type == &quot;repeat-x&quot;) {
-        repeatX = true;
-        repeatY = false;
-        return;
-    }
-    if (type == &quot;repeat-y&quot;) {
-        repeatX = false;
-        repeatY = true;
-        return;
-    }
-    ec = SYNTAX_ERR;
-}
-
-CanvasPattern::CanvasPattern(Image* image, bool repeatX, bool repeatY, bool originClean)
-    : m_pattern(Pattern::create(image, repeatX, repeatY))
-    , m_originClean(originClean)
-{
-}
-
-}
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasPatternh"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasPattern.h (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasPattern.h        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasPattern.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,62 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2008 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 CanvasPattern_h
-#define CanvasPattern_h
-
-#include &quot;Pattern.h&quot;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-
-namespace WebCore {
-
-    class Image;
-    class String;
-
-    typedef int ExceptionCode;
-
-    class CanvasPattern : public RefCounted&lt;CanvasPattern&gt; {
-    public:
-        static void parseRepetitionType(const String&amp;, bool&amp; repeatX, bool&amp; repeatY, ExceptionCode&amp;);
-
-        static PassRefPtr&lt;CanvasPattern&gt; create(Image* image, bool repeatX, bool repeatY, bool originClean)
-        {
-            return adoptRef(new CanvasPattern(image, repeatX, repeatY, originClean));
-        }
-
-        Pattern* pattern() const { return m_pattern.get(); }
-
-        bool originClean() const { return m_originClean; }
-
-    private:
-        CanvasPattern(Image*, bool repeatX, bool repeatY, bool originClean);
-
-        RefPtr&lt;Pattern&gt; m_pattern;
-        bool m_originClean;
-    };
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasPatternidl"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasPattern.idl (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasPattern.idl        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasPattern.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006 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. 
- */
-
-module html {
-
-    interface [
-        InterfaceUUID=c2131348-6d8c-47b5-86cc-d41aff34ce15,
-        ImplementationUUID=82f5d713-3d17-44dd-aa4a-7766fe345940
-    ] CanvasPattern {
-
-    };
-
-}
-
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasPixelArraycpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasPixelArray.cpp (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasPixelArray.cpp        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasPixelArray.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009 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.
- * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;CanvasPixelArray.h&quot;
-
-namespace WebCore {
-    
-    PassRefPtr&lt;CanvasPixelArray&gt; CanvasPixelArray::create(unsigned length)
-    {
-        return adoptRef(new CanvasPixelArray(length));
-    }
-    
-    CanvasPixelArray::CanvasPixelArray(unsigned length)
-        : m_data(WTF::ByteArray::create(length))
-    {
-    }
-    
-}
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasPixelArrayh"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasPixelArray.h (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasPixelArray.h        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasPixelArray.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009 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.
- * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CanvasPixelArray_h
-#define CanvasPixelArray_h
-
-#include &lt;wtf/ByteArray.h&gt;
-#include &lt;wtf/MathExtras.h&gt;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace WebCore {
-    
-    class CanvasPixelArray : public RefCounted&lt;CanvasPixelArray&gt; {
-    public:
-        static PassRefPtr&lt;CanvasPixelArray&gt; create(unsigned length);
-        
-        WTF::ByteArray* data() { return m_data.get(); }
-        unsigned length() const { return m_data-&gt;length(); }
-        
-        void set(unsigned index, double value)
-        {
-            m_data-&gt;set(index, value);
-        }
-        
-        bool get(unsigned index, unsigned char&amp; result) const
-        {
-            return m_data-&gt;get(index, result);
-        }
-
-    private:
-        CanvasPixelArray(unsigned length);
-        RefPtr&lt;WTF::ByteArray&gt; m_data;
-    };
-    
-} // namespace WebCore
-
-#endif // CanvasPixelArray_h
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasPixelArrayidl"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasPixelArray.idl (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasPixelArray.idl        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasPixelArray.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2009 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.
- * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-module html {
-#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT || defined(V8_BINDING) &amp;&amp; V8_BINDING
-    interface [
-        CustomHeader,
-        HasCustomIndexGetter,
-        HasCustomIndexSetter
-    ] CanvasPixelArray {
-        readonly attribute long length;
-    };
-#endif
-}
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasRenderingContext2Dcpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasRenderingContext2D.cpp (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasRenderingContext2D.cpp        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasRenderingContext2D.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,1566 +0,0 @@
</span><del>-/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
- * Copyright (C) 2008 Eric Seidel &lt;eric@webkit.org&gt;
- * Copyright (C) 2008 Dirk Schulze &lt;krit@webkit.org&gt;
- *
- * 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;CanvasRenderingContext2D.h&quot;
-
-#include &quot;TransformationMatrix.h&quot;
-#include &quot;CSSParser.h&quot;
-#include &quot;CachedImage.h&quot;
-#include &quot;CanvasGradient.h&quot;
-#include &quot;CanvasPattern.h&quot;
-#include &quot;CanvasStyle.h&quot;
-#include &quot;CSSMutableStyleDeclaration.h&quot;
-#include &quot;CSSPropertyNames.h&quot;
-#include &quot;CSSStyleSelector.h&quot;
-#include &quot;Document.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;FloatConversion.h&quot;
-#include &quot;Frame.h&quot;
-#include &quot;GraphicsContext.h&quot;
-#include &quot;HTMLCanvasElement.h&quot;
-#include &quot;HTMLImageElement.h&quot;
-#include &quot;HTMLNames.h&quot;
-#include &quot;ImageBuffer.h&quot;
-#include &quot;ImageData.h&quot;
-#include &quot;KURL.h&quot;
-#include &quot;Page.h&quot;
-#include &quot;RenderHTMLCanvas.h&quot;
-#include &quot;SecurityOrigin.h&quot;
-#include &quot;Settings.h&quot;
-#include &quot;StrokeStyleApplier.h&quot;
-#include &quot;TextMetrics.h&quot;
-#include &quot;HTMLVideoElement.h&quot;
-#include &lt;stdio.h&gt;
-#include &lt;wtf/ByteArray.h&gt;
-#include &lt;wtf/MathExtras.h&gt;
-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/UnusedParam.h&gt;
-
-using namespace std;
-
-namespace WebCore {
-
-using namespace HTMLNames;
-
-static const char* const defaultFont = &quot;10px sans-serif&quot;;
-
-
-class CanvasStrokeStyleApplier : public StrokeStyleApplier {
-public:
-    CanvasStrokeStyleApplier(CanvasRenderingContext2D* canvasContext)
-        : m_canvasContext(canvasContext)
-    {
-    }
-    
-    virtual void strokeStyle(GraphicsContext* c)
-    {
-        c-&gt;setStrokeThickness(m_canvasContext-&gt;lineWidth());
-        c-&gt;setLineCap(m_canvasContext-&gt;getLineCap());
-        c-&gt;setLineJoin(m_canvasContext-&gt;getLineJoin());
-        c-&gt;setMiterLimit(m_canvasContext-&gt;miterLimit());
-    }
-
-private:
-    CanvasRenderingContext2D* m_canvasContext;
-};
-
-
-
-CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas)
-    : m_canvas(canvas)
-    , m_stateStack(1)
-{
-    // Make sure that even if the drawingContext() has a different default
-    // thickness, it is in sync with the canvas thickness.
-    setLineWidth(lineWidth());
-}
-
-void CanvasRenderingContext2D::ref()
-{
-    m_canvas-&gt;ref();
-}
-
-void CanvasRenderingContext2D::deref()
-{
-    m_canvas-&gt;deref(); 
-}
-
-void CanvasRenderingContext2D::reset()
-{
-    m_stateStack.resize(1);
-    m_stateStack.first() = State();
-}
-
-CanvasRenderingContext2D::State::State()
-    : m_strokeStyle(CanvasStyle::create(&quot;black&quot;))
-    , m_fillStyle(CanvasStyle::create(&quot;black&quot;))
-    , m_lineWidth(1)
-    , m_lineCap(ButtCap)
-    , m_lineJoin(MiterJoin)
-    , m_miterLimit(10)
-    , m_shadowBlur(0)
-    , m_shadowColor(&quot;black&quot;)
-    , m_globalAlpha(1)
-    , m_globalComposite(CompositeSourceOver)
-    , m_invertibleCTM(true)
-    , m_textAlign(StartTextAlign)
-    , m_textBaseline(AlphabeticTextBaseline)
-    , m_unparsedFont(defaultFont)
-    , m_realizedFont(false)
-{
-}
-
-void CanvasRenderingContext2D::save()
-{
-    ASSERT(m_stateStack.size() &gt;= 1);
-    m_stateStack.append(state());
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;save();
-}
-
-void CanvasRenderingContext2D::restore()
-{
-    ASSERT(m_stateStack.size() &gt;= 1);
-    if (m_stateStack.size() &lt;= 1)
-        return;
-    m_path.transform(state().m_transform);
-    m_stateStack.removeLast();
-    m_path.transform(state().m_transform.inverse());
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;restore();
-}
-
-CanvasStyle* CanvasRenderingContext2D::strokeStyle() const
-{
-    return state().m_strokeStyle.get();
-}
-
-void CanvasRenderingContext2D::setStrokeStyle(PassRefPtr&lt;CanvasStyle&gt; style)
-{
-    if (!style)
-        return;
-
-    if (m_canvas-&gt;originClean()) {
-        if (CanvasPattern* pattern = style-&gt;canvasPattern()) {
-            if (!pattern-&gt;originClean())
-                m_canvas-&gt;setOriginTainted();
-        }
-    }
-
-    state().m_strokeStyle = style;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    state().m_strokeStyle-&gt;applyStrokeColor(c);
-}
-
-CanvasStyle* CanvasRenderingContext2D::fillStyle() const
-{
-    return state().m_fillStyle.get();
-}
-
-void CanvasRenderingContext2D::setFillStyle(PassRefPtr&lt;CanvasStyle&gt; style)
-{
-    if (!style)
-        return;

-    if (m_canvas-&gt;originClean()) {
-        if (CanvasPattern* pattern = style-&gt;canvasPattern()) {
-            if (!pattern-&gt;originClean())
-                m_canvas-&gt;setOriginTainted();
-        }
-    }
-
-    state().m_fillStyle = style;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    state().m_fillStyle-&gt;applyFillColor(c);
-}
-
-float CanvasRenderingContext2D::lineWidth() const
-{
-    return state().m_lineWidth;
-}
-
-void CanvasRenderingContext2D::setLineWidth(float width)
-{
-    if (!(width &gt; 0))
-        return;
-    state().m_lineWidth = width;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;setStrokeThickness(width);
-}
-
-String CanvasRenderingContext2D::lineCap() const
-{
-    return lineCapName(state().m_lineCap);
-}
-
-void CanvasRenderingContext2D::setLineCap(const String&amp; s)
-{
-    LineCap cap;
-    if (!parseLineCap(s, cap))
-        return;
-    state().m_lineCap = cap;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;setLineCap(cap);
-}
-
-String CanvasRenderingContext2D::lineJoin() const
-{
-    return lineJoinName(state().m_lineJoin);
-}
-
-void CanvasRenderingContext2D::setLineJoin(const String&amp; s)
-{
-    LineJoin join;
-    if (!parseLineJoin(s, join))
-        return;
-    state().m_lineJoin = join;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;setLineJoin(join);
-}
-
-float CanvasRenderingContext2D::miterLimit() const
-{
-    return state().m_miterLimit;
-}
-
-void CanvasRenderingContext2D::setMiterLimit(float limit)
-{
-    if (!(limit &gt; 0))
-        return;
-    state().m_miterLimit = limit;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;setMiterLimit(limit);
-}
-
-float CanvasRenderingContext2D::shadowOffsetX() const
-{
-    return state().m_shadowOffset.width();
-}
-
-void CanvasRenderingContext2D::setShadowOffsetX(float x)
-{
-    state().m_shadowOffset.setWidth(x);
-    applyShadow();
-}
-
-float CanvasRenderingContext2D::shadowOffsetY() const
-{
-    return state().m_shadowOffset.height();
-}
-
-void CanvasRenderingContext2D::setShadowOffsetY(float y)
-{
-    state().m_shadowOffset.setHeight(y);
-    applyShadow();
-}
-
-float CanvasRenderingContext2D::shadowBlur() const
-{
-    return state().m_shadowBlur;
-}
-
-void CanvasRenderingContext2D::setShadowBlur(float blur)
-{
-    state().m_shadowBlur = blur;
-    applyShadow();
-}
-
-String CanvasRenderingContext2D::shadowColor() const
-{
-    // FIXME: What should this return if you called setShadow with a non-string color?
-    return state().m_shadowColor;
-}
-
-void CanvasRenderingContext2D::setShadowColor(const String&amp; color)
-{
-    state().m_shadowColor = color;
-    applyShadow();
-}
-
-float CanvasRenderingContext2D::globalAlpha() const
-{
-    return state().m_globalAlpha;
-}
-
-void CanvasRenderingContext2D::setGlobalAlpha(float alpha)
-{
-    if (!(alpha &gt;= 0 &amp;&amp; alpha &lt;= 1))
-        return;
-    state().m_globalAlpha = alpha;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;setAlpha(alpha);
-}
-
-String CanvasRenderingContext2D::globalCompositeOperation() const
-{
-    return compositeOperatorName(state().m_globalComposite);
-}
-
-void CanvasRenderingContext2D::setGlobalCompositeOperation(const String&amp; operation)
-{
-    CompositeOperator op;
-    if (!parseCompositeOperator(operation, op))
-        return;
-    state().m_globalComposite = op;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    c-&gt;setCompositeOperation(op);
-}
-
-void CanvasRenderingContext2D::scale(float sx, float sy)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    TransformationMatrix newTransform = state().m_transform;
-    newTransform.scaleNonUniform(sx, sy);
-    if (!newTransform.isInvertible()) {
-        state().m_invertibleCTM = false;
-        return;
-    }
-
-    state().m_transform = newTransform;
-    c-&gt;scale(FloatSize(sx, sy));
-    m_path.transform(TransformationMatrix().scaleNonUniform(1.0/sx, 1.0/sy));
-}
-
-void CanvasRenderingContext2D::rotate(float angleInRadians)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    TransformationMatrix newTransform = state().m_transform;
-    newTransform.rotate(angleInRadians / piDouble * 180.0);
-    if (!newTransform.isInvertible()) {
-        state().m_invertibleCTM = false;
-        return;
-    }
-
-    state().m_transform = newTransform;
-    c-&gt;rotate(angleInRadians);
-    m_path.transform(TransformationMatrix().rotate(-angleInRadians / piDouble * 180.0));
-}
-
-void CanvasRenderingContext2D::translate(float tx, float ty)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    TransformationMatrix newTransform = state().m_transform;
-    newTransform.translate(tx, ty);
-    if (!newTransform.isInvertible()) {
-        state().m_invertibleCTM = false;
-        return;
-    }
-
-    state().m_transform = newTransform;
-    c-&gt;translate(tx, ty);
-    m_path.transform(TransformationMatrix().translate(-tx, -ty));
-}
-
-void CanvasRenderingContext2D::transform(float m11, float m12, float m21, float m22, float dx, float dy)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    
-    // HTML5 3.14.11.1 -- ignore any calls that pass non-finite numbers
-    if (!isfinite(m11) | !isfinite(m21) | !isfinite(dx) | 
-        !isfinite(m12) | !isfinite(m22) | !isfinite(dy))
-        return;
-
-    TransformationMatrix transform(m11, m12, m21, m22, dx, dy);
-    TransformationMatrix newTransform = transform * state().m_transform;
-    if (!newTransform.isInvertible()) {
-        state().m_invertibleCTM = false;
-        return;
-    }
-
-    state().m_transform = newTransform;
-    c-&gt;concatCTM(transform);
-    m_path.transform(transform.inverse());
-}
-
-void CanvasRenderingContext2D::setTransform(float m11, float m12, float m21, float m22, float dx, float dy)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    
-    // HTML5 3.14.11.1 -- ignore any calls that pass non-finite numbers
-    if (!isfinite(m11) | !isfinite(m21) | !isfinite(dx) | 
-        !isfinite(m12) | !isfinite(m22) | !isfinite(dy))
-        return;
-
-    TransformationMatrix ctm = state().m_transform;
-    if (!ctm.isInvertible())
-        return;
-    c-&gt;concatCTM(c-&gt;getCTM().inverse());
-    c-&gt;concatCTM(m_canvas-&gt;baseTransform());
-    state().m_transform.multiply(ctm.inverse());
-    m_path.transform(ctm);
-
-    state().m_invertibleCTM = true;
-    transform(m11, m12, m21, m22, dx, dy);
-}
-
-void CanvasRenderingContext2D::setStrokeColor(const String&amp; color)
-{
-    setStrokeStyle(CanvasStyle::create(color));
-}
-
-void CanvasRenderingContext2D::setStrokeColor(float grayLevel)
-{
-    setStrokeStyle(CanvasStyle::create(grayLevel, 1));
-}
-
-void CanvasRenderingContext2D::setStrokeColor(const String&amp; color, float alpha)
-{
-    setStrokeStyle(CanvasStyle::create(color, alpha));
-}
-
-void CanvasRenderingContext2D::setStrokeColor(float grayLevel, float alpha)
-{
-    setStrokeStyle(CanvasStyle::create(grayLevel, alpha));
-}
-
-void CanvasRenderingContext2D::setStrokeColor(float r, float g, float b, float a)
-{
-    setStrokeStyle(CanvasStyle::create(r, g, b, a));
-}
-
-void CanvasRenderingContext2D::setStrokeColor(float c, float m, float y, float k, float a)
-{
-    setStrokeStyle(CanvasStyle::create(c, m, y, k, a));
-}
-
-void CanvasRenderingContext2D::setFillColor(const String&amp; color)
-{
-    setFillStyle(CanvasStyle::create(color));
-}
-
-void CanvasRenderingContext2D::setFillColor(float grayLevel)
-{
-    setFillStyle(CanvasStyle::create(grayLevel, 1));
-}
-
-void CanvasRenderingContext2D::setFillColor(const String&amp; color, float alpha)
-{
-    setFillStyle(CanvasStyle::create(color, alpha));
-}
-
-void CanvasRenderingContext2D::setFillColor(float grayLevel, float alpha)
-{
-    setFillStyle(CanvasStyle::create(grayLevel, alpha));
-}
-
-void CanvasRenderingContext2D::setFillColor(float r, float g, float b, float a)
-{
-    setFillStyle(CanvasStyle::create(r, g, b, a));
-}
-
-void CanvasRenderingContext2D::setFillColor(float c, float m, float y, float k, float a)
-{
-    setFillStyle(CanvasStyle::create(c, m, y, k, a));
-}
-
-void CanvasRenderingContext2D::beginPath()
-{
-    m_path.clear();
-}
-
-void CanvasRenderingContext2D::closePath()
-{
-    m_path.closeSubpath();
-}
-
-void CanvasRenderingContext2D::moveTo(float x, float y)
-{
-    if (!isfinite(x) | !isfinite(y))
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    m_path.moveTo(FloatPoint(x, y));
-}
-
-void CanvasRenderingContext2D::lineTo(float x, float y)
-{
-    if (!isfinite(x) | !isfinite(y))
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    if (!m_path.hasCurrentPoint())
-        m_path.moveTo(FloatPoint(x, y));
-    else
-        m_path.addLineTo(FloatPoint(x, y));
-}
-
-void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, float y)
-{
-    if (!isfinite(cpx) | !isfinite(cpy) | !isfinite(x) | !isfinite(y))
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    if (!m_path.hasCurrentPoint())
-        m_path.moveTo(FloatPoint(x, y));
-    else
-        m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y));
-}
-
-void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)
-{
-    if (!isfinite(cp1x) | !isfinite(cp1y) | !isfinite(cp2x) | !isfinite(cp2y) | !isfinite(x) | !isfinite(y))
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    if (!m_path.hasCurrentPoint())
-        m_path.moveTo(FloatPoint(x, y));
-    else
-        m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y));
-}
-
-void CanvasRenderingContext2D::arcTo(float x0, float y0, float x1, float y1, float r, ExceptionCode&amp; ec)
-{
-    ec = 0;
-    if (!isfinite(x0) | !isfinite(y0) | !isfinite(x1) | !isfinite(y1) | !isfinite(r))
-        return;
-    
-    if (r &lt; 0) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-    if (!state().m_invertibleCTM)
-        return;
-    m_path.addArcTo(FloatPoint(x0, y0), FloatPoint(x1, y1), r);
-}
-
-void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea, bool anticlockwise, ExceptionCode&amp; ec)
-{
-    ec = 0;
-    if (!isfinite(x) | !isfinite(y) | !isfinite(r) | !isfinite(sa) | !isfinite(ea))
-        return;
-    
-    if (r &lt; 0) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-    if (!state().m_invertibleCTM)
-        return;
-    m_path.addArc(FloatPoint(x, y), r, sa, ea, anticlockwise);
-}
-    
-static bool validateRectForCanvas(float&amp; x, float&amp; y, float&amp; width, float&amp; height)
-{
-    if (!isfinite(x) | !isfinite(y) | !isfinite(width) | !isfinite(height))
-        return false;
-    
-    if (width &lt; 0) {
-        width = -width;
-        x -= width;
-    }
-    
-    if (height &lt; 0) {
-        height = -height;
-        y -= height;
-    }
-    
-    return true;
-}
-
-void CanvasRenderingContext2D::rect(float x, float y, float width, float height)
-{
-    if (!validateRectForCanvas(x, y, width, height))
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    m_path.addRect(FloatRect(x, y, width, height));
-}
-
-#if ENABLE(DASHBOARD_SUPPORT)
-void CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode()
-{
-    if (Settings* settings = m_canvas-&gt;document()-&gt;settings())
-        if (settings-&gt;usesDashboardBackwardCompatibilityMode())
-            m_path.clear();
-}
-#endif
-
-void CanvasRenderingContext2D::fill()
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    if (!m_path.isEmpty()) {
-        c-&gt;beginPath();
-        c-&gt;addPath(m_path);
-        willDraw(m_path.boundingRect());
-        c-&gt;fillPath();
-    }
-
-#if ENABLE(DASHBOARD_SUPPORT)
-    clearPathForDashboardBackwardCompatibilityMode();
-#endif
-}
-
-void CanvasRenderingContext2D::stroke()
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    if (!m_path.isEmpty()) {
-        c-&gt;beginPath();
-        c-&gt;addPath(m_path);
-
-        CanvasStrokeStyleApplier strokeApplier(this);
-        FloatRect boundingRect = m_path.strokeBoundingRect(&amp;strokeApplier);
-        willDraw(boundingRect);
-
-        c-&gt;strokePath();
-    }
-
-#if ENABLE(DASHBOARD_SUPPORT)
-    clearPathForDashboardBackwardCompatibilityMode();
-#endif
-}
-
-void CanvasRenderingContext2D::clip()
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    c-&gt;clip(m_path);
-#if ENABLE(DASHBOARD_SUPPORT)
-    clearPathForDashboardBackwardCompatibilityMode();
-#endif
-}
-
-bool CanvasRenderingContext2D::isPointInPath(const float x, const float y)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return false;
-    if (!state().m_invertibleCTM)
-        return false;
-
-    FloatPoint point(x, y);
-    TransformationMatrix ctm = state().m_transform;
-    FloatPoint transformedPoint = ctm.inverse().mapPoint(point);
-    return m_path.contains(transformedPoint);
-}
-
-void CanvasRenderingContext2D::clearRect(float x, float y, float width, float height)
-{
-    if (!validateRectForCanvas(x, y, width, height))
-        return;
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    FloatRect rect(x, y, width, height);
-    willDraw(rect);
-    c-&gt;clearRect(rect);
-}
-
-void CanvasRenderingContext2D::fillRect(float x, float y, float width, float height)
-{
-    if (!validateRectForCanvas(x, y, width, height))
-        return;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    FloatRect rect(x, y, width, height);
-    willDraw(rect);
-
-    c-&gt;save();
-    c-&gt;fillRect(rect);
-    c-&gt;restore();
-}
-
-void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height)
-{
-    if (!validateRectForCanvas(x, y, width, height))
-        return;
-    strokeRect(x, y, width, height, state().m_lineWidth);
-}
-
-void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height, float lineWidth)
-{
-    if (!validateRectForCanvas(x, y, width, height))
-        return;
-    
-    if (!(lineWidth &gt;= 0))
-        return;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    FloatRect rect(x, y, width, height);
-
-    FloatRect boundingRect = rect;
-    boundingRect.inflate(lineWidth / 2);
-    willDraw(boundingRect);
-
-    c-&gt;strokeRect(rect, lineWidth);
-}
-
-#if PLATFORM(CG)
-static inline CGSize adjustedShadowSize(CGFloat width, CGFloat height)
-{
-    // Work around &lt;rdar://problem/5539388&gt; by ensuring that shadow offsets will get truncated
-    // to the desired integer.
-    static const CGFloat extraShadowOffset = narrowPrecisionToCGFloat(1.0 / 128);
-    if (width &gt; 0)
-        width += extraShadowOffset;
-    else if (width &lt; 0)
-        width -= extraShadowOffset;
-
-    if (height &gt; 0)
-        height += extraShadowOffset;
-    else if (height &lt; 0)
-        height -= extraShadowOffset;
-
-    return CGSizeMake(width, height);
-}
-#endif
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = &quot;&quot;;
-    applyShadow();
-}
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String&amp; color)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = color;
-    applyShadow();
-}
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = &quot;&quot;;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-
-    RGBA32 rgba = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, 1.0f);
-    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
-}
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String&amp; color, float alpha)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = color;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-
-    RGBA32 rgba = 0; // default is transparent black
-    if (!state().m_shadowColor.isEmpty())
-        CSSParser::parseColor(rgba, state().m_shadowColor);
-    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(colorWithOverrideAlpha(rgba, alpha)));
-}
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel, float alpha)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = &quot;&quot;;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-
-    RGBA32 rgba = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, alpha);
-    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
-}
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float r, float g, float b, float a)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = &quot;&quot;;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-
-    RGBA32 rgba = makeRGBA32FromFloats(r, g, b, a); // default is transparent black
-    if (!state().m_shadowColor.isEmpty())
-        CSSParser::parseColor(rgba, state().m_shadowColor);
-    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
-}
-
-void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
-{
-    state().m_shadowOffset = FloatSize(width, height);
-    state().m_shadowBlur = blur;
-    state().m_shadowColor = &quot;&quot;;
-
-    GraphicsContext* dc = drawingContext();
-    if (!dc)
-        return;
-#if PLATFORM(CG)
-    const CGFloat components[5] = { c, m, y, k, a };
-    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceCMYK();
-    CGColorRef shadowColor = CGColorCreate(colorSpace, components);
-    CGColorSpaceRelease(colorSpace);
-    CGContextSetShadowWithColor(dc-&gt;platformContext(), adjustedShadowSize(width, -height), blur, shadowColor);
-    CGColorRelease(shadowColor);
-#else
-    dc-&gt;setShadow(IntSize(width, -height), blur, Color(c, m, y, k, a));
-#endif
-}
-
-void CanvasRenderingContext2D::clearShadow()
-{
-    state().m_shadowOffset = FloatSize();
-    state().m_shadowBlur = 0;
-    state().m_shadowColor = &quot;&quot;;
-    applyShadow();
-}
-
-void CanvasRenderingContext2D::applyShadow()
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-
-    RGBA32 rgba = 0; // default is transparent black
-    if (!state().m_shadowColor.isEmpty())
-        CSSParser::parseColor(rgba, state().m_shadowColor);
-    float width = state().m_shadowOffset.width();
-    float height = state().m_shadowOffset.height();
-    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
-}
-
-static IntSize size(HTMLImageElement* image)
-{
-    if (CachedImage* cachedImage = image-&gt;cachedImage())
-        return cachedImage-&gt;imageSize(1.0f); // FIXME: Not sure about this.
-    return IntSize();
-}
-
-#if ENABLE(VIDEO)
-static IntSize size(HTMLVideoElement* video)
-{
-    if (MediaPlayer* player = video-&gt;player())
-        return player-&gt;naturalSize();
-    return IntSize();
-}
-#endif
-
-static inline FloatRect normalizeRect(const FloatRect&amp; rect)
-{
-    return FloatRect(min(rect.x(), rect.right()),
-        min(rect.y(), rect.bottom()),
-        max(rect.width(), -rect.width()),
-        max(rect.height(), -rect.height()));
-}
-
-void CanvasRenderingContext2D::checkOrigin(const KURL&amp; url)
-{
-    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::create(url);
-    if (!m_canvas-&gt;document()-&gt;securityOrigin()-&gt;canAccess(origin.get()))
-        m_canvas-&gt;setOriginTainted();
-}
-
-void CanvasRenderingContext2D::checkOrigin(const String&amp; url)
-{
-    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::createFromString(url);
-    if (!m_canvas-&gt;document()-&gt;securityOrigin()-&gt;canAccess(origin.get()))
-        m_canvas-&gt;setOriginTainted();
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, float x, float y)
-{
-    ASSERT(image);
-    IntSize s = size(image);
-    ExceptionCode ec;
-    drawImage(image, x, y, s.width(), s.height(), ec);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* image,
-    float x, float y, float width, float height, ExceptionCode&amp; ec)
-{
-    ASSERT(image);
-    IntSize s = size(image);
-    drawImage(image, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect,
-    ExceptionCode&amp; ec)
-{
-    ASSERT(image);
-
-    ec = 0;
-
-    FloatRect imageRect = FloatRect(FloatPoint(), size(image));
-    if (!imageRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-
-    if (!dstRect.width() || !dstRect.height())
-        return;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    CachedImage* cachedImage = image-&gt;cachedImage();
-    if (!cachedImage)
-        return;
-
-    if (m_canvas-&gt;originClean())
-        checkOrigin(cachedImage-&gt;response().url());
-
-    if (m_canvas-&gt;originClean() &amp;&amp; !cachedImage-&gt;image()-&gt;hasSingleSecurityOrigin())
-        m_canvas-&gt;setOriginTainted();
-
-    FloatRect sourceRect = c-&gt;roundToDevicePixels(srcRect);
-    FloatRect destRect = c-&gt;roundToDevicePixels(dstRect);
-    willDraw(destRect);
-    c-&gt;drawImage(cachedImage-&gt;image(), destRect, sourceRect, state().m_globalComposite);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, float x, float y)
-{
-    ASSERT(canvas);
-    ExceptionCode ec;
-    drawImage(canvas, x, y, canvas-&gt;width(), canvas-&gt;height(), ec);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas,
-    float x, float y, float width, float height, ExceptionCode&amp; ec)
-{
-    ASSERT(canvas);
-    drawImage(canvas, FloatRect(0, 0, canvas-&gt;width(), canvas-&gt;height()), FloatRect(x, y, width, height), ec);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, const FloatRect&amp; srcRect,
-    const FloatRect&amp; dstRect, ExceptionCode&amp; ec)
-{
-    ASSERT(canvas);
-
-    ec = 0;
-
-    FloatRect srcCanvasRect = FloatRect(FloatPoint(), canvas-&gt;size());
-    if (!srcCanvasRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-
-    if (!dstRect.width() || !dstRect.height())
-        return;
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-        
-    FloatRect sourceRect = c-&gt;roundToDevicePixels(srcRect);
-    FloatRect destRect = c-&gt;roundToDevicePixels(dstRect);
-        
-    // FIXME: Do this through platform-independent GraphicsContext API.
-    ImageBuffer* buffer = canvas-&gt;buffer();
-    if (!buffer)
-        return;
-
-    if (!canvas-&gt;originClean())
-        m_canvas-&gt;setOriginTainted();
-
-    c-&gt;drawImage(buffer-&gt;image(), destRect, sourceRect, state().m_globalComposite);
-    willDraw(destRect); // This call comes after drawImage, since the buffer we draw into may be our own, and we need to make sure it is dirty.
-                        // FIXME: Arguably willDraw should become didDraw and occur after drawing calls and not before them to avoid problems like this.
-}
-
-#if ENABLE(VIDEO)
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, float x, float y)
-{
-    ASSERT(video);
-    IntSize s = size(video);
-    ExceptionCode ec;
-    drawImage(video, x, y, s.width(), s.height(), ec);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video,
-                                         float x, float y, float width, float height, ExceptionCode&amp; ec)
-{
-    ASSERT(video);
-    IntSize s = size(video);
-    drawImage(video, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
-}
-
-void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect,
-                                         ExceptionCode&amp; ec)
-{
-    ASSERT(video);
-    
-    ec = 0;
-    FloatRect videoRect = FloatRect(FloatPoint(), size(video));
-    if (!videoRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-    
-    if (!dstRect.width() || !dstRect.height())
-        return;
-    
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    if (m_canvas-&gt;originClean())
-        checkOrigin(video-&gt;currentSrc());
-
-    if (m_canvas-&gt;originClean() &amp;&amp; !video-&gt;hasSingleSecurityOrigin())
-        m_canvas-&gt;setOriginTainted();
-
-    FloatRect sourceRect = c-&gt;roundToDevicePixels(srcRect);
-    FloatRect destRect = c-&gt;roundToDevicePixels(dstRect);
-    willDraw(destRect);
-
-    c-&gt;save();
-    c-&gt;clip(destRect);
-    c-&gt;translate(destRect.x(), destRect.y());
-    c-&gt;scale(FloatSize(destRect.width()/sourceRect.width(), destRect.height()/sourceRect.height()));
-    c-&gt;translate(-sourceRect.x(), -sourceRect.y());
-    video-&gt;paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video)));
-    c-&gt;restore();
-}
-#endif
-
-// FIXME: Why isn't this just another overload of drawImage? Why have a different name?
-void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image,
-    float sx, float sy, float sw, float sh,
-    float dx, float dy, float dw, float dh,
-    const String&amp; compositeOperation)
-{
-    if (!image)
-        return;
-
-    CachedImage* cachedImage = image-&gt;cachedImage();
-    if (!cachedImage)
-        return;
-
-    if (m_canvas-&gt;originClean())
-        checkOrigin(cachedImage-&gt;response().url());
-
-    if (m_canvas-&gt;originClean() &amp;&amp; !cachedImage-&gt;image()-&gt;hasSingleSecurityOrigin())
-        m_canvas-&gt;setOriginTainted();
-
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    CompositeOperator op;
-    if (!parseCompositeOperator(compositeOperation, op))
-        op = CompositeSourceOver;
-
-    FloatRect destRect = FloatRect(dx, dy, dw, dh);
-    willDraw(destRect);
-    c-&gt;drawImage(cachedImage-&gt;image(), destRect, FloatRect(sx, sy, sw, sh), op);
-}
-
-void CanvasRenderingContext2D::setAlpha(float alpha)
-{
-    setGlobalAlpha(alpha);
-}
-
-void CanvasRenderingContext2D::setCompositeOperation(const String&amp; operation)
-{
-    setGlobalCompositeOperation(operation);
-}
-
-void CanvasRenderingContext2D::prepareGradientForDashboard(CanvasGradient* gradient) const
-{
-#if ENABLE(DASHBOARD_SUPPORT)
-    if (Settings* settings = m_canvas-&gt;document()-&gt;settings())
-        if (settings-&gt;usesDashboardBackwardCompatibilityMode())
-            gradient-&gt;setDashboardCompatibilityMode();
-#else
-    UNUSED_PARAM(gradient);
-#endif
-}
-
-PassRefPtr&lt;CanvasGradient&gt; CanvasRenderingContext2D::createLinearGradient(float x0, float y0, float x1, float y1, ExceptionCode&amp; ec)
-{
-    if (!isfinite(x0) || !isfinite(y0) || !isfinite(x1) || !isfinite(y1)) {
-        ec = NOT_SUPPORTED_ERR;
-        return 0;
-    }
-
-    PassRefPtr&lt;CanvasGradient&gt; gradient = CanvasGradient::create(FloatPoint(x0, y0), FloatPoint(x1, y1));
-    prepareGradientForDashboard(gradient.get());
-    return gradient;
-}
-
-PassRefPtr&lt;CanvasGradient&gt; CanvasRenderingContext2D::createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionCode&amp; ec)
-{
-    if (!isfinite(x0) || !isfinite(y0) || !isfinite(r0) || 
-        !isfinite(x1) || !isfinite(y1) || !isfinite(r1)) {
-        ec = NOT_SUPPORTED_ERR;
-        return 0;
-    }
-    PassRefPtr&lt;CanvasGradient&gt; gradient =  CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1);
-    prepareGradientForDashboard(gradient.get());
-    return gradient;
-}
-
-PassRefPtr&lt;CanvasPattern&gt; CanvasRenderingContext2D::createPattern(HTMLImageElement* image,
-    const String&amp; repetitionType, ExceptionCode&amp; ec)
-{
-    bool repeatX, repeatY;
-    ec = 0;
-    CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, ec);
-    if (ec)
-        return 0;
-
-    if (!image-&gt;complete()) {
-        ec = INVALID_STATE_ERR;
-        return 0;
-    }
-
-    CachedImage* cachedImage = image-&gt;cachedImage();
-    if (!cachedImage || !image-&gt;cachedImage()-&gt;image())
-        return CanvasPattern::create(Image::nullImage(), repeatX, repeatY, true);
-
-    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::createFromString(cachedImage-&gt;url());
-    bool originClean = m_canvas-&gt;document()-&gt;securityOrigin()-&gt;canAccess(origin.get());
-    return CanvasPattern::create(cachedImage-&gt;image(), repeatX, repeatY, originClean);
-}
-
-PassRefPtr&lt;CanvasPattern&gt; CanvasRenderingContext2D::createPattern(HTMLCanvasElement* canvas,
-    const String&amp; repetitionType, ExceptionCode&amp; ec)
-{
-    if (!canvas-&gt;width() || !canvas-&gt;height()) {
-        ec = INVALID_STATE_ERR;
-        return 0;
-    }
-    
-    bool repeatX, repeatY;
-    ec = 0;
-    CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, ec);
-    if (ec)
-        return 0;
-    return CanvasPattern::create(canvas-&gt;buffer()-&gt;image(), repeatX, repeatY, canvas-&gt;originClean());
-}
-
-void CanvasRenderingContext2D::willDraw(const FloatRect&amp; r, unsigned options)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-
-    FloatRect dirtyRect = r;
-    if (options &amp; CanvasWillDrawApplyTransform) {
-        TransformationMatrix ctm = state().m_transform;
-        dirtyRect = ctm.mapRect(r);
-    }
-    
-    if (options &amp; CanvasWillDrawApplyShadow) {
-        // The shadow gets applied after transformation
-        FloatRect shadowRect(dirtyRect);
-        shadowRect.move(state().m_shadowOffset);
-        shadowRect.inflate(state().m_shadowBlur);
-        dirtyRect.unite(shadowRect);
-    }
-    
-    if (options &amp; CanvasWillDrawApplyClip) {
-        // FIXME: apply the current clip to the rectangle. Unfortunately we can't get the clip
-        // back out of the GraphicsContext, so to take clip into account for incremental painting,
-        // we'd have to keep the clip path around.
-    }
-    
-    m_canvas-&gt;willDraw(dirtyRect);
-}
-
-GraphicsContext* CanvasRenderingContext2D::drawingContext() const
-{
-    return m_canvas-&gt;drawingContext();
-}
-
-static PassRefPtr&lt;ImageData&gt; createEmptyImageData(const IntSize&amp; size)
-{
-    RefPtr&lt;ImageData&gt; data = ImageData::create(size.width(), size.height());
-    memset(data-&gt;data()-&gt;data()-&gt;data(), 0, data-&gt;data()-&gt;data()-&gt;length());
-    return data.get();
-}
-
-PassRefPtr&lt;ImageData&gt; CanvasRenderingContext2D::createImageData(float sw, float sh) const
-{
-    FloatSize unscaledSize(sw, sh);
-    IntSize scaledSize = m_canvas-&gt;convertLogicalToDevice(unscaledSize);
-    if (scaledSize.width() &lt; 1)
-        scaledSize.setWidth(1);
-    if (scaledSize.height() &lt; 1)
-        scaledSize.setHeight(1);
-    
-    return createEmptyImageData(scaledSize);
-}
-
-PassRefPtr&lt;ImageData&gt; CanvasRenderingContext2D::getImageData(float sx, float sy, float sw, float sh, ExceptionCode&amp; ec) const
-{
-    if (!m_canvas-&gt;originClean()) {
-        ec = SECURITY_ERR;
-        return 0;
-    }
-    
-    FloatRect unscaledRect(sx, sy, sw, sh);
-    IntRect scaledRect = m_canvas-&gt;convertLogicalToDevice(unscaledRect);
-    if (scaledRect.width() &lt; 1)
-        scaledRect.setWidth(1);
-    if (scaledRect.height() &lt; 1)
-        scaledRect.setHeight(1);
-    ImageBuffer* buffer = m_canvas ? m_canvas-&gt;buffer() : 0;
-    if (!buffer)
-        return createEmptyImageData(scaledRect.size());
-    return buffer-&gt;getImageData(scaledRect);
-}
-
-void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, ExceptionCode&amp; ec)
-{
-    if (!data) {
-        ec = TYPE_MISMATCH_ERR;
-        return;
-    }
-    putImageData(data, dx, dy, 0, 0, data-&gt;width(), data-&gt;height(), ec);
-}
-
-void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, float dirtyX, float dirtyY, 
-                                            float dirtyWidth, float dirtyHeight, ExceptionCode&amp; ec)
-{
-    if (!data) {
-        ec = TYPE_MISMATCH_ERR;
-        return;
-    }
-    if (!isfinite(dx) || !isfinite(dy) || !isfinite(dirtyX) || 
-        !isfinite(dirtyY) || !isfinite(dirtyWidth) || !isfinite(dirtyHeight)) {
-        ec = INDEX_SIZE_ERR;
-        return;
-    }
-
-    ImageBuffer* buffer = m_canvas-&gt;buffer();
-    if (!buffer)
-        return;
-
-    if (dirtyWidth &lt; 0) {
-        dirtyX += dirtyWidth;
-        dirtyWidth = -dirtyWidth;
-    }
-
-    if (dirtyHeight &lt; 0) {
-        dirtyY += dirtyHeight;
-        dirtyHeight = -dirtyHeight;
-    }
-
-    FloatRect clipRect(dirtyX, dirtyY, dirtyWidth, dirtyHeight);
-    clipRect.intersect(IntRect(0, 0, data-&gt;width(), data-&gt;height()));
-    IntSize destOffset(static_cast&lt;int&gt;(dx), static_cast&lt;int&gt;(dy));
-    IntRect sourceRect = enclosingIntRect(clipRect);
-    sourceRect.move(destOffset);
-    sourceRect.intersect(IntRect(IntPoint(), buffer-&gt;size()));
-    if (sourceRect.isEmpty())
-        return;
-    willDraw(sourceRect, 0);  // ignore transform, shadow and clip
-    sourceRect.move(-destOffset);
-    IntPoint destPoint(destOffset.width(), destOffset.height());
-    
-    buffer-&gt;putImageData(data, sourceRect, destPoint);
-}
-
-String CanvasRenderingContext2D::font() const
-{
-    return state().m_unparsedFont;
-}
-
-void CanvasRenderingContext2D::setFont(const String&amp; newFont)
-{
-    RefPtr&lt;CSSMutableStyleDeclaration&gt; tempDecl = CSSMutableStyleDeclaration::create();
-    CSSParser parser(!m_canvas-&gt;document()-&gt;inCompatMode()); // Use the parse mode of the canvas' document when parsing CSS.
-        
-    String declarationText(&quot;font: &quot;);
-    declarationText += newFont;
-    parser.parseDeclaration(tempDecl.get(), declarationText);
-    if (!tempDecl-&gt;length())
-        return;
-            
-    // The parse succeeded.
-    state().m_unparsedFont = newFont;
-    
-    // Map the &lt;canvas&gt; font into the text style. If the font uses keywords like larger/smaller, these will work
-    // relative to the canvas.
-    RefPtr&lt;RenderStyle&gt; newStyle = RenderStyle::create();
-    if (m_canvas-&gt;computedStyle())
-        newStyle-&gt;setFontDescription(m_canvas-&gt;computedStyle()-&gt;fontDescription());
-
-    // Now map the font property into the style.
-    CSSStyleSelector* styleSelector = m_canvas-&gt;document()-&gt;styleSelector();
-    styleSelector-&gt;applyPropertyToStyle(CSSPropertyFont, tempDecl-&gt;getPropertyCSSValue(CSSPropertyFont).get(), newStyle.get());
-    
-    state().m_font = newStyle-&gt;font();
-    state().m_font.update(styleSelector-&gt;fontSelector());
-    state().m_realizedFont = true;
-}
-        
-String CanvasRenderingContext2D::textAlign() const
-{
-    return textAlignName(state().m_textAlign);
-}
-
-void CanvasRenderingContext2D::setTextAlign(const String&amp; s)
-{
-    TextAlign align;
-    if (!parseTextAlign(s, align))
-        return;
-    state().m_textAlign = align;
-}
-        
-String CanvasRenderingContext2D::textBaseline() const
-{
-    return textBaselineName(state().m_textBaseline);
-}
-
-void CanvasRenderingContext2D::setTextBaseline(const String&amp; s)
-{
-    TextBaseline baseline;
-    if (!parseTextBaseline(s, baseline))
-        return;
-    state().m_textBaseline = baseline;
-}
-
-void CanvasRenderingContext2D::fillText(const String&amp; text, float x, float y)
-{
-    drawTextInternal(text, x, y, true);
-}
-
-void CanvasRenderingContext2D::fillText(const String&amp; text, float x, float y, float maxWidth)
-{
-    drawTextInternal(text, x, y, true, maxWidth, true);
-}
-
-void CanvasRenderingContext2D::strokeText(const String&amp; text, float x, float y)
-{
-    drawTextInternal(text, x, y, false);
-}
-
-void CanvasRenderingContext2D::strokeText(const String&amp; text, float x, float y, float maxWidth)
-{
-    drawTextInternal(text, x, y, false, maxWidth, true);
-}
-
-PassRefPtr&lt;TextMetrics&gt; CanvasRenderingContext2D::measureText(const String&amp; text)
-{
-    RefPtr&lt;TextMetrics&gt; metrics = TextMetrics::create();
-    metrics-&gt;setWidth(accessFont().width(TextRun(text.characters(), text.length())));
-    return metrics;
-}
-
-void CanvasRenderingContext2D::drawTextInternal(const String&amp; text, float x, float y, bool fill, float /*maxWidth*/, bool /*useMaxWidth*/)
-{
-    GraphicsContext* c = drawingContext();
-    if (!c)
-        return;
-    if (!state().m_invertibleCTM)
-        return;
-    
-    const Font&amp; font = accessFont();
-
-    // FIXME: Handle maxWidth.
-    // FIXME: Need to turn off font smoothing.
-
-    bool rtl = m_canvas-&gt;computedStyle() ? m_canvas-&gt;computedStyle()-&gt;direction() == RTL : false;
-    bool override = m_canvas-&gt;computedStyle() ? m_canvas-&gt;computedStyle()-&gt;unicodeBidi() == Override : false;
-
-    unsigned length = text.length();
-    const UChar* string = text.characters();
-    TextRun textRun(string, length, 0, 0, 0, rtl, override, false, false);
-
-    // Draw the item text at the correct point.
-    FloatPoint location(x, y);
-    switch (state().m_textBaseline) {
-        case TopTextBaseline:
-        case HangingTextBaseline:
-            location.setY(y + font.ascent());
-            break;
-        case BottomTextBaseline:
-        case IdeographicTextBaseline:
-            location.setY(y - font.descent());
-            break;
-        case MiddleTextBaseline:
-            location.setY(y - font.descent() + font.height() / 2);
-            break;
-        case AlphabeticTextBaseline:
-        default:
-             // Do nothing.
-            break;
-    }
-    
-    float width = font.width(TextRun(text, false, 0, 0, rtl, override));
-
-    TextAlign align = state().m_textAlign;
-    if (align == StartTextAlign)
-         align = rtl ? RightTextAlign : LeftTextAlign;
-    else if (align == EndTextAlign)
-        align = rtl ? LeftTextAlign : RightTextAlign;
-    
-    switch (align) {
-        case CenterTextAlign:
-            location.setX(location.x() - width / 2);
-            break;
-        case RightTextAlign:
-            location.setX(location.x() - width);
-            break;
-        default:
-            break;
-    }
-    
-    // The slop built in to this mask rect matches the heuristic used in FontCGWin.cpp for GDI text.
-    FloatRect textRect = FloatRect(location.x() - font.height() / 2, location.y() - font.ascent() - font.lineGap(),
-                                   width + font.height(), font.lineSpacing());
-    if (!fill)
-        textRect.inflate(c-&gt;strokeThickness() / 2);
-
-    if (fill)
-        m_canvas-&gt;willDraw(textRect);
-    else {
-        // When stroking text, pointy miters can extend outside of textRect, so we
-        // punt and dirty the whole canvas.
-        m_canvas-&gt;willDraw(FloatRect(0, 0, m_canvas-&gt;width(), m_canvas-&gt;height()));
-    }
-    
-#if PLATFORM(CG)
-    CanvasStyle* drawStyle = fill ? state().m_fillStyle.get() : state().m_strokeStyle.get();
-    if (drawStyle-&gt;canvasGradient() || drawStyle-&gt;canvasPattern()) {
-        // FIXME: The rect is not big enough for miters on stroked text.
-        IntRect maskRect = enclosingIntRect(textRect);
-
-        OwnPtr&lt;ImageBuffer&gt; maskImage = ImageBuffer::create(maskRect.size(), false);
-
-        GraphicsContext* maskImageContext = maskImage-&gt;context();
-
-        if (fill)
-            maskImageContext-&gt;setFillColor(Color::black);
-        else {
-            maskImageContext-&gt;setStrokeColor(Color::black);
-            maskImageContext-&gt;setStrokeThickness(c-&gt;strokeThickness());
-        }
-
-        maskImageContext-&gt;setTextDrawingMode(fill ? cTextFill : cTextStroke);
-        maskImageContext-&gt;translate(-maskRect.x(), -maskRect.y());
-        
-        maskImageContext-&gt;drawBidiText(font, textRun, location);
-        
-        c-&gt;save();
-        c-&gt;clipToImageBuffer(maskRect, maskImage.get());
-        drawStyle-&gt;applyFillColor(c);
-        c-&gt;fillRect(maskRect);
-        c-&gt;restore();
-
-        return;
-    }
-#endif
-
-    c-&gt;setTextDrawingMode(fill ? cTextFill : cTextStroke);
-    c-&gt;drawBidiText(font, textRun, location);
-}
-
-const Font&amp; CanvasRenderingContext2D::accessFont()
-{
-    if (!state().m_realizedFont)
-        setFont(state().m_unparsedFont);
-    return state().m_font;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasRenderingContext2Dh"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasRenderingContext2D.h (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasRenderingContext2D.h        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasRenderingContext2D.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,271 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007, 2009 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 CanvasRenderingContext2D_h
-#define CanvasRenderingContext2D_h
-
-#include &quot;TransformationMatrix.h&quot;
-#include &quot;FloatSize.h&quot;
-#include &quot;Font.h&quot;
-#include &quot;GraphicsTypes.h&quot;
-#include &quot;Path.h&quot;
-#include &quot;PlatformString.h&quot;
-#include &lt;wtf/Vector.h&gt;
-
-#if PLATFORM(CG)
-#include &lt;ApplicationServices/ApplicationServices.h&gt;
-#endif
-
-namespace WebCore {
-
-    class CanvasGradient;
-    class CanvasPattern;
-    class CanvasStyle;
-    class FloatRect;
-    class GraphicsContext;
-    class HTMLCanvasElement;
-    class HTMLImageElement;
-    class HTMLVideoElement;
-    class ImageData;
-    class KURL;
-    class TextMetrics;
-
-    typedef int ExceptionCode;
-
-    class CanvasRenderingContext2D : public Noncopyable {
-    public:
-        CanvasRenderingContext2D(HTMLCanvasElement*);
-        
-        void ref();
-        void deref();
-        
-        HTMLCanvasElement* canvas() const { return m_canvas; }
-
-        CanvasStyle* strokeStyle() const;
-        void setStrokeStyle(PassRefPtr&lt;CanvasStyle&gt;);
-
-        CanvasStyle* fillStyle() const;
-        void setFillStyle(PassRefPtr&lt;CanvasStyle&gt;);
-
-        float lineWidth() const;
-        void setLineWidth(float);
-
-        String lineCap() const;
-        void setLineCap(const String&amp;);
-
-        String lineJoin() const;
-        void setLineJoin(const String&amp;);
-
-        float miterLimit() const;
-        void setMiterLimit(float);
-
-        float shadowOffsetX() const;
-        void setShadowOffsetX(float);
-
-        float shadowOffsetY() const;
-        void setShadowOffsetY(float);
-
-        float shadowBlur() const;
-        void setShadowBlur(float);
-
-        String shadowColor() const;
-        void setShadowColor(const String&amp;);
-
-        float globalAlpha() const;
-        void setGlobalAlpha(float);
-
-        String globalCompositeOperation() const;
-        void setGlobalCompositeOperation(const String&amp;);
-
-        void save();
-        void restore();
-
-        void scale(float sx, float sy);
-        void rotate(float angleInRadians);
-        void translate(float tx, float ty);
-        void transform(float m11, float m12, float m21, float m22, float dx, float dy);
-        void setTransform(float m11, float m12, float m21, float m22, float dx, float dy);
-
-        void setStrokeColor(const String&amp; color);
-        void setStrokeColor(float grayLevel);
-        void setStrokeColor(const String&amp; color, float alpha);
-        void setStrokeColor(float grayLevel, float alpha);
-        void setStrokeColor(float r, float g, float b, float a);
-        void setStrokeColor(float c, float m, float y, float k, float a);
-
-        void setFillColor(const String&amp; color);
-        void setFillColor(float grayLevel);
-        void setFillColor(const String&amp; color, float alpha);
-        void setFillColor(float grayLevel, float alpha);
-        void setFillColor(float r, float g, float b, float a);
-        void setFillColor(float c, float m, float y, float k, float a);
-
-        void beginPath();
-        void closePath();
-
-        void moveTo(float x, float y);
-        void lineTo(float x, float y);
-        void quadraticCurveTo(float cpx, float cpy, float x, float y);
-        void bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y);
-        void arcTo(float x0, float y0, float x1, float y1, float radius, ExceptionCode&amp;);
-        void arc(float x, float y, float r, float sa, float ea, bool clockwise, ExceptionCode&amp;);
-        void rect(float x, float y, float width, float height);
-
-        void fill();
-        void stroke();
-        void clip();
-
-        bool isPointInPath(const float x, const float y);
-
-        void clearRect(float x, float y, float width, float height);
-        void fillRect(float x, float y, float width, float height);
-        void strokeRect(float x, float y, float width, float height);
-        void strokeRect(float x, float y, float width, float height, float lineWidth);
-
-        void setShadow(float width, float height, float blur);
-        void setShadow(float width, float height, float blur, const String&amp; color);
-        void setShadow(float width, float height, float blur, float grayLevel);
-        void setShadow(float width, float height, float blur, const String&amp; color, float alpha);
-        void setShadow(float width, float height, float blur, float grayLevel, float alpha);
-        void setShadow(float width, float height, float blur, float r, float g, float b, float a);
-        void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a);
-
-        void clearShadow();
-
-        void drawImage(HTMLImageElement*, float x, float y);
-        void drawImage(HTMLImageElement*, float x, float y, float width, float height, ExceptionCode&amp;);
-        void drawImage(HTMLImageElement*, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect, ExceptionCode&amp;);
-        void drawImage(HTMLCanvasElement*, float x, float y);
-        void drawImage(HTMLCanvasElement*, float x, float y, float width, float height, ExceptionCode&amp;);
-        void drawImage(HTMLCanvasElement*, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect, ExceptionCode&amp;);
-#if ENABLE(VIDEO)
-        void drawImage(HTMLVideoElement*, float x, float y);
-        void drawImage(HTMLVideoElement*, float x, float y, float width, float height, ExceptionCode&amp;);
-        void drawImage(HTMLVideoElement*, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect, ExceptionCode&amp;);
-#endif
-
-        void drawImageFromRect(HTMLImageElement*, float sx, float sy, float sw, float sh,
-            float dx, float dy, float dw, float dh, const String&amp; compositeOperation);
-
-        void setAlpha(float);
-
-        void setCompositeOperation(const String&amp;);
-
-        PassRefPtr&lt;CanvasGradient&gt; createLinearGradient(float x0, float y0, float x1, float y1, ExceptionCode&amp;);
-        PassRefPtr&lt;CanvasGradient&gt; createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionCode&amp;);
-        PassRefPtr&lt;CanvasPattern&gt; createPattern(HTMLImageElement*, const String&amp; repetitionType, ExceptionCode&amp;);
-        PassRefPtr&lt;CanvasPattern&gt; createPattern(HTMLCanvasElement*, const String&amp; repetitionType, ExceptionCode&amp;);
-        
-        PassRefPtr&lt;ImageData&gt; createImageData(float width, float height) const;
-        PassRefPtr&lt;ImageData&gt; getImageData(float sx, float sy, float sw, float sh, ExceptionCode&amp;) const;
-        void putImageData(ImageData*, float dx, float dy, ExceptionCode&amp;);
-        void putImageData(ImageData*, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionCode&amp;);
-        
-        void reset();
-
-        String font() const;
-        void setFont(const String&amp;);
-        
-        String textAlign() const;
-        void setTextAlign(const String&amp;);
-        
-        String textBaseline() const;
-        void setTextBaseline(const String&amp;);
-        
-        void fillText(const String&amp; text, float x, float y);
-        void fillText(const String&amp; text, float x, float y, float maxWidth);
-        void strokeText(const String&amp; text, float x, float y);
-        void strokeText(const String&amp; text, float x, float y, float maxWidth);
-        PassRefPtr&lt;TextMetrics&gt; measureText(const String&amp; text);
-
-        LineCap getLineCap() const { return state().m_lineCap; }
-        LineJoin getLineJoin() const { return state().m_lineJoin; }
-
-    private:
-        struct State {
-            State();
-            
-            RefPtr&lt;CanvasStyle&gt; m_strokeStyle;
-            RefPtr&lt;CanvasStyle&gt; m_fillStyle;
-            float m_lineWidth;
-            LineCap m_lineCap;
-            LineJoin m_lineJoin;
-            float m_miterLimit;
-            FloatSize m_shadowOffset;
-            float m_shadowBlur;
-            String m_shadowColor;
-            float m_globalAlpha;
-            CompositeOperator m_globalComposite;
-            TransformationMatrix m_transform;
-            bool m_invertibleCTM;
-            
-            // Text state.
-            TextAlign m_textAlign;
-            TextBaseline m_textBaseline;
-            
-            String m_unparsedFont;
-            Font m_font;
-            bool m_realizedFont;
-        };
-        Path m_path;
-
-        State&amp; state() { return m_stateStack.last(); }
-        const State&amp; state() const { return m_stateStack.last(); }
-
-        void applyShadow();
-
-        enum CanvasWillDrawOption {
-            CanvasWillDrawApplyTransform = 1,
-            CanvasWillDrawApplyShadow = 1 &lt;&lt; 1,
-            CanvasWillDrawApplyClip = 1 &lt;&lt; 2,
-            CanvasWillDrawApplyAll = 0xffffffff
-        };
-        
-        void willDraw(const FloatRect&amp;, unsigned options = CanvasWillDrawApplyAll);
-
-        GraphicsContext* drawingContext() const;
-
-        void applyStrokePattern();
-        void applyFillPattern();
-
-        void drawTextInternal(const String&amp; text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false);
-
-        const Font&amp; accessFont();
-
-#if ENABLE(DASHBOARD_SUPPORT)
-        void clearPathForDashboardBackwardCompatibilityMode();
-#endif
-        
-        void prepareGradientForDashboard(CanvasGradient* gradient) const;
-        void checkOrigin(const KURL&amp;);
-        void checkOrigin(const String&amp;);
-
-        HTMLCanvasElement* m_canvas;
-        Vector&lt;State, 1&gt; m_stateStack;
-    };
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasRenderingContext2Didl"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasRenderingContext2D.idl (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasRenderingContext2D.idl        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasRenderingContext2D.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,123 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006 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. 
- */
-
-module html {
-
-    interface [
-        GenerateConstructor,
-        InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
-        ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
-    ] CanvasRenderingContext2D {
-
-        // Web Applications 1.0 draft
-
-        readonly attribute HTMLCanvasElement canvas;
-
-        void save();
-        void restore();
-
-        void scale(in float sx, in float sy);
-        void rotate(in float angle);
-        void translate(in float tx, in float ty);
-        void transform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
-        void setTransform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
-
-        attribute float globalAlpha;
-        attribute [ConvertNullToNullString] DOMString globalCompositeOperation;
-
-        CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1)
-            raises (DOMException);
-        CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1)
-            raises (DOMException);
-
-        attribute float lineWidth;
-        attribute [ConvertNullToNullString] DOMString lineCap;
-        attribute [ConvertNullToNullString] DOMString lineJoin;
-        attribute float miterLimit;
-
-        attribute float shadowOffsetX;
-        attribute float shadowOffsetY;
-        attribute float shadowBlur;
-        attribute [ConvertNullToNullString] DOMString shadowColor;
-
-        void clearRect(in float x, in float y, in float width, in float height);
-        void fillRect(in float x, in float y, in float width, in float height);
-
-        void beginPath();
-        void closePath();
-        void moveTo(in float x, in float y);
-        void lineTo(in float x, in float y);
-        void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
-        void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
-        void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius)
-            raises (DOMException);
-        void rect(in float x, in float y, in float width, in float height);
-        void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise)
-            raises (DOMException);
-        void fill();
-        void stroke();
-        void clip();
-        boolean isPointInPath(in float x, in float y);
-
-        // text
-        attribute DOMString font;
-        attribute DOMString textAlign;
-        attribute DOMString textBaseline;
-        [Custom] void fillText(/* 4 */);
-        [Custom] void strokeText(/* 4 */);
-        TextMetrics measureText(in DOMString text);
-
-        // other
-
-        void setAlpha(in float alpha);
-        void setCompositeOperation(in DOMString compositeOperation);
-
-        void setLineWidth(in float width);
-        void setLineCap(in DOMString cap);
-        void setLineJoin(in DOMString join);
-        void setMiterLimit(in float limit);
-
-        void clearShadow();
-
-        [Custom] void setStrokeColor(/* 1  */);
-        [Custom] void setFillColor(/* 1 */);
-        [Custom] void strokeRect(/* 4 */);
-        [Custom] void drawImage(/* 3 */);
-        [Custom] void drawImageFromRect(/* 10 */);
-        [Custom] void setShadow(/* 3 */);
-        [Custom] void createPattern(/* 2 */);
-        
-        attribute [Custom] custom strokeStyle;
-        attribute [Custom] custom fillStyle;
-        
-        // pixel manipulation
-        ImageData createImageData(in float sw, in float sh);
-        ImageData getImageData(in float sx, in float sy, in float sw, in float sh)
-            raises(DOMException);
-        [Custom] void putImageData(/* in ImageData imagedata, in float dx, in float dy [, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight] */);
-    };
-
-}
-
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasStylecpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasStyle.cpp (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasStyle.cpp        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasStyle.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,231 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
- * Copyright (C) 2008 Eric Seidel &lt;eric@webkit.org&gt;
- *
- * 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;CanvasStyle.h&quot;
-
-#include &quot;CSSParser.h&quot;
-#include &quot;CanvasGradient.h&quot;
-#include &quot;CanvasPattern.h&quot;
-#include &quot;GraphicsContext.h&quot;
-#include &lt;wtf/PassRefPtr.h&gt;
-
-#if PLATFORM(CG)
-#include &lt;CoreGraphics/CGContext.h&gt;
-#endif
-
-#if PLATFORM(QT)
-#include &lt;QPainter&gt;
-#include &lt;QBrush&gt;
-#include &lt;QPen&gt;
-#include &lt;QColor&gt;
-#endif
-
-namespace WebCore {
-
-CanvasStyle::CanvasStyle(const String&amp; color)
-    : m_type(ColorString)
-    , m_color(color)
-{
-}
-
-CanvasStyle::CanvasStyle(float grayLevel)
-    : m_type(GrayLevel)
-    , m_alpha(1)
-    , m_grayLevel(grayLevel)
-{
-}
-
-CanvasStyle::CanvasStyle(const String&amp; color, float alpha)
-    : m_type(ColorStringWithAlpha)
-    , m_color(color)
-    , m_alpha(alpha)
-{
-}
-
-CanvasStyle::CanvasStyle(float grayLevel, float alpha)
-    : m_type(GrayLevel)
-    , m_alpha(alpha)
-    , m_grayLevel(grayLevel)
-{
-}
-
-CanvasStyle::CanvasStyle(float r, float g, float b, float a)
-    : m_type(RGBA)
-    , m_alpha(a)
-    , m_red(r)
-    , m_green(g)
-    , m_blue(b)
-{
-}
-
-CanvasStyle::CanvasStyle(float c, float m, float y, float k, float a)
-    : m_type(CMYKA)
-    , m_alpha(a)
-    , m_cyan(c)
-    , m_magenta(m)
-    , m_yellow(y)
-    , m_black(k)
-{
-}
-
-CanvasStyle::CanvasStyle(PassRefPtr&lt;CanvasGradient&gt; gradient)
-    : m_type(gradient ? Gradient : ColorString)
-    , m_gradient(gradient)
-{
-}
-
-CanvasStyle::CanvasStyle(PassRefPtr&lt;CanvasPattern&gt; pattern)
-    : m_type(pattern ? ImagePattern : ColorString)
-    , m_pattern(pattern)
-{
-}
-
-void CanvasStyle::applyStrokeColor(GraphicsContext* context)
-{
-    if (!context)
-        return;
-    switch (m_type) {
-        case ColorString: {
-            Color c = Color(m_color);
-            if (c.isValid()) {
-                context-&gt;setStrokeColor(c.rgb());
-                break;
-            }
-            RGBA32 color = 0; // default is transparent black
-            if (CSSParser::parseColor(color, m_color))
-                context-&gt;setStrokeColor(color);
-            break;
-        }
-        case ColorStringWithAlpha: {
-            Color c = Color(m_color);
-            if (c.isValid()) {
-                context-&gt;setStrokeColor(colorWithOverrideAlpha(c.rgb(), m_alpha));
-                break;
-            }
-            RGBA32 color = 0; // default is transparent black
-            if (CSSParser::parseColor(color, m_color))
-                context-&gt;setStrokeColor(colorWithOverrideAlpha(color, m_alpha));
-            break;
-        }
-        case GrayLevel:
-            // We're only supporting 255 levels of gray here.  Since this isn't
-            // even part of HTML5, I don't expect anyone will care.  If they do
-            // we'll make a fancier Color abstraction.
-            context-&gt;setStrokeColor(Color(m_grayLevel, m_grayLevel, m_grayLevel, m_alpha));
-            break;
-        case RGBA:
-            context-&gt;setStrokeColor(Color(m_red, m_green, m_blue, m_alpha));
-            break;
-        case CMYKA: {
-            // FIXME: Do this through platform-independent GraphicsContext API.
-            // We'll need a fancier Color abstraction to support CYMKA correctly
-#if PLATFORM(CG)
-            CGContextSetCMYKStrokeColor(context-&gt;platformContext(), m_cyan, m_magenta, m_yellow, m_black, m_alpha);
-#elif PLATFORM(QT)
-            QPen currentPen = context-&gt;platformContext()-&gt;pen();
-            QColor clr;
-            clr.setCmykF(m_cyan, m_magenta, m_yellow, m_black, m_alpha);
-            currentPen.setColor(clr);
-            context-&gt;platformContext()-&gt;setPen(currentPen);
-#else
-            context-&gt;setStrokeColor(Color(m_cyan, m_magenta, m_yellow, m_black, m_alpha));
-#endif
-            break;
-        }
-        case Gradient:
-            context-&gt;setStrokeGradient(canvasGradient()-&gt;gradient());
-            break;
-        case ImagePattern:
-            context-&gt;setStrokePattern(canvasPattern()-&gt;pattern());
-            break;
-    }
-}
-
-void CanvasStyle::applyFillColor(GraphicsContext* context)
-{
-    if (!context)
-        return;
-    switch (m_type) {
-        case ColorString: {
-            Color c = Color(m_color);
-            if (c.isValid()) {
-                context-&gt;setFillColor(c.rgb());
-                break;
-            }
-            RGBA32 rgba = 0; // default is transparent black
-            if (CSSParser::parseColor(rgba, m_color))
-                context-&gt;setFillColor(rgba);
-            break;
-        }
-        case ColorStringWithAlpha: {
-            Color c = Color(m_color);
-            if (c.isValid()) {
-                context-&gt;setFillColor(colorWithOverrideAlpha(c.rgb(), m_alpha));
-                break;
-            }
-            RGBA32 color = 0; // default is transparent black
-            if (CSSParser::parseColor(color, m_color))
-                context-&gt;setFillColor(colorWithOverrideAlpha(color, m_alpha));
-            break;
-        }
-        case GrayLevel:
-            // We're only supporting 255 levels of gray here.  Since this isn't
-            // even part of HTML5, I don't expect anyone will care.  If they do
-            // we'll make a fancier Color abstraction.
-            context-&gt;setFillColor(Color(m_grayLevel, m_grayLevel, m_grayLevel, m_alpha));
-            break;
-        case RGBA:
-            context-&gt;setFillColor(Color(m_red, m_green, m_blue, m_alpha));
-            break;
-        case CMYKA: {
-            // FIXME: Do this through platform-independent GraphicsContext API.
-            // We'll need a fancier Color abstraction to support CYMKA correctly
-#if PLATFORM(CG)
-            CGContextSetCMYKFillColor(context-&gt;platformContext(), m_cyan, m_magenta, m_yellow, m_black, m_alpha);
-#elif PLATFORM(QT)
-            QBrush currentBrush = context-&gt;platformContext()-&gt;brush();
-            QColor clr;
-            clr.setCmykF(m_cyan, m_magenta, m_yellow, m_black, m_alpha);
-            currentBrush.setColor(clr);
-            context-&gt;platformContext()-&gt;setBrush(currentBrush);
-#else
-            context-&gt;setFillColor(Color(m_cyan, m_magenta, m_yellow, m_black, m_alpha));
-#endif
-            break;
-        }
-        case Gradient:
-            context-&gt;setFillGradient(canvasGradient()-&gt;gradient());
-            break;
-        case ImagePattern:
-            context-&gt;setFillPattern(canvasPattern()-&gt;pattern());
-            break;
-    }
-}
-
-}
</del></span></pre></div>
<a id="trunkWebCorehtmlCanvasStyleh"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/html/CanvasStyle.h (46936 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/CanvasStyle.h        2009-08-08 00:54:15 UTC (rev 46936)
+++ trunk/WebCore/html/CanvasStyle.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -1,89 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2008 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 CanvasStyle_h
-#define CanvasStyle_h
-
-#include &quot;PlatformString.h&quot;
-
-namespace WebCore {
-
-    class CanvasGradient;
-    class CanvasPattern;
-    class GraphicsContext;
-
-    class CanvasStyle : public RefCounted&lt;CanvasStyle&gt; {
-    public:
-        static PassRefPtr&lt;CanvasStyle&gt; create(const String&amp; color) { return adoptRef(new CanvasStyle(color)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(float grayLevel) { return adoptRef(new CanvasStyle(grayLevel)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(const String&amp; color, float alpha) { return adoptRef(new CanvasStyle(color, alpha)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(float grayLevel, float alpha) { return adoptRef(new CanvasStyle(grayLevel, alpha)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(float r, float g, float b, float a) { return adoptRef(new CanvasStyle(r, g, b, a)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(float c, float m, float y, float k, float a) { return adoptRef(new CanvasStyle(c, m, y, k, a)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(PassRefPtr&lt;CanvasGradient&gt; gradient) { return adoptRef(new CanvasStyle(gradient)); }
-        static PassRefPtr&lt;CanvasStyle&gt; create(PassRefPtr&lt;CanvasPattern&gt; pattern) { return adoptRef(new CanvasStyle(pattern)); }
-
-        String color() const { return m_color; }
-        CanvasGradient* canvasGradient() const { return m_gradient.get(); }
-        CanvasPattern* canvasPattern() const { return m_pattern.get(); }
-
-        void applyFillColor(GraphicsContext*);
-        void applyStrokeColor(GraphicsContext*);
-
-    private:
-        CanvasStyle(const String&amp; color);
-        CanvasStyle(float grayLevel);
-        CanvasStyle(const String&amp; color, float alpha);
-        CanvasStyle(float grayLevel, float alpha);
-        CanvasStyle(float r, float g, float b, float a);
-        CanvasStyle(float c, float m, float y, float k, float a);
-        CanvasStyle(PassRefPtr&lt;CanvasGradient&gt;);
-        CanvasStyle(PassRefPtr&lt;CanvasPattern&gt;);
-
-        enum Type { ColorString, ColorStringWithAlpha, GrayLevel, RGBA, CMYKA, Gradient, ImagePattern };
-
-        Type m_type;
-
-        String m_color;
-        RefPtr&lt;CanvasGradient&gt; m_gradient;
-        RefPtr&lt;CanvasPattern&gt; m_pattern;
-
-        float m_alpha;
-
-        float m_grayLevel;
-
-        float m_red;
-        float m_green;
-        float m_blue;
-
-        float m_cyan;
-        float m_magenta;
-        float m_yellow;
-        float m_black;
-    };
-
-} // namespace WebCore
-
-#endif
</del></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasGradientcppfromrev46919trunkWebCorehtmlCanvasGradientcpp"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasGradient.cpp (from rev 46919, trunk/WebCore/html/CanvasGradient.cpp) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasGradient.cpp                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasGradient.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
+ *
+ * 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;CanvasGradient.h&quot;
+
+#include &quot;CSSParser.h&quot;
+#include &quot;ExceptionCode.h&quot;
+
+namespace WebCore {
+
+CanvasGradient::CanvasGradient(const FloatPoint&amp; p0, const FloatPoint&amp; p1)
+    : m_gradient(Gradient::create(p0, p1))
+    , m_dashbardCompatibilityMode(false)
+{
+}
+
+CanvasGradient::CanvasGradient(const FloatPoint&amp; p0, float r0, const FloatPoint&amp; p1, float r1)
+    : m_gradient(Gradient::create(p0, r0, p1, r1))
+    , m_dashbardCompatibilityMode(false)
+{
+}
+
+void CanvasGradient::addColorStop(float value, const String&amp; color, ExceptionCode&amp; ec)
+{
+    if (!(value &gt;= 0 &amp;&amp; value &lt;= 1.0f)) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+
+    RGBA32 rgba = 0;
+    if (!CSSParser::parseColor(rgba, color)) {
+        if (!m_dashbardCompatibilityMode)
+            ec = SYNTAX_ERR;
+        return;
+    }
+
+    m_gradient-&gt;addColorStop(value, Color(rgba));
+}
+
+} // namespace
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasGradientcpp"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasGradient.cpp</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasGradienthfromrev46919trunkWebCorehtmlCanvasGradienth"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasGradient.h (from rev 46919, trunk/WebCore/html/CanvasGradient.h) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasGradient.h                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasGradient.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
+ *
+ * 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 CanvasGradient_h
+#define CanvasGradient_h
+
+#include &quot;Gradient.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+    class String;
+
+    typedef int ExceptionCode;
+
+    class CanvasGradient : public RefCounted&lt;CanvasGradient&gt; {
+    public:
+        static PassRefPtr&lt;CanvasGradient&gt; create(const FloatPoint&amp; p0, const FloatPoint&amp; p1)
+        {
+            return adoptRef(new CanvasGradient(p0, p1));
+        }
+        static PassRefPtr&lt;CanvasGradient&gt; create(const FloatPoint&amp; p0, float r0, const FloatPoint&amp; p1, float r1)
+        {
+            return adoptRef(new CanvasGradient(p0, r0, p1, r1));
+        }
+        
+        Gradient* gradient() const { return m_gradient.get(); }
+
+        void addColorStop(float value, const String&amp; color, ExceptionCode&amp;);
+
+        void getColor(float value, float* r, float* g, float* b, float* a) const { m_gradient-&gt;getColor(value, r, g, b, a); }
+
+#if ENABLE(DASHBOARD_SUPPORT)
+        void setDashboardCompatibilityMode() { m_dashbardCompatibilityMode = true; }
+#endif
+
+    private:
+        CanvasGradient(const FloatPoint&amp; p0, const FloatPoint&amp; p1);
+        CanvasGradient(const FloatPoint&amp; p0, float r0, const FloatPoint&amp; p1, float r1);
+        
+        RefPtr&lt;Gradient&gt; m_gradient;
+        bool m_dashbardCompatibilityMode;
+    };
+
+} //namespace
+
+#endif
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasGradienth"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasGradient.h</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasGradientidlfromrev46919trunkWebCorehtmlCanvasGradientidl"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasGradient.idl (from rev 46919, trunk/WebCore/html/CanvasGradient.idl) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasGradient.idl                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasGradient.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2006 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. 
+ */
+
+module html {
+
+    interface [
+        InterfaceUUID=bb1108ea-6b8c-4a08-894a-218628630cdb,
+        ImplementationUUID=a2942ae6-2731-4286-98cc-9d5e79e20de1
+    ] CanvasGradient {
+
+        void addColorStop(in float offset, in DOMString color)
+            raises (DOMException);
+
+    };
+
+}
+
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasGradientidl"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasGradient.idl</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasPatterncppfromrev46919trunkWebCorehtmlCanvasPatterncpp"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasPattern.cpp (from rev 46919, trunk/WebCore/html/CanvasPattern.cpp) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasPattern.cpp                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasPattern.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2008 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;CanvasPattern.h&quot;
+
+#include &quot;ExceptionCode.h&quot;
+#include &quot;PlatformString.h&quot;
+
+namespace WebCore {
+
+void CanvasPattern::parseRepetitionType(const String&amp; type, bool&amp; repeatX, bool&amp; repeatY, ExceptionCode&amp; ec)
+{
+    ec = 0;
+    if (type.isEmpty() || type == &quot;repeat&quot;) {
+        repeatX = true;
+        repeatY = true;
+        return;
+    }
+    if (type == &quot;no-repeat&quot;) {
+        repeatX = false;
+        repeatY = false;
+        return;
+    }
+    if (type == &quot;repeat-x&quot;) {
+        repeatX = true;
+        repeatY = false;
+        return;
+    }
+    if (type == &quot;repeat-y&quot;) {
+        repeatX = false;
+        repeatY = true;
+        return;
+    }
+    ec = SYNTAX_ERR;
+}
+
+CanvasPattern::CanvasPattern(Image* image, bool repeatX, bool repeatY, bool originClean)
+    : m_pattern(Pattern::create(image, repeatX, repeatY))
+    , m_originClean(originClean)
+{
+}
+
+}
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasPatterncpp"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasPattern.cpp</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasPatternhfromrev46919trunkWebCorehtmlCanvasPatternh"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasPattern.h (from rev 46919, trunk/WebCore/html/CanvasPattern.h) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasPattern.h                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasPattern.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2008 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 CanvasPattern_h
+#define CanvasPattern_h
+
+#include &quot;Pattern.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+    class Image;
+    class String;
+
+    typedef int ExceptionCode;
+
+    class CanvasPattern : public RefCounted&lt;CanvasPattern&gt; {
+    public:
+        static void parseRepetitionType(const String&amp;, bool&amp; repeatX, bool&amp; repeatY, ExceptionCode&amp;);
+
+        static PassRefPtr&lt;CanvasPattern&gt; create(Image* image, bool repeatX, bool repeatY, bool originClean)
+        {
+            return adoptRef(new CanvasPattern(image, repeatX, repeatY, originClean));
+        }
+
+        Pattern* pattern() const { return m_pattern.get(); }
+
+        bool originClean() const { return m_originClean; }
+
+    private:
+        CanvasPattern(Image*, bool repeatX, bool repeatY, bool originClean);
+
+        RefPtr&lt;Pattern&gt; m_pattern;
+        bool m_originClean;
+    };
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasPatternh"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasPattern.h</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasPatternidlfromrev46919trunkWebCorehtmlCanvasPatternidl"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasPattern.idl (from rev 46919, trunk/WebCore/html/CanvasPattern.idl) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasPattern.idl                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasPattern.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2006 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. 
+ */
+
+module html {
+
+    interface [
+        InterfaceUUID=c2131348-6d8c-47b5-86cc-d41aff34ce15,
+        ImplementationUUID=82f5d713-3d17-44dd-aa4a-7766fe345940
+    ] CanvasPattern {
+
+    };
+
+}
+
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasPatternidl"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasPattern.idl</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasPixelArraycppfromrev46919trunkWebCorehtmlCanvasPixelArraycpp"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasPixelArray.cpp (from rev 46919, trunk/WebCore/html/CanvasPixelArray.cpp) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasPixelArray.cpp                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasPixelArray.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2008, 2009 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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CanvasPixelArray.h&quot;
+
+namespace WebCore {
+    
+    PassRefPtr&lt;CanvasPixelArray&gt; CanvasPixelArray::create(unsigned length)
+    {
+        return adoptRef(new CanvasPixelArray(length));
+    }
+    
+    CanvasPixelArray::CanvasPixelArray(unsigned length)
+        : m_data(WTF::ByteArray::create(length))
+    {
+    }
+    
+}
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasPixelArraycpp"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasPixelArray.cpp</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasPixelArrayhfromrev46919trunkWebCorehtmlCanvasPixelArrayh"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasPixelArray.h (from rev 46919, trunk/WebCore/html/CanvasPixelArray.h) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasPixelArray.h                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasPixelArray.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2008, 2009 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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CanvasPixelArray_h
+#define CanvasPixelArray_h
+
+#include &lt;wtf/ByteArray.h&gt;
+#include &lt;wtf/MathExtras.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace WebCore {
+    
+    class CanvasPixelArray : public RefCounted&lt;CanvasPixelArray&gt; {
+    public:
+        static PassRefPtr&lt;CanvasPixelArray&gt; create(unsigned length);
+        
+        WTF::ByteArray* data() { return m_data.get(); }
+        unsigned length() const { return m_data-&gt;length(); }
+        
+        void set(unsigned index, double value)
+        {
+            m_data-&gt;set(index, value);
+        }
+        
+        bool get(unsigned index, unsigned char&amp; result) const
+        {
+            return m_data-&gt;get(index, result);
+        }
+
+    private:
+        CanvasPixelArray(unsigned length);
+        RefPtr&lt;WTF::ByteArray&gt; m_data;
+    };
+    
+} // namespace WebCore
+
+#endif // CanvasPixelArray_h
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasPixelArrayh"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasPixelArray.h</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasPixelArrayidlfromrev46919trunkWebCorehtmlCanvasPixelArrayidl"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasPixelArray.idl (from rev 46919, trunk/WebCore/html/CanvasPixelArray.idl) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasPixelArray.idl                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasPixelArray.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2008, 2009 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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT || defined(V8_BINDING) &amp;&amp; V8_BINDING
+    interface [
+        CustomHeader,
+        HasCustomIndexGetter,
+        HasCustomIndexSetter
+    ] CanvasPixelArray {
+        readonly attribute long length;
+    };
+#endif
+}
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasPixelArrayidl"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasPixelArray.idl</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasRenderingContext2Dcppfromrev46919trunkWebCorehtmlCanvasRenderingContext2Dcpp"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp (from rev 46919, trunk/WebCore/html/CanvasRenderingContext2D.cpp) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,1566 @@
</span><ins>+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
+ * Copyright (C) 2008 Eric Seidel &lt;eric@webkit.org&gt;
+ * Copyright (C) 2008 Dirk Schulze &lt;krit@webkit.org&gt;
+ *
+ * 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;CanvasRenderingContext2D.h&quot;
+
+#include &quot;TransformationMatrix.h&quot;
+#include &quot;CSSParser.h&quot;
+#include &quot;CachedImage.h&quot;
+#include &quot;CanvasGradient.h&quot;
+#include &quot;CanvasPattern.h&quot;
+#include &quot;CanvasStyle.h&quot;
+#include &quot;CSSMutableStyleDeclaration.h&quot;
+#include &quot;CSSPropertyNames.h&quot;
+#include &quot;CSSStyleSelector.h&quot;
+#include &quot;Document.h&quot;
+#include &quot;ExceptionCode.h&quot;
+#include &quot;FloatConversion.h&quot;
+#include &quot;Frame.h&quot;
+#include &quot;GraphicsContext.h&quot;
+#include &quot;HTMLCanvasElement.h&quot;
+#include &quot;HTMLImageElement.h&quot;
+#include &quot;HTMLNames.h&quot;
+#include &quot;ImageBuffer.h&quot;
+#include &quot;ImageData.h&quot;
+#include &quot;KURL.h&quot;
+#include &quot;Page.h&quot;
+#include &quot;RenderHTMLCanvas.h&quot;
+#include &quot;SecurityOrigin.h&quot;
+#include &quot;Settings.h&quot;
+#include &quot;StrokeStyleApplier.h&quot;
+#include &quot;TextMetrics.h&quot;
+#include &quot;HTMLVideoElement.h&quot;
+#include &lt;stdio.h&gt;
+#include &lt;wtf/ByteArray.h&gt;
+#include &lt;wtf/MathExtras.h&gt;
+#include &lt;wtf/OwnPtr.h&gt;
+#include &lt;wtf/UnusedParam.h&gt;
+
+using namespace std;
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+static const char* const defaultFont = &quot;10px sans-serif&quot;;
+
+
+class CanvasStrokeStyleApplier : public StrokeStyleApplier {
+public:
+    CanvasStrokeStyleApplier(CanvasRenderingContext2D* canvasContext)
+        : m_canvasContext(canvasContext)
+    {
+    }
+    
+    virtual void strokeStyle(GraphicsContext* c)
+    {
+        c-&gt;setStrokeThickness(m_canvasContext-&gt;lineWidth());
+        c-&gt;setLineCap(m_canvasContext-&gt;getLineCap());
+        c-&gt;setLineJoin(m_canvasContext-&gt;getLineJoin());
+        c-&gt;setMiterLimit(m_canvasContext-&gt;miterLimit());
+    }
+
+private:
+    CanvasRenderingContext2D* m_canvasContext;
+};
+
+
+
+CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas)
+    : m_canvas(canvas)
+    , m_stateStack(1)
+{
+    // Make sure that even if the drawingContext() has a different default
+    // thickness, it is in sync with the canvas thickness.
+    setLineWidth(lineWidth());
+}
+
+void CanvasRenderingContext2D::ref()
+{
+    m_canvas-&gt;ref();
+}
+
+void CanvasRenderingContext2D::deref()
+{
+    m_canvas-&gt;deref(); 
+}
+
+void CanvasRenderingContext2D::reset()
+{
+    m_stateStack.resize(1);
+    m_stateStack.first() = State();
+}
+
+CanvasRenderingContext2D::State::State()
+    : m_strokeStyle(CanvasStyle::create(&quot;black&quot;))
+    , m_fillStyle(CanvasStyle::create(&quot;black&quot;))
+    , m_lineWidth(1)
+    , m_lineCap(ButtCap)
+    , m_lineJoin(MiterJoin)
+    , m_miterLimit(10)
+    , m_shadowBlur(0)
+    , m_shadowColor(&quot;black&quot;)
+    , m_globalAlpha(1)
+    , m_globalComposite(CompositeSourceOver)
+    , m_invertibleCTM(true)
+    , m_textAlign(StartTextAlign)
+    , m_textBaseline(AlphabeticTextBaseline)
+    , m_unparsedFont(defaultFont)
+    , m_realizedFont(false)
+{
+}
+
+void CanvasRenderingContext2D::save()
+{
+    ASSERT(m_stateStack.size() &gt;= 1);
+    m_stateStack.append(state());
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;save();
+}
+
+void CanvasRenderingContext2D::restore()
+{
+    ASSERT(m_stateStack.size() &gt;= 1);
+    if (m_stateStack.size() &lt;= 1)
+        return;
+    m_path.transform(state().m_transform);
+    m_stateStack.removeLast();
+    m_path.transform(state().m_transform.inverse());
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;restore();
+}
+
+CanvasStyle* CanvasRenderingContext2D::strokeStyle() const
+{
+    return state().m_strokeStyle.get();
+}
+
+void CanvasRenderingContext2D::setStrokeStyle(PassRefPtr&lt;CanvasStyle&gt; style)
+{
+    if (!style)
+        return;
+
+    if (m_canvas-&gt;originClean()) {
+        if (CanvasPattern* pattern = style-&gt;canvasPattern()) {
+            if (!pattern-&gt;originClean())
+                m_canvas-&gt;setOriginTainted();
+        }
+    }
+
+    state().m_strokeStyle = style;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    state().m_strokeStyle-&gt;applyStrokeColor(c);
+}
+
+CanvasStyle* CanvasRenderingContext2D::fillStyle() const
+{
+    return state().m_fillStyle.get();
+}
+
+void CanvasRenderingContext2D::setFillStyle(PassRefPtr&lt;CanvasStyle&gt; style)
+{
+    if (!style)
+        return;

+    if (m_canvas-&gt;originClean()) {
+        if (CanvasPattern* pattern = style-&gt;canvasPattern()) {
+            if (!pattern-&gt;originClean())
+                m_canvas-&gt;setOriginTainted();
+        }
+    }
+
+    state().m_fillStyle = style;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    state().m_fillStyle-&gt;applyFillColor(c);
+}
+
+float CanvasRenderingContext2D::lineWidth() const
+{
+    return state().m_lineWidth;
+}
+
+void CanvasRenderingContext2D::setLineWidth(float width)
+{
+    if (!(width &gt; 0))
+        return;
+    state().m_lineWidth = width;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;setStrokeThickness(width);
+}
+
+String CanvasRenderingContext2D::lineCap() const
+{
+    return lineCapName(state().m_lineCap);
+}
+
+void CanvasRenderingContext2D::setLineCap(const String&amp; s)
+{
+    LineCap cap;
+    if (!parseLineCap(s, cap))
+        return;
+    state().m_lineCap = cap;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;setLineCap(cap);
+}
+
+String CanvasRenderingContext2D::lineJoin() const
+{
+    return lineJoinName(state().m_lineJoin);
+}
+
+void CanvasRenderingContext2D::setLineJoin(const String&amp; s)
+{
+    LineJoin join;
+    if (!parseLineJoin(s, join))
+        return;
+    state().m_lineJoin = join;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;setLineJoin(join);
+}
+
+float CanvasRenderingContext2D::miterLimit() const
+{
+    return state().m_miterLimit;
+}
+
+void CanvasRenderingContext2D::setMiterLimit(float limit)
+{
+    if (!(limit &gt; 0))
+        return;
+    state().m_miterLimit = limit;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;setMiterLimit(limit);
+}
+
+float CanvasRenderingContext2D::shadowOffsetX() const
+{
+    return state().m_shadowOffset.width();
+}
+
+void CanvasRenderingContext2D::setShadowOffsetX(float x)
+{
+    state().m_shadowOffset.setWidth(x);
+    applyShadow();
+}
+
+float CanvasRenderingContext2D::shadowOffsetY() const
+{
+    return state().m_shadowOffset.height();
+}
+
+void CanvasRenderingContext2D::setShadowOffsetY(float y)
+{
+    state().m_shadowOffset.setHeight(y);
+    applyShadow();
+}
+
+float CanvasRenderingContext2D::shadowBlur() const
+{
+    return state().m_shadowBlur;
+}
+
+void CanvasRenderingContext2D::setShadowBlur(float blur)
+{
+    state().m_shadowBlur = blur;
+    applyShadow();
+}
+
+String CanvasRenderingContext2D::shadowColor() const
+{
+    // FIXME: What should this return if you called setShadow with a non-string color?
+    return state().m_shadowColor;
+}
+
+void CanvasRenderingContext2D::setShadowColor(const String&amp; color)
+{
+    state().m_shadowColor = color;
+    applyShadow();
+}
+
+float CanvasRenderingContext2D::globalAlpha() const
+{
+    return state().m_globalAlpha;
+}
+
+void CanvasRenderingContext2D::setGlobalAlpha(float alpha)
+{
+    if (!(alpha &gt;= 0 &amp;&amp; alpha &lt;= 1))
+        return;
+    state().m_globalAlpha = alpha;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;setAlpha(alpha);
+}
+
+String CanvasRenderingContext2D::globalCompositeOperation() const
+{
+    return compositeOperatorName(state().m_globalComposite);
+}
+
+void CanvasRenderingContext2D::setGlobalCompositeOperation(const String&amp; operation)
+{
+    CompositeOperator op;
+    if (!parseCompositeOperator(operation, op))
+        return;
+    state().m_globalComposite = op;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    c-&gt;setCompositeOperation(op);
+}
+
+void CanvasRenderingContext2D::scale(float sx, float sy)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    TransformationMatrix newTransform = state().m_transform;
+    newTransform.scaleNonUniform(sx, sy);
+    if (!newTransform.isInvertible()) {
+        state().m_invertibleCTM = false;
+        return;
+    }
+
+    state().m_transform = newTransform;
+    c-&gt;scale(FloatSize(sx, sy));
+    m_path.transform(TransformationMatrix().scaleNonUniform(1.0/sx, 1.0/sy));
+}
+
+void CanvasRenderingContext2D::rotate(float angleInRadians)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    TransformationMatrix newTransform = state().m_transform;
+    newTransform.rotate(angleInRadians / piDouble * 180.0);
+    if (!newTransform.isInvertible()) {
+        state().m_invertibleCTM = false;
+        return;
+    }
+
+    state().m_transform = newTransform;
+    c-&gt;rotate(angleInRadians);
+    m_path.transform(TransformationMatrix().rotate(-angleInRadians / piDouble * 180.0));
+}
+
+void CanvasRenderingContext2D::translate(float tx, float ty)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    TransformationMatrix newTransform = state().m_transform;
+    newTransform.translate(tx, ty);
+    if (!newTransform.isInvertible()) {
+        state().m_invertibleCTM = false;
+        return;
+    }
+
+    state().m_transform = newTransform;
+    c-&gt;translate(tx, ty);
+    m_path.transform(TransformationMatrix().translate(-tx, -ty));
+}
+
+void CanvasRenderingContext2D::transform(float m11, float m12, float m21, float m22, float dx, float dy)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    
+    // HTML5 3.14.11.1 -- ignore any calls that pass non-finite numbers
+    if (!isfinite(m11) | !isfinite(m21) | !isfinite(dx) | 
+        !isfinite(m12) | !isfinite(m22) | !isfinite(dy))
+        return;
+
+    TransformationMatrix transform(m11, m12, m21, m22, dx, dy);
+    TransformationMatrix newTransform = transform * state().m_transform;
+    if (!newTransform.isInvertible()) {
+        state().m_invertibleCTM = false;
+        return;
+    }
+
+    state().m_transform = newTransform;
+    c-&gt;concatCTM(transform);
+    m_path.transform(transform.inverse());
+}
+
+void CanvasRenderingContext2D::setTransform(float m11, float m12, float m21, float m22, float dx, float dy)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    
+    // HTML5 3.14.11.1 -- ignore any calls that pass non-finite numbers
+    if (!isfinite(m11) | !isfinite(m21) | !isfinite(dx) | 
+        !isfinite(m12) | !isfinite(m22) | !isfinite(dy))
+        return;
+
+    TransformationMatrix ctm = state().m_transform;
+    if (!ctm.isInvertible())
+        return;
+    c-&gt;concatCTM(c-&gt;getCTM().inverse());
+    c-&gt;concatCTM(m_canvas-&gt;baseTransform());
+    state().m_transform.multiply(ctm.inverse());
+    m_path.transform(ctm);
+
+    state().m_invertibleCTM = true;
+    transform(m11, m12, m21, m22, dx, dy);
+}
+
+void CanvasRenderingContext2D::setStrokeColor(const String&amp; color)
+{
+    setStrokeStyle(CanvasStyle::create(color));
+}
+
+void CanvasRenderingContext2D::setStrokeColor(float grayLevel)
+{
+    setStrokeStyle(CanvasStyle::create(grayLevel, 1));
+}
+
+void CanvasRenderingContext2D::setStrokeColor(const String&amp; color, float alpha)
+{
+    setStrokeStyle(CanvasStyle::create(color, alpha));
+}
+
+void CanvasRenderingContext2D::setStrokeColor(float grayLevel, float alpha)
+{
+    setStrokeStyle(CanvasStyle::create(grayLevel, alpha));
+}
+
+void CanvasRenderingContext2D::setStrokeColor(float r, float g, float b, float a)
+{
+    setStrokeStyle(CanvasStyle::create(r, g, b, a));
+}
+
+void CanvasRenderingContext2D::setStrokeColor(float c, float m, float y, float k, float a)
+{
+    setStrokeStyle(CanvasStyle::create(c, m, y, k, a));
+}
+
+void CanvasRenderingContext2D::setFillColor(const String&amp; color)
+{
+    setFillStyle(CanvasStyle::create(color));
+}
+
+void CanvasRenderingContext2D::setFillColor(float grayLevel)
+{
+    setFillStyle(CanvasStyle::create(grayLevel, 1));
+}
+
+void CanvasRenderingContext2D::setFillColor(const String&amp; color, float alpha)
+{
+    setFillStyle(CanvasStyle::create(color, alpha));
+}
+
+void CanvasRenderingContext2D::setFillColor(float grayLevel, float alpha)
+{
+    setFillStyle(CanvasStyle::create(grayLevel, alpha));
+}
+
+void CanvasRenderingContext2D::setFillColor(float r, float g, float b, float a)
+{
+    setFillStyle(CanvasStyle::create(r, g, b, a));
+}
+
+void CanvasRenderingContext2D::setFillColor(float c, float m, float y, float k, float a)
+{
+    setFillStyle(CanvasStyle::create(c, m, y, k, a));
+}
+
+void CanvasRenderingContext2D::beginPath()
+{
+    m_path.clear();
+}
+
+void CanvasRenderingContext2D::closePath()
+{
+    m_path.closeSubpath();
+}
+
+void CanvasRenderingContext2D::moveTo(float x, float y)
+{
+    if (!isfinite(x) | !isfinite(y))
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    m_path.moveTo(FloatPoint(x, y));
+}
+
+void CanvasRenderingContext2D::lineTo(float x, float y)
+{
+    if (!isfinite(x) | !isfinite(y))
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    if (!m_path.hasCurrentPoint())
+        m_path.moveTo(FloatPoint(x, y));
+    else
+        m_path.addLineTo(FloatPoint(x, y));
+}
+
+void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, float y)
+{
+    if (!isfinite(cpx) | !isfinite(cpy) | !isfinite(x) | !isfinite(y))
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    if (!m_path.hasCurrentPoint())
+        m_path.moveTo(FloatPoint(x, y));
+    else
+        m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y));
+}
+
+void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)
+{
+    if (!isfinite(cp1x) | !isfinite(cp1y) | !isfinite(cp2x) | !isfinite(cp2y) | !isfinite(x) | !isfinite(y))
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    if (!m_path.hasCurrentPoint())
+        m_path.moveTo(FloatPoint(x, y));
+    else
+        m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y));
+}
+
+void CanvasRenderingContext2D::arcTo(float x0, float y0, float x1, float y1, float r, ExceptionCode&amp; ec)
+{
+    ec = 0;
+    if (!isfinite(x0) | !isfinite(y0) | !isfinite(x1) | !isfinite(y1) | !isfinite(r))
+        return;
+    
+    if (r &lt; 0) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+    if (!state().m_invertibleCTM)
+        return;
+    m_path.addArcTo(FloatPoint(x0, y0), FloatPoint(x1, y1), r);
+}
+
+void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea, bool anticlockwise, ExceptionCode&amp; ec)
+{
+    ec = 0;
+    if (!isfinite(x) | !isfinite(y) | !isfinite(r) | !isfinite(sa) | !isfinite(ea))
+        return;
+    
+    if (r &lt; 0) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+    if (!state().m_invertibleCTM)
+        return;
+    m_path.addArc(FloatPoint(x, y), r, sa, ea, anticlockwise);
+}
+    
+static bool validateRectForCanvas(float&amp; x, float&amp; y, float&amp; width, float&amp; height)
+{
+    if (!isfinite(x) | !isfinite(y) | !isfinite(width) | !isfinite(height))
+        return false;
+    
+    if (width &lt; 0) {
+        width = -width;
+        x -= width;
+    }
+    
+    if (height &lt; 0) {
+        height = -height;
+        y -= height;
+    }
+    
+    return true;
+}
+
+void CanvasRenderingContext2D::rect(float x, float y, float width, float height)
+{
+    if (!validateRectForCanvas(x, y, width, height))
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    m_path.addRect(FloatRect(x, y, width, height));
+}
+
+#if ENABLE(DASHBOARD_SUPPORT)
+void CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode()
+{
+    if (Settings* settings = m_canvas-&gt;document()-&gt;settings())
+        if (settings-&gt;usesDashboardBackwardCompatibilityMode())
+            m_path.clear();
+}
+#endif
+
+void CanvasRenderingContext2D::fill()
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    if (!m_path.isEmpty()) {
+        c-&gt;beginPath();
+        c-&gt;addPath(m_path);
+        willDraw(m_path.boundingRect());
+        c-&gt;fillPath();
+    }
+
+#if ENABLE(DASHBOARD_SUPPORT)
+    clearPathForDashboardBackwardCompatibilityMode();
+#endif
+}
+
+void CanvasRenderingContext2D::stroke()
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    if (!m_path.isEmpty()) {
+        c-&gt;beginPath();
+        c-&gt;addPath(m_path);
+
+        CanvasStrokeStyleApplier strokeApplier(this);
+        FloatRect boundingRect = m_path.strokeBoundingRect(&amp;strokeApplier);
+        willDraw(boundingRect);
+
+        c-&gt;strokePath();
+    }
+
+#if ENABLE(DASHBOARD_SUPPORT)
+    clearPathForDashboardBackwardCompatibilityMode();
+#endif
+}
+
+void CanvasRenderingContext2D::clip()
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    c-&gt;clip(m_path);
+#if ENABLE(DASHBOARD_SUPPORT)
+    clearPathForDashboardBackwardCompatibilityMode();
+#endif
+}
+
+bool CanvasRenderingContext2D::isPointInPath(const float x, const float y)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return false;
+    if (!state().m_invertibleCTM)
+        return false;
+
+    FloatPoint point(x, y);
+    TransformationMatrix ctm = state().m_transform;
+    FloatPoint transformedPoint = ctm.inverse().mapPoint(point);
+    return m_path.contains(transformedPoint);
+}
+
+void CanvasRenderingContext2D::clearRect(float x, float y, float width, float height)
+{
+    if (!validateRectForCanvas(x, y, width, height))
+        return;
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    FloatRect rect(x, y, width, height);
+    willDraw(rect);
+    c-&gt;clearRect(rect);
+}
+
+void CanvasRenderingContext2D::fillRect(float x, float y, float width, float height)
+{
+    if (!validateRectForCanvas(x, y, width, height))
+        return;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    FloatRect rect(x, y, width, height);
+    willDraw(rect);
+
+    c-&gt;save();
+    c-&gt;fillRect(rect);
+    c-&gt;restore();
+}
+
+void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height)
+{
+    if (!validateRectForCanvas(x, y, width, height))
+        return;
+    strokeRect(x, y, width, height, state().m_lineWidth);
+}
+
+void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height, float lineWidth)
+{
+    if (!validateRectForCanvas(x, y, width, height))
+        return;
+    
+    if (!(lineWidth &gt;= 0))
+        return;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    FloatRect rect(x, y, width, height);
+
+    FloatRect boundingRect = rect;
+    boundingRect.inflate(lineWidth / 2);
+    willDraw(boundingRect);
+
+    c-&gt;strokeRect(rect, lineWidth);
+}
+
+#if PLATFORM(CG)
+static inline CGSize adjustedShadowSize(CGFloat width, CGFloat height)
+{
+    // Work around &lt;rdar://problem/5539388&gt; by ensuring that shadow offsets will get truncated
+    // to the desired integer.
+    static const CGFloat extraShadowOffset = narrowPrecisionToCGFloat(1.0 / 128);
+    if (width &gt; 0)
+        width += extraShadowOffset;
+    else if (width &lt; 0)
+        width -= extraShadowOffset;
+
+    if (height &gt; 0)
+        height += extraShadowOffset;
+    else if (height &lt; 0)
+        height -= extraShadowOffset;
+
+    return CGSizeMake(width, height);
+}
+#endif
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = &quot;&quot;;
+    applyShadow();
+}
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String&amp; color)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = color;
+    applyShadow();
+}
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = &quot;&quot;;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+
+    RGBA32 rgba = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, 1.0f);
+    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
+}
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String&amp; color, float alpha)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = color;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+
+    RGBA32 rgba = 0; // default is transparent black
+    if (!state().m_shadowColor.isEmpty())
+        CSSParser::parseColor(rgba, state().m_shadowColor);
+    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(colorWithOverrideAlpha(rgba, alpha)));
+}
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel, float alpha)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = &quot;&quot;;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+
+    RGBA32 rgba = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, alpha);
+    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
+}
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float r, float g, float b, float a)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = &quot;&quot;;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+
+    RGBA32 rgba = makeRGBA32FromFloats(r, g, b, a); // default is transparent black
+    if (!state().m_shadowColor.isEmpty())
+        CSSParser::parseColor(rgba, state().m_shadowColor);
+    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
+}
+
+void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
+{
+    state().m_shadowOffset = FloatSize(width, height);
+    state().m_shadowBlur = blur;
+    state().m_shadowColor = &quot;&quot;;
+
+    GraphicsContext* dc = drawingContext();
+    if (!dc)
+        return;
+#if PLATFORM(CG)
+    const CGFloat components[5] = { c, m, y, k, a };
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceCMYK();
+    CGColorRef shadowColor = CGColorCreate(colorSpace, components);
+    CGColorSpaceRelease(colorSpace);
+    CGContextSetShadowWithColor(dc-&gt;platformContext(), adjustedShadowSize(width, -height), blur, shadowColor);
+    CGColorRelease(shadowColor);
+#else
+    dc-&gt;setShadow(IntSize(width, -height), blur, Color(c, m, y, k, a));
+#endif
+}
+
+void CanvasRenderingContext2D::clearShadow()
+{
+    state().m_shadowOffset = FloatSize();
+    state().m_shadowBlur = 0;
+    state().m_shadowColor = &quot;&quot;;
+    applyShadow();
+}
+
+void CanvasRenderingContext2D::applyShadow()
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+
+    RGBA32 rgba = 0; // default is transparent black
+    if (!state().m_shadowColor.isEmpty())
+        CSSParser::parseColor(rgba, state().m_shadowColor);
+    float width = state().m_shadowOffset.width();
+    float height = state().m_shadowOffset.height();
+    c-&gt;setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba));
+}
+
+static IntSize size(HTMLImageElement* image)
+{
+    if (CachedImage* cachedImage = image-&gt;cachedImage())
+        return cachedImage-&gt;imageSize(1.0f); // FIXME: Not sure about this.
+    return IntSize();
+}
+
+#if ENABLE(VIDEO)
+static IntSize size(HTMLVideoElement* video)
+{
+    if (MediaPlayer* player = video-&gt;player())
+        return player-&gt;naturalSize();
+    return IntSize();
+}
+#endif
+
+static inline FloatRect normalizeRect(const FloatRect&amp; rect)
+{
+    return FloatRect(min(rect.x(), rect.right()),
+        min(rect.y(), rect.bottom()),
+        max(rect.width(), -rect.width()),
+        max(rect.height(), -rect.height()));
+}
+
+void CanvasRenderingContext2D::checkOrigin(const KURL&amp; url)
+{
+    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::create(url);
+    if (!m_canvas-&gt;document()-&gt;securityOrigin()-&gt;canAccess(origin.get()))
+        m_canvas-&gt;setOriginTainted();
+}
+
+void CanvasRenderingContext2D::checkOrigin(const String&amp; url)
+{
+    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::createFromString(url);
+    if (!m_canvas-&gt;document()-&gt;securityOrigin()-&gt;canAccess(origin.get()))
+        m_canvas-&gt;setOriginTainted();
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, float x, float y)
+{
+    ASSERT(image);
+    IntSize s = size(image);
+    ExceptionCode ec;
+    drawImage(image, x, y, s.width(), s.height(), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLImageElement* image,
+    float x, float y, float width, float height, ExceptionCode&amp; ec)
+{
+    ASSERT(image);
+    IntSize s = size(image);
+    drawImage(image, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect,
+    ExceptionCode&amp; ec)
+{
+    ASSERT(image);
+
+    ec = 0;
+
+    FloatRect imageRect = FloatRect(FloatPoint(), size(image));
+    if (!imageRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+
+    if (!dstRect.width() || !dstRect.height())
+        return;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    CachedImage* cachedImage = image-&gt;cachedImage();
+    if (!cachedImage)
+        return;
+
+    if (m_canvas-&gt;originClean())
+        checkOrigin(cachedImage-&gt;response().url());
+
+    if (m_canvas-&gt;originClean() &amp;&amp; !cachedImage-&gt;image()-&gt;hasSingleSecurityOrigin())
+        m_canvas-&gt;setOriginTainted();
+
+    FloatRect sourceRect = c-&gt;roundToDevicePixels(srcRect);
+    FloatRect destRect = c-&gt;roundToDevicePixels(dstRect);
+    willDraw(destRect);
+    c-&gt;drawImage(cachedImage-&gt;image(), destRect, sourceRect, state().m_globalComposite);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, float x, float y)
+{
+    ASSERT(canvas);
+    ExceptionCode ec;
+    drawImage(canvas, x, y, canvas-&gt;width(), canvas-&gt;height(), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas,
+    float x, float y, float width, float height, ExceptionCode&amp; ec)
+{
+    ASSERT(canvas);
+    drawImage(canvas, FloatRect(0, 0, canvas-&gt;width(), canvas-&gt;height()), FloatRect(x, y, width, height), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, const FloatRect&amp; srcRect,
+    const FloatRect&amp; dstRect, ExceptionCode&amp; ec)
+{
+    ASSERT(canvas);
+
+    ec = 0;
+
+    FloatRect srcCanvasRect = FloatRect(FloatPoint(), canvas-&gt;size());
+    if (!srcCanvasRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+
+    if (!dstRect.width() || !dstRect.height())
+        return;
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+        
+    FloatRect sourceRect = c-&gt;roundToDevicePixels(srcRect);
+    FloatRect destRect = c-&gt;roundToDevicePixels(dstRect);
+        
+    // FIXME: Do this through platform-independent GraphicsContext API.
+    ImageBuffer* buffer = canvas-&gt;buffer();
+    if (!buffer)
+        return;
+
+    if (!canvas-&gt;originClean())
+        m_canvas-&gt;setOriginTainted();
+
+    c-&gt;drawImage(buffer-&gt;image(), destRect, sourceRect, state().m_globalComposite);
+    willDraw(destRect); // This call comes after drawImage, since the buffer we draw into may be our own, and we need to make sure it is dirty.
+                        // FIXME: Arguably willDraw should become didDraw and occur after drawing calls and not before them to avoid problems like this.
+}
+
+#if ENABLE(VIDEO)
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, float x, float y)
+{
+    ASSERT(video);
+    IntSize s = size(video);
+    ExceptionCode ec;
+    drawImage(video, x, y, s.width(), s.height(), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video,
+                                         float x, float y, float width, float height, ExceptionCode&amp; ec)
+{
+    ASSERT(video);
+    IntSize s = size(video);
+    drawImage(video, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
+}
+
+void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect,
+                                         ExceptionCode&amp; ec)
+{
+    ASSERT(video);
+    
+    ec = 0;
+    FloatRect videoRect = FloatRect(FloatPoint(), size(video));
+    if (!videoRect.contains(normalizeRect(srcRect)) || srcRect.width() == 0 || srcRect.height() == 0) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+    
+    if (!dstRect.width() || !dstRect.height())
+        return;
+    
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    if (m_canvas-&gt;originClean())
+        checkOrigin(video-&gt;currentSrc());
+
+    if (m_canvas-&gt;originClean() &amp;&amp; !video-&gt;hasSingleSecurityOrigin())
+        m_canvas-&gt;setOriginTainted();
+
+    FloatRect sourceRect = c-&gt;roundToDevicePixels(srcRect);
+    FloatRect destRect = c-&gt;roundToDevicePixels(dstRect);
+    willDraw(destRect);
+
+    c-&gt;save();
+    c-&gt;clip(destRect);
+    c-&gt;translate(destRect.x(), destRect.y());
+    c-&gt;scale(FloatSize(destRect.width()/sourceRect.width(), destRect.height()/sourceRect.height()));
+    c-&gt;translate(-sourceRect.x(), -sourceRect.y());
+    video-&gt;paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video)));
+    c-&gt;restore();
+}
+#endif
+
+// FIXME: Why isn't this just another overload of drawImage? Why have a different name?
+void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image,
+    float sx, float sy, float sw, float sh,
+    float dx, float dy, float dw, float dh,
+    const String&amp; compositeOperation)
+{
+    if (!image)
+        return;
+
+    CachedImage* cachedImage = image-&gt;cachedImage();
+    if (!cachedImage)
+        return;
+
+    if (m_canvas-&gt;originClean())
+        checkOrigin(cachedImage-&gt;response().url());
+
+    if (m_canvas-&gt;originClean() &amp;&amp; !cachedImage-&gt;image()-&gt;hasSingleSecurityOrigin())
+        m_canvas-&gt;setOriginTainted();
+
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    CompositeOperator op;
+    if (!parseCompositeOperator(compositeOperation, op))
+        op = CompositeSourceOver;
+
+    FloatRect destRect = FloatRect(dx, dy, dw, dh);
+    willDraw(destRect);
+    c-&gt;drawImage(cachedImage-&gt;image(), destRect, FloatRect(sx, sy, sw, sh), op);
+}
+
+void CanvasRenderingContext2D::setAlpha(float alpha)
+{
+    setGlobalAlpha(alpha);
+}
+
+void CanvasRenderingContext2D::setCompositeOperation(const String&amp; operation)
+{
+    setGlobalCompositeOperation(operation);
+}
+
+void CanvasRenderingContext2D::prepareGradientForDashboard(CanvasGradient* gradient) const
+{
+#if ENABLE(DASHBOARD_SUPPORT)
+    if (Settings* settings = m_canvas-&gt;document()-&gt;settings())
+        if (settings-&gt;usesDashboardBackwardCompatibilityMode())
+            gradient-&gt;setDashboardCompatibilityMode();
+#else
+    UNUSED_PARAM(gradient);
+#endif
+}
+
+PassRefPtr&lt;CanvasGradient&gt; CanvasRenderingContext2D::createLinearGradient(float x0, float y0, float x1, float y1, ExceptionCode&amp; ec)
+{
+    if (!isfinite(x0) || !isfinite(y0) || !isfinite(x1) || !isfinite(y1)) {
+        ec = NOT_SUPPORTED_ERR;
+        return 0;
+    }
+
+    PassRefPtr&lt;CanvasGradient&gt; gradient = CanvasGradient::create(FloatPoint(x0, y0), FloatPoint(x1, y1));
+    prepareGradientForDashboard(gradient.get());
+    return gradient;
+}
+
+PassRefPtr&lt;CanvasGradient&gt; CanvasRenderingContext2D::createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionCode&amp; ec)
+{
+    if (!isfinite(x0) || !isfinite(y0) || !isfinite(r0) || 
+        !isfinite(x1) || !isfinite(y1) || !isfinite(r1)) {
+        ec = NOT_SUPPORTED_ERR;
+        return 0;
+    }
+    PassRefPtr&lt;CanvasGradient&gt; gradient =  CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1);
+    prepareGradientForDashboard(gradient.get());
+    return gradient;
+}
+
+PassRefPtr&lt;CanvasPattern&gt; CanvasRenderingContext2D::createPattern(HTMLImageElement* image,
+    const String&amp; repetitionType, ExceptionCode&amp; ec)
+{
+    bool repeatX, repeatY;
+    ec = 0;
+    CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, ec);
+    if (ec)
+        return 0;
+
+    if (!image-&gt;complete()) {
+        ec = INVALID_STATE_ERR;
+        return 0;
+    }
+
+    CachedImage* cachedImage = image-&gt;cachedImage();
+    if (!cachedImage || !image-&gt;cachedImage()-&gt;image())
+        return CanvasPattern::create(Image::nullImage(), repeatX, repeatY, true);
+
+    RefPtr&lt;SecurityOrigin&gt; origin = SecurityOrigin::createFromString(cachedImage-&gt;url());
+    bool originClean = m_canvas-&gt;document()-&gt;securityOrigin()-&gt;canAccess(origin.get());
+    return CanvasPattern::create(cachedImage-&gt;image(), repeatX, repeatY, originClean);
+}
+
+PassRefPtr&lt;CanvasPattern&gt; CanvasRenderingContext2D::createPattern(HTMLCanvasElement* canvas,
+    const String&amp; repetitionType, ExceptionCode&amp; ec)
+{
+    if (!canvas-&gt;width() || !canvas-&gt;height()) {
+        ec = INVALID_STATE_ERR;
+        return 0;
+    }
+    
+    bool repeatX, repeatY;
+    ec = 0;
+    CanvasPattern::parseRepetitionType(repetitionType, repeatX, repeatY, ec);
+    if (ec)
+        return 0;
+    return CanvasPattern::create(canvas-&gt;buffer()-&gt;image(), repeatX, repeatY, canvas-&gt;originClean());
+}
+
+void CanvasRenderingContext2D::willDraw(const FloatRect&amp; r, unsigned options)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+
+    FloatRect dirtyRect = r;
+    if (options &amp; CanvasWillDrawApplyTransform) {
+        TransformationMatrix ctm = state().m_transform;
+        dirtyRect = ctm.mapRect(r);
+    }
+    
+    if (options &amp; CanvasWillDrawApplyShadow) {
+        // The shadow gets applied after transformation
+        FloatRect shadowRect(dirtyRect);
+        shadowRect.move(state().m_shadowOffset);
+        shadowRect.inflate(state().m_shadowBlur);
+        dirtyRect.unite(shadowRect);
+    }
+    
+    if (options &amp; CanvasWillDrawApplyClip) {
+        // FIXME: apply the current clip to the rectangle. Unfortunately we can't get the clip
+        // back out of the GraphicsContext, so to take clip into account for incremental painting,
+        // we'd have to keep the clip path around.
+    }
+    
+    m_canvas-&gt;willDraw(dirtyRect);
+}
+
+GraphicsContext* CanvasRenderingContext2D::drawingContext() const
+{
+    return m_canvas-&gt;drawingContext();
+}
+
+static PassRefPtr&lt;ImageData&gt; createEmptyImageData(const IntSize&amp; size)
+{
+    RefPtr&lt;ImageData&gt; data = ImageData::create(size.width(), size.height());
+    memset(data-&gt;data()-&gt;data()-&gt;data(), 0, data-&gt;data()-&gt;data()-&gt;length());
+    return data.get();
+}
+
+PassRefPtr&lt;ImageData&gt; CanvasRenderingContext2D::createImageData(float sw, float sh) const
+{
+    FloatSize unscaledSize(sw, sh);
+    IntSize scaledSize = m_canvas-&gt;convertLogicalToDevice(unscaledSize);
+    if (scaledSize.width() &lt; 1)
+        scaledSize.setWidth(1);
+    if (scaledSize.height() &lt; 1)
+        scaledSize.setHeight(1);
+    
+    return createEmptyImageData(scaledSize);
+}
+
+PassRefPtr&lt;ImageData&gt; CanvasRenderingContext2D::getImageData(float sx, float sy, float sw, float sh, ExceptionCode&amp; ec) const
+{
+    if (!m_canvas-&gt;originClean()) {
+        ec = SECURITY_ERR;
+        return 0;
+    }
+    
+    FloatRect unscaledRect(sx, sy, sw, sh);
+    IntRect scaledRect = m_canvas-&gt;convertLogicalToDevice(unscaledRect);
+    if (scaledRect.width() &lt; 1)
+        scaledRect.setWidth(1);
+    if (scaledRect.height() &lt; 1)
+        scaledRect.setHeight(1);
+    ImageBuffer* buffer = m_canvas ? m_canvas-&gt;buffer() : 0;
+    if (!buffer)
+        return createEmptyImageData(scaledRect.size());
+    return buffer-&gt;getImageData(scaledRect);
+}
+
+void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, ExceptionCode&amp; ec)
+{
+    if (!data) {
+        ec = TYPE_MISMATCH_ERR;
+        return;
+    }
+    putImageData(data, dx, dy, 0, 0, data-&gt;width(), data-&gt;height(), ec);
+}
+
+void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, float dirtyX, float dirtyY, 
+                                            float dirtyWidth, float dirtyHeight, ExceptionCode&amp; ec)
+{
+    if (!data) {
+        ec = TYPE_MISMATCH_ERR;
+        return;
+    }
+    if (!isfinite(dx) || !isfinite(dy) || !isfinite(dirtyX) || 
+        !isfinite(dirtyY) || !isfinite(dirtyWidth) || !isfinite(dirtyHeight)) {
+        ec = INDEX_SIZE_ERR;
+        return;
+    }
+
+    ImageBuffer* buffer = m_canvas-&gt;buffer();
+    if (!buffer)
+        return;
+
+    if (dirtyWidth &lt; 0) {
+        dirtyX += dirtyWidth;
+        dirtyWidth = -dirtyWidth;
+    }
+
+    if (dirtyHeight &lt; 0) {
+        dirtyY += dirtyHeight;
+        dirtyHeight = -dirtyHeight;
+    }
+
+    FloatRect clipRect(dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+    clipRect.intersect(IntRect(0, 0, data-&gt;width(), data-&gt;height()));
+    IntSize destOffset(static_cast&lt;int&gt;(dx), static_cast&lt;int&gt;(dy));
+    IntRect sourceRect = enclosingIntRect(clipRect);
+    sourceRect.move(destOffset);
+    sourceRect.intersect(IntRect(IntPoint(), buffer-&gt;size()));
+    if (sourceRect.isEmpty())
+        return;
+    willDraw(sourceRect, 0);  // ignore transform, shadow and clip
+    sourceRect.move(-destOffset);
+    IntPoint destPoint(destOffset.width(), destOffset.height());
+    
+    buffer-&gt;putImageData(data, sourceRect, destPoint);
+}
+
+String CanvasRenderingContext2D::font() const
+{
+    return state().m_unparsedFont;
+}
+
+void CanvasRenderingContext2D::setFont(const String&amp; newFont)
+{
+    RefPtr&lt;CSSMutableStyleDeclaration&gt; tempDecl = CSSMutableStyleDeclaration::create();
+    CSSParser parser(!m_canvas-&gt;document()-&gt;inCompatMode()); // Use the parse mode of the canvas' document when parsing CSS.
+        
+    String declarationText(&quot;font: &quot;);
+    declarationText += newFont;
+    parser.parseDeclaration(tempDecl.get(), declarationText);
+    if (!tempDecl-&gt;length())
+        return;
+            
+    // The parse succeeded.
+    state().m_unparsedFont = newFont;
+    
+    // Map the &lt;canvas&gt; font into the text style. If the font uses keywords like larger/smaller, these will work
+    // relative to the canvas.
+    RefPtr&lt;RenderStyle&gt; newStyle = RenderStyle::create();
+    if (m_canvas-&gt;computedStyle())
+        newStyle-&gt;setFontDescription(m_canvas-&gt;computedStyle()-&gt;fontDescription());
+
+    // Now map the font property into the style.
+    CSSStyleSelector* styleSelector = m_canvas-&gt;document()-&gt;styleSelector();
+    styleSelector-&gt;applyPropertyToStyle(CSSPropertyFont, tempDecl-&gt;getPropertyCSSValue(CSSPropertyFont).get(), newStyle.get());
+    
+    state().m_font = newStyle-&gt;font();
+    state().m_font.update(styleSelector-&gt;fontSelector());
+    state().m_realizedFont = true;
+}
+        
+String CanvasRenderingContext2D::textAlign() const
+{
+    return textAlignName(state().m_textAlign);
+}
+
+void CanvasRenderingContext2D::setTextAlign(const String&amp; s)
+{
+    TextAlign align;
+    if (!parseTextAlign(s, align))
+        return;
+    state().m_textAlign = align;
+}
+        
+String CanvasRenderingContext2D::textBaseline() const
+{
+    return textBaselineName(state().m_textBaseline);
+}
+
+void CanvasRenderingContext2D::setTextBaseline(const String&amp; s)
+{
+    TextBaseline baseline;
+    if (!parseTextBaseline(s, baseline))
+        return;
+    state().m_textBaseline = baseline;
+}
+
+void CanvasRenderingContext2D::fillText(const String&amp; text, float x, float y)
+{
+    drawTextInternal(text, x, y, true);
+}
+
+void CanvasRenderingContext2D::fillText(const String&amp; text, float x, float y, float maxWidth)
+{
+    drawTextInternal(text, x, y, true, maxWidth, true);
+}
+
+void CanvasRenderingContext2D::strokeText(const String&amp; text, float x, float y)
+{
+    drawTextInternal(text, x, y, false);
+}
+
+void CanvasRenderingContext2D::strokeText(const String&amp; text, float x, float y, float maxWidth)
+{
+    drawTextInternal(text, x, y, false, maxWidth, true);
+}
+
+PassRefPtr&lt;TextMetrics&gt; CanvasRenderingContext2D::measureText(const String&amp; text)
+{
+    RefPtr&lt;TextMetrics&gt; metrics = TextMetrics::create();
+    metrics-&gt;setWidth(accessFont().width(TextRun(text.characters(), text.length())));
+    return metrics;
+}
+
+void CanvasRenderingContext2D::drawTextInternal(const String&amp; text, float x, float y, bool fill, float /*maxWidth*/, bool /*useMaxWidth*/)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+    if (!state().m_invertibleCTM)
+        return;
+    
+    const Font&amp; font = accessFont();
+
+    // FIXME: Handle maxWidth.
+    // FIXME: Need to turn off font smoothing.
+
+    bool rtl = m_canvas-&gt;computedStyle() ? m_canvas-&gt;computedStyle()-&gt;direction() == RTL : false;
+    bool override = m_canvas-&gt;computedStyle() ? m_canvas-&gt;computedStyle()-&gt;unicodeBidi() == Override : false;
+
+    unsigned length = text.length();
+    const UChar* string = text.characters();
+    TextRun textRun(string, length, 0, 0, 0, rtl, override, false, false);
+
+    // Draw the item text at the correct point.
+    FloatPoint location(x, y);
+    switch (state().m_textBaseline) {
+        case TopTextBaseline:
+        case HangingTextBaseline:
+            location.setY(y + font.ascent());
+            break;
+        case BottomTextBaseline:
+        case IdeographicTextBaseline:
+            location.setY(y - font.descent());
+            break;
+        case MiddleTextBaseline:
+            location.setY(y - font.descent() + font.height() / 2);
+            break;
+        case AlphabeticTextBaseline:
+        default:
+             // Do nothing.
+            break;
+    }
+    
+    float width = font.width(TextRun(text, false, 0, 0, rtl, override));
+
+    TextAlign align = state().m_textAlign;
+    if (align == StartTextAlign)
+         align = rtl ? RightTextAlign : LeftTextAlign;
+    else if (align == EndTextAlign)
+        align = rtl ? LeftTextAlign : RightTextAlign;
+    
+    switch (align) {
+        case CenterTextAlign:
+            location.setX(location.x() - width / 2);
+            break;
+        case RightTextAlign:
+            location.setX(location.x() - width);
+            break;
+        default:
+            break;
+    }
+    
+    // The slop built in to this mask rect matches the heuristic used in FontCGWin.cpp for GDI text.
+    FloatRect textRect = FloatRect(location.x() - font.height() / 2, location.y() - font.ascent() - font.lineGap(),
+                                   width + font.height(), font.lineSpacing());
+    if (!fill)
+        textRect.inflate(c-&gt;strokeThickness() / 2);
+
+    if (fill)
+        m_canvas-&gt;willDraw(textRect);
+    else {
+        // When stroking text, pointy miters can extend outside of textRect, so we
+        // punt and dirty the whole canvas.
+        m_canvas-&gt;willDraw(FloatRect(0, 0, m_canvas-&gt;width(), m_canvas-&gt;height()));
+    }
+    
+#if PLATFORM(CG)
+    CanvasStyle* drawStyle = fill ? state().m_fillStyle.get() : state().m_strokeStyle.get();
+    if (drawStyle-&gt;canvasGradient() || drawStyle-&gt;canvasPattern()) {
+        // FIXME: The rect is not big enough for miters on stroked text.
+        IntRect maskRect = enclosingIntRect(textRect);
+
+        OwnPtr&lt;ImageBuffer&gt; maskImage = ImageBuffer::create(maskRect.size(), false);
+
+        GraphicsContext* maskImageContext = maskImage-&gt;context();
+
+        if (fill)
+            maskImageContext-&gt;setFillColor(Color::black);
+        else {
+            maskImageContext-&gt;setStrokeColor(Color::black);
+            maskImageContext-&gt;setStrokeThickness(c-&gt;strokeThickness());
+        }
+
+        maskImageContext-&gt;setTextDrawingMode(fill ? cTextFill : cTextStroke);
+        maskImageContext-&gt;translate(-maskRect.x(), -maskRect.y());
+        
+        maskImageContext-&gt;drawBidiText(font, textRun, location);
+        
+        c-&gt;save();
+        c-&gt;clipToImageBuffer(maskRect, maskImage.get());
+        drawStyle-&gt;applyFillColor(c);
+        c-&gt;fillRect(maskRect);
+        c-&gt;restore();
+
+        return;
+    }
+#endif
+
+    c-&gt;setTextDrawingMode(fill ? cTextFill : cTextStroke);
+    c-&gt;drawBidiText(font, textRun, location);
+}
+
+const Font&amp; CanvasRenderingContext2D::accessFont()
+{
+    if (!state().m_realizedFont)
+        setFont(state().m_unparsedFont);
+    return state().m_font;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasRenderingContext2Dhfromrev46919trunkWebCorehtmlCanvasRenderingContext2Dh"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasRenderingContext2D.h (from rev 46919, trunk/WebCore/html/CanvasRenderingContext2D.h) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasRenderingContext2D.h                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasRenderingContext2D.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,271 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2007, 2009 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 CanvasRenderingContext2D_h
+#define CanvasRenderingContext2D_h
+
+#include &quot;TransformationMatrix.h&quot;
+#include &quot;FloatSize.h&quot;
+#include &quot;Font.h&quot;
+#include &quot;GraphicsTypes.h&quot;
+#include &quot;Path.h&quot;
+#include &quot;PlatformString.h&quot;
+#include &lt;wtf/Vector.h&gt;
+
+#if PLATFORM(CG)
+#include &lt;ApplicationServices/ApplicationServices.h&gt;
+#endif
+
+namespace WebCore {
+
+    class CanvasGradient;
+    class CanvasPattern;
+    class CanvasStyle;
+    class FloatRect;
+    class GraphicsContext;
+    class HTMLCanvasElement;
+    class HTMLImageElement;
+    class HTMLVideoElement;
+    class ImageData;
+    class KURL;
+    class TextMetrics;
+
+    typedef int ExceptionCode;
+
+    class CanvasRenderingContext2D : public Noncopyable {
+    public:
+        CanvasRenderingContext2D(HTMLCanvasElement*);
+        
+        void ref();
+        void deref();
+        
+        HTMLCanvasElement* canvas() const { return m_canvas; }
+
+        CanvasStyle* strokeStyle() const;
+        void setStrokeStyle(PassRefPtr&lt;CanvasStyle&gt;);
+
+        CanvasStyle* fillStyle() const;
+        void setFillStyle(PassRefPtr&lt;CanvasStyle&gt;);
+
+        float lineWidth() const;
+        void setLineWidth(float);
+
+        String lineCap() const;
+        void setLineCap(const String&amp;);
+
+        String lineJoin() const;
+        void setLineJoin(const String&amp;);
+
+        float miterLimit() const;
+        void setMiterLimit(float);
+
+        float shadowOffsetX() const;
+        void setShadowOffsetX(float);
+
+        float shadowOffsetY() const;
+        void setShadowOffsetY(float);
+
+        float shadowBlur() const;
+        void setShadowBlur(float);
+
+        String shadowColor() const;
+        void setShadowColor(const String&amp;);
+
+        float globalAlpha() const;
+        void setGlobalAlpha(float);
+
+        String globalCompositeOperation() const;
+        void setGlobalCompositeOperation(const String&amp;);
+
+        void save();
+        void restore();
+
+        void scale(float sx, float sy);
+        void rotate(float angleInRadians);
+        void translate(float tx, float ty);
+        void transform(float m11, float m12, float m21, float m22, float dx, float dy);
+        void setTransform(float m11, float m12, float m21, float m22, float dx, float dy);
+
+        void setStrokeColor(const String&amp; color);
+        void setStrokeColor(float grayLevel);
+        void setStrokeColor(const String&amp; color, float alpha);
+        void setStrokeColor(float grayLevel, float alpha);
+        void setStrokeColor(float r, float g, float b, float a);
+        void setStrokeColor(float c, float m, float y, float k, float a);
+
+        void setFillColor(const String&amp; color);
+        void setFillColor(float grayLevel);
+        void setFillColor(const String&amp; color, float alpha);
+        void setFillColor(float grayLevel, float alpha);
+        void setFillColor(float r, float g, float b, float a);
+        void setFillColor(float c, float m, float y, float k, float a);
+
+        void beginPath();
+        void closePath();
+
+        void moveTo(float x, float y);
+        void lineTo(float x, float y);
+        void quadraticCurveTo(float cpx, float cpy, float x, float y);
+        void bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y);
+        void arcTo(float x0, float y0, float x1, float y1, float radius, ExceptionCode&amp;);
+        void arc(float x, float y, float r, float sa, float ea, bool clockwise, ExceptionCode&amp;);
+        void rect(float x, float y, float width, float height);
+
+        void fill();
+        void stroke();
+        void clip();
+
+        bool isPointInPath(const float x, const float y);
+
+        void clearRect(float x, float y, float width, float height);
+        void fillRect(float x, float y, float width, float height);
+        void strokeRect(float x, float y, float width, float height);
+        void strokeRect(float x, float y, float width, float height, float lineWidth);
+
+        void setShadow(float width, float height, float blur);
+        void setShadow(float width, float height, float blur, const String&amp; color);
+        void setShadow(float width, float height, float blur, float grayLevel);
+        void setShadow(float width, float height, float blur, const String&amp; color, float alpha);
+        void setShadow(float width, float height, float blur, float grayLevel, float alpha);
+        void setShadow(float width, float height, float blur, float r, float g, float b, float a);
+        void setShadow(float width, float height, float blur, float c, float m, float y, float k, float a);
+
+        void clearShadow();
+
+        void drawImage(HTMLImageElement*, float x, float y);
+        void drawImage(HTMLImageElement*, float x, float y, float width, float height, ExceptionCode&amp;);
+        void drawImage(HTMLImageElement*, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect, ExceptionCode&amp;);
+        void drawImage(HTMLCanvasElement*, float x, float y);
+        void drawImage(HTMLCanvasElement*, float x, float y, float width, float height, ExceptionCode&amp;);
+        void drawImage(HTMLCanvasElement*, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect, ExceptionCode&amp;);
+#if ENABLE(VIDEO)
+        void drawImage(HTMLVideoElement*, float x, float y);
+        void drawImage(HTMLVideoElement*, float x, float y, float width, float height, ExceptionCode&amp;);
+        void drawImage(HTMLVideoElement*, const FloatRect&amp; srcRect, const FloatRect&amp; dstRect, ExceptionCode&amp;);
+#endif
+
+        void drawImageFromRect(HTMLImageElement*, float sx, float sy, float sw, float sh,
+            float dx, float dy, float dw, float dh, const String&amp; compositeOperation);
+
+        void setAlpha(float);
+
+        void setCompositeOperation(const String&amp;);
+
+        PassRefPtr&lt;CanvasGradient&gt; createLinearGradient(float x0, float y0, float x1, float y1, ExceptionCode&amp;);
+        PassRefPtr&lt;CanvasGradient&gt; createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, ExceptionCode&amp;);
+        PassRefPtr&lt;CanvasPattern&gt; createPattern(HTMLImageElement*, const String&amp; repetitionType, ExceptionCode&amp;);
+        PassRefPtr&lt;CanvasPattern&gt; createPattern(HTMLCanvasElement*, const String&amp; repetitionType, ExceptionCode&amp;);
+        
+        PassRefPtr&lt;ImageData&gt; createImageData(float width, float height) const;
+        PassRefPtr&lt;ImageData&gt; getImageData(float sx, float sy, float sw, float sh, ExceptionCode&amp;) const;
+        void putImageData(ImageData*, float dx, float dy, ExceptionCode&amp;);
+        void putImageData(ImageData*, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionCode&amp;);
+        
+        void reset();
+
+        String font() const;
+        void setFont(const String&amp;);
+        
+        String textAlign() const;
+        void setTextAlign(const String&amp;);
+        
+        String textBaseline() const;
+        void setTextBaseline(const String&amp;);
+        
+        void fillText(const String&amp; text, float x, float y);
+        void fillText(const String&amp; text, float x, float y, float maxWidth);
+        void strokeText(const String&amp; text, float x, float y);
+        void strokeText(const String&amp; text, float x, float y, float maxWidth);
+        PassRefPtr&lt;TextMetrics&gt; measureText(const String&amp; text);
+
+        LineCap getLineCap() const { return state().m_lineCap; }
+        LineJoin getLineJoin() const { return state().m_lineJoin; }
+
+    private:
+        struct State {
+            State();
+            
+            RefPtr&lt;CanvasStyle&gt; m_strokeStyle;
+            RefPtr&lt;CanvasStyle&gt; m_fillStyle;
+            float m_lineWidth;
+            LineCap m_lineCap;
+            LineJoin m_lineJoin;
+            float m_miterLimit;
+            FloatSize m_shadowOffset;
+            float m_shadowBlur;
+            String m_shadowColor;
+            float m_globalAlpha;
+            CompositeOperator m_globalComposite;
+            TransformationMatrix m_transform;
+            bool m_invertibleCTM;
+            
+            // Text state.
+            TextAlign m_textAlign;
+            TextBaseline m_textBaseline;
+            
+            String m_unparsedFont;
+            Font m_font;
+            bool m_realizedFont;
+        };
+        Path m_path;
+
+        State&amp; state() { return m_stateStack.last(); }
+        const State&amp; state() const { return m_stateStack.last(); }
+
+        void applyShadow();
+
+        enum CanvasWillDrawOption {
+            CanvasWillDrawApplyTransform = 1,
+            CanvasWillDrawApplyShadow = 1 &lt;&lt; 1,
+            CanvasWillDrawApplyClip = 1 &lt;&lt; 2,
+            CanvasWillDrawApplyAll = 0xffffffff
+        };
+        
+        void willDraw(const FloatRect&amp;, unsigned options = CanvasWillDrawApplyAll);
+
+        GraphicsContext* drawingContext() const;
+
+        void applyStrokePattern();
+        void applyFillPattern();
+
+        void drawTextInternal(const String&amp; text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false);
+
+        const Font&amp; accessFont();
+
+#if ENABLE(DASHBOARD_SUPPORT)
+        void clearPathForDashboardBackwardCompatibilityMode();
+#endif
+        
+        void prepareGradientForDashboard(CanvasGradient* gradient) const;
+        void checkOrigin(const KURL&amp;);
+        void checkOrigin(const String&amp;);
+
+        HTMLCanvasElement* m_canvas;
+        Vector&lt;State, 1&gt; m_stateStack;
+    };
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasRenderingContext2Dh"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasRenderingContext2D.h</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasRenderingContext2Didlfromrev46919trunkWebCorehtmlCanvasRenderingContext2Didl"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasRenderingContext2D.idl (from rev 46919, trunk/WebCore/html/CanvasRenderingContext2D.idl) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasRenderingContext2D.idl                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasRenderingContext2D.idl        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+/*
+ * Copyright (C) 2006 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. 
+ */
+
+module html {
+
+    interface [
+        GenerateConstructor,
+        InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
+        ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
+    ] CanvasRenderingContext2D {
+
+        // Web Applications 1.0 draft
+
+        readonly attribute HTMLCanvasElement canvas;
+
+        void save();
+        void restore();
+
+        void scale(in float sx, in float sy);
+        void rotate(in float angle);
+        void translate(in float tx, in float ty);
+        void transform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
+        void setTransform(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
+
+        attribute float globalAlpha;
+        attribute [ConvertNullToNullString] DOMString globalCompositeOperation;
+
+        CanvasGradient createLinearGradient(in float x0, in float y0, in float x1, in float y1)
+            raises (DOMException);
+        CanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1)
+            raises (DOMException);
+
+        attribute float lineWidth;
+        attribute [ConvertNullToNullString] DOMString lineCap;
+        attribute [ConvertNullToNullString] DOMString lineJoin;
+        attribute float miterLimit;
+
+        attribute float shadowOffsetX;
+        attribute float shadowOffsetY;
+        attribute float shadowBlur;
+        attribute [ConvertNullToNullString] DOMString shadowColor;
+
+        void clearRect(in float x, in float y, in float width, in float height);
+        void fillRect(in float x, in float y, in float width, in float height);
+
+        void beginPath();
+        void closePath();
+        void moveTo(in float x, in float y);
+        void lineTo(in float x, in float y);
+        void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y);
+        void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
+        void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius)
+            raises (DOMException);
+        void rect(in float x, in float y, in float width, in float height);
+        void arc(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise)
+            raises (DOMException);
+        void fill();
+        void stroke();
+        void clip();
+        boolean isPointInPath(in float x, in float y);
+
+        // text
+        attribute DOMString font;
+        attribute DOMString textAlign;
+        attribute DOMString textBaseline;
+        [Custom] void fillText(/* 4 */);
+        [Custom] void strokeText(/* 4 */);
+        TextMetrics measureText(in DOMString text);
+
+        // other
+
+        void setAlpha(in float alpha);
+        void setCompositeOperation(in DOMString compositeOperation);
+
+        void setLineWidth(in float width);
+        void setLineCap(in DOMString cap);
+        void setLineJoin(in DOMString join);
+        void setMiterLimit(in float limit);
+
+        void clearShadow();
+
+        [Custom] void setStrokeColor(/* 1  */);
+        [Custom] void setFillColor(/* 1 */);
+        [Custom] void strokeRect(/* 4 */);
+        [Custom] void drawImage(/* 3 */);
+        [Custom] void drawImageFromRect(/* 10 */);
+        [Custom] void setShadow(/* 3 */);
+        [Custom] void createPattern(/* 2 */);
+        
+        attribute [Custom] custom strokeStyle;
+        attribute [Custom] custom fillStyle;
+        
+        // pixel manipulation
+        ImageData createImageData(in float sw, in float sh);
+        ImageData getImageData(in float sx, in float sy, in float sw, in float sh)
+            raises(DOMException);
+        [Custom] void putImageData(/* in ImageData imagedata, in float dx, in float dy [, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight] */);
+    };
+
+}
+
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasRenderingContext2Didl"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasRenderingContext2D.idl</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasStylecppfromrev46919trunkWebCorehtmlCanvasStylecpp"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasStyle.cpp (from rev 46919, trunk/WebCore/html/CanvasStyle.cpp) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasStyle.cpp                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasStyle.cpp        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,231 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
+ * Copyright (C) 2008 Eric Seidel &lt;eric@webkit.org&gt;
+ *
+ * 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;CanvasStyle.h&quot;
+
+#include &quot;CSSParser.h&quot;
+#include &quot;CanvasGradient.h&quot;
+#include &quot;CanvasPattern.h&quot;
+#include &quot;GraphicsContext.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+
+#if PLATFORM(CG)
+#include &lt;CoreGraphics/CGContext.h&gt;
+#endif
+
+#if PLATFORM(QT)
+#include &lt;QPainter&gt;
+#include &lt;QBrush&gt;
+#include &lt;QPen&gt;
+#include &lt;QColor&gt;
+#endif
+
+namespace WebCore {
+
+CanvasStyle::CanvasStyle(const String&amp; color)
+    : m_type(ColorString)
+    , m_color(color)
+{
+}
+
+CanvasStyle::CanvasStyle(float grayLevel)
+    : m_type(GrayLevel)
+    , m_alpha(1)
+    , m_grayLevel(grayLevel)
+{
+}
+
+CanvasStyle::CanvasStyle(const String&amp; color, float alpha)
+    : m_type(ColorStringWithAlpha)
+    , m_color(color)
+    , m_alpha(alpha)
+{
+}
+
+CanvasStyle::CanvasStyle(float grayLevel, float alpha)
+    : m_type(GrayLevel)
+    , m_alpha(alpha)
+    , m_grayLevel(grayLevel)
+{
+}
+
+CanvasStyle::CanvasStyle(float r, float g, float b, float a)
+    : m_type(RGBA)
+    , m_alpha(a)
+    , m_red(r)
+    , m_green(g)
+    , m_blue(b)
+{
+}
+
+CanvasStyle::CanvasStyle(float c, float m, float y, float k, float a)
+    : m_type(CMYKA)
+    , m_alpha(a)
+    , m_cyan(c)
+    , m_magenta(m)
+    , m_yellow(y)
+    , m_black(k)
+{
+}
+
+CanvasStyle::CanvasStyle(PassRefPtr&lt;CanvasGradient&gt; gradient)
+    : m_type(gradient ? Gradient : ColorString)
+    , m_gradient(gradient)
+{
+}
+
+CanvasStyle::CanvasStyle(PassRefPtr&lt;CanvasPattern&gt; pattern)
+    : m_type(pattern ? ImagePattern : ColorString)
+    , m_pattern(pattern)
+{
+}
+
+void CanvasStyle::applyStrokeColor(GraphicsContext* context)
+{
+    if (!context)
+        return;
+    switch (m_type) {
+        case ColorString: {
+            Color c = Color(m_color);
+            if (c.isValid()) {
+                context-&gt;setStrokeColor(c.rgb());
+                break;
+            }
+            RGBA32 color = 0; // default is transparent black
+            if (CSSParser::parseColor(color, m_color))
+                context-&gt;setStrokeColor(color);
+            break;
+        }
+        case ColorStringWithAlpha: {
+            Color c = Color(m_color);
+            if (c.isValid()) {
+                context-&gt;setStrokeColor(colorWithOverrideAlpha(c.rgb(), m_alpha));
+                break;
+            }
+            RGBA32 color = 0; // default is transparent black
+            if (CSSParser::parseColor(color, m_color))
+                context-&gt;setStrokeColor(colorWithOverrideAlpha(color, m_alpha));
+            break;
+        }
+        case GrayLevel:
+            // We're only supporting 255 levels of gray here.  Since this isn't
+            // even part of HTML5, I don't expect anyone will care.  If they do
+            // we'll make a fancier Color abstraction.
+            context-&gt;setStrokeColor(Color(m_grayLevel, m_grayLevel, m_grayLevel, m_alpha));
+            break;
+        case RGBA:
+            context-&gt;setStrokeColor(Color(m_red, m_green, m_blue, m_alpha));
+            break;
+        case CMYKA: {
+            // FIXME: Do this through platform-independent GraphicsContext API.
+            // We'll need a fancier Color abstraction to support CYMKA correctly
+#if PLATFORM(CG)
+            CGContextSetCMYKStrokeColor(context-&gt;platformContext(), m_cyan, m_magenta, m_yellow, m_black, m_alpha);
+#elif PLATFORM(QT)
+            QPen currentPen = context-&gt;platformContext()-&gt;pen();
+            QColor clr;
+            clr.setCmykF(m_cyan, m_magenta, m_yellow, m_black, m_alpha);
+            currentPen.setColor(clr);
+            context-&gt;platformContext()-&gt;setPen(currentPen);
+#else
+            context-&gt;setStrokeColor(Color(m_cyan, m_magenta, m_yellow, m_black, m_alpha));
+#endif
+            break;
+        }
+        case Gradient:
+            context-&gt;setStrokeGradient(canvasGradient()-&gt;gradient());
+            break;
+        case ImagePattern:
+            context-&gt;setStrokePattern(canvasPattern()-&gt;pattern());
+            break;
+    }
+}
+
+void CanvasStyle::applyFillColor(GraphicsContext* context)
+{
+    if (!context)
+        return;
+    switch (m_type) {
+        case ColorString: {
+            Color c = Color(m_color);
+            if (c.isValid()) {
+                context-&gt;setFillColor(c.rgb());
+                break;
+            }
+            RGBA32 rgba = 0; // default is transparent black
+            if (CSSParser::parseColor(rgba, m_color))
+                context-&gt;setFillColor(rgba);
+            break;
+        }
+        case ColorStringWithAlpha: {
+            Color c = Color(m_color);
+            if (c.isValid()) {
+                context-&gt;setFillColor(colorWithOverrideAlpha(c.rgb(), m_alpha));
+                break;
+            }
+            RGBA32 color = 0; // default is transparent black
+            if (CSSParser::parseColor(color, m_color))
+                context-&gt;setFillColor(colorWithOverrideAlpha(color, m_alpha));
+            break;
+        }
+        case GrayLevel:
+            // We're only supporting 255 levels of gray here.  Since this isn't
+            // even part of HTML5, I don't expect anyone will care.  If they do
+            // we'll make a fancier Color abstraction.
+            context-&gt;setFillColor(Color(m_grayLevel, m_grayLevel, m_grayLevel, m_alpha));
+            break;
+        case RGBA:
+            context-&gt;setFillColor(Color(m_red, m_green, m_blue, m_alpha));
+            break;
+        case CMYKA: {
+            // FIXME: Do this through platform-independent GraphicsContext API.
+            // We'll need a fancier Color abstraction to support CYMKA correctly
+#if PLATFORM(CG)
+            CGContextSetCMYKFillColor(context-&gt;platformContext(), m_cyan, m_magenta, m_yellow, m_black, m_alpha);
+#elif PLATFORM(QT)
+            QBrush currentBrush = context-&gt;platformContext()-&gt;brush();
+            QColor clr;
+            clr.setCmykF(m_cyan, m_magenta, m_yellow, m_black, m_alpha);
+            currentBrush.setColor(clr);
+            context-&gt;platformContext()-&gt;setBrush(currentBrush);
+#else
+            context-&gt;setFillColor(Color(m_cyan, m_magenta, m_yellow, m_black, m_alpha));
+#endif
+            break;
+        }
+        case Gradient:
+            context-&gt;setFillGradient(canvasGradient()-&gt;gradient());
+            break;
+        case ImagePattern:
+            context-&gt;setFillPattern(canvasPattern()-&gt;pattern());
+            break;
+    }
+}
+
+}
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasStylecpp"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasStyle.cpp</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkWebCorehtmlcanvasCanvasStylehfromrev46919trunkWebCorehtmlCanvasStyleh"></a>
<div class="copfile"><h4>Copied: trunk/WebCore/html/canvas/CanvasStyle.h (from rev 46919, trunk/WebCore/html/CanvasStyle.h) (0 => 46937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/canvas/CanvasStyle.h                                (rev 0)
+++ trunk/WebCore/html/canvas/CanvasStyle.h        2009-08-08 01:01:16 UTC (rev 46937)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2008 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 CanvasStyle_h
+#define CanvasStyle_h
+
+#include &quot;PlatformString.h&quot;
+
+namespace WebCore {
+
+    class CanvasGradient;
+    class CanvasPattern;
+    class GraphicsContext;
+
+    class CanvasStyle : public RefCounted&lt;CanvasStyle&gt; {
+    public:
+        static PassRefPtr&lt;CanvasStyle&gt; create(const String&amp; color) { return adoptRef(new CanvasStyle(color)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(float grayLevel) { return adoptRef(new CanvasStyle(grayLevel)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(const String&amp; color, float alpha) { return adoptRef(new CanvasStyle(color, alpha)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(float grayLevel, float alpha) { return adoptRef(new CanvasStyle(grayLevel, alpha)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(float r, float g, float b, float a) { return adoptRef(new CanvasStyle(r, g, b, a)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(float c, float m, float y, float k, float a) { return adoptRef(new CanvasStyle(c, m, y, k, a)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(PassRefPtr&lt;CanvasGradient&gt; gradient) { return adoptRef(new CanvasStyle(gradient)); }
+        static PassRefPtr&lt;CanvasStyle&gt; create(PassRefPtr&lt;CanvasPattern&gt; pattern) { return adoptRef(new CanvasStyle(pattern)); }
+
+        String color() const { return m_color; }
+        CanvasGradient* canvasGradient() const { return m_gradient.get(); }
+        CanvasPattern* canvasPattern() const { return m_pattern.get(); }
+
+        void applyFillColor(GraphicsContext*);
+        void applyStrokeColor(GraphicsContext*);
+
+    private:
+        CanvasStyle(const String&amp; color);
+        CanvasStyle(float grayLevel);
+        CanvasStyle(const String&amp; color, float alpha);
+        CanvasStyle(float grayLevel, float alpha);
+        CanvasStyle(float r, float g, float b, float a);
+        CanvasStyle(float c, float m, float y, float k, float a);
+        CanvasStyle(PassRefPtr&lt;CanvasGradient&gt;);
+        CanvasStyle(PassRefPtr&lt;CanvasPattern&gt;);
+
+        enum Type { ColorString, ColorStringWithAlpha, GrayLevel, RGBA, CMYKA, Gradient, ImagePattern };
+
+        Type m_type;
+
+        String m_color;
+        RefPtr&lt;CanvasGradient&gt; m_gradient;
+        RefPtr&lt;CanvasPattern&gt; m_pattern;
+
+        float m_alpha;
+
+        float m_grayLevel;
+
+        float m_red;
+        float m_green;
+        float m_blue;
+
+        float m_cyan;
+        float m_magenta;
+        float m_yellow;
+        float m_black;
+    };
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkWebCorehtmlcanvasCanvasStyleh"></a>
<div class="propset"><h4>Property changes: trunk/WebCore/html/canvas/CanvasStyle.h</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="addfile"><h4>Added: svn:mergeinfo</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
</div>

</body>
</html>