Title: [202146] trunk
Revision
202146
Author
[email protected]
Date
2016-06-16 16:27:46 -0700 (Thu, 16 Jun 2016)

Log Message

[New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the block sequence.
https://bugs.webkit.org/show_bug.cgi?id=158854

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/block/inside-inlines/crash-on-first-line-change.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::marginCollapseLinesFromStart):

LayoutTests:

* fast/block/inside-inlines/crash-on-first-line-change-expected.txt: Added.
* fast/block/inside-inlines/crash-on-first-line-change.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (202145 => 202146)


--- trunk/LayoutTests/ChangeLog	2016-06-16 23:03:01 UTC (rev 202145)
+++ trunk/LayoutTests/ChangeLog	2016-06-16 23:27:46 UTC (rev 202146)
@@ -1,3 +1,13 @@
+2016-06-16  Zalan Bujtas  <[email protected]>
+
+        [New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the block sequence.
+        https://bugs.webkit.org/show_bug.cgi?id=158854
+
+        Reviewed by David Hyatt.
+
+        * fast/block/inside-inlines/crash-on-first-line-change-expected.txt: Added.
+        * fast/block/inside-inlines/crash-on-first-line-change.html: Added.
+
 2016-06-16  Benjamin Poulain  <[email protected]>
 
         :in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range limitations

Added: trunk/LayoutTests/fast/block/inside-inlines/crash-on-first-line-change-expected.txt (0 => 202146)


--- trunk/LayoutTests/fast/block/inside-inlines/crash-on-first-line-change-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/block/inside-inlines/crash-on-first-line-change-expected.txt	2016-06-16 23:27:46 UTC (rev 202146)
@@ -0,0 +1,2 @@
+PASS if no crash.
+

Added: trunk/LayoutTests/fast/block/inside-inlines/crash-on-first-line-change.html (0 => 202146)


--- trunk/LayoutTests/fast/block/inside-inlines/crash-on-first-line-change.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/inside-inlines/crash-on-first-line-change.html	2016-06-16 23:27:46 UTC (rev 202146)
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<style>
+div {
+    width: 100px;
+    height: 100px;
+    background-color: green;
+}
+
+.container {
+    overflow: hidden;
+}
+</style>
+</head>
+<body>
+PASS if no crash.
+<div class=container><span><div id=foo></div></div></div>
+<script>
+if (window.internals)
+    internals.settings.setNewBlockInsideInlineModelEnabled(true)
+
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();  
+}
+
+setTimeout(function() {
+    document.getElementById("foo").style.height = "200px";
+    if (window.testRunner)
+        testRunner.notifyDone();  
+}, 10);
+</script>

Modified: trunk/Source/WebCore/ChangeLog (202145 => 202146)


--- trunk/Source/WebCore/ChangeLog	2016-06-16 23:03:01 UTC (rev 202145)
+++ trunk/Source/WebCore/ChangeLog	2016-06-16 23:27:46 UTC (rev 202146)
@@ -1,3 +1,15 @@
+2016-06-16  Zalan Bujtas  <[email protected]>
+
+        [New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the block sequence.
+        https://bugs.webkit.org/show_bug.cgi?id=158854
+
+        Reviewed by David Hyatt.
+
+        Test: fast/block/inside-inlines/crash-on-first-line-change.html
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::marginCollapseLinesFromStart):
+
 2016-06-16  Ting-Wei Lan  <[email protected]>
 
         Include cstdlib before using std::atexit

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (202145 => 202146)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2016-06-16 23:03:01 UTC (rev 202145)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2016-06-16 23:27:46 UTC (rev 202146)
@@ -2304,6 +2304,10 @@
     if (!stopLine->hasAnonymousInlineBlock())
         return;
 
+    // We already handled top of block with startLine.
+    if (stopLine == firstRootBox())
+        return;
+
     // Re-run margin collapsing on the block sequence that stopLine is a part of.
     // First go backwards to get the entire sequence.
     RootInlineBox* prev = stopLine;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to