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

jschuh at chromium.org jschuh at chromium.org
Wed Dec 22 13:11:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 126648ca26effa7a88129c24a43c7783e89ca68f
Author: jschuh at chromium.org <jschuh at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 8 12:08:46 2010 +0000

    2010-09-08  Justin Schuh  <jschuh at chromium.org>
    
            Reviewed by Nikolas Zimmermann.
    
            NULL deref when use target is reset, then set to display:none
            https://bugs.webkit.org/show_bug.cgi?id=45345
    
            * svg/custom/use-display-none-expected.txt: Added.
            * svg/custom/use-display-none.svg: Added.
    2010-09-08  Justin Schuh  <jschuh at chromium.org>
    
            Reviewed by Nikolas Zimmermann.
    
            NULL deref when use target is reset, then set to display:none
            https://bugs.webkit.org/show_bug.cgi?id=45345
    
            Move the NULL check on shadowRoot earlier in SVGUseElement::recalcStyle
    
            Test: svg/custom/use-display-none.svg
    
            * svg/SVGUseElement.cpp:
            (WebCore::SVGUseElement::recalcStyle):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66973 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e7d19a0..e0e6505 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-08  Justin Schuh  <jschuh at chromium.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        NULL deref when use target is reset, then set to display:none
+        https://bugs.webkit.org/show_bug.cgi?id=45345
+
+        * svg/custom/use-display-none-expected.txt: Added.
+        * svg/custom/use-display-none.svg: Added.
+
 2010-09-08  Zoltan Herczeg  <zherczeg at webkit.org>
 
         Reviewed by Dirk Schulze.
diff --git a/LayoutTests/svg/custom/use-display-none-expected.txt b/LayoutTests/svg/custom/use-display-none-expected.txt
new file mode 100644
index 0000000..d8dd268
--- /dev/null
+++ b/LayoutTests/svg/custom/use-display-none-expected.txt
@@ -0,0 +1 @@
+PASS: The text is displayed and the file did not trigger a crash.
diff --git a/LayoutTests/svg/custom/use-display-none.svg b/LayoutTests/svg/custom/use-display-none.svg
new file mode 100644
index 0000000..69ba7be
--- /dev/null
+++ b/LayoutTests/svg/custom/use-display-none.svg
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <symbol id="a"/>
+    <use id="b" xlink:href="#a"/>
+    <script>
+        if (window.layoutTestController)
+            layoutTestController.dumpAsText();
+        b=document.getElementById('b');
+        b.href.baseVal="#a";
+        b.setAttribute("display","none");
+    </script>
+    <text y="20">PASS: The text is displayed and the file did not trigger a crash.</text>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 837cbb8..84c76b5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-08  Justin Schuh  <jschuh at chromium.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        NULL deref when use target is reset, then set to display:none
+        https://bugs.webkit.org/show_bug.cgi?id=45345
+
+        Move the NULL check on shadowRoot earlier in SVGUseElement::recalcStyle
+
+        Test: svg/custom/use-display-none.svg
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::recalcStyle):
+
 2010-08-30  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index 3723f9a..782efa8 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -326,16 +326,16 @@ void SVGUseElement::recalcStyle(StyleChange change)
     if (m_updatesBlocked)
         ASSERT(!m_needsShadowTreeRecreation);
 
+    RenderSVGShadowTreeRootContainer* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer());
+    if (!shadowRoot)
+        return;
+    
     bool needsStyleUpdate = !m_needsShadowTreeRecreation;
     if (m_needsShadowTreeRecreation) {
-        static_cast<RenderSVGShadowTreeRootContainer*>(renderer())->markShadowTreeForRecreation();
+        shadowRoot->markShadowTreeForRecreation();
         m_needsShadowTreeRecreation = false;
     }
 
-    RenderSVGShadowTreeRootContainer* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer());
-    if (!shadowRoot)
-        return;
-
     shadowRoot->updateFromElement();
 
     if (!needsStyleUpdate)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list