From 0ab351be6a1579b651bbd6686fbdbda2aa8ca28c Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Thu, 23 Feb 2012 23:55:51 +0000 Subject: [PATCH] CSS2:text-decoration: element should not inherit text-decoration property https://bugs.webkit.org/show_bug.cgi?id=71266 Patch by Koji Ishii on 2012-02-23 Reviewed by Kentaro Hara. Source/WebCore: Tests: fast/ruby/text-decoration-in-descendants-ruby-expected.html fast/ruby/text-decoration-in-descendants-ruby.html The spec says "text decorations are not propagated to any out-of-flow descendants": http://www.w3.org/TR/2011/WD-css3-text-20110901/#decoration Floats etc. are fixed in bug 18611, but is not inline either and therefore it should be included; it was confirmed at a discussion at www-style. http://lists.w3.org/Archives/Public/www-style/2011Sep/0238.html * rendering/RenderObject.cpp: (WebCore::RenderObject::getTextDecorationColors): LayoutTests: The spec says "text decorations are not propagated to any out-of-flow descendants": http://www.w3.org/TR/2011/WD-css3-text-20110901/#decoration Floats etc. are fixed in bug 18611, but is not inline either and therefore it should be included; it was confirmed at a discussion at www-style. http://lists.w3.org/Archives/Public/www-style/2011Sep/0238.html * fast/ruby/text-decoration-in-descendants-ruby-expected.html: Added. * fast/ruby/text-decoration-in-descendants-ruby.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108690 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 16 ++++++++++++++++ ...text-decoration-in-descendants-ruby-expected.html | 20 ++++++++++++++++++++ .../ruby/text-decoration-in-descendants-ruby.html | 20 ++++++++++++++++++++ Source/WebCore/ChangeLog | 19 +++++++++++++++++++ Source/WebCore/rendering/RenderObject.cpp | 2 +- 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 LayoutTests/fast/ruby/text-decoration-in-descendants-ruby-expected.html create mode 100644 LayoutTests/fast/ruby/text-decoration-in-descendants-ruby.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index dac8299..a034ad0 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,19 @@ +2012-02-23 Koji Ishii + + CSS2:text-decoration: element should not inherit text-decoration property + https://bugs.webkit.org/show_bug.cgi?id=71266 + + Reviewed by Kentaro Hara. + + The spec says "text decorations are not propagated to any out-of-flow descendants": + http://www.w3.org/TR/2011/WD-css3-text-20110901/#decoration + Floats etc. are fixed in bug 18611, but is not inline either and therefore + it should be included; it was confirmed at a discussion at www-style. + http://lists.w3.org/Archives/Public/www-style/2011Sep/0238.html + + * fast/ruby/text-decoration-in-descendants-ruby-expected.html: Added. + * fast/ruby/text-decoration-in-descendants-ruby.html: Added. + 2012-02-23 Filip Pizlo Make fast/js/script-tests/dfg-inline-function-dot-caller not timeout. diff --git a/LayoutTests/fast/ruby/text-decoration-in-descendants-ruby-expected.html b/LayoutTests/fast/ruby/text-decoration-in-descendants-ruby-expected.html new file mode 100644 index 0000000..234a9d3 --- /dev/null +++ b/LayoutTests/fast/ruby/text-decoration-in-descendants-ruby-expected.html @@ -0,0 +1,20 @@ + + + +CSS Test: ruby layout items should block text decoration propagation just like atomic inlines do + + + +

Bug 71266: CSS2:text-decoration: <rt> element should not inherit text-decoration property

+
+
XThis line should NOT be underlined nor strike-through
+
XThis line should be underlined and strike-through
+
+ + diff --git a/LayoutTests/fast/ruby/text-decoration-in-descendants-ruby.html b/LayoutTests/fast/ruby/text-decoration-in-descendants-ruby.html new file mode 100644 index 0000000..c4263c4 --- /dev/null +++ b/LayoutTests/fast/ruby/text-decoration-in-descendants-ruby.html @@ -0,0 +1,20 @@ + + + +CSS Test: ruby layout items should block text decoration propagation just like atomic inlines do + + + +

Bug 71266: CSS2:text-decoration: <rt> element should not inherit text-decoration property

+
+
XThis line should NOT be underlined nor strike-through
+
XThis line should be underlined and strike-through
+
+ + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index e189a5e..3cf3d4b 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,22 @@ +2012-02-23 Koji Ishii + + CSS2:text-decoration: element should not inherit text-decoration property + https://bugs.webkit.org/show_bug.cgi?id=71266 + + Reviewed by Kentaro Hara. + + Tests: fast/ruby/text-decoration-in-descendants-ruby-expected.html + fast/ruby/text-decoration-in-descendants-ruby.html + + The spec says "text decorations are not propagated to any out-of-flow descendants": + http://www.w3.org/TR/2011/WD-css3-text-20110901/#decoration + Floats etc. are fixed in bug 18611, but is not inline either and therefore + it should be included; it was confirmed at a discussion at www-style. + http://lists.w3.org/Archives/Public/www-style/2011Sep/0238.html + + * rendering/RenderObject.cpp: + (WebCore::RenderObject::getTextDecorationColors): + 2012-02-23 Zoltan Horvath [Qt] Allow to use WebCore imagedecoders diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp index e98371b..85a2ba9 100755 --- a/Source/WebCore/rendering/RenderObject.cpp +++ b/Source/WebCore/rendering/RenderObject.cpp @@ -2549,7 +2549,7 @@ void RenderObject::getTextDecorationColors(int decorations, Color& underline, Co linethrough = decorationColor(curr); } } - if (curr->isFloating() || curr->isPositioned()) + if (curr->isFloating() || curr->isPositioned() || curr->isRubyText()) return; curr = curr->parent(); if (curr && curr->isAnonymousBlock() && toRenderBlock(curr)->continuation()) -- 2.7.4