<!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>[173502] trunk/Source/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/173502">173502</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2014-09-10 17:50:09 -0700 (Wed, 10 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Delete class SavedDrawingStateForMask
https://bugs.webkit.org/show_bug.cgi?id=136498

Patch by Myles C. Maxfield &lt;mmaxfield@apple.com&gt; &lt;litherum@gmail.com&gt; on 2014-09-09
Reviewed by Darin Adler.

This class is left over from when text-decoration-skip: ink used
GraphicsContext masking.

No new tests because there is no behavior change.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::applyShadowToGraphicsContext):
* rendering/InlineTextBox.h:
* rendering/TextPainter.cpp:
(WebCore::TextPainter::TextPainter):
(WebCore::paintTextWithShadows):
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:
(WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask): Deleted.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintTextWithShadows):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxh">trunk/Source/WebCore/rendering/InlineTextBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingTextPaintercpp">trunk/Source/WebCore/rendering/TextPainter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingTextPainterh">trunk/Source/WebCore/rendering/TextPainter.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp">trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173501 => 173502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-11 00:47:26 UTC (rev 173501)
+++ trunk/Source/WebCore/ChangeLog        2014-09-11 00:50:09 UTC (rev 173502)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2014-09-09  Myles C. Maxfield &lt;mmaxfield@apple.com&gt;  &lt;litherum@gmail.com&gt;
+
+        Delete class SavedDrawingStateForMask
+        https://bugs.webkit.org/show_bug.cgi?id=136498
+
+        Reviewed by Darin Adler.
+
+        This class is left over from when text-decoration-skip: ink used
+        GraphicsContext masking.
+
+        No new tests because there is no behavior change.
+
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::applyShadowToGraphicsContext):
+        * rendering/InlineTextBox.h:
+        * rendering/TextPainter.cpp:
+        (WebCore::TextPainter::TextPainter):
+        (WebCore::paintTextWithShadows):
+        (WebCore::TextPainter::paintText):
+        * rendering/TextPainter.h:
+        (WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask): Deleted.
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::paintTextWithShadows):
+
</ins><span class="cx"> 2014-09-10  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Call setCollectsTimingData only once, and before making any {CF,NS}URLConnections
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (173501 => 173502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-09-11 00:47:26 UTC (rev 173501)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-09-11 00:50:09 UTC (rev 173502)
</span><span class="lines">@@ -424,7 +424,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context, const ShadowData* shadow, const FloatRect&amp; textRect, bool stroked, bool opaque, bool horizontal, bool&amp; didSaveContext)
</del><ins>+FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext&amp; context, const ShadowData* shadow, const FloatRect&amp; textRect, bool stroked, bool opaque, bool horizontal, bool&amp; didSaveContext)
</ins><span class="cx"> {
</span><span class="cx">     if (!shadow)
</span><span class="cx">         return FloatSize();
</span><span class="lines">@@ -440,15 +440,15 @@
</span><span class="cx">         FloatRect shadowRect(textRect);
</span><span class="cx">         shadowRect.inflate(shadow-&gt;paintingExtent());
</span><span class="cx">         shadowRect.move(shadowOffset);
</span><del>-        context-&gt;save();
-        context-&gt;clip(shadowRect);
</del><ins>+        context.save();
+        context.clip(shadowRect);
</ins><span class="cx"> 
</span><span class="cx">         extraOffset = FloatSize(0, 2 * textRect.height() + std::max(0.0f, shadowOffset.height()) + shadowRadius);
</span><span class="cx">         shadowOffset -= extraOffset;
</span><span class="cx">         didSaveContext = true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    context-&gt;setShadow(shadowOffset, shadowRadius, shadowColor, context-&gt;fillColorSpace());
</del><ins>+    context.setShadow(shadowOffset, shadowRadius, shadowColor, context.fillColorSpace());
</ins><span class="cx">     return extraOffset;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (173501 => 173502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.h        2014-09-11 00:47:26 UTC (rev 173501)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h        2014-09-11 00:50:09 UTC (rev 173502)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">     virtual float positionForOffset(int offset) const;
</span><span class="cx"> 
</span><span class="cx">     // Needs to be public, so the static paintTextWithShadows() function can use it.
</span><del>-    static FloatSize applyShadowToGraphicsContext(GraphicsContext*, const ShadowData*, const FloatRect&amp; textRect, bool stroked, bool opaque, bool horizontal, bool&amp; didSaveContext);
</del><ins>+    static FloatSize applyShadowToGraphicsContext(GraphicsContext&amp;, const ShadowData*, const FloatRect&amp; textRect, bool stroked, bool opaque, bool horizontal, bool&amp; didSaveContext);
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     void paintCompositionBackground(GraphicsContext*, const FloatPoint&amp; boxOrigin, const RenderStyle&amp;, const Font&amp;, int startPos, int endPos);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextPaintercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextPainter.cpp (173501 => 173502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextPainter.cpp        2014-09-11 00:47:26 UTC (rev 173501)
+++ trunk/Source/WebCore/rendering/TextPainter.cpp        2014-09-11 00:50:09 UTC (rev 173502)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include &quot;InlineTextBox.h&quot;
</span><span class="cx"> #include &quot;RenderCombineText.h&quot;
</span><span class="cx"> #include &quot;TextPaintStyle.h&quot;
</span><ins>+#include &lt;wtf/NeverDestroyed.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -34,20 +35,24 @@
</span><span class="cx">     int startPositionInTextRun, int endPositionInTextBoxString, int length, const AtomicString&amp; emphasisMark, RenderCombineText* combinedText, TextRun&amp; textRun,
</span><span class="cx">     FloatRect&amp; boxRect, FloatPoint&amp; textOrigin, int emphasisMarkOffset, const ShadowData* textShadow, const ShadowData* selectionShadow,
</span><span class="cx">     bool textBoxIsHorizontal, TextPaintStyle&amp; textPaintStyle, TextPaintStyle&amp; selectionPaintStyle)
</span><del>-    : m_paintSelectedTextOnly(paintSelectedTextOnly)
-    , m_paintSelectedTextSeparately(paintSelectedTextSeparately)
-    , m_font(font)
-    , m_startPositionInTextRun(startPositionInTextRun)
-    , m_endPositionInTextRun(endPositionInTextBoxString)
-    , m_length(length)
-    , m_emphasisMark(emphasisMark)
-    , m_combinedText(combinedText)
-    , m_textRun(textRun)
-    , m_boxRect(boxRect)
-    , m_textOrigin(textOrigin)
-    , m_emphasisMarkOffset(emphasisMarkOffset)
-    , m_textBoxIsHorizontal(textBoxIsHorizontal)
-    , m_savedDrawingStateForMask(&amp;context, &amp;textPaintStyle, &amp;selectionPaintStyle, textShadow, selectionShadow)
</del><ins>+        : m_context(context)
+        , m_textPaintStyle(textPaintStyle)
+        , m_selectionPaintStyle(selectionPaintStyle)
+        , m_textShadow(textShadow)
+        , m_selectionShadow(selectionShadow)
+        , m_paintSelectedTextOnly(paintSelectedTextOnly)
+        , m_paintSelectedTextSeparately(paintSelectedTextSeparately)
+        , m_font(font)
+        , m_startPositionInTextRun(startPositionInTextRun)
+        , m_endPositionInTextRun(endPositionInTextBoxString)
+        , m_length(length)
+        , m_emphasisMark(emphasisMark)
+        , m_combinedText(combinedText)
+        , m_textRun(textRun)
+        , m_boxRect(boxRect)
+        , m_textOrigin(textOrigin)
+        , m_emphasisMarkOffset(emphasisMarkOffset)
+        , m_textBoxIsHorizontal(textBoxIsHorizontal)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -67,15 +72,15 @@
</span><span class="cx">     return shadow-&gt;location() == IntPoint() &amp;&amp; !shadow-&gt;radius();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void paintTextWithShadows(GraphicsContext* context, const Font&amp; font, const TextRun&amp; textRun, const AtomicString&amp; emphasisMark,
</del><ins>+static void paintTextWithShadows(GraphicsContext&amp; context, const Font&amp; font, const TextRun&amp; textRun, const AtomicString&amp; emphasisMark,
</ins><span class="cx">     int emphasisMarkOffset, int startOffset, int endOffset, int truncationPoint, const FloatPoint&amp; textOrigin, const FloatRect&amp; boxRect,
</span><span class="cx">     const ShadowData* shadow, bool stroked, bool horizontal)
</span><span class="cx"> {
</span><del>-    Color fillColor = context-&gt;fillColor();
-    ColorSpace fillColorSpace = context-&gt;fillColorSpace();
</del><ins>+    Color fillColor = context.fillColor();
+    ColorSpace fillColorSpace = context.fillColorSpace();
</ins><span class="cx">     bool opaque = !fillColor.hasAlpha();
</span><span class="cx">     if (!opaque)
</span><del>-        context-&gt;setFillColor(Color::black, fillColorSpace);
</del><ins>+        context.setFillColor(Color::black, fillColorSpace);
</ins><span class="cx"> 
</span><span class="cx">     do {
</span><span class="cx">         if (isEmptyShadow(shadow)) {
</span><span class="lines">@@ -88,24 +93,24 @@
</span><span class="cx">         if (shadow)
</span><span class="cx">             extraOffset = roundedIntSize(InlineTextBox::applyShadowToGraphicsContext(context, shadow, boxRect, stroked, opaque, horizontal, didSaveContext));
</span><span class="cx">         else if (!opaque)
</span><del>-            context-&gt;setFillColor(fillColor, fillColorSpace);
</del><ins>+            context.setFillColor(fillColor, fillColorSpace);
</ins><span class="cx"> 
</span><span class="cx">         if (startOffset &lt;= endOffset)
</span><del>-            drawTextOrEmphasisMarks(*context, font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + extraOffset, startOffset, endOffset);
</del><ins>+            drawTextOrEmphasisMarks(context, font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + extraOffset, startOffset, endOffset);
</ins><span class="cx">         else {
</span><span class="cx">             if (endOffset &gt; 0)
</span><del>-                drawTextOrEmphasisMarks(*context, font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + extraOffset, 0, endOffset);
</del><ins>+                drawTextOrEmphasisMarks(context, font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + extraOffset, 0, endOffset);
</ins><span class="cx">             if (startOffset &lt; truncationPoint)
</span><del>-                drawTextOrEmphasisMarks(*context, font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + extraOffset, startOffset, truncationPoint);
</del><ins>+                drawTextOrEmphasisMarks(context, font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + extraOffset, startOffset, truncationPoint);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (!shadow)
</span><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         if (didSaveContext)
</span><del>-            context-&gt;restore();
</del><ins>+            context.restore();
</ins><span class="cx">         else
</span><del>-            context-&gt;clearShadow();
</del><ins>+            context.clearShadow();
</ins><span class="cx"> 
</span><span class="cx">         shadow = shadow-&gt;next();
</span><span class="cx">     } while (shadow || stroked || !opaque);
</span><span class="lines">@@ -113,62 +118,59 @@
</span><span class="cx"> 
</span><span class="cx"> void TextPainter::paintText()
</span><span class="cx"> {
</span><del>-    ASSERT(m_savedDrawingStateForMask.m_textPaintStyle);
-    ASSERT(m_savedDrawingStateForMask.m_selectionPaintStyle);
-    
</del><span class="cx">     FloatPoint boxOrigin = m_boxRect.location();
</span><span class="cx"> 
</span><span class="cx">     if (!m_paintSelectedTextOnly) {
</span><span class="cx">         // For stroked painting, we have to change the text drawing mode. It's probably dangerous to leave that mutated as a side
</span><span class="cx">         // effect, so only when we know we're stroking, do a save/restore.
</span><del>-        GraphicsContextStateSaver stateSaver(*m_savedDrawingStateForMask.m_context, m_savedDrawingStateForMask.m_textPaintStyle-&gt;strokeWidth &gt; 0);
</del><ins>+        GraphicsContextStateSaver stateSaver(m_context, m_textPaintStyle.strokeWidth &gt; 0);
</ins><span class="cx"> 
</span><del>-        updateGraphicsContext(*m_savedDrawingStateForMask.m_context, *m_savedDrawingStateForMask.m_textPaintStyle);
</del><ins>+        updateGraphicsContext(m_context, m_textPaintStyle);
</ins><span class="cx">         if (!m_paintSelectedTextSeparately || m_endPositionInTextRun &lt;= m_startPositionInTextRun) {
</span><span class="cx">             // FIXME: Truncate right-to-left text correctly.
</span><del>-            paintTextWithShadows(m_savedDrawingStateForMask.m_context, m_font, m_textRun, nullAtom, 0, 0, m_length, m_length, m_textOrigin, m_boxRect, m_savedDrawingStateForMask.m_textShadow, m_savedDrawingStateForMask.m_textPaintStyle-&gt;strokeWidth &gt; 0, m_textBoxIsHorizontal);
</del><ins>+            paintTextWithShadows(m_context, m_font, m_textRun, nullAtom, 0, 0, m_length, m_length, m_textOrigin, m_boxRect, m_textShadow, m_textPaintStyle.strokeWidth &gt; 0, m_textBoxIsHorizontal);
</ins><span class="cx">         } else
</span><del>-            paintTextWithShadows(m_savedDrawingStateForMask.m_context, m_font, m_textRun, nullAtom, 0, m_endPositionInTextRun, m_startPositionInTextRun, m_length, m_textOrigin, m_boxRect, m_savedDrawingStateForMask.m_textShadow, m_savedDrawingStateForMask.m_textPaintStyle-&gt;strokeWidth &gt; 0, m_textBoxIsHorizontal);
</del><ins>+            paintTextWithShadows(m_context, m_font, m_textRun, nullAtom, 0, m_endPositionInTextRun, m_startPositionInTextRun, m_length, m_textOrigin, m_boxRect, m_textShadow, m_textPaintStyle.strokeWidth &gt; 0, m_textBoxIsHorizontal);
</ins><span class="cx"> 
</span><span class="cx">         if (!m_emphasisMark.isEmpty()) {
</span><del>-            updateGraphicsContext(*m_savedDrawingStateForMask.m_context, *m_savedDrawingStateForMask.m_textPaintStyle, UseEmphasisMarkColor);
</del><ins>+            updateGraphicsContext(m_context, m_textPaintStyle, UseEmphasisMarkColor);
</ins><span class="cx"> 
</span><del>-            DEPRECATED_DEFINE_STATIC_LOCAL(TextRun, objectReplacementCharacterTextRun, (&amp;objectReplacementCharacter, 1));
-            TextRun&amp; emphasisMarkTextRun = m_combinedText ? objectReplacementCharacterTextRun : m_textRun;
</del><ins>+            static NeverDestroyed&lt;TextRun&gt; objectReplacementCharacterTextRun(&amp;objectReplacementCharacter, 1);
+            TextRun&amp; emphasisMarkTextRun = m_combinedText ? objectReplacementCharacterTextRun.get() : m_textRun;
</ins><span class="cx">             FloatPoint emphasisMarkTextOrigin = m_combinedText ? FloatPoint(boxOrigin.x() + m_boxRect.width() / 2, boxOrigin.y() + m_font.fontMetrics().ascent()) : m_textOrigin;
</span><span class="cx">             if (m_combinedText)
</span><del>-                m_savedDrawingStateForMask.m_context-&gt;concatCTM(rotation(m_boxRect, Clockwise));
</del><ins>+                m_context.concatCTM(rotation(m_boxRect, Clockwise));
</ins><span class="cx"> 
</span><span class="cx">             if (!m_paintSelectedTextSeparately || m_endPositionInTextRun &lt;= m_startPositionInTextRun) {
</span><span class="cx">                 // FIXME: Truncate right-to-left text correctly.
</span><del>-                paintTextWithShadows(m_savedDrawingStateForMask.m_context, m_combinedText ? m_combinedText-&gt;originalFont() : m_font, emphasisMarkTextRun, m_emphasisMark, m_emphasisMarkOffset, 0, m_length, m_length, emphasisMarkTextOrigin, m_boxRect, m_savedDrawingStateForMask.m_textShadow, m_savedDrawingStateForMask.m_textPaintStyle-&gt;strokeWidth &gt; 0, m_textBoxIsHorizontal);
</del><ins>+                paintTextWithShadows(m_context, m_combinedText ? m_combinedText-&gt;originalFont() : m_font, emphasisMarkTextRun, m_emphasisMark, m_emphasisMarkOffset, 0, m_length, m_length, emphasisMarkTextOrigin, m_boxRect, m_textShadow, m_textPaintStyle.strokeWidth &gt; 0, m_textBoxIsHorizontal);
</ins><span class="cx">             } else
</span><del>-                paintTextWithShadows(m_savedDrawingStateForMask.m_context, m_combinedText ? m_combinedText-&gt;originalFont() : m_font, emphasisMarkTextRun, m_emphasisMark, m_emphasisMarkOffset, m_endPositionInTextRun, m_startPositionInTextRun, m_length, emphasisMarkTextOrigin, m_boxRect, m_savedDrawingStateForMask.m_textShadow, m_savedDrawingStateForMask.m_textPaintStyle-&gt;strokeWidth &gt; 0, m_textBoxIsHorizontal);
</del><ins>+                paintTextWithShadows(m_context, m_combinedText ? m_combinedText-&gt;originalFont() : m_font, emphasisMarkTextRun, m_emphasisMark, m_emphasisMarkOffset, m_endPositionInTextRun, m_startPositionInTextRun, m_length, emphasisMarkTextOrigin, m_boxRect, m_textShadow, m_textPaintStyle.strokeWidth &gt; 0, m_textBoxIsHorizontal);
</ins><span class="cx"> 
</span><span class="cx">             if (m_combinedText)
</span><del>-                m_savedDrawingStateForMask.m_context-&gt;concatCTM(rotation(m_boxRect, Counterclockwise));
</del><ins>+                m_context.concatCTM(rotation(m_boxRect, Counterclockwise));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ((m_paintSelectedTextOnly || m_paintSelectedTextSeparately) &amp;&amp; m_startPositionInTextRun &lt; m_endPositionInTextRun) {
</span><span class="cx">         // paint only the text that is selected
</span><del>-        GraphicsContextStateSaver stateSaver(*m_savedDrawingStateForMask.m_context, m_savedDrawingStateForMask.m_selectionPaintStyle-&gt;strokeWidth &gt; 0);
</del><ins>+        GraphicsContextStateSaver stateSaver(m_context, m_selectionPaintStyle.strokeWidth &gt; 0);
</ins><span class="cx"> 
</span><del>-        updateGraphicsContext(*m_savedDrawingStateForMask.m_context, *m_savedDrawingStateForMask.m_selectionPaintStyle);
-        paintTextWithShadows(m_savedDrawingStateForMask.m_context, m_font, m_textRun, nullAtom, 0, m_startPositionInTextRun, m_endPositionInTextRun, m_length, m_textOrigin, m_boxRect, m_savedDrawingStateForMask.m_selectionShadow, m_savedDrawingStateForMask.m_selectionPaintStyle-&gt;strokeWidth &gt; 0, m_textBoxIsHorizontal);
</del><ins>+        updateGraphicsContext(m_context, m_selectionPaintStyle);
+        paintTextWithShadows(m_context, m_font, m_textRun, nullAtom, 0, m_startPositionInTextRun, m_endPositionInTextRun, m_length, m_textOrigin, m_boxRect, m_selectionShadow, m_selectionPaintStyle.strokeWidth &gt; 0, m_textBoxIsHorizontal);
</ins><span class="cx">         if (!m_emphasisMark.isEmpty()) {
</span><del>-            updateGraphicsContext(*m_savedDrawingStateForMask.m_context, *m_savedDrawingStateForMask.m_selectionPaintStyle, UseEmphasisMarkColor);
</del><ins>+            updateGraphicsContext(m_context, m_selectionPaintStyle, UseEmphasisMarkColor);
</ins><span class="cx"> 
</span><span class="cx">             DEPRECATED_DEFINE_STATIC_LOCAL(TextRun, objectReplacementCharacterTextRun, (&amp;objectReplacementCharacter, 1));
</span><span class="cx">             TextRun&amp; emphasisMarkTextRun = m_combinedText ? objectReplacementCharacterTextRun : m_textRun;
</span><span class="cx">             FloatPoint emphasisMarkTextOrigin = m_combinedText ? FloatPoint(boxOrigin.x() + m_boxRect.width() / 2, boxOrigin.y() + m_font.fontMetrics().ascent()) : m_textOrigin;
</span><span class="cx">             if (m_combinedText)
</span><del>-                m_savedDrawingStateForMask.m_context-&gt;concatCTM(rotation(m_boxRect, Clockwise));
</del><ins>+                m_context.concatCTM(rotation(m_boxRect, Clockwise));
</ins><span class="cx"> 
</span><del>-            paintTextWithShadows(m_savedDrawingStateForMask.m_context, m_combinedText ? m_combinedText-&gt;originalFont() : m_font, emphasisMarkTextRun, m_emphasisMark, m_emphasisMarkOffset, m_startPositionInTextRun, m_endPositionInTextRun, m_length, emphasisMarkTextOrigin, m_boxRect, m_savedDrawingStateForMask.m_selectionShadow, m_savedDrawingStateForMask.m_selectionPaintStyle-&gt;strokeWidth &gt; 0, m_textBoxIsHorizontal);
</del><ins>+            paintTextWithShadows(m_context, m_combinedText ? m_combinedText-&gt;originalFont() : m_font, emphasisMarkTextRun, m_emphasisMark, m_emphasisMarkOffset, m_startPositionInTextRun, m_endPositionInTextRun, m_length, emphasisMarkTextOrigin, m_boxRect, m_selectionShadow, m_selectionPaintStyle.strokeWidth &gt; 0, m_textBoxIsHorizontal);
</ins><span class="cx"> 
</span><span class="cx">             if (m_combinedText)
</span><del>-                m_savedDrawingStateForMask.m_context-&gt;concatCTM(rotation(m_boxRect, Counterclockwise));
</del><ins>+                m_context.concatCTM(rotation(m_boxRect, Counterclockwise));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextPainterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextPainter.h (173501 => 173502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextPainter.h        2014-09-11 00:47:26 UTC (rev 173501)
+++ trunk/Source/WebCore/rendering/TextPainter.h        2014-09-11 00:50:09 UTC (rev 173502)
</span><span class="lines">@@ -41,23 +41,6 @@
</span><span class="cx">         : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x() + boxRect.maxY());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-struct SavedDrawingStateForMask {
-    SavedDrawingStateForMask(GraphicsContext* context, TextPaintStyle* textPaintStyle, TextPaintStyle* selectionPaintStyle,
-    const ShadowData* textShadow, const ShadowData* selectionShadow)
-        : m_context(context)
-        , m_textPaintStyle(textPaintStyle)
-        , m_selectionPaintStyle(selectionPaintStyle)
-        , m_textShadow(textShadow)
-        , m_selectionShadow(selectionShadow)
-    {
-    }
-    GraphicsContext* m_context;
-    TextPaintStyle* m_textPaintStyle;
-    TextPaintStyle* m_selectionPaintStyle;
-    const ShadowData* m_textShadow;
-    const ShadowData* m_selectionShadow;
-};
-
</del><span class="cx"> class TextPainter {
</span><span class="cx"> public:
</span><span class="cx">     TextPainter(GraphicsContext&amp;, bool paintSelectedTextOnly, bool paintSelectedTextSeparately, const Font&amp;,
</span><span class="lines">@@ -70,6 +53,11 @@
</span><span class="cx">     DashArray dashesForIntersectionsWithRect(const FloatRect&amp; lineExtents);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    GraphicsContext&amp; m_context;
+    TextPaintStyle&amp; m_textPaintStyle;
+    TextPaintStyle&amp; m_selectionPaintStyle;
+    const ShadowData* m_textShadow;
+    const ShadowData* m_selectionShadow;
</ins><span class="cx">     bool m_paintSelectedTextOnly;
</span><span class="cx">     bool m_paintSelectedTextSeparately;
</span><span class="cx">     const Font&amp; m_font;
</span><span class="lines">@@ -83,7 +71,6 @@
</span><span class="cx">     FloatPoint m_textOrigin;
</span><span class="cx">     int m_emphasisMarkOffset;
</span><span class="cx">     bool m_textBoxIsHorizontal;
</span><del>-    SavedDrawingStateForMask m_savedDrawingStateForMask;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (173501 => 173502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2014-09-11 00:47:26 UTC (rev 173501)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2014-09-11 00:50:09 UTC (rev 173502)
</span><span class="lines">@@ -597,7 +597,7 @@
</span><span class="cx">         FloatSize extraOffset;
</span><span class="cx">         bool didSaveContext = false;
</span><span class="cx">         if (shadow)
</span><del>-            extraOffset = applyShadowToGraphicsContext(context, shadow, shadowRect, false /* stroked */, true /* opaque */, true /* horizontal */, didSaveContext);
</del><ins>+            extraOffset = applyShadowToGraphicsContext(*context, shadow, shadowRect, false /* stroked */, true /* opaque */, true /* horizontal */, didSaveContext);
</ins><span class="cx"> 
</span><span class="cx">         context-&gt;save();
</span><span class="cx">         context-&gt;scale(FloatSize(1 / scalingFactor, 1 / scalingFactor));
</span></span></pre>
</div>
</div>

</body>
</html>