Title: [114581] releases/WebKitGTK/webkit-1.8

Diff

Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (114580 => 114581)


--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog	2012-04-18 23:32:44 UTC (rev 114580)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog	2012-04-18 23:34:36 UTC (rev 114581)
@@ -1,3 +1,17 @@
+2012-04-18  Abhishek Arya  <[email protected]>
+
+        Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren.
+        https://bugs.webkit.org/show_bug.cgi?id=80297
+
+        Reviewed by Julien Chaffraix.
+
+        Test passes if you see the inline continuation in the first ruby base and only the
+        simple text in the second ruby base.
+
+        * fast/ruby/ruby-text-before-child-split-expected.png: Added.
+        * fast/ruby/ruby-text-before-child-split-expected.txt: Added.
+        * fast/ruby/ruby-text-before-child-split.html: Added.
+
 2012-04-18  Philip Rogers  <[email protected]>
 
         Skip building resources if SVGTRef is not in a document

Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt (0 => 114581)


--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt	2012-04-18 23:34:36 UTC (rev 114581)
@@ -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
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split.html (0 => 114581)


--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split.html	2012-04-18 23:34:36 UTC (rev 114581)
@@ -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>
+
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/ruby/ruby-text-before-child-split.html
___________________________________________________________________

Added: svn:executable

Added: svn:eol-style

Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (114580 => 114581)


--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog	2012-04-18 23:32:44 UTC (rev 114580)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog	2012-04-18 23:34:36 UTC (rev 114581)
@@ -1,3 +1,19 @@
+2012-04-18  Abhishek Arya  <[email protected]>
+
+        Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren.
+        https://bugs.webkit.org/show_bug.cgi?id=80297
+
+        Reviewed by Julien Chaffraix.
+
+        beforeChild might share the same anonymous block parent with other previous
+        siblings. Before moving the children across ruby bases, we need to make sure
+        to split the tree across the beforeChild correctly.
+
+        Test: fast/ruby/ruby-text-before-child-split.html
+
+        * rendering/RenderRubyBase.cpp:
+        (WebCore::RenderRubyBase::moveChildren):
+
 2012-04-18  Philip Rogers  <[email protected]>
 
         Skip building resources if SVGTRef is not in a document

Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderRubyBase.cpp (114580 => 114581)


--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderRubyBase.cpp	2012-04-18 23:32:44 UTC (rev 114580)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderRubyBase.cpp	2012-04-18 23:34:36 UTC (rev 114581)
@@ -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