Title: [136765] trunk
Revision
136765
Author
[email protected]
Date
2012-12-05 15:07:31 -0800 (Wed, 05 Dec 2012)

Log Message

Text decorations are rotated when text-combine takes effect
https://bugs.webkit.org/show_bug.cgi?id=104172

Reviewed by Dave Hyatt.

Source/WebCore: 

Test: fast/text/decorations-with-text-combine.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Applied a rotation to the graphics context when painting
the text decorations for combined text.

LayoutTests: 

* fast/text/decorations-with-text-combine.html: Added.
* platform/chromium/TestExpectations: Added to tests missing platform-specific results.
* platform/mac/fast/text/decorations-with-text-combine-expected.png: Added.
* platform/mac/fast/text/decorations-with-text-combine-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (136764 => 136765)


--- trunk/LayoutTests/ChangeLog	2012-12-05 22:46:56 UTC (rev 136764)
+++ trunk/LayoutTests/ChangeLog	2012-12-05 23:07:31 UTC (rev 136765)
@@ -1,3 +1,15 @@
+2012-12-05  Dan Bernstein  <[email protected]>
+
+        Text decorations are rotated when text-combine takes effect
+        https://bugs.webkit.org/show_bug.cgi?id=104172
+
+        Reviewed by Dave Hyatt.
+
+        * fast/text/decorations-with-text-combine.html: Added.
+        * platform/chromium/TestExpectations: Added to tests missing platform-specific results.
+        * platform/mac/fast/text/decorations-with-text-combine-expected.png: Added.
+        * platform/mac/fast/text/decorations-with-text-combine-expected.txt: Added.
+
 2012-12-05  Tony Chang  <[email protected]>
 
         Unreviewed, add Mac baselines after r136409 (mathml sup/sub box changes).

Added: trunk/LayoutTests/fast/text/decorations-with-text-combine.html (0 => 136765)


--- trunk/LayoutTests/fast/text/decorations-with-text-combine.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/decorations-with-text-combine.html	2012-12-05 23:07:31 UTC (rev 136765)
@@ -0,0 +1,70 @@
+<meta charset="utf-8">
+<style>
+    body {
+        font-family: "hiragino mincho pron";
+        font-size: 24px;
+        -webkit-writing-mode: vertical-rl;
+    }
+
+    div {
+        -webkit-margin-after: 10px;
+    }
+
+    .combine {
+        -webkit-text-combine: horizontal;
+        color: blue;
+    }
+
+    .underline .decorated {
+        text-decoration: underline;
+    }
+
+    .overline .decorated {
+        text-decoration: overline;
+    }
+
+    .line-through .decorated {
+        text-decoration: line-through;
+    }
+
+    .emphasis .decorated {
+        -webkit-text-emphasis: open sesame;
+    }
+</style>
+<body>
+    <div class="underline">
+        <div>
+            その女<span class="combine decorated">1</span>がね<span class="combine decorated">123</span>かしつけに<span class="combine decorated">12345</span>来てくれるまで
+        </div>
+        <div class="decorated">
+            その女<span class="combine">1</span>がね<span class="combine">123</span>かしつけに<span class="combine">12345</span>来てくれるまで
+        </div>
+    </div>
+
+    <div class="overline">
+        <div>
+            その女<span class="combine decorated">1</span>がね<span class="combine decorated">123</span>かしつけに<span class="combine decorated">12345</span>来てくれるまで
+        </div>
+        <div class="decorated">
+            その女<span class="combine">1</span>がね<span class="combine">123</span>かしつけに<span class="combine">12345</span>来てくれるまで
+        </div>
+    </div>
+
+    <div class="line-through">
+        <div>
+            その女<span class="combine decorated">1</span>がね<span class="combine decorated">123</span>かしつけに<span class="combine decorated">12345</span>来てくれるまで
+        </div>
+        <div class="decorated">
+            その女<span class="combine">1</span>がね<span class="combine">123</span>かしつけに<span class="combine">12345</span>来てくれるまで
+        </div>
+    </div>
+
+    <div class="emphasis">
+        <div>
+            その女<span class="combine decorated">1</span>がね<span class="combine decorated">123</span>かしつけに<span class="combine decorated">12345</span>来てくれるまで
+        </div>
+        <div class="decorated">
+            その女<span class="combine">1</span>がね<span class="combine">123</span>かしつけに<span class="combine">12345</span>来てくれるまで
+        </div>
+    </div>
+</body>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (136764 => 136765)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-12-05 22:46:56 UTC (rev 136764)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-12-05 23:07:31 UTC (rev 136765)
@@ -4254,6 +4254,7 @@
 
 # Needs platform-specific results
 webkit.org/b/104035 fast/text/orientation-sideways.html [ Missing ]
+webkit.org/b/104172 fast/text/decorations-with-text-combine.html [ Missing ]
 
 # Crash since r136588.
 webkit.org/b/104090 [ Mac Debug ] fast/css-grid-layout/grid-columns-rows-get-set-multiple.html [ Crash ]

Added: trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt (0 => 136765)


--- trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt	2012-12-05 23:07:31 UTC (rev 136765)
@@ -0,0 +1,153 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 782x584
+      RenderBlock {DIV} at (0,0) size 82x584
+        RenderBlock {DIV} at (0,0) size 36x584
+          RenderText {#text} at (6,0) size 24x72
+            text run at (6,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,72) size 24x24
+              text run at (6,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,96) size 24x48
+            text run at (6,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,144) size 24x24
+              text run at (6,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,168) size 24x120
+            text run at (6,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x71
+              text run at (6,288) width 71: "12345"
+          RenderText {#text} at (6,358) size 24x169
+            text run at (6,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+        RenderBlock {DIV} at (46,0) size 36x584
+          RenderText {#text} at (6,0) size 24x72
+            text run at (6,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,72) size 24x24
+              text run at (6,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,96) size 24x48
+            text run at (6,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,144) size 24x24
+              text run at (6,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,168) size 24x120
+            text run at (6,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x71
+              text run at (6,288) width 71: "12345"
+          RenderText {#text} at (6,358) size 24x169
+            text run at (6,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+      RenderBlock {DIV} at (92,0) size 82x584
+        RenderBlock {DIV} at (0,0) size 36x584
+          RenderText {#text} at (6,0) size 24x72
+            text run at (6,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,72) size 24x24
+              text run at (6,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,96) size 24x48
+            text run at (6,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,144) size 24x24
+              text run at (6,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,168) size 24x120
+            text run at (6,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x71
+              text run at (6,288) width 71: "12345"
+          RenderText {#text} at (6,358) size 24x169
+            text run at (6,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+        RenderBlock {DIV} at (46,0) size 36x584
+          RenderText {#text} at (6,0) size 24x72
+            text run at (6,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,72) size 24x24
+              text run at (6,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,96) size 24x48
+            text run at (6,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,144) size 24x24
+              text run at (6,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,168) size 24x120
+            text run at (6,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x71
+              text run at (6,288) width 71: "12345"
+          RenderText {#text} at (6,358) size 24x169
+            text run at (6,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+      RenderBlock {DIV} at (184,0) size 82x584
+        RenderBlock {DIV} at (0,0) size 36x584
+          RenderText {#text} at (6,0) size 24x72
+            text run at (6,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,72) size 24x24
+              text run at (6,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,96) size 24x48
+            text run at (6,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,144) size 24x24
+              text run at (6,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,168) size 24x120
+            text run at (6,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x71
+              text run at (6,288) width 71: "12345"
+          RenderText {#text} at (6,358) size 24x169
+            text run at (6,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+        RenderBlock {DIV} at (46,0) size 36x584
+          RenderText {#text} at (6,0) size 24x72
+            text run at (6,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,72) size 24x24
+              text run at (6,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,96) size 24x48
+            text run at (6,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,144) size 24x24
+              text run at (6,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (6,168) size 24x120
+            text run at (6,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x71
+              text run at (6,288) width 71: "12345"
+          RenderText {#text} at (6,358) size 24x169
+            text run at (6,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+      RenderBlock {DIV} at (276,0) size 98x584
+        RenderBlock {DIV} at (0,0) size 44x584
+          RenderText {#text} at (14,0) size 24x72
+            text run at (14,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (14,72) size 24x24
+              text run at (14,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (14,96) size 24x48
+            text run at (14,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (14,144) size 24x24
+              text run at (14,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (14,168) size 24x120
+            text run at (14,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (14,288) size 24x71
+              text run at (14,288) width 71: "12345"
+          RenderText {#text} at (14,358) size 24x169
+            text run at (14,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"
+        RenderBlock {DIV} at (54,0) size 44x584
+          RenderText {#text} at (14,0) size 24x72
+            text run at (14,0) width 72: "\x{305D}\x{306E}\x{5973}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (14,72) size 24x24
+              text run at (14,72) width 24: "\x{FFFC}"
+          RenderText {#text} at (14,96) size 24x48
+            text run at (14,96) width 48: "\x{304C}\x{306D}"
+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (14,144) size 24x24
+              text run at (14,144) width 24: "\x{FFFC}"
+          RenderText {#text} at (14,168) size 24x120
+            text run at (14,168) width 120: "\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}"
+          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
+            RenderCombineText {#text} at (14,288) size 24x71
+              text run at (14,288) width 71: "12345"
+          RenderText {#text} at (14,358) size 24x169
+            text run at (14,358) width 168: "\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}"

Modified: trunk/Source/WebCore/ChangeLog (136764 => 136765)


--- trunk/Source/WebCore/ChangeLog	2012-12-05 22:46:56 UTC (rev 136764)
+++ trunk/Source/WebCore/ChangeLog	2012-12-05 23:07:31 UTC (rev 136765)
@@ -1,3 +1,16 @@
+2012-12-05  Dan Bernstein  <[email protected]>
+
+        Text decorations are rotated when text-combine takes effect
+        https://bugs.webkit.org/show_bug.cgi?id=104172
+
+        Reviewed by Dave Hyatt.
+
+        Test: fast/text/decorations-with-text-combine.html
+
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::paint): Applied a rotation to the graphics context when painting
+        the text decorations for combined text.
+
 2012-12-05  Justin Novosad  <[email protected]>
 
         [skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice

Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (136764 => 136765)


--- trunk/Source/WebCore/rendering/InlineTextBox.cpp	2012-12-05 22:46:56 UTC (rev 136764)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp	2012-12-05 23:07:31 UTC (rev 136765)
@@ -769,7 +769,11 @@
     ETextDecoration textDecorations = styleToUse->textDecorationsInEffect();
     if (textDecorations != TDNONE && paintInfo.phase != PaintPhaseSelection) {
         updateGraphicsContext(context, textFillColor, textStrokeColor, textStrokeWidth, styleToUse->colorSpace());
+        if (combinedText)
+            context->concatCTM(rotation(boxRect, Clockwise));
         paintDecoration(context, boxOrigin, textDecorations, styleToUse->textDecorationStyle(), textShadow);
+        if (combinedText)
+            context->concatCTM(rotation(boxRect, Counterclockwise));
     }
 
     if (paintInfo.phase == PaintPhaseForeground) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to