Title: [158592] branches/safari-537.73-branch

Diff

Modified: branches/safari-537.73-branch/LayoutTests/ChangeLog (158591 => 158592)


--- branches/safari-537.73-branch/LayoutTests/ChangeLog	2013-11-04 21:46:51 UTC (rev 158591)
+++ branches/safari-537.73-branch/LayoutTests/ChangeLog	2013-11-04 21:50:57 UTC (rev 158592)
@@ -1,3 +1,17 @@
+2013-11-04  Lucas Forschler  <[email protected]>
+
+        Merge r157436
+
+    2013-10-14  Ryosuke Niwa  <[email protected]>
+
+            Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
+            https://bugs.webkit.org/show_bug.cgi?id=122776
+
+            Reviewed by Darin Adler.
+
+            * fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt: Added.
+            * fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html: Added.
+
 2013-11-01  Brent Fulgham  <[email protected]>
 
         Merge r157070

Copied: branches/safari-537.73-branch/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt (from rev 157436, trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt) (0 => 158592)


--- branches/safari-537.73-branch/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt	                        (rev 0)
+++ branches/safari-537.73-branch/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt	2013-11-04 21:50:57 UTC (rev 158592)
@@ -0,0 +1 @@
+Test passes if there is no crash.

Copied: branches/safari-537.73-branch/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html (from rev 157436, trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html) (0 => 158592)


--- branches/safari-537.73-branch/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html	                        (rev 0)
+++ branches/safari-537.73-branch/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html	2013-11-04 21:50:57 UTC (rev 158592)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body dir='rtl'>
+<div style='-webkit-rtl-ordering: visual;'><li><span style="margin: 2000;"> Test passes if there is no crash.
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+</body>
+</html>

Modified: branches/safari-537.73-branch/Source/WebCore/ChangeLog (158591 => 158592)


--- branches/safari-537.73-branch/Source/WebCore/ChangeLog	2013-11-04 21:46:51 UTC (rev 158591)
+++ branches/safari-537.73-branch/Source/WebCore/ChangeLog	2013-11-04 21:50:57 UTC (rev 158592)
@@ -1,3 +1,38 @@
+2013-11-04  Lucas Forschler  <[email protected]>
+
+        Merge r157436
+
+    2013-10-14  Ryosuke Niwa  <[email protected]>
+
+            Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
+            https://bugs.webkit.org/show_bug.cgi?id=122776
+
+            Reviewed by Darin Adler.
+
+            Merge https://chromium.googlesource.com/chromium/blink/+/aca89bc4d984705a1f94b623dae0ab03e239a248
+
+            Fix modification of whitespace endpoints to not assume it's operating on RenderTexts
+
+            During line layout, we use midpoints to identify RenderObjects, or parts of
+            RenderObjects, that don't need InlineBoxes, usually because of collapsed whitespace.
+
+            Prior to actually creating BidiRuns (the precursor to InlineBoxes), we use
+            checkMidpoints to fix up our lineMidpointState to handle the case where we start
+            ignoring spaces in our line, but don't stop until somewhere on the following line.
+            Previously, this function assumed that the final midpoint (called an endpoint)
+            was a RenderText, but this assumption is wrong if we have a beginning midpoint
+            created by shouldSkipWhitespaceAfterStartObject (which handles inlines and list
+            markers) and no endpoint on that line. In that case, we'd instead adjust the
+            position backwards on the beginning midpoint, which would cause us to fail to
+            create an InlineBox for the inline or list marker. In the new test added, this
+            would actually trigger a crash due to an assumption when visually re-ordering
+            BidiRuns that a non-empty line would actually contain at least one such run.
+
+            Test: fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html
+
+            * rendering/RenderBlockLineLayout.cpp:
+            (WebCore::checkMidpoints):
+
 2013-11-01  Brent Fulgham  <[email protected]>
 
         Merge r157070

Modified: branches/safari-537.73-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (158591 => 158592)


--- branches/safari-537.73-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-11-04 21:46:51 UTC (rev 158591)
+++ branches/safari-537.73-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-11-04 21:50:57 UTC (rev 158592)
@@ -417,7 +417,7 @@
         if (currpoint == lBreak) {
             // We hit the line break before the start point.  Shave off the start point.
             lineMidpointState.numMidpoints--;
-            if (endpoint.m_obj->style()->collapseWhiteSpace())
+            if (endpoint.m_obj->style()->collapseWhiteSpace() && endpoint.m_obj->isText())
                 endpoint.m_pos--;
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to