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

inferno at chromium.org inferno at chromium.org
Wed Dec 22 15:40:47 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 909a4d506aedd794070806c93f506e6827d5a3e8
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 10 08:24:25 2010 +0000

    2010-11-09  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Fieldsets avoid floats. Legend elements are expected to have their parent
            as fieldset. When this not the case, floats get added incorrectly added to the
            legend blocks. This patch tries to prevent those floats addition.
            https://bugs.webkit.org/show_bug.cgi?id=49214
    
            Test: fast/blockflow/overhanging-float-legend-crash.html
    
            * rendering/RenderBox.cpp:
            (WebCore::RenderBox::avoidsFloats):
            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::isLegend):
            * rendering/RenderObject.h:
    2010-11-09  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Tests that we do not crash and avoid floats to be added in legend element
            when it is not enclosed in a fieldset.
            https://bugs.webkit.org/show_bug.cgi?id=49214
    
            * fast/blockflow/overhanging-float-legend-crash-expected.txt: Added.
            * fast/blockflow/overhanging-float-legend-crash.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71724 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 841738c..a8c79c6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-09  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Tests that we do not crash and avoid floats to be added in legend element
+        when it is not enclosed in a fieldset.
+        https://bugs.webkit.org/show_bug.cgi?id=49214
+
+        * fast/blockflow/overhanging-float-legend-crash-expected.txt: Added.
+        * fast/blockflow/overhanging-float-legend-crash.html: Added.
+
 2010-11-10  Cris Neckar  <cdn at chromium.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt b/LayoutTests/fast/blockflow/overhanging-float-legend-crash-expected.txt
similarity index 100%
copy from LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt
copy to LayoutTests/fast/blockflow/overhanging-float-legend-crash-expected.txt
diff --git a/LayoutTests/fast/blockflow/overhanging-float-legend-crash.html b/LayoutTests/fast/blockflow/overhanging-float-legend-crash.html
new file mode 100644
index 0000000..969dc22
--- /dev/null
+++ b/LayoutTests/fast/blockflow/overhanging-float-legend-crash.html
@@ -0,0 +1,31 @@
+<html>
+    <script>
+    if (window.layoutTestController)
+    {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+
+    window.setTimeout('crash();', 0);
+
+    function crash()
+    {
+        block1.style.position = 'absolute';
+        float1.style.display = 'none';
+        document.body.offsetTop;
+ 
+        document.getElementById("result").innerHTML = "PASS";
+        if (window.layoutTestController)
+            layoutTestController.notifyDone();
+    }
+    </script>
+    <div id="result"></div>
+    <div id="block1">
+        <span id="float1" style="float:left; margin-bottom:10000px;"></span>
+    </div>
+    <legend>
+        <fieldset></fieldset>
+        <junk>
+    </legend>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d3de0d3..2641446 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-09  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fieldsets avoid floats. Legend elements are expected to have their parent
+        as fieldset. When this not the case, floats get added incorrectly added to the
+        legend blocks. This patch tries to prevent those floats addition.
+        https://bugs.webkit.org/show_bug.cgi?id=49214
+
+        Test: fast/blockflow/overhanging-float-legend-crash.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::avoidsFloats):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::isLegend):
+        * rendering/RenderObject.h:
+
 2010-11-10  Cris Neckar  <cdn at chromium.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 561cbc6..f4aaf0e 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -3091,7 +3091,7 @@ bool RenderBox::shrinkToAvoidFloats() const
 
 bool RenderBox::avoidsFloats() const
 {
-    return isReplaced() || hasOverflowClip() || isHR() || isWritingModeRoot();
+    return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot();
 }
 
 void RenderBox::addShadowOverflow()
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index d53c7ce..7f1af62 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -257,6 +257,15 @@ bool RenderObject::isHR() const
     return node() && node()->hasTagName(hrTag);
 }
 
+bool RenderObject::isLegend() const
+{
+    return node() && (node()->hasTagName(legendTag)
+#if ENABLE(WML)
+                      || node()->hasTagName(WMLNames::insertedLegendTag)
+#endif
+                     );
+}
+
 bool RenderObject::isHTMLMarquee() const
 {
     return node() && node()->renderer() == this && node()->hasTagName(marqueeTag);
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index e79d7e4..bfc62fe 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -288,6 +288,7 @@ public:
     bool isRoot() const { return document()->documentElement() == m_node; }
     bool isBody() const;
     bool isHR() const;
+    bool isLegend() const;
 
     bool isHTMLMarquee() const;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list