2011-04-19 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 07:39:36 +0000 (07:39 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 07:39:36 +0000 (07:39 +0000)
        Reviewed by Antti Koivisto.

        Reproducible crash two-finger zooming at multiple sites in WebCore::RenderLayer::isTransparent
        https://bugs.webkit.org/show_bug.cgi?id=58868

        I could not figure out how to make a test.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer): Check for existence of a
        parent before calling a method on it.

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp

index 92ccf724328cf01e9422c904b6641a5199697740..e5e3d34c8d6f2405fca8ce2162fbf8f163d0023a 100644 (file)
@@ -1,3 +1,16 @@
+2011-04-19  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Antti Koivisto.
+
+        Reproducible crash two-finger zooming at multiple sites in WebCore::RenderLayer::isTransparent
+        https://bugs.webkit.org/show_bug.cgi?id=58868
+
+        I could not figure out how to make a test.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayer): Check for existence of a
+        parent before calling a method on it.
+
 2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Reviewed by Daniel Bates.
 2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Reviewed by Daniel Bates.
index fa6c36cd399f848655154d44a85ce453fe54638e..3e6afaa0c33b7bb7b81d3ac5f5d36ba1e3cdeeb9 100644 (file)
@@ -2514,10 +2514,14 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
             return;
 
         // If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency
             return;
 
         // If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency
-        // layer from the parent now.
-        if (paintFlags & PaintLayerHaveTransparency)
-            parent()->beginTransparencyLayers(p, rootLayer, paintBehavior);
-  
+        // layer from the parent now, assuming there is a parent
+        if (paintFlags & PaintLayerHaveTransparency) {
+            if (parent())
+                parent()->beginTransparencyLayers(p, rootLayer, paintBehavior);
+            else
+                beginTransparencyLayers(p, rootLayer, paintBehavior);
+        }
+
         // Make sure the parent's clip rects have been calculated.
         IntRect clipRect = paintDirtyRect;
         if (parent()) {
         // Make sure the parent's clip rects have been calculated.
         IntRect clipRect = paintDirtyRect;
         if (parent()) {