WebKit Bugzilla
Attachment 358244 Details for
Bug 193095
: REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193095-20190102205446.patch (text/plain), 9.24 KB, created by
Simon Fraser (smfr)
on 2019-01-02 20:54:46 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-01-02 20:54:46 PST
Size:
9.24 KB
patch
obsolete
>Subversion Revision: 239582 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 510b23b351439a44bc7ab2072803debab0d66f88..4de267b1994696735908aa5e12fcd6bb44fb4d05 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-01-02 Simon Fraser <simon.fraser@apple.com> >+ >+ REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later >+ https://bugs.webkit.org/show_bug.cgi?id=193095 >+ <rdar://problem/47014944> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave >+ and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)), >+ which continues to affect the appearance of text. >+ >+ Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing. >+ >+ Test: compositing/contents-format/subpixel-antialiased-text.html >+ >+ * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: >+ (WebCore::PlatformCALayer::drawLayerContents): >+ > 2019-01-02 Charles Vazac <cvazac@gmail.com> > > Fix resourcetimingbufferfull bubbles attribute >diff --git a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm >index a8af58bf9f9782d1b09101d5dfa939b4ba4f5a38..b5ace84a8e32fa282e5951c0382cb2be225882cb 100644 >--- a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm >+++ b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm >@@ -1184,7 +1184,7 @@ void PlatformCALayer::drawLayerContents(CGContextRef context, WebCore::PlatformC > graphicsContext.setIsCALayerContext(true); > graphicsContext.setIsAcceleratedContext(platformCALayer->acceleratesDrawing()); > >- if (!layerContents->platformCALayerContentsOpaque() && !platformCALayer->supportsSubpixelAntialiasedText()) { >+ if (!layerContents->platformCALayerContentsOpaque() && !platformCALayer->supportsSubpixelAntialiasedText() && FontCascade::isSubpixelAntialiasingAvailable()) { > // Turn off font smoothing to improve the appearance of text rendered onto a transparent background. > graphicsContext.setShouldSmoothFonts(false); > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c2882eb372f314f4cb10ef0396a2c854b6a1ac8c..ae9999f97392b90f44d91d7db4487b7b11224209 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-02 Simon Fraser <simon.fraser@apple.com> >+ >+ REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later >+ https://bugs.webkit.org/show_bug.cgi?id=193095 >+ <rdar://problem/47014944> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ A ref test that compares the rendering of layer and non-layer text with smoothing and antialiasing. >+ >+ * compositing/contents-format/subpixel-antialiased-text-expected.html: Added. >+ * compositing/contents-format/subpixel-antialiased-text.html: Added. >+ * platform/mac/TestExpectations: >+ > 2019-01-02 Charles Vazac <cvazac@gmail.com> > > Fix resourcetimingbufferfull bubbles attribute >diff --git a/LayoutTests/compositing/contents-format/subpixel-antialiased-text-expected.html b/LayoutTests/compositing/contents-format/subpixel-antialiased-text-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0e2e0f84ca1992f269c2d34081db926cf3a69d56 >--- /dev/null >+++ b/LayoutTests/compositing/contents-format/subpixel-antialiased-text-expected.html >@@ -0,0 +1,71 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <style> >+ .container { >+ display: inline-block; >+ height: 100px; >+ width: 220px; >+ padding: 5px; >+ margin: 10px; >+ border: 1px solid black; >+ box-sizing: border-box; >+ font-family: monospace; >+ } >+ >+ .antialiased { >+ -webkit-font-smoothing: antialiased; >+ } >+ >+ .smoothed { >+ -webkit-font-smoothing: subpixel-antialiased; >+ } >+ </style> >+ <script> >+ if (window.internals) { >+ internals.setFontSmoothingEnabled(true); >+ internals.settings.setSubpixelAntialiasedLayerTextEnabled(true) >+ } >+ </script> >+</head> >+<body> >+ >+<h2>Composited vs. non-composited</h2> >+<section> >+<div class="container"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+</div> >+ >+<div class="container"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+</div> >+</section> >+ >+<h2>Non-composited: antialiased vs. smoothed</h2> >+ >+<section> >+ <div class="container antialiased"> >+ This text should look visibly thinner.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+ >+ <div class="container smoothed"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+</section> >+ >+<h2>Composited: antialiased vs. smoothed</h2> >+ >+<section> >+ <div class="container antialiased"> >+ This text should look visibly thinner.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+ >+ <div class="container smoothed"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+</section> >+ >+ >+</body> >+</html> >diff --git a/LayoutTests/compositing/contents-format/subpixel-antialiased-text.html b/LayoutTests/compositing/contents-format/subpixel-antialiased-text.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bda9adeeb6aa31d64bdc6eda4a9a51f20514b9e7 >--- /dev/null >+++ b/LayoutTests/compositing/contents-format/subpixel-antialiased-text.html >@@ -0,0 +1,75 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <style> >+ .container { >+ display: inline-block; >+ height: 100px; >+ width: 220px; >+ padding: 5px; >+ margin: 10px; >+ border: 1px solid black; >+ box-sizing: border-box; >+ font-family: monospace; >+ } >+ >+ .composited { >+ will-change: transform; >+ } >+ >+ .antialiased { >+ -webkit-font-smoothing: antialiased; >+ } >+ >+ .smoothed { >+ -webkit-font-smoothing: subpixel-antialiased; >+ } >+ </style> >+ <script> >+ if (window.internals) { >+ internals.setFontSmoothingEnabled(true); >+ internals.settings.setSubpixelAntialiasedLayerTextEnabled(true) >+ } >+ </script> >+</head> >+<body> >+ >+<h2>Composited vs. non-composited</h2> >+<section> >+<div class="container"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+</div> >+ >+<div class="composited container"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+</div> >+</section> >+ >+<h2>Non-composited: antialiased vs. smoothed</h2> >+ >+<section> >+ <div class="container antialiased"> >+ This text should look visibly thinner.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+ >+ <div class="container smoothed"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+</section> >+ >+<h2>Composited: antialiased vs. smoothed</h2> >+ >+<section> >+ <div class="container composited antialiased"> >+ This text should look visibly thinner.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+ >+ <div class="container composited smoothed"> >+ This text should have the normal appearance.<br> a b c d e f g h i j k l m n o p q r s t u v w x y z >+ </div> >+</section> >+ >+ >+</body> >+</html> >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 639de59eeaf13b90428d26f7e9cab00fcbe860c4..032dab65cf6fc676446f763caac2816d859bced3 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1752,6 +1752,9 @@ webkit.org/b/187393 imported/w3c/web-platform-tests/2dcontext/imagebitmap/create > [ Mojave+ ] imported/blink/fast/text/international/text-shaping-arabic.html [ ImageOnlyFailure ] > [ Mojave+ ] imported/blink/fast/text/international/vertical-positioning-with-combining-marks.html [ ImageOnlyFailure ] > >+# < Mojave uses font smoothing. >+[ HighSierra ] compositing/contents-format/subpixel-antialiased-text.html [ ImageOnlyFailure ] >+ > # < Mojave doesn't support the CG needed for Conic Gradients > [ Mojave+ ] http/wpt/css/css-images-4/conic-gradient-parsing.html [ Pass ] > [ Mojave+ ] fast/gradients/conic-repeating.html [ Pass ] >@@ -1813,4 +1816,4 @@ webkit.org/b/192956 [ Sierra ] webgpu/textures-textureviews.html [ Skip ] > webkit.org/b/192956 [ Sierra ] webgpu/webgpu-basics.html [ Skip ] > webkit.org/b/192956 [ Sierra ] webgpu/webgpu-enabled.html [ Skip ] > webkit.org/b/192956 [ Sierra ] webgpu/simple-triangle-strip.html [ Skip ] >-webkit.org/b/192956 [ Sierra ] webgpu/vertex-buffer-triangle-strip.html [ Skip ] >\ No newline at end of file >+webkit.org/b/192956 [ Sierra ] webgpu/vertex-buffer-triangle-strip.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
zalan
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193095
:
358227
| 358244 |
358245