LayoutTests:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2006 15:24:49 +0000 (15:24 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2006 15:24:49 +0000 (15:24 +0000)
        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10198
          REGRESSION: WebKit r15750 crashes while loading anthem.com

        * fast/overflow/generated-content-crash-expected.txt: Added.
        * fast/overflow/generated-content-crash.html: Added.

WebCore:

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10198
          REGRESSION: WebKit r15750 crashes while loading anthem.com

        Test: fast/overflow/generated-content-crash.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateScrollInfoAfterLayout): Added a null check for
        the renderer's element. Generated content does not have an element and
        therefore does not need to maintain overflow status.

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

LayoutTests/ChangeLog
LayoutTests/fast/overflow/generated-content-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/overflow/generated-content-crash.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderLayer.cpp

index 922334a52517604f006077667c2be490ab279893..98c69bdea6f24054d943844e755001906289684d 100644 (file)
@@ -1,3 +1,13 @@
+2006-08-03  Jonathan Johnsson  <jonathanjohnsson@gmail.com>
+
+        Reviewed by Darin.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10198
+          REGRESSION: WebKit r15750 crashes while loading anthem.com
+
+        * fast/overflow/generated-content-crash-expected.txt: Added.
+        * fast/overflow/generated-content-crash.html: Added.
+
 2006-08-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
 
         Reviewed by Anders.
diff --git a/LayoutTests/fast/overflow/generated-content-crash-expected.txt b/LayoutTests/fast/overflow/generated-content-crash-expected.txt
new file mode 100644 (file)
index 0000000..0941cc0
--- /dev/null
@@ -0,0 +1,5 @@
+Test case for http://bugzilla.opendarwin.org/show_bug.cgi?id=10198 REGRESSION: WebKit r15750 crashes while loading anthem.com.
+
+No crash means test PASS.
+
+
diff --git a/LayoutTests/fast/overflow/generated-content-crash.html b/LayoutTests/fast/overflow/generated-content-crash.html
new file mode 100644 (file)
index 0000000..54fd6ed
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+       <head>
+    <title>Reduction of bug 10198
+       </title>
+       <style type="text/css">
+
+.clearFix:after {
+    content: "."; 
+    display: block; 
+    overflow: hidden;
+}
+
+       </style>
+       <script type="text/javascript">
+          if (window.layoutTestController)
+              layoutTestController.dumpAsText();
+       </script>
+       </head>
+       <body>
+          <p>
+              Test case for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=10198">http://bugzilla.opendarwin.org/show_bug.cgi?id=10198</a>
+              REGRESSION: WebKit r15750 crashes while loading anthem.com</i>.
+          </p>
+          <p>
+              No crash means test PASS.
+          </p>
+               <div class="clearFix">
+       </body>
+</html>
index 6178ce9a8e9328d092949dc1a32364e9d9ea598c..40a54d05363de487a29cad0dfae87199c398a6ff 100644 (file)
@@ -1,3 +1,17 @@
+2006-08-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by Darin.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10198
+          REGRESSION: WebKit r15750 crashes while loading anthem.com
+
+        Test: fast/overflow/generated-content-crash.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::updateScrollInfoAfterLayout): Added a null check for
+        the renderer's element. Generated content does not have an element and
+        therefore does not need to maintain overflow status.
+
 2006-08-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
 
         Reviewed by Anders.
index dbcd284699111128f746f83c505440195412a691..98ff87bd30aaa45ca76a5e0d005fa54a180f6046 100644 (file)
@@ -1181,7 +1181,7 @@ RenderLayer::updateScrollInfoAfterLayout()
                                    m_object->height() - m_object->borderTop() - m_object->borderBottom()));
     }
  
-    if (m_object->element()->document()->hasListenerType(Document::OVERFLOWCHANGED_LISTENER))
+    if (m_object->element() && m_object->document()->hasListenerType(Document::OVERFLOWCHANGED_LISTENER))
         updateOverflowStatus(horizontalOverflow, verticalOverflow);
 }