<!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>[50614] 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/50614">50614</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2009-11-07 00:00:12 -0800 (Sat, 07 Nov 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix for https://bugs.webkit.org/show_bug.cgi?id=31219 Clean up 
GraphicsContext's current concept of ColorSpace

Reviewed by Adele Peterson.

ColorSpace is now called ColorType. The variables on the state we 
appropriately re-named as well. I removed strokeColorSpace() and 
fillColorSpace() from GraphicsContext since they were never called. 

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillGradient):
* platform/graphics/GraphicsContext.h:
(WebCore::):
* platform/graphics/GraphicsContextPrivate.h:
(WebCore::GraphicsContextState::GraphicsContextState):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::calculateDrawingMode):
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::strokeRect):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
* platform/graphics/wince/GraphicsContextWince.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::fillRect):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreplatformgraphicsGraphicsContextcpp">trunk/WebCore/platform/graphics/GraphicsContext.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsGraphicsContexth">trunk/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkWebCoreplatformgraphicsGraphicsContextPrivateh">trunk/WebCore/platform/graphics/GraphicsContextPrivate.h</a></li>
<li><a href="#trunkWebCoreplatformgraphicscairoGraphicsContextCairocpp">trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicscgGraphicsContextCGcpp">trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsqtGraphicsContextQtcpp">trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicswinceGraphicsContextWincecpp">trunk/WebCore/platform/graphics/wince/GraphicsContextWince.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/ChangeLog        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2009-11-06  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Reviewed by Adele Peterson.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=31219 Clean up 
+        GraphicsContext's current concept of ColorSpace
+
+        ColorSpace is now called ColorType. The variables on the state we 
+        appropriately re-named as well. I removed strokeColorSpace() and 
+        fillColorSpace() from GraphicsContext since they were never called. 
+
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore::GraphicsContext::setStrokeColor):
+        (WebCore::GraphicsContext::setFillColor):
+        (WebCore::GraphicsContext::setStrokePattern):
+        (WebCore::GraphicsContext::setFillPattern):
+        (WebCore::GraphicsContext::setStrokeGradient):
+        (WebCore::GraphicsContext::setFillGradient):
+        * platform/graphics/GraphicsContext.h:
+        (WebCore::):
+        * platform/graphics/GraphicsContextPrivate.h:
+        (WebCore::GraphicsContextState::GraphicsContextState):
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::calculateDrawingMode):
+        (WebCore::GraphicsContext::drawPath):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::fillRect):
+        (WebCore::GraphicsContext::strokeRect):
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::fillRect):
+        * platform/graphics/wince/GraphicsContextWince.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::fillRect):
+
</ins><span class="cx"> 2009-11-06  Brian Weinstein  &lt;bweinstein@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Tim Hatcher.
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/GraphicsContext.cpp (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/GraphicsContext.cpp        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/GraphicsContext.cpp        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -122,16 +122,11 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::setStrokeColor(const Color&amp; color)
</span><span class="cx"> {
</span><del>-    m_common-&gt;state.strokeColorSpace = SolidColorSpace;
</del><ins>+    m_common-&gt;state.strokeType = SolidColorType;
</ins><span class="cx">     m_common-&gt;state.strokeColor = color;
</span><span class="cx">     setPlatformStrokeColor(color);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ColorSpace GraphicsContext::strokeColorSpace() const
-{
-    return m_common-&gt;state.strokeColorSpace;
-}
-
</del><span class="cx"> void GraphicsContext::setShadow(const IntSize&amp; size, int blur, const Color&amp; color)
</span><span class="cx"> {
</span><span class="cx">     m_common-&gt;state.shadowSize = size;
</span><span class="lines">@@ -184,7 +179,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::setFillColor(const Color&amp; color)
</span><span class="cx"> {
</span><del>-    m_common-&gt;state.fillColorSpace = SolidColorSpace;
</del><ins>+    m_common-&gt;state.fillType = SolidColorType;
</ins><span class="cx">     m_common-&gt;state.fillColor = color;
</span><span class="cx">     setPlatformFillColor(color);
</span><span class="cx"> }
</span><span class="lines">@@ -212,7 +207,7 @@
</span><span class="cx">         setStrokeColor(Color::black);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    m_common-&gt;state.strokeColorSpace = PatternColorSpace;
</del><ins>+    m_common-&gt;state.strokeType = PatternType;
</ins><span class="cx">     m_common-&gt;state.strokePattern = pattern;
</span><span class="cx">     setPlatformStrokePattern(m_common-&gt;state.strokePattern.get());
</span><span class="cx"> }
</span><span class="lines">@@ -224,7 +219,7 @@
</span><span class="cx">         setFillColor(Color::black);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    m_common-&gt;state.fillColorSpace = PatternColorSpace;
</del><ins>+    m_common-&gt;state.fillType = PatternType;
</ins><span class="cx">     m_common-&gt;state.fillPattern = pattern;
</span><span class="cx">     setPlatformFillPattern(m_common-&gt;state.fillPattern.get());
</span><span class="cx"> }
</span><span class="lines">@@ -236,7 +231,7 @@
</span><span class="cx">         setStrokeColor(Color::black);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    m_common-&gt;state.strokeColorSpace = GradientColorSpace;
</del><ins>+    m_common-&gt;state.strokeType = GradientType;
</ins><span class="cx">     m_common-&gt;state.strokeGradient = gradient;
</span><span class="cx">     setPlatformStrokeGradient(m_common-&gt;state.strokeGradient.get());
</span><span class="cx"> }
</span><span class="lines">@@ -248,7 +243,7 @@
</span><span class="cx">         setFillColor(Color::black);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    m_common-&gt;state.fillColorSpace = GradientColorSpace;
</del><ins>+    m_common-&gt;state.fillType = GradientType;
</ins><span class="cx">     m_common-&gt;state.fillGradient = gradient;
</span><span class="cx">     setPlatformFillGradient(m_common-&gt;state.fillGradient.get());
</span><span class="cx"> }
</span><span class="lines">@@ -258,11 +253,6 @@
</span><span class="cx">     return m_common-&gt;state.fillGradient.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ColorSpace GraphicsContext::fillColorSpace() const
-{
-    return m_common-&gt;state.fillColorSpace;
-}
-
</del><span class="cx"> Gradient* GraphicsContext::strokeGradient() const
</span><span class="cx"> {
</span><span class="cx">     return m_common-&gt;state.strokeGradient.get();
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/GraphicsContext.h (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/GraphicsContext.h        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/GraphicsContext.h        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -130,16 +130,10 @@
</span><span class="cx">         DashedStroke
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    // FIXME: This is a place-holder until we decide to add
-    // real color space support to WebCore.  At that time, ColorSpace will be a
-    // class and instances will be held  off of Colors.   There will be
-    // special singleton Gradient and Pattern color spaces to mark when
-    // a fill or stroke is using a gradient or pattern instead of a solid color.
-    // https://bugs.webkit.org/show_bug.cgi?id=20558
-    enum ColorSpace {
-        SolidColorSpace,
-        PatternColorSpace,
-        GradientColorSpace
</del><ins>+    enum FillOrStrokeType {
+        SolidColorType,
+        PatternType,
+        GradientType
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     enum InterpolationQuality {
</span><span class="lines">@@ -166,8 +160,6 @@
</span><span class="cx">         Color strokeColor() const;
</span><span class="cx">         void setStrokeColor(const Color&amp;);
</span><span class="cx"> 
</span><del>-        ColorSpace strokeColorSpace() const;
-
</del><span class="cx">         void setStrokePattern(PassRefPtr&lt;Pattern&gt;);
</span><span class="cx">         Pattern* strokePattern() const;
</span><span class="cx"> 
</span><span class="lines">@@ -185,8 +177,6 @@
</span><span class="cx">         void setFillGradient(PassRefPtr&lt;Gradient&gt;);
</span><span class="cx">         Gradient* fillGradient() const;
</span><span class="cx"> 
</span><del>-        ColorSpace fillColorSpace() const;
-
</del><span class="cx">         void setShadowsIgnoreTransforms(bool);
</span><span class="cx"> 
</span><span class="cx">         void setShouldAntialias(bool);
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsGraphicsContextPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/GraphicsContextPrivate.h (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/GraphicsContextPrivate.h        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/GraphicsContextPrivate.h        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -38,18 +38,18 @@
</span><span class="cx">             : textDrawingMode(cTextFill)
</span><span class="cx">             , strokeStyle(SolidStroke)
</span><span class="cx">             , strokeThickness(0)
</span><del>-#if PLATFORM(CAIRO)
-            , globalAlpha(1.0f)
-#endif
-            , strokeColorSpace(SolidColorSpace)
</del><ins>+            , strokeType(SolidColorType)
</ins><span class="cx">             , strokeColor(Color::black)
</span><span class="cx">             , fillRule(RULE_NONZERO)
</span><del>-            , fillColorSpace(SolidColorSpace)
</del><ins>+            , fillType(SolidColorType)
</ins><span class="cx">             , fillColor(Color::black)
</span><span class="cx">             , shouldAntialias(true)
</span><span class="cx">             , paintingDisabled(false)
</span><span class="cx">             , shadowBlur(0)
</span><span class="cx">             , shadowsIgnoreTransforms(false)
</span><ins>+#if PLATFORM(CAIRO)
+            , globalAlpha(1.0f)
+#endif
</ins><span class="cx">         {
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -57,18 +57,13 @@
</span><span class="cx">         
</span><span class="cx">         StrokeStyle strokeStyle;
</span><span class="cx">         float strokeThickness;
</span><del>-#if PLATFORM(CAIRO)
-        float globalAlpha;
-#elif PLATFORM(QT)
-        TransformationMatrix pathTransform;
-#endif
-        ColorSpace strokeColorSpace;
</del><ins>+        FillOrStrokeType strokeType;
</ins><span class="cx">         Color strokeColor;
</span><span class="cx">         RefPtr&lt;Gradient&gt; strokeGradient;
</span><span class="cx">         RefPtr&lt;Pattern&gt; strokePattern;
</span><span class="cx">         
</span><span class="cx">         WindRule fillRule;
</span><del>-        ColorSpace fillColorSpace;
</del><ins>+        FillOrStrokeType fillType;
</ins><span class="cx">         Color fillColor;
</span><span class="cx">         RefPtr&lt;Gradient&gt; fillGradient;
</span><span class="cx">         RefPtr&lt;Pattern&gt; fillPattern;
</span><span class="lines">@@ -82,6 +77,11 @@
</span><span class="cx">         Color shadowColor;
</span><span class="cx"> 
</span><span class="cx">         bool shadowsIgnoreTransforms;
</span><ins>+#if PLATFORM(CAIRO)
+        float globalAlpha;
+#elif PLATFORM(QT)
+        TransformationMatrix pathTransform;
+#endif
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     class GraphicsContextPrivate {
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicscairoGraphicsContextCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -390,20 +390,20 @@
</span><span class="cx">     cairo_save(cr);
</span><span class="cx"> 
</span><span class="cx">     cairo_set_fill_rule(cr, fillRule() == RULE_EVENODD ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);
</span><del>-    switch (m_common-&gt;state.fillColorSpace) {
-    case SolidColorSpace:
</del><ins>+    switch (m_common-&gt;state.fillType) {
+    case SolidColorType:
</ins><span class="cx">         setColor(cr, fillColor());
</span><span class="cx">         cairo_clip(cr);
</span><span class="cx">         cairo_paint_with_alpha(cr, m_common-&gt;state.globalAlpha);
</span><span class="cx">         break;
</span><del>-    case PatternColorSpace: {
</del><ins>+    case PatternType: {
</ins><span class="cx">         TransformationMatrix affine;
</span><span class="cx">         cairo_set_source(cr, m_common-&gt;state.fillPattern-&gt;createPlatformPattern(affine));
</span><span class="cx">         cairo_clip(cr);
</span><span class="cx">         cairo_paint_with_alpha(cr, m_common-&gt;state.globalAlpha);
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    case GradientColorSpace:
</del><ins>+    case GradientType:
</ins><span class="cx">         cairo_pattern_t* pattern = m_common-&gt;state.fillGradient-&gt;platformGradient();
</span><span class="cx">         cairo_set_source(cr, pattern);
</span><span class="cx">         cairo_clip(cr);
</span><span class="lines">@@ -420,8 +420,8 @@
</span><span class="cx"> 
</span><span class="cx">     cairo_t* cr = m_data-&gt;cr;
</span><span class="cx">     cairo_save(cr);
</span><del>-    switch (m_common-&gt;state.strokeColorSpace) {
-    case SolidColorSpace:
</del><ins>+    switch (m_common-&gt;state.strokeType) {
+    case SolidColorType:
</ins><span class="cx">         float red, green, blue, alpha;
</span><span class="cx">         strokeColor().getRGBA(red, green, blue, alpha);
</span><span class="cx">         if (m_common-&gt;state.globalAlpha &lt; 1.0f)
</span><span class="lines">@@ -429,7 +429,7 @@
</span><span class="cx">         cairo_set_source_rgba(cr, red, green, blue, alpha);
</span><span class="cx">         cairo_stroke(cr);
</span><span class="cx">         break;
</span><del>-    case PatternColorSpace: {
</del><ins>+    case PatternType: {
</ins><span class="cx">         TransformationMatrix affine;
</span><span class="cx">         cairo_set_source(cr, m_common-&gt;state.strokePattern-&gt;createPlatformPattern(affine));
</span><span class="cx">         if (m_common-&gt;state.globalAlpha &lt; 1.0f) {
</span><span class="lines">@@ -440,7 +440,7 @@
</span><span class="cx">         cairo_stroke(cr);
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    case GradientColorSpace:
</del><ins>+    case GradientType:
</ins><span class="cx">         cairo_pattern_t* pattern = m_common-&gt;state.strokeGradient-&gt;platformGradient();
</span><span class="cx">         cairo_set_source(cr, pattern);
</span><span class="cx">         if (m_common-&gt;state.globalAlpha &lt; 1.0f) {
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicscgGraphicsContextCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -430,8 +430,8 @@
</span><span class="cx"> 
</span><span class="cx"> static inline bool calculateDrawingMode(const GraphicsContextState&amp; state, CGPathDrawingMode&amp; mode)
</span><span class="cx"> {
</span><del>-    bool shouldFill = state.fillColorSpace == PatternColorSpace || state.fillColor.alpha();
-    bool shouldStroke = state.strokeColorSpace == PatternColorSpace || (state.strokeStyle != NoStroke &amp;&amp; state.strokeColor.alpha());
</del><ins>+    bool shouldFill = state.fillType == PatternType || state.fillColor.alpha();
+    bool shouldStroke = state.strokeType == PatternType || (state.strokeStyle != NoStroke &amp;&amp; state.strokeColor.alpha());
</ins><span class="cx">     bool useEOFill = state.fillRule == RULE_EVENODD;
</span><span class="cx"> 
</span><span class="cx">     if (shouldFill) {
</span><span class="lines">@@ -463,16 +463,16 @@
</span><span class="cx">     CGContextRef context = platformContext();
</span><span class="cx">     const GraphicsContextState&amp; state = m_common-&gt;state;
</span><span class="cx"> 
</span><del>-    if (state.fillColorSpace == GradientColorSpace || state.strokeColorSpace == GradientColorSpace) {
</del><ins>+    if (state.fillType == GradientType || state.strokeType == GradientType) {
</ins><span class="cx">         // We don't have any optimized way to fill &amp; stroke a path using gradients
</span><span class="cx">         fillPath();
</span><span class="cx">         strokePath();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (state.fillColorSpace == PatternColorSpace)
</del><ins>+    if (state.fillType == PatternType)
</ins><span class="cx">         applyFillPattern();
</span><del>-    if (state.strokeColorSpace == PatternColorSpace)
</del><ins>+    if (state.strokeType == PatternType)
</ins><span class="cx">         applyStrokePattern();
</span><span class="cx"> 
</span><span class="cx">     CGPathDrawingMode drawingMode;
</span><span class="lines">@@ -494,15 +494,15 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     CGContextRef context = platformContext();
</span><del>-    switch (m_common-&gt;state.fillColorSpace) {
-    case SolidColorSpace:
</del><ins>+    switch (m_common-&gt;state.fillType) {
+    case SolidColorType:
</ins><span class="cx">         fillPathWithFillRule(context, fillRule());
</span><span class="cx">         break;
</span><del>-    case PatternColorSpace:
</del><ins>+    case PatternType:
</ins><span class="cx">         applyFillPattern();
</span><span class="cx">         fillPathWithFillRule(context, fillRule());
</span><span class="cx">         break;
</span><del>-    case GradientColorSpace:
</del><ins>+    case GradientType:
</ins><span class="cx">         CGContextSaveGState(context);
</span><span class="cx">         if (fillRule() == RULE_EVENODD)
</span><span class="cx">             CGContextEOClip(context);
</span><span class="lines">@@ -521,15 +521,15 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     CGContextRef context = platformContext();
</span><del>-    switch (m_common-&gt;state.strokeColorSpace) {
-    case SolidColorSpace:
</del><ins>+    switch (m_common-&gt;state.strokeType) {
+    case SolidColorType:
</ins><span class="cx">         CGContextStrokePath(context);
</span><span class="cx">         break;
</span><del>-    case PatternColorSpace:
</del><ins>+    case PatternType:
</ins><span class="cx">         applyStrokePattern();
</span><span class="cx">         CGContextStrokePath(context);
</span><span class="cx">         break;
</span><del>-    case GradientColorSpace:
</del><ins>+    case GradientType:
</ins><span class="cx">         CGContextSaveGState(context);
</span><span class="cx">         CGContextReplacePathWithStrokedPath(context);
</span><span class="cx">         CGContextClip(context);
</span><span class="lines">@@ -545,15 +545,15 @@
</span><span class="cx">     if (paintingDisabled())
</span><span class="cx">         return;
</span><span class="cx">     CGContextRef context = platformContext();
</span><del>-    switch (m_common-&gt;state.fillColorSpace) {
-    case SolidColorSpace:
</del><ins>+    switch (m_common-&gt;state.fillType) {
+    case SolidColorType:
</ins><span class="cx">         CGContextFillRect(context, rect);
</span><span class="cx">         break;
</span><del>-    case PatternColorSpace:
</del><ins>+    case PatternType:
</ins><span class="cx">         applyFillPattern();
</span><span class="cx">         CGContextFillRect(context, rect);
</span><span class="cx">         break;
</span><del>-    case GradientColorSpace:
</del><ins>+    case GradientType:
</ins><span class="cx">         CGContextSaveGState(context);
</span><span class="cx">         CGContextClipToRect(context, rect);
</span><span class="cx">         CGContextConcatCTM(context, m_common-&gt;state.fillGradient-&gt;gradientSpaceTransform());
</span><span class="lines">@@ -779,15 +779,15 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     CGContextRef context = platformContext();
</span><del>-    switch (m_common-&gt;state.strokeColorSpace) {
-    case SolidColorSpace:
</del><ins>+    switch (m_common-&gt;state.strokeType) {
+    case SolidColorType:
</ins><span class="cx">         CGContextStrokeRectWithWidth(context, r, lineWidth);
</span><span class="cx">         break;
</span><del>-    case PatternColorSpace:
</del><ins>+    case PatternType:
</ins><span class="cx">         applyStrokePattern();
</span><span class="cx">         CGContextStrokeRectWithWidth(context, r, lineWidth);
</span><span class="cx">         break;
</span><del>-    case GradientColorSpace:
</del><ins>+    case GradientType:
</ins><span class="cx">         CGContextSaveGState(context);
</span><span class="cx">         setStrokeThickness(lineWidth);
</span><span class="cx">         CGContextAddRect(context, r);
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsqtGraphicsContextQtcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -639,20 +639,20 @@
</span><span class="cx">     QPainterPath path = m_data-&gt;currentPath;
</span><span class="cx">     path.setFillRule(toQtFillRule(fillRule()));
</span><span class="cx"> 
</span><del>-    if ((m_common-&gt;state.fillColorSpace != SolidColorSpace)
</del><ins>+    if ((m_common-&gt;state.fillType != SolidColorType)
</ins><span class="cx">             || (fillColor().alpha())) {
</span><span class="cx">         drawFilledShadowPath(this, p, &amp;path);
</span><del>-        switch (m_common-&gt;state.fillColorSpace) {
-        case SolidColorSpace:
</del><ins>+        switch (m_common-&gt;state.fillType) {
+        case SolidColorType:
</ins><span class="cx">             if (fillColor().alpha())
</span><span class="cx">                 p-&gt;fillPath(path, p-&gt;brush());
</span><span class="cx">             break;
</span><del>-        case PatternColorSpace: {
</del><ins>+        case PatternType: {
</ins><span class="cx">             TransformationMatrix affine;
</span><span class="cx">             p-&gt;fillPath(path, QBrush(m_common-&gt;state.fillPattern-&gt;createPlatformPattern(affine)));
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        case GradientColorSpace:
</del><ins>+        case GradientType:
</ins><span class="cx">             QBrush brush(*m_common-&gt;state.fillGradient-&gt;platformGradient());
</span><span class="cx">             brush.setTransform(m_common-&gt;state.fillGradient-&gt;gradientSpaceTransform());
</span><span class="cx">             p-&gt;fillPath(path, brush);
</span><span class="lines">@@ -672,7 +672,7 @@
</span><span class="cx">     QPainterPath path = m_data-&gt;currentPath;
</span><span class="cx">     path.setFillRule(toQtFillRule(fillRule()));
</span><span class="cx"> 
</span><del>-    if ((m_common-&gt;state.strokeColorSpace != SolidColorSpace)
</del><ins>+    if ((m_common-&gt;state.strokeType != SolidColorType)
</ins><span class="cx">             || (strokeColor().alpha())) {
</span><span class="cx">         IntSize shadowSize;
</span><span class="cx">         int shadowBlur;
</span><span class="lines">@@ -685,19 +685,19 @@
</span><span class="cx">             p-&gt;strokePath(path, shadowPen);
</span><span class="cx">             p-&gt;setWorldTransform(t);
</span><span class="cx">         }
</span><del>-        switch (m_common-&gt;state.strokeColorSpace) {
-        case SolidColorSpace:
</del><ins>+        switch (m_common-&gt;state.strokeType) {
+        case SolidColorType:
</ins><span class="cx">             if (strokeColor().alpha())
</span><span class="cx">                 p-&gt;strokePath(path, pen);
</span><span class="cx">             break;
</span><del>-        case PatternColorSpace: {
</del><ins>+        case PatternType: {
</ins><span class="cx">             TransformationMatrix affine;
</span><span class="cx">             pen.setBrush(QBrush(m_common-&gt;state.strokePattern-&gt;createPlatformPattern(affine)));
</span><span class="cx">             p-&gt;setPen(pen);
</span><span class="cx">             p-&gt;strokePath(path, pen);
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        case GradientColorSpace: {
</del><ins>+        case GradientType: {
</ins><span class="cx">             QBrush brush(*m_common-&gt;state.strokeGradient-&gt;platformGradient());
</span><span class="cx">             brush.setTransform(m_common-&gt;state.strokeGradient-&gt;gradientSpaceTransform());
</span><span class="cx">             pen.setBrush(brush);
</span><span class="lines">@@ -729,20 +729,20 @@
</span><span class="cx"> 
</span><span class="cx">     QPainter* p = m_data-&gt;p();
</span><span class="cx"> 
</span><del>-    if ((m_common-&gt;state.fillColorSpace != SolidColorSpace)
</del><ins>+    if ((m_common-&gt;state.fillType != SolidColorType)
</ins><span class="cx">             || (fillColor().alpha())) {
</span><span class="cx">         drawBorderlessRectShadow(this, p, rect);
</span><del>-        switch (m_common-&gt;state.fillColorSpace) {
-        case SolidColorSpace:
</del><ins>+        switch (m_common-&gt;state.fillType) {
+        case SolidColorType:
</ins><span class="cx">             if (fillColor().alpha())
</span><span class="cx">                 p-&gt;fillRect(rect, p-&gt;brush());
</span><span class="cx">             break;
</span><del>-        case PatternColorSpace: {
</del><ins>+        case PatternType: {
</ins><span class="cx">             TransformationMatrix affine;
</span><span class="cx">             p-&gt;fillRect(rect, QBrush(m_common-&gt;state.fillPattern-&gt;createPlatformPattern(affine)));
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        case GradientColorSpace:
</del><ins>+        case GradientType:
</ins><span class="cx">             QBrush brush(*m_common-&gt;state.fillGradient-&gt;platformGradient());
</span><span class="cx">             brush.setTransform(m_common-&gt;state.fillGradient-&gt;gradientSpaceTransform());
</span><span class="cx">             p-&gt;fillRect(rect, brush);
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicswinceGraphicsContextWincecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/wince/GraphicsContextWince.cpp (50613 => 50614)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/wince/GraphicsContextWince.cpp        2009-11-07 02:02:42 UTC (rev 50613)
+++ trunk/WebCore/platform/graphics/wince/GraphicsContextWince.cpp        2009-11-07 08:00:12 UTC (rev 50614)
</span><span class="lines">@@ -1355,7 +1355,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::fillPath()
</span><span class="cx"> {
</span><del>-    Color c = m_common-&gt;state.fillColorSpace == GradientColorSpace &amp;&amp; m_common-&gt;state.fillGradient
</del><ins>+    Color c = m_common-&gt;state.fillType == GradientType &amp;&amp; m_common-&gt;state.fillGradient
</ins><span class="cx">         ? gradientAverageColor(m_common-&gt;state.fillGradient.get())
</span><span class="cx">         : fillColor();
</span><span class="cx"> 
</span><span class="lines">@@ -1539,7 +1539,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::fillRect(const FloatRect&amp; rect)
</span><span class="cx"> {
</span><del>-    if (m_common-&gt;state.fillColorSpace == GradientColorSpace &amp;&amp; m_common-&gt;state.fillGradient)
</del><ins>+    if (m_common-&gt;state.fillType == GradientType &amp;&amp; m_common-&gt;state.fillGradient)
</ins><span class="cx">         fillRect(rect, m_common-&gt;state.fillGradient.get());
</span><span class="cx">     else
</span><span class="cx">         fillRect(rect, fillColor());
</span></span></pre>
</div>
</div>

</body>
</html>