Reviewed by Eric.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2006 08:14:30 +0000 (08:14 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2006 08:14:30 +0000 (08:14 +0000)
        - fix crasher on one of the layout tests caused by my recent checkin

        * kcanvas/RenderSVGText.cpp:
        (WebCore::RenderSVGText::paint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14921 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/kcanvas/RenderSVGText.cpp

index 2017d5a6a8489e0d5be6cca8575fdb2264bd6046..53d7fc3985988bb2810afbf8dc296e2eedb34f78 100644 (file)
@@ -1,3 +1,12 @@
+2006-06-20  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Eric.
+
+        - fix crasher on one of the layout tests caused by my recent checkin
+
+        * kcanvas/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::paint):
+
 2006-06-19  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Darin.
index 369f21ea38d6be2f3ffbd0d328cbb4f356dc4abb..c8713d02277ba44715e41fff2e0e5ab0c6596112 100644 (file)
@@ -91,15 +91,15 @@ void RenderSVGText::paint(PaintInfo& paintInfo, int parentX, int parentY)
     if (filter)
         filter->prepareFilter(boundingBox);
         
-    float opacity = style()->opacity();
-    if (opacity < 1.0f)
-        paintInfo.p->beginTransparencyLayer(opacity);
-
     OwnPtr<GraphicsContext> c(device->currentContext()->createGraphicsContext());
     PaintInfo pi = paintInfo;
     pi.p = c.get();
     pi.r = (translationTopToBaseline() * translationForAttributes() * absoluteTransform()).invert().mapRect(paintInfo.r);
 
+    float opacity = style()->opacity();
+    if (opacity < 1.0f)
+        c->beginTransparencyLayer(opacity);
+
     KRenderingPaintServer *fillPaintServer = KSVGPainterFactory::fillPaintServer(style(), this);
     if (fillPaintServer) {
         fillPaintServer->setPaintingText(true);
@@ -126,7 +126,7 @@ void RenderSVGText::paint(PaintInfo& paintInfo, int parentX, int parentY)
         filter->applyFilter(boundingBox);
 
     if (opacity < 1.0f)
-        paintInfo.p->endTransparencyLayer();
+        c->endTransparencyLayer();
 
     // restore drawing state
     if (!shouldPopContext)