Fix crash. Null check layer. Bug 13984.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2007 05:25:17 +0000 (05:25 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2007 05:25:17 +0000 (05:25 +0000)
        Reviewed by andersca

        * WebCore.xcodeproj/project.pbxproj:
        * page/FrameView.cpp:
        (WebCore::FrameView::windowClipRectForLayer):

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

WebCore/ChangeLog
WebCore/page/FrameView.cpp

index 23e287c28e855a111a349d3e9e89a3f47d6f5ca1..88e7f9b61f1629fa9a9f1ad918a94c5a6efbf594 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-07  David Hyatt  <hyatt@apple.com>
+
+        Fix crash.  Null check layer.  Bug 13984.
+
+        Reviewed by andersca
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::windowClipRectForLayer):
+
 2007-06-07  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Justin.
index 2ca008a495f276cd8ca15d8b2f447bcc9f486a76..8817e456b4260edd2e3957809a64a21d572b63b7 100644 (file)
@@ -873,6 +873,10 @@ IntRect FrameView::windowClipRect(bool clipToContents) const
 
 IntRect FrameView::windowClipRectForLayer(const RenderLayer* layer, bool clipToLayerContents) const
 {
+    // If we have no layer, just return our window clip rect.
+    if (!layer)
+        return windowClipRect();
+
     // Apply the clip from the layer.
     IntRect clipRect;
     if (clipToLayerContents)