[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 11:48:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 309f3b53d47246ce1ee11420967d6796ef91fda3
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 7 22:40:28 2010 +0000

    2010-08-07  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Sam Weinig.
    
            document->documentElement can always be null
            https://bugs.webkit.org/show_bug.cgi?id=43677
    
            This ASSERT is bogus.
    
            * css/StyleMedia.cpp:
            (WebCore::StyleMedia::matchMedium):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64925 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/editing/selection/5136696-expected.txt b/LayoutTests/fast/dom/style-media-null-document-element-expected.txt
similarity index 100%
copy from LayoutTests/editing/selection/5136696-expected.txt
copy to LayoutTests/fast/dom/style-media-null-document-element-expected.txt
diff --git a/LayoutTests/fast/dom/style-media-null-document-element.html b/LayoutTests/fast/dom/style-media-null-document-element.html
new file mode 100644
index 0000000..9f0853d
--- /dev/null
+++ b/LayoutTests/fast/dom/style-media-null-document-element.html
@@ -0,0 +1,10 @@
+<body onload="
+    document.open();
+    window.styleMedia.matchMedium();
+    document.write('PASS');
+    document.close();
+  ">
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ca5d9ee..fed28c4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-07  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Sam Weinig.
+
+        document->documentElement can always be null
+        https://bugs.webkit.org/show_bug.cgi?id=43677
+
+        This ASSERT is bogus.
+
+        * css/StyleMedia.cpp:
+        (WebCore::StyleMedia::matchMedium):
+
 2010-08-07  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/WebCore/css/StyleMedia.cpp b/WebCore/css/StyleMedia.cpp
index 6cb662f..8971d35 100644
--- a/WebCore/css/StyleMedia.cpp
+++ b/WebCore/css/StyleMedia.cpp
@@ -56,7 +56,8 @@ bool StyleMedia::matchMedium(const String& query) const
     Document* document = m_frame->document();
     ASSERT(document);
     Element* documentElement = document->documentElement();
-    ASSERT(documentElement);
+    if (!documentElement)
+        return false;
 
     CSSStyleSelector* styleSelector = document->styleSelector();
     if (!styleSelector)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list