Log Message
[Cairo] Anti-aliasing should not be always disabled for lines https://bugs.webkit.org/show_bug.cgi?id=109535
Patch by Viatcheslav Ostapenko <[email protected]> on 2013-05-03 Reviewed by Martin Robinson. Source/WebCore: Don't disable antialiasing for text lines because it produces ugly picture if page is scaled. Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::drawLineOnCairoContext): LayoutTests: Add pixel test with scaled text lines. * fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html: Added. * platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.png: Added. * platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt: Added.
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
Added Paths
- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
- trunk/LayoutTests/platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.png
- trunk/LayoutTests/platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt
Diff
Modified: trunk/LayoutTests/ChangeLog (149539 => 149540)
--- trunk/LayoutTests/ChangeLog 2013-05-03 21:41:54 UTC (rev 149539)
+++ trunk/LayoutTests/ChangeLog 2013-05-03 22:12:54 UTC (rev 149540)
@@ -1,3 +1,16 @@
+2013-05-03 Viatcheslav Ostapenko <[email protected]>
+
+ [Cairo] Anti-aliasing should not be always disabled for lines
+ https://bugs.webkit.org/show_bug.cgi?id=109535
+
+ Reviewed by Martin Robinson.
+
+ Add pixel test with scaled text lines.
+
+ * fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html: Added.
+ * platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.png: Added.
+ * platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt: Added.
+
2013-05-03 Stephanie Lewis <[email protected]>
Revert to old results on Lion.
Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html (0 => 149540)
--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html 2013-05-03 22:12:54 UTC (rev 149540)
@@ -0,0 +1,4 @@
+<!DOCTYPE HTML>
+<div style=" -webkit-transform: scale(0.7); -webkit-transform-origin: left top;">
+ <iframe src="" width="700px" height="700px"></iframe>
+</div>
Added: trunk/LayoutTests/platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.png
(Binary files differ)
Added: svn:mime-type
Added: trunk/LayoutTests/platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt (0 => 149540)
--- trunk/LayoutTests/platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/efl/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt 2013-05-03 22:12:54 UTC (rev 149540)
@@ -0,0 +1,117 @@
+layer at (0,0) size 785x724
+ RenderView at (0,0) size 785x600
+layer at (0,0) size 785x724
+ RenderBlock {HTML} at (0,0) size 785x724
+ RenderBody {BODY} at (8,8) size 769x708
+layer at (8,8) size 769x708
+ RenderBlock {DIV} at (0,0) size 769x708
+ RenderPartObject {IFRAME} at (0,0) size 704x704 [border: (2px inset #000000)]
+ layer at (0,0) size 700x700
+ RenderView at (0,0) size 700x700
+ layer at (0,0) size 700x700
+ RenderBlock {HTML} at (0,0) size 700x700
+ RenderBody {BODY} at (8,8) size 684x684
+ RenderBlock {DIV} at (0,0) size 684x36
+ RenderText {#text} at (0,0) size 348x17
+ text run at (0,0) width 348: "Each line of this test should match its style description ("
+ RenderInline {I} at (0,0) size 174x17
+ RenderText {#text} at (348,0) size 174x17
+ text run at (348,0) width 174: "-webkit-text-decoration-line"
+ RenderText {#text} at (522,0) size 43x17
+ text run at (522,0) width 43: " resets "
+ RenderInline {I} at (0,0) size 95x17
+ RenderText {#text} at (565,0) size 95x17
+ text run at (565,0) width 95: "text-decoration"
+ RenderText {#text} at (660,0) size 664x35
+ text run at (660,0) width 4: ","
+ text run at (0,18) width 194: "except when the latter is set as "
+ RenderInline {I} at (0,0) size 62x17
+ RenderText {#text} at (194,18) size 62x17
+ text run at (194,18) width 62: "important"
+ RenderText {#text} at (256,18) size 9x17
+ text run at (256,18) width 9: "):"
+ RenderBlock (anonymous) at (0,36) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,54) size 684x18
+ RenderText {#text} at (0,0) size 144x17
+ text run at (0,0) width 144: "This text is underlined "
+ RenderInline {SPAN} at (0,0) size 113x17
+ RenderText {#text} at (144,0) size 113x17
+ text run at (144,0) width 113: "(also inside span)."
+ RenderBlock (anonymous) at (0,72) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,90) size 684x18
+ RenderText {#text} at (0,0) size 136x17
+ text run at (0,0) width 136: "This text is overlined "
+ RenderInline {SPAN} at (0,0) size 113x17
+ RenderText {#text} at (136,0) size 113x17
+ text run at (136,0) width 113: "(also inside span)."
+ RenderBlock (anonymous) at (0,108) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,126) size 684x18
+ RenderText {#text} at (0,0) size 176x17
+ text run at (0,0) width 176: "This text has a line-through "
+ RenderInline {SPAN} at (0,0) size 113x17
+ RenderText {#text} at (176,0) size 113x17
+ text run at (176,0) width 113: "(also inside span)."
+ RenderBlock (anonymous) at (0,144) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,162) size 684x18
+ RenderText {#text} at (0,0) size 211x17
+ text run at (0,0) width 211: "This text contains no decorations."
+ RenderBlock (anonymous) at (0,180) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,198) size 684x18
+ RenderText {#text} at (0,0) size 144x17
+ text run at (0,0) width 144: "This text is underlined."
+ RenderBlock (anonymous) at (0,216) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,234) size 684x18
+ RenderText {#text} at (0,0) size 211x17
+ text run at (0,0) width 211: "This text contains no decorations."
+ RenderBlock (anonymous) at (0,252) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,270) size 684x18
+ RenderText {#text} at (0,0) size 136x17
+ text run at (0,0) width 136: "This text is overlined."
+ RenderBlock (anonymous) at (0,288) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,306) size 684x18
+ RenderText {#text} at (0,0) size 211x17
+ text run at (0,0) width 211: "This text contains no decorations."
+ RenderBlock (anonymous) at (0,324) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,342) size 684x18
+ RenderText {#text} at (0,0) size 176x17
+ text run at (0,0) width 176: "This text has a line-through."
+ RenderBlock (anonymous) at (0,360) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,378) size 684x18
+ RenderText {#text} at (0,0) size 211x17
+ text run at (0,0) width 211: "This text contains no decorations."
+ RenderBlock (anonymous) at (0,396) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,414) size 684x18
+ RenderText {#text} at (0,0) size 355x17
+ text run at (0,0) width 355: "This text is underlined, overlined and has a line-through."
+ RenderBlock (anonymous) at (0,432) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,450) size 684x18
+ RenderText {#text} at (0,0) size 211x17
+ text run at (0,0) width 211: "This text contains no decorations."
+ RenderBlock (anonymous) at (0,468) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,486) size 684x18
+ RenderText {#text} at (0,0) size 136x17
+ text run at (0,0) width 136: "This text is overlined."
+ RenderBlock (anonymous) at (0,504) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,522) size 684x18
+ RenderText {#text} at (0,0) size 136x17
+ text run at (0,0) width 136: "This text is overlined."
+ RenderBlock (anonymous) at (0,540) size 684x18
+ RenderBR {BR} at (0,0) size 0x17
+ RenderBlock {DIV} at (0,558) size 684x18
+ RenderText {#text} at (0,0) size 144x17
+ text run at (0,0) width 144: "This text is underlined."
+ RenderText {#text} at (0,0) size 0x0
Modified: trunk/Source/WebCore/ChangeLog (149539 => 149540)
--- trunk/Source/WebCore/ChangeLog 2013-05-03 21:41:54 UTC (rev 149539)
+++ trunk/Source/WebCore/ChangeLog 2013-05-03 22:12:54 UTC (rev 149540)
@@ -1,3 +1,18 @@
+2013-05-03 Viatcheslav Ostapenko <[email protected]>
+
+ [Cairo] Anti-aliasing should not be always disabled for lines
+ https://bugs.webkit.org/show_bug.cgi?id=109535
+
+ Reviewed by Martin Robinson.
+
+ Don't disable antialiasing for text lines because it produces ugly picture if
+ page is scaled.
+
+ Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::drawLineOnCairoContext):
+
2013-05-03 Daniel Bates <[email protected]>
Remove unnecessary include HTMLNames.h from RenderThemeGtk.cpp
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (149539 => 149540)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-05-03 21:41:54 UTC (rev 149539)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-05-03 22:12:54 UTC (rev 149540)
@@ -297,7 +297,6 @@
FloatPoint point2OnPixelBoundaries = point2;
GraphicsContext::adjustLineToPixelBoundaries(point1OnPixelBoundaries, point2OnPixelBoundaries, strokeThickness, style);
- cairo_set_antialias(context, CAIRO_ANTIALIAS_NONE);
if (patternWidth) {
// Do a rect fill of our endpoints. This ensures we always have the
// appearance of being a border. We then draw the actual dotted/dashed line.
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
