Title: [95213] branches/safari-534.51-branch

Diff

Modified: branches/safari-534.51-branch/LayoutTests/ChangeLog (95212 => 95213)


--- branches/safari-534.51-branch/LayoutTests/ChangeLog	2011-09-15 19:24:56 UTC (rev 95212)
+++ branches/safari-534.51-branch/LayoutTests/ChangeLog	2011-09-15 19:29:09 UTC (rev 95213)
@@ -1,5 +1,25 @@
 2011-09-15  Mark Rowe  <mr...@apple.com>
 
+        Merge r90568.
+
+    2011-07-07  Julien Chaffraix  <jchaffr...@webkit.org>
+
+        Reviewed by David Hyatt.
+
+        Partial layout when a flex-box has visibility: collapse
+        https://bugs.webkit.org/show_bug.cgi?id=63776
+
+        Those tests checks some variation of the same underlying issue.
+
+        * fast/flexbox/crash-button-input-autofocus-expected.txt: Added.
+        * fast/flexbox/crash-button-input-autofocus.html: Added.
+        * fast/flexbox/crash-button-keygen-expected.txt: Added.
+        * fast/flexbox/crash-button-keygen.html: Added.
+        * fast/flexbox/crash-button-relayout-expected.txt: Added.
+        * fast/flexbox/crash-button-relayout.html: Added.
+
+2011-09-15  Mark Rowe  <mr...@apple.com>
+
         Merge r95056.
 
     2011-09-12  Jon Honeycutt  <jhoneyc...@apple.com>

Added: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus-expected.txt (0 => 95213)


--- branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus-expected.txt	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus-expected.txt	2011-09-15 19:29:09 UTC (rev 95213)
@@ -0,0 +1,3 @@
+Test for bug 63776: Partial layout when a flex-box has visibility: collapse
+
+This test PASSES if it does not CRASH.

Added: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus.html (0 => 95213)


--- branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus.html	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus.html	2011-09-15 19:29:09 UTC (rev 95213)
@@ -0,0 +1,14 @@
+<html>
+<body>
+<p style="visibility: collapse;"><button><input autofocus><input id="test"></input></button></p>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+document.body.offsetTop;
+document.getElementById('test').parentNode.removeChild(document.getElementById('test'));
+document.body.offsetTop;
+</script>
+<p>Test for bug <a href="" Partial layout when a flex-box has visibility: collapse</p>
+<p>This test PASSES if it does not CRASH.</p>
+</body>
+</html>
Property changes on: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-input-autofocus.html
___________________________________________________________________

Added: svn:executable

Added: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen-expected.txt (0 => 95213)


--- branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen-expected.txt	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen-expected.txt	2011-09-15 19:29:09 UTC (rev 95213)
@@ -0,0 +1,3 @@
+Test for bug 63776: Partial layout when a flex-box has visibility: collapse
+
+This test PASSES if it does not CRASH.

Added: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen.html (0 => 95213)


--- branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen.html	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen.html	2011-09-15 19:29:09 UTC (rev 95213)
@@ -0,0 +1,14 @@
+<html>
+<body>
+<p style="visibility: collapse;"><button><keygen autofocus><input id="test"></keygen></button></p>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+document.body.offsetTop;
+document.getElementById('test').parentNode.removeChild(document.getElementById('test'));
+document.body.offsetTop;
+</script>
+<p>Test for bug <a href="" Partial layout when a flex-box has visibility: collapse</p>
+<p>This test PASSES if it does not CRASH.</p>
+</body>
+</html>
Property changes on: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-keygen.html
___________________________________________________________________

Added: svn:executable

Added: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout-expected.txt (0 => 95213)


--- branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout-expected.txt	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout-expected.txt	2011-09-15 19:29:09 UTC (rev 95213)
@@ -0,0 +1,3 @@
+Test for bug 63776: Partial layout when a flex-box has visibility: collapse
+
+This test PASSES if it does not CRASH.

Added: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout.html (0 => 95213)


--- branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout.html	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout.html	2011-09-15 19:29:09 UTC (rev 95213)
@@ -0,0 +1,14 @@
+<html>
+<body>
+<p style="visibility: collapse;"><button><input><script>document.getElementsByTagName('input')[0].offsetTop;</script><input id="test"></input></button></p>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+document.body.offsetTop;
+document.getElementById('test').parentNode.removeChild(document.getElementById('test'));
+document.body.offsetTop;
+</script>
+<p>Test for bug <a href="" Partial layout when a flex-box has visibility: collapse</p>
+<p>This test PASSES if it does not CRASH.</p>
+</body>
+</html>
Property changes on: branches/safari-534.51-branch/LayoutTests/fast/flexbox/crash-button-relayout.html
___________________________________________________________________

Added: svn:executable

Modified: branches/safari-534.51-branch/Source/WebCore/ChangeLog (95212 => 95213)


--- branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-09-15 19:24:56 UTC (rev 95212)
+++ branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-09-15 19:29:09 UTC (rev 95213)
@@ -1,5 +1,29 @@
 2011-09-15  Mark Rowe  <mr...@apple.com>
 
+        Merge r90568.
+
+    2011-07-07  Julien Chaffraix  <jchaffr...@webkit.org>
+
+        Reviewed by David Hyatt.
+
+        Partial layout when a flex-box has visibility: collapse
+        https://bugs.webkit.org/show_bug.cgi?id=63776
+
+        Tests: fast/flexbox/crash-button-input-autofocus.html
+               fast/flexbox/crash-button-keygen.html
+               fast/flexbox/crash-button-relayout.html
+
+        The issue is that FlexBoxIterator would skip any child if it has visibility: collapsed.
+        However if one of the child is anonymous, it may wrap some other child that would be skipped.
+        Now FlexBoxIterator is called during the layout phase and thus some nodes would not relayouted
+        as expected.
+
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::FlexBoxIterator::next): When iterating, don't skip anonymous content as there may
+        be real content hiding below.
+
+2011-09-15  Mark Rowe  <mr...@apple.com>
+
         Merge r95057.
 
     2011-09-13  Jeff Miller  <je...@apple.com>

Modified: branches/safari-534.51-branch/Source/WebCore/rendering/RenderFlexibleBox.cpp (95212 => 95213)


--- branches/safari-534.51-branch/Source/WebCore/rendering/RenderFlexibleBox.cpp	2011-09-15 19:24:56 UTC (rev 95212)
+++ branches/safari-534.51-branch/Source/WebCore/rendering/RenderFlexibleBox.cpp	2011-09-15 19:29:09 UTC (rev 95213)
@@ -90,8 +90,8 @@
                 m_currentChild = m_forward ? m_currentChild->nextSiblingBox() : m_currentChild->previousSiblingBox();
             if (m_currentChild && m_currentChild->style()->boxOrdinalGroup() > m_lastOrdinal)
                 m_lastOrdinal = m_currentChild->style()->boxOrdinalGroup();
-        } while (!m_currentChild || m_currentChild->style()->boxOrdinalGroup() != m_currentOrdinal
-                 || m_currentChild->style()->visibility() == COLLAPSE);
+        } while (!m_currentChild || (!m_currentChild->isAnonymous()
+                 && (m_currentChild->style()->boxOrdinalGroup() != m_currentOrdinal || m_currentChild->style()->visibility() == COLLAPSE)));
         return m_currentChild;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to