Title: [212941] trunk
- Revision
- 212941
- Author
- simon.fra...@apple.com
- Date
- 2017-02-23 21:33:40 -0800 (Thu, 23 Feb 2017)
Log Message
REGRESSION (r211305): Masks on composited elements with preserve-3d broken
https://bugs.webkit.org/show_bug.cgi?id=168815
rdar://problem/30676846
Reviewed by Jon Lee.
Source/WebCore:
r211305 moved the mask layer to be on the structural layer if there is one, to fix
masking backdrops. However, with preserve-3d the structural layer can be a CATransformLayer,
which doesn't take a mask, so limit the previous change to backdrops only.
Test: compositing/masks/mask-with-preserve-3d.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateMaskLayer):
LayoutTests:
* compositing/masks/mask-with-preserve-3d-expected.html: Added.
* compositing/masks/mask-with-preserve-3d.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (212940 => 212941)
--- trunk/LayoutTests/ChangeLog 2017-02-24 05:27:54 UTC (rev 212940)
+++ trunk/LayoutTests/ChangeLog 2017-02-24 05:33:40 UTC (rev 212941)
@@ -1,3 +1,14 @@
+2017-02-23 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r211305): Masks on composited elements with preserve-3d broken
+ https://bugs.webkit.org/show_bug.cgi?id=168815
+ rdar://problem/30676846
+
+ Reviewed by Jon Lee.
+
+ * compositing/masks/mask-with-preserve-3d-expected.html: Added.
+ * compositing/masks/mask-with-preserve-3d.html: Added.
+
2017-02-23 Chris Dumez <cdu...@apple.com>
Unreviewed, try to reduce flakiness to timer throttling tests
Added: trunk/LayoutTests/compositing/masks/mask-with-preserve-3d-expected.html (0 => 212941)
--- trunk/LayoutTests/compositing/masks/mask-with-preserve-3d-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/masks/mask-with-preserve-3d-expected.html 2017-02-24 05:33:40 UTC (rev 212941)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ width: 250px;
+ height: 250px;
+ margin: 10px;
+ background-color: green;
+ box-sizing: border-box;
+ -webkit-mask-image: linear-gradient(black, transparent);
+ border: 5px solid black;
+ }
+
+ .composited {
+ transform: translateZ(0);
+ }
+ </style>
+</head>
+<body>
+
+<p>Both boxes should look the same, and show a fade to the bottom.</p>
+<div class="masked composited box"></div>
+<div class="masked composited box"></div>
+
+</body>
+</html>
Added: trunk/LayoutTests/compositing/masks/mask-with-preserve-3d.html (0 => 212941)
--- trunk/LayoutTests/compositing/masks/mask-with-preserve-3d.html (rev 0)
+++ trunk/LayoutTests/compositing/masks/mask-with-preserve-3d.html 2017-02-24 05:33:40 UTC (rev 212941)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ width: 250px;
+ height: 250px;
+ margin: 10px;
+ background-color: green;
+ box-sizing: border-box;
+ -webkit-mask-image: linear-gradient(black, transparent);
+ border: 5px solid black;
+ }
+
+ .composited {
+ transform: translateZ(0);
+ }
+ </style>
+</head>
+<body>
+
+<p>Both boxes should look the same, and show a fade to the bottom.</p>
+<div class="masked composited box"></div>
+<div class="masked composited box" style="-webkit-transform-style: preserve-3d;"></div>
+
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (212940 => 212941)
--- trunk/Source/WebCore/ChangeLog 2017-02-24 05:27:54 UTC (rev 212940)
+++ trunk/Source/WebCore/ChangeLog 2017-02-24 05:33:40 UTC (rev 212941)
@@ -1,3 +1,20 @@
+2017-02-23 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r211305): Masks on composited elements with preserve-3d broken
+ https://bugs.webkit.org/show_bug.cgi?id=168815
+ rdar://problem/30676846
+
+ Reviewed by Jon Lee.
+
+ r211305 moved the mask layer to be on the structural layer if there is one, to fix
+ masking backdrops. However, with preserve-3d the structural layer can be a CATransformLayer,
+ which doesn't take a mask, so limit the previous change to backdrops only.
+
+ Test: compositing/masks/mask-with-preserve-3d.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::updateMaskLayer):
+
2017-02-23 Antoine Quint <grao...@apple.com>
[Modern Media Controls] Show "Loading" until playback starts
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (212940 => 212941)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2017-02-24 05:27:54 UTC (rev 212940)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2017-02-24 05:33:40 UTC (rev 212941)
@@ -2554,7 +2554,7 @@
PlatformCALayer* maskCALayer = m_maskLayer ? downcast<GraphicsLayerCA>(*m_maskLayer).primaryLayer() : nullptr;
LayerMap* layerCloneMap;
- if (m_structuralLayer) {
+ if (m_structuralLayer && structuralLayerPurpose() == StructuralLayerForBackdrop) {
m_structuralLayer->setMask(maskCALayer);
layerCloneMap = m_structuralLayerClones.get();
} else {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes