Title: [118870] branches/chromium/1132
Revision
118870
Author
[email protected]
Date
2012-05-29 18:13:02 -0700 (Tue, 29 May 2012)

Log Message

Merge 118005
BUG=128204
Review URL: https://chromiumcodereview.appspot.com/10453072

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1132/LayoutTests/fast/block/line-layout/selection-highlight-crash-expected.txt (from rev 118005, trunk/LayoutTests/fast/block/line-layout/selection-highlight-crash-expected.txt) (0 => 118870)


--- branches/chromium/1132/LayoutTests/fast/block/line-layout/selection-highlight-crash-expected.txt	                        (rev 0)
+++ branches/chromium/1132/LayoutTests/fast/block/line-layout/selection-highlight-crash-expected.txt	2012-05-30 01:13:02 UTC (rev 118870)
@@ -0,0 +1,4 @@
+Test passes if it does not crash.
+ab
+c
+d

Copied: branches/chromium/1132/LayoutTests/fast/block/line-layout/selection-highlight-crash.html (from rev 118005, trunk/LayoutTests/fast/block/line-layout/selection-highlight-crash.html) (0 => 118870)


--- branches/chromium/1132/LayoutTests/fast/block/line-layout/selection-highlight-crash.html	                        (rev 0)
+++ branches/chromium/1132/LayoutTests/fast/block/line-layout/selection-highlight-crash.html	2012-05-30 01:13:02 UTC (rev 118870)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body contenteditable="true">
+Test passes if it does not crash.<br/>
+a<ruby>b<rt>c</rt></ruby>d
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+document.execCommand("SelectAll");
+</script>
+</body>
+</html>
+

Modified: branches/chromium/1132/Source/WebCore/rendering/RenderBlock.cpp (118869 => 118870)


--- branches/chromium/1132/Source/WebCore/rendering/RenderBlock.cpp	2012-05-30 01:09:49 UTC (rev 118869)
+++ branches/chromium/1132/Source/WebCore/rendering/RenderBlock.cpp	2012-05-30 01:13:02 UTC (rev 118870)
@@ -3460,15 +3460,15 @@
     if (isSelectionRoot())
         return 0;
 
-    const RenderBox* object = this;
+    const RenderObject* object = this;
     RenderObject* sibling;
     do {
         sibling = object->previousSibling();
         while (sibling && (!sibling->isRenderBlock() || toRenderBlock(sibling)->isSelectionRoot()))
             sibling = sibling->previousSibling();
 
-        offset -= LayoutSize(object->logicalLeft(), object->logicalTop());
-        object = object->parentBox();
+        offset -= LayoutSize(toRenderBlock(object)->logicalLeft(), toRenderBlock(object)->logicalTop());
+        object = object->parent();
     } while (!sibling && object && object->isRenderBlock() && !toRenderBlock(object)->isSelectionRoot());
 
     if (!sibling)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to