Title: [223254] trunk
Revision
223254
Author
[email protected]
Date
2017-10-12 14:12:36 -0700 (Thu, 12 Oct 2017)

Log Message

Don't assert if mix-blend-mode is set to a non-separable blend mode on a composited layer
https://bugs.webkit.org/show_bug.cgi?id=178196
rdar://problem/34942337

Reviewed by Dan Bates.

Source/WebCore:

Core Animation doesn't support non-separable blend modes (hue, saturation, color, luminosity)
on layers, but don't assert if we try to use them.

Test: compositing/filters/blend-mode-saturation.html

* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(PlatformCAFilters::setBlendingFiltersOnLayer):

LayoutTests:

* compositing/filters/blend-mode-saturation-expected.txt: Added.
* compositing/filters/blend-mode-saturation.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (223253 => 223254)


--- trunk/LayoutTests/ChangeLog	2017-10-12 20:13:00 UTC (rev 223253)
+++ trunk/LayoutTests/ChangeLog	2017-10-12 21:12:36 UTC (rev 223254)
@@ -1,3 +1,14 @@
+2017-10-11  Simon Fraser  <[email protected]>
+
+        Don't assert if mix-blend-mode is set to a non-separable blend mode on a composited layer
+        https://bugs.webkit.org/show_bug.cgi?id=178196
+        rdar://problem/34942337
+
+        Reviewed by Dan Bates.
+
+        * compositing/filters/blend-mode-saturation-expected.txt: Added.
+        * compositing/filters/blend-mode-saturation.html: Added.
+
 2017-10-12  John Wilander  <[email protected]>
 
         ResourceLoadObserver::logFrameNavigation() should use redirectResponse.url()

Added: trunk/LayoutTests/compositing/filters/blend-mode-saturation-expected.txt (0 => 223254)


--- trunk/LayoutTests/compositing/filters/blend-mode-saturation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/filters/blend-mode-saturation-expected.txt	2017-10-12 21:12:36 UTC (rev 223254)
@@ -0,0 +1,3 @@
+This test should not assert (but the saturation blend mode may not be applied).
+
+

Added: trunk/LayoutTests/compositing/filters/blend-mode-saturation.html (0 => 223254)


--- trunk/LayoutTests/compositing/filters/blend-mode-saturation.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/filters/blend-mode-saturation.html	2017-10-12 21:12:36 UTC (rev 223254)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        .container {
+            position: absolute;
+            padding: 50px;
+            background-color: blue;
+            z-index: 0;
+        }
+        .box {
+            height: 100px;
+            width: 100px;
+            background-color: hsl(270, 60%, 70%);
+            border: 1px solid black;
+            mix-blend-mode: saturation;
+            will-change: transform;
+        }
+    </style>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+    </script>
+</head>
+<body>
+    <p>This test should not assert (but the saturation blend mode may not be applied).
+    <div class="container">
+        <div class="box"></div>
+    </div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (223253 => 223254)


--- trunk/Source/WebCore/ChangeLog	2017-10-12 20:13:00 UTC (rev 223253)
+++ trunk/Source/WebCore/ChangeLog	2017-10-12 21:12:36 UTC (rev 223254)
@@ -1,3 +1,19 @@
+2017-10-11  Simon Fraser  <[email protected]>
+
+        Don't assert if mix-blend-mode is set to a non-separable blend mode on a composited layer
+        https://bugs.webkit.org/show_bug.cgi?id=178196
+        rdar://problem/34942337
+
+        Reviewed by Dan Bates.
+
+        Core Animation doesn't support non-separable blend modes (hue, saturation, color, luminosity)
+        on layers, but don't assert if we try to use them.
+
+        Test: compositing/filters/blend-mode-saturation.html
+
+        * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
+        (PlatformCAFilters::setBlendingFiltersOnLayer):
+
 2017-10-12  John Wilander  <[email protected]>
 
         ResourceLoadObserver::logFrameNavigation() should use redirectResponse.url()

Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm (223253 => 223254)


--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm	2017-10-12 20:13:00 UTC (rev 223253)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm	2017-10-12 21:12:36 UTC (rev 223254)
@@ -586,6 +586,12 @@
     case BlendModePlusLighter:
         filter = [CAFilter filterWithType:kCAFilterPlusL];
         break;
+    case BlendModeHue:
+    case BlendModeSaturation:
+    case BlendModeColor:
+    case BlendModeLuminosity:
+        // FIXME: CA does't support non-separable blend modes on compositing filters.
+        break;
     default:
         ASSERT_NOT_REACHED();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to