- Revision
- 206422
- Author
- mmaxfi...@apple.com
- Date
- 2016-09-27 01:10:34 -0700 (Tue, 27 Sep 2016)
Log Message
REGRESSION(r205883): Letterpressed text is invisible
https://bugs.webkit.org/show_bug.cgi?id=162590
Source/WebCore:
<rdar://problem/28141512>
Reviewed by Simon Fraser.
r205883 removed the last place where we use CGFonts directly in WebKit. However,
our letterpress code is sensitive to the current state of the CGContext.
Tests: fast/text/letterpress-different.html
fast/text/letterpress-paint.html
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::showLetterpressedGlyphsWithAdvances):
LayoutTests:
Reviewed by Simon Fraser.
Letterpress is only implemented on iOS, so letterpress-different.html is marked
as only passing on iOS. letterpress-paint.html makes sure that letterpressed paint
is not invisible.
* TestExpectations:
* fast/text/letterpress-different-expected-mismatch.html: Added.
* fast/text/letterpress-different.html: Added.
* fast/text/letterpress-paint-expected-mismatch.html: Added.
* fast/text/letterpress-paint.html: Added.
* platform/ios-simulator/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (206421 => 206422)
--- trunk/LayoutTests/ChangeLog 2016-09-27 07:58:48 UTC (rev 206421)
+++ trunk/LayoutTests/ChangeLog 2016-09-27 08:10:34 UTC (rev 206422)
@@ -1,3 +1,21 @@
+2016-09-27 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ REGRESSION(r205883): Letterpressed text is invisible
+ https://bugs.webkit.org/show_bug.cgi?id=162590
+
+ Reviewed by Simon Fraser.
+
+ Letterpress is only implemented on iOS, so letterpress-different.html is marked
+ as only passing on iOS. letterpress-paint.html makes sure that letterpressed paint
+ is not invisible.
+
+ * TestExpectations:
+ * fast/text/letterpress-different-expected-mismatch.html: Added.
+ * fast/text/letterpress-different.html: Added.
+ * fast/text/letterpress-paint-expected-mismatch.html: Added.
+ * fast/text/letterpress-paint.html: Added.
+ * platform/ios-simulator/TestExpectations:
+
2017-09-26 Ryan Haddad <ryanhad...@apple.com>
Marking css3/filters/backdrop/backdrop-filter-with-reflection* tests as flaky on Sierra WK1.
Modified: trunk/LayoutTests/TestExpectations (206421 => 206422)
--- trunk/LayoutTests/TestExpectations 2016-09-27 07:58:48 UTC (rev 206421)
+++ trunk/LayoutTests/TestExpectations 2016-09-27 08:10:34 UTC (rev 206422)
@@ -982,3 +982,6 @@
webkit.org/b/161088 imported/w3c/web-platform-tests/resource-timing/resource-timing.html [ Pass Failure ]
webkit.org/b/162414 imported/w3c/web-platform-tests/resource-timing/idlharness.html [ Pass Failure ]
+
+# Only iOS has implemented lettepress.
+fast/text/letterpress-different.html [ ImageOnlyFailure ]
Added: trunk/LayoutTests/fast/text/letterpress-different-expected-mismatch.html (0 => 206422)
--- trunk/LayoutTests/fast/text/letterpress-different-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/text/letterpress-different-expected-mismatch.html 2016-09-27 08:10:34 UTC (rev 206422)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div style="font: 17px -apple-system;">Test passes if this text has a letterpress effect.</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/letterpress-different.html (0 => 206422)
--- trunk/LayoutTests/fast/text/letterpress-different.html (rev 0)
+++ trunk/LayoutTests/fast/text/letterpress-different.html 2016-09-27 08:10:34 UTC (rev 206422)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div style="font: 17px -apple-system; text-decoration: -webkit-letterpress;">Test passes if this text has a letterpress effect.</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/letterpress-paint-expected-mismatch.html (0 => 206422)
--- trunk/LayoutTests/fast/text/letterpress-paint-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/text/letterpress-paint-expected-mismatch.html 2016-09-27 08:10:34 UTC (rev 206422)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/letterpress-paint.html (0 => 206422)
--- trunk/LayoutTests/fast/text/letterpress-paint.html (rev 0)
+++ trunk/LayoutTests/fast/text/letterpress-paint.html 2016-09-27 08:10:34 UTC (rev 206422)
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div style="font: 17px -apple-system; text-decoration: -webkit-letterpress;">Test passes if something paints.</div>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (206421 => 206422)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2016-09-27 07:58:48 UTC (rev 206421)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2016-09-27 08:10:34 UTC (rev 206422)
@@ -2660,3 +2660,6 @@
webkit.org/b/161949 imported/w3c/web-platform-tests/XMLHttpRequest/response-method.htm [ Failure ]
webkit.org/b/130972 transitions/3d/interrupted-transition.html [ Pass Timeout ]
+
+# Only iOS has implemented lettepress.
+fast/text/letterpress-different.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (206421 => 206422)
--- trunk/Source/WebCore/ChangeLog 2016-09-27 07:58:48 UTC (rev 206421)
+++ trunk/Source/WebCore/ChangeLog 2016-09-27 08:10:34 UTC (rev 206422)
@@ -1,3 +1,20 @@
+2016-09-27 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ REGRESSION(r205883): Letterpressed text is invisible
+ https://bugs.webkit.org/show_bug.cgi?id=162590
+ <rdar://problem/28141512>
+
+ Reviewed by Simon Fraser.
+
+ r205883 removed the last place where we use CGFonts directly in WebKit. However,
+ our letterpress code is sensitive to the current state of the CGContext.
+
+ Tests: fast/text/letterpress-different.html
+ fast/text/letterpress-paint.html
+
+ * platform/graphics/cocoa/FontCascadeCocoa.mm:
+ (WebCore::showLetterpressedGlyphsWithAdvances):
+
2016-09-27 Youenn Fablet <you...@apple.com>
[Fetch API] Refactor FetchBody to use std::experimental::variant
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (206421 => 206422)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm 2016-09-27 07:58:48 UTC (rev 206421)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm 2016-09-27 08:10:34 UTC (rev 206422)
@@ -120,7 +120,13 @@
styleConfiguration.useSimplifiedEffect = YES;
}
+ CGContextSetFont(context, adoptCF(CTFontCopyGraphicsFont(ctFont, nullptr)).get());
+ CGContextSetFontSize(context, platformData.size());
+
[catalog drawGlyphs:glyphs atPositions:positions.data() inContext:context withFont:ctFont count:count stylePresetName:@"_UIKitNewLetterpressStyle" styleConfiguration:styleConfiguration foregroundColor:CGContextGetFillColorAsColor(context)];
+
+ CGContextSetFont(context, nullptr);
+ CGContextSetFontSize(context, 0);
#else
UNUSED_PARAM(point);
UNUSED_PARAM(font);