Title: [93496] branches/chromium/835

Diff

Copied: branches/chromium/835/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash-expected.txt (from rev 92132, trunk/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash-expected.txt) (0 => 93496)


--- branches/chromium/835/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash-expected.txt	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash-expected.txt	2011-08-22 08:49:53 UTC (rev 93496)
@@ -0,0 +1 @@
+PASS, does not crash 

Copied: branches/chromium/835/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash.html (from rev 92132, trunk/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash.html) (0 => 93496)


--- branches/chromium/835/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash.html	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/block/update-midpoints-for-trailing-boxes-crash.html	2011-08-22 08:49:53 UTC (rev 93496)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.a {
+	display: table-cell;
+	white-space: nowrap;
+}
+.b {
+	padding-left: 4px;
+	white-space: pre-wrap;
+}
+</style>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
+</head>
+<body>
+<div class='a'>
+<span class='b'>PASS,</span>
+<span>
+<span>does not crash</span>
+<span class='b'></span>
+</span>
+</div>
+</body>
+</html>

Modified: branches/chromium/835/Source/WebCore/rendering/RenderBlockLineLayout.cpp (93495 => 93496)


--- branches/chromium/835/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2011-08-22 08:39:01 UTC (rev 93495)
+++ branches/chromium/835/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2011-08-22 08:49:53 UTC (rev 93496)
@@ -1838,7 +1838,7 @@
     if (lineMidpointState.numMidpoints % 2) {
         // Find the trailing space object's midpoint.
         int trailingSpaceMidpoint = lineMidpointState.numMidpoints - 1;
-        for ( ; trailingSpaceMidpoint >= 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { }
+        for ( ; trailingSpaceMidpoint > 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { }
         ASSERT(trailingSpaceMidpoint >= 0);
         if (collapseFirstSpace == CollapseFirstSpace)
             lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to