Title: [95857] trunk
Revision
95857
Author
infe...@chromium.org
Date
2011-09-23 14:01:01 -0700 (Fri, 23 Sep 2011)

Log Message

Source/WebCore: Style not updated for :before, :after content
in ruby text.
https://bugs.webkit.org/show_bug.cgi?id=68625

Reviewed by Dave Hyatt.

Test: fast/ruby/ruby-text-before-after-content.html

* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::updateBeforeAfterContent):
* rendering/RenderRubyText.h:

LayoutTests: Style not updated for :before, :after content
in ruby text.
https://bugs.webkit.org/show_bug.cgi?id=68625
        
Reviewed by Dave Hyatt.

* fast/ruby/ruby-text-before-after-content-expected.png: Added.
* fast/ruby/ruby-text-before-after-content-expected.txt: Added.
* fast/ruby/ruby-text-before-after-content.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (95856 => 95857)


--- trunk/LayoutTests/ChangeLog	2011-09-23 20:32:18 UTC (rev 95856)
+++ trunk/LayoutTests/ChangeLog	2011-09-23 21:01:01 UTC (rev 95857)
@@ -1,3 +1,15 @@
+2011-09-23  Abhishek Arya  <infe...@chromium.org>
+
+        Style not updated for :before, :after content
+        in ruby text.
+        https://bugs.webkit.org/show_bug.cgi?id=68625
+        
+        Reviewed by Dave Hyatt.
+
+        * fast/ruby/ruby-text-before-after-content-expected.png: Added.
+        * fast/ruby/ruby-text-before-after-content-expected.txt: Added.
+        * fast/ruby/ruby-text-before-after-content.html: Added.
+
 2011-09-23  David Hyatt  <hy...@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=68719

Added: trunk/LayoutTests/fast/ruby/ruby-text-before-after-content-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/fast/ruby/ruby-text-before-after-content-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/fast/ruby/ruby-text-before-after-content-expected.txt (0 => 95857)


--- trunk/LayoutTests/fast/ruby/ruby-text-before-after-content-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/ruby/ruby-text-before-after-content-expected.txt	2011-09-23 21:01:01 UTC (rev 95857)
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x87
+  RenderBlock {HTML} at (0,0) size 800x87
+    RenderBody {BODY} at (16,16) size 768x55 [color=#0000FF]
+      RenderRuby (inline) {RUBY} at (0,0) size 213x37
+        RenderRubyRun (anonymous) at (0,18) size 192x37
+          RenderRubyText {RT} at (0,-18) size 192x18
+            RenderInline (generated) at (0,0) size 63x18
+              RenderText at (0,0) size 63x18
+                text run at (0,0) width 63: "BEFORE"
+            RenderText {#text} at (63,0) size 77x18
+              text run at (63,0) width 77: "CONTENT"
+            RenderInline (generated) at (0,0) size 52x18
+              RenderText at (140,0) size 52x18
+                text run at (140,0) width 52: "AFTER"
+          RenderRubyBase (anonymous) at (0,0) size 192x37
+            RenderText {#text} at (84,0) size 24x37
+              text run at (84,0) width 24: "A"
+        RenderRubyRun (anonymous) at (192,18) size 21x37
+          RenderRubyBase (anonymous) at (0,0) size 21x37
+            RenderText {#text} at (0,0) size 21x37
+              text run at (0,0) width 21: "B"
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0

Added: trunk/LayoutTests/fast/ruby/ruby-text-before-after-content.html (0 => 95857)


--- trunk/LayoutTests/fast/ruby/ruby-text-before-after-content.html	                        (rev 0)
+++ trunk/LayoutTests/fast/ruby/ruby-text-before-after-content.html	2011-09-23 21:01:01 UTC (rev 95857)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- There should no text in black color. -->
+<html>
+<body>
+<style>
+rt:before 
+{
+   content: "BEFORE";
+}
+rt:after
+{
+   content: "AFTER";
+}
+</style>
+<ruby>
+A<rt>CONTENT</rt>B
+</ruby>
+<script>
+    document.body.offsetTop;
+    document.body.style.color = 'blue';
+	document.body.style.zoom = '200%';
+</script>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (95856 => 95857)


--- trunk/Source/WebCore/ChangeLog	2011-09-23 20:32:18 UTC (rev 95856)
+++ trunk/Source/WebCore/ChangeLog	2011-09-23 21:01:01 UTC (rev 95857)
@@ -1,3 +1,17 @@
+2011-09-23  Abhishek Arya  <infe...@chromium.org>
+
+        Style not updated for :before, :after content
+        in ruby text.
+        https://bugs.webkit.org/show_bug.cgi?id=68625
+
+        Reviewed by Dave Hyatt.
+
+        Test: fast/ruby/ruby-text-before-after-content.html
+
+        * rendering/RenderRubyText.cpp:
+        (WebCore::RenderRubyText::updateBeforeAfterContent):
+        * rendering/RenderRubyText.h:
+
 2011-09-22  Ojan Vafai  <o...@chromium.org>
 
         refactor RenderFlexibleBox to use flex-flow aware methods

Modified: trunk/Source/WebCore/rendering/RenderRubyText.cpp (95856 => 95857)


--- trunk/Source/WebCore/rendering/RenderRubyText.cpp	2011-09-23 20:32:18 UTC (rev 95856)
+++ trunk/Source/WebCore/rendering/RenderRubyText.cpp	2011-09-23 21:01:01 UTC (rev 95857)
@@ -86,4 +86,15 @@
     return true;
 }
 
+void RenderRubyText::updateBeforeAfterContent(PseudoId pseudoId)
+{
+    // RenderRubyText manages its own :before and :after content
+    // and is not handled by its anonymous wrappers RenderRubyRun
+    // and RenderRuby. This contrasts with other ruby children, which
+    // are enclosed in RenderRubyBase and hence they are able to
+    // update their :before, :after content (since RenderRubyBase
+    // is not a anonymous wrapper).
+    return children()->updateBeforeAfterContent(this, pseudoId);
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderRubyText.h (95856 => 95857)


--- trunk/Source/WebCore/rendering/RenderRubyText.h	2011-09-23 20:32:18 UTC (rev 95856)
+++ trunk/Source/WebCore/rendering/RenderRubyText.h	2011-09-23 21:01:01 UTC (rev 95857)
@@ -46,6 +46,8 @@
 
     virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
 
+    virtual void updateBeforeAfterContent(PseudoId);
+
 private:
     virtual bool avoidsFloats() const;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to