Title: [87480] trunk
Revision
87480
Author
morr...@google.com
Date
2011-05-27 00:26:34 -0700 (Fri, 27 May 2011)

Log Message

2011-05-26  MORITA Hajime <morr...@google.com>

        Reviewed by Kent Tamura.

        WebCore::HTMLSummaryElement::isMainSummary crashes
        https://bugs.webkit.org/show_bug.cgi?id=61511

        * fast/html/details-summary-document-child-expected.txt: Added.
        * fast/html/details-summary-document-child.html: Added.
2011-05-26  MORITA Hajime  <morr...@google.com>

        Reviewed by Kent Tamura.

        WebCore::HTMLSummaryElement::isMainSummary ReadAV@NULL
        https://bugs.webkit.org/show_bug.cgi?id=61511

        Removed Unnecessary wrong cast to Elmement, which can be non-Element.

        Test: fast/html/details-summary-document-child.html

        * html/HTMLSummaryElement.cpp:
        (WebCore::HTMLSummaryElement::detailsElement):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (87479 => 87480)


--- trunk/LayoutTests/ChangeLog	2011-05-27 06:54:19 UTC (rev 87479)
+++ trunk/LayoutTests/ChangeLog	2011-05-27 07:26:34 UTC (rev 87480)
@@ -1,3 +1,13 @@
+2011-05-26  MORITA Hajime <morr...@google.com>
+
+        Reviewed by Kent Tamura.
+
+        WebCore::HTMLSummaryElement::isMainSummary crashes
+        https://bugs.webkit.org/show_bug.cgi?id=61511
+
+        * fast/html/details-summary-document-child-expected.txt: Added.
+        * fast/html/details-summary-document-child.html: Added.
+
 2011-05-26  Ryosuke Niwa  <rn...@webkit.org>
 
         Reviewed by Adam Barth.

Added: trunk/LayoutTests/fast/html/details-summary-document-child-expected.txt (0 => 87480)


--- trunk/LayoutTests/fast/html/details-summary-document-child-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/html/details-summary-document-child-expected.txt	2011-05-27 07:26:34 UTC (rev 87480)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 12: PASS unless crash
+
Property changes on: trunk/LayoutTests/fast/html/details-summary-document-child-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/fast/html/details-summary-document-child.html (0 => 87480)


--- trunk/LayoutTests/fast/html/details-summary-document-child.html	                        (rev 0)
+++ trunk/LayoutTests/fast/html/details-summary-document-child.html	2011-05-27 07:26:34 UTC (rev 87480)
@@ -0,0 +1,16 @@
+<html>
+<body _onload_="test()">
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+function test() {
+    document.open();
+    document.insertBefore(document.createElement("summary"));
+    // The document don't have <body> so we need use console.log()
+    // to make readable expectation.
+    console.log("PASS unless crash");
+}
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/html/details-summary-document-child.html
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/ChangeLog (87479 => 87480)


--- trunk/Source/WebCore/ChangeLog	2011-05-27 06:54:19 UTC (rev 87479)
+++ trunk/Source/WebCore/ChangeLog	2011-05-27 07:26:34 UTC (rev 87480)
@@ -1,3 +1,17 @@
+2011-05-26  MORITA Hajime  <morr...@google.com>
+
+        Reviewed by Kent Tamura.
+
+        WebCore::HTMLSummaryElement::isMainSummary ReadAV@NULL
+        https://bugs.webkit.org/show_bug.cgi?id=61511
+
+        Removed Unnecessary wrong cast to Elmement, which can be non-Element.
+
+        Test: fast/html/details-summary-document-child.html
+
+        * html/HTMLSummaryElement.cpp:
+        (WebCore::HTMLSummaryElement::detailsElement):
+
 2011-05-26  Adam Barth  <aba...@webkit.org>
 
         Reviewed by Ryosuke Niwa.

Modified: trunk/Source/WebCore/html/HTMLSummaryElement.cpp (87479 => 87480)


--- trunk/Source/WebCore/html/HTMLSummaryElement.cpp	2011-05-27 06:54:19 UTC (rev 87479)
+++ trunk/Source/WebCore/html/HTMLSummaryElement.cpp	2011-05-27 07:26:34 UTC (rev 87480)
@@ -82,7 +82,7 @@
 
 HTMLDetailsElement* HTMLSummaryElement::detailsElement() const
 {
-    Element* mayDetails = toElement(const_cast<HTMLSummaryElement*>(this)->parentNodeForRenderingAndStyle());
+    Node* mayDetails = const_cast<HTMLSummaryElement*>(this)->parentNodeForRenderingAndStyle();
     if (!mayDetails || !mayDetails->hasTagName(detailsTag))
         return 0;
     return static_cast<HTMLDetailsElement*>(mayDetails);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to