Title: [164046] trunk
Revision
164046
Author
mmaxfi...@apple.com
Date
2014-02-13 12:31:36 -0800 (Thu, 13 Feb 2014)

Log Message

Gaps for text-decoration-skip: ink are calculated assuming the glyph orientation is the same as the run orientation
https://bugs.webkit.org/show_bug.cgi?id=128718

Reviewed by Darin Adler.

Source/WebCore:

This is a stop-gap patch to make underlines in CJK text not look terrible. A long-term fix is to refactor
showGlyphsWithAdvances to move rotation logic into a common place that the text-decoration-skip: ink code
can use.

Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):

LayoutTests:

This test draws text that has descenders that would be skipped over if the glyph orientation was the same
as the run orientation. However, it uses text-orientation: upright to make those two orientations not equal.
It then compares this to no skipping at all.

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164045 => 164046)


--- trunk/LayoutTests/ChangeLog	2014-02-13 20:04:40 UTC (rev 164045)
+++ trunk/LayoutTests/ChangeLog	2014-02-13 20:31:36 UTC (rev 164046)
@@ -1,3 +1,17 @@
+2014-02-13  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Gaps for text-decoration-skip: ink are calculated assuming the glyph orientation is the same as the run orientation
+        https://bugs.webkit.org/show_bug.cgi?id=128718
+
+        Reviewed by Darin Adler.
+
+        This test draws text that has descenders that would be skipped over if the glyph orientation was the same
+        as the run orientation. However, it uses text-orientation: upright to make those two orientations not equal.
+        It then compares this to no skipping at all.
+
+        * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright-expected.html: Added.
+        * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html: Added.
+
 2014-02-13  Brady Eidson  <beid...@apple.com>
 
         IDB: TestExpectations cleanup

Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright-expected.html (0 => 164046)


--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright-expected.html	2014-02-13 20:31:36 UTC (rev 164046)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+    -webkit-writing-mode: vertical-rl;
+    font-size: 100px;
+    text-decoration: underline;
+    -webkit-text-decoration-skip: none;
+    -webkit-text-orientation: upright;
+}
+</style>
+</head>
+<body>
+<div>pgyqpgg</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html (0 => 164046)


--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html	2014-02-13 20:31:36 UTC (rev 164046)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+    -webkit-writing-mode: vertical-rl;
+    font-size: 100px;
+    text-decoration: underline;
+    -webkit-text-decoration-skip: ink;
+    -webkit-text-orientation: upright;
+}
+</style>
+</head>
+<body>
+<div>pgyqpgg</div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (164045 => 164046)


--- trunk/Source/WebCore/ChangeLog	2014-02-13 20:04:40 UTC (rev 164045)
+++ trunk/Source/WebCore/ChangeLog	2014-02-13 20:31:36 UTC (rev 164046)
@@ -1,3 +1,19 @@
+2014-02-13  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Gaps for text-decoration-skip: ink are calculated assuming the glyph orientation is the same as the run orientation
+        https://bugs.webkit.org/show_bug.cgi?id=128718
+
+        Reviewed by Darin Adler.
+
+        This is a stop-gap patch to make underlines in CJK text not look terrible. A long-term fix is to refactor
+        showGlyphsWithAdvances to move rotation logic into a common place that the text-decoration-skip: ink code
+        can use.
+
+        Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html
+
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::paintDecoration):
+
 2014-02-13  Andreas Kling  <akl...@apple.com>
 
         InsertIntoTextNodeCommand should get Settings from the Frame.

Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (164045 => 164046)


--- trunk/Source/WebCore/rendering/InlineTextBox.cpp	2014-02-13 20:04:40 UTC (rev 164045)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp	2014-02-13 20:31:36 UTC (rev 164046)
@@ -1162,7 +1162,7 @@
             }
             default:
 #if ENABLE(CSS3_TEXT_DECORATION_SKIP_INK)
-                if (lineStyle.textDecorationSkip() == TextDecorationSkipInk) {
+                if (lineStyle.textDecorationSkip() == TextDecorationSkipInk && isHorizontal()) {
                     if (!context.paintingDisabled()) {
                         drawSkipInkUnderline(textPainter, context, localOrigin, underlineOffset, width, isPrinting);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to