Title: [112463] branches/chromium/1025

Diff

Copied: branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.png (from rev 111714, trunk/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.png) (0 => 112463)


--- branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.png	                        (rev 0)
+++ branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.png	2012-03-28 22:54:37 UTC (rev 112463)
@@ -0,0 +1,5 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82p)tEXtchecksum853de00567d121bea0b7bece66a5d61c`7\xFF\xFBkIDATx\x9C\xED\xD71 \xC00\xC0\xBF\xE7\xE1\xA2$
+\xFAv\xCF\xCC,\x80\xC0y\xFCÀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd\x901 @ƀd.\xE9W\xACfF\xB15IEND\xAEB`\x82
\ No newline at end of file

Copied: branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt (from rev 111714, trunk/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt) (0 => 112463)


--- branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt	                        (rev 0)
+++ branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt	2012-03-28 22:54:37 UTC (rev 112463)
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x26
+  RenderBlock {HTML} at (0,0) size 800x26 [color=#FFFFFF]
+    RenderBody {BODY} at (8,8) size 784x10
+      RenderRuby (inline) {RUBY} at (0,0) size 20x10
+        RenderRubyRun (anonymous) at (0,0) size 10x10
+          RenderRubyText {RT} at (0,0) size 10x0
+          RenderRubyBase (anonymous) at (0,0) size 10x10
+            RenderBlock (anonymous) at (0,0) size 10x10
+              RenderText {#text} at (0,0) size 10x10
+                text run at (0,0) width 10: "A"
+              RenderInline {I} at (0,0) size 0x10
+            RenderBlock (anonymous) at (0,10) size 10x0
+              RenderBlock {DIV} at (0,0) size 10x0
+            RenderBlock (anonymous) at (0,10) size 10x0
+              RenderInline {I} at (0,0) size 0x0
+        RenderRubyRun (anonymous) at (10,0) size 10x10
+          RenderRubyBase (anonymous) at (0,0) size 10x10
+            RenderBlock (anonymous) at (0,0) size 10x10
+              RenderText {#text} at (0,0) size 10x10
+                text run at (0,0) width 10: "B"
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0

Copied: branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split.html (from rev 111714, trunk/LayoutTests/fast/ruby/ruby-text-before-child-split.html) (0 => 112463)


--- branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split.html	                        (rev 0)
+++ branches/chromium/1025/LayoutTests/fast/ruby/ruby-text-before-child-split.html	2012-03-28 22:54:37 UTC (rev 112463)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html style="font-family: ahem; font-size: 10px; -webkit-font-smoothing: none; color: white;">
+<body>
+<ruby id="ruby1">
+A<i><div></div></i>B
+</ruby>
+<script>
+    document.body.offsetTop;
+    ruby1 = document.getElementById('ruby1');
+    ruby1.insertBefore(document.createElement('rt'), ruby1.lastChild);
+</script>
+</body>
+</html>
+

Modified: branches/chromium/1025/Source/WebCore/rendering/RenderRubyBase.cpp (112462 => 112463)


--- branches/chromium/1025/Source/WebCore/rendering/RenderRubyBase.cpp	2012-03-28 22:48:31 UTC (rev 112462)
+++ branches/chromium/1025/Source/WebCore/rendering/RenderRubyBase.cpp	2012-03-28 22:54:37 UTC (rev 112463)
@@ -58,14 +58,10 @@
     // This function removes all children that are before (!) beforeChild
     // and appends them to toBase.
     ASSERT_ARG(toBase, toBase);
-    
-    // First make sure that beforeChild (if set) is indeed a direct child of this.
-    // Inline children might be wrapped in an anonymous block if there's a continuation.
-    // Theoretically, in ruby bases, this can happen with only the first such a child,
-    // so it should be OK to just climb the tree.
-    while (beforeChild && beforeChild->parent() != this)
-        beforeChild = beforeChild->parent();
 
+    if (beforeChild && beforeChild->parent() != this)
+        beforeChild = splitAnonymousBlocksAroundChild(beforeChild);
+
     if (childrenInline())
         moveInlineChildren(toBase, beforeChild);
     else
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to