Title: [163286] trunk/Source/WebCore
- Revision
- 163286
- Author
- da...@apple.com
- Date
- 2014-02-02 22:18:12 -0800 (Sun, 02 Feb 2014)
Log Message
Fix context save/restore mistake spotted in SVGInlineTextBox::paintTextWithShadows
https://bugs.webkit.org/show_bug.cgi?id=128095
Reviewed by Andreas Kling.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintTextWithShadows): Move calls to GraphicsContext::restore
and GraphicsContext::clearShadow before restoreGraphicsContextAfterTextPainting, since that
function can swap contexts.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (163285 => 163286)
--- trunk/Source/WebCore/ChangeLog 2014-02-03 05:04:57 UTC (rev 163285)
+++ trunk/Source/WebCore/ChangeLog 2014-02-03 06:18:12 UTC (rev 163286)
@@ -1,3 +1,15 @@
+2014-02-02 Darin Adler <da...@apple.com>
+
+ Fix context save/restore mistake spotted in SVGInlineTextBox::paintTextWithShadows
+ https://bugs.webkit.org/show_bug.cgi?id=128095
+
+ Reviewed by Andreas Kling.
+
+ * rendering/svg/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paintTextWithShadows): Move calls to GraphicsContext::restore
+ and GraphicsContext::clearShadow before restoreGraphicsContextAfterTextPainting, since that
+ function can swap contexts.
+
2014-02-02 Andreas Kling <akl...@apple.com>
Modernize RenderSVGText::locateRenderSVGTextAncestor().
Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (163285 => 163286)
--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2014-02-03 05:04:57 UTC (rev 163285)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2014-02-03 06:18:12 UTC (rev 163286)
@@ -581,16 +581,18 @@
context->restore();
+ if (shadow) {
+ if (shadow->next())
+ context->restore();
+ else
+ context->clearShadow();
+ }
+
restoreGraphicsContextAfterTextPainting(context, textRun);
if (!shadow)
break;
- if (shadow->next())
- context->restore();
- else
- context->clearShadow();
-
shadow = shadow->next();
} while (shadow);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes