Title: [223992] trunk
- Revision
- 223992
- Author
- [email protected]
- Date
- 2017-10-25 16:21:38 -0700 (Wed, 25 Oct 2017)
Log Message
Aliasing of text in CSS specs is blocky and ugly
https://bugs.webkit.org/show_bug.cgi?id=174946
Source/WebCore:
rdar://problem/33594542
Reviewed by Dean Jackson.
The PaintedContentRequest relating to subpixel-antialiased text was failing to be
satisfied if the text content in a composited layer was nested inside descendant
RenderLayers, because RenderLayer::isVisuallyNonEmpty() returned early. If this
function is passed a request, we can't return until we've satisfied the request
(which triggers the checking of descendant layers).
Test: compositing/contents-format/subpixel-antialiased-nested-layer.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
LayoutTests:
Reviewed by Dean Jackson.
* compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: Added.
* compositing/contents-format/subpixel-antialiased-nested-layer.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (223991 => 223992)
--- trunk/LayoutTests/ChangeLog 2017-10-25 23:13:19 UTC (rev 223991)
+++ trunk/LayoutTests/ChangeLog 2017-10-25 23:21:38 UTC (rev 223992)
@@ -1,5 +1,15 @@
2017-10-25 Simon Fraser <[email protected]>
+ Aliasing of text in CSS specs is blocky and ugly
+ https://bugs.webkit.org/show_bug.cgi?id=174946
+
+ Reviewed by Dean Jackson.
+
+ * compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt: Added.
+ * compositing/contents-format/subpixel-antialiased-nested-layer.html: Added.
+
+2017-10-25 Simon Fraser <[email protected]>
+
When navigating back to a page, compositing layers may not use accelerated drawing
https://bugs.webkit.org/show_bug.cgi?id=178749
rdar://problem/35158946
Added: trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt (0 => 223992)
--- trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt 2017-10-25 23:21:38 UTC (rev 223992)
@@ -0,0 +1,20 @@
+This layer should get smoothing.
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 12.00 4.00)
+ (bounds 162.00 162.00)
+ (supports subpixel antialiased text 1)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-nested-layer.html (0 => 223992)
--- trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-nested-layer.html (rev 0)
+++ trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-nested-layer.html 2017-10-25 23:21:38 UTC (rev 223992)
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ height: 150px;
+ width: 150px;
+ position: relative;
+ border: 1px solid black;
+ padding: 20px;
+ margin: 10px;
+ box-sizing: border-box;
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
+ }
+
+
+ .composited {
+ will-change: transform;
+ }
+
+ .positioned {
+ position: absolute;
+ border: 1px solid rgba(0, 0, 0, 0.5);
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ if (window.internals) {
+ internals.setFontSmoothingEnabled(true);
+ internals.settings.setSubpixelAntialiasedLayerTextEnabled(true)
+ }
+
+ function doTest()
+ {
+
+ if (window.internals)
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+
+<div class="composited container">
+ <div class="positioned">
+ This layer should get smoothing.
+ </div>
+</div>
+<pre id="layers"></pre>
+
+</body>
+</html>
Added: trunk/LayoutTests/platform/ios/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt (0 => 223992)
--- trunk/LayoutTests/platform/ios/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/compositing/contents-format/subpixel-antialiased-nested-layer-expected.txt 2017-10-25 23:21:38 UTC (rev 223992)
@@ -0,0 +1,19 @@
+This layer should get smoothing.
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 12.00 4.00)
+ (bounds 162.00 162.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Modified: trunk/Source/WebCore/ChangeLog (223991 => 223992)
--- trunk/Source/WebCore/ChangeLog 2017-10-25 23:13:19 UTC (rev 223991)
+++ trunk/Source/WebCore/ChangeLog 2017-10-25 23:21:38 UTC (rev 223992)
@@ -1,3 +1,22 @@
+2017-10-25 Simon Fraser <[email protected]>
+
+ Aliasing of text in CSS specs is blocky and ugly
+ https://bugs.webkit.org/show_bug.cgi?id=174946
+ rdar://problem/33594542
+
+ Reviewed by Dean Jackson.
+
+ The PaintedContentRequest relating to subpixel-antialiased text was failing to be
+ satisfied if the text content in a composited layer was nested inside descendant
+ RenderLayers, because RenderLayer::isVisuallyNonEmpty() returned early. If this
+ function is passed a request, we can't return until we've satisfied the request
+ (which triggers the checking of descendant layers).
+
+ Test: compositing/contents-format/subpixel-antialiased-nested-layer.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::calculateClipRects const):
+
2017-10-25 Chris Dumez <[email protected]>
Unreviewed, add missing copyright header to ServiceWorkerClientType.idl.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (223991 => 223992)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2017-10-25 23:13:19 UTC (rev 223991)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2017-10-25 23:21:38 UTC (rev 223992)
@@ -6452,17 +6452,23 @@
return false;
if (renderer().isRenderReplaced() || hasOverflowControls()) {
- if (request)
- request->setHasPaintedContent();
- return true;
+ if (!request)
+ return true;
+
+ request->setHasPaintedContent();
+ if (request->isSatisfied())
+ return true;
}
if (hasVisibleBoxDecorationsOrBackground()) {
- if (request)
- request->setHasPaintedContent();
- return true;
+ if (!request)
+ return true;
+
+ request->setHasPaintedContent();
+ if (request->isSatisfied())
+ return true;
}
-
+
PaintedContentRequest localRequest;
if (!request)
request = &localRequest;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes