Last Comment Bug 1042296 - SVG mix-blend-mode doesn't work when combined with clip-path
: SVG mix-blend-mode doesn't work when combined with clip-path
Status: NEW
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: 34 Branch
: x86 macOS
P3 normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Sean Voisen (:svoisen)
Mentors:
Depends on:
Blocks: svg-enhance
  Show dependency treegraph
 
Reported: 2014-07-22 13:45 PDT by Peter Lai
Modified: 2018-01-27 04:24 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
blend-mode-bug.svg (1.09 KB, image/svg+xml)
2014-07-22 13:45 PDT, Peter Lai
no flags Details
Screenshot from 2016-10-12 16-29-12.png (287.18 KB, image/png)
2016-10-12 01:29 PDT, u459114
no flags Details
Bug 1042296 - Part 1. Implement ShouldCopyBackground. (58 bytes, text/x-review-board-request)
2016-11-10 09:23 PST, u459114
no flags Details

Description User image Peter Lai 2014-07-22 13:45:12 PDT
Created attachment 8460520 [details]
blend-mode-bug.svg

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36

Steps to reproduce:

Open the attached file to view the repro.


Actual results:

When mix-blend-mode is used in conjunction with clip-path, the resulting colors are incorrect.


Expected results:

mix-blend-mode should correctly be applied regardless of whether clip paths are used. (NOTE: the mix-blend-mode experimental flag must be enabled).
Comment 1 User image Paul Silaghi, QA [:pauly] 2014-07-24 07:57:17 PDT
Confirmed in 34.0a1 (2014-07-24), Win 7 x64
Comment 2 User image u459114 2016-09-29 06:10:57 PDT
The first patch in bug 1279409 can "partially" fix the bug here. There are still another cause.
Comment 3 User image u459114 2016-10-12 01:23:37 PDT
The painting result(the content of texture) is correct now. But the composition result of "#top_right" one is not right yet. I would suggest find a developer who is familiar with compositor to do further analysis. Deassign from myself.
Comment 4 User image u459114 2016-10-12 01:29:40 PDT
Created attachment 8800148 [details]
Screenshot from 2016-10-12 16-29-12.png
Comment 5 User image Ethan Lin[:ethlin] 2016-10-14 01:29:49 PDT
After study, it's not compositor problem. I printed the layer tree in content and the blend mode of the layer was none.
So I traced back to ProcessDisplayItems. I found that for the wrong case, we create a temp BasicLayerManager and the layer created by nsDisplayBlendMode is contained in this BasicLayerManager. The PaintInactiveLayer result of the temp BasicLayerManager doesn't have the blend effect. The blend operation may be removed in bug 1279409.
Comment 6 User image u459114 2016-10-14 03:04:01 PDT
Rendering result is not correct when nsDisplayMask contains a nsDisplayBlendMode child.
Comment 7 User image Markus Stange [:mstange] 2016-10-14 06:23:11 PDT
Why is the blend mode inside the mask? nsIFrame::BuildDisplayListForStackingContext should be creating the blend mode outside the mask.
Comment 8 User image u459114 2016-11-10 09:23:58 PST Comment hidden (mozreview-request)

Note You need to log in before you can comment on or make changes to this bug.