[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

inferno at chromium.org inferno at chromium.org
Mon Feb 21 00:06:45 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 372ce0de073f196356325329924e40b4b5a090c5
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 28 05:30:10 2011 +0000

    2011-01-27  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Recalc table sections if needed before calculating the first line
            box baseline.
            https://bugs.webkit.org/show_bug.cgi?id=53265
    
            When we try to calculate the baseline position of a table cell,
            we recurse through all the child sibling boxes (when children are
            non inline) and add their first linebox baseline values. If one of
            the children is a table with pending section recalc, we will access
            wrong table section values. We recalc table sections if it is needed.
    
            Test: fast/table/recalc-section-first-body-crash-main.html
    
            * rendering/RenderTable.cpp:
            (WebCore::RenderTable::firstLineBoxBaseline):
    2011-01-27  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Tests that we do not crash when calculating the first line box
            baseline for the table.
            https://bugs.webkit.org/show_bug.cgi?id=53265
    
            * fast/table/recalc-section-first-body-crash-main-expected.txt: Added.
            * fast/table/recalc-section-first-body-crash-main.html: Added.
            * fast/table/resources/recalc-section-first-body-crash.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76915 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f5216d8..ecccd5f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-27  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Tests that we do not crash when calculating the first line box
+        baseline for the table.
+        https://bugs.webkit.org/show_bug.cgi?id=53265
+
+        * fast/table/recalc-section-first-body-crash-main-expected.txt: Added.
+        * fast/table/recalc-section-first-body-crash-main.html: Added.
+        * fast/table/resources/recalc-section-first-body-crash.html: Added.
+
 2011-01-27  Ryosuke Niwa  <rniwa at webkit.org>
 
         Unreviewed, rolling out r76839.
diff --git a/LayoutTests/fast/table/recalc-section-first-body-crash-main-expected.txt b/LayoutTests/fast/table/recalc-section-first-body-crash-main-expected.txt
new file mode 100644
index 0000000..ac8167d
--- /dev/null
+++ b/LayoutTests/fast/table/recalc-section-first-body-crash-main-expected.txt
@@ -0,0 +1 @@
+PASS  
diff --git a/LayoutTests/fast/table/recalc-section-first-body-crash-main.html b/LayoutTests/fast/table/recalc-section-first-body-crash-main.html
new file mode 100644
index 0000000..371986c
--- /dev/null
+++ b/LayoutTests/fast/table/recalc-section-first-body-crash-main.html
@@ -0,0 +1,11 @@
+<html>
+    <body>
+        PASS
+        <iframe width="0" height="0" src="resources/recalc-section-first-body-crash.html"></iframe>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+        </script>
+    </body>
+</html>
+
diff --git a/LayoutTests/fast/table/resources/recalc-section-first-body-crash.html b/LayoutTests/fast/table/resources/recalc-section-first-body-crash.html
new file mode 100644
index 0000000..ddacc14
--- /dev/null
+++ b/LayoutTests/fast/table/resources/recalc-section-first-body-crash.html
@@ -0,0 +1,48 @@
+<html>
+    <body onload="runTest();">
+        <junk>a</junk>
+        <junk>a</junk>
+        <junk id="test1" style="display: -webkit-box; visibility: collapse;">
+            <iframe>a</iframe><junk style="display: table-row-group;">a</junk>
+        </junk>
+        <div>a</div><junk></junk>
+        <div id="test2" style="display: table-cell;"></div>
+
+        <script type="text/javascript">
+            function reference(domNode)
+            {
+                this.domNode = domNode;
+            }
+
+            function walk(arr, currentPrefix, index, domNode)
+            {
+                if (domNode == null)
+                    return;
+                newPrefix = currentPrefix + "_" + index;
+                walk(arr, currentPrefix, index + 1, domNode.nextSibling);
+                walk(arr, newPrefix, 0, domNode.firstChild);
+                arr[newPrefix] = new reference(domNode);
+            }
+
+            function removeAll()
+            {
+                var arr = new Array();
+                walk(arr, "", 0, document.body);
+                for (key in arr) {
+                    arr[key].domNode.parentNode.removeChild(arr[key].domNode);
+                    if (document.body)
+                        document.body.offsetTop;
+                }
+            }
+
+            function runTest()
+            {
+                var test1 = document.getElementById('test1');
+                test1.parentNode.removeChild(test1);
+                var test2 = document.getElementById('test2');
+                test2.appendChild(test1);
+                removeAll();
+            }
+        </script>
+    </body>
+</html>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 9980ecf..dea1b26 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-27  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Recalc table sections if needed before calculating the first line
+        box baseline.
+        https://bugs.webkit.org/show_bug.cgi?id=53265
+
+        When we try to calculate the baseline position of a table cell,
+        we recurse through all the child sibling boxes (when children are
+        non inline) and add their first linebox baseline values. If one of
+        the children is a table with pending section recalc, we will access
+        wrong table section values. We recalc table sections if it is needed.
+
+        Test: fast/table/recalc-section-first-body-crash-main.html
+
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::firstLineBoxBaseline):
+
 2011-01-27  Adrienne Walker  <enne at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/Source/WebCore/rendering/RenderTable.cpp b/Source/WebCore/rendering/RenderTable.cpp
index 1b54440..5b18e4f 100644
--- a/Source/WebCore/rendering/RenderTable.cpp
+++ b/Source/WebCore/rendering/RenderTable.cpp
@@ -1126,6 +1126,8 @@ int RenderTable::firstLineBoxBaseline() const
     if (isWritingModeRoot())
         return -1;
 
+    recalcSectionsIfNeeded();
+
     RenderTableSection* firstNonEmptySection = m_head ? m_head : (m_firstBody ? m_firstBody : m_foot);
     if (firstNonEmptySection && !firstNonEmptySection->numRows())
         firstNonEmptySection = sectionBelow(firstNonEmptySection, true);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list