New issue
Advanced search Search tips

Issue 907175 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Filtering should apply before css clip and css clip-path

Project Member Reported by pdr@chromium.org, Nov 20

Issue description

According to the spec (https://drafts.fxtf.org/css-masking-1/#placement):
----------------------8<----------------------
The compositing model follows the SVG compositing model [SVG11]: First the element is styled under absence of filter effects, masking, clipping and opacity. Then the element and its descendants are drawn on a temporary canvas. In a last step the following effects are applied to the element in order: filter effects [FILTER-EFFECTS], clipping, masking and opacity.
----------------------8<----------------------

This means that an element that has a blur filter and is clipped should not have blurring extending beyond the bounds of the clip.

Gecko implements this behavior, but neither Blink nor WebKit do.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 20

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

commit 396a0004389678677bdf37c2ad683b56afdf216e
Author: Philip Rogers <pdr@chromium.org>
Date: Tue Nov 20 23:28:52 2018

[BlinkGenPropertyTrees] Filter effects should be clipped

According to the spec, filtering should apply before clipping
(https://drafts.fxtf.org/css-masking-1/#placement): "...effects are applied to
the element in order: filter effects, clipping, masking and opacity."

This patch fixes clip-path order with BlinkGenPropertyTrees (BGPT) which exposed
the issue of filter and clip order. Testcases have been added showing the fixed
behavior with BGPT, and the non-BGPT results have been marked as failing.

NOTRY=true

Bug:  906154 ,  907175 
Change-Id: I5e9c7dbb7c694afc623fbc3bb2c7f2f8cc458195
Reviewed-on: https://chromium-review.googlesource.com/c/1344217
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609847}
[modify] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
[modify] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-filter-order-ref.html
[add] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip-path/clip-path-filter-order.html
[add] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip/clip-filter-order-ref.html
[add] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/external/wpt/css/css-masking/clip/clip-filter-order.html
[add] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/external/wpt/svg/rendering/order/clip-path-filter-order-ref.svg
[add] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/WebKit/LayoutTests/external/wpt/svg/rendering/order/clip-path-filter-order.svg
[modify] https://crrev.com/396a0004389678677bdf37c2ad683b56afdf216e/third_party/blink/renderer/core/paint/compositing/compositing_layer_property_updater.cc

Status: Fixed (was: Assigned)

Sign in to add a comment