New issue
Advanced search Search tips

Issue 915847 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

-webkit-mask-composite does not ignore 'source-in' when there is only one mask image.

Reported by mab...@microsoft.com, Dec 17

Issue description

Chrome Version       : 71.0.3578.98 (Official Build) (64-bit) Windows 10
URLs (if applicable) : http://jsfiddle.net/0te1zv5p/5/
Other browsers tested:
    Firefox: OK
       Edge: OK

What steps will reproduce the problem?
(1) Open jsfiddle above

What is the expected result?
Both divs should be identical.

What happens instead?
The top div (which uses source-in) does not appear, but the second one (which uses xor) does appear correctly.

Please provide any additional information below. Attach a screenshot if
possible.

According to the spec (https://www.w3.org/TR/css-masking-1/#the-mask-composite), the compositing operator operates on the mask layer and any layers below it. However, if there are no layers below it, the operator should be ignored. It appears that the operator is correctly ignored in the case of "xor," but not for "source-in." I didn't test the other operators at this time.

Jsfiddle includes "mask-composite: intersect;" and "mask-composite: exclude;" for ease of opening in other browsers for comparison.
 
maskComposite.png
8.4 KB View Download
Cc: pbomm...@chromium.org e...@chromium.org futhark@chromium.org
Components: Blink>CSS
Labels: Needs-Bisect Target-73 M-73 OS-Android OS-Chrome OS-Mac OS-Windows
Able to reproduce the issue with latest Chrome Stable i.e, 71.0.3578.98 and previous stable channels as well i.e, 70.0.3538.110 and 69.0.3497.91.

Note : I see similar behavior on Chrome Beta, Dev and Canary channels i.e., 72.0.3626.17, 73.0.3639.1 and 73.0.3642.0 respectively.


Status: Available (was: Unconfirmed)
Labels: -Pri-3 Pri-2
Thanks for the report and test case. The behavior in Chrome is indeed incorrect.
Labels: -Needs-Bisect
Components: -Blink>CSS Blink>Paint
Owner: f...@opera.com
Status: Assigned (was: Available)
More of a painty thing I think.
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59363d40d5ce29cb6a4e3e8a253495159725a3c9

commit 59363d40d5ce29cb6a4e3e8a253495159725a3c9
Author: Fredrik Söderquist <fs@opera.com>
Date: Wed Dec 19 17:29:56 2018

Don't apply (-webkit-)mask-composite on the bottom mask layer

 "If there is no further mask layer, the compositing operator must
  be ignored."

  (https://drafts.fxtf.org/css-masking/#the-mask-composite)

Bug:  915847 
Change-Id: Ia42f188160cf84648e364829c7733dbb0895936b
Reviewed-on: https://chromium-review.googlesource.com/c/1384251
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#617865}
[modify] https://crrev.com/59363d40d5ce29cb6a4e3e8a253495159725a3c9/third_party/blink/renderer/core/paint/box_painter_base.cc
[add] https://crrev.com/59363d40d5ce29cb6a4e3e8a253495159725a3c9/third_party/blink/web_tests/css3/masking/mask-composite-source-in-single-layer-expected.html
[add] https://crrev.com/59363d40d5ce29cb6a4e3e8a253495159725a3c9/third_party/blink/web_tests/css3/masking/mask-composite-source-in-single-layer.html

Status: Fixed (was: Assigned)

Sign in to add a comment